Mercurial > hg > CbC > old > device
annotate test/tmp.c @ 417:98888da30b35
code jump fixes (not finished)
author | kono |
---|---|
date | Mon, 25 Oct 2004 01:16:28 +0900 |
parents | 096559f07a70 |
children | 0c256ea2a97e |
rev | line source |
---|---|
53 | 1 |
2 int | |
3 main1(int ac,char *av[],int (*f)(),int g()) | |
4 { | |
5 return (*f)(ac)+g(ac); | |
6 } | |
7 | |
8 int | |
9 g(int k) { | |
10 return k+1; | |
11 } | |
0 | 12 |
13 main0(ac,av) | |
14 { | |
15 return ac; | |
16 } | |
17 | |
18 main(ac,av) | |
19 int ac; | |
20 char *av[]; | |
21 { | |
22 register int i; | |
23 register char *p; | |
24 | |
25 p = av[1]; | |
26 if (!p) return; | |
27 i = p[1]; | |
28 p = p+i; | |
29 printf("%d %s\n",i,p-i); | |
53 | 30 printf("%d\n",main1(ac,av,g,g)); |
172 | 31 return 0; |
0 | 32 } |