1 --- mbstowcs.c.orig Thu Nov 25 11:38:18 2004
2 +++ mbstowcs.c Fri Feb 18 17:02:15 2005
5 __FBSDID("$FreeBSD: src/lib/libc/locale/mbstowcs.c,v 1.11 2004/07/21 10:54:57 tjr Exp $");
7 +#include "xlocale_private.h"
15 -mbstowcs(wchar_t * __restrict pwcs, const char * __restrict s, size_t n)
16 +mbstowcs_l(wchar_t * __restrict pwcs, const char * __restrict s, size_t n,
19 static const mbstate_t initial;
22 + NORMALIZE_LOCALE(loc);
24 - return (__mbsnrtowcs(pwcs, &s, SIZE_T_MAX, n, &mbs));
25 + return (loc->__lc_ctype->__mbsnrtowcs(pwcs, &s, SIZE_T_MAX, n, &mbs, loc));
29 +mbstowcs(wchar_t * __restrict pwcs, const char * __restrict s, size_t n)
31 + return mbstowcs_l(pwcs, s, n, __current_locale());