main.c: Fixed reading of files specified on command line.
This commit is contained in:
Родитель
fa54bd8143
Коммит
84bad74400
11
src/main.c
11
src/main.c
|
@ -67,16 +67,13 @@ int main(int argc, char *argv[]) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
struct bStream *stream = bsopen((bNread)fread, fp);
|
||||
if (stream == NULL) {
|
||||
printf("Error opening stream\n");
|
||||
}
|
||||
while (bsreadln(s, stream, '\n') != BSTR_ERR) {
|
||||
while ((s = bgets((bNgetc) fgetc, fp, '\n'))) {
|
||||
check(incorporate_line(s, linenum, &cur) == 0,
|
||||
"error incorporating line %d of %s", linenum, argv[files[g]]);
|
||||
"error incorporating line %d", linenum);
|
||||
bdestroy(s);
|
||||
linenum++;
|
||||
}
|
||||
bsclose(stream);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче