From 1ad544a2ade2d8adcebc20de065bfafd7cd507a5 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 22 Dec 2008 13:51:28 +0000 Subject: UCLIBC_CTYPE_HEADER define is removed, as it always equal to "include/bits/uClibc_ctype.h" __CTYPE_unclassified and other similar __CTYPE_xxxx constants are moved to separate include file, bits/uClibc_charclass.h Duplicate declaration of these constants is removed from libc/misc/wctype/_wctype.c Ugly re-inclusion trick in extra/locale/gen_wctype.c deleted Large ifdefed-out chunk in extra/locale/gen_wctype.c removed Move __CTYPE_isalnum() etc macros from uClibc_ctype.h to their single user, extra/locale/gen_wctype.c (can be simplified further) Overall, no code changes (verified with objdump) --- libc/misc/wctype/_wctype.c | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) (limited to 'libc/misc/wctype') diff --git a/libc/misc/wctype/_wctype.c b/libc/misc/wctype/_wctype.c index 9887808b6..c3303d247 100644 --- a/libc/misc/wctype/_wctype.c +++ b/libc/misc/wctype/_wctype.c @@ -70,43 +70,9 @@ * towctrans function. */ /* #define SMALL_UPLOW */ -/**********************************************************************/ -#ifdef __UCLIBC_MJN3_ONLY__ -#ifdef L_iswspace -/* generates one warning */ -#warning TODO: Fix the __CTYPE_* codes! -#endif -#endif /* __UCLIBC_MJN3_ONLY__ */ -#if 1 -/* Taking advantage of the C99 mutual-exclusion guarantees for the various - * (w)ctype classes, including the descriptions of printing and control - * (w)chars, we can place each in one of the following mutually-exlusive - * subsets. Since there are less than 16, we can store the data for - * each (w)chars in a nibble. In contrast, glibc uses an unsigned int - * per (w)char, with one bit flag for each is* type. While this allows - * a simple '&' operation to determine the type vs. a range test and a - * little special handling for the "blank" and "xdigit" types in my - * approach, it also uses 8 times the space for the tables on the typical - * 32-bit archs we supported.*/ -enum { - __CTYPE_unclassified = 0, - __CTYPE_alpha_nonupper_nonlower, - __CTYPE_alpha_lower, - __CTYPE_alpha_upper_lower, - __CTYPE_alpha_upper, - __CTYPE_digit, - __CTYPE_punct, - __CTYPE_graph, - __CTYPE_print_space_nonblank, - __CTYPE_print_space_blank, - __CTYPE_space_nonblank_noncntrl, - __CTYPE_space_blank_noncntrl, - __CTYPE_cntrl_space_nonblank, - __CTYPE_cntrl_space_blank, - __CTYPE_cntrl_nonspace -}; -#endif +/* Pull in __CTYPE_xxx constants */ +#include /* The following is used to implement wctype(), but it is defined -- cgit v1.2.3