Metropoli BBS
VIEWER: eachdyah.c MODE: TEXT (ASCII)
/* Copyright (C) 1993 by Thomas Glen Smith.  All Rights Reserved. */
/* eachdyah APL2 V1.0.0 ************************************************
* Called from eachdyaf, eachmona, to set up the next argument from the *
* input.                                                               *
***********************************************************************/
#define INCLUDES APLCB
#include "includes.h"
Aplcb eachdyah(argno,argin,wrkcb)
int argno; /* argument number, relative 0 */
Aplcb argin,wrkcb; /* input */
{
     Dtacopy;
     int off;

     if (argin->aplflags & APLAPL)
          if (argin->aplcount == 1)
               return(*(argin->aplptr.aplapl));
          else return(*(argin->aplptr.aplapl + argno));
     if (argin->aplcount == 1)
     	off = 0;
     else off = argno * argin->aplsize;
     dtacopy(wrkcb->aplptr.aplchar, argin->aplptr.aplchar + off,
     	1, 1, argin->aplflags & (APLMASK + APLAPL));
     return(wrkcb);
}
[ RETURN TO DIRECTORY ]