62 |
|
} |
63 |
|
if (s1 == s) |
64 |
|
continue; |
65 |
< |
if (isspace(*s1) && !*s2 | isspace(*s2)) |
66 |
< |
return(0); /* skip */ |
65 |
> |
if ((*s1 == '=') & !*s2) |
66 |
> |
return(0); |
67 |
> |
if (isspace(*s1) & isspace(*s2)) |
68 |
> |
return(0); |
69 |
|
} |
70 |
|
fputs(s, stdout); /* copy if no match */ |
71 |
|
return(0); |
115 |
|
|
116 |
|
fflush(stdout); |
117 |
|
while ((n = fread(buf, 1, sizeof(buf), stdin)) > 0) |
118 |
< |
if (writebuf(fileno(stdout), buf, n) != n) |
118 |
> |
if (writebuf(1, buf, n) != n) |
119 |
|
break; |
120 |
|
} |
121 |
|
|
137 |
|
} |
138 |
|
#ifdef getc_unlocked /* avoid lock/unlock overhead */ |
139 |
|
flockfile(stdin); |
140 |
+ |
flockfile(stdout); |
141 |
|
#endif |
142 |
|
SET_FILE_BINARY(stdin); |
143 |
|
if (argc > 2 && !strcmp(argv[1], "-c")) { |
231 |
|
if ((fp = fopen(argv[i], "r")) == NULL) |
232 |
|
fputs(": cannot open\n", stdout); |
233 |
|
else { |
234 |
+ |
#ifdef getc_unlocked /* avoid lock/unlock overhead */ |
235 |
+ |
flockfile(fp); |
236 |
+ |
#endif |
237 |
|
if (dim < 0) { /* dimensions only */ |
238 |
|
if (getheader(fp, NULL, NULL) < 0) { |
239 |
< |
fputs("bad header!\n", stdout); |
239 |
> |
fputs(": bad header!\n", stdout); |
240 |
|
continue; |
241 |
|
} |
242 |
|
fputs(": ", stdout); |