cmd: Add a space at the end of the first echo'ed batch line
Alexandre Goujon
ale.goujon at gmail.com
Sun Oct 3 06:18:36 CDT 2010
---
programs/cmd/tests/batch.c | 2 +-
programs/cmd/wcmdmain.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c
index cc8c020..d7a5e84 100644
--- a/programs/cmd/tests/batch.c
+++ b/programs/cmd/tests/batch.c
@@ -131,7 +131,7 @@ static const char *compare_line(const char *out_line, const char *out_end, const
}else if(exp_ptr+sizeof(todo_space_cmd) <= exp_end
&& !memcmp(exp_ptr, todo_space_cmd, sizeof(todo_space_cmd))) {
exp_ptr += sizeof(todo_space_cmd);
- todo_wine ok(*out_ptr == ' ', "expected space\n");
+ ok(*out_ptr == ' ', "expected space\n");
if(out_ptr < out_end && *out_ptr == ' ')
out_ptr++;
continue;
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index b50512e..247457a 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1779,8 +1779,11 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
if (context) handleExpansion(extraSpace, FALSE, NULL, NULL);
/* 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'};
WCMD_show_prompt();
WCMD_output_asis(extraSpace);
+ /* I don't know why Windows puts a space here but it does */
+ WCMD_output_asis(spc);
WCMD_output_asis(newline);
}
--
1.7.0.4
More information about the wine-patches
mailing list