1 --- wcswidth.c.orig 2003-05-20 15:23:56.000000000 -0700
2 +++ wcswidth.c 2005-02-25 00:12:43.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/string/wcswidth.c,v 1.6 2002/08/20 02:06:28 ache Exp $");
7 +#include "xlocale_private.h"
12 -wcswidth(const wchar_t *pwcs, size_t n)
13 +wcswidth_l(const wchar_t *pwcs, size_t n, locale_t loc)
18 + NORMALIZE_LOCALE(loc);
20 while (n-- > 0 && (wc = *pwcs++) != L'\0') {
21 - if ((l = wcwidth(wc)) < 0)
22 + if ((l = wcwidth_l(wc, loc)) < 0)
31 +wcswidth(const wchar_t *pwcs, size_t n)
33 + return wcswidth_l(pwcs, n, __current_locale());