3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
12 #include "_PDCLIB_locale.h"
13 #include "_PDCLIB_clocale.h"
16 tss_t _PDCLIB_locale_tss;
18 /* "C" locale - defaulting to ASCII-7.
19 1 kByte (+ 4 byte) of <ctype.h> data.
20 Each line: flags, lowercase, uppercase, collation.
22 static const _PDCLIB_ctype_t global_ctype[] = {
23 { /* EOF */ 0, 0, 0, 0 },
24 { /* NUL */ _PDCLIB_CTYPE_CNTRL, 0x00, 0x00, 0x00 },
25 { /* SOH */ _PDCLIB_CTYPE_CNTRL, 0x01, 0x01, 0x01 },
26 { /* STX */ _PDCLIB_CTYPE_CNTRL, 0x02, 0x02, 0x02 },
27 { /* ETX */ _PDCLIB_CTYPE_CNTRL, 0x03, 0x03, 0x03 },
28 { /* EOT */ _PDCLIB_CTYPE_CNTRL, 0x04, 0x04, 0x04 },
29 { /* ENQ */ _PDCLIB_CTYPE_CNTRL, 0x05, 0x05, 0x05 },
30 { /* ACK */ _PDCLIB_CTYPE_CNTRL, 0x06, 0x06, 0x06 },
31 { /* BEL */ _PDCLIB_CTYPE_CNTRL, 0x07, 0x07, 0x07 },
32 { /* BS */ _PDCLIB_CTYPE_CNTRL, 0x08, 0x08, 0x08 },
33 { /* HT */ _PDCLIB_CTYPE_CNTRL | _PDCLIB_CTYPE_BLANK | _PDCLIB_CTYPE_SPACE, 0x09, 0x09, 0x09 },
34 { /* LF */ _PDCLIB_CTYPE_CNTRL | _PDCLIB_CTYPE_SPACE, 0x0A, 0x0A, 0x0A },
35 { /* VT */ _PDCLIB_CTYPE_CNTRL | _PDCLIB_CTYPE_SPACE, 0x0B, 0x0B, 0x0B },
36 { /* FF */ _PDCLIB_CTYPE_CNTRL | _PDCLIB_CTYPE_SPACE, 0x0C, 0x0C, 0x0C },
37 { /* CR */ _PDCLIB_CTYPE_CNTRL | _PDCLIB_CTYPE_SPACE, 0x0D, 0x0D, 0x0D },
38 { /* SO */ _PDCLIB_CTYPE_CNTRL, 0x0E, 0x0E, 0x0E },
39 { /* SI */ _PDCLIB_CTYPE_CNTRL, 0x0F, 0x0F, 0x0F },
40 { /* DLE */ _PDCLIB_CTYPE_CNTRL, 0x10, 0x10, 0x10 },
41 { /* DC1 */ _PDCLIB_CTYPE_CNTRL, 0x11, 0x11, 0x11 },
42 { /* DC2 */ _PDCLIB_CTYPE_CNTRL, 0x12, 0x12, 0x12 },
43 { /* DC3 */ _PDCLIB_CTYPE_CNTRL, 0x13, 0x13, 0x13 },
44 { /* DC4 */ _PDCLIB_CTYPE_CNTRL, 0x14, 0x14, 0x14 },
45 { /* NAK */ _PDCLIB_CTYPE_CNTRL, 0x15, 0x15, 0x15 },
46 { /* SYN */ _PDCLIB_CTYPE_CNTRL, 0x16, 0x16, 0x16 },
47 { /* ETB */ _PDCLIB_CTYPE_CNTRL, 0x17, 0x17, 0x17 },
48 { /* CAN */ _PDCLIB_CTYPE_CNTRL, 0x18, 0x18, 0x18 },
49 { /* EM */ _PDCLIB_CTYPE_CNTRL, 0x19, 0x19, 0x19 },
50 { /* SUB */ _PDCLIB_CTYPE_CNTRL, 0x1A, 0x1A, 0x1A },
51 { /* ESC */ _PDCLIB_CTYPE_CNTRL, 0x1B, 0x1B, 0x1B },
52 { /* FS */ _PDCLIB_CTYPE_CNTRL, 0x1C, 0x1C, 0x1C },
53 { /* GS */ _PDCLIB_CTYPE_CNTRL, 0x1D, 0x1D, 0x1D },
54 { /* RS */ _PDCLIB_CTYPE_CNTRL, 0x1E, 0x1E, 0x1E },
55 { /* US */ _PDCLIB_CTYPE_CNTRL, 0x1F, 0x1F, 0x1F },
56 { /* SP */ _PDCLIB_CTYPE_BLANK | _PDCLIB_CTYPE_SPACE, 0x20, 0x20, 0x20 },
57 { /* '!' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x21, 0x21, 0x21 },
58 { /* '"' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x22, 0x22, 0x22 },
59 { /* '#' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x23, 0x23, 0x23 },
60 { /* '$' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x24, 0x24, 0x24 },
61 { /* '%' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x25, 0x25, 0x25 },
62 { /* '&' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x26, 0x26, 0x26 },
63 { /* ''' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x27, 0x27, 0x27 },
64 { /* '(' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x28, 0x28, 0x28 },
65 { /* ')' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x29, 0x29, 0x29 },
66 { /* '*' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x2A, 0x2A, 0x2A },
67 { /* '+' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x2B, 0x2B, 0x2B },
68 { /* ',' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x2C, 0x2C, 0x2C },
69 { /* '-' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x2D, 0x2D, 0x2D },
70 { /* '.' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x2E, 0x2E, 0x2E },
71 { /* '/' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x2F, 0x2F, 0x2F },
72 { /* '0' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x30, 0x30, 0x30 },
73 { /* '1' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x31, 0x31, 0x31 },
74 { /* '2' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x32, 0x32, 0x32 },
75 { /* '3' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x33, 0x33, 0x33 },
76 { /* '4' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x34, 0x34, 0x34 },
77 { /* '5' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x35, 0x35, 0x35 },
78 { /* '6' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x36, 0x36, 0x36 },
79 { /* '7' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x37, 0x37, 0x37 },
80 { /* '8' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x38, 0x38, 0x38 },
81 { /* '9' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_DIGIT | _PDCLIB_CTYPE_XDIGT, 0x39, 0x39, 0x39 },
82 { /* ':' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x3A, 0x3A, 0x3A },
83 { /* ';' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x3B, 0x3B, 0x3B },
84 { /* '<' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x3C, 0x3C, 0x3C },
85 { /* '=' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x3D, 0x3D, 0x3D },
86 { /* '>' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x3E, 0x3E, 0x3E },
87 { /* '?' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x3F, 0x3F, 0x3F },
88 { /* '@' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x40, 0x40, 0x40 },
89 { /* 'A' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER | _PDCLIB_CTYPE_XDIGT, 0x41, 0x61, 0x41 },
90 { /* 'B' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER | _PDCLIB_CTYPE_XDIGT, 0x42, 0x62, 0x42 },
91 { /* 'C' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER | _PDCLIB_CTYPE_XDIGT, 0x43, 0x63, 0x43 },
92 { /* 'D' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER | _PDCLIB_CTYPE_XDIGT, 0x44, 0x64, 0x44 },
93 { /* 'E' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER | _PDCLIB_CTYPE_XDIGT, 0x45, 0x65, 0x45 },
94 { /* 'F' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER | _PDCLIB_CTYPE_XDIGT, 0x46, 0x66, 0x46 },
95 { /* 'G' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x47, 0x67, 0x47 },
96 { /* 'H' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x48, 0x68, 0x48 },
97 { /* 'I' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x49, 0x69, 0x49 },
98 { /* 'J' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x4A, 0x6A, 0x4A },
99 { /* 'K' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x4B, 0x6B, 0x4B },
100 { /* 'L' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x4C, 0x6C, 0x4C },
101 { /* 'M' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x4D, 0x6D, 0x4D },
102 { /* 'N' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x4E, 0x6E, 0x4E },
103 { /* 'O' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x4F, 0x6F, 0x4F },
104 { /* 'P' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x50, 0x70, 0x50 },
105 { /* 'Q' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x51, 0x71, 0x51 },
106 { /* 'R' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x52, 0x72, 0x52 },
107 { /* 'S' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x53, 0x73, 0x53 },
108 { /* 'T' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x54, 0x74, 0x54 },
109 { /* 'U' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x55, 0x75, 0x55 },
110 { /* 'V' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x56, 0x76, 0x56 },
111 { /* 'W' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x57, 0x77, 0x57 },
112 { /* 'X' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x58, 0x78, 0x58 },
113 { /* 'Y' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x59, 0x79, 0x59 },
114 { /* 'Z' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_UPPER, 0x5A, 0x7A, 0x5A },
115 { /* '[' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x5B, 0x5B, 0x5B },
116 { /* '\' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x5C, 0x5C, 0x5C },
117 { /* ']' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x5D, 0x5D, 0x5D },
118 { /* '^' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x5E, 0x5E, 0x5E },
119 { /* '_' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x5F, 0x5F, 0x5F },
120 { /* '`' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x60, 0x60, 0x60 },
121 { /* 'a' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER | _PDCLIB_CTYPE_XDIGT, 0x41, 0x61, 0x61 },
122 { /* 'b' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER | _PDCLIB_CTYPE_XDIGT, 0x42, 0x62, 0x62 },
123 { /* 'c' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER | _PDCLIB_CTYPE_XDIGT, 0x43, 0x63, 0x63 },
124 { /* 'd' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER | _PDCLIB_CTYPE_XDIGT, 0x44, 0x64, 0x64 },
125 { /* 'e' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER | _PDCLIB_CTYPE_XDIGT, 0x45, 0x65, 0x65 },
126 { /* 'f' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER | _PDCLIB_CTYPE_XDIGT, 0x46, 0x66, 0x66 },
127 { /* 'g' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x47, 0x67, 0x67 },
128 { /* 'h' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x48, 0x68, 0x68 },
129 { /* 'i' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x49, 0x69, 0x69 },
130 { /* 'j' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x4A, 0x6A, 0x6A },
131 { /* 'k' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x4B, 0x6B, 0x6B },
132 { /* 'l' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x4C, 0x6C, 0x6C },
133 { /* 'm' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x4D, 0x6D, 0x6D },
134 { /* 'n' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x4E, 0x6E, 0x6E },
135 { /* 'o' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x4F, 0x6F, 0x6F },
136 { /* 'p' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x50, 0x70, 0x70 },
137 { /* 'q' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x51, 0x71, 0x71 },
138 { /* 'r' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x52, 0x72, 0x72 },
139 { /* 's' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x53, 0x73, 0x73 },
140 { /* 't' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x54, 0x74, 0x74 },
141 { /* 'u' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x55, 0x75, 0x75 },
142 { /* 'v' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x56, 0x76, 0x76 },
143 { /* 'w' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x57, 0x77, 0x77 },
144 { /* 'x' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x58, 0x78, 0x78 },
145 { /* 'y' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x59, 0x79, 0x79 },
146 { /* 'z' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_ALPHA | _PDCLIB_CTYPE_LOWER, 0x5A, 0x7A, 0x7A },
147 { /* '{' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x7B, 0x7B, 0x7B },
148 { /* '|' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x7C, 0x7C, 0x7C },
149 { /* '}' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x7D, 0x7D, 0x7D },
150 { /* '~' */ _PDCLIB_CTYPE_GRAPH | _PDCLIB_CTYPE_PUNCT, 0x7E, 0x7E, 0x7E },
151 { /* DEL */ _PDCLIB_CTYPE_CNTRL, 0x7F, 0x7F, 0x7F },
152 { 0x00, 0x80, 0x80, 0x80 },
153 { 0x00, 0x81, 0x81, 0x81 },
154 { 0x00, 0x82, 0x82, 0x82 },
155 { 0x00, 0x83, 0x83, 0x83 },
156 { 0x00, 0x84, 0x84, 0x84 },
157 { 0x00, 0x85, 0x85, 0x85 },
158 { 0x00, 0x86, 0x86, 0x86 },
159 { 0x00, 0x87, 0x87, 0x87 },
160 { 0x00, 0x88, 0x88, 0x88 },
161 { 0x00, 0x89, 0x89, 0x89 },
162 { 0x00, 0x8A, 0x8A, 0x8A },
163 { 0x00, 0x8B, 0x8B, 0x8B },
164 { 0x00, 0x8C, 0x8C, 0x8C },
165 { 0x00, 0x8D, 0x8D, 0x8D },
166 { 0x00, 0x8E, 0x8E, 0x8E },
167 { 0x00, 0x8F, 0x8F, 0x8F },
168 { 0x00, 0x90, 0x90, 0x90 },
169 { 0x00, 0x91, 0x91, 0x91 },
170 { 0x00, 0x92, 0x92, 0x92 },
171 { 0x00, 0x93, 0x93, 0x93 },
172 { 0x00, 0x94, 0x94, 0x94 },
173 { 0x00, 0x95, 0x95, 0x95 },
174 { 0x00, 0x96, 0x96, 0x96 },
175 { 0x00, 0x97, 0x97, 0x97 },
176 { 0x00, 0x98, 0x98, 0x98 },
177 { 0x00, 0x99, 0x99, 0x99 },
178 { 0x00, 0x9A, 0x9A, 0x9A },
179 { 0x00, 0x9B, 0x9B, 0x9B },
180 { 0x00, 0x9C, 0x9C, 0x9C },
181 { 0x00, 0x9D, 0x9D, 0x9D },
182 { 0x00, 0x9E, 0x9E, 0x9E },
183 { 0x00, 0x9F, 0x9F, 0x9F },
184 { 0x00, 0xA0, 0xA0, 0xA0 },
185 { 0x00, 0xA1, 0xA1, 0xA1 },
186 { 0x00, 0xA2, 0xA2, 0xA2 },
187 { 0x00, 0xA3, 0xA3, 0xA3 },
188 { 0x00, 0xA4, 0xA4, 0xA4 },
189 { 0x00, 0xA5, 0xA5, 0xA5 },
190 { 0x00, 0xA6, 0xA6, 0xA6 },
191 { 0x00, 0xA7, 0xA7, 0xA7 },
192 { 0x00, 0xA8, 0xA8, 0xA8 },
193 { 0x00, 0xA9, 0xA9, 0xA9 },
194 { 0x00, 0xAA, 0xAA, 0xAA },
195 { 0x00, 0xAB, 0xAB, 0xAB },
196 { 0x00, 0xAC, 0xAC, 0xAC },
197 { 0x00, 0xAD, 0xAD, 0xAD },
198 { 0x00, 0xAE, 0xAE, 0xAE },
199 { 0x00, 0xAF, 0xAF, 0xAF },
200 { 0x00, 0xB0, 0xB0, 0xB0 },
201 { 0x00, 0xB1, 0xB1, 0xB1 },
202 { 0x00, 0xB2, 0xB2, 0xB2 },
203 { 0x00, 0xB3, 0xB3, 0xB3 },
204 { 0x00, 0xB4, 0xB4, 0xB4 },
205 { 0x00, 0xB5, 0xB5, 0xB5 },
206 { 0x00, 0xB6, 0xB6, 0xB6 },
207 { 0x00, 0xB7, 0xB7, 0xB7 },
208 { 0x00, 0xB8, 0xB8, 0xB8 },
209 { 0x00, 0xB9, 0xB9, 0xB9 },
210 { 0x00, 0xBA, 0xBA, 0xBA },
211 { 0x00, 0xBB, 0xBB, 0xBB },
212 { 0x00, 0xBC, 0xBC, 0xBC },
213 { 0x00, 0xBD, 0xBD, 0xBD },
214 { 0x00, 0xBE, 0xBE, 0xBE },
215 { 0x00, 0xBF, 0xBF, 0xBF },
216 { 0x00, 0xC0, 0xC0, 0xC0 },
217 { 0x00, 0xC1, 0xC1, 0xC1 },
218 { 0x00, 0xC2, 0xC2, 0xC2 },
219 { 0x00, 0xC3, 0xC3, 0xC3 },
220 { 0x00, 0xC4, 0xC4, 0xC4 },
221 { 0x00, 0xC5, 0xC5, 0xC5 },
222 { 0x00, 0xC6, 0xC6, 0xC6 },
223 { 0x00, 0xC7, 0xC7, 0xC7 },
224 { 0x00, 0xC8, 0xC8, 0xC8 },
225 { 0x00, 0xC9, 0xC9, 0xC9 },
226 { 0x00, 0xCA, 0xCA, 0xCA },
227 { 0x00, 0xCB, 0xCB, 0xCB },
228 { 0x00, 0xCC, 0xCC, 0xCC },
229 { 0x00, 0xCD, 0xCD, 0xCD },
230 { 0x00, 0xCE, 0xCE, 0xCE },
231 { 0x00, 0xCF, 0xCF, 0xCF },
232 { 0x00, 0xD0, 0xD0, 0xD0 },
233 { 0x00, 0xD1, 0xD1, 0xD1 },
234 { 0x00, 0xD2, 0xD2, 0xD2 },
235 { 0x00, 0xD3, 0xD3, 0xD3 },
236 { 0x00, 0xD4, 0xD4, 0xD4 },
237 { 0x00, 0xD5, 0xD5, 0xD5 },
238 { 0x00, 0xD6, 0xD6, 0xD6 },
239 { 0x00, 0xD7, 0xD7, 0xD7 },
240 { 0x00, 0xD8, 0xD8, 0xD8 },
241 { 0x00, 0xD9, 0xD9, 0xD9 },
242 { 0x00, 0xDA, 0xDA, 0xDA },
243 { 0x00, 0xDB, 0xDB, 0xDB },
244 { 0x00, 0xDC, 0xDC, 0xDC },
245 { 0x00, 0xDD, 0xDD, 0xDD },
246 { 0x00, 0xDE, 0xDE, 0xDE },
247 { 0x00, 0xDF, 0xDF, 0xDF },
248 { 0x00, 0xE0, 0xE0, 0xE0 },
249 { 0x00, 0xE1, 0xE1, 0xE1 },
250 { 0x00, 0xE2, 0xE2, 0xE2 },
251 { 0x00, 0xE3, 0xE3, 0xE3 },
252 { 0x00, 0xE4, 0xE4, 0xE4 },
253 { 0x00, 0xE5, 0xE5, 0xE5 },
254 { 0x00, 0xE6, 0xE6, 0xE6 },
255 { 0x00, 0xE7, 0xE7, 0xE7 },
256 { 0x00, 0xE8, 0xE8, 0xE8 },
257 { 0x00, 0xE9, 0xE9, 0xE9 },
258 { 0x00, 0xEA, 0xEA, 0xEA },
259 { 0x00, 0xEB, 0xEB, 0xEB },
260 { 0x00, 0xEC, 0xEC, 0xEC },
261 { 0x00, 0xED, 0xED, 0xED },
262 { 0x00, 0xEE, 0xEE, 0xEE },
263 { 0x00, 0xEF, 0xEF, 0xEF },
264 { 0x00, 0xF0, 0xF0, 0xF0 },
265 { 0x00, 0xF1, 0xF1, 0xF1 },
266 { 0x00, 0xF2, 0xF2, 0xF2 },
267 { 0x00, 0xF3, 0xF3, 0xF3 },
268 { 0x00, 0xF4, 0xF4, 0xF4 },
269 { 0x00, 0xF5, 0xF5, 0xF5 },
270 { 0x00, 0xF6, 0xF6, 0xF6 },
271 { 0x00, 0xF7, 0xF7, 0xF7 },
272 { 0x00, 0xF8, 0xF8, 0xF8 },
273 { 0x00, 0xF9, 0xF9, 0xF9 },
274 { 0x00, 0xFA, 0xFA, 0xFA },
275 { 0x00, 0xFB, 0xFB, 0xFB },
276 { 0x00, 0xFC, 0xFC, 0xFC },
277 { 0x00, 0xFD, 0xFD, 0xFD },
278 { 0x00, 0xFE, 0xFE, 0xFE },
279 { 0x00, 0xFF, 0xFF, 0xFF }
282 extern const struct _PDCLIB_charcodec_t _PDCLIB_ascii_codec;
283 struct _PDCLIB_locale _PDCLIB_global_locale = {
284 ._Codec = &_PDCLIB_ascii_codec,
286 /* decimal_point */ (char *)".",
287 /* thousands_sep */ (char *)"",
288 /* grouping */ (char *)"",
289 /* mon_decimal_point */ (char *)"",
290 /* mon_thousands_sep */ (char *)"",
291 /* mon_grouping */ (char *)"",
292 /* positive_sign */ (char *)"",
293 /* negative_sign */ (char *)"",
294 /* currency_symbol */ (char *)"",
295 /* int_curr_symbol */ (char *)"",
296 /* frac_digits */ CHAR_MAX,
297 /* p_cs_precedes */ CHAR_MAX,
298 /* n_cs_precedes */ CHAR_MAX,
299 /* p_sep_by_space */ CHAR_MAX,
300 /* n_sep_by_space */ CHAR_MAX,
301 /* p_sign_posn */ CHAR_MAX,
302 /* n_sign_posn */ CHAR_MAX,
303 /* int_frac_digits */ CHAR_MAX,
304 /* int_p_cs_precedes */ CHAR_MAX,
305 /* int_n_cs_precedes */ CHAR_MAX,
306 /* int_p_sep_by_space */ CHAR_MAX,
307 /* int_n_sep_by_space */ CHAR_MAX,
308 /* int_p_sign_posn */ CHAR_MAX,
309 /* int_n_sign_posn */ CHAR_MAX,
311 ._CType = &global_ctype[1],
314 "ERANGE (result out of range)",
315 "EDOM (argument out of domain)",
316 "EILSEQ (illegal byte sequence)",
317 "E2BIG (argument list too long)",
318 "ECONNRESET (connection reset)",
319 "EISCONN (already connected)",
320 "ENOENT (no such file or directory)",
321 "ENOTRECOVERABLE (state not recoverable)",
322 "EROFS (read only file system)",
323 "EACCES (permission denied)",
324 "EDEADLK (resource deadlock would occur)",
325 "EISDIR (is a directory)",
326 "ENOEXEC (executable format error)",
327 "ENOTSOCK (not a socket)",
328 "ESPIPE (invalid seek)",
329 "EADDRINUSE (address in use)",
330 "EDESTADDRREQ (destination address required)",
331 "ELOOP (too many symbolic link levels)",
332 "ENOLCK (no lock available)",
333 "ENOTSUP (not supported)",
334 "ESRCH (no such process)",
335 "EADDRNOTAVAIL (address not available)",
336 "EMFILE (too many files open)",
338 "ENOTTY (inappropriate io control operation)",
339 "ETIME (stream timeout)",
340 "EAFNOSUPPORT (address family not supported)",
341 "EEXIST (file exists)",
342 "EMLINK (too many links)",
343 "ENOMEM (not enough memory)",
344 "ENXIO (no such device or address)",
345 "ETIMEDOUT (timed out)",
346 "EAGAIN (resource unavailable try again)",
347 "EFAULT (bad address)",
348 "EMSGSIZE (message size)",
349 "ENOMSG (no message)",
350 "EOPNOTSUPP (operation not supported)",
351 "ETXTBSY (text file busy)",
352 "EALREADY (connection already in progress)",
353 "EFBIG (file too large)",
354 "ENAMETOOLONG (filename too long)",
355 "ENOPROTOOPT (no protocol option)",
356 "EOVERFLOW (value too large)",
357 "EBADF (bad file descriptor)",
358 "EHOSTUNREACH (host unreachable)",
359 "ENETDOWN (network down)",
360 "ENOSPC (no space on device)",
361 "EOWNERDEAD (owner dead)",
362 "EXDEV (cross device link)",
363 "EBADMSG (bad message)",
364 "EIDRM (identifier removed)",
365 "ENETRESET (network reset)",
366 "ENOSR (no stream resources)",
367 "EPERM (operation not permitted)",
368 "EBUSY (device or resource busy)",
369 "ENETUNREACH (network unreachable)",
370 "ENOSTR (not a stream)",
371 "EPIPE (broken pipe)",
372 "ECANCELED (operation canceled)",
373 "EINPROGRESS (operation in progress)",
374 "ENFILE (too many files open in system)",
375 "ENOSYS (function not supported)",
376 "EPROTO (protocol error)",
377 "ECHILD (no child process)",
378 "EINTR (interrupted)",
379 "ENOBUFS (no buffer space)",
380 "ENOTCONN (not connected)",
381 "EPROTONOSUPPORT (protocol not supported)",
382 "ECONNABORTED (connection aborted)",
383 "EINVAL (invalid argument)",
384 "ENODATA (no message available)",
385 "ENOTDIR (not a directory)",
386 "EPROTOTYPE (wrong protocol type)",
388 "ECONNREFUSED (connection refused)",
389 "ENODEV (no such device)",
390 "ENOTEMPTY (directory not empty)",
397 #include "_PDCLIB_test.h"
401 /* Testing covered by several other testdrivers using stdin / stdout /