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
f3ae48cb
Commit
f3ae48cb
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: Add basic for /F string support.
parent
bcaf4fb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
builtins.c
programs/cmd/builtins.c
+25
-2
No files found.
programs/cmd/builtins.c
View file @
f3ae48cb
...
...
@@ -770,10 +770,11 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
/* Loop through all entries on the same line */
WCHAR
*
item
;
WCHAR
*
itemStart
;
WINE_TRACE
(
"Processing for set %p
\n
"
,
thisSet
);
i
=
0
;
while
(
*
(
item
=
WCMD_parameter
(
thisSet
->
command
,
i
,
NULL
)))
{
while
(
*
(
item
=
WCMD_parameter
(
thisSet
->
command
,
i
,
&
itemStart
)))
{
/*
* If the parameter within the set has a wildcard then search for matching files
...
...
@@ -817,7 +818,8 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
if
(
itemNum
<=
3
)
numbers
[
itemNum
-
1
]
=
atolW
(
item
);
/* else ignore them! */
}
else
if
(
doFileset
)
{
/* Filesets - either a list of files, or a command to run and parse the output */
}
else
if
(
doFileset
&&
*
itemStart
!=
'"'
)
{
HANDLE
input
;
...
...
@@ -847,6 +849,8 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
wine_dbgstr_w
(
buffer
));
if
(
where
)
{
/* FIXME: The following should be moved into its own routine and
reused for the string literal parsing below */
thisCmdStart
=
cmdStart
;
WCMD_part_execute
(
&
thisCmdStart
,
firstCmd
,
variable
,
parm
,
FALSE
,
TRUE
);
cmdEnd
=
thisCmdStart
;
...
...
@@ -857,6 +861,25 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
}
CloseHandle
(
input
);
}
/* Filesets - A string literal */
}
else
if
(
doFileset
&&
*
itemStart
==
'"'
)
{
WCHAR
buffer
[
MAXSTRING
]
=
{
'\0'
};
WCHAR
*
where
,
*
parm
;
/* Skip blank lines, and re-extract parameter now string has quotes removed */
strcpyW
(
buffer
,
item
);
parm
=
WCMD_parameter
(
buffer
,
0
,
&
where
);
WINE_TRACE
(
"Parsed parameter: %s from %s
\n
"
,
wine_dbgstr_w
(
parm
),
wine_dbgstr_w
(
buffer
));
if
(
where
)
{
/* FIXME: The following should be moved into its own routine and
reused for the string literal parsing below */
thisCmdStart
=
cmdStart
;
WCMD_part_execute
(
&
thisCmdStart
,
firstCmd
,
variable
,
parm
,
FALSE
,
TRUE
);
cmdEnd
=
thisCmdStart
;
}
}
WINE_TRACE
(
"Post-command, cmdEnd = %p
\n
"
,
cmdEnd
);
...
...
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