NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/58282: Sysinst terminal output size increased because curses
The following reply was made to PR lib/58282; it has been noted by GNATS.
From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Brett Lymn <blymn%internode.on.net@localhost>
Subject: Re: lib/58282: Sysinst terminal output size increased because curses
Date: Tue, 28 May 2024 14:42:06 +0300
On Tue, May 28, 2024 at 16:48:48 +0930, Brett Lymn wrote:
> On Sun, May 26, 2024 at 02:20:02AM +0000, Valery Ushakov wrote:
>
> > makech() in refresh.c has a block of code with the comment:
> >
> > Work out if we can use a clear to end of line. If we are using
> > color then we can only erase the line if the terminal can erase to
> > the background color.
> >
> > it uses (for the HAVE_WIDE case, which is the defautl) the helper
> > function _cursesi_celleq() that also checks if "attr" is the same, but
> > the next test in the condition narrows the attr comparison to
> > attr_mask. That looks suspicious.
> >
>
> Having a look at the output all the spam comes from the foreground and
> background colour being set for each cell. Running from memory the
> narrowing to attr in that section of code is deliberate to force the
> update of the background colour because the actual screen will not have
> changed but the virtual screen image will match the update screen image
> so the background will not be set.
I don't understand offhand what that code tries to do, but here are
two observations:
1. the wide case and non-wide case have different semantic (modulo
wideness).
2. the narrowing is a no-op in the wide case b/c celleq already tests
if cp->attr == win->battr, and then the narrowed tests redundantly
checks if
(cp->attr & attr_mask) == (win->battr & attr_mask)
if the intention was (as non-wide case seems to suggest) to test
the cell's text and only parts of "attr", then using
_cursesi_celleq is wrong.
-uwe
Home |
Main Index |
Thread Index |
Old Index