1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-08-23 01:25:52 +03:00

sch2fig/main.c (read_file): be civil and report errors

This commit is contained in:
Werner Almesberger 2016-07-22 00:19:19 -03:00
parent adf9efdd95
commit 09ae0229c3

View File

@ -40,6 +40,10 @@ static void read_file(const char *name, void *ctx,
char *nl;
file = fopen(name, "r");
if (!file) {
perror(name);
exit(1);
}
while (fgets(buf, sizeof(buf), file)) {
nl = strchr(buf, '\n');
if (nl)