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 strncmp( const char * s1, const char * s2, size_t n ) { /* TODO */ };
10 /* PDPC code - unreviewed
12 const unsigned char *p1;
13 const unsigned char *p2;
16 p1 = (const unsigned char *)s1;
17 p2 = (const unsigned char *)s2;
20 if (p1[x] < p2[x]) return (-1);
21 else if (p1[x] > p2[x]) return (1);
22 else if (p1[x] == '\0') return (0);