1 /*-
2  * Copyright (c) 1988, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char copyright[] =
10 "@(#) Copyright (c) 1988, 1993\n\
11 	The Regents of the University of California.  All rights reserved.\n";
12 #endif /* not lint */
13 
14 #ifndef lint
15 static char sccsid[] = "@(#)mkdstoas.c	8.1 (Berkeley) 06/06/93";
16 #endif /* not lint */
17 
18 #include <stdio.h>
19 #if	defined(unix)
20 #include <strings.h>
21 #else	/* defined(unix) */
22 #include <string.h>
23 #endif	/* defined(unix) */
24 #include <ctype.h>
25 #include "../api/asc_ebc.h"
26 #include "../api/ebc_disp.h"
27 
28 
29 int
30 main()
31 {
32     int i;
33 
34     /* For each display code, find the ascii code that matches */
35 
36     printf("unsigned char disp_asc[256] = {");
37     for (i = 0; i < sizeof disp_ebc; i++) {
38 	if ((i%8) == 0) {
39 	    printf("\n");
40 	}
41 	printf("\t0x%02x,", ebc_asc[disp_ebc[i]]);
42     }
43     for (i = sizeof disp_ebc; i < 256; i++) {
44 	if ((i%8) == 0) {
45 	    printf("\n");
46 	}
47 	printf("\t0x%02x,", ' ');
48     }
49     printf("\n};\n");
50 
51     return 0;
52 }
53