/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/ /* aplwksq APL2 V1.0.0 ************************************************* * Called from aplwksp to test for a specific command. Returns 1 if * * true, 0 if false, and as a side effect, updates pointer cp to the * * address of the first character beyond the matched command name. * ***********************************************************************/ #define INCLUDES APLCHDEF #include "includes.h" int aplwksq(codearry,cpp,cpend) int *codearry; char *cpp[]; /* Pointer to pointer to start of command text. */ char *cpend; /* Pointer to end of command text. */ { Aplscan; int i; char *cp; cp = *cpp; while(999 != (i = *codearry++)) if (i != aplscan(&cp,cpend)) return(0); /* no match */ if (cp < cpend && SPACE != aplscan(&cp,cpend)) return(0); /* no match */ *cpp = cp; /* match - update command text pointer */ return(1); /* tell of match */ }