e.c File Reference

#include <stdio.h>
#include <ctype.h>
#include "awk.h"
#include "regexp.h"

Include dependency graph for e.c:

Go to the source code of this file.

Defines

#define MAXFRAME   100

Functions

double getfval ()
double atof ()
char * strsave ()
char ** getsval ()
char *** strcat ()
char **** strstr ()
CELLmkcell ()
CELL ** mktmp ()
CELLField ()
CELL ** Split ()
CELL *** Forin ()
CELLArith ()
CELL ** Assign ()
CELL *** Stat ()
CELL **** Mathfun ()
CELL ***** Strfun ()
CELL ****** Cond ()
CELLPrint ()
CELL ** Cat ()
CELL *** Array ()
CELL **** Element ()
CELLIf ()
CELL ** While ()
CELL *** For ()
CELL **** Do ()
CELL ***** Jump ()
CELLP1stat ()
CELL ** P2stat ()
CELL *** Print0 ()
CELLArg ()
CELL ** Call ()
CELL *** Ret ()
CELLSubst ()
CELL ** In ()
CELL *** Getline ()
CELL **** Delete ()
CELL ***** Close ()
CELLNulproc ()
CELL ** Usrfun ()
CELL_Arg ()
FILEgetfp ()
CELLexecute (NODE *p)
static CELLArith (NODE *p)
static CELLAssign (NODE *p)
static CELLCat (NODE *p)
static CELLPrint (NODE *p)
static CELLMathfun (NODE *p)
static CELLStrfun (NODE *p)
static regexpgetpat (CELL *r)
static CELLSubst (NODE *p)
static CELLCond (NODE *p)
static CELLIf (NODE *p)
static CELLWhile (NODE *p)
static CELLDo (NODE *p)
static CELLFor (NODE *p)
static CELLJump (NODE *p)
static Return (NODE *p)
static CELLArg (NODE *p)
CELL_Arg (i)
static CELLCall (NODE *p)
CELLUsrfun (NODE *p)

Variables

char ** FS
char ** OFS
char ** ORS
char ** OFMT
double * RSTART
double * RLENGTH
char record []
CELLfield []
int r_start
int r_length
CELL truecell = { NUM, NULL, 1.0 }
CELL falsecell = { NUM, NULL, 0.0 }
static CELL breakcell = { BRK, NULL, 0.0 }
static CELL contcell = { CNT, NULL, 0.0 }
static CELL nextcell = { NXT, NULL, 0.0 }
static CELL retcell = { RTN, NULL, 0.0 }
static CELLretval
int pateval
static char * r_str
static regexpr_pat
CELL *(* proctab [])()
CELL ** frame [MAXFRAME]
static int framep


Define Documentation

#define MAXFRAME   100
 

Definition at line 825 of file e.c.

Referenced by Call().


Function Documentation

CELL* _Arg i   ) 
 

Definition at line 840 of file e.c.

References frame, framep, and i.

CELL* _Arg  ) 
 

Referenced by Arg(), and Array().

static CELL* Arg NODE p  )  [static]
 

Definition at line 830 of file e.c.

References _Arg(), cell::c_fval, and i.

CELL* Arg  ) 
 

static CELL* Arith NODE p  )  [static]
 

Definition at line 183 of file e.c.

References ADD, c_free(), DIV, error, execute(), fmod(), fprintf(), getfval(), if(), INCDEC, int(), mktmp(), MOD, MULT, NULL, NUM, pow(), POWER, PRE, printf, r, setfval(), stderr, SUB, UMINUS, x, and y.

CELL* Arith  ) 
 

CELL* * * Array  ) 
 

Referenced by DotZLib::CodecBase::copyInput().

static CELL* Assign NODE p  )  [static]
 

Definition at line 234 of file e.c.

References ADDEQ, ASSIGN, c_free(), cell::c_type, DIVEQ, error, execute(), FLD, fmod(), fprintf(), getfval(), getsval(), int(), MODEQ, MULTEQ, NUM, pow(), POWEQ, REC, setfval(), setsval(), stderr, STR, SUBEQ, synerr(), UDF, VAR, x, and y.

CELL* * Assign  ) 
 

double atof  ) 
 

Referenced by _install(), expr10(), getfval(), initarg(), Return(), setsval(), setvar(), and Split().

static CELL* Call NODE p  )  [static]
 

Definition at line 849 of file e.c.

References a_free(), arg, ARR, c_free(), cell::c_sval, cell::c_type, emalloc(), error, execute(), frame, framep, FUN, i, if(), int(), j, k, MAXFRAME, mkcell(), n, NULL, NUM, r, retval, sfree(), STR, synerr(), TMP, truecell, UDF, and VAR.

CELL* * Call  ) 
 

Referenced by fill_window().

static CELL* Cat NODE p  )  [static]
 

Definition at line 288 of file e.c.

References BUFSIZ, c_free(), execute(), getsval(), mktmp(), s, STR, and t.

CELL* * Cat  ) 
 

CELL* * * * * Close  ) 
 

static CELL* Cond NODE p  )  [static]
 

Definition at line 552 of file e.c.

References AND, BINAND, BINOR, c_free(), cell::c_type, EQ, execute(), falsecell, fprintf(), GE, getfval(), getpat(), getsval(), GT, i, int(), j, LE, LT, match, MATCH, mktmp(), NE, NOMATCH, NOT, NULL, NUM, OR, pateval, s, stderr, strcmp, truecell, x, and y.

CELL* * * * * * Cond  ) 
 

CELL* * * * Delete  ) 
 

static CELL* Do NODE p  )  [static]
 

Definition at line 695 of file e.c.

References BRK, cell::c_type, execute(), EXT, NXT, RTN, switch(), and x.

CELL* * * * Do  ) 
 

CELL* * * * Element  ) 
 

CELL* execute NODE p  ) 
 

Definition at line 63 of file e.c.

References BRK, c_free(), CNT, error, FIRSTP, i, if(), LASTP, match, mktmp(), NULL, NUM, NXT, PAT, pateval, proctab, r, record, RTN, type, and VALUE.

CELL* Field  ) 
 

Referenced by Macro(), nr_ce(), nr_ds(), nr_it(), nr_rn(), nr_Ub(), nr_Uc(), nr_UL(), and nr_Ur().

static CELL* For NODE p  )  [static]
 

Definition at line 720 of file e.c.

References c_free(), execute(), getfval(), NULL, and x.

CELL* * * For  ) 
 

CELL* * * Forin  ) 
 

FILE* getfp  ) 
 

Referenced by Getline(), and Print().

double getfval  ) 
 

Referenced by Arith(), Assign(), Cond(), Field(), For(), If(), Jump(), Mathfun(), P1stat(), P2stat(), Strfun(), and While().

CELL* * * Getline  ) 
 

static regexp* getpat CELL r  )  [static]
 

Definition at line 487 of file e.c.

References getsval(), if(), mkpat(), PAT, r_pat, r_str, sfree(), strcmp, and strsave().

Referenced by Cond(), optpat(), and Strfun().

char* * getsval  ) 
 

Referenced by arrayelm(), Assign(), Cat(), Cond(), format(), Getline(), getpat(), Getrec(), If(), In(), Print(), Return(), Split(), Strfun(), and Subst().

static CELL* If NODE p  )  [static]
 

Definition at line 645 of file e.c.

References c_free(), cell::c_type, execute(), getfval(), getsval(), i, NULL, NUM, s, and truecell.

CELL* If  ) 
 

CELL* * In  ) 
 

static CELL* Jump NODE p  )  [static]
 

Definition at line 755 of file e.c.

References BREAK, breakcell, closeall(), contcell, CONTIN, execute(), exit(), EXIT, getfval(), i, int(), NEXT, nextcell, retcell, Return, and RETURN.

CELL* * * * * Jump  ) 
 

static CELL* Mathfun NODE p  )  [static]
 

Definition at line 349 of file e.c.

References ATAN2, atan2(), c_free(), COS, cos(), execute(), EXP, exp, fprintf(), getfval(), INT, LOG, log(), mktmp(), modf(), NULL, NUM, rand(), RAND, SIN, sin(), SQRT, sqrt(), srand(), SRAND, stderr, time, x, and y.

CELL* * * * Mathfun  ) 
 

CELL* mkcell  ) 
 

Referenced by Call(), dofor(), expr10(), Field(), and init().

CELL* * mktmp  ) 
 

Referenced by Arith(), Cat(), Cond(), Element(), execute(), Getline(), Mathfun(), Return(), Strfun(), and Subst().

CELL * Nulproc  ) 
 

Definition at line 940 of file e.c.

References truecell.

CELL* P1stat  ) 
 

CELL* * P2stat  ) 
 

static CELL* Print NODE p  )  [static]
 

Definition at line 308 of file e.c.

References BUFSIZ, c_free(), execute(), format, FORMAT, fp, getfp(), getsval(), i, if(), int(), NULL, OFS, ORS, PRMASK, R_PIPE, R_POUT, s, stdout, and strcat().

CELL* Print  ) 
 

CELL* * * Print0  ) 
 

Definition at line 357 of file r.c.

References fprintf(), ORS, record, stdout, and truecell.

CELL* * * Ret  ) 
 

static Return NODE p  )  [static]
 

Definition at line 782 of file e.c.

References atof(), BUFSIZ, c_free(), cell::c_fval, cell::c_sval, cell::c_type, execute(), getsval(), i, isnum(), mktmp(), NULL, NUM, OFS, retval, s, STR, strcat(), and UDF.

CELL* * Split  ) 
 

Referenced by Strfun().

CELL* * * Stat  ) 
 

char* * * strcat  ) 
 

static CELL* Strfun NODE p  )  [static]
 

Definition at line 395 of file e.c.

References BUFSIZ, c_free(), Close, CLOSE, error, execute(), fprintf(), getfval(), getpat(), getsval(), i, if(), Index(), INDEX, int(), isKanji(), jstrlen(), LENGTH, m, match, mktmp(), n, NULL, NUM, r, r_length, r_start, record, RLENGTH, RMATCH, RSTART, s, Split(), SPLIT, stderr, STR, SUBSTR, system(), SYSTEM, t, and x.

CELL* * * * * Strfun  ) 
 

char* strsave  ) 
 

Referenced by _install(), addent(), dodefine(), dopushdef(), dousrfun(), expand(), getfval(), getpat(), getsval(), getvar(), grave(), mkcell(), mktmp(), r_mkfld(), readhere(), setsval(), Split(), and yylex().

char* * * * strstr  ) 
 

Referenced by second().

static CELL* Subst NODE p  )  [static]
 

Definition at line 506 of file e.c.

References BUFSIZ, c_free(), cell::c_sval, cell::c_type, error, execute(), field, FS, getsval(), i, if(), int(), mkfld(), mktmp(), n, NULL, NUM, PAT, r, REC, record, RGSUB, s, setsval(), STR, strcpy(), Sub(), and t.

CELL* Subst  ) 
 

CELL* Usrfun NODE p  ) 
 

Definition at line 946 of file e.c.

References execute().

CELL* * Usrfun  ) 
 

static CELL* While NODE p  )  [static]
 

Definition at line 669 of file e.c.

References BRK, c_free(), execute(), EXT, getfval(), NXT, RTN, and x.

CELL* * While  ) 
 


Variable Documentation

CELL breakcell = { BRK, NULL, 0.0 } [static]
 

Definition at line 45 of file e.c.

Referenced by Jump().

CELL contcell = { CNT, NULL, 0.0 } [static]
 

Definition at line 46 of file e.c.

Referenced by Jump().

CELL falsecell = { NUM, NULL, 0.0 }
 

Definition at line 44 of file e.c.

Referenced by Cond().

CELL* field[]
 

Definition at line 48 of file r.c.

Referenced by cmp(), doprint(), Field(), go(), init(), mkrec(), and Subst().

CELL** frame[MAXFRAME]
 

Definition at line 826 of file e.c.

Referenced by _Arg(), Call(), and execve().

int framep [static]
 

Definition at line 827 of file e.c.

Referenced by _Arg(), and Call().

char** FS
 

Definition at line 43 of file v.c.

CELL nextcell = { NXT, NULL, 0.0 } [static]
 

Definition at line 47 of file e.c.

Referenced by Jump().

char ** OFMT
 

Definition at line 43 of file v.c.

Referenced by getsval(), and init().

char ** OFS
 

Definition at line 43 of file v.c.

Referenced by init(), Print(), and Return().

char ** ORS
 

Definition at line 43 of file v.c.

Referenced by init(), Print(), and Print0().

int pateval
 

Definition at line 52 of file e.c.

Referenced by Cond(), execute(), P1stat(), and P2stat().

CELL*(* proctab[])()
 

Initial value:

Definition at line 56 of file e.c.

Referenced by do_getsysinfo(), and execute().

int r_length
 

Definition at line 37 of file regexp.c.

Referenced by match(), r_mkfld(), Split(), and Strfun().

regexp* r_pat [static]
 

Definition at line 54 of file e.c.

Referenced by getpat().

int r_start
 

Definition at line 37 of file regexp.c.

Referenced by match(), r_mkfld(), Split(), and Strfun().

char* r_str [static]
 

Definition at line 53 of file e.c.

Referenced by getpat().

char record[]
 

Definition at line 47 of file r.c.

Referenced by execute(), get1rec(), init(), Print0(), Strfun(), and Subst().

CELL retcell = { RTN, NULL, 0.0 } [static]
 

Definition at line 48 of file e.c.

Referenced by Jump().

CELL* retval [static]
 

Definition at line 50 of file e.c.

Referenced by Call(), chk_path(), DotZLib::Deflater::Deflater(), do_check(), do_child(), do_parent(), fclose(), fflush(), fpop(), fprintf(), fscanf(), getch(), DotZLib::Inflater::Inflater(), intuit_diff_type(), last_index(), main(), objdump(), prev_screen(), printf(), Printf(), queryparam(), Return(), scanf(), setvbuf(), snprintf(), sprintf(), sscanf(), ts_inp(), and vsnprintf().

double * RLENGTH
 

Definition at line 46 of file v.c.

Referenced by init(), and Strfun().

double* RSTART
 

Definition at line 46 of file v.c.

Referenced by init(), and Strfun().

CELL truecell = { NUM, NULL, 1.0 }
 

Definition at line 43 of file e.c.

Referenced by Call(), Cond(), If(), In(), Nulproc(), P1stat(), P2stat(), and Print0().


Generated on Fri Apr 14 22:59:15 2006 for minix by  doxygen 1.4.6