X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fwctype%2Ftowupper.c;h=7b96a6100b964b322105e0617f634ee7664d5bc6;hp=faac657501cac24ec24b262673befcdb97f5713f;hb=fa53a74861e1ac9513ae57b7bd7889b85ac0fbe9;hpb=6e6c4e6b52f2516e4bb6b9f37c1e2e18cb7448b5 diff --git a/functions/wctype/towupper.c b/functions/wctype/towupper.c index faac657..7b96a61 100644 --- a/functions/wctype/towupper.c +++ b/functions/wctype/towupper.c @@ -8,10 +8,10 @@ #ifndef REGTEST #include <_PDCLIB_locale.h> -wint_t towupper( wint_t wc ) +wint_t _PDCLIB_towupper_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->upper != uwc ) { wc = info->upper; @@ -19,6 +19,11 @@ wint_t towupper( wint_t wc ) return wc; } +wint_t towupper( wint_t wc ) +{ + return _PDCLIB_towupper_l( wc, _PDCLIB_threadlocale() ); +} + #endif #ifdef TEST