summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-10-17 09:10:01 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-10-17 09:10:01 +0000
commitba092355dc7f9c12b3c433cbe48163329ee33ebf (patch)
tree9af8505a9b1437e84eb4427a4876b0966d8adbec
parentf8e9605af944cec1ec27e47de5c93f970848b6e9 (diff)
Update to xterm 369. Tested by many.
-rw-r--r--app/xterm/MANIFEST2
-rw-r--r--app/xterm/NEWS56
-rw-r--r--app/xterm/THANKS6
-rw-r--r--app/xterm/Tekproc.c4
-rw-r--r--app/xterm/button.c40
-rw-r--r--app/xterm/cachedGCs.c11
-rw-r--r--app/xterm/charproc.c131
-rw-r--r--app/xterm/configure.in6
-rw-r--r--app/xterm/ctlseqs.ms348
-rw-r--r--app/xterm/ctlseqs.txt345
-rw-r--r--app/xterm/data.c8
-rw-r--r--app/xterm/data.h10
-rw-r--r--app/xterm/fontutils.c11
-rw-r--r--app/xterm/graphics.c4
-rw-r--r--app/xterm/graphics_sixel.c12
-rw-r--r--app/xterm/html.c9
-rw-r--r--app/xterm/input.c19
-rw-r--r--app/xterm/linedata.c8
-rw-r--r--app/xterm/main.c17
-rw-r--r--app/xterm/main.h12
-rw-r--r--app/xterm/menu.c14
-rw-r--r--app/xterm/misc.c655
-rw-r--r--app/xterm/package/debian/changelog12
-rw-r--r--app/xterm/package/freebsd/Makefile4
-rw-r--r--app/xterm/package/pkgsrc/Makefile2
-rw-r--r--app/xterm/package/xterm.spec4
-rw-r--r--app/xterm/ptyx.h59
-rw-r--r--app/xterm/run-tic.sh4
-rw-r--r--app/xterm/screen.c245
-rw-r--r--app/xterm/scrollbar.c6
-rw-r--r--app/xterm/svg.c6
-rw-r--r--app/xterm/terminfo120
-rw-r--r--app/xterm/trace.c9
-rw-r--r--app/xterm/util.c167
-rw-r--r--app/xterm/version.h6
-rw-r--r--app/xterm/wcwidth.c393
-rw-r--r--app/xterm/xterm.appdata.xml2
-rw-r--r--app/xterm/xterm.h33
-rw-r--r--app/xterm/xterm.log.html160
-rw-r--r--app/xterm/xterm.man58
-rw-r--r--app/xterm/xtermcfg.h4
-rw-r--r--app/xterm/xtermcfg.hin4
42 files changed, 1952 insertions, 1074 deletions
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index 7faef1c62..3ee8f0662 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-367, version xterm-367
+MANIFEST for xterm-369, version xterm-369
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/app/xterm/NEWS b/app/xterm/NEWS
index ab33bd0a8..2717990a7 100644
--- a/app/xterm/NEWS
+++ b/app/xterm/NEWS
@@ -1,23 +1,43 @@
The NEWS file was generated from xterm.log.html, which serves as the changelog
for xterm.
--------------------------------------------------------------------------------
- Patch #367 - 2021/03/26
+ Patch #369 - 2021/09/21
- * add OSC 22 to allow programs to select different pointer cursor at
- runtime.
- * change configuration for no-return functions to use _Noreturn when
- it is available, because clang --analyze does not properly handle
- the gcc noreturn attribute.
- * add cursorTheme resource to provide a way to enable or disable the
- cursor theme feature.
- * modified CopyWait event retries to use shorter sleeps, to improve
- responsiveness (tmux #2556).
- * improve quoting/escaping in demo-scripts per shellcheck.
- * add resizeByPixel resource, to permit disabling window manager
- resizing-hints (patch by Tim Oehl).
- * corrected printOptsImmediate handling of alternate-screen (report
- by Abhijit Dasgupta).
- * update sample terminfo to more closely match ncurses.
- * add/improve limit-checks for Xlib calls (report by Roman Fiedler).
- * fix a typo in the help-message (report by Tomas Korbar).
+ * modify run-tic.sh to work around bug in development version of
+ ncurses which was packaged in FreeBSD ports.
+ * remove ifdef's for OPT_COLOR_RES and OPT_COLOR_RES2.
+ * improve performance over slow connections (report by Harald
+ Dunkel).
+ * update cursor if restoring mode for DECTCEM.
+ * modify CharWidth macro to ensure that the shortcut for Latin-1 is
+ only applied when UTF-8 is not enabled, to fix a bug in handling
+ soft-hyphen from patch #334 changes (patch by Martijn van Duren).
+ * improve terminfo:
+ + fill-in function-keys in terminfo which are not Sun/HP
+ keyboards using xterm+nopcfkeys building-block.
+ + add kbeg to xterm+keypad to accommodate termcap applications
+ + add smglp and smgrp to vt420+lrmm, to provide useful data for
+ the "tabs" +m option
+ * support shift-tab in Sun, HP and SCO keyboards.
+ * document some legacy features in ctlseqs.ms (prompted by discussion
+ with Jimmy Aguilar Mena "Ergus").
+ * add “trim” option to cdXtraScroll and tiXtraScroll.
+ * remove support for non-fifo save-lines configuration.
+ * extend cdXtraScroll to check if the cursor is at the upper-left of
+ the scrolling region when the erasure is for the remainder of the
+ screen versus the whole screen (prompted by discussion with Jörg
+ Breitbart).
+ * add workaround for broken pcre2 package in Debian 10.
+ * change screen-refresh call used for DECCARA and DECRARA to ensure
+ that trailing blanks which are part of the rectangle are repainted
+ (report/analysis by Dennis Filder).
+ * when resetting the terminal, ensure that the cursor shape also is
+ reset, e.g., if DECSCUSR has been used to modify the cursor shape
+ for an xterm which was started with the underlined cursor option
+ (report/analysis by Luis Javier Merino).
+ * prevent DECSCUSR from blinking the cursor if the cursorBlink
+ resource is “never” (report by Vladimir D Seleznev).
+ * invert the sense of DECSDM, to correspond with VT382 manuals (lsix
+ #41).
+ * update tables in wcwidth.c based on Unicode 14.0.0
diff --git a/app/xterm/THANKS b/app/xterm/THANKS
index 9ddcd7caf..82e395360 100644
--- a/app/xterm/THANKS
+++ b/app/xterm/THANKS
@@ -1,4 +1,4 @@
--- $XTermId: THANKS,v 1.31 2021/03/01 22:00:49 tom Exp $
+-- $XTermId: THANKS,v 1.32 2021/09/12 23:14:32 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.
@@ -72,6 +72,7 @@ David Wolfskill
David Wood
David Yeo
Denis Zaitsev
+Dennis Filder
Dennis Preiser
Dennis Schneider
Dimitrios Christidis
@@ -137,12 +138,14 @@ Lauri Tirkkonen
Leandro Lupori
Lee Olsen
Loïc Minier
+Luis Javier Merino
Marc Bevand
Marc La France
Marco Peereboom
Marius Tolzmann
Mark Waggoner
Markus Kuhn
+Martijn van Duren
Martin Hostettler
Martin Pirker
Martin Tournoij
@@ -213,6 +216,7 @@ Sergey Vlasov
Slava Semushin
Stefan Assmann
Stefan Dirsch
+Stelios Bounanos
Stephen P Wall
Stuart Lissaman
Sven Joachim
diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c
index fb1237fcc..d43c1617d 100644
--- a/app/xterm/Tekproc.c
+++ b/app/xterm/Tekproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: Tekproc.c,v 1.243 2021/03/21 22:08:46 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.245 2021/06/03 21:23:18 tom Exp $ */
/*
* Copyright 2001-2020,2021 by Thomas E. Dickey
@@ -402,6 +402,8 @@ TekInit(void)
XtNmenuHeight, menu_high,
#endif
(XtPointer) 0);
+ TRACE(("created tek4014 widget %p, window %#lx\n",
+ (void *) tekWidget, XtWindow(tekWidget)));
#if OPT_TOOLBAR
ShowToolbar(resource.toolBar);
#endif
diff --git a/app/xterm/button.c b/app/xterm/button.c
index 34e4d14f5..c87567bd0 100644
--- a/app/xterm/button.c
+++ b/app/xterm/button.c
@@ -1,4 +1,4 @@
-/* $XTermId: button.c,v 1.636 2021/02/10 01:14:51 tom Exp $ */
+/* $XTermId: button.c,v 1.637 2021/08/12 00:33:06 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -79,17 +79,45 @@ button.c Handles button events in the terminal emulator.
#include <xstrings.h>
#if OPT_SELECT_REGEX
-#ifdef HAVE_PCRE2POSIX_H
+#if defined(HAVE_PCRE2POSIX_H)
#include <pcre2posix.h>
-#else
-#ifdef HAVE_PCREPOSIX_H
+
+/* pcre2 used to provide its "POSIX" entrypoints using the same names as the
+ * standard ones in the C runtime, but that never worked because the linker
+ * would use the C runtime. Debian patched the library to fix this symbol
+ * conflict, but overlooked the header file, and Debian's patch was made
+ * obsolete when pcre2 was changed early in 2019 to provide different names.
+ *
+ * Here is a workaround to make the older version of Debian's package work.
+ */
+#if !defined(PCRE2regcomp) && defined(HAVE_PCRE2REGCOMP)
+
+#undef regcomp
+#undef regexec
+#undef regfree
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ PCRE2POSIX_EXP_DECL int PCRE2regcomp(regex_t *, const char *, int);
+ PCRE2POSIX_EXP_DECL int PCRE2regexec(const regex_t *, const char *, size_t,
+ regmatch_t *, int);
+ PCRE2POSIX_EXP_DECL void PCRE2regfree(regex_t *);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+#define regcomp(r,s,n) PCRE2regcomp(r,s,n)
+#define regexec(r,s,n,m,x) PCRE2regexec(r,s,n,m,x)
+#define regfree(r) PCRE2regfree(r)
+#endif
+/* end workaround... */
+#elif defined(HAVE_PCREPOSIX_H)
#include <pcreposix.h>
#else /* POSIX regex.h */
#include <sys/types.h>
#include <regex.h>
#endif
-#endif
-#endif
+#endif /* OPT_SELECT_REGEX */
#ifdef HAVE_X11_TRANSLATEI_H
#include <X11/ConvertI.h>
diff --git a/app/xterm/cachedGCs.c b/app/xterm/cachedGCs.c
index 8bc2a50f6..896487d08 100644
--- a/app/xterm/cachedGCs.c
+++ b/app/xterm/cachedGCs.c
@@ -1,4 +1,4 @@
-/* $XTermId: cachedGCs.c,v 1.80 2021/02/02 00:20:11 tom Exp $ */
+/* $XTermId: cachedGCs.c,v 1.81 2021/09/16 19:48:02 tom Exp $ */
/*
* Copyright 2007-2019,2021 by Thomas E. Dickey
@@ -217,20 +217,11 @@ tracePixel(XtermWidget xw, Pixel value)
if (result == 0) {
for (n = 0; n < MAXCOLORS; ++n) {
-#if OPT_COLOR_RES
if (screen->Acolors[n].mode > 0
&& value == screen->Acolors[n].value) {
result = screen->Acolors[n].resource;
break;
}
-#else
- if (value == screen->Acolors[n]) {
- char temp[80];
- sprintf(temp, "Acolors[%d]", n);
- result = x_strdup(temp);
- break;
- }
-#endif
}
}
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 7eccf4270..c2fc6609b 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.1830 2021/03/21 22:45:24 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1846 2021/09/18 00:04:08 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -448,7 +448,7 @@ static XtResource xterm_resources[] =
Bres(XtNboldMode, XtCBoldMode, screen.bold_mode, True),
Bres(XtNbrokenSelections, XtCBrokenSelections, screen.brokenSelections, False),
Bres(XtNc132, XtCC132, screen.c132, False),
- Bres(XtNcdXtraScroll, XtCCdXtraScroll, misc.cdXtraScroll, False),
+ Sres(XtNcdXtraScroll, XtCCdXtraScroll, misc.cdXtraScroll_s, DEF_CD_XTRA_SCROLL),
Bres(XtNcolorInnerBorder, XtCColorInnerBorder, misc.color_inner_border, False),
Bres(XtNcurses, XtCCurses, screen.curses, False),
Bres(XtNcutNewline, XtCCutNewline, screen.cutNewline, True),
@@ -490,7 +490,7 @@ static XtResource xterm_resources[] =
screen.selectToClipboard, False),
Bres(XtNsignalInhibit, XtCSignalInhibit, misc.signalInhibit, False),
Bres(XtNtiteInhibit, XtCTiteInhibit, misc.titeInhibit, False),
- Bres(XtNtiXtraScroll, XtCTiXtraScroll, misc.tiXtraScroll, False),
+ Sres(XtNtiXtraScroll, XtCTiXtraScroll, misc.tiXtraScroll_s, DEF_TI_XTRA_SCROLL),
Bres(XtNtrimSelection, XtCTrimSelection, screen.trim_selection, False),
Bres(XtNunderLine, XtCUnderLine, screen.underline, True),
Bres(XtNvisualBell, XtCVisualBell, screen.visualbell, False),
@@ -683,14 +683,6 @@ static XtResource xterm_resources[] =
COLOR_RES("IT", screen.Acolors[COLOR_IT], DFT_COLOR(XtDefaultForeground)),
#endif
-#if !OPT_COLOR_RES2
-#if OPT_256_COLORS
-# include <256colres.h>
-#elif OPT_88_COLORS
-# include <88colres.h>
-#endif
-#endif /* !OPT_COLOR_RES2 */
-
#endif /* OPT_ISO_COLORS */
CLICK_RES("2", screen.onClick[1], "word"),
@@ -801,6 +793,7 @@ static XtResource xterm_resources[] =
#if OPT_SCROLL_LOCK
Bres(XtNallowScrollLock, XtCAllowScrollLock, screen.allowScrollLock0, False),
+ Bres(XtNautoScrollLock, XtCAutoScrollLock, screen.autoScrollLock, False),
#endif
/* these are used only for testing ncurses, not in the manual page */
@@ -2305,7 +2298,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
*/
if (c >= 0x300
&& screen->wide_chars
- && CharWidth(c) == 0
+ && CharWidth(screen, c) == 0
&& !isWideControl(c)) {
int prev, test;
Boolean used = True;
@@ -2330,9 +2323,9 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
prev = (int) XTERM_CELL(use_row, use_col);
test = do_precomposition(prev, (int) c);
TRACE(("do_precomposition (U+%04X [%d], U+%04X [%d]) -> U+%04X [%d]\n",
- prev, CharWidth(prev),
- (int) c, CharWidth(c),
- test, CharWidth(test)));
+ prev, CharWidth(screen, prev),
+ (int) c, CharWidth(screen, c),
+ test, CharWidth(screen, test)));
} else {
prev = -1;
test = -1;
@@ -2342,7 +2335,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
* only if it does not change the width of the base character
*/
if (test != -1
- && CharWidth(test) == CharWidth(prev)) {
+ && CharWidth(screen, test) == CharWidth(screen, prev)) {
putXtermCell(screen, use_row, use_col, test);
} else if (screen->char_was_written
|| getXtermCell(screen, use_row, use_col) >= ' ') {
@@ -2968,7 +2961,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_ED:
TRACE(("CASE_ED - erase display\n"));
- do_cd_xtra_scroll(xw);
+ do_cd_xtra_scroll(xw, zero_if_default(0));
do_erase_display(xw, zero_if_default(0), OFF_PROTECT);
ResetState(sp);
break;
@@ -2994,7 +2987,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_DL:
TRACE(("CASE_DL - delete line\n"));
- DeleteLine(xw, one_if_default(0));
+ DeleteLine(xw, one_if_default(0), True);
ResetState(sp);
break;
@@ -3913,8 +3906,10 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
screen->cursor_shape, BtoS(blinks)));
if (change) {
xtermSetCursorBox(screen);
- screen->cursor_blink_esc = blinks;
- UpdateCursorBlink(xw);
+ if (SettableCursorBlink(screen)) {
+ screen->cursor_blink_esc = blinks;
+ UpdateCursorBlink(xw);
+ }
}
}
ResetState(sp);
@@ -4551,7 +4546,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
value = zero_if_default(0);
TRACE(("CASE_DECFRA - Fill rectangular area\n"));
- if (nparam > 0 && CharWidth(value) > 0) {
+ if (nparam > 0 && CharWidth(screen, value) > 0) {
xtermParseRect(xw, ParamPair(1), &myRect);
ScrnFillRectangle(xw, &myRect, value, xw->flags, True);
}
@@ -4860,7 +4855,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_REP:
TRACE(("CASE_REP\n"));
- if (CharWidth(sp->lastchar) > 0) {
+ if (CharWidth(screen, sp->lastchar) > 0) {
IChar repeated[2];
count = one_if_default(0);
repeated[0] = (IChar) sp->lastchar;
@@ -5792,7 +5787,7 @@ dotext(XtermWidget xw,
buf[n] <= 0xa0) {
last_chomp = 1;
} else {
- last_chomp = CharWidth(buf[n]);
+ last_chomp = CharWidth(screen, buf[n]);
if (last_chomp <= 0) {
IChar ch = buf[n];
Bool eat_it = !screen->utf8_mode && (ch > 127);
@@ -7014,6 +7009,7 @@ restoremodes(XtermWidget xw)
break;
case srm_DECTCEM: /* Show/hide cursor (VT200) */
DoRM(DP_CRS_VISIBLE, screen->cursor_set);
+ updateCursor(xw);
break;
case srm_RXVT_SCROLLBAR:
if ((screen->fullVwin.sb_info.width != 0) !=
@@ -7993,15 +7989,14 @@ ToAlternate(XtermWidget xw, Bool clearFirst)
if (screen->whichBuf == 0) {
TRACE(("ToAlternate\n"));
- if (!screen->editBuf_index[1])
+ if (!screen->editBuf_index[1]) {
screen->editBuf_index[1] = allocScrnBuf(xw,
(unsigned) MaxRows(screen),
(unsigned) MaxCols(screen),
&screen->editBuf_data[1]);
+ }
SwitchBufs(xw, 1, clearFirst);
-#if OPT_SAVE_LINES
screen->visbuf = screen->editBuf_index[screen->whichBuf];
-#endif
update_altscreen();
}
}
@@ -8013,12 +8008,11 @@ FromAlternate(XtermWidget xw)
if (screen->whichBuf != 0) {
TRACE(("FromAlternate\n"));
- if (screen->scroll_amt)
+ if (screen->scroll_amt) {
FlushScroll(xw);
+ }
SwitchBufs(xw, 0, False);
-#if OPT_SAVE_LINES
screen->visbuf = screen->editBuf_index[screen->whichBuf];
-#endif
update_altscreen();
}
}
@@ -8056,9 +8050,7 @@ Bool
CheckBufPtrs(TScreen *screen)
{
return (screen->visbuf != 0
-#if OPT_SAVE_LINES
&& screen->editBuf_index[0] != 0
-#endif
&& screen->editBuf_index[1] != 0);
}
@@ -8069,16 +8061,7 @@ void
SwitchBufPtrs(TScreen *screen, int toBuf)
{
if (CheckBufPtrs(screen)) {
-#if OPT_SAVE_LINES
screen->visbuf = screen->editBuf_index[toBuf];
-#else
- size_t len = ScrnPointers(screen, (size_t) MaxRows(screen));
-
- (void) toBuf;
- memcpy(screen->save_ptr, screen->visbuf, len);
- memcpy(screen->visbuf, screen->editBuf_index[1], len);
- memcpy(screen->editBuf_index[1], screen->save_ptr, len);
-#endif
}
}
@@ -8397,7 +8380,6 @@ VTClassInit(void)
(XtConvertArgList) NULL, (Cardinal) 0);
}
-#if OPT_COLOR_RES
/*
* Override the use of XtDefaultForeground/XtDefaultBackground to make some
* colors, such as cursor color, use the actual foreground/background value
@@ -8464,11 +8446,6 @@ repairColors(XtermWidget target)
screen->Tcolors[TEXT_BG].value = target->dft_background;
}
}
-#else
-#define fill_Tres(target, source, offset) \
- TScreenOf(target)->Tcolors[offset] = TScreenOf(source)->Tcolors[offset]
-#define repairColors(target) /* nothing */
-#endif
#if OPT_WIDE_CHARS
static void
@@ -9069,6 +9046,7 @@ VTInitialize(Widget wrequest,
static const FlagList tblRenderFont[] =
{
DATA(Default)
+ ,DATA(DefaultOff)
,DATA_END
};
#undef DATA
@@ -9113,6 +9091,14 @@ VTInitialize(Widget wrequest,
};
#undef DATA
+#define DATA(name) { #name, ed##name }
+ static const FlagList tblCdXtraScroll[] =
+ {
+ DATA(Trim)
+ ,DATA_END
+ };
+#undef DATA
+
XtermWidget request = (XtermWidget) wrequest;
XtermWidget wnew = (XtermWidget) new_arg;
Widget my_parent = SHELL_OF(wnew);
@@ -9122,7 +9108,7 @@ VTInitialize(Widget wrequest,
Bool color_ok;
#endif
-#if OPT_ISO_COLORS && OPT_COLOR_RES2
+#if OPT_ISO_COLORS
static XtResource fake_resources[] =
{
#if OPT_256_COLORS
@@ -9131,7 +9117,8 @@ VTInitialize(Widget wrequest,
# include <88colres.h>
#endif
};
-#endif /* OPT_COLOR_RES2 */
+#endif
+
TScreen *screen = TScreenOf(wnew);
char *saveLocale = xtermSetLocale(LC_NUMERIC, "C");
#if OPT_BLINK_CURS
@@ -9441,6 +9428,7 @@ VTInitialize(Widget wrequest,
#if OPT_SCROLL_LOCK
init_Bres(screen.allowScrollLock0);
+ init_Bres(screen.autoScrollLock);
#endif
init_Sres(screen.disallowedColorOps);
@@ -9518,12 +9506,18 @@ VTInitialize(Widget wrequest,
init_Bres(misc.signalInhibit);
init_Bres(misc.titeInhibit);
- init_Bres(misc.tiXtraScroll);
- init_Bres(misc.cdXtraScroll);
init_Bres(misc.color_inner_border);
init_Bres(misc.dynamicColors);
init_Bres(misc.resizeByPixel);
+ init_Sres(misc.cdXtraScroll_s);
+ wnew->misc.cdXtraScroll =
+ extendedBoolean(request->misc.cdXtraScroll_s, tblCdXtraScroll, edLast);
+
+ init_Sres(misc.tiXtraScroll_s);
+ wnew->misc.tiXtraScroll =
+ extendedBoolean(request->misc.tiXtraScroll_s, tblCdXtraScroll, edLast);
+
#if OPT_DEC_CHRSET
for (i = 0; i < NUM_CHRSET; i++) {
screen->double_fonts[i].warn = fwResource;
@@ -9666,37 +9660,31 @@ VTInitialize(Widget wrequest,
init_Bres(screen.direct_color);
#endif
-#if OPT_COLOR_RES2
TRACE(("...will fake resources for color%d to color%d\n",
MIN_ANSI_COLORS,
NUM_ANSI_COLORS - 1));
-#endif
- for (i = 0, color_ok = False; i < MAXCOLORS; i++) {
-#if OPT_COLOR_RES2
+ for (i = 0, color_ok = False; i < MAXCOLORS; i++) {
/*
* Xt has a hardcoded limit on the maximum number of resources that can
- * be used in a widget. If we configure both luit (which implies
+ * be used in a widget. If we configured both luit (which implies
* wide-characters) and 256-colors, it goes over that limit. Most
* people would not need a resource-file with 256-colors; the default
- * values in our table are sufficient. In that case, fake the resource
- * setting by copying the default value from the table. The #define's
- * can be overridden to make these true resources.
+ * values in our table are sufficient. Fake the resource setting by
+ * copying the default value from the table. The #define's can be
+ * overridden to make these true resources.
*/
if (i >= MIN_ANSI_COLORS && i < NUM_ANSI_COLORS) {
screen->Acolors[i].resource =
x_strtrim(fake_resources[i - MIN_ANSI_COLORS].default_addr);
if (screen->Acolors[i].resource == 0)
screen->Acolors[i].resource = XtDefaultForeground;
- } else
-#endif /* OPT_COLOR_RES2 */
- {
+ } else {
screen->Acolors[i] = TScreenOf(request)->Acolors[i];
screen->Acolors[i].resource =
x_strtrim(screen->Acolors[i].resource);
}
-#if OPT_COLOR_RES
TRACE(("Acolors[%d] = %s\n", i, screen->Acolors[i].resource));
screen->Acolors[i].mode = False;
if (DftFg(Acolors[i])) {
@@ -9708,13 +9696,6 @@ VTInitialize(Widget wrequest,
} else {
color_ok = True;
}
-#else
- TRACE(("Acolors[%d] = %#lx\n", i, TScreenOf(request)->Acolors[i]));
- if (screen->Acolors[i] != wnew->dft_foreground &&
- screen->Acolors[i] != T_COLOR(screen, TEXT_FG) &&
- screen->Acolors[i] != T_COLOR(screen, TEXT_BG))
- color_ok = True;
-#endif
}
/*
@@ -9783,7 +9764,6 @@ VTInitialize(Widget wrequest,
init_Mres(screen.hilite_color);
if (screen->hilite_color == Maybe) {
screen->hilite_color = False;
-#if OPT_COLOR_RES
/*
* If the highlight text/background are both set, and if they are
* not equal to either the text/background or background/text, then
@@ -9798,7 +9778,6 @@ VTInitialize(Widget wrequest,
TRACE(("...setting hilite_color automatically\n"));
screen->hilite_color = True;
}
-#endif
}
#endif
@@ -9837,6 +9816,8 @@ VTInitialize(Widget wrequest,
wnew->work.render_font = erTrue;
TRACE(("initially using TrueType font\n"));
}
+ } else if (wnew->work.render_font == erDefaultOff) {
+ wnew->work.render_font = erFalse;
}
/* minor tweak to make debug traces consistent: */
if (wnew->work.render_font) {
@@ -10316,6 +10297,7 @@ cleanupInputMethod(XtermWidget xw)
static void
freeVTwin(Display *dpy, const char *whichWin, VTwin *win)
{
+ (void) whichWin;
TRACE_FREE_GC(whichWin, win->filler_gc);
TRACE_FREE_GC(whichWin, win->border_gc);
TRACE_FREE_GC(whichWin, win->marker_gc[0]);
@@ -10338,11 +10320,11 @@ VTDestroy(Widget w GCC_UNUSED)
XtUninstallTranslations(screen->scrollWidget);
XtDestroyWidget(screen->scrollWidget);
}
-#if OPT_FIFO_LINES
+
while (screen->saved_fifo > 0) {
deleteScrollback(screen);
}
-#endif
+
while (screen->save_title != 0) {
SaveTitle *last = screen->save_title;
screen->save_title = last->next;
@@ -10362,7 +10344,6 @@ VTDestroy(Widget w GCC_UNUSED)
TRACE_FREE_LEAK(xw->saved_colors.palettes[n]);
}
#endif
-#if OPT_COLOR_RES
for (n = 0; n < NCOLORS; n++) {
switch (n) {
#if OPT_TEK4014
@@ -10378,7 +10359,6 @@ VTDestroy(Widget w GCC_UNUSED)
break;
}
}
-#endif
FreeMarkGCs(xw);
TRACE_FREE_LEAK(screen->unparse_bfr);
TRACE_FREE_LEAK(screen->save_ptr);
@@ -12534,6 +12514,7 @@ ReallyReset(XtermWidget xw, Bool full, Bool saved)
/* make cursor visible */
screen->cursor_set = ON;
InitCursorShape(screen, screen);
+ xtermSetCursorBox(screen);
#if OPT_BLINK_CURS
SetCursorBlink(xw, screen->cursor_blink_i);
screen->cursor_blink_esc = 0;
diff --git a/app/xterm/configure.in b/app/xterm/configure.in
index 57541fdd3..c468c45b8 100644
--- a/app/xterm/configure.in
+++ b/app/xterm/configure.in
@@ -1,4 +1,4 @@
-dnl $XTermId: configure.in,v 1.379 2021/03/21 16:48:26 tom Exp $
+dnl $XTermId: configure.in,v 1.380 2021/08/22 19:49:13 tom Exp $
dnl
dnl -----------------------------------------------------------------------------
dnl this file is part of xterm
@@ -714,8 +714,8 @@ CF_ARG_DISABLE(fifo-lines,
[enable_fifo_lines=no],
[enable_fifo_lines=yes])
AC_MSG_RESULT($enable_fifo_lines)
-if test "$enable_fifo_lines" = yes ; then
- AC_DEFINE(OPT_FIFO_LINES,1,[Define to 1 to disable FIFO-storage for saved-lines])
+if test "$enable_fifo_lines" != yes ; then
+ AC_MSG_WARN(this option has been deprecated)
fi
AC_MSG_CHECKING(if you want support for internationalization)
diff --git a/app/xterm/ctlseqs.ms b/app/xterm/ctlseqs.ms
index 25e58e5e1..5af46fac0 100644
--- a/app/xterm/ctlseqs.ms
+++ b/app/xterm/ctlseqs.ms
@@ -1,6 +1,6 @@
.\"#! troff -ms $1 -*- Nroff -*-
.\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.612 2021/03/24 00:41:44 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.633 2021/09/11 23:17:26 tom Exp $
.\"
.\"
.\" Copyright 1996-2020,2021 by Thomas E. Dickey
@@ -69,8 +69,8 @@
.\"
.ds XT XTerm
.ds xt xterm
-.ds LF Patch #367
-.ds RF 2021/03/23
+.ds LF Patch #369
+.ds RF 2021/09/11
.\"
.if n .pl 9999v \" no page breaks in nroff
.ND
@@ -373,7 +373,7 @@ Individual values for the parameters are listed with \*(Ps .
.IP \*(Pt
A text parameter composed of printable characters.
.
-.Sh "Control Bytes, Characters, and Sequences"
+.Ss "Control Bytes, Characters, and Sequences"
.LP
ECMA-48 (aka \*(``ISO 6429\*('') documents C1 (8-bit) and C0 (7-bit) codes.
Those are respectively codes 128 to 159 and 0 to 31.
@@ -453,7 +453,7 @@ string mode if it decodes a common control character such as carriage return
before the string terminator.
.RE
.
-.Sh "C1 (8-Bit) Control Characters"
+.Ss "C1 (8-Bit) Control Characters"
.LP
The \fI\*(xt\fP program recognizes both 8-bit and 7-bit control characters.
It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled.
@@ -514,7 +514,7 @@ Application Program Command (\*(AP is 0x9f).
.LP
These control characters are used in the vtXXX emulation.
.
-.Sh "VT100 Mode"
+.Ss "VT100-related terminals"
.LP
In this document, \*(``VT100\*('' refers not only to VT100/VT102,
but also to the succession of upward-compatible terminals produced
@@ -535,7 +535,7 @@ since the only way X provides for this will affect all windows.
.LP
There are additional control sequences to provide
\fI\*(xt-\fPdependent functions, such as the scrollbar or window size.
-Where the function is specified by DEC or ECMA-48, the code assigned
+Where the function is specified by DEC or ECMA-48, the mnemonic assigned
to it is given in parentheses.
.LP
The escape codes to designate and invoke
@@ -545,6 +545,7 @@ discussion of character sets).
Many of the features are optional;
\fI\*(xt\fP can be configured and built without support for them.
.
+.Sh "VT100 Mode"
.Ss Single-character functions
.St
.IP \\*(Be
@@ -1320,7 +1321,7 @@ This may be disabled by the \fBtiteInhibit\fP resource.
\*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM), VT340, VT420.
This sets the \fBbackarrowKey\fP resource to \*(``true\*(''.
\*(Ps = \*6\*9 \(-> Enable left and right margin mode (DECLRMM), VT420 and up.
- \*(Ps = \*8\*0 \(-> Enable \fISixel Scrolling\fP (DECSDM).
+ \*(Ps = \*8\*0 \(-> Disable \fISixel Scrolling\fP (DECSDM).
\*(Ps = \*9\*5 \(-> Do not clear screen when DECCOLM is set/reset
(DECNCSM), VT510 and up.
\*(Ps = \*1\*0\*0\*0 \(-> Send Mouse X & Y on button press and release.
@@ -1455,7 +1456,7 @@ This is normally disabled by a compile-time option.
This sets the \fBbackarrowKey\fP resource to \*(``false\*(''.
\*(Ps = \*6\*9 \(-> Disable left and right margin mode (DECLRMM),
VT420 and up.
- \*(Ps = \*8\*0 \(-> Disable \fISixel Scrolling\fP (DECSDM).
+ \*(Ps = \*8\*0 \(-> Enable \fISixel Scrolling\fP (DECSDM).
\*(Ps = \*9\*5 \(-> Clear screen when DECCOLM is set/reset (DECNCSM),
VT510 and up.
\*(Ps = \*1\*0\*0\*0 \(-> Don't send Mouse X & Y on button press and
@@ -1947,6 +1948,11 @@ Set Scrolling Region [top;bottom] (default = full size of window)
Restore DEC Private Mode Values (XTRESTORE), \*(xt.
The value of \*(Ps previously saved is restored.
\*(Ps values are the same as for DECSET.
+.iP
+Like Restore Cursor (DECRC), this uses a one-level cache.
+Unlike Restore Cursor,
+specific settings can be saved and restored independently.
+Only those modes listed as parameters are restored.
.
.iP
.IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*;\\*(Ps\\*s\\*$\\*r
@@ -1983,6 +1989,11 @@ which is \*0.
.IP \\*(Cs\\*?\\*(Pm\\*s\\*(cs
Save DEC Private Mode Values (XTSAVE), \*(xt.
\*(Ps values are the same as for DECSET.
+.iP
+Like Save Cursor (DECSC), this uses a one-level cache.
+Unlike Save Cursor,
+specific settings can be saved and restored independently.
+Only those modes listed as parameters are saved.
.
.iP
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*t
@@ -2395,7 +2406,8 @@ Since XFree86-3.1.2Ee (August 1996), \*(xt has accepted \*(ST
\*(``\fIprop\fP\*('' to delete the property.
\*(Ps = \*4\*;\fIc\fP\*s\*;\fIspec\fP \(-> Change Color Number \fIc\fP to
the color specified by \fIspec\fP.
-This can be a name or RGB specification as per \fIXParseColor\fP.
+.sP
+The \fIspec\fP can be a name or RGB specification as per \fIXParseColor\fP.
Any number of \fIc\fP/\fIspec\fP pairs may be given.
The color numbers correspond to the ANSI colors 0-7,
their bright versions 8-15,
@@ -2409,9 +2421,12 @@ be given in one control sequence, \fI\*(xt\fR can make more than one reply.
.sP
\*(Ps = \*5\*;\fIc\fP\*s\*;\fIspec\fP \(-> Change Special Color Number \fIc\fP to
the color specified by \fIspec\fP.
-This can be a name or RGB specification as per \fIXParseColor\fP.
+.sP
+The \fIspec\fP parameter can be a name or RGB specification
+as per \fIXParseColor\fP.
Any number of \fIc\fP/\fIspec\fP pairs may be given.
The special colors can also be set by adding the maximum number of colors
+(e.g., 88 or 256)
to these codes in an \*(Os\*4 control:
.sP
.in +2n
@@ -2427,6 +2442,8 @@ The second parameter tells \fI\*(xt\fP to enable the corresponding color
mode if nonzero, disable it if zero.
\*(Os\*6 is the same as \*(Os\*1\*0\*6.
.sP
+If no parameters are given, this control has no effect.
+.sP
The 10 colors (below) which may be set or queried
using \*1\*0 through \*1\*9 are
denoted \fIdynamic colors\fR, since the corresponding control sequences
@@ -2488,7 +2505,7 @@ These controls may be disabled using the \fBallowWindowOps\fP resource.
The parameter \*(Pt is parsed as
.br
\*(Pc\*s\*;\*(Pd
-.br
+.sP
The first, \*(Pc, may contain zero or more characters from the
set \*c, \*p, \*q, \*(cs, \*0, \*1, \*2, \*3, \*4, \*5, \*6, and \*7.
It is used to construct a list of selection parameters for
@@ -2496,10 +2513,10 @@ clipboard,
primary,
secondary,
select,
-or cut buffers 0 through 7 respectively,
+or cut-buffers 0 through 7 respectively,
in the order given.
If the parameter is empty, \fI\*(xt\fP uses \*(cs\*0,
-to specify the configurable primary/clipboard selection and cut buffer 0.
+to specify the configurable primary/clipboard selection and cut-buffer 0.
.sP
The second parameter, \*(Pd, gives the selection data.
Normally this is a string encoded in base64 (RFC-4648).
@@ -2531,6 +2548,8 @@ These parameters correspond to the special colors which can be set
using an \*(Os\*5 control (or by adding the maximum number of colors
using an \*(Os\*4 control).
.sP
+If no parameters are given, all special colors will be reset.
+.sP
\*(Ps = \*1\*0\*6\*;\fIc\fP\*s\*;\fIf\fP \(-> Enable/disable Special Color Number \fIc\fP.
The second parameter tells \fI\*(xt\fP to enable the corresponding color
mode if nonzero, disable it if zero.
@@ -2544,6 +2563,8 @@ mode if nonzero, disable it if zero.
\*(Pc = \*5 \(<- resource \fBcolorAttrMode\fP (Override ANSI).
.in -2n
.sP
+If no parameters are given, this control has no effect.
+.sP
The \fIdynamic colors\fR can also be reset to their default (resource) values:
\*(Ps = \*1\*1\*0 \(-> Reset VT100 text foreground color.
\*(Ps = \*1\*1\*1 \(-> Reset VT100 text background color.
@@ -2576,7 +2597,32 @@ Sun shelltool, CDE dtterm.
\*(Pt need not be printable characters.
.Ed
.
-.Sh "Alt and Meta Keys"
+.Sh "Special Keyboard Keys"
+.LP
+Terminal keyboards have two types of keys:
+.bP
+ordinary keys, which you would use as data,
+e.g., in a text file, and
+.bP
+special keys, which you would use to tell \fI\*(xt\fP to perform some action.
+.LP
+\fI\*(XT\fP detects all of these keys via X key-press and key-release events.
+It uses the \fBtranslations\fP resource to decide what to do with these events.
+.bP
+Ordinary keys are handled with the
+\fBinsert-seven-bit\fP or
+\fBinsert-eight-bit\fP action.
+.bP
+Special keys may be handled with other resources.
+However, \fI\*(xt\fP also has built-in logic to map commonly-used
+special keys into characters which your keypress sends to the application
+running in \fI\*(xt\fP.
+.LP
+Special keyboard keys send control characters or escape sequences.
+This is a convention,
+making it convenient for applications to detect these keys,
+rather than a standard.
+.Ss "Alt and Meta Keys"
.LP
Many keyboards have keys labeled \*(``Alt\*(''.
Few have keys labeled \*(``Meta\*(''.
@@ -2654,7 +2700,6 @@ This assumes \fBaltIsNotMeta\fP is set:
.TS H
center;
lf3w(2c) lf3w(2c) lf3w(2c) lf3w(2c) .
-_
.TH
.T&
l | l | l | l .
@@ -2678,7 +2723,7 @@ Alt-x ON ON \*(Es x
Alt+Meta-x ON ON \*(Es x
_
.TE
-.Sh "PC-Style Function Keys"
+.Ss "PC-Style Function Keys"
.LP
If \fI\*(xt\fP does minimal translation of the function keys,
it usually does this
@@ -2884,7 +2929,7 @@ is not readily apparent, and
.bP
the scheme is not extensible, i.e., it is an \fIad hoc\fP
assignment limited to two modifiers (\fIshift\fP and \fIcontrol\fP).
-.Sh "VT220-Style Function Keys"
+.Ss "VT220-Style Function Keys"
.LP
However, \fI\*(xt\fP is most useful as a DEC VT102 or VT220 emulator.
Set the \fBsunKeyboard\fP resource to true to force a Sun/PC keyboard
@@ -2985,7 +3030,7 @@ F19 \*(Cs\*3\*3\*~
F20 \*(Cs\*3\*4\*~
_
.TE
-.Sh "VT52-Style Function Keys"
+.Ss "VT52-Style Function Keys"
.LP
A VT52 does not have function keys,
but it does have a numeric keypad and cursor keys.
@@ -3040,7 +3085,7 @@ PF4 \*(Es\*S \*(Es\*S no
= (equal) \*= \*(Es\*?\*(XX no
_
.TE
-.Sh "Sun-Style Function Keys"
+.Ss "Sun-Style Function Keys"
.LP
The \fI\*(xt\fP program provides support for Sun keyboards more directly, by
a menu toggle that causes it to send Sun-style function key codes
@@ -3052,10 +3097,50 @@ For example, their wrap-margin behavior differs.
Only function keys are altered; keypad and cursor keys are the same.
The emulation responds identically.
See the xterm-sun terminfo entry for details.
-.Sh "HP-Style Function Keys"
+.Ss "HP-Style Function Keys"
.LP
Similarly, \fI\*(xt\fP can be compiled to support HP keyboards.
See the xterm-hp terminfo entry for details.
+.Ss "Non-Function Keys"
+.LP
+On a DEC terminal keyboard, some of the keys which one would expect
+to see labeled as function keys had special names.
+The keys actually send character sequences as if they were the
+expected function keys, but the special names are used in documentation.
+Because other keyboards may use those names,
+\fI\*(xt\fP maps the X key symbols which have the corresponding names
+into the character sequences which the original DEC keyboard would send.
+.LP
+These mappings are used for the DEC (VT220) and other keyboards:
+.TS H
+center;
+lf3w(2c) lf3w(2c) lf3w(2c) lf3w(2c) lf3w(2c) .
+Label DEC SUN HP SCO
+_
+.TH
+.T&
+l | l | l | l | l .
+Up \*(S3\*A \*(S3\*A \*(Es\*A \*(Cs\*A
+Down \*(S3\*(cB \*(S3\*(cB \*(Es\*(cB \*(Cs\*(cB
+Right \*(S3\*C \*(S3\*C \*(Es\*C \*(Cs\*C
+Left \*(S3\*D \*(S3\*D \*(Es\*D \*(Cs\*D
+Clear - - \*(Es\*J -
+Find \*(Cs\*1\*~ \*(Cs\*1\*z \*(Es\*h -
+Insert \*(Cs\*2\*~ \*(Cs\*2\*z \*(Es\*Q \*(Cs\*L
+Delete \*(Cs\*3\*~ \*(Cs\*3\*z \*(Es\*P -
+Keypad Insert \*(Cs\*2\*~ \*(Cs\*2\*z \*(Es\*Q \*(Cs\*L
+Keypad Delete \*(Cs\*3\*~ \*(Cs\*3\*z \*(Es\*P -
+Remove \*(Cs\*3\*~ \*(Cs\*3\*z \*(Es\*P -
+Select \*(Cs\*4\*~ \*(Cs\*4\*z \*(Es\*F -
+Prior \*(Cs\*5\*~ \*(Cs\*2\*1\*6\*z \*(Es\*T \*(Cs\*I
+Next \*(Cs\*6\*~ \*(Cs\*2\*2\*2\*z \*(Es\*S \*(Cs\*G
+Help \*(Cs\*2\*8\*~ \*(Cs\*1\*9\*6\*z - -
+Menu \*(Cs\*2\*9\*~ \*(Cs\*1\*9\*7\*z - -
+Home - \*(Cs\*2\*1\*4\*z \*(Es\*h \*(Cs\*H
+End - \*(Cs\*2\*2\*0\*z \*(Es\*F \*(Cs\*F
+Begin - \*(Cs\*2\*1\*8\*z - \*(Cs\*E
+_
+.TE
.Sh "The Alternate Screen Buffer"
.LP
\fI\*(XT\fP maintains two screen buffers.
@@ -3268,8 +3353,8 @@ Release events for the wheel buttons are not reported.
.LP
By default,
the wheel mouse events (buttons 4 and 5)
-are translated to \fIscroll-back\fP
-and \fIscroll-forw\fP actions, respectively.
+are translated to \fBscroll-back\fP
+and \fBscroll-forw\fP actions, respectively.
Those actions normally scroll the whole window,
as if the scrollbar was used.
.LP
@@ -3467,7 +3552,8 @@ it is not an improvement over 1006.
Use the same mouse response format as the 1006 control,
but report position in \fIpixels\fP rather than character \fIcells\fP.
.
-.Sh "Sixel Graphics"
+.Sh "Graphics"
+.Ss "Sixel Graphics"
.LP
If \fI\*(xt\fP is configured as
VT240,
@@ -3512,7 +3598,7 @@ following the \*q with sixel data.
\*(Ps \(-> sixel data
.Ed
.
-.Sh "ReGIS Graphics"
+.Ss "ReGIS Graphics"
.LP
If \fI\*(xt\fP is configured as
VT125,
@@ -3554,7 +3640,8 @@ with four possible values:
\*(Pm = 3 \(-> start new command, use command display mode.
.Ed
.
-.Sh "Tektronix 4014 Mode"
+.Sh "Non-VT100 Modes"
+.Ss "Tektronix 4014 Mode"
.LP
Most of these sequences are standard Tektronix 4014 control sequences.
Graph mode supports the 12-bit addressing of the Tektronix 4014.
@@ -3704,7 +3791,7 @@ Alpha Mode (Ctrl-_).
.Ed
.
.
-.Sh "VT52 Mode"
+.Ss "VT52 Mode"
.LP
Parameters for cursor movement are at the end of the \*(Es\*Y escape sequence.
Each ordinate is encoded in a single character as \fIvalue\fP+32.
@@ -3816,7 +3903,7 @@ EK-VT420-RM-002,
EK-VT520-RM A01,
EK-VT100-TM-003, and
EK-VT102-UG-003.
-The remaining documents were found on the bitsavers site.
+In addition, several documents were found on the bitsavers site.
.bP
.\" http://www.bitsavers.org/pdf/dec/terminal/vt52/EK-VT5X-OP-001_DECscope_Users_Manual_Mar77.pdf
\fIDECscope User's Manual\fP.
@@ -3868,7 +3955,7 @@ Digital Equipment Corporation
Digital Equipment Corporation
(EK-VT3XX-TP-001, March 1987).
.bP
-.\" https://vt100.net/docs/vt3xx-gp/
+.\" http://www.bitsavers.org/pdf/dec/terminal/vt340/EK-VT3XX-GP-001_VT330_VT340_Graphics_Programming_Mar87.pdf
\fIVT330/VT340 Programmer Reference Manual\fP
.br
\fIVolume 2: Graphics Programming\fP.
@@ -3876,6 +3963,30 @@ Digital Equipment Corporation
Digital Equipment Corporation
(EK-VT3XX-GP-001, March 1987).
.bP
+.\" https://vt100.net/docs/vt3xx-gp/
+\fIVT330/VT340 Programmer Reference Manual\fP
+.br
+\fIVolume 2: Graphics Programming\fP.
+.br
+Digital Equipment Corporation
+(EK-VT3XX-GP-002, May 1988).
+.bP
+.\" https://vt100.net/dec/ek-vt382-rm-001.pdf
+\fIVT382 Kanji Display Terminal\fP
+.br
+\fIProgrammer Reference Manual\fP.
+.br
+Digital Equipment Corporation
+(EK-VT382-RM-001).
+.bP
+.\" https://vt100.net/dec/ek-vt38t-ug-001.pdf
+\fIVT382 Thai Display Terminal\fP
+.br
+\fIInstalling and Using Manual\fP.
+.br
+Digital Equipment Corporation
+(EK-VT38T-UG-001, August 1989).
+.bP
.\" http://www.bitsavers.org/pdf/dec/terminal/vt420/EK-VT420-UG-001_Installing_and_Using_The_VT420_Video_Terminal_Nov89.pdf
\fIInstalling and Using\fP
.br
@@ -3916,6 +4027,15 @@ Digital Equipment Corporation
Digital Equipment Corporation
(EK-PPLV2-PM B01, August 1994).
.bP
+.\" http://www.bitsavers.org/pdf/ibm/pc/dos/6936752_DOS_2.00_Jan83.pdf
+\fIDisk Operating System\fP
+.br
+DOS 2.00
+.br
+Microsoft, Inc.
+.br
+First edition, January 1983.
+.bP
.\" https://vt100.net/manx/details/5,5479
\fI4014 and 4014-1 Computer Display Terminal\fP
.br
@@ -3929,6 +4049,28 @@ The DEC terminal family (VT100 through VT525) is upward-compatible,
using standards plus \fIextensions\fP, e.g., \*(``private modes\*(''.
Not all commonly-used features are standard.
For example, scrolling regions are not found in ECMA-48.
+On the other hand, ECMA-48 was not intended to all-encompassing.
+Quoting from the second edition:
+.in +4n
+.sp
+.ft C
+Full conformance to a standard means that all its requirements are met.
+For such conformance to be unique the standard must contain no options.
+This is typically the case for hardware standards, for instance Standard
+ECMA-10 for data interchange on punched tapes.
+.sp
+This Standard ECMA-48 is of a different nature and as a result,
+it is only practicable to envisage limited conformance to it,
+as defined hereunder.
+.sp
+This Standard addresses a whole class of devices which can vary greatly
+from each other depending on the application for which a device has
+been specifically designed. Obviously, a
+product which implements all facilities described in this standard \[en]
+thus being in \*(``full conformance\*('' with it \[en] whilst theoretically
+possible, would be technically and economically unthinkable.
+.ft R
+.in -4n
.LP
Again, it is possible to find discrepancies in the standards:
.bP
@@ -3943,14 +4085,104 @@ but the documentation and dates are lacking).
ECMA created a new PDF in April 2003 which changed that detail to use \*T,
and later in 2008 provided PDFs of the earlier editions which used \*T.
.bP
+The first edition of ECMA-48 has not been available, to compare.
+As of September 2021,
+ECMA's website provides a copy of ECMA-\fB46\fP in its place.
+.IP
+Earlier versions of ISO 6429 have never been available.
+The first three editions of ISO 6429 were issued in 1983, 1988, and 1992.
+.bP
+\fIANSI X3.64-1979\fP
+does not list color as a feature of the SGR sequence (page 49).
+.IP
+In Appendix A, it mentions ECMA-48:
+.in +4n
+.ft C
+.sp
+(8) This document represents a coordinated effort to develop a single technical
+standard in the United States and Europe (see ECMA-48 standard entitled
+\fIAdditional Controls for Character Imaging Input/Output Devices\fP).
+.in -4n
+.IP
+.ft R
+Appendix H clarifies the relationship between these documents somewhat
+though it confuses the first two editions of ECMA-48.
+The typo for \*(``work\*('' versus \*(``owkr\*(''
+appears in the original document:
+.in +4n
+.hy 0
+.sp
+.ft C
+ANSI X3.64-1979, and ECMA-48,
+\fIAdditional Controls for Character-Imaging I/O Devices\fP,
+were developed in parallel, with close liaison.
+ISO DP 6429, Additional Control Functions for Character-Imaging
+Devices, was developed as a synthesis of X3.04 and ECMA-48.
+During this process,
+some control functions as well as additional selective parameters were added.
+Except for point 1 below, X3.64 is a subset of ISO 6429.
+Although the two standards use different language,
+the intent is that the subset is technically identical.
+X3.64 was balloted and forwarded prior to the final resolution of ISO 6429
+and does not incorporate the \fIowkr\fP of IS0/TC97/SC2 in completing ISO 6429.
+Revision of X3.64 will attempt to incorporate those elements
+and assumptions of X3.64.
+.in -4n
+.ft R
+.IP
+ANSI X3.64 goes on to say that the SGR codes 8, 30-47 are in ISO 6429.
+It includes 38 and 39, but omits 48 and 49.
+At the time, ISO 6429's first edition was still four years in the future.
+The writer probably was referring to the ongoing process of making
+ECMA-48 second edition into the ISO standard.
+.bP
The VT320, VT420, VT520 manuals claim that DECSCL does a
hard reset (RIS).
.IP
Both the VT220 manual and DEC STD 070 (which documents
levels 1-4 in detail) state that it is a soft reset, e.g., DECSTR.
+.bP
+The VT330/VT340 reference manual for graphics programming
+documents sixel scrolling in some detail in chapter 14.
+The VT382 Kanji and Thai manuals provide less information,
+but differ in their comment about the private mode
+DECSDM (\*(Cs\*?\*8\*0\*h),
+which each manual agrees should \fIset\fP the Sixel Scrolling feature.
+However, the VT330/VT340 manual says
+.RS
+.IP
+When sixel display mode is set, the Sixel Scrolling feature is enabled.
+.RE
+.IP
+while the VT382 Kanji manual (page 6-6) says
+.RS
+.IP
+Disable sixel scroll
+.RE
+.IP
+and the VT382 Thai manual (page C-30) says
+.RS
+.IP
+No Sixel scrolling
+.RE
+.IP
+The standard (DEC STD 070) in chapter 9 (August 3, 1990)
+states on page 17 that video devices will scroll
+when advancing the Sixel active position past the bottom margin,
+but on page 19, in the section on deviations,
+states that VT125 and VT240 did not scroll in this situation.
+The standard does not mention VT330/VT340 or VT382.
+Nor does it document DECSDM.
.LP
Here are the relevant standards:
.bP
+.\" https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub86.pdf
+\fIAdditional Controls for Use with American National Standard Code for Information Interchange, ANSI X3.64-1979\fP
+.br
+FIPS Publication 86. July 18, 1979.
+.br
+American National Standards Institute, Inc.
+.bP
.\" https://www.ecma-international.org/publications/standards/Ecma-035.htm
\fIECMA-35: Character Code Structure and Extension Techniques\fP
.br
@@ -4024,7 +4256,7 @@ and added a few new ones.
.TS
l l l l l
_ _ _ _ _
-l c c c l.
+l | c | c | c | l.
\fBCode\fR \fBSun\fR \fBCDE \*(XT Description\fP
\*(Cs\*1\*t yes yes yes de-iconify
\*(Cs\*2\*t yes yes yes iconify
@@ -4057,6 +4289,7 @@ l c c c l.
\*(Os\*I\*(ST yes yes yes set icon to file
\*(Os\*l\*(ST yes yes yes set window title
\*(Os\*L\*(ST yes yes yes set icon label
+_
.TE
.br
Besides the Sun-derived OSC controls for setting window title and icon label,
@@ -4066,18 +4299,20 @@ The \fICDE\fP source was unavailable for inspection until 2012,
so that clarification of the details of the window operations
relied upon \fIvttest\fP.
.bP
-The control sequences for saving/restoring the cursor and
-for saving/restoring \*(``DEC Private Mode Values\*('' may appear to be
+The SCOSC/SCORC control sequences for saving/restoring the cursor and
+for saving/restoring \*(``DEC Private Mode Values\*(''
+(XTSAVE and XTRESTORE)
+may appear to be
related (since the \*(``save\*('' controls both end with \*(cs),
but that is coincidental.
-The latter was introduced in X10.4:
+The latter was introduced in X10.4 (December 1986):
.iP
.RS
.ft C
.na
-Most Dec Private mode settings can be saved away internally using \\E[?ns,
-where n is the same number to set or reset the Dec Private mode. The
-mode can be restored using \\E[?nr. This can be used in termcap for vi, for
+Most Dec Private mode settings can be saved away internally using \\E[?\fIn\fPs,
+where \fIn\fP is the same number to set or reset the Dec Private mode. The
+mode can be restored using \\E[?\fIn\fPr. This can be used in termcap for \fBvi\fP, for
example, to turn off saving of lines, but restore whatever the original
state was on exit.
.ad
@@ -4086,6 +4321,47 @@ state was on exit.
.IP
while the SCOSC/SCORC pair was added in 1995 by XFree86
(and documented long afterwards).
+.IP
+The SCO \fIANSI\fP console terminal descriptions did not use these controls
+(they used the VT100-compatible SC/RC pair).
+SCOSC/SCORC were an artifact of DOS 2.00 (January 1983),
+by Microsoft and later supported by SCO and other vendors.
+.IP
+The SCOSC/SCORC pair is considered a \fIprivate mode\fP because the final
+characters (\*(cs and \*u) fall in the range from \*(``\`\*('' to \*(``~\*(''
+(octal 0140 to octal 0176).
+Other \fIprivate\fP control sequences can be constructed by using
+octets 074 to 077 (characters
+\*(``<\*('',
+\*(``=\*('',
+\*(``>\*('', or
+\*(``?\*('') at the beginning of the parameter string.
+The XTSAVE and XTRESTORE controls use \*(``?\*('') in this manner.
+.IP
+Because the XTSAVE and XTRESTORE controls are private,
+other terminals may behave differently.
+For example, DEC (a contributor to the early \fI\*(xt\fP as well as
+a manufacturer of terminals) used an incompatible
+private control in one of its terminals more than five years later
+(for the VT420 PCTerm, announced in February 1992).
+.IP
+In that model of the VT420,
+\*(Cs\*?\*(Pm\*;\*(Pc\*s\*r
+selects the \fIPC TERM\fP emulation mode.
+When this mode is enabled, the keyboard sends \fIscan codes\fP
+rather than characters (analogous to X keyboard events).
+The first parameter of this private control
+enables or disables \fIPC TERM\fP mode,
+while the second selects a character set.
+An ambiguity arises if an application omits the second parameter.
+In that special case, it cannot be distinguished from XTRESTORE.
+DEC did not take this into account when designing the feature.
+.IP
+If there were potential users, \fI\*(xt\fP could accommodate this
+by a resource setting.
+In retrospect (thirty years later),
+there have been no uses of \fIPC TERM\fP,
+while the XTRESTORE feature is still in use.
.bP
The \fIaixterm\fP manual page gives the format of the control sequence
for foreground and background colors 8-15,
diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt
index 75a239b41..68939f5a4 100644
--- a/app/xterm/ctlseqs.txt
+++ b/app/xterm/ctlseqs.txt
@@ -21,7 +21,7 @@
Thomas Dickey
XFree86 Project (1996-2006)
invisible-island.net (2006-2021)
- updated for XTerm Patch #367 (2021/03/23)
+ updated for XTerm Patch #369 (2021/09/11)
@@ -178,7 +178,7 @@ ESC _
These control characters are used in the vtXXX emulation.
-VT100 Mode
+VT100-related terminals
In this document, "VT100" refers not only to VT100/VT102, but also to
the succession of upward-compatible terminals produced by DEC (Digital
@@ -197,7 +197,7 @@ provides for this will affect all windows.
There are additional control sequences to provide xterm-dependent
functions, such as the scrollbar or window size. Where the function is
-specified by DEC or ECMA-48, the code assigned to it is given in
+specified by DEC or ECMA-48, the mnemonic assigned to it is given in
parentheses.
The escape codes to designate and invoke character sets are specified by
@@ -207,6 +207,9 @@ Many of the features are optional; xterm can be configured and built
without support for them.
+VT100 Mode
+
+
Single-character functions
BEL Bell (BEL is Ctrl-G).
@@ -777,7 +780,7 @@ CSI ? Pm h
VT420. This sets the backarrowKey resource to "true".
Ps = 6 9 -> Enable left and right margin mode (DECLRMM),
VT420 and up.
- Ps = 8 0 -> Enable Sixel Scrolling (DECSDM).
+ Ps = 8 0 -> Disable Sixel Scrolling (DECSDM).
Ps = 9 5 -> Do not clear screen when DECCOLM is set/reset
(DECNCSM), VT510 and up.
Ps = 1 0 0 0 -> Send Mouse X & Y on button press and
@@ -906,7 +909,7 @@ CSI ? Pm l
VT420. This sets the backarrowKey resource to "false".
Ps = 6 9 -> Disable left and right margin mode (DECLRMM),
VT420 and up.
- Ps = 8 0 -> Disable Sixel Scrolling (DECSDM).
+ Ps = 8 0 -> Enable Sixel Scrolling (DECSDM).
Ps = 9 5 -> Clear screen when DECCOLM is set/reset
(DECNCSM), VT510 and up.
Ps = 1 0 0 0 -> Don't send Mouse X & Y on button press and
@@ -1325,6 +1328,11 @@ CSI ? Pm r
of Ps previously saved is restored. Ps values are the same as
for DECSET.
+ Like Restore Cursor (DECRC), this uses a one-level cache.
+ Unlike Restore Cursor, specific settings can be saved and
+ restored independently. Only those modes listed as parameters
+ are restored.
+
CSI Pt ; Pl ; Pb ; Pr ; Ps $ r
Change Attributes in Rectangular Area (DECCARA), VT400 and up.
Pt ; Pl ; Pb ; Pr denotes the rectangle.
@@ -1358,6 +1366,11 @@ CSI ? Pm s
Save DEC Private Mode Values (XTSAVE), xterm. Ps values are
the same as for DECSET.
+ Like Save Cursor (DECSC), this uses a one-level cache. Unlike
+ Save Cursor, specific settings can be saved and restored
+ independently. Only those modes listed as parameters are
+ saved.
+
CSI Ps ; Ps ; Ps t
Window manipulation (XTWINOPS), dtterm, extended by xterm.
These controls may be disabled using the allowWindowOps
@@ -1690,11 +1703,13 @@ OSC Ps ; Pt ST
in the form "prop=value", or just "prop" to delete the
property.
Ps = 4 ; c ; spec -> Change Color Number c to the color
- specified by spec. This can be a name or RGB specification as
- per XParseColor. Any number of c/spec pairs may be given.
- The color numbers correspond to the ANSI colors 0-7, their
- bright versions 8-15, and if supported, the remainder of the
- 88-color or 256-color table.
+ specified by spec.
+
+ The spec can be a name or RGB specification as per
+ XParseColor. Any number of c/spec pairs may be given. The
+ color numbers correspond to the ANSI colors 0-7, their bright
+ versions 8-15, and if supported, the remainder of the 88-color
+ or 256-color table.
If a "?" is given rather than a name or RGB specification,
xterm replies with a control sequence of the same form which
@@ -1703,11 +1718,12 @@ OSC Ps ; Pt ST
control sequence, xterm can make more than one reply.
Ps = 5 ; c ; spec -> Change Special Color Number c to the
- color specified by spec. This can be a name or RGB
- specification as per XParseColor. Any number of c/spec pairs
- may be given. The special colors can also be set by adding
- the maximum number of colors to these codes in an OSC 4
- control:
+ color specified by spec.
+
+ The spec parameter can be a name or RGB specification as per
+ XParseColor. Any number of c/spec pairs may be given. The
+ special colors can also be set by adding the maximum number of
+ colors (e.g., 88 or 256) to these codes in an OSC 4 control:
Pc = 0 <- resource colorBD (BOLD).
Pc = 1 <- resource colorUL (UNDERLINE).
@@ -1720,6 +1736,8 @@ OSC Ps ; Pt ST
color mode if nonzero, disable it if zero. OSC 6 is the same
as OSC 1 0 6 .
+ If no parameters are given, this control has no effect.
+
The 10 colors (below) which may be set or queried using 1 0
through 1 9 are denoted dynamic colors, since the
corresponding control sequences were the first means for
@@ -1780,13 +1798,14 @@ OSC Ps ; Pt ST
be disabled using the allowWindowOps resource. The parameter
Pt is parsed as
Pc ; Pd
+
The first, Pc, may contain zero or more characters from the
set c , p , q , s , 0 , 1 , 2 , 3 , 4 , 5 , 6 , and 7 . It is
used to construct a list of selection parameters for
- clipboard, primary, secondary, select, or cut buffers 0
+ clipboard, primary, secondary, select, or cut-buffers 0
through 7 respectively, in the order given. If the parameter
is empty, xterm uses s 0 , to specify the configurable
- primary/clipboard selection and cut buffer 0.
+ primary/clipboard selection and cut-buffer 0.
The second parameter, Pd, gives the selection data. Normally
this is a string encoded in base64 (RFC-4648). The data
@@ -1815,6 +1834,8 @@ OSC Ps ; Pt ST
5 control (or by adding the maximum number of colors using an
OSC 4 control).
+ If no parameters are given, all special colors will be reset.
+
Ps = 1 0 6 ; c ; f -> Enable/disable Special Color Number c.
The second parameter tells xterm to enable the corresponding
color mode if nonzero, disable it if zero.
@@ -1826,6 +1847,8 @@ OSC Ps ; Pt ST
Pc = 4 <- resource colorITMode (ITALIC).
Pc = 5 <- resource colorAttrMode (Override ANSI).
+ If no parameters are given, this control has no effect.
+
The dynamic colors can also be reset to their default
(resource) values:
Ps = 1 1 0 -> Reset VT100 text foreground color.
@@ -1854,6 +1877,33 @@ PM Pt ST xterm implements no PM functions; Pt is ignored. Pt need not
be printable characters.
+Special Keyboard Keys
+
+Terminal keyboards have two types of keys:
+
+o ordinary keys, which you would use as data, e.g., in a text file,
+ and
+
+o special keys, which you would use to tell xterm to perform some
+ action.
+
+XTerm detects all of these keys via X key-press and key-release events.
+It uses the translations resource to decide what to do with these
+events.
+
+o Ordinary keys are handled with the insert-seven-bit or insert-eight-
+ bit action.
+
+o Special keys may be handled with other resources. However, xterm
+ also has built-in logic to map commonly-used special keys into
+ characters which your keypress sends to the application running in
+ xterm.
+
+Special keyboard keys send control characters or escape sequences. This
+is a convention, making it convenient for applications to detect these
+keys, rather than a standard.
+
+
Alt and Meta Keys
Many keyboards have keys labeled "Alt". Few have keys labeled "Meta".
@@ -1909,7 +1959,6 @@ The table shows the result for a given character "x" with modifiers
according to the default translations with the resources set on or off.
This assumes altIsNotMeta is set:
- -----------------------------------------------------------
key altSendsEscape metaSendsEscape result
-----------+----------------+-----------------+------------
x | off | off | x
@@ -2242,6 +2291,43 @@ Similarly, xterm can be compiled to support HP keyboards. See the
xterm-hp terminfo entry for details.
+Non-Function Keys
+
+On a DEC terminal keyboard, some of the keys which one would expect to
+see labeled as function keys had special names. The keys actually send
+character sequences as if they were the expected function keys, but the
+special names are used in documentation. Because other keyboards may
+use those names, xterm maps the X key symbols which have the
+corresponding names into the character sequences which the original DEC
+keyboard would send.
+
+These mappings are used for the DEC (VT220) and other keyboards:
+
+ Label DEC SUN HP SCO
+ --------------+------------+--------------+----------+----------
+ Up | SS3 A | SS3 A | ESC A | CSI A
+ Down | SS3 B | SS3 B | ESC B | CSI B
+ Right | SS3 C | SS3 C | ESC C | CSI C
+ Left | SS3 D | SS3 D | ESC D | CSI D
+ Clear | - | - | ESC J | -
+ Find | CSI 1 ~ | CSI 1 z | ESC h | -
+ Insert | CSI 2 ~ | CSI 2 z | ESC Q | CSI L
+ Delete | CSI 3 ~ | CSI 3 z | ESC P | -
+ Keypad Insert | CSI 2 ~ | CSI 2 z | ESC Q | CSI L
+ Keypad Delete | CSI 3 ~ | CSI 3 z | ESC P | -
+ Remove | CSI 3 ~ | CSI 3 z | ESC P | -
+ Select | CSI 4 ~ | CSI 4 z | ESC F | -
+ Prior | CSI 5 ~ | CSI 2 1 6 z | ESC T | CSI I
+ Next | CSI 6 ~ | CSI 2 2 2 z | ESC S | CSI G
+ Help | CSI 2 8 ~ | CSI 1 9 6 z | - | -
+ Menu | CSI 2 9 ~ | CSI 1 9 7 z | - | -
+ Home | - | CSI 2 1 4 z | ESC h | CSI H
+ End | - | CSI 2 2 0 z | ESC F | CSI F
+ Begin | - | CSI 2 1 8 z | - | CSI E
+ --------------+------------+--------------+----------+----------
+
+
+
The Alternate Screen Buffer
XTerm maintains two screen buffers. The Normal Screen Buffer allows you
@@ -2607,6 +2693,9 @@ SGR-Pixels (1016)
report position in pixels rather than character cells.
+Graphics
+
+
Sixel Graphics
If xterm is configured as VT240, VT241, VT330, VT340 or VT382 using the
@@ -2675,6 +2764,9 @@ DCS Pm p Pr..Pr ST
Pm = 3 -> start new command, use command display mode.
+Non-VT100 Modes
+
+
Tektronix 4014 Mode
Most of these sequences are standard Tektronix 4014 control sequences.
@@ -2864,8 +2956,8 @@ the technical references were limited to EK-VT220-HR-002 and EK-
VT420-UG.002. Shortly after, Richard Shuford sent a copy of EK-VT3XX-
TP-001. Still later (beginning in 2003), Paul Williams' vt100.net site
provided EK-VT102-UG-003, EK-VT220-RM-002, EK-VT420-RM-002, EK-VT520-RM
-A01, EK-VT100-TM-003, and EK-VT102-UG-003. The remaining documents were
-found on the bitsavers site.
+A01, EK-VT100-TM-003, and EK-VT102-UG-003. In addition, several
+documents were found on the bitsavers site.
o DECscope User's Manual.
Digital Equipment Corporation (EK-VT5X-OP-001 1975).
@@ -2896,6 +2988,18 @@ o VT330/VT340 Programmer Reference Manual
Volume 2: Graphics Programming.
Digital Equipment Corporation (EK-VT3XX-GP-001, March 1987).
+o VT330/VT340 Programmer Reference Manual
+ Volume 2: Graphics Programming.
+ Digital Equipment Corporation (EK-VT3XX-GP-002, May 1988).
+
+o VT382 Kanji Display Terminal
+ Programmer Reference Manual.
+ Digital Equipment Corporation (EK-VT382-RM-001).
+
+o VT382 Thai Display Terminal
+ Installing and Using Manual.
+ Digital Equipment Corporation (EK-VT38T-UG-001, August 1989).
+
o Installing and Using
The VT420 Video Terminal
(North American Model).
@@ -2916,6 +3020,11 @@ o Digital ANSI-Compliant Printing Protocol
Level 2 Programming Reference Manual
Digital Equipment Corporation (EK-PPLV2-PM B01, August 1994).
+o Disk Operating System
+ DOS 2.00
+ Microsoft, Inc.
+ First edition, January 1983.
+
o 4014 and 4014-1 Computer Display Terminal
User's Manual.
Tektronix, Inc. (070-1647-00, November 1979).
@@ -2926,7 +3035,24 @@ Standards
The DEC terminal family (VT100 through VT525) is upward-compatible,
using standards plus extensions, e.g., "private modes". Not all
commonly-used features are standard. For example, scrolling regions are
-not found in ECMA-48.
+not found in ECMA-48. On the other hand, ECMA-48 was not intended to
+all-encompassing. Quoting from the second edition:
+
+ Full conformance to a standard means that all its requirements are
+ met. For such conformance to be unique the standard must contain no
+ options. This is typically the case for hardware standards, for
+ instance Standard ECMA-10 for data interchange on punched tapes.
+
+ This Standard ECMA-48 is of a different nature and as a result, it
+ is only practicable to envisage limited conformance to it, as
+ defined hereunder.
+
+ This Standard addresses a whole class of devices which can vary
+ greatly from each other depending on the application for which a
+ device has been specifically designed. Obviously, a product which
+ implements all facilities described in this standard - thus being in
+ "full conformance" with it - whilst theoretically possible, would be
+ technically and economically unthinkable.
Again, it is possible to find discrepancies in the standards:
@@ -2941,14 +3067,85 @@ o The printed ECMA-48 5th edition (1991) and the first PDF produced
use T , and later in 2008 provided PDFs of the earlier editions
which used T .
+o The first edition of ECMA-48 has not been available, to compare. As
+ of September 2021, ECMA's website provides a copy of ECMA-46 in its
+ place.
+
+ Earlier versions of ISO 6429 have never been available. The first
+ three editions of ISO 6429 were issued in 1983, 1988, and 1992.
+
+o ANSI X3.64-1979 does not list color as a feature of the SGR sequence
+ (page 49).
+
+ In Appendix A, it mentions ECMA-48:
+
+ (8) This document represents a coordinated effort to develop a
+ single technical standard in the United States and Europe (see
+ ECMA-48 standard entitled Additional Controls for Character
+ Imaging Input/Output Devices).
+
+ Appendix H clarifies the relationship between these documents
+ somewhat though it confuses the first two editions of ECMA-48. The
+ typo for "work" versus "owkr" appears in the original document:
+
+ ANSI X3.64-1979, and ECMA-48, Additional Controls for Character-
+ Imaging I/O Devices, were developed in parallel, with close
+ liaison. ISO DP 6429, Additional Control Functions for
+ Character-Imaging Devices, was developed as a synthesis of X3.04
+ and ECMA-48. During this process, some control functions as
+ well as additional selective parameters were added. Except for
+ point 1 below, X3.64 is a subset of ISO 6429. Although the two
+ standards use different language, the intent is that the subset
+ is technically identical. X3.64 was balloted and forwarded
+ prior to the final resolution of ISO 6429 and does not
+ incorporate the owkr of IS0/TC97/SC2 in completing ISO 6429.
+ Revision of X3.64 will attempt to incorporate those elements and
+ assumptions of X3.64.
+
+ ANSI X3.64 goes on to say that the SGR codes 8, 30-47 are in ISO
+ 6429. It includes 38 and 39, but omits 48 and 49. At the time, ISO
+ 6429's first edition was still four years in the future. The writer
+ probably was referring to the ongoing process of making ECMA-48
+ second edition into the ISO standard.
+
o The VT320, VT420, VT520 manuals claim that DECSCL does a hard reset
(RIS).
Both the VT220 manual and DEC STD 070 (which documents levels 1-4 in
detail) state that it is a soft reset, e.g., DECSTR.
+o The VT330/VT340 reference manual for graphics programming documents
+ sixel scrolling in some detail in chapter 14. The VT382 Kanji and
+ Thai manuals provide less information, but differ in their comment
+ about the private mode DECSDM (CSI ? 8 0 h ), which each manual
+ agrees should set the Sixel Scrolling feature. However, the
+ VT330/VT340 manual says
+
+ When sixel display mode is set, the Sixel Scrolling
+ feature is enabled.
+
+ while the VT382 Kanji manual (page 6-6) says
+
+ Disable sixel scroll
+
+ and the VT382 Thai manual (page C-30) says
+
+ No Sixel scrolling
+
+ The standard (DEC STD 070) in chapter 9 (August 3, 1990) states on
+ page 17 that video devices will scroll when advancing the Sixel
+ active position past the bottom margin, but on page 19, in the
+ section on deviations, states that VT125 and VT240 did not scroll in
+ this situation. The standard does not mention VT330/VT340 or VT382.
+ Nor does it document DECSDM.
+
Here are the relevant standards:
+o Additional Controls for Use with American National Standard Code for
+ Information Interchange, ANSI X3.64-1979
+ FIPS Publication 86. July 18, 1979.
+ American National Standards Institute, Inc.
+
o ECMA-35: Character Code Structure and Extension Techniques
(6th Edition, December 1994).
@@ -3005,38 +3202,39 @@ o XTerm supports control sequences for manipulating its window which
those, and added a few new ones.
Code Sun CDE XTerm Description
- -----------------------------------------------------------------
- CSI 1 t yes yes yes de-iconify
- CSI 2 t yes yes yes iconify
- CSI 3 t yes yes yes move window to pixel-position
- CSI 4 t yes yes yes resize window in pixels
- CSI 5 t yes yes yes raise window to front of stack
- CSI 6 t yes yes yes raise window to back of stack
- CSI 7 t yes yes yes refresh window
- CSI 8 t yes yes yes resize window in chars
- CSI 9 t - - yes maximize/unmaximize window
- CSI 1 0 t - - yes to/from full-screen
- CSI 1 1 t yes yes yes report if window is iconified
- CSI 1 2 t - - - -
- CSI 1 3 t yes yes yes report window position
- CSI 1 4 t yes yes yes report window size in pixels
- CSI 1 5 t - - yes report screen size in pixels
- CSI 1 6 t - - yes report character cell in pixels
- CSI 1 7 t - - - -
- CSI 1 8 t yes yes yes report window size in chars
- CSI 1 9 t - - yes report screen size in chars
- CSI 2 0 t - yes yes report icon label
- CSI 2 1 t - yes yes report window title
- CSI 2 2 t - - yes save window/icon title
- CSI 2 3 t - - yes restore window/icon title
- CSI 2 4 t - - yes resize window (DECSLPP)
- OSC 0 ST - yes yes set window and icon title
- OSC 1 ST - yes yes set icon label
- OSC 2 ST - yes yes set window title
- OSC 3 ST - n/a yes set X server property
- OSC I ST yes yes yes set icon to file
- OSC l ST yes yes yes set window title
- OSC L ST yes yes yes set icon label
+ -----------+-----+-----+-------+---------------------------------
+ CSI 1 t | yes | yes | yes | de-iconify
+ CSI 2 t | yes | yes | yes | iconify
+ CSI 3 t | yes | yes | yes | move window to pixel-position
+ CSI 4 t | yes | yes | yes | resize window in pixels
+ CSI 5 t | yes | yes | yes | raise window to front of stack
+ CSI 6 t | yes | yes | yes | raise window to back of stack
+ CSI 7 t | yes | yes | yes | refresh window
+ CSI 8 t | yes | yes | yes | resize window in chars
+ CSI 9 t | - | - | yes | maximize/unmaximize window
+ CSI 1 0 t | - | - | yes | to/from full-screen
+ CSI 1 1 t | yes | yes | yes | report if window is iconified
+ CSI 1 2 t | - | - | - | -
+ CSI 1 3 t | yes | yes | yes | report window position
+ CSI 1 4 t | yes | yes | yes | report window size in pixels
+ CSI 1 5 t | - | - | yes | report screen size in pixels
+ CSI 1 6 t | - | - | yes | report character cell in pixels
+ CSI 1 7 t | - | - | - | -
+ CSI 1 8 t | yes | yes | yes | report window size in chars
+ CSI 1 9 t | - | - | yes | report screen size in chars
+ CSI 2 0 t | - | yes | yes | report icon label
+ CSI 2 1 t | - | yes | yes | report window title
+ CSI 2 2 t | - | - | yes | save window/icon title
+ CSI 2 3 t | - | - | yes | restore window/icon title
+ CSI 2 4 t | - | - | yes | resize window (DECSLPP)
+ OSC 0 ST | - | yes | yes | set window and icon title
+ OSC 1 ST | - | yes | yes | set icon label
+ OSC 2 ST | - | yes | yes | set window title
+ OSC 3 ST | - | n/a | yes | set X server property
+ OSC I ST | yes | yes | yes | set icon to file
+ OSC l ST | yes | yes | yes | set window title
+ OSC L ST | yes | yes | yes | set icon label
+ -----------+-----+-----+-------+---------------------------------
Besides the Sun-derived OSC controls for setting window title and
icon label, dtterm also supported the xterm controls for the same
@@ -3046,10 +3244,11 @@ o XTerm supports control sequences for manipulating its window which
clarification of the details of the window operations relied upon
vttest.
-o The control sequences for saving/restoring the cursor and for
- saving/restoring "DEC Private Mode Values" may appear to be related
- (since the "save" controls both end with s ), but that is
- coincidental. The latter was introduced in X10.4:
+o The SCOSC/SCORC control sequences for saving/restoring the cursor
+ and for saving/restoring "DEC Private Mode Values" (XTSAVE and
+ XTRESTORE) may appear to be related (since the "save" controls both
+ end with s ), but that is coincidental. The latter was introduced
+ in X10.4 (December 1986):
Most Dec Private mode settings can be saved away internally
using \E[?ns, where n is the same number to set or reset the Dec
@@ -3060,6 +3259,38 @@ o The control sequences for saving/restoring the cursor and for
while the SCOSC/SCORC pair was added in 1995 by XFree86 (and
documented long afterwards).
+ The SCO ANSI console terminal descriptions did not use these
+ controls (they used the VT100-compatible SC/RC pair). SCOSC/SCORC
+ were an artifact of DOS 2.00 (January 1983), by Microsoft and later
+ supported by SCO and other vendors.
+
+ The SCOSC/SCORC pair is considered a private mode because the final
+ characters (s and u ) fall in the range from "`" to "~" (octal 0140
+ to octal 0176). Other private control sequences can be constructed
+ by using octets 074 to 077 (characters "<", "=", ">", or "?") at the
+ beginning of the parameter string. The XTSAVE and XTRESTORE
+ controls use "?") in this manner.
+
+ Because the XTSAVE and XTRESTORE controls are private, other
+ terminals may behave differently. For example, DEC (a contributor
+ to the early xterm as well as a manufacturer of terminals) used an
+ incompatible private control in one of its terminals more than five
+ years later (for the VT420 PCTerm, announced in February 1992).
+
+ In that model of the VT420, CSI ? Pm; Pc r selects the PC TERM
+ emulation mode. When this mode is enabled, the keyboard sends scan
+ codes rather than characters (analogous to X keyboard events). The
+ first parameter of this private control enables or disables PC TERM
+ mode, while the second selects a character set. An ambiguity arises
+ if an application omits the second parameter. In that special case,
+ it cannot be distinguished from XTRESTORE. DEC did not take this
+ into account when designing the feature.
+
+ If there were potential users, xterm could accommodate this by a
+ resource setting. In retrospect (thirty years later), there have
+ been no uses of PC TERM, while the XTRESTORE feature is still in
+ use.
+
o The aixterm manual page gives the format of the control sequence for
foreground and background colors 8-15, but does not specify what
those colors are. That is implied by the description's mention of
diff --git a/app/xterm/data.c b/app/xterm/data.c
index deb835889..d2786d83d 100644
--- a/app/xterm/data.c
+++ b/app/xterm/data.c
@@ -1,7 +1,7 @@
-/* $XTermId: data.c,v 1.98 2017/12/18 23:38:05 tom Exp $ */
+/* $XTermId: data.c,v 1.100 2021/05/27 22:29:26 tom Exp $ */
/*
- * Copyright 2002-2016,2017 by Thomas E. Dickey
+ * Copyright 2002-2017,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -68,6 +68,7 @@ jmp_buf Tekend;
#endif
char *ProgramName;
+char *ProgramPath;
Arg ourTopLevelShellArgs[] =
{
@@ -114,8 +115,11 @@ char *xterm_cursor_theme;
#if OPT_SESSION_MGT
int ice_fd = -1;
+char **restart_command;
#endif
+int restart_params = 0;
+
#ifdef USE_IGNORE_RC
int ignore_unused;
#endif
diff --git a/app/xterm/data.h b/app/xterm/data.h
index 41d16e890..8c5fbf1df 100644
--- a/app/xterm/data.h
+++ b/app/xterm/data.h
@@ -1,4 +1,4 @@
-/* $XTermId: data.h,v 1.139 2021/03/09 01:08:15 tom Exp $ */
+/* $XTermId: data.h,v 1.141 2021/05/27 22:29:12 tom Exp $ */
/*
* Copyright 2002-2019,2021 by Thomas E. Dickey
@@ -104,7 +104,12 @@ extern PtySelect Select_mask;
extern PtySelect X_mask;
extern PtySelect pty_mask;
+#if OPT_SESSION_MGT
extern int ice_fd;
+extern char **restart_command;
+#endif
+
+extern int restart_params;
extern XtermWidget term;
@@ -124,7 +129,8 @@ extern SIG_ATOMIC_T caught_intr;
#define XkbBI_MarginBell 10
#endif
-extern char *ProgramName;
+extern char *ProgramName; /* just the last part of name, maybe alias */
+extern char *ProgramPath; /* full pathname which can be executed */
extern Arg ourTopLevelShellArgs[];
extern Cardinal number_ourTopLevelShellArgs;
extern Atom wm_delete_window;
diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c
index c1c8943b0..770b33682 100644
--- a/app/xterm/fontutils.c
+++ b/app/xterm/fontutils.c
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.703 2021/03/02 00:25:24 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.706 2021/09/12 18:38:50 Martijn.van.Duren Exp $ */
/*
* Copyright 1998-2020,2021 by Thomas E. Dickey
@@ -2442,7 +2442,7 @@ dumpXft(XtermWidget xw, XTermXftFonts *data)
#endif
for (c = first; c <= last; ++c) {
if (FcCharSetHasChar(xft->charset, c)) {
- int width = CharWidth(c);
+ int width = CharWidth(screen, c);
XGlyphInfo extents;
Boolean big_x;
Boolean big_y;
@@ -2610,7 +2610,7 @@ checkXftWidth(XtermWidget xw, XTermXftFonts *target, XTermXftFonts *source)
* Ignore control characters - their extent information is misleading.
*/
for (c = 32; c < 256; ++c) {
- if (CharWidth(c) <= 0)
+ if (CharWidth(TScreenOf(xw), c) <= 0)
continue;
if (FcCharSetHasChar(source->font->charset, c)) {
(void) checkedXftWidth(XtDisplay(xw),
@@ -3626,8 +3626,7 @@ xtermMissingChar(unsigned ch, XTermFonts * font)
#endif
if (pc == 0 || CI_NONEXISTCHAR(pc)) {
- TRACE2(("xtermMissingChar %#04x (!exists), %d cells\n",
- ch, CharWidth(ch)));
+ TRACE2(("xtermMissingChar %#04x (!exists)\n", ch));
result = True;
}
if (ch < KNOWN_MISSING) {
@@ -4054,7 +4053,7 @@ foundXftGlyph(XtermWidget xw, XftFont *font, unsigned wc)
if (font != 0 && XftGlyphExists(screen->display, font, wc)) {
int expect;
- if ((expect = CharWidth(wc)) > 0) {
+ if ((expect = CharWidth(screen, wc)) > 0) {
XGlyphInfo gi;
int actual;
diff --git a/app/xterm/graphics.c b/app/xterm/graphics.c
index ab23021f8..cde00e842 100644
--- a/app/xterm/graphics.c
+++ b/app/xterm/graphics.c
@@ -1,4 +1,4 @@
-/* $XTermId: graphics.c,v 1.94 2021/02/25 23:42:01 tom Exp $ */
+/* $XTermId: graphics.c,v 1.95 2021/09/19 18:57:09 tom Exp $ */
/*
* Copyright 2013-2020,2021 by Ross Combs
@@ -852,7 +852,7 @@ get_new_or_matching_graphic(XtermWidget xw,
return graphic;
}
-#define ScaleForXColor(s) (unsigned short) ((long)(s) * MAX_U_COLOR / CHANNEL_MAX)
+#define ScaleForXColor(s) (unsigned short) ((unsigned long)(s) * MAX_U_COLOR / CHANNEL_MAX)
static int
save_allocated_color(const ColorRegister *reg, XtermWidget xw, Pixel *pix)
diff --git a/app/xterm/graphics_sixel.c b/app/xterm/graphics_sixel.c
index 304fa8f22..8d580b71c 100644
--- a/app/xterm/graphics_sixel.c
+++ b/app/xterm/graphics_sixel.c
@@ -1,8 +1,8 @@
-/* $XTermId: graphics_sixel.c,v 1.28 2020/08/06 20:32:33 Ben.Wong Exp $ */
+/* $XTermId: graphics_sixel.c,v 1.29 2021/08/10 00:39:26 tom Exp $ */
/*
- * Copyright 2014-2016,2020 by Ross Combs
- * Copyright 2014-2016,2020 by Thomas E. Dickey
+ * Copyright 2014-2020,2021 by Ross Combs
+ * Copyright 2014-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -229,7 +229,7 @@ finished_parsing(XtermWidget xw, Graphic *graphic)
if (screen->scroll_amt)
FlushScroll(xw);
- if (xw->keyboard.flags & MODE_DECSDM) {
+ if (SixelScrolling(xw)) {
int new_row, new_col;
if (screen->sixel_scrolls_right) {
@@ -340,7 +340,7 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
/* default isn't white on the VT240, but not sure what it is */
context.current_register = 3; /* FIXME: using green, but not sure what it should be */
- if (xw->keyboard.flags & MODE_DECSDM) {
+ if (SixelScrolling(xw)) {
TRACE(("sixel scrolling enabled: inline positioning for graphic at %d,%d\n",
screen->cur_row, screen->cur_col));
graphic = get_new_graphic(xw, screen->cur_row, screen->cur_col, 0U);
@@ -487,7 +487,7 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
* the remainder of the graphic depending on this setting.
*/
if (scroll_lines > 0) {
- if (xw->keyboard.flags & MODE_DECSDM) {
+ if (SixelScrolling(xw)) {
Display *display = screen->display;
xtermScroll(xw, scroll_lines);
XSync(display, False);
diff --git a/app/xterm/html.c b/app/xterm/html.c
index 1292676b9..c7c34939f 100644
--- a/app/xterm/html.c
+++ b/app/xterm/html.c
@@ -1,4 +1,4 @@
-/* $XTermId: html.c,v 1.21 2021/02/25 23:19:16 tom Exp $ */
+/* $XTermId: html.c,v 1.23 2021/09/19 18:30:48 tom Exp $ */
/*
* Copyright 2018-2020,2021 Thomas E. Dickey
@@ -175,8 +175,8 @@ dumpHtmlLine(XtermWidget xw, int row, FILE *fp)
}
#endif
- XQueryColor(xw->screen.display, xw->core.colormap, &fgcolor);
- XQueryColor(xw->screen.display, xw->core.colormap, &bgcolor);
+ (void) QueryOneColor(xw, &fgcolor);
+ (void) QueryOneColor(xw, &bgcolor);
xevents(xw);
if (ld->attribs[col] & BLINK) {
@@ -291,8 +291,9 @@ PixelToCSSColor(XtermWidget xw, Pixel p)
static char rgb[sizeof "rgb(100.00%, 100.00%, 100.00%)"];
XColor c;
+ (void) xw;
c.pixel = p;
- XQueryColor(xw->screen.display, xw->core.colormap, &c);
+ (void) QueryOneColor(xw, &c);
sprintf(rgb, "rgb(%.2f%%, %.2f%%, %.2f%%)", RGBPCT(c));
return rgb;
}
diff --git a/app/xterm/input.c b/app/xterm/input.c
index 82ad56d4c..e74fd6894 100644
--- a/app/xterm/input.c
+++ b/app/xterm/input.c
@@ -1,7 +1,7 @@
-/* $XTermId: input.c,v 1.365 2020/10/12 19:21:53 tom Exp $ */
+/* $XTermId: input.c,v 1.368 2021/09/12 18:20:03 tom Exp $ */
/*
- * Copyright 1999-2019,2020 by Thomas E. Dickey
+ * Copyright 1999-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -999,10 +999,14 @@ Input(XtermWidget xw,
}
}
#ifdef XK_ISO_Left_Tab
- else if (IsTabKey(kd.keysym)
- && kd.nbytes <= 1
- && modify_parm == (MOD_NONE + MOD_SHIFT)) {
- kd.keysym = XK_ISO_Left_Tab;
+ else if (IsTabKey(kd.keysym) && kd.nbytes <= 1) {
+ if (allowModifierParm(xw, &kd)) {
+ if (modify_parm == (MOD_NONE + MOD_SHIFT)) {
+ kd.keysym = XK_ISO_Left_Tab;
+ }
+ } else if (evt_state & ShiftMask) {
+ kd.keysym = XK_ISO_Left_Tab;
+ }
}
#endif
#endif /* OPT_MOD_FKEYS */
@@ -1458,9 +1462,6 @@ decfuncvalue(KEY_DATA * kd)
MAP(XK_Select, 4);
MAP(XK_Prior, 5);
MAP(XK_Next, 6);
-#ifdef XK_ISO_Left_Tab
- MAP(XK_ISO_Left_Tab, 'Z');
-#endif
MAP(XK_Help, 28);
MAP(XK_Menu, 29);
default:
diff --git a/app/xterm/linedata.c b/app/xterm/linedata.c
index f478a92c7..22f5908f3 100644
--- a/app/xterm/linedata.c
+++ b/app/xterm/linedata.c
@@ -1,4 +1,4 @@
-/* $XTermId: linedata.c,v 1.99 2021/03/08 00:24:12 tom Exp $ */
+/* $XTermId: linedata.c,v 1.100 2021/08/22 20:02:23 tom Exp $ */
/*
* Copyright 2009-2019,2021 by Thomas E. Dickey
@@ -51,14 +51,8 @@ getLineData(TScreen *screen, int row)
if (row >= 0) {
buffer = screen->visbuf;
} else {
-#if OPT_FIFO_LINES
buffer = 0;
result = getScrollback(screen, row);
-#else
- buffer = screen->saveBuf_index;
- row += screen->savelines;
- max_row += screen->savelines;
-#endif
}
if (row >= 0 && row <= max_row) {
result = (LineData *) scrnHeadAddr(screen, buffer, (unsigned) row);
diff --git a/app/xterm/main.c b/app/xterm/main.c
index c74ca0286..7bfb7fcac 100644
--- a/app/xterm/main.c
+++ b/app/xterm/main.c
@@ -1,4 +1,4 @@
-/* $XTermId: main.c,v 1.877 2021/03/21 22:09:06 tom Exp $ */
+/* $XTermId: main.c,v 1.882 2021/09/16 19:49:13 tom Exp $ */
/*
* Copyright 2002-2020,2021 by Thomas E. Dickey
@@ -2221,7 +2221,10 @@ main(int argc, char *argv[]ENVP_ARG)
Xaw3dXftData *xaw3dxft_data;
#endif
- ProgramName = argv[0];
+ ProgramName = x_strdup(x_basename(argv[0]));
+ ProgramPath = xtermFindShell(argv[0], True);
+ if (ProgramPath != NULL)
+ argv[0] = ProgramPath;
#ifdef HAVE_POSIX_SAVED_IDS
save_euid = geteuid();
@@ -2269,6 +2272,7 @@ main(int argc, char *argv[]ENVP_ARG)
/* Do these first, since we may not be able to open the display */
TRACE_OPTS(xtermOptions, optionDescList, XtNumber(optionDescList));
TRACE_ARGV("Before XtOpenApplication", argv);
+ restart_params = 0;
if (argc > 1) {
XrmOptionDescRec *option_ptr;
char *option_value;
@@ -2289,10 +2293,12 @@ main(int argc, char *argv[]ENVP_ARG)
if (explicit_shname == 0)
exit(0);
TRACE(("...explicit shell %s\n", explicit_shname));
+ restart_params = (argc - n);
} else if (!strcmp(option_ptr->option, "-e")) {
command_to_exec = (argv + n + 1);
if (!command_to_exec[0])
Syntax(argv[n]);
+ restart_params = (argc - n);
break;
} else if (!strcmp(option_ptr->option, "-version")) {
Version();
@@ -2473,6 +2479,8 @@ main(int argc, char *argv[]ENVP_ARG)
fallback_resources,
sessionShellWidgetClass,
NULL, 0);
+ TRACE(("created toplevel widget %p, window %#lx\n",
+ (void *) toplevel, XtWindow(toplevel)));
XtGetApplicationResources(toplevel, (XtPointer) &resource,
application_resources,
@@ -2652,6 +2660,8 @@ main(int argc, char *argv[]ENVP_ARG)
XtNmenuHeight, menu_high,
#endif
(XtPointer) 0);
+ TRACE(("created vt100 widget %p, window %#lx\n",
+ (void *) term, XtWindow(term)));
decode_keyboard_type(term, &resource);
screen = TScreenOf(term);
@@ -2866,7 +2876,7 @@ main(int argc, char *argv[]ENVP_ARG)
#endif
xtermEmbedWindow(winToEmbedInto);
-#if OPT_COLOR_RES
+
TRACE(("checking reverseVideo before rv %s fg %s, bg %s\n",
term->misc.re_verse0 ? "reverse" : "normal",
NonNull(TScreenOf(term)->Tcolors[TEXT_FG].resource),
@@ -2887,7 +2897,6 @@ main(int argc, char *argv[]ENVP_ARG)
NonNull(TScreenOf(term)->Tcolors[TEXT_FG].resource),
NonNull(TScreenOf(term)->Tcolors[TEXT_BG].resource)));
}
-#endif /* OPT_COLOR_RES */
#if OPT_MAXIMIZE
if (resource.maximized)
diff --git a/app/xterm/main.h b/app/xterm/main.h
index a9fc18f77..41cb4b243 100644
--- a/app/xterm/main.h
+++ b/app/xterm/main.h
@@ -1,7 +1,7 @@
-/* $XTermId: main.h,v 1.74 2020/12/19 00:19:51 tom Exp $ */
+/* $XTermId: main.h,v 1.77 2021/08/24 09:45:41 tom Exp $ */
/*
- * Copyright 2000-2019,2020 by Thomas E. Dickey
+ * Copyright 2000-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -167,6 +167,10 @@
#define DEF_BACKARO_BS True
#endif
+#ifndef DEF_CD_XTRA_SCROLL
+#define DEF_CD_XTRA_SCROLL "False"
+#endif
+
#ifndef DEF_ALT_SENDS_ESC
#define DEF_ALT_SENDS_ESC False
#endif
@@ -227,6 +231,10 @@
#define DEF_TITLE_MODES 0
#endif
+#ifndef DEF_TI_XTRA_SCROLL
+#define DEF_TI_XTRA_SCROLL "False"
+#endif
+
#ifndef DEF_XFT_CACHE
#define DEF_XFT_CACHE 50
#endif
diff --git a/app/xterm/menu.c b/app/xterm/menu.c
index a846bb161..baf38ee72 100644
--- a/app/xterm/menu.c
+++ b/app/xterm/menu.c
@@ -1,4 +1,4 @@
-/* $XTermId: menu.c,v 1.365 2021/03/21 20:03:03 tom Exp $ */
+/* $XTermId: menu.c,v 1.367 2021/06/03 21:23:40 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -695,6 +695,8 @@ create_menu(Widget w, XtermWidget xw, MenuIndex num)
simpleMenuWidgetClass,
toplevel,
NULL, 0);
+ TRACE(("created popupShell(%s) widget %p, window %#lx\n",
+ data->internal_name, list->w, XtWindow(list->w)));
#endif
if (list->w != 0) {
Boolean *unused = unusedEntries(xw, num);
@@ -718,6 +720,8 @@ create_menu(Widget w, XtermWidget xw, MenuIndex num)
: smeLineObjectClass),
list->w,
&arg, (Cardinal) 1);
+ TRACE(("created menuEntry[%d] widget %p, window %#lx\n",
+ n, (void *) entries[n].widget, XtWindow(entries[n].widget)));
list->entries++;
}
}
@@ -3031,6 +3035,8 @@ SetupShell(Widget *menus, MenuList * shell, int n, int m)
*menus,
XtNgeometry, NULL,
(XtPointer) 0);
+ TRACE(("created popupShel widget %p, window %#lx\n",
+ (void *) shell[n].w, XtWindow(shell[n].w)));
XtAddCallback(shell[n].w, XtNpopupCallback, InitPopup, menu_names[n].internal_name);
XtVaGetValues(shell[n].w,
@@ -3052,6 +3058,8 @@ SetupShell(Widget *menus, MenuList * shell, int n, int m)
XtNmenuName, menu_names[n].internal_name,
XtNlabel, external_name,
(XtPointer) 0);
+ TRACE(("created menuButton[%d] widget %p, window %#lx\n",
+ n, (void *) shell[n].b, XtWindow(shell[n].b)));
XtVaGetValues(shell[n].b,
XtNheight, &button_height,
XtNborderWidth, &button_border,
@@ -3085,6 +3093,8 @@ SetupMenus(Widget shell, Widget *forms, Widget *menus, Dimension *menu_high)
*forms = XtVaCreateManagedWidget("form",
formWidgetClass, shell,
(XtPointer) 0);
+ TRACE(("created form widget %p, window %#lx\n",
+ (void *) *forms, XtWindow(*forms)));
xtermAddInput(*forms);
/*
@@ -3105,6 +3115,8 @@ SetupMenus(Widget shell, Widget *forms, Widget *menus, Dimension *menu_high)
} else {
*menus = XtCreateWidget("menubar", boxWidgetClass, *forms, args, 5);
}
+ TRACE(("created menubar widget %p, window %#lx\n",
+ (void *) *menus, XtWindow(*menus)));
/*
* The toolbar widget's height is not necessarily known yet. If the
diff --git a/app/xterm/misc.c b/app/xterm/misc.c
index 43a7ef57a..12b88ded2 100644
--- a/app/xterm/misc.c
+++ b/app/xterm/misc.c
@@ -1,4 +1,4 @@
-/* $XTermId: misc.c,v 1.979 2021/03/24 00:27:48 tom Exp $ */
+/* $XTermId: misc.c,v 1.1001 2021/09/19 19:49:40 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -2593,7 +2593,7 @@ maskToWidth(unsigned long mask)
return result;
}
-int
+XVisualInfo *
getVisualInfo(XtermWidget xw)
{
#define MYFMT "getVisualInfo \
@@ -2646,7 +2646,7 @@ rgb masks (%04lx/%04lx/%04lx)\n"
xw->rgb_shifts[2]));
}
}
- return (xw->visInfo != 0) && (xw->numVisuals > 0);
+ return (xw->visInfo != 0) && (xw->numVisuals > 0) ? xw->visInfo : NULL;
#undef MYFMT
#undef MYARG
}
@@ -2659,12 +2659,11 @@ ReportAnsiColorRequest(XtermWidget xw, int opcode, int colornum, int final)
if (AllowColorOps(xw, ecGetAnsiColor)) {
XColor color;
- Colormap cmap = xw->core.colormap;
char buffer[80];
TRACE(("ReportAnsiColorRequest %d\n", colornum));
color.pixel = GET_COLOR_RES(xw, TScreenOf(xw)->Acolors[colornum]);
- XQueryColor(TScreenOf(xw)->display, cmap, &color);
+ (void) QueryOneColor(xw, &color);
sprintf(buffer, "%d;%d;rgb:%04x/%04x/%04x",
opcode,
(opcode == 5) ? (colornum - NUM_ANSI_COLORS) : colornum,
@@ -2731,6 +2730,75 @@ loadColorTable(XtermWidget xw, unsigned length)
return result;
}
+/***====================================================================***/
+
+/*
+ * Call this function with def->{red,green,blue} initialized, to obtain a pixel
+ * value.
+ */
+Boolean
+AllocOneColor(XtermWidget xw, XColor *def)
+{
+ TScreen *screen = TScreenOf(xw);
+ XVisualInfo *visInfo;
+ Boolean result = True;
+
+#define MaskIt(name,nn) \
+ ((unsigned long) ((def->name >> (16 - xw->rgb_widths[nn])) \
+ << xw->rgb_shifts[nn]) \
+ & xw->visInfo->name ##_mask)
+
+ if ((visInfo = getVisualInfo(xw)) != NULL && visInfo->class == TrueColor) {
+ def->pixel = MaskIt(red, 0) | MaskIt(green, 1) | MaskIt(blue, 2);
+ } else {
+ Display *dpy = screen->display;
+ if (!XAllocColor(dpy, xw->core.colormap, def)) {
+ /*
+ * Decide between foreground and background by a grayscale
+ * approximation.
+ */
+ int bright = def->red * 3 + def->green * 10 + def->blue;
+ int levels = 14 * 0x8000;
+ def->pixel = ((bright >= levels)
+ ? xw->dft_background
+ : xw->dft_foreground);
+ result = False;
+ }
+ }
+ return result;
+}
+
+/***====================================================================***/
+
+/*
+ * Call this function with def->pixel set to the color that we want to convert
+ * to separate red/green/blue.
+ */
+Boolean
+QueryOneColor(XtermWidget xw, XColor *def)
+{
+ XVisualInfo *visInfo;
+ Boolean result = True;
+
+#define UnMaskIt(name,nn) \
+ ((unsigned short)((def->pixel & xw->visInfo->name ##_mask) >> xw->rgb_shifts[nn]))
+#define UnMaskIt2(name,nn) \
+ ((unsigned short)((UnMaskIt(name,nn) << 8) \
+ |UnMaskIt(name,nn)))
+
+ if ((visInfo = getVisualInfo(xw)) != NULL && visInfo->class == TrueColor) {
+ /* *INDENT-EQLS* */
+ def->red = UnMaskIt2(red, 0);
+ def->green = UnMaskIt2(green, 1);
+ def->blue = UnMaskIt2(blue, 2);
+ } else if (!XQueryColor(TScreenOf(xw)->display, xw->core.colormap, def)) {
+ result = False;
+ }
+ return result;
+}
+
+/***====================================================================***/
+
/*
* Find closest color for "def" in "cmap".
* Set "def" to the resulting color.
@@ -2742,7 +2810,7 @@ loadColorTable(XtermWidget xw, unsigned length)
* Return False if not able to find or allocate a color.
*/
static Boolean
-allocateClosestRGB(XtermWidget xw, Colormap cmap, XColor *def)
+allocateClosestRGB(XtermWidget xw, XColor *def)
{
TScreen *screen = TScreenOf(xw);
Boolean result = False;
@@ -2796,8 +2864,7 @@ allocateClosestRGB(XtermWidget xw, Colormap cmap, XColor *def)
}
}
}
- if (XAllocColor(screen->display, cmap,
- &screen->cmap_data[bestInx]) != 0) {
+ if (AllocOneColor(xw, &screen->cmap_data[bestInx])) {
*def = screen->cmap_data[bestInx];
TRACE(("...closest %x/%x/%x\n", def->red,
def->green, def->blue));
@@ -2822,193 +2889,6 @@ allocateClosestRGB(XtermWidget xw, Colormap cmap, XColor *def)
#define ULONG_MAX (unsigned long)(~(0L))
#endif
-#define CheckColor(result, value) \
- result = 0; \
- if (value.red) \
- result |= 1; \
- if (value.green) \
- result |= 2; \
- if (value.blue) \
- result |= 4
-
-#define SelectColor(state, value, result) \
- switch (state) { \
- default: \
- case 1: \
- result = value.red; \
- break; \
- case 2: \
- result = value.green; \
- break; \
- case 4: \
- result = value.blue; \
- break; \
- }
-
-/*
- * Check if the color map consists of values in exactly one of the red, green
- * or blue columns. If it is not, we do not know how to use it for the exact
- * match.
- */
-static int
-simpleColors(XColor *colortable, unsigned length)
-{
- unsigned n;
- int state = 0;
- int check;
-
- for (n = 0; n < length; ++n) {
- if (state > 0) {
- CheckColor(check, colortable[n]);
- if (check > 0 && check != state) {
- state = 0;
- break;
- }
- } else {
- CheckColor(state, colortable[n]);
- }
- }
- switch (state) {
- case 1:
- case 2:
- case 4:
- break;
- default:
- state = 0;
- break;
- }
- return state;
-}
-
-/*
- * Shift the mask left or right to put its most significant bit at the 16-bit
- * mark.
- */
-static unsigned
-normalizeMask(unsigned mask)
-{
- while (mask < 0x8000) {
- mask <<= 1;
- }
- while (mask >= 0x10000) {
- mask >>= 1;
- }
- return mask;
-}
-
-static unsigned
-searchColors(XColor *colortable, unsigned mask, unsigned length, unsigned
- color, int state)
-{
- unsigned result = 0;
- unsigned n;
- unsigned long best = ULONG_MAX;
- unsigned value;
-
- mask = normalizeMask(mask);
- for (n = 0; n < length; ++n) {
- unsigned long diff;
-
- SelectColor(state, colortable[n], value);
- diff = ((color & mask) - (value & mask));
- diff *= diff;
- if (diff < best) {
-#if 0
- TRACE(("...%d:looking for %x, found %x/%x/%x (%lx)\n",
- n, color,
- colortable[n].red,
- colortable[n].green,
- colortable[n].blue,
- diff));
-#endif
- result = n;
- best = diff;
- }
- }
- SelectColor(state, colortable[result], value);
- return value;
-}
-
-/*
- * This is a workaround for a longstanding defect in the X libraries.
- *
- * According to
- * http://www.unix.com/man-page/all/3x/XAllocColoA/
- *
- * XAllocColor() acts differently on static and dynamic visuals. On Pseu-
- * doColor, DirectColor, and GrayScale visuals, XAllocColor() fails if
- * there are no unallocated colorcells and no allocated read-only cell
- * exactly matches the requested RGB values. On StaticColor, TrueColor,
- * and StaticGray visuals, XAllocColor() returns the closest RGB values
- * available in the colormap. The colorcell_in_out structure returns the
- * actual RGB values allocated.
- *
- * That is, XAllocColor() should suffice unless the color map is full. In that
- * case, allocateClosestRGB() is useful for the dynamic display classes such as
- * PseudoColor. It is not useful for TrueColor, since XQueryColors() does not
- * return regular RGB triples (unless a different scheme was used for
- * specifying the pixel values); only the blue value is filled in. However, it
- * is filled in with the colors that the server supports.
- *
- * Also (the reason for this function), XAllocColor() does not really work as
- * described. For some TrueColor configurations it merely returns a close
- * approximation, but not the closest.
- */
-static Boolean
-allocateExactRGB(XtermWidget xw, Colormap cmap, XColor *def)
-{
- XColor save = *def;
- TScreen *screen = TScreenOf(xw);
- Boolean result = (Boolean) (XAllocColor(screen->display, cmap, def) != 0);
-
- /*
- * If this is a statically allocated display with too many items to store
- * in our array, i.e., TrueColor, see if we can improve on the result by
- * using the color values actually supported by the server.
- */
- if (result) {
- unsigned cmap_type;
- unsigned cmap_size;
-
- getColormapInfo(xw, &cmap_type, &cmap_size);
-
- if (cmap_type == TrueColor) {
- XColor temp = *def;
- int state;
-
- if (loadColorTable(xw, cmap_size)
- && (state = simpleColors(screen->cmap_data, cmap_size)) > 0) {
-#define SearchColors(which) \
- temp.which = (unsigned short) searchColors(screen->cmap_data, \
- (unsigned) xw->visInfo->which##_mask,\
- cmap_size, \
- save.which, \
- state)
- SearchColors(red);
- SearchColors(green);
- SearchColors(blue);
- if (XAllocColor(screen->display, cmap, &temp) != 0) {
-#if OPT_TRACE
- if (temp.red != save.red
- || temp.green != save.green
- || temp.blue != save.blue) {
- TRACE(("...improved %x/%x/%x ->%x/%x/%x\n",
- save.red, save.green, save.blue,
- temp.red, temp.green, temp.blue));
- } else {
- TRACE(("...no improvement for %x/%x/%x\n",
- save.red, save.green, save.blue));
- }
-#endif
- *def = temp;
- }
- }
- }
- }
-
- return result;
-}
-
/*
* Allocate a color for the "ANSI" colors. That actually includes colors up
* to 256.
@@ -3027,11 +2907,8 @@ AllocateAnsiColor(XtermWidget xw,
XColor def;
if (xtermAllocColor(xw, &def, spec)) {
- if (
-#if OPT_COLOR_RES
- res->mode == True &&
-#endif
- EQL_COLOR_RES(res, def.pixel)) {
+ if (res->mode == True &&
+ EQL_COLOR_RES(res, def.pixel)) {
result = 0;
} else {
result = 1;
@@ -3045,11 +2922,9 @@ AllocateAnsiColor(XtermWidget xw,
def.green,
def.blue,
def.pixel));
-#if OPT_COLOR_RES
if (!res->mode)
result = 0;
res->mode = True;
-#endif
}
} else {
TRACE(("AllocateAnsiColor %s (failed)\n", spec));
@@ -3058,7 +2933,6 @@ AllocateAnsiColor(XtermWidget xw,
return (result);
}
-#if OPT_COLOR_RES
Pixel
xtermGetColorRes(XtermWidget xw, ColorRes * res)
{
@@ -3086,7 +2960,6 @@ xtermGetColorRes(XtermWidget xw, ColorRes * res)
}
return result;
}
-#endif
static int
ChangeOneAnsiColor(XtermWidget xw, int color, const char *name)
@@ -3225,16 +3098,15 @@ ResetAnsiColorRequest(XtermWidget xw, char *buf, int start)
return repaint;
}
#else
-#define allocateClosestRGB(xw, cmap, def) 0
-#define allocateExactRGB(xw, cmap, def) XAllocColor(TScreenOf(xw)->display, cmap, def)
+#define allocateClosestRGB(xw, def) 0
#endif /* OPT_ISO_COLORS */
Boolean
allocateBestRGB(XtermWidget xw, XColor *def)
{
- Colormap cmap = xw->core.colormap;
-
- return allocateExactRGB(xw, cmap, def) || allocateClosestRGB(xw, cmap, def);
+ (void) xw;
+ (void) def;
+ return AllocOneColor(xw, def) || allocateClosestRGB(xw, def);
}
static Boolean
@@ -3247,7 +3119,7 @@ xtermAllocColor(XtermWidget xw, XColor *def, const char *spec)
if (have == 0 || have > MAX_U_STRING) {
if (resource.reportColors) {
- printf("color (ignored, length %lu)\n", have);
+ printf("color (ignored, length %lu)\n", (unsigned long) have);
}
} else if (XParseColor(screen->display, cmap, spec, def)) {
XColor save_def = *def;
@@ -3284,7 +3156,7 @@ int
xtermClosestColor(XtermWidget xw, int find_red, int find_green, int find_blue)
{
int result = -1;
-#if OPT_COLOR_RES && OPT_ISO_COLORS
+#if OPT_ISO_COLORS
int n;
int best_index = -1;
unsigned long best_value = 0;
@@ -3319,6 +3191,7 @@ xtermClosestColor(XtermWidget xw, int find_red, int find_green, int find_blue)
}
TRACE(("...best match at %d with diff %lx\n", best_index, best_value));
result = best_index;
+
#else
(void) xw;
(void) find_red;
@@ -3688,7 +3561,6 @@ ReportColorRequest(XtermWidget xw, int ndx, int final)
if (AllowColorOps(xw, ecGetColor)) {
XColor color;
- Colormap cmap = xw->core.colormap;
char buffer[80];
/*
@@ -3700,7 +3572,7 @@ ReportColorRequest(XtermWidget xw, int ndx, int final)
GetOldColors(xw);
color.pixel = xw->work.oldColors->colors[ndx];
- XQueryColor(TScreenOf(xw)->display, cmap, &color);
+ (void) QueryOneColor(xw, &color);
sprintf(buffer, "%d;rgb:%04x/%04x/%04x", i + 10,
color.red,
color.green,
@@ -3841,8 +3713,6 @@ ResetColorsRequest(XtermWidget xw,
(void) code;
TRACE(("ResetColorsRequest code=%d\n", code));
-
-#if OPT_COLOR_RES
if (GetOldColors(xw)) {
ScrnColors newColors;
const char *thisName;
@@ -3868,7 +3738,6 @@ ResetColorsRequest(XtermWidget xw,
}
result = True;
}
-#endif
return result;
}
@@ -6989,11 +6858,75 @@ getXtermWidget(Widget w)
}
#if OPT_SESSION_MGT
+
+#if OPT_TRACE
+static void
+trace_1_SM(const char *tag, String name)
+{
+ Arg args[1];
+ char *buf = 0;
+
+ XtSetArg(args[0], name, &buf);
+ XtGetValues(toplevel, args, 1);
+
+ if (strstr(name, "Path") || strstr(name, "Directory")) {
+ TRACE(("%s %s: %s\n", tag, name, NonNull(buf)));
+ } else if (strstr(name, "Command")) {
+ if (buf != NULL) {
+ char **vec = (char **) (void *) buf;
+ int n;
+ TRACE(("%s %s:\n", tag, name));
+ for (n = 0; vec[n] != NULL; ++n) {
+ TRACE((" arg[%d] = %s\n", n, vec[n]));
+ }
+ } else {
+ TRACE(("%s %s: %p\n", tag, name, buf));
+ }
+ } else {
+ TRACE(("%s %s: %p\n", tag, name, buf));
+ }
+}
+
+static void
+trace_SM_props(void)
+{
+ /* *INDENT-OFF* */
+ static struct { String app, cls; } table[] = {
+ { XtNcurrentDirectory, XtCCurrentDirectory },
+ { XtNdieCallback, XtNdiscardCommand },
+ { XtCDiscardCommand, XtNenvironment },
+ { XtCEnvironment, XtNinteractCallback },
+ { XtNjoinSession, XtCJoinSession },
+ { XtNprogramPath, XtCProgramPath },
+ { XtNresignCommand, XtCResignCommand },
+ { XtNrestartCommand, XtCRestartCommand },
+ { XtNrestartStyle, XtCRestartStyle },
+ { XtNsaveCallback, XtNsaveCompleteCallback },
+ { XtNsessionID, XtCSessionID },
+ { XtNshutdownCommand, XtCShutdownCommand },
+ };
+ /* *INDENT-ON* */
+ Cardinal n;
+ TRACE(("Session properties:\n"));
+ for (n = 0; n < XtNumber(table); ++n) {
+ trace_1_SM("app", table[n].app);
+ trace_1_SM("cls", table[n].cls);
+ }
+}
+#define TRACE_SM_PROPS() trace_SM_props()
+#else
+#define TRACE_SM_PROPS() /* nothing */
+#endif
+
static void
die_callback(Widget w GCC_UNUSED,
XtPointer client_data GCC_UNUSED,
XtPointer call_data GCC_UNUSED)
{
+ TRACE(("die_callback client=%p, call=%p\n",
+ (void *) client_data,
+ (void *) call_data));
+ TRACE_SM_PROPS();
NormalExit();
}
@@ -7003,7 +6936,19 @@ save_callback(Widget w GCC_UNUSED,
XtPointer call_data)
{
XtCheckpointToken token = (XtCheckpointToken) call_data;
- /* we have nothing to save */
+ TRACE(("save_callback:\n"));
+ TRACE(("... save_type <-%d\n", token->save_type));
+ TRACE(("... interact_style <-%d\n", token->interact_style));
+ TRACE(("... shutdown <-%s\n", BtoS(token->shutdown)));
+ TRACE(("... fast <-%s\n", BtoS(token->fast)));
+ TRACE(("... cancel_shutdown <-%s\n", BtoS(token->cancel_shutdown)));
+ TRACE(("... phase <-%d\n", token->phase));
+ TRACE(("... interact_dialog_type ->%d\n", token->interact_dialog_type));
+ TRACE(("... request_cancel ->%s\n", BtoS(token->request_cancel)));
+ TRACE(("... request_next_phase ->%s\n", BtoS(token->request_next_phase)));
+ TRACE(("... save_success ->%s\n", BtoS(token->save_success)));
+ xtermUpdateRestartCommand(term);
+ /* we have nothing more to save */
token->save_success = True;
}
@@ -7029,6 +6974,8 @@ xtermOpenSession(void)
TRACE(("Enabling session-management callbacks\n"));
XtAddCallback(toplevel, XtNdieCallback, die_callback, NULL);
XtAddCallback(toplevel, XtNsaveCallback, save_callback, NULL);
+
+ TRACE_SM_PROPS();
}
}
@@ -7037,6 +6984,267 @@ xtermCloseSession(void)
{
IceRemoveConnectionWatch(icewatch, NULL);
}
+
+typedef enum {
+ B_ARG = 0,
+ I_ARG,
+ D_ARG,
+ S_ARG
+} ParamType;
+
+#define Barg(name, field) { name, B_ARG, XtOffsetOf(XtermWidgetRec, field) }
+#define Iarg(name, field) { name, I_ARG, XtOffsetOf(XtermWidgetRec, field) }
+#define Darg(name, field) { name, D_ARG, XtOffsetOf(XtermWidgetRec, field) }
+#define Sarg(name, field) { name, S_ARG, XtOffsetOf(XtermWidgetRec, field) }
+
+typedef struct {
+ const char name[30];
+ ParamType type;
+ Cardinal offset;
+} FontParams;
+
+/* *INDENT-OFF* */
+static const FontParams fontParams[] = {
+ Iarg(XtNinitialFont, screen.menu_font_number), /* "-fc" */
+ Barg(XtNallowBoldFonts, screen.allowBoldFonts), /* menu */
+#if OPT_BOX_CHARS
+ Barg(XtNforceBoxChars, screen.force_box_chars), /* "-fbx" */
+ Barg(XtNforcePackedFont, screen.force_packed), /* menu */
+#endif
+#if OPT_DEC_CHRSET
+ Barg(XtNfontDoublesize, screen.font_doublesize), /* menu */
+#endif
+#if OPT_WIDE_CHARS
+ Barg(XtNutf8Fonts, screen.utf8_fonts), /* menu */
+#endif
+#if OPT_RENDERFONT
+ Darg(XtNfaceSize, misc.face_size[0]), /* "-fs" */
+ Sarg(XtNfaceName, misc.default_xft.f_n), /* "-fa" */
+ Sarg(XtNrenderFont, misc.render_font_s), /* (resource) */
+#endif
+};
+/* *INDENT-ON* */
+
+#define RESTART_PARAMS (int)(XtNumber(fontParams) * 2)
+#define TypedPtr(type) *(type *)(void *)((char *) xw + parameter->offset)
+
+/*
+ * If no widget is given, no value is used.
+ */
+static char *
+formatFontParam(char *result, XtermWidget xw, const FontParams * parameter)
+{
+ sprintf(result, "%s*%s:", ProgramName, parameter->name);
+ if (xw != None) {
+ char *next = result + strlen(result);
+ switch (parameter->type) {
+ case B_ARG:
+ sprintf(next, "%s", *(Boolean *) ((char *) xw + parameter->offset)
+ ? "true"
+ : "false");
+ break;
+ case I_ARG:
+ sprintf(next, "%d", TypedPtr(int));
+ break;
+ case D_ARG:
+ sprintf(next, "%.1f", TypedPtr(float));
+ break;
+ case S_ARG:
+ strcpy(next, TypedPtr(char *));
+#if OPT_RENDERFONT
+ if (!strcmp(parameter->name, XtNfaceName)) {
+ if (IsEmpty(next)
+ && xw->work.render_font) {
+ strcpy(next, DEFFACENAME_AUTO);
+ }
+ } else if (!strcmp(parameter->name, XtNrenderFont)) {
+ if (xw->work.render_font == erDefault
+ && IsEmpty(xw->misc.default_xft.f_n)) {
+ strcpy(next, "DefaultOff");
+ }
+ }
+#endif
+ break;
+ }
+ }
+ return result;
+}
+
+#if OPT_TRACE
+static void
+dumpFontParams(XtermWidget xw)
+{
+ char buffer[1024];
+ Cardinal n;
+
+ TRACE(("FontParams:\n"));
+ for (n = 0; n < XtNumber(fontParams); ++n) {
+ TRACE(("%3d:%s\n", n, formatFontParam(buffer, xw, fontParams + n)));
+ }
+}
+#else
+#define dumpFontParams(xw) /* nothing */
+#endif
+
+static Boolean
+findFontParams(int argc, char **argv)
+{
+ Boolean result = False;
+
+ if (argc > RESTART_PARAMS && (argc - restart_params) > RESTART_PARAMS) {
+ int n;
+
+ for (n = 0; n < RESTART_PARAMS; ++n) {
+ int my_index = argc - restart_params - n - 1;
+ int my_param = (RESTART_PARAMS - n - 1) / 2;
+ char *actual = argv[my_index];
+ char expect[1024];
+ Boolean value = (Boolean) ((n % 2) == 0);
+
+ result = False;
+ TRACE(("...index: %d\n", my_index));
+ TRACE(("...param: %d\n", my_param));
+ TRACE(("...actual %s\n", actual));
+ if (IsEmpty(actual))
+ break;
+
+ if (value) {
+ formatFontParam(expect, None, fontParams + my_param);
+ } else {
+ strcpy(expect, "-xrm");
+ }
+
+ TRACE(("...expect %s\n", expect));
+
+ if (value) {
+ if (strlen(expect) >= strlen(actual))
+ break;
+ if (strncmp(expect, actual, strlen(expect)))
+ break;
+ } else {
+ if (strcmp(actual, expect))
+ break;
+ }
+ TRACE(("fixme/ok:%d\n", n));
+ result = True;
+ }
+ TRACE(("findFontParams: %s (tested %d of %d parameters)\n",
+ BtoS(result), n + 1, RESTART_PARAMS));
+ }
+ return result;
+}
+
+static int
+insertFontParams(XtermWidget xw, int *targetp, Bool first)
+{
+ int changed = 0;
+ int n;
+ int target = *targetp;
+ char buffer[1024];
+ const char *option = "-xrm";
+
+ for (n = 0; n < (int) XtNumber(fontParams); ++n) {
+ formatFontParam(buffer, xw, fontParams + n);
+ TRACE(("formatted %3d ->%3d:%s\n", n, target, buffer));
+ if (restart_command[target] == NULL)
+ restart_command[target] = x_strdup(option);
+ ++target;
+ if (first) {
+ restart_command[target] = x_strdup(buffer);
+ ++changed;
+ } else if (restart_command[target] == NULL
+ || strcmp(restart_command[target], buffer)) {
+ free(restart_command[target]);
+ restart_command[target] = x_strdup(buffer);
+ ++changed;
+ }
+ ++target;
+ }
+ *targetp = target;
+ return changed;
+}
+
+void
+xtermUpdateRestartCommand(XtermWidget xw)
+{
+ if (resource.sessionMgt) {
+ Arg args[1];
+ char **argv = 0;
+
+ XtSetArg(args[0], XtNrestartCommand, &argv);
+ XtGetValues(toplevel, args, 1);
+ if (argv != NULL) {
+ static int my_params = 0;
+
+ int changes = 0;
+ Boolean first = False;
+ int argc;
+ int want;
+ int source, target;
+
+ TRACE(("xtermUpdateRestartCommand\n"));
+ dumpFontParams(xw);
+ for (argc = 0; argv[argc] != NULL; ++argc) {
+ TRACE((" arg[%d] = %s\n", argc, argv[argc]));
+ ;
+ }
+ want = argc - (restart_params + RESTART_PARAMS);
+
+ TRACE((" argc: %d\n", argc));
+ TRACE((" restart_params: %d\n", restart_params));
+ TRACE((" want to insert: %d\n", want));
+
+ /*
+ * If we already have the font-choice option, do not add it again.
+ */
+ if (findFontParams(argc, argv)) {
+ my_params = (want);
+ } else {
+ first = True;
+ my_params = (argc - restart_params);
+ }
+ TRACE((" my_params: %d\n", my_params));
+
+ if (my_params > argc) {
+ TRACE((" re-allocate restartCommand\n"));
+ FreeAndNull(restart_command);
+ }
+
+ if (restart_command == NULL) {
+ int need = argc + RESTART_PARAMS + 1;
+
+ restart_command = TypeCallocN(char *, need);
+
+ TRACE(("..inserting font-parameters\n"));
+ for (source = target = 0; source < argc; ++source) {
+ if (source == my_params) {
+ changes += insertFontParams(xw, &target, first);
+ if (!first) {
+ source += (RESTART_PARAMS - 1);
+ continue;
+ }
+ }
+ if (argv[source] == NULL)
+ break;
+ restart_command[target++] = x_strdup(argv[source]);
+ }
+ restart_command[target] = NULL;
+ } else {
+ TRACE(("..replacing font-parameters\n"));
+ target = my_params;
+ changes += insertFontParams(xw, &target, first);
+ }
+ if (changes) {
+ TRACE(("..%d parameters changed\n", changes));
+ XtSetArg(args[0], XtNrestartCommand, restart_command);
+ XtSetValues(toplevel, args, 1);
+ } else {
+ TRACE(("..NO parameters changed\n"));
+ }
+ }
+ TRACE_SM_PROPS();
+ }
+}
#endif /* OPT_SESSION_MGT */
Widget
@@ -7205,12 +7413,23 @@ update_winsize(int fd, int rows, int cols, int height, int width)
#ifdef TTYSIZE_STRUCT
static int last_rows = -1;
static int last_cols = -1;
+ static int last_high = -1;
+ static int last_wide = -1;
+
+ TRACE(("update_winsize %dx%d (%dx%d) -> %dx%d (%dx%d)\n",
+ last_rows, last_cols, last_high, last_wide,
+ rows, cols, height, width));
- if (rows != last_rows || cols != last_cols) {
+ if (rows != last_rows
+ || cols != last_cols
+ || last_high != height
+ || last_wide != width) {
TTYSIZE_STRUCT ts;
last_rows = rows;
last_cols = cols;
+ last_high = height;
+ last_wide = width;
setup_winsize(ts, rows, cols, height, width);
TRACE_RC(code, SET_TTYSIZE(fd, ts));
trace_winsize(ts, "from SET_TTYSIZE");
diff --git a/app/xterm/package/debian/changelog b/app/xterm/package/debian/changelog
index 2e076f2c0..56e05dbee 100644
--- a/app/xterm/package/debian/changelog
+++ b/app/xterm/package/debian/changelog
@@ -1,3 +1,15 @@
+xterm-dev (369) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 10 Jun 2021 04:13:52 -0400
+
+xterm-dev (368) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Tue, 27 Apr 2021 20:02:52 -0400
+
xterm-dev (367) unstable; urgency=low
* maintenance updates
diff --git a/app/xterm/package/freebsd/Makefile b/app/xterm/package/freebsd/Makefile
index 8bf41f3f3..54e6b2506 100644
--- a/app/xterm/package/freebsd/Makefile
+++ b/app/xterm/package/freebsd/Makefile
@@ -1,4 +1,4 @@
-# $XTermId: Makefile,v 1.88 2021/02/22 21:18:59 tom Exp $
+# $XTermId: Makefile,v 1.90 2021/06/10 08:13:52 tom Exp $
# $FreeBSD: head/x11/xterm/Makefile 492827 2019-02-13 06:43:36Z ehaupt $
# This is adapted from the FreeBSD port, installing as "xterm-dev" with
@@ -7,7 +7,7 @@
# and "make makesum".
PORTNAME= xterm
-PORTVERSION= 367
+PORTVERSION= 369
CATEGORIES= x11
MASTER_SITES= ftp://ftp.invisible-island.net/xterm/:src1 \
https://invisible-mirror.net/archives/xterm/:src1
diff --git a/app/xterm/package/pkgsrc/Makefile b/app/xterm/package/pkgsrc/Makefile
index d94dec8f3..cf24008e2 100644
--- a/app/xterm/package/pkgsrc/Makefile
+++ b/app/xterm/package/pkgsrc/Makefile
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.117 2018/03/12 11:18:00 wiz Exp $
-DISTNAME= xterm-367
+DISTNAME= xterm-369
PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= ftp://ftp.invisible-island.net/xterm/
diff --git a/app/xterm/package/xterm.spec b/app/xterm/package/xterm.spec
index 5784416c0..e98bbd023 100644
--- a/app/xterm/package/xterm.spec
+++ b/app/xterm/package/xterm.spec
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.142 2021/02/22 21:18:59 tom Exp $
+# $XTermId: xterm.spec,v 1.144 2021/06/10 08:13:52 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: 367
+Version: 369
Release: 1
License: X11
Group: User Interface/X
diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h
index 3218bd98a..14100f1d5 100644
--- a/app/xterm/ptyx.h
+++ b/app/xterm/ptyx.h
@@ -1,4 +1,4 @@
-/* $XTermId: ptyx.h,v 1.1030 2021/03/21 22:11:10 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.1040 2021/09/16 20:43:29 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -552,10 +552,6 @@ typedef enum {
#define OPT_COLOR_CLASS 1 /* true if xterm uses separate color-resource classes */
#endif
-#ifndef OPT_COLOR_RES
-#define OPT_COLOR_RES 1 /* true if xterm delays color-resource evaluation */
-#endif
-
#ifndef OPT_DABBREV
#define OPT_DABBREV 0 /* dynamic abbreviations */
#endif
@@ -616,10 +612,6 @@ typedef enum {
#define OPT_EXTRA_PASTE 1
#endif
-#ifndef OPT_FIFO_LINES
-#define OPT_FIFO_LINES 1 /* optimize save-lines feature using FIFO */
-#endif
-
#ifndef OPT_FOCUS_EVENT
#define OPT_FOCUS_EVENT 1 /* focus in/out events */
#endif
@@ -752,10 +744,6 @@ typedef enum {
#define OPT_SAME_NAME 1 /* suppress redundant updates of title, icon, etc. */
#endif
-#ifndef OPT_SAVE_LINES
-#define OPT_SAVE_LINES OPT_FIFO_LINES /* optimize save-lines feature */
-#endif
-
#ifndef OPT_SCO_FUNC_KEYS
#define OPT_SCO_FUNC_KEYS 0 /* true if xterm supports SCO-style function keys */
#endif
@@ -860,21 +848,6 @@ typedef enum {
#define OPT_AIX_COLORS 0
#endif
-#if OPT_COLOR_RES && !OPT_ISO_COLORS
-/* You must have ANSI/ISO colors to support ColorRes logic */
-#undef OPT_COLOR_RES
-#define OPT_COLOR_RES 0
-#endif
-
-#if OPT_256_COLORS && (OPT_WIDE_CHARS || OPT_RENDERFONT || OPT_XMC_GLITCH)
-/* It's actually more complicated than that - but by trimming options you can
- * have 256 color resources though.
- */
-#define OPT_COLOR_RES2 1
-#else
-#define OPT_COLOR_RES2 0
-#endif
-
#if OPT_PC_COLORS && !OPT_ISO_COLORS
/* You must have ANSI/ISO colors to support PC colors */
#undef OPT_PC_COLORS
@@ -1532,13 +1505,8 @@ typedef enum {
#define COLOR_RES_CLASS(root) XtCForeground
#endif
-#if OPT_COLOR_RES
#define COLOR_RES(root,offset,value) Sres(COLOR_RES_NAME(root), COLOR_RES_CLASS(root), offset.resource, value)
#define COLOR_RES2(name,class,offset,value) Sres(name, class, offset.resource, value)
-#else
-#define COLOR_RES(root,offset,value) Cres(COLOR_RES_NAME(root), COLOR_RES_CLASS(root), offset, value)
-#define COLOR_RES2(name,class,offset,value) Cres(name, class, offset, value)
-#endif
#define CLICK_RES_NAME(count) "on" count "Clicks"
#define CLICK_RES_CLASS(count) "On" count "Clicks"
@@ -1946,6 +1914,7 @@ typedef enum {
erFalse = 0
, erTrue
, erDefault
+ , erDefaultOff
, erLast
} RenderFont;
@@ -2095,16 +2064,12 @@ typedef enum {
#define NUM_POPUP_MENUS 4
-#if OPT_COLOR_RES
typedef struct {
String resource;
Pixel value;
unsigned short red, green, blue;
int mode; /* -1=invalid, 0=unset, 1=set */
} ColorRes;
-#else
-#define ColorRes Pixel
-#endif
/* these are set in getPrinterFlags */
typedef struct {
@@ -2731,6 +2696,7 @@ typedef struct {
#if OPT_SCROLL_LOCK
Boolean allowScrollLock;/* ScrollLock mode */
Boolean allowScrollLock0;/* initial ScrollLock mode */
+ Boolean autoScrollLock; /* Auto ScrollLock mode */
Boolean scroll_lock; /* true to keep buffer in view */
Boolean scroll_dirty; /* scrolling makes screen dirty */
#endif
@@ -3019,6 +2985,13 @@ typedef enum { /* legal values for screen.eight_bit_meta */
, ebLast
} ebMetaModeTypes;
+typedef enum { /* legal values for misc.cdXtraScroll */
+ edFalse = 0
+ , edTrue = 1
+ , edTrim = 2
+ , edLast
+} edXtraScrollTypes;
+
#define NAME_OLD_KT " legacy"
#if OPT_HP_FUNC_KEYS
@@ -3137,10 +3110,12 @@ typedef struct _Misc {
Boolean useRight;
#endif
Boolean titeInhibit;
- Boolean tiXtraScroll; /* scroll on ti/te */
- Boolean cdXtraScroll; /* scroll on cd (clear-display) */
Boolean appcursorDefault;
Boolean appkeypadDefault;
+ int cdXtraScroll; /* scroll on cd (clear-display) */
+ char *cdXtraScroll_s;
+ int tiXtraScroll; /* scroll on ti/te (init/end-cup) */
+ char *tiXtraScroll_s;
#if OPT_INPUT_METHOD
char* f_x; /* font for XIM */
char* input_method;
@@ -3407,7 +3382,6 @@ typedef struct _TekWidgetRec {
/* The following attribute is used in the argument of xtermSpecialFont etc */
#define NORESOLUTION DrawBIT(5) /* find the font without resolution */
-
/*
* Groups of attributes
*/
@@ -3434,6 +3408,11 @@ typedef struct _TekWidgetRec {
#endif
/*
+ * Sixel-scrolling is backwards, perhaps from an error in the hardware design.
+ */
+#define SixelScrolling(xw) (!((xw)->keyboard.flags & MODE_DECSDM))
+
+/*
* Per-line flags
*/
#define LINEWRAPPED AttrBIT(0)
diff --git a/app/xterm/run-tic.sh b/app/xterm/run-tic.sh
index 49bd7418b..343edd67d 100644
--- a/app/xterm/run-tic.sh
+++ b/app/xterm/run-tic.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $XTermId: run-tic.sh,v 1.13 2021/01/27 01:04:54 tom Exp $
+# $XTermId: run-tic.sh,v 1.14 2021/09/21 08:03:03 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
@@ -84,6 +84,8 @@ case "x$VER" in
case "$VER" in
*\ [7-9].*|*\ 6.[1-9].20[12][0-9]*)
check=`echo "$VER" | sed -e 's/^.*\.//' -e 's/[^0-9].*$//'`
+ [ "$check" -ge "20210626" ] && \
+ [ "$check" -lt "20210828" ] && use_ncurses6
[ "$check" -lt "$USE_NCURSES" ] && use_ncurses6
;;
*)
diff --git a/app/xterm/screen.c b/app/xterm/screen.c
index 756173cf4..ed4234754 100644
--- a/app/xterm/screen.c
+++ b/app/xterm/screen.c
@@ -1,4 +1,4 @@
-/* $XTermId: screen.c,v 1.598 2021/03/01 08:54:26 tom Exp $ */
+/* $XTermId: screen.c,v 1.602 2021/08/22 20:30:10 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -98,11 +98,7 @@
screen->save_ptr, \
(size_t) scrnHeadSize(screen, (unsigned) (len)))
-#if OPT_SAVE_LINES
#define VisBuf(screen) screen->editBuf_index[screen->whichBuf]
-#else
-#define VisBuf(screen) scrnHeadAddr(screen, screen->saveBuf_index, (unsigned) savelines)
-#endif
/*
* ScrnPtr's can point to different types of data.
@@ -363,26 +359,20 @@ allocScrnBuf(XtermWidget xw, unsigned nrow, unsigned ncol, Char **addr)
return (base);
}
-#if OPT_SAVE_LINES
/*
* Copy line-data from the visible (edit) buffer to the save-lines buffer.
*/
static void
-saveEditBufLines(TScreen *screen, ScrnBuf sb, unsigned n)
+saveEditBufLines(TScreen *screen, unsigned n)
{
unsigned j;
TRACE(("...copying %d lines from editBuf to saveBuf\n", n));
-#if OPT_FIFO_LINES
- (void) sb;
-#endif
+
for (j = 0; j < n; ++j) {
-#if OPT_FIFO_LINES
+
LineData *dst = addScrollback(screen);
-#else
- unsigned k = (screen->savelines + j - n);
- LineData *dst = (LineData *) scrnHeadAddr(screen, sb, k);
-#endif
+
LineData *src = getLineData(screen, (int) j);
copyLineData(dst, src);
}
@@ -400,7 +390,7 @@ unsaveEditBufLines(TScreen *screen, ScrnBuf sb, unsigned n)
for (j = 0; j < n; ++j) {
int extra = (int) (n - j);
LineData *dst = (LineData *) scrnHeadAddr(screen, sb, j);
-#if OPT_FIFO_LINES
+
CLineData *src;
if (extra > screen->saved_fifo || extra > screen->savelines) {
@@ -408,15 +398,10 @@ unsaveEditBufLines(TScreen *screen, ScrnBuf sb, unsigned n)
continue;
}
src = getScrollback(screen, -extra);
-#else
- unsigned k = (screen->savelines - extra);
- CLineData *src = CLineData *scrnHeadAddr(screen,
- screen->saveBuf_index, k);
-#endif
+
copyLineData(dst, src);
}
}
-#endif
/*
* This is called when the screen is resized.
@@ -496,13 +481,7 @@ Reallocate(XtermWidget xw,
}
setupLineData(screen, newBufHead, *sbufaddr, nrow, ncol);
- extractScrnData(screen, newBufHead, oldBufHead, minrows,
-#if OPT_SAVE_LINES
- 0
-#else
- (unsigned) move_down
-#endif
- );
+ extractScrnData(screen, newBufHead, oldBufHead, minrows, 0);
/* Now free the old data */
free(oldBufData);
@@ -588,7 +567,6 @@ ReallocateBufOffsets(XtermWidget xw,
TRACE(("ReallocateBufOffsets %dx%d ->%p\n", nrow, ncol, *sbufaddr));
}
-#if OPT_FIFO_LINES
/*
* Allocate a new FIFO index.
*/
@@ -623,7 +601,6 @@ ReallocateFifoIndex(XtermWidget xw)
screen->saveBuf_index = newBufHead;
}
}
-#endif
/*
* This function dynamically adds support for wide-characters.
@@ -640,13 +617,6 @@ ChangeToWide(XtermWidget xw)
if (xtermLoadWideFonts(xw, True)) {
int whichBuf = screen->whichBuf;
-#if !OPT_FIFO_LINES || !OPT_SAVE_LINES
- int savelines = screen->scrollWidget ? screen->savelines : 0;
-
- if (savelines < 0)
- savelines = 0;
-#endif
-
/*
* If we're displaying the alternate screen, switch the pointers back
* temporarily so ReallocateBufOffsets() will operate on the proper
@@ -655,16 +625,8 @@ ChangeToWide(XtermWidget xw)
if (screen->whichBuf)
SwitchBufPtrs(screen, 0);
-#if OPT_SAVE_LINES
-#if OPT_FIFO_LINES
ReallocateFifoIndex(xw);
-#else
- ReallocateBufOffsets(xw,
- &screen->saveBuf_index,
- &screen->saveBuf_data,
- (unsigned) savelines,
- (unsigned) MaxCols(screen));
-#endif
+
if (screen->editBuf_index[0]) {
ReallocateBufOffsets(xw,
&screen->editBuf_index[0],
@@ -672,13 +634,7 @@ ChangeToWide(XtermWidget xw)
(unsigned) MaxRows(screen),
(unsigned) MaxCols(screen));
}
-#else
- ReallocateBufOffsets(xw,
- &screen->saveBuf_index,
- &screen->saveBuf_data,
- (unsigned) (MaxRows(screen) + savelines),
- (unsigned) MaxCols(screen));
-#endif
+
if (screen->editBuf_index[1]) {
ReallocateBufOffsets(xw,
&screen->editBuf_index[1],
@@ -1117,11 +1073,8 @@ ScrnClearLines(XtermWidget xw, ScrnBuf sb, int where, unsigned n, unsigned size)
* We're always ensured of having a visible buffer, but may not have saved
* lines. Check the pointer that's sure to work.
*/
-#if OPT_SAVE_LINES
+
#define OkAllocBuf(screen) (screen->editBuf_index[0] != 0)
-#else
-#define OkAllocBuf(screen) (screen->saveBuf_index != 0)
-#endif
void
ScrnAllocBuf(XtermWidget xw)
@@ -1130,25 +1083,14 @@ ScrnAllocBuf(XtermWidget xw)
if (!OkAllocBuf(screen)) {
int nrows = MaxRows(screen);
-#if !OPT_SAVE_LINES
- int savelines = screen->scrollWidget ? screen->savelines : 0;
-#endif
TRACE(("ScrnAllocBuf %dx%d (%d)\n",
nrows, MaxCols(screen), screen->savelines));
-#if OPT_SAVE_LINES
if (screen->savelines != 0) {
-#if OPT_FIFO_LINES
/* for FIFO, we only need space for the index - addScrollback inits */
screen->saveBuf_index = allocScrnHead(screen,
(unsigned) (screen->savelines));
-#else
- screen->saveBuf_index = allocScrnBuf(xw,
- (unsigned) screen->savelines,
- (unsigned) MaxCols(screen),
- &screen->saveBuf_data);
-#endif
} else {
screen->saveBuf_index = 0;
}
@@ -1156,12 +1098,6 @@ ScrnAllocBuf(XtermWidget xw)
(unsigned) nrows,
(unsigned) MaxCols(screen),
&screen->editBuf_data[0]);
-#else /* !OPT_SAVE_LINES */
- screen->saveBuf_index = allocScrnBuf(xw,
- (unsigned) (nrows + screen->savelines),
- (unsigned) (MaxCols(screen)),
- &screen->saveBuf_data);
-#endif /* OPT_SAVE_LINES */
screen->visbuf = VisBuf(screen);
}
return;
@@ -1254,43 +1190,15 @@ ScrnDeleteLine(XtermWidget xw, ScrnBuf sb, int last, int where, unsigned n)
/* move up lines */
last -= ((int) n - 1);
-#if OPT_SAVE_LINES
+
if (inSaveBuf(screen, sb, where)) {
-#if !OPT_FIFO_LINES
- int from = where + n;
-#endif
/* we shouldn't be editing the saveBuf, only scroll into it */
assert(last >= screen->savelines);
if (sb != 0) {
-#if OPT_FIFO_LINES
/* copy lines from editBuf to saveBuf (allocating as we go...) */
- saveEditBufLines(screen, sb, n);
-#else
- ScrnClearLines(xw, sb, where, n, size);
-
- /* move the pointers within saveBuf */
- TRACE(("...%smoving pointers in saveBuf (compare %d %d)\n",
- ((screen->savelines > from)
- ? ""
- : "SKIP "),
- screen->savelines,
- from));
- if (screen->savelines > from) {
- MoveLineData(sb,
- (unsigned) where,
- (unsigned) from,
- (unsigned) (screen->savelines - from));
- }
-
- /* reuse storage in saveBuf */
- TRACE(("...reuse %d lines storage in saveBuf\n", n));
- RestoreLineData(sb, (unsigned) screen->savelines - n, n);
-
- /* copy lines from editBuf to saveBuf (into the reused storage) */
- saveEditBufLines(screen, sb, n);
-#endif
+ saveEditBufLines(screen, n);
}
/* adjust variables to fall-thru into changes only to editBuf */
@@ -1299,7 +1207,7 @@ ScrnDeleteLine(XtermWidget xw, ScrnBuf sb, int last, int where, unsigned n)
where = 0;
sb = screen->visbuf;
}
-#endif
+
/*
* Scroll the visible buffer (editBuf).
*/
@@ -2014,9 +1922,6 @@ ScreenResize(XtermWidget xw,
/* update buffers if the screen has changed size */
if (MaxRows(screen) != rows || MaxCols(screen) != cols) {
-#if !OPT_SAVE_LINES
- int whichBuf = 0;
-#endif
int delta_rows = rows - MaxRows(screen);
#if OPT_TRACE
int delta_cols = cols - MaxCols(screen);
@@ -2026,14 +1931,9 @@ ScreenResize(XtermWidget xw,
rows, cols, delta_rows, delta_cols));
if (screen->is_running) {
-#if !OPT_FIFO_LINES
- int savelines = (screen->scrollWidget
- ? screen->savelines
- : 0);
-#endif
if (screen->cursor_state)
HideCursor(xw);
-#if OPT_SAVE_LINES
+
/*
* The non-visible buffer is simple, since we will not copy data
* to/from the saved-lines. Do that first.
@@ -2058,61 +1958,16 @@ ScreenResize(XtermWidget xw,
if (delta_rows < 0) {
unsigned move_up = (unsigned) (-delta_rows);
- ScrnBuf dst = screen->saveBuf_index;
-
-#if OPT_FIFO_LINES
int amount = ((MaxRows(screen) - (int) move_up - 1)
- screen->cur_row);
if (amount < 0) {
/* move line-data from visible-buffer to save-buffer */
- saveEditBufLines(screen, dst, (unsigned) -amount);
+ saveEditBufLines(screen, (unsigned) -amount);
move_down_by = amount;
} else {
move_down_by = 0;
}
-#else /* !OPT_FIFO_LINES */
- int amount = screen->savelines - (int) move_up;
-
- TRACE_SCRNBUF("before save", screen, dst, screen->savelines);
-
- /* shift lines in save-buffer to make room */
- TRACE(("...%smoving pointers in saveBuf (compare %d %d)\n",
- (amount > 0
- ? ""
- : "SKIP "),
- screen->savelines,
- move_up));
- if (amount > 0) {
- SaveLineData(dst, 0, move_up);
-
- MoveLineData(dst,
- 0,
- move_up,
- (unsigned) amount);
-
- TRACE(("...reuse %d lines storage in saveBuf\n", move_up));
- RestoreLineData(dst,
- (unsigned) amount,
- move_up);
- TRACE_SCRNBUF("restoresave", screen, dst, screen->savelines);
- }
-
- /* copy line-data from visible-buffer to save-buffer */
- saveEditBufLines(screen, dst, move_up);
-
- /* after data is copied, reallocate saved-lines */
- (void) Reallocate(xw,
- &screen->saveBuf_index,
- &screen->saveBuf_data,
- (unsigned) savelines,
- (unsigned) cols,
- (unsigned) savelines);
- TRACE_SCRNBUF("reallocSAVE",
- screen,
- screen->saveBuf_index,
- savelines);
-#endif /* OPT_FIFO_LINES */
/* decrease size of visible-buffer */
(void) Reallocate(xw,
@@ -2127,11 +1982,7 @@ ScreenResize(XtermWidget xw,
rows);
} else {
unsigned move_down = (unsigned) delta_rows;
-#if OPT_FIFO_LINES
long unsave_fifo;
-#else
- ScrnBuf src = screen->saveBuf_index;
-#endif
ScrnBuf dst;
int amount;
@@ -2179,7 +2030,6 @@ ScreenResize(XtermWidget xw,
unsaveEditBufLines(screen, dst, move_down);
TRACE_SCRNBUF("copied", screen, dst, rows);
-#if OPT_FIFO_LINES
unsave_fifo = (long) move_down;
if (screen->saved_fifo < (int) unsave_fifo)
unsave_fifo = screen->saved_fifo;
@@ -2188,42 +2038,10 @@ ScreenResize(XtermWidget xw,
while (unsave_fifo-- > 0) {
deleteScrollback(screen);
}
-#else
- amount = (screen->savelines - (int) move_down);
- TRACE(("...%smoving pointers in saveBuf (compare %d %d)\n",
- (amount > 0
- ? ""
- : "SKIP "),
- rows,
- move_down));
- if (amount > 0) {
- /* shift lines in save-buffer to account for copy */
- src = screen->saveBuf_index;
- SaveLineData(src, amount, move_down);
-
- MoveLineData(src,
- move_down,
- 0,
- (unsigned) amount);
-
- TRACE(("...reuse %d lines storage in saveBuf\n", move_down));
- RestoreLineData(src,
- 0,
- move_down);
- }
-#endif
/* recover storage in save-buffer */
}
} else {
-#if !OPT_FIFO_LINES
- (void) Reallocate(xw,
- &screen->saveBuf_index,
- &screen->saveBuf_data,
- (unsigned) savelines,
- (unsigned) cols,
- (unsigned) savelines);
-#endif
(void) Reallocate(xw,
&screen->editBuf_index[screen->whichBuf],
&screen->editBuf_data[screen->whichBuf],
@@ -2231,29 +2049,7 @@ ScreenResize(XtermWidget xw,
(unsigned) cols,
(unsigned) MaxRows(screen));
}
-#else /* !OPT_SAVE_LINES */
- if (screen->whichBuf
- && GravityIsSouthWest(xw)) {
- /* swap buffer pointers back to make this work */
- whichBuf = screen->whichBuf;
- SwitchBufPtrs(screen, 0);
- } else {
- whichBuf = 0;
- }
- if (screen->editBuf_index[1])
- (void) Reallocate(xw,
- &screen->editBuf_index[1],
- &screen->editBuf_data[1],
- (unsigned) rows,
- (unsigned) cols,
- (unsigned) MaxRows(screen));
- move_down_by = Reallocate(xw,
- &screen->saveBuf_index,
- &screen->saveBuf_data,
- (unsigned) (rows + savelines),
- (unsigned) cols,
- (unsigned) (MaxRows(screen) + savelines));
-#endif /* OPT_SAVE_LINES */
+
screen->visbuf = VisBuf(screen);
}
@@ -2273,11 +2069,6 @@ ScreenResize(XtermWidget xw,
set_cur_row(screen, screen->cur_row + move_down_by);
screen->cursorp.row += move_down_by;
ScrollSelection(screen, move_down_by, True);
-
-#if !OPT_SAVE_LINES
- if (whichBuf)
- SwitchBufPtrs(screen, whichBuf); /* put the pointers back */
-#endif
}
}
@@ -2791,7 +2582,7 @@ ScrnMarkRectangle(XtermWidget xw,
(exact
? ((target->right - target->left) + 1)
: (getMaxCol(screen) - getMinCol(screen) + 1)),
- False);
+ True);
}
}
diff --git a/app/xterm/scrollbar.c b/app/xterm/scrollbar.c
index 0bec7cd99..f3d5c8730 100644
--- a/app/xterm/scrollbar.c
+++ b/app/xterm/scrollbar.c
@@ -1,4 +1,4 @@
-/* $XTermId: scrollbar.c,v 1.211 2021/02/02 00:19:32 tom Exp $ */
+/* $XTermId: scrollbar.c,v 1.212 2021/06/06 23:14:52 Stelios.Bounanos Exp $ */
/*
* Copyright 2000-2020,2021 by Thomas E. Dickey
@@ -379,7 +379,9 @@ WindowScroll(XtermWidget xw, int top, Bool always)
(void) always;
#if OPT_SCROLL_LOCK
- if (screen->allowScrollLock && (screen->scroll_lock && !always)) {
+ if (((screen->allowScrollLock && screen->scroll_lock)
+ || (screen->autoScrollLock && top < 0))
+ && !always) {
if (screen->scroll_dirty) {
screen->scroll_dirty = False;
ScrnRefresh(xw, 0, 0, MaxRows(screen), MaxCols(screen), False);
diff --git a/app/xterm/svg.c b/app/xterm/svg.c
index 96ba14e5e..73207e2af 100644
--- a/app/xterm/svg.c
+++ b/app/xterm/svg.c
@@ -1,4 +1,4 @@
-/* $XTermId: svg.c,v 1.19 2021/02/25 23:20:05 tom Exp $ */
+/* $XTermId: svg.c,v 1.21 2021/09/19 18:22:57 tom Exp $ */
/*
* Copyright 2017-2020,2021 Thomas E. Dickey
@@ -166,8 +166,8 @@ dumpSvgLine(XtermWidget xw, int row, FILE *fp)
}
#endif
- XQueryColor(xw->screen.display, xw->core.colormap, &fgcolor);
- XQueryColor(xw->screen.display, xw->core.colormap, &bgcolor);
+ (void) QueryOneColor(xw, &fgcolor);
+ (void) QueryOneColor(xw, &bgcolor);
xevents(xw);
if (ld->attribs[col] & BLINK) {
diff --git a/app/xterm/terminfo b/app/xterm/terminfo
index b6dfcd17e..00827a50c 100644
--- a/app/xterm/terminfo
+++ b/app/xterm/terminfo
@@ -1,4 +1,4 @@
-# $XTermId: terminfo,v 1.197 2021/02/28 12:02:56 tom Exp $
+# $XTermId: terminfo,v 1.200 2021/09/21 20:22:27 tom Exp $
#
# Updates/notes/new entries (e.g., xterm-8bit, xterm-16color, xterm-256color)
# - Thomas E. Dickey
@@ -147,8 +147,9 @@ xterm-new|modern xterm terminal emulator,
# Left/right margins are supported in xterm since patch #279 (2012/05/10)
vt420+lrmm|VT420 left/right margins,
- mgc=\E[?69l,
+ mgc=\E[?69l, smglp=\E[?69h\E[%i%p1%ds,
smglr=\E[?69h\E[%i%p1%d;%p2%ds,
+ smgrp=\E[?69h\E[%i;%p1%ds,
# These "ansi+XXX" blocks were added in ncurses 5.0:
ansi+rep,
@@ -1347,8 +1348,27 @@ xterm-sun|xterm with sun function keys,
knp=\E[222z,
kpp=\E[216z,
kund=\E[195z,
+ use=xterm+nopcfkeys,
use=xterm+nofkeys,
-#
+
+# Note: normally xterm supports modified function-keys as described in
+# XTerm - "Other" modified keys
+# https://invisible-island.net/xterm/modified-keys.html
+#
+# However, xterm-hp, xterm-sco and xterm-sun assume no modifiers. Here is
+# a simple script which demonstrates these descriptions:
+# #!/bin/sh
+# export TERM=xterm-$1
+# xterm \
+# -kt $1 \
+# -fs 16 -fa mono \
+# -title $TERM \
+# -tn $TERM \
+# -xrm '*modifyCursorKeys:-1' \
+# -xrm '*modifyFunctionKeys:-1' \
+# -e tack
+# e.g., "foo sun" if the script is named "foo" -TD
+
xterm-hp|xterm with hpterm function keys,
kclr=\EJ,
kcub1=\ED,
@@ -1370,6 +1390,7 @@ xterm-hp|xterm with hpterm function keys,
knp=\ES,
kpp=\ET,
use=xterm+nofkeys,
+ use=xterm+nopcfkeys,
#
# scoterm implements 48 function-keys using shift- and control-modifiers to
# multiple 12 function-keys. X has a hard-coded limit of 35 function-keys,
@@ -1579,6 +1600,58 @@ xterm+alt+title|xterm 90 and 251 features combined,
rmcup=\E[?1049l\E[23;0;0t,
smcup=\E[?1049h\E[22;0;0t,
+# The xterm ctrlFKeys resource defaults to 10, so without the "pc-style"
+# feature, e.g., setting the modifyCursorKeys and modifyFunctionKeys resources
+# to -1 to disable them, one gets 42 function-keys on a 12-function-key
+# keyboard, e.g.,
+# kf1 = \E[11~
+# kf11 shift f1 = \E[23~
+# kf21 control f1 = \E[42~
+# kf31 shift control f1 = \E[52~
+xterm+nopcfkeys|fragment without PC-style fkeys,
+ kf1=\E[11~,
+ kf10=\E[21~,
+ kf11=\E[23~,
+ kf12=\E[24~,
+ kf13=\E[25~,
+ kf14=\E[26~,
+ kf15=\E[28~,
+ kf16=\E[29~,
+ kf17=\E[31~,
+ kf18=\E[32~,
+ kf19=\E[33~,
+ kf2=\E[12~,
+ kf20=\E[34~,
+ kf21=\E[42~,
+ kf22=\E[43~,
+ kf23=\E[44~,
+ kf24=\E[45~,
+ kf25=\E[46~,
+ kf26=\E[47~,
+ kf27=\E[48~,
+ kf28=\E[49~,
+ kf29=\E[50~,
+ kf3=\E[13~,
+ kf30=\E[51~,
+ kf31=\E[52~,
+ kf32=\E[53~,
+ kf33=\E[54~,
+ kf34=\E[55~,
+ kf35=\E[56~,
+ kf36=\E[57~,
+ kf37=\E[58~,
+ kf38=\E[59~,
+ kf39=\E[60~,
+ kf4=\E[14~,
+ kf40=\E[61~,
+ kf41=\E[62~,
+ kf42=\E[63~,
+ kf5=\E[15~,
+ kf6=\E[17~,
+ kf7=\E[18~,
+ kf8=\E[19~,
+ kf9=\E[20~,
+
# from development after ncurses 6.1:
# Xterm's emulation of the VT100 numeric keypad on a PC-keyboard runs into the
# problem that the keypad layout is different, and that the natural choice for
@@ -1593,19 +1666,32 @@ xterm+alt+title|xterm 90 and 251 features combined,
# | NumLock | / | * | - |
# | | $Oo | $Oj | $OS |
# |_________|__kpDIV__|__kpMUL__|__kpSUB__|
-# | 7 8 9 | |
-# | $Ow | $Ox | $Oy | + |
-# |_ka1__K1_|_________|_ka3__K3_| $Ok |
-# | 4 | 5 | 6 | kpADD |
+# | 7 8 9 | + |
+# | $Ow | $Ox | $Oy | $Ok |
+# |_ka1__K1_|_________|_ka3__K3_| kpADD |
+# | 4 | 5 | 6 | |
# | $Ot | $Ou | $Ov | |
# |_________|_kb2__K2_|_________|_________|
# | 1 | 2 | 3 | |
# | $Oq | $Or | $Os | |
# |_kc1__K4_|_________|_kc3__K5_| enter |
-# | 0 | . | $OM |
-# | $Op | $On | |
-# |___________________|_________|_kent_@8_|
+# | 0 | . | $OM |
+# | $Op | $On | |
+# |_______kpZRO_______|__kpDOT__|_kent_@8_|
+#
+# ka2, kb1, kb3 and kc2 are extensions, as are the mixed-case names.
+# There are no termcap equivalents for these extensions.
+#
+# kpCMA (comma) is used here for the VT100 keypad, which xterm emulates with
+# shifted-keypad-plus, though normally that invokes a font-size change.
+#
+# Old versions of xterm, e.g., xterm-xfree86, documented \EOE as kb2, which
+# does not fit into this layout. The extension kp5 fits, but is not visible
+# to termcap applications. As an alternative, kbeg (which does have a termcap
+# equivalent) is provided.
+
xterm+keypad|xterm emulating VT100/VT220 numeric keypad,
+ kbeg=\EOE,
kp5=\EOE,
kpADD=\EOk,
kpCMA=\EOl,
@@ -1884,7 +1970,7 @@ xterm+256color|original xterm 256-color feature,
colors#0x100,
pairs#0x10000,
initc=\E]4;
- %p1%d;rgb:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
+ %p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
oc=\E]104\007,
setab=\E[
%?
@@ -1918,7 +2004,7 @@ xterm+256color2|xterm 256-color feature,
%e
%p1%{16}%<
%t10%p1%{8}%-%d
- %e48:5:
+ %e48\:5\:
%p1%d
%;
m,
@@ -1929,7 +2015,7 @@ xterm+256color2|xterm 256-color feature,
%e
%p1%{16}%<
%t9%p1%{8}%-%d
- %e38:5:
+ %e38\:5\:
%p1%d
%;
m,
@@ -1968,16 +2054,16 @@ xterm+direct|xterm with direct-color indexing,
%?
%p1%{8}%<
%t4%p1%d
- %e48:2::
- %p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d
+ %e48\:2\:\:
+ %p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d
%;
m,
setaf=\E[
%?
%p1%{8}%<
%t3%p1%d
- %e38:2::
- %p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d
+ %e38\:2\:\:
+ %p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d
%;
m,
setb@,
diff --git a/app/xterm/trace.c b/app/xterm/trace.c
index 32ce1abe4..377faede1 100644
--- a/app/xterm/trace.c
+++ b/app/xterm/trace.c
@@ -1,4 +1,4 @@
-/* $XTermId: trace.c,v 1.233 2021/03/09 01:14:50 tom Exp $ */
+/* $XTermId: trace.c,v 1.234 2021/09/14 20:09:56 tom Exp $ */
/*
* Copyright 1997-2020,2021 by Thomas E. Dickey
@@ -914,6 +914,13 @@ TraceEvent(const char *tag, XEvent *ev, String *params, Cardinal *num_params)
ev->xnoexpose.major_code,
ev->xnoexpose.minor_code));
break;
+ case GraphicsExpose:
+ TRACE((" send_event:%d display %p major:%d minor:%d",
+ ev->xgraphicsexpose.send_event,
+ (void *) ev->xgraphicsexpose.display,
+ ev->xgraphicsexpose.major_code,
+ ev->xgraphicsexpose.minor_code));
+ break;
case SelectionClear:
TRACE((" selection:%s",
TraceAtomName(ev->xselectionclear.display,
diff --git a/app/xterm/util.c b/app/xterm/util.c
index db7ca67a8..2cc80bda1 100644
--- a/app/xterm/util.c
+++ b/app/xterm/util.c
@@ -1,4 +1,4 @@
-/* $XTermId: util.c,v 1.877 2021/03/21 21:27:08 tom Exp $ */
+/* $XTermId: util.c,v 1.887 2021/09/19 18:22:57 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -80,6 +80,13 @@
#include <graphics.h>
+#define IncrementSavedLines(amount) \
+ if (screen->savedlines < screen->savelines) { \
+ if ((screen->savedlines += amount) > screen->savelines) \
+ screen->savedlines = screen->savelines; \
+ ScrollBarDrawThumb(xw, 1); \
+ }
+
static int handle_translated_exposure(XtermWidget xw,
int rect_x,
int rect_y,
@@ -228,15 +235,7 @@ FlushScroll(XtermWidget xw)
refreshheight = screen->scroll_amt;
}
}
- i = screen->savedlines;
- if (i < screen->savelines) {
- i += screen->scroll_amt;
- if (i > screen->savelines) {
- i = screen->savelines;
- }
- screen->savedlines = i;
- ScrollBarDrawThumb(xw, 1);
- }
+ IncrementSavedLines(screen->scroll_amt);
} else {
scrolltop = screen->top_marg + shift;
i = bot - (screen->bot_marg - screen->refresh_amt + screen->scroll_amt);
@@ -611,7 +610,8 @@ xtermScroll(XtermWidget xw, int amount)
&& screen->top_marg == 0);
Boolean scroll_full_line = ((left == 0) && (right == screen->max_col));
- TRACE(("xtermScroll count=%d\n", amount));
+ TRACE(("xtermScroll count=%d (top %d, saved %d)\n", amount,
+ screen->topline, screen->savelines));
screen->cursor_busy += 1;
screen->cursor_moved = True;
@@ -627,7 +627,8 @@ xtermScroll(XtermWidget xw, int amount)
refreshheight = 0;
} else
#if OPT_SCROLL_LOCK
- if (screen->allowScrollLock && screen->scroll_lock) {
+ if ((screen->allowScrollLock && screen->scroll_lock)
+ || (screen->autoScrollLock && screen->topline < 0)) {
refreshheight = 0;
screen->scroll_amt = 0;
screen->refresh_amt = 0;
@@ -686,12 +687,7 @@ xtermScroll(XtermWidget xw, int amount)
scrolltop = 0;
if ((scrollheight += shift) > i)
scrollheight = i;
- if ((i = screen->savedlines) < screen->savelines) {
- if ((i += amount) > screen->savelines)
- i = screen->savelines;
- screen->savedlines = i;
- ScrollBarDrawThumb(xw, 1);
- }
+ IncrementSavedLines(amount);
} else {
scrolltop = screen->top_marg + shift;
if ((i = screen->bot_marg - bot) > 0) {
@@ -769,6 +765,8 @@ xtermScroll(XtermWidget xw, int amount)
done:
screen->do_wrap = save_wrap;
screen->cursor_busy -= 1;
+ TRACE(("...xtermScroll count=%d (top %d, saved %d)\n", amount,
+ screen->topline, screen->savelines));
return;
}
@@ -1304,7 +1302,7 @@ InsertLine(XtermWidget xw, int n)
* at the cursor's position, lines added at bottom margin are blank.
*/
void
-DeleteLine(XtermWidget xw, int n)
+DeleteLine(XtermWidget xw, int n, Bool canSave)
{
TScreen *screen = TScreenOf(xw);
int i;
@@ -1340,8 +1338,10 @@ DeleteLine(XtermWidget xw, int n)
if (screen->scroll_amt >= 0 && screen->cur_row == screen->top_marg) {
if (screen->refresh_amt + n > MaxRows(screen))
FlushScroll(xw);
- screen->scroll_amt += n;
- screen->refresh_amt += n;
+ if (canSave) {
+ screen->scroll_amt += n;
+ screen->refresh_amt += n;
+ }
} else {
if (screen->scroll_amt)
FlushScroll(xw);
@@ -1352,7 +1352,7 @@ DeleteLine(XtermWidget xw, int n)
if (n > 0) {
if (left > 0 || right < screen->max_col) {
scrollInMargins(xw, n, screen->cur_row);
- } else if (scroll_all_lines) {
+ } else if (canSave && scroll_all_lines) {
ScrnDeleteLine(xw,
screen->saveBuf_index,
screen->bot_marg + screen->savelines,
@@ -1386,16 +1386,11 @@ DeleteLine(XtermWidget xw, int n)
if ((refreshtop = screen->bot_marg - refreshheight + 1 + shift) >
(i = screen->max_row - refreshheight + 1))
refreshtop = i;
- if (scroll_all_lines) {
+ if (canSave && scroll_all_lines) {
scrolltop = 0;
if ((scrollheight += shift) > i)
scrollheight = i;
- if ((i = screen->savedlines) < screen->savelines) {
- if ((i += n) > screen->savelines)
- i = screen->savelines;
- screen->savedlines = i;
- ScrollBarDrawThumb(xw, 1);
- }
+ IncrementSavedLines(n);
} else {
scrolltop = screen->cur_row + shift;
if ((i = screen->bot_marg - bot) > 0) {
@@ -2013,6 +2008,25 @@ do_erase_display(XtermWidget xw, int param, int mode)
}
static Boolean
+row_has_data(TScreen *screen, int row)
+{
+ Boolean result = False;
+ CLineData *ld;
+
+ if ((ld = getLineData(screen, row)) != 0) {
+ int col;
+
+ for (col = 0; col < screen->max_col; ++col) {
+ if (ld->attribs[col] & CHARDRAWN && ld->charData[col] != ' ') {
+ result = True;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+static Boolean
screen_has_data(XtermWidget xw)
{
TScreen *screen = TScreenOf(xw);
@@ -2020,39 +2034,69 @@ screen_has_data(XtermWidget xw)
int row;
for (row = 0; row < screen->max_row; ++row) {
- CLineData *ld;
+ if (row_has_data(screen, row)) {
+ result = True;
+ break;
+ }
+ }
+ return result;
+}
- if ((ld = getLineData(screen, row)) != 0) {
- int col;
+static void
+do_extra_scroll(XtermWidget xw, Bool trimmed)
+{
+ TScreen *screen = TScreenOf(xw);
+ int row;
- for (col = 0; col < screen->max_col; ++col) {
- if (ld->attribs[col] & CHARDRAWN) {
- result = True;
- break;
+ if (screen_has_data(xw)) {
+ TRACE(("do_extra_scroll buffer=%d, trimmed=%s\n", screen->whichBuf,
+ BtoS(trimmed)));
+ if (trimmed) {
+ Boolean hadData = ((screen->saved_fifo > 0)
+ ? row_has_data(screen, -1)
+ : False);
+
+ for (row = 0; row < screen->max_row; ++row) {
+ Boolean hasData = row_has_data(screen, row);
+ if (hasData || hadData) {
+ LineData *dst = addScrollback(screen);
+ LineData *src = getLineData(screen, row);
+ copyLineData(dst, src);
+ IncrementSavedLines(1);
}
+ hadData = hasData;
}
+ } else {
+ xtermScroll(xw, screen->max_row);
+ FlushScroll(xw);
}
- if (result)
- break;
+ xtermRepaint(xw);
}
- return result;
}
/*
- * Like tiXtraScroll, perform a scroll up of the page contents. In this case,
- * it happens for the special case when erasing the whole display starting from
- * the upper-left corner of the screen.
+ * Like tiXtraScroll, perform a scroll up of the page contents.
+ *
+ * In this case, it happens for the special case when erasing the whole
+ * display, e.g., an erase-below starting from the upper-left corner of the
+ * screen, or if the erasure applies to the whole screen.
*/
void
-do_cd_xtra_scroll(XtermWidget xw)
+do_cd_xtra_scroll(XtermWidget xw, int param)
{
TScreen *screen = TScreenOf(xw);
+ TRACE(("do_cd_xtra_scroll param %d, @%d,%d vs %d,%d\n", param,
+ screen->cur_row,
+ screen->cur_col,
+ ScrnTopMargin(xw),
+ ScrnLeftMargin(xw)));
if (xw->misc.cdXtraScroll
- && screen->cur_col == 0
- && screen->cur_row == 0
- && screen_has_data(xw)) {
- xtermScroll(xw, screen->max_row);
+ && (param == 2 ||
+ (param == 0
+ && screen->cur_col <= ScrnLeftMargin(xw)
+ && screen->cur_row <= ScrnTopMargin(xw)))) {
+ do_extra_scroll(xw, (xw->misc.cdXtraScroll == edTrim));
}
}
@@ -2063,10 +2107,8 @@ do_cd_xtra_scroll(XtermWidget xw)
void
do_ti_xtra_scroll(XtermWidget xw)
{
- TScreen *screen = TScreenOf(xw);
-
if (xw->misc.tiXtraScroll) {
- xtermScroll(xw, screen->max_row);
+ do_extra_scroll(xw, False);
}
}
@@ -2708,13 +2750,8 @@ swapLocally(ToSwap * list, int *count, ColorRes * fg, ColorRes * bg hc_param)
ColorRes tmp;
Boolean found = False;
-#if OPT_COLOR_RES
Pixel fg_color = fg->value;
Pixel bg_color = bg->value;
-#else
- Pixel fg_color = *fg;
- Pixel bg_color = *bg;
-#endif
#if OPT_HIGHLIGHT_COLOR
if ((fg_color != bg_color) || !hilite_color)
@@ -2911,7 +2948,7 @@ getXftColor(XtermWidget xw, Pixel pixel)
if (!found) {
i = oldest;
color.pixel = pixel;
- XQueryColor(TScreenOf(xw)->display, xw->core.colormap, &color);
+ (void) QueryOneColor(xw, &color);
cache[i].color.color.red = color.red;
cache[i].color.color.green = color.green;
cache[i].color.color.blue = color.blue;
@@ -2937,14 +2974,14 @@ getXftColor(XtermWidget xw, Pixel pixel)
? (((ch) >= 128 && (ch) < 160) \
? (TScreenOf(xw)->c1_printable ? 1 : 0) \
: 1) \
- : CharWidth(ch)))
+ : CharWidth(TScreenOf(xw), ch)))
#else
#define XtermCellWidth(xw, ch) \
(((ch) == 0 || (ch) == 127) \
? 0 \
: (((ch) < 256) \
? 1 \
- : CharWidth(ch)))
+ : CharWidth(TScreenOf(xw), ch)))
#endif
#endif /* OPT_RENDERWIDE */
@@ -3247,7 +3284,7 @@ ucs_workaround(XTermDraw * params,
IChar eqv = (IChar) AsciiEquivs(ch);
if (eqv != (IChar) ch) {
- int width = CharWidth(ch);
+ int width = CharWidth(screen, ch);
do {
drawXtermText(params,
@@ -3939,7 +3976,7 @@ drawXtermText(XTermDraw * params,
unsigned ch = (unsigned) text[last];
int filler = 0;
#if OPT_WIDE_CHARS
- int needed = forceDbl ? 2 : CharWidth(ch);
+ int needed = forceDbl ? 2 : CharWidth(screen, ch);
XftFont *currFont = pickXftFont(needed, font, wfont);
XftFont *tempFont = 0;
#define CURR_TEMP (tempFont ? tempFont : currFont)
@@ -4210,7 +4247,7 @@ drawXtermText(XTermDraw * params,
drewBoxes = True;
continue;
}
- ch_width = CharWidth(ch);
+ ch_width = CharWidth(screen, ch);
isMissing =
IsXtermMissingChar(screen, ch,
((recur.on_wide || ch_width > 1)
@@ -4335,7 +4372,7 @@ drawXtermText(XTermDraw * params,
if (!needWide
&& !IsIcon(screen)
- && ((recur.on_wide || CharWidth(ch) > 1)
+ && ((recur.on_wide || CharWidth(screen, ch) > 1)
&& okFont(NormalWFont(screen)))) {
needWide = True;
}
@@ -4996,9 +5033,9 @@ getXtermForeground(XtermWidget xw, unsigned attr_flags, int color)
&& ((color >= 0)
|| (result != (Pixel) color))) {
XColor work;
- work.pixel = result;
last_in = result;
- if (XQueryColor(TScreenOf(xw)->display, xw->core.colormap, &work)) {
+ work.pixel = result;
+ if (QueryOneColor(xw, &work)) {
DIM_IT(red);
DIM_IT(green);
DIM_IT(blue);
@@ -5059,7 +5096,7 @@ addXtermCombining(TScreen *screen, int row, int col, unsigned ch)
size_t off;
TRACE(("addXtermCombining %d,%d U+%04X (%d)\n",
- row, col, ch, CharWidth(ch)));
+ row, col, ch, CharWidth(screen, ch)));
for_each_combData(off, ld) {
if (!ld->combData[off][col]) {
diff --git a/app/xterm/version.h b/app/xterm/version.h
index 03a6df1ee..cf303f275 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,4 +1,4 @@
-/* $XTermId: version.h,v 1.512 2021/03/26 22:59:42 tom Exp $ */
+/* $XTermId: version.h,v 1.516 2021/09/21 23:46:34 tom Exp $ */
/*
* Copyright 1998-2020,2021 by Thomas E. Dickey
@@ -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 367
-#define XTERM_DATE 2021-03-26
+#define XTERM_PATCH 369
+#define XTERM_DATE 2021-09-21
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/wcwidth.c b/app/xterm/wcwidth.c
index 658b3ac15..a94c9db0d 100644
--- a/app/xterm/wcwidth.c
+++ b/app/xterm/wcwidth.c
@@ -1,9 +1,9 @@
-/* $XTermId: wcwidth.c,v 1.57 2020/04/27 21:45:06 tom Exp $ */
+/* $XTermId: wcwidth.c,v 1.58 2021/06/12 13:08:53 tom Exp $ */
/* $XFree86: xc/programs/xterm/wcwidth.c,v 1.9 2006/06/19 00:36:52 dickey Exp $ */
/*
- * Copyright 2002-2019,2020 by Thomas E. Dickey
+ * Copyright 2002-2020,2021 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -47,7 +47,7 @@
*
* Since then, additional updates have been made:
* + data-type fixes
- * + new Unicode releases (6.2.0, 9.0.0),
+ * + new Unicode releases (6.2.0, 9.0.0, etc),
* + additional special symbol blocks have been added to the special cases.
* + soft-hyphen behavior has been made configurable.
* + added table shows when a character is not part of Unicode.
@@ -112,6 +112,7 @@
* disclaims all warranties with regard to this software.
*
* Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+ *-----------------------------------------------------------------------------
*/
#ifdef TEST_DRIVER
@@ -225,20 +226,21 @@ int mk_wcwidth(wchar_t ucs)
{ 0x0730, 0x074A }, { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 },
{ 0x07FD, 0x07FD }, { 0x0816, 0x0819 }, { 0x081B, 0x0823 },
{ 0x0825, 0x0827 }, { 0x0829, 0x082D }, { 0x0859, 0x085B },
- { 0x08D3, 0x0902 }, { 0x093A, 0x093A }, { 0x093C, 0x093C },
- { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0957 },
- { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC },
- { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 },
- { 0x09FE, 0x09FE }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },
- { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },
- { 0x0A51, 0x0A51 }, { 0x0A70, 0x0A71 }, { 0x0A75, 0x0A75 },
- { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 },
- { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0AE2, 0x0AE3 },
- { 0x0AFA, 0x0AFF }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
- { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B44 }, { 0x0B4D, 0x0B4D },
- { 0x0B55, 0x0B56 }, { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 },
- { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C00, 0x0C00 },
- { 0x0C04, 0x0C04 }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
+ { 0x0890, 0x0891 }, { 0x0898, 0x089F }, { 0x08CA, 0x0902 },
+ { 0x093A, 0x093A }, { 0x093C, 0x093C }, { 0x0941, 0x0948 },
+ { 0x094D, 0x094D }, { 0x0951, 0x0957 }, { 0x0962, 0x0963 },
+ { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 },
+ { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, { 0x09FE, 0x09FE },
+ { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 },
+ { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A51, 0x0A51 },
+ { 0x0A70, 0x0A71 }, { 0x0A75, 0x0A75 }, { 0x0A81, 0x0A82 },
+ { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 },
+ { 0x0ACD, 0x0ACD }, { 0x0AE2, 0x0AE3 }, { 0x0AFA, 0x0AFF },
+ { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F },
+ { 0x0B41, 0x0B44 }, { 0x0B4D, 0x0B4D }, { 0x0B55, 0x0B56 },
+ { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 },
+ { 0x0BCD, 0x0BCD }, { 0x0C00, 0x0C00 }, { 0x0C04, 0x0C04 },
+ { 0x0C3C, 0x0C3C }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
{ 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0C62, 0x0C63 },
{ 0x0C81, 0x0C81 }, { 0x0CBC, 0x0CBC }, { 0x0CBF, 0x0CBF },
{ 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, { 0x0CE2, 0x0CE3 },
@@ -255,45 +257,46 @@ int mk_wcwidth(wchar_t ucs)
{ 0x105E, 0x1060 }, { 0x1071, 0x1074 }, { 0x1082, 0x1082 },
{ 0x1085, 0x1086 }, { 0x108D, 0x108D }, { 0x109D, 0x109D },
{ 0x1160, 0x11FF }, { 0x135D, 0x135F }, { 0x1712, 0x1714 },
- { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, { 0x1772, 0x1773 },
+ { 0x1732, 0x1733 }, { 0x1752, 0x1753 }, { 0x1772, 0x1773 },
{ 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 },
- { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, { 0x180B, 0x180E },
+ { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, { 0x180B, 0x180F },
{ 0x1885, 0x1886 }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },
{ 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B },
{ 0x1A17, 0x1A18 }, { 0x1A1B, 0x1A1B }, { 0x1A56, 0x1A56 },
{ 0x1A58, 0x1A5E }, { 0x1A60, 0x1A60 }, { 0x1A62, 0x1A62 },
{ 0x1A65, 0x1A6C }, { 0x1A73, 0x1A7C }, { 0x1A7F, 0x1A7F },
- { 0x1AB0, 0x1AC0 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
+ { 0x1AB0, 0x1ACE }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
{ 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },
{ 0x1B6B, 0x1B73 }, { 0x1B80, 0x1B81 }, { 0x1BA2, 0x1BA5 },
{ 0x1BA8, 0x1BA9 }, { 0x1BAB, 0x1BAD }, { 0x1BE6, 0x1BE6 },
{ 0x1BE8, 0x1BE9 }, { 0x1BED, 0x1BED }, { 0x1BEF, 0x1BF1 },
{ 0x1C2C, 0x1C33 }, { 0x1C36, 0x1C37 }, { 0x1CD0, 0x1CD2 },
{ 0x1CD4, 0x1CE0 }, { 0x1CE2, 0x1CE8 }, { 0x1CED, 0x1CED },
- { 0x1CF4, 0x1CF4 }, { 0x1CF8, 0x1CF9 }, { 0x1DC0, 0x1DF9 },
- { 0x1DFB, 0x1DFF }, { 0x200B, 0x200F }, { 0x202A, 0x202E },
- { 0x2060, 0x2064 }, { 0x2066, 0x206F }, { 0x20D0, 0x20F0 },
- { 0x2CEF, 0x2CF1 }, { 0x2D7F, 0x2D7F }, { 0x2DE0, 0x2DFF },
- { 0x302A, 0x302D }, { 0x3099, 0x309A }, { 0xA66F, 0xA672 },
- { 0xA674, 0xA67D }, { 0xA69E, 0xA69F }, { 0xA6F0, 0xA6F1 },
- { 0xA802, 0xA802 }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
- { 0xA825, 0xA826 }, { 0xA82C, 0xA82C }, { 0xA8C4, 0xA8C5 },
- { 0xA8E0, 0xA8F1 }, { 0xA8FF, 0xA8FF }, { 0xA926, 0xA92D },
- { 0xA947, 0xA951 }, { 0xA980, 0xA982 }, { 0xA9B3, 0xA9B3 },
- { 0xA9B6, 0xA9B9 }, { 0xA9BC, 0xA9BD }, { 0xA9E5, 0xA9E5 },
- { 0xAA29, 0xAA2E }, { 0xAA31, 0xAA32 }, { 0xAA35, 0xAA36 },
- { 0xAA43, 0xAA43 }, { 0xAA4C, 0xAA4C }, { 0xAA7C, 0xAA7C },
- { 0xAAB0, 0xAAB0 }, { 0xAAB2, 0xAAB4 }, { 0xAAB7, 0xAAB8 },
- { 0xAABE, 0xAABF }, { 0xAAC1, 0xAAC1 }, { 0xAAEC, 0xAAED },
- { 0xAAF6, 0xAAF6 }, { 0xABE5, 0xABE5 }, { 0xABE8, 0xABE8 },
- { 0xABED, 0xABED }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },
- { 0xFE20, 0xFE2F }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },
- { 0x101FD, 0x101FD }, { 0x102E0, 0x102E0 }, { 0x10376, 0x1037A },
- { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },
- { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x10AE5, 0x10AE6 },
- { 0x10D24, 0x10D27 }, { 0x10EAB, 0x10EAC }, { 0x10F46, 0x10F50 },
- { 0x11001, 0x11001 }, { 0x11038, 0x11046 }, { 0x1107F, 0x11081 },
- { 0x110B3, 0x110B6 }, { 0x110B9, 0x110BA }, { 0x110BD, 0x110BD },
+ { 0x1CF4, 0x1CF4 }, { 0x1CF8, 0x1CF9 }, { 0x1DC0, 0x1DFF },
+ { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2064 },
+ { 0x2066, 0x206F }, { 0x20D0, 0x20F0 }, { 0x2CEF, 0x2CF1 },
+ { 0x2D7F, 0x2D7F }, { 0x2DE0, 0x2DFF }, { 0x302A, 0x302D },
+ { 0x3099, 0x309A }, { 0xA66F, 0xA672 }, { 0xA674, 0xA67D },
+ { 0xA69E, 0xA69F }, { 0xA6F0, 0xA6F1 }, { 0xA802, 0xA802 },
+ { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, { 0xA825, 0xA826 },
+ { 0xA82C, 0xA82C }, { 0xA8C4, 0xA8C5 }, { 0xA8E0, 0xA8F1 },
+ { 0xA8FF, 0xA8FF }, { 0xA926, 0xA92D }, { 0xA947, 0xA951 },
+ { 0xA980, 0xA982 }, { 0xA9B3, 0xA9B3 }, { 0xA9B6, 0xA9B9 },
+ { 0xA9BC, 0xA9BD }, { 0xA9E5, 0xA9E5 }, { 0xAA29, 0xAA2E },
+ { 0xAA31, 0xAA32 }, { 0xAA35, 0xAA36 }, { 0xAA43, 0xAA43 },
+ { 0xAA4C, 0xAA4C }, { 0xAA7C, 0xAA7C }, { 0xAAB0, 0xAAB0 },
+ { 0xAAB2, 0xAAB4 }, { 0xAAB7, 0xAAB8 }, { 0xAABE, 0xAABF },
+ { 0xAAC1, 0xAAC1 }, { 0xAAEC, 0xAAED }, { 0xAAF6, 0xAAF6 },
+ { 0xABE5, 0xABE5 }, { 0xABE8, 0xABE8 }, { 0xABED, 0xABED },
+ { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE2F },
+ { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, { 0x101FD, 0x101FD },
+ { 0x102E0, 0x102E0 }, { 0x10376, 0x1037A }, { 0x10A01, 0x10A03 },
+ { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, { 0x10A38, 0x10A3A },
+ { 0x10A3F, 0x10A3F }, { 0x10AE5, 0x10AE6 }, { 0x10D24, 0x10D27 },
+ { 0x10EAB, 0x10EAC }, { 0x10F46, 0x10F50 }, { 0x10F82, 0x10F85 },
+ { 0x11001, 0x11001 }, { 0x11038, 0x11046 }, { 0x11070, 0x11070 },
+ { 0x11073, 0x11074 }, { 0x1107F, 0x11081 }, { 0x110B3, 0x110B6 },
+ { 0x110B9, 0x110BA }, { 0x110BD, 0x110BD }, { 0x110C2, 0x110C2 },
{ 0x110CD, 0x110CD }, { 0x11100, 0x11102 }, { 0x11127, 0x1112B },
{ 0x1112D, 0x11134 }, { 0x11173, 0x11173 }, { 0x11180, 0x11181 },
{ 0x111B6, 0x111BE }, { 0x111C9, 0x111CC }, { 0x111CF, 0x111CF },
@@ -321,12 +324,13 @@ int mk_wcwidth(wchar_t ucs)
{ 0x11D97, 0x11D97 }, { 0x11EF3, 0x11EF4 }, { 0x13430, 0x13438 },
{ 0x16AF0, 0x16AF4 }, { 0x16B30, 0x16B36 }, { 0x16F4F, 0x16F4F },
{ 0x16F8F, 0x16F92 }, { 0x16FE4, 0x16FE4 }, { 0x1BC9D, 0x1BC9E },
- { 0x1BCA0, 0x1BCA3 }, { 0x1D167, 0x1D169 }, { 0x1D173, 0x1D182 },
- { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, { 0x1D242, 0x1D244 },
- { 0x1DA00, 0x1DA36 }, { 0x1DA3B, 0x1DA6C }, { 0x1DA75, 0x1DA75 },
- { 0x1DA84, 0x1DA84 }, { 0x1DA9B, 0x1DA9F }, { 0x1DAA1, 0x1DAAF },
- { 0x1E000, 0x1E006 }, { 0x1E008, 0x1E018 }, { 0x1E01B, 0x1E021 },
- { 0x1E023, 0x1E024 }, { 0x1E026, 0x1E02A }, { 0x1E130, 0x1E136 },
+ { 0x1BCA0, 0x1BCA3 }, { 0x1CF00, 0x1CF2D }, { 0x1CF30, 0x1CF46 },
+ { 0x1D167, 0x1D169 }, { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B },
+ { 0x1D1AA, 0x1D1AD }, { 0x1D242, 0x1D244 }, { 0x1DA00, 0x1DA36 },
+ { 0x1DA3B, 0x1DA6C }, { 0x1DA75, 0x1DA75 }, { 0x1DA84, 0x1DA84 },
+ { 0x1DA9B, 0x1DA9F }, { 0x1DAA1, 0x1DAAF }, { 0x1E000, 0x1E006 },
+ { 0x1E008, 0x1E018 }, { 0x1E01B, 0x1E021 }, { 0x1E023, 0x1E024 },
+ { 0x1E026, 0x1E02A }, { 0x1E130, 0x1E136 }, { 0x1E2AE, 0x1E2AE },
{ 0x1E2EC, 0x1E2EF }, { 0x1E8D0, 0x1E8D6 }, { 0x1E944, 0x1E94A },
{ 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, { 0xE0100, 0xE01EF }
};
@@ -343,42 +347,42 @@ int mk_wcwidth(wchar_t ucs)
{ 0x038D, 0x038D }, { 0x03A2, 0x03A2 }, { 0x0530, 0x0530 },
{ 0x0557, 0x0558 }, { 0x058B, 0x058C }, { 0x0590, 0x0590 },
{ 0x05C8, 0x05CF }, { 0x05EB, 0x05EE }, { 0x05F5, 0x05FF },
- { 0x061D, 0x061D }, { 0x070E, 0x070E }, { 0x074B, 0x074C },
- { 0x07B2, 0x07BF }, { 0x07FB, 0x07FC }, { 0x082E, 0x082F },
- { 0x083F, 0x083F }, { 0x085C, 0x085D }, { 0x085F, 0x085F },
- { 0x086B, 0x089F }, { 0x08B5, 0x08B5 }, { 0x08C8, 0x08D2 },
- { 0x0984, 0x0984 }, { 0x098D, 0x098E }, { 0x0991, 0x0992 },
- { 0x09A9, 0x09A9 }, { 0x09B1, 0x09B1 }, { 0x09B3, 0x09B5 },
- { 0x09BA, 0x09BB }, { 0x09C5, 0x09C6 }, { 0x09C9, 0x09CA },
- { 0x09CF, 0x09D6 }, { 0x09D8, 0x09DB }, { 0x09DE, 0x09DE },
- { 0x09E4, 0x09E5 }, { 0x09FF, 0x0A00 }, { 0x0A04, 0x0A04 },
- { 0x0A0B, 0x0A0E }, { 0x0A11, 0x0A12 }, { 0x0A29, 0x0A29 },
- { 0x0A31, 0x0A31 }, { 0x0A34, 0x0A34 }, { 0x0A37, 0x0A37 },
- { 0x0A3A, 0x0A3B }, { 0x0A3D, 0x0A3D }, { 0x0A43, 0x0A46 },
- { 0x0A49, 0x0A4A }, { 0x0A4E, 0x0A50 }, { 0x0A52, 0x0A58 },
- { 0x0A5D, 0x0A5D }, { 0x0A5F, 0x0A65 }, { 0x0A77, 0x0A80 },
- { 0x0A84, 0x0A84 }, { 0x0A8E, 0x0A8E }, { 0x0A92, 0x0A92 },
- { 0x0AA9, 0x0AA9 }, { 0x0AB1, 0x0AB1 }, { 0x0AB4, 0x0AB4 },
- { 0x0ABA, 0x0ABB }, { 0x0AC6, 0x0AC6 }, { 0x0ACA, 0x0ACA },
- { 0x0ACE, 0x0ACF }, { 0x0AD1, 0x0ADF }, { 0x0AE4, 0x0AE5 },
- { 0x0AF2, 0x0AF8 }, { 0x0B00, 0x0B00 }, { 0x0B04, 0x0B04 },
- { 0x0B0D, 0x0B0E }, { 0x0B11, 0x0B12 }, { 0x0B29, 0x0B29 },
- { 0x0B31, 0x0B31 }, { 0x0B34, 0x0B34 }, { 0x0B3A, 0x0B3B },
- { 0x0B45, 0x0B46 }, { 0x0B49, 0x0B4A }, { 0x0B4E, 0x0B54 },
- { 0x0B58, 0x0B5B }, { 0x0B5E, 0x0B5E }, { 0x0B64, 0x0B65 },
- { 0x0B78, 0x0B81 }, { 0x0B84, 0x0B84 }, { 0x0B8B, 0x0B8D },
- { 0x0B91, 0x0B91 }, { 0x0B96, 0x0B98 }, { 0x0B9B, 0x0B9B },
- { 0x0B9D, 0x0B9D }, { 0x0BA0, 0x0BA2 }, { 0x0BA5, 0x0BA7 },
- { 0x0BAB, 0x0BAD }, { 0x0BBA, 0x0BBD }, { 0x0BC3, 0x0BC5 },
- { 0x0BC9, 0x0BC9 }, { 0x0BCE, 0x0BCF }, { 0x0BD1, 0x0BD6 },
- { 0x0BD8, 0x0BE5 }, { 0x0BFB, 0x0BFF }, { 0x0C0D, 0x0C0D },
- { 0x0C11, 0x0C11 }, { 0x0C29, 0x0C29 }, { 0x0C3A, 0x0C3C },
- { 0x0C45, 0x0C45 }, { 0x0C49, 0x0C49 }, { 0x0C4E, 0x0C54 },
- { 0x0C57, 0x0C57 }, { 0x0C5B, 0x0C5F }, { 0x0C64, 0x0C65 },
+ { 0x070E, 0x070E }, { 0x074B, 0x074C }, { 0x07B2, 0x07BF },
+ { 0x07FB, 0x07FC }, { 0x082E, 0x082F }, { 0x083F, 0x083F },
+ { 0x085C, 0x085D }, { 0x085F, 0x085F }, { 0x086B, 0x086F },
+ { 0x088F, 0x088F }, { 0x0892, 0x0897 }, { 0x0984, 0x0984 },
+ { 0x098D, 0x098E }, { 0x0991, 0x0992 }, { 0x09A9, 0x09A9 },
+ { 0x09B1, 0x09B1 }, { 0x09B3, 0x09B5 }, { 0x09BA, 0x09BB },
+ { 0x09C5, 0x09C6 }, { 0x09C9, 0x09CA }, { 0x09CF, 0x09D6 },
+ { 0x09D8, 0x09DB }, { 0x09DE, 0x09DE }, { 0x09E4, 0x09E5 },
+ { 0x09FF, 0x0A00 }, { 0x0A04, 0x0A04 }, { 0x0A0B, 0x0A0E },
+ { 0x0A11, 0x0A12 }, { 0x0A29, 0x0A29 }, { 0x0A31, 0x0A31 },
+ { 0x0A34, 0x0A34 }, { 0x0A37, 0x0A37 }, { 0x0A3A, 0x0A3B },
+ { 0x0A3D, 0x0A3D }, { 0x0A43, 0x0A46 }, { 0x0A49, 0x0A4A },
+ { 0x0A4E, 0x0A50 }, { 0x0A52, 0x0A58 }, { 0x0A5D, 0x0A5D },
+ { 0x0A5F, 0x0A65 }, { 0x0A77, 0x0A80 }, { 0x0A84, 0x0A84 },
+ { 0x0A8E, 0x0A8E }, { 0x0A92, 0x0A92 }, { 0x0AA9, 0x0AA9 },
+ { 0x0AB1, 0x0AB1 }, { 0x0AB4, 0x0AB4 }, { 0x0ABA, 0x0ABB },
+ { 0x0AC6, 0x0AC6 }, { 0x0ACA, 0x0ACA }, { 0x0ACE, 0x0ACF },
+ { 0x0AD1, 0x0ADF }, { 0x0AE4, 0x0AE5 }, { 0x0AF2, 0x0AF8 },
+ { 0x0B00, 0x0B00 }, { 0x0B04, 0x0B04 }, { 0x0B0D, 0x0B0E },
+ { 0x0B11, 0x0B12 }, { 0x0B29, 0x0B29 }, { 0x0B31, 0x0B31 },
+ { 0x0B34, 0x0B34 }, { 0x0B3A, 0x0B3B }, { 0x0B45, 0x0B46 },
+ { 0x0B49, 0x0B4A }, { 0x0B4E, 0x0B54 }, { 0x0B58, 0x0B5B },
+ { 0x0B5E, 0x0B5E }, { 0x0B64, 0x0B65 }, { 0x0B78, 0x0B81 },
+ { 0x0B84, 0x0B84 }, { 0x0B8B, 0x0B8D }, { 0x0B91, 0x0B91 },
+ { 0x0B96, 0x0B98 }, { 0x0B9B, 0x0B9B }, { 0x0B9D, 0x0B9D },
+ { 0x0BA0, 0x0BA2 }, { 0x0BA5, 0x0BA7 }, { 0x0BAB, 0x0BAD },
+ { 0x0BBA, 0x0BBD }, { 0x0BC3, 0x0BC5 }, { 0x0BC9, 0x0BC9 },
+ { 0x0BCE, 0x0BCF }, { 0x0BD1, 0x0BD6 }, { 0x0BD8, 0x0BE5 },
+ { 0x0BFB, 0x0BFF }, { 0x0C0D, 0x0C0D }, { 0x0C11, 0x0C11 },
+ { 0x0C29, 0x0C29 }, { 0x0C3A, 0x0C3B }, { 0x0C45, 0x0C45 },
+ { 0x0C49, 0x0C49 }, { 0x0C4E, 0x0C54 }, { 0x0C57, 0x0C57 },
+ { 0x0C5B, 0x0C5C }, { 0x0C5E, 0x0C5F }, { 0x0C64, 0x0C65 },
{ 0x0C70, 0x0C76 }, { 0x0C8D, 0x0C8D }, { 0x0C91, 0x0C91 },
{ 0x0CA9, 0x0CA9 }, { 0x0CB4, 0x0CB4 }, { 0x0CBA, 0x0CBB },
{ 0x0CC5, 0x0CC5 }, { 0x0CC9, 0x0CC9 }, { 0x0CCE, 0x0CD4 },
- { 0x0CD7, 0x0CDD }, { 0x0CDF, 0x0CDF }, { 0x0CE4, 0x0CE5 },
+ { 0x0CD7, 0x0CDC }, { 0x0CDF, 0x0CDF }, { 0x0CE4, 0x0CE5 },
{ 0x0CF0, 0x0CF0 }, { 0x0CF3, 0x0CFF }, { 0x0D0D, 0x0D0D },
{ 0x0D11, 0x0D11 }, { 0x0D45, 0x0D45 }, { 0x0D49, 0x0D49 },
{ 0x0D50, 0x0D53 }, { 0x0D64, 0x0D65 }, { 0x0D80, 0x0D80 },
@@ -400,42 +404,41 @@ int mk_wcwidth(wchar_t ucs)
{ 0x12C6, 0x12C7 }, { 0x12D7, 0x12D7 }, { 0x1311, 0x1311 },
{ 0x1316, 0x1317 }, { 0x135B, 0x135C }, { 0x137D, 0x137F },
{ 0x139A, 0x139F }, { 0x13F6, 0x13F7 }, { 0x13FE, 0x13FF },
- { 0x169D, 0x169F }, { 0x16F9, 0x16FF }, { 0x170D, 0x170D },
- { 0x1715, 0x171F }, { 0x1737, 0x173F }, { 0x1754, 0x175F },
- { 0x176D, 0x176D }, { 0x1771, 0x1771 }, { 0x1774, 0x177F },
- { 0x17DE, 0x17DF }, { 0x17EA, 0x17EF }, { 0x17FA, 0x17FF },
- { 0x180F, 0x180F }, { 0x181A, 0x181F }, { 0x1879, 0x187F },
- { 0x18AB, 0x18AF }, { 0x18F6, 0x18FF }, { 0x191F, 0x191F },
- { 0x192C, 0x192F }, { 0x193C, 0x193F }, { 0x1941, 0x1943 },
- { 0x196E, 0x196F }, { 0x1975, 0x197F }, { 0x19AC, 0x19AF },
- { 0x19CA, 0x19CF }, { 0x19DB, 0x19DD }, { 0x1A1C, 0x1A1D },
- { 0x1A5F, 0x1A5F }, { 0x1A7D, 0x1A7E }, { 0x1A8A, 0x1A8F },
- { 0x1A9A, 0x1A9F }, { 0x1AAE, 0x1AAF }, { 0x1AC1, 0x1AFF },
- { 0x1B4C, 0x1B4F }, { 0x1B7D, 0x1B7F }, { 0x1BF4, 0x1BFB },
- { 0x1C38, 0x1C3A }, { 0x1C4A, 0x1C4C }, { 0x1C89, 0x1C8F },
- { 0x1CBB, 0x1CBC }, { 0x1CC8, 0x1CCF }, { 0x1CFB, 0x1CFF },
- { 0x1DFA, 0x1DFA }, { 0x1F16, 0x1F17 }, { 0x1F1E, 0x1F1F },
+ { 0x169D, 0x169F }, { 0x16F9, 0x16FF }, { 0x1716, 0x171E },
+ { 0x1737, 0x173F }, { 0x1754, 0x175F }, { 0x176D, 0x176D },
+ { 0x1771, 0x1771 }, { 0x1774, 0x177F }, { 0x17DE, 0x17DF },
+ { 0x17EA, 0x17EF }, { 0x17FA, 0x17FF }, { 0x181A, 0x181F },
+ { 0x1879, 0x187F }, { 0x18AB, 0x18AF }, { 0x18F6, 0x18FF },
+ { 0x191F, 0x191F }, { 0x192C, 0x192F }, { 0x193C, 0x193F },
+ { 0x1941, 0x1943 }, { 0x196E, 0x196F }, { 0x1975, 0x197F },
+ { 0x19AC, 0x19AF }, { 0x19CA, 0x19CF }, { 0x19DB, 0x19DD },
+ { 0x1A1C, 0x1A1D }, { 0x1A5F, 0x1A5F }, { 0x1A7D, 0x1A7E },
+ { 0x1A8A, 0x1A8F }, { 0x1A9A, 0x1A9F }, { 0x1AAE, 0x1AAF },
+ { 0x1ACF, 0x1AFF }, { 0x1B4D, 0x1B4F }, { 0x1B7F, 0x1B7F },
+ { 0x1BF4, 0x1BFB }, { 0x1C38, 0x1C3A }, { 0x1C4A, 0x1C4C },
+ { 0x1C89, 0x1C8F }, { 0x1CBB, 0x1CBC }, { 0x1CC8, 0x1CCF },
+ { 0x1CFB, 0x1CFF }, { 0x1F16, 0x1F17 }, { 0x1F1E, 0x1F1F },
{ 0x1F46, 0x1F47 }, { 0x1F4E, 0x1F4F }, { 0x1F58, 0x1F58 },
{ 0x1F5A, 0x1F5A }, { 0x1F5C, 0x1F5C }, { 0x1F5E, 0x1F5E },
{ 0x1F7E, 0x1F7F }, { 0x1FB5, 0x1FB5 }, { 0x1FC5, 0x1FC5 },
{ 0x1FD4, 0x1FD5 }, { 0x1FDC, 0x1FDC }, { 0x1FF0, 0x1FF1 },
{ 0x1FF5, 0x1FF5 }, { 0x1FFF, 0x1FFF }, { 0x2028, 0x2029 },
{ 0x2065, 0x2065 }, { 0x2072, 0x2073 }, { 0x208F, 0x208F },
- { 0x209D, 0x209F }, { 0x20C0, 0x20CF }, { 0x20F1, 0x20FF },
+ { 0x209D, 0x209F }, { 0x20C1, 0x20CF }, { 0x20F1, 0x20FF },
{ 0x218C, 0x218F }, { 0x2427, 0x243F }, { 0x244B, 0x245F },
- { 0x2B74, 0x2B75 }, { 0x2B96, 0x2B96 }, { 0x2C2F, 0x2C2F },
- { 0x2C5F, 0x2C5F }, { 0x2CF4, 0x2CF8 }, { 0x2D26, 0x2D26 },
- { 0x2D28, 0x2D2C }, { 0x2D2E, 0x2D2F }, { 0x2D68, 0x2D6E },
- { 0x2D71, 0x2D7E }, { 0x2D97, 0x2D9F }, { 0x2DA7, 0x2DA7 },
- { 0x2DAF, 0x2DAF }, { 0x2DB7, 0x2DB7 }, { 0x2DBF, 0x2DBF },
- { 0x2DC7, 0x2DC7 }, { 0x2DCF, 0x2DCF }, { 0x2DD7, 0x2DD7 },
- { 0x2DDF, 0x2DDF }, { 0x2E53, 0x2E7F }, { 0x2E9A, 0x2E9A },
- { 0x2EF4, 0x2EFF }, { 0x2FD6, 0x2FEF }, { 0x2FFC, 0x2FFF },
- { 0x3040, 0x3040 }, { 0x3097, 0x3098 }, { 0x3100, 0x3104 },
- { 0x3130, 0x3130 }, { 0x318F, 0x318F }, { 0x31E4, 0x31EF },
- { 0x321F, 0x321F }, { 0x4DB6, 0x4DBF }, { 0x9FD6, 0x9FFF },
- { 0xA48D, 0xA48F }, { 0xA4C7, 0xA4CF }, { 0xA62C, 0xA63F },
- { 0xA6F8, 0xA6FF }, { 0xA7C0, 0xA7C1 }, { 0xA7CB, 0xA7F4 },
+ { 0x2B74, 0x2B75 }, { 0x2B96, 0x2B96 }, { 0x2CF4, 0x2CF8 },
+ { 0x2D26, 0x2D26 }, { 0x2D28, 0x2D2C }, { 0x2D2E, 0x2D2F },
+ { 0x2D68, 0x2D6E }, { 0x2D71, 0x2D7E }, { 0x2D97, 0x2D9F },
+ { 0x2DA7, 0x2DA7 }, { 0x2DAF, 0x2DAF }, { 0x2DB7, 0x2DB7 },
+ { 0x2DBF, 0x2DBF }, { 0x2DC7, 0x2DC7 }, { 0x2DCF, 0x2DCF },
+ { 0x2DD7, 0x2DD7 }, { 0x2DDF, 0x2DDF }, { 0x2E5E, 0x2E7F },
+ { 0x2E9A, 0x2E9A }, { 0x2EF4, 0x2EFF }, { 0x2FD6, 0x2FEF },
+ { 0x2FFC, 0x2FFF }, { 0x3040, 0x3040 }, { 0x3097, 0x3098 },
+ { 0x3100, 0x3104 }, { 0x3130, 0x3130 }, { 0x318F, 0x318F },
+ { 0x31E4, 0x31EF }, { 0x321F, 0x321F }, { 0x4DB6, 0x4DBF },
+ { 0x9FD6, 0x9FFF }, { 0xA48D, 0xA48F }, { 0xA4C7, 0xA4CF },
+ { 0xA62C, 0xA63F }, { 0xA6F8, 0xA6FF }, { 0xA7CB, 0xA7CF },
+ { 0xA7D2, 0xA7D2 }, { 0xA7D4, 0xA7D4 }, { 0xA7DA, 0xA7F1 },
{ 0xA82D, 0xA82F }, { 0xA83A, 0xA83F }, { 0xA878, 0xA87F },
{ 0xA8C6, 0xA8CD }, { 0xA8DA, 0xA8DF }, { 0xA954, 0xA95E },
{ 0xA97D, 0xA97F }, { 0xA9CE, 0xA9CE }, { 0xA9DA, 0xA9DD },
@@ -447,24 +450,27 @@ int mk_wcwidth(wchar_t ucs)
{ 0xD7C7, 0xD7CA }, { 0xD7FC, 0xDFFF }, { 0xFA6E, 0xFA6F },
{ 0xFADA, 0xFAFF }, { 0xFB07, 0xFB12 }, { 0xFB18, 0xFB1C },
{ 0xFB37, 0xFB37 }, { 0xFB3D, 0xFB3D }, { 0xFB3F, 0xFB3F },
- { 0xFB42, 0xFB42 }, { 0xFB45, 0xFB45 }, { 0xFBC2, 0xFBD2 },
- { 0xFD40, 0xFD4F }, { 0xFD90, 0xFD91 }, { 0xFDC8, 0xFDEF },
- { 0xFDFE, 0xFDFF }, { 0xFE1A, 0xFE1F }, { 0xFE53, 0xFE53 },
- { 0xFE67, 0xFE67 }, { 0xFE6C, 0xFE6F }, { 0xFE75, 0xFE75 },
- { 0xFEFD, 0xFEFE }, { 0xFF00, 0xFF00 }, { 0xFFBF, 0xFFC1 },
- { 0xFFC8, 0xFFC9 }, { 0xFFD0, 0xFFD1 }, { 0xFFD8, 0xFFD9 },
- { 0xFFDD, 0xFFDF }, { 0xFFE7, 0xFFE7 }, { 0xFFEF, 0xFFF8 },
- { 0xFFFE, 0xFFFF }, { 0x1000C, 0x1000C }, { 0x10027, 0x10027 },
- { 0x1003B, 0x1003B }, { 0x1003E, 0x1003E }, { 0x1004E, 0x1004F },
- { 0x1005E, 0x1007F }, { 0x100FB, 0x100FF }, { 0x10103, 0x10106 },
- { 0x10134, 0x10136 }, { 0x1018F, 0x1018F }, { 0x1019D, 0x1019F },
- { 0x101A1, 0x101CF }, { 0x101FE, 0x1027F }, { 0x1029D, 0x1029F },
- { 0x102D1, 0x102DF }, { 0x102FC, 0x102FF }, { 0x10324, 0x1032C },
- { 0x1034B, 0x1034F }, { 0x1037B, 0x1037F }, { 0x1039E, 0x1039E },
- { 0x103C4, 0x103C7 }, { 0x103D6, 0x103FF }, { 0x1049E, 0x1049F },
- { 0x104AA, 0x104AF }, { 0x104D4, 0x104D7 }, { 0x104FC, 0x104FF },
- { 0x10528, 0x1052F }, { 0x10564, 0x1056E }, { 0x10570, 0x105FF },
- { 0x10737, 0x1073F }, { 0x10756, 0x1075F }, { 0x10768, 0x107FF },
+ { 0xFB42, 0xFB42 }, { 0xFB45, 0xFB45 }, { 0xFBC3, 0xFBD2 },
+ { 0xFD90, 0xFD91 }, { 0xFDC8, 0xFDCE }, { 0xFDD0, 0xFDEF },
+ { 0xFE1A, 0xFE1F }, { 0xFE53, 0xFE53 }, { 0xFE67, 0xFE67 },
+ { 0xFE6C, 0xFE6F }, { 0xFE75, 0xFE75 }, { 0xFEFD, 0xFEFE },
+ { 0xFF00, 0xFF00 }, { 0xFFBF, 0xFFC1 }, { 0xFFC8, 0xFFC9 },
+ { 0xFFD0, 0xFFD1 }, { 0xFFD8, 0xFFD9 }, { 0xFFDD, 0xFFDF },
+ { 0xFFE7, 0xFFE7 }, { 0xFFEF, 0xFFF8 }, { 0xFFFE, 0xFFFF },
+ { 0x1000C, 0x1000C }, { 0x10027, 0x10027 }, { 0x1003B, 0x1003B },
+ { 0x1003E, 0x1003E }, { 0x1004E, 0x1004F }, { 0x1005E, 0x1007F },
+ { 0x100FB, 0x100FF }, { 0x10103, 0x10106 }, { 0x10134, 0x10136 },
+ { 0x1018F, 0x1018F }, { 0x1019D, 0x1019F }, { 0x101A1, 0x101CF },
+ { 0x101FE, 0x1027F }, { 0x1029D, 0x1029F }, { 0x102D1, 0x102DF },
+ { 0x102FC, 0x102FF }, { 0x10324, 0x1032C }, { 0x1034B, 0x1034F },
+ { 0x1037B, 0x1037F }, { 0x1039E, 0x1039E }, { 0x103C4, 0x103C7 },
+ { 0x103D6, 0x103FF }, { 0x1049E, 0x1049F }, { 0x104AA, 0x104AF },
+ { 0x104D4, 0x104D7 }, { 0x104FC, 0x104FF }, { 0x10528, 0x1052F },
+ { 0x10564, 0x1056E }, { 0x1057B, 0x1057B }, { 0x1058B, 0x1058B },
+ { 0x10593, 0x10593 }, { 0x10596, 0x10596 }, { 0x105A2, 0x105A2 },
+ { 0x105B2, 0x105B2 }, { 0x105BA, 0x105BA }, { 0x105BD, 0x105FF },
+ { 0x10737, 0x1073F }, { 0x10756, 0x1075F }, { 0x10768, 0x1077F },
+ { 0x10786, 0x10786 }, { 0x107B1, 0x107B1 }, { 0x107BB, 0x107FF },
{ 0x10806, 0x10807 }, { 0x10809, 0x10809 }, { 0x10836, 0x10836 },
{ 0x10839, 0x1083B }, { 0x1083D, 0x1083E }, { 0x10856, 0x10856 },
{ 0x1089F, 0x108A6 }, { 0x108B0, 0x108DF }, { 0x108F3, 0x108F3 },
@@ -479,49 +485,52 @@ int mk_wcwidth(wchar_t ucs)
{ 0x10CB3, 0x10CBF }, { 0x10CF3, 0x10CF9 }, { 0x10D28, 0x10D2F },
{ 0x10D3A, 0x10E5F }, { 0x10E7F, 0x10E7F }, { 0x10EAA, 0x10EAA },
{ 0x10EAE, 0x10EAF }, { 0x10EB2, 0x10EFF }, { 0x10F28, 0x10F2F },
- { 0x10F5A, 0x10FAF }, { 0x10FCC, 0x10FDF }, { 0x10FF7, 0x10FFF },
- { 0x1104E, 0x11051 }, { 0x11070, 0x1107E }, { 0x110C2, 0x110CC },
- { 0x110CE, 0x110CF }, { 0x110E9, 0x110EF }, { 0x110FA, 0x110FF },
- { 0x11135, 0x11135 }, { 0x11148, 0x1114F }, { 0x11177, 0x1117F },
- { 0x111E0, 0x111E0 }, { 0x111F5, 0x111FF }, { 0x11212, 0x11212 },
- { 0x1123F, 0x1127F }, { 0x11287, 0x11287 }, { 0x11289, 0x11289 },
- { 0x1128E, 0x1128E }, { 0x1129E, 0x1129E }, { 0x112AA, 0x112AF },
- { 0x112EB, 0x112EF }, { 0x112FA, 0x112FF }, { 0x11304, 0x11304 },
- { 0x1130D, 0x1130E }, { 0x11311, 0x11312 }, { 0x11329, 0x11329 },
- { 0x11331, 0x11331 }, { 0x11334, 0x11334 }, { 0x1133A, 0x1133A },
- { 0x11345, 0x11346 }, { 0x11349, 0x1134A }, { 0x1134E, 0x1134F },
- { 0x11351, 0x11356 }, { 0x11358, 0x1135C }, { 0x11364, 0x11365 },
- { 0x1136D, 0x1136F }, { 0x11375, 0x113FF }, { 0x1145C, 0x1145C },
- { 0x11462, 0x1147F }, { 0x114C8, 0x114CF }, { 0x114DA, 0x1157F },
- { 0x115B6, 0x115B7 }, { 0x115DE, 0x115FF }, { 0x11645, 0x1164F },
- { 0x1165A, 0x1165F }, { 0x1166D, 0x1167F }, { 0x116B9, 0x116BF },
- { 0x116CA, 0x116FF }, { 0x1171B, 0x1171C }, { 0x1172C, 0x1172F },
- { 0x11740, 0x117FF }, { 0x1183C, 0x1189F }, { 0x118F3, 0x118FE },
- { 0x11907, 0x11908 }, { 0x1190A, 0x1190B }, { 0x11914, 0x11914 },
- { 0x11917, 0x11917 }, { 0x11936, 0x11936 }, { 0x11939, 0x1193A },
- { 0x11947, 0x1194F }, { 0x1195A, 0x1199F }, { 0x119A8, 0x119A9 },
- { 0x119D8, 0x119D9 }, { 0x119E5, 0x119FF }, { 0x11A48, 0x11A4F },
- { 0x11AA3, 0x11ABF }, { 0x11AF9, 0x11BFF }, { 0x11C09, 0x11C09 },
- { 0x11C37, 0x11C37 }, { 0x11C46, 0x11C4F }, { 0x11C6D, 0x11C6F },
- { 0x11C90, 0x11C91 }, { 0x11CA8, 0x11CA8 }, { 0x11CB7, 0x11CFF },
- { 0x11D07, 0x11D07 }, { 0x11D0A, 0x11D0A }, { 0x11D37, 0x11D39 },
- { 0x11D3B, 0x11D3B }, { 0x11D3E, 0x11D3E }, { 0x11D48, 0x11D4F },
- { 0x11D5A, 0x11D5F }, { 0x11D66, 0x11D66 }, { 0x11D69, 0x11D69 },
- { 0x11D8F, 0x11D8F }, { 0x11D92, 0x11D92 }, { 0x11D99, 0x11D9F },
- { 0x11DAA, 0x11EDF }, { 0x11EF9, 0x11FAF }, { 0x11FB1, 0x11FBF },
- { 0x11FF2, 0x11FFE }, { 0x1239A, 0x123FF }, { 0x1246F, 0x1246F },
- { 0x12475, 0x1247F }, { 0x12544, 0x12FFF }, { 0x1342F, 0x1342F },
- { 0x13439, 0x143FF }, { 0x14647, 0x167FF }, { 0x16A39, 0x16A3F },
- { 0x16A5F, 0x16A5F }, { 0x16A6A, 0x16A6D }, { 0x16A70, 0x16ACF },
+ { 0x10F5A, 0x10F6F }, { 0x10F8A, 0x10FAF }, { 0x10FCC, 0x10FDF },
+ { 0x10FF7, 0x10FFF }, { 0x1104E, 0x11051 }, { 0x11076, 0x1107E },
+ { 0x110C3, 0x110CC }, { 0x110CE, 0x110CF }, { 0x110E9, 0x110EF },
+ { 0x110FA, 0x110FF }, { 0x11135, 0x11135 }, { 0x11148, 0x1114F },
+ { 0x11177, 0x1117F }, { 0x111E0, 0x111E0 }, { 0x111F5, 0x111FF },
+ { 0x11212, 0x11212 }, { 0x1123F, 0x1127F }, { 0x11287, 0x11287 },
+ { 0x11289, 0x11289 }, { 0x1128E, 0x1128E }, { 0x1129E, 0x1129E },
+ { 0x112AA, 0x112AF }, { 0x112EB, 0x112EF }, { 0x112FA, 0x112FF },
+ { 0x11304, 0x11304 }, { 0x1130D, 0x1130E }, { 0x11311, 0x11312 },
+ { 0x11329, 0x11329 }, { 0x11331, 0x11331 }, { 0x11334, 0x11334 },
+ { 0x1133A, 0x1133A }, { 0x11345, 0x11346 }, { 0x11349, 0x1134A },
+ { 0x1134E, 0x1134F }, { 0x11351, 0x11356 }, { 0x11358, 0x1135C },
+ { 0x11364, 0x11365 }, { 0x1136D, 0x1136F }, { 0x11375, 0x113FF },
+ { 0x1145C, 0x1145C }, { 0x11462, 0x1147F }, { 0x114C8, 0x114CF },
+ { 0x114DA, 0x1157F }, { 0x115B6, 0x115B7 }, { 0x115DE, 0x115FF },
+ { 0x11645, 0x1164F }, { 0x1165A, 0x1165F }, { 0x1166D, 0x1167F },
+ { 0x116BA, 0x116BF }, { 0x116CA, 0x116FF }, { 0x1171B, 0x1171C },
+ { 0x1172C, 0x1172F }, { 0x11747, 0x117FF }, { 0x1183C, 0x1189F },
+ { 0x118F3, 0x118FE }, { 0x11907, 0x11908 }, { 0x1190A, 0x1190B },
+ { 0x11914, 0x11914 }, { 0x11917, 0x11917 }, { 0x11936, 0x11936 },
+ { 0x11939, 0x1193A }, { 0x11947, 0x1194F }, { 0x1195A, 0x1199F },
+ { 0x119A8, 0x119A9 }, { 0x119D8, 0x119D9 }, { 0x119E5, 0x119FF },
+ { 0x11A48, 0x11A4F }, { 0x11AA3, 0x11AAF }, { 0x11AF9, 0x11BFF },
+ { 0x11C09, 0x11C09 }, { 0x11C37, 0x11C37 }, { 0x11C46, 0x11C4F },
+ { 0x11C6D, 0x11C6F }, { 0x11C90, 0x11C91 }, { 0x11CA8, 0x11CA8 },
+ { 0x11CB7, 0x11CFF }, { 0x11D07, 0x11D07 }, { 0x11D0A, 0x11D0A },
+ { 0x11D37, 0x11D39 }, { 0x11D3B, 0x11D3B }, { 0x11D3E, 0x11D3E },
+ { 0x11D48, 0x11D4F }, { 0x11D5A, 0x11D5F }, { 0x11D66, 0x11D66 },
+ { 0x11D69, 0x11D69 }, { 0x11D8F, 0x11D8F }, { 0x11D92, 0x11D92 },
+ { 0x11D99, 0x11D9F }, { 0x11DAA, 0x11EDF }, { 0x11EF9, 0x11FAF },
+ { 0x11FB1, 0x11FBF }, { 0x11FF2, 0x11FFE }, { 0x1239A, 0x123FF },
+ { 0x1246F, 0x1246F }, { 0x12475, 0x1247F }, { 0x12544, 0x12F8F },
+ { 0x12FF3, 0x12FFF }, { 0x1342F, 0x1342F }, { 0x13439, 0x143FF },
+ { 0x14647, 0x167FF }, { 0x16A39, 0x16A3F }, { 0x16A5F, 0x16A5F },
+ { 0x16A6A, 0x16A6D }, { 0x16ABF, 0x16ABF }, { 0x16ACA, 0x16ACF },
{ 0x16AEE, 0x16AEF }, { 0x16AF6, 0x16AFF }, { 0x16B46, 0x16B4F },
{ 0x16B5A, 0x16B5A }, { 0x16B62, 0x16B62 }, { 0x16B78, 0x16B7C },
{ 0x16B90, 0x16E3F }, { 0x16E9B, 0x16EFF }, { 0x16F4B, 0x16F4E },
{ 0x16F88, 0x16F8E }, { 0x16FA0, 0x16FDF }, { 0x16FE5, 0x16FEF },
- { 0x16FF2, 0x187FF }, { 0x18CD6, 0x1AFFF }, { 0x1B11F, 0x1B14F },
+ { 0x16FF2, 0x187FF }, { 0x18CD6, 0x1AFEF }, { 0x1AFF4, 0x1AFF4 },
+ { 0x1AFFC, 0x1AFFC }, { 0x1AFFF, 0x1AFFF }, { 0x1B123, 0x1B14F },
{ 0x1B153, 0x1B163 }, { 0x1B168, 0x1B16F }, { 0x1B2FC, 0x1BBFF },
{ 0x1BC6B, 0x1BC6F }, { 0x1BC7D, 0x1BC7F }, { 0x1BC89, 0x1BC8F },
- { 0x1BC9A, 0x1BC9B }, { 0x1BCA4, 0x1CFFF }, { 0x1D0F6, 0x1D0FF },
- { 0x1D127, 0x1D128 }, { 0x1D1E9, 0x1D1FF }, { 0x1D246, 0x1D2DF },
+ { 0x1BC9A, 0x1BC9B }, { 0x1BCA4, 0x1CEFF }, { 0x1CF2E, 0x1CF2F },
+ { 0x1CF47, 0x1CF4F }, { 0x1CFC4, 0x1CFFF }, { 0x1D0F6, 0x1D0FF },
+ { 0x1D127, 0x1D128 }, { 0x1D1EB, 0x1D1FF }, { 0x1D246, 0x1D2DF },
{ 0x1D2F4, 0x1D2FF }, { 0x1D357, 0x1D35F }, { 0x1D379, 0x1D3FF },
{ 0x1D455, 0x1D455 }, { 0x1D49D, 0x1D49D }, { 0x1D4A0, 0x1D4A1 },
{ 0x1D4A3, 0x1D4A4 }, { 0x1D4A7, 0x1D4A8 }, { 0x1D4AD, 0x1D4AD },
@@ -530,11 +539,13 @@ int mk_wcwidth(wchar_t ucs)
{ 0x1D51D, 0x1D51D }, { 0x1D53A, 0x1D53A }, { 0x1D53F, 0x1D53F },
{ 0x1D545, 0x1D545 }, { 0x1D547, 0x1D549 }, { 0x1D551, 0x1D551 },
{ 0x1D6A6, 0x1D6A7 }, { 0x1D7CC, 0x1D7CD }, { 0x1DA8C, 0x1DA9A },
- { 0x1DAA0, 0x1DAA0 }, { 0x1DAB0, 0x1DFFF }, { 0x1E007, 0x1E007 },
- { 0x1E019, 0x1E01A }, { 0x1E022, 0x1E022 }, { 0x1E025, 0x1E025 },
- { 0x1E02B, 0x1E0FF }, { 0x1E12D, 0x1E12F }, { 0x1E13E, 0x1E13F },
- { 0x1E14A, 0x1E14D }, { 0x1E150, 0x1E2BF }, { 0x1E2FA, 0x1E2FE },
- { 0x1E300, 0x1E7FF }, { 0x1E8C5, 0x1E8C6 }, { 0x1E8D7, 0x1E8FF },
+ { 0x1DAA0, 0x1DAA0 }, { 0x1DAB0, 0x1DEFF }, { 0x1DF1F, 0x1DFFF },
+ { 0x1E007, 0x1E007 }, { 0x1E019, 0x1E01A }, { 0x1E022, 0x1E022 },
+ { 0x1E025, 0x1E025 }, { 0x1E02B, 0x1E0FF }, { 0x1E12D, 0x1E12F },
+ { 0x1E13E, 0x1E13F }, { 0x1E14A, 0x1E14D }, { 0x1E150, 0x1E28F },
+ { 0x1E2AF, 0x1E2BF }, { 0x1E2FA, 0x1E2FE }, { 0x1E300, 0x1E7DF },
+ { 0x1E7E7, 0x1E7E7 }, { 0x1E7EC, 0x1E7EC }, { 0x1E7EF, 0x1E7EF },
+ { 0x1E7FF, 0x1E7FF }, { 0x1E8C5, 0x1E8C6 }, { 0x1E8D7, 0x1E8FF },
{ 0x1E94C, 0x1E94F }, { 0x1E95A, 0x1E95D }, { 0x1E960, 0x1EC70 },
{ 0x1ECB5, 0x1ED00 }, { 0x1ED3E, 0x1EDFF }, { 0x1EE04, 0x1EE04 },
{ 0x1EE20, 0x1EE20 }, { 0x1EE23, 0x1EE23 }, { 0x1EE25, 0x1EE26 },
@@ -552,17 +563,17 @@ int mk_wcwidth(wchar_t ucs)
{ 0x1F0C0, 0x1F0C0 }, { 0x1F0D0, 0x1F0D0 }, { 0x1F0F6, 0x1F0FF },
{ 0x1F1AE, 0x1F1E5 }, { 0x1F203, 0x1F20F }, { 0x1F23C, 0x1F23F },
{ 0x1F249, 0x1F24F }, { 0x1F252, 0x1F25F }, { 0x1F266, 0x1F2FF },
- { 0x1F6D8, 0x1F6DF }, { 0x1F6ED, 0x1F6EF }, { 0x1F6FD, 0x1F6FF },
- { 0x1F774, 0x1F77F }, { 0x1F7D9, 0x1F7DF }, { 0x1F7EC, 0x1F7FF },
- { 0x1F80C, 0x1F80F }, { 0x1F848, 0x1F84F }, { 0x1F85A, 0x1F85F },
- { 0x1F888, 0x1F88F }, { 0x1F8AE, 0x1F8AF }, { 0x1F8B2, 0x1F8FF },
- { 0x1F979, 0x1F979 }, { 0x1F9CC, 0x1F9CC }, { 0x1FA54, 0x1FA5F },
- { 0x1FA6E, 0x1FA6F }, { 0x1FA75, 0x1FA77 }, { 0x1FA7B, 0x1FA7F },
- { 0x1FA87, 0x1FA8F }, { 0x1FAA9, 0x1FAAF }, { 0x1FAB7, 0x1FABF },
- { 0x1FAC3, 0x1FACF }, { 0x1FAD7, 0x1FAFF }, { 0x1FB93, 0x1FB93 },
- { 0x1FBCB, 0x1FBEF }, { 0x1FBFA, 0x1FFFF }, { 0x2A6D7, 0x2F7FF },
- { 0x2FA1E, 0xE0000 }, { 0xE0002, 0xE001F }, { 0xE0080, 0xE00FF },
- { 0xE01F0, 0x10FFFD }
+ { 0x1F6D8, 0x1F6DC }, { 0x1F6ED, 0x1F6EF }, { 0x1F6FD, 0x1F6FF },
+ { 0x1F774, 0x1F77F }, { 0x1F7D9, 0x1F7DF }, { 0x1F7EC, 0x1F7EF },
+ { 0x1F7F1, 0x1F7FF }, { 0x1F80C, 0x1F80F }, { 0x1F848, 0x1F84F },
+ { 0x1F85A, 0x1F85F }, { 0x1F888, 0x1F88F }, { 0x1F8AE, 0x1F8AF },
+ { 0x1F8B2, 0x1F8FF }, { 0x1FA54, 0x1FA5F }, { 0x1FA6E, 0x1FA6F },
+ { 0x1FA75, 0x1FA77 }, { 0x1FA7D, 0x1FA7F }, { 0x1FA87, 0x1FA8F },
+ { 0x1FAAD, 0x1FAAF }, { 0x1FABB, 0x1FABF }, { 0x1FAC6, 0x1FACF },
+ { 0x1FADA, 0x1FADF }, { 0x1FAE8, 0x1FAEF }, { 0x1FAF7, 0x1FAFF },
+ { 0x1FB93, 0x1FB93 }, { 0x1FBCB, 0x1FBEF }, { 0x1FBFA, 0x1FFFF },
+ { 0x2A6D7, 0x2F7FF }, { 0x2FA1E, 0xE0000 }, { 0xE0002, 0xE001F },
+ { 0xE0080, 0xE00FF }, { 0xE01F0, 0x10FFFD }
};
/* *INDENT-ON* */
@@ -594,7 +605,8 @@ int mk_wcwidth(wchar_t ucs)
{ 0xFE10, 0xFE19 }, { 0xFE30, 0xFE52 }, { 0xFE54, 0xFE66 },
{ 0xFE68, 0xFE6B }, { 0xFF01, 0xFF60 }, { 0xFFE0, 0xFFE6 },
{ 0x16FE0, 0x16FE3 }, { 0x16FF0, 0x16FF1 }, { 0x17000, 0x187F7 },
- { 0x18800, 0x18CD5 }, { 0x18D00, 0x18D08 }, { 0x1B000, 0x1B11E },
+ { 0x18800, 0x18CD5 }, { 0x18D00, 0x18D08 }, { 0x1AFF0, 0x1AFF3 },
+ { 0x1AFF5, 0x1AFFB }, { 0x1AFFD, 0x1AFFE }, { 0x1B000, 0x1B122 },
{ 0x1B150, 0x1B152 }, { 0x1B164, 0x1B167 }, { 0x1B170, 0x1B2FB },
{ 0x1F004, 0x1F004 }, { 0x1F0CF, 0x1F0CF }, { 0x1F18E, 0x1F18E },
{ 0x1F191, 0x1F19A }, { 0x1F200, 0x1F202 }, { 0x1F210, 0x1F23B },
@@ -606,12 +618,13 @@ int mk_wcwidth(wchar_t ucs)
{ 0x1F54B, 0x1F54E }, { 0x1F550, 0x1F567 }, { 0x1F57A, 0x1F57A },
{ 0x1F595, 0x1F596 }, { 0x1F5A4, 0x1F5A4 }, { 0x1F5FB, 0x1F64F },
{ 0x1F680, 0x1F6C5 }, { 0x1F6CC, 0x1F6CC }, { 0x1F6D0, 0x1F6D2 },
- { 0x1F6D5, 0x1F6D7 }, { 0x1F6EB, 0x1F6EC }, { 0x1F6F4, 0x1F6FC },
- { 0x1F7E0, 0x1F7EB }, { 0x1F90C, 0x1F93A }, { 0x1F93C, 0x1F945 },
- { 0x1F947, 0x1F978 }, { 0x1F97A, 0x1F9CB }, { 0x1F9CD, 0x1F9FF },
- { 0x1FA70, 0x1FA74 }, { 0x1FA78, 0x1FA7A }, { 0x1FA80, 0x1FA86 },
- { 0x1FA90, 0x1FAA8 }, { 0x1FAB0, 0x1FAB6 }, { 0x1FAC0, 0x1FAC2 },
- { 0x1FAD0, 0x1FAD6 }, { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD }
+ { 0x1F6D5, 0x1F6D7 }, { 0x1F6DD, 0x1F6DF }, { 0x1F6EB, 0x1F6EC },
+ { 0x1F6F4, 0x1F6FC }, { 0x1F7E0, 0x1F7EB }, { 0x1F7F0, 0x1F7F0 },
+ { 0x1F90C, 0x1F93A }, { 0x1F93C, 0x1F945 }, { 0x1F947, 0x1F9FF },
+ { 0x1FA70, 0x1FA74 }, { 0x1FA78, 0x1FA7C }, { 0x1FA80, 0x1FA86 },
+ { 0x1FA90, 0x1FAAC }, { 0x1FAB0, 0x1FABA }, { 0x1FAC0, 0x1FAC5 },
+ { 0x1FAD0, 0x1FAD9 }, { 0x1FAE0, 0x1FAE7 }, { 0x1FAF0, 0x1FAF6 },
+ { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD }
};
/* *INDENT-ON* */
diff --git a/app/xterm/xterm.appdata.xml b/app/xterm/xterm.appdata.xml
index 660951cd4..460df3422 100644
--- a/app/xterm/xterm.appdata.xml
+++ b/app/xterm/xterm.appdata.xml
@@ -35,7 +35,7 @@
<keyword>terminal</keyword>
</keywords>
<releases>
- <release version="367" date="2021-03-26"/>
+ <release version="369" date="2021-09-21"/>
</releases>
<url type="homepage">https://invisible-island.net/xterm/</url>
<update_contact>dickey@invisible-island.net</update_contact>
diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h
index ff884b646..80a1b2ac4 100644
--- a/app/xterm/xterm.h
+++ b/app/xterm/xterm.h
@@ -1,4 +1,4 @@
-/* $XTermId: xterm.h,v 1.890 2021/03/21 22:44:36 tom Exp $ */
+/* $XTermId: xterm.h,v 1.902 2021/09/19 18:27:35 tom Exp $ */
/*
* Copyright 1999-2020,2021 by Thomas E. Dickey
@@ -456,6 +456,7 @@ extern char **environ;
#define XtNappkeypadDefault "appkeypadDefault"
#define XtNassumeAllChars "assumeAllChars"
#define XtNautoWrap "autoWrap"
+#define XtNautoScrollLock "autoScrollLock"
#define XtNawaitInput "awaitInput"
#define XtNbackarrowKey "backarrowKey"
#define XtNbellIsUrgent "bellIsUrgent"
@@ -670,6 +671,7 @@ extern char **environ;
#define XtCAppkeypadDefault "AppkeypadDefault"
#define XtCAssumeAllChars "AssumeAllChars"
#define XtCAutoWrap "AutoWrap"
+#define XtCAutoScrollLock "AutoScrollLock"
#define XtCAwaitInput "AwaitInput"
#define XtCBackarrowKey "BackarrowKey"
#define XtCBellIsUrgent "BellIsUrgent"
@@ -963,7 +965,9 @@ extern void report_char_class(XtermWidget);
#define WideCells(n) (((IChar)(n) >= first_widechar) ? my_wcwidth((wchar_t) (n)) : 1)
#define isWideFrg(n) (((n) == HIDDEN_CHAR) || (WideCells((n)) == 2))
#define isWide(n) (((IChar)(n) >= first_widechar) && isWideFrg(n))
-#define CharWidth(n) (my_wcwidth((wchar_t) (n)))
+#define CharWidth(screen, n) ((!((screen)->utf8_mode) && ((n) < 256)) \
+ ? (IsLatin1(n) ? 1 : 0) \
+ : my_wcwidth((wchar_t) (n)))
#else
#define WideCells(n) 1
#define CharWidth(n) (IsLatin1(n) ? 1 : 0)
@@ -1165,6 +1169,7 @@ extern Window WMFrameWindow (XtermWidget /* xw */);
extern XtInputMask xtermAppPending (void);
extern XrmOptionDescRec * sortedOptDescs (XrmOptionDescRec *, Cardinal);
extern XtermWidget getXtermWidget (Widget /* w */);
+extern XVisualInfo *getVisualInfo (XtermWidget /* xw */);
extern char *udk_lookup (XtermWidget /* xw */, int /* keycode */, int * /* len */);
extern char *xtermEnvEncoding (void);
extern char *xtermFindShell (char * /* leaf */, Bool /* warning */);
@@ -1175,7 +1180,6 @@ extern int ResetAnsiColorRequest (XtermWidget, char *, int);
extern int XStrCmp (char * /* s1 */, char * /* s2 */);
extern int creat_as (uid_t /* uid */, gid_t /* gid */, Bool /* append */, char * /* pathname */, unsigned /* mode */);
extern int getVisualDepth (XtermWidget /* xw */);
-extern int getVisualInfo (XtermWidget /* xw */);
extern int ignore_x11_error(Display * /* dpy */, XErrorEvent * /* event */);
extern int open_userfile (uid_t /* uid */, gid_t /* gid */, char * /* path */, Bool /* append */);
extern int update_winsize(int /* fd */, int /* rows */, int /* cols */, int /* height */, int /* width */);
@@ -1263,6 +1267,14 @@ extern char *ProcGetCWD(pid_t /* pid */);
#define ProcGetCWD(pid) NULL
#endif
+#if OPT_ISO_COLORS
+extern Boolean AllocOneColor(XtermWidget /* xw */, XColor * /* def */);
+extern Boolean QueryOneColor(XtermWidget /* xw */, XColor * /* def */);
+#else
+#define AllocOneColor(xw, def) ((def)->pixel = 0)
+#define QueryOneColor(xw, def) ((def)->red = (def)->green = (def)->blue = 0)
+#endif
+
#if OPT_MAXIMIZE
extern int QueryMaximize (XtermWidget /* xw */, unsigned * /* width */, unsigned * /* height */);
extern void HandleDeIconify PROTO_XT_ACTIONS_ARGS;
@@ -1302,9 +1314,11 @@ extern void HandleInsertSelectable PROTO_XT_ACTIONS_ARGS;
#if OPT_SESSION_MGT
extern void xtermCloseSession (void);
extern void xtermOpenSession (void);
+extern void xtermUpdateRestartCommand(XtermWidget /* xw */);
#else
#define xtermCloseSession() /* nothing */
#define xtermOpenSession() /* nothing */
+#define xtermUpdateRestartCommand(xw) /* nothing */
#endif
#if OPT_WIDE_CHARS
@@ -1560,7 +1574,7 @@ extern void ChangeColors (XtermWidget /* xw */, ScrnColors * /* pNew */);
extern void ClearRight (XtermWidget /* xw */, int /* n */);
extern void ClearScreen (XtermWidget /* xw */);
extern void DeleteChar (XtermWidget /* xw */, unsigned /* n */);
-extern void DeleteLine (XtermWidget /* xw */, int /* n */);
+extern void DeleteLine (XtermWidget /* xw */, int /* n */, Bool /* canSave */);
extern void FlushScroll (XtermWidget /* xw */);
extern void GetColors (XtermWidget /* xw */, ScrnColors * /* pColors */);
extern void InsertChar (XtermWidget /* xw */, unsigned /* n */);
@@ -1570,7 +1584,7 @@ extern void ReverseVideo (XtermWidget /* xw */);
extern void WriteText (XtermWidget /* xw */, IChar * /* str */, Cardinal /* len */);
extern void decode_keyboard_type (XtermWidget /* xw */, struct XTERM_RESOURCE * /* rp */);
extern void decode_wcwidth (XtermWidget /* xw */);
-extern void do_cd_xtra_scroll (XtermWidget /* xw */);
+extern void do_cd_xtra_scroll (XtermWidget /* xw */, int /* param */);
extern void do_erase_display (XtermWidget /* xw */, int /* param */, int /* mode */);
extern void do_erase_char (XtermWidget /* xw */, int /* param */, int /* mode */);
extern void do_erase_line (XtermWidget /* xw */, int /* param */, int /* mode */);
@@ -1613,18 +1627,11 @@ extern void ClearCurBackground (XtermWidget /* xw */, int /* top */, int /* le
#define xtermColorPair(xw) makeColorPair(xw)
-#if OPT_COLOR_RES
#define GET_COLOR_RES(xw, res) xtermGetColorRes(xw, &(res))
#define SET_COLOR_RES(res,color) (res)->value = color
#define EQL_COLOR_RES(res,color) (res)->value == color
#define T_COLOR(v,n) (v)->Tcolors[n].value
extern Pixel xtermGetColorRes(XtermWidget /* xw */, ColorRes * /* res */);
-#else
-#define GET_COLOR_RES(xw, res) res
-#define SET_COLOR_RES(res,color) *res = color
-#define EQL_COLOR_RES(res,color) *res == color
-#define T_COLOR(v,n) (v)->Tcolors[n]
-#endif
#define ExtractForeground(color) (unsigned) GetCellColorFG(color)
#define ExtractBackground(color) (unsigned) GetCellColorBG(color)
@@ -1691,7 +1698,7 @@ extern void discardRenderDraw(TScreen * /* screen */);
#define extract_bg(xw, color, flags) (unsigned) (xw)->cur_background
/* FIXME: Reverse-Video? */
-#define T_COLOR(v,n) (v)->Tcolors[n]
+#define T_COLOR(v,n) (v)->Tcolors[n].value
#define xtermColorPair(xw) 0
#define checkVeryBoldColors(flags, fg) /* nothing */
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index a70f7ca53..a87f84f83 100644
--- a/app/xterm/xterm.log.html
+++ b/app/xterm/xterm.log.html
@@ -30,7 +30,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
*****************************************************************************
- $XTermId: xterm.log.html,v 1.2326 2021/03/26 23:02:54 tom Exp $
+ $XTermId: xterm.log.html,v 1.2358 2021/09/21 23:48:07 tom Exp $
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
@@ -70,6 +70,10 @@
CHANGELOG</a>).</p>
<ul>
+ <li><a href="#xterm_369">Patch #369 - 2021/09/21</a></li>
+
+ <li><a href="#xterm_368">Patch #368 - 2021/06/07</a></li>
+
<li><a href="#xterm_367">Patch #367 - 2021/03/26</a></li>
<li><a href="#xterm_366">Patch #366 - 2021/02/10</a></li>
@@ -1012,6 +1016,103 @@
<li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
</ul>
+ <h1><a name="xterm_369" id="xterm_369">Patch #369 -
+ 2021/09/21</a></h1>
+
+ <ul>
+ <li>modify <code>run-tic.sh</code> to work around bug in
+ development version of ncurses which was packaged in FreeBSD
+ ports.</li>
+
+ <li>remove ifdef's for <code>OPT_COLOR_RES</code> and
+ <code>OPT_COLOR_RES2</code>.</li>
+
+ <li>improve performance over slow connections (report by Harald
+ Dunkel).</li>
+
+ <li>update cursor if restoring mode for DECTCEM.</li>
+
+ <li>modify <code>CharWidth</code> macro to ensure that the
+ shortcut for Latin-1 is only applied when UTF-8 is not enabled,
+ to fix a bug in handling soft-hyphen from <a href=
+ "#xterm_334">patch #334</a> changes (patch by Martijn van
+ Duren).</li>
+
+ <li>improve terminfo:
+ <ul>
+ <li>fill-in function-keys in terminfo which are not Sun/HP
+ keyboards using <code>xterm+nopcfkeys</code>
+ building-block.</li>
+
+ <li>add kbeg to xterm+keypad to accommodate termcap
+ applications</li>
+
+ <li>add smglp and smgrp to vt420+lrmm, to provide useful
+ data for the "tabs" <code><strong>+m</strong></code>
+ option</li>
+ </ul>
+ </li>
+
+ <li>support shift-tab in Sun, HP and SCO keyboards.</li>
+
+ <li>document some legacy features in <code>ctlseqs.ms</code>
+ (prompted by discussion with Jimmy Aguilar Mena "Ergus").</li>
+
+ <li>add &ldquo;trim&rdquo; option to <code>cdXtraScroll</code>
+ and <code>tiXtraScroll</code>.</li>
+
+ <li>remove support for non-fifo save-lines configuration.</li>
+
+ <li>extend <code>cdXtraScroll</code> to check if the cursor is
+ at the upper-left of the scrolling region when the erasure is
+ for the remainder of the screen versus the whole screen
+ (prompted by discussion with J&ouml;rg Breitbart).</li>
+
+ <li>add workaround for broken pcre2 package in Debian 10.</li>
+
+ <li>change screen-refresh call used for <code>DECCARA</code>
+ and <code>DECRARA</code> to ensure that trailing blanks which
+ are part of the rectangle are repainted (report/analysis by
+ Dennis Filder).</li>
+
+ <li>when resetting the terminal, ensure that the cursor shape
+ also is reset, e.g., if <code>DECSCUSR</code> has been used to
+ modify the cursor shape for an xterm which was started with the
+ underlined cursor option (report/analysis by Luis Javier
+ Merino).</li>
+
+ <li>prevent <code>DECSCUSR</code> from blinking the cursor if
+ the <code>cursorBlink</code> resource is &ldquo;never&rdquo;
+ (report by Vladimir D Seleznev).</li>
+
+ <li>invert the sense of <code>DECSDM</code>, to correspond with
+ VT382 manuals (lsix #41).</li>
+
+ <li>update tables in <code>wcwidth.c</code> based on Unicode
+ 14.0.0</li>
+ </ul>
+
+ <h1><a name="xterm_368" id="xterm_368">Patch #368 -
+ 2021/06/07</a></h1>
+
+ <ul>
+ <li>add <code>DefaultOff</code> option to
+ <code>RenderFont</code> resource, as part of the
+ session-management feature.</li>
+
+ <li>add auto-scroll-lock feature (patch by Stelios
+ Bounanos).</li>
+
+ <li>update the window-size information returned via
+ <code>TIOCGWINSZ</code> when rows/columns are unchanged but the
+ font-size changes (report by Nick Black).</li>
+
+ <li>improve session-management feature by saving/restoring the
+ font settings.</li>
+
+ <li>update config.guess, config.sub</li>
+ </ul>
+
<h1><a name="xterm_367" id="xterm_367">Patch #367 -
2021/03/26</a></h1>
@@ -11331,9 +11432,10 @@ Klanderman).
rather than individually ascent and descent, and allows the
bold font to be one pixel smaller than the normal font
(addresses a report by Alan Citterman &lt;alan@mticket.com&gt;,
- who says that something in patches #146 to #148 made xterm more
- likely to overstrike bold fonts, and indirectly Debian bug
- report #76404, which reports the opposite).</li>
+ who says that something in patches <a href=
+ "#xterm_146">#146</a> to <a href="#xterm_148">#148</a> made
+ xterm more likely to overstrike bold fonts, and indirectly
+ Debian bug report #76404, which reports the opposite).</li>
<li>make configure script use $CFLAGS and $CPPFLAGS
consistently, including removing a chunk from configure.in
@@ -11962,9 +12064,9 @@ Klanderman).
<li>modified <code>creat_as()</code> a little more, retaining
the ability to append to a logfile If the user specifies the
- name. Also, check if the opened file (which patch #130 ensures
- is owned by the effective user) is not writable by other
- users.</li>
+ name. Also, check if the opened file (which <a href=
+ "#xterm_130">patch #130</a> ensures is owned by the effective
+ user) is not writable by other users.</li>
<li>use <code>creat_as()</code> logic to make tek4014
screen-copy more secure (noted by Branden Robinson).</li>
@@ -12934,9 +13036,10 @@ Klanderman).
<ul>
<li>correct selection logic: I omitted an offset that accounts
for the distance into the scrollback buffer when rewriting this
- for patch #101. Also fixed a similar problem for selecting
- double size characters from the scrollback buffer (first was
- reported by D Roland Walker &lt;walker@pobox.com&gt;).</li>
+ for <a href="#xterm_101">patch #101</a>. Also fixed a similar
+ problem for selecting double size characters from the
+ scrollback buffer (first was reported by D Roland Walker
+ &lt;walker@pobox.com&gt;).</li>
<li>improved support for Unix98 PTY's, using patch in Debian
bug report #35650, by J.H.M. Dassen
@@ -12970,9 +13073,9 @@ Klanderman).
XFree86 3.9Pm</a></h1>
<ul>
- <li>revert change to openpty call in patch #101; this causes
- xterm to fail on DEC-Alpha OSF/1 4.0B (reported by H Merijn
- Brand).</li>
+ <li>revert change to openpty call in <a href="#xterm_101">patch
+ #101</a>; this causes xterm to fail on DEC-Alpha OSF/1 4.0B
+ (reported by H Merijn Brand).</li>
<li>modify print.c to move include of stdio.h after the
autoconf'd xtermcfg.h since HP's ANSI C compiler otherwise sees
@@ -13591,13 +13694,14 @@ Klanderman).
<h1><a name="xterm_88" id="xterm_88">Patch #88 - 1998/10/31 -
XFree86 3.9Nk and 3.3.2h</a></h1>
- <p>This refines my #85 patch by checking for a case where the
- font server returns a bold font that does not quite correspond to
- the normal font. When I asked for a bold version of the 6x12
- font, the font server returned a near equivalent where the ascent
- and descent values did not match, causing xterm to leave lines
- across the display. This patch makes xterm reject that type of
- mismatch, falling back to the old font behavior.</p>
+ <p>This refines my <a href="#xterm_85">patch #85</a> by checking
+ for a case where the font server returns a bold font that does
+ not quite correspond to the normal font. When I asked for a bold
+ version of the 6x12 font, the font server returned a near
+ equivalent where the ascent and descent values did not match,
+ causing xterm to leave lines across the display. This patch makes
+ xterm reject that type of mismatch, falling back to the old font
+ behavior.</p>
<h1><a name="xterm_87" id="xterm_87">Patch #87 - 1998/10/21 -
XFree86 3.9Nj and 3.3.2f</a></h1>
@@ -13700,7 +13804,8 @@ Klanderman).
<h1><a name="sync_83" id="sync_83">Resync #83 - 1998/10/7 -
XFree86 3.3.2e</a></h1>
- <p>Merge changes through patch #83 with the 3.3.2e version.</p>
+ <p>Merge changes through <a href="#xterm_83">patch #83</a> with
+ the 3.3.2e version.</p>
<p>This follows a change from XFree86 CVS which adds checks for
non-null return from malloc (patch by Matthieu Herrb).</p>
@@ -13740,7 +13845,7 @@ Klanderman).
<h1><a name="xterm_82" id="xterm_82">Patch #82 - 1998/7/15 -
XFree86 3.9Aj</a></h1>
- <p>Bug fix for patch #81:</p>
+ <p>Bug fix for <a href="#xterm_81">patch #81</a>:</p>
<ul>
<li>remove an #undef for NBBY, which caused compile problem on
@@ -14180,8 +14285,8 @@ Klanderman).
Olivier Calle &lt;olivier@tc.fluke.com&gt; as well as some other
people after the XFree86 3.3.2 release.</p>
- <p>The error was introduced by my patch #53 in XFree86 3.9r
- (October 1997).</p>
+ <p>The error was introduced by my <a href="#xterm_53">patch
+ #53</a> in XFree86 3.9r (October 1997).</p>
<p>The correction removes the reset of setuid/setgid before the
main event loop, and solves the problem which I had worked around
@@ -14646,7 +14751,8 @@ Klanderman).
ANSI colors, where exposure events would occasionally pick up
the former (e.g., colorBD) rather than ANSI colors. Testing the
colorAttrMode made this apparent, though it has been in the
- code since 3.2A (patch #35 in Jan 1997).</li>
+ code since 3.2A (<a href="#xterm_35">patch #35</a> in Jan
+ 1997).</li>
<li>correct two problems with the optional logging support. On
Linux at least, the waitpid call in creat_as hangs when the
@@ -15011,8 +15117,8 @@ Klanderman).
entries).</li>
<li>some minor tidying up (e.g., signed/unsigned use bitcpy,
- MODE_DECCKM, resetColor, resetCharsets). More is done in patch
- #35.</li>
+ MODE_DECCKM, resetColor, resetCharsets). More is done in
+ <a href="#xterm_35">patch #35</a>.</li>
</ul>
<p>I got the description of DECSTR from a vt420 user's manual.
diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man
index 81981c8b1..c9fb02495 100644
--- a/app/xterm/xterm.man
+++ b/app/xterm/xterm.man
@@ -1,5 +1,5 @@
'\" t
-.\" $XTermId: xterm.man,v 1.844 2021/03/26 23:11:13 tom Exp $
+.\" $XTermId: xterm.man,v 1.851 2021/09/07 00:02:12 tom Exp $
.\"
.\" Copyright 1996-2020,2021 by Thomas E. Dickey
.\"
@@ -1628,7 +1628,8 @@ The default is
and is limited to the range 1 through 100.
.TP 8
.B "cursorTheme\fP (class\fB CursorTheme\fP)"
-The Xcursor(__miscmansuffix__) library provides a way to
+The Xcursor(__miscmansuffix__) library
+provides a way to change the pointer shape and size.
The X11 library uses this library to extend the font- and glyph-cursor
calls used by applications such as \fI\*n\fP to substitute external
files for the built-in \*(``core\*('' cursors provided by X.
@@ -2286,6 +2287,8 @@ user surprise.
This key is generally unused in keyboard configurations,
and has not acquired a standard meaning even when it is used in that manner.
Consequently, users have assigned it for ad hoc purposes.
+.IP
+See also the \fBautoScrollLock\fP resource.
.TP 8
.B "allowSendEvents\fP (class\fB AllowSendEvents\fP)"
Specifies whether or not synthetic key and button events (generated using
@@ -2455,6 +2458,14 @@ certain quasi-automatically generated fonts
(such as the ISO-10646-1 encoding of Terminus)
which have incorrect font-metrics.
.TP 8
+.B "autoScrollLock\fP (class\fB AutoScrollLock\fP)"
+If \*(``true\*('', \fI\*n\fR will maintain its viewport of displayed lines
+whenever displaying scrollback, as if \fBallowScrollLock\fP were enabled
+and the Scroll Lock key had been pressed.
+The default is \*(``false\*(''.
+This feature is only useful if the \fBscrollTtyOutput\fP resource is set to
+\*(``false\*(''.
+.TP 8
.B "autoWrap\fP (class\fB AutoWrap\fP)"
Specifies whether or not auto-wraparound should be enabled.
This is the same as the VT102 DECAWM.
@@ -2650,6 +2661,22 @@ the whole screen.
Like \fBtiXtraScroll\fP,
the intent of this option is to provide a picture of the full-screen
application's display on the scrollback before wiping out the text.
+.IP
+\fI\*N\fP accepts either a keyword (ignoring case)
+or the number shown in parentheses:
+.RS
+.TP
+false (0)
+nothing is added to the scrollback.
+.TP
+true (1)
+the current screen is added to the scrollback.
+.TP
+trim (2)
+the current screen is added to the scrollback,
+but repeated blank lines are trimmed (reduced to a single blank line).
+.RE
+.IP
The default for this resource is \*(``false\*(''.
.TP 8
.B "charClass\fP (class\fB CharClass\fP)"
@@ -4811,6 +4838,12 @@ That is normally \*(``mono\*(''.
If the \fBfaceName\fP resource is set,
then start by using the TrueType font rather than the bitmap font.
.RE
+.TP 5
+defaultOff
+.br
+Enable the \*(``TrueType Fonts\*(''
+menu entry to allow runtime switching to/from TrueType fonts,
+but allow it to be initially unselected if no \fBfaceName\fP resource was given.
.RE
.TP 8
.B "resizeByPixel\fP (class\fB ResizeByPixel\fP)"
@@ -5095,11 +5128,28 @@ The default is \*(``false\*(''.
.TP 8
.B "tiXtraScroll\fP (class\fB TiXtraScroll\fP)"
Specifies whether \fI\*n\fP should scroll to a new page when processing
-the \fIti\fP termcap entry, i.e., the private modes 47, 1047 or 1049.
+the \fIti\fP or \fIte\fP termcap strings,
+i.e., the private modes 47, 1047 or 1049.
This is only in effect if \fBtiteInhibit\fP is \*(``true\*('',
because the intent of this option is to provide a picture of the full-screen
application's display on the scrollback without wiping out the text that
would be shown before the application was initialized.
+.IP
+\fI\*N\fP accepts either a keyword (ignoring case)
+or the number shown in parentheses:
+.RS
+.TP
+false (0)
+nothing is added to the scrollback.
+.TP
+true (1)
+the current screen is added to the scrollback.
+.TP
+trim (2)
+the current screen is added to the scrollback,
+but repeated blank lines are trimmed (reduced to a single blank line).
+.RE
+.IP
The default for this resource is \*(``false\*(''.
.TP 8
.B "titeInhibit\fP (class\fB TiteInhibit\fP)"
@@ -8850,7 +8900,7 @@ Steve Pitschke (Stellar), Ron Newman (MIT-Athena), Jim Fulton (MIT X
Consortium), Dave Serisky (HP), Jonathan Kamens (MIT-Athena).
.PP
Beginning with XFree86, there were far more identifiable contributors.
-The \fITHANKS\fP file in \fI\*n\fP's source lists 228 in September 2020.
+The \fITHANKS\fP file in \fI\*n\fP's source lists 234 in August 2021.
Keep in mind these:
Jason Bacon,
Jens Schweikhardt,
diff --git a/app/xterm/xtermcfg.h b/app/xterm/xtermcfg.h
index e93db66d5..1a51c9170 100644
--- a/app/xterm/xtermcfg.h
+++ b/app/xterm/xtermcfg.h
@@ -1,4 +1,4 @@
-/* $XTermId: xtermcfg.hin,v 1.220 2020/10/05 22:42:06 tom Exp $ */
+/* $XTermId: xtermcfg.hin,v 1.223 2021/08/22 20:00:07 tom Exp $ */
/*
* Copyright 1997-2019,2020 by Thomas E. Dickey
@@ -88,6 +88,7 @@
/* #undef HAVE_NCURSES_TERM_H */ /* AC_CHECK_HEADERS(ncurses/term.h) */
#define HAVE_PATHS_H 1 /* CF_LASTLOG */
/* #undef HAVE_PCRE2POSIX_H */ /* CF_WITH_PCRE2 */
+/* #undef HAVE_PCRE2REGCOMP */ /* CF_WITH_PCRE2 */
/* #undef HAVE_PCREPOSIX_H */ /* CF_WITH_PCRE */
/* #undef HAVE_POSIX_OPENPT */ /* CF_FUNC_GRANTPT */
#define HAVE_POSIX_SAVED_IDS 1 /* CF_POSIX_SAVED_IDS */
@@ -156,7 +157,6 @@
#define OPT_DIRECT_COLOR 1 /* CF_ARG_ENABLE(direct-color) */
/* #undef OPT_DOUBLE_BUFFER */ /* CF_ARG_ENABLE(double-buffer) */
/* #undef OPT_EXEC_XTERM */ /* CF_ARG_ENABLE(exec-xterm) */
-/* #undef OPT_FIFO_LINES */ /* CF_ARG_ENABLE(fifo-lines) */
/* #undef OPT_GRAPHICS */ /* CF_ARG_ENABLE(graphics) */
/* #undef OPT_HIGHLIGHT_COLOR */ /* CF_ARG_DISABLE(highlighting) */
/* #undef OPT_HP_FUNC_KEYS */ /* CF_ARG_ENABLE(hp-fkeys) */
diff --git a/app/xterm/xtermcfg.hin b/app/xterm/xtermcfg.hin
index 2e97d6011..9372f9a7a 100644
--- a/app/xterm/xtermcfg.hin
+++ b/app/xterm/xtermcfg.hin
@@ -1,4 +1,4 @@
-/* $XTermId: xtermcfg.hin,v 1.221 2021/03/21 19:51:33 tom Exp $ */
+/* $XTermId: xtermcfg.hin,v 1.223 2021/08/22 20:00:07 tom Exp $ */
/*
* Copyright 1997-2020,2021 by Thomas E. Dickey
@@ -88,6 +88,7 @@
#undef HAVE_NCURSES_TERM_H /* AC_CHECK_HEADERS(ncurses/term.h) */
#undef HAVE_PATHS_H /* CF_LASTLOG */
#undef HAVE_PCRE2POSIX_H /* CF_WITH_PCRE2 */
+#undef HAVE_PCRE2REGCOMP /* CF_WITH_PCRE2 */
#undef HAVE_PCREPOSIX_H /* CF_WITH_PCRE */
#undef HAVE_POSIX_OPENPT /* CF_FUNC_GRANTPT */
#undef HAVE_POSIX_SAVED_IDS /* CF_POSIX_SAVED_IDS */
@@ -157,7 +158,6 @@
#undef OPT_DIRECT_COLOR /* CF_ARG_ENABLE(direct-color) */
#undef OPT_DOUBLE_BUFFER /* CF_ARG_ENABLE(double-buffer) */
#undef OPT_EXEC_XTERM /* CF_ARG_ENABLE(exec-xterm) */
-#undef OPT_FIFO_LINES /* CF_ARG_ENABLE(fifo-lines) */
#undef OPT_GRAPHICS /* CF_ARG_ENABLE(graphics) */
#undef OPT_HIGHLIGHT_COLOR /* CF_ARG_DISABLE(highlighting) */
#undef OPT_HP_FUNC_KEYS /* CF_ARG_ENABLE(hp-fkeys) */