2 #define EXTEND_ENV(currenv,currenv_size,newenv,ndx,Lfor1,LendFor1,Lfor2,LendFor2,LendExtend1) \
3 /* currenv: points to the current enviroment vector \
4 currenv_size: size of the current enviroment vector \
5 newenv: points to the new envoriment vector \
8 /* allocate new enviroment vector */ \
9 newenv = autoMalloc( sizeof(void*) * (currenv_size + 1) ); \
10 /* copy current enviroment to new enviroment */ \
13 if (ndx<=0) goto LendFor1;
14 newenv[ndx] = currenv[ndx-1]; \
19 /* copy arguments from stack to new enviroment vector (extend env.) */
20 if (ST_ARG_COUNT()<=0) goto LendExtend1;
21 newenv[0] = autoMalloc( sizeof(void*) * ST_ARG_COUNT() );
24 if (ndx>=ST_ARG_COUNT()) goto LendFor2;
25 newenv[0][ndx] = ST_ARG(ndx);