summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-02-14 09:14:08 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-02-14 09:14:08 +0000
commit5bae5b4bcfc56ef97ffa66e6b51d6d5991ee344b (patch)
tree7f41d9adade70820794daa5bbe623903a9762950
parent1425773e06820b5d54b3bd358bdcb725d9ba8d68 (diff)
Update to xterm 366. tested by jsg@
-rw-r--r--app/xterm/COPYING2
-rw-r--r--app/xterm/MANIFEST2
-rw-r--r--app/xterm/Makefile2
-rw-r--r--app/xterm/NEWS52
-rw-r--r--app/xterm/THANKS6
-rw-r--r--app/xterm/Tekproc.c20
-rw-r--r--app/xterm/XTerm.ad5
-rw-r--r--app/xterm/button.c97
-rw-r--r--app/xterm/cachedGCs.c9
-rw-r--r--app/xterm/charclass.c8
-rw-r--r--app/xterm/charproc.c155
-rw-r--r--app/xterm/configure.in22
-rw-r--r--app/xterm/fontutils.c22
-rw-r--r--app/xterm/koi8rxterm10
-rw-r--r--app/xterm/main.c24
-rw-r--r--app/xterm/minstall.in71
-rw-r--r--app/xterm/misc.c32
-rw-r--r--app/xterm/package/debian/changelog18
-rw-r--r--app/xterm/package/debian/copyright2
-rw-r--r--app/xterm/package/xterm.spec4
-rw-r--r--app/xterm/plink.sh11
-rw-r--r--app/xterm/run-tic.sh35
-rw-r--r--app/xterm/screen.c8
-rw-r--r--app/xterm/scrollbar.c8
-rw-r--r--app/xterm/trace.c11
-rw-r--r--app/xterm/trace.h7
-rw-r--r--app/xterm/util.c6
-rw-r--r--app/xterm/version.h8
-rw-r--r--app/xterm/xterm.appdata.xml4
-rw-r--r--app/xterm/xterm.log.html89
-rw-r--r--app/xterm/xterm.man25
31 files changed, 496 insertions, 279 deletions
diff --git a/app/xterm/COPYING b/app/xterm/COPYING
index 065638061..772d743d3 100644
--- a/app/xterm/COPYING
+++ b/app/xterm/COPYING
@@ -1,7 +1,7 @@
--- $XTermId: COPYING,v 1.3 2020/01/12 22:53:35 tom Exp $
-------------------------------------------------------------------------------
-Copyright 1996-2019,2020 by Thomas E. Dickey
+Copyright 1996-2020,2021 by Thomas E. Dickey
All Rights Reserved
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index e7a1b67f3..2b7600f82 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-363, version xterm-363
+MANIFEST for xterm-366, version xterm-366
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/app/xterm/Makefile b/app/xterm/Makefile
index 7d7efb55d..9e8152424 100644
--- a/app/xterm/Makefile
+++ b/app/xterm/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.35 2021/01/02 10:24:36 matthieu Exp $
+# $OpenBSD: Makefile,v 1.36 2021/02/14 09:14:06 matthieu Exp $
.include <bsd.xconf.mk>
SUBDIR= icons resize
diff --git a/app/xterm/NEWS b/app/xterm/NEWS
index deb5f4fec..61fe48a74 100644
--- a/app/xterm/NEWS
+++ b/app/xterm/NEWS
@@ -1,42 +1,20 @@
The NEWS file was generated from xterm.log.html, which serves as the changelog
for xterm.
--------------------------------------------------------------------------------
- Patch #363 - 2020/12/26
+ Patch #366 - 2021/02/10
- * disable groff hyphenation in generated html when using man2html.
- * change SCS “&4” Cyrillic to non-NRCS, per VT520 manual.
- * amend fix for SCS in patch #198 to remove DEL rather than
- converting it to a space (report by Thomas Wolff).
- * modify state transitions for selecting character sets to eliminate
- an ambiguity between the “A” used in VT220 versus VT320.
- * improve error recovery when selecting characters by resetting to US
- ASCII when no suitable encoding is found, e.g., attempting to use
- an NRCS sequence when NRCS is not enabled.
- * turn off hyphenation in “.txt” conversion, prompted by groff
- changes.
- * add VT5xx ISO Latin-2 (prompted by discussion with Thomas Wolff).
- * amend change from patch #361 to event-handling in CopyWait to
- handle active-icon as a special case (Debian #975687).
- * add call to loadColorTable to get the visual information needed to
- decode BE RGBA32 color format (patch by Leandro Lupori).
- * modify the resource-parsing for disallowedPasteControls and similar
- lists of names/numbers to recognize “~;” (tilde) for cancelling a
- given name/number.
- * add ENQ, EOT and NUL to default for disallowedPasteControls.
- * change default for disallowedPasteControls to omit the tab
- character (suggested by Harald Dunkel).
- * fix swapped height/width in regisScreenSize and maxGraphicSize
- resources using "auto" value, from patch #314 (report by Anton
- Lavrentiev)
- * revise patch #362 change for shift-modifier versus mouse protocol
- and select/paste by adding resource shiftEscape, which can be
- enabled via a control sequence (prompted by discussion with
- Matthijs van Duin).
- * simplify/improve ifdef in trace code for using a separate set of
- files for each run of xterm.
- * add options -r and -t to vttests/query-color.pl to show the 6-digit
- RGB code and actual colors.
- * add nel to xterm-basic terminfo.
- * alter vttests/modify-keys.pl to omit HTML reference links to the
- modified-keys table where no keycode was available.
+ * correct a compiler-warning fix in patch #352 which allowed
+ sign-extension of coordinate values (report by "CismonX").
+ * correct upper-limit for selection buffer, accounting for combining
+ characters (report/testcase by Tavis Ormandy).
+ * with alwaysHighlight true, xterm does not properly track focus. The
+ screen->select FOCUS flag remains always on, which prevents
+ bellIsUrgent from working, as the urgent WM_HINT flag is only set
+ in setXUrgency() when the window is not focused. Fix this by
+ updating screen->select in unselectwindow() regardless of the value
+ of always_highlight (patch by Jiri Bohac).
+ * improve fix for interaction between SRM and ENQ (report by Grant
+ Taylor).
+ * build-fix for --with-Xaw3dxft, needed when --with-toolbar is
+ omitted (report by Jimmy Olgeni, Emanuel Haupt).
diff --git a/app/xterm/THANKS b/app/xterm/THANKS
index 3f5d80ebf..bc723586c 100644
--- a/app/xterm/THANKS
+++ b/app/xterm/THANKS
@@ -1,4 +1,4 @@
--- $XTermId: THANKS,v 1.28 2020/12/16 13:11:18 tom Exp $
+-- $XTermId: THANKS,v 1.30 2021/02/09 01:32:10 tom Exp $
-- vile:txtmode fk=utf-8
There's no AUTHORS file in this distribution; it would be redundant since
I (Thomas E. Dickey) have done more than 80% of the work on xterm since 1996.
@@ -113,6 +113,7 @@ Jeroen Ruigrok
Jess Thrysoee
Jim Paris
Jimmy Aguilar Mena
+Jiri Bohac
Jochen Voss
Joe Allen
Joe Peterson
@@ -133,6 +134,7 @@ Kiyokazu Suto
Larry Hynes
Larry Riedel
Lauri Tirkkonen
+Leandro Lupori
Lee Olsen
Loïc Minier
Marc Bevand
@@ -204,6 +206,7 @@ Ryan Johnson
Sam Stephenson
Samuel Thibault
Scott Sewall
+Sean C Farley
Semen A Ustimenko
Sergei Laskavy
Sergey Vlasov
@@ -216,6 +219,7 @@ Sven Joachim
Sven Verdoolaege
Taketo Kabe
Taneli Huuskonen
+Tavis Ormandy
Ted Phelps
Thierry Reding
Thomas Wolff
diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c
index 99c6a9e75..59dfbdd5a 100644
--- a/app/xterm/Tekproc.c
+++ b/app/xterm/Tekproc.c
@@ -1,7 +1,7 @@
-/* $XTermId: Tekproc.c,v 1.240 2020/09/15 09:21:12 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.241 2021/02/02 00:19:32 tom Exp $ */
/*
- * Copyright 2001-2019,2020 by Thomas E. Dickey
+ * Copyright 2001-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -976,12 +976,12 @@ TekResize(Widget w)
TekWidget tw = getTekWidget(w);
if (tw != 0) {
- TRACE(("TekResize {{\n"));
+ TRACE(("TekResize " TRACE_L "\n"));
TekClear(tw);
compute_sizes(tw);
- TRACE(("}} TekResize\n"));
+ TRACE((TRACE_R " TekResize\n"));
}
}
@@ -995,7 +995,7 @@ TekExpose(Widget w,
if (tw != 0) {
TekScreen *tekscr = TekScreenOf(tw);
- TRACE(("TekExpose {{\n"));
+ TRACE(("TekExpose " TRACE_L "\n"));
#ifdef lint
region = region;
@@ -1021,7 +1021,7 @@ TekExpose(Widget w,
first_map_occurred();
if (!tekscr->waitrefresh)
TekRefresh(tw);
- TRACE(("}} TekExpose\n"));
+ TRACE((TRACE_R " TekExpose\n"));
}
}
@@ -1439,7 +1439,7 @@ TekInitialize(Widget wrequest,
(void) args;
(void) num_args;
- TRACE(("TekInitialize {{\n"));
+ TRACE(("TekInitialize " TRACE_L "\n"));
memset(tekscr, 0, sizeof(*tekscr));
/*
@@ -1603,7 +1603,7 @@ TekInitialize(Widget wrequest,
wnew->tek.gin_terminator_str);
TRACE(("Tek gin_terminator=%d\n", tekscr->gin_terminator));
- TRACE(("}} TekInitialize\n"));
+ TRACE((TRACE_R " TekInitialize\n"));
}
static void
@@ -1621,7 +1621,7 @@ TekRealize(Widget gw,
unsigned width, height;
unsigned long TEKgcFontMask;
- TRACE(("TekRealize {{\n"));
+ TRACE(("TekRealize " TRACE_L "\n"));
if (!TekPtyData())
return;
@@ -1753,7 +1753,7 @@ TekRealize(Widget gw,
Ttoggled = True;
tekscr->page = tekscr->cur;
- TRACE(("}} TekRealize\n"));
+ TRACE((TRACE_R " TekRealize\n"));
}
int
diff --git a/app/xterm/XTerm.ad b/app/xterm/XTerm.ad
index 351957cd3..52942b732 100644
--- a/app/xterm/XTerm.ad
+++ b/app/xterm/XTerm.ad
@@ -1,8 +1,8 @@
-! $XTermId: XTerm.ad,v 1.104 2020/09/15 21:08:00 tom Exp $
+! $XTermId: XTerm.ad,v 1.106 2021/02/03 01:02:03 tom Exp $
! -----------------------------------------------------------------------------
! this file is part of xterm
!
-! Copyright 1996-2016,2020 by Thomas E. Dickey
+! Copyright 1996-2020,2021 by Thomas E. Dickey
!
! All Rights Reserved
!
@@ -87,6 +87,7 @@
*vtMenu*scrollttyoutput*Label: Scroll to Bottom on Tty Output
*vtMenu*allow132*Label: Allow 80/132 Column Switching
*vtMenu*keepSelection*Label: Keep Selection
+*vtMenu*keepClipboard*Label: Keep Clipboard
*vtMenu*selectToClipboard*Label: Select to Clipboard
*vtMenu*cursesemul*Label: Enable Curses Emulation
*vtMenu*visualbell*Label: Enable Visual Bell
diff --git a/app/xterm/button.c b/app/xterm/button.c
index 81807d635..34e4d14f5 100644
--- a/app/xterm/button.c
+++ b/app/xterm/button.c
@@ -1,7 +1,7 @@
-/* $XTermId: button.c,v 1.629 2020/12/20 17:02:30 tom Exp $ */
+/* $XTermId: button.c,v 1.636 2021/02/10 01:14:51 tom Exp $ */
/*
- * Copyright 1999-2019,2020 by Thomas E. Dickey
+ * Copyright 1999-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -161,7 +161,8 @@ static CELL lastButton3; /* At the release time */
static Char *SaveText(TScreen *screen, int row, int scol, int ecol,
Char *lp, int *eol);
static int Length(TScreen *screen, int row, int scol, int ecol);
-static void ComputeSelect(XtermWidget xw, CELL *startc, CELL *endc, Bool extend);
+static void ComputeSelect(XtermWidget xw, CELL *startc, CELL *endc, Bool
+ extend, Bool normal);
static void EditorButton(XtermWidget xw, XButtonEvent *event);
static void EndExtend(XtermWidget w, XEvent *event, String *params, Cardinal
num_params, Bool use_cursor_loc);
@@ -408,7 +409,7 @@ xtermButtonInit(XtermWidget xw)
unsigned allowed = 0;
unsigned disallow = 0;
- TRACE(("xtermButtonInit length %ld\n", strlen(result)));
+ TRACE(("xtermButtonInit length %ld\n", (long) strlen(result)));
xw->keyboard.print_translations = data;
while ((next = scanTrans(data, &state, &state2, &first, &last)) != 0) {
unsigned len = (last - first);
@@ -2983,7 +2984,7 @@ StartSelect(XtermWidget xw, const CELL *cell)
screen->eventMode = RIGHTEXTENSION;
screen->endExt = *cell;
}
- ComputeSelect(xw, &(screen->startExt), &(screen->endExt), False);
+ ComputeSelect(xw, &(screen->startExt), &(screen->endExt), False, True);
}
static void
@@ -3188,7 +3189,7 @@ do_start_extend(XtermWidget xw,
screen->eventMode = RIGHTEXTENSION;
screen->endExt = cell;
}
- ComputeSelect(xw, &(screen->startExt), &(screen->endExt), True);
+ ComputeSelect(xw, &(screen->startExt), &(screen->endExt), True, True);
#if OPT_READLINE
if (!isSameCELL(&(screen->startSel), &(screen->endSel)))
@@ -3220,7 +3221,7 @@ ExtendExtend(XtermWidget xw, const CELL *cell)
} else {
screen->endExt = *cell;
}
- ComputeSelect(xw, &(screen->startExt), &(screen->endExt), False);
+ ComputeSelect(xw, &(screen->startExt), &(screen->endExt), False, True);
#if OPT_READLINE
if (!isSameCELL(&(screen->startSel), &(screen->endSel)))
@@ -3660,8 +3661,12 @@ okPosition(TScreen *screen,
if (cell->row > screen->max_row) {
result = False;
+ TRACE(("okPosition cell row %d > screen max %d\n", cell->row, screen->max_row));
} else if (cell->col > (LastTextCol(screen, *ld, cell->row) + 1)) {
+ TRACE(("okPosition cell col %d > screen max %d\n", cell->col,
+ (LastTextCol(screen, *ld, cell->row) + 1)));
if (cell->row < screen->max_row) {
+ TRACE(("okPosition cell row %d < screen max %d\n", cell->row, screen->max_row));
cell->col = 0;
*ld = GET_LINEDATA(screen, ++cell->row);
result = False;
@@ -3997,7 +4002,8 @@ static void
ComputeSelect(XtermWidget xw,
CELL *startc,
CELL *endc,
- Bool extend)
+ Bool extend,
+ Bool normal)
{
TScreen *screen = TScreenOf(xw);
@@ -4054,8 +4060,11 @@ ComputeSelect(XtermWidget xw,
case Select_WORD:
TRACE(("Select_WORD\n"));
if (okPosition(screen, &(ld.startSel), &(screen->startSel))) {
+ CELL mark;
cclass = CClassOf(startSel);
+ TRACE(("...starting with class %d\n", cclass));
do {
+ mark = screen->startSel;
--screen->startSel.col;
if (screen->startSel.col < 0
&& isPrevWrapped(startSel)) {
@@ -4064,18 +4073,29 @@ ComputeSelect(XtermWidget xw,
}
} while (screen->startSel.col >= 0
&& CClassSelects(startSel, cclass));
- ++screen->startSel.col;
+ if (normal)
+ ++screen->startSel.col;
+ else
+ screen->startSel = mark;
}
#if OPT_WIDE_CHARS
- if (screen->startSel.col
- && XTERM_CELL(screen->startSel.row,
- screen->startSel.col) == HIDDEN_CHAR)
- screen->startSel.col++;
+#define SkipHiddenCell(mark) \
+ if (mark.col && XTERM_CELL(mark.row, mark.col) == HIDDEN_CHAR) \
+ mark.col++
+#else
+#define SkipHiddenCell(mark) /* nothing */
#endif
+ SkipHiddenCell(screen->startSel);
+
+ if (!normal) {
+ screen->endSel = screen->startSel;
+ ld.endSel = ld.startSel;
+ }
if (okPosition(screen, &(ld.endSel), &(screen->endSel))) {
int length = LastTextCol(screen, ld.endSel, screen->endSel.row);
cclass = CClassOf(endSel);
+ TRACE(("...ending with class %d\n", cclass));
do {
++screen->endSel.col;
if (screen->endSel.col > length
@@ -4088,22 +4108,14 @@ ComputeSelect(XtermWidget xw,
}
} while (screen->endSel.col <= length
&& CClassSelects(endSel, cclass));
- /* Word-select selects if pointing to any char in "word",
- * especially note that it includes the last character in a word.
- * So we do no --endSel.col and do special eol handling.
- */
- if (screen->endSel.col > length + 1
+ if (normal
+ && screen->endSel.col > length + 1
&& MoreRows(endSel)) {
screen->endSel.col = 0;
NextRow(endSel);
}
}
-#if OPT_WIDE_CHARS
- if (screen->endSel.col
- && XTERM_CELL(screen->endSel.row,
- screen->endSel.col) == HIDDEN_CHAR)
- screen->endSel.col++;
-#endif
+ SkipHiddenCell(screen->endSel);
screen->saveStartW = screen->startSel;
break;
@@ -4311,6 +4323,7 @@ SaltTextAway(XtermWidget xw,
int i;
int eol;
int need = 0;
+ size_t have = 0;
Char *line;
Char *lp;
CELL first = *cellc;
@@ -4345,7 +4358,11 @@ SaltTextAway(XtermWidget xw,
/* UTF-8 may require more space */
if_OPT_WIDE_CHARS(screen, {
- need *= 4;
+ if (need > 0) {
+ if (screen->max_combining > 0)
+ need += screen->max_combining;
+ need *= 6;
+ }
});
/* now get some memory to save it in */
@@ -4383,10 +4400,26 @@ SaltTextAway(XtermWidget xw,
}
*lp = '\0'; /* make sure we have end marked */
- TRACE(("Salted TEXT:%u:%s\n", (unsigned) (lp - line),
- visibleChars(line, (unsigned) (lp - line))));
+ have = (size_t) (lp - line);
+ /*
+ * Scanning the buffer twice is unnecessary. Discard unwanted memory if
+ * the estimate is too-far off.
+ */
+ if ((have * 2) < (size_t) need) {
+ Char *next;
+ scp->data_limit = have + 1;
+ next = realloc(line, scp->data_limit);
+ if (next == NULL) {
+ free(line);
+ scp->data_length = 0;
+ scp->data_limit = 0;
+ }
+ scp->data_buffer = next;
+ }
+ scp->data_length = have;
- scp->data_length = (size_t) (lp - line);
+ TRACE(("Salted TEXT:%u:%s\n", (unsigned) have,
+ visibleChars(scp->data_buffer, (unsigned) have)));
}
#if OPT_PASTE64
@@ -4865,7 +4898,7 @@ _OwnSelection(XtermWidget xw,
scp = &(screen->selected_cells[CutBufferToCode(cutbuffer)]);
if (scp->data_length > limit) {
TRACE(("selection too big (%lu bytes), not storing in CUT_BUFFER%d\n",
- scp->data_length, cutbuffer));
+ (unsigned long) scp->data_length, cutbuffer));
xtermWarning("selection too big (%lu bytes), not storing in CUT_BUFFER%d\n",
(unsigned long) scp->data_length, cutbuffer);
} else {
@@ -4921,8 +4954,8 @@ _OwnSelection(XtermWidget xw,
SelectionDone);
}
}
- TRACE(("... _OwnSelection used length %ld value %s\n",
- scp->data_length,
+ TRACE(("... _OwnSelection used length %lu value %s\n",
+ (unsigned long) scp->data_length,
visibleChars(scp->data_buffer,
(unsigned) scp->data_length)));
}
@@ -5562,7 +5595,7 @@ getDataFromScreen(XtermWidget xw, XEvent *event, String method, CELL *start, CEL
finish->col = screen->max_col;
}
- ComputeSelect(xw, start, finish, False);
+ ComputeSelect(xw, start, finish, False, False);
SaltTextAway(xw,
TargetToSelection(screen, PRIMARY_NAME),
&(screen->startSel), &(screen->endSel));
diff --git a/app/xterm/cachedGCs.c b/app/xterm/cachedGCs.c
index 9126f1773..8bc2a50f6 100644
--- a/app/xterm/cachedGCs.c
+++ b/app/xterm/cachedGCs.c
@@ -1,7 +1,7 @@
-/* $XTermId: cachedGCs.c,v 1.79 2019/11/13 23:07:08 tom Exp $ */
+/* $XTermId: cachedGCs.c,v 1.80 2021/02/02 00:20:11 tom Exp $ */
/*
- * Copyright 2007-2018,2019 by Thomas E. Dickey
+ * Copyright 2007-2019,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -767,7 +767,8 @@ copyCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
TRACE(("copyCgs from %s to %s\n",
traceCgsEnum(srcCgsId),
traceCgsEnum(dstCgsId)));
- TRACE2(("copyCgs from %s (me %p, fg %s, bg %s, cset %s) to %s {{\n",
+ TRACE2(("copyCgs from %s (me %p, fg %s, bg %s, cset %s) to %s "
+ TRACE_L "\n",
traceCgsEnum(srcCgsId),
me,
tracePixel(xw, THIS(fg)),
@@ -778,7 +779,7 @@ copyCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
setCgsFore(xw, cgsWin, dstCgsId, THIS(fg));
setCgsBack(xw, cgsWin, dstCgsId, THIS(bg));
setCgsFont(xw, cgsWin, dstCgsId, THIS(font));
- TRACE2(("...copyCgs }}\n"));
+ TRACE2(("...copyCgs " TRACE_R "\n"));
}
}
}
diff --git a/app/xterm/charclass.c b/app/xterm/charclass.c
index 0413edf9e..4381db3d8 100644
--- a/app/xterm/charclass.c
+++ b/app/xterm/charclass.c
@@ -1,7 +1,7 @@
-/* $XTermId: charclass.c,v 1.43 2020/11/08 20:06:53 tom Exp $ */
+/* $XTermId: charclass.c,v 1.44 2021/02/02 00:19:32 tom Exp $ */
/*
- * Copyright 2002-2017,2020 by Thomas E. Dickey
+ * Copyright 2002-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -104,7 +104,7 @@ init_classtab(void)
{
const int size = 50;
- TRACE(("init_classtab {{\n"));
+ TRACE(("init_classtab " TRACE_L "\n"));
classtab = TypeMallocN(struct classentry, (unsigned) size);
if (!classtab)
@@ -157,7 +157,7 @@ init_classtab(void)
SetCharacterClassRange(0xff3b, 0xff40, IDENT); /* half/fullwidth ASCII */
SetCharacterClassRange(0xff5b, 0xff64, IDENT); /* half/fullwidth ASCII */
- TRACE(("}} init_classtab\n"));
+ TRACE((TRACE_R " init_classtab\n"));
return;
}
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 8018269d7..2ce7efb20 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -1,7 +1,7 @@
-/* $XTermId: charproc.c,v 1.1820 2020/12/25 22:12:54 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1825 2021/02/10 00:49:52 tom Exp $ */
/*
- * Copyright 1999-2019,2020 by Thomas E. Dickey
+ * Copyright 1999-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -2291,6 +2291,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
deferparsing(c, sp);
return True;
}
+ sp->check_recur++;
do {
#if OPT_WIDE_CHARS
@@ -2661,9 +2662,13 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_ENQ:
TRACE(("CASE_ENQ - answerback\n"));
- for (count = 0; screen->answer_back[count] != 0; count++)
- unparseputc(xw, screen->answer_back[count]);
- unparse_end(xw);
+ if (((xw->keyboard.flags & MODE_SRM) == 0)
+ ? (sp->check_recur == 0)
+ : (sp->check_recur <= 1)) {
+ for (count = 0; screen->answer_back[count] != 0; count++)
+ unparseputc(xw, screen->answer_back[count]);
+ unparse_end(xw);
+ }
break;
case CASE_BELL:
@@ -2671,7 +2676,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
if (sp->string_mode == ANSI_OSC) {
if (sp->string_used)
sp->string_area[--(sp->string_used)] = '\0';
- do_osc(xw, sp->string_area, sp->string_used, (int) c);
+ if (sp->check_recur <= 1)
+ do_osc(xw, sp->string_area, sp->string_used, (int) c);
ResetState(sp);
} else {
/* bell */
@@ -3510,7 +3516,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
});
break;
default:
- skip += NPARAM;
+ /* later: skip += NPARAM; */
break;
}
}
@@ -3742,6 +3748,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
#if OPT_TEK4014
if (TEK4014_ACTIVE(xw)) {
TRACE(("Tek4014 is now active...\n"));
+ if (sp->check_recur)
+ sp->check_recur--;
return False;
}
#endif
@@ -4191,26 +4199,27 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
if (!sp->string_used)
break;
sp->string_area[--(sp->string_used)] = '\0';
- switch (sp->string_mode) {
- case ANSI_APC:
- /* ignored */
- break;
- case ANSI_DCS:
- do_dcs(xw, sp->string_area, sp->string_used);
- break;
- case ANSI_OSC:
- do_osc(xw, sp->string_area, sp->string_used, ANSI_ST);
- break;
- case ANSI_PM:
- /* ignored */
- break;
- case ANSI_SOS:
- /* ignored */
- break;
- default:
- TRACE(("unknown mode\n"));
- break;
- }
+ if (sp->check_recur <= 1)
+ switch (sp->string_mode) {
+ case ANSI_APC:
+ /* ignored */
+ break;
+ case ANSI_DCS:
+ do_dcs(xw, sp->string_area, sp->string_used);
+ break;
+ case ANSI_OSC:
+ do_osc(xw, sp->string_area, sp->string_used, ANSI_ST);
+ break;
+ case ANSI_PM:
+ /* ignored */
+ break;
+ case ANSI_SOS:
+ /* ignored */
+ break;
+ default:
+ TRACE(("unknown mode\n"));
+ break;
+ }
break;
case CASE_SOS:
@@ -5140,21 +5149,11 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
&& (sp->parsestate != sos_table));
#endif
+ if (sp->check_recur)
+ sp->check_recur--;
return True;
}
-static Boolean
-redoparsing(XtermWidget xw, unsigned c, struct ParseState *sp, unsigned check)
-{
- Boolean result = False;
- if (!(sp->check_recur & check)) {
- UIntSet(sp->check_recur, check);
- result = doparsing(xw, c, sp);
- UIntClr(sp->check_recur, check);
- }
- return result;
-}
-
static void
VTparse(XtermWidget xw)
{
@@ -5166,18 +5165,25 @@ VTparse(XtermWidget xw)
do {
keep_running = doparsing(xw, doinput(xw), &myState);
- while (myState.defer_used) {
- Char *deferred = myState.defer_area;
- size_t len = myState.defer_used;
- size_t i;
- myState.defer_area = NULL;
- myState.defer_size = 0;
- myState.defer_used = 0;
- for (i = 0; i < len; i++) {
- (void) doparsing(xw, deferred[i], &myState);
- }
- free(deferred);
+ if (myState.check_recur == 0 && myState.defer_used != 0) {
+ while (myState.defer_used) {
+ Char *deferred = myState.defer_area;
+ size_t len = myState.defer_used;
+ size_t i;
+ myState.defer_area = NULL;
+ myState.defer_size = 0;
+ myState.defer_used = 0;
+ for (i = 0; i < len; i++) {
+ (void) doparsing(xw, deferred[i], &myState);
+ }
+ free(deferred);
+ }
+ } else {
+ free(myState.defer_area);
}
+ myState.defer_area = NULL;
+ myState.defer_size = 0;
+ myState.defer_used = 0;
} while (keep_running);
}
@@ -7854,7 +7860,7 @@ unparseseq(XtermWidget xw, ANSI *ap)
unparseputc(xw, ap->a_param[i]);
break;
default:
- unparseputn(xw, (unsigned) ap->a_param[i]);
+ unparseputn(xw, (unsigned) (UParm) ap->a_param[i]);
break;
}
}
@@ -7937,7 +7943,7 @@ unparseputc(XtermWidget xw, int c)
/* If send/receive mode is reset, we echo characters locally */
if ((xw->keyboard.flags & MODE_SRM) == 0) {
- (void) redoparsing(xw, (unsigned) c, &myState, PARSE_SRM);
+ doparsing(xw, (unsigned) c, &myState);
}
}
@@ -8365,7 +8371,7 @@ VTInit(XtermWidget xw)
{
Widget vtparent = SHELL_OF(xw);
- TRACE(("VTInit {{\n"));
+ TRACE(("VTInit " TRACE_L "\n"));
XtRealizeWidget(vtparent);
XtOverrideTranslations(vtparent, XtParseTranslationTable(xterm_trans));
@@ -8380,7 +8386,7 @@ VTInit(XtermWidget xw)
ScrnAllocBuf(xw);
- TRACE(("...}} VTInit\n"));
+ TRACE(("..." TRACE_R " VTInit\n"));
return (1);
}
@@ -9137,7 +9143,7 @@ VTInitialize(Widget wrequest,
check_tables();
#endif
- TRACE(("VTInitialize wnew %p, %d / %d resources\n",
+ TRACE(("VTInitialize wnew %p, %d / %d resources " TRACE_L "\n",
(void *) wnew, XtNumber(xterm_resources), MAXRESOURCES));
assert(XtNumber(xterm_resources) < MAXRESOURCES);
@@ -10242,6 +10248,7 @@ VTInitialize(Widget wrequest,
reportResources(wnew);
#endif
xtermResetLocale(LC_NUMERIC, saveLocale);
+ TRACE(("" TRACE_R " VTInitialize\n"));
return;
}
@@ -10280,6 +10287,13 @@ releaseWindowGCs(XtermWidget xw, VTwin *win)
FreeAndNull(name); \
}
+#define TRACE_FREE_GC(name,part) \
+ if (part) { \
+ TRACE(("freed %s " #part ": %p\n", name, (const void *) part)); \
+ XFreeGC(dpy, part); \
+ part = 0; \
+ }
+
#if OPT_INPUT_METHOD
static void
cleanupInputMethod(XtermWidget xw)
@@ -10296,12 +10310,25 @@ cleanupInputMethod(XtermWidget xw)
#define cleanupInputMethod(xw) /* nothing */
#endif
+#ifdef NO_LEAKS
+#define FREE_VT_WIN(name) freeVTwin(dpy, #name, &(screen->name))
+static void
+freeVTwin(Display *dpy, const char *whichWin, VTwin *win)
+{
+ TRACE_FREE_GC(whichWin, win->filler_gc);
+ TRACE_FREE_GC(whichWin, win->border_gc);
+ TRACE_FREE_GC(whichWin, win->marker_gc[0]);
+ TRACE_FREE_GC(whichWin, win->marker_gc[1]);
+}
+#endif
+
static void
VTDestroy(Widget w GCC_UNUSED)
{
#ifdef NO_LEAKS
XtermWidget xw = (XtermWidget) w;
TScreen *screen = TScreenOf(xw);
+ Display *dpy = screen->display;
Cardinal n, k;
StopBlinking(xw);
@@ -10403,6 +10430,11 @@ VTDestroy(Widget w GCC_UNUSED)
noleaks_cachedCgs(xw);
free_termcap(xw);
+ FREE_VT_WIN(fullVwin);
+#ifndef NO_ACTIVE_ICON
+ FREE_VT_WIN(iconVwin);
+#endif /* NO_ACTIVE_ICON */
+
TRACE_FREE_LEAK(screen->selection_targets_8bit);
#if OPT_SELECT_REGEX
for (n = 0; n < NSELECTUNITS; ++n) {
@@ -10962,7 +10994,7 @@ VTRealize(Widget w,
Atom pid_atom;
int i;
- TRACE(("VTRealize {{\n"));
+ TRACE(("VTRealize " TRACE_L "\n"));
TabReset(xw->tabs);
@@ -11352,7 +11384,7 @@ VTRealize(Widget w,
}
xtermSetWinSize(xw);
- TRACE(("}} VTRealize\n"));
+ TRACE(("" TRACE_R " VTRealize\n"));
}
#if OPT_INPUT_METHOD
@@ -12825,8 +12857,9 @@ set_character_class(char *s)
{
#define FMT "%s in range string \"%s\" (position %d)\n"
- TRACE(("set_character_class(%s) {{\n", NonNull(s)));
+ TRACE(("set_character_class(%s) " TRACE_L "\n", NonNull(s)));
if (IsEmpty(s)) {
+ TRACE((TRACE_R " ERR set_character_class\n"));
return -1;
} else {
CCLASS state = ccLO;
@@ -12852,6 +12885,7 @@ set_character_class(char *s)
case ccID:
if (!isdigit(ch)) {
xtermWarning(FMT, "missing number", s, i);
+ TRACE((TRACE_R " ERR set_character_class\n"));
return (-1);
}
value = strtol(s + i, &t, 0);
@@ -12892,6 +12926,7 @@ set_character_class(char *s)
goto apply_class;
} else {
xtermWarning(FMT, "unexpected character", s, i);
+ TRACE((TRACE_R " ERR set_character_class\n"));
return (-1);
}
break;
@@ -12905,6 +12940,7 @@ set_character_class(char *s)
case ccCOMMA:
if (SetCharacterClassRange(arg[0], arg[1], arg[2]) != 0) {
xtermWarning(FMT, "bad range", s, i);
+ TRACE((TRACE_R " ERR set_character_class\n"));
return -1;
}
state = ccLO;
@@ -12914,12 +12950,13 @@ set_character_class(char *s)
if (state >= ccDASH) {
if (SetCharacterClassRange(arg[0], arg[1], arg[2]) != 0) {
xtermWarning(FMT, "bad range", s, i);
+ TRACE((TRACE_R " ERR set_character_class\n"));
return -1;
}
}
}
- TRACE(("}} set_character_class\n"));
+ TRACE((TRACE_R " OK set_character_class\n"));
return (0);
#undef FMT
}
diff --git a/app/xterm/configure.in b/app/xterm/configure.in
index 361e046ef..42bcd94b2 100644
--- a/app/xterm/configure.in
+++ b/app/xterm/configure.in
@@ -1,9 +1,9 @@
-dnl $XTermId: configure.in,v 1.372 2020/09/19 16:50:26 tom Exp $
+dnl $XTermId: configure.in,v 1.378 2021/01/06 20:58:29 tom Exp $
dnl
dnl -----------------------------------------------------------------------------
dnl this file is part of xterm
dnl
-dnl Copyright 1997-2019,2020 by Thomas E. Dickey
+dnl Copyright 1997-2020,2021 by Thomas E. Dickey
dnl
dnl All Rights Reserved
dnl
@@ -33,7 +33,7 @@ dnl authorization.
dnl ---------------------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.52.20200802)
+AC_PREREQ(2.52.20210105)
AC_INIT
AC_CONFIG_SRCDIR([charproc.c])
AC_CONFIG_HEADER(xtermcfg.h:xtermcfg.hin)
@@ -44,12 +44,12 @@ CF_CHECK_CACHE
dnl Only add to this case statement when a system has a compiler that is not
dnl detected by AC_PROG_CC.
case "$host_os" in
-(openedition) : ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
- : ${CPPFLAGS="-D_ALL_SOURCE"}
- : ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
- : ${CC=c89};;
+(openedition) : "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
+ : "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
+ : "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
+ : "${CC=c89}";;
(darwin*)
- : ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
+ : "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
esac
CF_PROG_CC
@@ -121,7 +121,7 @@ cf_cv_icon_list=
for my_item in $srcdir/icons/*.svg
do
test -f "$my_item" || continue
- cf_icon_name=`echo $my_item |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
+ cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
case $cf_icon_name in
(*_48x48)
continue
@@ -169,7 +169,7 @@ AC_MSG_RESULT($with_symlink)
test "$with_symlink" = yes && with_symlink=xterm
test -n "$with_symlink" && \
test "$with_symlink" != no && \
- test "$with_symlink" != $cf_name && \
+ test "$with_symlink" != "$cf_name" && \
XTERM_SYMLINK="$with_symlink"
fi
@@ -409,7 +409,7 @@ if test "$cf_tic_prog" = yes ; then
if test "$TERMINFO_DIR" = yes ; then
AC_MSG_WARN(no value given)
elif test "$TERMINFO_DIR" != none ; then
- if test -d $TERMINFO_DIR ; then
+ if test -d "$TERMINFO_DIR" ; then
AC_DEFINE_UNQUOTED(OWN_TERMINFO_DIR,"$TERMINFO_DIR",[Define to override default TERMINFO value])
AC_MSG_CHECKING(if \$TERMINFO should also be set)
AC_ARG_ENABLE(env-terminfo,
diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c
index 19abe4bde..aa63e52d9 100644
--- a/app/xterm/fontutils.c
+++ b/app/xterm/fontutils.c
@@ -1,7 +1,7 @@
-/* $XTermId: fontutils.c,v 1.697 2020/11/08 20:06:01 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.701 2021/02/02 00:40:30 tom Exp $ */
/*
- * Copyright 1998-2019,2020 by Thomas E. Dickey
+ * Copyright 1998-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -1279,7 +1279,7 @@ xtermUpdateItalics(XtermWidget xw, unsigned new_attrs, unsigned old_attrs)
}
#endif
-#if OPT_TRACE
+#if OPT_TRACE && OPT_BOX_CHARS
static void
show_font_misses(const char *name, XTermFonts * fp)
{
@@ -2419,7 +2419,7 @@ dumpXft(XtermWidget xw, XTermXftFonts *data)
unsigned too_wide = 0;
Boolean skip = False;
- TRACE(("dumpXft {{\n"));
+ TRACE(("dumpXft " TRACE_L "\n"));
TRACE(("\tdata range U+%04X..U+%04X\n", first, last));
TRACE(("\tcode\tcells\tdimensions\n"));
#if OPT_TRACE < 2
@@ -2460,7 +2460,7 @@ dumpXft(XtermWidget xw, XTermXftFonts *data)
++count;
}
}
- TRACE(("}} %u total, %u too-high, %u too-wide\n", count, too_high, too_wide));
+ TRACE((TRACE_R " %u total, %u too-high, %u too-wide\n", count, too_high, too_wide));
}
#define DUMP_XFT(xw, data) dumpXft(xw, data)
#else
@@ -3135,8 +3135,11 @@ xtermCloseXft(TScreen *screen, XTermXftFonts *pub)
for (n = 0; n < pub->limit; ++n) {
if (pub->cache[n].font) {
closeCachedXft(screen, pub->cache[n].font);
+ pub->cache[n].font = 0;
}
}
+ free(pub->cache);
+ pub->cache = NULL;
}
}
@@ -3567,11 +3570,11 @@ xtermUpdateFontInfo(XtermWidget xw, Bool doresize)
if (VWindow(screen)) {
xtermClear(xw);
}
- TRACE(("xtermUpdateFontInfo {{\n"));
+ TRACE(("xtermUpdateFontInfo " TRACE_L "\n"));
DoResizeScreen(xw); /* set to the new natural size */
ResizeScrollBar(xw);
Redraw();
- TRACE(("... }} xtermUpdateFontInfo\n"));
+ TRACE((TRACE_R " xtermUpdateFontInfo\n"));
#ifdef SCROLLBAR_RIGHT
updateRightScrollbar(xw);
#endif
@@ -4542,7 +4545,7 @@ useFaceSizes(XtermWidget xw)
{
Boolean result = False;
- TRACE(("useFaceSizes {{\n"));
+ TRACE(("useFaceSizes " TRACE_L "\n"));
if (UsingRenderFont(xw)) {
Boolean nonzero = True;
int n;
@@ -4579,7 +4582,7 @@ useFaceSizes(XtermWidget xw)
}
result = True;
}
- TRACE(("...}}useFaceSizes %d\n", result));
+ TRACE((TRACE_R " useFaceSizes %d\n", result));
return result;
}
#endif /* OPT_RENDERFONT */
@@ -4756,6 +4759,7 @@ xtermGetFont(const char *param)
fontnum = -1;
break;
}
+ TRACE(("xtermGetFont(%s) ->%d\n", NonNull(param), fontnum));
return fontnum;
}
diff --git a/app/xterm/koi8rxterm b/app/xterm/koi8rxterm
index 98f85ca9c..cbabaed20 100644
--- a/app/xterm/koi8rxterm
+++ b/app/xterm/koi8rxterm
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: koi8rxterm,v 1.5 2007/12/30 16:33:06 tom Exp $
+# $XTermId: koi8rxterm,v 1.6 2021/01/27 01:35:34 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2007 by Thomas E. Dickey
+# Copyright 2007,2021 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -36,7 +36,7 @@
whoami=koi8rxterm
-: ${XTERM_PROGRAM=xterm}
+: "${XTERM_PROGRAM=xterm}"
# Check if there is a workable locale program. If there is not, we will read
# something via the standard error. Ignore whatever is written to the
@@ -96,7 +96,7 @@ if test $found != yes ; then
# The 'locale' program tries to do a sanity check.
check=`sh -c "locale >/dev/null" 2>&1`
if test -n "$check" ; then
- eval ${name}=${save}
+ eval ${name}="${save}"
eval export ${name}
echo "$whoami tried to use locale $value by setting \$$name" >&2
@@ -112,4 +112,4 @@ fi
# for testing:
#test -f ./xterm && XTERM_PROGRAM=./xterm
-exec $XTERM_PROGRAM -class KOI8RXTerm -title $whoami -k8 "$@"
+exec "$XTERM_PROGRAM" -class KOI8RXTerm -title "$whoami" -k8 "$@"
diff --git a/app/xterm/main.c b/app/xterm/main.c
index ce2bda8ee..a1070a5dd 100644
--- a/app/xterm/main.c
+++ b/app/xterm/main.c
@@ -1,7 +1,7 @@
-/* $XTermId: main.c,v 1.866 2020/10/12 18:37:02 tom Exp $ */
+/* $XTermId: main.c,v 1.872 2021/02/10 00:33:22 tom Exp $ */
/*
- * Copyright 2002-2019,2020 by Thomas E. Dickey
+ * Copyright 2002-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -103,12 +103,19 @@
#include <X11/Xaw3d/Form.h>
#elif defined(HAVE_LIB_XAW3DXFT)
#include <X11/Xaw3dxft/Form.h>
+#include <X11/Xaw3dxft/Xaw3dXft.h>
#elif defined(HAVE_LIB_NEXTAW)
#include <X11/neXtaw/Form.h>
#elif defined(HAVE_LIB_XAWPLUS)
#include <X11/XawPlus/Form.h>
#endif
+#else
+
+#if defined(HAVE_LIB_XAW3DXFT)
+#include <X11/Xaw3dxft/Xaw3dXft.h>
+#endif
+
#endif /* OPT_TOOLBAR */
#include <pwd.h>
@@ -1026,6 +1033,7 @@ DATA("-fbb", "*freeBoldBox", XrmoptionNoArg, "off"),
DATA("+fbb", "*freeBoldBox", XrmoptionNoArg, "on"),
DATA("-fbx", "*forceBoxChars", XrmoptionNoArg, "off"),
DATA("+fbx", "*forceBoxChars", XrmoptionNoArg, "on"),
+DATA("-fc", "*initialFont", XrmoptionSepArg, NULL),
#ifndef NO_ACTIVE_ICON
DATA("-fi", "*iconFont", XrmoptionSepArg, NULL),
#endif /* NO_ACTIVE_ICON */
@@ -1221,6 +1229,7 @@ static OptionHelp xtermOptions[] = {
{ "-bw number", "border width in pixels" },
{ "-fn fontname", "normal text font" },
{ "-fb fontname", "bold text font" },
+{ "-fc fontmenu", "start with named fontmenu choice" },
{ "-/+fbb", "turn on/off normal/bold font comparison inhibit"},
{ "-/+fbx", "turn off/on linedrawing characters"},
#if OPT_RENDERFONT
@@ -2207,6 +2216,9 @@ main(int argc, char *argv[]ENVP_ARG)
char *my_class = x_strdup(DEFCLASS);
unsigned line_speed = VAL_LINE_SPEED;
Window winToEmbedInto = None;
+#if defined(HAVE_LIB_XAW3DXFT)
+ Xaw3dXftData *xaw3dxft_data;
+#endif
ProgramName = argv[0];
@@ -2326,6 +2338,12 @@ main(int argc, char *argv[]ENVP_ARG)
XtSetLanguageProc(NULL, NULL, NULL);
#endif
+ /* enable Xft support in Xaw3DXft */
+#if defined(HAVE_LIB_XAW3DXFT)
+ GET_XAW3DXFT_DATA(xaw3dxft_data);
+ xaw3dxft_data->encoding = -1;
+#endif
+
#ifdef TERMIO_STRUCT /* { */
/* Initialization is done here rather than above in order
* to prevent any assumptions about the order of the contents
@@ -3500,7 +3518,7 @@ findValidShell(const char *haystack, const char *needle)
TRACE(("findValidShell:\n%s\n", NonNull(haystack)));
- for (s = t = haystack; (s != 0) && (*s != '\0'); s = t) {
+ for (s = haystack; (s != 0) && (*s != '\0'); s = t) {
++count;
if ((t = strchr(s, '\n')) == 0) {
t = s + strlen(s);
diff --git a/app/xterm/minstall.in b/app/xterm/minstall.in
index edd50979e..cd1577508 100644
--- a/app/xterm/minstall.in
+++ b/app/xterm/minstall.in
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: minstall.in,v 1.25 2019/07/19 00:53:57 tom Exp $
+# $XTermId: minstall.in,v 1.26 2021/01/27 01:36:06 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2001-2016,2019 by Thomas E. Dickey
+# Copyright 2001-2019,2021 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -60,8 +60,8 @@ XTERM_LOCALE=C export XTERM_LOCALE
for p in /bin /usr/bin
do
if test -f $p/cat ; then
-MANPAGER=cat; export MANPAGER
-PAGER=cat; export PAGER
+MANPAGER="cat"; export MANPAGER
+PAGER="cat"; export PAGER
break
fi
done
@@ -115,6 +115,9 @@ do
done
WTMP_PATH=$WTMP_PATH/$WTMP_NAME
+lower=abcdefghijklmnopqrstuvwxyz
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+
# "X" is usually in the miscellaneous section, along with "undocumented".
# Use that to guess an appropriate section. This relies on having the manpage
# installed.
@@ -123,48 +126,48 @@ X_MANSECT=`man $X_MANPAGE 2>&1 | grep $X_MANPAGE'([^)]*)' | head -n 1 | tr '\012
test -z "$X_MANSECT" && X_MANSECT=$suffix
VERSION_H=`echo "$OLD_FILE" | sed -e 's,/[^/]*$,/version.h,' -e s',^[^/]*$,version.h,'`
-PATCH_NUM=`fgrep XTERM_PATCH $VERSION_H|sed -e 's/[^0-9]*//g'`
-PATCH_YMD=`fgrep XTERM_DATE $VERSION_H|sed -e 's,[^0-9/.-]*,,g'`
+PATCH_NUM=`${FGREP-fgrep} XTERM_PATCH "$VERSION_H" | sed -e 's/[^0-9]*//g'`
+PATCH_YMD=`${FGREP-fgrep} XTERM_DATE "$VERSION_H" | sed -e 's,[^0-9/.-]*,,g'`
# Make capitalization variants
-APP_chr0=`echo "$APP_name" | sed -e 's/^\(.\).*/\1/' | tr '[a-z]' '[A-Z]'`
+APP_chr0=`echo "$APP_name" | sed -e 's/^\(.\).*/\1/' | tr "$lower" "$upper"`
APP_chr1=`echo "$APP_name" | sed -e 's/^.//'`
APP_Name=${APP_chr0}${APP_chr1}
-APP_NAME=`echo "$APP_name" | tr '[a-z]' '[A-Z]'`
+# APP_NAME=`echo "$APP_name" | tr "$lower" "$upper"`
# Provide for renaming in test-builds:
-USE_chr0=`echo "$USE_name" | sed -e 's/^\(.\).*/\1/' | tr '[a-z]' '[A-Z]'`
+USE_chr0=`echo "$USE_name" | sed -e 's/^\(.\).*/\1/' | tr "$lower" "$upper"`
USE_chr1=`echo "$USE_name" | sed -e 's/^.//'`
USE_Name=${USE_chr0}${USE_chr1}
-USE_NAME=`echo "$USE_name" | tr '[a-z]' '[A-Z]'`
+USE_NAME=`echo "$USE_name" | tr "$lower" "$upper"`
sed -e 's%__vendorversion__%"X Window System"%' \
- -e 's%__app_version__%Patch\ \#'$PATCH_NUM% \
- -e 's%__app_date__%'$PATCH_YMD% \
- -e "s%^\.TH [^ ][^ ]*%.TH $USE_NAME%" \
- -e "s%^\.ds N $APP_Name%.ds N $USE_Name%" \
- -e "s%^\.ds n $APP_name%.ds n $USE_name%" \
+ -e 's%__app_version__%Patch\ \#'"$PATCH_NUM"% \
+ -e 's%__app_date__%'"$PATCH_YMD"% \
+ -e 's%^\.TH [^ ][^ ]*%.TH '"$USE_NAME"% \
+ -e 's%^\.ds N '"$APP_Name"'%.ds N '"$USE_Name"% \
+ -e 's%^\.ds n '"$APP_name"'%.ds n '"$USE_name"% \
-e 's%^'"$APP_name"' \\- %'"$USE_name"' \- %' \
- -e s%__default_termname__%@default_TERM@% \
- -e s%__default_termid__%@default_termid@% \
- -e s%__alt_sends_esc__%@alt_sends_esc@% \
- -e s%__meta_sends_esc__%@meta_sends_esc@% \
- -e s%__backarrow_is_bs__%@backarrow_is_bs@% \
- -e s%__backarrow_is_erase__%@backarrow_is_erase@% \
- -e s%__delete_is_del__%@delete_is_del@% \
- -e s%__double_buffer__%@double_buffer@% \
- -e s%__initial_erase__%@initial_erase@% \
- -e s%__default_class__%$APP_TYPE% \
- -e s%__apploaddir__%$APPS_DIR% \
- -e s%__mansuffix__%$MY_MANSECT%g \
- -e s%__miscmansuffix__%$X_MANSECT%g \
- -e s%__pixmapsdir__%$XPMS_DIR% \
- -e s%fIutmp'\\%fI'$UTMP_NAME'\\%g' \
- -e s%/etc/utmp%$UTMP_PATH%g \
- -e s%fIwtmp'\\%fI'$WTMP_NAME'\\%g' \
- -e s%/etc/wtmp%$WTMP_PATH%g \
+ -e "s%__default_termname__%@default_TERM@%" \
+ -e "s%__default_termid__%@default_termid@%" \
+ -e "s%__alt_sends_esc__%@alt_sends_esc@%" \
+ -e "s%__meta_sends_esc__%@meta_sends_esc@%" \
+ -e "s%__backarrow_is_bs__%@backarrow_is_bs@%" \
+ -e "s%__backarrow_is_erase__%@backarrow_is_erase@%" \
+ -e "s%__delete_is_del__%@delete_is_del@%" \
+ -e "s%__double_buffer__%@double_buffer@%" \
+ -e "s%__initial_erase__%@initial_erase@%" \
+ -e "s%__default_class__%$APP_TYPE%" \
+ -e "s%__apploaddir__%$APPS_DIR%" \
+ -e "s%__mansuffix__%$MY_MANSECT%g" \
+ -e "s%__miscmansuffix__%$X_MANSECT%g" \
+ -e "s%__pixmapsdir__%$XPMS_DIR%" \
+ -e 's%fIutmp\\%fI'$UTMP_NAME'\\%g' \
+ -e "s%/etc/utmp%$UTMP_PATH%g" \
+ -e 's%fIwtmp\\%fI'$WTMP_NAME'\\%g' \
+ -e "s%/etc/wtmp%$WTMP_PATH%g" \
-e 's%/\\(\*\*%/*%g' \
- $OLD_FILE >$NEW_FILE
+ "$OLD_FILE" >$NEW_FILE
# diff -u $OLD_FILE $NEW_FILE
echo "$MINSTALL $OLD_FILE $END_FILE"
diff --git a/app/xterm/misc.c b/app/xterm/misc.c
index c8e8049d0..05f09f9fe 100644
--- a/app/xterm/misc.c
+++ b/app/xterm/misc.c
@@ -1,7 +1,7 @@
-/* $XTermId: misc.c,v 1.965 2020/12/23 00:21:44 tom Exp $ */
+/* $XTermId: misc.c,v 1.968 2021/02/10 00:50:59 tom Exp $ */
/*
- * Copyright 1999-2019,2020 by Thomas E. Dickey
+ * Copyright 1999-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -223,12 +223,13 @@ unselectwindow(XtermWidget xw, int flag)
xtermDisplayCursor(xw);
}
+ screen->select &= ~flag;
+
if (!screen->always_highlight) {
#if OPT_TEK4014
if (TEK4014_ACTIVE(xw)) {
if (!Ttoggled)
TCursorToggle(tekWidget, TOGGLE);
- screen->select &= ~flag;
if (!Ttoggled)
TCursorToggle(tekWidget, TOGGLE);
} else
@@ -240,7 +241,6 @@ unselectwindow(XtermWidget xw, int flag)
XUnsetICFocus(input->xic);
#endif
- screen->select &= ~flag;
if (screen->cursor_state && CursorMoved(screen))
HideCursor(xw);
if (screen->cursor_state)
@@ -484,6 +484,24 @@ mergeConfigureEvents(XEvent *target)
return XtAppPending(app_con);
}
+#define SAME(a,b,name) ((a)->xbutton.name == (b)->xbutton.name)
+#define SameButtonEvent(a,b) ( \
+ SAME(a,b,type) && \
+ SAME(a,b,serial) && \
+ SAME(a,b,send_event) && \
+ SAME(a,b,display) && \
+ SAME(a,b,window) && \
+ SAME(a,b,root) && \
+ SAME(a,b,subwindow) && \
+ SAME(a,b,time) && \
+ SAME(a,b,x) && \
+ SAME(a,b,y) && \
+ SAME(a,b,x_root) && \
+ SAME(a,b,y_root) && \
+ SAME(a,b,state) && \
+ SAME(a,b,button) && \
+ SAME(a,b,same_screen))
+
/*
* Work around a bug in the X mouse code, which delivers duplicate events.
*/
@@ -498,7 +516,7 @@ mergeButtonEvents(XEvent *target)
if (XtAppPending(app_con)
&& XtAppPeekEvent(app_con, &next_event)
- && !memcmp(target, &next_event, sizeof(XButtonEvent))) {
+ && SameButtonEvent(target, &next_event)) {
Boolean merge_this = False;
XButtonEvent *q = (XButtonEvent *) (&next_event);
@@ -4512,7 +4530,7 @@ restore_DECCIR(XtermWidget xw, const char *cp)
screen->cur_col = (value - 1);
/* page */
- if ((value = parse_int_param(&cp)) != 1)
+ if (parse_int_param(&cp) != 1)
return;
/* rendition */
@@ -4547,7 +4565,7 @@ restore_DECCIR(XtermWidget xw, const char *cp)
screen->curgr = (Char) value;
/* character-set size */
- if ((value = parse_chr_param(&cp)) != 0x4f) /* works for xterm */
+ if (parse_chr_param(&cp) != 0x4f) /* works for xterm */
return;
/* SCS designators */
diff --git a/app/xterm/package/debian/changelog b/app/xterm/package/debian/changelog
index d2c006433..64d0e8cfb 100644
--- a/app/xterm/package/debian/changelog
+++ b/app/xterm/package/debian/changelog
@@ -1,3 +1,21 @@
+xterm-dev (366) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 08 Feb 2021 15:30:49 -0500
+
+xterm-dev (365) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 03 Feb 2021 15:56:34 -0500
+
+xterm-dev (364) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 27 Dec 2020 07:20:40 -0500
+
xterm-dev (363) unstable; urgency=low
* maintenance updates
diff --git a/app/xterm/package/debian/copyright b/app/xterm/package/debian/copyright
index 1ea0b28eb..f4ece9c70 100644
--- a/app/xterm/package/debian/copyright
+++ b/app/xterm/package/debian/copyright
@@ -35,7 +35,7 @@ authorization.
Files: * */*
License: MIT-X11
-Copyright 1996-2019,2020 by Thomas E. Dickey
+Copyright 1996-2020,2021 by Thomas E. Dickey
(date ranges vary, depending on when the respective files were first changed
significantly, and run through the most recent change date).
diff --git a/app/xterm/package/xterm.spec b/app/xterm/package/xterm.spec
index 86fb4cb60..738d6e0d9 100644
--- a/app/xterm/package/xterm.spec
+++ b/app/xterm/package/xterm.spec
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.138 2020/11/15 16:38:35 tom Exp $
+# $XTermId: xterm.spec,v 1.141 2021/02/08 20:30:49 tom Exp $
Summary: X terminal emulator (development version)
%global my_middle xterm
%global my_suffix -dev
%global fullname %{my_middle}%{my_suffix}
%global my_class XTermDev
Name: %{fullname}
-Version: 363
+Version: 366
Release: 1
License: X11
Group: User Interface/X
diff --git a/app/xterm/plink.sh b/app/xterm/plink.sh
index ea7e268ed..f526ce74c 100644
--- a/app/xterm/plink.sh
+++ b/app/xterm/plink.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: plink.sh,v 1.10 2013/07/07 01:20:48 tom Exp $
+# $XTermId: plink.sh,v 1.12 2021/01/27 00:18:09 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2001-2010,2013 by Thomas E. Dickey
+# Copyright 2001-2013,2021 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -41,9 +41,9 @@ do
then
ASNEED=yes
OPT=-Wl,-as-needed
- if ( eval $LINKIT $OPT $* >/dev/null 2>/dev/null )
+ if ( eval $LINKIT $OPT "$@" >/dev/null 2>/dev/null )
then
- WARNED=`eval $LINKIT $OPT $* 2>&1`
+ WARNED=`eval $LINKIT $OPT "$@" 2>&1`
case ".$WARNED" in
*Warning*|*nsupported*|*nrecognized*|*nknown*)
;;
@@ -60,11 +60,12 @@ do
case $OPT in
-k*)
OPT=`echo "$OPT" | sed -e 's/^-k/-l/'`
+ echo "always use $OPT (cannot test if needed)"
LINKIT="$LINKIT $OPT"
;;
-l*)
echo "testing if $OPT is needed"
- if ( eval $LINKIT $* >/dev/null 2>/dev/null )
+ if ( eval $LINKIT "$@" >/dev/null 2>/dev/null )
then
: echo ...no
else
diff --git a/app/xterm/run-tic.sh b/app/xterm/run-tic.sh
index c486d46c5..49bd7418b 100644
--- a/app/xterm/run-tic.sh
+++ b/app/xterm/run-tic.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: run-tic.sh,v 1.12 2020/01/18 16:27:34 tom Exp $
+# $XTermId: run-tic.sh,v 1.13 2021/01/27 01:04:54 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2006-2019,2020 by Thomas E. Dickey
+# Copyright 2006-2020,2021 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -60,7 +60,7 @@ if test -z "$MYTEMP"
then
MYTEMP=${TMPDIR:-/tmp}/run-tic$$
fi
-mkdir -p $MYTEMP || failed "cannot mkdir $MYTEMP"
+mkdir -p "$MYTEMP" || failed "cannot mkdir $MYTEMP"
trap "rm -rf $MYTEMP" EXIT INT QUIT HUP TERM
STDERR=$MYTEMP/run-tic$$.log
@@ -68,13 +68,12 @@ VER=`tic -V 2>/dev/null`
OPT=
TIC_PROG=tic
-TPUT_PROG=tput
INFOCMP_PROG=infocmp
unset TERM
unset TERMINFO_DIRS
-PASS1="$@"
-PASS2="$@"
+PASS1="$*"
+PASS2="$*"
case "x$VER" in
*ncurses*)
@@ -99,12 +98,12 @@ case "x$VER" in
case "$VER" in
*\ [7-9].*|*\ 6.[1-9].20[12][0-9]*)
expect=" cols#100000,"
- cat >$MYTEMP/fake.ti <<EOF
+ cat >"$MYTEMP"/fake.ti <<EOF
fake|test 32-bit numbers,
$expect
EOF
- TERMINFO=$MYTEMP $TIC_PROG $OPT $MYTEMP/fake.ti 2>/dev/null
- check=`TERMINFO=$MYTEMP TERM=fake $INFOCMP_PROG -1 fake 2>/dev/null |grep "$expect"`
+ TERMINFO="$MYTEMP" $TIC_PROG $OPT "$MYTEMP"/fake.ti 2>/dev/null
+ check=`TERMINFO="$MYTEMP" TERM=fake $INFOCMP_PROG -1 fake 2>/dev/null |grep "$expect"`
test "x$check" = "x$expect" || BIG=no
;;
*)
@@ -117,20 +116,20 @@ EOF
# than 4096 bytes.
echo "...this version does not support large terminal descriptions"
PASS2=$MYTEMP/input
- sed -e 's/use=xterm+sm+1006,//' -e '/^[ ][ ]*$/d' "$PASS1" >$PASS2
- set $PASS2
+ sed -e 's/use=xterm+sm+1006,//' -e '/^[ ][ ]*$/d' "$PASS1" >"$PASS2"
+ set "$PASS2"
fi
;;
esac
-echo "** $TIC_PROG $OPT" "$PASS1"
-$TIC_PROG $OPT "$PASS2" 2>$STDERR
+echo "** $TIC_PROG $OPT $PASS1"
+$TIC_PROG $OPT "$PASS2" 2>"$STDERR"
RET=$?
-sed -e "s%$PASS2%$PASS1%" $STDERR | \
-fgrep -v 'Unknown Capability' | \
-fgrep -v 'Capability is not recognized:' | \
-fgrep -v 'tic: Warning near line ' >&2
-rm -f $STDERR
+sed -e "s%$PASS2%$PASS1%" "$STDERR" | \
+${FGREP-fgrep} -v 'Unknown Capability' | \
+${FGREP-fgrep} -v 'Capability is not recognized:' | \
+${FGREP-fgrep} -v 'tic: Warning near line ' >&2
+rm -f "$STDERR"
exit $RET
diff --git a/app/xterm/screen.c b/app/xterm/screen.c
index 6fb6b3b1e..c4d04b357 100644
--- a/app/xterm/screen.c
+++ b/app/xterm/screen.c
@@ -1,7 +1,7 @@
-/* $XTermId: screen.c,v 1.596 2020/12/10 19:43:26 tom Exp $ */
+/* $XTermId: screen.c,v 1.597 2021/02/02 00:19:32 tom Exp $ */
/*
- * Copyright 1999-2019,2020 by Thomas E. Dickey
+ * Copyright 1999-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -1534,7 +1534,7 @@ ScrnRefresh(XtermWidget xw,
unsigned old_attrs = xw->flags;
#endif
- TRACE(("ScrnRefresh top %d (%d,%d) - (%d,%d)%s {{\n",
+ TRACE(("ScrnRefresh top %d (%d,%d) - (%d,%d)%s " TRACE_L "\n",
screen->topline, toprow, leftcol,
nrows, ncols,
force ? " force" : ""));
@@ -1898,7 +1898,7 @@ ScrnRefresh(XtermWidget xw,
#endif
recurse--;
- TRACE(("...}} ScrnRefresh\n"));
+ TRACE((TRACE_R " ScrnRefresh\n"));
return;
}
diff --git a/app/xterm/scrollbar.c b/app/xterm/scrollbar.c
index 62e5ea008..0bec7cd99 100644
--- a/app/xterm/scrollbar.c
+++ b/app/xterm/scrollbar.c
@@ -1,7 +1,7 @@
-/* $XTermId: scrollbar.c,v 1.210 2020/12/10 19:43:26 tom Exp $ */
+/* $XTermId: scrollbar.c,v 1.211 2021/02/02 00:19:32 tom Exp $ */
/*
- * Copyright 2000-2019,2020 by Thomas E. Dickey
+ * Copyright 2000-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -541,14 +541,14 @@ ToggleScrollBar(XtermWidget xw)
if (IsIcon(screen)) {
Bell(xw, XkbBI_MinorError, 0);
} else {
- TRACE(("ToggleScrollBar{{\n"));
+ TRACE(("ToggleScrollBar" TRACE_L "\n"));
if (screen->fullVwin.sb_info.width) {
ScrollBarOff(xw);
} else {
ScrollBarOn(xw, False);
}
update_scrollbar();
- TRACE(("...ToggleScrollBar}}\n"));
+ TRACE((TRACE_R " ToggleScrollBar\n"));
}
}
diff --git a/app/xterm/trace.c b/app/xterm/trace.c
index 82a472cc0..e21857baa 100644
--- a/app/xterm/trace.c
+++ b/app/xterm/trace.c
@@ -1,7 +1,7 @@
-/* $XTermId: trace.c,v 1.230 2020/12/25 15:15:37 tom Exp $ */
+/* $XTermId: trace.c,v 1.232 2021/02/02 00:20:30 tom Exp $ */
/*
- * Copyright 1997-2019,2020 by Thomas E. Dickey
+ * Copyright 1997-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -359,7 +359,7 @@ visibleIChars(const IChar *buf, unsigned len)
static unsigned used;
if (buf != 0) {
- unsigned limit = ((len + 1) * 8) + 1;
+ unsigned limit = ((len + 1) * 12) + 1;
if (limit > used) {
used = limit;
@@ -1167,7 +1167,8 @@ TraceTranslations(const char *name, Widget w)
XtTranslations xlations;
Widget xcelerat;
- TRACE(("TraceTranslations for %s (widget %#lx) {{\n", name, (long) w));
+ TRACE(("TraceTranslations for %s (widget %#lx) " TRACE_L "\n",
+ name, (long) w));
if (w) {
XtVaGetValues(w,
XtNtranslations, &xlations,
@@ -1182,7 +1183,7 @@ TraceTranslations(const char *name, Widget w)
} else {
TRACE(("none (widget is null)\n"));
}
- TRACE(("}}\n"));
+ TRACE((TRACE_R "\n"));
XSetErrorHandler(save);
}
diff --git a/app/xterm/trace.h b/app/xterm/trace.h
index 4554f0b0b..2d1b70f35 100644
--- a/app/xterm/trace.h
+++ b/app/xterm/trace.h
@@ -1,7 +1,7 @@
-/* $XTermId: trace.h,v 1.91 2020/01/29 18:48:24 tom Exp $ */
+/* $XTermId: trace.h,v 1.92 2021/02/01 23:58:05 tom Exp $ */
/*
- * Copyright 1997-2019,2020 by Thomas E. Dickey
+ * Copyright 1997-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -63,6 +63,9 @@ extern void TraceClose (void);
#define TRACE2(p) Trace p
#endif
+#define TRACE_L "{{"
+#define TRACE_R "}}"
+
extern const char * visibleChars(const Char * /* buf */, unsigned /* len */);
extern const char * visibleEventMode(EventMode);
extern const char * visibleIChars(const IChar * /* buf */, unsigned /* len */);
diff --git a/app/xterm/util.c b/app/xterm/util.c
index 11ba4896c..449b00a6e 100644
--- a/app/xterm/util.c
+++ b/app/xterm/util.c
@@ -1,7 +1,7 @@
-/* $XTermId: util.c,v 1.871 2020/12/21 22:01:11 tom Exp $ */
+/* $XTermId: util.c,v 1.872 2021/01/31 18:12:09 tom Exp $ */
/*
- * Copyright 1999-2019,2020 by Thomas E. Dickey
+ * Copyright 1999-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -4293,7 +4293,7 @@ drawXtermText(XTermDraw * params,
#define DrawFlags() recur.draw_flags
#else
#define AttrFlags() (recur.attr_flags & DRAWX_MASK)
-#define DrawFlags() (recur.draw_flags & ~DRAWX_MASK)
+#define DrawFlags() (recur.draw_flags & (unsigned)~DRAWX_MASK)
#endif
TRACE(("drawtext%c[%4d,%4d] {%#x,%#x} (%d) %d:%s\n",
screen->cursor_state == OFF ? ' ' : '*',
diff --git a/app/xterm/version.h b/app/xterm/version.h
index dd06fb1fc..55123d9cc 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,7 +1,7 @@
-/* $XTermId: version.h,v 1.505 2020/12/26 14:39:42 tom Exp $ */
+/* $XTermId: version.h,v 1.510 2021/02/10 22:28:30 tom Exp $ */
/*
- * Copyright 1998-2019,2020 by Thomas E. Dickey
+ * Copyright 1998-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -38,8 +38,8 @@
* version of X to which this version of xterm has been built. The resulting
* number in parentheses is my patch number (Thomas E. Dickey).
*/
-#define XTERM_PATCH 363
-#define XTERM_DATE 2020-12-26
+#define XTERM_PATCH 366
+#define XTERM_DATE 2021-02-10
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/xterm.appdata.xml b/app/xterm/xterm.appdata.xml
index cd9ab6e27..fc03d08d9 100644
--- a/app/xterm/xterm.appdata.xml
+++ b/app/xterm/xterm.appdata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2014-2019,2020 Thomas Dickey <dickey@invisible-island.net> -->
+<!-- Copyright 2014-2020,2021 Thomas Dickey <dickey@invisible-island.net> -->
<component type="desktop">
<id>xterm.desktop</id>
<metadata_license>CC-BY-3.0</metadata_license>
@@ -35,7 +35,7 @@
<keyword>terminal</keyword>
</keywords>
<releases>
- <release version="363" date="2020-12-26"/>
+ <release version="366" date="2021-02-10"/>
</releases>
<url type="homepage">https://invisible-island.net/xterm/</url>
<update_contact>dickey@invisible-island.net</update_contact>
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index 3d5ed4c9b..d22510e69 100644
--- a/app/xterm/xterm.log.html
+++ b/app/xterm/xterm.log.html
@@ -2,7 +2,7 @@
*****************************************************************************
* this file is part of xterm *
* *
- * Copyright 1997-2019,2020 by Thomas E. Dickey *
+ * Copyright 1997-2020,2021 by Thomas E. Dickey *
* *
* All Rights Reserved *
* *
@@ -30,7 +30,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
*****************************************************************************
- $XTermId: xterm.log.html,v 1.2289 2020/12/26 15:38:13 tom Exp $
+ $XTermId: xterm.log.html,v 1.2313 2021/02/10 22:27:30 tom Exp $
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
@@ -50,7 +50,7 @@
<body>
<hr>
- <p>Copyright &copy; 1997-2019,2020 by <a href=
+ <p>Copyright &copy; 1997-2020,2021 by <a href=
"mailto:dickey@invisible-island.net">Thomas E. Dickey</a></p>
<hr>
@@ -70,6 +70,12 @@
CHANGELOG</a>).</p>
<ul>
+ <li><a href="#xterm_366">Patch #366 - 2021/02/10</a></li>
+
+ <li><a href="#xterm_365">Patch #365 - 2021/02/03</a></li>
+
+ <li><a href="#xterm_364">Patch #364 - 2021/02/02</a></li>
+
<li><a href="#xterm_363">Patch #363 - 2020/12/26</a></li>
<li><a href="#xterm_362">Patch #362 - 2020/11/11</a></li>
@@ -1004,6 +1010,83 @@
<li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
</ul>
+ <h1><a name="xterm_366" id="xterm_366">Patch #366 -
+ 2021/02/10</a></h1>
+
+ <ul>
+ <li>correct a compiler-warning fix in <a href=
+ "#xterm_352">patch #352</a> which allowed sign-extension of
+ coordinate values (report by "CismonX").</li>
+
+ <li>correct upper-limit for selection buffer, accounting for
+ combining characters (report/testcase by Tavis Ormandy).</li>
+
+ <li>with <code>alwaysHighlight</code> true, xterm does not
+ properly track focus. The <em>screen-&gt;select</em>
+ <code>FOCUS</code> flag remains always on, which prevents
+ <code>bellIsUrgent</code> from working, as the urgent
+ <code>WM_HINT</code> flag is only set in
+ <code>setXUrgency()</code> when the window is not focused. Fix
+ this by updating <em>screen-&gt;select</em> in
+ <code>unselectwindow()</code> regardless of the value of
+ <code>always_highlight</code> (patch by Jiri Bohac).</li>
+
+ <li>improve fix for interaction between SRM and ENQ (report by
+ Grant Taylor).</li>
+
+ <li>build-fix for <code>--with-Xaw3dxft</code>, needed when
+ <code>--with-toolbar</code> is omitted (report by Jimmy Olgeni,
+ Emanuel Haupt).</li>
+ </ul>
+
+ <h1><a name="xterm_365" id="xterm_365">Patch #365 -
+ 2021/02/03</a></h1>
+
+ <ul>
+ <li>amend fix for &ldquo;word&rdquo; selection in <a href=
+ "#xterm_364">patch #364</a> to limit that to the
+ <code>insert-selectable</code> <em>action</em>, which reads
+ data from the screen. This restores the interactive behavior
+ where double-clicking on a &ldquo;word&rdquo; would make
+ subsequent selection extensions by words as well as suppressing
+ some boundary-checks (report by David Wolfskill, FreeBSD
+ #253225).</li>
+ </ul>
+
+ <h1><a name="xterm_364" id="xterm_364">Patch #364 -
+ 2021/02/02</a></h1>
+
+ <ul>
+ <li>add <code>-fc</code> option.</li>
+
+ <li>correct/improve limit-checks for SRM versus ENQ from
+ <a href="#xterm_344">patch #344</a> (report by Tom
+ Szilagyi).</li>
+
+ <li>enable <code>XftFont</code> resource in Xaw3dxft
+ configuration (patch by Tavis Ormandy).</li>
+
+ <li>improve quoting/escaping in build-scripts per
+ shellcheck.</li>
+
+ <li>add <code>libpcre2-posix</code> to the packages tested for
+ <code>--with-pcre2</code> option, needed with Fedora (report by
+ Tomas Korbar).</li>
+
+ <li>correct a typo in manual page, and note that
+ <code>KeepClipboard</code> may not be compiled-in (report/patch
+ by Sean C Farley).</li>
+
+ <li>corrected boundary-checks for &ldquo;word&rdquo; selection
+ used in <code>on<em>N</em>Clicks</code> resources (report by
+ Tavis Ormandy).</li>
+
+ <li>update to autoconf-2.52-20210101, to improve shellcheck
+ warnings.</li>
+
+ <li>improve configure check for desktop categories.</li>
+ </ul>
+
<h1><a name="xterm_363" id="xterm_363">Patch #363 -
2020/12/26</a></h1>
diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man
index 0de7be00d..4648e16c6 100644
--- a/app/xterm/xterm.man
+++ b/app/xterm/xterm.man
@@ -1,7 +1,7 @@
'\" t
-.\" $XTermId: xterm.man,v 1.833 2020/12/24 12:49:26 tom Exp $
+.\" $XTermId: xterm.man,v 1.839 2021/02/02 00:24:46 tom Exp $
.\"
-.\" Copyright 1996-2019,2020 by Thomas E. Dickey
+.\" Copyright 1996-2020,2021 by Thomas E. Dickey
.\"
.\" All Rights Reserved
.\"
@@ -646,6 +646,10 @@ This option indicates that \fI\*n\fP should assume that the
normal and bold fonts have VT100 line-drawing characters.
It sets the \fBforceBoxChars\fP resource to \*(``true\*(''.
.TP 8
+.BI \-fc " fontchoice"
+Specify the initial font chosen from the font menu.
+The option value corresponds to the \fBinitialFont\fP resource.
+.TP 8
.BI \-fd " pattern"
This option sets the pattern for double-width fonts selected from the FreeType
library if support for that library was compiled into \fI\*n\fP.
@@ -1498,7 +1502,7 @@ X Toolkit accepts alternate names for a few of these options, e.g.,
\*(``\fB\-foreground\fP\*('' for \*(``\fB\-fg\fP\*(''
.PP
Abbreviated options also are supported, e.g.,
-\*(``\fB\-v\fP\*('' for \*(``\fB\-verbose\fP.\*(''
+\*(``\fB\-v\fP\*('' for \*(``\fB\-version\fP.\*(''
.
.
.SH RESOURCES
@@ -3147,7 +3151,7 @@ The resource value is a comma-separated list of names.
\fI\*N\fP ignores capitalization.
The default value is
.NS
-BS,DEL,ENT,EOT,ESC,NUL
+BS,DEL,ENQ,EOT,ESC,NUL
.NE
.IP
The names are listed below:
@@ -3867,7 +3871,8 @@ copied to the clipboard rather than asking the clipboard for its
current contents when told to provide the selection.
The default is \*(``false\*(''.
.IP
-The menu entry \fBKeep Clipboard\fP allows you to change this at runtime.
+If compiled into \fI\*n\fP, the menu entry \fBKeep Clipboard\fP allows you to
+change this at runtime.
.TP 8
.B "keepSelection\fP (class\fB KeepSelection\fP)"
Specifies whether \fI\*n\fR will keep the selection even after the
@@ -4340,6 +4345,16 @@ The resource value can be one of these:
.B word
Select a \*(``word\*('' as determined by the \fBcharClass\fP resource.
See the \fBCHARACTER CLASSES\fP section.
+.IP
+If the pointer is on a \*(``word\*('' then \fI\*n\fP searches back
+to the beginning of the word, and then to the end.
+.IP
+If the pointer is not on a \*(``word\*('' then the result depends
+on whether it is on whitespace (including a newline), or past
+the end of the line.
+In the latter case \fI\*n\fP may select
+a \*(``word\*('' beginning after the newline,
+if there is no additional whitespace.
.TP
.B line
Select a line (counting wrapping).