]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/awk/lib.c.diff
This commit was generated by cvs2svn to compensate for changes in r172677,
[FreeBSD/FreeBSD.git] / usr.bin / awk / lib.c.diff
1 $FreeBSD$
2
3 Index: lib.c
4 ===================================================================
5 RCS file: /home/ncvs/src/contrib/one-true-awk/lib.c,v
6 retrieving revision 1.1.1.5
7 diff -u -p -u -r1.1.1.5 lib.c
8 --- lib.c       5 Jun 2007 15:33:51 -0000       1.1.1.5
9 +++ lib.c       8 Jun 2007 04:14:51 -0000
10 @@ -40,7 +40,7 @@ char  *fields;
11  int    fieldssize = RECSIZE;
12  
13  Cell   **fldtab;       /* pointers to Cells */
14 -char   inputFS[10] = " ";
15 +char   inputFS[100] = " ";
16  
17  #define        MAXFLD  2
18  int    nfields = MAXFLD;       /* last allocated slot for $i */
19 @@ -58,7 +58,7 @@ static Cell dollar1 = { OCELL, CFLD, NUL
20  void recinit(unsigned int n)
21  {
22         if ( (record = (char *) malloc(n)) == NULL
23 -         || (fields = (char *) malloc(n)) == NULL
24 +         || (fields = (char *) malloc(n+1)) == NULL
25           || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL
26           || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL )
27                 FATAL("out of space for $0 and fields");