view test/tmp4.c @ 0:d35df41eac69

Initial revision
author kono
date Thu, 13 Jan 2000 02:41:41 +0900
parents
children 096559f07a70
line wrap: on
line source

#include "stdio.h"

int
main(ac,av)
int ac;
char *av[];
{
    int i;
    i=main0(ac,av);
    fprintf(stderr,"1: %s %d\n",av[0],i);
    return i;
}

int
main0(ac,av)
int ac;
char *av[];
{
    int i,j,k;
    i=123;
    j=456;
    k=789;
    fprintf(stderr,"2: av=%x av[0]=%x %s\n",av,av[0],av[0]);
    goto code0(i,j,k,av,return,environment);
}

code code0(i,j,k,av,ret,retenv)
int i,j,k;
char *av[];
code (*ret)();
void *retenv;
{
    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);
}

code code1(i,j,k,av,ret,retenv)
int i,j,k;
char *av[];
code (*ret)();
void *retenv;
{
    fprintf(stderr,"4: %s\n",av[0]);
    goto code2(i,j,k,av,ret,retenv);
}

code code2(i,j,k,av,ret,retenv)
int i,j,k;
char *av[];
code (*ret)();
void *retenv;
{
    fprintf(stderr,"5: %s\n",av[0]);
    fprintf(stderr,"5: i=%d j=%d k=%d av=%x\n",i,j,k,av);
    goto (*ret)(1234),retenv;
}