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[] = "@(#)mkastods.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 int
29 main()
30 {
31     int i;
32 
33     /* For each ascii code, find the display code that matches */
34 
35     printf("unsigned char asc_disp[256] = {");
36     for (i = 0; i < NASCII; i++) {
37 	if ((i%8) == 0) {
38 	    printf("\n");
39 	}
40 	printf("\t0x%02x,", ebc_disp[asc_ebc[i]]);
41     }
42     for (i = sizeof disp_ebc; i < 256; i++) {
43 	if ((i%8) == 0) {
44 	    printf("\n");
45 	}
46 	printf("\t0x%02x,", 0);
47     }
48     printf("\n};\n");
49 
50     return 0;
51 }
52