From 7ec6a3cbc5f32844c36bc0a78c64824067c84b97 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Tue, 11 Mar 2003 00:08:40 +0000 Subject: [PATCH] src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2371 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 1 + src/SDCCmain.c | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index d23d0f1d..3b36a341 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2003-03-11 Bernhard Held * src/SDCCloop.c (mergeRegions): an evil beast is dead + * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName 2003-03-10 Borut Razem diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 5fd4cf0a..308175e2 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -76,7 +76,6 @@ char *libPaths[128]; int nlibPaths = 0; char *relFiles[128]; int nrelFiles = 0; -static char *preOutName; /* uncomment JAMIN_DS390 to always override and use ds390 port for mcs51 work. This is temporary, for compatibility testing. */ @@ -1606,16 +1605,16 @@ preProcess (char **envp) setMainValue ("cppextraopts", join(preArgv)); - if (preProcOnly) - { - if (fullDstFileName) - { - preOutName = Safe_strdup (fullDstFileName); - } - } - - /* Have to set cppoutfilename to something, even if just pre-processing. */ - setMainValue ("cppoutfilename", preOutName ? preOutName : ""); + if (preProcOnly && fullDstFileName) + { + /* -E and -o given */ + setMainValue ("cppoutfilename", fullDstFileName); + } + else + { + /* Have to set cppoutfilename to something, even if piping */ + setMainValue ("cppoutfilename", ""); + } if (options.verbose) printf ("sdcc: Calling preprocessor...\n"); -- 2.30.2