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
d62c6bb7
Commit
d62c6bb7
authored
Dec 13, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Dec 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Allow GOTO to a label which has a following whitespace, with test.
parent
dacdb07d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
builtins.c
programs/cmd/builtins.c
+12
-2
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+3
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+1
-0
No files found.
programs/cmd/builtins.c
View file @
d62c6bb7
...
@@ -1150,6 +1150,7 @@ void WCMD_give_help (WCHAR *command) {
...
@@ -1150,6 +1150,7 @@ void WCMD_give_help (WCHAR *command) {
void
WCMD_goto
(
CMD_LIST
**
cmdList
)
{
void
WCMD_goto
(
CMD_LIST
**
cmdList
)
{
WCHAR
string
[
MAX_PATH
];
WCHAR
string
[
MAX_PATH
];
WCHAR
current
[
MAX_PATH
];
/* Do not process any more parts of a processed multipart or multilines command */
/* Do not process any more parts of a processed multipart or multilines command */
if
(
cmdList
)
*
cmdList
=
NULL
;
if
(
cmdList
)
*
cmdList
=
NULL
;
...
@@ -1174,8 +1175,17 @@ void WCMD_goto (CMD_LIST **cmdList) {
...
@@ -1174,8 +1175,17 @@ void WCMD_goto (CMD_LIST **cmdList) {
SetFilePointer
(
context
->
h
,
0
,
NULL
,
FILE_BEGIN
);
SetFilePointer
(
context
->
h
,
0
,
NULL
,
FILE_BEGIN
);
while
(
WCMD_fgets
(
string
,
sizeof
(
string
)
/
sizeof
(
WCHAR
),
context
->
h
))
{
while
(
WCMD_fgets
(
string
,
sizeof
(
string
)
/
sizeof
(
WCHAR
),
context
->
h
))
{
str
=
string
;
str
=
string
;
while
(
isspaceW
(
*
str
))
str
++
;
while
(
isspaceW
(
*
str
))
str
++
;
if
((
*
str
==
':'
)
&&
(
lstrcmpiW
(
++
str
,
paramStart
)
==
0
))
return
;
if
(
*
str
==
':'
)
{
DWORD
index
=
0
;
str
++
;
while
(((
current
[
index
]
=
str
[
index
]))
&&
(
!
isspaceW
(
current
[
index
])))
index
++
;
/* ignore space at the end */
current
[
index
]
=
0
;
if
(
lstrcmpiW
(
current
,
paramStart
)
==
0
)
return
;
}
}
}
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NOTARGET
));
WCMD_output
(
WCMD_LoadMessage
(
WCMD_NOTARGET
));
}
}
...
...
programs/cmd/tests/test_builtins.cmd
View file @
d62c6bb7
...
@@ -88,3 +88,6 @@ echo goto with a leading space worked
...
@@ -88,3 +88,6 @@ echo goto with a leading space worked
if c==c goto dest3
if c==c goto dest3
:dest3
:dest3
echo goto with a leading tab worked
echo goto with a leading tab worked
if d==d goto dest4
:dest4@space@
echo goto with a following space worked
programs/cmd/tests/test_builtins.cmd.exp
View file @
d62c6bb7
...
@@ -82,3 +82,4 @@ if /I seems to work
...
@@ -82,3 +82,4 @@ if /I seems to work
goto with no leading space worked
goto with no leading space worked
goto with a leading space worked
goto with a leading space worked
goto with a leading tab worked
goto with a leading tab worked
goto with a following space worked
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