xref: /titanic_41/usr/src/lib/libast/common/features/ccode (revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968)
1*da2e3ebdSchintst output{
2*da2e3ebdSchin	int main()
3*da2e3ebdSchin	{
4*da2e3ebdSchin		printf("\n");
5*da2e3ebdSchin		printf("#define CC_ASCII	1		/* ISO-8859-1			*/\n");
6*da2e3ebdSchin		printf("#define CC_EBCDIC_E	2		/* Xopen dd(1) EBCDIC		*/\n");
7*da2e3ebdSchin		printf("#define CC_EBCDIC_I	3		/* Xopen dd(1) IBM		*/\n");
8*da2e3ebdSchin		printf("#define CC_EBCDIC_O	4		/* IBM-1047 mvs OpenEdition	*/\n");
9*da2e3ebdSchin		printf("#define CC_EBCDIC_S	5		/* Siemens posix-bc		*/\n");
10*da2e3ebdSchin		printf("#define CC_EBCDIC_H	6		/* IBM-37 AS/400		*/\n");
11*da2e3ebdSchin		printf("#define CC_EBCDIC_M	7		/* IBM mvs cobol		*/\n");
12*da2e3ebdSchin		printf("#define CC_EBCDIC_U	8		/* microfocus cobol		*/\n");
13*da2e3ebdSchin		printf("\n");
14*da2e3ebdSchin		printf("#define CC_MAPS		8		/* number of code maps		*/\n");
15*da2e3ebdSchin		printf("\n");
16*da2e3ebdSchin		printf("#define CC_EBCDIC	CC_EBCDIC_E\n");
17*da2e3ebdSchin		printf("#define CC_EBCDIC1	CC_EBCDIC_E\n");
18*da2e3ebdSchin		printf("#define CC_EBCDIC2	CC_EBCDIC_I\n");
19*da2e3ebdSchin		printf("#define CC_EBCDIC3	CC_EBCDIC_O\n");
20*da2e3ebdSchin		printf("\n");
21*da2e3ebdSchin		switch ('~')
22*da2e3ebdSchin		{
23*da2e3ebdSchin		case 0137:
24*da2e3ebdSchin			printf("#define CC_NATIVE	CC_EBCDIC_E	/* native character code	*/\n");
25*da2e3ebdSchin			break;
26*da2e3ebdSchin		case 0176:
27*da2e3ebdSchin			printf("#define CC_NATIVE	CC_ASCII	/* native character code	*/\n");
28*da2e3ebdSchin			break;
29*da2e3ebdSchin		case 0241:
30*da2e3ebdSchin			switch ('\n')
31*da2e3ebdSchin			{
32*da2e3ebdSchin			case 0025:
33*da2e3ebdSchin				printf("#define CC_NATIVE	CC_EBCDIC_O	/* native character code	*/\n");
34*da2e3ebdSchin				break;
35*da2e3ebdSchin			default:
36*da2e3ebdSchin				switch ('[')
37*da2e3ebdSchin				{
38*da2e3ebdSchin				case 0272:
39*da2e3ebdSchin					printf("#define CC_NATIVE	CC_EBCDIC_H	/* native character code	*/\n");
40*da2e3ebdSchin					break;
41*da2e3ebdSchin				default:
42*da2e3ebdSchin					printf("#define CC_NATIVE	CC_EBCDIC_I	/* native character code	*/\n");
43*da2e3ebdSchin					break;
44*da2e3ebdSchin				}
45*da2e3ebdSchin				break;
46*da2e3ebdSchin			}
47*da2e3ebdSchin			break;
48*da2e3ebdSchin		case 0377:
49*da2e3ebdSchin			printf("#define CC_NATIVE	CC_EBCDIC_S	/* native character code	*/\n");
50*da2e3ebdSchin			break;
51*da2e3ebdSchin		default:
52*da2e3ebdSchin			switch ('A')
53*da2e3ebdSchin			{
54*da2e3ebdSchin			case 0301:
55*da2e3ebdSchin				printf("#define CC_NATIVE	CC_EBCDIC_O	/* native character code	*/\n");
56*da2e3ebdSchin				break;
57*da2e3ebdSchin			default:
58*da2e3ebdSchin				printf("#define CC_NATIVE	CC_ASCII	/* native character code	*/\n");
59*da2e3ebdSchin				break;
60*da2e3ebdSchin			}
61*da2e3ebdSchin			break;
62*da2e3ebdSchin		}
63*da2e3ebdSchin		if ('A' == 0101)
64*da2e3ebdSchin		{
65*da2e3ebdSchin			printf("#define CC_ALIEN	CC_EBCDIC	/* alien character code		*/\n\n");
66*da2e3ebdSchin			printf("#define CC_bel		0007		/* bel character		*/\n");
67*da2e3ebdSchin			printf("#define CC_esc		0033		/* esc character		*/\n");
68*da2e3ebdSchin			printf("#define CC_sub		0032		/* sub character		*/\n");
69*da2e3ebdSchin			printf("#define CC_vt		0013		/* vt character			*/\n");
70*da2e3ebdSchin		}
71*da2e3ebdSchin		else
72*da2e3ebdSchin		{
73*da2e3ebdSchin			printf("#define CC_ALIEN	CC_ASCII	/* alien character code		*/\n\n");
74*da2e3ebdSchin			printf("#define CC_bel		0057		/* bel character		*/\n");
75*da2e3ebdSchin			printf("#define CC_esc		0047		/* esc character		*/\n");
76*da2e3ebdSchin			printf("#define CC_sub		0077		/* sub character		*/\n");
77*da2e3ebdSchin			printf("#define CC_vt		0013		/* vt character			*/\n");
78*da2e3ebdSchin		}
79*da2e3ebdSchin		return 0;
80*da2e3ebdSchin	}
81*da2e3ebdSchin}end
82