Adding upstream version 3.50~pre5.
[syslinux-debian/hramrach.git] / com32 / lib / strcmp.c
blobf44774f4435bf7a4a4b53d02b6bfb73d5e0a6bea
1 /*
2 * strcmp.c
3 */
5 #include <string.h>
7 int strcmp(const char *s1, const char *s2)
9 const unsigned char *c1 = s1, *c2 = s2;
10 unsigned char ch;
11 int d = 0;
13 while ( 1 ) {
14 d = (int)(ch = *c1++) - (int)*c2++;
15 if ( d || !ch )
16 break;
19 return d;