1 /* Copyright (C) 2003 Manuel Novoa III
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the Free
15 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
20 * Besides uClibc, I'm using this code in my libc for elks, which is
21 * a 16-bit environment with a fairly limited compiler. It would make
22 * things much easier for me if this file isn't modified unnecessarily.
23 * In particular, please put any new or replacement functions somewhere
24 * else, and modify the makefile to use your version instead.
27 * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! */
38 #ifdef __UCLIBC_HAS_XLOCALE__
39 libc_hidden_proto(__ctype_b_loc)
41 libc_hidden_proto(__ctype_b)
44 #ifdef __UCLIBC_HAS_XLOCALE__
46 #endif /* __UCLIBC_HAS_XLOCALE__ */
48 /**********************************************************************/
49 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
51 #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
54 #define CTYPE_DOMAIN_CHECK(C) \
55 (((unsigned int)((C) - CHAR_MIN)) <= (UCHAR_MAX - CHAR_MIN))
57 #define CTYPE_DOMAIN_CHECK(C) \
58 ((((unsigned int)((C) - CHAR_MIN)) <= (UCHAR_MAX - CHAR_MIN)) || ((C) == EOF))
61 #else /* __UCLIBC_HAS_CTYPE_SIGNED__ */
64 #define CTYPE_DOMAIN_CHECK(C) \
65 (((unsigned int)((C) - EOF)) <= (UCHAR_MAX - EOF))
67 #define CTYPE_DOMAIN_CHECK(C) \
68 ((((unsigned int)(C)) <= UCHAR_MAX) || ((C) == EOF))
71 #endif /* __UCLIBC_HAS_CTYPE_SIGNED__ */
73 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
74 /**********************************************************************/
75 #ifdef __UCLIBC_MJN3_ONLY__
78 #warning CONSIDER: Should we assert when debugging and __UCLIBC_HAS_CTYPE_CHECKED?
79 #warning TODO: Fix asserts in to{upper|lower}{_l}.
80 #warning TODO: Optimize the isx*() funcs.
82 #endif /* __UCLIBC_MJN3_ONLY__ */
83 /**********************************************************************/
85 #define PASTE2(X,Y) X ## Y
87 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
92 #ifdef __UCLIBC_DO_XLOCALE
93 #define CTYPE_NAME(X) __is ## X ## _l
94 #define ISCTYPE(C,F) __isctype_l( C, F, locale_arg)
95 #define CTYPE_ALIAS(NAME) strong_alias( __is ## NAME ## _l , is ## NAME ## _l)
97 #define CTYPE_NAME(X) is ## X
98 #define ISCTYPE(C,F) __isctype( C, F )
99 #define CTYPE_ALIAS(NAME)
105 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
106 /* Make sure assert is active for to*() funcs below. */
110 extern void __isctype_assert(int c, int mask) __attribute__ ((__noreturn__)) attribute_hidden;
112 #define CTYPE_BODY(NAME,C,MASK) \
113 if (CTYPE_DOMAIN_CHECK(C)) { \
114 return ISCTYPE(C, MASK); \
116 __isctype_assert(C, MASK);
118 #elif defined(__UCLIBC_HAS_CTYPE_CHECKED__)
120 #define CTYPE_BODY(NAME,C,MASK) \
121 return CTYPE_DOMAIN_CHECK(C) \
125 #elif defined(__UCLIBC_HAS_CTYPE_UNSAFE__)
127 #define CTYPE_BODY(NAME,C,MASK) \
128 return ISCTYPE(C, MASK);
131 #else /* No checking done. */
133 #error Unknown type of ctype checking!
139 #define IS_FUNC_BODY(NAME) \
140 int CTYPE_NAME(NAME) (int c __LOCALE_PARAM ); \
141 int CTYPE_NAME(NAME) (int c __LOCALE_PARAM ) \
143 CTYPE_BODY(NAME,c,PASTE2(_IS,NAME)) \
148 #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
150 #define C_MACRO(X) PASTE2(__C_is,X)(c)
151 #define CTYPE_NAME(X) is ## X
153 #define IS_FUNC_BODY(NAME) \
154 int CTYPE_NAME(NAME) (int c) \
156 return C_MACRO(NAME); \
159 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
160 /**********************************************************************/
161 #ifdef L___ctype_assert
162 #ifdef __UCLIBC_HAS_CTYPE_ENFORCED__
164 libc_hidden_proto(fprintf)
165 libc_hidden_proto(abort)
167 attribute_hidden void __isctype_assert(int c, int mask)
169 fprintf(stderr, "%s: __is*{_l}(%d,%#x {locale})\n", __uclibc_progname, c, mask);
175 /**********************************************************************/
176 #if defined(L_isalnum) || defined(L_isalnum_l)
181 /**********************************************************************/
182 #if defined(L_isalpha) || defined(L_isalpha_l)
187 /**********************************************************************/
188 #if defined(L_isblank) || defined(L_isblank_l)
193 /**********************************************************************/
194 #if defined(L_iscntrl) || defined(L_iscntrl_l)
199 /**********************************************************************/
200 #if defined(L_isdigit) || defined(L_isdigit_l)
202 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
204 /* The standards require EOF < 0. */
206 #define __isdigit_char_or_EOF(C) __isdigit_char((C))
208 #define __isdigit_char_or_EOF(C) __isdigit_int((C))
211 int CTYPE_NAME(digit) (int C __LOCALE_PARAM);
212 int CTYPE_NAME(digit) (int C __LOCALE_PARAM)
214 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
215 if (CTYPE_DOMAIN_CHECK(C)) {
216 return __isdigit_char_or_EOF(C); /* C is (unsigned) char or EOF. */
218 __isctype_assert(C, _ISdigit);
220 return __isdigit_int(C); /* C could be invalid. */
226 #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
230 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
233 /**********************************************************************/
234 #if defined(L_isgraph) || defined(L_isgraph_l)
239 /**********************************************************************/
240 #if defined(L_islower) || defined(L_islower_l)
245 /**********************************************************************/
246 #if defined(L_isprint) || defined(L_isprint_l)
251 /**********************************************************************/
252 #if defined(L_ispunct) || defined(L_ispunct_l)
257 /**********************************************************************/
258 #if defined(L_isspace) || defined(L_isspace_l)
263 /**********************************************************************/
264 #if defined(L_isupper) || defined(L_isupper_l)
269 /**********************************************************************/
270 #if defined(L_isxdigit) || defined(L_isxdigit_l)
272 IS_FUNC_BODY(xdigit);
275 /**********************************************************************/
279 #ifdef __UCLIBC_HAS_XLOCALE__
280 libc_hidden_proto(__ctype_tolower_loc)
282 libc_hidden_proto(__ctype_tolower)
284 libc_hidden_proto(tolower)
285 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
289 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
290 assert(CTYPE_DOMAIN_CHECK(c));
292 return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? (__UCLIBC_CTYPE_TOLOWER)[c] : c;
295 #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
299 return __C_tolower(c);
302 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
303 libc_hidden_def(tolower)
306 /**********************************************************************/
310 libc_hidden_proto(tolower_l)
311 int tolower_l(int c, __locale_t l)
313 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
314 assert(CTYPE_DOMAIN_CHECK(c));
316 return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c;
318 libc_hidden_def(tolower_l)
321 /**********************************************************************/
325 #ifdef __UCLIBC_HAS_XLOCALE__
326 libc_hidden_proto(__ctype_toupper_loc)
328 libc_hidden_proto(__ctype_toupper)
330 libc_hidden_proto(toupper)
331 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
335 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
336 assert(CTYPE_DOMAIN_CHECK(c));
338 return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? (__UCLIBC_CTYPE_TOUPPER)[c] : c;
341 #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
345 return __C_toupper(c);
348 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
349 libc_hidden_def(toupper)
352 /**********************************************************************/
356 libc_hidden_proto(toupper_l)
357 int toupper_l(int c, __locale_t l)
359 #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
360 assert(CTYPE_DOMAIN_CHECK(c));
362 return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c;
364 libc_hidden_def(toupper_l)
367 /**********************************************************************/
368 #if defined(L_isascii) || defined(L_isascii_l)
370 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
372 int __XL_NPP(isascii)(int c);
373 int __XL_NPP(isascii)(int c)
375 return __isascii(c); /* locale-independent */
378 #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
380 libc_hidden_proto(isascii)
383 return __isascii(c); /* locale-independent */
385 libc_hidden_def(isascii)
387 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
390 /**********************************************************************/
391 #if defined(L_toascii) || defined(L_toascii_l)
393 #ifdef __UCLIBC_HAS_CTYPE_TABLES__
395 int __XL_NPP(toascii)(int c);
396 int __XL_NPP(toascii)(int c)
398 return __toascii(c); /* locale-independent */
401 #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
405 return __toascii(c); /* locale-independent */
408 #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
411 /**********************************************************************/
412 /* glibc extensions */
413 /**********************************************************************/
416 int isctype(int c, int mask)
418 CTYPE_BODY(NAME,c,mask)
422 /**********************************************************************/
425 #ifdef __UCLIBC_HAS_XLOCALE__
427 const __ctype_mask_t **__ctype_b_loc(void)
429 return &(__UCLIBC_CURLOCALE_DATA).__ctype_b;
432 libc_hidden_def(__ctype_b_loc)
436 /**********************************************************************/
437 #if L___ctype_tolower_loc
439 #ifdef __UCLIBC_HAS_XLOCALE__
441 libc_hidden_proto(__ctype_tolower_loc)
442 const __ctype_touplow_t **__ctype_tolower_loc(void)
444 return &(__UCLIBC_CURLOCALE_DATA).__ctype_tolower;
446 libc_hidden_def(__ctype_tolower_loc)
451 /**********************************************************************/
452 #if L___ctype_toupper_loc
454 #ifdef __UCLIBC_HAS_XLOCALE__
456 libc_hidden_proto(__ctype_toupper_loc)
457 const __ctype_touplow_t **__ctype_toupper_loc(void)
459 return &(__UCLIBC_CURLOCALE_DATA).__ctype_toupper;
461 libc_hidden_def(__ctype_toupper_loc)
466 /**********************************************************************/
469 extern const __ctype_mask_t __C_ctype_b_data[];
470 libc_hidden_proto(__C_ctype_b_data)
471 const __ctype_mask_t __C_ctype_b_data[] = {
472 #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
600 #endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/
611 /* 9 ^I */ _ISspace|_ISblank|_IScntrl,
612 /* 10 ^J */ _ISspace|_IScntrl,
613 /* 11 ^K */ _ISspace|_IScntrl,
614 /* 12 ^L */ _ISspace|_IScntrl,
615 /* 13 ^M */ _ISspace|_IScntrl,
616 /* 14 ^N */ _IScntrl,
617 /* 15 ^O */ _IScntrl,
618 /* 16 ^P */ _IScntrl,
619 /* 17 ^Q */ _IScntrl,
620 /* 18 ^R */ _IScntrl,
621 /* 19 ^S */ _IScntrl,
622 /* 20 ^T */ _IScntrl,
623 /* 21 ^U */ _IScntrl,
624 /* 22 ^V */ _IScntrl,
625 /* 23 ^W */ _IScntrl,
626 /* 24 ^X */ _IScntrl,
627 /* 25 ^Y */ _IScntrl,
628 /* 26 ^Z */ _IScntrl,
629 /* 27 ^[ */ _IScntrl,
630 /* 28 ^\ */ _IScntrl,
631 /* 29 ^] */ _IScntrl,
632 /* 30 ^^ */ _IScntrl,
633 /* 31 ^_ */ _IScntrl,
634 /* 32 */ _ISspace|_ISprint|_ISblank,
635 /* 33 ! */ _ISprint|_ISgraph|_ISpunct,
636 /* 34 " */ _ISprint|_ISgraph|_ISpunct,
637 /* 35 # */ _ISprint|_ISgraph|_ISpunct,
638 /* 36 $ */ _ISprint|_ISgraph|_ISpunct,
639 /* 37 % */ _ISprint|_ISgraph|_ISpunct,
640 /* 38 & */ _ISprint|_ISgraph|_ISpunct,
641 /* 39 ' */ _ISprint|_ISgraph|_ISpunct,
642 /* 40 ( */ _ISprint|_ISgraph|_ISpunct,
643 /* 41 ) */ _ISprint|_ISgraph|_ISpunct,
644 /* 42 * */ _ISprint|_ISgraph|_ISpunct,
645 /* 43 + */ _ISprint|_ISgraph|_ISpunct,
646 /* 44 , */ _ISprint|_ISgraph|_ISpunct,
647 /* 45 - */ _ISprint|_ISgraph|_ISpunct,
648 /* 46 . */ _ISprint|_ISgraph|_ISpunct,
649 /* 47 / */ _ISprint|_ISgraph|_ISpunct,
650 /* 48 0 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
651 /* 49 1 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
652 /* 50 2 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
653 /* 51 3 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
654 /* 52 4 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
655 /* 53 5 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
656 /* 54 6 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
657 /* 55 7 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
658 /* 56 8 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
659 /* 57 9 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
660 /* 58 : */ _ISprint|_ISgraph|_ISpunct,
661 /* 59 ; */ _ISprint|_ISgraph|_ISpunct,
662 /* 60 < */ _ISprint|_ISgraph|_ISpunct,
663 /* 61 = */ _ISprint|_ISgraph|_ISpunct,
664 /* 62 > */ _ISprint|_ISgraph|_ISpunct,
665 /* 63 ? */ _ISprint|_ISgraph|_ISpunct,
666 /* 64 @ */ _ISprint|_ISgraph|_ISpunct,
667 /* 65 A */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
668 /* 66 B */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
669 /* 67 C */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
670 /* 68 D */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
671 /* 69 E */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
672 /* 70 F */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
673 /* 71 G */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
674 /* 72 H */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
675 /* 73 I */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
676 /* 74 J */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
677 /* 75 K */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
678 /* 76 L */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
679 /* 77 M */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
680 /* 78 N */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
681 /* 79 O */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
682 /* 80 P */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
683 /* 81 Q */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
684 /* 82 R */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
685 /* 83 S */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
686 /* 84 T */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
687 /* 85 U */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
688 /* 86 V */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
689 /* 87 W */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
690 /* 88 X */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
691 /* 89 Y */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
692 /* 90 Z */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
693 /* 91 [ */ _ISprint|_ISgraph|_ISpunct,
694 /* 92 \ */ _ISprint|_ISgraph|_ISpunct,
695 /* 93 ] */ _ISprint|_ISgraph|_ISpunct,
696 /* 94 ^ */ _ISprint|_ISgraph|_ISpunct,
697 /* 95 _ */ _ISprint|_ISgraph|_ISpunct,
698 /* 96 ` */ _ISprint|_ISgraph|_ISpunct,
699 /* 97 a */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
700 /* 98 b */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
701 /* 99 c */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
702 /* 100 d */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
703 /* 101 e */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
704 /* 102 f */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
705 /* 103 g */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
706 /* 104 h */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
707 /* 105 i */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
708 /* 106 j */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
709 /* 107 k */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
710 /* 108 l */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
711 /* 109 m */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
712 /* 110 n */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
713 /* 111 o */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
714 /* 112 p */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
715 /* 113 q */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
716 /* 114 r */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
717 /* 115 s */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
718 /* 116 t */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
719 /* 117 u */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
720 /* 118 v */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
721 /* 119 w */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
722 /* 120 x */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
723 /* 121 y */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
724 /* 122 z */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
725 /* 123 { */ _ISprint|_ISgraph|_ISpunct,
726 /* 124 | */ _ISprint|_ISgraph|_ISpunct,
727 /* 125 } */ _ISprint|_ISgraph|_ISpunct,
728 /* 126 ~ */ _ISprint|_ISgraph|_ISpunct,
729 /* 127 ^? */ _IScntrl,
859 libc_hidden_data_def(__C_ctype_b_data)
861 libc_hidden_proto(__C_ctype_b)
862 const __ctype_mask_t *__C_ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
863 libc_hidden_data_def(__C_ctype_b)
865 #ifndef __UCLIBC_HAS_XLOCALE__
867 const __ctype_mask_t *__ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
868 libc_hidden_data_def(__ctype_b)
873 /**********************************************************************/
874 #ifdef L___C_ctype_tolower
876 extern const __ctype_touplow_t __C_ctype_tolower_data[];
877 libc_hidden_proto(__C_ctype_tolower_data)
878 const __ctype_touplow_t __C_ctype_tolower_data[] = {
879 #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
880 -128, -127, -126, -125,
881 -124, -123, -122, -121,
882 -120, -119, -118, -117,
883 -116, -115, -114, -113,
884 -112, -111, -110, -109,
885 -108, -107, -106, -105,
886 -104, -103, -102, -101,
912 #endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/
929 64, 97 /* a */, 98 /* b */, 99 /* c */,
930 100 /* d */, 101 /* e */, 102 /* f */, 103 /* g */,
931 104 /* h */, 105 /* i */, 106 /* j */, 107 /* k */,
932 108 /* l */, 109 /* m */, 110 /* n */, 111 /* o */,
933 112 /* p */, 113 /* q */, 114 /* r */, 115 /* s */,
934 116 /* t */, 117 /* u */, 118 /* v */, 119 /* w */,
935 120 /* x */, 121 /* y */, 122 /* z */, 91,
978 libc_hidden_data_def(__C_ctype_tolower_data)
980 libc_hidden_proto(__C_ctype_tolower)
981 const __ctype_touplow_t *__C_ctype_tolower = __C_ctype_tolower_data
982 + __UCLIBC_CTYPE_TO_TBL_OFFSET;
983 libc_hidden_data_def(__C_ctype_tolower)
985 #ifndef __UCLIBC_HAS_XLOCALE__
987 libc_hidden_proto(__ctype_tolower)
988 const __ctype_touplow_t *__ctype_tolower = __C_ctype_tolower_data
989 + __UCLIBC_CTYPE_TO_TBL_OFFSET;
990 libc_hidden_data_def(__ctype_tolower)
995 /**********************************************************************/
996 #ifdef L___C_ctype_toupper
998 extern const __ctype_touplow_t __C_ctype_toupper_data[];
999 libc_hidden_proto(__C_ctype_toupper_data)
1000 const __ctype_touplow_t __C_ctype_toupper_data[] = {
1001 #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
1002 -128, -127, -126, -125,
1003 -124, -123, -122, -121,
1004 -120, -119, -118, -117,
1005 -116, -115, -114, -113,
1006 -112, -111, -110, -109,
1007 -108, -107, -106, -105,
1008 -104, -103, -102, -101,
1009 -100, -99, -98, -97,
1034 #endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/
1059 96, 65 /* A */, 66 /* B */, 67 /* C */,
1060 68 /* D */, 69 /* E */, 70 /* F */, 71 /* G */,
1061 72 /* H */, 73 /* I */, 74 /* J */, 75 /* K */,
1062 76 /* L */, 77 /* M */, 78 /* N */, 79 /* O */,
1063 80 /* P */, 81 /* Q */, 82 /* R */, 83 /* S */,
1064 84 /* T */, 85 /* U */, 86 /* V */, 87 /* W */,
1065 88 /* X */, 89 /* Y */, 90 /* Z */, 123,
1100 libc_hidden_data_def(__C_ctype_toupper_data)
1102 libc_hidden_proto(__C_ctype_toupper)
1103 const __ctype_touplow_t *__C_ctype_toupper = __C_ctype_toupper_data
1104 + __UCLIBC_CTYPE_TO_TBL_OFFSET;
1105 libc_hidden_data_def(__C_ctype_toupper)
1107 #ifndef __UCLIBC_HAS_XLOCALE__
1109 libc_hidden_proto(__ctype_toupper)
1110 const __ctype_touplow_t *__ctype_toupper = __C_ctype_toupper_data
1111 + __UCLIBC_CTYPE_TO_TBL_OFFSET;
1112 libc_hidden_data_def(__ctype_toupper)
1117 /**********************************************************************/