~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qtcsh/sh.char.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * sh.char.c: Character classification tables
 
3
 */
 
4
/*-
 
5
 * Copyright (c) 1980, 1991 The Regents of the University of California.
 
6
 * All rights reserved.
 
7
 *
 
8
 * Redistribution and use in source and binary forms, with or without
 
9
 * modification, are permitted provided that the following conditions
 
10
 * are met:
 
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.
 
23
 *
 
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
 
34
 * SUCH DAMAGE.
 
35
 */
 
36
#include "sh.h"
 
37
 
 
38
RCSID("$Id$")
 
39
 
 
40
#include "sh.char.h"
 
41
 
 
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,
 
47
 
 
48
/*        4 eot           5 enq           6 ack           7 bel */
 
49
        _CTR,           _CTR,           _CTR,           _CTR,
 
50
 
 
51
/*        8 bs            9 ht           10 nl           11 vt  */
 
52
        _CTR,           _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
 
53
 
 
54
/*       12 np           13 cr           14 so           15 si  */
 
55
        _CTR,           _CTR,           _CTR,           _CTR,
 
56
 
 
57
/*       16 dle          17 dc1          18 dc2          19 dc3 */
 
58
        _CTR,           _CTR,           _CTR,           _CTR,
 
59
 
 
60
/*       20 dc4          21 nak          22 syn          23 etb */
 
61
        _CTR,           _CTR,           _CTR,           _CTR,
 
62
 
 
63
/*       24 can          25 em           26 sub          27 esc */
 
64
        _CTR,           _CTR,           _CTR,           _CTR,
 
65
 
 
66
/*       28 fs           29 gs           30 rs           31 us  */
 
67
        _CTR,           _CTR,           _CTR,           _CTR,
 
68
 
 
69
/*       32 sp           33 !            34 "            35 #   */
 
70
        _SP|_META,      _PUN,           _QF|_PUN,       _META|_PUN,
 
71
 
 
72
/*       36 $            37 %            38 &            39 '   */
 
73
        _DOL|_PUN,      _PUN,           _META|_CMD|_PUN,_QF|_PUN,
 
74
 
 
75
/*       40 (            41 )            42 *            43 +   */
 
76
        _META|_CMD|_PUN,_META|_PUN,     _GLOB|_PUN,     _PUN,
 
77
 
 
78
/*       44 ,            45 -            46 .            47 /   */
 
79
        _PUN,           _PUN,           _PUN,           _PUN,
 
80
 
 
81
/*       48 0            49 1            50 2            51 3   */
 
82
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
83
 
 
84
/*       52 4            53 5            54 6            55 7   */
 
85
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
86
 
 
87
/*       56 8            57 9            58 :            59 ;   */
 
88
        _DIG|_XD,       _DIG|_XD,       _PUN,           _META|_CMD|_PUN,
 
89
 
 
90
/*       60 <            61 =            62 >            63 ?   */
 
91
        _META|_PUN,     _PUN,           _META|_PUN,     _GLOB|_PUN,
 
92
 
 
93
/*       64 @            65 A            66 B            67 C   */
 
94
        _PUN,           _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,
 
95
 
 
96
/*       68 D            69 E            70 F            71 G   */
 
97
        _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP,
 
98
 
 
99
/*       72 H            73 I            74 J            75 K   */
 
100
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
101
 
 
102
/*       76 L            77 M            78 N            79 O   */
 
103
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
104
 
 
105
/*       80 P            81 Q            82 R            83 S   */
 
106
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
107
 
 
108
/*       84 T            85 U            86 V            87 W   */
 
109
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
110
 
 
111
/*       88 X            89 Y            90 Z            91 [   */
 
112
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _GLOB|_PUN,
 
113
 
 
114
/*       92 \            93 ]            94 ^            95 _   */
 
115
        _ESC|_PUN,      _PUN,           _PUN,           _PUN,
 
116
 
 
117
/*       96 `            97 a            98 b            99 c   */
 
118
  _QB|_GLOB|_META|_PUN, _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,
 
119
 
 
120
/*      100 d           101 e           102 f           103 g   */
 
121
        _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW,
 
122
 
 
123
/*      104 h           105 i           106 j           107 k   */
 
124
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
125
 
 
126
/*      108 l           109 m           110 n           111 o   */
 
127
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
128
 
 
129
/*      112 p           113 q           114 r           115 s   */
 
130
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
131
 
 
132
/*      116 t           117 u           118 v           119 w   */
 
133
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
134
 
 
135
/*      120 x           121 y           122 z           123 {   */
 
136
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _GLOB|_PUN,
 
137
 
 
138
/*      124 |           125 }           126 ~           127 del */
 
139
        _META|_CMD|_PUN,_PUN,           _PUN,           _CTR,
 
140
 
 
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,
 
146
 
 
147
/*      132 (undef)     133 (undef)     134 (undef)     135 (undef)     */
 
148
        _CTR,           _CTR,           _CTR,           _CTR,
 
149
 
 
150
/*      136 (undef)     137 (undef)     138 (undef)     139 (undef)     */
 
151
        _CTR,           _CTR,           _CTR,           _CTR,
 
152
 
 
153
/*      140 (undef)     141 (undef)     142 (undef)     143 (undef)     */
 
154
        _CTR,           _CTR,           _CTR,           _CTR,
 
155
 
 
156
/*      144 (undef)     145 (undef)     146 (undef)     147 (undef)     */
 
157
        _CTR,           _CTR,           _CTR,           _CTR,
 
158
 
 
159
/*      148 (undef)     149 (undef)     150 (undef)     151 (undef)     */
 
160
        _CTR,           _CTR,           _CTR,           _CTR,
 
161
 
 
162
/*      152 (undef)     153 (undef)     154 (undef)     155 (undef)     */
 
163
        _CTR,           _CTR,           _CTR,           _CTR,
 
164
 
 
165
/*      156 (undef)     157 (undef)     158 (undef)     159 (undef)     */
 
166
        _CTR,           _CTR,           _CTR,           _CTR,
 
167
 
 
168
/*      160 nobreakspace 161 exclamdown 162 cent        163 sterling    */
 
169
        _PUN, /* XXX */ _PUN,           _PUN,           _PUN,
 
170
 
 
171
/*      164 currency    165 yen         166 brokenbar   167 section     */
 
172
        _PUN,           _PUN,           _PUN,           _PUN,
 
173
 
 
174
/*      168 diaeresis   169 copyright   170 ordfeminine 171 guillemotleft*/
 
175
        _PUN,           _PUN,           _PUN,           _PUN,
 
176
 
 
177
/*      172 notsign     173 hyphen      174 registered  175 macron      */
 
178
        _PUN,           _PUN,           _PUN,           _PUN,
 
179
 
 
180
/*      176 degree      177 plusminus   178 twosuperior 179 threesuperior*/
 
181
        _PUN,           _PUN,           _PUN,           _PUN,
 
182
 
 
183
/*      180 acute       181 mu          182 paragraph   183 periodcentered*/
 
184
        _PUN,           _PUN, /*XXX*/   _PUN,           _PUN,
 
185
 
 
186
/*      184 cedilla     185 onesuperior 186 masculine   187 guillemotright*/
 
187
        _PUN,           _PUN,           _PUN,           _PUN,
 
188
 
 
189
/*      188 onequarter  189 onehalf     190 threequarters 191 questiondown*/
 
190
        _PUN,           _PUN,           _PUN,           _PUN,
 
191
 
 
192
/*      192 Agrave      193 Aacute      194 Acircumflex 195 Atilde      */
 
193
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
194
 
 
195
/*      196 Adiaeresis  197 Aring       198 AE          199 Ccedilla    */
 
196
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
197
 
 
198
/*      200 Egrave      201 Eacute      202 Ecircumflex 203 Ediaeresis  */
 
199
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
200
 
 
201
/*      204 Igrave      205 Iacute      206 Icircumflex 207 Idiaeresis  */
 
202
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
203
 
 
204
/*      208 ETH         209 Ntilde      210 Ograve      211 Oacute      */
 
205
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
206
 
 
207
/*      212 Ocircumflex 213 Otilde      214 Odiaeresis  215 multiply    */
 
208
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _PUN,
 
209
 
 
210
/*      216 Ooblique    217 Ugrave      218 Uacute      219 Ucircumflex */
 
211
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
212
 
 
213
/*      220 Udiaeresis  221 Yacute      222 THORN       223 ssharp      */
 
214
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_DOW,
 
215
 
 
216
/*      224 agrave      225 aacute      226 acircumflex 227 atilde      */
 
217
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
218
 
 
219
/*      228 adiaeresis  229 aring       230 ae          231 ccedilla    */
 
220
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
221
 
 
222
/*      232 egrave      233 eacute      234 ecircumflex 235 ediaeresis  */
 
223
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
224
 
 
225
/*      236 igrave      237 iacute      238 icircumflex 239 idiaeresis  */
 
226
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
227
 
 
228
/*      240 eth         241 ntilde      242 ograve      243 oacute      */
 
229
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
230
 
 
231
/*      244 ocircumflex 245 otilde      246 odiaeresis  247 division    */
 
232
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _PUN,
 
233
 
 
234
/*      248 oslash      249 ugrave      250 uacute      251 ucircumflex */
 
235
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
236
 
 
237
/*      252 udiaeresis  253 yacute      254 thorn       255 ydiaeresis  */
 
238
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
239
};
 
240
/* original table */
 
241
unsigned short _cmap_c[256] = {
 
242
/*        0 nul           1 soh           2 stx           3 etx */
 
243
        _CTR,           _CTR,           _CTR,           _CTR,
 
244
 
 
245
/*        4 eot           5 enq           6 ack           7 bel */
 
246
        _CTR,           _CTR,           _CTR,           _CTR,
 
247
 
 
248
/*        8 bs            9 ht           10 nl           11 vt  */
 
249
        _CTR,           _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
 
250
 
 
251
/*       12 np           13 cr           14 so           15 si  */
 
252
        _CTR,           _CTR,           _CTR,           _CTR,
 
253
 
 
254
/*       16 dle          17 dc1          18 dc2          19 dc3 */
 
255
        _CTR,           _CTR,           _CTR,           _CTR,
 
256
 
 
257
/*       20 dc4          21 nak          22 syn          23 etb */
 
258
        _CTR,           _CTR,           _CTR,           _CTR,
 
259
 
 
260
/*       24 can          25 em           26 sub          27 esc */
 
261
        _CTR,           _CTR,           _CTR,           _CTR,
 
262
 
 
263
/*       28 fs           29 gs           30 rs           31 us  */
 
264
        _CTR,           _CTR,           _CTR,           _CTR,
 
265
 
 
266
/*       32 sp           33 !            34 "            35 #   */
 
267
        _SP|_META,      _PUN,           _QF|_PUN,       _META|_PUN,
 
268
 
 
269
/*       36 $            37 %            38 &            39 '   */
 
270
        _DOL|_PUN,      _PUN,           _META|_CMD|_PUN,_QF|_PUN,
 
271
 
 
272
/*       40 (            41 )            42 *            43 +   */
 
273
        _META|_CMD|_PUN,_META|_PUN,     _GLOB|_PUN,     _PUN,
 
274
 
 
275
/*       44 ,            45 -            46 .            47 /   */
 
276
        _PUN,           _PUN,           _PUN,           _PUN,
 
277
 
 
278
/*       48 0            49 1            50 2            51 3   */
 
279
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
280
 
 
281
/*       52 4            53 5            54 6            55 7   */
 
282
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
283
 
 
284
/*       56 8            57 9            58 :            59 ;   */
 
285
        _DIG|_XD,       _DIG|_XD,       _PUN,           _META|_CMD|_PUN,
 
286
 
 
287
/*       60 <            61 =            62 >            63 ?   */
 
288
        _META|_PUN,     _PUN,           _META|_PUN,     _GLOB|_PUN,
 
289
 
 
290
/*       64 @            65 A            66 B            67 C   */
 
291
        _PUN,           _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,
 
292
 
 
293
/*       68 D            69 E            70 F            71 G   */
 
294
        _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP,
 
295
 
 
296
/*       72 H            73 I            74 J            75 K   */
 
297
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
298
 
 
299
/*       76 L            77 M            78 N            79 O   */
 
300
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
301
 
 
302
/*       80 P            81 Q            82 R            83 S   */
 
303
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
304
 
 
305
/*       84 T            85 U            86 V            87 W   */
 
306
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
307
 
 
308
/*       88 X            89 Y            90 Z            91 [   */
 
309
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _GLOB|_PUN,
 
310
 
 
311
/*       92 \            93 ]            94 ^            95 _   */
 
312
        _ESC|_PUN,      _PUN,           _PUN,           _PUN,
 
313
 
 
314
/*       96 `            97 a            98 b            99 c   */
 
315
  _QB|_GLOB|_META|_PUN, _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,
 
316
 
 
317
/*      100 d           101 e           102 f           103 g   */
 
318
        _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW,
 
319
 
 
320
/*      104 h           105 i           106 j           107 k   */
 
321
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
322
 
 
323
/*      108 l           109 m           110 n           111 o   */
 
324
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
325
 
 
326
/*      112 p           113 q           114 r           115 s   */
 
327
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
328
 
 
329
/*      116 t           117 u           118 v           119 w   */
 
330
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
331
 
 
332
/*      120 x           121 y           122 z           123 {   */
 
333
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _GLOB|_PUN,
 
334
 
 
335
/*      124 |           125 }           126 ~           127 del */
 
336
        _META|_CMD|_PUN,_PUN,           _PUN,           _CTR,
 
337
 
 
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,
 
343
 
 
344
/*      132 (undef)     133 (undef)     134 (undef)     135 (undef)     */
 
345
        _CTR,           _CTR,           _CTR,           _CTR,
 
346
 
 
347
/*      136 (undef)     137 (undef)     138 (undef)     139 (undef)     */
 
348
        _CTR,           _CTR,           _CTR,           _CTR,
 
349
 
 
350
/*      140 (undef)     141 (undef)     142 (undef)     143 (undef)     */
 
351
        _CTR,           _CTR,           _CTR,           _CTR,
 
352
 
 
353
/*      144 (undef)     145 (undef)     146 (undef)     147 (undef)     */
 
354
        _CTR,           _CTR,           _CTR,           _CTR,
 
355
 
 
356
/*      148 (undef)     149 (undef)     150 (undef)     151 (undef)     */
 
357
        _CTR,           _CTR,           _CTR,           _CTR,
 
358
 
 
359
/*      152 (undef)     153 (undef)     154 (undef)     155 (undef)     */
 
360
        _CTR,           _CTR,           _CTR,           _CTR,
 
361
 
 
362
/*      156 (undef)     157 (undef)     158 (undef)     159 (undef)     */
 
363
        _CTR,           _CTR,           _CTR,           _CTR,
 
364
 
 
365
/*      160 nobreakspace 161 exclamdown 162 cent        163 sterling    */
 
366
        _PUN, /* XXX */ _PUN,           _PUN,           _PUN,
 
367
 
 
368
/*      164 currency    165 yen         166 brokenbar   167 section     */
 
369
        _PUN,           _PUN,           _PUN,           _PUN,
 
370
 
 
371
/*      168 diaeresis   169 copyright   170 ordfeminine 171 guillemotleft*/
 
372
        _PUN,           _PUN,           _PUN,           _PUN,
 
373
 
 
374
/*      172 notsign     173 hyphen      174 registered  175 macron      */
 
375
        _PUN,           _PUN,           _PUN,           _PUN,
 
376
 
 
377
/*      176 degree      177 plusminus   178 twosuperior 179 threesuperior*/
 
378
        _PUN,           _PUN,           _PUN,           _PUN,
 
379
 
 
380
/*      180 acute       181 mu          182 paragraph   183 periodcentered*/
 
381
        _PUN,           _PUN, /*XXX*/   _PUN,           _PUN,
 
382
 
 
383
/*      184 cedilla     185 onesuperior 186 masculine   187 guillemotright*/
 
384
        _PUN,           _PUN,           _PUN,           _PUN,
 
385
 
 
386
/*      188 onequarter  189 onehalf     190 threequarters 191 questiondown*/
 
387
        _PUN,           _PUN,           _PUN,           _PUN,
 
388
 
 
389
/*      192 Agrave      193 Aacute      194 Acircumflex 195 Atilde      */
 
390
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
391
 
 
392
/*      196 Adiaeresis  197 Aring       198 AE          199 Ccedilla    */
 
393
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
394
 
 
395
/*      200 Egrave      201 Eacute      202 Ecircumflex 203 Ediaeresis  */
 
396
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
397
 
 
398
/*      204 Igrave      205 Iacute      206 Icircumflex 207 Idiaeresis  */
 
399
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
400
 
 
401
/*      208 ETH         209 Ntilde      210 Ograve      211 Oacute      */
 
402
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
403
 
 
404
/*      212 Ocircumflex 213 Otilde      214 Odiaeresis  215 multiply    */
 
405
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _PUN,
 
406
 
 
407
/*      216 Ooblique    217 Ugrave      218 Uacute      219 Ucircumflex */
 
408
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
409
 
 
410
/*      220 Udiaeresis  221 Yacute      222 THORN       223 ssharp      */
 
411
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_DOW,
 
412
 
 
413
/*      224 agrave      225 aacute      226 acircumflex 227 atilde      */
 
414
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
415
 
 
416
/*      228 adiaeresis  229 aring       230 ae          231 ccedilla    */
 
417
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
418
 
 
419
/*      232 egrave      233 eacute      234 ecircumflex 235 ediaeresis  */
 
420
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
421
 
 
422
/*      236 igrave      237 iacute      238 icircumflex 239 idiaeresis  */
 
423
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
424
 
 
425
/*      240 eth         241 ntilde      242 ograve      243 oacute      */
 
426
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
427
 
 
428
/*      244 ocircumflex 245 otilde      246 odiaeresis  247 division    */
 
429
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _PUN,
 
430
 
 
431
/*      248 oslash      249 ugrave      250 uacute      251 ucircumflex */
 
432
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
433
 
 
434
/*      252 udiaeresis  253 yacute      254 thorn       255 ydiaeresis  */
 
435
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
436
};
 
437
 
 
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,
 
443
 
 
444
/*        4 eot           5 enq           6 ack           7 bel */
 
445
        _CTR,           _CTR,           _CTR,           _CTR,
 
446
 
 
447
/*        8 bs            9 ht           10 nl           11 vt  */
 
448
        _CTR,           _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
 
449
 
 
450
/*       12 np           13 cr           14 so           15 si  */
 
451
        _CTR,           _CTR,           _CTR,           _CTR,
 
452
 
 
453
/*       16 dle          17 dc1          18 dc2          19 dc3 */
 
454
        _CTR,           _CTR,           _CTR,           _CTR,
 
455
 
 
456
/*       20 dc4          21 nak          22 syn          23 etb */
 
457
        _CTR,           _CTR,           _CTR,           _CTR,
 
458
 
 
459
/*       24 can          25 em           26 sub          27 esc */
 
460
        _CTR,           _CTR,           _CTR,           _CTR,
 
461
 
 
462
/*       28 fs           29 gs           30 rs           31 us  */
 
463
        _CTR,           _CTR,           _CTR,           _CTR,
 
464
 
 
465
/*       32 sp           33 !            34 "            35 #   */
 
466
        _SP|_META,      _PUN,           _QF|_PUN,       _META|_PUN,
 
467
 
 
468
/*       36 $            37 %            38 &            39 '   */
 
469
        _DOL|_PUN,      _PUN,           _META|_CMD|_PUN,_QF|_PUN,
 
470
 
 
471
/*       40 (            41 )            42 *            43 +   */
 
472
        _META|_CMD|_PUN,_META|_PUN,     _GLOB|_PUN,     _PUN,
 
473
 
 
474
/*       44 ,            45 -            46 .            47 /   */
 
475
        _PUN,           _PUN,           _PUN,           _PUN,
 
476
 
 
477
/*       48 0            49 1            50 2            51 3   */
 
478
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
479
 
 
480
/*       52 4            53 5            54 6            55 7   */
 
481
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
482
 
 
483
/*       56 8            57 9            58 :            59 ;   */
 
484
        _DIG|_XD,       _DIG|_XD,       _PUN,           _META|_CMD|_PUN,
 
485
 
 
486
/*       60 <            61 =            62 >            63 ?   */
 
487
        _META|_PUN,     _PUN,           _META|_PUN,     _GLOB|_PUN,
 
488
 
 
489
/*       64 @            65 A            66 B            67 C   */
 
490
        _PUN,           _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,
 
491
 
 
492
/*       68 D            69 E            70 F            71 G   */
 
493
        _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP,
 
494
 
 
495
/*       72 H            73 I            74 J            75 K   */
 
496
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
497
 
 
498
/*       76 L            77 M            78 N            79 O   */
 
499
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
500
 
 
501
/*       80 P            81 Q            82 R            83 S   */
 
502
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
503
 
 
504
/*       84 T            85 U            86 V            87 W   */
 
505
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
506
 
 
507
/*       88 X            89 Y            90 Z            91 [   */
 
508
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _GLOB|_PUN,
 
509
 
 
510
/*       92 \            93 ]            94 ^            95 _   */
 
511
        _ESC|_PUN,      _PUN,           _PUN,           _PUN,
 
512
 
 
513
/*       96 `            97 a            98 b            99 c   */
 
514
  _QB|_GLOB|_META|_PUN, _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,
 
515
 
 
516
/*      100 d           101 e           102 f           103 g   */
 
517
        _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW,
 
518
 
 
519
/*      104 h           105 i           106 j           107 k   */
 
520
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
521
 
 
522
/*      108 l           109 m           110 n           111 o   */
 
523
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
524
 
 
525
/*      112 p           113 q           114 r           115 s   */
 
526
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
527
 
 
528
/*      116 t           117 u           118 v           119 w   */
 
529
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
530
 
 
531
/*      120 x           121 y           122 z           123 {   */
 
532
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _GLOB|_PUN,
 
533
 
 
534
/*      124 |           125 }           126 ~           127 del */
 
535
        _META|_CMD|_PUN,_PUN,           _PUN,           _CTR,
 
536
 
 
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,
 
542
 
 
543
/*      132 (undef)     133 (undef)     134 (undef)     135 (undef)     */
 
544
        _PUN,           _PUN,           _PUN,           _PUN,
 
545
 
 
546
/*      136 (undef)     137 (undef)     138 (undef)     139 (undef)     */
 
547
        _PUN,           _PUN,           _PUN,           _PUN,
 
548
 
 
549
/*      140 (undef)     141 (undef)     142 (undef)     143 (undef)     */
 
550
        _PUN,           _PUN,           _PUN,           _PUN,
 
551
 
 
552
/*      144 (undef)     145 (undef)     146 (undef)     147 (undef)     */
 
553
        _PUN,           _PUN,           _PUN,           _PUN,
 
554
 
 
555
/*      148 (undef)     149 (undef)     150 (undef)     151 (undef)     */
 
556
        _PUN,           _PUN,           _PUN,           _PUN,
 
557
 
 
558
/*      152 (undef)     153 (undef)     154 (undef)     155 (undef)     */
 
559
        _PUN,           _PUN,           _PUN,           _PUN,
 
560
 
 
561
/*      156 (undef)     157 (undef)     158 (undef)     159 (undef)     */
 
562
        _PUN,           _PUN,           _PUN,           _PUN,
 
563
 
 
564
/*      160 nobreakspace 161 exclamdown 162 cent        163 sterling    */
 
565
        _PUN, /* XXX */ _PUN,           _PUN,           _PUN,
 
566
 
 
567
/*      164 currency    165 yen         166 brokenbar   167 section     */
 
568
        _PUN,           _PUN,           _PUN,           _PUN,
 
569
 
 
570
/*      168 diaeresis   169 copyright   170 ordfeminine 171 guillemotleft*/
 
571
        _PUN,           _PUN,           _PUN,           _PUN,
 
572
 
 
573
/*      172 notsign     173 hyphen      174 registered  175 macron      */
 
574
        _PUN,           _PUN,           _PUN,           _PUN,
 
575
 
 
576
/*      176 degree      177 plusminus   178 twosuperior 179 threesuperior*/
 
577
        _PUN,           _PUN,           _PUN,           _PUN,
 
578
 
 
579
/*      180 acute       181 mu          182 paragraph   183 periodcentered*/
 
580
        _PUN,           _PUN, /*XXX*/   _PUN,           _PUN,
 
581
 
 
582
/*      184 cedilla     185 onesuperior 186 masculine   187 guillemotright*/
 
583
        _PUN,           _PUN,           _PUN,           _PUN,
 
584
 
 
585
/*      188 onequarter  189 onehalf     190 threequarters 191 questiondown*/
 
586
        _PUN,           _PUN,           _PUN,           _PUN,
 
587
 
 
588
/*      192 Agrave      193 Aacute      194 Acircumflex 195 Atilde      */
 
589
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
590
 
 
591
/*      196 Adiaeresis  197 Aring       198 AE          199 Ccedilla    */
 
592
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
593
 
 
594
/*      200 Egrave      201 Eacute      202 Ecircumflex 203 Ediaeresis  */
 
595
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
596
 
 
597
/*      204 Igrave      205 Iacute      206 Icircumflex 207 Idiaeresis  */
 
598
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
599
 
 
600
/*      208 ETH         209 Ntilde      210 Ograve      211 Oacute      */
 
601
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
602
 
 
603
/*      212 Ocircumflex 213 Otilde      214 Odiaeresis  215 multiply    */
 
604
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _PUN,
 
605
 
 
606
/*      216 Ooblique    217 Ugrave      218 Uacute      219 Ucircumflex */
 
607
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
608
 
 
609
/*      220 Udiaeresis  221 Yacute      222 THORN       223 ssharp      */
 
610
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_DOW,
 
611
 
 
612
/*      224 agrave      225 aacute      226 acircumflex 227 atilde      */
 
613
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
614
 
 
615
/*      228 adiaeresis  229 aring       230 ae          231 ccedilla    */
 
616
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
617
 
 
618
/*      232 egrave      233 eacute      234 ecircumflex 235 ediaeresis  */
 
619
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
620
 
 
621
/*      236 igrave      237 iacute      238 icircumflex 239 idiaeresis  */
 
622
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
623
 
 
624
/*      240 eth         241 ntilde      242 ograve      243 oacute      */
 
625
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
626
 
 
627
/*      244 ocircumflex 245 otilde      246 odiaeresis  247 division    */
 
628
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _PUN,
 
629
 
 
630
/*      248 oslash      249 ugrave      250 uacute      251 ucircumflex */
 
631
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
632
 
 
633
/*      252 udiaeresis  253 yacute      254 thorn       255 ydiaeresis  */
 
634
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
635
};
 
636
 
 
637
short _enable_mbdisp = 0; /* control multi-byte 0...disable 1...enable */
 
638
 
 
639
/* multi-byte check table */
 
640
/* default = all 0 (clear process in update_vars()/unset()) */
 
641
unsigned short _mbmap[256];
 
642
 
 
643
unsigned short _mbmap_euc[256] = {
 
644
/* first byte   0x8e,0xa0 - 0xf4 */
 
645
/* second byte  0xa0 - 0xfe */
 
646
/* 0 - 7f all 0 */
 
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,
 
651
/*  80          81              82              83 */
 
652
    0,          0,              0,              0,
 
653
/*  84          85              86              87 */
 
654
    0,          0,              0,              0,
 
655
/*  88          89              8a              8b */
 
656
    0,          0,              0,              0,
 
657
/*  8c          8d              8e              8f */
 
658
    0,          0,              _MB1,           0,
 
659
/* 90 - 9f all 0 */
 
660
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 
661
/*  a0          a1              a2              a3 */
 
662
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
663
/*  a4          a5              a6              a7 */
 
664
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
665
/*  a8          a9              aa              ab */
 
666
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
667
/*  ac          ad              ae              af */
 
668
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
669
/*  b0          b1              b2              b3 */
 
670
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
671
/*  b4          b5              b6              b7 */
 
672
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
673
/*  b8          b9              ba              bb */
 
674
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
675
/*  bc          bd              be              bf */
 
676
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
677
/*  c0          c1              c2              c3 */
 
678
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
679
/*  c4          c5              c6              c7 */
 
680
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
681
/*  c8          c9              ca              cb */
 
682
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
683
/*  cc          cd              ce              cf */
 
684
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
685
/*  d0          d1              d2              d3 */
 
686
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
687
/*  d4          d5              d6              d7 */
 
688
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
689
/*  d8          d9              da              db */
 
690
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
691
/*  dc          dd              de              df */
 
692
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
693
/*  e0          e1              e2              e3 */
 
694
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
695
/*  e4          e5              e6              e7 */
 
696
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
697
/*  e8          e9              ea              eb */
 
698
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
699
/*  ec          ed              ee              ef */
 
700
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
701
/*  f0          f1              f2              f3 */
 
702
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
703
/*  f4          f5              f6              f7 */
 
704
    _MB1|_MB2,  _MB2,           _MB2,           _MB2,
 
705
/*  f8          f9              fa              fb */
 
706
    _MB2,       _MB2,           _MB2,           _MB2,
 
707
/*  fc          fd              fe              ff */
 
708
    _MB2,       _MB2,           _MB2,           0,
 
709
};
 
710
 
 
711
unsigned short _mbmap_sjis[256] = {
 
712
/* first byte   0x81-0x9f,0xe0 - 0xfc */
 
713
/* second byte  0x40-0x7e,0x80 - 0xfc */
 
714
/* 0 - 3f all 0 */
 
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,
 
717
/*  40          41              42              43 */
 
718
    _MB2,       _MB2,           _MB2,           _MB2,
 
719
/*  44          45              46              47 */
 
720
    _MB2,       _MB2,           _MB2,           _MB2,
 
721
/*  48          49              4a              4b */
 
722
    _MB2,       _MB2,           _MB2,           _MB2,
 
723
/*  4c          4d              4e              4f */
 
724
    _MB2,       _MB2,           _MB2,           _MB2,
 
725
/*  50          51              52              53 */
 
726
    _MB2,       _MB2,           _MB2,           _MB2,
 
727
/*  54          55              56              57 */
 
728
    _MB2,       _MB2,           _MB2,           _MB2,
 
729
/*  58          59              5a              5b */
 
730
    _MB2,       _MB2,           _MB2,           _MB2,
 
731
/*  5c          5d              5e              5f */
 
732
    _MB2,       _MB2,           _MB2,           _MB2,
 
733
/*  60          61              62              63 */
 
734
    _MB2,       _MB2,           _MB2,           _MB2,
 
735
/*  64          65              66              67 */
 
736
    _MB2,       _MB2,           _MB2,           _MB2,
 
737
/*  68          69              6a              6b */
 
738
    _MB2,       _MB2,           _MB2,           _MB2,
 
739
/*  6c          6d              6e              6f */
 
740
    _MB2,       _MB2,           _MB2,           _MB2,
 
741
/*  70          71              72              73 */
 
742
    _MB2,       _MB2,           _MB2,           _MB2,
 
743
/*  74          75              76              77 */
 
744
    _MB2,       _MB2,           _MB2,           _MB2,
 
745
/*  78          79              7a              7b */
 
746
    _MB2,       _MB2,           _MB2,           _MB2,
 
747
/*  7c          7d              7e              7f */
 
748
    _MB2,       _MB2,           _MB2,           0,
 
749
/*  80          81              82              83 */
 
750
    _MB2,       _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
751
/*  84          85              86              87 */
 
752
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
753
/*  88          89              8a              8b */
 
754
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
755
/*  8c          8d              8e              8f */
 
756
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
757
/*  90          91              92              93 */
 
758
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
759
/*  94          95              96              97 */
 
760
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
761
/*  98          99              9a              9b */
 
762
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
763
/*  9c          9d              9e              9f */
 
764
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
765
/*  a0          a1              a2              a3 */
 
766
    _MB2,       _MB2,           _MB2,           _MB2,
 
767
/*  a4          a5              a6              a7 */
 
768
    _MB2,       _MB2,           _MB2,           _MB2,
 
769
/*  a8          a9              aa              ab */
 
770
    _MB2,       _MB2,           _MB2,           _MB2,
 
771
/*  ac          ad              ae              af */
 
772
    _MB2,       _MB2,           _MB2,           _MB2,
 
773
/*  b0          b1              b2              b3 */
 
774
    _MB2,       _MB2,           _MB2,           _MB2,
 
775
/*  b4          b5              b6              b7 */
 
776
    _MB2,       _MB2,           _MB2,           _MB2,
 
777
/*  b8          b9              ba              bb */
 
778
    _MB2,       _MB2,           _MB2,           _MB2,
 
779
/*  bc          bd              be              bf */
 
780
    _MB2,       _MB2,           _MB2,           _MB2,
 
781
/*  c0          c1              c2              c3 */
 
782
    _MB2,       _MB2,           _MB2,           _MB2,
 
783
/*  c4          c5              c6              c7 */
 
784
    _MB2,       _MB2,           _MB2,           _MB2,
 
785
/*  c8          c9              ca              cb */
 
786
    _MB2,       _MB2,           _MB2,           _MB2,
 
787
/*  cc          cd              ce              cf */
 
788
    _MB2,       _MB2,           _MB2,           _MB2,
 
789
/*  d0          d1              d2              d3 */
 
790
    _MB2,       _MB2,           _MB2,           _MB2,
 
791
/*  d4          d5              d6              d7 */
 
792
    _MB2,       _MB2,           _MB2,           _MB2,
 
793
/*  d8          d9              da              db */
 
794
    _MB2,       _MB2,           _MB2,           _MB2,
 
795
/*  dc          dd              de              df */
 
796
    _MB2,       _MB2,           _MB2,           _MB2,
 
797
/*  e0          e1              e2              e3 */
 
798
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
799
/*  e4          e5              e6              e7 */
 
800
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
801
/*  e8          e9              ea              eb */
 
802
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
803
/*  ec          ed              ee              ef */
 
804
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
805
/*  f0          f1              f2              f3 */
 
806
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
807
/*  f4          f5              f6              f7 */
 
808
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
809
/*  f8          f9              fa              fb */
 
810
    _MB1|_MB2,  _MB1|_MB2,      _MB1|_MB2,      _MB1|_MB2,
 
811
/*  fc          fd              fe              ff */
 
812
    _MB1|_MB2,  0,              0,              0,
 
813
};
 
814
 
 
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,
 
819
 
 
820
/*        4 eot           5 enq           6 ack           7 bel */
 
821
        _CTR,           _CTR,           _CTR,           _CTR,
 
822
 
 
823
/*        8 bs            9 ht           10 nl           11 vt  */
 
824
        _CTR,           _CTR|_SP|_META, _CTR|_NL|_META, _CTR,
 
825
 
 
826
/*       12 np           13 cr           14 so           15 si  */
 
827
        _CTR,           _CTR,           _CTR,           _CTR,
 
828
 
 
829
/*       16 dle          17 dc1          18 dc2          19 dc3 */
 
830
        _CTR,           _CTR,           _CTR,           _CTR,
 
831
 
 
832
/*       20 dc4          21 nak          22 syn          23 etb */
 
833
        _CTR,           _CTR,           _CTR,           _CTR,
 
834
 
 
835
/*       24 can          25 em           26 sub          27 esc */
 
836
        _CTR,           _CTR,           _CTR,           _CTR,
 
837
 
 
838
/*       28 fs           29 gs           30 rs           31 us  */
 
839
        _CTR,           _CTR,           _CTR,           _CTR,
 
840
 
 
841
/*       32 sp           33 !            34 "            35 #   */
 
842
        _SP|_META,      _PUN,           _QF|_PUN,       _META|_PUN,
 
843
 
 
844
/*       36 $            37 %            38 &            39 '   */
 
845
        _DOL|_PUN,      _PUN,           _META|_CMD|_PUN,_QF|_PUN,
 
846
 
 
847
/*       40 (            41 )            42 *            43 +   */
 
848
        _META|_CMD|_PUN,_META|_PUN,     _GLOB|_PUN,     _PUN,
 
849
 
 
850
/*       44 ,            45 -            46 .            47 /   */
 
851
        _PUN,           _PUN,           _PUN,           _PUN,
 
852
 
 
853
/*       48 0            49 1            50 2            51 3   */
 
854
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
855
 
 
856
/*       52 4            53 5            54 6            55 7   */
 
857
        _DIG|_XD,       _DIG|_XD,       _DIG|_XD,       _DIG|_XD,
 
858
 
 
859
/*       56 8            57 9            58 :            59 ;   */
 
860
        _DIG|_XD,       _DIG|_XD,       _PUN,           _META|_CMD|_PUN,
 
861
 
 
862
/*       60 <            61 =            62 >            63 ?   */
 
863
        _META|_PUN,     _PUN,           _META|_PUN,     _GLOB|_PUN,
 
864
 
 
865
/*       64 @            65 A            66 B            67 C   */
 
866
        _PUN,           _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,
 
867
 
 
868
/*       68 D            69 E            70 F            71 G   */
 
869
        _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP|_XD,   _LET|_UP,
 
870
 
 
871
/*       72 H            73 I            74 J            75 K   */
 
872
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
873
 
 
874
/*       76 L            77 M            78 N            79 O   */
 
875
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
876
 
 
877
/*       80 P            81 Q            82 R            83 S   */
 
878
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
879
 
 
880
/*       84 T            85 U            86 V            87 W   */
 
881
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
882
 
 
883
/*       88 X            89 Y            90 Z            91 [   */
 
884
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _GLOB|_PUN,
 
885
 
 
886
/*       92 \            93 ]            94 ^            95 _   */
 
887
        _ESC|_PUN,      _PUN,           _PUN,           _PUN,
 
888
 
 
889
/*       96 `            97 a            98 b            99 c   */
 
890
  _QB|_GLOB|_META|_PUN, _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,
 
891
 
 
892
/*      100 d           101 e           102 f           103 g   */
 
893
        _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW|_XD,  _LET|_DOW,
 
894
 
 
895
/*      104 h           105 i           106 j           107 k   */
 
896
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
897
 
 
898
/*      108 l           109 m           110 n           111 o   */
 
899
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
900
 
 
901
/*      112 p           113 q           114 r           115 s   */
 
902
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
903
 
 
904
/*      116 t           117 u           118 v           119 w   */
 
905
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
906
 
 
907
/*      120 x           121 y           122 z           123 {   */
 
908
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _GLOB|_PUN,
 
909
 
 
910
/*      124 |           125 }           126 ~           127 del */
 
911
        _META|_CMD|_PUN,_PUN,           _PUN,           _CTR,
 
912
 
 
913
#ifdef SHORT_STRINGS
 
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,
 
919
 
 
920
/*      132 (undef)     133 (undef)     134 (undef)     135 (undef)     */
 
921
        _CTR,           _CTR,           _CTR,           _CTR,
 
922
 
 
923
/*      136 (undef)     137 (undef)     138 (undef)     139 (undef)     */
 
924
        _CTR,           _CTR,           _CTR,           _CTR,
 
925
 
 
926
/*      140 (undef)     141 (undef)     142 (undef)     143 (undef)     */
 
927
        _CTR,           _CTR,           _CTR,           _CTR,
 
928
 
 
929
/*      144 (undef)     145 (undef)     146 (undef)     147 (undef)     */
 
930
        _CTR,           _CTR,           _CTR,           _CTR,
 
931
 
 
932
/*      148 (undef)     149 (undef)     150 (undef)     151 (undef)     */
 
933
        _CTR,           _CTR,           _CTR,           _CTR,
 
934
 
 
935
/*      152 (undef)     153 (undef)     154 (undef)     155 (undef)     */
 
936
        _CTR,           _CTR,           _CTR,           _CTR,
 
937
 
 
938
/*      156 (undef)     157 (undef)     158 (undef)     159 (undef)     */
 
939
        _CTR,           _CTR,           _CTR,           _CTR,
 
940
 
 
941
/*      160 nobreakspace 161 exclamdown 162 cent        163 sterling    */
 
942
        _PUN, /* XXX */ _PUN,           _PUN,           _PUN,
 
943
 
 
944
/*      164 currency    165 yen         166 brokenbar   167 section     */
 
945
        _PUN,           _PUN,           _PUN,           _PUN,
 
946
 
 
947
/*      168 diaeresis   169 copyright   170 ordfeminine 171 guillemotleft*/
 
948
        _PUN,           _PUN,           _PUN,           _PUN,
 
949
 
 
950
/*      172 notsign     173 hyphen      174 registered  175 macron      */
 
951
        _PUN,           _PUN,           _PUN,           _PUN,
 
952
 
 
953
/*      176 degree      177 plusminus   178 twosuperior 179 threesuperior*/
 
954
        _PUN,           _PUN,           _PUN,           _PUN,
 
955
 
 
956
/*      180 acute       181 mu          182 paragraph   183 periodcentered*/
 
957
        _PUN,           _PUN, /*XXX*/   _PUN,           _PUN,
 
958
 
 
959
/*      184 cedilla     185 onesuperior 186 masculine   187 guillemotright*/
 
960
        _PUN,           _PUN,           _PUN,           _PUN,
 
961
 
 
962
/*      188 onequarter  189 onehalf     190 threequarters 191 questiondown*/
 
963
        _PUN,           _PUN,           _PUN,           _PUN,
 
964
 
 
965
/*      192 Agrave      193 Aacute      194 Acircumflex 195 Atilde      */
 
966
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
967
 
 
968
/*      196 Adiaeresis  197 Aring       198 AE          199 Ccedilla    */
 
969
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
970
 
 
971
/*      200 Egrave      201 Eacute      202 Ecircumflex 203 Ediaeresis  */
 
972
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
973
 
 
974
/*      204 Igrave      205 Iacute      206 Icircumflex 207 Idiaeresis  */
 
975
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
976
 
 
977
/*      208 ETH         209 Ntilde      210 Ograve      211 Oacute      */
 
978
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
979
 
 
980
/*      212 Ocircumflex 213 Otilde      214 Odiaeresis  215 multiply    */
 
981
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _PUN,
 
982
 
 
983
/*      216 Ooblique    217 Ugrave      218 Uacute      219 Ucircumflex */
 
984
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_UP,
 
985
 
 
986
/*      220 Udiaeresis  221 Yacute      222 THORN       223 ssharp      */
 
987
        _LET|_UP,       _LET|_UP,       _LET|_UP,       _LET|_DOW,
 
988
 
 
989
/*      224 agrave      225 aacute      226 acircumflex 227 atilde      */
 
990
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
991
 
 
992
/*      228 adiaeresis  229 aring       230 ae          231 ccedilla    */
 
993
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
994
 
 
995
/*      232 egrave      233 eacute      234 ecircumflex 235 ediaeresis  */
 
996
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
997
 
 
998
/*      236 igrave      237 iacute      238 icircumflex 239 idiaeresis  */
 
999
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
1000
 
 
1001
/*      240 eth         241 ntilde      242 ograve      243 oacute      */
 
1002
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
1003
 
 
1004
/*      244 ocircumflex 245 otilde      246 odiaeresis  247 division    */
 
1005
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _PUN,
 
1006
 
 
1007
/*      248 oslash      249 ugrave      250 uacute      251 ucircumflex */
 
1008
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
1009
 
 
1010
/*      252 udiaeresis  253 yacute      254 thorn       255 ydiaeresis  */
 
1011
        _LET|_DOW,      _LET|_DOW,      _LET|_DOW,      _LET|_DOW,
 
1012
#endif /* SHORT_STRINGS */
 
1013
};
 
1014
#endif /* defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE) */
 
1015
 
 
1016
#ifndef NLS
 
1017
/* _cmap_lower, _cmap_upper for ISO 8859/1 */
 
1018
 
 
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,
 
1052
};
 
1053
 
 
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,
 
1087
};
 
1088
#endif /* NLS */
 
1089
 
 
1090
#ifdef _OSD_POSIX
 
1091
/*
 
1092
           Initial Port for tcsh-6.07.04 by <Martin.Kraemer@Mch.SNI.De>
 
1093
 
 
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.
 
1098
 
 
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.{.}.~ *
 
1117
*/
 
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.{.}.~ */
 
1151
};
 
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  * ................ *
 
1169
*/
 
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   /* ................ */
 
1203
};
 
1204
 
 
1205
#endif /*_OSD_POSIX*/