diff options
author | mkaply%us.ibm.com <devnull@localhost> | 2002-05-16 14:28:08 +0000 |
---|---|---|
committer | mkaply%us.ibm.com <devnull@localhost> | 2002-05-16 14:28:08 +0000 |
commit | 6002072f02ef4765d81feebd66eebb4b143bcad8 (patch) | |
tree | c6bbd670e4a6495f9a55f4146cbc22299082b66f | |
parent | deec44131bdbbe6de1dcadbfcb888f43d2a69d3d (diff) | |
download | nspr-hg-6002072f02ef4765d81feebd66eebb4b143bcad8.tar.gz |
#141820
r=wtc, a=chofmann
OS/2 only - don't quote parameters when calling DosStartSession
-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++ = ' '; } |