Commit | Line | Data |
---|---|---|
992de934 | 1 | /* |
0de390c0 KB |
2 | * Copyright (c) 1988 Regents of the University of California. |
3 | * All rights reserved. | |
992de934 | 4 | * |
0de390c0 KB |
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. | |
992de934 GM |
11 | */ |
12 | ||
13 | #ifndef lint | |
0de390c0 KB |
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[] = "@(#)mkdstoas.c 3.2 (Berkeley) %G%"; | |
21 | #endif /* not lint */ | |
992de934 | 22 | |
8d73ea61 | 23 | #include <stdio.h> |
e56fc5cb | 24 | #if defined(unix) |
577b1ba9 | 25 | #include <strings.h> |
e56fc5cb GM |
26 | #else /* defined(unix) */ |
27 | #include <string.h> | |
28 | #endif /* defined(unix) */ | |
8d73ea61 | 29 | #include <ctype.h> |
4718d085 GM |
30 | #include "../api/asc_ebc.h" |
31 | #include "../api/ebc_disp.h" | |
8d73ea61 GM |
32 | |
33 | ||
e56fc5cb | 34 | int |
8d73ea61 GM |
35 | main() |
36 | { | |
37 | int i; | |
38 | ||
39 | /* For each display code, find the ascii code that matches */ | |
40 | ||
663ee4bc | 41 | printf("unsigned char disp_asc[256] = {"); |
8d73ea61 GM |
42 | for (i = 0; i < sizeof disp_ebc; i++) { |
43 | if ((i%8) == 0) { | |
44 | printf("\n"); | |
45 | } | |
138011c0 | 46 | printf("\t0x%02x,", ebc_asc[disp_ebc[i]]); |
663ee4bc GM |
47 | } |
48 | for (i = sizeof disp_ebc; i < 256; i++) { | |
49 | if ((i%8) == 0) { | |
50 | printf("\n"); | |
51 | } | |
409b86f8 | 52 | printf("\t0x%02x,", ' '); |
8d73ea61 GM |
53 | } |
54 | printf("\n};\n"); | |
e56fc5cb GM |
55 | |
56 | return 0; | |
8d73ea61 | 57 | } |