/* * Copyright (c) 1984-1987 by the Regents of the * University of California and by Gregory Glenn Minshall. * * Permission to use, copy, modify, and distribute these * programs and their documentation for any purpose and * without fee is hereby granted, provided that this * copyright and permission appear on all copies and * supporting documentation, the name of the Regents of * the University of California not be used in advertising * or publicity pertaining to distribution of the programs * without specific prior permission, and notice be given in * supporting documentation that copying and distribution is * by permission of the Regents of the University of California * and by Gregory Glenn Minshall. Neither the Regents of the * University of California nor Gregory Glenn Minshall make * representations about the suitability of this software * for any purpose. It is provided "as is" without * express or implied warranty. */ #ifndef lint static char sccsid[] = "@(#)mkdstoas.c 3.1 (Berkeley) 08/11/87"; #endif /* not lint */ #include #if defined(unix) #include #else /* defined(unix) */ #include #endif /* defined(unix) */ #include #include "../api/asc_ebc.h" #include "../api/ebc_disp.h" int main() { int i; /* For each display code, find the ascii code that matches */ printf("unsigned char disp_asc[256] = {"); for (i = 0; i < sizeof disp_ebc; i++) { if ((i%8) == 0) { printf("\n"); } printf("\t0x%02x,", ebc_asc[disp_ebc[i]]); } for (i = sizeof disp_ebc; i < 256; i++) { if ((i%8) == 0) { printf("\n"); } printf("\t0x%02x,", ' '); } printf("\n};\n"); return 0; }