1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
4 // Public Domain C Library - http://pdclib.sourceforge.net
5 // This code is Public Domain. Use, modify, and redistribute at will.
6 // ----------------------------------------------------------------------------
8 int strcmp( const char * s1, const char * s2 ) { /* TODO */ };
12 while ((*s1 != '\0') && (*s1 == *s2))
17 return (*(unsigned char *) s1) - (*(unsigned char *) s2);
21 /* PDPC code - unreviewed
23 const unsigned char *p1;
24 const unsigned char *p2;
26 p1 = (const unsigned char *)s1;
27 p2 = (const unsigned char *)s2;
30 if (*p1 < *p2) return (-1);
31 else if (*p1 > *p2) return (1);
35 if (*p2 == '\0') return (0);