Revision: | 2.1 |
Committed: | Tue Aug 4 11:07:51 1992 UTC (32 years, 9 months ago) by greg |
Content type: | text/plain |
Branch: | MAIN |
Log Message: | Initial revision |
# | Content |
---|---|
1 | /* Copyright (c) 1992 Regents of the University of California */ |
2 | |
3 | #ifndef lint |
4 | static char SCCSid[] = "$SunId$ LBL"; |
5 | #endif |
6 | |
7 | /* |
8 | * String comparison routine optimized for use with savestr.c |
9 | */ |
10 | |
11 | |
12 | int |
13 | strcmp(s1, s2) /* check for s1==s2 */ |
14 | register char *s1, *s2; |
15 | { |
16 | if (s1 == s2) |
17 | return(0); |
18 | |
19 | while (*s1 == *s2++) |
20 | if (!*s1++) |
21 | return(0); |
22 | |
23 | return(*s1 - *--s2); |
24 | } |