Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/locale/wcrtomb.c
Show All 37 Lines | |||||
#include "mblocal.h" | #include "mblocal.h" | ||||
size_t | size_t | ||||
wcrtomb_l(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps, | wcrtomb_l(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps, | ||||
locale_t locale) | locale_t locale) | ||||
{ | { | ||||
FIX_LOCALE(locale); | FIX_LOCALE(locale); | ||||
if (ps == NULL) | if (ps == NULL) | ||||
ps = &locale->wcrtomb; | ps = &(XLOCALE_CTYPE(locale)->wcrtomb); | ||||
return (XLOCALE_CTYPE(locale)->__wcrtomb(s, wc, ps)); | return (XLOCALE_CTYPE(locale)->__wcrtomb(s, wc, ps)); | ||||
} | } | ||||
size_t | size_t | ||||
wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) | wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) | ||||
{ | { | ||||
return wcrtomb_l(s, wc, ps, __get_locale()); | return wcrtomb_l(s, wc, ps, __get_locale()); | ||||
} | } |