xctype.c (913B)
1 #include <limits.h> 2 #include <stdio.h> 3 4 #include "ctype.h" 5 6 #if EOF != -1 || UCHAR_MAX != 255 7 #error WRONG CTYPE TABLE 8 #endif 9 10 #define XDI (_DI|_XD) 11 #define XLO (_LO|_XD) 12 #define XUP (_UP|_XD) 13 14 static const short ctyp_tab[257] = {0, 15 _BB, _BB, _BB, _BB, _BB, _BB, _BB, _BB, 16 _BB, _CN, _CN, _CN, _CN, _CN, _BB, _BB, 17 _BB, _BB, _BB, _BB, _BB, _BB, _BB, _BB, 18 _BB, _BB, _BB, _BB, _BB, _BB, _BB, _BB, 19 _SP, _PU, _PU, _PU, _PU, _PU, _PU, _PU, 20 _PU, _PU, _PU, _PU, _PU, _PU, _PU, _PU, 21 XDI, XDI, XDI, XDI, XDI, XDI, XDI, XDI, 22 XDI, XDI, _PU, _PU, _PU, _PU, _PU, _PU, 23 _PU, XUP, XUP, XUP, XUP, XUP, XUP, XUP, 24 _UP, _UP, _UP, _UP, _UP, _UP, _UP, _UP, 25 _UP, _UP, _UP, _UP, _UP, _UP, _UP, _UP, 26 _UP, _UP, _UP, _PU, _PU, _PU, _PU, _PU, 27 _PU, XLO, XLO, XLO, XLO, XLO, XLO, _LO, 28 _LO, _LO, _LO, _LO, _LO, _LO, _LO, _LO, 29 _LO, _LO, _LO, _LO, _LO, _LO, _LO, _LO, 30 _LO, _LO, _LO, _PU, _PU, _PU, _PU, _BB, 31 }; 32 33 const short *_Ctype = &ctyp_tab[1];