]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/wcwidth.c.patch
Libc-498.tar.gz
[apple/libc.git] / locale / FreeBSD / wcwidth.c.patch
1 --- wcwidth.c.orig 2004-11-25 11:38:21.000000000 -0800
2 +++ wcwidth.c 2005-02-24 00:37:25.000000000 -0800
3 @@ -42,6 +42,8 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wcwidth.c,v 1.7 2004/08/12 12:19:11 tjr Exp $");
6
7 +#include "xlocale_private.h"
8 +
9 #include <wchar.h>
10
11 #undef wcwidth
12 @@ -50,5 +52,13 @@
13 wcwidth(wchar_t wc)
14 {
15
16 - return (__wcwidth(wc));
17 + return (__wcwidth_l(wc, __current_locale()));
18 +}
19 +
20 +int
21 +wcwidth_l(wchar_t wc, locale_t loc)
22 +{
23 +
24 + NORMALIZE_LOCALE(loc);
25 + return (__wcwidth_l(wc, loc));
26 }