1 --- wctob.c.orig 2004-11-25 11:38:20.000000000 -0800
2 +++ wctob.c 2005-02-18 18:16:08.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wctob.c,v 1.4 2004/05/12 14:26:54 tjr Exp $");
7 +#include "xlocale_private.h"
16 +wctob_l(wint_t c, locale_t loc)
18 static const mbstate_t initial;
19 mbstate_t mbs = initial;
22 - if (c == WEOF || __wcrtomb(buf, c, &mbs) != 1)
23 + NORMALIZE_LOCALE(loc);
24 + if (c == WEOF || loc->__lc_ctype->__wcrtomb(buf, c, &mbs, loc) != 1)
26 return ((unsigned char)*buf);
32 + return wctob_l(c, __current_locale());