Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sylvain Joubert
KWSys
Commits
363cbd83
Commit
363cbd83
authored
17 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Some single-character arguments need quoting on windows.
parent
bf5b6c1e
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
System.c
+22
-0
22 additions, 0 deletions
System.c
with
22 additions
and
0 deletions
System.c
+
22
−
0
View file @
363cbd83
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment