Commit | Line | Data |
---|---|---|
4718d085 | 1 | #include "../api/ebc_disp.h" |
e7f863aa GM |
2 | #include "ectype.h" |
3 | ||
4 | ||
5 | extern unsigned char ectype[256]; | |
6 | ||
7 | ||
8 | void | |
9 | main() | |
10 | { | |
e56fc5cb | 11 | static unsigned char dctype[192] = { 0 }; |
e7f863aa GM |
12 | int i; |
13 | char *orbar; | |
14 | int type; | |
15 | ||
16 | for (i = 0; i < sizeof ectype; i++) { | |
17 | dctype[ebc_disp[i]] = ectype[i]; | |
18 | } | |
19 | ||
20 | for (i = 0; i < sizeof dctype; i++) { | |
21 | if ((i%16) == 0) { | |
22 | printf("/*%02x*/\n", i); | |
23 | } | |
24 | printf("\t"); | |
25 | type = dctype[i]; | |
26 | orbar = ""; | |
27 | if (type & E_UPPER) { | |
28 | printf("E_UPPER"); | |
29 | orbar = "|"; | |
30 | } | |
31 | if (type & E_LOWER) { | |
32 | printf("%sD_LOWER", orbar); | |
33 | orbar = "|"; | |
34 | } | |
35 | if (type & E_DIGIT) { | |
36 | printf("%sD_DIGIT", orbar); | |
37 | orbar = "|"; | |
38 | } | |
39 | if (type & E_SPACE) { | |
40 | printf("%sD_SPACE", orbar); | |
41 | orbar = "|"; | |
42 | } | |
43 | if (type & E_PUNCT) { | |
44 | printf("%sD_PUNCT", orbar); | |
45 | orbar = "|"; | |
46 | } | |
47 | if (type & E_PRINT) { | |
48 | printf("%sD_PRINT", orbar); | |
49 | orbar = "|"; | |
50 | } | |
51 | if (orbar[0] == 0) { | |
52 | printf("0"); | |
53 | } | |
54 | printf(",\n"); | |
55 | } | |
56 | } |