version 1.24, 2002/03/11 13:08:51 |
version 1.25, 2002/05/29 12:28:45 |
|
|
int |
int |
load(const char *fname) |
load(const char *fname) |
{ |
{ |
int s = TRUE; |
int s = TRUE, line; |
int nbytes = 0; |
int nbytes = 0; |
char excbuf[128]; |
char excbuf[128]; |
|
|
|
|
if (ffropen(fname, NULL) != FIOSUC) |
if (ffropen(fname, NULL) != FIOSUC) |
return FALSE; |
return FALSE; |
|
|
|
line = 0; |
while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) { |
while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) { |
|
line++; |
excbuf[nbytes] = '\0'; |
excbuf[nbytes] = '\0'; |
if (excline(excbuf) != TRUE) { |
if (excline(excbuf) != TRUE) { |
s = FIOERR; |
s = FIOERR; |
ewprintf("Error loading file %s", fname); |
ewprintf("Error loading file %s at line %d", fname, line); |
break; |
break; |
} |
} |
} |
} |