148763Sbostic /*-
2*62352Sbostic  * Copyright (c) 1988, 1993
3*62352Sbostic  *	The Regents of the University of California.  All rights reserved.
431897Sminshall  *
548763Sbostic  * %sccs.include.redist.c%
631897Sminshall  */
731897Sminshall 
831897Sminshall #ifndef lint
9*62352Sbostic static char copyright[] =
10*62352Sbostic "@(#) Copyright (c) 1988, 1993\n\
11*62352Sbostic 	The Regents of the University of California.  All rights reserved.\n";
1233811Sbostic #endif /* not lint */
1331897Sminshall 
1433811Sbostic #ifndef lint
15*62352Sbostic static char sccsid[] = "@(#)mkastods.c	8.1 (Berkeley) 06/06/93";
1633811Sbostic #endif /* not lint */
1733811Sbostic 
1831172Sminshall #include <stdio.h>
1931172Sminshall #if	defined(unix)
2031172Sminshall #include <strings.h>
2131172Sminshall #else	/* defined(unix) */
2231172Sminshall #include <string.h>
2331172Sminshall #endif	/* defined(unix) */
2431172Sminshall #include <ctype.h>
2531875Sminshall #include "../api/asc_ebc.h"
2631875Sminshall #include "../api/ebc_disp.h"
2731172Sminshall 
2831172Sminshall int
main()2931172Sminshall main()
3031172Sminshall {
3131172Sminshall     int i;
3231172Sminshall 
3331172Sminshall     /* For each ascii code, find the display code that matches */
3431172Sminshall 
3531172Sminshall     printf("unsigned char asc_disp[256] = {");
3631172Sminshall     for (i = 0; i < NASCII; i++) {
3731172Sminshall 	if ((i%8) == 0) {
3831172Sminshall 	    printf("\n");
3931172Sminshall 	}
4031614Sminshall 	printf("\t0x%02x,", ebc_disp[asc_ebc[i]]);
4131172Sminshall     }
4231172Sminshall     for (i = sizeof disp_ebc; i < 256; i++) {
4331172Sminshall 	if ((i%8) == 0) {
4431172Sminshall 	    printf("\n");
4531172Sminshall 	}
4631172Sminshall 	printf("\t0x%02x,", 0);
4731172Sminshall     }
4831172Sminshall     printf("\n};\n");
4931172Sminshall 
5031172Sminshall     return 0;
5131172Sminshall }
52