79
|
1
|
|
2
|
|
3 code (*conv)(int,code (*)());
|
|
4 code a2(int i,code conv());
|
|
5 code a3(int i,code conv());
|
|
6 code a4(int i,code conv());
|
|
7 code a5(int i,code conv());
|
|
8
|
193
|
9 char*
|
|
10 print_conv(code conv())
|
|
11 {
|
|
12 if(conv==a2) return "a2";
|
|
13 if(conv==a3) return "a3";
|
|
14 if(conv==a4) return "a4";
|
|
15 if(conv==a5) return "a5";
|
|
16 if(conv==a6) return "a6";
|
|
17 if(conv==a7) return "a7";
|
|
18 if(conv==a8) return "a8";
|
|
19 if(conv==a9) return "a9";
|
|
20 else return "xx";
|
|
21 }
|
|
22
|
79
|
23 code (*exit0)(int);
|
|
24 void *env;
|
|
25
|
|
26 code
|
|
27 a2(int i,code conv())
|
|
28 {
|
193
|
29 printf("a2 %d %s\n",i,print_conv(conv));
|
79
|
30 goto conv(i+1,a4);
|
|
31 }
|
|
32
|
|
33 code
|
|
34 a3(int i,code (*conv)())
|
|
35 {
|
193
|
36 printf("a3 %d %s\n",i,print_conv(conv));
|
79
|
37 goto conv(i+1,a5);
|
|
38 }
|
|
39
|
|
40 code
|
|
41 a4(int i,code conv())
|
|
42 {
|
193
|
43 printf("a4 %d %s\n",i,print_conv(conv));
|
80
|
44 goto (*conv)(i+1,a6);
|
79
|
45 }
|
|
46
|
|
47 code
|
|
48 a5(int i,code (*conv)())
|
|
49 {
|
193
|
50 printf("a5 %d %s\n",i,print_conv(conv));
|
80
|
51 goto (*conv)(i+1,i+2,i+3,a7);
|
|
52 }
|
|
53
|
|
54 code
|
|
55 a6(int i,int j,int k,code conv())
|
|
56 {
|
193
|
57 printf("a6 %d %s\n",i,print_conv(conv));
|
80
|
58 goto conv(i+1,j,k,a8);
|
|
59 }
|
|
60
|
|
61 code
|
|
62 a7(int i,,int j,int k,code (*conv)())
|
|
63 {
|
193
|
64 printf("a7 %d %s\n",i,print_conv(conv));
|
80
|
65 goto conv(i+1,j,k,a9);
|
|
66 }
|
|
67
|
|
68 code
|
|
69 a8(int i,int j,int k,code conv())
|
|
70 {
|
193
|
71 printf("a8 %d %s\n",i,print_conv(conv));
|
80
|
72 goto (*conv)(i+1,j,k,exit0);
|
|
73 }
|
|
74
|
|
75 code
|
|
76 a9(int i,int j,int k,code (*conv)())
|
|
77 {
|
193
|
78 printf("a9 %d %s\n",i,print_conv(conv));
|
172
|
79 goto (*conv)(0),env;
|
79
|
80 }
|
|
81
|
|
82 main(int ac,char *av[]) {
|
|
83 exit0 = return;
|
|
84 env = environment;
|
|
85 conv = a2;
|
|
86 goto conv(1,a3);
|
|
87 }
|