1 --- wcswidth.c.bsdnew 2009-11-18 18:24:40.000000000 -0800
2 +++ wcswidth.c 2009-11-18 18:24:41.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/string/wcswidth.c,v 1.7 2007/01/09 00:28:12 imp 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());