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 this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  */
12 
13 #ifndef lint
14 char copyright[] =
15 "@(#) Copyright (c) 1988 Regents of the University of California.\n\
16  All rights reserved.\n";
17 #endif /* not lint */
18 
19 #ifndef lint
20 static char sccsid[] = "@(#)mkastods.c	3.2 (Berkeley) 03/28/88";
21 #endif /* not lint */
22 
23 #include <stdio.h>
24 #if	defined(unix)
25 #include <strings.h>
26 #else	/* defined(unix) */
27 #include <string.h>
28 #endif	/* defined(unix) */
29 #include <ctype.h>
30 #include "../api/asc_ebc.h"
31 #include "../api/ebc_disp.h"
32 
33 int
34 main()
35 {
36     int i;
37 
38     /* For each ascii code, find the display code that matches */
39 
40     printf("unsigned char asc_disp[256] = {");
41     for (i = 0; i < NASCII; i++) {
42 	if ((i%8) == 0) {
43 	    printf("\n");
44 	}
45 	printf("\t0x%02x,", ebc_disp[asc_ebc[i]]);
46     }
47     for (i = sizeof disp_ebc; i < 256; i++) {
48 	if ((i%8) == 0) {
49 	    printf("\n");
50 	}
51 	printf("\t0x%02x,", 0);
52     }
53     printf("\n};\n");
54 
55     return 0;
56 }
57