# ------------------------------------------------------------------------------
# button.c | 18 +++++++++---------
# charproc.c | 3 ++-
# screen.c | 26 ++++++++++++--------------
# version.h | 2 +-
# xterm.log.html | 12 ++++++++++++
# 5 files changed, 36 insertions(+), 25 deletions(-)
# ------------------------------------------------------------------------------
Index: button.c
--- xterm-145+/button.c Mon Sep 11 05:40:11 2000
+++ xterm-146/button.c Tue Sep 12 21:48:54 2000
@@ -1533,8 +1533,8 @@
* pretend it happened on the left half.
*/
if (col > 0
- && iswide(getXtermCell(screen, row, col-1))
- && (getXtermCell(screen, row, col) == HIDDEN_CHAR)) {
+ && iswide(XTERM_CELL(row, col-1))
+ && (XTERM_CELL(row, col) == HIDDEN_CHAR)) {
col -= 1;
}
#endif
@@ -1674,7 +1674,7 @@
}
#define ClassSelects(screen, row, col, cclass) \
(class_of(screen, row, col) == cclass \
- || getXtermCell(screen, row, col) == HIDDEN_CHAR)
+ || XTERM_CELL(row, col) == HIDDEN_CHAR)
#else
#define class_of(screen,row,col) charClass[XTERM_CELL(row, col)]
#define ClassSelects(screen, row, col, cclass) \
@@ -1700,15 +1700,15 @@
#if OPT_WIDE_CHARS
if (startCol > 1
- && iswide(getXtermCell(screen, startRow, startCol-1))
- && getXtermCell(screen, startRow, startCol-0) == HIDDEN_CHAR) {
+ && iswide(XTERM_CELL(startRow, startCol-1))
+ && XTERM_CELL(startRow, startCol-0) == HIDDEN_CHAR) {
fprintf(stderr, "Adjusting start. Changing downwards from %i.\n", startCol);
startCol -= 1;
if (endCol == (startCol+1)) endCol--;
}
- if (iswide(getXtermCell(screen, endRow, endCol-1))
- && getXtermCell(screen, endRow, endCol) == HIDDEN_CHAR) {
+ if (iswide(XTERM_CELL(endRow, endCol-1))
+ && XTERM_CELL(endRow, endCol) == HIDDEN_CHAR) {
endCol += 1;
}
#endif
@@ -1755,7 +1755,7 @@
}
#if OPT_WIDE_CHARS
- if (startSCol && getXtermCell(screen, startSRow, startSCol) == HIDDEN_CHAR)
+ if (startSCol && XTERM_CELL(startSRow, startSCol) == HIDDEN_CHAR)
startSCol++;
#endif
@@ -1786,7 +1786,7 @@
}
#if OPT_WIDE_CHARS
- if (endSCol && getXtermCell(screen, endSRow, endSCol) == HIDDEN_CHAR)
+ if (endSCol && XTERM_CELL(endSRow, endSCol) == HIDDEN_CHAR)
endSCol++;
#endif
Index: charproc.c
--- xterm-145+/charproc.c Mon Sep 11 05:42:15 2000
+++ xterm-146/charproc.c Tue Sep 12 21:39:04 2000
@@ -818,7 +818,8 @@
c = doinput();
#if OPT_WIDE_CHARS
- if (my_wcwidth(c) == 0) {
+ if (screen->wide_chars
+ && my_wcwidth(c) == 0) {
unsigned single = 0;
int prev, precomposed;
Index: screen.c
--- xterm-145+/screen.c Sun Sep 10 22:06:31 2000
+++ xterm-146/screen.c Tue Sep 12 21:30:38 2000
@@ -296,7 +296,7 @@
int wrappedbit;
Char starcol, starcol2;
#if OPT_WIDE_CHARS
- Char *comb1l, *comb1h, *comb2l, *comb2h;
+ Char *comb1l = 0, *comb1h = 0, *comb2l = 0, *comb2h = 0;
#endif
#if OPT_WIDE_CHARS
@@ -313,13 +313,12 @@
col = SCRN_BUF_CHARS(screen, screen->cur_row) + screen->cur_col;
attrs = SCRN_BUF_ATTRS(screen, screen->cur_row) + screen->cur_col;
-#if OPT_WIDE_CHARS
- comb1l = SCRN_BUF_COM1L(screen, screen->cur_row) + screen->cur_col;
- comb1h = SCRN_BUF_COM1H(screen, screen->cur_row) + screen->cur_col;
-
- comb2l = SCRN_BUF_COM2L(screen, screen->cur_row) + screen->cur_col;
- comb2h = SCRN_BUF_COM2H(screen, screen->cur_row) + screen->cur_col;
-#endif
+ if_OPT_WIDE_CHARS(screen,{
+ comb1l = SCRN_BUF_COM1L(screen, screen->cur_row) + screen->cur_col;
+ comb1h = SCRN_BUF_COM1H(screen, screen->cur_row) + screen->cur_col;
+ comb2l = SCRN_BUF_COM2L(screen, screen->cur_row) + screen->cur_col;
+ comb2h = SCRN_BUF_COM2H(screen, screen->cur_row) + screen->cur_col;
+ })
if_OPT_EXT_COLORS(screen,{
fbf = SCRN_BUF_FGRND(screen, screen->cur_row) + screen->cur_col;
@@ -420,13 +419,12 @@
flags |= CHARDRAWN;
memset( attrs, flags, real_width);
-if_OPT_WIDE_CHARS(screen, {
- memset( comb1l, 0, real_width);
- memset( comb2l, 0, real_width);
- memset( comb1h, 0, real_width);
- memset( comb2h, 0, real_width);
+ if_OPT_WIDE_CHARS(screen,{
+ memset( comb1l, 0, real_width);
+ memset( comb2l, 0, real_width);
+ memset( comb1h, 0, real_width);
+ memset( comb2h, 0, real_width);
})
-
if_OPT_EXT_COLORS(screen,{
memset( fbf, cur_fg_bg >> 8, real_width);
memset( fbb, cur_fg_bg & 0xff, real_width);
Index: version.h
--- xterm-145+/version.h Mon Sep 11 05:44:25 2000
+++ xterm-146/version.h Tue Sep 12 21:26:48 2000
@@ -6,5 +6,5 @@
* XFree86 to which this version of xterm has been built. The number in
* parentheses is my patch number (T.Dickey).
*/
-#define XTERM_PATCH 145
+#define XTERM_PATCH 146
#define XFREE86_VERSION "XFree86 4.0.1c"
Index: xterm.log.html
--- xterm-145+/xterm.log.html Mon Sep 11 05:40:01 2000
+++ xterm-146/xterm.log.html Tue Sep 12 21:54:04 2000
@@ -42,6 +42,7 @@
xc/programs/Xserver/hw/xfree86).
<UL>
+<LI><A HREF="#xterm_146">Patch #146 - 2000/9/12 - XFree86 4.0.1c</A>
<LI><A HREF="#xterm_145">Patch #145 - 2000/9/11 - XFree86 4.0.1c</A>
<LI><A HREF="#xterm_144">Patch #144 - 2000/8/23 - XFree86 4.0.1b</A>
<LI><A HREF="#xterm_143">Patch #143 - 2000/8/19 - XFree86 4.0.1b</A>
@@ -189,6 +190,17 @@
<LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+
+<H1><A NAME="xterm_146">Patch #146 - 2000/9/12 - XFree86 4.0.1c</A></H1>
+<ul>
+ <li>correct two instances overlooked from patch #141 which assumed
+ UTF-8 mode without checking, causing a core dump in non-UTF-8 mode
+ (one instance was reported by Tommi Virtanen <tv@debian.org>).
+
+ <li>correct a problem selecting from the scrollback buffer in UTF-8
+ mode by changing remaining getXtermCell() calls to XTERM_CELL() as in
+ the non-UTF-8 cases (report by Markus Kuhn, patch by Robert Brady).
+</ul>
<H1><A NAME="xterm_145">Patch #145 - 2000/9/11 - XFree86 4.0.1c</A></H1>
<ul>