version 1.7, 1999/04/20 17:31:30 |
version 1.8, 1999/12/04 00:12:25 |
|
|
#include "awk.h" |
#include "awk.h" |
#include "ytab.h" |
#include "ytab.h" |
|
|
|
#define MAX_PFILE 20 |
|
|
extern char **environ; |
extern char **environ; |
extern int nfields; |
extern int nfields; |
extern char *__progname; |
extern char *__progname; |
|
|
int compile_time = 2; /* for error printing: */ |
int compile_time = 2; /* for error printing: */ |
/* 2 = cmdline, 1 = compile, 0 = running */ |
/* 2 = cmdline, 1 = compile, 0 = running */ |
|
|
char *pfile[20]; /* program filenames from -f's */ |
char *pfile[MAX_PFILE]; /* program filenames from -f's */ |
int npfile = 0; /* number of filenames */ |
int npfile = 0; /* number of filenames */ |
int curpfile = 0; /* current filename */ |
int curpfile = 0; /* current filename */ |
|
|
|
|
case 'f': /* next argument is program filename */ |
case 'f': /* next argument is program filename */ |
argc--; |
argc--; |
argv++; |
argv++; |
|
if (npfile >= MAX_PFILE - 1) |
|
ERROR "too many -f options" FATAL; |
if (argc <= 1) |
if (argc <= 1) |
ERROR "no program filename" FATAL; |
ERROR "no program filename" FATAL; |
pfile[npfile++] = argv[1]; |
pfile[npfile++] = argv[1]; |