|
|
1.1 root 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[] = "@(#)mkdstoas.c 3.2 (Berkeley) 3/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:
34: int
35: main()
36: {
37: int i;
38:
39: /* For each display code, find the ascii code that matches */
40:
41: printf("unsigned char disp_asc[256] = {");
42: for (i = 0; i < sizeof disp_ebc; i++) {
43: if ((i%8) == 0) {
44: printf("\n");
45: }
46: printf("\t0x%02x,", ebc_asc[disp_ebc[i]]);
47: }
48: for (i = sizeof disp_ebc; i < 256; i++) {
49: if ((i%8) == 0) {
50: printf("\n");
51: }
52: printf("\t0x%02x,", ' ');
53: }
54: printf("\n};\n");
55:
56: return 0;
57: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.