PERFORCE change 13116 for review
[email protected] (Chris Nandor) Mon, 19 Nov 2001 23:32:20 -0500
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05100300b81f8d4d510b@[10.0.1.177]> |
Change 13116 by pudge@pudge-mobile on 2001/11/20 02:47:23
Integrate with maint-5.6/perl.
Affected files ...
.... //depot/maint-5.6/macperl/win32/win32.c#7 integrate
Differences ...
==== //depot/maint-5.6/macperl/win32/win32.c#7 (text) ====
Index: perl/win32/win32.c
--- perl/win32/win32.c.~1~ Mon Nov 19 20:00:05 2001
+++ perl/win32/win32.c Mon Nov 19 20:00:05 2001
@@ -3068,6 +3068,7 @@
STRLEN len = 0;
bool bat_file = FALSE;
bool cmd_shell = FALSE;
+ bool dumb_shell = FALSE;
bool extra_quotes = FALSE;
bool quote_next = FALSE;
@@ -3113,6 +3114,11 @@
cmd_shell = TRUE;
len += 3;
}
+ else if (stricmp(exe, "command.com") == 0
+ || stricmp(exe, "command") == 0)
+ {
+ dumb_shell = TRUE;
+ }
}
}
@@ -3141,26 +3147,28 @@
/* we want to protect empty arguments and ones with spaces with
* dquotes, but only if they aren't already there */
- if (!curlen) {
- do_quote = 1;
- }
- else if (!(arg[0] == '"' && curlen > 1 && arg[curlen-1] == '"')) {
- STRLEN i = 0;
- while (i < curlen) {
- if (isSPACE(arg[i])) {
+ if (!dumb_shell) {
+ if (!curlen) {
+ do_quote = 1;
+ }
+ else if (!(arg[0] == '"' && curlen > 1 && arg[curlen-1] == '"')) {
+ STRLEN i = 0;
+ while (i < curlen) {
+ if (isSPACE(arg[i])) {
+ do_quote = 1;
+ break;
+ }
+ i++;
+ }
+ }
+ else if (quote_next) {
+ /* ok, we know the argument already has quotes; see if it
+ * really is multiple arguments pretending to be one and
+ * force a set of quotes around it */
+ if (*find_next_space(arg))
do_quote = 1;
- break;
- }
- i++;
}
}
- else if (quote_next) {
- /* ok, we know the argument already has quotes; see if it
- * really is multiple arguments pretending to be one and
- * force a set of quotes around it */
- if (*find_next_space(arg))
- do_quote = 1;
- }
if (do_quote)
*ptr++ = '"';
End of Patch.