X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fwctype%2Ftowctrans.c;h=f5f4a1dd38d2e3c49c1e8e91ee393695b648d116;hp=aea9b1a303ae28474e1d58435cdb917e7be91b91;hb=fa53a74861e1ac9513ae57b7bd7889b85ac0fbe9;hpb=6e6c4e6b52f2516e4bb6b9f37c1e2e18cb7448b5 diff --git a/functions/wctype/towctrans.c b/functions/wctype/towctrans.c index aea9b1a..f5f4a1d 100644 --- a/functions/wctype/towctrans.c +++ b/functions/wctype/towctrans.c @@ -9,16 +9,21 @@ #include #include <_PDCLIB_locale.h> -wint_t towctrans( wint_t wc, wctrans_t trans ) +wint_t _PDCLIB_towctrans_l( wint_t wc, wctrans_t trans, locale_t l ) { switch( trans ) { case 0: return wc; - case _PDCLIB_WCTRANS_TOLOWER: return towlower( wc ); - case _PDCLIB_WCTRANS_TOUPPER: return towupper( wc ); + case _PDCLIB_WCTRANS_TOLOWER: return _PDCLIB_towlower_l( wc, l ); + case _PDCLIB_WCTRANS_TOUPPER: return _PDCLIB_towupper_l( wc, l ); default: abort(); } } +wint_t towctrans( wint_t wc, wctrans_t trans ) +{ + return _PDCLIB_towctrans_l( wc, trans, _PDCLIB_threadlocale() ); +} + #endif #ifdef TEST