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
71a237d4
Commit
71a237d4
authored
Aug 05, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix handling of lines starting with echo. or echo:.
parent
9ad60d1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+4
-4
wcmdmain.c
programs/cmd/wcmdmain.c
+13
-1
No files found.
programs/cmd/tests/test_builtins.cmd.exp
View file @
71a237d4
...
...
@@ -18,25 +18,25 @@ at-echoed-word
@pwd@>echo "/?"@space@
"/?"
@
todo_wine@@
pwd@>echo.
@pwd@>echo.
@pwd@>echo .@space@
.
@
todo_wine@@
pwd@>echo.word
@pwd@>echo.word
word
@pwd@>echo .word@space@
.word
@
todo_wine@@
pwd@>echo:
@pwd@>echo:
@pwd@>echo :@space@
:
@
todo_wine@@
pwd@>echo:word
@pwd@>echo:word
word
@pwd@>echo :word@space@
...
...
programs/cmd/wcmdmain.c
View file @
71a237d4
...
...
@@ -1786,10 +1786,22 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
/* Show prompt before batch line IF echo is on and in batch program */
if
(
context
&&
echo_mode
&&
extraSpace
[
0
]
&&
(
extraSpace
[
0
]
!=
'@'
))
{
const
WCHAR
spc
[]
=
{
' '
,
'\0'
};
const
WCHAR
echoDot
[]
=
{
'e'
,
'c'
,
'h'
,
'o'
,
'.'
};
const
WCHAR
echoCol
[]
=
{
'e'
,
'c'
,
'h'
,
'o'
,
':'
};
const
DWORD
len
=
sizeof
(
echoDot
)
/
sizeof
(
echoDot
[
0
]);
DWORD
curr_size
=
strlenW
(
extraSpace
);
DWORD
min_len
=
(
curr_size
<
len
?
curr_size
:
len
);
WCMD_show_prompt
();
WCMD_output_asis
(
extraSpace
);
/* I don't know why Windows puts a space here but it does */
WCMD_output_asis
(
spc
);
/* Except for lines starting with 'echo.' or 'echo:'. Ask MS why */
if
(
CompareStringW
(
LOCALE_SYSTEM_DEFAULT
,
NORM_IGNORECASE
,
extraSpace
,
min_len
,
echoDot
,
len
)
!=
CSTR_EQUAL
&&
CompareStringW
(
LOCALE_SYSTEM_DEFAULT
,
NORM_IGNORECASE
,
extraSpace
,
min_len
,
echoCol
,
len
)
!=
CSTR_EQUAL
)
{
WCMD_output_asis
(
spc
);
}
WCMD_output_asis
(
newline
);
}
...
...
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