Mercurial > hg > CbC > CbC_gcc
annotate CbC-examples/rectypeTest/rectypeTest1.c @ 105:b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 May 2012 10:34:23 +0900 |
parents | |
children |
rev | line source |
---|---|
105
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 #include <stdio.h> |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 __code print(__rectype *p, int num) { |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 printf("num = %d\n",num); |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 } |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 __code csA(__rectype *p, int num) { |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 goto p(csA,3,4); |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 goto p(2,3); |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 goto p(csA,3); |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 return; |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 } |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 void funcA(__code (*p)()){ |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 goto p(print, 3); |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 return; |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 } |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 int main() { |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 funcA(csA); |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 return 0; |
b3cfc7733d3f
fix bug. implementation fo rectype. c-family/c-pretty-print.c
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 } |