view test/tmp6.c @ 109:e09f9de6f5d3

*** empty log message ***
author kono
date Wed, 19 Mar 2003 02:22:33 +0900
parents bf602558130d
children 096559f07a70
line wrap: on
line source

#include "stdio.h"

int
main(ac,av)
int ac;
char *av[];
{
    int i;

    if(ac!=2)	{
	fprintf(stderr,"must have one neumeric argument.\n");
	return(0);
    }
    i=main0(ac,av,return,environment);
    fprintf(stderr,"1: %s %d\n",av[0],i);
    return i;
}

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(stderr,"2: av=%x av[0]=%x %s\n",av,av[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(stderr,"3: i=%d j=%d k=%d av=%x p=%s\n",i,j,k,av,p);
    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(stderr,"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(stderr,"5: %s\n",av[0]);
    fprintf(stderr,"5: i=%d j=%d k=%d av=%x\n",i,j,k,av);
    if (k>3)
	goto (*ret1)(1234),ret1env;
    goto (*ret)(1234),retenv;
}