/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/ /* aplnamsb APL2 V1.0.0 ************************************************ * Called by aplpnam and aplname. * * Called to find the end of a well-formed apl name. * ***********************************************************************/ #define INCLUDES APLCHDEF #include "includes.h" char *aplnamsb(sp,spend) char *sp; /* Pointer to next character potentially in the name. */ char *spend; /* Pointer to after end of string. */ { Aplparsg; Aplscan; char *t; int code; for (;;) { /* do forever */ t = sp; /* save potential end-of-name */ if (t == spend) break; /* found end-of-name */ code = aplparsg(aplscan(&sp,spend)); /* get next token code */ if (!(code == ALPHABET || code == DIGIT)) break; /* found end-of-name */ } return(t); }