Deleted Added
full compact
lib.c (146299) lib.c (170331)
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 26 unchanged lines hidden (view full) ---

35FILE *infile = NULL;
36char *file = "";
37char *record;
38int recsize = RECSIZE;
39char *fields;
40int fieldssize = RECSIZE;
41
42Cell **fldtab; /* pointers to Cells */
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 26 unchanged lines hidden (view full) ---

35FILE *infile = NULL;
36char *file = "";
37char *record;
38int recsize = RECSIZE;
39char *fields;
40int fieldssize = RECSIZE;
41
42Cell **fldtab; /* pointers to Cells */
43char inputFS[100] = " ";
43char inputFS[10] = " ";
44
44
45#define MAXFLD 200
45#define MAXFLD 2
46int nfields = MAXFLD; /* last allocated slot for $i */
47
48int donefld; /* 1 = implies rec broken into fields */
49int donerec; /* 1 = record is valid (no flds have changed) */
50
51int lastfld = 0; /* last used field */
52int argno = 1; /* current input argument number */
53extern Awkfloat *ARGC;

--- 114 unchanged lines hidden (view full) ---

168 buf[0] = saveb0;
169 *pbuf = buf;
170 *pbufsize = savebufsize;
171 return 0; /* true end of file */
172}
173
174void nextfile(void)
175{
46int nfields = MAXFLD; /* last allocated slot for $i */
47
48int donefld; /* 1 = implies rec broken into fields */
49int donerec; /* 1 = record is valid (no flds have changed) */
50
51int lastfld = 0; /* last used field */
52int argno = 1; /* current input argument number */
53extern Awkfloat *ARGC;

--- 114 unchanged lines hidden (view full) ---

168 buf[0] = saveb0;
169 *pbuf = buf;
170 *pbufsize = savebufsize;
171 return 0; /* true end of file */
172}
173
174void nextfile(void)
175{
176 if (infile != stdin)
176 if (infile != NULL && infile != stdin)
177 fclose(infile);
178 infile = NULL;
179 argno++;
180}
181
182int readrec(char **pbuf, int *pbufsize, FILE *inf) /* read one record into buf */
183{
184 int sep, c;

--- 512 unchanged lines hidden ---
177 fclose(infile);
178 infile = NULL;
179 argno++;
180}
181
182int readrec(char **pbuf, int *pbufsize, FILE *inf) /* read one record into buf */
183{
184 int sep, c;

--- 512 unchanged lines hidden ---