Metropoli BBS
VIEWER: aplmatck.c MODE: TEXT (ASCII)
/* Copyright (C) 1993 by Thomas Glen Smith.	All Rights Reserved. */
/* aplmatck APL2 V1.0.0 ************************************************
* Called by aplmatci when either lefttype or ritetype is APLAPL.		 *
***********************************************************************/
#define INCLUDES APLCB
#include "includes.h"
int aplmatck(ld, rd, lefttype, ritetype)
Apluptr ld, rd;
int lefttype, ritetype;
{
	Aplmatch; Aplmatci;
	Aplcb cb;
	Apluptr dataptr;
	int cbtype,datatype;

	if (lefttype == ritetype) /* both must be APLAPL */
		return(aplmatch(*ld.aplapl,*rd.aplapl));
	if (lefttype == APLAPL) {
		cb = *ld.aplapl;
		dataptr = rd;
		datatype = ritetype;
	}
	else {
		cb = *rd.aplapl;
		dataptr = ld;
		datatype = lefttype;
	}
	if (cb->aplrank != 0) return(0);
	cbtype = cb->aplflags & (APLMASK + APLAPL);
	if ((cbtype != datatype) && ((cbtype + datatype) !=
		(APLNUMB + APLINT))) return(0);
	return(aplmatci(dataptr, cb->aplptr, datatype, cbtype));
}
[ RETURN TO DIRECTORY ]