Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
ffe11324
Commit
ffe11324
authored
Oct 01, 2002
by
Ken Martin
Browse files
Put quotes around arguments if they have spaces and no quotes
parent
4918ce65
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/cmw9xcom.cxx
View file @
ffe11324
...
...
@@ -25,12 +25,24 @@ int main (int argc, char *argv[])
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" executable"
<<
std
::
endl
;
return
1
;
}
std
::
string
command
=
argv
[
1
];
std
::
string
arg
=
argv
[
1
];
if
(
(
arg
.
find_first_of
(
" "
)
!=
arg
.
npos
)
&&
(
arg
.
find_first_of
(
"
\"
"
)
==
arg
.
npos
)
)
{
arg
=
"
\"
"
+
arg
+
"
\"
"
;
}
std
::
string
command
=
arg
;
int
cc
;
for
(
cc
=
2
;
cc
<
argc
;
cc
++
)
{
std
::
string
arg
=
argv
[
cc
];
if
(
(
arg
.
find_first_of
(
" "
)
!=
arg
.
npos
)
&&
(
arg
.
find_first_of
(
"
\"
"
)
==
arg
.
npos
)
)
{
arg
=
"
\"
"
+
arg
+
"
\"
"
;
}
command
+=
" "
;
command
+=
arg
v
[
cc
]
;
command
+=
arg
;
}
return
cmWin32ProcessExecution
::
Windows9xHack
(
command
.
c_str
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment