Mercurial > hg > CbC > old > device
view test/tmp6.c @ 585:a5b902b20300 ia32-no-rname
ia32 reconfigure end (correct?)
author | kono |
---|---|
date | Wed, 18 Jan 2006 12:26:48 +0900 |
parents | c55363eff5e5 |
children | 682c8ec38d45 |
line wrap: on
line source
#include "stdio.h" char *a[] = {"test1","2"}; int main(ac,av) int ac; char *av[]; { int i; if(ac!=2) { fprintf(stdout,"a used.\n"); // return(0); i=main0(2,a,return,environment); return 0; } i=main0(ac,av,return,environment); fprintf(stdout,"1: %s %d\n",av[0],i); return 0; } int main0(ac,av,ret,retenv) int ac; char *av[]; code (*ret)(); void *retenv; { int i,j,k; i=123; j=456; k = atoi(av[1]); fprintf(stdout,"2: av=%x av[0]=%x %s\n",av==a,av[0]==a[0],av[0]); goto code0(i,j,k,av,ret,retenv,return,environment); } code code0(i,j,k,av,ret,retenv,ret1,ret1env) int i,j,k; char *av[]; code (*ret)(); void *retenv; code (*ret1)(); void *ret1env; { char *p; p = av[0]; fprintf(stdout,"code0\n",av[0]); goto code1(i,j,k,av,ret,retenv,ret1,ret1env); } code code1(i,j,k,av,ret,retenv,ret1,ret1env) int i,j,k; char *av[]; code (*ret)(); void *retenv; code (*ret1)(); void *ret1env; { fprintf(stdout,"4: %s\n",av[0]); goto code2(i,j,k,av,ret,retenv,ret1,ret1env); } code code2(i,j,k,av,ret,retenv,ret1,ret1env) int i,j,k; char *av[]; code (*ret)(); void *retenv; code (*ret1)(); void *ret1env; { fprintf(stdout,"5: %s\n",av[0]); fprintf(stdout,"5: i=%d j=%d k=%d av=%x\n",i,j,k,av==a); if (k>3) goto (*ret1)(1234),ret1env; goto (*ret)(1234),retenv; }