| 128 |
if ((fd = open(fn, O_RDONLY)) < 0) |
if ((fd = open(fn, O_RDONLY)) < 0) |
| 129 |
err(255, "cannot open input file '%s'", fn); |
err(255, "cannot open input file '%s'", fn); |
| 130 |
printf("parsing %s…", fn); |
printf("parsing %s…", fn); |
| 131 |
|
if (parser_errpfx != NULL) |
| 132 |
|
free(parser_errpfx); |
| 133 |
|
parser_errpfx = strdup(fn); |
| 134 |
parsed = nfo_parse(fd, kwords); |
parsed = nfo_parse(fd, kwords); |
| 135 |
|
free(parser_errpfx); |
| 136 |
|
parser_errpfx = NULL; |
| 137 |
close(fd); |
close(fd); |
| 138 |
if (CIRCLEQ_EMPTY(parsed)) |
if (CIRCLEQ_EMPTY(parsed)) |
| 139 |
errx(1, "error, no entries in the file!"); |
errx(1, "error, no entries in the file!"); |