bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corrections for 20021109


From: Thomas Dickey
Subject: Re: Corrections for 20021109
Date: Sat, 16 Nov 2002 18:36:52 -0500
User-agent: Mutt/1.3.27i

On Fri, Nov 15, 2002 at 07:29:18AM +0100, Philippe Blain wrote:
> >From Philippe Blain, Bordeaux, FRANCE.
> My old computer: P133 - 8,4 Go - 32 Mo Red Hat Linux 7.0
> 
> To maintainers of 'ncurses'.(and to Mr Dickey)
> Subject: Corrections for ncurses-5.3-20021109+
> 
> Here are some problems I found :
> 
> ----------------------------------------------------------------------------
> File : ncurses/base/tty_update.c
> Function : ClearScreen (blank)
> 
> The purpose is to clear the screen with the parameter 'blank'.
> The important point is 'back_color_erase' (bce) which determins if fast
> clear
> can be used or not.
> 
> 1) 'bce' is not a function extension,  it's terminal dependant.

not exactly - this particular chunk of logic was added to support an
extension:
        revision 1.122
        date: 1999/11/28 03:07:38;  author: tom;  state: Exp;  lines: +20 -2
        fill in scrolling for non-bce case when assume_default_colors() isn't 
used.

> 2) There is a boolean function that tells if clear_screen / clr_eos /
> clr_eol
> can be used for clearing screen with 'blank', depending of 'bce', colors and
> modes : 'can_clear_with()'.  Better to use it.

can_clear_with() might work for this special case (will see).
 
> 3) An hidden bug stay nevertheless under some conditions :
> When terminal has bce FALSE (tested with linux-console, setting bce to
> false), pb happens at lower right corner.
> As Putchar() is used, for the lower right corner we call PutCharLR().
> For linux console, we pass in :
>     ..................
>     } else if ((enter_insert_mode && exit_insert_mode)
>            || insert_character || parm_ich) {
>     GoTo(screen_lines - 1, screen_columns - 2);
>     PutAttrChar(ch);
>     GoTo(screen_lines - 1, screen_columns - 2);
> ==> InsStr(newscr->_line[screen_lines - 1].text + screen_columns - 2, 1);
>     }
>     ..................
> Hence the bug : InsStr() inserts a char coming from newscr instead of
> 'blank'
> while ClearScreen() modifies curscr directly with 'blank'.
> This is not visible as function is static.
> Need to have a function for inserting one char at cursor position.

ok - agree that's a bug.
 
> ----------------------------------------------------------------------------
> File : ncurses/base/tty_update.c
> Function : ClrToEOL ()
> 
> Same things, prevent using erase capabilities when 'blank' conflicts with
> them or terminal not 'bce'.
> Same bug at lower right corner if last line.

something like that - your fix leaves out the cost comparison.
 
-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]