New directory structure
[unix-history] / usr / src / usr.bin / tn3270 / tools / mkdstoas / mkdstoas.c
CommitLineData
8d73ea61 1#include <stdio.h>
e56fc5cb 2#if defined(unix)
577b1ba9 3#include <strings.h>
e56fc5cb
GM
4#else /* defined(unix) */
5#include <string.h>
6#endif /* defined(unix) */
8d73ea61 7#include <ctype.h>
138011c0
GM
8#include "../apilib/asc_ebc.h"
9#include "../apilib/ebc_disp.h"
8d73ea61
GM
10
11
e56fc5cb 12int
8d73ea61
GM
13main()
14{
15 int i;
16
17 /* For each display code, find the ascii code that matches */
18
663ee4bc 19 printf("unsigned char disp_asc[256] = {");
8d73ea61
GM
20 for (i = 0; i < sizeof disp_ebc; i++) {
21 if ((i%8) == 0) {
22 printf("\n");
23 }
138011c0 24 printf("\t0x%02x,", ebc_asc[disp_ebc[i]]);
663ee4bc
GM
25 }
26 for (i = sizeof disp_ebc; i < 256; i++) {
27 if ((i%8) == 0) {
28 printf("\n");
29 }
409b86f8 30 printf("\t0x%02x,", ' ');
8d73ea61
GM
31 }
32 printf("\n};\n");
e56fc5cb
GM
33
34 return 0;
8d73ea61 35}