cmd: Fix echo's special ';' handling
Frédéric Delanoy
frederic.delanoy at gmail.com
Wed Aug 31 15:10:57 CDT 2011
Treated similarly to the ':' case.
Cannot add test case due to a NT4 difference/brokenness that would
imply adding stuff like '@or_broken at ECHO is on.' in exp file for
'echo;@space@' command, and error messages cannot be tested due
to i18n issues.
---
programs/cmd/builtins.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 7f003ed..bbf2920 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -864,10 +864,13 @@ void WCMD_echo (const WCHAR *command) {
int count;
const WCHAR *origcommand = command;
- if (command[0]==' ' || command[0]=='\t' || command[0]=='.' || command[0]==':')
+ if ( command[0]==' ' || command[0]=='\t' || command[0]=='.'
+ || command[0]==':' || command[0]==';')
command++;
+
count = strlenW(command);
- if (count == 0 && origcommand[0]!='.' && origcommand[0]!=':') {
+ if (count == 0 && origcommand[0]!='.' && origcommand[0]!=':'
+ && origcommand[0]!=';') {
if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW);
else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW);
return;
--
1.7.6
More information about the wine-patches
mailing list