diff options
author | wtc%netscape.com <devnull@localhost> | 2002-05-02 21:14:00 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-05-02 21:14:00 +0000 |
commit | ac33c287f9bf7b55417a389df8e027ee3b7dd85c (patch) | |
tree | 4d0011fb479b9792c1dbd0308c88a29dc8ba4b3e | |
parent | 849179cd5e0c515b2177ebde4ed9eb9ca256493c (diff) | |
download | nspr-hg-ac33c287f9bf7b55417a389df8e027ee3b7dd85c.tar.gz |
Bugzilla bug 141820: don't quote parameters when calling DosStart.
The patch is contributed by Michael Kaply <mkaply@us.ibm.com>.
-rw-r--r-- | pr/src/md/os2/os2misc.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/pr/src/md/os2/os2misc.c b/pr/src/md/os2/os2misc.c index 2c47a305..7acaa830 100644 --- a/pr/src/md/os2/os2misc.c +++ b/pr/src/md/os2/os2misc.c @@ -122,7 +122,6 @@ static int assembleCmdLine(char *const *argv, char **cmdLine) int cmdLineSize; int numBackslashes; int i; - int argNeedQuotes; /* * Find out how large the command line buffer should be. @@ -138,7 +137,6 @@ static int assembleCmdLine(char *const *argv, char **cmdLine) * of command line. */ cmdLineSize += 2 * strlen(*arg) /* \ and " need to be escaped */ - + 2 /* we quote every argument */ + 4; /* space in between, or final nulls */ } p = *cmdLine = PR_MALLOC(cmdLineSize); @@ -153,16 +151,7 @@ static int assembleCmdLine(char *const *argv, char **cmdLine) } q = *arg; numBackslashes = 0; - argNeedQuotes = 0; - /* If the argument contains white space, it needs to be quoted. */ - if (strpbrk(*arg, " \f\n\r\t\v")) { - argNeedQuotes = 1; - } - - if (argNeedQuotes) { - *p++ = '"'; - } while (*q) { if (*q == '\\') { numBackslashes++; @@ -198,20 +187,10 @@ static int assembleCmdLine(char *const *argv, char **cmdLine) /* Now we are at the end of this argument */ if (numBackslashes) { - /* - * Double the backslashes if we have a quote string - * delimiter at the end. - */ - if (argNeedQuotes) { - numBackslashes *= 2; - } for (i = 0; i < numBackslashes; i++) { *p++ = '\\'; } } - if (argNeedQuotes) { - *p++ = '"'; - } if(arg == argv) *p++ = ' '; } |