clean up awk syntax
[unix-history] / usr / src / lib / libc / string / strcmp.c
CommitLineData
2ce81398
DS
1#if defined(LIBC_SCCS) && !defined(lint)
2static char sccsid[] = "@(#)strcmp.c 5.2 (Berkeley) %G%";
3#endif LIBC_SCCS and not lint
b8f253e8 4
9c7cf302
BJ
5/*
6 * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
7 */
8
9strcmp(s1, s2)
10register char *s1, *s2;
11{
12
13 while (*s1 == *s2++)
14 if (*s1++=='\0')
15 return(0);
16 return(*s1 - *--s2);
17}