1 /*-
2  * Copyright (c) 1988, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char copyright[] =
10 "@(#) Copyright (c) 1988, 1993\n\
11 	The Regents of the University of California.  All rights reserved.\n";
12 #endif /* not lint */
13 
14 #ifndef lint
15 static char sccsid[] = "@(#)mkdctype.c	8.1 (Berkeley) 06/06/93";
16 #endif /* not lint */
17 
18 #include "../api/ebc_disp.h"
19 #include "ectype.h"
20 
21 
22 extern unsigned char ectype[256];
23 
24 
25 void
26 main()
27 {
28     static unsigned char dctype[192] = { 0 };
29     int i;
30     char *orbar;
31     int type;
32 
33     for (i = 0; i < sizeof ectype; i++) {
34 	dctype[ebc_disp[i]] = ectype[i];
35     }
36 
37     for (i = 0; i < sizeof dctype; i++) {
38 	if ((i%16) == 0) {
39 	    printf("/*%02x*/\n", i);
40 	}
41 	printf("\t");
42 	type = dctype[i];
43 	orbar = "";
44 	if (type & E_UPPER) {
45 	    printf("E_UPPER");
46 	    orbar = "|";
47 	}
48 	if (type & E_LOWER) {
49 	    printf("%sD_LOWER", orbar);
50 	    orbar = "|";
51 	}
52 	if (type & E_DIGIT) {
53 	    printf("%sD_DIGIT", orbar);
54 	    orbar = "|";
55 	}
56 	if (type & E_SPACE) {
57 	    printf("%sD_SPACE", orbar);
58 	    orbar = "|";
59 	}
60 	if (type & E_PUNCT) {
61 	    printf("%sD_PUNCT", orbar);
62 	    orbar = "|";
63 	}
64 	if (type & E_PRINT) {
65 	    printf("%sD_PRINT", orbar);
66 	    orbar = "|";
67 	}
68 	if (orbar[0] == 0) {
69 	    printf("0");
70 	}
71 	printf(",\n");
72     }
73 }
74