Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
118f3a65
Commit
118f3a65
authored
Sep 11, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Sep 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Allow = and , to be delimiters.
parent
b6924112
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
batch.c
programs/cmd/batch.c
+9
-4
No files found.
programs/cmd/batch.c
View file @
118f3a65
...
@@ -134,7 +134,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
...
@@ -134,7 +134,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
/*******************************************************************
/*******************************************************************
* WCMD_parameter - extract a parameter from a command line.
* WCMD_parameter - extract a parameter from a command line.
*
*
* Returns the 'n'th
space-
delimited parameter on the command line (zero-based).
* Returns the 'n'th delimited parameter on the command line (zero-based).
* Parameter is in static storage overwritten on the next call.
* Parameter is in static storage overwritten on the next call.
* Parameters in quotes (and brackets) are handled.
* Parameters in quotes (and brackets) are handled.
* Also returns a pointer to the location of the parameter in the command line.
* Also returns a pointer to the location of the parameter in the command line.
...
@@ -150,7 +150,7 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where) {
...
@@ -150,7 +150,7 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where) {
p
=
param
;
p
=
param
;
while
(
TRUE
)
{
while
(
TRUE
)
{
switch
(
*
s
)
{
switch
(
*
s
)
{
case
' '
:
case
' '
:
/* Skip leading spaces */
s
++
;
s
++
;
break
;
break
;
case
'"'
:
case
'"'
:
...
@@ -176,15 +176,20 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where) {
...
@@ -176,15 +176,20 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where) {
default:
default:
/* Only return where if it is for the right parameter */
/* Only return where if it is for the right parameter */
if
(
where
!=
NULL
&&
i
==
n
)
*
where
=
s
;
if
(
where
!=
NULL
&&
i
==
n
)
*
where
=
s
;
while
((
*
s
!=
'\0'
)
&&
(
*
s
!=
' '
))
{
while
((
*
s
!=
'\0'
)
&&
(
*
s
!=
' '
)
&&
(
*
s
!=
','
)
&&
(
*
s
!=
'='
)
)
{
*
p
++
=
*
s
++
;
*
p
++
=
*
s
++
;
}
}
if
(
i
==
n
)
{
if
(
i
==
n
&&
(
p
!=
param
)
)
{
*
p
=
'\0'
;
*
p
=
'\0'
;
return
param
;
return
param
;
}
}
/* Skip double delimiters, eg. dir a.a,,,,,b.b */
if
(
p
!=
param
)
{
param
[
0
]
=
'\0'
;
param
[
0
]
=
'\0'
;
i
++
;
i
++
;
}
else
{
s
++
;
/* Skip delimter */
}
p
=
param
;
p
=
param
;
}
}
}
}
...
...
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