/*Copyright (C) 1992, 1995 by Thomas Glen Smith. All Rights Reserved.*/ /* aplwsid APL2 V1.0.0 ************************************************* * Called from aplwksp to do )WSID. * ***********************************************************************/ #define INCLUDES APLCB+APLMEM+STRING #include "includes.h" void aplwsid(rite,cp,cpend) Aplcb rite; /* aplcb for command text */ char *cp; /* Pointer to char immediately after right parenthesis */ char *cpend; /* Pointer to end of command text */ { Aplparfn; Execmsg; extern char *aplfile; char *newfile; if (NULL != (newfile = aplparfn(cp,cpend))) { /* new name? */ if (aplfile != NULL) { execmsg(aplfile,strlen(aplfile),0,"was"); free(aplfile); } aplfile = newfile; } else /* list existing name, if any */ if (aplfile == NULL) execmsg(cp,cpend-cp,0,"ws not found"); else execmsg(aplfile,strlen(aplfile),0,NULL); }