X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstring%2Fstrchr.c;h=621100e04828860d931194276520020469f3168c;hb=18dee35aba1ae0fcdecb0cd11d4f3c1a0d94b51e;hp=96ab0519aafbbdc8f4be004cf77929fabfc1914c;hpb=2f57d79a5a24856fdea69b2119d67e5fb5029b3e;p=pdclib diff --git a/functions/string/strchr.c b/functions/string/strchr.c index 96ab051..621100e 100644 --- a/functions/string/strchr.c +++ b/functions/string/strchr.c @@ -1,7 +1,3 @@ -/* $Id$ */ - -/* Release $Name$ */ - /* strchr( const char *, int ) This file is part of the Public Domain C Library (PDCLib). @@ -10,6 +6,8 @@ #include +#ifndef REGTEST + char * strchr( const char * s, int c ) { do @@ -22,13 +20,15 @@ char * strchr( const char * s, int c ) return NULL; } +#endif + #ifdef TEST -#include <_PDCLIB_test.h> -int main() +#include "_PDCLIB_test.h" + +int main( void ) { char abccd[] = "abccd"; - BEGIN_TESTS; TESTCASE( strchr( abccd, 'x' ) == NULL ); TESTCASE( strchr( abccd, 'a' ) == &abccd[0] ); TESTCASE( strchr( abccd, 'd' ) == &abccd[4] ); @@ -36,4 +36,5 @@ int main() TESTCASE( strchr( abccd, 'c' ) == &abccd[2] ); return TEST_RESULTS; } + #endif