Small cleanup of extensions code
[AROS.git] / compiler / clib / __ctype.c
blob679fa8d09b07765345e628fc14ddb881061132f9
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/symbolsets.h>
7 #include <ctype.h>
9 const unsigned short int __ctype_b_array[384] =
11 _IScntrl, /* -128 */
12 _IScntrl, /* -127 */
13 _IScntrl, /* -126 */
14 _IScntrl, /* -125 */
15 _IScntrl, /* -124 */
16 _IScntrl, /* -123 */
17 _IScntrl, /* -122 */
18 _IScntrl, /* -121 */
19 _IScntrl, /* -120 */
20 _IScntrl, /* -119 */
21 _IScntrl, /* -118 */
22 _IScntrl, /* -117 */
23 _IScntrl, /* -116 */
24 _IScntrl, /* -115 */
25 _IScntrl, /* -114 */
26 _IScntrl, /* -113 */
27 _IScntrl, /* -112 */
28 _IScntrl, /* -111 */
29 _IScntrl, /* -110 */
30 _IScntrl, /* -109 */
31 _IScntrl, /* -108 */
32 _IScntrl, /* -107 */
33 _IScntrl, /* -106 */
34 _IScntrl, /* -105 */
35 _IScntrl, /* -104 */
36 _IScntrl, /* -103 */
37 _IScntrl, /* -102 */
38 _IScntrl, /* CSI */
39 _IScntrl, /* -100 */
40 _IScntrl, /* -99 */
41 _IScntrl, /* -98 */
42 _IScntrl, /* -97 */
43 _IScntrl, /* NBSpace */
44 _IScntrl, /* ¡ */
45 _IScntrl, /* ¢ */
46 _IScntrl, /* £ */
47 _IScntrl, /* ¤ */
48 _IScntrl, /* ¥ */
49 _IScntrl, /* ¦ */
50 _IScntrl, /* § */
51 _IScntrl, /* ¨ */
52 _IScntrl, /* © */
53 _IScntrl, /* ª */
54 _IScntrl, /* « */
55 _IScntrl, /* ¬ */
56 _IScntrl, /* ­ */
57 _IScntrl, /* ® */
58 _IScntrl, /* ¯ */
59 _IScntrl, /* ° */
60 _IScntrl, /* ± */
61 _IScntrl, /* ² */
62 _IScntrl, /* ³ */
63 _IScntrl, /* ´ */
64 _IScntrl, /* µ */
65 _IScntrl, /* ¶ */
66 _IScntrl, /* · */
67 _IScntrl, /* ¸ */
68 _IScntrl, /* ¹ */
69 _IScntrl, /* º */
70 _IScntrl, /* » */
71 _IScntrl, /* ¼ */
72 _IScntrl, /* ½ */
73 _IScntrl, /* ¾ */
74 _IScntrl, /* ¿ */
75 _IScntrl, /* À */
76 _IScntrl, /* Á */
77 _IScntrl, /* Â */
78 _IScntrl, /* Ã */
79 _IScntrl, /* Ä */
80 _IScntrl, /* Å */
81 _IScntrl, /* Æ */
82 _IScntrl, /* Ç */
83 _IScntrl, /* È */
84 _IScntrl, /* É */
85 _IScntrl, /* Ê */
86 _IScntrl, /* Ë */
87 _IScntrl, /* Ì */
88 _IScntrl, /* Í */
89 _IScntrl, /* Î */
90 _IScntrl, /* Ï */
91 _IScntrl, /* Ð */
92 _IScntrl, /* Ñ */
93 _IScntrl, /* Ò */
94 _IScntrl, /* Ó */
95 _IScntrl, /* Ô */
96 _IScntrl, /* Õ */
97 _IScntrl, /* Ö */
98 _IScntrl, /* × */
99 _IScntrl, /* Ø */
100 _IScntrl, /* Ù */
101 _IScntrl, /* Ú */
102 _IScntrl, /* Û */
103 _IScntrl, /* Ü */
104 _IScntrl, /* Ý */
105 _IScntrl, /* Þ */
106 _IScntrl, /* ß */
107 _IScntrl, /* à */
108 _IScntrl, /* á */
109 _IScntrl, /* â */
110 _IScntrl, /* ã */
111 _IScntrl, /* ä */
112 _IScntrl, /* å */
113 _IScntrl, /* æ */
114 _IScntrl, /* ç */
115 _IScntrl, /* è */
116 _IScntrl, /* é */
117 _IScntrl, /* ê */
118 _IScntrl, /* ë */
119 _IScntrl, /* ì */
120 _IScntrl, /* í */
121 _IScntrl, /* î */
122 _IScntrl, /* ï */
123 _IScntrl, /* ð */
124 _IScntrl, /* ñ */
125 _IScntrl, /* ò */
126 _IScntrl, /* ó */
127 _IScntrl, /* ô */
128 _IScntrl, /* õ */
129 _IScntrl, /* ö */
130 _IScntrl, /* ÷ */
131 _IScntrl, /* ø */
132 _IScntrl, /* ù */
133 _IScntrl, /* ú */
134 _IScntrl, /* û */
135 _IScntrl, /* ü */
136 _IScntrl, /* ý */
137 _IScntrl, /* þ */
138 _IScntrl, /* ÿ */
139 _IScntrl, /* 0 */
140 _IScntrl, /* 1 */
141 _IScntrl, /* 2 */
142 _IScntrl, /* 3 */
143 _IScntrl, /* 4 */
144 _IScntrl, /* 5 */
145 _IScntrl, /* 6 */
146 _IScntrl, /* 7 */
147 _IScntrl, /* Backspace */
148 _ISblank|_IScntrl|_ISspace, /* 9 */
149 _IScntrl|_ISspace, /* LF */
150 _IScntrl|_ISspace, /* 11 */
151 _IScntrl|_ISspace, /* 12 */
152 _IScntrl|_ISspace, /* CR */
153 _IScntrl, /* 14 */
154 _IScntrl, /* 15 */
155 _IScntrl, /* 16 */
156 _IScntrl, /* 17 */
157 _IScntrl, /* 18 */
158 _IScntrl, /* 19 */
159 _IScntrl, /* 20 */
160 _IScntrl, /* 21 */
161 _IScntrl, /* 22 */
162 _IScntrl, /* 23 */
163 _IScntrl, /* 24 */
164 _IScntrl, /* 25 */
165 _IScntrl, /* 26 */
166 _IScntrl, /* ESC */
167 _IScntrl, /* 28 */
168 _IScntrl, /* 29 */
169 _IScntrl, /* 30 */
170 _IScntrl, /* 31 */
171 _ISblank|_ISprint|_ISspace, /* Space */
172 _ISgraph|_ISprint|_ISpunct, /* ! */
173 _ISgraph|_ISprint|_ISpunct, /* " */
174 _ISgraph|_ISprint|_ISpunct, /* # */
175 _ISgraph|_ISprint|_ISpunct, /* $ */
176 _ISgraph|_ISprint|_ISpunct, /* % */
177 _ISgraph|_ISprint|_ISpunct, /* & */
178 _ISgraph|_ISprint|_ISpunct, /* ' */
179 _ISgraph|_ISprint|_ISpunct, /* ( */
180 _ISgraph|_ISprint|_ISpunct, /* ) */
181 _ISgraph|_ISprint|_ISpunct, /* * */
182 _ISgraph|_ISprint|_ISpunct, /* + */
183 _ISgraph|_ISprint|_ISpunct, /* , */
184 _ISgraph|_ISprint|_ISpunct, /* - */
185 _ISgraph|_ISprint|_ISpunct, /* . */
186 _ISgraph|_ISprint|_ISpunct, /* / */
187 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 0 */
188 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 1 */
189 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 2 */
190 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 3 */
191 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 4 */
192 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 5 */
193 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 6 */
194 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 7 */
195 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 8 */
196 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 9 */
197 _ISgraph|_ISprint|_ISpunct, /* : */
198 _ISgraph|_ISprint|_ISpunct, /* ; */
199 _ISgraph|_ISprint|_ISpunct, /* < */
200 _ISgraph|_ISprint|_ISpunct, /* = */
201 _ISgraph|_ISprint|_ISpunct, /* > */
202 _ISgraph|_ISprint|_ISpunct, /* ? */
203 _ISgraph|_ISprint|_ISpunct, /* @ */
204 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* A */
205 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* B */
206 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* C */
207 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* D */
208 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* E */
209 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* F */
210 _ISupper|_ISalpha|_ISgraph|_ISprint, /* G */
211 _ISupper|_ISalpha|_ISgraph|_ISprint, /* H */
212 _ISupper|_ISalpha|_ISgraph|_ISprint, /* I */
213 _ISupper|_ISalpha|_ISgraph|_ISprint, /* J */
214 _ISupper|_ISalpha|_ISgraph|_ISprint, /* K */
215 _ISupper|_ISalpha|_ISgraph|_ISprint, /* L */
216 _ISupper|_ISalpha|_ISgraph|_ISprint, /* M */
217 _ISupper|_ISalpha|_ISgraph|_ISprint, /* N */
218 _ISupper|_ISalpha|_ISgraph|_ISprint, /* O */
219 _ISupper|_ISalpha|_ISgraph|_ISprint, /* P */
220 _ISupper|_ISalpha|_ISgraph|_ISprint, /* Q */
221 _ISupper|_ISalpha|_ISgraph|_ISprint, /* R */
222 _ISupper|_ISalpha|_ISgraph|_ISprint, /* S */
223 _ISupper|_ISalpha|_ISgraph|_ISprint, /* T */
224 _ISupper|_ISalpha|_ISgraph|_ISprint, /* U */
225 _ISupper|_ISalpha|_ISgraph|_ISprint, /* V */
226 _ISupper|_ISalpha|_ISgraph|_ISprint, /* W */
227 _ISupper|_ISalpha|_ISgraph|_ISprint, /* X */
228 _ISupper|_ISalpha|_ISgraph|_ISprint, /* Y */
229 _ISupper|_ISalpha|_ISgraph|_ISprint, /* Z */
230 _ISgraph|_ISprint|_ISpunct, /* [ */
231 _ISgraph|_ISprint|_ISpunct, /* \ */
232 _ISgraph|_ISprint|_ISpunct, /* ] */
233 _ISgraph|_ISprint|_ISpunct, /* ^ */
234 _ISgraph|_ISprint|_ISpunct, /* _ */
235 _ISgraph|_ISprint|_ISpunct, /* ` */
236 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* a */
237 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* b */
238 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* c */
239 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* d */
240 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* e */
241 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* f */
242 _ISlower|_ISalpha|_ISgraph|_ISprint, /* g */
243 _ISlower|_ISalpha|_ISgraph|_ISprint, /* h */
244 _ISlower|_ISalpha|_ISgraph|_ISprint, /* i */
245 _ISlower|_ISalpha|_ISgraph|_ISprint, /* j */
246 _ISlower|_ISalpha|_ISgraph|_ISprint, /* k */
247 _ISlower|_ISalpha|_ISgraph|_ISprint, /* l */
248 _ISlower|_ISalpha|_ISgraph|_ISprint, /* m */
249 _ISlower|_ISalpha|_ISgraph|_ISprint, /* n */
250 _ISlower|_ISalpha|_ISgraph|_ISprint, /* o */
251 _ISlower|_ISalpha|_ISgraph|_ISprint, /* p */
252 _ISlower|_ISalpha|_ISgraph|_ISprint, /* q */
253 _ISlower|_ISalpha|_ISgraph|_ISprint, /* r */
254 _ISlower|_ISalpha|_ISgraph|_ISprint, /* s */
255 _ISlower|_ISalpha|_ISgraph|_ISprint, /* t */
256 _ISlower|_ISalpha|_ISgraph|_ISprint, /* u */
257 _ISlower|_ISalpha|_ISgraph|_ISprint, /* v */
258 _ISlower|_ISalpha|_ISgraph|_ISprint, /* w */
259 _ISlower|_ISalpha|_ISgraph|_ISprint, /* x */
260 _ISlower|_ISalpha|_ISgraph|_ISprint, /* y */
261 _ISlower|_ISalpha|_ISgraph|_ISprint, /* z */
262 _ISgraph|_ISprint|_ISpunct, /* { */
263 _ISgraph|_ISprint|_ISpunct, /* | */
264 _ISgraph|_ISprint|_ISpunct, /* } */
265 _ISgraph|_ISprint|_ISpunct, /* ~ */
266 _IScntrl, /* Del */
267 _IScntrl, /* 128 */
268 _IScntrl, /* 129 */
269 _IScntrl, /* 130 */
270 _IScntrl, /* 131 */
271 _IScntrl, /* 132 */
272 _IScntrl, /* 133 */
273 _IScntrl, /* 134 */
274 _IScntrl, /* 135 */
275 _IScntrl, /* 136 */
276 _IScntrl, /* 137 */
277 _IScntrl, /* 138 */
278 _IScntrl, /* 139 */
279 _IScntrl, /* 140 */
280 _IScntrl, /* 141 */
281 _IScntrl, /* 142 */
282 _IScntrl, /* 143 */
283 _IScntrl, /* 144 */
284 _IScntrl, /* 145 */
285 _IScntrl, /* 146 */
286 _IScntrl, /* 147 */
287 _IScntrl, /* 148 */
288 _IScntrl, /* 149 */
289 _IScntrl, /* 150 */
290 _IScntrl, /* 151 */
291 _IScntrl, /* 152 */
292 _IScntrl, /* 153 */
293 _IScntrl, /* 154 */
294 _IScntrl, /* CSI */
295 _IScntrl, /* 156 */
296 _IScntrl, /* 157 */
297 _IScntrl, /* 158 */
298 _IScntrl, /* 159 */
299 _IScntrl, /* NBSpace */
300 _IScntrl, /* ¡ */
301 _IScntrl, /* ¢ */
302 _IScntrl, /* £ */
303 _IScntrl, /* ¤ */
304 _IScntrl, /* ¥ */
305 _IScntrl, /* ¦ */
306 _IScntrl, /* § */
307 _IScntrl, /* ¨ */
308 _IScntrl, /* © */
309 _IScntrl, /* ª */
310 _IScntrl, /* « */
311 _IScntrl, /* ¬ */
312 _IScntrl, /* ­ */
313 _IScntrl, /* ® */
314 _IScntrl, /* ¯ */
315 _IScntrl, /* ° */
316 _IScntrl, /* ± */
317 _IScntrl, /* ² */
318 _IScntrl, /* ³ */
319 _IScntrl, /* ´ */
320 _IScntrl, /* µ */
321 _IScntrl, /* ¶ */
322 _IScntrl, /* · */
323 _IScntrl, /* ¸ */
324 _IScntrl, /* ¹ */
325 _IScntrl, /* º */
326 _IScntrl, /* » */
327 _IScntrl, /* ¼ */
328 _IScntrl, /* ½ */
329 _IScntrl, /* ¾ */
330 _IScntrl, /* ¿ */
331 _IScntrl, /* À */
332 _IScntrl, /* Á */
333 _IScntrl, /* Â */
334 _IScntrl, /* Ã */
335 _IScntrl, /* Ä */
336 _IScntrl, /* Å */
337 _IScntrl, /* Æ */
338 _IScntrl, /* Ç */
339 _IScntrl, /* È */
340 _IScntrl, /* É */
341 _IScntrl, /* Ê */
342 _IScntrl, /* Ë */
343 _IScntrl, /* Ì */
344 _IScntrl, /* Í */
345 _IScntrl, /* Î */
346 _IScntrl, /* Ï */
347 _IScntrl, /* Ð */
348 _IScntrl, /* Ñ */
349 _IScntrl, /* Ò */
350 _IScntrl, /* Ó */
351 _IScntrl, /* Ô */
352 _IScntrl, /* Õ */
353 _IScntrl, /* Ö */
354 _IScntrl, /* × */
355 _IScntrl, /* Ø */
356 _IScntrl, /* Ù */
357 _IScntrl, /* Ú */
358 _IScntrl, /* Û */
359 _IScntrl, /* Ü */
360 _IScntrl, /* Ý */
361 _IScntrl, /* Þ */
362 _IScntrl, /* ß */
363 _IScntrl, /* à */
364 _IScntrl, /* á */
365 _IScntrl, /* â */
366 _IScntrl, /* ã */
367 _IScntrl, /* ä */
368 _IScntrl, /* å */
369 _IScntrl, /* æ */
370 _IScntrl, /* ç */
371 _IScntrl, /* è */
372 _IScntrl, /* é */
373 _IScntrl, /* ê */
374 _IScntrl, /* ë */
375 _IScntrl, /* ì */
376 _IScntrl, /* í */
377 _IScntrl, /* î */
378 _IScntrl, /* ï */
379 _IScntrl, /* ð */
380 _IScntrl, /* ñ */
381 _IScntrl, /* ò */
382 _IScntrl, /* ó */
383 _IScntrl, /* ô */
384 _IScntrl, /* õ */
385 _IScntrl, /* ö */
386 _IScntrl, /* ÷ */
387 _IScntrl, /* ø */
388 _IScntrl, /* ù */
389 _IScntrl, /* ú */
390 _IScntrl, /* û */
391 _IScntrl, /* ü */
392 _IScntrl, /* ý */
393 _IScntrl, /* þ */
394 _IScntrl, /* ÿ */
397 const int __ctype_toupper_array[384] =
399 /* -128 */
400 128,129,130,131, 132,133,134,135,
401 136,137,138,139, 140,141,142,143,
402 144,145,146,147, 148,149,150,151,
403 152,153,154,155, 156,157,158,159,
404 160,161,162,163, 164,165,166,167,
405 168,169,170,171, 172,173,174,175,
406 176,177,178,179, 180,181,182,183,
407 184,185,186,187, 188,189,190,191,
408 192,193,194,195, 196,197,198,199,
409 200,201,202,203, 204,205,206,207,
410 208,209,210,211, 212,213,214,215,
411 216,217,218,219, 220,221,222,223,
412 224,225,226,227, 228,229,230,231,
413 232,233,234,235, 236,237,238,239,
414 240,241,242,243, 244,245,246,247,
415 248,249,250,251, 252,253,254,255,
417 0, 1, 2, 3, 4, 5, 6, 7,
418 8, 9, 10, 11, 12, 13, 14, 15,
419 16, 17, 18, 19, 20, 21, 22, 23,
420 24, 25, 26, 27, 28, 29, 30, 31,
421 ' ','!','"','#', '$','%','&','\'',
422 '(',')','*','+', ',','-','.','/',
423 '0','1','2','3', '4','5','6','7',
424 '8','9',':',';', '<','=','>','?',
425 '@','A','B','C', 'D','E','F','G',
426 'H','I','J','K', 'L','M','N','O',
427 'P','Q','R','S', 'T','U','V','W',
428 'X','Y','Z','[', '\\',']','^','_',
429 '`','A','B','C', 'D','E','F','G',
430 'H','I','J','K', 'L','M','N','O',
431 'P','Q','R','S', 'T','U','V','W',
432 'X','Y','Z','{', '|','}','~',127,
434 128,129,130,131, 132,133,134,135,
435 136,137,138,139, 140,141,142,143,
436 144,145,146,147, 148,149,150,151,
437 152,153,154,155, 156,157,158,159,
438 160,161,162,163, 164,165,166,167,
439 168,169,170,171, 172,173,174,175,
440 176,177,178,179, 180,181,182,183,
441 184,185,186,187, 188,189,190,191,
442 192,193,194,195, 196,197,198,199,
443 200,201,202,203, 204,205,206,207,
444 208,209,210,211, 212,213,214,215,
445 216,217,218,219, 220,221,222,223,
446 224,225,226,227, 228,229,230,231,
447 232,233,234,235, 236,237,238,239,
448 240,241,242,243, 244,245,246,247,
449 248,249,250,251, 252,253,254,255,
452 const int __ctype_tolower_array[384] =
454 128,129,130,131, 132,133,134,135,
455 136,137,138,139, 140,141,142,143,
456 144,145,146,147, 148,149,150,151,
457 152,153,154,155, 156,157,158,159,
458 160,161,162,163, 164,165,166,167,
459 168,169,170,171, 172,173,174,175,
460 176,177,178,179, 180,181,182,183,
461 184,185,186,187, 188,189,190,191,
462 192,193,194,195, 196,197,198,199,
463 200,201,202,203, 204,205,206,207,
464 208,209,210,211, 212,213,214,215,
465 216,217,218,219, 220,221,222,223,
466 224,225,226,227, 228,229,230,231,
467 232,233,234,235, 236,237,238,239,
468 240,241,242,243, 244,245,246,247,
469 248,249,250,251, 252,253,254,255,
471 0, 1, 2, 3, 4, 5, 6, 7,
472 8, 9, 10, 11, 12, 13, 14, 15,
473 16, 17, 18, 19, 20, 21, 22, 23,
474 24, 25, 26, 27, 28, 29, 30, 31,
475 ' ','!','"','#', '$','%','&','\'',
476 '(',')','*','+', ',','-','.','/',
477 '0','1','2','3', '4','5','6','7',
478 '8','9',':',';', '<','=','>','?',
479 '@','a','b','c', 'd','e','f','g',
480 'h','i','j','k', 'l','m','n','o',
481 'p','q','r','s', 't','u','v','w',
482 'x','y','z','[', '\\',']','^','_',
483 '`','a','b','c', 'd','e','f','g',
484 'h','i','j','k', 'l','m','n','o',
485 'p','q','r','s', 't','u','v','w',
486 'x','y','z','{', '|','}','~',127,
488 128,129,130,131, 132,133,134,135,
489 136,137,138,139, 140,141,142,143,
490 144,145,146,147, 148,149,150,151,
491 152,153,154,155, 156,157,158,159,
492 160,161,162,163, 164,165,166,167,
493 168,169,170,171, 172,173,174,175,
494 176,177,178,179, 180,181,182,183,
495 184,185,186,187, 188,189,190,191,
496 192,193,194,195, 196,197,198,199,
497 200,201,202,203, 204,205,206,207,
498 208,209,210,211, 212,213,214,215,
499 216,217,218,219, 220,221,222,223,
500 224,225,226,227, 228,229,230,231,
501 232,233,234,235, 236,237,238,239,
502 240,241,242,243, 244,245,246,247,
503 248,249,250,251, 252,253,254,255,
506 #ifdef AROSC_SHARED
508 static int __ctype_init(void)
510 __ctype_b = &__ctype_b_array[128];
511 __ctype_toupper = &__ctype_toupper_array[128];
512 __ctype_tolower = &__ctype_tolower_array[128];
514 return 1;
517 ADD2INIT(__ctype_init, 20);
519 #endif
521 /*****************************************************************************
523 NAME
524 #include <ctype.h>
526 int isupper (
528 SYNOPSIS
529 int c)
531 FUNCTION
532 Test if a character is uppercase. Works for all characters between
533 -128 and 255 inclusive both.
535 INPUTS
536 c - The character to test.
538 RESULT
539 != 0 if the character is uppercase, 0 otherwise.
541 NOTES
543 EXAMPLE
544 isupper ('A') -> true
545 isupper ('a') -> false
546 isupper ('0') -> false
547 isupper ('.') -> false
548 isupper ('\n') -> false
549 isupper ('\001') -> false
550 isupper (EOF) -> false
552 BUGS
554 SEE ALSO
556 INTERNALS
558 ******************************************************************************/
559 /*****************************************************************************
561 NAME
562 #include <ctype.h>
564 int islower (
566 SYNOPSIS
567 int c)
569 FUNCTION
570 Test if a character is lowercase. Works for all characters between
571 -128 and 255 inclusive both.
573 INPUTS
574 c - The character to test.
576 RESULT
577 != 0 if the character is lowercase, 0 otherwise.
579 NOTES
581 EXAMPLE
582 islower ('A') -> false
583 islower ('a') -> true
584 islower ('0') -> false
585 islower ('.') -> false
586 islower ('\n') -> false
587 islower ('\001') -> false
588 islower (EOF) -> false
590 BUGS
592 SEE ALSO
594 INTERNALS
596 ******************************************************************************/
597 /******************************************************************************
599 NAME
600 #include <ctype.h>
602 int isalpha (
604 SYNOPSIS
605 int c)
607 FUNCTION
608 Test if a character is an alphabetic character. Works for all
609 characters between -128 and 255 inclusive both.
611 INPUTS
612 c - The character to test.
614 RESULT
615 != 0 if the character is an alphabetic character, 0 otherwise.
617 NOTES
619 EXAMPLE
620 isalpha ('A') -> true
621 isalpha ('a') -> true
622 isalpha ('0') -> false
623 isalpha ('.') -> false
624 isalpha ('\n') -> false
625 isalpha ('\001') -> false
626 isalpha (EOF) -> false
628 BUGS
630 SEE ALSO
632 INTERNALS
634 ******************************************************************************/
635 /*****************************************************************************
637 NAME
638 #include <ctype.h>
640 int isalnum (
642 SYNOPSIS
643 int c)
645 FUNCTION
646 Test if a character is an alphabetic character or a digit. Works
647 for all characters between -128 and 255 inclusive both.
649 INPUTS
650 c - The character to test.
652 RESULT
653 != 0 if the character is alphabetic character or a digit, 0 otherwise.
655 NOTES
657 EXAMPLE
658 isalnum ('A') -> true
659 isalnum ('a') -> true
660 isalnum ('0') -> true
661 isalnum ('.') -> false
662 isalnum ('\n') -> false
663 isalnum ('\001') -> false
664 isalnum (EOF) -> false
666 BUGS
668 SEE ALSO
670 INTERNALS
672 ******************************************************************************/
673 /*****************************************************************************
675 NAME
676 #include <ctype.h>
678 int isascii (
680 SYNOPSIS
681 int c)
683 FUNCTION
684 Test if a character is an ascii character. Works for all characters
685 between -128 and 255 inclusive both.
687 INPUTS
688 c - The character to test.
690 RESULT
691 != 0 if the character is an ascii character, 0 otherwise.
693 NOTES
695 EXAMPLE
696 isascii ('A') -> true
697 isascii ('a') -> true
698 isascii ('0') -> true
699 isascii ('.') -> true
700 isascii ('\n') -> true
701 isascii ('\001') -> true
702 isascii (EOF) -> false
704 BUGS
706 SEE ALSO
708 INTERNALS
710 ******************************************************************************/
711 /*****************************************************************************
713 NAME
714 #include <ctype.h>
716 int isblank (
718 SYNOPSIS
719 int c)
721 FUNCTION
722 Test if a character is a space or a tab. Works for all characters
723 between -128 and 255 inclusive both.
725 INPUTS
726 c - The character to test.
728 RESULT
729 != 0 if the character is a space or tab, 0 otherwise.
731 NOTES
733 EXAMPLE
734 isblank ('A') -> false
735 isblank ('a') -> false
736 isblank ('0') -> false
737 isblank ('.') -> false
738 isblank (' ') -> true
739 isblank ('\n') -> false
740 isblank ('\001') -> false
741 isblank (EOF) -> false
743 BUGS
745 SEE ALSO
747 INTERNALS
749 ******************************************************************************/
750 /*****************************************************************************
752 NAME
753 #include <ctype.h>
755 int iscntrl (
757 SYNOPSIS
758 int c)
760 FUNCTION
761 Test if a character is a control character. Works for all
762 characters between -128 and 255 inclusive both.
764 INPUTS
765 c - The character to test.
767 RESULT
768 != 0 if the character is a control character, 0 otherwise.
770 NOTES
772 EXAMPLE
773 iscntrl ('A') -> false
774 iscntrl ('a') -> false
775 iscntrl ('0') -> false
776 iscntrl ('.') -> false
777 iscntrl ('\n') -> true
778 iscntrl ('\001') -> true
779 iscntrl (EOF) -> false
781 BUGS
783 SEE ALSO
785 INTERNALS
787 ******************************************************************************/
788 /*****************************************************************************
790 NAME
791 #include <ctype.h>
793 int isdigit (
795 SYNOPSIS
796 int c)
798 FUNCTION
799 Test if a character is a digit. Works for all characters between
800 -128 and 255 inclusive both.
802 INPUTS
803 c - The character to test.
805 RESULT
806 != 0 if the character is a digit, 0 otherwise.
808 NOTES
810 EXAMPLE
811 isdigit ('A') -> false
812 isdigit ('a') -> false
813 isdigit ('0') -> true
814 isdigit ('.') -> false
815 isdigit ('\n') -> false
816 isdigit ('\001') -> false
817 isdigit (EOF) -> false
819 BUGS
821 SEE ALSO
823 INTERNALS
825 ******************************************************************************/
826 /*****************************************************************************
828 NAME
829 #include <ctype.h>
831 int isgraph (
833 SYNOPSIS
834 int c)
836 FUNCTION
837 Test if a character is a printable character but no whitespace.
838 Works for all characters between -128 and 255 inclusive both.
840 INPUTS
841 c - The character to test.
843 RESULT
844 != 0 if the character is a printable character but no whitespace, 0
845 otherwise.
847 NOTES
849 EXAMPLE
850 isgraph ('A') -> true
851 isgraph ('a') -> true
852 isgraph ('0') -> true
853 isgraph ('.') -> true
854 isgraph ('\n') -> false
855 isgraph ('\001') -> false
856 isgraph (EOF) -> false
858 BUGS
860 SEE ALSO
862 INTERNALS
864 ******************************************************************************/
865 /*****************************************************************************
867 NAME
868 #include <ctype.h>
870 int isprint (
872 SYNOPSIS
873 int c)
875 FUNCTION
876 Test if a character is a printable character. Works for all
877 characters between -128 and 255 inclusive both.
879 INPUTS
880 c - The character to test.
882 RESULT
883 != 0 if the character is a printable character, 0 otherwise.
885 NOTES
887 EXAMPLE
888 isprint ('A') -> true
889 isprint ('a') -> true
890 isprint ('0') -> true
891 isprint ('.') -> true
892 isprint ('\n') -> true
893 isprint ('\001') -> false
894 isprint (EOF) -> false
896 BUGS
898 SEE ALSO
900 INTERNALS
902 ******************************************************************************/
903 /*****************************************************************************
905 NAME
906 #include <ctype.h>
908 int isspace (
910 SYNOPSIS
911 int c)
913 FUNCTION
914 Test if a character is whitespace. Works for all characters between
915 -128 and 255 inclusive both.
917 INPUTS
918 c - The character to test.
920 RESULT
921 != 0 if the character is whitespace, 0 otherwise.
923 NOTES
925 EXAMPLE
926 isspace ('A') -> false
927 isspace ('a') -> false
928 isspace ('0') -> false
929 isspace ('.') -> false
930 isspace ('\n') -> true
931 isspace ('\001') -> false
932 isspace (EOF) -> false
934 BUGS
936 SEE ALSO
938 INTERNALS
940 ******************************************************************************/
941 /*****************************************************************************
943 NAME
944 #include <ctype.h>
946 int ispunct (
948 SYNOPSIS
949 int c)
951 FUNCTION
952 Test if a character is printable but not alphanumeric. Works for
953 all characters between -128 and 255 inclusive both.
955 INPUTS
956 c - The character to test.
958 RESULT
959 != 0 if the character is printable but not alphanumeric, 0
960 otherwise.
962 NOTES
964 EXAMPLE
965 ispunct ('A') -> false
966 ispunct ('a') -> false
967 ispunct ('0') -> false
968 ispunct ('.') -> true
969 ispunct ('\n') -> false
970 ispunct ('\001') -> false
971 ispunct (EOF) -> false
973 BUGS
975 SEE ALSO
977 INTERNALS
979 ******************************************************************************/
980 /*****************************************************************************
982 NAME
983 #include <ctype.h>
985 int isxdigit (
987 SYNOPSIS
988 int c)
990 FUNCTION
991 Test if a character is a hexadecimal digit. Works for all
992 characters between -128 and 255 inclusive both.
994 INPUTS
995 c - The character to test.
997 RESULT
998 != 0 if the character is a hexadecimal digit, 0 otherwise.
1000 NOTES
1002 EXAMPLE
1003 isxdigit ('A') -> true
1004 isxdigit ('a') -> true
1005 isxdigit ('x') -> false
1006 isxdigit ('0') -> true
1007 isxdigit ('.') -> false
1008 isxdigit ('\n') -> false
1009 isxdigit ('\001') -> false
1010 isxdigit (EOF) -> false
1012 BUGS
1014 SEE ALSO
1016 INTERNALS
1018 ******************************************************************************/