x11gfx.hidd: support 32 bit modes
[AROS.git] / compiler / stdc / __ctype.c
blobebd37a34248bfcbdf3aeda961ea79901faa08e52
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/symbolsets.h>
7 #include <libraries/stdc.h>
9 #include <ctype.h>
11 static const unsigned short int __ctype_b_array[256] =
13 _IScntrl, /* 0 */
14 _IScntrl, /* 1 */
15 _IScntrl, /* 2 */
16 _IScntrl, /* 3 */
17 _IScntrl, /* 4 */
18 _IScntrl, /* 5 */
19 _IScntrl, /* 6 */
20 _IScntrl, /* 7 */
21 _IScntrl, /* Backspace */
22 _ISblank|_IScntrl|_ISspace, /* 9 */
23 _IScntrl|_ISspace, /* LF */
24 _IScntrl|_ISspace, /* 11 */
25 _IScntrl|_ISspace, /* 12 */
26 _IScntrl|_ISspace, /* CR */
27 _IScntrl, /* 14 */
28 _IScntrl, /* 15 */
29 _IScntrl, /* 16 */
30 _IScntrl, /* 17 */
31 _IScntrl, /* 18 */
32 _IScntrl, /* 19 */
33 _IScntrl, /* 20 */
34 _IScntrl, /* 21 */
35 _IScntrl, /* 22 */
36 _IScntrl, /* 23 */
37 _IScntrl, /* 24 */
38 _IScntrl, /* 25 */
39 _IScntrl, /* 26 */
40 _IScntrl, /* ESC */
41 _IScntrl, /* 28 */
42 _IScntrl, /* 29 */
43 _IScntrl, /* 30 */
44 _IScntrl, /* 31 */
45 _ISblank|_ISprint|_ISspace, /* Space */
46 _ISgraph|_ISprint|_ISpunct, /* ! */
47 _ISgraph|_ISprint|_ISpunct, /* " */
48 _ISgraph|_ISprint|_ISpunct, /* # */
49 _ISgraph|_ISprint|_ISpunct, /* $ */
50 _ISgraph|_ISprint|_ISpunct, /* % */
51 _ISgraph|_ISprint|_ISpunct, /* & */
52 _ISgraph|_ISprint|_ISpunct, /* ' */
53 _ISgraph|_ISprint|_ISpunct, /* ( */
54 _ISgraph|_ISprint|_ISpunct, /* ) */
55 _ISgraph|_ISprint|_ISpunct, /* * */
56 _ISgraph|_ISprint|_ISpunct, /* + */
57 _ISgraph|_ISprint|_ISpunct, /* , */
58 _ISgraph|_ISprint|_ISpunct, /* - */
59 _ISgraph|_ISprint|_ISpunct, /* . */
60 _ISgraph|_ISprint|_ISpunct, /* / */
61 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 0 */
62 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 1 */
63 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 2 */
64 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 3 */
65 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 4 */
66 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 5 */
67 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 6 */
68 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 7 */
69 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 8 */
70 _ISdigit|_ISgraph|_ISprint|_ISxdigit, /* 9 */
71 _ISgraph|_ISprint|_ISpunct, /* : */
72 _ISgraph|_ISprint|_ISpunct, /* ; */
73 _ISgraph|_ISprint|_ISpunct, /* < */
74 _ISgraph|_ISprint|_ISpunct, /* = */
75 _ISgraph|_ISprint|_ISpunct, /* > */
76 _ISgraph|_ISprint|_ISpunct, /* ? */
77 _ISgraph|_ISprint|_ISpunct, /* @ */
78 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* A */
79 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* B */
80 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* C */
81 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* D */
82 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* E */
83 _ISupper|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* F */
84 _ISupper|_ISalpha|_ISgraph|_ISprint, /* G */
85 _ISupper|_ISalpha|_ISgraph|_ISprint, /* H */
86 _ISupper|_ISalpha|_ISgraph|_ISprint, /* I */
87 _ISupper|_ISalpha|_ISgraph|_ISprint, /* J */
88 _ISupper|_ISalpha|_ISgraph|_ISprint, /* K */
89 _ISupper|_ISalpha|_ISgraph|_ISprint, /* L */
90 _ISupper|_ISalpha|_ISgraph|_ISprint, /* M */
91 _ISupper|_ISalpha|_ISgraph|_ISprint, /* N */
92 _ISupper|_ISalpha|_ISgraph|_ISprint, /* O */
93 _ISupper|_ISalpha|_ISgraph|_ISprint, /* P */
94 _ISupper|_ISalpha|_ISgraph|_ISprint, /* Q */
95 _ISupper|_ISalpha|_ISgraph|_ISprint, /* R */
96 _ISupper|_ISalpha|_ISgraph|_ISprint, /* S */
97 _ISupper|_ISalpha|_ISgraph|_ISprint, /* T */
98 _ISupper|_ISalpha|_ISgraph|_ISprint, /* U */
99 _ISupper|_ISalpha|_ISgraph|_ISprint, /* V */
100 _ISupper|_ISalpha|_ISgraph|_ISprint, /* W */
101 _ISupper|_ISalpha|_ISgraph|_ISprint, /* X */
102 _ISupper|_ISalpha|_ISgraph|_ISprint, /* Y */
103 _ISupper|_ISalpha|_ISgraph|_ISprint, /* Z */
104 _ISgraph|_ISprint|_ISpunct, /* [ */
105 _ISgraph|_ISprint|_ISpunct, /* \ */
106 _ISgraph|_ISprint|_ISpunct, /* ] */
107 _ISgraph|_ISprint|_ISpunct, /* ^ */
108 _ISgraph|_ISprint|_ISpunct, /* _ */
109 _ISgraph|_ISprint|_ISpunct, /* ` */
110 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* a */
111 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* b */
112 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* c */
113 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* d */
114 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* e */
115 _ISlower|_ISalpha|_ISgraph|_ISprint|_ISxdigit, /* f */
116 _ISlower|_ISalpha|_ISgraph|_ISprint, /* g */
117 _ISlower|_ISalpha|_ISgraph|_ISprint, /* h */
118 _ISlower|_ISalpha|_ISgraph|_ISprint, /* i */
119 _ISlower|_ISalpha|_ISgraph|_ISprint, /* j */
120 _ISlower|_ISalpha|_ISgraph|_ISprint, /* k */
121 _ISlower|_ISalpha|_ISgraph|_ISprint, /* l */
122 _ISlower|_ISalpha|_ISgraph|_ISprint, /* m */
123 _ISlower|_ISalpha|_ISgraph|_ISprint, /* n */
124 _ISlower|_ISalpha|_ISgraph|_ISprint, /* o */
125 _ISlower|_ISalpha|_ISgraph|_ISprint, /* p */
126 _ISlower|_ISalpha|_ISgraph|_ISprint, /* q */
127 _ISlower|_ISalpha|_ISgraph|_ISprint, /* r */
128 _ISlower|_ISalpha|_ISgraph|_ISprint, /* s */
129 _ISlower|_ISalpha|_ISgraph|_ISprint, /* t */
130 _ISlower|_ISalpha|_ISgraph|_ISprint, /* u */
131 _ISlower|_ISalpha|_ISgraph|_ISprint, /* v */
132 _ISlower|_ISalpha|_ISgraph|_ISprint, /* w */
133 _ISlower|_ISalpha|_ISgraph|_ISprint, /* x */
134 _ISlower|_ISalpha|_ISgraph|_ISprint, /* y */
135 _ISlower|_ISalpha|_ISgraph|_ISprint, /* z */
136 _ISgraph|_ISprint|_ISpunct, /* { */
137 _ISgraph|_ISprint|_ISpunct, /* | */
138 _ISgraph|_ISprint|_ISpunct, /* } */
139 _ISgraph|_ISprint|_ISpunct, /* ~ */
140 _IScntrl, /* Del */
141 0, /* 128 */
142 0, /* 129 */
143 0, /* 130 */
144 0, /* 131 */
145 0, /* 132 */
146 0, /* 133 */
147 0, /* 134 */
148 0, /* 135 */
149 0, /* 136 */
150 0, /* 137 */
151 0, /* 138 */
152 0, /* 139 */
153 0, /* 140 */
154 0, /* 141 */
155 0, /* 142 */
156 0, /* 143 */
157 0, /* 144 */
158 0, /* 145 */
159 0, /* 146 */
160 0, /* 147 */
161 0, /* 148 */
162 0, /* 149 */
163 0, /* 150 */
164 0, /* 151 */
165 0, /* 152 */
166 0, /* 153 */
167 0, /* 154 */
168 0, /* CSI */
169 0, /* 156 */
170 0, /* 157 */
171 0, /* 158 */
172 0, /* 159 */
173 0, /* NBSpace */
174 0, /* ¡ */
175 0, /* ¢ */
176 0, /* £ */
177 0, /* ¤ */
178 0, /* ¥ */
179 0, /* ¦ */
180 0, /* § */
181 0, /* ¨ */
182 0, /* © */
183 0, /* ª */
184 0, /* « */
185 0, /* ¬ */
186 0, /* ­ */
187 0, /* ® */
188 0, /* ¯ */
189 0, /* ° */
190 0, /* ± */
191 0, /* ² */
192 0, /* ³ */
193 0, /* ´ */
194 0, /* µ */
195 0, /* ¶ */
196 0, /* · */
197 0, /* ¸ */
198 0, /* ¹ */
199 0, /* º */
200 0, /* » */
201 0, /* ¼ */
202 0, /* ½ */
203 0, /* ¾ */
204 0, /* ¿ */
205 0, /* À */
206 0, /* Á */
207 0, /* Â */
208 0, /* Ã */
209 0, /* Ä */
210 0, /* Å */
211 0, /* Æ */
212 0, /* Ç */
213 0, /* È */
214 0, /* É */
215 0, /* Ê */
216 0, /* Ë */
217 0, /* Ì */
218 0, /* Í */
219 0, /* Î */
220 0, /* Ï */
221 0, /* Ð */
222 0, /* Ñ */
223 0, /* Ò */
224 0, /* Ó */
225 0, /* Ô */
226 0, /* Õ */
227 0, /* Ö */
228 0, /* × */
229 0, /* Ø */
230 0, /* Ù */
231 0, /* Ú */
232 0, /* Û */
233 0, /* Ü */
234 0, /* Ý */
235 0, /* Þ */
236 0, /* ß */
237 0, /* à */
238 0, /* á */
239 0, /* â */
240 0, /* ã */
241 0, /* ä */
242 0, /* å */
243 0, /* æ */
244 0, /* ç */
245 0, /* è */
246 0, /* é */
247 0, /* ê */
248 0, /* ë */
249 0, /* ì */
250 0, /* í */
251 0, /* î */
252 0, /* ï */
253 0, /* ð */
254 0, /* ñ */
255 0, /* ò */
256 0, /* ó */
257 0, /* ô */
258 0, /* õ */
259 0, /* ö */
260 0, /* ÷ */
261 0, /* ø */
262 0, /* ù */
263 0, /* ú */
264 0, /* û */
265 0, /* ü */
266 0, /* ý */
267 0, /* þ */
268 0, /* ÿ */
271 static const unsigned char __ctype_toupper_array[256] =
273 0, 1, 2, 3, 4, 5, 6, 7,
274 8, 9, 10, 11, 12, 13, 14, 15,
275 16, 17, 18, 19, 20, 21, 22, 23,
276 24, 25, 26, 27, 28, 29, 30, 31,
277 ' ','!','"','#', '$','%','&','\'',
278 '(',')','*','+', ',','-','.','/',
279 '0','1','2','3', '4','5','6','7',
280 '8','9',':',';', '<','=','>','?',
281 '@','A','B','C', 'D','E','F','G',
282 'H','I','J','K', 'L','M','N','O',
283 'P','Q','R','S', 'T','U','V','W',
284 'X','Y','Z','[', '\\',']','^','_',
285 '`','A','B','C', 'D','E','F','G',
286 'H','I','J','K', 'L','M','N','O',
287 'P','Q','R','S', 'T','U','V','W',
288 'X','Y','Z','{', '|','}','~',127,
290 128,129,130,131, 132,133,134,135,
291 136,137,138,139, 140,141,142,143,
292 144,145,146,147, 148,149,150,151,
293 152,153,154,155, 156,157,158,159,
294 160,161,162,163, 164,165,166,167,
295 168,169,170,171, 172,173,174,175,
296 176,177,178,179, 180,181,182,183,
297 184,185,186,187, 188,189,190,191,
298 192,193,194,195, 196,197,198,199,
299 200,201,202,203, 204,205,206,207,
300 208,209,210,211, 212,213,214,215,
301 216,217,218,219, 220,221,222,223,
302 224,225,226,227, 228,229,230,231,
303 232,233,234,235, 236,237,238,239,
304 240,241,242,243, 244,245,246,247,
305 248,249,250,251, 252,253,254,255,
308 static const unsigned char __ctype_tolower_array[256] =
310 0, 1, 2, 3, 4, 5, 6, 7,
311 8, 9, 10, 11, 12, 13, 14, 15,
312 16, 17, 18, 19, 20, 21, 22, 23,
313 24, 25, 26, 27, 28, 29, 30, 31,
314 ' ','!','"','#', '$','%','&','\'',
315 '(',')','*','+', ',','-','.','/',
316 '0','1','2','3', '4','5','6','7',
317 '8','9',':',';', '<','=','>','?',
318 '@','a','b','c', 'd','e','f','g',
319 'h','i','j','k', 'l','m','n','o',
320 'p','q','r','s', 't','u','v','w',
321 'x','y','z','[', '\\',']','^','_',
322 '`','a','b','c', 'd','e','f','g',
323 'h','i','j','k', 'l','m','n','o',
324 'p','q','r','s', 't','u','v','w',
325 'x','y','z','{', '|','}','~',127,
327 128,129,130,131, 132,133,134,135,
328 136,137,138,139, 140,141,142,143,
329 144,145,146,147, 148,149,150,151,
330 152,153,154,155, 156,157,158,159,
331 160,161,162,163, 164,165,166,167,
332 168,169,170,171, 172,173,174,175,
333 176,177,178,179, 180,181,182,183,
334 184,185,186,187, 188,189,190,191,
335 192,193,194,195, 196,197,198,199,
336 200,201,202,203, 204,205,206,207,
337 208,209,210,211, 212,213,214,215,
338 216,217,218,219, 220,221,222,223,
339 224,225,226,227, 228,229,230,231,
340 232,233,234,235, 236,237,238,239,
341 240,241,242,243, 244,245,246,247,
342 248,249,250,251, 252,253,254,255,
345 /* Pointers have to be available both when in static linklib and
346 internally to stdc.library also
348 const unsigned short int * const __ctype_b = &__ctype_b_array[0];
349 const unsigned char * const __ctype_toupper = &__ctype_toupper_array[0];
350 const unsigned char * const __ctype_tolower = &__ctype_tolower_array[0];
352 const unsigned short int * const * const __ctype_b_ptr = &__ctype_b;
353 const unsigned char * const * const __ctype_toupper_ptr = &__ctype_toupper;
354 const unsigned char * const * const __ctype_tolower_ptr = &__ctype_tolower;
356 #ifndef STDC_STATIC
357 static int __ctype_init(struct StdCBase *StdCBase)
359 /* Currently these values are the same for all libbases
360 but could in theory be changed in the future to make
361 it locale dependent.
363 StdCBase->__ctype_b = &__ctype_b_array[0];
364 StdCBase->__ctype_toupper = &__ctype_toupper_array[0];
365 StdCBase->__ctype_tolower = &__ctype_tolower_array[0];
367 return 1;
370 ADD2INITLIB(__ctype_init, 20);
371 #endif
373 /*****************************************************************************
375 NAME
376 #include <ctype.h>
378 int isupper (
380 SYNOPSIS
381 int c)
383 FUNCTION
384 Test if a character is uppercase. Works for all characters between
385 -128 and 255 inclusive both.
387 INPUTS
388 c - The character to test.
390 RESULT
391 != 0 if the character is uppercase, 0 otherwise.
393 NOTES
395 EXAMPLE
396 isupper ('A') -> true
397 isupper ('a') -> false
398 isupper ('0') -> false
399 isupper ('.') -> false
400 isupper ('\n') -> false
401 isupper ('\001') -> false
402 isupper (EOF) -> false
404 BUGS
406 SEE ALSO
408 INTERNALS
410 ******************************************************************************/
411 /*****************************************************************************
413 NAME
414 #include <ctype.h>
416 int islower (
418 SYNOPSIS
419 int c)
421 FUNCTION
422 Test if a character is lowercase. Works for all characters between
423 -128 and 255 inclusive both.
425 INPUTS
426 c - The character to test.
428 RESULT
429 != 0 if the character is lowercase, 0 otherwise.
431 NOTES
433 EXAMPLE
434 islower ('A') -> false
435 islower ('a') -> true
436 islower ('0') -> false
437 islower ('.') -> false
438 islower ('\n') -> false
439 islower ('\001') -> false
440 islower (EOF) -> false
442 BUGS
444 SEE ALSO
446 INTERNALS
448 ******************************************************************************/
449 /******************************************************************************
451 NAME
452 #include <ctype.h>
454 int isalpha (
456 SYNOPSIS
457 int c)
459 FUNCTION
460 Test if a character is an alphabetic character. Works for all
461 characters between -128 and 255 inclusive both.
463 INPUTS
464 c - The character to test.
466 RESULT
467 != 0 if the character is an alphabetic character, 0 otherwise.
469 NOTES
471 EXAMPLE
472 isalpha ('A') -> true
473 isalpha ('a') -> true
474 isalpha ('0') -> false
475 isalpha ('.') -> false
476 isalpha ('\n') -> false
477 isalpha ('\001') -> false
478 isalpha (EOF) -> false
480 BUGS
482 SEE ALSO
484 INTERNALS
486 ******************************************************************************/
487 /*****************************************************************************
489 NAME
490 #include <ctype.h>
492 int isalnum (
494 SYNOPSIS
495 int c)
497 FUNCTION
498 Test if a character is an alphabetic character or a digit. Works
499 for all characters between -128 and 255 inclusive both.
501 INPUTS
502 c - The character to test.
504 RESULT
505 != 0 if the character is alphabetic character or a digit, 0 otherwise.
507 NOTES
509 EXAMPLE
510 isalnum ('A') -> true
511 isalnum ('a') -> true
512 isalnum ('0') -> true
513 isalnum ('.') -> false
514 isalnum ('\n') -> false
515 isalnum ('\001') -> false
516 isalnum (EOF) -> false
518 BUGS
520 SEE ALSO
522 INTERNALS
524 ******************************************************************************/
525 /*****************************************************************************
527 NAME
528 #include <ctype.h>
530 int isascii (
532 SYNOPSIS
533 int c)
535 FUNCTION
536 Test if a character is an ascii character. Works for all characters
537 between -128 and 255 inclusive both.
539 INPUTS
540 c - The character to test.
542 RESULT
543 != 0 if the character is an ascii character, 0 otherwise.
545 NOTES
547 EXAMPLE
548 isascii ('A') -> true
549 isascii ('a') -> true
550 isascii ('0') -> true
551 isascii ('.') -> true
552 isascii ('\n') -> true
553 isascii ('\001') -> true
554 isascii (EOF) -> false
556 BUGS
558 SEE ALSO
560 INTERNALS
562 ******************************************************************************/
563 /*****************************************************************************
565 NAME
566 #include <ctype.h>
568 int isblank (
570 SYNOPSIS
571 int c)
573 FUNCTION
574 Test if a character is a space or a tab. Works for all characters
575 between -128 and 255 inclusive both.
577 INPUTS
578 c - The character to test.
580 RESULT
581 != 0 if the character is a space or tab, 0 otherwise.
583 NOTES
585 EXAMPLE
586 isblank ('A') -> false
587 isblank ('a') -> false
588 isblank ('0') -> false
589 isblank ('.') -> false
590 isblank (' ') -> true
591 isblank ('\n') -> false
592 isblank ('\001') -> false
593 isblank (EOF) -> false
595 BUGS
597 SEE ALSO
599 INTERNALS
601 ******************************************************************************/
602 /*****************************************************************************
604 NAME
605 #include <ctype.h>
607 int iscntrl (
609 SYNOPSIS
610 int c)
612 FUNCTION
613 Test if a character is a control character. Works for all
614 characters between -128 and 255 inclusive both.
616 INPUTS
617 c - The character to test.
619 RESULT
620 != 0 if the character is a control character, 0 otherwise.
622 NOTES
624 EXAMPLE
625 iscntrl ('A') -> false
626 iscntrl ('a') -> false
627 iscntrl ('0') -> false
628 iscntrl ('.') -> false
629 iscntrl ('\n') -> true
630 iscntrl ('\001') -> true
631 iscntrl (EOF) -> false
633 BUGS
635 SEE ALSO
637 INTERNALS
639 ******************************************************************************/
640 /*****************************************************************************
642 NAME
643 #include <ctype.h>
645 int isdigit (
647 SYNOPSIS
648 int c)
650 FUNCTION
651 Test if a character is a digit. Works for all characters between
652 -128 and 255 inclusive both.
654 INPUTS
655 c - The character to test.
657 RESULT
658 != 0 if the character is a digit, 0 otherwise.
660 NOTES
662 EXAMPLE
663 isdigit ('A') -> false
664 isdigit ('a') -> false
665 isdigit ('0') -> true
666 isdigit ('.') -> false
667 isdigit ('\n') -> false
668 isdigit ('\001') -> false
669 isdigit (EOF) -> false
671 BUGS
673 SEE ALSO
675 INTERNALS
677 ******************************************************************************/
678 /*****************************************************************************
680 NAME
681 #include <ctype.h>
683 int isgraph (
685 SYNOPSIS
686 int c)
688 FUNCTION
689 Test if a character is a printable character but no whitespace.
690 Works for all characters between -128 and 255 inclusive both.
692 INPUTS
693 c - The character to test.
695 RESULT
696 != 0 if the character is a printable character but no whitespace, 0
697 otherwise.
699 NOTES
701 EXAMPLE
702 isgraph ('A') -> true
703 isgraph ('a') -> true
704 isgraph ('0') -> true
705 isgraph ('.') -> true
706 isgraph ('\n') -> false
707 isgraph ('\001') -> false
708 isgraph (EOF) -> false
710 BUGS
712 SEE ALSO
714 INTERNALS
716 ******************************************************************************/
717 /*****************************************************************************
719 NAME
720 #include <ctype.h>
722 int isprint (
724 SYNOPSIS
725 int c)
727 FUNCTION
728 Test if a character is a printable character. Works for all
729 characters between -128 and 255 inclusive both.
731 INPUTS
732 c - The character to test.
734 RESULT
735 != 0 if the character is a printable character, 0 otherwise.
737 NOTES
739 EXAMPLE
740 isprint ('A') -> true
741 isprint ('a') -> true
742 isprint ('0') -> true
743 isprint ('.') -> true
744 isprint ('\n') -> true
745 isprint ('\001') -> false
746 isprint (EOF) -> false
748 BUGS
750 SEE ALSO
752 INTERNALS
754 ******************************************************************************/
755 /*****************************************************************************
757 NAME
758 #include <ctype.h>
760 int isspace (
762 SYNOPSIS
763 int c)
765 FUNCTION
766 Test if a character is whitespace. Works for all characters between
767 -128 and 255 inclusive both.
769 INPUTS
770 c - The character to test.
772 RESULT
773 != 0 if the character is whitespace, 0 otherwise.
775 NOTES
777 EXAMPLE
778 isspace ('A') -> false
779 isspace ('a') -> false
780 isspace ('0') -> false
781 isspace ('.') -> false
782 isspace ('\n') -> true
783 isspace ('\001') -> false
784 isspace (EOF) -> false
786 BUGS
788 SEE ALSO
790 INTERNALS
792 ******************************************************************************/
793 /*****************************************************************************
795 NAME
796 #include <ctype.h>
798 int ispunct (
800 SYNOPSIS
801 int c)
803 FUNCTION
804 Test if a character is printable but not alphanumeric. Works for
805 all characters between -128 and 255 inclusive both.
807 INPUTS
808 c - The character to test.
810 RESULT
811 != 0 if the character is printable but not alphanumeric, 0
812 otherwise.
814 NOTES
816 EXAMPLE
817 ispunct ('A') -> false
818 ispunct ('a') -> false
819 ispunct ('0') -> false
820 ispunct ('.') -> true
821 ispunct ('\n') -> false
822 ispunct ('\001') -> false
823 ispunct (EOF) -> false
825 BUGS
827 SEE ALSO
829 INTERNALS
831 ******************************************************************************/
832 /*****************************************************************************
834 NAME
835 #include <ctype.h>
837 int isxdigit (
839 SYNOPSIS
840 int c)
842 FUNCTION
843 Test if a character is a hexadecimal digit. Works for all
844 characters between -128 and 255 inclusive both.
846 INPUTS
847 c - The character to test.
849 RESULT
850 != 0 if the character is a hexadecimal digit, 0 otherwise.
852 NOTES
854 EXAMPLE
855 isxdigit ('A') -> true
856 isxdigit ('a') -> true
857 isxdigit ('x') -> false
858 isxdigit ('0') -> true
859 isxdigit ('.') -> false
860 isxdigit ('\n') -> false
861 isxdigit ('\001') -> false
862 isxdigit (EOF) -> false
864 BUGS
866 SEE ALSO
868 INTERNALS
870 ******************************************************************************/