diff options
author | obrien <obrien@FreeBSD.org> | 2007-10-25 12:38:02 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2007-10-25 12:38:02 +0000 |
commit | 1ae17d2c16c70e4c8d101a5584b014d73398c9d4 (patch) | |
tree | e10cabad03d865b2317afe548c3ff7d70d6841ff /contrib/one-true-awk/lib.c | |
parent | 8756317538371eb8709335e44bced5be817fbeec (diff) | |
parent | 9227abab1db8112427f5c46511a467cb8d6467d4 (diff) | |
download | FreeBSD-src-1ae17d2c16c70e4c8d101a5584b014d73398c9d4.zip FreeBSD-src-1ae17d2c16c70e4c8d101a5584b014d73398c9d4.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r172958,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/one-true-awk/lib.c')
-rw-r--r-- | contrib/one-true-awk/lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/one-true-awk/lib.c b/contrib/one-true-awk/lib.c index c306910..c9cc5d5 100644 --- a/contrib/one-true-awk/lib.c +++ b/contrib/one-true-awk/lib.c @@ -40,7 +40,7 @@ char *fields; int fieldssize = RECSIZE; Cell **fldtab; /* pointers to Cells */ -char inputFS[10] = " "; +char inputFS[100] = " "; #define MAXFLD 2 int nfields = MAXFLD; /* last allocated slot for $i */ @@ -58,7 +58,7 @@ static Cell dollar1 = { OCELL, CFLD, NULL, "", 0.0, FLD|STR|DONTFREE }; void recinit(unsigned int n) { if ( (record = (char *) malloc(n)) == NULL - || (fields = (char *) malloc(n)) == NULL + || (fields = (char *) malloc(n+1)) == NULL || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL ) FATAL("out of space for $0 and fields"); |