summaryrefslogtreecommitdiff
path: root/defs2d.awk
blob: 11511859591d9fc88af2e501e6a52d1875b2b174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/awk -f

/type/ {
	printf("static %s a_%s;\n\n", $2, $2);
}

/distinct/ {
	printf("static int %s[] = {\n", $2);
	for (i = 3; i < NF; i++) {
		#printf("#ifndef %s\n", $i);
		#printf("#error %s not defined\n", $i);
		#printf("#endif\n");
		printf("\t%s,\n", $i);
	}
	printf("};\n");
}