[Bug 27778] New: TYPE outputs extraneous blank line after file contents
http://bugs.winehq.org/show_bug.cgi?id=27778 Summary: TYPE outputs extraneous blank line after file contents Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs(a)winehq.org ReportedBy: frederic.delanoy(a)gmail.com With the following code (make sure there's no space before the '>'): echo bar> foo echo *** && type foo && echo *** outputs *** bar *** on windowses, but *** bar *** in wine -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 Frédéric Delanoy <frederic.delanoy(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase Platform|x86 |x86-64 Version|unspecified |1.3.24 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)dawncrow.de --- Comment #1 from André H. <nerv(a)dawncrow.de> 2011-07-13 16:38:13 CDT --- maybe just diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 0352e59..f7411e2 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2523,7 +2523,7 @@ void WCMD_type (WCHAR *command) { errorlevel = 1; } else { if (writeHeaders) { - static const WCHAR fmt[] = {'\n','%','s','\n','\n','\0'}; + static const WCHAR fmt[] = {'\n','%','s','\n','\0'}; WCMD_output(fmt, thisArg); } -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 --- Comment #2 from Frédéric Delanoy <frederic.delanoy(a)gmail.com> 2011-07-13 16:56:38 CDT --- (In reply to comment #1)
maybe just
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 0352e59..f7411e2 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2523,7 +2523,7 @@ void WCMD_type (WCHAR *command) { errorlevel = 1; } else { if (writeHeaders) { - static const WCHAR fmt[] = {'\n','%','s','\n','\n','\0'}; + static const WCHAR fmt[] = {'\n','%','s','\n','\0'}; WCMD_output(fmt, thisArg); }
Good try. Actually this was my first idea as well, doesn't work. In fact, it's used in (undocumented) TYPE multiple files mode (4ef2f8ba) where you use "TYPE foo bar". Now the "writeHeaders" name is a bit misleading... it should probably have been called "multipleFilesMode" or similar. Think I found the problem: windows adds a newline when echo mode is on (and *not* when it's off). http://source.winehq.org/git/wine.git/commitdiff/78f38a742fb48a7233926876156... added implementation when echo mode is on. However, it also erroneously adds a newline when it's off, as is the case e.g. in test_builtins.cmd. I "simply" need to add the condition that the mode is "echo on" for the extra newline to be added. (BTW "echo off" mode doesn't work in interactive mode... I'll probably add a bug for this if necessary) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 Frédéric Delanoy <frederic.delanoy(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27782 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 Bug 27778 depends on bug 27782, which changed state. Bug 27782 Summary: "echo off" does not work in cmd interactive mode http://bugs.winehq.org/show_bug.cgi?id=27782 What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 Frédéric Delanoy <frederic.delanoy(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Frédéric Delanoy <frederic.delanoy(a)gmail.com> 2011-07-15 12:54:59 CDT --- Fixed by http://source.winehq.org/git/wine.git/commitdiff/4b4dd300f6832be491610943b01... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27778 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> 2011-07-22 12:44:33 CDT --- Closing bugs fixed in 1.3.25. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=27778 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4b4dd300f6832be491610943b01 | |b80118f978c27 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org