]> git.saurik.com Git - apple/libc.git/blob - internat/NXCType.c
Libc-320.1.3.tar.gz
[apple/libc.git] / internat / NXCType.c
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 #pragma CC_NO_MACH_TEXT_SECTIONS
24 /*
25 * Copyright 1990, NeXT, Inc.
26 */
27
28 /*
29 * This file contains global data and the size of the global data can NOT
30 * change or otherwise it would make the shared library incompatable. This
31 * file has NOT been padded to allow more data to be added to it because the
32 * sizeof(char) is not expected to change.
33 */
34
35 #include "NXCType.h"
36
37 const unsigned int _NX_CTypeTable_[1 + 256] = {
38
39 /* One extra char in table: */ 0,
40 /* 0 .notdef */ _C,
41 /* 1 .notdef */ _C,
42 /* 2 .notdef */ _C,
43 /* 3 .notdef */ _C,
44 /* 4 .notdef */ _C,
45 /* 5 .notdef */ _C,
46 /* 6 .notdef */ _C,
47 /* 7 .notdef */ _C,
48
49 /* 8 .notdef */ _C,
50 /* 9 .notdef */ _C|_S,
51 /* 10 .notdef */ _C|_S,
52 /* 11 .notdef */ _C|_S,
53 /* 12 .notdef */ _C|_S,
54 /* 13 .notdef */ _C|_S,
55 /* 14 .notdef */ _C,
56 /* 15 .notdef */ _C,
57
58 /* 16 .notdef */ _C,
59 /* 17 .notdef */ _C,
60 /* 18 .notdef */ _C,
61 /* 19 .notdef */ _C,
62 /* 20 .notdef */ _C,
63 /* 21 .notdef */ _C,
64 /* 22 .notdef */ _C,
65 /* 23 .notdef */ _C,
66
67 /* 24 .notdef */ _C,
68 /* 25 .notdef */ _C,
69 /* 26 .notdef */ _C,
70 /* 27 .notdef */ _C,
71 /* 28 .notdef */ _C,
72 /* 29 .notdef */ _C,
73 /* 30 .notdef */ _C,
74 /* 31 .notdef */ _C,
75
76 /* 32 space */ _S|_B,
77 /* 33 exclam */ _P,
78 /* 34 quotedbl */ _P,
79 /* 35 numbersign */ _P,
80 /* 36 dollar */ _P,
81 /* 37 percent */ _P,
82 /* 38 ampersand */ _P,
83 /* 39 quoteright */ _P,
84
85 /* 40 parenleft */ _P,
86 /* 41 parenright */ _P,
87 /* 42 asterisk */ _P,
88 /* 43 plus */ _P,
89 /* 44 comma */ _P,
90 /* 45 hyphen */ _P,
91 /* 46 period */ _P,
92 /* 47 slash */ _P,
93
94 /* 48 zero */ _D,
95 /* 49 one */ _D,
96 /* 50 two */ _D,
97 /* 51 three */ _D,
98 /* 52 four */ _D,
99 /* 53 five */ _D,
100 /* 54 six */ _D,
101 /* 55 seven */ _D,
102
103 /* 56 eight */ _D,
104 /* 57 nine */ _D,
105 /* 58 colon */ _P,
106 /* 59 semicolon */ _P,
107 /* 60 less */ _P,
108 /* 61 equal */ _P,
109 /* 62 greater */ _P,
110 /* 63 question */ _P,
111
112 /* 64 at */ _P,
113 /* 65 A */ _U|_X,
114 /* 66 B */ _U|_X,
115 /* 67 C */ _U|_X,
116 /* 68 D */ _U|_X,
117 /* 69 E */ _U|_X,
118 /* 70 F */ _U|_X,
119 /* 71 G */ _U,
120
121 /* 72 H */ _U,
122 /* 73 I */ _U,
123 /* 74 J */ _U,
124 /* 75 K */ _U,
125 /* 76 L */ _U,
126 /* 77 M */ _U,
127 /* 78 N */ _U,
128 /* 79 O */ _U,
129
130 /* 80 P */ _U,
131 /* 81 Q */ _U,
132 /* 82 R */ _U,
133 /* 83 S */ _U,
134 /* 84 T */ _U,
135 /* 85 U */ _U,
136 /* 86 V */ _U,
137 /* 87 W */ _U,
138
139 /* 88 X */ _U,
140 /* 89 Y */ _U,
141 /* 90 Z */ _U,
142 /* 91 bracketleft */ _P,
143 /* 92 backslash */ _P,
144 /* 93 bracketright */ _P,
145 /* 94 asciicircum */ _P,
146 /* 95 underscore */ _P,
147
148 /* 96 quoteleft */ _P,
149 /* 97 a */ _L|_X,
150 /* 98 b */ _L|_X,
151 /* 99 c */ _L|_X,
152 /* 100 d */ _L|_X,
153 /* 101 e */ _L|_X,
154 /* 102 f */ _L|_X,
155 /* 103 g */ _L,
156
157 /* 104 h */ _L,
158 /* 105 i */ _L,
159 /* 106 j */ _L,
160 /* 107 k */ _L,
161 /* 108 l */ _L,
162 /* 109 m */ _L,
163 /* 110 n */ _L,
164 /* 111 o */ _L,
165
166 /* 112 p */ _L,
167 /* 113 q */ _L,
168 /* 114 r */ _L,
169 /* 115 s */ _L,
170 /* 116 t */ _L,
171 /* 117 u */ _L,
172 /* 118 v */ _L,
173 /* 119 w */ _L,
174
175 /* 120 x */ _L,
176 /* 121 y */ _L,
177 /* 122 z */ _L,
178 /* 123 braceleft */ _P,
179 /* 124 bar */ _P,
180 /* 125 braceright */ _P,
181 /* 126 asciitilde */ _P,
182 /* 127 .notdef */ _C,
183
184 /* 128 .notdef */ _C,
185 /* 129 Agrave */ _U,
186 /* 130 Aacute */ _U,
187 /* 131 Acircumflex */ _U,
188 /* 132 Atilde */ _U,
189 /* 133 Adieresis */ _U,
190 /* 134 Aring */ _U,
191 /* 135 Ccedilla */ _U,
192
193 /* 136 Egrave */ _U,
194 /* 137 Eacute */ _U,
195 /* 138 Ecircumflex */ _U,
196 /* 139 Edieresis */ _U,
197 /* 140 Igrave */ _U,
198 /* 141 Iacute */ _U,
199 /* 142 Icircumflex */ _U,
200 /* 143 Idieresis */ _U,
201
202 /* 144 Eth */ _U,
203 /* 145 Ntilde */ _U,
204 /* 146 Ograve */ _U,
205 /* 147 Oacute */ _U,
206 /* 148 Ocircumflex */ _U,
207 /* 149 Otilde */ _U,
208 /* 150 Odieresis */ _U,
209 /* 151 Ugrave */ _U,
210
211 /* 152 Uacute */ _U,
212 /* 153 Ucircumflex */ _U,
213 /* 154 Udieresis */ _U,
214 /* 155 Yacute */ _U,
215 /* 156 Thorn */ _U,
216 /* 157 mu */ _P,
217 /* 158 multiply */ _P,
218 /* 159 divide */ _P,
219
220 /* 160 copyright */ _P,
221 /* 161 exclamdown */ _P,
222 /* 162 cent */ _P,
223 /* 163 sterling */ _P,
224 /* 164 fraction */ _P,
225 /* 165 yen */ _P,
226 /* 166 florin */ _P,
227 /* 167 section */ _P,
228
229 /* 168 currency */ _P,
230 /* 169 quotesingle */ _P,
231 /* 170 quotedblleft */ _P,
232 /* 171 guillemotleft */ _P,
233 /* 172 guilsinglleft */ _P,
234 /* 173 guilsinglright */ _P,
235 /* 174 fi */ _L,
236 /* 175 fl */ _L,
237
238 /* 176 registered */ _P,
239 /* 177 endash */ _P,
240 /* 178 dagger */ _P,
241 /* 179 daggerdbl */ _P,
242 /* 180 periodcentered */ _P,
243 /* 181 brokenbar */ _P,
244 /* 182 paragraph */ _P,
245 /* 183 bullet */ _P,
246
247 /* 184 quotesinglbase */ _P,
248 /* 185 quotedblbase */ _P,
249 /* 186 quotedblright */ _P,
250 /* 187 guillemotright */ _P,
251 /* 188 ellipsis */ _P,
252 /* 189 perthousand */ _P,
253 /* 190 logicalnot */ _P,
254 /* 191 questiondown */ _P,
255
256 /* 192 onesuperior */ _P,
257 /* 193 grave */ _P,
258 /* 194 acute */ _P,
259 /* 195 circumflex */ _P,
260 /* 196 tilde */ _P,
261 /* 197 macron */ _P,
262 /* 198 breve */ _P,
263 /* 199 dotaccent */ _P,
264
265 /* 200 dieresis */ _P,
266 /* 201 twosuperior */ _P,
267 /* 202 ring */ _P,
268 /* 203 cedilla */ _P,
269 /* 204 threesuperior */ _P,
270 /* 205 hungarumlaut */ _P,
271 /* 206 ogonek */ _P,
272 /* 207 caron */ _P,
273
274 /* 208 emdash */ _P,
275 /* 209 plusminus */ _P,
276 /* 210 onequarter */ _P,
277 /* 211 onehalf */ _P,
278 /* 212 threequarters */ _P,
279 /* 213 agrave */ _L,
280 /* 214 aacute */ _L,
281 /* 215 acircumflex */ _L,
282
283 /* 216 atilde */ _L,
284 /* 217 adieresis */ _L,
285 /* 218 aring */ _L,
286 /* 219 ccedilla */ _L,
287 /* 220 egrave */ _L,
288 /* 221 eacute */ _L,
289 /* 222 ecircumflex */ _L,
290 /* 223 edieresis */ _L,
291
292 /* 224 igrave */ _L,
293 /* 225 AE */ _U,
294 /* 226 iacute */ _L,
295 /* 227 ordfeminine */ _P,
296 /* 228 icircumflex */ _L,
297 /* 229 idieresis */ _L,
298 /* 230 eth */ _L,
299 /* 231 ntilde */ _L,
300
301 /* 232 Lslash */ _U,
302 /* 233 Oslash */ _U,
303 /* 234 OE */ _U,
304 /* 235 ordmasculine */ _P,
305 /* 236 ograve */ _L,
306 /* 237 oacute */ _L,
307 /* 238 ocircumflex */ _L,
308 /* 239 otilde */ _L,
309
310 /* 240 odieresis */ _L,
311 /* 241 ae */ _L,
312 /* 242 ugrave */ _L,
313 /* 243 uacute */ _L,
314 /* 244 ucircumflex */ _L,
315 /* 245 dotlessi */ _L,
316 /* 246 udieresis */ _L,
317 /* 247 yacute */ _L,
318
319 /* 248 lslash */ _L,
320 /* 249 oslash */ _L,
321 /* 250 oe */ _L,
322 /* 251 germandbls */ _L,
323 /* 252 thorn */ _L,
324 /* 253 ydieresis */ _L,
325 /* 254 .notdef */ _C,
326 /* 255 .notdef */ _C,
327 };
328
329 /*
330 * Upper to lower and lower to upper table for NeXTStep encoding (256
331 * characters). An entry of zero means it's not an upper or lower case
332 * thing (i.e., isn't alphabetic). Otherwise, the value at a given
333 * position is the opposite case equivalent. E.g., the entry for the
334 * "A" position is "a" and the entry for position "a" is "A".
335 *
336 * There are some pathological cases: ydieresis, germandbls, and the
337 * fi & fl ligatures don't have "other case" equivalents; therefore
338 * they're entered as themselves because they are in fact "lower case"
339 * and the Type table lists them as _L.
340 */
341 const unsigned char _NX_ULTable_[256] = {
342 /* 0 .notdef */ 0,
343 /* 1 .notdef */ 0,
344 /* 2 .notdef */ 0,
345 /* 3 .notdef */ 0,
346 /* 4 .notdef */ 0,
347 /* 5 .notdef */ 0,
348 /* 6 .notdef */ 0,
349 /* 7 .notdef */ 0,
350 /* 8 .notdef */ 0,
351 /* 9 .notdef */ 0,
352 /* 10 .notdef */ 0,
353 /* 11 .notdef */ 0,
354 /* 12 .notdef */ 0,
355 /* 13 .notdef */ 0,
356 /* 14 .notdef */ 0,
357 /* 15 .notdef */ 0,
358 /* 16 .notdef */ 0,
359 /* 17 .notdef */ 0,
360 /* 18 .notdef */ 0,
361 /* 19 .notdef */ 0,
362 /* 20 .notdef */ 0,
363 /* 21 .notdef */ 0,
364 /* 22 .notdef */ 0,
365 /* 23 .notdef */ 0,
366 /* 24 .notdef */ 0,
367 /* 25 .notdef */ 0,
368 /* 26 .notdef */ 0,
369 /* 27 .notdef */ 0,
370 /* 28 .notdef */ 0,
371 /* 29 .notdef */ 0,
372 /* 30 .notdef */ 0,
373 /* 31 .notdef */ 0,
374 /* 32 space */ 0,
375 /* 33 exclam */ 0,
376 /* 34 quotedbl */ 0,
377 /* 35 numbersign */ 0,
378 /* 36 dollar */ 0,
379 /* 37 percent */ 0,
380 /* 38 ampersand */ 0,
381 /* 39 quoteright */ 0,
382 /* 40 parenleft */ 0,
383 /* 41 parenright */ 0,
384 /* 42 asterisk */ 0,
385 /* 43 plus */ 0,
386 /* 44 comma */ 0,
387 /* 45 hyphen */ 0,
388 /* 46 period */ 0,
389 /* 47 slash */ 0,
390 /* 48 zero */ 0,
391 /* 49 one */ 0,
392 /* 50 two */ 0,
393 /* 51 three */ 0,
394 /* 52 four */ 0,
395 /* 53 five */ 0,
396 /* 54 six */ 0,
397 /* 55 seven */ 0,
398 /* 56 eight */ 0,
399 /* 57 nine */ 0,
400 /* 58 colon */ 0,
401 /* 59 semicolon */ 0,
402 /* 60 less */ 0,
403 /* 61 equal */ 0,
404 /* 62 greater */ 0,
405 /* 63 question */ 0,
406 /* 64 at */ 0,
407 /* 65 A */ 97,
408 /* 66 B */ 98,
409 /* 67 C */ 99,
410 /* 68 D */ 100,
411 /* 69 E */ 101,
412 /* 70 F */ 102,
413 /* 71 G */ 103,
414 /* 72 H */ 104,
415 /* 73 I */ 105,
416 /* 74 J */ 106,
417 /* 75 K */ 107,
418 /* 76 L */ 108,
419 /* 77 M */ 109,
420 /* 78 N */ 110,
421 /* 79 O */ 111,
422 /* 80 P */ 112,
423 /* 81 Q */ 113,
424 /* 82 R */ 114,
425 /* 83 S */ 115,
426 /* 84 T */ 116,
427 /* 85 U */ 117,
428 /* 86 V */ 118,
429 /* 87 W */ 119,
430 /* 88 X */ 120,
431 /* 89 Y */ 121,
432 /* 90 Z */ 122,
433 /* 91 bracketleft */ 0,
434 /* 92 backslash */ 0,
435 /* 93 bracketright */ 0,
436 /* 94 asciicircum */ 0,
437 /* 95 underscore */ 0,
438 /* 96 quoteleft */ 0,
439 /* 97 a */ 65,
440 /* 98 b */ 66,
441 /* 99 c */ 67,
442 /* 100 d */ 68,
443 /* 101 e */ 69,
444 /* 102 f */ 70,
445 /* 103 g */ 71,
446 /* 104 h */ 72,
447 /* 105 i */ 73,
448 /* 106 j */ 74,
449 /* 107 k */ 75,
450 /* 108 l */ 76,
451 /* 109 m */ 77,
452 /* 110 n */ 78,
453 /* 111 o */ 79,
454 /* 112 p */ 80,
455 /* 113 q */ 81,
456 /* 114 r */ 82,
457 /* 115 s */ 83,
458 /* 116 t */ 84,
459 /* 117 u */ 85,
460 /* 118 v */ 86,
461 /* 119 w */ 87,
462 /* 120 x */ 88,
463 /* 121 y */ 89,
464 /* 122 z */ 90,
465 /* 123 braceleft */ 0,
466 /* 124 bar */ 0,
467 /* 125 braceright */ 0,
468 /* 126 asciitilde */ 0,
469 /* 127 .notdef */ 0,
470 /* 128 .notdef */ 0,
471 /* 129 Agrave */ 213,
472 /* 130 Aacute */ 214,
473 /* 131 Acircumflex */ 215,
474 /* 132 Atilde */ 216,
475 /* 133 Adieresis */ 217,
476 /* 134 Aring */ 218,
477 /* 135 Ccedilla */ 219,
478 /* 136 Egrave */ 220,
479 /* 137 Eacute */ 221,
480 /* 138 Ecircumflex */ 222,
481 /* 139 Edieresis */ 223,
482 /* 140 Igrave */ 224,
483 /* 141 Iacute */ 226,
484 /* 142 Icircumflex */ 228,
485 /* 143 Idieresis */ 229,
486 /* 144 Eth */ 230,
487 /* 145 Ntilde */ 231,
488 /* 146 Ograve */ 236,
489 /* 147 Oacute */ 237,
490 /* 148 Ocircumflex */ 238,
491 /* 149 Otilde */ 239,
492 /* 150 Odieresis */ 240,
493 /* 151 Ugrave */ 242,
494 /* 152 Uacute */ 243,
495 /* 153 Ucircumflex */ 244,
496 /* 154 Udieresis */ 246,
497 /* 155 Yacute */ 247,
498 /* 156 Thorn */ 252,
499 /* 157 mu */ 0,
500 /* 158 multiply */ 0,
501 /* 159 divide */ 0,
502 /* 160 copyright */ 0,
503 /* 161 exclamdown */ 0,
504 /* 162 cent */ 0,
505 /* 163 sterling */ 0,
506 /* 164 fraction */ 0,
507 /* 165 yen */ 0,
508 /* 166 florin */ 0,
509 /* 167 section */ 0,
510 /* 168 currency */ 0,
511 /* 169 quotesingle */ 0,
512 /* 170 quotedblleft */ 0,
513 /* 171 guillemotleft */ 0,
514 /* 172 guilsinglleft */ 0,
515 /* 173 guilsinglright */ 0,
516 /* 174 fi */ 174, /* is self */
517 /* 175 fl */ 175, /* is self */
518 /* 176 registered */ 0,
519 /* 177 endash */ 0,
520 /* 178 dagger */ 0,
521 /* 179 daggerdbl */ 0,
522 /* 180 periodcentered */ 0,
523 /* 181 brokenbar */ 0,
524 /* 182 paragraph */ 0,
525 /* 183 bullet */ 0,
526 /* 184 quotesinglbase */ 0,
527 /* 185 quotedblbase */ 0,
528 /* 186 quotedblright */ 0,
529 /* 187 guillemotright */ 0,
530 /* 188 ellipsis */ 0,
531 /* 189 perthousand */ 0,
532 /* 190 logicalnot */ 0,
533 /* 191 questiondown */ 0,
534 /* 192 onesuperior */ 0,
535 /* 193 grave */ 0,
536 /* 194 acute */ 0,
537 /* 195 circumflex */ 0,
538 /* 196 tilde */ 0,
539 /* 197 macron */ 0,
540 /* 198 breve */ 0,
541 /* 199 dotaccent */ 0,
542 /* 200 dieresis */ 0,
543 /* 201 twosuperior */ 0,
544 /* 202 ring */ 0,
545 /* 203 cedilla */ 0,
546 /* 204 threesuperior */ 0,
547 /* 205 hungarumlaut */ 0,
548 /* 206 ogonek */ 0,
549 /* 207 caron */ 0,
550 /* 208 emdash */ 0,
551 /* 209 plusminus */ 0,
552 /* 210 onequarter */ 0,
553 /* 211 onehalf */ 0,
554 /* 212 threequarters */ 0,
555 /* 213 agrave */ 129,
556 /* 214 aacute */ 130,
557 /* 215 acircumflex */ 131,
558 /* 216 atilde */ 132,
559 /* 217 adieresis */ 133,
560 /* 218 aring */ 134,
561 /* 219 ccedilla */ 135,
562 /* 220 egrave */ 136,
563 /* 221 eacute */ 137,
564 /* 222 ecircumflex */ 138,
565 /* 223 edieresis */ 139,
566 /* 224 igrave */ 140,
567 /* 225 AE */ 241,
568 /* 226 iacute */ 141,
569 /* 227 ordfeminine */ 0,
570 /* 228 icircumflex */ 142,
571 /* 229 idieresis */ 143,
572 /* 230 eth */ 144,
573 /* 231 ntilde */ 145,
574 /* 232 Lslash */ 248,
575 /* 233 Oslash */ 249,
576 /* 234 OE */ 250,
577 /* 235 ordmasculine */ 0,
578 /* 236 ograve */ 146,
579 /* 237 oacute */ 147,
580 /* 238 ocircumflex */ 148,
581 /* 239 otilde */ 149,
582 /* 240 odieresis */ 150,
583 /* 241 ae */ 225,
584 /* 242 ugrave */ 151,
585 /* 243 uacute */ 152,
586 /* 244 ucircumflex */ 153,
587 /* 245 dotlessi */ 245, /* is self */
588 /* 246 udieresis */ 154,
589 /* 247 yacute */ 155,
590 /* 248 lslash */ 232,
591 /* 249 oslash */ 233,
592 /* 250 oe */ 234,
593 /* 251 germandbls */ 251, /* is self */
594 /* 252 thorn */ 156,
595 /* 253 ydieresis */ 253, /* is self */
596 /* 254 .notdef */ 0,
597 /* 255 .notdef */ 0
598 };
599