2
* sh.char.c: Character classification tables
5
* Copyright (c) 1980, 1991 The Regents of the University of California.
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
11
* 1. Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* 2. Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in the
15
* documentation and/or other materials provided with the distribution.
16
* 3. All advertising materials mentioning features or use of this software
17
* must display the following acknowledgement:
18
* This product includes software developed by the University of
19
* California, Berkeley and its contributors.
20
* 4. Neither the name of the University nor the names of its contributors
21
* may be used to endorse or promote products derived from this software
22
* without specific prior written permission.
24
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42
#if defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)
43
/* on default same as original map */
44
unsigned short _cmap[256] = {
45
/* 0 nul 1 soh 2 stx 3 etx */
46
_CTR, _CTR, _CTR, _CTR,
48
/* 4 eot 5 enq 6 ack 7 bel */
49
_CTR, _CTR, _CTR, _CTR,
51
/* 8 bs 9 ht 10 nl 11 vt */
52
_CTR, _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
54
/* 12 np 13 cr 14 so 15 si */
55
_CTR, _CTR, _CTR, _CTR,
57
/* 16 dle 17 dc1 18 dc2 19 dc3 */
58
_CTR, _CTR, _CTR, _CTR,
60
/* 20 dc4 21 nak 22 syn 23 etb */
61
_CTR, _CTR, _CTR, _CTR,
63
/* 24 can 25 em 26 sub 27 esc */
64
_CTR, _CTR, _CTR, _CTR,
66
/* 28 fs 29 gs 30 rs 31 us */
67
_CTR, _CTR, _CTR, _CTR,
69
/* 32 sp 33 ! 34 " 35 # */
70
_SP|_META, _PUN, _QF|_PUN, _META|_PUN,
72
/* 36 $ 37 % 38 & 39 ' */
73
_DOL|_PUN, _PUN, _META|_CMD|_PUN,_QF|_PUN,
75
/* 40 ( 41 ) 42 * 43 + */
76
_META|_CMD|_PUN,_META|_PUN, _GLOB|_PUN, _PUN,
78
/* 44 , 45 - 46 . 47 / */
79
_PUN, _PUN, _PUN, _PUN,
81
/* 48 0 49 1 50 2 51 3 */
82
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
84
/* 52 4 53 5 54 6 55 7 */
85
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
87
/* 56 8 57 9 58 : 59 ; */
88
_DIG|_XD, _DIG|_XD, _PUN, _META|_CMD|_PUN,
90
/* 60 < 61 = 62 > 63 ? */
91
_META|_PUN, _PUN, _META|_PUN, _GLOB|_PUN,
93
/* 64 @ 65 A 66 B 67 C */
94
_PUN, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD,
96
/* 68 D 69 E 70 F 71 G */
97
_LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP,
99
/* 72 H 73 I 74 J 75 K */
100
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
102
/* 76 L 77 M 78 N 79 O */
103
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
105
/* 80 P 81 Q 82 R 83 S */
106
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
108
/* 84 T 85 U 86 V 87 W */
109
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
111
/* 88 X 89 Y 90 Z 91 [ */
112
_LET|_UP, _LET|_UP, _LET|_UP, _GLOB|_PUN,
114
/* 92 \ 93 ] 94 ^ 95 _ */
115
_ESC|_PUN, _PUN, _PUN, _PUN,
117
/* 96 ` 97 a 98 b 99 c */
118
_QB|_GLOB|_META|_PUN, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD,
120
/* 100 d 101 e 102 f 103 g */
121
_LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW,
123
/* 104 h 105 i 106 j 107 k */
124
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
126
/* 108 l 109 m 110 n 111 o */
127
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
129
/* 112 p 113 q 114 r 115 s */
130
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
132
/* 116 t 117 u 118 v 119 w */
133
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
135
/* 120 x 121 y 122 z 123 { */
136
_LET|_DOW, _LET|_DOW, _LET|_DOW, _GLOB|_PUN,
138
/* 124 | 125 } 126 ~ 127 del */
139
_META|_CMD|_PUN,_PUN, _PUN, _CTR,
141
/****************************************************************/
142
/* 128 - 255 The below is supposedly ISO 8859/1 */
143
/****************************************************************/
144
/* 128 (undef) 129 (undef) 130 (undef) 131 (undef) */
145
_CTR, _CTR, _CTR, _CTR,
147
/* 132 (undef) 133 (undef) 134 (undef) 135 (undef) */
148
_CTR, _CTR, _CTR, _CTR,
150
/* 136 (undef) 137 (undef) 138 (undef) 139 (undef) */
151
_CTR, _CTR, _CTR, _CTR,
153
/* 140 (undef) 141 (undef) 142 (undef) 143 (undef) */
154
_CTR, _CTR, _CTR, _CTR,
156
/* 144 (undef) 145 (undef) 146 (undef) 147 (undef) */
157
_CTR, _CTR, _CTR, _CTR,
159
/* 148 (undef) 149 (undef) 150 (undef) 151 (undef) */
160
_CTR, _CTR, _CTR, _CTR,
162
/* 152 (undef) 153 (undef) 154 (undef) 155 (undef) */
163
_CTR, _CTR, _CTR, _CTR,
165
/* 156 (undef) 157 (undef) 158 (undef) 159 (undef) */
166
_CTR, _CTR, _CTR, _CTR,
168
/* 160 nobreakspace 161 exclamdown 162 cent 163 sterling */
169
_PUN, /* XXX */ _PUN, _PUN, _PUN,
171
/* 164 currency 165 yen 166 brokenbar 167 section */
172
_PUN, _PUN, _PUN, _PUN,
174
/* 168 diaeresis 169 copyright 170 ordfeminine 171 guillemotleft*/
175
_PUN, _PUN, _PUN, _PUN,
177
/* 172 notsign 173 hyphen 174 registered 175 macron */
178
_PUN, _PUN, _PUN, _PUN,
180
/* 176 degree 177 plusminus 178 twosuperior 179 threesuperior*/
181
_PUN, _PUN, _PUN, _PUN,
183
/* 180 acute 181 mu 182 paragraph 183 periodcentered*/
184
_PUN, _PUN, /*XXX*/ _PUN, _PUN,
186
/* 184 cedilla 185 onesuperior 186 masculine 187 guillemotright*/
187
_PUN, _PUN, _PUN, _PUN,
189
/* 188 onequarter 189 onehalf 190 threequarters 191 questiondown*/
190
_PUN, _PUN, _PUN, _PUN,
192
/* 192 Agrave 193 Aacute 194 Acircumflex 195 Atilde */
193
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
195
/* 196 Adiaeresis 197 Aring 198 AE 199 Ccedilla */
196
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
198
/* 200 Egrave 201 Eacute 202 Ecircumflex 203 Ediaeresis */
199
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
201
/* 204 Igrave 205 Iacute 206 Icircumflex 207 Idiaeresis */
202
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
204
/* 208 ETH 209 Ntilde 210 Ograve 211 Oacute */
205
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
207
/* 212 Ocircumflex 213 Otilde 214 Odiaeresis 215 multiply */
208
_LET|_UP, _LET|_UP, _LET|_UP, _PUN,
210
/* 216 Ooblique 217 Ugrave 218 Uacute 219 Ucircumflex */
211
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
213
/* 220 Udiaeresis 221 Yacute 222 THORN 223 ssharp */
214
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_DOW,
216
/* 224 agrave 225 aacute 226 acircumflex 227 atilde */
217
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
219
/* 228 adiaeresis 229 aring 230 ae 231 ccedilla */
220
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
222
/* 232 egrave 233 eacute 234 ecircumflex 235 ediaeresis */
223
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
225
/* 236 igrave 237 iacute 238 icircumflex 239 idiaeresis */
226
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
228
/* 240 eth 241 ntilde 242 ograve 243 oacute */
229
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
231
/* 244 ocircumflex 245 otilde 246 odiaeresis 247 division */
232
_LET|_DOW, _LET|_DOW, _LET|_DOW, _PUN,
234
/* 248 oslash 249 ugrave 250 uacute 251 ucircumflex */
235
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
237
/* 252 udiaeresis 253 yacute 254 thorn 255 ydiaeresis */
238
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
241
unsigned short _cmap_c[256] = {
242
/* 0 nul 1 soh 2 stx 3 etx */
243
_CTR, _CTR, _CTR, _CTR,
245
/* 4 eot 5 enq 6 ack 7 bel */
246
_CTR, _CTR, _CTR, _CTR,
248
/* 8 bs 9 ht 10 nl 11 vt */
249
_CTR, _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
251
/* 12 np 13 cr 14 so 15 si */
252
_CTR, _CTR, _CTR, _CTR,
254
/* 16 dle 17 dc1 18 dc2 19 dc3 */
255
_CTR, _CTR, _CTR, _CTR,
257
/* 20 dc4 21 nak 22 syn 23 etb */
258
_CTR, _CTR, _CTR, _CTR,
260
/* 24 can 25 em 26 sub 27 esc */
261
_CTR, _CTR, _CTR, _CTR,
263
/* 28 fs 29 gs 30 rs 31 us */
264
_CTR, _CTR, _CTR, _CTR,
266
/* 32 sp 33 ! 34 " 35 # */
267
_SP|_META, _PUN, _QF|_PUN, _META|_PUN,
269
/* 36 $ 37 % 38 & 39 ' */
270
_DOL|_PUN, _PUN, _META|_CMD|_PUN,_QF|_PUN,
272
/* 40 ( 41 ) 42 * 43 + */
273
_META|_CMD|_PUN,_META|_PUN, _GLOB|_PUN, _PUN,
275
/* 44 , 45 - 46 . 47 / */
276
_PUN, _PUN, _PUN, _PUN,
278
/* 48 0 49 1 50 2 51 3 */
279
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
281
/* 52 4 53 5 54 6 55 7 */
282
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
284
/* 56 8 57 9 58 : 59 ; */
285
_DIG|_XD, _DIG|_XD, _PUN, _META|_CMD|_PUN,
287
/* 60 < 61 = 62 > 63 ? */
288
_META|_PUN, _PUN, _META|_PUN, _GLOB|_PUN,
290
/* 64 @ 65 A 66 B 67 C */
291
_PUN, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD,
293
/* 68 D 69 E 70 F 71 G */
294
_LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP,
296
/* 72 H 73 I 74 J 75 K */
297
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
299
/* 76 L 77 M 78 N 79 O */
300
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
302
/* 80 P 81 Q 82 R 83 S */
303
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
305
/* 84 T 85 U 86 V 87 W */
306
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
308
/* 88 X 89 Y 90 Z 91 [ */
309
_LET|_UP, _LET|_UP, _LET|_UP, _GLOB|_PUN,
311
/* 92 \ 93 ] 94 ^ 95 _ */
312
_ESC|_PUN, _PUN, _PUN, _PUN,
314
/* 96 ` 97 a 98 b 99 c */
315
_QB|_GLOB|_META|_PUN, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD,
317
/* 100 d 101 e 102 f 103 g */
318
_LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW,
320
/* 104 h 105 i 106 j 107 k */
321
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
323
/* 108 l 109 m 110 n 111 o */
324
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
326
/* 112 p 113 q 114 r 115 s */
327
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
329
/* 116 t 117 u 118 v 119 w */
330
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
332
/* 120 x 121 y 122 z 123 { */
333
_LET|_DOW, _LET|_DOW, _LET|_DOW, _GLOB|_PUN,
335
/* 124 | 125 } 126 ~ 127 del */
336
_META|_CMD|_PUN,_PUN, _PUN, _CTR,
338
/****************************************************************/
339
/* 128 - 255 The below is supposedly ISO 8859/1 */
340
/****************************************************************/
341
/* 128 (undef) 129 (undef) 130 (undef) 131 (undef) */
342
_CTR, _CTR, _CTR, _CTR,
344
/* 132 (undef) 133 (undef) 134 (undef) 135 (undef) */
345
_CTR, _CTR, _CTR, _CTR,
347
/* 136 (undef) 137 (undef) 138 (undef) 139 (undef) */
348
_CTR, _CTR, _CTR, _CTR,
350
/* 140 (undef) 141 (undef) 142 (undef) 143 (undef) */
351
_CTR, _CTR, _CTR, _CTR,
353
/* 144 (undef) 145 (undef) 146 (undef) 147 (undef) */
354
_CTR, _CTR, _CTR, _CTR,
356
/* 148 (undef) 149 (undef) 150 (undef) 151 (undef) */
357
_CTR, _CTR, _CTR, _CTR,
359
/* 152 (undef) 153 (undef) 154 (undef) 155 (undef) */
360
_CTR, _CTR, _CTR, _CTR,
362
/* 156 (undef) 157 (undef) 158 (undef) 159 (undef) */
363
_CTR, _CTR, _CTR, _CTR,
365
/* 160 nobreakspace 161 exclamdown 162 cent 163 sterling */
366
_PUN, /* XXX */ _PUN, _PUN, _PUN,
368
/* 164 currency 165 yen 166 brokenbar 167 section */
369
_PUN, _PUN, _PUN, _PUN,
371
/* 168 diaeresis 169 copyright 170 ordfeminine 171 guillemotleft*/
372
_PUN, _PUN, _PUN, _PUN,
374
/* 172 notsign 173 hyphen 174 registered 175 macron */
375
_PUN, _PUN, _PUN, _PUN,
377
/* 176 degree 177 plusminus 178 twosuperior 179 threesuperior*/
378
_PUN, _PUN, _PUN, _PUN,
380
/* 180 acute 181 mu 182 paragraph 183 periodcentered*/
381
_PUN, _PUN, /*XXX*/ _PUN, _PUN,
383
/* 184 cedilla 185 onesuperior 186 masculine 187 guillemotright*/
384
_PUN, _PUN, _PUN, _PUN,
386
/* 188 onequarter 189 onehalf 190 threequarters 191 questiondown*/
387
_PUN, _PUN, _PUN, _PUN,
389
/* 192 Agrave 193 Aacute 194 Acircumflex 195 Atilde */
390
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
392
/* 196 Adiaeresis 197 Aring 198 AE 199 Ccedilla */
393
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
395
/* 200 Egrave 201 Eacute 202 Ecircumflex 203 Ediaeresis */
396
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
398
/* 204 Igrave 205 Iacute 206 Icircumflex 207 Idiaeresis */
399
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
401
/* 208 ETH 209 Ntilde 210 Ograve 211 Oacute */
402
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
404
/* 212 Ocircumflex 213 Otilde 214 Odiaeresis 215 multiply */
405
_LET|_UP, _LET|_UP, _LET|_UP, _PUN,
407
/* 216 Ooblique 217 Ugrave 218 Uacute 219 Ucircumflex */
408
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
410
/* 220 Udiaeresis 221 Yacute 222 THORN 223 ssharp */
411
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_DOW,
413
/* 224 agrave 225 aacute 226 acircumflex 227 atilde */
414
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
416
/* 228 adiaeresis 229 aring 230 ae 231 ccedilla */
417
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
419
/* 232 egrave 233 eacute 234 ecircumflex 235 ediaeresis */
420
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
422
/* 236 igrave 237 iacute 238 icircumflex 239 idiaeresis */
423
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
425
/* 240 eth 241 ntilde 242 ograve 243 oacute */
426
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
428
/* 244 ocircumflex 245 otilde 246 odiaeresis 247 division */
429
_LET|_DOW, _LET|_DOW, _LET|_DOW, _PUN,
431
/* 248 oslash 249 ugrave 250 uacute 251 ucircumflex */
432
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
434
/* 252 udiaeresis 253 yacute 254 thorn 255 ydiaeresis */
435
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
438
/* multi-byte table */
439
/* BY Masaaki Koyanagi VERY THANKS */
440
unsigned short _cmap_mbyte[256] = {
441
/* 0 nul 1 soh 2 stx 3 etx */
442
_CTR, _CTR, _CTR, _CTR,
444
/* 4 eot 5 enq 6 ack 7 bel */
445
_CTR, _CTR, _CTR, _CTR,
447
/* 8 bs 9 ht 10 nl 11 vt */
448
_CTR, _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
450
/* 12 np 13 cr 14 so 15 si */
451
_CTR, _CTR, _CTR, _CTR,
453
/* 16 dle 17 dc1 18 dc2 19 dc3 */
454
_CTR, _CTR, _CTR, _CTR,
456
/* 20 dc4 21 nak 22 syn 23 etb */
457
_CTR, _CTR, _CTR, _CTR,
459
/* 24 can 25 em 26 sub 27 esc */
460
_CTR, _CTR, _CTR, _CTR,
462
/* 28 fs 29 gs 30 rs 31 us */
463
_CTR, _CTR, _CTR, _CTR,
465
/* 32 sp 33 ! 34 " 35 # */
466
_SP|_META, _PUN, _QF|_PUN, _META|_PUN,
468
/* 36 $ 37 % 38 & 39 ' */
469
_DOL|_PUN, _PUN, _META|_CMD|_PUN,_QF|_PUN,
471
/* 40 ( 41 ) 42 * 43 + */
472
_META|_CMD|_PUN,_META|_PUN, _GLOB|_PUN, _PUN,
474
/* 44 , 45 - 46 . 47 / */
475
_PUN, _PUN, _PUN, _PUN,
477
/* 48 0 49 1 50 2 51 3 */
478
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
480
/* 52 4 53 5 54 6 55 7 */
481
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
483
/* 56 8 57 9 58 : 59 ; */
484
_DIG|_XD, _DIG|_XD, _PUN, _META|_CMD|_PUN,
486
/* 60 < 61 = 62 > 63 ? */
487
_META|_PUN, _PUN, _META|_PUN, _GLOB|_PUN,
489
/* 64 @ 65 A 66 B 67 C */
490
_PUN, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD,
492
/* 68 D 69 E 70 F 71 G */
493
_LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP,
495
/* 72 H 73 I 74 J 75 K */
496
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
498
/* 76 L 77 M 78 N 79 O */
499
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
501
/* 80 P 81 Q 82 R 83 S */
502
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
504
/* 84 T 85 U 86 V 87 W */
505
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
507
/* 88 X 89 Y 90 Z 91 [ */
508
_LET|_UP, _LET|_UP, _LET|_UP, _GLOB|_PUN,
510
/* 92 \ 93 ] 94 ^ 95 _ */
511
_ESC|_PUN, _PUN, _PUN, _PUN,
513
/* 96 ` 97 a 98 b 99 c */
514
_QB|_GLOB|_META|_PUN, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD,
516
/* 100 d 101 e 102 f 103 g */
517
_LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW,
519
/* 104 h 105 i 106 j 107 k */
520
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
522
/* 108 l 109 m 110 n 111 o */
523
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
525
/* 112 p 113 q 114 r 115 s */
526
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
528
/* 116 t 117 u 118 v 119 w */
529
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
531
/* 120 x 121 y 122 z 123 { */
532
_LET|_DOW, _LET|_DOW, _LET|_DOW, _GLOB|_PUN,
534
/* 124 | 125 } 126 ~ 127 del */
535
_META|_CMD|_PUN,_PUN, _PUN, _CTR,
537
/****************************************************************/
538
/* 128 - 255 The below is supposedly ISO 8859/1 */
539
/****************************************************************/
540
/* 128 (undef) 129 (undef) 130 (undef) 131 (undef) */
541
_PUN, _PUN, _PUN, _PUN,
543
/* 132 (undef) 133 (undef) 134 (undef) 135 (undef) */
544
_PUN, _PUN, _PUN, _PUN,
546
/* 136 (undef) 137 (undef) 138 (undef) 139 (undef) */
547
_PUN, _PUN, _PUN, _PUN,
549
/* 140 (undef) 141 (undef) 142 (undef) 143 (undef) */
550
_PUN, _PUN, _PUN, _PUN,
552
/* 144 (undef) 145 (undef) 146 (undef) 147 (undef) */
553
_PUN, _PUN, _PUN, _PUN,
555
/* 148 (undef) 149 (undef) 150 (undef) 151 (undef) */
556
_PUN, _PUN, _PUN, _PUN,
558
/* 152 (undef) 153 (undef) 154 (undef) 155 (undef) */
559
_PUN, _PUN, _PUN, _PUN,
561
/* 156 (undef) 157 (undef) 158 (undef) 159 (undef) */
562
_PUN, _PUN, _PUN, _PUN,
564
/* 160 nobreakspace 161 exclamdown 162 cent 163 sterling */
565
_PUN, /* XXX */ _PUN, _PUN, _PUN,
567
/* 164 currency 165 yen 166 brokenbar 167 section */
568
_PUN, _PUN, _PUN, _PUN,
570
/* 168 diaeresis 169 copyright 170 ordfeminine 171 guillemotleft*/
571
_PUN, _PUN, _PUN, _PUN,
573
/* 172 notsign 173 hyphen 174 registered 175 macron */
574
_PUN, _PUN, _PUN, _PUN,
576
/* 176 degree 177 plusminus 178 twosuperior 179 threesuperior*/
577
_PUN, _PUN, _PUN, _PUN,
579
/* 180 acute 181 mu 182 paragraph 183 periodcentered*/
580
_PUN, _PUN, /*XXX*/ _PUN, _PUN,
582
/* 184 cedilla 185 onesuperior 186 masculine 187 guillemotright*/
583
_PUN, _PUN, _PUN, _PUN,
585
/* 188 onequarter 189 onehalf 190 threequarters 191 questiondown*/
586
_PUN, _PUN, _PUN, _PUN,
588
/* 192 Agrave 193 Aacute 194 Acircumflex 195 Atilde */
589
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
591
/* 196 Adiaeresis 197 Aring 198 AE 199 Ccedilla */
592
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
594
/* 200 Egrave 201 Eacute 202 Ecircumflex 203 Ediaeresis */
595
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
597
/* 204 Igrave 205 Iacute 206 Icircumflex 207 Idiaeresis */
598
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
600
/* 208 ETH 209 Ntilde 210 Ograve 211 Oacute */
601
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
603
/* 212 Ocircumflex 213 Otilde 214 Odiaeresis 215 multiply */
604
_LET|_UP, _LET|_UP, _LET|_UP, _PUN,
606
/* 216 Ooblique 217 Ugrave 218 Uacute 219 Ucircumflex */
607
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
609
/* 220 Udiaeresis 221 Yacute 222 THORN 223 ssharp */
610
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_DOW,
612
/* 224 agrave 225 aacute 226 acircumflex 227 atilde */
613
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
615
/* 228 adiaeresis 229 aring 230 ae 231 ccedilla */
616
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
618
/* 232 egrave 233 eacute 234 ecircumflex 235 ediaeresis */
619
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
621
/* 236 igrave 237 iacute 238 icircumflex 239 idiaeresis */
622
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
624
/* 240 eth 241 ntilde 242 ograve 243 oacute */
625
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
627
/* 244 ocircumflex 245 otilde 246 odiaeresis 247 division */
628
_LET|_DOW, _LET|_DOW, _LET|_DOW, _PUN,
630
/* 248 oslash 249 ugrave 250 uacute 251 ucircumflex */
631
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
633
/* 252 udiaeresis 253 yacute 254 thorn 255 ydiaeresis */
634
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
637
short _enable_mbdisp = 0; /* control multi-byte 0...disable 1...enable */
639
/* multi-byte check table */
640
/* default = all 0 (clear process in update_vars()/unset()) */
641
unsigned short _mbmap[256];
643
unsigned short _mbmap_euc[256] = {
644
/* first byte 0x8e,0xa0 - 0xf4 */
645
/* second byte 0xa0 - 0xfe */
647
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
648
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
649
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
650
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
660
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
662
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
664
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
666
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
668
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
670
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
672
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
674
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
676
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
678
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
680
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
682
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
684
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
686
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
688
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
690
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
692
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
694
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
696
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
698
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
700
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
702
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
704
_MB1|_MB2, _MB2, _MB2, _MB2,
706
_MB2, _MB2, _MB2, _MB2,
711
unsigned short _mbmap_sjis[256] = {
712
/* first byte 0x81-0x9f,0xe0 - 0xfc */
713
/* second byte 0x40-0x7e,0x80 - 0xfc */
715
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
716
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
718
_MB2, _MB2, _MB2, _MB2,
720
_MB2, _MB2, _MB2, _MB2,
722
_MB2, _MB2, _MB2, _MB2,
724
_MB2, _MB2, _MB2, _MB2,
726
_MB2, _MB2, _MB2, _MB2,
728
_MB2, _MB2, _MB2, _MB2,
730
_MB2, _MB2, _MB2, _MB2,
732
_MB2, _MB2, _MB2, _MB2,
734
_MB2, _MB2, _MB2, _MB2,
736
_MB2, _MB2, _MB2, _MB2,
738
_MB2, _MB2, _MB2, _MB2,
740
_MB2, _MB2, _MB2, _MB2,
742
_MB2, _MB2, _MB2, _MB2,
744
_MB2, _MB2, _MB2, _MB2,
746
_MB2, _MB2, _MB2, _MB2,
750
_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
752
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
754
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
756
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
758
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
760
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
762
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
764
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
766
_MB2, _MB2, _MB2, _MB2,
768
_MB2, _MB2, _MB2, _MB2,
770
_MB2, _MB2, _MB2, _MB2,
772
_MB2, _MB2, _MB2, _MB2,
774
_MB2, _MB2, _MB2, _MB2,
776
_MB2, _MB2, _MB2, _MB2,
778
_MB2, _MB2, _MB2, _MB2,
780
_MB2, _MB2, _MB2, _MB2,
782
_MB2, _MB2, _MB2, _MB2,
784
_MB2, _MB2, _MB2, _MB2,
786
_MB2, _MB2, _MB2, _MB2,
788
_MB2, _MB2, _MB2, _MB2,
790
_MB2, _MB2, _MB2, _MB2,
792
_MB2, _MB2, _MB2, _MB2,
794
_MB2, _MB2, _MB2, _MB2,
796
_MB2, _MB2, _MB2, _MB2,
798
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
800
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
802
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
804
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
806
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
808
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
810
_MB1|_MB2, _MB1|_MB2, _MB1|_MB2, _MB1|_MB2,
815
#else /* !(defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)) */
816
unsigned short _cmap[256] = {
817
/* 0 nul 1 soh 2 stx 3 etx */
818
_CTR, _CTR, _CTR, _CTR,
820
/* 4 eot 5 enq 6 ack 7 bel */
821
_CTR, _CTR, _CTR, _CTR,
823
/* 8 bs 9 ht 10 nl 11 vt */
824
_CTR, _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
826
/* 12 np 13 cr 14 so 15 si */
827
_CTR, _CTR, _CTR, _CTR,
829
/* 16 dle 17 dc1 18 dc2 19 dc3 */
830
_CTR, _CTR, _CTR, _CTR,
832
/* 20 dc4 21 nak 22 syn 23 etb */
833
_CTR, _CTR, _CTR, _CTR,
835
/* 24 can 25 em 26 sub 27 esc */
836
_CTR, _CTR, _CTR, _CTR,
838
/* 28 fs 29 gs 30 rs 31 us */
839
_CTR, _CTR, _CTR, _CTR,
841
/* 32 sp 33 ! 34 " 35 # */
842
_SP|_META, _PUN, _QF|_PUN, _META|_PUN,
844
/* 36 $ 37 % 38 & 39 ' */
845
_DOL|_PUN, _PUN, _META|_CMD|_PUN,_QF|_PUN,
847
/* 40 ( 41 ) 42 * 43 + */
848
_META|_CMD|_PUN,_META|_PUN, _GLOB|_PUN, _PUN,
850
/* 44 , 45 - 46 . 47 / */
851
_PUN, _PUN, _PUN, _PUN,
853
/* 48 0 49 1 50 2 51 3 */
854
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
856
/* 52 4 53 5 54 6 55 7 */
857
_DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD,
859
/* 56 8 57 9 58 : 59 ; */
860
_DIG|_XD, _DIG|_XD, _PUN, _META|_CMD|_PUN,
862
/* 60 < 61 = 62 > 63 ? */
863
_META|_PUN, _PUN, _META|_PUN, _GLOB|_PUN,
865
/* 64 @ 65 A 66 B 67 C */
866
_PUN, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD,
868
/* 68 D 69 E 70 F 71 G */
869
_LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP,
871
/* 72 H 73 I 74 J 75 K */
872
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
874
/* 76 L 77 M 78 N 79 O */
875
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
877
/* 80 P 81 Q 82 R 83 S */
878
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
880
/* 84 T 85 U 86 V 87 W */
881
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
883
/* 88 X 89 Y 90 Z 91 [ */
884
_LET|_UP, _LET|_UP, _LET|_UP, _GLOB|_PUN,
886
/* 92 \ 93 ] 94 ^ 95 _ */
887
_ESC|_PUN, _PUN, _PUN, _PUN,
889
/* 96 ` 97 a 98 b 99 c */
890
_QB|_GLOB|_META|_PUN, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD,
892
/* 100 d 101 e 102 f 103 g */
893
_LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW|_XD, _LET|_DOW,
895
/* 104 h 105 i 106 j 107 k */
896
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
898
/* 108 l 109 m 110 n 111 o */
899
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
901
/* 112 p 113 q 114 r 115 s */
902
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
904
/* 116 t 117 u 118 v 119 w */
905
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
907
/* 120 x 121 y 122 z 123 { */
908
_LET|_DOW, _LET|_DOW, _LET|_DOW, _GLOB|_PUN,
910
/* 124 | 125 } 126 ~ 127 del */
911
_META|_CMD|_PUN,_PUN, _PUN, _CTR,
914
/****************************************************************/
915
/* 128 - 255 The below is supposedly ISO 8859/1 */
916
/****************************************************************/
917
/* 128 (undef) 129 (undef) 130 (undef) 131 (undef) */
918
_CTR, _CTR, _CTR, _CTR,
920
/* 132 (undef) 133 (undef) 134 (undef) 135 (undef) */
921
_CTR, _CTR, _CTR, _CTR,
923
/* 136 (undef) 137 (undef) 138 (undef) 139 (undef) */
924
_CTR, _CTR, _CTR, _CTR,
926
/* 140 (undef) 141 (undef) 142 (undef) 143 (undef) */
927
_CTR, _CTR, _CTR, _CTR,
929
/* 144 (undef) 145 (undef) 146 (undef) 147 (undef) */
930
_CTR, _CTR, _CTR, _CTR,
932
/* 148 (undef) 149 (undef) 150 (undef) 151 (undef) */
933
_CTR, _CTR, _CTR, _CTR,
935
/* 152 (undef) 153 (undef) 154 (undef) 155 (undef) */
936
_CTR, _CTR, _CTR, _CTR,
938
/* 156 (undef) 157 (undef) 158 (undef) 159 (undef) */
939
_CTR, _CTR, _CTR, _CTR,
941
/* 160 nobreakspace 161 exclamdown 162 cent 163 sterling */
942
_PUN, /* XXX */ _PUN, _PUN, _PUN,
944
/* 164 currency 165 yen 166 brokenbar 167 section */
945
_PUN, _PUN, _PUN, _PUN,
947
/* 168 diaeresis 169 copyright 170 ordfeminine 171 guillemotleft*/
948
_PUN, _PUN, _PUN, _PUN,
950
/* 172 notsign 173 hyphen 174 registered 175 macron */
951
_PUN, _PUN, _PUN, _PUN,
953
/* 176 degree 177 plusminus 178 twosuperior 179 threesuperior*/
954
_PUN, _PUN, _PUN, _PUN,
956
/* 180 acute 181 mu 182 paragraph 183 periodcentered*/
957
_PUN, _PUN, /*XXX*/ _PUN, _PUN,
959
/* 184 cedilla 185 onesuperior 186 masculine 187 guillemotright*/
960
_PUN, _PUN, _PUN, _PUN,
962
/* 188 onequarter 189 onehalf 190 threequarters 191 questiondown*/
963
_PUN, _PUN, _PUN, _PUN,
965
/* 192 Agrave 193 Aacute 194 Acircumflex 195 Atilde */
966
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
968
/* 196 Adiaeresis 197 Aring 198 AE 199 Ccedilla */
969
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
971
/* 200 Egrave 201 Eacute 202 Ecircumflex 203 Ediaeresis */
972
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
974
/* 204 Igrave 205 Iacute 206 Icircumflex 207 Idiaeresis */
975
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
977
/* 208 ETH 209 Ntilde 210 Ograve 211 Oacute */
978
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
980
/* 212 Ocircumflex 213 Otilde 214 Odiaeresis 215 multiply */
981
_LET|_UP, _LET|_UP, _LET|_UP, _PUN,
983
/* 216 Ooblique 217 Ugrave 218 Uacute 219 Ucircumflex */
984
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP,
986
/* 220 Udiaeresis 221 Yacute 222 THORN 223 ssharp */
987
_LET|_UP, _LET|_UP, _LET|_UP, _LET|_DOW,
989
/* 224 agrave 225 aacute 226 acircumflex 227 atilde */
990
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
992
/* 228 adiaeresis 229 aring 230 ae 231 ccedilla */
993
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
995
/* 232 egrave 233 eacute 234 ecircumflex 235 ediaeresis */
996
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
998
/* 236 igrave 237 iacute 238 icircumflex 239 idiaeresis */
999
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
1001
/* 240 eth 241 ntilde 242 ograve 243 oacute */
1002
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
1004
/* 244 ocircumflex 245 otilde 246 odiaeresis 247 division */
1005
_LET|_DOW, _LET|_DOW, _LET|_DOW, _PUN,
1007
/* 248 oslash 249 ugrave 250 uacute 251 ucircumflex */
1008
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
1010
/* 252 udiaeresis 253 yacute 254 thorn 255 ydiaeresis */
1011
_LET|_DOW, _LET|_DOW, _LET|_DOW, _LET|_DOW,
1012
#endif /* SHORT_STRINGS */
1014
#endif /* defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE) */
1017
/* _cmap_lower, _cmap_upper for ISO 8859/1 */
1019
unsigned char _cmap_lower[256] = {
1020
0000, 0001, 0002, 0003, 0004, 0005, 0006, 0007,
1021
0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017,
1022
0020, 0021, 0022, 0023, 0024, 0025, 0026, 0027,
1023
0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037,
1024
0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047,
1025
0050, 0051, 0052, 0053, 0054, 0055, 0056, 0057,
1026
0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067,
1027
0070, 0071, 0072, 0073, 0074, 0075, 0076, 0077,
1028
0100, 0141, 0142, 0143, 0144, 0145, 0146, 0147,
1029
0150, 0151, 0152, 0153, 0154, 0155, 0156, 0157,
1030
0160, 0161, 0162, 0163, 0164, 0165, 0166, 0167,
1031
0170, 0171, 0172, 0133, 0134, 0135, 0136, 0137,
1032
0140, 0141, 0142, 0143, 0144, 0145, 0146, 0147,
1033
0150, 0151, 0152, 0153, 0154, 0155, 0156, 0157,
1034
0160, 0161, 0162, 0163, 0164, 0165, 0166, 0167,
1035
0170, 0171, 0172, 0173, 0174, 0175, 0176, 0177,
1036
0200, 0201, 0202, 0203, 0204, 0205, 0206, 0207,
1037
0210, 0211, 0212, 0213, 0214, 0215, 0216, 0217,
1038
0220, 0221, 0222, 0223, 0224, 0225, 0226, 0227,
1039
0230, 0231, 0232, 0233, 0234, 0235, 0236, 0237,
1040
0240, 0241, 0242, 0243, 0244, 0245, 0246, 0247,
1041
0250, 0251, 0252, 0253, 0254, 0255, 0256, 0257,
1042
0260, 0261, 0262, 0263, 0264, 0265, 0266, 0267,
1043
0270, 0271, 0272, 0273, 0274, 0275, 0276, 0277,
1044
0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347,
1045
0350, 0351, 0352, 0353, 0354, 0355, 0356, 0357,
1046
0360, 0361, 0362, 0363, 0364, 0365, 0366, 0327,
1047
0370, 0371, 0372, 0373, 0374, 0375, 0376, 0337,
1048
0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347,
1049
0350, 0351, 0352, 0353, 0354, 0355, 0356, 0357,
1050
0360, 0361, 0362, 0363, 0364, 0365, 0366, 0367,
1051
0370, 0371, 0372, 0373, 0374, 0375, 0376, 0377,
1054
unsigned char _cmap_upper[256] = {
1055
0000, 0001, 0002, 0003, 0004, 0005, 0006, 0007,
1056
0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017,
1057
0020, 0021, 0022, 0023, 0024, 0025, 0026, 0027,
1058
0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037,
1059
0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047,
1060
0050, 0051, 0052, 0053, 0054, 0055, 0056, 0057,
1061
0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067,
1062
0070, 0071, 0072, 0073, 0074, 0075, 0076, 0077,
1063
0100, 0101, 0102, 0103, 0104, 0105, 0106, 0107,
1064
0110, 0111, 0112, 0113, 0114, 0115, 0116, 0117,
1065
0120, 0121, 0122, 0123, 0124, 0125, 0126, 0127,
1066
0130, 0131, 0132, 0133, 0134, 0135, 0136, 0137,
1067
0140, 0101, 0102, 0103, 0104, 0105, 0106, 0107,
1068
0110, 0111, 0112, 0113, 0114, 0115, 0116, 0117,
1069
0120, 0121, 0122, 0123, 0124, 0125, 0126, 0127,
1070
0130, 0131, 0132, 0173, 0174, 0175, 0176, 0177,
1071
0200, 0201, 0202, 0203, 0204, 0205, 0206, 0207,
1072
0210, 0211, 0212, 0213, 0214, 0215, 0216, 0217,
1073
0220, 0221, 0222, 0223, 0224, 0225, 0226, 0227,
1074
0230, 0231, 0232, 0233, 0234, 0235, 0236, 0237,
1075
0240, 0241, 0242, 0243, 0244, 0245, 0246, 0247,
1076
0250, 0251, 0252, 0253, 0254, 0255, 0256, 0257,
1077
0260, 0261, 0262, 0263, 0264, 0265, 0266, 0267,
1078
0270, 0271, 0272, 0273, 0274, 0275, 0276, 0277,
1079
0300, 0301, 0302, 0303, 0304, 0305, 0306, 0307,
1080
0310, 0311, 0312, 0313, 0314, 0315, 0316, 0317,
1081
0320, 0321, 0322, 0323, 0324, 0325, 0326, 0327,
1082
0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337,
1083
0300, 0301, 0302, 0303, 0304, 0305, 0306, 0307,
1084
0310, 0311, 0312, 0313, 0314, 0315, 0316, 0317,
1085
0320, 0321, 0322, 0323, 0324, 0325, 0326, 0367,
1086
0330, 0331, 0332, 0333, 0334, 0335, 0336, 0377,
1092
Initial Port for tcsh-6.07.04 by <Martin.Kraemer@Mch.SNI.De>
1094
"BS2000 OSD" is a POSIX on a main frame.
1095
It is made by Siemens Nixdorf AG, Germany.
1096
Within the POSIX subsystem, the same character set was chosen as in
1097
"native BS2000", namely EBCDIC. Yes, tcsh now runs on EBCDIC platforms, too.
1099
EBCDIC Table. (Yes, in EBCDIC, the letters 'a'..'z' are not contiguous!)
1100
This table is bijective, i.e. there are no ambigous or duplicate characters
1101
00 00 01 02 03 85 09 86 7f 87 8d 8e 0b 0c 0d 0e 0f * ................ *
1102
10 10 11 12 13 8f 0a 08 97 18 19 9c 9d 1c 1d 1e 1f * ................ *
1103
20 80 81 82 83 84 92 17 1b 88 89 8a 8b 8c 05 06 07 * ................ *
1104
30 90 91 16 93 94 95 96 04 98 99 9a 9b 14 15 9e 1a * ................ *
1105
40 20 a0 e2 e4 e0 e1 e3 e5 e7 f1 60 2e 3c 28 2b 7c * .........`.<(+| *
1106
50 26 e9 ea eb e8 ed ee ef ec df 21 24 2a 29 3b 9f * &.........!$*);. *
1107
60 2d 2f c2 c4 c0 c1 c3 c5 c7 d1 5e 2c 25 5f 3e 3f * -/........^,%_>? *
1108
70 f8 c9 ca cb c8 cd ce cf cc a8 3a 23 40 27 3d 22 * ..........:#@'=" *
1109
80 d8 61 62 63 64 65 66 67 68 69 ab bb f0 fd fe b1 * .abcdefghi...... *
1110
90 b0 6a 6b 6c 6d 6e 6f 70 71 72 aa ba e6 b8 c6 a4 * .jklmnopqr...... *
1111
a0 b5 af 73 74 75 76 77 78 79 7a a1 bf d0 dd de ae * ..stuvwxyz...... *
1112
b0 a2 a3 a5 b7 a9 a7 b6 bc bd be ac 5b 5c 5d b4 d7 * ...........[\].. *
1113
c0 f9 41 42 43 44 45 46 47 48 49 ad f4 f6 f2 f3 f5 * .ABCDEFGHI...... *
1114
d0 a6 4a 4b 4c 4d 4e 4f 50 51 52 b9 fb fc db fa ff * .JKLMNOPQR...... *
1115
e0 d9 f7 53 54 55 56 57 58 59 5a b2 d4 d6 d2 d3 d5 * ..STUVWXYZ...... *
1116
f0 30 31 32 33 34 35 36 37 38 39 b3 7b dc 7d da 7e * 0123456789.{.}.~ *
1118
unsigned short _toascii[256] = {
1119
/*00*/ 0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f,
1120
0x87, 0x8d, 0x8e, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* ................ */
1121
/*10*/ 0x10, 0x11, 0x12, 0x13, 0x8f, 0x0a, 0x08, 0x97,
1122
0x18, 0x19, 0x9c, 0x9d, 0x1c, 0x1d, 0x1e, 0x1f, /* ................ */
1123
/*20*/ 0x80, 0x81, 0x82, 0x83, 0x84, 0x92, 0x17, 0x1b,
1124
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x05, 0x06, 0x07, /* ................ */
1125
/*30*/ 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04,
1126
0x98, 0x99, 0x9a, 0x9b, 0x14, 0x15, 0x9e, 0x1a, /* ................ */
1127
/*40*/ 0x20, 0xa0, 0xe2, 0xe4, 0xe0, 0xe1, 0xe3, 0xe5,
1128
0xe7, 0xf1, 0x60, 0x2e, 0x3c, 0x28, 0x2b, 0x7c, /* .........`.<(+| */
1129
/*50*/ 0x26, 0xe9, 0xea, 0xeb, 0xe8, 0xed, 0xee, 0xef,
1130
0xec, 0xdf, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x9f, /* &.........!$*);. */
1131
/*60*/ 0x2d, 0x2f, 0xc2, 0xc4, 0xc0, 0xc1, 0xc3, 0xc5,
1132
0xc7, 0xd1, 0x5e, 0x2c, 0x25, 0x5f, 0x3e, 0x3f, /* -/........^,%_>? */
1133
/*70*/ 0xf8, 0xc9, 0xca, 0xcb, 0xc8, 0xcd, 0xce, 0xcf,
1134
0xcc, 0xa8, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22, /* ..........:#@'=" */
1135
/*80*/ 0xd8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1136
0x68, 0x69, 0xab, 0xbb, 0xf0, 0xfd, 0xfe, 0xb1, /* .abcdefghi...... */
1137
/*90*/ 0xb0, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
1138
0x71, 0x72, 0xaa, 0xba, 0xe6, 0xb8, 0xc6, 0xa4, /* .jklmnopqr...... */
1139
/*a0*/ 0xb5, 0xaf, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
1140
0x79, 0x7a, 0xa1, 0xbf, 0xd0, 0xdd, 0xde, 0xae, /* ..stuvwxyz...... */
1141
/*b0*/ 0xa2, 0xa3, 0xa5, 0xb7, 0xa9, 0xa7, 0xb6, 0xbc,
1142
0xbd, 0xbe, 0xac, 0x5b, 0x5c, 0x5d, 0xb4, 0xd7, /* ...........[\].. */
1143
/*c0*/ 0xf9, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1144
0x48, 0x49, 0xad, 0xf4, 0xf6, 0xf2, 0xf3, 0xf5, /* .ABCDEFGHI...... */
1145
/*d0*/ 0xa6, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
1146
0x51, 0x52, 0xb9, 0xfb, 0xfc, 0xdb, 0xfa, 0xff, /* .JKLMNOPQR...... */
1147
/*e0*/ 0xd9, 0xf7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
1148
0x59, 0x5a, 0xb2, 0xd4, 0xd6, 0xd2, 0xd3, 0xd5, /* ..STUVWXYZ...... */
1149
/*f0*/ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1150
0x38, 0x39, 0xb3, 0x7b, 0xdc, 0x7d, 0xda, 0x7e /* 0123456789.{.}.~ */
1152
/* The same, for ascii-in-ebcdic
1153
00 00 01 02 03 37 2d 2e 2f 16 05 15 0b 0c 0d 0e 0f * ................ *
1154
10 10 11 12 13 3c 3d 32 26 18 19 3f 27 1c 1d 1e 1f * ................ *
1155
20 40 5a 7f 7b 5b 6c 50 7d 4d 5d 5c 4e 6b 60 4b 61 * !"#$%&'()*+,-./ *
1156
30 f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 7a 5e 4c 7e 6e 6f * 0123456789:;<=>? *
1157
40 7c c1 c2 c3 c4 c5 c6 c7 c8 c9 d1 d2 d3 d4 d5 d6 * @ABCDEFGHIJKLMNO *
1158
50 d7 d8 d9 e2 e3 e4 e5 e6 e7 e8 e9 bb bc bd 6a 6d * PQRSTUVWXYZ[\]^_ *
1159
60 4a 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 * `abcdefghijklmno *
1160
70 97 98 99 a2 a3 a4 a5 a6 a7 a8 a9 fb 4f fd ff 07 * pqrstuvwxyz{|}~. *
1161
80 20 21 22 23 24 04 06 08 28 29 2a 2b 2c 09 0a 14 * ................ *
1162
90 30 31 25 33 34 35 36 17 38 39 3a 3b 1a 1b 3e 5f * ................ *
1163
a0 41 aa b0 b1 9f b2 d0 b5 79 b4 9a 8a ba ca af a1 * ................ *
1164
b0 90 8f ea fa be a0 b6 b3 9d da 9b 8b b7 b8 b9 ab * ................ *
1165
c0 64 65 62 66 63 67 9e 68 74 71 72 73 78 75 76 77 * ................ *
1166
d0 ac 69 ed ee eb ef ec bf 80 e0 fe dd fc ad ae 59 * ................ *
1167
e0 44 45 42 46 43 47 9c 48 54 51 52 53 58 55 56 57 * ................ *
1168
f0 8c 49 cd ce cb cf cc e1 70 c0 de db dc 8d 8e df * ................ *
1170
unsigned short _toebcdic[256] = {
1171
/*00*/ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f,
1172
0x16, 0x05, 0x15, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* ................ */
1173
/*10*/ 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26,
1174
0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, /* ................ */
1175
/*20*/ 0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d,
1176
0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, /* !"#$%&'()*+,-./ */
1177
/*30*/ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1178
0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, /* 0123456789:;<=>? */
1179
/*40*/ 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1180
0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, /* @ABCDEFGHIJKLMNO */
1181
/*50*/ 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6,
1182
0xe7, 0xe8, 0xe9, 0xbb, 0xbc, 0xbd, 0x6a, 0x6d, /* PQRSTUVWXYZ[\]^_ */
1183
/*60*/ 0x4a, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1184
0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* `abcdefghijklmno */
1185
/*70*/ 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
1186
0xa7, 0xa8, 0xa9, 0xfb, 0x4f, 0xfd, 0xff, 0x07, /* pqrstuvwxyz{|}~. */
1187
/*80*/ 0x20, 0x21, 0x22, 0x23, 0x24, 0x04, 0x06, 0x08,
1188
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x14, /* ................ */
1189
/*90*/ 0x30, 0x31, 0x25, 0x33, 0x34, 0x35, 0x36, 0x17,
1190
0x38, 0x39, 0x3a, 0x3b, 0x1a, 0x1b, 0x3e, 0x5f, /* ................ */
1191
/*a0*/ 0x41, 0xaa, 0xb0, 0xb1, 0x9f, 0xb2, 0xd0, 0xb5,
1192
0x79, 0xb4, 0x9a, 0x8a, 0xba, 0xca, 0xaf, 0xa1, /* ................ */
1193
/*b0*/ 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3,
1194
0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab, /* ................ */
1195
/*c0*/ 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68,
1196
0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* ................ */
1197
/*d0*/ 0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf,
1198
0x80, 0xe0, 0xfe, 0xdd, 0xfc, 0xad, 0xae, 0x59, /* ................ */
1199
/*e0*/ 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48,
1200
0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* ................ */
1201
/*f0*/ 0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1,
1202
0x70, 0xc0, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf /* ................ */
1205
#endif /*_OSD_POSIX*/