X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=functions%2Fwctype%2Ftowlower.c;h=d8d56ece19bfde330b58140de489402a4cdaef3a;hp=7f9809c32af356208ffe5743960a4e448c6f5cbb;hb=b3d54170225e25557110b8c74f236b5e84254c26;hpb=24f274eec4d6ac3868f3fdf03d2e1876c80be616 diff --git a/functions/wctype/towlower.c b/functions/wctype/towlower.c index 7f9809c..d8d56ec 100644 --- a/functions/wctype/towlower.c +++ b/functions/wctype/towlower.c @@ -8,10 +8,10 @@ #ifndef REGTEST #include <_PDCLIB_locale.h> -wint_t towlower( wint_t wc ) +wint_t _PDCLIB_towlower_l( wint_t wc, locale_t l ) { wint_t uwc = _PDCLIB_unpackwint( wc ); - _PDCLIB_wcinfo_t *info = _PDCLIB_wcgetinfo( uwc ); + _PDCLIB_wcinfo_t *info = _PDCLIB_wcgetinfo( l, uwc ); if( info && info->lower != uwc ) { wc = info->lower; @@ -19,6 +19,11 @@ wint_t towlower( wint_t wc ) return wc; } +wint_t towlower( wint_t wc ) +{ + return _PDCLIB_towlower_l( wc, _PDCLIB_threadlocale() ); +} + #endif #ifdef TEST