Metropoli BBS
VIEWER: aplediv.c MODE: TEXT (ASCII)
/*Copyright (C) 1992, 1995 by Thomas Glen Smith.  All Rights Reserved.*/
/* aplediv APL2 V1.0.0 *************************************************
* Called from apledit when it's been decided the input for             *
* the DEL editor is a valid function header.                           *
***********************************************************************/
#define INCLUDES APLCB+APLED+APLFUNCI+APLTOKEN+STRING+TREE
#include "includes.h"
void aplediv(e)
Apledst e;			/* Edit common area.				*/
{
	Apledix; Aplediz; Treenode;
	extern int aplerr;
	Aplcb wrk;
	Apltoken curtok,tokhdr;
	Avlnode p;
	Apled olded,newed=NULL;

	if (NULL != 
		(p = treenode(e->fp->funcname->token_ptr.token_string)) &&
		NULL != (wrk = p->avlleaf)) {
		aplerr = 115; /* function name already in use */
		return;
	}
	newed = apledix(e,newed,*(e->fp->functokp),
		*(e->fp->functokc),0.0,1); /* queue header */
	e->fp->functary = *(e->fp->functokp) = NULL; /* cleanup */
	e->fp->functotl = *(e->fp->functokc) = 0; /* cleanup */
	if (aplerr == 0 && e->delptr == NULL)
		aplediz(e); /* input */
}
[ RETURN TO DIRECTORY ]