1 --- wctype.c.orig 2004-11-25 11:38:21.000000000 -0800
2 +++ wctype.c 2005-02-27 02:15:11.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/wctype.c,v 1.3 2004/03/27 08:59:21 tjr Exp $");
7 +#include "xlocale_private.h"
13 iswctype(wint_t wc, wctype_t charclass)
16 - return (__istype(wc, charclass));
17 + return (__istype_l(wc, charclass, __current_locale()));
22 +iswctype_l(wint_t wc, wctype_t charclass, locale_t loc)
24 + NORMALIZE_LOCALE(loc);
25 + return (__istype_l(wc, charclass, loc));
32 + { "alnum", _CTYPE_A|_CTYPE_D },
33 + { "alpha", _CTYPE_A },
34 + { "blank", _CTYPE_B },
35 + { "cntrl", _CTYPE_C },
36 + { "digit", _CTYPE_D },
37 + { "graph", _CTYPE_G },
38 + { "lower", _CTYPE_L },
39 + { "print", _CTYPE_R },
40 + { "punct", _CTYPE_P },
41 + { "space", _CTYPE_S },
42 + { "upper", _CTYPE_U },
43 + { "xdigit", _CTYPE_X },
44 + { "ideogram", _CTYPE_I }, /* BSD extension */
45 + { "special", _CTYPE_T }, /* BSD extension */
46 + { "phonogram", _CTYPE_Q }, /* BSD extension */
47 + { "rune", 0xFFFFFF00L }, /* BSD extension */
48 + { NULL, 0UL }, /* Default */
51 +/* these don't currently depend on the locale, but they could */
54 wctype(const char *property)
60 - { "alnum", _CTYPE_A|_CTYPE_D },
61 - { "alpha", _CTYPE_A },
62 - { "blank", _CTYPE_B },
63 - { "cntrl", _CTYPE_C },
64 - { "digit", _CTYPE_D },
65 - { "graph", _CTYPE_G },
66 - { "lower", _CTYPE_L },
67 - { "print", _CTYPE_R },
68 - { "punct", _CTYPE_P },
69 - { "space", _CTYPE_S },
70 - { "upper", _CTYPE_U },
71 - { "xdigit", _CTYPE_X },
72 - { "ideogram", _CTYPE_I }, /* BSD extension */
73 - { "special", _CTYPE_T }, /* BSD extension */
74 - { "phonogram", _CTYPE_Q }, /* BSD extension */
75 - { "rune", 0xFFFFFF00L }, /* BSD extension */
76 - { NULL, 0UL }, /* Default */
81 + while (props[i].name != NULL && strcmp(props[i].name, property) != 0)
84 + return (props[i].mask);
88 +wctype_l(const char *property, locale_t loc)