/* Copyright (C) 1993 by Thomas Glen Smith. All Rights Reserved. */ /* formdfz APL2 V1.0.0 ************************************************* * Formdfz is called by formdfx to obtain and initialize the final * * output aplcb. * ***********************************************************************/ #define INCLUDES STDIO+APLCB #include "includes.h" Aplcb formdfz(v,colso,rowso) int v; /* v=1 if output will be a vector. */ int colso, rowso; /* Columns and rows in output. */ { Errstop; Getcb; extern int aplerr,indxorg; Aplcb out; int i,rank; char *chp; if (aplerr) return(NULL); rank = (v) ? 1 : 2; /* vector or matrix? */ out = getcb(NULL, rowso*colso, APLCHAR + APLTEMP, rank, NULL); if (out == NULL) return(NULL); if (v) *(out->apldim) = colso; else { *(out->apldim) = rowso; *(out->apldim + 1) = colso; } for (i = out->aplcount, chp = out->aplptr.aplchar; i; i--) *chp++ = ' '; /* initialize output to blanks */ return(errstop(0,NULL,NULL,out)); }