25 |
|
|
26 |
|
#define isblnk(c) (igneol ? isspace(c) : (c)==' '||(c)=='\t') |
27 |
|
|
28 |
< |
#define INBSIZ 4096 /* longest record */ |
28 |
> |
#define INBSIZ 16384 /* longest record */ |
29 |
|
#define MAXCOL 32 /* number of columns recorded */ |
30 |
|
|
31 |
|
/* field type specifications */ |
454 |
|
eputs(": cannot open\n"); |
455 |
|
quit(1); |
456 |
|
} |
457 |
< |
res = read(fd, inpbuf+1, INBSIZ-1); |
457 |
> |
res = read(fd, inpbuf+2, INBSIZ-2); |
458 |
|
if (res <= 0 || res >= INBSIZ-1) { |
459 |
|
eputs(spec); |
460 |
|
if (res < 0) |
466 |
|
quit(1); |
467 |
|
} |
468 |
|
close(fd); |
469 |
< |
(inptr=inpbuf+1)[res] = '\0'; |
469 |
> |
(inptr=inpbuf+2)[res] = '\0'; |
470 |
|
} |
471 |
|
f = &fmt; /* get fields */ |
472 |
|
while ((res = readfield(&inptr)) != F_NUL) { |
632 |
|
{ |
633 |
|
int eatline; |
634 |
|
register struct field *f; |
635 |
< |
|
635 |
> |
|
636 |
|
while (ipb.chr != EOF) { |
637 |
– |
eatline = !igneol && ipb.chr != '\n'; |
637 |
|
if (blnkeq) /* beware of nbsynch() */ |
638 |
|
while (isblnk(ipb.chr)) |
639 |
|
resetinp(); |
640 |
+ |
eatline = (!igneol && ipb.chr != '\n'); |
641 |
|
clearrec(); /* start with fresh record */ |
642 |
|
for (f = inpfmt; f != NULL; f = f->next) |
643 |
|
if (getfield(f) == -1) |