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