aboutsummaryrefslogtreecommitdiff
path: root/src/preproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/preproc.c')
-rw-r--r--src/preproc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/preproc.c b/src/preproc.c
index 8debdcf..4ab3066 100644
--- a/src/preproc.c
+++ b/src/preproc.c
@@ -474,4 +474,4 @@ pop_source()
474 474
475static int 475char *
476try_file(const char *name, int allow_cwd, int err_not_found, char **newp) 476grecs_find_include_file(const char *name, int allow_cwd)
477{ 477{
@@ -497,12 +497,6 @@ try_file(const char *name, int allow_cwd, int err_not_found, char **newp)
497 pp_list_find(std_include_path, &fd); 497 pp_list_find(std_include_path, &fd);
498 498 if (!fd.found)
499 if (!fd.found && err_not_found) { 499 return NULL;
500 grecs_error(&LOCUS, 0,
501 _("%s: No such file or directory"), name);
502 *newp = NULL;
503 }
504 } 500 }
505 if (fd.found) 501 return fd.buf;
506 *newp = fd.buf;
507 return fd.found;
508} 502}
@@ -537,4 +531,9 @@ parse_include(const char *text, int once)
537 531
538 if (p[0] != '/' && try_file(p, allow_cwd, 1, &tmp)) 532 if (p[0] != '/') {
539 p = tmp; 533 p = grecs_find_include_file(p, allow_cwd);
534 if (!p)
535 grecs_error(&LOCUS, 0,
536 _("%s: No such file or directory"),
537 p);
538 }
540 } 539 }
@@ -576,3 +575,4 @@ grecs_preproc_run(const char *config_file, const char *extpp)
576 575
577 if (try_file("pp-setup", 1, 0, &setup_file)) { 576 setup_file = grecs_find_include_file("pp-setup", 1);
577 if (setup_file) {
578 size_t size = 0; 578 size_t size = 0;

Return to:

Send suggestions and report system problems to the System administrator.