13 |
|
#include "platform.h" |
14 |
|
#include "paths.h" |
15 |
|
|
16 |
< |
#define MAXLINE 262144 /* maximum input line */ |
16 |
> |
#ifndef MAXLINE |
17 |
> |
#define MAXLINE (1L<<20) /* maximum input line per stream */ |
18 |
> |
#endif |
19 |
|
|
20 |
|
struct instream { /* structure to hold input stream info */ |
21 |
|
FILE *input; /* input stream */ |
50 |
|
case 't': |
51 |
|
curtab = argv[i]+2; |
52 |
|
if (!*curtab) curtab = "\n"; |
53 |
< |
break; |
53 |
> |
continue; |
54 |
|
case 'u': |
55 |
|
unbuff = !unbuff; |
56 |
< |
break; |
56 |
> |
continue; |
57 |
|
case 'i': |
58 |
|
switch (argv[i][2]) { |
59 |
|
case 'n': |
60 |
|
incnt = atol(argv[++i]); |
61 |
< |
break; |
61 |
> |
continue; |
62 |
|
case 'f': |
63 |
|
case 'F': |
64 |
|
curbytes = sizeof(float); |
96 |
|
curtab = ""; |
97 |
|
++binout; |
98 |
|
} |
99 |
< |
break; |
99 |
> |
continue; |
100 |
|
case '\0': |
101 |
|
rifile[nfiles].tabc = curtab; |
102 |
|
rifile[nfiles].input = stdin; |
103 |
|
if (curbytes > 0) |
104 |
|
SET_FILE_BINARY(rifile[nfiles].input); |
105 |
|
rifile[nfiles++].bytsiz = curbytes; |
106 |
< |
break; |
106 |
> |
continue; |
107 |
|
badopt:; |
108 |
|
default: |
109 |
|
fputs(argv[0], stderr); |
110 |
< |
fputs(": bad option\n", stderr); |
110 |
> |
fputs(": unknown option '", stderr); |
111 |
> |
fputs(argv[i], stderr); |
112 |
> |
fputs("'\n", stderr); |
113 |
|
return(1); |
114 |
|
} |
115 |
< |
} else if (argv[i][0] == '!') { |
115 |
> |
} |
116 |
> |
if (argv[i][0] == '!') { |
117 |
|
rifile[nfiles].tabc = curtab; |
118 |
|
if ((rifile[nfiles].input = popen(argv[i]+1, "r")) == NULL) { |
119 |
|
fputs(argv[i], stderr); |