version 1.52, 2012/04/12 04:47:59 |
version 1.53, 2012/05/25 04:56:58 |
|
|
int s = TRUE, line; |
int s = TRUE, line; |
int nbytes = 0; |
int nbytes = 0; |
char excbuf[128]; |
char excbuf[128]; |
|
FILE *ffp; |
|
|
if ((fname = adjustname(fname, TRUE)) == NULL) |
if ((fname = adjustname(fname, TRUE)) == NULL) |
/* just to be careful */ |
/* just to be careful */ |
return (FALSE); |
return (FALSE); |
|
|
if (ffropen(fname, NULL) != FIOSUC) |
if (ffropen(&ffp, fname, NULL) != FIOSUC) |
return (FALSE); |
return (FALSE); |
|
|
line = 0; |
line = 0; |
while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) { |
while ((s = ffgetline(ffp, excbuf, sizeof(excbuf) - 1, &nbytes)) |
|
== FIOSUC) { |
line++; |
line++; |
excbuf[nbytes] = '\0'; |
excbuf[nbytes] = '\0'; |
if (excline(excbuf) != TRUE) { |
if (excline(excbuf) != TRUE) { |
|
|
break; |
break; |
} |
} |
} |
} |
(void)ffclose(NULL); |
(void)ffclose(ffp, NULL); |
excbuf[nbytes] = '\0'; |
excbuf[nbytes] = '\0'; |
if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE)) |
if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE)) |
return (FALSE); |
return (FALSE); |