|
|
1.1 root 1: /*
2: * Definitions of externals.
3: */
4:
5: #include "awk.h"
6: #include "y.tab.h"
7:
8: CHAR *parg; /* Program argument pointer */
9: FILE *pfp; /* Program file pointer */
10: int lexre; /* On when yylex reading a regular expression */
11: CHAR wordbuf[NWORD]; /* yylex string and identifer buffer */
12: NODE *codep; /* Head of interpreted code tree */
13: int beginflag; /* On before files read */
14: int endflag; /* On after files read */
15: int runflag; /* On when running (vs. compiling) */
16: int yflag; /* `-y' option - dual case pattern matching */
17: int nlskip; /* Skip newlines until next token */
18: int exitflag; /* On if exit done */
19: int lineno; /* Current input line # */
20: int whitesw = 1; /* 1 if whitespace field seperator else 0 */
21: CHAR *inline; /* Input line */
22: jmp_buf nextenv; /* Environment for next */
23: jmp_buf fwenv[NNEST]; /* For/while environment for break/continue */
24: int fwlevel = -1; /* For/while nesting level */
25: int brlevel; /* Brace nesting level */
26: int outflag; /* '>' is output vs. relational (kludge) */
27: TERM *symtab[NHASH]; /* Heads of symbol table hash chains */
28: NODE *tempnodes; /* List of temporary nodes during running */
29: CHAR SNULL[] = ""; /* Awk's null STRING */
30: OFILE files[NOFILE]; /* Open files -- names to prevent re-opening */
31: CHAR inbuf[BUFSIZ]; /* Buffer for all (prog, data) input */
32: CHAR outbuf[BUFSIZ]; /* Buffer for all output */
33:
34: /*
35: * Built-in variable values.
36: */
37: NODE *FILENAMEp; /* Current input filename */
38: NODE *NRp; /* Current input record number */
39: NODE *NFp; /* Number of fields in this record */
40: NODE *ORSp; /* Output record separator */
41: NODE *OFSp; /* Output field separator */
42: NODE *RSp; /* Input record separator */
43: NODE *FSp; /* Input field separator */
44: NODE *OFMTp; /* Output format string (a la printf) */
45:
46: /*
47: * Built-in variables and constants.
48: */
49: TERM xzero, xone; /* Constants 0 and 1 */
50: NODE xfield0;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.