|
|
1.1 ! root 1: #if defined(LIBC_SCCS) && !defined(lint) ! 2: static char sccsid[] = "@(#)strcmp.c 5.2 (Berkeley) 3/9/86"; ! 3: #endif LIBC_SCCS and not lint ! 4: ! 5: /* ! 6: * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0 ! 7: */ ! 8: ! 9: strcmp(s1, s2) ! 10: register char *s1, *s2; ! 11: { ! 12: ! 13: while (*s1 == *s2++) ! 14: if (*s1++=='\0') ! 15: return(0); ! 16: return(*s1 - *--s2); ! 17: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.