Skip to content
Snippets Groups Projects
Commit 363cbd83 authored by Brad King's avatar Brad King
Browse files

BUG: Some single-character arguments need quoting on windows.

parent bf5b6c1e
No related merge requests found
......@@ -50,6 +50,15 @@ just NOT quote them and let the listfile author deal with it.
*/
/*
TODO: For windows echo:
To display a pipe (|) or redirection character (< or >) when using the
echo command, use a caret character immediately before the pipe or
redirection character (for example, ^>, ^<, or ^| ). If you need to
use the caret character itself (^), use two in a row (^^).
*/
/*--------------------------------------------------------------------------*/
static int kwsysSystem_Shell__CharIsWhitespace(char c)
{
......@@ -159,6 +168,7 @@ static int kwsysSystem_Shell__ArgumentNeedsQuotes(const char* in, int isUnix,
int flags)
{
/* Scan the string for characters that require quoting. */
{
const char* c;
for(c=in; *c; ++c)
{
......@@ -191,6 +201,18 @@ static int kwsysSystem_Shell__ArgumentNeedsQuotes(const char* in, int isUnix,
return 1;
}
}
}
/* On Windows some single character arguments need quotes. */
if(!isUnix && *in && !*(in+1))
{
char c = *in;
if((c == '?') || (c == '&') || (c == '^') || (c == '|') || (c == '#'))
{
return 1;
}
}
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment