13 |
|
#include <math.h> |
14 |
|
#include "platform.h" |
15 |
|
|
16 |
< |
#define MAXCOL 2048 /* maximum number of columns */ |
16 |
> |
#define MAXCOL 8192 /* maximum number of columns */ |
17 |
|
|
18 |
|
#define ADD 0 /* add numbers */ |
19 |
|
#define MULT 1 /* multiply numbers */ |
213 |
|
return; |
214 |
|
} |
215 |
|
/* ASCII output */ |
216 |
< |
while (n-- > 0) |
217 |
< |
fprintf(fp, "%.9g%c", *field++, tabc); |
216 |
> |
while (n-- > 0) { |
217 |
> |
fprintf(fp, "%.9g", *field++); |
218 |
> |
if (n) fputc(tabc, fp); |
219 |
> |
} |
220 |
|
fputc('\n', fp); |
221 |
|
} |
222 |
|
|
243 |
|
} |
244 |
|
if (nbicols) |
245 |
|
SET_FILE_BINARY(fp); |
246 |
+ |
#ifdef getc_unlocked /* avoid lock/unlock overhead */ |
247 |
+ |
flockfile(fp); |
248 |
+ |
#endif |
249 |
+ |
|
250 |
|
ltotal = 0; |
251 |
|
while (!feof(fp)) { |
252 |
|
if (ltotal == 0) { /* initialize */ |