ctype.c 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  1. /* Copyright (C) 2003 Manuel Novoa III
  2. *
  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.
  7. *
  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.
  12. *
  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.
  16. */
  17. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  18. *
  19. * Besides uClibc, I'm using this code in my libc for elks, which is
  20. * a 16-bit environment with a fairly limited compiler. It would make
  21. * things much easier for me if this file isn't modified unnecessarily.
  22. * In particular, please put any new or replacement functions somewhere
  23. * else, and modify the makefile to use your version instead.
  24. * Thanks. Manuel
  25. *
  26. * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! */
  27. #define _GNU_SOURCE
  28. #define __NO_CTYPE
  29. #include <ctype.h>
  30. #include <stdio.h>
  31. #include <stdlib.h>
  32. #include <limits.h>
  33. #include <stdint.h>
  34. #include <assert.h>
  35. #include <locale.h>
  36. #ifdef __UCLIBC_HAS_XLOCALE__
  37. #include <xlocale.h>
  38. #endif /* __UCLIBC_HAS_XLOCALE__ */
  39. /**********************************************************************/
  40. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  41. #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  42. #if EOF >= CHAR_MIN
  43. #define CTYPE_DOMAIN_CHECK(C) \
  44. (((unsigned int)((C) - CHAR_MIN)) <= (UCHAR_MAX - CHAR_MIN))
  45. #else
  46. #define CTYPE_DOMAIN_CHECK(C) \
  47. ((((unsigned int)((C) - CHAR_MIN)) <= (UCHAR_MAX - CHAR_MIN)) || ((C) == EOF))
  48. #endif
  49. #else /* __UCLIBC_HAS_CTYPE_SIGNED__ */
  50. #if EOF == -1
  51. #define CTYPE_DOMAIN_CHECK(C) \
  52. (((unsigned int)((C) - EOF)) <= (UCHAR_MAX - EOF))
  53. #else
  54. #define CTYPE_DOMAIN_CHECK(C) \
  55. ((((unsigned int)(C)) <= UCHAR_MAX) || ((C) == EOF))
  56. #endif
  57. #endif /* __UCLIBC_HAS_CTYPE_SIGNED__ */
  58. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  59. /**********************************************************************/
  60. #ifdef __UCLIBC_MJN3_ONLY__
  61. #ifdef L_isspace
  62. /* emit only once */
  63. #warning CONSIDER: Should we assert when debugging and __UCLIBC_HAS_CTYPE_CHECKED?
  64. #warning TODO: Fix asserts in to{upper|lower}{_l}.
  65. #warning TODO: Optimize the isx*() funcs.
  66. #endif
  67. #endif /* __UCLIBC_MJN3_ONLY__ */
  68. /**********************************************************************/
  69. #undef PASTE2
  70. #define PASTE2(X,Y) X ## Y
  71. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  72. #undef CTYPE_NAME
  73. #undef ISCTYPE
  74. #undef CTYPE_ALIAS
  75. #ifdef __UCLIBC_DO_XLOCALE
  76. #define CTYPE_NAME(X) __is ## X ## _l
  77. #define ISCTYPE(C,F) __isctype_l( C, F, locale_arg)
  78. #define CTYPE_ALIAS(NAME) weak_alias( __is ## NAME ## _l , is ## NAME ## _l)
  79. #else
  80. #define CTYPE_NAME(X) is ## X
  81. #define ISCTYPE(C,F) __isctype( C, F )
  82. #define CTYPE_ALIAS(NAME)
  83. #endif
  84. #undef CTYPE_BODY
  85. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  86. /* Make sure assert is active for to*() funcs below. */
  87. #undef NDEBUG
  88. #include <assert.h>
  89. extern void __isctype_assert(int c, int mask) __attribute__ ((__noreturn__));
  90. #define CTYPE_BODY(NAME,C,MASK) \
  91. if (CTYPE_DOMAIN_CHECK(C)) { \
  92. return ISCTYPE(C, MASK); \
  93. } \
  94. __isctype_assert(C, MASK);
  95. #elif defined(__UCLIBC_HAS_CTYPE_CHECKED__)
  96. #define CTYPE_BODY(NAME,C,MASK) \
  97. return CTYPE_DOMAIN_CHECK(C) \
  98. ? ISCTYPE(C, MASK) \
  99. : 0;
  100. #elif defined(__UCLIBC_HAS_CTYPE_UNSAFE__)
  101. #define CTYPE_BODY(NAME,C,MASK) \
  102. return ISCTYPE(C, MASK);
  103. #else /* No checking done. */
  104. #error Unknown type of ctype checking!
  105. #endif
  106. #define IS_FUNC_BODY(NAME) \
  107. int CTYPE_NAME(NAME) (int c __LOCALE_PARAM ) \
  108. { \
  109. CTYPE_BODY(NAME,c,PASTE2(_IS,NAME)) \
  110. } \
  111. CTYPE_ALIAS(NAME)
  112. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  113. #define C_MACRO(X) PASTE2(__C_is,X)(c)
  114. #define CTYPE_NAME(X) is ## X
  115. #define IS_FUNC_BODY(NAME) \
  116. int CTYPE_NAME(NAME) (int c) \
  117. { \
  118. return C_MACRO(NAME); \
  119. }
  120. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  121. /**********************************************************************/
  122. #ifdef L___ctype_assert
  123. #ifdef __UCLIBC_HAS_CTYPE_ENFORCED__
  124. extern const char *__progname;
  125. void __isctype_assert(int c, int mask)
  126. {
  127. fprintf(stderr, "%s: __is*{_l}(%d,%#x {locale})\n", __progname, c, mask);
  128. abort();
  129. }
  130. #endif
  131. #endif
  132. /**********************************************************************/
  133. #if defined(L_isalnum) || defined(L_isalnum_l)
  134. IS_FUNC_BODY(alnum);
  135. #endif
  136. /**********************************************************************/
  137. #if defined(L_isalpha) || defined(L_isalpha_l)
  138. IS_FUNC_BODY(alpha);
  139. #endif
  140. /**********************************************************************/
  141. #if defined(L_isblank) || defined(L_isblank_l)
  142. IS_FUNC_BODY(blank);
  143. #endif
  144. /**********************************************************************/
  145. #if defined(L_iscntrl) || defined(L_iscntrl_l)
  146. IS_FUNC_BODY(cntrl);
  147. #endif
  148. /**********************************************************************/
  149. #if defined(L_isdigit) || defined(L_isdigit_l)
  150. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  151. /* The standards require EOF < 0. */
  152. #if EOF >= CHAR_MIN
  153. #define __isdigit_char_or_EOF(C) __isdigit_char((C))
  154. #else
  155. #define __isdigit_char_or_EOF(C) __isdigit_int((C))
  156. #endif
  157. int CTYPE_NAME(digit) (int C __LOCALE_PARAM)
  158. {
  159. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  160. if (CTYPE_DOMAIN_CHECK(C)) {
  161. return __isdigit_char_or_EOF(C); /* C is (unsigned) char or EOF. */
  162. }
  163. __isctype_assert(C, _ISdigit);
  164. #else
  165. return __isdigit_int(C); /* C could be invalid. */
  166. #endif
  167. }
  168. CTYPE_ALIAS(digit)
  169. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  170. IS_FUNC_BODY(digit);
  171. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  172. #endif
  173. /**********************************************************************/
  174. #if defined(L_isgraph) || defined(L_isgraph_l)
  175. IS_FUNC_BODY(graph);
  176. #endif
  177. /**********************************************************************/
  178. #if defined(L_islower) || defined(L_islower_l)
  179. IS_FUNC_BODY(lower);
  180. #endif
  181. /**********************************************************************/
  182. #if defined(L_isprint) || defined(L_isprint_l)
  183. IS_FUNC_BODY(print);
  184. #endif
  185. /**********************************************************************/
  186. #if defined(L_ispunct) || defined(L_ispunct_l)
  187. IS_FUNC_BODY(punct);
  188. #endif
  189. /**********************************************************************/
  190. #if defined(L_isspace) || defined(L_isspace_l)
  191. IS_FUNC_BODY(space);
  192. #endif
  193. /**********************************************************************/
  194. #if defined(L_isupper) || defined(L_isupper_l)
  195. IS_FUNC_BODY(upper);
  196. #endif
  197. /**********************************************************************/
  198. #if defined(L_isxdigit) || defined(L_isxdigit_l)
  199. IS_FUNC_BODY(xdigit);
  200. #endif
  201. /**********************************************************************/
  202. #ifdef L_tolower
  203. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  204. int tolower(int c)
  205. {
  206. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  207. assert(CTYPE_DOMAIN_CHECK(c));
  208. #endif
  209. return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? (__UCLIBC_CTYPE_TOLOWER)[c] : c;
  210. }
  211. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  212. int tolower(int c)
  213. {
  214. return __C_tolower(c);
  215. }
  216. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  217. #endif
  218. /**********************************************************************/
  219. #ifdef L_tolower_l
  220. #undef tolower_l
  221. #undef __tolower_l
  222. int __tolower_l(int c, __locale_t l)
  223. {
  224. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  225. assert(CTYPE_DOMAIN_CHECK(c));
  226. #endif
  227. return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c;
  228. }
  229. weak_alias(__tolower_l, tolower_l)
  230. #endif
  231. /**********************************************************************/
  232. #ifdef L_toupper
  233. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  234. int toupper(int c)
  235. {
  236. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  237. assert(CTYPE_DOMAIN_CHECK(c));
  238. #endif
  239. return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? (__UCLIBC_CTYPE_TOUPPER)[c] : c;
  240. }
  241. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  242. int toupper(int c)
  243. {
  244. return __C_toupper(c);
  245. }
  246. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  247. #endif
  248. /**********************************************************************/
  249. #ifdef L_toupper_l
  250. #undef toupper_l
  251. #undef __toupper_l
  252. int __toupper_l(int c, __locale_t l)
  253. {
  254. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  255. assert(CTYPE_DOMAIN_CHECK(c));
  256. #endif
  257. return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c;
  258. }
  259. weak_alias(__toupper_l, toupper_l)
  260. #endif
  261. /**********************************************************************/
  262. #if defined(L_isascii) || defined(L_isascii_l)
  263. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  264. int __XL(isascii)(int c)
  265. {
  266. return __isascii(c); /* locale-independent */
  267. }
  268. __XL_ALIAS(isascii)
  269. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  270. int isascii(int c)
  271. {
  272. return __isascii(c); /* locale-independent */
  273. }
  274. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  275. #endif
  276. /**********************************************************************/
  277. #if defined(L_toascii) || defined(L_toascii_l)
  278. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  279. int __XL(toascii)(int c)
  280. {
  281. return __toascii(c); /* locale-independent */
  282. }
  283. __XL_ALIAS(toascii)
  284. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  285. int toascii(int c)
  286. {
  287. return __toascii(c); /* locale-independent */
  288. }
  289. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  290. #endif
  291. /**********************************************************************/
  292. /* old uClibc extensions */
  293. /**********************************************************************/
  294. #ifdef L_isxlower
  295. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  296. int isxlower(int C)
  297. {
  298. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  299. assert(CTYPE_DOMAIN_CHECK(C));
  300. return (__isctype(C, (_ISxdigit|_ISupper)) == _ISxdigit);
  301. #elif defined(__UCLIBC_HAS_CTYPE_CHECKED__)
  302. return CTYPE_DOMAIN_CHECK(C)
  303. ? (__isctype(C, (_ISxdigit|_ISupper)) == _ISxdigit)
  304. : 0;
  305. #elif defined(__UCLIBC_HAS_CTYPE_UNSAFE__)
  306. return (__isctype(C, (_ISxdigit|_ISupper)) == _ISxdigit);
  307. #else /* No checking done. */
  308. #error Unknown type of ctype checking!
  309. #endif
  310. }
  311. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  312. IS_FUNC_BODY(xlower);
  313. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  314. #endif
  315. /**********************************************************************/
  316. #ifdef L_isxupper
  317. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  318. int isxupper(int C)
  319. {
  320. #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
  321. assert(CTYPE_DOMAIN_CHECK(C));
  322. return (__isctype(C, (_ISxdigit|_ISlower)) == _ISxdigit);
  323. #elif defined(__UCLIBC_HAS_CTYPE_CHECKED__)
  324. return CTYPE_DOMAIN_CHECK(C)
  325. ? (__isctype(C, (_ISxdigit|_ISlower)) == _ISxdigit)
  326. : 0;
  327. #elif defined(__UCLIBC_HAS_CTYPE_UNSAFE__)
  328. return (__isctype(C, (_ISxdigit|_ISlower)) == _ISxdigit);
  329. #else /* No checking done. */
  330. #error Unknown type of ctype checking!
  331. #endif
  332. }
  333. #else /* __UCLIBC_HAS_CTYPE_TABLES__ */
  334. IS_FUNC_BODY(xupper);
  335. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  336. #endif
  337. /**********************************************************************/
  338. /* glibc extensions */
  339. /**********************************************************************/
  340. #ifdef L_isctype
  341. int isctype(int c, int mask)
  342. {
  343. CTYPE_BODY(NAME,c,mask)
  344. }
  345. #endif
  346. /**********************************************************************/
  347. #if L___ctype_b_loc
  348. #ifdef __UCLIBC_HAS_XLOCALE__
  349. const __ctype_mask_t **__ctype_b_loc(void)
  350. {
  351. return &(__UCLIBC_CURLOCALE_DATA).__ctype_b;
  352. }
  353. #endif
  354. #endif
  355. /**********************************************************************/
  356. #if L___ctype_tolower_loc
  357. #ifdef __UCLIBC_HAS_XLOCALE__
  358. const __ctype_touplow_t **__ctype_tolower_loc(void)
  359. {
  360. return &(__UCLIBC_CURLOCALE_DATA).__ctype_tolower;
  361. }
  362. #endif
  363. #endif
  364. /**********************************************************************/
  365. #if L___ctype_toupper_loc
  366. #ifdef __UCLIBC_HAS_XLOCALE__
  367. const __ctype_touplow_t **__ctype_toupper_loc(void)
  368. {
  369. return &(__UCLIBC_CURLOCALE_DATA).__ctype_toupper;
  370. }
  371. #endif
  372. #endif
  373. /**********************************************************************/
  374. #ifdef L___C_ctype_b
  375. const __ctype_mask_t __C_ctype_b_data[] = {
  376. #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  377. /* -128 M-^@ */ 0,
  378. /* -127 M-^A */ 0,
  379. /* -126 M-^B */ 0,
  380. /* -125 M-^C */ 0,
  381. /* -124 M-^D */ 0,
  382. /* -123 M-^E */ 0,
  383. /* -122 M-^F */ 0,
  384. /* -121 M-^G */ 0,
  385. /* -120 M-^H */ 0,
  386. /* -119 M-^I */ 0,
  387. /* -118 M-^J */ 0,
  388. /* -117 M-^K */ 0,
  389. /* -116 M-^L */ 0,
  390. /* -115 M-^M */ 0,
  391. /* -114 M-^N */ 0,
  392. /* -113 M-^O */ 0,
  393. /* -112 M-^P */ 0,
  394. /* -111 M-^Q */ 0,
  395. /* -110 M-^R */ 0,
  396. /* -109 M-^S */ 0,
  397. /* -108 M-^T */ 0,
  398. /* -107 M-^U */ 0,
  399. /* -106 M-^V */ 0,
  400. /* -105 M-^W */ 0,
  401. /* -104 M-^X */ 0,
  402. /* -103 M-^Y */ 0,
  403. /* -102 M-^Z */ 0,
  404. /* -101 M-^[ */ 0,
  405. /* -100 M-^\ */ 0,
  406. /* -99 M-^] */ 0,
  407. /* -98 M-^^ */ 0,
  408. /* -97 M-^_ */ 0,
  409. /* -96 M- */ 0,
  410. /* -95 M-! */ 0,
  411. /* -94 M-" */ 0,
  412. /* -93 M-# */ 0,
  413. /* -92 M-$ */ 0,
  414. /* -91 M-% */ 0,
  415. /* -90 M-& */ 0,
  416. /* -89 M-' */ 0,
  417. /* -88 M-( */ 0,
  418. /* -87 M-) */ 0,
  419. /* -86 M-* */ 0,
  420. /* -85 M-+ */ 0,
  421. /* -84 M-, */ 0,
  422. /* -83 M-- */ 0,
  423. /* -82 M-. */ 0,
  424. /* -81 M-/ */ 0,
  425. /* -80 M-0 */ 0,
  426. /* -79 M-1 */ 0,
  427. /* -78 M-2 */ 0,
  428. /* -77 M-3 */ 0,
  429. /* -76 M-4 */ 0,
  430. /* -75 M-5 */ 0,
  431. /* -74 M-6 */ 0,
  432. /* -73 M-7 */ 0,
  433. /* -72 M-8 */ 0,
  434. /* -71 M-9 */ 0,
  435. /* -70 M-: */ 0,
  436. /* -69 M-; */ 0,
  437. /* -68 M-< */ 0,
  438. /* -67 M-= */ 0,
  439. /* -66 M-> */ 0,
  440. /* -65 M-? */ 0,
  441. /* -64 M-@ */ 0,
  442. /* -63 M-A */ 0,
  443. /* -62 M-B */ 0,
  444. /* -61 M-C */ 0,
  445. /* -60 M-D */ 0,
  446. /* -59 M-E */ 0,
  447. /* -58 M-F */ 0,
  448. /* -57 M-G */ 0,
  449. /* -56 M-H */ 0,
  450. /* -55 M-I */ 0,
  451. /* -54 M-J */ 0,
  452. /* -53 M-K */ 0,
  453. /* -52 M-L */ 0,
  454. /* -51 M-M */ 0,
  455. /* -50 M-N */ 0,
  456. /* -49 M-O */ 0,
  457. /* -48 M-P */ 0,
  458. /* -47 M-Q */ 0,
  459. /* -46 M-R */ 0,
  460. /* -45 M-S */ 0,
  461. /* -44 M-T */ 0,
  462. /* -43 M-U */ 0,
  463. /* -42 M-V */ 0,
  464. /* -41 M-W */ 0,
  465. /* -40 M-X */ 0,
  466. /* -39 M-Y */ 0,
  467. /* -38 M-Z */ 0,
  468. /* -37 M-[ */ 0,
  469. /* -36 M-\ */ 0,
  470. /* -35 M-] */ 0,
  471. /* -34 M-^ */ 0,
  472. /* -33 M-_ */ 0,
  473. /* -32 M-` */ 0,
  474. /* -31 M-a */ 0,
  475. /* -30 M-b */ 0,
  476. /* -29 M-c */ 0,
  477. /* -28 M-d */ 0,
  478. /* -27 M-e */ 0,
  479. /* -26 M-f */ 0,
  480. /* -25 M-g */ 0,
  481. /* -24 M-h */ 0,
  482. /* -23 M-i */ 0,
  483. /* -22 M-j */ 0,
  484. /* -21 M-k */ 0,
  485. /* -20 M-l */ 0,
  486. /* -19 M-m */ 0,
  487. /* -18 M-n */ 0,
  488. /* -17 M-o */ 0,
  489. /* -16 M-p */ 0,
  490. /* -15 M-q */ 0,
  491. /* -14 M-r */ 0,
  492. /* -13 M-s */ 0,
  493. /* -12 M-t */ 0,
  494. /* -11 M-u */ 0,
  495. /* -10 M-v */ 0,
  496. /* -9 M-w */ 0,
  497. /* -8 M-x */ 0,
  498. /* -7 M-y */ 0,
  499. /* -6 M-z */ 0,
  500. /* -5 M-{ */ 0,
  501. /* -4 M-| */ 0,
  502. /* -3 M-} */ 0,
  503. /* -2 M-~ */ 0,
  504. #endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/
  505. /* -1 M-^? */ 0,
  506. /* 0 ^@ */ _IScntrl,
  507. /* 1 ^A */ _IScntrl,
  508. /* 2 ^B */ _IScntrl,
  509. /* 3 ^C */ _IScntrl,
  510. /* 4 ^D */ _IScntrl,
  511. /* 5 ^E */ _IScntrl,
  512. /* 6 ^F */ _IScntrl,
  513. /* 7 ^G */ _IScntrl,
  514. /* 8 ^H */ _IScntrl,
  515. /* 9 ^I */ _ISspace|_ISblank|_IScntrl,
  516. /* 10 ^J */ _ISspace|_IScntrl,
  517. /* 11 ^K */ _ISspace|_IScntrl,
  518. /* 12 ^L */ _ISspace|_IScntrl,
  519. /* 13 ^M */ _ISspace|_IScntrl,
  520. /* 14 ^N */ _IScntrl,
  521. /* 15 ^O */ _IScntrl,
  522. /* 16 ^P */ _IScntrl,
  523. /* 17 ^Q */ _IScntrl,
  524. /* 18 ^R */ _IScntrl,
  525. /* 19 ^S */ _IScntrl,
  526. /* 20 ^T */ _IScntrl,
  527. /* 21 ^U */ _IScntrl,
  528. /* 22 ^V */ _IScntrl,
  529. /* 23 ^W */ _IScntrl,
  530. /* 24 ^X */ _IScntrl,
  531. /* 25 ^Y */ _IScntrl,
  532. /* 26 ^Z */ _IScntrl,
  533. /* 27 ^[ */ _IScntrl,
  534. /* 28 ^\ */ _IScntrl,
  535. /* 29 ^] */ _IScntrl,
  536. /* 30 ^^ */ _IScntrl,
  537. /* 31 ^_ */ _IScntrl,
  538. /* 32 */ _ISspace|_ISprint|_ISblank,
  539. /* 33 ! */ _ISprint|_ISgraph|_ISpunct,
  540. /* 34 " */ _ISprint|_ISgraph|_ISpunct,
  541. /* 35 # */ _ISprint|_ISgraph|_ISpunct,
  542. /* 36 $ */ _ISprint|_ISgraph|_ISpunct,
  543. /* 37 % */ _ISprint|_ISgraph|_ISpunct,
  544. /* 38 & */ _ISprint|_ISgraph|_ISpunct,
  545. /* 39 ' */ _ISprint|_ISgraph|_ISpunct,
  546. /* 40 ( */ _ISprint|_ISgraph|_ISpunct,
  547. /* 41 ) */ _ISprint|_ISgraph|_ISpunct,
  548. /* 42 * */ _ISprint|_ISgraph|_ISpunct,
  549. /* 43 + */ _ISprint|_ISgraph|_ISpunct,
  550. /* 44 , */ _ISprint|_ISgraph|_ISpunct,
  551. /* 45 - */ _ISprint|_ISgraph|_ISpunct,
  552. /* 46 . */ _ISprint|_ISgraph|_ISpunct,
  553. /* 47 / */ _ISprint|_ISgraph|_ISpunct,
  554. /* 48 0 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  555. /* 49 1 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  556. /* 50 2 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  557. /* 51 3 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  558. /* 52 4 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  559. /* 53 5 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  560. /* 54 6 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  561. /* 55 7 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  562. /* 56 8 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  563. /* 57 9 */ _ISdigit|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  564. /* 58 : */ _ISprint|_ISgraph|_ISpunct,
  565. /* 59 ; */ _ISprint|_ISgraph|_ISpunct,
  566. /* 60 < */ _ISprint|_ISgraph|_ISpunct,
  567. /* 61 = */ _ISprint|_ISgraph|_ISpunct,
  568. /* 62 > */ _ISprint|_ISgraph|_ISpunct,
  569. /* 63 ? */ _ISprint|_ISgraph|_ISpunct,
  570. /* 64 @ */ _ISprint|_ISgraph|_ISpunct,
  571. /* 65 A */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  572. /* 66 B */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  573. /* 67 C */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  574. /* 68 D */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  575. /* 69 E */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  576. /* 70 F */ _ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  577. /* 71 G */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  578. /* 72 H */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  579. /* 73 I */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  580. /* 74 J */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  581. /* 75 K */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  582. /* 76 L */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  583. /* 77 M */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  584. /* 78 N */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  585. /* 79 O */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  586. /* 80 P */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  587. /* 81 Q */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  588. /* 82 R */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  589. /* 83 S */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  590. /* 84 T */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  591. /* 85 U */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  592. /* 86 V */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  593. /* 87 W */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  594. /* 88 X */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  595. /* 89 Y */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  596. /* 90 Z */ _ISupper|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  597. /* 91 [ */ _ISprint|_ISgraph|_ISpunct,
  598. /* 92 \ */ _ISprint|_ISgraph|_ISpunct,
  599. /* 93 ] */ _ISprint|_ISgraph|_ISpunct,
  600. /* 94 ^ */ _ISprint|_ISgraph|_ISpunct,
  601. /* 95 _ */ _ISprint|_ISgraph|_ISpunct,
  602. /* 96 ` */ _ISprint|_ISgraph|_ISpunct,
  603. /* 97 a */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  604. /* 98 b */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  605. /* 99 c */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  606. /* 100 d */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  607. /* 101 e */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  608. /* 102 f */ _ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph|_ISalnum,
  609. /* 103 g */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  610. /* 104 h */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  611. /* 105 i */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  612. /* 106 j */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  613. /* 107 k */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  614. /* 108 l */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  615. /* 109 m */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  616. /* 110 n */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  617. /* 111 o */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  618. /* 112 p */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  619. /* 113 q */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  620. /* 114 r */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  621. /* 115 s */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  622. /* 116 t */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  623. /* 117 u */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  624. /* 118 v */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  625. /* 119 w */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  626. /* 120 x */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  627. /* 121 y */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  628. /* 122 z */ _ISlower|_ISalpha|_ISprint|_ISgraph|_ISalnum,
  629. /* 123 { */ _ISprint|_ISgraph|_ISpunct,
  630. /* 124 | */ _ISprint|_ISgraph|_ISpunct,
  631. /* 125 } */ _ISprint|_ISgraph|_ISpunct,
  632. /* 126 ~ */ _ISprint|_ISgraph|_ISpunct,
  633. /* 127 ^? */ _IScntrl,
  634. /* 128 M-^@ */ 0,
  635. /* 129 M-^A */ 0,
  636. /* 130 M-^B */ 0,
  637. /* 131 M-^C */ 0,
  638. /* 132 M-^D */ 0,
  639. /* 133 M-^E */ 0,
  640. /* 134 M-^F */ 0,
  641. /* 135 M-^G */ 0,
  642. /* 136 M-^H */ 0,
  643. /* 137 M-^I */ 0,
  644. /* 138 M-^J */ 0,
  645. /* 139 M-^K */ 0,
  646. /* 140 M-^L */ 0,
  647. /* 141 M-^M */ 0,
  648. /* 142 M-^N */ 0,
  649. /* 143 M-^O */ 0,
  650. /* 144 M-^P */ 0,
  651. /* 145 M-^Q */ 0,
  652. /* 146 M-^R */ 0,
  653. /* 147 M-^S */ 0,
  654. /* 148 M-^T */ 0,
  655. /* 149 M-^U */ 0,
  656. /* 150 M-^V */ 0,
  657. /* 151 M-^W */ 0,
  658. /* 152 M-^X */ 0,
  659. /* 153 M-^Y */ 0,
  660. /* 154 M-^Z */ 0,
  661. /* 155 M-^[ */ 0,
  662. /* 156 M-^\ */ 0,
  663. /* 157 M-^] */ 0,
  664. /* 158 M-^^ */ 0,
  665. /* 159 M-^_ */ 0,
  666. /* 160 M- */ 0,
  667. /* 161 M-! */ 0,
  668. /* 162 M-" */ 0,
  669. /* 163 M-# */ 0,
  670. /* 164 M-$ */ 0,
  671. /* 165 M-% */ 0,
  672. /* 166 M-& */ 0,
  673. /* 167 M-' */ 0,
  674. /* 168 M-( */ 0,
  675. /* 169 M-) */ 0,
  676. /* 170 M-* */ 0,
  677. /* 171 M-+ */ 0,
  678. /* 172 M-, */ 0,
  679. /* 173 M-- */ 0,
  680. /* 174 M-. */ 0,
  681. /* 175 M-/ */ 0,
  682. /* 176 M-0 */ 0,
  683. /* 177 M-1 */ 0,
  684. /* 178 M-2 */ 0,
  685. /* 179 M-3 */ 0,
  686. /* 180 M-4 */ 0,
  687. /* 181 M-5 */ 0,
  688. /* 182 M-6 */ 0,
  689. /* 183 M-7 */ 0,
  690. /* 184 M-8 */ 0,
  691. /* 185 M-9 */ 0,
  692. /* 186 M-: */ 0,
  693. /* 187 M-; */ 0,
  694. /* 188 M-< */ 0,
  695. /* 189 M-= */ 0,
  696. /* 190 M-> */ 0,
  697. /* 191 M-? */ 0,
  698. /* 192 M-@ */ 0,
  699. /* 193 M-A */ 0,
  700. /* 194 M-B */ 0,
  701. /* 195 M-C */ 0,
  702. /* 196 M-D */ 0,
  703. /* 197 M-E */ 0,
  704. /* 198 M-F */ 0,
  705. /* 199 M-G */ 0,
  706. /* 200 M-H */ 0,
  707. /* 201 M-I */ 0,
  708. /* 202 M-J */ 0,
  709. /* 203 M-K */ 0,
  710. /* 204 M-L */ 0,
  711. /* 205 M-M */ 0,
  712. /* 206 M-N */ 0,
  713. /* 207 M-O */ 0,
  714. /* 208 M-P */ 0,
  715. /* 209 M-Q */ 0,
  716. /* 210 M-R */ 0,
  717. /* 211 M-S */ 0,
  718. /* 212 M-T */ 0,
  719. /* 213 M-U */ 0,
  720. /* 214 M-V */ 0,
  721. /* 215 M-W */ 0,
  722. /* 216 M-X */ 0,
  723. /* 217 M-Y */ 0,
  724. /* 218 M-Z */ 0,
  725. /* 219 M-[ */ 0,
  726. /* 220 M-\ */ 0,
  727. /* 221 M-] */ 0,
  728. /* 222 M-^ */ 0,
  729. /* 223 M-_ */ 0,
  730. /* 224 M-` */ 0,
  731. /* 225 M-a */ 0,
  732. /* 226 M-b */ 0,
  733. /* 227 M-c */ 0,
  734. /* 228 M-d */ 0,
  735. /* 229 M-e */ 0,
  736. /* 230 M-f */ 0,
  737. /* 231 M-g */ 0,
  738. /* 232 M-h */ 0,
  739. /* 233 M-i */ 0,
  740. /* 234 M-j */ 0,
  741. /* 235 M-k */ 0,
  742. /* 236 M-l */ 0,
  743. /* 237 M-m */ 0,
  744. /* 238 M-n */ 0,
  745. /* 239 M-o */ 0,
  746. /* 240 M-p */ 0,
  747. /* 241 M-q */ 0,
  748. /* 242 M-r */ 0,
  749. /* 243 M-s */ 0,
  750. /* 244 M-t */ 0,
  751. /* 245 M-u */ 0,
  752. /* 246 M-v */ 0,
  753. /* 247 M-w */ 0,
  754. /* 248 M-x */ 0,
  755. /* 249 M-y */ 0,
  756. /* 250 M-z */ 0,
  757. /* 251 M-{ */ 0,
  758. /* 252 M-| */ 0,
  759. /* 253 M-} */ 0,
  760. /* 254 M-~ */ 0,
  761. /* 255 M-^? */ 0
  762. };
  763. const __ctype_mask_t *__C_ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
  764. #ifndef __UCLIBC_HAS_XLOCALE__
  765. const __ctype_mask_t *__ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
  766. #endif
  767. #endif
  768. /**********************************************************************/
  769. #ifdef L___C_ctype_tolower
  770. const __ctype_touplow_t __C_ctype_tolower_data[] = {
  771. #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  772. -128, -127, -126, -125,
  773. -124, -123, -122, -121,
  774. -120, -119, -118, -117,
  775. -116, -115, -114, -113,
  776. -112, -111, -110, -109,
  777. -108, -107, -106, -105,
  778. -104, -103, -102, -101,
  779. -100, -99, -98, -97,
  780. -96, -95, -94, -93,
  781. -92, -91, -90, -89,
  782. -88, -87, -86, -85,
  783. -84, -83, -82, -81,
  784. -80, -79, -78, -77,
  785. -76, -75, -74, -73,
  786. -72, -71, -70, -69,
  787. -68, -67, -66, -65,
  788. -64, -63, -62, -61,
  789. -60, -59, -58, -57,
  790. -56, -55, -54, -53,
  791. -52, -51, -50, -49,
  792. -48, -47, -46, -45,
  793. -44, -43, -42, -41,
  794. -40, -39, -38, -37,
  795. -36, -35, -34, -33,
  796. -32, -31, -30, -29,
  797. -28, -27, -26, -25,
  798. -24, -23, -22, -21,
  799. -20, -19, -18, -17,
  800. -16, -15, -14, -13,
  801. -12, -11, -10, -9,
  802. -8, -7, -6, -5,
  803. -4, -3, -2, -1,
  804. #endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/
  805. 0, 1, 2, 3,
  806. 4, 5, 6, 7,
  807. 8, 9, 10, 11,
  808. 12, 13, 14, 15,
  809. 16, 17, 18, 19,
  810. 20, 21, 22, 23,
  811. 24, 25, 26, 27,
  812. 28, 29, 30, 31,
  813. 32, 33, 34, 35,
  814. 36, 37, 38, 39,
  815. 40, 41, 42, 43,
  816. 44, 45, 46, 47,
  817. 48, 49, 50, 51,
  818. 52, 53, 54, 55,
  819. 56, 57, 58, 59,
  820. 60, 61, 62, 63,
  821. 64, 97 /* a */, 98 /* b */, 99 /* c */,
  822. 100 /* d */, 101 /* e */, 102 /* f */, 103 /* g */,
  823. 104 /* h */, 105 /* i */, 106 /* j */, 107 /* k */,
  824. 108 /* l */, 109 /* m */, 110 /* n */, 111 /* o */,
  825. 112 /* p */, 113 /* q */, 114 /* r */, 115 /* s */,
  826. 116 /* t */, 117 /* u */, 118 /* v */, 119 /* w */,
  827. 120 /* x */, 121 /* y */, 122 /* z */, 91,
  828. 92, 93, 94, 95,
  829. 96, 97, 98, 99,
  830. 100, 101, 102, 103,
  831. 104, 105, 106, 107,
  832. 108, 109, 110, 111,
  833. 112, 113, 114, 115,
  834. 116, 117, 118, 119,
  835. 120, 121, 122, 123,
  836. 124, 125, 126, 127,
  837. 128, 129, 130, 131,
  838. 132, 133, 134, 135,
  839. 136, 137, 138, 139,
  840. 140, 141, 142, 143,
  841. 144, 145, 146, 147,
  842. 148, 149, 150, 151,
  843. 152, 153, 154, 155,
  844. 156, 157, 158, 159,
  845. 160, 161, 162, 163,
  846. 164, 165, 166, 167,
  847. 168, 169, 170, 171,
  848. 172, 173, 174, 175,
  849. 176, 177, 178, 179,
  850. 180, 181, 182, 183,
  851. 184, 185, 186, 187,
  852. 188, 189, 190, 191,
  853. 192, 193, 194, 195,
  854. 196, 197, 198, 199,
  855. 200, 201, 202, 203,
  856. 204, 205, 206, 207,
  857. 208, 209, 210, 211,
  858. 212, 213, 214, 215,
  859. 216, 217, 218, 219,
  860. 220, 221, 222, 223,
  861. 224, 225, 226, 227,
  862. 228, 229, 230, 231,
  863. 232, 233, 234, 235,
  864. 236, 237, 238, 239,
  865. 240, 241, 242, 243,
  866. 244, 245, 246, 247,
  867. 248, 249, 250, 251,
  868. 252, 253, 254, 255
  869. };
  870. const __ctype_touplow_t *__C_ctype_tolower = __C_ctype_tolower_data
  871. + __UCLIBC_CTYPE_TO_TBL_OFFSET;
  872. #ifndef __UCLIBC_HAS_XLOCALE__
  873. const __ctype_touplow_t *__ctype_tolower = __C_ctype_tolower_data
  874. + __UCLIBC_CTYPE_TO_TBL_OFFSET;
  875. #endif
  876. #endif
  877. /**********************************************************************/
  878. #ifdef L___C_ctype_toupper
  879. const __ctype_touplow_t __C_ctype_toupper_data[] = {
  880. #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  881. -128, -127, -126, -125,
  882. -124, -123, -122, -121,
  883. -120, -119, -118, -117,
  884. -116, -115, -114, -113,
  885. -112, -111, -110, -109,
  886. -108, -107, -106, -105,
  887. -104, -103, -102, -101,
  888. -100, -99, -98, -97,
  889. -96, -95, -94, -93,
  890. -92, -91, -90, -89,
  891. -88, -87, -86, -85,
  892. -84, -83, -82, -81,
  893. -80, -79, -78, -77,
  894. -76, -75, -74, -73,
  895. -72, -71, -70, -69,
  896. -68, -67, -66, -65,
  897. -64, -63, -62, -61,
  898. -60, -59, -58, -57,
  899. -56, -55, -54, -53,
  900. -52, -51, -50, -49,
  901. -48, -47, -46, -45,
  902. -44, -43, -42, -41,
  903. -40, -39, -38, -37,
  904. -36, -35, -34, -33,
  905. -32, -31, -30, -29,
  906. -28, -27, -26, -25,
  907. -24, -23, -22, -21,
  908. -20, -19, -18, -17,
  909. -16, -15, -14, -13,
  910. -12, -11, -10, -9,
  911. -8, -7, -6, -5,
  912. -4, -3, -2, -1,
  913. #endif /* __UCLIBC_HAS_CTYPE_SIGNED__*/
  914. 0, 1, 2, 3,
  915. 4, 5, 6, 7,
  916. 8, 9, 10, 11,
  917. 12, 13, 14, 15,
  918. 16, 17, 18, 19,
  919. 20, 21, 22, 23,
  920. 24, 25, 26, 27,
  921. 28, 29, 30, 31,
  922. 32, 33, 34, 35,
  923. 36, 37, 38, 39,
  924. 40, 41, 42, 43,
  925. 44, 45, 46, 47,
  926. 48, 49, 50, 51,
  927. 52, 53, 54, 55,
  928. 56, 57, 58, 59,
  929. 60, 61, 62, 63,
  930. 64, 65, 66, 67,
  931. 68, 69, 70, 71,
  932. 72, 73, 74, 75,
  933. 76, 77, 78, 79,
  934. 80, 81, 82, 83,
  935. 84, 85, 86, 87,
  936. 88, 89, 90, 91,
  937. 92, 93, 94, 95,
  938. 96, 65 /* A */, 66 /* B */, 67 /* C */,
  939. 68 /* D */, 69 /* E */, 70 /* F */, 71 /* G */,
  940. 72 /* H */, 73 /* I */, 74 /* J */, 75 /* K */,
  941. 76 /* L */, 77 /* M */, 78 /* N */, 79 /* O */,
  942. 80 /* P */, 81 /* Q */, 82 /* R */, 83 /* S */,
  943. 84 /* T */, 85 /* U */, 86 /* V */, 87 /* W */,
  944. 88 /* X */, 89 /* Y */, 90 /* Z */, 123,
  945. 124, 125, 126, 127,
  946. 128, 129, 130, 131,
  947. 132, 133, 134, 135,
  948. 136, 137, 138, 139,
  949. 140, 141, 142, 143,
  950. 144, 145, 146, 147,
  951. 148, 149, 150, 151,
  952. 152, 153, 154, 155,
  953. 156, 157, 158, 159,
  954. 160, 161, 162, 163,
  955. 164, 165, 166, 167,
  956. 168, 169, 170, 171,
  957. 172, 173, 174, 175,
  958. 176, 177, 178, 179,
  959. 180, 181, 182, 183,
  960. 184, 185, 186, 187,
  961. 188, 189, 190, 191,
  962. 192, 193, 194, 195,
  963. 196, 197, 198, 199,
  964. 200, 201, 202, 203,
  965. 204, 205, 206, 207,
  966. 208, 209, 210, 211,
  967. 212, 213, 214, 215,
  968. 216, 217, 218, 219,
  969. 220, 221, 222, 223,
  970. 224, 225, 226, 227,
  971. 228, 229, 230, 231,
  972. 232, 233, 234, 235,
  973. 236, 237, 238, 239,
  974. 240, 241, 242, 243,
  975. 244, 245, 246, 247,
  976. 248, 249, 250, 251,
  977. 252, 253, 254, 255
  978. };
  979. const __ctype_touplow_t *__C_ctype_toupper = __C_ctype_toupper_data
  980. + __UCLIBC_CTYPE_TO_TBL_OFFSET;
  981. #ifndef __UCLIBC_HAS_XLOCALE__
  982. const __ctype_touplow_t *__ctype_toupper = __C_ctype_toupper_data
  983. + __UCLIBC_CTYPE_TO_TBL_OFFSET;
  984. #endif
  985. #endif
  986. /**********************************************************************/