170 |
|
|
171 |
|
int |
172 |
|
formatval( /* get format value (return true if format) */ |
173 |
< |
char *r, |
173 |
> |
char fmt[MAXFMTLEN], |
174 |
|
const char *s |
175 |
|
) |
176 |
|
{ |
177 |
|
const char *cp = FMTSTR; |
178 |
+ |
char *r = fmt; |
179 |
|
|
180 |
|
while (*cp) if (*cp++ != *s++) return(0); |
181 |
|
while (isspace(*s)) s++; |
183 |
|
if (r == NULL) return(1); |
184 |
|
do |
185 |
|
*r++ = *s++; |
186 |
< |
while (*s && !isspace(*s)); |
186 |
> |
while (*s && !isspace(*s) && r-fmt < MAXFMTLEN-1); |
187 |
|
*r = '\0'; |
188 |
|
return(1); |
189 |
|
} |
231 |
|
|
232 |
|
struct check { |
233 |
|
FILE *fp; |
234 |
< |
char fs[64]; |
234 |
> |
char fs[MAXFMTLEN]; |
235 |
|
}; |
236 |
|
|
237 |
|
|
320 |
|
int |
321 |
|
checkheader( |
322 |
|
FILE *fin, |
323 |
< |
char *fmt, |
323 |
> |
char fmt[MAXFMTLEN], |
324 |
|
FILE *fout |
325 |
|
) |
326 |
|
{ |