/* Copyright (C) 1993 by Thomas Glen Smith. All Rights Reserved. */
/* takefill APL2 V1.0.0 ************************************************
* Called by takeit when a fill value is needed during the take. *
***********************************************************************/
#define INCLUDES APLCB
#include "includes.h"
#include "takeincl.h"
char *takefill(p)
struct takeparm *p;
{
Apltype; First; Perm;
char *ret;
switch (p->ptype) {
case APLCPLX:
case APLNUMB:
case APLINT :
case APLCHAR:
ret = (char *) (p->fillptr.aplchar);
break;
case APLAPL:
if (NULL == (ret = (char *) (p->fillptr.aplapl))) {
p->aplfill = perm(apltype(p->prite)); /* get type */
ret = (void *) /* prototype is first item in type */
(p->fillptr.aplapl = p->aplfill->aplptr.aplapl);
}
break;
} /* end switch */
return(ret);
}