summaryrefslogtreecommitdiffstats
path: root/contrib/one-true-awk/lib.c
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-06-05 15:33:51 +0000
committerrafan <rafan@FreeBSD.org>2007-06-05 15:33:51 +0000
commitd187e809f9751c4d3f4b00ef5abc4e8e90c816f0 (patch)
tree7bb9ff82caf83e12ec1ddc1afdc1af4854a723b6 /contrib/one-true-awk/lib.c
parent78d66df18b9755543261f33b621153a97634a136 (diff)
downloadFreeBSD-src-d187e809f9751c4d3f4b00ef5abc4e8e90c816f0.zip
FreeBSD-src-d187e809f9751c4d3f4b00ef5abc4e8e90c816f0.tar.gz
Vendor import of bwk's 01-May-2007 release.
Approved by: delphij (mentor) Nodded by: ru Tested by: make universe
Diffstat (limited to 'contrib/one-true-awk/lib.c')
-rw-r--r--contrib/one-true-awk/lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/one-true-awk/lib.c b/contrib/one-true-awk/lib.c
index c260a05..c306910 100644
--- a/contrib/one-true-awk/lib.c
+++ b/contrib/one-true-awk/lib.c
@@ -40,9 +40,9 @@ char *fields;
int fieldssize = RECSIZE;
Cell **fldtab; /* pointers to Cells */
-char inputFS[100] = " ";
+char inputFS[10] = " ";
-#define MAXFLD 200
+#define MAXFLD 2
int nfields = MAXFLD; /* last allocated slot for $i */
int donefld; /* 1 = implies rec broken into fields */
@@ -173,7 +173,7 @@ int getrec(char **pbuf, int *pbufsize, int isrecord) /* get next input record */
void nextfile(void)
{
- if (infile != stdin)
+ if (infile != NULL && infile != stdin)
fclose(infile);
infile = NULL;
argno++;
OpenPOWER on IntegriCloud