X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fwctype%2Fwctrans.c;h=c15bde085c7009b007beb616f8bfba1e0dd1533d;hp=efc18bfad95591aec928794c5ef71f0f56e8c3d7;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=8894c921674bb116d0a7b8f23a55311e7a768019 diff --git a/functions/wctype/wctrans.c b/functions/wctype/wctrans.c index efc18bf..c15bde0 100644 --- a/functions/wctype/wctrans.c +++ b/functions/wctype/wctrans.c @@ -1,38 +1,38 @@ -/* wctrans( const char * ) - - This file is part of the Public Domain C Library (PDCLib). - Permission is granted to use, modify, and / or redistribute at will. -*/ - -#include -#ifndef REGTEST -#include -#include "_PDCLIB_locale.h" - -wctrans_t wctrans( const char * property ) -{ - if(!property) { - return 0; - } else if(strcmp(property, "tolower") == 0) { - return _PDCLIB_WCTRANS_TOLOWER; - } else if(strcmp(property, "toupper") == 0) { - return _PDCLIB_WCTRANS_TOUPPER; - } else { - return 0; - } -} - -#endif - -#ifdef TEST -#include "_PDCLIB_test.h" - -int main( void ) -{ - TESTCASE(wctrans("") == 0); - TESTCASE(wctrans("invalid") == 0); - TESTCASE(wctrans("toupper") != 0); - TESTCASE(wctrans("tolower") != 0); - return TEST_RESULTS; -} -#endif +/* wctrans( const char * ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include +#ifndef REGTEST +#include +#include "_PDCLIB_locale.h" + +wctrans_t wctrans( const char * property ) +{ + if(!property) { + return 0; + } else if(strcmp(property, "tolower") == 0) { + return _PDCLIB_WCTRANS_TOLOWER; + } else if(strcmp(property, "toupper") == 0) { + return _PDCLIB_WCTRANS_TOUPPER; + } else { + return 0; + } +} + +#endif + +#ifdef TEST +#include "_PDCLIB_test.h" + +int main( void ) +{ + TESTCASE(wctrans("") == 0); + TESTCASE(wctrans("invalid") == 0); + TESTCASE(wctrans("toupper") != 0); + TESTCASE(wctrans("tolower") != 0); + return TEST_RESULTS; +} +#endif