Files
Arquivotheca.SunOS-4.1.4/lib/libc/gen/common/strcmp.c
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

18 lines
316 B
C

#if !defined(lint) && defined(SCCSIDS)
static char sccsid[] = "@(#)strcmp.c 1.1 94/10/31 SMI"; /* from UCB 4.1 80/12/21 */
#endif
/*
* Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
*/
strcmp(s1, s2)
register char *s1, *s2;
{
while (*s1 == *s2++)
if (*s1++=='\0')
return (0);
return (*s1 - *--s2);
}