/* awk.def 4.3 83/12/09 */
#define xfree(a) { if(a!=NULL) { yfree(a); a=NULL;} }
#define strfree(a) { if(a!=NULL && a!=EMPTY) { yfree(a);} a=EMPTY; }
#define isnull(x) ((x) == EMPTY || (x) == NULL)
# define dprintf if(dbg)printf
# define dprintf(x1, x2, x3, x4)
typedef AWKFLOAT awkfloat;
extern int donefld; /* 1 if record broken into fields */
extern int donerec; /* 1 if record is valid (no fld has changed */
typedef struct val { /* general value during processing */
char *nval; /* name, for variables only */
char *sval; /* string value */
awkfloat fval; /* value as number */
unsigned tval; /* type info */
struct val *nextval; /* ptr to next if chained */
cell *setsymtab(), *lookup(), **makesymtab();
extern cell *recloc; /* location of input record */
extern cell *nrloc; /* NR */
extern cell *nfloc; /* NF */
#define STR 01 /* string value is valid */
#define NUM 02 /* number value is valid */
#define FLD 04 /* FLD means don't free string space */
#define CON 010 /* this is a constant */
#define ARR 020 /* this is an array */
awkfloat setfval(), getfval();
char *setsval(), *getsval();
char *tostring(), *tokname(), *malloc();
double log(), sqrt(), exp(), atof();
struct nd *narg[BOTCH]; /* C won't take a zero length array */
extern obj (*proctab[])();
extern int pairstack[], paircnt;
#define cantexec(n) (n->ntype == NVALUE)
#define notlegal(n) (n <= FIRSTTOKEN || n >= LASTTOKEN || proctab[n-FIRSTTOKEN]== nullproc)
#define isexpr(n) (n->ntype == NEXPR)
#define isjump(n) (n.otype == OJUMP)
#define isexit(n) (n.otype == OJUMP && n.osub == JEXIT)
#define isbreak(n) (n.otype == OJUMP && n.osub == JBREAK)
#define iscont(n) (n.otype == OJUMP && n.osub == JCONT)
#define isnext(n) (n.otype == OJUMP && n.osub == JNEXT)
#define isstr(n) (n.optr->tval & STR)
#define istrue(n) (n.otype == OBOOL && n.osub == BTRUE)
#define istemp(n) (n.otype == OCELL && n.osub == CTEMP)
#define isfld(n) (!donefld && n.osub==CFLD && n.otype==OCELL && n.optr->nval==EMPTY)
#define isrec(n) (donefld && n.osub==CFLD && n.otype==OCELL && n.optr->nval!=EMPTY)
#define HAT 0177 /* matches ^ in regular expr */
/* watch out for mach dep */