From 7452c85b9cd9bf9e5c08169a5faada6702960fad Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Thu, 16 May 2002 14:28:08 +0000 Subject: [PATCH] #141820 r=wtc, a=chofmann OS/2 only - don't quote parameters when calling DosStartSession git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@121633 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/pr/src/md/os2/os2misc.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/mozilla/nsprpub/pr/src/md/os2/os2misc.c b/mozilla/nsprpub/pr/src/md/os2/os2misc.c index 2c47a305a89..7acaa830c38 100644 --- a/mozilla/nsprpub/pr/src/md/os2/os2misc.c +++ b/mozilla/nsprpub/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++ = ' '; }