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
bbdaed2f
Commit
bbdaed2f
authored
Aug 27, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix redirection handle parsing.
parent
523683d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
16 deletions
+29
-16
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+9
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+15
-12
wcmdmain.c
programs/cmd/wcmdmain.c
+5
-4
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
bbdaed2f
...
...
@@ -81,6 +81,12 @@ echo foo>foo
type foo
echo foo 1> foo
type foo
echo foo@tab@1> foo
type foo
echo foo 1>@tab@foo
type foo
echo foo@tab@1>@tab@foo
type foo
echo foo7 7> foo
type foo
echo foo9 9> foo
...
...
@@ -91,6 +97,9 @@ echo foo11> foo
type foo
echo foo12> foo
type foo
del foo
echo1>foo
type foo
echo ...stdout appending
echo foo>foo
echo foo >>foo
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
bbdaed2f
...
...
@@ -120,11 +120,14 @@ word
...stdout redirection
foo
foo@space@
foo7@space@@or_broken@foo@space@
foo9@space@@or_broken@foo@space@
@todo_wine@foo1
@todo_wine@foo11
@todo_wine@foo12
foo@tab@
foo@space@
foo@tab@
foo7@space@@or_broken@foo@tab@
foo9@space@@or_broken@foo@tab@
foo1
foo11
foo12
...stdout appending
foo
foo@space@
...
...
@@ -133,12 +136,12 @@ foob@space@
fooc@space@
foob@space@
fooc@space@
@todo_wine@
food1
@todo_wine@
foob@space@
@todo_wine@
fooc@space@
@todo_wine@
food1
@todo_wine@
food2
@todo_wine@
food21
food1
foob@space@
fooc@space@
food1
food2
food21
@todo_wine@foo7@space@@space@@or_broken@not supported@space@
@todo_wine@foo@or_broken@not supported
@todo_wine@------------ Testing ^ escape character --------------
...
...
@@ -621,7 +624,7 @@ lulu
file created in read-only dir
------------ Testing CALL --------------
foo@space@
@todo_wine@
foo 8
foo 8
foo@space@@space@
foo bar@space@
@todo_wine@foo ""@space@
...
...
programs/cmd/wcmdmain.c
View file @
bbdaed2f
...
...
@@ -1944,10 +1944,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
}
/* See if 1>, 2> etc, in which case we have some patching up
to do */
if
(
curPos
!=
extraSpace
&&
*
(
curPos
-
1
)
>=
'1'
&&
*
(
curPos
-
1
)
<=
'9'
)
{
to do (provided there's a preceding whitespace, and enough
chars read so far) */
if
(
curStringLen
>
2
&&
(
*
(
curPos
-
1
)
>=
'1'
)
&&
(
*
(
curPos
-
1
)
<=
'9'
)
&&
((
*
(
curPos
-
2
)
==
' '
)
||
(
*
(
curPos
-
2
)
==
'\t'
)))
{
curStringLen
--
;
curString
[
curStringLen
]
=
0x00
;
curCopyTo
[(
*
curLen
)
++
]
=
*
(
curPos
-
1
);
...
...
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