148763Sbostic /*- 2*62358Sbostic * Copyright (c) 1988, 1993 3*62358Sbostic * The Regents of the University of California. All rights reserved. 431896Sminshall * 548763Sbostic * %sccs.include.redist.c% 631896Sminshall */ 731896Sminshall 831896Sminshall #ifndef lint 9*62358Sbostic static char copyright[] = 10*62358Sbostic "@(#) Copyright (c) 1988, 1993\n\ 11*62358Sbostic The Regents of the University of California. All rights reserved.\n"; 1233811Sbostic #endif /* not lint */ 1331896Sminshall 1433811Sbostic #ifndef lint 15*62358Sbostic static char sccsid[] = "@(#)mkdstoas.c 8.1 (Berkeley) 06/06/93"; 1633811Sbostic #endif /* not lint */ 1733811Sbostic 1830050Sminshall #include <stdio.h> 1931102Sminshall #if defined(unix) 2031065Sminshall #include <strings.h> 2131102Sminshall #else /* defined(unix) */ 2231102Sminshall #include <string.h> 2331102Sminshall #endif /* defined(unix) */ 2430050Sminshall #include <ctype.h> 2531875Sminshall #include "../api/asc_ebc.h" 2631875Sminshall #include "../api/ebc_disp.h" 2730050Sminshall 2830050Sminshall 2931102Sminshall int main()3030050Sminshallmain() 3130050Sminshall { 3230050Sminshall int i; 3330050Sminshall 3430050Sminshall /* For each display code, find the ascii code that matches */ 3530050Sminshall 3630071Sminshall printf("unsigned char disp_asc[256] = {"); 3730050Sminshall for (i = 0; i < sizeof disp_ebc; i++) { 3830050Sminshall if ((i%8) == 0) { 3930050Sminshall printf("\n"); 4030050Sminshall } 4131614Sminshall printf("\t0x%02x,", ebc_asc[disp_ebc[i]]); 4230050Sminshall } 4330071Sminshall for (i = sizeof disp_ebc; i < 256; i++) { 4430071Sminshall if ((i%8) == 0) { 4530071Sminshall printf("\n"); 4630071Sminshall } 4731170Sminshall printf("\t0x%02x,", ' '); 4830071Sminshall } 4930050Sminshall printf("\n};\n"); 5031102Sminshall 5131102Sminshall return 0; 5230050Sminshall } 53