1 --- wctype.c.bsdnew 2009-11-09 15:05:25.000000000 -0800
2 +++ wctype.c 2009-11-09 17:53:01.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wctype.c,v 1.4 2008/03/17 18:22:23 antoine Exp $");
7 +#include "xlocale_private.h"
15 -iswctype(wint_t wc, wctype_t charclass)
18 - return (__istype(wc, charclass));
23 -wctype(const char *property)
24 +wctype_l(const char *property, locale_t loc)
30 @@ -70,5 +66,23 @@ wctype(const char *property)
31 while (props[i].name != NULL && strcmp(props[i].name, property) != 0)
34 - return (props[i].mask);
36 + return (props[i].mask);
38 + NORMALIZE_LOCALE(loc);
39 + rl = &loc->__lc_ctype->_CurrentRuneLocale;
40 + if ((i = rl->__ncharclasses) > 0) {
42 + for (rp = rl->__charclasses; i-- > 0; rp++) {
43 + if (strncmp(rp->__name, property, CHARCLASS_NAME_MAX) == 0)
44 + return (rp->__mask);
51 +wctype(const char *property)
53 + return wctype_l(property, __current_locale());