Metropoli BBS
VIEWER: aplload.c MODE: TEXT (ASCII)
/*Copyright (C) 1992, 1994 by Thomas Glen Smith.  All Rights Reserved.*/
/* aplload APL2 V1.0.0 *************************************************
* Called from aplwkst to do )LOAD.                                     *
***********************************************************************/
#define INCLUDES APLCB+APLMEM+IO+STDIO+STAT
#include "includes.h"
void aplload(wrk,cp,cpend)
char *wrk;	/* Pointer to entire command text. */
char *cp;		/* Pointer to char after )LOAD in command text. */
char *cpend;	/* Pointer to end of command text. */
{
	Aplloae; Endoper; Execmsg; Execute; Treesrch;
	extern char *aplfile;
	extern char quadlx[]; /* Latent expression name. */
	Aplcb out;
	int i;

	if (0 == aplloae(wrk,cp,cpend))
		return; /* Not successfully loaded. */
	execmsg(aplfile,strlen(aplfile),0,"loaded.");
	if (NULL == (out = treesrch(quadlx)))
		return; /* No latent expression */
	endoper(execute(out)); /* Execute latent expression. */
}
[ RETURN TO DIRECTORY ]