This source file includes following definitions.
- wctype
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 wctype_t
19 wctype (const char* name)
20 {
21 switch (name[0])
22 {
23 case 'a':
24 switch (name[1])
25 {
26 case 'l':
27 switch (name[2])
28 {
29 case 'n':
30 if (strcmp (name + 3, "um") == 0)
31 return (wctype_t) iswalnum;
32 break;
33 case 'p':
34 if (strcmp (name + 3, "ha") == 0)
35 return (wctype_t) iswalpha;
36 break;
37 default:
38 break;
39 }
40 break;
41 default:
42 break;
43 }
44 break;
45 case 'b':
46 if (strcmp (name + 1, "lank") == 0)
47 return (wctype_t) iswblank;
48 break;
49 case 'c':
50 if (strcmp (name + 1, "ntrl") == 0)
51 return (wctype_t) iswcntrl;
52 break;
53 case 'd':
54 if (strcmp (name + 1, "igit") == 0)
55 return (wctype_t) iswdigit;
56 break;
57 case 'g':
58 if (strcmp (name + 1, "raph") == 0)
59 return (wctype_t) iswgraph;
60 break;
61 case 'l':
62 if (strcmp (name + 1, "ower") == 0)
63 return (wctype_t) iswlower;
64 break;
65 case 'p':
66 switch (name[1])
67 {
68 case 'r':
69 if (strcmp (name + 2, "int") == 0)
70 return (wctype_t) iswprint;
71 break;
72 case 'u':
73 if (strcmp (name + 2, "nct") == 0)
74 return (wctype_t) iswpunct;
75 break;
76 default:
77 break;
78 }
79 break;
80 case 's':
81 if (strcmp (name + 1, "pace") == 0)
82 return (wctype_t) iswspace;
83 break;
84 case 'u':
85 if (strcmp (name + 1, "pper") == 0)
86 return (wctype_t) iswupper;
87 break;
88 case 'x':
89 if (strcmp (name + 1, "digit") == 0)
90 return (wctype_t) iswxdigit;
91 break;
92 default:
93 break;
94 }
95 return NULL;
96 }