version 1.67, 2023/11/28 20:54:38 |
version 1.68, 2024/01/25 16:40:51 |
|
|
THIS SOFTWARE. |
THIS SOFTWARE. |
****************************************************************/ |
****************************************************************/ |
|
|
const char *version = "version 20231127"; |
const char *version = "version 20240122"; |
|
|
#define DEBUG |
#define DEBUG |
#include <stdio.h> |
#include <stdio.h> |
|
|
} |
} |
if (strcmp(argv[1], "--csv") == 0) { /* turn on csv input processing */ |
if (strcmp(argv[1], "--csv") == 0) { /* turn on csv input processing */ |
CSV = true; |
CSV = true; |
if (fs) |
|
WARNING("danger: don't set FS when --csv is in effect"); |
|
argc--; |
argc--; |
argv++; |
argv++; |
continue; |
continue; |
|
|
break; |
break; |
case 'F': /* set field separator */ |
case 'F': /* set field separator */ |
fs = setfs(getarg(&argc, &argv, "no field separator")); |
fs = setfs(getarg(&argc, &argv, "no field separator")); |
if (CSV) |
|
WARNING("danger: don't set FS when --csv is in effect"); |
|
break; |
break; |
case 'v': /* -v a=1 to be done NOW. one -v for each */ |
case 'v': /* -v a=1 to be done NOW. one -v for each */ |
vn = getarg(&argc, &argv, "no variable name"); |
vn = getarg(&argc, &argv, "no variable name"); |
|
|
exit(1); |
exit(1); |
} |
} |
} |
} |
|
|
|
if (CSV && (fs != NULL || lookup("FS", symtab) != NULL)) |
|
WARNING("danger: don't set FS when --csv is in effect"); |
|
|
/* argv[1] is now the first argument */ |
/* argv[1] is now the first argument */ |
if (npfile == 0) { /* no -f; first argument is program */ |
if (npfile == 0) { /* no -f; first argument is program */ |