/* Copyright (C) 1993 by Thomas Glen Smith. All Rights Reserved. */ /* execaxit APL2 V1.0.0 ************************************************ * Called from execaxis, eachtran, with the axis apltoken pointer. * ***********************************************************************/ #define INCLUDES APLTOKEN+APLCB+TREE #include "includes.h" Aplcb execaxit(tok) Apltoken tok; { Endoper; Execfree; Execgetp; Execpop; Pop; extern int aplerr; Aplcb axcb=NULL; Apltoken axtok=NULL; if ( NULL == (axtok = pop(&(tok->token_ptr.token_stack))) || NULL == (axcb = execgetp(axtok)) || NULL != tok->token_ptr.token_stack /* too many values */ ) { aplerr = 83; /* axis not a scalar or one-element */ if (axcb) endoper(axcb); else if (axtok) execfree(axtok); axcb = NULL; } execfree(tok); /* free token for axis stack */ return(axcb); }