aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/ebcdic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/ebcdic.c')
-rw-r--r--arch/s390/kernel/ebcdic.c400
1 files changed, 400 insertions, 0 deletions
diff --git a/arch/s390/kernel/ebcdic.c b/arch/s390/kernel/ebcdic.c
new file mode 100644
index 000000000000..bb0f973137f0
--- /dev/null
+++ b/arch/s390/kernel/ebcdic.c
@@ -0,0 +1,400 @@
1/*
2 * arch/s390/kernel/ebcdic.c
3 * ECBDIC -> ASCII, ASCII -> ECBDIC,
4 * upper to lower case (EBCDIC) conversion tables.
5 *
6 * S390 version
7 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
8 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
9 * Martin Peschke <peschke@fh-brandenburg.de>
10 */
11
12#include <linux/module.h>
13#include <asm/types.h>
14
15/*
16 * ASCII (IBM PC 437) -> EBCDIC 037
17 */
18__u8 _ascebc[256] =
19{
20 /*00 NUL SOH STX ETX EOT ENQ ACK BEL */
21 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F,
22 /*08 BS HT LF VT FF CR SO SI */
23 /* ->NL */
24 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
25 /*10 DLE DC1 DC2 DC3 DC4 NAK SYN ETB */
26 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26,
27 /*18 CAN EM SUB ESC FS GS RS US */
28 /* ->IGS ->IRS ->IUS */
29 0x18, 0x19, 0x3F, 0x27, 0x22, 0x1D, 0x1E, 0x1F,
30 /*20 SP ! " # $ % & ' */
31 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D,
32 /*28 ( ) * + , - . / */
33 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,
34 /*30 0 1 2 3 4 5 6 7 */
35 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
36 /*38 8 9 : ; < = > ? */
37 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,
38 /*40 @ A B C D E F G */
39 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
40 /*48 H I J K L M N O */
41 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
42 /*50 P Q R S T U V W */
43 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6,
44 /*58 X Y Z [ \ ] ^ _ */
45 0xE7, 0xE8, 0xE9, 0xBA, 0xE0, 0xBB, 0xB0, 0x6D,
46 /*60 ` a b c d e f g */
47 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
48 /*68 h i j k l m n o */
49 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
50 /*70 p q r s t u v w */
51 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
52 /*78 x y z { | } ~ DL */
53 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07,
54 /*80*/
55 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
56 /*88*/
57 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
58 /*90*/
59 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
60 /*98*/
61 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
62 /*A0*/
63 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
64 /*A8*/
65 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
66 /*B0*/
67 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
68 /*B8*/
69 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
70 /*C0*/
71 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
72 /*C8*/
73 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
74 /*D0*/
75 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
76 /*D8*/
77 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
78 /*E0 sz */
79 0x3F, 0x59, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
80 /*E8*/
81 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
82 /*F0*/
83 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
84 /*F8*/
85 0x90, 0x3F, 0x3F, 0x3F, 0x3F, 0xEA, 0x3F, 0xFF
86};
87
88/*
89 * EBCDIC 037 -> ASCII (IBM PC 437)
90 */
91__u8 _ebcasc[256] =
92{
93 /* 0x00 NUL SOH STX ETX *SEL HT *RNL DEL */
94 0x00, 0x01, 0x02, 0x03, 0x07, 0x09, 0x07, 0x7F,
95 /* 0x08 -GE -SPS -RPT VT FF CR SO SI */
96 0x07, 0x07, 0x07, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
97 /* 0x10 DLE DC1 DC2 DC3 -RES -NL BS -POC
98 -ENP ->LF */
99 0x10, 0x11, 0x12, 0x13, 0x07, 0x0A, 0x08, 0x07,
100 /* 0x18 CAN EM -UBS -CU1 -IFS -IGS -IRS -ITB
101 -IUS */
102 0x18, 0x19, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
103 /* 0x20 -DS -SOS FS -WUS -BYP LF ETB ESC
104 -INP */
105 0x07, 0x07, 0x1C, 0x07, 0x07, 0x0A, 0x17, 0x1B,
106 /* 0x28 -SA -SFE -SM -CSP -MFA ENQ ACK BEL
107 -SW */
108 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x06, 0x07,
109 /* 0x30 ---- ---- SYN -IR -PP -TRN -NBS EOT */
110 0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
111 /* 0x38 -SBS -IT -RFF -CU3 DC4 NAK ---- SUB */
112 0x07, 0x07, 0x07, 0x07, 0x14, 0x15, 0x07, 0x1A,
113 /* 0x40 SP RSP ---- */
114 0x20, 0xFF, 0x83, 0x84, 0x85, 0xA0, 0x07, 0x86,
115 /* 0x48 . < ( + | */
116 0x87, 0xA4, 0x9B, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
117 /* 0x50 & ---- */
118 0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x07,
119 /* 0x58 ! $ * ) ; */
120 0x8D, 0xE1, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAA,
121 /* 0x60 - / ---- ---- ---- ---- */
122 0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F,
123 /* 0x68 ---- , % _ > ? */
124 0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
125 /* 0x70 ---- ---- ---- ---- ---- ---- ---- */
126 0x07, 0x90, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
127 /* 0x78 * ` : # @ ' = " */
128 0x70, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
129 /* 0x80 * a b c d e f g */
130 0x07, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
131 /* 0x88 h i ---- ---- ---- */
132 0x68, 0x69, 0xAE, 0xAF, 0x07, 0x07, 0x07, 0xF1,
133 /* 0x90 j k l m n o p */
134 0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
135 /* 0x98 q r ---- ---- */
136 0x71, 0x72, 0xA6, 0xA7, 0x91, 0x07, 0x92, 0x07,
137 /* 0xA0 ~ s t u v w x */
138 0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
139 /* 0xA8 y z ---- ---- ---- ---- */
140 0x79, 0x7A, 0xAD, 0xAB, 0x07, 0x07, 0x07, 0x07,
141 /* 0xB0 ^ ---- ---- */
142 0x5E, 0x9C, 0x9D, 0xFA, 0x07, 0x07, 0x07, 0xAC,
143 /* 0xB8 ---- [ ] ---- ---- ---- ---- */
144 0xAB, 0x07, 0x5B, 0x5D, 0x07, 0x07, 0x07, 0x07,
145 /* 0xC0 { A B C D E F G */
146 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
147 /* 0xC8 H I ---- ---- */
148 0x48, 0x49, 0x07, 0x93, 0x94, 0x95, 0xA2, 0x07,
149 /* 0xD0 } J K L M N O P */
150 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
151 /* 0xD8 Q R ---- */
152 0x51, 0x52, 0x07, 0x96, 0x81, 0x97, 0xA3, 0x98,
153 /* 0xE0 \ S T U V W X */
154 0x5C, 0xF6, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
155 /* 0xE8 Y Z ---- ---- ---- ---- */
156 0x59, 0x5A, 0xFD, 0x07, 0x99, 0x07, 0x07, 0x07,
157 /* 0xF0 0 1 2 3 4 5 6 7 */
158 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
159 /* 0xF8 8 9 ---- ---- ---- ---- ---- */
160 0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07
161};
162
163
164/*
165 * ASCII (IBM PC 437) -> EBCDIC 500
166 */
167__u8 _ascebc_500[256] =
168{
169 /*00 NUL SOH STX ETX EOT ENQ ACK BEL */
170 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F,
171 /*08 BS HT LF VT FF CR SO SI */
172 /* ->NL */
173 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
174 /*10 DLE DC1 DC2 DC3 DC4 NAK SYN ETB */
175 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26,
176 /*18 CAN EM SUB ESC FS GS RS US */
177 /* ->IGS ->IRS ->IUS */
178 0x18, 0x19, 0x3F, 0x27, 0x22, 0x1D, 0x1E, 0x1F,
179 /*20 SP ! " # $ % & ' */
180 0x40, 0x4F, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D,
181 /*28 ( ) * + , - . / */
182 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,
183 /*30 0 1 2 3 4 5 6 7 */
184 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
185 /*38 8 9 : ; < = > ? */
186 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,
187 /*40 @ A B C D E F G */
188 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
189 /*48 H I J K L M N O */
190 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
191 /*50 P Q R S T U V W */
192 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6,
193 /*58 X Y Z [ \ ] ^ _ */
194 0xE7, 0xE8, 0xE9, 0x4A, 0xE0, 0x5A, 0x5F, 0x6D,
195 /*60 ` a b c d e f g */
196 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
197 /*68 h i j k l m n o */
198 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
199 /*70 p q r s t u v w */
200 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
201 /*78 x y z { | } ~ DL */
202 0xA7, 0xA8, 0xA9, 0xC0, 0xBB, 0xD0, 0xA1, 0x07,
203 /*80*/
204 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
205 /*88*/
206 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
207 /*90*/
208 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
209 /*98*/
210 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
211 /*A0*/
212 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
213 /*A8*/
214 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
215 /*B0*/
216 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
217 /*B8*/
218 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
219 /*C0*/
220 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
221 /*C8*/
222 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
223 /*D0*/
224 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
225 /*D8*/
226 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
227 /*E0 sz */
228 0x3F, 0x59, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
229 /*E8*/
230 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
231 /*F0*/
232 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
233 /*F8*/
234 0x90, 0x3F, 0x3F, 0x3F, 0x3F, 0xEA, 0x3F, 0xFF
235};
236
237/*
238 * EBCDIC 500 -> ASCII (IBM PC 437)
239 */
240__u8 _ebcasc_500[256] =
241{
242 /* 0x00 NUL SOH STX ETX *SEL HT *RNL DEL */
243 0x00, 0x01, 0x02, 0x03, 0x07, 0x09, 0x07, 0x7F,
244 /* 0x08 -GE -SPS -RPT VT FF CR SO SI */
245 0x07, 0x07, 0x07, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
246 /* 0x10 DLE DC1 DC2 DC3 -RES -NL BS -POC
247 -ENP ->LF */
248 0x10, 0x11, 0x12, 0x13, 0x07, 0x0A, 0x08, 0x07,
249 /* 0x18 CAN EM -UBS -CU1 -IFS -IGS -IRS -ITB
250 -IUS */
251 0x18, 0x19, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
252 /* 0x20 -DS -SOS FS -WUS -BYP LF ETB ESC
253 -INP */
254 0x07, 0x07, 0x1C, 0x07, 0x07, 0x0A, 0x17, 0x1B,
255 /* 0x28 -SA -SFE -SM -CSP -MFA ENQ ACK BEL
256 -SW */
257 0x07, 0x07, 0x07, 0x07, 0x07, 0x05, 0x06, 0x07,
258 /* 0x30 ---- ---- SYN -IR -PP -TRN -NBS EOT */
259 0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
260 /* 0x38 -SBS -IT -RFF -CU3 DC4 NAK ---- SUB */
261 0x07, 0x07, 0x07, 0x07, 0x14, 0x15, 0x07, 0x1A,
262 /* 0x40 SP RSP ---- */
263 0x20, 0xFF, 0x83, 0x84, 0x85, 0xA0, 0x07, 0x86,
264 /* 0x48 [ . < ( + ! */
265 0x87, 0xA4, 0x5B, 0x2E, 0x3C, 0x28, 0x2B, 0x21,
266 /* 0x50 & ---- */
267 0x26, 0x82, 0x88, 0x89, 0x8A, 0xA1, 0x8C, 0x07,
268 /* 0x58 ] $ * ) ; ^ */
269 0x8D, 0xE1, 0x5D, 0x24, 0x2A, 0x29, 0x3B, 0x5E,
270 /* 0x60 - / ---- ---- ---- ---- */
271 0x2D, 0x2F, 0x07, 0x8E, 0x07, 0x07, 0x07, 0x8F,
272 /* 0x68 ---- , % _ > ? */
273 0x80, 0xA5, 0x07, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
274 /* 0x70 ---- ---- ---- ---- ---- ---- ---- */
275 0x07, 0x90, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
276 /* 0x78 * ` : # @ ' = " */
277 0x70, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
278 /* 0x80 * a b c d e f g */
279 0x07, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
280 /* 0x88 h i ---- ---- ---- */
281 0x68, 0x69, 0xAE, 0xAF, 0x07, 0x07, 0x07, 0xF1,
282 /* 0x90 j k l m n o p */
283 0xF8, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
284 /* 0x98 q r ---- ---- */
285 0x71, 0x72, 0xA6, 0xA7, 0x91, 0x07, 0x92, 0x07,
286 /* 0xA0 ~ s t u v w x */
287 0xE6, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
288 /* 0xA8 y z ---- ---- ---- ---- */
289 0x79, 0x7A, 0xAD, 0xAB, 0x07, 0x07, 0x07, 0x07,
290 /* 0xB0 ---- ---- */
291 0x9B, 0x9C, 0x9D, 0xFA, 0x07, 0x07, 0x07, 0xAC,
292 /* 0xB8 ---- | ---- ---- ---- ---- */
293 0xAB, 0x07, 0xAA, 0x7C, 0x07, 0x07, 0x07, 0x07,
294 /* 0xC0 { A B C D E F G */
295 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
296 /* 0xC8 H I ---- ---- */
297 0x48, 0x49, 0x07, 0x93, 0x94, 0x95, 0xA2, 0x07,
298 /* 0xD0 } J K L M N O P */
299 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
300 /* 0xD8 Q R ---- */
301 0x51, 0x52, 0x07, 0x96, 0x81, 0x97, 0xA3, 0x98,
302 /* 0xE0 \ S T U V W X */
303 0x5C, 0xF6, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
304 /* 0xE8 Y Z ---- ---- ---- ---- */
305 0x59, 0x5A, 0xFD, 0x07, 0x99, 0x07, 0x07, 0x07,
306 /* 0xF0 0 1 2 3 4 5 6 7 */
307 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
308 /* 0xF8 8 9 ---- ---- ---- ---- ---- */
309 0x38, 0x39, 0x07, 0x07, 0x9A, 0x07, 0x07, 0x07
310};
311
312
313/*
314 * EBCDIC 037/500 conversion table:
315 * from upper to lower case
316 */
317__u8 _ebc_tolower[256] =
318{
319 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
320 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
321 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
322 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
323 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
324 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
325 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
326 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
327 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
328 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
329 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
330 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
331 0x60, 0x61, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
332 0x48, 0x49, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
333 0x70, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
334 0x58, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
335 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
336 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
337 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
338 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9C, 0x9F,
339 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
340 0xA8, 0xA9, 0xAA, 0xAB, 0x8C, 0x8D, 0x8E, 0xAF,
341 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,
342 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
343 0xC0, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
344 0x88, 0x89, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
345 0xD0, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
346 0x98, 0x99, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
347 0xE0, 0xE1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
348 0xA8, 0xA9, 0xEA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
349 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
350 0xF8, 0xF9, 0xFA, 0xDB, 0xDC, 0xDD, 0xDE, 0xFF
351};
352
353
354/*
355 * EBCDIC 037/500 conversion table:
356 * from lower to upper case
357 */
358__u8 _ebc_toupper[256] =
359{
360 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
361 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
362 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
363 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
364 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
365 0x28, 0x29, 0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