ctype.c 34 KB

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