From 09b5922b840d619734109b7b323696b968d16ba3 Mon Sep 17 00:00:00 2001 From: borutr Date: Sun, 30 Mar 2003 19:48:42 +0000 Subject: [PATCH] introduced set binPathSet, definition of "cppoutfilename" macro with NULL value in preProcess() git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2445 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCmain.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 67d0ce27..708ba0b5 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -89,10 +89,6 @@ int ds390_jammed = 0; char scratchFileName[PATH_MAX]; char buffer[PATH_MAX * 2]; -// In MSC VC6 default search path for exe's to path for this - -char DefaultExePath[128]; - #define OPTION_HELP "-help" #define LENGTH(_a) (sizeof(_a)/sizeof(*(_a))) @@ -476,8 +472,6 @@ parseWithComma (char **dest, char *src) /*-----------------------------------------------------------------*/ /* setParseWithComma - separates string with comma to a set */ -/* */ -/* CAUTION: set items are no strdup-ed! */ /*-----------------------------------------------------------------*/ void setParseWithComma (set **dest, char *src) @@ -1629,8 +1623,8 @@ preProcess (char **envp) } else { - /* Have to set cppoutfilename to something, even if piping */ - setMainValue ("cppoutfilename", ""); + /* Piping: set cppoutfilename to NULL, to avoid empty quotes */ + setMainValue ("cppoutfilename", NULL); } if (options.verbose) @@ -1727,7 +1721,7 @@ _discoverPaths (const char *argv0) strncpyz (scratchFileName, argv0, sizeof(scratchFileName)); *strrchr (scratchFileName, DIR_SEPARATOR_CHAR) = '\0'; setMainValue ("bindir", scratchFileName); - ExePathList[0] = Safe_strdup (scratchFileName); + addSet(&binPathSet, Safe_strdup (scratchFileName)); } else if (getenv (SDCCDIR_NAME) != NULL) { @@ -1735,12 +1729,12 @@ _discoverPaths (const char *argv0) strncpyz (scratchFileName, getenv (SDCCDIR_NAME), sizeof(scratchFileName)); strncatz (scratchFileName, buffer, sizeof(scratchFileName)); setMainValue ("bindir", scratchFileName); - ExePathList[0] = Safe_strdup (scratchFileName); + addSet(&binPathSet, Safe_strdup (scratchFileName)); } else { setMainValue ("bindir", BINDIR); - ExePathList[0] = BINDIR; + addSet(&binPathSet, BINDIR); } do -- 2.47.2