/*Copyright (C) 1992, 1994 by Thomas Glen Smith. All Rights Reserved.*/
/* qquadin APL2 V1.0.0 *************************************************
* Called by execexef. Accepts a character vector from standard input, *
* and returns the result. *
***********************************************************************/
#define INCLUDES STDIO+STRING+APLCB
#include "includes.h"
#define MAXLINE 1024
Aplcb qquadin()
{
Chrcopy; Errstop; Getcb; Gettext;
extern int aplcurs; /* Count of characters on output. */
char line[MAXLINE],*cp;
int i,linelen;
Aplcb out;
for (i = 0; i < aplcurs; i++)
line[i] = ' '; /* spaces */
line[aplcurs]='\0'; /* delimiter */
linelen=gettext(line,MAXLINE);
if (linelen == -1)
linelen = 0; /* return null line for eof */
out = getcb(NULL,linelen,APLCHAR+APLTEMP,1,NULL);
if (out->aplcount)
cp = chrcopy(out->aplptr.aplchar,line,out->aplcount,1);
return(errstop(0,NULL,NULL,out));
}