xref: /original-bsd/usr.bin/tn3270/api/asctab.c (revision 71b05459)
1 /*
2  * Copyright (c) 1988 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  */
17 
18 #ifndef lint
19 static char sccsid[] = "@(#)asctab.c	4.1 (Berkeley) 12/04/88";
20 #endif /* not lint */
21 
22 /*
23  * ascii to ebcdic translation tables
24  */
25 
26 #include "ascebc.h"
27 
28 unsigned char ascebc[NASCEBC][NASCII]	= {
29 
30 /*
31  * printer translation
32  */
33 
34 /* 000 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
35 /* 010 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
36 /* 020 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
37 /* 030 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
38 /* 040 */   0x40,  0x5A,  0x7F,  0x7B,  0x5B,  0x6C,  0x50,  0x74,
39 /* 050 */   0x4D,  0x5D,  0x5C,  0x4E,  0x6B,  0x60,  0x4B,  0x61,
40 /* 060 */   0xF0,  0xF1,  0xF2,  0xF3,  0xF4,  0xF5,  0xF6,  0xF7,
41 /* 070 */   0xF8,  0xF9,  0x7A,  0x5E,  0x4C,  0x7E,  0x6E,  0x6F,
42 /* 100 */   0x7C,  0xC1,  0xC2,  0xC3,  0xC4,  0xC5,  0xC6,  0xC7,
43 /* 110 */   0xC8,  0xC9,  0xD1,  0xD2,  0xD3,  0xD4,  0xD5,  0xD6,
44 /* 120 */   0xD7,  0xD8,  0xD9,  0xE2,  0xE3,  0xE4,  0xE5,  0xE6,
45 /* 130 */   0xE7,  0xE8,  0xE9,  0xAD,  0xE0,  0xBD,  0x71,  0x6D,
46 /* 140 */   0x79,  0x81,  0x82,  0x83,  0x84,  0x85,  0x86,  0x87,
47 /* 150 */   0x88,  0x89,  0x91,  0x92,  0x93,  0x94,  0x95,  0x96,
48 /* 160 */   0x97,  0x98,  0x99,  0xA2,  0xA3,  0xA4,  0xA5,  0xA6,
49 /* 170 */   0xA7,  0xA8,  0xA9,  0xC0,  0x4F,  0xD0,  0xA1,  0x00,
50 
51 /*
52  * input translation
53  */
54 
55 /* 000 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
56 /* 010 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
57 /* 020 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
58 /* 030 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
59 /* 040 */   0x40,  0x5A,  0x7F,  0x7B,  0x5B,  0x6C,  0x50,  0x7D,
60 /* 050 */   0x4D,  0x5D,  0x5C,  0x4E,  0x6B,  0x60,  0x4B,  0x61,
61 /* 060 */   0xF0,  0xF1,  0xF2,  0xF3,  0xF4,  0xF5,  0xF6,  0xF7,
62 /* 070 */   0xF8,  0xF9,  0x7A,  0x5E,  0x4C,  0x7E,  0x6E,  0x6F,
63 /* 100 */   0x7C,  0xC1,  0xC2,  0xC3,  0xC4,  0xC5,  0xC6,  0xC7,
64 /* 110 */   0xC8,  0xC9,  0xD1,  0xD2,  0xD3,  0xD4,  0xD5,  0xD6,
65 /* 120 */   0xD7,  0xD8,  0xD9,  0xE2,  0xE3,  0xE4,  0xE5,  0xE6,
66 /* 130 */   0xE7,  0xE8,  0xE9,  0xAD,  0xE0,  0xBD,  0x5F,  0x6D,
67 /* 140 */   0x79,  0x81,  0x82,  0x83,  0x84,  0x85,  0x86,  0x87,
68 /* 150 */   0x88,  0x89,  0x91,  0x92,  0x93,  0x94,  0x95,  0x96,
69 /* 160 */   0x97,  0x98,  0x99,  0xA2,  0xA3,  0xA4,  0xA5,  0xA6,
70 /* 170 */   0xA7,  0xA8,  0xA9,  0xC0,  0x4F,  0xD0,  0xA1,  0x00,
71 
72 /*
73  * special translation - for IBM 6670 laser printer.
74  * Used by iroff and ipr.  The control characters 030-037 have been mapped
75  * into printable (though non-ascii) characters.  Bell 007 and backspace 010
76  * translate to the corresponding ebcdic characters, and ^N 016 and ^O 017
77  * map to ebcdic SBS (subscript) and SPS (superscript).
78  */
79 
80 /* 000 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x2F,
81 /* 010 */   0x16,  0x00,  0x00,  0x00,  0x00,  0x00,  0x38,  0x09,
82 /* 020 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
83 /* 030 */   0x8D,  0x9D,  0x9E,  0x8B,  0x4A,  0x9B,  0x8C,  0xAE,
84 /* 040 */   0x40,  0x5A,  0x7F,  0x7B,  0x5B,  0x6C,  0x50,  0x7D,
85 /* 050 */   0x4D,  0x5D,  0x5C,  0x4E,  0x6B,  0x60,  0x4B,  0x61,
86 /* 060 */   0xF0,  0xF1,  0xF2,  0xF3,  0xF4,  0xF5,  0xF6,  0xF7,
87 /* 070 */   0xF8,  0xF9,  0x7A,  0x5E,  0x4C,  0x7E,  0x6E,  0x6F,
88 /* 100 */   0x7C,  0xC1,  0xC2,  0xC3,  0xC4,  0xC5,  0xC6,  0xC7,
89 /* 110 */   0xC8,  0xC9,  0xD1,  0xD2,  0xD3,  0xD4,  0xD5,  0xD6,
90 /* 120 */   0xD7,  0xD8,  0xD9,  0xE2,  0xE3,  0xE4,  0xE5,  0xE6,
91 /* 130 */   0xE7,  0xE8,  0xE9,  0xAD,  0xE0,  0xBD,  0x5F,  0x6D,
92 /* 140 */   0x79,  0x81,  0x82,  0x83,  0x84,  0x85,  0x86,  0x87,
93 /* 150 */   0x88,  0x89,  0x91,  0x92,  0x93,  0x94,  0x95,  0x96,
94 /* 160 */   0x97,  0x98,  0x99,  0xA2,  0xA3,  0xA4,  0xA5,  0xA6,
95 /* 170 */   0xA7,  0xA8,  0xA9,  0xC0,  0x4F,  0xD0,  0xA1,  0x00,
96 
97 /*
98  * text translation - all graphics retained.
99  */
100 
101 /* 000 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
102 /* 010 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
103 /* 020 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
104 /* 030 */   0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
105 /* 040 */   0x40,  0x5A,  0x7F,  0x7B,  0x5B,  0x6C,  0x50,  0x7D,
106 /* 050 */   0x4D,  0x5D,  0x5C,  0x4E,  0x6B,  0x60,  0x4B,  0x61,
107 /* 060 */   0xF0,  0xF1,  0xF2,  0xF3,  0xF4,  0xF5,  0xF6,  0xF7,
108 /* 070 */   0xF8,  0xF9,  0x7A,  0x5E,  0x4C,  0x7E,  0x6E,  0x6F,
109 /* 100 */   0x7C,  0xC1,  0xC2,  0xC3,  0xC4,  0xC5,  0xC6,  0xC7,
110 /* 110 */   0xC8,  0xC9,  0xD1,  0xD2,  0xD3,  0xD4,  0xD5,  0xD6,
111 /* 120 */   0xD7,  0xD8,  0xD9,  0xE2,  0xE3,  0xE4,  0xE5,  0xE6,
112 /* 130 */   0xE7,  0xE8,  0xE9,  0xAD,  0xE0,  0xBD,  0x71,  0x6D,
113 /* 140 */   0x79,  0x81,  0x82,  0x83,  0x84,  0x85,  0x86,  0x87,
114 /* 150 */   0x88,  0x89,  0x91,  0x92,  0x93,  0x94,  0x95,  0x96,
115 /* 160 */   0x97,  0x98,  0x99,  0xA2,  0xA3,  0xA4,  0xA5,  0xA6,
116 /* 170 */   0xA7,  0xA8,  0xA9,  0xC0,  0x4F,  0xD0,  0xA1,  0x00,
117 };
118