5 /* memcmp( const void *, const void *, size_t )
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
15 int memcmp( const void * s1, const void * s2, size_t n )
17 const unsigned char * p1 = (const unsigned char *) s1;
18 const unsigned char * p2 = (const unsigned char *) s2;
34 #include <_PDCLIB_test.h>
38 char const xxxxx[] = "xxxxx";
40 TESTCASE( memcmp( abcde, abcdx, 5 ) < 0 );
41 TESTCASE( memcmp( abcde, abcdx, 4 ) == 0 );
42 TESTCASE( memcmp( abcde, xxxxx, 0 ) == 0 );
43 TESTCASE( memcmp( xxxxx, abcde, 1 ) > 0 );