version 1.58, 2023/09/10 14:59:00 |
version 1.59, 2023/09/17 14:49:44 |
|
|
THIS SOFTWARE. |
THIS SOFTWARE. |
****************************************************************/ |
****************************************************************/ |
|
|
const char *version = "version 20230909"; |
const char *version = "version 20230913"; |
|
|
#define DEBUG |
#define DEBUG |
#include <stdio.h> |
#include <stdio.h> |
|
|
static size_t npfile; /* number of filenames */ |
static size_t npfile; /* number of filenames */ |
static size_t curpfile; /* current filename */ |
static size_t curpfile; /* current filename */ |
|
|
|
bool CSV = false; /* true for csv input */ |
bool safe = false; /* true => "safe" mode */ |
bool safe = false; /* true => "safe" mode */ |
bool do_posix = false; /* true => POSIX mode */ |
bool do_posix = false; /* true => POSIX mode */ |
|
|
|
|
argv++; |
argv++; |
break; |
break; |
} |
} |
|
if (strcmp(argv[1], "--csv") == 0) { /* turn on csv input processing */ |
|
CSV = true; |
|
argc--; |
|
argv++; |
|
continue; |
|
} |
switch (argv[1][1]) { |
switch (argv[1][1]) { |
case 's': |
case 's': |
if (strcmp(argv[1], "-safe") == 0) |
if (strcmp(argv[1], "-safe") == 0) |
|
|
fn = getarg(&argc, &argv, "no program filename"); |
fn = getarg(&argc, &argv, "no program filename"); |
if (npfile >= maxpfile) { |
if (npfile >= maxpfile) { |
maxpfile += 20; |
maxpfile += 20; |
pfile = (char **) realloc(pfile, maxpfile * sizeof(*pfile)); |
pfile = (char **) reallocarray(pfile, maxpfile, sizeof(*pfile)); |
if (pfile == NULL) |
if (pfile == NULL) |
FATAL("error allocating space for -f options"); |
FATAL("error allocating space for -f options"); |
} |
} |