]> git.saurik.com Git - apple/libc.git/blobdiff - locale/FreeBSD/wcwidth.c
Libc-1158.1.2.tar.gz
[apple/libc.git] / locale / FreeBSD / wcwidth.c
index 587862eff8153000ee433a49f23bd6e7eca63590..ae533e7f4cdf76ef0bbe2d6d2166d2c1cd09b4de 100644 (file)
@@ -38,6 +38,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/locale/wcwidth.c,v 1.8 2007/01/09 00:28:01 imp Exp $");
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/locale/wcwidth.c,v 1.8 2007/01/09 00:28:01 imp Exp $");
 
+#include "xlocale_private.h"
+
 #include <wchar.h>
 
 #undef wcwidth
 #include <wchar.h>
 
 #undef wcwidth
@@ -46,5 +48,13 @@ int
 wcwidth(wchar_t wc)
 {
 
 wcwidth(wchar_t wc)
 {
 
-       return (__wcwidth(wc));
+       return (__wcwidth_l(wc, __current_locale()));
+}
+
+int
+wcwidth_l(wchar_t wc, locale_t loc)
+{
+
+       NORMALIZE_LOCALE(loc);
+       return (__wcwidth_l(wc, loc));
 }
 }