From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZEuy-0005yu-Rr for qemu-devel@nongnu.org; Tue, 11 Mar 2008 20:34:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZEux-0005yc-0l for qemu-devel@nongnu.org; Tue, 11 Mar 2008 20:34:04 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZEuw-0005yL-Ro for qemu-devel@nongnu.org; Tue, 11 Mar 2008 20:34:02 -0400 Received: from hall.aurel32.net ([88.191.38.19]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZEuw-00036H-HA for qemu-devel@nongnu.org; Tue, 11 Mar 2008 20:34:02 -0400 Received: from volta-wlan.aurel32.net ([2002:52e8:2fb:ffff:21d:e0ff:fe49:1047] helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JZEuu-0004Sz-Rp for qemu-devel@nongnu.org; Wed, 12 Mar 2008 01:34:00 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1JZEuy-0001Xd-UG for qemu-devel@nongnu.org; Wed, 12 Mar 2008 01:34:04 +0100 Date: Wed, 12 Mar 2008 01:34:04 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] fix ncurses output Message-ID: <20080312003404.GA5018@volta.aurel32.net> References: <20080225174806.GI3136@chrom.inf.tu-dresden.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20080225174806.GI3136@chrom.inf.tu-dresden.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, Feb 25, 2008 at 06:48:06PM +0100, Bernhard Kauer wrote: > The ncurses console uses mvwaddchnstr() to print a line of output > to a ncurses pad. Unfortunately this routine stops to print further > chars if a zero-char is seen in the line. This has the effect that > parts of a line are never redraw. Do you have a simple testcase (program to run, code, ...). I have been unable to reproduce this problem here. > The following patch puts spaces instead of the zeros into the line-buffer. > Please note that this change affects other consoles as well and is > perhaps undesirable. Comments? I am not sure replacing zeros into spaces is correct. Zeros are not supposed to be displayed, contrary to spaces. Aurelien > Index: console.h > --- console.h 10 Feb 2008 16:33:13 -0000 1.2 > +++ console.h 25 Feb 2008 17:25:53 -0000 > @@ -104,7 +104,8 @@ > typedef unsigned long console_ch_t; > static inline void console_write_ch(console_ch_t *dest, uint32_t ch) > { > - cpu_to_le32wu((uint32_t *) dest, ch); > + if (!(ch & 0xff)) ch = 0x20; > + cpu_to_le32wu((uint32_t *) dest, ch); > } > > typedef void (*vga_hw_update_ptr)(void *); -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net