From 8f27f92269e8e407cf7667fca14143f74d9e9187 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 16 Jan 1987 16:14:22 +0000 Subject: [PATCH] Bug fix with WorkingDir --- util/cpp/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/cpp/main.c b/util/cpp/main.c index fc581c3b1..bb1ea8d75 100644 --- a/util/cpp/main.c +++ b/util/cpp/main.c @@ -5,6 +5,7 @@ extern struct tokenname tkidf[], tkkey[]; extern char *symbol2str(); +extern char *getwdir(); extern char *inctable[]; extern int err_occurred; int idfsize = IDFSIZE; @@ -56,10 +57,10 @@ compile(argc, argv) fatal("use: %s [options] [source]", prog_name); break; } - WorkingDir = inctable[0]; if (!InsertFile(source, (char **) 0, &dummy)) /* read the source file */ fatal("%s: no source file %s\n", prog_name, source ? source : "stdin"); + WorkingDir = getwdir(dummy); preprocess(source); } -- 2.34.1