Mercurial > hg > Members > kaito > longjump
changeset 11:635eb6d562f0
__return
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Dec 2013 18:23:35 +0900 |
parents | a4f34209ba63 |
children | 7c8d5d4074b8 |
files | struct_longjump.c |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/struct_longjump.c Sun Dec 08 16:08:05 2013 +0900 +++ b/struct_longjump.c Sat Dec 14 18:23:35 2013 +0900 @@ -2,9 +2,9 @@ int longjmp(int*,int); int printf(const char*,...); -__code code1(int n,__code(*__return)(int,void *),void *__environment){ +__code code1(int n,__code(*exit___code)(int,void *),void *exit_env){ printf("code1 : code entry1\n"); - goto __return(n,__environment); + goto exit___code(n,exit_env); } __code return1 (int n,void* env){ @@ -14,19 +14,20 @@ } int main1 (){ - __code (*__return)(); - struct __CbC_env __environment; + __return; + __code (*___return)(); + struct __CbC_env ___environment; int i_buf[128]; int retval; - __environment.ret_p = &retval; - __environment.env = i_buf; + ___environment.ret_p = &retval; + ___environment.env = i_buf; printf("main1 : main1 entry\n"); - if (setjmp(__environment.env)){ + if (setjmp(___environment.env)){ printf("main1 : main1 return\n"); - return *((int *)__environment.ret_p); + return *((int *)___environment.ret_p); } - __return = return1; - goto code1(30,__return,&__environment); + __CbC_return = return1; + goto code1(30,__CbC_return,&___environment); return 0; }