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
eba7092f
Commit
eba7092f
authored
Jun 30, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Jul 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Allow numbered redirects at the beginning of a line.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55124
parent
35c8f15b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+9
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+6
-0
wcmdmain.c
programs/cmd/wcmdmain.c
+3
-3
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
eba7092f
...
...
@@ -176,6 +176,15 @@ del foo
echo foo> foo
echo foo7 7>> foo || (echo not supported & del foo)
if exist foo (type foo) else echo not supported
echo --- redirect at beginning of line
>foo (echo foo)
type foo
1>foo (echo foo1)
type foo
2>foo (echo foo2 >&2)
type foo
>>foo (echo fooA)
type foo
echo --- redirections within IF statements
if 1==1 echo foo1>bar
type bar & del bar
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
eba7092f
...
...
@@ -204,6 +204,12 @@ food2
food21
@todo_wine@foo7@space@@space@@or_broken@not supported@space@
@todo_wine@foo@or_broken@not supported
--- redirect at beginning of line
foo
foo1
foo2@space@
foo2@space@
fooA
--- redirections within IF statements
foo1
foo2
...
...
programs/cmd/wcmdmain.c
View file @
eba7092f
...
...
@@ -2070,9 +2070,9 @@ 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 (provided there's a preceding whitespace, and enough
chars read so far) */
if
(
cur
StringLen
>
2
&&
(
*
(
curPos
-
1
)
>=
'1'
)
&&
(
*
(
curPos
-
1
)
<=
'9'
)
&&
((
*
(
curPos
-
2
)
==
' '
)
||
(
*
(
curPos
-
2
)
==
'\t'
)
))
{
if
(
cur
Pos
[
-
1
]
>=
'1'
&&
curPos
[
-
1
]
<=
'9'
&&
(
curStringLen
==
1
||
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