diff options
Diffstat (limited to 'wctype/iswctype_l.c')
-rw-r--r-- | wctype/iswctype_l.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/wctype/iswctype_l.c b/wctype/iswctype_l.c index 192001e033..3bc25fdb6f 100644 --- a/wctype/iswctype_l.c +++ b/wctype/iswctype_l.c @@ -21,36 +21,16 @@ #include <wctype.h> #define USE_IN_EXTENDED_LOCALE_MODEL 1 -#include "cname-lookup.h" #include "wchar-lookup.h" int __iswctype_l (wint_t wc, wctype_t desc, __locale_t locale) { - if (locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_HASH_SIZE)].word != 0) - { - /* Old locale format. */ - const uint32_t *class32_b; - size_t idx; - - idx = cname_lookup (wc, locale); - if (idx == ~((size_t) 0)) - return 0; - - class32_b = (uint32_t *) - locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS32)].string; - - return class32_b[idx] & desc; - } - else - { - /* If the user passes in an invalid DESC valid (the one returned from - `__wctype_l' in case of an error) simply return 0. */ - if (desc == (wctype_t) 0) - return 0; - - /* New locale format. */ - return wctype_table_lookup ((const char *) desc, wc); - } + /* If the user passes in an invalid DESC valid (the one returned from + `__wctype_l' in case of an error) simply return 0. */ + if (desc == (wctype_t) 0) + return 0; + + return wctype_table_lookup ((const char *) desc, wc); } |