Annotation of researchv9/jerq/src/lib/c/strncmp.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Compare strings (at most n bytes):  s1>s2: >0  s1==s2: 0  s1<s2: <0
        !             3:  */
        !             4: 
        !             5: strncmp(s1, s2, n)
        !             6: register char *s1, *s2;
        !             7: register n;
        !             8: {
        !             9: 
        !            10:        while (--n >= 0 && *s1 == *s2++)
        !            11:                if (*s1++ == '\0')
        !            12:                        return(0);
        !            13:        return(n<0 ? 0 : *s1 - *--s2);
        !            14: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.