* [Qemu-devel] [PATCH] fix ncurses output
@ 2008-02-25 17:48 Bernhard Kauer
2008-03-12 0:34 ` Aurelien Jarno
2009-07-15 11:00 ` Bernhard Kauer
0 siblings, 2 replies; 4+ messages in thread
From: Bernhard Kauer @ 2008-02-25 17:48 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
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.
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?
Bernhard Kauer
[-- Attachment #2: qemu_curses.diff --]
[-- Type: text/x-diff, Size: 399 bytes --]
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 *);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix ncurses output
2008-02-25 17:48 [Qemu-devel] [PATCH] fix ncurses output Bernhard Kauer
@ 2008-03-12 0:34 ` Aurelien Jarno
2008-03-19 11:25 ` Bernhard Kauer
2009-07-15 11:00 ` Bernhard Kauer
1 sibling, 1 reply; 4+ messages in thread
From: Aurelien Jarno @ 2008-03-12 0:34 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix ncurses output
2008-03-12 0:34 ` Aurelien Jarno
@ 2008-03-19 11:25 ` Bernhard Kauer
0 siblings, 0 replies; 4+ messages in thread
From: Bernhard Kauer @ 2008-03-19 11:25 UTC (permalink / raw)
To: qemu-devel
On Wed, Mar 12, 2008 at 01:34:04AM +0100, Aurelien Jarno wrote:
> 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.
I didnot have an easy testcase yet, but it will happen if someone clears
the VGA screen with zeros and tries to display a char later on the line.
For the behaviour of the mvwaddchnstr() function see the ncurses source.
Bernhard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix ncurses output
2008-02-25 17:48 [Qemu-devel] [PATCH] fix ncurses output Bernhard Kauer
2008-03-12 0:34 ` Aurelien Jarno
@ 2009-07-15 11:00 ` Bernhard Kauer
1 sibling, 0 replies; 4+ messages in thread
From: Bernhard Kauer @ 2009-07-15 11:00 UTC (permalink / raw)
To: qemu-devel
This bug is still present. Somebody willing to fix it?
Bernhard
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.
>
> 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?
>
>
> Bernhard Kauer
> 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 *);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-15 11:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-25 17:48 [Qemu-devel] [PATCH] fix ncurses output Bernhard Kauer
2008-03-12 0:34 ` Aurelien Jarno
2008-03-19 11:25 ` Bernhard Kauer
2009-07-15 11:00 ` Bernhard Kauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).