/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/
/* lovfsfo APL2 V1.0.0 *************************************************
* Called from lovfsfp to read token elements. *
***********************************************************************/
#define INCLUDES APLMEM+STRING+IO+STDIO+APLCB+APLFUNCI+APLCHDEF+APLTOKEN
#include "includes.h"
Aplfunc lovfsfo(fp,func)
int fp; /* file descriptor handle */
Aplfunc func; /* function definition to save */
{
Lovfscb; Strread;
Apltoken tok;
int cbflags,i,j;
tok = func->functary; /* first token in array */
for (j = func->functotl; j > 0; j--) {
switch (tok->token_code) {
case QUOTE:
case VECTOR_TOKEN:
i = read(fp, &cbflags, sizeof(cbflags));
tok->token_ptr.token_vector = lovfscb(fp,cbflags);
break; /* aplcb is loaded */
case OPERAND_TOKEN:
tok->token_ptr.token_string = strread(fp);
break; /* operand name is loaded */
} /* end switch */
tok++; /* bump to next token */
}
}