Frédéric Delanoy : cmd: Partial fix for echo' s special ':' handling.

Alexandre Julliard julliard at winehq.org
Thu Jul 28 13:55:46 CDT 2011


Module: wine
Branch: master
Commit: 25fcad3768ab00ec0493c127efa4f3992706b2c0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=25fcad3768ab00ec0493c127efa4f3992706b2c0

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Thu Jul 28 01:06:47 2011 +0200

cmd: Partial fix for echo's special ':' handling.

---

 programs/cmd/builtins.c                  |    4 ++--
 programs/cmd/tests/test_builtins.cmd.exp |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 86fd54c..49869ba 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -861,10 +861,10 @@ void WCMD_echo (const WCHAR *command) {
   int count;
   const WCHAR *origcommand = command;
 
-  if (command[0]==' ' || command[0]=='.')
+  if (command[0]==' ' || command[0]=='.' || command[0]==':')
     command++;
   count = strlenW(command);
-  if (count == 0 && origcommand[0]!='.') {
+  if (count == 0 && origcommand[0]!='.' && origcommand[0]!=':') {
     if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW);
     else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW);
     return;
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 7db3b86..e0d3cf7 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -31,13 +31,13 @@ word
 .word
 
 @todo_wine@@pwd@>echo:
- at todo_wine@
+
 
 @pwd@>echo :@space@
 :
 
 @todo_wine@@pwd@>echo:word
- at todo_wine@word
+word
 
 @pwd@>echo :word at space@
 :word
@@ -57,9 +57,9 @@ at-echoed-word
 .
 word
 .word
- at todo_wine@
+
 :
- at todo_wine@word
+word
 :word
 word at space@
 word at space@@space@




More information about the wine-cvs mailing list