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