Mercurial > hg > CbC > old > device
annotate test/tmp11.c @ 491:a379da780856
cond signed/unsigned
author | kono |
---|---|
date | Wed, 21 Dec 2005 11:33:53 +0900 |
parents | 32737bad7489 |
children | bc919d849346 |
rev | line source |
---|---|
467 | 1 int printf(const char *format, ...); |
2 | |
46
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
3 typedef struct nametable { |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
4 char *nm; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
5 int sc,ty,dsp; } NMTBL; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
6 NMTBL *a; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
7 |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
8 NMTBL * |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
9 test2(char *n) { |
491 | 10 printf("#0009:s %s\n",n); |
46
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
11 return a; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
12 } |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
13 |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
14 int |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
15 test0(int a,int b,int c) { |
491 | 16 printf("#0015:a %d b %d c %d\n",a,b,c); |
172 | 17 return 0; |
46
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
18 } |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
19 |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
20 int |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
21 test1(a,b,c) |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
22 int a,b;int c; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
23 { |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
24 return test0(a,b,c); |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
25 } |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
26 |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
27 int |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
28 main() |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
29 { |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
30 int d; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
31 NMTBL *b; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
32 b = test2("test"); |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
33 d = test1(1,2,3); |
491 | 34 printf("#0033:return %d\n",d); |
46
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
35 return d; |
b1c8ac8c308d
fix cascading struct retrun. Now it should be compatible with gcc
kono
parents:
diff
changeset
|
36 } |