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 // ----------------------------------------------------------------------------
11 const void * memchr( const void * s, int c, size_t n ) { /* TODO */ };
12 void * memchr( void * s, int c, size_t n ) { /* TODO */ };
14 // ----------------------------------------------------------------------------
17 void * memchr( const void * s, int c, size_t n ) { /* TODO */ };
19 /* PDPC code - unreviewed
21 const unsigned char *p;
24 p = (const unsigned char *)s;
27 if (*p == (unsigned char)c) return ((void *)p);