[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Corrections for 20021228
From: |
Philippe Blain |
Subject: |
Corrections for 20021228 |
Date: |
Thu, 2 Jan 2003 23:27:52 +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-20021228+
Here are some problems I found :
1---------------------------------------------------------------------------
--
File : ncurses/base/tty_update.c
Correct padding in the following functions :
_nc_scrolln() lines 1683, 1694, 1729, 1740
Padding for 'change_scroll_region' is not proportionnal according to
terminfo
man pages (P and not P*).
It's simply a putp(tparm(change_scroll_region, XXX, YYY)); on these lines.
ClearScreen() line 1336
'clr_eos' is noted as proportionnal (P*)
Should be tputs(clr_eos, screen_lines, _nc_outch);
EmitRange() line 478
'repeat_char' is noted as proportionnal (P*)
Should be tputs(tparm(repeat_chars, CharOf(ntext0), rep_count),
rep_count, _nc_outch);
2---------------------------------------------------------------------------
File : ncurses/base/tty_update.c
ClrToEOL() line 907
Safer checking 'clr_eol' and inversing the test:
if (needclear) {
UpdateAttrs (AttrOf (blank));
TPUTS_TRACE ("clr_eol");
==> if (clr_eol && SP->_el_cost <= (screen_columns - SP->_curscol)) {
==> putp (clr_eol);
}
else {
int count = (screen_columns - SP->_curscol);
while (count-- > 0)
PutChar (CHREF (blank));
}
}
3---------------------------------------------------------------------------
File : ncurses/base/tty_update.c
The second part of ClrBottom (looking for blank chars in curscr) is
useless and prevents hard-clearing all blank lines when there are less
blank lines at bottom of curscr than in newscr.
Only look in newscr, then do a ClrToEOS() which blanks corresponding lines
in curscr.
static int ClrBottom (int total)
{
int row;
int col;
int top = total;
int last = min (screen_columns, newscr->_maxx + 1);
NCURSES_CH_T blank = newscr->_line[total - 1].text[last - 1];
bool ok;
if (clr_eos && can_clear_with (CHREF (blank))) {
for (row = total - 1; row >= 0; row--) {
for (col = 0, ok = TRUE; ok && col < last; col++) {
ok = (CharEq (newscr->_line[row].text[col], blank));
}
if (!ok) break;
==> top = row;
}
/* As we are in the case where 'clr_eos' (ed=\E[J) exists, there is no
disavantage using it here for just one line, instead of using
clr_eol/clr_bol in TransformLine() where we are going to check a second time
if all chars of that line are blank */
==> if (top < total) {
GoTo (top, 0);
ClrToEOS (blank);
if (SP->oldhash && SP->newhash) {
for (row = top; row < screen_lines; row++)
SP->oldhash[row] = SP->newhash[row];
}
}
}
==> return (top);
}
----------------------------------------------------------------------------
- Philippe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Corrections for 20021228,
Philippe Blain <=