source: trunk/essentials/sys-apps/gawk/missing_d/memcmp.c

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 337 bytes
Line 
1/*
2 * memcmp --- compare strings.
3 *
4 * We use our own routine since it has to act like strcmp() for return
5 * value, and the BSD manual says bcmp() only returns zero/non-zero.
6 */
7
8int
9memcmp (s1, s2, l)
10register char *s1, *s2;
11register int l;
12{
13 for (; l-- > 0; s1++, s2++) {
14 if (*s1 != *s2)
15 return (*s1 - *s2);
16 }
17 return (0);
18}
Note: See TracBrowser for help on using the repository browser.