bug-ncurses
[Top][All Lists]
Advanced

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

lib_mvcur.c


From: Philippe Blain
Subject: lib_mvcur.c
Date: Fri, 1 Nov 2002 07:16:50 +0100

>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-20021026+

Here are some problems I found :

VIDEO MODES & MVCUR() :
----------------------------------------------------------------------------
File : ncurses/base/lib_mvcur.c

Function : onscreen_mvcur()

As i was looking at the Goto() function in tty_update.c, i asked myself
what consequences the A_ALTCHARSET attribute has on using mvcur().
A few remarks in both Goto() and mvcur() tell us about that.

When mvcur() send a \n via tputs(), terminal interpret that as
as graphic char or not depending its state.
The A_ALTCHARSET flag indicates if we are in graphic mode or not.

But, in onscreen_mvcur(), if remarks about A_ALTCHARSET are present,
there is nothing relative in the code.

In 1.9.9g, a REAL_ATTR prevented optimization if mode was not A_NORMAL :
    .....................
    /*
     * We may be able to tell in advance that the full optimization
     * will probably not be worth its overhead.  Also, don't try to
     * use local movement if the current attribute is anything but
     * A_NORMAL...there are just too many ways this can screw up
     * (like, say, local-movement \n getting mapped to some obscure
     * character because A_ALTCHARSET is on).
     */
    if (yold == -1 || xold == -1  ||
==>     REAL_ATTR != A_NORMAL || NOT_LOCAL(yold, xold, ynew, xnew))
    {
    .....................
In 5.3, REAL_ATTR has been deleted on that line (as in 4.2).
Think REAL_ATTR != A_NORMAL is really missing here.



More IMPORTANT is the capability 'msgr' (safe to move in standout mode).
It's the point which should be TESTED in mvcur() with current attributes
but is not.
If 'msgr' is FALSE, mvcur() should exit standout mode before moving cursor
or sending a newline, and restore previous attributes at the end.

And Goto(Y, X) should be nothing else than a call to mvcur(oldY, oldX, Y, X)

eventually with position checking (in case a bug in optimizer!).

----------------------------------------------------------------------------
- Philippe






reply via email to

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