mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +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
|
@ -668,10 +668,16 @@ FILE *
|
|||
preprocess_file (const char *filename, const char *ext)
|
||||
{
|
||||
if (cpp_name) {
|
||||
return run_cpp (filename, ext);
|
||||
return run_cpp (filename, ext);
|
||||
} else {
|
||||
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