X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fwchar%2Fwcsrchr.c;h=5f2a66daa02d6517e48635fa694809b1c5920b2e;hp=f91f998c3399b3ab7b0eac33efd955622c3ef163;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=8cd8394548bffe8605320cdce642b49a135d4485 diff --git a/functions/wchar/wcsrchr.c b/functions/wchar/wcsrchr.c index f91f998..5f2a66d 100644 --- a/functions/wchar/wcsrchr.c +++ b/functions/wchar/wcsrchr.c @@ -1,35 +1,33 @@ -/* $Id$ */ - -/* wcsrchr( const wchar_t *, wchar_t ); - - This file is part of the Public Domain C Library (PDCLib). - Permission is granted to use, modify, and / or redistribute at will. -*/ - -#include -#include - -#ifndef REGTEST - -wchar_t *wcsrchr(const wchar_t * haystack, wchar_t needle) -{ - wchar_t *found = NULL; - while(*haystack) { - if(*haystack == needle) found = (wchar_t*) haystack; - haystack++; - } - return found; -} - - -#endif - -#ifdef TEST -#include <_PDCLIB_test.h> - -int main( void ) -{ - return TEST_RESULTS; -} - -#endif +/* wcsrchr( const wchar_t *, wchar_t ); + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include +#include + +#ifndef REGTEST + +wchar_t *wcsrchr(const wchar_t * haystack, wchar_t needle) +{ + wchar_t *found = NULL; + while(*haystack) { + if(*haystack == needle) found = (wchar_t*) haystack; + haystack++; + } + return found; +} + + +#endif + +#ifdef TEST +#include "_PDCLIB_test.h" + +int main( void ) +{ + return TEST_RESULTS; +} + +#endif