Mercurial > hg > GearsTemplate
changeset 11:a4f351b66544
implement appned
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 02 Apr 2015 22:55:05 +0900 |
parents | 88a4a95f5485 |
children | 81411d8f9a77 |
files | src/allocate/allocate.c src/allocate/prototype.h |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/allocate/allocate.c Thu Apr 02 02:31:13 2015 +0900 +++ b/src/allocate/allocate.c Thu Apr 02 22:55:05 2015 +0900 @@ -22,16 +22,24 @@ goto allocate(context, (int)sizeof(data1), NUM, code2); } -__code code2(Context* context, data1* out, int loop) { +__code code2(Context* context, data1* ds) { + goto meta_code2(context, ds); +} + +__code meta_code2(Context* context, data1* ds) { + goto code3(context, ds, 0); +} + +__code code3(Context* context, data1* out, int loop) { out->i = loop; if (loop == NUM) { - goto meta_code2(context); + goto meta_code3(context); } printf("%d\n",out->i); - goto code2(context, out+1, loop+1); + goto code3(context, out+1, loop+1); } -__code meta_code2(Context* context) { +__code meta_code3(Context* context) { goto exit_code(context); }