mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 21:21:14 +00:00
[qfcc] Report errors accessing source files
This got lost in the switch to internal preprocessing as cpp used to do the job for us.
This commit is contained in:
parent
6a70ecda9d
commit
3abf69cb36
1 changed files with 8 additions and 2 deletions
|
@ -671,7 +671,13 @@ preprocess_file (const char *filename, const char *ext)
|
||||||
return run_cpp (filename, ext);
|
return run_cpp (filename, ext);
|
||||||
} else {
|
} else {
|
||||||
set_line_file (1, filename, 0);
|
set_line_file (1, filename, 0);
|
||||||
return fopen (filename, "rb");
|
FILE *file = fopen (filename, "rb");
|
||||||
|
if (!file) {
|
||||||
|
fprintf (stderr, "%s: error: %s: %s\n", this_program, filename,
|
||||||
|
strerror (errno));
|
||||||
|
pr.error_count++;
|
||||||
|
}
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue