XFree86 3.9i - xterm patch #47 - T.Dickey <dickey@clark.net>
This patch does the following
+ corrects an indexing error in the doublesize character logic
(button.c) that caused core dump (this was reported by J. Wunsch).
+ corrects the logic of ShowCursor when it is painting in a doublesize
cell (charproc.c).
+ corrects, according to vttest, the behavior when switching to
doublesize characters and back again (doublechr.c).
+ adds cbt (back_tab) to the terminfo description (this was something
that I'd overlooked as applicable to curses optimization last
summer).
+ corrects, for the standalone xmc test, the logic for disabling xmc.
--------------------------------------------------------------------------------
button.c | 2 +-
charproc.c | 7 +------
configure | 2 +-
configure.in | 2 +-
doublechr.c | 10 ++++------
screen.c | 2 +-
terminfo | 1 +
testxmc.c | 4 ++--
8 files changed, 12 insertions, 18 deletions
--------------------------------------------------------------------------------
Index: button.c
--- xterm-46+/button.c Mon Jun 30 08:51:00 1997
+++ xterm-47/button.c Sun Jul 13 16:22:25 1997
@@ -1436,7 +1436,7 @@
i = Length(screen, row, scol, ecol);
ecol = scol + i;
#if OPT_DEC_CHRSET
- if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, row)[0])) {
+ if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, row + screen->topline)[0])) {
scol = (scol + 0) / 2;
ecol = (ecol + 1) / 2;
}
Index: charproc.c
--- xterm-46+/charproc.c Sun Jul 6 14:36:26 1997
+++ xterm-47/charproc.c Sun Jul 13 16:50:55 1997
@@ -4044,11 +4044,6 @@
c = SCRN_BUF_CHARS(screen, screen->cursor_row)[screen->cursor_col];
flags = SCRN_BUF_ATTRS(screen, screen->cursor_row)[screen->cursor_col];
-#if OPT_DEC_CHRSET
- if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cursor_row)[0])) {
- c = SCRN_BUF_CHARS(screen, screen->cursor_row)[screen->cursor_col/2];
- }
-#endif
#ifndef NO_ACTIVE_ICON
if (IsIcon(screen)) {
@@ -4106,7 +4101,7 @@
TRACE(("%s @%d, calling drawXtermText\n", __FILE__, __LINE__))
drawXtermText(screen, flags, currentGC,
- x = CursorX(screen, screen->cur_col),
+ x = CurCursorX(screen, screen->cur_row, screen->cur_col),
y = CursorY(screen, screen->cur_row),
curXtermChrSet(screen->cur_row),
&c, 1);
Index: configure
--- xterm-46+/configure Sun Jul 6 14:36:26 1997
+++ xterm-47/configure Sun Jul 13 18:50:05 1997
@@ -1,6 +1,6 @@
#! /bin/sh
-# From configure.in Revision
+# From configure.in Revision: 1.5
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
Index: configure.in
--- xterm-46+/configure.in Sun Jul 6 14:36:26 1997
+++ xterm-47/configure.in Sun Jul 6 14:36:26 1997
@@ -27,7 +27,7 @@
dnl ---------------------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_REVISION($Revision$)
+AC_REVISION($Revision: 1.5 $)
AC_PREREQ(2.12)
AC_INIT(charproc.c)
AC_CONFIG_HEADER(xtermcfg.h:xtermcfg.hin)
Index: doublechr.c
--- xterm-46+/doublechr.c Mon Jun 30 08:51:00 1997
+++ xterm-47/doublechr.c Sun Jul 13 16:36:07 1997
@@ -63,15 +63,13 @@
TRACE(("repaint_line(%2d,%2d) (%d)\n", screen->cur_row, screen->cur_col, newChrSet))
- /* If switching from single-width, clear the part of the line that is
- * pushed off to the right.
+ /* If switching from single-width, keep the cursor in the visible part
+ * of the line.
*/
if (CSET_DOUBLE(newChrSet)) {
width /= 2;
- if (!CSET_DOUBLE(curChrSet)) {
- screen->cur_col = width;
- ClearRight(screen, -1);
- }
+ if (curcol > width)
+ curcol = width;
}
/* FIXME: do VT220 softchars allow double-sizes? */
Index: screen.c
--- xterm-46+/screen.c Sun Jul 6 14:36:26 1997
+++ xterm-47/screen.c Sun Jul 13 16:22:41 1997
@@ -94,7 +94,7 @@
the actual character array and the second (odd) one is the attributes.
each line is formed from four char arrays. The first one is the actual
character array, the second one is the attributes, the third is the
- foreground color, and the fourth is the background color.
+ foreground and background colors, and the fourth denotes the character set.
*/
register int nrow, ncol;
Char **addr;
Index: terminfo
--- xterm-46+/terminfo Sun Jul 6 14:36:26 1997
+++ xterm-47/terminfo Sat Jul 12 20:03:01 1997
@@ -17,6 +17,7 @@
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G,
bold=\E[1m,
+ cbt=\E[Z,
civis=\E[?25l,
clear=\E[H\E[2J,
cnorm=\E[?25h,
Index: testxmc.c
--- xterm-46+/testxmc.c Sun Jul 6 14:36:26 1997
+++ xterm-47/testxmc.c Sun Jul 13 18:34:43 1997
@@ -117,7 +117,7 @@
switch (param) {
case -1:/* DEFAULT */
case 0: /* FALLTHRU */
- found = MARK_OFF(XMC_FLAGS);
+ found = MARK_OFF((term->flags & XMC_FLAGS));
break;
case 1:
found = MARK_ON(BOLD);
@@ -146,7 +146,7 @@
if (found) {
unsigned save = term->flags;
term->flags ^= whichone;
- TRACE(("XMC Writing glitch (%d/%d)\n", my_attrs, whichone))
+ TRACE(("XMC Writing glitch (%d/%d) after SGR %d\n", my_attrs, whichone, param))
dotext(screen, '?', glitch, glitch + screen->xmc_glitch);
term->flags = save;
}