1 --- mbrlen.c.orig Thu Nov 25 11:38:18 2004
2 +++ mbrlen.c Fri Feb 18 16:54:36 2005
5 __FBSDID("$FreeBSD: src/lib/libc/locale/mbrlen.c,v 1.4 2004/05/12 14:26:54 tjr Exp $");
7 +#include "xlocale_private.h"
13 -mbrlen(const char * __restrict s, size_t n, mbstate_t * __restrict ps)
14 +mbrlen_l(const char * __restrict s, size_t n, mbstate_t * __restrict ps,
17 - static mbstate_t mbs;
19 + NORMALIZE_LOCALE(loc);
22 - return (__mbrtowc(NULL, s, n, ps));
23 + ps = &loc->__mbs_mbrlen;
24 + return (loc->__lc_ctype->__mbrtowc(NULL, s, n, ps, loc));
28 +mbrlen(const char * __restrict s, size_t n, mbstate_t * __restrict ps)
30 + return mbrlen_l(s, n, ps, __current_locale());