divert(-1)
# @(#)Copyright (c), 1987, 1993 StatSci, Inc.  All rights reserved.
define(`DECODE',`{ DEClst($*) }')
define(`DEClst',`ifelse($1,,,`__$1
DEClst(shift($*))')')
define(`__I',`call deci00($1,TRUE)')
define(`__N',`call deci00($1,FALSE)')
define(`__O',`call deco00($1)')
define(`__L',`call decl00($1)')
define(`__C',`call decs00(FALSE,$1,ifelse($2,,LINEWIDTH,$2))')
define(`__S',`call decs00(TRUE,$1,ifelse($2,,LINEWIDTH,$2))')
define(`__CP',`call decsp0($1)')
define(`__GETC',`call decgch($1,ifelse($2,,1,$2),ifelse($3,ANY,TRUE,$3,,FALSE,$3))')
define(`__NP',`call decnp0($1)')
define(`__R',`call decr00($1)')
define(`__V',`call decv00($1,$2)')
define(`__TOKEN',`call dectok($1,$2)')
define(`__NUMTOK',`ifelse($3,,call numtok($1,$2),call decnum($2,$3,$1,ifelse($4,,FALSE,$4)))')
define(`__NAMTOK',`call namtok($1,$2)')
define(`__STRTOK',`call strtok($1,$2)')
define(`__SPCTOK',`call spctok($1,$2)')
define(`FREAD',`{INFILE=$1; AUTO_CHECK=TRUE; call gtinbf #initialize buffer
ifelse($2,,,`DEClst(shift($*))')}')
define(`_READ',`FREAD(STDIN,$*)')
define(`INBUF',decbf0)define(`INPOS',jqqbfl)define(`INLEN',512)define(`INFILE',jqqinf)
define(`BEGIN_FIELD',jqqflp)
define(`LASTCH',jqqlsc)define(`FIELD_ERROR',jqqfle)
define(`GETC',`__GETC($*)')
define(`__call',`call')
define(`GETLINE',`{call gtline( ifelse($1,,STDIN,$1),INBUF,LASTCH)
	INFILE= -1; INPOS=1; AUTO_CHECK=TRUE}')
define(`GETSTRING',`{ LASTCH=islenz($1); INPOS=1; INFILE=-1; AUTO_CHECK=TRUE
	call concat(INBUF,1,$1,1,LASTCH+1)}')
define(`GET_FIELD',`call getfld')
define(`UNGET_FIELD',`call ungetf')
define(`UNGETC',`INPOS=max0(1,INPOS-ifelse($1,,1,$1))')
define(`EOF',`LASTCH<0')
define(`AUTO_CHECK',jqdchk)define(`NO_CHECK',jqdchk)
define(`SET_EOF',`LASTCH= -1')
define(`LEX_INFILE',-2) #distinguish data, lexical input
divert(0)common/decbfc/INBUF
CHARACTER(INBUF,INLEN)
common/decbfl/INPOS,INFILE,BEGIN_FIELD,FIELD_ERROR,LASTCH,AUTO_CHECK
integer INPOS,INFILE,BEGIN_FIELD,LASTCH; logical FIELD_ERROR,AUTO_CHECK
SCCS_ID(95876,`@(#)'newfun/include/read.m 3.10 last edit 2/25/93 StatSci. From BASEFILE)
