Annotation of coherent/b/lib/libc/string/strcmp.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * strcmp.c
        !             3:  * ANSI 4.11.4.2.
        !             4:  * Lexicographic comparison of two strings.
        !             5:  */
        !             6: 
        !             7: #include <string.h>
        !             8: 
        !             9: int strcmp(s1, s2) register char *s1, *s2;
        !            10: {
        !            11:        while (*s1 == *s2++)
        !            12:                if (*s1++ == '\0')
        !            13:                        return (0);
        !            14:        if (*s1 < *--s2)
        !            15:                return (-1);
        !            16:        return (1);
        !            17: }

unix.superglobalmegacorp.com

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