summaryrefslogtreecommitdiff
path: root/app/xterm
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-01-10 09:23:59 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-01-10 09:23:59 +0000
commit793284fa154c5f1100f9431b673b1689a8ca83a2 (patch)
treee1118c1586e4ce9b736b474a2a392050f03d41f8 /app/xterm
parent2dae493626101232d21cb68033d2abe927cdc88b (diff)
Update to xterm 363. tested by jsg@ and others on tech@.
Diffstat (limited to 'app/xterm')
-rw-r--r--app/xterm/COPYING4
-rw-r--r--app/xterm/MANIFEST2
-rw-r--r--app/xterm/NEWS62
-rw-r--r--app/xterm/THANKS14
-rw-r--r--app/xterm/Tekproc.c16
-rw-r--r--app/xterm/UXTerm.ad5
-rw-r--r--app/xterm/VTPrsTbl.c84
-rw-r--r--app/xterm/VTparse.def41
-rw-r--r--app/xterm/XTerm.ad14
-rw-r--r--app/xterm/button.c663
-rw-r--r--app/xterm/charclass.c328
-rw-r--r--app/xterm/charclass.h4
-rw-r--r--app/xterm/charproc.c1074
-rw-r--r--app/xterm/charsets.c141
-rw-r--r--app/xterm/configure.in41
-rw-r--r--app/xterm/ctlseqs.ms376
-rw-r--r--app/xterm/ctlseqs.txt978
-rw-r--r--app/xterm/df-install.in80
-rw-r--r--app/xterm/doublechr.c25
-rw-r--r--app/xterm/fontutils.c487
-rw-r--r--app/xterm/fontutils.h6
-rw-r--r--app/xterm/graphics.c237
-rw-r--r--app/xterm/graphics_regis.c543
-rw-r--r--app/xterm/graphics_sixel.c61
-rw-r--r--app/xterm/html.c11
-rw-r--r--app/xterm/icons/filled-xterm.svg36
-rw-r--r--app/xterm/icons/mini.xterm.svg26
-rw-r--r--app/xterm/icons/terminal_48x48.svg23
-rw-r--r--app/xterm/icons/xterm-color.svg36
-rw-r--r--app/xterm/icons/xterm.svg34
-rw-r--r--app/xterm/input.c14
-rw-r--r--app/xterm/main.c27
-rw-r--r--app/xterm/main.h9
-rw-r--r--app/xterm/menu.c87
-rw-r--r--app/xterm/menu.h15
-rw-r--r--app/xterm/misc.c553
-rw-r--r--app/xterm/package/debian/changelog72
-rw-r--r--app/xterm/package/debian/compat2
-rw-r--r--app/xterm/package/debian/copyright2
-rw-r--r--app/xterm/package/debian/rules9
-rw-r--r--app/xterm/package/freebsd/Makefile6
-rw-r--r--app/xterm/package/freebsd/distinfo6
-rw-r--r--app/xterm/package/pkgsrc/Makefile2
-rw-r--r--app/xterm/package/xterm.spec22
-rw-r--r--app/xterm/print.c41
-rw-r--r--app/xterm/ptydata.c480
-rw-r--r--app/xterm/ptyx.h220
-rw-r--r--app/xterm/resize.c10
-rw-r--r--app/xterm/run-tic.sh34
-rw-r--r--app/xterm/screen.c116
-rw-r--r--app/xterm/scrollback.c10
-rw-r--r--app/xterm/scrollbar.c12
-rw-r--r--app/xterm/svg.c10
-rw-r--r--app/xterm/terminfo136
-rw-r--r--app/xterm/testxmc.c6
-rw-r--r--app/xterm/trace.c150
-rw-r--r--app/xterm/trace.h9
-rw-r--r--app/xterm/util.c247
-rw-r--r--app/xterm/uxterm58
-rw-r--r--app/xterm/version.c6
-rw-r--r--app/xterm/version.h8
-rw-r--r--app/xterm/vms.c12
-rw-r--r--app/xterm/vttests/256colors2.pl22
-rw-r--r--app/xterm/vttests/88colors2.pl21
-rwxr-xr-xapp/xterm/vttests/closest-rgb.pl5
-rw-r--r--app/xterm/vttests/modify-keys.pl21
-rw-r--r--app/xterm/vttests/mouse-codes5
-rw-r--r--app/xterm/vttests/print-vt-chars.pl7
-rw-r--r--app/xterm/vttests/query-color.pl83
-rw-r--r--app/xterm/vttests/query-xres.pl2
-rw-r--r--app/xterm/vttests/sgrPushPop2.pl9
-rw-r--r--app/xterm/wcwidth.c531
-rw-r--r--app/xterm/xcharmouse.h8
-rw-r--r--app/xterm/xstrings.c27
-rw-r--r--app/xterm/xterm.appdata.xml30
-rw-r--r--app/xterm/xterm.dat2
-rw-r--r--app/xterm/xterm.h71
-rw-r--r--app/xterm/xterm.log.html824
-rw-r--r--app/xterm/xterm.man1053
-rw-r--r--app/xterm/xterm_io.h17
-rw-r--r--app/xterm/xtermcap.c15
-rw-r--r--app/xterm/xtermcfg.h19
-rw-r--r--app/xterm/xtermcfg.hin19
-rw-r--r--app/xterm/xutf8.c6
84 files changed, 7380 insertions, 3260 deletions
diff --git a/app/xterm/COPYING b/app/xterm/COPYING
index 0b2c392ec..065638061 100644
--- a/app/xterm/COPYING
+++ b/app/xterm/COPYING
@@ -1,7 +1,7 @@
---- $XTermId: COPYING,v 1.2 2019/01/16 23:30:10 tom Exp $
+--- $XTermId: COPYING,v 1.3 2020/01/12 22:53:35 tom Exp $
-------------------------------------------------------------------------------
-Copyright 1996-2018,2019 by Thomas E. Dickey
+Copyright 1996-2019,2020 by Thomas E. Dickey
All Rights Reserved
diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST
index 5928efd03..e7a1b67f3 100644
--- a/app/xterm/MANIFEST
+++ b/app/xterm/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for xterm-351, version xterm-351
+MANIFEST for xterm-363, version xterm-363
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff --git a/app/xterm/NEWS b/app/xterm/NEWS
index defd1c536..deb5f4fec 100644
--- a/app/xterm/NEWS
+++ b/app/xterm/NEWS
@@ -1,30 +1,42 @@
The NEWS file was generated from xterm.log.html, which serves as the changelog
for xterm.
--------------------------------------------------------------------------------
- Patch #351 - 2019/11/17
+ Patch #363 - 2020/12/26
- * correct logic in property_to_string for deciding when to fallback
- from UTF-8 decoding to ISO-8859-1 decoding, broken in xterm #350
- (FreeBSD #241961).
- * add -report-icons to help-message.
- * improved autoconf macros:
- + CF_ADD_LIBS: the change to filter out duplicates caused this
- to append rather than prepend. revise to fix that.
- + CF_GCC_VERSION and CF_GCC_WARNINGS: move checks to distinguish
- icc/clang from gcc from the macro which handles the
- --enable-warnings option, to make this work without-warnings
- for the inline-checks.
- * update config.guess, config.sub
- * correct status in XTGETXRES replies when the resource was not
- found.
- * fix some gcc, cppcheck, clang and coverity warnings.
- * guard call to RequestResize from the struct-notify event handler to
- prevent recursion in the Xft+buffered workaround in some cases when
- doing manual resizing rather than resizing via escape sequences
- (reports by Stefan Assman, Mike Thornburg).
- * amend the workaround for Xft+buffered blanking by moving the switch
- to bitmap-fonts to account for differences in font metrics between
- bitmap- and TrueType-fonts (report by Stefan Assmann).
- * improve the note on the xterm-rep terminfo entry (prompted by
- discussion with Sven Joachim).
+ * disable groff hyphenation in generated html when using man2html.
+ * change SCS “&4” Cyrillic to non-NRCS, per VT520 manual.
+ * amend fix for SCS in patch #198 to remove DEL rather than
+ converting it to a space (report by Thomas Wolff).
+ * modify state transitions for selecting character sets to eliminate
+ an ambiguity between the “A” used in VT220 versus VT320.
+ * improve error recovery when selecting characters by resetting to US
+ ASCII when no suitable encoding is found, e.g., attempting to use
+ an NRCS sequence when NRCS is not enabled.
+ * turn off hyphenation in “.txt” conversion, prompted by groff
+ changes.
+ * add VT5xx ISO Latin-2 (prompted by discussion with Thomas Wolff).
+ * amend change from patch #361 to event-handling in CopyWait to
+ handle active-icon as a special case (Debian #975687).
+ * add call to loadColorTable to get the visual information needed to
+ decode BE RGBA32 color format (patch by Leandro Lupori).
+ * modify the resource-parsing for disallowedPasteControls and similar
+ lists of names/numbers to recognize “~;” (tilde) for cancelling a
+ given name/number.
+ * add ENQ, EOT and NUL to default for disallowedPasteControls.
+ * change default for disallowedPasteControls to omit the tab
+ character (suggested by Harald Dunkel).
+ * fix swapped height/width in regisScreenSize and maxGraphicSize
+ resources using "auto" value, from patch #314 (report by Anton
+ Lavrentiev)
+ * revise patch #362 change for shift-modifier versus mouse protocol
+ and select/paste by adding resource shiftEscape, which can be
+ enabled via a control sequence (prompted by discussion with
+ Matthijs van Duin).
+ * simplify/improve ifdef in trace code for using a separate set of
+ files for each run of xterm.
+ * add options -r and -t to vttests/query-color.pl to show the 6-digit
+ RGB code and actual colors.
+ * add nel to xterm-basic terminfo.
+ * alter vttests/modify-keys.pl to omit HTML reference links to the
+ modified-keys table where no keycode was available.
diff --git a/app/xterm/THANKS b/app/xterm/THANKS
index 7c2199aa4..3f5d80ebf 100644
--- a/app/xterm/THANKS
+++ b/app/xterm/THANKS
@@ -1,4 +1,4 @@
--- $XTermId: THANKS,v 1.24 2019/07/22 22:27:54 tom Exp $
+-- $XTermId: THANKS,v 1.28 2020/12/16 13:11:18 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.
@@ -51,9 +51,11 @@ Chris Clayton
Christian Biere
Christian Weisgerber
Chuck Blake
+Chuck Silvers
Colum Paget
D Roland Walker
Dan Church
+Dan Gohman
Dan Thompson
Daniel Colascione
Daniel Drake
@@ -85,6 +87,7 @@ Frank Giessler
Frank Guangxin Liu
Frank Liu
Gael Roualland
+George Kouryachy
George Nachman
George Peter Staplin
Gertjan Halkes
@@ -98,6 +101,7 @@ Ilya Zakharevich
Ingo Brückl
Iwamoto Kouichi
James Armstrong
+Jan Engelhardt
Jason Bacon
Jason Vas Dias
Jeff Chua
@@ -108,6 +112,7 @@ Jeremy Huddleston
Jeroen Ruigrok
Jess Thrysoee
Jim Paris
+Jimmy Aguilar Mena
Jochen Voss
Joe Allen
Joe Peterson
@@ -146,6 +151,7 @@ Matthieu Herrb
Matthieu Lagouge
Mattias Engdegård
Max Mikhanosha
+Michael Gulick
Michael Riepe
Michael Rohleder
Michael Schroeder
@@ -160,6 +166,7 @@ Min Sik Kim
Miroslav Lichvar
Nam SungHyun
Nelson Beebe
+Nicholas Marriott
Nicolas George
Németh Márton
Olaf Rogalsky
@@ -177,8 +184,10 @@ Peder Stray
Per Hedeland
Peter Berg Larsen
Phil Sidler
+Philipp Klaus Krause
Pierre Lombard
Pierre Pronchery
+Quinn Strahl
Rajesh Mandalemula
Richard Braakman
Richard Griswold
@@ -193,6 +202,7 @@ Ross Combs
Ross Paterson
Ryan Johnson
Sam Stephenson
+Samuel Thibault
Scott Sewall
Semen A Ustimenko
Sergei Laskavy
@@ -224,8 +234,10 @@ Torrey Lyons
Victor Stinner
Victor Vaile
Vincent Lefèvre
+Walter Harms
Werner Fink
Werner Lemberg
Will Day
+YOKOTA Hiroshi
Zarick Lau
Zdenek Sekera
diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c
index 8a4f12ebb..99c6a9e75 100644
--- a/app/xterm/Tekproc.c
+++ b/app/xterm/Tekproc.c
@@ -1,7 +1,7 @@
-/* $XTermId: Tekproc.c,v 1.237 2019/11/13 22:10:26 tom Exp $ */
+/* $XTermId: Tekproc.c,v 1.240 2020/09/15 09:21:12 tom Exp $ */
/*
- * Copyright 2001-2018,2019 by Thomas E. Dickey
+ * Copyright 2001-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -420,8 +420,7 @@ TekPtyData(void)
if ((Tpushb = TypeMallocN(Char, 10)) == NULL
|| (Tline = TypeMallocN(XSegment, MAX_VTX)) == NULL) {
xtermWarning("Not enough core for Tek mode\n");
- if (Tpushb)
- free(Tpushb);
+ free(Tpushb);
Tfailed = True;
}
}
@@ -655,10 +654,11 @@ Tekparse(TekWidget tw)
x++;
else if (c & WEST)
x--;
- if (tekscr->pen == PENDOWN)
+ if (tekscr->pen == PENDOWN) {
TekDraw(tw, x, y);
- else
+ } else {
TekMove(tw, x, y);
+ }
break;
case CASE_PLT_VEC:
@@ -1416,8 +1416,8 @@ static _Xconst char *dashes[TEKNUMLINES] =
static void
TekInitialize(Widget wrequest,
Widget new_arg,
- ArgList args GCC_UNUSED,
- Cardinal *num_args GCC_UNUSED)
+ ArgList args,
+ Cardinal *num_args)
{
XtermWidget xw = term;
TScreen *vtscr = TScreenOf(xw);
diff --git a/app/xterm/UXTerm.ad b/app/xterm/UXTerm.ad
index a2cca8526..0eac2ddbf 100644
--- a/app/xterm/UXTerm.ad
+++ b/app/xterm/UXTerm.ad
@@ -1,8 +1,8 @@
-! $XTermId: UXTerm.ad,v 1.13 2010/03/04 01:17:07 tom Exp $
+! $XTermId: UXTerm.ad,v 1.14 2020/09/15 21:07:49 tom Exp $
! -----------------------------------------------------------------------------
! this file is part of xterm
!
-! Copyright 2000-2006,2010 by Thomas E. Dickey
+! Copyright 2000-2010,2020 by Thomas E. Dickey
!
! All Rights Reserved
!
@@ -66,6 +66,7 @@
*VT100.font4: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
*VT100.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
*VT100.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
+*VT100.font7: -adobe-courier-medium-r-normal--24-240-75-75-m-150-iso10646-1
! Here is an alternate set of fonts with better support for bold:
!*VT100.font2: -efont-biwidth-medium-r-normal--10-100-75-75-p-50-iso10646-1
diff --git a/app/xterm/VTPrsTbl.c b/app/xterm/VTPrsTbl.c
index 59ebfc6a8..d995b5200 100644
--- a/app/xterm/VTPrsTbl.c
+++ b/app/xterm/VTPrsTbl.c
@@ -1,7 +1,7 @@
-/* $XTermId: VTPrsTbl.c,v 1.96 2019/05/07 08:38:00 tom Exp $ */
+/* $XTermId: VTPrsTbl.c,v 1.103 2020/12/22 20:29:32 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -2427,20 +2427,20 @@ CASE_CSI_IGNORE,
CASE_CSI_IGNORE,
CASE_CSI_IGNORE,
/* 0 1 2 3 */
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
/* 4 5 6 7 */
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
/* 8 9 : ; */
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
/* < = > ? */
CASE_CSI_IGNORE,
CASE_CSI_IGNORE,
@@ -2467,9 +2467,9 @@ CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
/* P Q R S */
-CASE_GROUND_STATE,
-CASE_GROUND_STATE,
-CASE_GROUND_STATE,
+CASE_XTERM_PUSH_COLORS,
+CASE_XTERM_POP_COLORS,
+CASE_XTERM_REPORT_COLORS,
CASE_GROUND_STATE,
/* T U V W */
CASE_GROUND_STATE,
@@ -2587,20 +2587,20 @@ CASE_CSI_IGNORE,
CASE_CSI_IGNORE,
CASE_CSI_IGNORE,
/* degree plusminus twosuperior threesuperior */
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
/* acute mu paragraph periodcentered */
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
/* cedilla onesuperior masculine guillemotright */
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
-CASE_CSI_IGNORE,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
+CASE_ESC_DIGIT,
/* onequarter onehalf threequarters questiondown */
CASE_CSI_IGNORE,
CASE_CSI_IGNORE,
@@ -2627,9 +2627,9 @@ CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
/* Eth Ntilde Ograve Oacute */
-CASE_GROUND_STATE,
-CASE_GROUND_STATE,
-CASE_GROUND_STATE,
+CASE_XTERM_PUSH_COLORS,
+CASE_XTERM_POP_COLORS,
+CASE_XTERM_REPORT_COLORS,
CASE_GROUND_STATE,
/* Ocircumflex Otilde Odiaeresis multiply */
CASE_GROUND_STATE,
@@ -4097,7 +4097,7 @@ CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
/* T U V W */
-CASE_RM_TITLE,
+CASE_XTERM_RM_TITLE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
@@ -4133,11 +4133,11 @@ CASE_SET_MOD_FKEYS0,
CASE_GROUND_STATE,
/* p q r s */
CASE_HIDE_POINTER,
+CASE_REPORT_VERSION,
CASE_GROUND_STATE,
-CASE_GROUND_STATE,
-CASE_GROUND_STATE,
+CASE_XTERM_SHIFT_ESCAPE,
/* t u v w */
-CASE_SM_TITLE,
+CASE_XTERM_SM_TITLE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
@@ -4257,7 +4257,7 @@ CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
/* Ocircumflex Otilde Odiaeresis multiply */
-CASE_RM_TITLE,
+CASE_XTERM_RM_TITLE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
@@ -4293,11 +4293,11 @@ CASE_SET_MOD_FKEYS0,
CASE_GROUND_STATE,
/* eth ntilde ograve oacute */
CASE_HIDE_POINTER,
+CASE_REPORT_VERSION,
CASE_GROUND_STATE,
-CASE_GROUND_STATE,
-CASE_GROUND_STATE,
+CASE_XTERM_SHIFT_ESCAPE,
/* ocircumflex otilde odiaeresis division */
-CASE_SM_TITLE,
+CASE_XTERM_SM_TITLE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
CASE_GROUND_STATE,
@@ -6666,7 +6666,7 @@ CASE_GROUND_STATE,
/* @ A B C */
CASE_GROUND_STATE,
CASE_GSETS3,
-CASE_GROUND_STATE,
+CASE_GSETS5,
CASE_GROUND_STATE,
/* D E F G */
CASE_GROUND_STATE,
@@ -6826,7 +6826,7 @@ CASE_GROUND_STATE,
/* Agrave Aacute Acircumflex Atilde */
CASE_GROUND_STATE,
CASE_GSETS3,
-CASE_GROUND_STATE,
+CASE_GSETS5,
CASE_GROUND_STATE,
/* Adiaeresis Aring AE Ccedilla */
CASE_GROUND_STATE,
diff --git a/app/xterm/VTparse.def b/app/xterm/VTparse.def
index 5669a3667..4423a2ecd 100644
--- a/app/xterm/VTparse.def
+++ b/app/xterm/VTparse.def
@@ -1,10 +1,10 @@
-# $XTermId: VTparse.def,v 1.59 2019/02/10 23:34:10 tom Exp $
+# $XTermId: VTparse.def,v 1.64 2020/12/15 21:37:33 tom Exp $
#
# vile:confmode rs=lf
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1996-2018,2019 by Thomas E. Dickey
+# Copyright 1996-2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -69,7 +69,7 @@ CASE_IL
CASE_DL
CASE_DCH
CASE_DA1
-CASE_TRACK_MOUSE
+CASE_TRACK_MOUSE # XTHIMOUSE
CASE_TBC
CASE_SET
CASE_RST
@@ -100,15 +100,15 @@ CASE_LS3R
CASE_LS2R
CASE_LS1R
CASE_PRINT
-CASE_XTERM_SAVE
-CASE_XTERM_RESTORE
+CASE_XTERM_SAVE # XTSAVE
+CASE_XTERM_RESTORE # XTRESTORE
CASE_DECID
-CASE_HP_MEM_LOCK
-CASE_HP_MEM_UNLOCK
-CASE_HP_BUGGY_LL
+CASE_HP_MEM_LOCK # HPMEMLOCK
+CASE_HP_MEM_UNLOCK # HPMEMUNLOCK
+CASE_HP_BUGGY_LL # HPBUGGYLL
CASE_HPA
CASE_VPA
-CASE_XTERM_WINOPS
+CASE_XTERM_WINOPS # XTWINOPS
CASE_ECH
CASE_CHT
CASE_CPL
@@ -168,16 +168,16 @@ CASE_DECSACE
CASE_DECCARA
CASE_DECRARA
CASE_CSI_STAR_STATE
-CASE_SET_MOD_FKEYS
+CASE_SET_MOD_FKEYS # XTMODKEYS
CASE_SET_MOD_FKEYS0
-CASE_HIDE_POINTER
+CASE_HIDE_POINTER # XTSMPOINTER
CASE_SCS1A_STATE
CASE_SCS2A_STATE
CASE_SCS3A_STATE
CASE_CSI_SPACE_STATE
CASE_DECSCUSR
-CASE_SM_TITLE
-CASE_RM_TITLE
+CASE_XTERM_SM_TITLE # XTSMTITLE
+CASE_XTERM_RM_TITLE # XTRMTITLE
CASE_DECSMBV
CASE_DECSWBV
CASE_DECLL
@@ -198,18 +198,23 @@ CASE_ANSI_RC
CASE_ESC_COLON
CASE_SCS_PERCENT
CASE_GSETS_PERCENT
-CASE_GRAPHICS_ATTRIBUTES
+CASE_GRAPHICS_ATTRIBUTES # XTSMGRAPHICS
CASE_DECRQPSR
CASE_DECSCPP
CASE_DECSNLS
CASE_CSI_HASH_STATE
-CASE_XTERM_PUSH_SGR
-CASE_XTERM_REPORT_SGR
-CASE_XTERM_POP_SGR
-CASE_XTERM_CHECKSUM
+CASE_XTERM_PUSH_SGR # XTPUSHSGR
+CASE_XTERM_REPORT_SGR # XTREPORTSGR
+CASE_XTERM_POP_SGR # XTPOPSGR
+CASE_XTERM_CHECKSUM # XTCHECKSUM
CASE_GSETS3
CASE_GSETS5
CASE_SCS_DQUOTE
CASE_GSETS_DQUOTE
CASE_SCS_AMPRSND
CASE_GSETS_AMPRSND
+CASE_REPORT_VERSION # XTVERSION
+CASE_XTERM_PUSH_COLORS # XTPUSHCOLORS
+CASE_XTERM_REPORT_COLORS # XTREPORTCOLORS
+CASE_XTERM_POP_COLORS # XTPOPCOLORS
+CASE_XTERM_SHIFT_ESCAPE # XTSHIFTESCAPE
diff --git a/app/xterm/XTerm.ad b/app/xterm/XTerm.ad
index 25e4bb0a0..351957cd3 100644
--- a/app/xterm/XTerm.ad
+++ b/app/xterm/XTerm.ad
@@ -1,8 +1,8 @@
-! $XTermId: XTerm.ad,v 1.102 2016/12/22 02:07:39 tom Exp $
+! $XTermId: XTerm.ad,v 1.104 2020/09/15 21:08:00 tom Exp $
! -----------------------------------------------------------------------------
! this file is part of xterm
!
-! Copyright 1996-2011,2016 by Thomas E. Dickey
+! Copyright 1996-2016,2020 by Thomas E. Dickey
!
! All Rights Reserved
!
@@ -120,6 +120,9 @@
*VT100.font5: 9x15
*fontMenu*font6*Label: Huge
*VT100.font6: 10x20
+*fontMenu*font7*Label: Enormous
+!*VT100.font7: 12x24
+*VT100.font7: -adobe-courier-medium-r-normal--24-240-75-75-m-150-iso10646-1
*fontMenu*fontescape*Label: Escape Sequence
*fontMenu*fontsel*Label: Selection
!fontescape and fontsel overridden by application
@@ -147,6 +150,13 @@
*VT100.utf8Fonts.font5: -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
*VT100.utf8Fonts.font6: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
+! The default fixed font and font2-font6 are commonly aliased to iso106461 (Unicode)
+! with XXX glyphs, but 12x24 is usually just iso8859-1 (about 200 glyphs).
+! The adobe-courier is more commonly available than the b&h font.
+!*VT100.utf8Fonts.font7: -sony-fixed-medium-r-normal--24-170-100-100-c-120-iso8859-1
+*VT100.utf8Fonts.font7: -adobe-courier-medium-r-normal--24-240-75-75-m-150-iso10646-1
+!*VT100.utf8Fonts.font7: -b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso10646-1
+
*tekMenu.Label: Tek Options
*tekMenu*tektextlarge*Label: Large Characters
*tekMenu*tektext2*Label: #2 Size Characters
diff --git a/app/xterm/button.c b/app/xterm/button.c
index 1e474fd81..81807d635 100644
--- a/app/xterm/button.c
+++ b/app/xterm/button.c
@@ -1,7 +1,7 @@
-/* $XTermId: button.c,v 1.575 2019/06/30 22:34:03 tom Exp $ */
+/* $XTermId: button.c,v 1.629 2020/12/20 17:02:30 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -91,6 +91,16 @@ button.c Handles button events in the terminal emulator.
#endif
#endif
+#ifdef HAVE_X11_TRANSLATEI_H
+#include <X11/ConvertI.h>
+#include <X11/TranslateI.h>
+#else
+extern String _XtPrintXlations(Widget w,
+ XtTranslations xlations,
+ Widget accelWidget,
+ _XtBoolean includeRHS);
+#endif
+
#define PRIMARY_NAME "PRIMARY"
#define CLIPBOARD_NAME "CLIPBOARD"
#define SECONDARY_NAME "SECONDARY"
@@ -124,31 +134,11 @@ button.c Handles button events in the terminal emulator.
#define GET_LINEDATA(screen, row) \
getLineData(screen, ROW2INX(screen, row))
- /*
- * We reserve shift modifier for cut/paste operations.
- *
- * In principle we can pass through control and meta modifiers, but in
- * practice, the popup menu uses control, and the window manager is likely
- * to use meta, so those events usually are not delivered to
- * SendMousePosition.
- */
-#define OurModifiers (ShiftMask)
-#define AllModifiers (ShiftMask | LockMask | ControlMask | Mod1Mask | \
- Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask)
-
-#define BtnModifiers(event) (event->state & OurModifiers)
-#define KeyModifiers(event) (event->xbutton.state & OurModifiers)
+#define MaxMouseBtn 5
#define IsBtnEvent(event) ((event)->type == ButtonPress || (event)->type == ButtonRelease)
#define IsKeyEvent(event) ((event)->type == KeyPress || (event)->type == KeyRelease)
-#define KeyState(x) (((int) ((x) & (ShiftMask|ControlMask))) \
- + (((x) & Mod1Mask) ? 2 : 0))
- /* adds together the bits:
- shift key -> 1
- meta key -> 2
- control key -> 4 */
-
#define Coordinate(s,c) ((c)->row * MaxCols(s) + (c)->col)
static const CELL zeroCELL =
@@ -209,6 +199,7 @@ MouseLimit(TScreen *screen)
break;
case SET_SGR_EXT_MODE_MOUSE:
case SET_URXVT_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
mouse_limit = -1;
break;
}
@@ -250,8 +241,8 @@ EmitMousePosition(TScreen *screen, Char line[], unsigned count, int value)
}
break;
case SET_SGR_EXT_MODE_MOUSE:
- /* FALLTHRU */
case SET_URXVT_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
count += (unsigned) sprintf((char *) line + count, "%d", value + 1);
break;
}
@@ -264,12 +255,385 @@ EmitMousePositionSeparator(TScreen *screen, Char line[], unsigned count)
switch (screen->extend_coords) {
case SET_SGR_EXT_MODE_MOUSE:
case SET_URXVT_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = ';';
break;
}
return count;
}
+enum {
+ scanMods,
+ scanKey,
+ scanColon,
+ scanFunc,
+ scanArgs
+};
+
+#if OPT_TRACE > 1
+static const char *
+visibleScan(int mode)
+{
+ const char *result = "?";
+#define DATA(name) case name: result = #name; break
+ switch (mode) {
+ DATA(scanMods);
+ DATA(scanKey);
+ DATA(scanColon);
+ DATA(scanFunc);
+ DATA(scanArgs);
+ }
+#undef DATA
+ return result;
+}
+#endif
+
+#define L_BRACK '<'
+#define R_BRACK '>'
+#define L_PAREN '('
+#define R_PAREN ')'
+
+static char *
+scanTrans(char *source, int *this_is, int *next_is, unsigned *first, unsigned *last)
+{
+ char ch;
+ char *target = source;
+
+ *first = *last = 0;
+ if (IsEmpty(target)) {
+ target = 0;
+ } else {
+ do {
+ while (IsSpace(*target))
+ target++;
+ *first = (unsigned) (target - source);
+ switch (*this_is = *next_is) {
+ case scanMods:
+ while ((ch = *target)) {
+ if (IsSpace(ch)) {
+ break;
+ } else if (ch == L_BRACK) {
+ *next_is = scanKey;
+ break;
+ } else if (ch == ':') {
+ *next_is = scanColon;
+ break;
+ } else if (ch == '~' && target != source) {
+ break;
+ }
+ target++;
+ }
+ break;
+ case scanKey:
+ while ((ch = *target)) {
+ if (IsSpace(ch)) {
+ break;
+ } else if (ch == ':') {
+ *next_is = scanColon;
+ break;
+ }
+ target++;
+ if (ch == R_BRACK)
+ break;
+ }
+ break;
+ case scanColon:
+ *next_is = scanFunc;
+ target++;
+ break;
+ case scanFunc:
+ while ((ch = *target)) {
+ if (IsSpace(ch)) {
+ break;
+ } else if (ch == L_PAREN) {
+ *next_is = scanArgs;
+ break;
+ }
+ target++;
+ }
+ break;
+ case scanArgs:
+ while ((ch = *target)) {
+ if (ch == R_PAREN) {
+ target++;
+ *next_is = scanFunc;
+ break;
+ }
+ target++;
+ }
+ break;
+ }
+ *last = (unsigned) (target - source);
+ if (*target == '\n') {
+ *next_is = scanMods;
+ target++;
+ }
+ } while (*first == *last);
+ }
+ return target;
+}
+
+void
+xtermButtonInit(XtermWidget xw)
+{
+ Widget w = (Widget) xw;
+ XErrorHandler save = XSetErrorHandler(ignore_x11_error);
+ XtTranslations xlations;
+ Widget xcelerat;
+ String result;
+
+ XtVaGetValues(w,
+ XtNtranslations, &xlations,
+ XtNaccelerators, &xcelerat,
+ (XtPointer) 0);
+ result = _XtPrintXlations(w, xlations, xcelerat, True);
+ if (result) {
+ static const char *table[] =
+ {
+ "insert-selection",
+ "select-end",
+ "select-extend",
+ "select-start",
+ "start-extend",
+ };
+ char *data = x_strdup(result);
+ char *next;
+ int state = scanMods;
+ int state2 = scanMods;
+ unsigned first;
+ unsigned last;
+ int have_button = -1;
+ Bool want_button = False;
+ Bool have_shift = False;
+ unsigned allowed = 0;
+ unsigned disallow = 0;
+
+ TRACE(("xtermButtonInit length %ld\n", strlen(result)));
+ xw->keyboard.print_translations = data;
+ while ((next = scanTrans(data, &state, &state2, &first, &last)) != 0) {
+ unsigned len = (last - first);
+ TRACE2(("parse %s:%d..%d '%.*s'\n",
+ visibleScan(state), first, last,
+ len, data + first));
+ if (state == scanMods) {
+ if (len > 1 && data[first] == '~') {
+ len--;
+ first++;
+ }
+ if (len == 7 && !x_strncasecmp(data + first, "button", len - 1)) {
+ have_button = data[first + 6] - '0';
+ } else if (len == 5 && !x_strncasecmp(data + first, "shift", len)) {
+ have_shift = True;
+ }
+ } else if (state == scanKey) {
+ if (!x_strncasecmp(data + first, "<buttonpress>", len) ||
+ !x_strncasecmp(data + first, "<buttonrelease>", len)) {
+ want_button = True;
+ } else if (want_button) {
+ have_button = data[first] - '0';
+ want_button = False;
+ }
+ } else if (state == scanFunc && have_button > 0) {
+ Cardinal n;
+ unsigned bmask = 1U << (have_button - 1);
+ for (n = 0; n < XtNumber(table); ++n) {
+ if (!x_strncasecmp(table[n], data + first, len)) {
+ TRACE(("...button %d: %s%s\n",
+ have_button, table[n],
+ have_shift ? " (disallow)" : ""));
+ if (have_shift)
+ disallow |= bmask;
+ else
+ allowed |= bmask;
+ break;
+ }
+ }
+ }
+ if (state2 == scanMods && state >= scanColon) {
+ have_button = -1;
+ want_button = False;
+ have_shift = False;
+ }
+ state = state2;
+ data = next;
+ }
+ XFree((char *) result);
+ xw->keyboard.shift_buttons = allowed & ~disallow;
+#if OPT_TRACE
+ if (xw->keyboard.shift_buttons) {
+ int button = 0;
+ unsigned mask = xw->keyboard.shift_buttons;
+ TRACE(("...Buttons used for selection that can be overridden:"));
+ while (mask != 0) {
+ ++button;
+ if ((mask & 1) != 0)
+ TRACE((" %d", button));
+ mask >>= 1;
+ }
+ TRACE(("\n"));
+ } else {
+ TRACE(("...No buttons used with selection can be overridden\n"));
+ }
+#endif
+ }
+ XSetErrorHandler(save);
+}
+
+/*
+ * Shift and control are regular X11 modifiers, but meta is not:
+ * + X10 (which had no xmodmap utility) had a meta mask, but X11 did not.
+ * + X11R1 introduced xmodmap, along with the current set of modifier masks.
+ * The meta key has been assumed to be mod1 since X11R1.
+ * The initial xterm logic in X11 was different, but gave the same result.
+ * + X11R2 modified xterm was to eliminate the X10 table which provided part of
+ * the meta logic.
+ * + X11R3 modified Xt, making Meta_L and Meta_R assignable via xmodmap, and
+ * equating Alt with Meta. Neither Alt/Meta are modifiers, but Alt is more
+ * likely to be on the keyboard. This release also added keymap tables for
+ * the server; Meta was used frequently in HP keymaps, which were the most
+ * extensive set of keymaps.
+ * + X11R4 mentions Meta in the ICCCM, stating that if Meta_L or Meta_R are
+ * found in the keysyms for a given modifier, that the client should use
+ * that modifier.
+ *
+ * This function follows the ICCCM, picking the modifier which contains the
+ * Meta_L/Meta_R keysyms (if available), falling back to the Alt_L/Alt_R
+ * (as per X11R3), and ultimately to mod1 (per X11R1).
+ */
+static unsigned
+MetaMask(XtermWidget xw)
+{
+#if OPT_NUM_LOCK
+ unsigned meta = xw->work.meta_mods;
+ if (meta == 0)
+ meta = xw->work.alt_mods;
+ if (meta == 0)
+ meta = Mod1Mask;
+#else
+ unsigned meta = Mod1Mask;
+ (void) xw;
+#endif
+ return meta;
+}
+
+/*
+ * Returns a mask of the modifiers we may use for modifying the mouse protocol
+ * response strings.
+ */
+static unsigned
+OurModifiers(XtermWidget xw)
+{
+ return (ShiftMask
+ | ControlMask
+ | MetaMask(xw));
+}
+
+/*
+ * The actual check for the shift-mask, to see if it should tell xterm to
+ * override mouse-protocol in favor of select/paste actions depends upon
+ * whether the shiftEscape resource is set to true/always vs false/never.
+ */
+static Boolean
+ShiftOverride(XtermWidget xw, unsigned state, int button)
+{
+ unsigned check = (state & OurModifiers(xw));
+ Boolean result = False;
+
+ if (check & ShiftMask) {
+ if (xw->keyboard.shift_escape == ssFalse ||
+ xw->keyboard.shift_escape == ssNever) {
+ result = True;
+ } else if (xw->keyboard.shift_escape == ssTrue) {
+ /*
+ * Check if the button is one that we found does not directly use
+ * the shift-modifier in its bindings to select/copy actions.
+ */
+ if (button > 0 && button <= MaxMouseBtn) {
+ if (xw->keyboard.shift_buttons & (1U << (button - 1))) {
+ result = True;
+ }
+ } else {
+ result = True; /* unlikely, and we don't care */
+ }
+ }
+ }
+ TRACE2(("ShiftOverride ( %#x -> %#x ) %d\n", state, check, result));
+ return result;
+}
+
+/*
+ * Normally xterm treats the shift-modifier specially when the mouse protocol
+ * is active. The translations resource binds otherwise unmodified button
+ * for these mouse-related events:
+ *
+ * ~Meta <Btn1Down>:select-start() \n\
+ * ~Meta <Btn1Motion>:select-extend() \n\
+ * ~Ctrl ~Meta <Btn2Up>:insert-selection(SELECT, CUT_BUFFER0) \n\
+ * ~Ctrl ~Meta <Btn3Down>:start-extend() \n\
+ * ~Meta <Btn3Motion>:select-extend() \n\
+ * <BtnUp>:select-end(SELECT, CUT_BUFFER0) \n\
+ *
+ * There is no API in the X libraries which would tell us if a given mouse
+ * button is bound to one of these actions. These functions make the choice
+ * configurable.
+ */
+static Bool
+InterpretButton(XtermWidget xw, XButtonEvent *event)
+{
+ Bool result = False;
+
+ if (ShiftOverride(xw, event->state, (int) event->button)) {
+ TRACE(("...shift-button #%d overrides mouse-protocol\n", event->button));
+ result = True;
+ }
+ return result;
+}
+
+#define Button1Index 8 /* X.h should have done this */
+
+static int
+MotionButton(unsigned state)
+{
+ unsigned bmask = state >> Button1Index;
+ int result = 1;
+
+ if (bmask != 0) {
+ while (!(bmask & 1)) {
+ ++result;
+ bmask >>= 1;
+ }
+ }
+ return result;
+}
+
+static Bool
+InterpretEvent(XtermWidget xw, XEvent *event)
+{
+ Bool result = False; /* if not a button, is motion */
+
+ if (IsBtnEvent(event)) {
+ result = InterpretButton(xw, (XButtonEvent *) event);
+ } else if (event->type == MotionNotify) {
+ unsigned state = event->xmotion.state;
+ int button = MotionButton(state);
+
+ if (ShiftOverride(xw, state, button)) {
+ TRACE(("...shift-motion #%d (%d,%d) overrides mouse-protocol\n",
+ button,
+ event->xmotion.y,
+ event->xmotion.x));
+ result = True;
+ }
+ }
+ return result;
+}
+
+#define OverrideEvent(event) InterpretEvent(xw, event)
+#define OverrideButton(event) InterpretButton(xw, event)
+
+/*
+ * Returns true if we handled the event here, and nothing more is needed.
+ */
Bool
SendMousePosition(XtermWidget xw, XEvent *event)
{
@@ -283,7 +647,7 @@ SendMousePosition(XtermWidget xw, XEvent *event)
case BTN_EVENT_MOUSE:
case ANY_EVENT_MOUSE:
- if (KeyModifiers(event) == 0) {
+ if (!OverrideEvent(event)) {
/* xterm extension for motion reporting. June 1998 */
/* EditorButton() will distinguish between the modes */
switch (event->type) {
@@ -302,7 +666,7 @@ SendMousePosition(XtermWidget xw, XEvent *event)
case X10_MOUSE: /* X10 compatibility sequences */
if (IsBtnEvent(event)) {
- if (BtnModifiers(my_event) == 0) {
+ if (!OverrideButton(my_event)) {
if (my_event->type == ButtonPress)
EditorButton(xw, my_event);
result = True;
@@ -312,13 +676,13 @@ SendMousePosition(XtermWidget xw, XEvent *event)
case VT200_HIGHLIGHT_MOUSE: /* DEC vt200 hilite tracking */
if (IsBtnEvent(event)) {
- if (my_event->type == ButtonPress &&
- BtnModifiers(my_event) == 0 &&
- my_event->button == Button1) {
- TrackDown(xw, my_event);
- result = True;
- } else if (BtnModifiers(my_event) == 0) {
- EditorButton(xw, my_event);
+ if (!OverrideButton(my_event)) {
+ if (my_event->type == ButtonPress &&
+ my_event->button == Button1) {
+ TrackDown(xw, my_event);
+ } else {
+ EditorButton(xw, my_event);
+ }
result = True;
}
}
@@ -326,7 +690,7 @@ SendMousePosition(XtermWidget xw, XEvent *event)
case VT200_MOUSE: /* DEC vt200 compatible */
if (IsBtnEvent(event)) {
- if (BtnModifiers(my_event) == 0) {
+ if (!OverrideButton(my_event)) {
EditorButton(xw, my_event);
result = True;
}
@@ -382,10 +746,13 @@ SendLocatorPosition(XtermWidget xw, XButtonEvent *event)
unsigned state;
/* Make sure the event is an appropriate type */
- if ((!IsBtnEvent(event) &&
- !screen->loc_filter) ||
- (BtnModifiers(event) != 0))
- return (False);
+ if (IsBtnEvent(event)) {
+ if (OverrideButton(event))
+ return (False);
+ } else {
+ if (!screen->loc_filter)
+ return (False);
+ }
if ((event->type == ButtonPress &&
!(screen->locator_events & LOC_BTNS_DN)) ||
@@ -514,7 +881,7 @@ GetLocatorPosition(XtermWidget xw)
TScreen *screen = TScreenOf(xw);
Window root, child;
int rx, ry, x, y;
- unsigned int mask;
+ unsigned int mask = 0;
int row = 0, col = 0;
Bool oor = False;
Bool ret = False;
@@ -755,11 +1122,10 @@ isClick1_clean(XtermWidget xw, XButtonEvent *event)
TScreen *screen = TScreenOf(xw);
int delta;
- if (!IsBtnEvent(event)
/* Disable on Shift-Click-1, including the application-mouse modes */
- || (BtnModifiers(event) & ShiftMask)
- || (okSendMousePos(xw) != MOUSE_OFF) /* Kinda duplicate... */
- ||ExtendingSelection) /* Was moved */
+ if (OverrideButton(event)
+ || (okSendMousePos(xw) != MOUSE_OFF)
+ || ExtendingSelection) /* Was moved */
return 0;
if (event->type != ButtonRelease)
@@ -780,12 +1146,12 @@ isClick1_clean(XtermWidget xw, XButtonEvent *event)
}
static int
-isDoubleClick3(TScreen *screen, XButtonEvent *event)
+isDoubleClick3(XtermWidget xw, TScreen *screen, XButtonEvent *event)
{
int delta;
if (event->type != ButtonRelease
- || (BtnModifiers(event) & ShiftMask)
+ || OverrideButton(event)
|| event->button != Button3) {
lastButton3UpTime = 0; /* Disable the cached info */
return 0;
@@ -819,12 +1185,12 @@ isDoubleClick3(TScreen *screen, XButtonEvent *event)
}
static int
-CheckSecondPress3(TScreen *screen, XEvent *event)
+CheckSecondPress3(XtermWidget xw, TScreen *screen, XEvent *event)
{
int delta;
if (event->type != ButtonPress
- || (KeyModifiers(event) & ShiftMask)
+ || OverrideEvent(event)
|| event->xbutton.button != Button3) {
lastButton3DoubleDownTime = 0; /* Disable the cached info */
return 0;
@@ -869,10 +1235,13 @@ rowOnCurrentLine(TScreen *screen,
if (line != screen->cur_row) {
int l1, l2;
- if (line < screen->cur_row)
- l1 = line, l2 = screen->cur_row;
- else
- l2 = line, l1 = screen->cur_row;
+ if (line < screen->cur_row) {
+ l1 = line;
+ l2 = screen->cur_row;
+ } else {
+ l2 = line;
+ l1 = screen->cur_row;
+ }
l1--;
while (++l1 < l2) {
LineData *ld = GET_LINEDATA(screen, l1);
@@ -952,7 +1321,7 @@ readlineExtend(XtermWidget xw, XEvent *event)
&& rowOnCurrentLine(screen, eventRow(screen, event), &ldelta1)) {
ReadLineMovePoint(screen, eventColBetween(screen, event), ldelta1);
}
- if (isDoubleClick3(screen, my_event)
+ if (isDoubleClick3(xw, screen, my_event)
&& SCREEN_FLAG(screen, dclick3_deletes)
&& rowOnCurrentLine(screen, screen->startSel.row, &ldelta1)
&& rowOnCurrentLine(screen, screen->endSel.row, &ldelta2)) {
@@ -999,8 +1368,8 @@ DiredButton(Widget w,
void
ReadLineButton(Widget w,
XEvent *event, /* must be XButtonEvent */
- String *params GCC_UNUSED, /* selections */
- Cardinal *num_params GCC_UNUSED)
+ String *params, /* selections */
+ Cardinal *num_params)
{
XtermWidget xw;
@@ -1203,6 +1572,40 @@ HandleKeyboardSelectEnd(Widget w,
}
}
+void
+HandlePointerMotion(Widget w,
+ XEvent *event,
+ String *params, /* selections */
+ Cardinal *num_params)
+{
+ XtermWidget xw;
+
+ (void) params;
+ (void) num_params;
+ if ((xw = getXtermWidget(w)) != 0) {
+ TRACE(("HandlePointerMotion\n"));
+ if (event->type == MotionNotify)
+ (void) SendMousePosition(xw, event);
+ }
+}
+
+void
+HandlePointerButton(Widget w,
+ XEvent *event,
+ String *params, /* selections */
+ Cardinal *num_params)
+{
+ XtermWidget xw;
+
+ (void) params;
+ (void) num_params;
+ if ((xw = getXtermWidget(w)) != 0) {
+ TRACE(("HandlePointerButton\n"));
+ if (IsBtnEvent(event))
+ (void) SendMousePosition(xw, event);
+ }
+}
+
/*
* Copy the selection data to the given target(s).
*/
@@ -1615,7 +2018,7 @@ TargetToSelection(TScreen *screen, String name)
return result;
}
-static void
+void
UnmapSelections(XtermWidget xw)
{
TScreen *screen = TScreenOf(xw);
@@ -1624,8 +2027,7 @@ UnmapSelections(XtermWidget xw)
if (screen->mappedSelect) {
for (n = 0; screen->mappedSelect[n] != 0; ++n)
free((void *) screen->mappedSelect[n]);
- free(screen->mappedSelect);
- screen->mappedSelect = 0;
+ FreeAndNull(screen->mappedSelect);
}
}
@@ -1670,8 +2072,7 @@ MapSelections(XtermWidget xw, String *params, Cardinal num_params)
while (j != 0) {
free((void *) result[--j]);
}
- free(result);
- result = 0;
+ FreeAndNull(result);
break;
}
}
@@ -2136,28 +2537,7 @@ removeControls(XtermWidget xw, char *value)
if (ch < 32) {
ReplacePaste(epC0);
- switch (ch) {
- case ANSI_BS:
- ReplacePaste(epBS);
- break;
- case ANSI_CR:
- ReplacePaste(epCR);
- break;
- case ANSI_ESC:
- ReplacePaste(epESC);
- break;
- case ANSI_FF:
- ReplacePaste(epFF);
- break;
- case ANSI_HT:
- ReplacePaste(epHT);
- break;
- case ANSI_LF:
- ReplacePaste(epNL);
- break;
- default:
- continue;
- }
+ ReplacePaste(ch);
++dst;
} else if (ch == ANSI_DEL) {
ReplacePaste(epDEL);
@@ -2419,8 +2799,7 @@ HandleInsertSelection(Widget w,
int ldelta;
TScreen *screen = TScreenOf(xw);
if (IsBtnEvent(event)
- /* Disable on Shift-mouse, including the application-mouse modes */
- && !(KeyModifiers(event) & ShiftMask)
+ && !OverrideEvent(event)
&& (okSendMousePos(xw) == MOUSE_OFF)
&& SCREEN_FLAG(screen, paste_moves)
&& rowOnCurrentLine(screen, eventRow(screen, event), &ldelta))
@@ -2589,7 +2968,7 @@ StartSelect(XtermWidget xw, const CELL *cell)
TRACE(("StartSelect row=%d, col=%d\n", cell->row, cell->col));
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
if (screen->numberOfClicks == 1) {
/* set start of selection */
screen->rawPos = *cell;
@@ -2649,6 +3028,7 @@ EndExtend(XtermWidget xw,
line[count++] = 't';
break;
case SET_SGR_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = '<';
break;
}
@@ -2660,6 +3040,7 @@ EndExtend(XtermWidget xw,
switch (screen->extend_coords) {
case SET_SGR_EXT_MODE_MOUSE:
case SET_URXVT_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = 't';
break;
}
@@ -2672,6 +3053,7 @@ EndExtend(XtermWidget xw,
line[count++] = 'T';
break;
case SET_SGR_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = '<';
break;
}
@@ -2691,6 +3073,7 @@ EndExtend(XtermWidget xw,
switch (screen->extend_coords) {
case SET_SGR_EXT_MODE_MOUSE:
case SET_URXVT_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = 'T';
break;
}
@@ -2761,7 +3144,7 @@ do_start_extend(XtermWidget xw,
screen->firstValidRow = 0;
screen->lastValidRow = screen->max_row;
#if OPT_READLINE
- if ((KeyModifiers(event) & ShiftMask)
+ if (OverrideEvent(event)
|| event->xbutton.button != Button3
|| !(SCREEN_FLAG(screen, dclick3_deletes)))
#endif
@@ -2772,12 +3155,12 @@ do_start_extend(XtermWidget xw,
screen->replyToEmacs = False;
#if OPT_READLINE
- CheckSecondPress3(screen, event);
+ CheckSecondPress3(xw, screen, event);
#endif
if (screen->numberOfClicks == 1
- || (SCREEN_FLAG(screen, dclick3_deletes) /* Dclick special */
- &&!(KeyModifiers(event) & ShiftMask))) {
+ || (SCREEN_FLAG(screen, dclick3_deletes)
+ && !OverrideEvent(event))) {
/* Save existing selection so we can reestablish it if the guy
extends past the other end of the selection */
screen->saveStartR = screen->startExt = screen->startRaw;
@@ -2928,7 +3311,7 @@ ScrollSelection(TScreen *screen, int amount, Bool always)
/*ARGSUSED*/
void
-ResizeSelection(TScreen *screen GCC_UNUSED, int rows, int cols)
+ResizeSelection(TScreen *screen, int rows, int cols)
{
rows--; /* decr to get 0-max */
cols--;
@@ -4012,11 +4395,8 @@ ClearSelectionBuffer(TScreen *screen, String selection)
{
int which = TargetToSelection(screen, selection);
SelectedCells *scp = &(screen->selected_cells[okSelectionCode(which)]);
- if (scp->data_buffer) {
- free(scp->data_buffer);
- scp->data_buffer = 0;
- scp->data_limit = 0;
- }
+ FreeAndNull(scp->data_buffer);
+ scp->data_limit = 0;
scp->data_length = 0;
screen->base64_count = 0;
}
@@ -4122,14 +4502,12 @@ _ConvertSelectionHelper(Widget w,
XTextProperty *),
XICCEncodingStyle conversion_style)
{
- XtermWidget xw;
-
*value = 0;
*length = 0;
*type = 0;
*format = 0;
- if ((xw = getXtermWidget(w)) != 0) {
+ if (getXtermWidget(w) != 0) {
Display *dpy = XtDisplay(w);
XTextProperty textprop;
int out_n = 0;
@@ -4724,6 +5102,19 @@ SaveText(TScreen *screen,
return (result);
}
+/*
+ * This adds together the bits:
+ * shift key -> 1
+ * meta key -> 2
+ * control key -> 4
+ */
+static unsigned
+KeyState(XtermWidget xw, unsigned x)
+{
+ return ((((x) & (ShiftMask | ControlMask)))
+ + (((x) & MetaMask(xw)) ? 2 : 0));
+}
+
/* 32 + following 8-bit word:
1:0 Button no: 0, 1, 2. 3=release.
@@ -4737,9 +5128,9 @@ SaveText(TScreen *screen,
/* Position: 32 - 255. */
static int
-BtnCode(XButtonEvent *event, int button)
+BtnCode(XtermWidget xw, XButtonEvent *event, int button)
{
- int result = (int) (32 + (KeyState(event->state) << 2));
+ int result = (int) (32 + (KeyState(xw, event->state) << 2));
if (event->type == MotionNotify)
result += 32;
@@ -4774,7 +5165,7 @@ EmitButtonCode(XtermWidget xw,
if (okSendMousePos(xw) == X10_MOUSE) {
value = CharOf(' ' + button);
} else {
- value = BtnCode(event, button);
+ value = BtnCode(xw, event, button);
}
switch (screen->extend_coords) {
@@ -4782,6 +5173,7 @@ EmitButtonCode(XtermWidget xw,
line[count++] = CharOf(value);
break;
case SET_SGR_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
value -= 32; /* encoding starts at zero */
/* FALLTHRU */
case SET_URXVT_EXT_MODE_MOUSE:
@@ -4840,7 +5232,8 @@ EditorButton(XtermWidget xw, XButtonEvent *event)
if (button > 3)
return;
} else if (screen->extend_coords == SET_SGR_EXT_MODE_MOUSE
- || screen->extend_coords == SET_URXVT_EXT_MODE_MOUSE) {
+ || screen->extend_coords == SET_URXVT_EXT_MODE_MOUSE
+ || screen->extend_coords == SET_PIXEL_POSITION_MOUSE) {
if (button > 15) {
return;
}
@@ -4850,27 +5243,32 @@ EditorButton(XtermWidget xw, XButtonEvent *event)
}
}
- /* Compute character position of mouse pointer */
- row = (event->y - screen->border) / FontHeight(screen);
- col = (event->x - OriginX(screen)) / FontWidth(screen);
-
- /* Limit to screen dimensions */
- if (row < 0)
- row = 0;
- else if (row > screen->max_row)
- row = screen->max_row;
+ if (screen->extend_coords == SET_PIXEL_POSITION_MOUSE) {
+ row = event->y - OriginY(screen);
+ col = event->x - OriginX(screen);
+ } else {
+ /* Compute character position of mouse pointer */
+ row = (event->y - screen->border) / FontHeight(screen);
+ col = (event->x - OriginX(screen)) / FontWidth(screen);
- if (col < 0)
- col = 0;
- else if (col > screen->max_col)
- col = screen->max_col;
+ /* Limit to screen dimensions */
+ if (row < 0)
+ row = 0;
+ else if (row > screen->max_row)
+ row = screen->max_row;
- if (mouse_limit > 0) {
- /* Limit to representable mouse dimensions */
- if (row > mouse_limit)
- row = mouse_limit;
- if (col > mouse_limit)
- col = mouse_limit;
+ if (col < 0)
+ col = 0;
+ else if (col > screen->max_col)
+ col = screen->max_col;
+
+ if (mouse_limit > 0) {
+ /* Limit to representable mouse dimensions */
+ if (row > mouse_limit)
+ row = mouse_limit;
+ if (col > mouse_limit)
+ col = mouse_limit;
+ }
}
/* Build key sequence starting with \E[M */
@@ -4895,6 +5293,7 @@ EditorButton(XtermWidget xw, XButtonEvent *event)
line[count++] = final;
break;
case SET_SGR_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = '<';
break;
}
@@ -4912,11 +5311,12 @@ EditorButton(XtermWidget xw, XButtonEvent *event)
case ButtonRelease:
/*
* The (vertical) wheel mouse interface generates release-events
- * for buttons 4 and 5, coded here as 3 and 4 respectively.
+ * for buttons 4 and 5.
*
* The X10/X11 xterm protocol maps the release for buttons 1..3 to
- * a -1, which will * be later mapped into a "0" (some button was
- * released),
+ * a -1, which will be later mapped into a "0" (some button was
+ * released), At this point, buttons 1..3 are encoded 0..2 (the
+ * code 3 is unused).
*
* The SGR (extended) xterm mouse protocol keeps the button number
* and uses a "m" to indicate button release.
@@ -4925,9 +5325,10 @@ EditorButton(XtermWidget xw, XButtonEvent *event)
* revised -TD
*/
screen->mouse_button &= ~ButtonBit(button);
- if (button < 3 || button >= 8) {
+ if (button < 3 || button > 5) {
switch (screen->extend_coords) {
case SET_SGR_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
final = 'm';
break;
default:
@@ -4969,11 +5370,13 @@ EditorButton(XtermWidget xw, XButtonEvent *event)
switch (screen->extend_coords) {
case SET_SGR_EXT_MODE_MOUSE:
case SET_URXVT_EXT_MODE_MOUSE:
+ case SET_PIXEL_POSITION_MOUSE:
line[count++] = final;
break;
}
/* Transmit key sequence to process running under xterm */
+ TRACE(("EditorButton -> %s\n", visibleChars(line, count)));
v_write(pty, line, count);
}
return;
@@ -4987,9 +5390,9 @@ XtermMouseModes
okSendMousePos(XtermWidget xw)
{
TScreen *screen = TScreenOf(xw);
- XtermMouseModes result = screen->send_mouse_pos;
+ XtermMouseModes result = (XtermMouseModes) screen->send_mouse_pos;
- switch (result) {
+ switch ((int) result) {
case MOUSE_OFF:
break;
case X10_MOUSE:
@@ -5212,7 +5615,6 @@ static char **
tokenizeFormat(String format)
{
char **result = 0;
- int argc;
format = x_skip_blanks(format);
if (*format != '\0') {
@@ -5226,8 +5628,8 @@ tokenizeFormat(String format)
int squoted = 0;
int dquoted = 0;
int n;
+ int argc = 0;
- argc = 0;
for (n = 0; format[n] != '\0'; ++n) {
if (escaped) {
blob[used++] = format[n];
@@ -5280,9 +5682,10 @@ tokenizeFormat(String format)
}
#if OPT_TRACE
if (result) {
+ int n;
TRACE(("tokenizeFormat %s\n", format));
- for (argc = 0; result[argc]; ++argc) {
- TRACE(("argv[%d] = %s\n", argc, result[argc]));
+ for (n = 0; result[n]; ++n) {
+ TRACE(("argv[%d] = %s\n", n, result[n]));
}
}
#endif
diff --git a/app/xterm/charclass.c b/app/xterm/charclass.c
index 6ec9d4fea..0413edf9e 100644
--- a/app/xterm/charclass.c
+++ b/app/xterm/charclass.c
@@ -1,7 +1,7 @@
-/* $XTermId: charclass.c,v 1.29 2017/05/29 17:43:54 tom Exp $ */
+/* $XTermId: charclass.c,v 1.43 2020/11/08 20:06:53 tom Exp $ */
/*
- * Copyright 2002-2014,2017 by Thomas E. Dickey
+ * Copyright 2002-2017,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -58,49 +58,31 @@
#if OPT_WIDE_CHARS
+#ifdef TEST_DRIVER
+
+#include <ctype.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#if OPT_TRACE
+#define Trace if (opt_v) printf
+#endif
+
+#undef OPT_REPORT_CCLASS
+#define OPT_REPORT_CCLASS 1
+#endif /* TEST_DRIVER */
+
static struct classentry {
int cclass;
int first;
int last;
} *classtab;
-/*
- * Special convention for classtab[0]:
- * - classtab[0].cclass is the allocated number of entries in classtab
- * - classtab[0].first = 1 (first used entry in classtab)
- * - classtab[0].last is the last used entry in classtab
- */
-
-int
-SetCharacterClassRange(int low, int high, int value)
-{
- TRACE(("...SetCharacterClassRange (%#x .. %#x) = %d\n", low, high, value));
-
- if (high < low)
- return -1; /* nothing to do */
-
- /* make sure we have at least one free entry left at table end */
- if (classtab[0].last > classtab[0].cclass - 2) {
- classtab[0].cclass += 5 + classtab[0].cclass / 4;
- classtab = TypeRealloc(struct classentry,
- (unsigned) classtab[0].cclass, classtab);
- if (!classtab)
- abort();
- }
-
- /* simply append new interval to end of interval array */
- classtab[0].last++;
- classtab[classtab[0].last].first = low;
- classtab[classtab[0].last].last = high;
- classtab[classtab[0].last].cclass = value;
-
- return 0;
-}
-
typedef enum {
IDENT = -1,
- ALNUM = 48,
+ OTHER = 0,
CNTRL = 1,
+ ALNUM = 48,
BLANK = 32,
U_CJK = 0x4e00,
U_SUP = 0x2070,
@@ -110,6 +92,13 @@ typedef enum {
U_HAN = 0xac00
} Classes;
+#ifdef TEST_DRIVER
+static int opt_all;
+static int opt_check;
+static int opt_quiet;
+static int opt_v;
+#endif
+
void
init_classtab(void)
{
@@ -195,17 +184,20 @@ class_name(Classes code)
static char buffer[80];
const char *result = "?";
switch (code) {
- case IDENT:
- result = "IDENT";
- break;
case ALNUM:
result = "ALNUM";
break;
+ case BLANK:
+ result = "BLANK";
+ break;
case CNTRL:
result = "CNTRL";
break;
- case BLANK:
- result = "BLANK";
+ case OTHER:
+ result = "OTHER";
+ break;
+ case IDENT:
+ result = "IDENT";
break;
case U_SUP:
result = "superscript";
@@ -233,6 +225,40 @@ class_name(Classes code)
return result;
}
+/*
+ * Special convention for classtab[0]:
+ * - classtab[0].cclass is the allocated number of entries in classtab
+ * - classtab[0].first = 1 (first used entry in classtab)
+ * - classtab[0].last is the last used entry in classtab
+ */
+
+int
+SetCharacterClassRange(int low, int high, int value)
+{
+ TRACE(("...SetCharacterClassRange (U+%04X .. U+%04X) = %s\n",
+ low, high, class_name(value)));
+
+ if (high < low)
+ return -1; /* nothing to do */
+
+ /* make sure we have at least one free entry left at table end */
+ if (classtab[0].last > classtab[0].cclass - 2) {
+ classtab[0].cclass += 5 + classtab[0].cclass / 4;
+ classtab = TypeRealloc(struct classentry,
+ (unsigned) classtab[0].cclass, classtab);
+ if (!classtab)
+ abort();
+ }
+
+ /* simply append new interval to end of interval array */
+ classtab[0].last++;
+ classtab[classtab[0].last].first = low;
+ classtab[classtab[0].last].last = high;
+ classtab[classtab[0].last].cclass = value;
+
+ return 0;
+}
+
void
report_wide_char_class(void)
{
@@ -247,7 +273,7 @@ report_wide_char_class(void)
printf("\tU+%04X .. U+%04X %s\n",
classtab[i].first,
classtab[i].last,
- class_name(classtab[i].cclass));
+ class_name((Classes) classtab[i].cclass));
}
printf("\n");
printf("These class-names are used internally (the first character code in a class):\n");
@@ -263,11 +289,223 @@ report_wide_char_class(void)
void
noleaks_CharacterClass(void)
{
- if (classtab != 0) {
- free(classtab);
- classtab = 0;
+ FreeAndNull(classtab);
+}
+#endif
+#endif /* OPT_WIDE_CHARS */
+
+#ifdef TEST_DRIVER
+#if OPT_WIDE_CHARS
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: test_charclass [options] [c1[-c1b] [c2-[c2b] [...]]]",
+ "",
+ "Options:",
+ " -a show all data",
+ " -s show only summary",
+ " -v verbose"
+ };
+ size_t n;
+ for (n = 0; n < sizeof(msg) / sizeof(msg[0]); ++n) {
+ fprintf(stderr, "%s\n", msg[n]);
}
+ exit(EXIT_FAILURE);
}
+
+static int
+expected_class(int wch)
+{
+ int result = wch;
+ wint_t ch = (wint_t) wch;
+ if (ch == '\0' || ch == '\t') {
+ result = BLANK;
+ } else if (iswcntrl(ch)) {
+ result = CNTRL;
+ } else if (iswspace(ch)) {
+ result = BLANK;
+ } else if (ch < 127) {
+ if (isalnum(ch) || ch == '_') {
+ result = ALNUM;
+ }
+ } else if (ch == 170 || ch == 181 || ch == 186) {
+ ;
+ } else if (iswalnum(ch)) {
+ result = ALNUM;
+ }
+ return result;
+}
+
+static int
+show_cclass_range(int lo, int hi)
+{
+ int cclass = CharacterClass(lo);
+ int ident = (cclass == lo);
+ int more = 0;
+ if (ident) {
+ int ch;
+ for (ch = lo + 1; ch <= hi; ch++) {
+ if (CharacterClass(ch) != ch) {
+ ident = 0;
+ break;
+ }
+ }
+ if (ident && (hi < 255)) {
+ ch = hi + 1;
+ if (CharacterClass(ch) == ch) {
+ if (ch >= 255 || CharacterClass(ch + 1) != ch) {
+ more = 1;
+ }
+ }
+ }
+ }
+ if (!more) {
+ if (lo == hi) {
+ printf("\t%d", lo);
+ } else {
+ printf("\t%d-%d", lo, hi);
+ }
+ if (!ident)
+ printf(":%d", cclass);
+ if (hi < 255)
+ printf(", \\");
+ printf("\n");
+ }
+ return !more;
+}
+
+static void
+report_resource(int first, int last)
+{
+ int class_p;
+ int ch;
+ int dh;
+
+ class_p = CharacterClass(dh = first);
+ for (ch = first; ch < last; ++ch) {
+ int class_c = CharacterClass(ch);
+ if (class_c != class_p) {
+ if (show_cclass_range(dh, ch - 1)) {
+ dh = ch;
+ class_p = class_c;
+ }
+ }
+ }
+ if (dh < last - 1) {
+ show_cclass_range(dh, last - 1);
+ }
+}
+
+static int
+decode_one(const char *source, char **target)
+{
+ int result = -1;
+ long check;
+ int radix = 0;
+ if ((source[0] == 'u' || source[0] == 'U') && source[1] == '+') {
+ source += 2;
+ radix = 16;
+ }
+ check = strtol(source, target, radix);
+ if (*target != NULL && *target != source)
+ result = (int) check;
+ return result;
+}
+
+static int
+decode_range(const char *source, int *lo, int *hi)
+{
+ int result = 0;
+ char *after1;
+ char *after2;
+ if ((*lo = decode_one(source, &after1)) >= 0) {
+ after1 += strspn(after1, ":-.\t ");
+ if ((*hi = decode_one(after1, &after2)) < 0) {
+ *hi = *lo;
+ }
+ result = 1;
+ }
+ return result;
+}
+
+static void
+do_range(const char *source)
+{
+ int lo, hi;
+ if (decode_range(source, &lo, &hi)) {
+ if (opt_all) {
+ while (lo <= hi) {
+ int other_rc = CharacterClass(lo);
+ if (!opt_quiet)
+ printf("U+%04X\t%s\n", lo, class_name(other_rc));
+ ++lo;
+ }
+ } else if (opt_check) {
+ while (lo <= hi) {
+ int expect = expected_class(lo);
+ int actual = CharacterClass(lo);
+ if (actual != expect)
+ printf("U+%04X\t%s ->%s\n", lo,
+ class_name(expect),
+ class_name(actual));
+ ++lo;
+ }
+ } else {
+ printf("\"charClass\" resource for [%d..%d]:\n", lo, hi);
+ report_resource(lo, hi + 1);
+ }
+ }
+}
+#endif /* OPT_WIDE_CHARS */
+
+/*
+ * TODO: add option to show do_range in hex
+ */
+int
+main(int argc, char **argv ENVP_ARG)
+{
+#if OPT_WIDE_CHARS
+ int ch;
#endif
+ (void) argc;
+ (void) argv;
+
+#if OPT_WIDE_CHARS
+ setlocale(LC_ALL, "");
+ while ((ch = getopt(argc, argv, "acsv")) != -1) {
+ switch (ch) {
+ case 'a':
+ opt_all = 1;
+ break;
+ case 'c':
+ opt_check = 1;
+ break;
+ case 's':
+ opt_quiet = 1;
+ break;
+ case 'v':
+ opt_v = 1;
+ break;
+ default:
+ usage();
+ }
+ }
+ init_classtab();
+
+ if (optind >= argc) {
+ do_range("0-255");
+ } else {
+ while (optind < argc) {
+ do_range(argv[optind++]);
+ }
+ }
+ report_wide_char_class();
+#else
+ printf("wide-character support is not configured\n");
#endif /* OPT_WIDE_CHARS */
+ return 0;
+}
+#endif /* TEST_DRIVER */
diff --git a/app/xterm/charclass.h b/app/xterm/charclass.h
index 45b68a827..34dca084a 100644
--- a/app/xterm/charclass.h
+++ b/app/xterm/charclass.h
@@ -1,4 +1,4 @@
-/* $XTermId: charclass.h,v 1.7 2017/05/29 14:57:26 tom Exp $ */
+/* $XTermId: charclass.h,v 1.8 2020/01/18 18:29:41 tom Exp $ */
/* $XFree86: xc/programs/xterm/charclass.h,v 1.3 2006/02/13 01:14:58 dickey Exp $ */
@@ -6,7 +6,7 @@
#define CHARCLASS_H
extern void init_classtab(void);
-/* intialise the table. needs calling before either of the
+/* initialise the table. needs calling before either of the
others. */
extern int SetCharacterClassRange(int low, int high, int value);
diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c
index 199f18d52..8018269d7 100644
--- a/app/xterm/charproc.c
+++ b/app/xterm/charproc.c
@@ -1,7 +1,7 @@
-/* $XTermId: charproc.c,v 1.1731 2019/11/17 22:38:26 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1820 2020/12/25 22:12:54 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -117,10 +117,6 @@
#include <X11/extensions/Xdbe.h>
#endif
-#if OPT_INPUT_METHOD
-#include <X11/Xlocale.h>
-#endif
-
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
@@ -139,6 +135,10 @@
#include <xstrings.h>
#include <graphics.h>
+#ifdef NO_LEAKS
+#include <xtermcap.h>
+#endif
+
typedef int (*BitFunc) (unsigned * /* p */ ,
unsigned /* mask */ );
@@ -205,11 +205,10 @@ static PARAMS parms;
#define nparam parms.count
-#define InitParams() parms.count = parms.is_sub[0] = parms.has_subparams = 0
+#define InitParams() init_params()
#define GetParam(n) parms.params[(n)]
#define SetParam(n,v) parms.params[(n)] = v
#define ParamPair(n) nparam - (n), parms.params + (n)
-#define ParamsDone() InitParams()
static jmp_buf vtjmpbuf;
@@ -262,6 +261,8 @@ static XtActionsRec actionsList[] = {
{ "insert-seven-bit", HandleKeyPressed },
{ "interpret", HandleInterpret },
{ "keymap", HandleKeymapChange },
+ { "pointer-motion", HandlePointerMotion },
+ { "pointer-button", HandlePointerButton },
{ "popup-menu", HandlePopupMenu },
{ "print", HandlePrintScreen },
{ "print-everything", HandlePrintEverything },
@@ -521,6 +522,7 @@ static XtResource xterm_resources[] =
Sres(XtNfont4, XtCFont4, screen.MenuFontName(fontMenu_font4), NULL),
Sres(XtNfont5, XtCFont5, screen.MenuFontName(fontMenu_font5), NULL),
Sres(XtNfont6, XtCFont6, screen.MenuFontName(fontMenu_font6), NULL),
+ Sres(XtNfont7, XtCFont7, screen.MenuFontName(fontMenu_font7), NULL),
Sres(XtNanswerbackString, XtCAnswerbackString, screen.answer_back, ""),
Sres(XtNboldFont, XtCBoldFont, misc.default_font.f_b, DEFBOLDFONT),
@@ -547,6 +549,7 @@ static XtResource xterm_resources[] =
Sres(XtNkeyboardDialect, XtCKeyboardDialect, screen.keyboard_dialect, DFT_KBD_DIALECT),
Sres(XtNprinterCommand, XtCPrinterCommand, SPS.printer_command, ""),
Sres(XtNtekGeometry, XtCGeometry, misc.T_geometry, NULL),
+ Sres(XtNpointerFont, XtCPointerFont, screen.cursor_font_name, NULL),
Tres(XtNcursorColor, XtCCursorColor, TEXT_CURSOR, XtDefaultForeground),
Tres(XtNforeground, XtCForeground, TEXT_FG, XtDefaultForeground),
@@ -558,9 +561,7 @@ static XtResource xterm_resources[] =
XtOffsetOf(XtermWidgetRec, misc.resizeGravity),
XtRImmediate, (XtPointer) SouthWestGravity},
- {XtNpointerShape, XtCCursor, XtRCursor, sizeof(Cursor),
- XtOffsetOf(XtermWidgetRec, screen.pointer_cursor),
- XtRString, (XtPointer) "xterm"},
+ Sres(XtNpointerShape, XtCCursor, screen.pointer_shape, "xterm"),
#ifdef ALLOWLOGGING
Bres(XtNlogInhibit, XtCLogInhibit, misc.logInhibit, False),
@@ -697,6 +698,8 @@ static XtResource xterm_resources[] =
CLICK_RES("4", screen.onClick[3], 0),
CLICK_RES("5", screen.onClick[4], 0),
+ Sres(XtNshiftEscape, XtCShiftEscape, keyboard.shift_escape_s, "false"),
+
#if OPT_MOD_FKEYS
Ires(XtNmodifyKeyboard, XtCModifyKeyboard,
keyboard.modify_1st.allow_keys, 0),
@@ -731,6 +734,7 @@ static XtResource xterm_resources[] =
#endif
#if OPT_GRAPHICS
+ Sres(XtNdecGraphicsID, XtCDecGraphicsID, screen.graph_termid, DFT_DECID),
Sres(XtNmaxGraphicSize, XtCMaxGraphicSize, screen.graphics_max_size,
"1000x1000"),
#endif
@@ -772,6 +776,7 @@ static XtResource xterm_resources[] =
Bres(XtNmkWidth, XtCMkWidth, misc.mk_width, False),
Bres(XtNprecompose, XtCPrecompose, screen.normalized_c, True),
Bres(XtNutf8Latin1, XtCUtf8Latin1, screen.utf8_latin1, False),
+ Bres(XtNutf8Weblike, XtCUtf8Weblike, screen.utf8_weblike, False),
Bres(XtNvt100Graphics, XtCVT100Graphics, screen.vt100_graphics, True),
Bres(XtNwideChars, XtCWideChars, screen.wide_chars, False),
Ires(XtNcombiningChars, XtCCombiningChars, screen.max_combining, 2),
@@ -811,6 +816,7 @@ static XtResource xterm_resources[] =
#endif
#if OPT_RENDERFONT
+ Bres(XtNforceXftHeight, XtCForceXftHeight, screen.force_xft_height, False),
#define RES_FACESIZE(n) Dres(XtNfaceSize #n, XtCFaceSize #n, misc.face_size[n], "0.0")
RES_FACESIZE(1),
RES_FACESIZE(2),
@@ -916,6 +922,8 @@ xtermAddInput(Widget w)
{ "insert", HandleKeyPressed }, /* alias */
{ "insert-eight-bit", HandleEightBitKeyPressed },
{ "insert-seven-bit", HandleKeyPressed },
+ { "pointer-motion", HandlePointerMotion },
+ { "pointer-button", HandlePointerButton },
{ "secure", HandleSecure },
{ "string", HandleStringEvent },
{ "scroll-back", HandleScrollBack },
@@ -1093,7 +1101,7 @@ setExtendedFG(XtermWidget xw)
/* This implements the IBM PC-style convention of 8-colors, with one
* bit for bold, thus mapping the 0-7 codes to 8-15. It won't make
* much sense for 16-color applications, but we keep it to retain
- * compatiblity with ANSI-color applications.
+ * compatibility with ANSI-color applications.
*/
#if OPT_PC_COLORS /* XXXJTL should be settable at runtime (resource or OSC?) */
if (TScreenOf(xw)->boldColors
@@ -1615,6 +1623,18 @@ check_bitmasks(void)
}
#endif
+static int
+init_params(void)
+{
+ while (parms.count-- > 0) {
+ parms.is_sub[parms.count] = 0;
+ parms.params[parms.count] = 0;
+ }
+ parms.count = 0;
+ parms.has_subparams = 0;
+ return 0;
+}
+
#if OPT_TRACE > 0
static void
dump_params(void)
@@ -1728,7 +1748,10 @@ init_groundtable(TScreen *screen, struct ParseState *sp)
static void
select_charset(struct ParseState *sp, int type, int size)
{
- TRACE(("select_charset %d %d\n", type, size));
+ TRACE(("select_charset G%d size %d -> G%d size %d\n",
+ sp->scstype, sp->scssize,
+ type, size));
+
sp->scstype = type;
sp->scssize = size;
if (size == 94) {
@@ -1738,7 +1761,7 @@ select_charset(struct ParseState *sp, int type, int size)
}
}
/* *INDENT-OFF* */
-static struct {
+static const struct {
DECNRCM_codes result;
int prefix;
int suffix;
@@ -1774,16 +1797,18 @@ static struct {
{ nrc_French_Canadian2, 0, '9', 3, 9, 1 },
{ nrc_Norwegian_Danish, 0, '`', 3, 9, 1 },
{ nrc_Portugese, '%', '6', 3, 9, 1 },
+ { nrc_ISO_Latin_1_Supp, 0, 'A', 3, 9, 0 },
/* VT5xx */
- { nrc_Cyrillic, '&', '4', 5, 9, 1 },
{ nrc_Greek, '"', '>', 5, 9, 1 },
{ nrc_Hebrew, '%', '=', 5, 9, 1 },
{ nrc_Turkish, '%', '2', 5, 9, 1 },
+ { nrc_DEC_Cyrillic, '&', '4', 5, 9, 0 },
{ nrc_DEC_Greek_Supp, '"', '?', 5, 9, 0 },
{ nrc_DEC_Hebrew_Supp, '"', '4', 5, 9, 0 },
{ nrc_DEC_Turkish_Supp, '%', '0', 5, 9, 0 },
{ nrc_ISO_Greek_Supp, 0, 'F', 5, 9, 0 },
{ nrc_ISO_Hebrew_Supp, 0, 'H', 5, 9, 0 },
+ { nrc_ISO_Latin_2_Supp, 0, 'B', 5, 9, 0 },
{ nrc_ISO_Latin_5_Supp, 0, 'M', 5, 9, 0 },
{ nrc_ISO_Latin_Cyrillic,0, 'L', 5, 9, 0 },
/* VT5xx (not implemented) */
@@ -1816,7 +1841,7 @@ encode_scs(DECNRCM_codes value)
#endif
void
-xtermDecodeSCS(XtermWidget xw, int which, int prefix, int suffix)
+xtermDecodeSCS(XtermWidget xw, int which, int sgroup, int prefix, int suffix)
{
TScreen *screen = TScreenOf(xw);
Cardinal n;
@@ -1826,6 +1851,7 @@ xtermDecodeSCS(XtermWidget xw, int which, int prefix, int suffix)
for (n = 0; n < XtNumber(scs_table); ++n) {
if (prefix == scs_table[n].prefix
&& suffix == scs_table[n].suffix
+ && sgroup == scs_table[n].min_level
&& screen->vtXX_level >= scs_table[n].min_level
&& screen->vtXX_level <= scs_table[n].max_level
&& (scs_table[n].need_nrc == 0 || (xw->flags & NATIONAL) != 0)) {
@@ -1835,10 +1861,19 @@ xtermDecodeSCS(XtermWidget xw, int which, int prefix, int suffix)
}
if (result != nrc_Unknown) {
initCharset(screen, which, result);
- TRACE(("setting G%d to %s\n", which, visibleScsCode((int) result)));
+ TRACE(("setting G%d to table #%d %s",
+ which, n, visibleScsCode((int) result)));
} else {
- TRACE(("...unknown GSET\n"));
+ TRACE(("...unknown GSET"));
+ initCharset(screen, which, nrc_ASCII);
}
+#if OPT_TRACE
+ TRACE((" ("));
+ if (prefix)
+ TRACE(("prefix='%c', ", prefix));
+ TRACE(("suffix='%c', sgroup=%d", suffix, sgroup));
+ TRACE((")\n"));
+#endif
}
/*
@@ -2139,6 +2174,11 @@ repaintWhenPaletteChanged(XtermWidget xw, struct ParseState *sp)
case CASE_ESC:
ignore = ((sp->parsestate == ansi_table) ||
(sp->parsestate == sos_table));
+#if USE_DOUBLE_BUFFER
+ if (resource.buffered && TScreenOf(xw)->needSwap) {
+ ignore = False;
+ }
+#endif
break;
case CASE_OSC:
ignore = ((sp->parsestate == ansi_table) ||
@@ -2163,6 +2203,7 @@ repaintWhenPaletteChanged(XtermWidget xw, struct ParseState *sp)
TRACE(("repaintWhenPaletteChanged\n"));
xw->work.palette_changed = False;
xtermRepaint(xw);
+ xtermFlushDbe(xw);
}
}
@@ -2172,7 +2213,7 @@ repaintWhenPaletteChanged(XtermWidget xw, struct ParseState *sp)
#define ParseSOS(screen) 0
#endif
-#define ResetState(sp) ParamsDone(), (sp)->parsestate = (sp)->groundtable
+#define ResetState(sp) InitParams(), (sp)->parsestate = (sp)->groundtable
static void
illegal_parse(XtermWidget xw, unsigned c, struct ParseState *sp)
@@ -2586,7 +2627,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_DEC_STATE:
/* use this branch when we do not yet have the final character */
TRACE(("...unexpected subparam usage\n"));
- ParamsDone();
+ InitParams();
sp->nextstate = CASE_CSI_IGNORE;
break;
@@ -2660,7 +2701,6 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_VT52_CUP:
TRACE(("CASE_VT52_CUP - VT52 cursor addressing\n"));
sp->vt52_cup = True;
- InitParams();
ResetState(sp);
break;
@@ -2936,7 +2976,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_ECH:
TRACE(("CASE_ECH - erase char\n"));
/* ECH */
- ClearRight(xw, one_if_default(0));
+ do_erase_char(xw, one_if_default(0), OFF_PROTECT);
ResetState(sp);
break;
@@ -3024,6 +3064,17 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
*/
if (screen->terminal_id < 200) {
switch (screen->terminal_id) {
+ case 132:
+ reply.a_param[count++] = 4; /* VT132 */
+#if OPT_REGIS_GRAPHICS
+ reply.a_param[count++] = 6; /* no STP, AVO, GPO (ReGIS) */
+#else
+ reply.a_param[count++] = 2; /* no STP, AVO, no GPO (ReGIS) */
+#endif
+ break;
+ case 131:
+ reply.a_param[count++] = 7; /* VT131 */
+ break;
case 125:
reply.a_param[count++] = 12; /* VT125 */
#if OPT_REGIS_GRAPHICS
@@ -3053,19 +3104,12 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
reply.a_param[count++] = 1; /* 132-columns */
reply.a_param[count++] = 2; /* printer */
#if OPT_REGIS_GRAPHICS
- if (screen->terminal_id == 240 ||
- screen->terminal_id == 241 ||
- screen->terminal_id == 330 ||
- screen->terminal_id == 340) {
+ if (optRegisGraphics(screen)) {
reply.a_param[count++] = 3; /* ReGIS graphics */
}
#endif
#if OPT_SIXEL_GRAPHICS
- if (screen->terminal_id == 240 ||
- screen->terminal_id == 241 ||
- screen->terminal_id == 330 ||
- screen->terminal_id == 340 ||
- screen->terminal_id == 382) {
+ if (optSixelGraphics(screen)) {
reply.a_param[count++] = 4; /* sixel graphics */
}
#endif
@@ -3112,6 +3156,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
reply.a_param[count++] = 1; /* VT220 */
break;
case 240:
+ case 241:
/* http://www.decuslib.com/DECUS/vax87a/gendyn/vt200_kind.lis */
reply.a_param[count++] = 2; /* VT240 */
break;
@@ -3125,6 +3170,9 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case 340:
reply.a_param[count++] = 19; /* VT340 */
break;
+ case 382:
+ reply.a_param[count++] = 32; /* VT382 */
+ break;
case 420:
reply.a_param[count++] = 41; /* VT420 */
break;
@@ -3219,7 +3267,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
default:
TRACE(("...unexpected subparameter in SGR\n"));
item += skip; /* ignore this */
- op = 9999; /* will never use this, anyway */
+ op = NPARAM; /* will never use this, anyway */
break;
}
}
@@ -3393,7 +3441,6 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case 47:
if_OPT_ISO_COLORS(screen, {
xw->sgr_background = (op - 40);
- xw->sgr_38_xcolors = False;
clrDirectBG(xw->flags);
setExtendedBG(xw);
});
@@ -3404,7 +3451,6 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
if (parse_extended_colors(xw, &value, &item,
&extended)) {
xw->sgr_background = value;
- xw->sgr_38_xcolors = True;
setDirectBG(xw->flags, extended);
setExtendedBG(xw);
}
@@ -3463,6 +3509,9 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
setExtendedBG(xw);
});
break;
+ default:
+ skip += NPARAM;
+ break;
}
}
ResetState(sp);
@@ -3708,7 +3757,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_DECALN:
TRACE(("CASE_DECALN - alignment test\n"));
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
/*
* DEC STD 070 does not mention left/right margins. Likely the
* text was for VT100, and not updated for VT420.
@@ -3722,21 +3771,28 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
break;
case CASE_GSETS5:
- if (screen->vtXX_level < 5) {
- ResetState(sp);
- break;
+ if (screen->vtXX_level >= 5) {
+ TRACE(("CASE_GSETS5(%d) = '%c'\n", sp->scstype, c));
+ xtermDecodeSCS(xw, sp->scstype, 5, 0, (int) c);
}
- /* FALLTHRU */
+ ResetState(sp);
+ break;
+
case CASE_GSETS3:
- if (screen->vtXX_level < 3) {
- ResetState(sp);
- break;
+ if (screen->vtXX_level >= 3) {
+ TRACE(("CASE_GSETS3(%d) = '%c'\n", sp->scstype, c));
+ xtermDecodeSCS(xw, sp->scstype, 3, 0, (int) c);
}
- /* FALLTHRU */
+ ResetState(sp);
+ break;
+
case CASE_GSETS:
- if (screen->vtXX_level >= 2 || strchr("012AB", (int) c) != 0) {
+ if (strchr("012AB", (int) c) != 0) {
TRACE(("CASE_GSETS(%d) = '%c'\n", sp->scstype, c));
- xtermDecodeSCS(xw, sp->scstype, 0, (int) c);
+ xtermDecodeSCS(xw, sp->scstype, 1, 0, (int) c);
+ } else if (screen->vtXX_level >= 2) {
+ TRACE(("CASE_GSETS(%d) = '%c'\n", sp->scstype, c));
+ xtermDecodeSCS(xw, sp->scstype, 2, 0, (int) c);
}
ResetState(sp);
break;
@@ -3810,7 +3866,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
Boolean change = True;
int blinks = screen->cursor_blink_esc;
- HideCursor();
+ HideCursor(xw);
switch (GetParam(0)) {
case DEFAULT:
@@ -3962,7 +4018,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
* Both the VT220 manual and DEC STD 070 (which documents
* levels 1-4 in detail) state that it is a soft reset.
*
- * Perhaps both sets of manuals are right (unlikely).
+ * Perhaps both sets of manuals are right (unlikely).
* Kermit says it's soft.
*/
ReallyReset(xw, False, False);
@@ -4060,8 +4116,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case 1: /* read */
TRACE(("Get sixel graphics geometry\n"));
status = 0; /* success */
- result = Min(Width(screen), screen->graphics_max_wide);
- result2 = Min(Height(screen), screen->graphics_max_high);
+ result = Min(Width(screen), (int) screen->graphics_max_wide);
+ result2 = Min(Height(screen), (int) screen->graphics_max_high);
break;
case 2: /* reset */
/* FALLTHRU */
@@ -4288,6 +4344,19 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
ResetState(sp);
break;
+ case CASE_REPORT_VERSION:
+ TRACE(("CASE_REPORT_VERSION - report terminal version\n"));
+ if (GetParam(0) <= 0) {
+ unparseputc1(xw, ANSI_DCS);
+ unparseputc(xw, '>');
+ unparseputc(xw, '|');
+ unparseputs(xw, xtermVersion());
+ unparseputc1(xw, ANSI_ST);
+ unparse_end(xw);
+ }
+ ResetState(sp);
+ break;
+
case CASE_RI:
TRACE(("CASE_RI - reverse index\n"));
RevIndex(xw, 1);
@@ -4463,7 +4532,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
if (screen->vtXX_level >= 4) {
TRACE(("CASE_DECERA - Erase rectangular area\n"));
xtermParseRect(xw, ParamPair(0), &myRect);
- ScrnFillRectangle(xw, &myRect, ' ', 0, True);
+ ScrnFillRectangle(xw, &myRect, ' ', xw->flags, True);
}
ResetState(sp);
break;
@@ -4473,7 +4542,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
value = zero_if_default(0);
TRACE(("CASE_DECFRA - Fill rectangular area\n"));
- if (nparam > 0 && IsLatin1(value)) {
+ if (nparam > 0 && CharWidth(value) > 0) {
xtermParseRect(xw, ParamPair(1), &myRect);
ScrnFillRectangle(xw, &myRect, value, xw->flags, True);
}
@@ -4687,6 +4756,14 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
} else if (nparam > 0) {
for (count = 0; count < nparam; ++count) {
item = zero_if_default(count);
+ /* deprecated - for compatibility */
+#if OPT_ISO_COLORS
+ if (item == psFG_COLOR_obs) {
+ item = psFG_COLOR;
+ } else if (item == psBG_COLOR_obs) {
+ item = psBG_COLOR;
+ }
+#endif
if (item > 0 && item < MAX_PUSH_SGR) {
value |= (1 << (item - 1));
}
@@ -4708,6 +4785,36 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
xtermPopSGR(xw);
ResetState(sp);
break;
+
+ case CASE_XTERM_PUSH_COLORS:
+ TRACE(("CASE_XTERM_PUSH_COLORS\n"));
+ if (nparam == 0) {
+ xtermPushColors(xw, DEFAULT);
+ } else {
+ for (count = 0; count < nparam; ++count) {
+ xtermPushColors(xw, GetParam(count));
+ }
+ }
+ ResetState(sp);
+ break;
+
+ case CASE_XTERM_POP_COLORS:
+ TRACE(("CASE_XTERM_POP_COLORS\n"));
+ if (nparam == 0) {
+ xtermPopColors(xw, DEFAULT);
+ } else {
+ for (count = 0; count < nparam; ++count) {
+ xtermPopColors(xw, GetParam(count));
+ }
+ }
+ ResetState(sp);
+ break;
+
+ case CASE_XTERM_REPORT_COLORS:
+ TRACE(("CASE_XTERM_REPORT_COLORS\n"));
+ xtermReportColors(xw);
+ ResetState(sp);
+ break;
#endif
case CASE_S7C1T:
@@ -4744,9 +4851,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_REP:
TRACE(("CASE_REP\n"));
- if (sp->lastchar >= 0 &&
- sp->lastchar < 256 &&
- sp->groundtable[E2A(sp->lastchar)] == CASE_PRINT) {
+ if (CharWidth(sp->lastchar) > 0) {
IChar repeated[2];
count = one_if_default(0);
repeated[0] = (IChar) sp->lastchar;
@@ -4846,7 +4951,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_GSETS_DQUOTE:
if (screen->vtXX_level >= 5) {
TRACE(("CASE_GSETS_DQUOTE(%d) = '%c'\n", sp->scstype, c));
- xtermDecodeSCS(xw, sp->scstype, '"', (int) c);
+ xtermDecodeSCS(xw, sp->scstype, 5, '"', (int) c);
}
ResetState(sp);
break;
@@ -4859,7 +4964,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_GSETS_AMPRSND:
if (screen->vtXX_level >= 5) {
TRACE(("CASE_GSETS_AMPRSND(%d) = '%c'\n", sp->scstype, c));
- xtermDecodeSCS(xw, sp->scstype, '&', (int) c);
+ xtermDecodeSCS(xw, sp->scstype, 5, '&', (int) c);
}
ResetState(sp);
break;
@@ -4872,11 +4977,33 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case CASE_GSETS_PERCENT:
if (screen->vtXX_level >= 3) {
TRACE(("CASE_GSETS_PERCENT(%d) = '%c'\n", sp->scstype, c));
- xtermDecodeSCS(xw, sp->scstype, '%', (int) c);
+ switch (c) {
+ case '0': /* DEC Turkish */
+ case '2': /* Turkish */
+ case '=': /* Hebrew */
+ value = 5;
+ break;
+ case '5': /* DEC Supplemental Graphics */
+ case '6': /* Portuguese */
+ default:
+ value = 3;
+ break;
+ }
+ xtermDecodeSCS(xw, sp->scstype, value, '%', (int) c);
}
ResetState(sp);
break;
#endif
+ case CASE_XTERM_SHIFT_ESCAPE:
+ TRACE(("CASE_XTERM_SHIFT_ESCAPE\n"));
+ value = ((nparam == 0)
+ ? 0
+ : one_if_default(0));
+ if (value >= 0 && value <= 1)
+ xw->keyboard.shift_escape = value;
+ ResetState(sp);
+ break;
+
#if OPT_MOD_FKEYS
case CASE_SET_MOD_FKEYS:
TRACE(("CASE_SET_MOD_FKEYS\n"));
@@ -4914,8 +5041,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
ResetState(sp);
break;
- case CASE_SM_TITLE:
- TRACE(("CASE_SM_TITLE\n"));
+ case CASE_XTERM_SM_TITLE:
+ TRACE(("CASE_XTERM_SM_TITLE\n"));
if (nparam >= 1) {
int n;
for (n = 0; n < nparam; ++n) {
@@ -4929,8 +5056,8 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
ResetState(sp);
break;
- case CASE_RM_TITLE:
- TRACE(("CASE_RM_TITLE\n"));
+ case CASE_XTERM_RM_TITLE:
+ TRACE(("CASE_XTERM_RM_TITLE\n"));
if (nparam >= 1) {
int n;
for (n = 0; n < nparam; ++n) {
@@ -5226,13 +5353,15 @@ v_write(int f, const Char *data, unsigned len)
}
static void
-updateCursor(TScreen *screen)
+updateCursor(XtermWidget xw)
{
+ TScreen *screen = TScreenOf(xw);
+
if (screen->cursor_set != screen->cursor_state) {
if (screen->cursor_set)
- ShowCursor();
+ ShowCursor(xw);
else
- HideCursor();
+ HideCursor(xw);
}
}
@@ -5245,7 +5374,7 @@ reallyStopBlinking(XtermWidget xw)
if (screen->cursor_state == BLINKED_OFF) {
/* force cursor to display if it is enabled */
screen->cursor_state = !screen->cursor_set;
- updateCursor(screen);
+ updateCursor(xw);
xevents(xw);
}
}
@@ -5262,8 +5391,8 @@ update_the_screen(XtermWidget xw)
moved = CursorMoved(screen);
if (screen->cursor_set && moved) {
if (screen->cursor_state)
- HideCursor();
- ShowCursor();
+ HideCursor(xw);
+ ShowCursor(xw);
#if OPT_INPUT_METHOD
PreeditPosition(xw);
#endif
@@ -5272,7 +5401,7 @@ update_the_screen(XtermWidget xw)
if (moved)
PreeditPosition(xw);
#endif
- updateCursor(screen);
+ updateCursor(xw);
}
}
@@ -5556,9 +5685,7 @@ WrapLine(XtermWidget xw)
if (ld != 0) {
/* mark that we had to wrap this line */
LineSetFlag(ld, LINEWRAPPED);
- if (screen->show_wrap_marks) {
- ShowWrapMarks(xw, screen->cur_row, ld);
- }
+ ShowWrapMarks(xw, screen->cur_row, ld);
xtermAutoPrint(xw, '\n');
xtermIndex(xw, 1);
set_cur_col(screen, ScrnLeftMargin(xw));
@@ -5592,7 +5719,7 @@ dotext(XtermWidget xw,
#if OPT_WIDE_CHARS
if (screen->vt100_graphics)
#endif
- if (!xtermCharSetOut(xw, buf, buf + len, charset))
+ if (!(len = (Cardinal) xtermCharSetOut(xw, buf, buf + len, charset)))
return;
if_OPT_XMC_GLITCH(screen, {
@@ -5662,7 +5789,7 @@ dotext(XtermWidget xw,
last_chomp = CharWidth(buf[n]);
if (last_chomp <= 0) {
IChar ch = buf[n];
- Bool eat_it = (ch > 127);
+ Bool eat_it = !screen->utf8_mode && (ch > 127);
if (ch == 0xad) {
/*
* Only display soft-hyphen if it happens to be at
@@ -5823,6 +5950,10 @@ HandleStructNotify(Widget w GCC_UNUSED,
case UnmapNotify:
mapstate = IsUnmapped;
break;
+ case MappingNotify:
+ XRefreshKeyboardMapping(&(event->xmapping));
+ VTInitModifiers(xw);
+ break;
case ConfigureNotify:
if (event->xconfigure.window == XtWindow(toplevel)) {
#if !OPT_TOOLBAR
@@ -6044,7 +6175,7 @@ dpmodes(XtermWidget xw, BitFunc func)
* mode. xterm saves/restores/initializes the most commonly
* used settings, but a real VT100 or VT520 may differ.
*
- * For instance, DEC's documention goes on to comment that
+ * For instance, DEC's documentation goes on to comment that
* while the VT52 uses hardware tabs (8 columns), the emulation
* (e.g., a VT420) does not alter those tab settings when
* switching modes.
@@ -6180,34 +6311,49 @@ dpmodes(XtermWidget xw, BitFunc func)
}
}
break;
- case srm_MARGIN_BELL: /* margin bell */
- set_bool_mode(screen->marginbell);
- if (!screen->marginbell)
- screen->bellArmed = -1;
- update_marginbell();
+#if OPT_PRINT_GRAPHICS
+ case srm_DECGEPM: /* Graphics Expanded Print Mode */
+ set_bool_mode(screen->graphics_expanded_print_mode);
break;
- case srm_REVERSEWRAP: /* reverse wraparound */
- (*func) (&xw->flags, REVERSEWRAP);
- update_reversewrap();
+#endif
+ case srm_MARGIN_BELL: /* margin bell (xterm) also DECGPCM (Graphics Print Color Mode) */
+ if_PRINT_GRAPHICS2(set_bool_mode(screen->graphics_print_color_mode)) {
+ set_bool_mode(screen->marginbell);
+ if (!screen->marginbell)
+ screen->bellArmed = -1;
+ update_marginbell();
+ }
+ break;
+ case srm_REVERSEWRAP: /* reverse wraparound (xterm) also DECGPCS (Graphics Print Color Syntax) */
+ if_PRINT_GRAPHICS2(set_bool_mode(screen->graphics_print_color_syntax)) {
+ (*func) (&xw->flags, REVERSEWRAP);
+ update_reversewrap();
+ }
break;
#ifdef ALLOWLOGGING
- case srm_ALLOWLOGGING: /* logging */
+ case srm_ALLOWLOGGING: /* logging (xterm) also DECGPBM (Graphics Print Background Mode) */
+ if_PRINT_GRAPHICS2(set_bool_mode(screen->graphics_print_background_mode)) {
#ifdef ALLOWLOGFILEONOFF
- /*
- * if this feature is enabled, logging may be
- * enabled and disabled via escape sequences.
- */
- if (IsSM())
- StartLog(xw);
- else
- CloseLog(xw);
+ /*
+ * if this feature is enabled, logging may be
+ * enabled and disabled via escape sequences.
+ */
+ if (IsSM())
+ StartLog(xw);
+ else
+ CloseLog(xw);
#else
- Bell(xw, XkbBI_Info, 0);
- Bell(xw, XkbBI_Info, 0);
+ Bell(xw, XkbBI_Info, 0);
+ Bell(xw, XkbBI_Info, 0);
#endif /* ALLOWLOGFILEONOFF */
+ }
break;
-#endif
- case srm_OPT_ALTBUF_CURSOR: /* alternate buffer & cursor */
+#elif OPT_PRINT_GRAPHICS
+ case srm_DECGPBM: /* Graphics Print Background Mode */
+ set_bool_mode(screen->graphics_print_background_mode);
+ break;
+#endif /* ALLOWLOGGING */
+ case srm_OPT_ALTBUF_CURSOR: /* optional alternate buffer and clear (xterm) */
if (!xw->misc.titeInhibit) {
if (IsSM()) {
CursorSave(xw);
@@ -6221,15 +6367,12 @@ dpmodes(XtermWidget xw, BitFunc func)
do_ti_xtra_scroll(xw);
}
break;
- case srm_OPT_ALTBUF:
- /* FALLTHRU */
- case srm_ALTBUF: /* alternate buffer */
+ case srm_OPT_ALTBUF: /* optional alternate buffer and clear (xterm) */
if (!xw->misc.titeInhibit) {
if (IsSM()) {
ToAlternate(xw, False);
} else {
- if (screen->whichBuf
- && (code == 1047))
+ if (screen->whichBuf)
ClearScreen(xw);
FromAlternate(xw);
}
@@ -6237,6 +6380,19 @@ dpmodes(XtermWidget xw, BitFunc func)
do_ti_xtra_scroll(xw);
}
break;
+ case srm_ALTBUF: /* alternate buffer (xterm) also DECGRPM (Graphics Rotated Print Mode) */
+ if_PRINT_GRAPHICS2(set_bool_mode(screen->graphics_rotated_print_mode)) {
+ if (!xw->misc.titeInhibit) {
+ if (IsSM()) {
+ ToAlternate(xw, False);
+ } else {
+ FromAlternate(xw);
+ }
+ } else if (IsSM()) {
+ do_ti_xtra_scroll(xw);
+ }
+ }
+ break;
case srm_DECNKM:
(*func) (&xw->keyboard.flags, MODE_DECKPAM);
update_appkeypad();
@@ -6260,11 +6416,7 @@ dpmodes(XtermWidget xw, BitFunc func)
break;
#if OPT_SIXEL_GRAPHICS
case srm_DECSDM: /* sixel scrolling */
- if (screen->terminal_id == 240 || /* FIXME: VT24x did not scroll sixel graphics */
- screen->terminal_id == 241 ||
- screen->terminal_id == 330 ||
- screen->terminal_id == 340 ||
- screen->terminal_id == 382) {
+ if (optSixelGraphics(screen)) { /* FIXME: VT24x did not scroll sixel graphics */
(*func) (&xw->keyboard.flags, MODE_DECSDM);
TRACE(("DECSET/DECRST DECSDM %s (resource default is %d)\n",
BtoS(xw->keyboard.flags & MODE_DECSDM),
@@ -6308,6 +6460,8 @@ dpmodes(XtermWidget xw, BitFunc func)
case srm_SGR_EXT_MODE_MOUSE:
/* FALLTHRU */
case srm_URXVT_EXT_MODE_MOUSE:
+ /* FALLTHRU */
+ case srm_PIXEL_POSITION_MOUSE:
/*
* Rather than choose an arbitrary precedence among the coordinate
* modes, they are mutually exclusive. For consistency, a reset is
@@ -6453,11 +6607,7 @@ dpmodes(XtermWidget xw, BitFunc func)
#endif
#if OPT_SIXEL_GRAPHICS
case srm_SIXEL_SCROLLS_RIGHT: /* sixel scrolling moves cursor to right */
- if (screen->terminal_id == 240 || /* FIXME: VT24x did not scroll sixel graphics */
- screen->terminal_id == 241 ||
- screen->terminal_id == 330 ||
- screen->terminal_id == 340 ||
- screen->terminal_id == 382) {
+ if (optSixelGraphics(screen)) { /* FIXME: VT24x did not scroll sixel graphics */
set_bool_mode(screen->sixel_scrolls_right);
TRACE(("DECSET/DECRST SIXEL_SCROLLS_RIGHT to %s (resource default is %s)\n",
BtoS(screen->sixel_scrolls_right),
@@ -6565,24 +6715,44 @@ savemodes(XtermWidget xw)
DoSM(DP_DECNRCM, xw->flags & NATIONAL);
}
break;
- case srm_MARGIN_BELL: /* margin bell */
- DoSM(DP_X_MARGIN, screen->marginbell);
+#if OPT_PRINT_GRAPHICS
+ case srm_DECGEPM: /* Graphics Expanded Print Mode */
+ DoSM(DP_DECGEPM, screen->graphics_expanded_print_mode);
break;
- case srm_REVERSEWRAP: /* reverse wraparound */
- DoSM(DP_X_REVWRAP, xw->flags & REVERSEWRAP);
+#endif
+ case srm_MARGIN_BELL: /* margin bell (xterm) also DECGPCM (Graphics Print Color Mode) */
+ if_PRINT_GRAPHICS2(DoSM(DP_DECGPCM, screen->graphics_print_color_mode)) {
+ DoSM(DP_X_MARGIN, screen->marginbell);
+ }
+ break;
+ case srm_REVERSEWRAP: /* reverse wraparound (xterm) also DECGPCS (Graphics Print Color Syntax) */
+ if_PRINT_GRAPHICS2(DoSM(DP_DECGPCS, screen->graphics_print_color_syntax)) {
+ DoSM(DP_X_REVWRAP, xw->flags & REVERSEWRAP);
+ }
break;
#ifdef ALLOWLOGGING
- case srm_ALLOWLOGGING: /* logging */
- DoSM(DP_X_LOGGING, screen->logging);
+ case srm_ALLOWLOGGING: /* logging (xterm) also DECGPBM (Graphics Print Background Mode) */
+ if_PRINT_GRAPHICS2(DoSM(DP_DECGPBM, screen->graphics_print_background_mode)) {
+#ifdef ALLOWLOGFILEONOFF
+ DoSM(DP_X_LOGGING, screen->logging);
+#endif /* ALLOWLOGFILEONOFF */
+ }
break;
-#endif
- case srm_OPT_ALTBUF_CURSOR:
- /* FALLTHRU */
- case srm_OPT_ALTBUF:
+#elif OPT_PRINT_GRAPHICS
+ case srm_DECGPBM: /* Graphics Print Background Mode */
+ DoSM(DP_DECGPBM, screen->graphics_print_background_mode);
+ break;
+#endif /* ALLOWLOGGING */
+ case srm_OPT_ALTBUF_CURSOR: /* optional alternate buffer and clear (xterm) */
/* FALLTHRU */
- case srm_ALTBUF: /* alternate buffer */
+ case srm_OPT_ALTBUF: /* optional alternate buffer and clear (xterm) */
DoSM(DP_X_ALTBUF, screen->whichBuf);
break;
+ case srm_ALTBUF: /* alternate buffer (xterm) also DECGRPM (Graphics Rotated Print Mode) */
+ if_PRINT_GRAPHICS2(DoSM(DP_DECGRPM, screen->graphics_rotated_print_mode)) {
+ DoSM(DP_X_ALTBUF, screen->whichBuf);
+ }
+ break;
case srm_DECNKM:
DoSM(DP_DECKPAM, xw->keyboard.flags & MODE_DECKPAM);
break;
@@ -6620,6 +6790,8 @@ savemodes(XtermWidget xw)
case srm_SGR_EXT_MODE_MOUSE:
/* FALLTHRU */
case srm_URXVT_EXT_MODE_MOUSE:
+ /* FALLTHRU */
+ case srm_PIXEL_POSITION_MOUSE:
DoSM(DP_X_EXT_MOUSE, screen->extend_coords);
break;
case srm_ALTERNATE_SCROLL:
@@ -6872,31 +7044,44 @@ restoremodes(XtermWidget xw)
modified_DECNRCM(xw);
}
break;
- case srm_MARGIN_BELL: /* margin bell */
- if ((DoRM(DP_X_MARGIN, screen->marginbell)) == 0)
- screen->bellArmed = -1;
- update_marginbell();
+#if OPT_PRINT_GRAPHICS
+ case srm_DECGEPM: /* Graphics Expanded Print Mode */
+ DoRM(DP_DECGEPM, screen->graphics_expanded_print_mode);
break;
- case srm_REVERSEWRAP: /* reverse wraparound */
- bitcpy(&xw->flags, screen->save_modes[DP_X_REVWRAP], REVERSEWRAP);
- update_reversewrap();
+#endif
+ case srm_MARGIN_BELL: /* margin bell (xterm) also DECGPCM (Graphics Print Color Mode) */
+ if_PRINT_GRAPHICS2(DoRM(DP_DECGPCM, screen->graphics_print_color_mode)) {
+ if ((DoRM(DP_X_MARGIN, screen->marginbell)) == 0)
+ screen->bellArmed = -1;
+ update_marginbell();
+ }
+ break;
+ case srm_REVERSEWRAP: /* reverse wraparound (xterm) also DECGPCS (Graphics Print Color Syntax) */
+ if_PRINT_GRAPHICS2(DoRM(DP_DECGPCS, screen->graphics_print_color_syntax)) {
+ bitcpy(&xw->flags, screen->save_modes[DP_X_REVWRAP], REVERSEWRAP);
+ update_reversewrap();
+ }
break;
#ifdef ALLOWLOGGING
- case srm_ALLOWLOGGING: /* logging */
+ case srm_ALLOWLOGGING: /* logging (xterm) also DECGPBM (Graphics Print Background Mode) */
+ if_PRINT_GRAPHICS2(DoRM(DP_DECGPBM, screen->graphics_print_background_mode)) {
#ifdef ALLOWLOGFILEONOFF
- if (screen->save_modes[DP_X_LOGGING])
- StartLog(xw);
- else
- CloseLog(xw);
+ if (screen->save_modes[DP_X_LOGGING])
+ StartLog(xw);
+ else
+ CloseLog(xw);
#endif /* ALLOWLOGFILEONOFF */
- /* update_logging done by StartLog and CloseLog */
+ /* update_logging done by StartLog and CloseLog */
+ }
break;
-#endif
- case srm_OPT_ALTBUF_CURSOR: /* alternate buffer & cursor */
- /* FALLTHRU */
- case srm_OPT_ALTBUF:
+#elif OPT_PRINT_GRAPHICS
+ case srm_DECGPBM: /* Graphics Print Background Mode */
+ DoRM(DP_DECGPBM, screen->graphics_print_background_mode);
+ break;
+#endif /* ALLOWLOGGING */
+ case srm_OPT_ALTBUF_CURSOR: /* optional alternate buffer and clear (xterm) */
/* FALLTHRU */
- case srm_ALTBUF: /* alternate buffer */
+ case srm_OPT_ALTBUF: /* optional alternate buffer and clear (xterm) */
if (!xw->misc.titeInhibit) {
if (screen->save_modes[DP_X_ALTBUF])
ToAlternate(xw, False);
@@ -6907,6 +7092,19 @@ restoremodes(XtermWidget xw)
do_ti_xtra_scroll(xw);
}
break;
+ case srm_ALTBUF: /* alternate buffer (xterm) also DECGRPM (Graphics Rotated Print Mode) */
+ if_PRINT_GRAPHICS2(DoRM(DP_DECGRPM, screen->graphics_rotated_print_mode)) {
+ if (!xw->misc.titeInhibit) {
+ if (screen->save_modes[DP_X_ALTBUF])
+ ToAlternate(xw, False);
+ else
+ FromAlternate(xw);
+ /* update_altscreen done by ToAlt and FromAlt */
+ } else if (screen->save_modes[DP_X_ALTBUF]) {
+ do_ti_xtra_scroll(xw);
+ }
+ }
+ break;
case srm_DECNKM:
bitcpy(&xw->flags, screen->save_modes[DP_DECKPAM], MODE_DECKPAM);
update_appkeypad();
@@ -6954,6 +7152,8 @@ restoremodes(XtermWidget xw)
case srm_SGR_EXT_MODE_MOUSE:
/* FALLTHRU */
case srm_URXVT_EXT_MODE_MOUSE:
+ /* FALLTHRU */
+ case srm_PIXEL_POSITION_MOUSE:
DoRM(DP_X_EXT_MOUSE, screen->extend_coords);
break;
case srm_ALLOW_ALTBUF:
@@ -7101,7 +7301,7 @@ property_to_string(XtermWidget xw, XTextProperty * text)
TScreen *screen = TScreenOf(xw);
Display *dpy = screen->display;
char *result = 0;
- char **list;
+ char **list = NULL;
int length = 0;
int rc;
@@ -7230,18 +7430,13 @@ window_ops(XtermWidget xw)
switch (code) {
case ewRestoreWin: /* Restore (de-iconify) window */
if (AllowWindowOps(xw, ewRestoreWin)) {
- TRACE(("...de-iconify window\n"));
- XMapWindow(screen->display,
- VShellWindow(xw));
+ xtermDeiconify(xw);
}
break;
case ewMinimizeWin: /* Minimize (iconify) window */
if (AllowWindowOps(xw, ewMinimizeWin)) {
- TRACE(("...iconify window\n"));
- XIconifyWindow(screen->display,
- VShellWindow(xw),
- DefaultScreen(screen->display));
+ xtermIconify(xw);
}
break;
@@ -7320,15 +7515,10 @@ window_ops(XtermWidget xw)
case ewGetWinState: /* Report the window's state */
if (AllowWindowOps(xw, ewGetWinState)) {
TRACE(("...get window attributes\n"));
- xtermGetWinAttrs(screen->display,
- VWindow(screen),
- &win_attrs);
init_reply(ANSI_CSI);
reply.a_pintro = 0;
reply.a_nparam = 1;
- reply.a_param[0] = (ParmType) ((win_attrs.map_state == IsViewable)
- ? 1
- : 2);
+ reply.a_param[0] = (ParmType) (xtermIsIconified(xw) ? 2 : 1);
reply.a_inters = 0;
reply.a_final = 't';
unparseseq(xw, &reply);
@@ -7664,7 +7854,7 @@ unparseseq(XtermWidget xw, ANSI *ap)
unparseputc(xw, ap->a_param[i]);
break;
default:
- unparseputn(xw, (UParm) ap->a_param[i]);
+ unparseputn(xw, (unsigned) ap->a_param[i]);
break;
}
}
@@ -7694,9 +7884,9 @@ unparseseq(XtermWidget xw, ANSI *ap)
}
void
-unparseputn(XtermWidget xw, UParm n)
+unparseputn(XtermWidget xw, unsigned n)
{
- UParm q;
+ unsigned q;
q = n / 10;
if (q != 0)
@@ -7835,7 +8025,7 @@ SwitchBufs(XtermWidget xw, int toBuf, Bool clearFirst)
screen->whichBuf = toBuf;
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
rows = MaxRows(screen);
SwitchBufPtrs(screen, toBuf);
@@ -7870,7 +8060,7 @@ CheckBufPtrs(TScreen *screen)
* Swap buffer line pointers between alternate and regular screens.
*/
void
-SwitchBufPtrs(TScreen *screen, int toBuf GCC_UNUSED)
+SwitchBufPtrs(TScreen *screen, int toBuf)
{
if (CheckBufPtrs(screen)) {
#if OPT_SAVE_LINES
@@ -7878,6 +8068,7 @@ SwitchBufPtrs(TScreen *screen, int toBuf GCC_UNUSED)
#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);
@@ -7926,7 +8117,7 @@ VTRun(XtermWidget xw)
if (!setjmp(VTend))
VTparse(xw);
StopBlinking(xw);
- HideCursor();
+ HideCursor(xw);
screen->cursor_set = OFF;
TRACE(("... VTRun\n"));
}
@@ -8180,8 +8371,12 @@ VTInit(XtermWidget xw)
XtOverrideTranslations(vtparent, XtParseTranslationTable(xterm_trans));
(void) XSetWMProtocols(XtDisplay(vtparent), XtWindow(vtparent),
&wm_delete_window, 1);
- TRACE_TRANS("shell", vtparent);
- TRACE_TRANS("vt100", (Widget) (xw));
+
+ if (IsEmpty(xw->keyboard.print_translations)) {
+ TRACE_TRANS("shell", vtparent);
+ TRACE_TRANS("vt100", (Widget) (xw));
+ xtermButtonInit(xw);
+ }
ScrnAllocBuf(xw);
@@ -8511,9 +8706,14 @@ set_flags_from_list(char *target,
while (!IsEmpty(source)) {
char *next = ParseList(&source);
Boolean found = False;
+ char flag = 1;
if (next == 0)
break;
+ if (*next == '~') {
+ flag = 0;
+ next++;
+ }
if (isdigit(CharOf(*next))) {
char *temp;
int value = (int) strtol(next, &temp, 0);
@@ -8522,7 +8722,7 @@ set_flags_from_list(char *target,
} else {
for (n = 0; list[n].name != 0; ++n) {
if (list[n].code == value) {
- target[value] = 1;
+ target[value] = flag;
found = True;
TRACE(("...found %s (%d)\n", list[n].name, value));
break;
@@ -8533,7 +8733,7 @@ set_flags_from_list(char *target,
for (n = 0; list[n].name != 0; ++n) {
if (!x_wildstrcmp(next, list[n].name)) {
int value = list[n].code;
- target[value] = 1;
+ target[value] = flag;
found = True;
TRACE(("...found %s (%d)\n", list[n].name, value));
}
@@ -8602,7 +8802,7 @@ reportResources(XtermWidget xw)
if (widest < width)
widest = width;
}
- qsort(list, XtNumber(xterm_resources), sizeof(String), cmp_resources);
+ qsort(list, (size_t) XtNumber(xterm_resources), sizeof(String), cmp_resources);
for (n = 0; n < XtNumber(xterm_resources); ++n) {
char *value = vt100ResourceToString(xw, list[n]);
printf("%-*s : %s\n", widest, list[n], value ? value : "(skip)");
@@ -8644,13 +8844,13 @@ vt100ResourceToString(XtermWidget xw, const char *name)
strcpy(result, value);
}
} else if (!strcmp(res_type, XtRInt)) {
- if ((result = malloc(1 + (3 * data->resource_size))) != 0)
+ if ((result = malloc(1 + (size_t) (3 * data->resource_size))) != 0)
sprintf(result, "%d", *(int *) res_addr);
} else if (!strcmp(res_type, XtRFloat)) {
- if ((result = malloc(1 + (3 * data->resource_size))) != 0)
- sprintf(result, "%f", *(float *) res_addr);
+ if ((result = malloc(1 + (size_t) (3 * data->resource_size))) != 0)
+ sprintf(result, "%f", (double) (*(float *) res_addr));
} else if (!strcmp(res_type, XtRBoolean)) {
- if ((result = malloc(6)) != 0)
+ if ((result = malloc((size_t) 6)) != 0)
strcpy(result, *(Boolean *) res_addr ? "true" : "false");
}
}
@@ -8659,6 +8859,50 @@ vt100ResourceToString(XtermWidget xw, const char *name)
}
#endif /* OPT_XRES_QUERY */
+/*
+ * Decode a terminal-ID or graphics-terminal-ID, using the default terminal-ID
+ * if the value is outside a (looser) range than limitedTerminalID. This uses
+ * a wider range, to avoid being a nuisance when using X resources with
+ * different configurations of xterm.
+ */
+static int
+decodeTerminalID(const char *value)
+{
+ const char *s;
+ char *t;
+ long result;
+
+ for (s = value; *s; s++) {
+ if (!isalpha(CharOf(*s)))
+ break;
+ }
+ result = strtol(s, &t, 10);
+ if (t == s || *t != '\0' || result <= 0L || result > 1000L) {
+ xtermWarning("unexpected value for terminalID: \"%s\"\n", value);
+ result = atoi(DFT_DECID);
+ }
+ TRACE(("decodeTerminalID \"%s\" ->%d\n", value, (int) result));
+ return (int) result;
+}
+
+/*
+ * Ensures that the value returned by decodeTerminalID is either in the range
+ * of IDs matching a known terminal, or (failing that), set to the built-in
+ * default. The DA response relies on having the ID being set to a known
+ * value.
+ */
+static int
+limitedTerminalID(int terminal_id)
+{
+ if (terminal_id < MIN_DECID)
+ terminal_id = MIN_DECID;
+ else if (terminal_id > MAX_DECID)
+ terminal_id = MAX_DECID;
+ else
+ terminal_id = atoi(DFT_DECID);
+ return terminal_id;
+}
+
/* ARGSUSED */
static void
VTInitialize(Widget wrequest,
@@ -8723,19 +8967,49 @@ VTInitialize(Widget wrequest,
#undef DATA
#define DATA(name) { #name, ep##name }
+#define DATA2(alias,name) { #alias, ep##name }
static const FlagList tblPasteControls[] =
{
- DATA(C0)
+ DATA(NUL)
+ ,DATA(SOH)
+ ,DATA(STX)
+ ,DATA(ETX)
+ ,DATA(EOT)
+ ,DATA(ENQ)
+ ,DATA(ACK)
+ ,DATA(BEL)
,DATA(BS)
+ ,DATA(HT)
+ ,DATA(LF)
+ ,DATA(VT)
+ ,DATA(FF)
,DATA(CR)
- ,DATA(DEL)
+ ,DATA(SO)
+ ,DATA(SI)
+ ,DATA(DLE)
+ ,DATA(DC1)
+ ,DATA(DC2)
+ ,DATA(DC3)
+ ,DATA(DC4)
+ ,DATA(NAK)
+ ,DATA(SYN)
+ ,DATA(ETB)
+ ,DATA(CAN)
+ ,DATA(EM)
+ ,DATA(SUB)
,DATA(ESC)
- ,DATA(FF)
- ,DATA(HT)
- ,DATA(NL)
+ ,DATA(FS)
+ ,DATA(GS)
+ ,DATA(RS)
+ ,DATA(US)
+ /* aliases */
+ ,DATA2(NL, LF)
+ ,DATA(C0)
+ ,DATA(DEL)
,DATA_END
};
#undef DATA
+#undef DATA2
#define DATA(name) { #name, et##name }
static const FlagList tblTcapOps[] =
@@ -8794,6 +9068,15 @@ VTInitialize(Widget wrequest,
#undef DATA
#endif
+#define DATA(name) { #name, ss##name }
+ static const FlagList tblShift2S[] =
+ {
+ DATA(Always)
+ ,DATA(Never)
+ ,DATA_END
+ };
+#undef DATA
+
#if OPT_WIDE_CHARS
#define DATA(name) { #name, u##name }
static const FlagList tblUtf8Mode[] =
@@ -8828,13 +9111,12 @@ VTInitialize(Widget wrequest,
XtermWidget wnew = (XtermWidget) new_arg;
Widget my_parent = SHELL_OF(wnew);
int i;
- const char *s;
#if OPT_ISO_COLORS
Bool color_ok;
#endif
-#if OPT_COLOR_RES2
+#if OPT_ISO_COLORS && OPT_COLOR_RES2
static XtResource fake_resources[] =
{
#if OPT_256_COLORS
@@ -8845,6 +9127,10 @@ VTInitialize(Widget wrequest,
};
#endif /* OPT_COLOR_RES2 */
TScreen *screen = TScreenOf(wnew);
+ char *saveLocale = xtermSetLocale(LC_NUMERIC, "C");
+#if OPT_BLINK_CURS
+ int ebValue;
+#endif
#if OPT_TRACE
check_bitmasks();
@@ -8944,9 +9230,8 @@ VTInitialize(Widget wrequest,
#endif
#if OPT_BLINK_CURS
init_Sres(screen.cursor_blink_s);
- wnew->screen.cursor_blink =
- extendedBoolean(wnew->screen.cursor_blink_s,
- tblBlinkOps, cbLAST);
+ ebValue = extendedBoolean(wnew->screen.cursor_blink_s, tblBlinkOps, cbLAST);
+ wnew->screen.cursor_blink = (BlinkOps) ebValue;
init_Bres(screen.cursor_blink_xor);
init_Ires(screen.blink_on);
init_Ires(screen.blink_off);
@@ -8992,10 +9277,10 @@ VTInitialize(Widget wrequest,
init_Bres(screen.scrollkey);
init_Dres(screen.scale_height);
- if (screen->scale_height < 0.9)
- screen->scale_height = (float) 0.9;
- if (screen->scale_height > 1.5)
- screen->scale_height = (float) 1.5;
+ if (screen->scale_height < MIN_SCALE_HEIGHT)
+ screen->scale_height = MIN_SCALE_HEIGHT;
+ if (screen->scale_height > MAX_SCALE_HEIGHT)
+ screen->scale_height = MAX_SCALE_HEIGHT;
init_Bres(misc.autoWrap);
init_Bres(misc.login_shell);
@@ -9005,15 +9290,41 @@ VTInitialize(Widget wrequest,
init_Sres(misc.T_geometry);
init_Sres(screen.term_id);
- for (s = TScreenOf(request)->term_id; *s; s++) {
- if (!isalpha(CharOf(*s)))
+ screen->terminal_id = decodeTerminalID(TScreenOf(request)->term_id);
+ /*
+ * (1) If a known terminal model, and not a graphical terminal, preserve
+ * the terminal id.
+ * (2) Otherwise, if ReGIS or sixel graphics are enabled, preserve the ID,
+ * even if it is not a known terminal.
+ * (3) Otherwise force the terminal ID to the min, max, or VT420 depending
+ * on the input.
+ */
+ switch (screen->terminal_id) {
+ case 52: /* MIN_DECID */
+ case 100:
+ case 101:
+ case 102:
+ case 131:
+ case 132:
+ case 220:
+ case 320:
+ case 420: /* DFT_DECID, unless overridden in configure */
+ case 510:
+ case 520:
+ case 525: /* MAX_DECID */
+ break;
+ default:
+#if OPT_REGIS_GRAPHICS
+ if (optRegisGraphics(screen))
break;
+#endif
+#if OPT_SIXEL_GRAPHICS
+ if (optSixelGraphics(screen))
+ break;
+#endif
+ screen->terminal_id = limitedTerminalID(screen->terminal_id);
+ break;
}
- screen->terminal_id = atoi(s);
- if (screen->terminal_id < MIN_DECID)
- screen->terminal_id = MIN_DECID;
- if (screen->terminal_id > MAX_DECID)
- screen->terminal_id = MAX_DECID;
TRACE(("term_id '%s' -> terminal_id %d\n",
screen->term_id,
screen->terminal_id));
@@ -9102,6 +9413,9 @@ VTInitialize(Widget wrequest,
init_Sres(screen.keyboard_dialect);
+ init_Sres(screen.cursor_font_name);
+ init_Sres(screen.pointer_shape);
+
init_Bres(screen.input_eight_bits);
init_Bres(screen.output_eight_bits);
init_Bres(screen.control_eight_bits);
@@ -9232,6 +9546,7 @@ VTInitialize(Widget wrequest,
* that should override the "font" resource.
*/
#if OPT_RENDERFONT
+ init_Bres(screen.force_xft_height);
for (i = 0; i <= fontMenu_lastBuiltin; ++i) {
init_Dres2(misc.face_size, i);
}
@@ -9549,6 +9864,7 @@ VTInitialize(Widget wrequest,
VTInitialize_locale(request);
init_Bres(screen.normalized_c);
init_Bres(screen.utf8_latin1);
+ init_Bres(screen.utf8_weblike);
#if OPT_LUIT_PROG
init_Bres(misc.callfilter);
@@ -9654,6 +9970,24 @@ VTInitialize(Widget wrequest,
#endif
#if OPT_GRAPHICS
+ init_Sres(screen.graph_termid);
+ screen->graphics_termid = decodeTerminalID(TScreenOf(request)->graph_termid);
+ switch (screen->graphics_termid) {
+ case 125:
+ case 240:
+ case 241:
+ case 330:
+ case 340:
+ case 382:
+ break;
+ default:
+ screen->graphics_termid = 0;
+ break;
+ }
+ TRACE(("graph_termid '%s' -> graphics_termid %d\n",
+ screen->graph_termid,
+ screen->graphics_termid));
+
init_Ires(screen.numcolorregisters);
TRACE(("initialized NUM_COLOR_REGISTERS to resource default: %d\n",
screen->numcolorregisters));
@@ -9667,25 +10001,23 @@ VTInitialize(Widget wrequest,
{
int native_w, native_h;
- switch (screen->terminal_id) {
+ switch (GraphicsTermId(screen)) {
case 125:
native_w = 768;
native_h = 460;
break;
case 240:
- native_w = 800;
- native_h = 460;
- break;
+ /* FALLTHRU */
case 241:
native_w = 800;
native_h = 460;
break;
case 330:
+ /* FALLTHRU */
+ case 340:
native_w = 800;
native_h = 480;
break;
- case 340:
- /* FALLTHRU */
default:
native_w = 800;
native_h = 480;
@@ -9705,10 +10037,10 @@ VTInitialize(Widget wrequest,
screen->graphics_regis_def_high = 1000;
screen->graphics_regis_def_wide = 1000;
if (!x_strcasecmp(screen->graphics_regis_screensize, "auto")) {
- TRACE(("setting default ReGIS screensize based on terminal_id %d\n",
- screen->terminal_id));
- screen->graphics_regis_def_high = (Dimension) native_w;
- screen->graphics_regis_def_wide = (Dimension) native_h;
+ TRACE(("setting default ReGIS screensize based on graphics_id %d\n",
+ GraphicsTermId(screen)));
+ screen->graphics_regis_def_high = (Dimension) native_h;
+ screen->graphics_regis_def_wide = (Dimension) native_w;
} else {
int conf_high;
int conf_wide;
@@ -9742,10 +10074,10 @@ VTInitialize(Widget wrequest,
screen->graphics_max_high = 1000;
screen->graphics_max_wide = 1000;
if (!x_strcasecmp(screen->graphics_max_size, "auto")) {
- TRACE(("setting max graphics screensize based on terminal_id %d\n",
- screen->terminal_id));
- screen->graphics_max_high = (Dimension) native_w;
- screen->graphics_max_wide = (Dimension) native_h;
+ TRACE(("setting max graphics screensize based on graphics_id %d\n",
+ GraphicsTermId(screen)));
+ screen->graphics_max_high = (Dimension) native_h;
+ screen->graphics_max_wide = (Dimension) native_w;
} else {
int conf_high;
int conf_wide;
@@ -9789,8 +10121,14 @@ VTInitialize(Widget wrequest,
#if OPT_SIXEL_GRAPHICS
init_Bres(screen.sixel_scrolls_right);
- TRACE(("initialized SIXEL_SCROLLS_RIGHT to resource default: %s\n",
- BtoS(screen->sixel_scrolls_right)));
+#endif
+#if OPT_PRINT_GRAPHICS
+ init_Bres(screen.graphics_print_to_host);
+ init_Bres(screen.graphics_expanded_print_mode);
+ init_Bres(screen.graphics_print_color_mode);
+ init_Bres(screen.graphics_print_color_syntax);
+ init_Bres(screen.graphics_print_background_mode);
+ init_Bres(screen.graphics_rotated_print_mode);
#endif
/* look for focus related events on the shell, because we need
@@ -9813,7 +10151,7 @@ VTInitialize(Widget wrequest,
wnew->VT100_TB_INFO(menu_bar) = request->VT100_TB_INFO(menu_bar);
init_Ires(VT100_TB_INFO(menu_height));
#endif
- XtAddEventHandler(my_parent, StructureNotifyMask, False,
+ XtAddEventHandler(my_parent, MappingNotify | StructureNotifyMask, False,
HandleStructNotify, (Opaque) 0);
#endif /* HANDLE_STRUCT_NOTIFY */
@@ -9872,6 +10210,10 @@ VTInitialize(Widget wrequest,
wnew->initflags = wnew->flags;
+ init_Sres(keyboard.shift_escape_s);
+ wnew->keyboard.shift_escape =
+ extendedBoolean(wnew->keyboard.shift_escape_s, tblShift2S, ssLAST);
+
#if OPT_MOD_FKEYS
init_Ires(keyboard.modify_1st.allow_keys);
init_Ires(keyboard.modify_1st.cursor_keys);
@@ -9899,6 +10241,7 @@ VTInitialize(Widget wrequest,
if (resource.reportXRes)
reportResources(wnew);
#endif
+ xtermResetLocale(LC_NUMERIC, saveLocale);
return;
}
@@ -9934,14 +10277,7 @@ releaseWindowGCs(XtermWidget xw, VTwin *win)
#define TRACE_FREE_LEAK(name) \
if (name) { \
TRACE(("freed " #name ": %p\n", (const void *) name)); \
- free((void *) name); \
- name = 0; \
- }
-
-#define FREE_LEAK(name) \
- if (name) { \
- free((void *) name); \
- name = 0; \
+ FreeAndNull(name); \
}
#if OPT_INPUT_METHOD
@@ -9994,6 +10330,9 @@ VTDestroy(Widget w GCC_UNUSED)
for (n = 0; n < MAXCOLORS; n++) {
TRACE_FREE_LEAK(screen->Acolors[n].resource);
}
+ for (n = 0; n < MAX_SAVED_SGR; n++) {
+ TRACE_FREE_LEAK(xw->saved_colors.palettes[n]);
+ }
#endif
#if OPT_COLOR_RES
for (n = 0; n < NCOLORS; n++) {
@@ -10012,6 +10351,7 @@ VTDestroy(Widget w GCC_UNUSED)
}
}
#endif
+ FreeMarkGCs(xw);
TRACE_FREE_LEAK(screen->unparse_bfr);
TRACE_FREE_LEAK(screen->save_ptr);
TRACE_FREE_LEAK(screen->saveBuf_data);
@@ -10021,8 +10361,13 @@ VTDestroy(Widget w GCC_UNUSED)
TRACE_FREE_LEAK(screen->editBuf_index[n]);
}
TRACE_FREE_LEAK(screen->keyboard_dialect);
+ TRACE_FREE_LEAK(screen->cursor_font_name);
+ TRACE_FREE_LEAK(screen->pointer_shape);
TRACE_FREE_LEAK(screen->term_id);
#if OPT_WIDE_CHARS
+ TRACE_FREE_LEAK(screen->utf8_mode_s);
+ TRACE_FREE_LEAK(screen->utf8_fonts_s);
+ TRACE_FREE_LEAK(screen->utf8_title_s);
#if OPT_LUIT_PROG
TRACE_FREE_LEAK(xw->misc.locale_str);
TRACE_FREE_LEAK(xw->misc.localefilter);
@@ -10030,7 +10375,6 @@ VTDestroy(Widget w GCC_UNUSED)
#endif
TRACE_FREE_LEAK(xw->misc.T_geometry);
TRACE_FREE_LEAK(xw->misc.geo_metry);
- TRACE_FREE_LEAK(xw->screen.term_id);
#if OPT_INPUT_METHOD
cleanupInputMethod(xw);
TRACE_FREE_LEAK(xw->misc.f_x);
@@ -10057,6 +10401,7 @@ VTDestroy(Widget w GCC_UNUSED)
xtermCloseFonts(xw, screen->ifnts);
#endif
noleaks_cachedCgs(xw);
+ free_termcap(xw);
TRACE_FREE_LEAK(screen->selection_targets_8bit);
#if OPT_SELECT_REGEX
@@ -10092,11 +10437,9 @@ VTDestroy(Widget w GCC_UNUSED)
TRACE_FREE_LEAK(screen->logfile);
#endif
TRACE_FREE_LEAK(screen->eight_bit_meta_s);
- TRACE_FREE_LEAK(screen->term_id);
TRACE_FREE_LEAK(screen->charClass);
TRACE_FREE_LEAK(screen->answer_back);
TRACE_FREE_LEAK(screen->printer_state.printer_command);
- TRACE_FREE_LEAK(screen->keyboard_dialect);
TRACE_FREE_LEAK(screen->disallowedColorOps);
TRACE_FREE_LEAK(screen->disallowedFontOps);
TRACE_FREE_LEAK(screen->disallowedMouseOps);
@@ -10139,6 +10482,7 @@ VTDestroy(Widget w GCC_UNUSED)
TRACE_FREE_LEAK(xw->misc.default_font.f_wb);
#endif
+ TRACE_FREE_LEAK(xw->work.wm_name);
freeFontLists(&(xw->work.fonts.x11));
#if OPT_RENDERFONT
freeFontLists(&(xw->work.fonts.xft));
@@ -10168,23 +10512,44 @@ VTDestroy(Widget w GCC_UNUSED)
}
#endif
-#if OPT_SELECT_REGEX
+#if OPT_BLINK_CURS
+ TRACE_FREE_LEAK(screen->cursor_blink_s);
+#endif
+
+#if OPT_REGIS_GRAPHICS
+ TRACE_FREE_LEAK(screen->graphics_regis_default_font);
+ TRACE_FREE_LEAK(screen->graphics_regis_screensize);
+#endif
+#if OPT_GRAPHICS
+ TRACE_FREE_LEAK(screen->graph_termid);
+ TRACE_FREE_LEAK(screen->graphics_max_size);
+#endif
+
for (n = 0; n < NSELECTUNITS; ++n) {
- FREE_LEAK(screen->selectExpr[n]);
- }
+#if OPT_SELECT_REGEX
+ TRACE_FREE_LEAK(screen->selectExpr[n]);
#endif
+#if OPT_XRES_QUERY
+ TRACE_FREE_LEAK(screen->onClick[n]);
+#endif
+ }
- if (screen->selection_atoms)
- XtFree((void *) (screen->selection_atoms));
+ XtFree((void *) (screen->selection_atoms));
for (n = 0; n < MAX_SELECTIONS; ++n) {
free(screen->selected_cells[n].data_buffer);
}
+ if (defaultTranslations != xtermClassRec.core_class.tm_table) {
+ TRACE_FREE_LEAK(defaultTranslations);
+ }
TRACE_FREE_LEAK(xtermClassRec.core_class.tm_table);
+ TRACE_FREE_LEAK(xw->keyboard.shift_escape_s);
TRACE_FREE_LEAK(xw->keyboard.extra_translations);
TRACE_FREE_LEAK(xw->keyboard.shell_translations);
TRACE_FREE_LEAK(xw->keyboard.xterm_translations);
+ TRACE_FREE_LEAK(xw->keyboard.print_translations);
+ UnmapSelections(xw);
XtFree((void *) (xw->visInfo));
@@ -10449,6 +10814,139 @@ initBorderGC(XtermWidget xw, VTwin *win)
#endif
}
+/* adapted from <X11/cursorfont.h> */
+static int
+LookupCursorShape(const char *name)
+{
+#define DATA(name) { XC_##name, #name }
+ static struct {
+ int code;
+ const char name[25];
+ } table[] = {
+ DATA(X_cursor),
+ DATA(arrow),
+ DATA(based_arrow_down),
+ DATA(based_arrow_up),
+ DATA(boat),
+ DATA(bogosity),
+ DATA(bottom_left_corner),
+ DATA(bottom_right_corner),
+ DATA(bottom_side),
+ DATA(bottom_tee),
+ DATA(box_spiral),
+ DATA(center_ptr),
+ DATA(circle),
+ DATA(clock),
+ DATA(coffee_mug),
+ DATA(cross),
+ DATA(cross_reverse),
+ DATA(crosshair),
+ DATA(diamond_cross),
+ DATA(dot),
+ DATA(dotbox),
+ DATA(double_arrow),
+ DATA(draft_large),
+ DATA(draft_small),
+ DATA(draped_box),
+ DATA(exchange),
+ DATA(fleur),
+ DATA(gobbler),
+ DATA(gumby),
+ DATA(hand1),
+ DATA(hand2),
+ DATA(heart),
+ DATA(icon),
+ DATA(iron_cross),
+ DATA(left_ptr),
+ DATA(left_side),
+ DATA(left_tee),
+ DATA(leftbutton),
+ DATA(ll_angle),
+ DATA(lr_angle),
+ DATA(man),
+ DATA(middlebutton),
+ DATA(mouse),
+ DATA(pencil),
+ DATA(pirate),
+ DATA(plus),
+ DATA(question_arrow),
+ DATA(right_ptr),
+ DATA(right_side),
+ DATA(right_tee),
+ DATA(rightbutton),
+ DATA(rtl_logo),
+ DATA(sailboat),
+ DATA(sb_down_arrow),
+ DATA(sb_h_double_arrow),
+ DATA(sb_left_arrow),
+ DATA(sb_right_arrow),
+ DATA(sb_up_arrow),
+ DATA(sb_v_double_arrow),
+ DATA(shuttle),
+ DATA(sizing),
+ DATA(spider),
+ DATA(spraycan),
+ DATA(star),
+ DATA(target),
+ DATA(tcross),
+ DATA(top_left_arrow),
+ DATA(top_left_corner),
+ DATA(top_right_corner),
+ DATA(top_side),
+ DATA(top_tee),
+ DATA(trek),
+ DATA(ul_angle),
+ DATA(umbrella),
+ DATA(ur_angle),
+ DATA(watch),
+ DATA(xterm),
+ };
+#undef DATA
+ Cardinal j;
+ int result = -1;
+ if (!IsEmpty(name)) {
+ for (j = 0; j < XtNumber(table); ++j) {
+ if (!strcmp(name, table[j].name)) {
+ result = table[j].code;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+#if USE_DOUBLE_BUFFER
+static Boolean
+allocateDbe(XtermWidget xw, VTwin *target)
+{
+ TScreen *screen = TScreenOf(xw);
+ Boolean result = False;
+
+ target->drawable = target->window;
+
+ if (resource.buffered) {
+ Window win = target->window;
+ Drawable d;
+ int major, minor;
+ if (XdbeQueryExtension(XtDisplay(xw), &major, &minor)) {
+ d = XdbeAllocateBackBufferName(XtDisplay(xw), win,
+ (XdbeSwapAction) XdbeCopied);
+ if (d == None) {
+ fprintf(stderr, "Couldn't allocate a back buffer!\n");
+ exit(3);
+ }
+ target->drawable = d;
+ screen->needSwap = 1;
+ TRACE(("initialized double-buffering\n"));
+ result = True;
+ } else {
+ resource.buffered = False;
+ }
+ }
+ return result;
+}
+#endif /* USE_DOUBLE_BUFFER */
+
/*ARGSUSED*/
static void
VTRealize(Widget w,
@@ -10466,26 +10964,6 @@ VTRealize(Widget w,
TRACE(("VTRealize {{\n"));
-#if OPT_TOOLBAR
- /*
- * Layout for the toolbar confuses the Shell widget. Remind it that we
- * would like to be iconified if the corresponding resource was set.
- */
- if (XtIsRealized(toplevel)) {
- Boolean iconic = 0;
-
- XtVaGetValues(toplevel,
- XtNiconic, &iconic,
- (XtPointer) 0);
-
- if (iconic) {
- XIconifyWindow(XtDisplay(toplevel),
- XtWindow(toplevel),
- DefaultScreen(XtDisplay(toplevel)));
- }
- }
-#endif
-
TabReset(xw->tabs);
if (screen->menu_font_number == fontMenu_default) {
@@ -10531,12 +11009,22 @@ VTRealize(Widget w,
#endif
/* making cursor */
- if (!screen->pointer_cursor) {
+ if (screen->pointer_cursor == None) {
+ unsigned shape = XC_xterm;
+ int other = LookupCursorShape(screen->pointer_shape);
+
+ TRACE(("looked up shape index %d from shape name \"%s\"\n", other,
+ NonNull(screen->pointer_shape)));
+ if (other >= 0)
+ shape = (unsigned) other;
+
+ TRACE(("creating text pointer cursor from shape %d\n", shape));
screen->pointer_cursor =
- make_colored_cursor(XC_xterm,
+ make_colored_cursor(shape,
T_COLOR(screen, MOUSE_FG),
T_COLOR(screen, MOUSE_BG));
} else {
+ TRACE(("recoloring existing text pointer cursor\n"));
recolor_cursor(screen,
screen->pointer_cursor,
T_COLOR(screen, MOUSE_FG),
@@ -10671,25 +11159,12 @@ VTRealize(Widget w,
InputOutput, CopyFromParent,
*valuemask | CWBitGravity, values);
#if USE_DOUBLE_BUFFER
- screen->fullVwin.drawable = screen->fullVwin.window;
-
- if (resource.buffered) {
- Window win = screen->fullVwin.window;
- Drawable d;
- int major, minor;
- if (XdbeQueryExtension(XtDisplay(xw), &major, &minor)) {
- d = XdbeAllocateBackBufferName(XtDisplay(xw), win,
- (XdbeSwapAction) XdbeCopied);
- if (d == None) {
- fprintf(stderr, "Couldn't allocate a back buffer!\n");
- exit(3);
- }
- screen->fullVwin.drawable = d;
- screen->needSwap = 1;
- TRACE(("initialized double-buffering\n"));
- } else {
- resource.buffered = False;
- }
+ if (allocateDbe(xw, &(screen->fullVwin))) {
+ screen->needSwap = 1;
+ TRACE(("initialized full double-buffering\n"));
+ } else {
+ resource.buffered = False;
+ screen->fullVwin.drawable = screen->fullVwin.window;
}
#endif /* USE_DOUBLE_BUFFER */
screen->event_mask = values->event_mask;
@@ -10731,8 +11206,10 @@ VTRealize(Widget w,
if (x_strncasecmp(xw->work.wm_name, "fvwm", 4) &&
x_strncasecmp(xw->work.wm_name, "window maker", 12)) {
xw->work.active_icon = eiFalse;
+ TRACE(("... disable active_icon\n"));
}
}
+ TRACE((".. if active_icon (%d), get its font\n", xw->work.active_icon));
if (xw->work.active_icon && getIconicFont(screen)->fs) {
int iconX = 0, iconY = 0;
Widget shell = SHELL_OF(xw);
@@ -10767,8 +11244,14 @@ VTRealize(Widget w,
*valuemask | CWBitGravity | CWBorderPixel,
values);
#if USE_DOUBLE_BUFFER
- screen->iconVwin.drawable = screen->iconVwin.window;
-#endif
+ if (allocateDbe(xw, &(screen->iconVwin))) {
+ TRACE(("initialized icon double-buffering\n"));
+ } else {
+ resource.buffered = False;
+ screen->iconVwin.drawable = screen->iconVwin.window;
+ screen->fullVwin.drawable = screen->fullVwin.window;
+ }
+#endif /* USE_DOUBLE_BUFFER */
XtVaSetValues(shell,
XtNiconWindow, screen->iconVwin.window,
(XtPointer) 0);
@@ -11357,7 +11840,7 @@ reverseCgs(XtermWidget xw, unsigned attr_flags, Bool hilite, int font)
#endif
}
}
- return result;
+ return (int) result;
}
#endif
@@ -11375,11 +11858,10 @@ reverseCgs(XtermWidget xw, unsigned attr_flags, Bool hilite, int font)
* Shows cursor at new cursor position in screen.
*/
void
-ShowCursor(void)
+ShowCursor(XtermWidget xw)
{
- XtermWidget xw = term;
- XTermDraw params;
TScreen *screen = TScreenOf(xw);
+ XTermDraw params;
IChar base;
unsigned flags;
CellColor fg_bg = initCColor;
@@ -11638,7 +12120,7 @@ ShowCursor(void)
* different rules. Just redraw the text-cell, and draw the
* underline or bar on top of it.
*/
- HideCursor();
+ HideCursor(xw);
/*
* Our current-GC is likely to have been modified in HideCursor().
@@ -11705,6 +12187,9 @@ ShowCursor(void)
xtermLoadItalics(xw);
setCgsFont(xw, currentWin, currentCgs,
getter(screen, which_font));
+ getter = (((xw->flags & ATR_ITALIC) && UseItalicFont(screen))
+ ? getItalicFont
+ : getNormalFont);
}
currentGC = getCgsGC(xw, currentWin, currentCgs);
#endif /* OPT_WIDE_ATTRS */
@@ -11762,11 +12247,10 @@ ShowCursor(void)
* hide cursor at previous cursor position in screen.
*/
void
-HideCursor(void)
+HideCursor(XtermWidget xw)
{
- XtermWidget xw = term;
- XTermDraw params;
TScreen *screen = TScreenOf(xw);
+ XTermDraw params;
GC currentGC;
int x, y;
IChar base;
@@ -11873,6 +12357,9 @@ HideCursor(void)
setCgsFont(xw, WhichVWin(screen),
(CgsEnum) which_Cgs,
getter(screen, which_font));
+ getter = (((xw->flags & ATR_ITALIC) && UseItalicFont(screen))
+ ? getItalicFont
+ : getNormalFont);
}
}
#endif
@@ -12004,13 +12491,13 @@ HandleBlinking(XtPointer closure, XtIntervalId * id GCC_UNUSED)
if (DoStartBlinking(screen)) {
if (screen->cursor_state == ON) {
if (screen->select || screen->always_highlight) {
- HideCursor();
+ HideCursor(xw);
if (screen->cursor_state == OFF)
screen->cursor_state = BLINKED_OFF;
}
} else if (screen->cursor_state == BLINKED_OFF) {
screen->cursor_state = OFF;
- ShowCursor();
+ ShowCursor(xw);
if (screen->cursor_state == OFF)
screen->cursor_state = BLINKED_OFF;
}
@@ -12068,7 +12555,7 @@ HandleBlinking(XtPointer closure, XtIntervalId * id GCC_UNUSED)
#endif /* OPT_BLINK_CURS || OPT_BLINK_TEXT */
void
-RestartBlinking(XtermWidget xw GCC_UNUSED)
+RestartBlinking(XtermWidget xw)
{
#if OPT_BLINK_CURS || OPT_BLINK_TEXT
TScreen *screen = TScreenOf(xw);
@@ -12100,6 +12587,8 @@ RestartBlinking(XtermWidget xw GCC_UNUSED)
if (resume)
StartBlinking(xw);
}
+#else
+ (void) xw;
#endif
}
@@ -12171,12 +12660,12 @@ ReallyReset(XtermWidget xw, Bool full, Bool saved)
bitclr(&xw->flags, PROTECTED);
screen->protected_mode = OFF_PROTECT;
- reset_displayed_graphics(screen);
-
if (full) { /* RIS */
if (screen->bellOnReset)
Bell(xw, XkbBI_TerminalBell, 0);
+ reset_displayed_graphics(screen);
+
/* reset the mouse mode */
screen->send_mouse_pos = MOUSE_OFF;
screen->send_focus_pos = OFF;
@@ -12309,11 +12798,8 @@ VTReset(XtermWidget xw, Bool full, Bool saved)
{
ReallyReset(xw, full, saved);
- free(myState.string_area);
- myState.string_area = 0;
-
- free(myState.print_area);
- myState.print_area = 0;
+ FreeAndNull(myState.string_area);
+ FreeAndNull(myState.print_area);
longjmp(vtjmpbuf, 1); /* force ground state in parser */
}
@@ -12554,7 +13040,13 @@ HandleIgnore(Widget w,
(void *) w, visibleEventType(event->type)));
if ((xw = getXtermWidget(w)) != 0) {
/* do nothing, but check for funny escape sequences */
- (void) SendMousePosition(xw, event);
+ switch (event->type) {
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ (void) SendMousePosition(xw, event);
+ break;
+ }
}
}
@@ -12736,6 +13228,7 @@ set_cursor_gcs(XtermWidget xw)
}
set_cursor_outline_gc(xw, screen->always_highlight, fg, bg, cc);
changed = True;
+ FreeMarkGCs(xw);
}
if (changed) {
@@ -12847,9 +13340,16 @@ VTInitTranslations(void)
<Btn5Down>:scroll-forw(5,line,m) \n\
"
),
+ DATA("pointer",
+"\
+ <BtnMotion>:pointer-motion() \n\
+ <BtnDown>:pointer-button() \n\
+ <BtnUp>:pointer-button() \n\
+"
+ ),
DATA("default",
"\
- <BtnDown>:ignore() \n\
+ <BtnUp>:ignore() \n\
"
)
};
@@ -12923,6 +13423,7 @@ VTInitTranslations(void)
TRACE(("result:\n%s\n", result));
defaultTranslations = result;
+ free((void *) xtermClassRec.core_class.tm_table);
xtermClassRec.core_class.tm_table = result;
}
@@ -12930,7 +13431,6 @@ VTInitTranslations(void)
void
noleaks_charproc(void)
{
- if (v_buffer != 0)
- free(v_buffer);
+ free(v_buffer);
}
#endif
diff --git a/app/xterm/charsets.c b/app/xterm/charsets.c
index 4675d41dc..134330280 100644
--- a/app/xterm/charsets.c
+++ b/app/xterm/charsets.c
@@ -1,7 +1,7 @@
-/* $XTermId: charsets.c,v 1.105 2019/02/11 00:41:13 tom Exp $ */
+/* $XTermId: charsets.c,v 1.113 2020/12/25 15:15:37 tom Exp $ */
/*
- * Copyright 1998-2018,2019 by Thomas E. Dickey
+ * Copyright 1998-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -689,6 +689,108 @@
UNI(0x7e, 0x200f); /* RIGHT-TO-LEFT MARK */ \
} \
end_CODEPAGE()
+ /* ISO Latin-2 is 8859-2 */
+#define map_ISO_Latin_2(code) \
+ begin_CODEPAGE(); \
+ switch (code) { \
+ UNI(0x20, 0x00a0); /* NO-BREAK SPACE */ \
+ UNI(0x21, 0x0104); /* LATIN CAPITAL LETTER A WITH OGONEK */ \
+ UNI(0x22, 0x02d8); /* BREVE */ \
+ UNI(0x23, 0x0141); /* LATIN CAPITAL LETTER L WITH STROKE */ \
+ UNI(0x24, 0x00a4); /* CURRENCY SIGN */ \
+ UNI(0x25, 0x013d); /* LATIN CAPITAL LETTER L WITH CARON */ \
+ UNI(0x26, 0x015a); /* LATIN CAPITAL LETTER S WITH ACUTE */ \
+ UNI(0x27, 0x00a7); /* SECTION SIGN */ \
+ UNI(0x28, 0x00a8); /* DIAERESIS */ \
+ UNI(0x29, 0x0160); /* LATIN CAPITAL LETTER S WITH CARON */ \
+ UNI(0x2a, 0x015e); /* LATIN CAPITAL LETTER S WITH CEDILLA */ \
+ UNI(0x2b, 0x0164); /* LATIN CAPITAL LETTER T WITH CARON */ \
+ UNI(0x2c, 0x0179); /* LATIN CAPITAL LETTER Z WITH ACUTE */ \
+ UNI(0x2d, 0x00ad); /* SOFT HYPHEN */ \
+ UNI(0x2e, 0x017d); /* LATIN CAPITAL LETTER Z WITH CARON */ \
+ UNI(0x2f, 0x017b); /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */ \
+ UNI(0x30, 0x00b0); /* DEGREE SIGN */ \
+ UNI(0x31, 0x0105); /* LATIN SMALL LETTER A WITH OGONEK */ \
+ UNI(0x32, 0x02db); /* OGONEK */ \
+ UNI(0x33, 0x0142); /* LATIN SMALL LETTER L WITH STROKE */ \
+ UNI(0x34, 0x00b4); /* ACUTE ACCENT */ \
+ UNI(0x35, 0x013e); /* LATIN SMALL LETTER L WITH CARON */ \
+ UNI(0x36, 0x015b); /* LATIN SMALL LETTER S WITH ACUTE */ \
+ UNI(0x37, 0x02c7); /* CARON */ \
+ UNI(0x38, 0x00b8); /* CEDILLA */ \
+ UNI(0x39, 0x0161); /* LATIN SMALL LETTER S WITH CARON */ \
+ UNI(0x3a, 0x015f); /* LATIN SMALL LETTER S WITH CEDILLA */ \
+ UNI(0x3b, 0x0165); /* LATIN SMALL LETTER T WITH CARON */ \
+ UNI(0x3c, 0x017a); /* LATIN SMALL LETTER Z WITH ACUTE */ \
+ UNI(0x3d, 0x02dd); /* DOUBLE ACUTE ACCENT */ \
+ UNI(0x3e, 0x017e); /* LATIN SMALL LETTER Z WITH CARON */ \
+ UNI(0x3f, 0x017c); /* LATIN SMALL LETTER Z WITH DOT ABOVE */ \
+ UNI(0x40, 0x0154); /* LATIN CAPITAL LETTER R WITH ACUTE */ \
+ UNI(0x41, 0x00c1); /* LATIN CAPITAL LETTER A WITH ACUTE */ \
+ UNI(0x42, 0x00c2); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ \
+ UNI(0x43, 0x0102); /* LATIN CAPITAL LETTER A WITH BREVE */ \
+ UNI(0x44, 0x00c4); /* LATIN CAPITAL LETTER A WITH DIAERESIS */ \
+ UNI(0x45, 0x0139); /* LATIN CAPITAL LETTER L WITH ACUTE */ \
+ UNI(0x46, 0x0106); /* LATIN CAPITAL LETTER C WITH ACUTE */ \
+ UNI(0x47, 0x00c7); /* LATIN CAPITAL LETTER C WITH CEDILLA */ \
+ UNI(0x48, 0x010c); /* LATIN CAPITAL LETTER C WITH CARON */ \
+ UNI(0x49, 0x00c9); /* LATIN CAPITAL LETTER E WITH ACUTE */ \
+ UNI(0x4a, 0x0118); /* LATIN CAPITAL LETTER E WITH OGONEK */ \
+ UNI(0x4b, 0x00cb); /* LATIN CAPITAL LETTER E WITH DIAERESIS */ \
+ UNI(0x4c, 0x011a); /* LATIN CAPITAL LETTER E WITH CARON */ \
+ UNI(0x4d, 0x00cd); /* LATIN CAPITAL LETTER I WITH ACUTE */ \
+ UNI(0x4e, 0x00ce); /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ \
+ UNI(0x4f, 0x010e); /* LATIN CAPITAL LETTER D WITH CARON */ \
+ UNI(0x50, 0x0110); /* LATIN CAPITAL LETTER D WITH STROKE */ \
+ UNI(0x51, 0x0143); /* LATIN CAPITAL LETTER N WITH ACUTE */ \
+ UNI(0x52, 0x0147); /* LATIN CAPITAL LETTER N WITH CARON */ \
+ UNI(0x53, 0x00d3); /* LATIN CAPITAL LETTER O WITH ACUTE */ \
+ UNI(0x54, 0x00d4); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ \
+ UNI(0x55, 0x0150); /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ \
+ UNI(0x56, 0x00d6); /* LATIN CAPITAL LETTER O WITH DIAERESIS */ \
+ UNI(0x57, 0x00d7); /* MULTIPLICATION SIGN */ \
+ UNI(0x58, 0x0158); /* LATIN CAPITAL LETTER R WITH CARON */ \
+ UNI(0x59, 0x016e); /* LATIN CAPITAL LETTER U WITH RING ABOVE */ \
+ UNI(0x5a, 0x00da); /* LATIN CAPITAL LETTER U WITH ACUTE */ \
+ UNI(0x5b, 0x0170); /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ \
+ UNI(0x5c, 0x00dc); /* LATIN CAPITAL LETTER U WITH DIAERESIS */ \
+ UNI(0x5d, 0x00dd); /* LATIN CAPITAL LETTER Y WITH ACUTE */ \
+ UNI(0x5e, 0x0162); /* LATIN CAPITAL LETTER T WITH CEDILLA */ \
+ UNI(0x5f, 0x00df); /* LATIN SMALL LETTER SHARP S */ \
+ UNI(0x60, 0x0155); /* LATIN SMALL LETTER R WITH ACUTE */ \
+ UNI(0x61, 0x00e1); /* LATIN SMALL LETTER A WITH ACUTE */ \
+ UNI(0x62, 0x00e2); /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ \
+ UNI(0x63, 0x0103); /* LATIN SMALL LETTER A WITH BREVE */ \
+ UNI(0x64, 0x00e4); /* LATIN SMALL LETTER A WITH DIAERESIS */ \
+ UNI(0x65, 0x013a); /* LATIN SMALL LETTER L WITH ACUTE */ \
+ UNI(0x66, 0x0107); /* LATIN SMALL LETTER C WITH ACUTE */ \
+ UNI(0x67, 0x00e7); /* LATIN SMALL LETTER C WITH CEDILLA */ \
+ UNI(0x68, 0x010d); /* LATIN SMALL LETTER C WITH CARON */ \
+ UNI(0x69, 0x00e9); /* LATIN SMALL LETTER E WITH ACUTE */ \
+ UNI(0x6a, 0x0119); /* LATIN SMALL LETTER E WITH OGONEK */ \
+ UNI(0x6b, 0x00eb); /* LATIN SMALL LETTER E WITH DIAERESIS */ \
+ UNI(0x6c, 0x011b); /* LATIN SMALL LETTER E WITH CARON */ \
+ UNI(0x6d, 0x00ed); /* LATIN SMALL LETTER I WITH ACUTE */ \
+ UNI(0x6e, 0x00ee); /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ \
+ UNI(0x6f, 0x010f); /* LATIN SMALL LETTER D WITH CARON */ \
+ UNI(0x70, 0x0111); /* LATIN SMALL LETTER D WITH STROKE */ \
+ UNI(0x71, 0x0144); /* LATIN SMALL LETTER N WITH ACUTE */ \
+ UNI(0x72, 0x0148); /* LATIN SMALL LETTER N WITH CARON */ \
+ UNI(0x73, 0x00f3); /* LATIN SMALL LETTER O WITH ACUTE */ \
+ UNI(0x74, 0x00f4); /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ \
+ UNI(0x75, 0x0151); /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */ \
+ UNI(0x76, 0x00f6); /* LATIN SMALL LETTER O WITH DIAERESIS */ \
+ UNI(0x77, 0x00f7); /* DIVISION SIGN */ \
+ UNI(0x78, 0x0159); /* LATIN SMALL LETTER R WITH CARON */ \
+ UNI(0x79, 0x016f); /* LATIN SMALL LETTER U WITH RING ABOVE */ \
+ UNI(0x7a, 0x00fa); /* LATIN SMALL LETTER U WITH ACUTE */ \
+ UNI(0x7b, 0x0171); /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */ \
+ UNI(0x7c, 0x00fc); /* LATIN SMALL LETTER U WITH DIAERESIS */ \
+ UNI(0x7d, 0x00fd); /* LATIN SMALL LETTER Y WITH ACUTE */ \
+ UNI(0x7e, 0x0163); /* LATIN SMALL LETTER T WITH CEDILLA */ \
+ UNI(0x7f, 0x02d9); /* DOT ABOVE */ \
+ } \
+ end_CODEPAGE()
/* ISO Latin-5 is 8859-9 */
#define map_ISO_Latin_5(code) \
begin_CODEPAGE(); \
@@ -892,7 +994,7 @@
UNI(0x7c, 0x042d); /* CYRILLIC CAPITAL LETTER E */ \
UNI(0x7d, 0x0429); /* CYRILLIC CAPITAL LETTER SHCHA */ \
UNI(0x7e, 0x0427); /* CYRILLIC CAPITAL LETTER CHE */ \
- UNI(0x7f, 0x042a); /* CYRILLIC CAPITAL LETTER HARD SIGN */ \
+ XXX(0x7f, UNDEF); \
\
} \
end_CODEPAGE()
@@ -1284,6 +1386,7 @@
#define map_DEC_Turkish_Supp(code) /* nothing */
#define map_ISO_Greek_Supp(code) /* nothing */
#define map_ISO_Hebrew(code) /* nothing */
+#define map_ISO_Latin_2(code) /* nothing */
#define map_ISO_Latin_5(code) /* nothing */
#define map_ISO_Latin_Cyrillic(code) /* nothing */
#define map_NRCS_Greek(code) /* nothing */
@@ -1392,6 +1495,10 @@ xtermCharSetIn(XtermWidget xw, unsigned code, DECNRCM_codes charset)
map_NRCS_Italian(code);
break;
+ case nrc_ISO_Latin_2_Supp:
+ map_ISO_Latin_2(code);
+ break;
+
case nrc_ISO_Latin_5_Supp:
map_ISO_Latin_5(code);
break;
@@ -1435,10 +1542,11 @@ xtermCharSetIn(XtermWidget xw, unsigned code, DECNRCM_codes charset)
map_DEC_Turkish_Supp(code);
break;
- case nrc_Cyrillic:
+ case nrc_DEC_Cyrillic:
map_DEC_Cyrillic(code);
break;
+ case nrc_ISO_Latin_1_Supp:
case nrc_British_Latin_1:
case nrc_Russian:
case nrc_French_Canadian2:
@@ -1492,7 +1600,7 @@ xtermCharSetOut(XtermWidget xw, IChar *buf, IChar *ptr, DECNRCM_codes leftset)
count++;
#if OPT_WIDE_CHARS
/*
- * This is only partly right - prevent inadvertant remapping of
+ * This is only partly right - prevent inadvertent remapping of
* the replacement character and other non-8bit codes into bogus
* 8bit codes.
*/
@@ -1505,6 +1613,8 @@ xtermCharSetOut(XtermWidget xw, IChar *buf, IChar *ptr, DECNRCM_codes leftset)
continue;
switch (cs) {
+ case nrc_ISO_Latin_1_Supp:
+ /* FALLTHRU */
case nrc_British_Latin_1:
/* FALLTHRU */
case nrc_British: /* United Kingdom set (or Latin 1) */
@@ -1609,6 +1719,10 @@ xtermCharSetOut(XtermWidget xw, IChar *buf, IChar *ptr, DECNRCM_codes leftset)
map_NRCS_Italian(chr = seven);
break;
+ case nrc_ISO_Latin_2_Supp:
+ map_ISO_Latin_2(chr = seven);
+ break;
+
case nrc_ISO_Latin_5_Supp:
map_ISO_Latin_5(chr = seven);
break;
@@ -1652,7 +1766,7 @@ xtermCharSetOut(XtermWidget xw, IChar *buf, IChar *ptr, DECNRCM_codes leftset)
map_DEC_Turkish_Supp(chr = seven);
break;
- case nrc_Cyrillic:
+ case nrc_DEC_Cyrillic:
map_DEC_Cyrillic(chr = seven);
break;
@@ -1664,12 +1778,17 @@ xtermCharSetOut(XtermWidget xw, IChar *buf, IChar *ptr, DECNRCM_codes leftset)
}
/*
* The state machine already treated DEL as a nonprinting and
- * nonspacing character. If we have DEL now, simply render
- * it as a blank.
+ * nonspacing character. If we have DEL now, remove it.
*/
- if (chr == ANSI_DEL)
- chr = ' ';
- *s = (IChar) A2E(chr);
+ if (chr == ANSI_DEL) {
+ IChar *s1;
+ --ptr;
+ for (s1 = s; s1 < ptr; ++s1) {
+ s1[0] = s1[1];
+ }
+ } else {
+ *s = (IChar) A2E(chr);
+ }
}
TRACE(("%d\t%s\n",
count,
diff --git a/app/xterm/configure.in b/app/xterm/configure.in
index d2fee8808..361e046ef 100644
--- a/app/xterm/configure.in
+++ b/app/xterm/configure.in
@@ -1,9 +1,9 @@
-dnl $XTermId: configure.in,v 1.366 2019/11/02 20:49:15 tom Exp $
+dnl $XTermId: configure.in,v 1.372 2020/09/19 16:50:26 tom Exp $
dnl
dnl -----------------------------------------------------------------------------
dnl this file is part of xterm
dnl
-dnl Copyright 1997-2018,2019 by Thomas E. Dickey
+dnl Copyright 1997-2019,2020 by Thomas E. Dickey
dnl
dnl All Rights Reserved
dnl
@@ -33,7 +33,7 @@ dnl authorization.
dnl ---------------------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_PREREQ(2.52.20170501)
+AC_PREREQ(2.52.20200802)
AC_INIT
AC_CONFIG_SRCDIR([charproc.c])
AC_CONFIG_HEADER(xtermcfg.h:xtermcfg.hin)
@@ -265,6 +265,7 @@ CF_TTY_GROUP
### checks for system services and user specified options
+AC_PATH_XTRA
CF_POSIX_WAIT
CF_SYSV
CF_SVR4
@@ -288,7 +289,7 @@ CF_TERMIO_C_ISPEED
CF_TERMIOS_TYPES
# If we notice Xcursor, there is a workaround needed.
-AC_CHECK_LIB(Xcursor, XcursorGetTheme,[AC_DEFINE(HAVE_LIB_XCURSOR)])
+AC_CHECK_LIB(Xcursor, XcursorGetTheme,[AC_DEFINE(HAVE_LIB_XCURSOR,1,[Define to 1 if we have the Xcursor library])])
LIBS="$LIBS $X_EXTRA_LIBS"
@@ -1035,10 +1036,10 @@ if test "$enable_regis_graphics" = yes ; then
fi
AC_MSG_CHECKING(if you want sixel graphics support)
-CF_ARG_ENABLE(sixel-graphics,
- [ --enable-sixel-graphics enable sixel graphics support],
- [enable_sixel_graphics=yes],
- [enable_sixel_graphics=no])
+CF_ARG_DISABLE(sixel-graphics,
+ [ --disable-sixel-graphics disable sixel graphics support],
+ [enable_sixel_graphics=no],
+ [enable_sixel_graphics=yes])
AC_MSG_RESULT($enable_sixel_graphics)
if test "$enable_sixel_graphics" = yes ; then
AC_DEFINE(OPT_SIXEL_GRAPHICS,1,[Define to 1 to enable sixel graphics support])
@@ -1054,6 +1055,16 @@ if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ;
EXTRAOBJS="$EXTRAOBJS graphics.o"
fi
+AC_MSG_CHECKING(if you want sixel screen dump support)
+CF_ARG_DISABLE(print-graphics,
+ [ --disable-print-graphics disable screen dump to sixel support],
+ [enable_print_graphics=no],
+ [enable_print_graphics=$enable_regis_graphics])
+AC_MSG_RESULT($enable_print_graphics)
+if test "$enable_print_graphics" = yes ; then
+ AC_DEFINE(OPT_PRINT_GRAPHICS,1,[Define to 1 to enable screen dump to sixel support])
+fi
+
AC_MSG_CHECKING(if you want VT420 rectangle support)
CF_ARG_DISABLE(rectangles,
[ --disable-rectangles disable VT420 rectangle support],
@@ -1110,19 +1121,7 @@ if test -n "$cf_cv_lib_part_tgetent"; then
AC_CHECK_FUNCS(use_extended_names)
fi
-if test -n "$GCC" ; then
-AC_MSG_CHECKING(if you want to turn on gcc warnings)
-CF_ARG_ENABLE(warnings,
- [ --enable-warnings test: turn on GCC compiler warnings],
- [with_warnings=yes],
- [with_warnings=no])
-AC_MSG_RESULT($with_warnings)
-if test "$with_warnings" = yes
-then
- CF_GCC_ATTRIBUTES
- CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual)
-fi
-fi
+CF_ENABLE_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual)
AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(CHARPROC_DEPS)
diff --git a/app/xterm/ctlseqs.ms b/app/xterm/ctlseqs.ms
index a04cd713a..200000512 100644
--- a/app/xterm/ctlseqs.ms
+++ b/app/xterm/ctlseqs.ms
@@ -1,9 +1,9 @@
.\"#! troff -ms $1 -*- Nroff -*-
.\" "Xterm Control Sequences" document
-.\" $XTermId: ctlseqs.ms,v 1.561 2019/11/02 14:26:14 tom Exp $
+.\" $XTermId: ctlseqs.ms,v 1.609 2020/12/25 14:17:03 tom Exp $
.\"
.\"
-.\" Copyright 1996-2018,2019 by Thomas E. Dickey
+.\" Copyright 1996-2019,2020 by Thomas E. Dickey
.\"
.\" All Rights Reserved
.\"
@@ -69,8 +69,8 @@
.\"
.ds XT XTerm
.ds xt xterm
-.ds LF Patch #350
-.ds RF 2019/11/02
+.ds LF Patch #363
+.ds RF 2020/12/25
.\"
.if n .pl 9999v \" no page breaks in nroff
.ND
@@ -346,7 +346,7 @@ X Consortium (1994)
Thomas Dickey
.AI
XFree86 Project (1996-2006)
-invisible-island.net (2006-2019)
+invisible-island.net (2006-2020)
updated for \*(XT \*(LF (\*(RF)
.AU
.
@@ -719,7 +719,7 @@ There are a few other 94-character sets:
\*(Cc = \*< \(-> DEC Supplemental, VT200.
\*(Cc = \*> \(-> DEC Technical, VT300.
.br
-These are documented as NRCS:
+These are documented as 94-character sets (like USASCII) without NRCS:
\*(Cc = \*(Dq\*4 \(-> DEC Hebrew, VT500.
\*(Cc = \*(Dq\*? \(-> DEC Greek, VT500.
\*(Cc = \*%\*0 \(-> DEC Turkish, VT500.
@@ -757,6 +757,7 @@ Unlike the 94-character sets, these can have different values than
ASCII space and DEL for the mapping of 0x20 and 0x7f.
The valid final characters \*(Cc for this control are:
\*(Cc = \*A \(-> ISO Latin-1 Supplemental, VT300.
+ \*(Cc = \*(cB \(-> ISO Latin-2 Supplemental, VT500.
\*(Cc = \*F \(-> ISO Greek Supplemental, VT500.
\*(Cc = \*H \(-> ISO Hebrew Supplemental, VT500.
\*(Cc = \*L \(-> ISO Latin-Cyrillic, VT500.
@@ -818,11 +819,11 @@ Memory Unlock (per HP terminals).
.
.iP
.IP \\*(Es\\*n
-Invoke the G2 Character Set as GL (LS2) as GL.
+Invoke the G2 Character Set as GL (LS2).
.
.iP
.IP \\*(Es\\*o
-Invoke the G3 Character Set as GL (LS3) as GL.
+Invoke the G3 Character Set as GL (LS3).
.
.iP
.IP \\*(Es\\*|
@@ -858,8 +859,8 @@ The second parameter:
\*(Ps = \*0 \(<- Lock the keys (default).
\*(Ps = \*1 \(<- Do not lock.
.iP
-The third parameter is a ';'-separated list of strings denoting
-the key-code separated by a '/' from the hex-encoded key value.
+The third parameter is a \*(``;\*(''-separated list of strings denoting
+the key-code separated by a \*(``/\*('' from the hex-encoded key value.
The key codes correspond to the DEC function-key codes (e.g., F6=17).
.
.iP
@@ -1050,12 +1051,35 @@ Delete \*(Ps Line(s) (default = 1) (DL).
Delete \*(Ps Character(s) (default = 1) (DCH).
.
.iP
+.IP \\*(Cs\\*#\\*P
+.IP \\*(Cs\\*(Pm\\*s\\*#\\*P
+Push current dynamic- and ANSI-palette colors onto stack
+(XTPUSHCOLORS), \fI\*(xt\fP.
+Parameters (integers in the range 1 through 10, since the default 0 will push)
+may be used to store the palette into the stack without pushing.
+.
+.iP
+.IP \\*(Cs\\*#\\*Q
+.IP \\*(Cs\\*(Pm\\*s\\*#\\*Q
+Pop stack to set dynamic- and ANSI-palette colors
+(XTPOPCOLORS), \fI\*(xt\fP.
+Parameters (integers in the range 1 through 10, since the default 0 will pop)
+may be used to restore the palette from the stack without popping.
+.
+.iP
+.IP \\*(Cs\\*#\\*R
+Report the current entry on the palette stack, and the number of
+palettes stored on the stack, using the same form as XTPOPCOLOR
+(default = 0)
+(XTREPORTCOLORS), \fI\*(xt\fP.
+.
+.iP
.IP \\*(Cs\\*(Ps\\*s\\*S
Scroll up \*(Ps lines (default = 1) (SU), VT420, ECMA-48.
.
.iP
.IP \\*(Cs\\*?\\*(Pi\\*s\\*;\\*(Pa\\*s\\*;\\*(Pv\\*s\\*S
-Set or request graphics attribute, \fI\*(xt\fP.
+Set or request graphics attribute (XTSMGRAPHICS), \fI\*(xt\fP.
If configured to support either \fBSixel Graphics\fP or \fBReGIS Graphics\fP,
\fI\*(xt\fP accepts a three-parameter control sequence, where \*(Pi,
\*(Pa and \*(Pv are the \fIitem\fP, \fIaction\fP and \fIvalue\fP:
@@ -1069,7 +1093,7 @@ If configured to support either \fBSixel Graphics\fP or \fBReGIS Graphics\fP,
\*(Pa = \*3 \(-> set to value in \*(Pv.
\*(Pa = \*4 \(-> read the maximum allowed value.
.sP
- \*(Pv can be omitted except when setting (\*(Pa == \*3).
+ \*(Pv is ignored by \fI\*(xt\fP except when setting (\*(Pa == \*3).
\*(Pv = \fIn\fP \(<- A single integer is used for color registers.
\*(Pv = \fIwidth\fP\*s\*;\fIheight\fP \(<- Two integers for graphics geometry.
.sP
@@ -1109,13 +1133,13 @@ Scroll down \*(Ps lines (default = 1) (SD), VT420.
.
.iP
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*T
-Initiate highlight mouse tracking.
+Initiate highlight mouse tracking (XTHIMOUSE), \*(xt.
Parameters are [func;startx;starty;firstrow;lastrow].
See the section \fBMouse Tracking\fP.
.
.iP
.IP \\*(Cs\\*>\\*(Pm\\*s\\*T
-Reset title mode features to default value, \fI\*(xt\fP.
+Reset title mode features to default value (XTRMTITLE), \fI\*(xt\fP.
Normally, \*(``reset\*('' disables the feature.
It is possible to disable the ability to reset features
by compiling a different default for the title modes into \fI\*(xt\fP.
@@ -1143,11 +1167,11 @@ This was a publication error in the original ECMA-48 5th edition (1991)
corrected in 2003.
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*`
+.IP \\*(Cs\\*(Ps\\*s\\*`
Character Position Absolute [column] (default = [row,1]) (HPA).
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*a
+.IP \\*(Cs\\*(Ps\\*s\\*a
Character Position Relative [columns] (default = [row,col+1]) (HPR).
.
.iP
@@ -1161,10 +1185,13 @@ Send Device Attributes (Primary DA).
The response depends on the \fBdecTerminalID\fP resource setting.
\(->\ \*(Cs\*?\*1\*;\*2\*c (\*(``VT100 with Advanced Video Option\*('')
\(->\ \*(Cs\*?\*1\*;\*0\*c (\*(``VT101 with No Options\*('')
+ \(->\ \*(Cs\*?\*4\*;\*6\*c (\*(``VT132 with Advanced Video and Graphics\*('')
\(->\ \*(Cs\*?\*6\*c (\*(``VT102\*('')
- \(->\ \*(Cs\*?\*6\*2\*;\*(Ps\*c (\*(``VT220\*('')
- \(->\ \*(Cs\*?\*6\*3\*;\*(Ps\*c (\*(``VT320\*('')
- \(->\ \*(Cs\*?\*6\*4\*;\*(Ps\*c (\*(``VT420\*('')
+ \(->\ \*(Cs\*?\*7\*c (\*(``VT131\*('')
+ \(->\ \*(Cs\*?\*1\*2\*;\*(Ps\*s\*c (\*(``VT125\*('')
+ \(->\ \*(Cs\*?\*6\*2\*;\*(Ps\*s\*c (\*(``VT220\*('')
+ \(->\ \*(Cs\*?\*6\*3\*;\*(Ps\*s\*c (\*(``VT320\*('')
+ \(->\ \*(Cs\*?\*6\*4\*;\*(Ps\*s\*c (\*(``VT420\*('')
.iP
The VT100-style response parameters do not mean anything by themselves.
VT220 (and higher) parameters do,
@@ -1209,10 +1236,11 @@ It should apply only to VT220 and up, but \fI\*(xt\fP extends this to VT100.
where \*(Pp denotes the terminal type
\*(Pp = \*0 \(-> \*(``VT100\*(''.
\*(Pp = \*1 \(-> \*(``VT220\*(''.
- \*(Pp = \*2 \(-> \*(``VT240\*(''.
+ \*(Pp = \*2 \(-> \*(``VT240\*('' or \*(``VT241\*(''.
\*(Pp = \*1\*8 \(-> \*(``VT330\*(''.
\*(Pp = \*1\*9 \(-> \*(``VT340\*(''.
\*(Pp = \*2\*4 \(-> \*(``VT320\*(''.
+ \*(Pp = \*3\*2 \(-> \*(``VT382\*(''.
\*(Pp = \*4\*1 \(-> \*(``VT420\*(''.
\*(Pp = \*6\*1 \(-> \*(``VT510\*(''.
\*(Pp = \*6\*4 \(-> \*(``VT520\*(''.
@@ -1224,11 +1252,11 @@ In a DEC terminal, \*(Pc indicates the ROM cartridge
registration number and is always zero.
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*d
+.IP \\*(Cs\\*(Ps\\*s\\*d
Line Position Absolute [row] (default = [1,column]) (VPA).
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*e
+.IP \\*(Cs\\*(Ps\\*s\\*e
Line Position Relative [rows] (default = [row+1,column]) (VPR).
.
.iP
@@ -1244,7 +1272,7 @@ Tab Clear (TBC).
.iP
.IP \\*(Cs\\*(Pm\\*s\\*h
Set Mode (SM).
- \*(Ps = \*2 \(-> Keyboard Action Mode (AM).
+ \*(Ps = \*2 \(-> Keyboard Action Mode (KAM).
\*(Ps = \*4 \(-> Insert Mode (IRM).
\*(Ps = \*1\*2 \(-> Send/receive (SRM).
\*(Ps = \*2\*0 \(-> Automatic Newline (LNM).
@@ -1259,33 +1287,38 @@ and set VT100 mode.
\*(Ps = \*4 \(-> Smooth (Slow) Scroll (DECSCLM), VT100.
\*(Ps = \*5 \(-> Reverse Video (DECSCNM), VT100.
\*(Ps = \*6 \(-> Origin Mode (DECOM), VT100.
- \*(Ps = \*7 \(-> Auto-wrap Mode (DECAWM), VT100.
- \*(Ps = \*8 \(-> Auto-repeat Keys (DECARM), VT100.
+ \*(Ps = \*7 \(-> Auto-Wrap Mode (DECAWM), VT100.
+ \*(Ps = \*8 \(-> Auto-Repeat Keys (DECARM), VT100.
\*(Ps = \*9 \(-> Send Mouse X & Y on button press.
See the section \fBMouse Tracking\fP.
This is the X10 \fI\*(xt\fP mouse protocol.
\*(Ps = \*1\*0 \(-> Show toolbar (rxvt).
- \*(Ps = \*1\*2 \(-> Start Blinking Cursor (AT&T 610).
- \*(Ps = \*1\*3 \(-> Start Blinking Cursor (set only via resource or menu).
- \*(Ps = \*1\*4 \(-> Enable XOR of Blinking Cursor control sequence and menu.
- \*(Ps = \*1\*8 \(-> Print form feed (DECPFF), VT220.
+ \*(Ps = \*1\*2 \(-> Start blinking cursor (AT&T 610).
+ \*(Ps = \*1\*3 \(-> Start blinking cursor (set only via resource or menu).
+ \*(Ps = \*1\*4 \(-> Enable XOR of blinking cursor control sequence and menu.
+ \*(Ps = \*1\*8 \(-> Print Form Feed (DECPFF), VT220.
\*(Ps = \*1\*9 \(-> Set print extent to full screen (DECPEX), VT220.
- \*(Ps = \*2\*5 \(-> Show Cursor (DECTCEM), VT220.
+ \*(Ps = \*2\*5 \(-> Show cursor (DECTCEM), VT220.
\*(Ps = \*3\*0 \(-> Show scrollbar (rxvt).
\*(Ps = \*3\*5 \(-> Enable font-shifting functions (rxvt).
- \*(Ps = \*3\*8 \(-> Enter Tektronix Mode (DECTEK), VT240, \fI\*(xt\fP.
- \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 Mode, \fI\*(xt\fP.
+ \*(Ps = \*3\*8 \(-> Enter Tektronix mode (DECTEK), VT240, \fI\*(xt\fP.
+ \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 mode, \fI\*(xt\fP.
\*(Ps = \*4\*1 \(-> \fBmore\fP(1) fix (see \fBcurses\fP resource).
\*(Ps = \*4\*2 \(-> Enable National Replacement Character sets
(DECNRCM), VT220.
- \*(Ps = \*4\*4 \(-> Turn On Margin Bell, \fI\*(xt\fP.
- \*(Ps = \*4\*5 \(-> Reverse-wraparound Mode, \fI\*(xt\fP.
- \*(Ps = \*4\*6 \(-> Start Logging, \fI\*(xt\fP.
+ \*(Ps = \*4\*3 \(-> Enable Graphics Expanded Print Mode (DECGEPM).
+ \*(Ps = \*4\*4 \(-> Turn on margin bell, \fI\*(xt\fP.
+ \*(Ps = \*4\*4 \(-> Enable Graphics Print Color Mode (DECGPCM).
+ \*(Ps = \*4\*5 \(-> Reverse-wraparound mode, \fI\*(xt\fP.
+ \*(Ps = \*4\*5 \(-> Enable Graphics Print ColorSpace (DECGPCS).
+ \*(Ps = \*4\*6 \(-> Start logging, \fI\*(xt\fP.
This is normally disabled by a compile-time option.
\*(Ps = \*4\*7 \(-> Use \fIAlternate Screen Buffer\fP, \fI\*(xt\fP.
This may be disabled by the \fBtiteInhibit\fP resource.
- \*(Ps = \*6\*6 \(-> Application keypad (DECNKM), VT320.
- \*(Ps = \*6\*7 \(-> Backarrow key sends backspace (DECBKM), VT340, VT420. This sets the \fBbackarrowKey\fP resource to \*(``true\*(''.
+ \*(Ps = \*4\*7 \(-> Enable Graphics Rotated Print Mode (DECGRPM).
+ \*(Ps = \*6\*6 \(-> Application keypad mode (DECNKM), VT320.
+ \*(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 = \*9\*5 \(-> Do not clear screen when DECCOLM is set/reset
@@ -1294,16 +1327,21 @@ This may be disabled by the \fBtiteInhibit\fP resource.
See the section \fBMouse Tracking\fP.
This is the X11 \fI\*(xt\fP mouse protocol.
\*(Ps = \*1\*0\*0\*1 \(-> Use Hilite Mouse Tracking, \fI\*(xt\fP.
- \*(Ps = \*1\*0\*0\*2 \(-> Use Cell Motion Mouse Tracking, \fI\*(xt\fP. See the section \fBButton-event tracking\fP.
- \*(Ps = \*1\*0\*0\*3 \(-> Use All Motion Mouse Tracking, \fI\*(xt\fP. See the section \fBAny-event tracking\fP.
+ \*(Ps = \*1\*0\*0\*2 \(-> Use Cell Motion Mouse Tracking, \fI\*(xt\fP.
+See the section \fBButton-event tracking\fP.
+ \*(Ps = \*1\*0\*0\*3 \(-> Use All Motion Mouse Tracking, \fI\*(xt\fP.
+See the section \fBAny-event tracking\fP.
\*(Ps = \*1\*0\*0\*4 \(-> Send \fBFocusIn/FocusOut\fP events, \fI\*(xt\fP.
\*(Ps = \*1\*0\*0\*5 \(-> Enable UTF-8 Mouse Mode, \fI\*(xt\fP.
\*(Ps = \*1\*0\*0\*6 \(-> Enable SGR Mouse Mode, \fI\*(xt\fP.
\*(Ps = \*1\*0\*0\*7 \(-> Enable \fIAlternate Scroll Mode\fP, \fI\*(xt\fP.
This corresponds to the \fBalternateScroll\fP resource.
- \*(Ps = \*1\*0\*1\*0 \(-> Scroll to bottom on tty output (rxvt). This sets the \fBscrollTtyOutput\fP resource to \*(``true\*(''.
- \*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt). This sets the \fBscrollKey\fP resource to \*(``true\*(''.
+ \*(Ps = \*1\*0\*1\*0 \(-> Scroll to bottom on tty output (rxvt).
+This sets the \fBscrollTtyOutput\fP resource to \*(``true\*(''.
+ \*(Ps = \*1\*0\*1\*1 \(-> Scroll to bottom on key press (rxvt).
+This sets the \fBscrollKey\fP resource to \*(``true\*(''.
\*(Ps = \*1\*0\*1\*5 \(-> Enable urxvt Mouse Mode.
+ \*(Ps = \*1\*0\*1\*6 \(-> Enable SGR Mouse PixelMode, \fI\*(xt\fP.
\*(Ps = \*1\*0\*3\*4 \(-> Interpret \*(``meta\*('' key, \fI\*(xt\fP.
This sets the eighth bit of keyboard input
(and enables the \fBeightBitInput\fP resource).
@@ -1353,7 +1391,7 @@ Use this with terminfo-based applications rather than the \*4\*7 mode.
\*(Ps = \*2\*0\*0\*4 \(-> Set bracketed paste mode, \fI\*(xt\fP.
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*i
+.IP \\*(Cs\\*(Ps\\*s\\*i
Media Copy (MC).
\*(Ps = \*0 \(-> Print screen (default).
\*(Ps = \*4 \(-> Turn off printer controller mode.
@@ -1362,7 +1400,7 @@ Media Copy (MC).
\*(Ps = \*1\*1 \(-> SVG screen dump, \fI\*(xt\fP.
.
.iP
-.IP \\*(Cs\\*?\\*(Pm\\*s\\*i
+.IP \\*(Cs\\*?\\*(Ps\\*s\\*i
Media Copy (MC), DEC-specific.
\*(Ps = \*1 \(-> Print line containing cursor.
\*(Ps = \*4 \(-> Turn off autoprint mode.
@@ -1373,7 +1411,7 @@ Media Copy (MC), DEC-specific.
.iP
.IP \\*(Cs\\*(Pm\\*s\\*l
Reset Mode (RM).
- \*(Ps = \*2 \(-> Keyboard Action Mode (AM).
+ \*(Ps = \*2 \(-> Keyboard Action Mode (KAM).
\*(Ps = \*4 \(-> Replace Mode (IRM).
\*(Ps = \*1\*2 \(-> Send/receive (SRM).
\*(Ps = \*2\*0 \(-> Normal Linefeed (LNM).
@@ -1387,29 +1425,34 @@ DEC Private Mode Reset (DECRST).
\*(Ps = \*4 \(-> Jump (Fast) Scroll (DECSCLM), VT100.
\*(Ps = \*5 \(-> Normal Video (DECSCNM), VT100.
\*(Ps = \*6 \(-> Normal Cursor Mode (DECOM), VT100.
- \*(Ps = \*7 \(-> No Auto-wrap Mode (DECAWM), VT100.
- \*(Ps = \*8 \(-> No Auto-repeat Keys (DECARM), VT100.
+ \*(Ps = \*7 \(-> No Auto-Wrap Mode (DECAWM), VT100.
+ \*(Ps = \*8 \(-> No Auto-Repeat Keys (DECARM), VT100.
\*(Ps = \*9 \(-> Don't send Mouse X & Y on button press, \fI\*(xt\fP.
\*(Ps = \*1\*0 \(-> Hide toolbar (rxvt).
- \*(Ps = \*1\*2 \(-> Stop Blinking Cursor (AT&T 610).
- \*(Ps = \*1\*3 \(-> Disable Blinking Cursor (reset only via resource or menu).
- \*(Ps = \*1\*4 \(-> Disable XOR of Blinking Cursor control sequence and menu.
- \*(Ps = \*1\*8 \(-> Don't print form feed (DECPFF).
- \*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX).
- \*(Ps = \*2\*5 \(-> Hide Cursor (DECTCEM), VT220.
+ \*(Ps = \*1\*2 \(-> Stop blinking cursor (AT&T 610).
+ \*(Ps = \*1\*3 \(-> Disable blinking cursor (reset only via resource or menu).
+ \*(Ps = \*1\*4 \(-> Disable XOR of blinking cursor control sequence and menu.
+ \*(Ps = \*1\*8 \(-> Don't Print Form Feed (DECPFF), VT220.
+ \*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX), VT220.
+ \*(Ps = \*2\*5 \(-> Hide cursor (DECTCEM), VT220.
\*(Ps = \*3\*0 \(-> Don't show scrollbar (rxvt).
\*(Ps = \*3\*5 \(-> Disable font-shifting functions (rxvt).
- \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 Mode, \fI\*(xt\fP.
+ \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 mode, \fI\*(xt\fP.
\*(Ps = \*4\*1 \(-> No \fBmore\fP(1) fix (see \fBcurses\fP resource).
\*(Ps = \*4\*2 \(-> Disable National Replacement Character sets (DECNRCM),
VT220.
- \*(Ps = \*4\*4 \(-> Turn Off Margin Bell, \fI\*(xt\fP.
- \*(Ps = \*4\*5 \(-> No Reverse-wraparound Mode, \fI\*(xt\fP.
- \*(Ps = \*4\*6 \(-> Stop Logging, \fI\*(xt\fP.
+ \*(Ps = \*4\*3 \(-> Disable Graphics Expanded Print Mode (DECGEPM).
+ \*(Ps = \*4\*4 \(-> Turn off margin bell, \fI\*(xt\fP.
+ \*(Ps = \*4\*4 \(-> Disable Graphics Print Color Mode (DECGPCM).
+ \*(Ps = \*4\*5 \(-> No Reverse-wraparound mode, \fI\*(xt\fP.
+ \*(Ps = \*4\*5 \(-> Disable Graphics Print ColorSpace (DECGPCS).
+ \*(Ps = \*4\*6 \(-> Stop logging, \fI\*(xt\fP.
This is normally disabled by a compile-time option.
- \*(Ps = \*4\*7 \(-> Use Normal Screen Buffer, \fI\*(xt\fP.
- \*(Ps = \*6\*6 \(-> Numeric keypad (DECNKM), VT320.
- \*(Ps = \*6\*7 \(-> Backarrow key sends delete (DECBKM), VT340, VT420. This sets the \fBbackarrowKey\fP resource to \*(``false\*(''.
+ \*(Ps = \*4\*7 \(-> Use \fINormal Screen Buffer\fP, \fI\*(xt\fP.
+ \*(Ps = \*4\*7 \(-> Disable Graphics Rotated Print Mode (DECGRPM).
+ \*(Ps = \*6\*6 \(-> Numeric keypad mode (DECNKM), VT320.
+ \*(Ps = \*6\*7 \(-> Backarrow key sends delete (DECBKM), VT340, VT420.
+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).
@@ -1419,16 +1462,21 @@ VT510 and up.
release.
See the section \fBMouse Tracking\fP.
\*(Ps = \*1\*0\*0\*1 \(-> Don't use Hilite Mouse Tracking, \fI\*(xt\fP.
- \*(Ps = \*1\*0\*0\*2 \(-> Don't use Cell Motion Mouse Tracking, \fI\*(xt\fP. See the section \fBButton-event tracking\fP.
- \*(Ps = \*1\*0\*0\*3 \(-> Don't use All Motion Mouse Tracking, \fI\*(xt\fP. See the section \fBAny-event tracking\fP.
+ \*(Ps = \*1\*0\*0\*2 \(-> Don't use Cell Motion Mouse Tracking, \fI\*(xt\fP.
+See the section \fBButton-event tracking\fP.
+ \*(Ps = \*1\*0\*0\*3 \(-> Don't use All Motion Mouse Tracking, \fI\*(xt\fP.
+See the section \fBAny-event tracking\fP.
\*(Ps = \*1\*0\*0\*4 \(-> Don't send \fBFocusIn/FocusOut\fP events, \fI\*(xt\fP.
\*(Ps = \*1\*0\*0\*5 \(-> Disable UTF-8 Mouse Mode, \fI\*(xt\fP.
\*(Ps = \*1\*0\*0\*6 \(-> Disable SGR Mouse Mode, \fI\*(xt\fP.
\*(Ps = \*1\*0\*0\*7 \(-> Disable \fIAlternate Scroll Mode\fP, \fI\*(xt\fP.
This corresponds to the \fBalternateScroll\fP resource.
- \*(Ps = \*1\*0\*1\*0 \(-> Don't scroll to bottom on tty output (rxvt). This sets the \fBscrollTtyOutput\fP resource to \*(``false\*(''.
- \*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt). This sets the \fBscrollKey\fP resource to \*(``false\*(''.
+ \*(Ps = \*1\*0\*1\*0 \(-> Don't scroll to bottom on tty output (rxvt).
+This sets the \fBscrollTtyOutput\fP resource to \*(``false\*(''.
+ \*(Ps = \*1\*0\*1\*1 \(-> Don't scroll to bottom on key press (rxvt).
+This sets the \fBscrollKey\fP resource to \*(``false\*(''.
\*(Ps = \*1\*0\*1\*5 \(-> Disable urxvt Mouse Mode.
+ \*(Ps = \*1\*0\*1\*6 \(-> Disable SGR Mouse Pixel-Mode, \fI\*(xt\fP.
\*(Ps = \*1\*0\*3\*4 \(-> Don't interpret \*(``meta\*('' key, \fI\*(xt\fP.
This disables the \fBeightBitInput\fP resource.
\*(Ps = \*1\*0\*3\*5 \(-> Disable special modifiers for
@@ -1580,39 +1628,50 @@ All parameters are decimal integers.
.bP
RGB values range from zero (0) to 255.
.bP
-ISO-8613-6 has been interpreted in more than one way;
-\fI\*(xt\fP allows the semicolons separating the subparameters
-in this control to be replaced by colons
+The 88- and 256-color support uses \fIsubparameters\fP described in ISO-8613-6
+for \fIindexed\fP color.
+ISO-8613-6 also mentions \fIdirect color\fP, using a similar scheme.
+\fI\*(xt\fP supports that, too.
+.bP
+\fI\*(xt\fP allows either colons (standard) or semicolons (legacy)
+to separate the subparameters
(but after the first colon, colons must be used).
.RE
.sP
+The indexed- and direct-color features are summarized in the FAQ,
+which explains why semicolon is accepted as a subparameter delimiter:
+.ID 2
+.\" https://invisible-island.net/xterm/xterm.faq.html#color_by_number
+\fICan I set a color by its number?\fP
+.DE
+.sP
These ISO-8613-6 controls (marked in ECMA-48 5th edition as
\*(``reserved for future standardization\*('')
are supported by \fI\*(xt\fP:
- \*(Pm = \*3\*8\*;\*2\*;\*(Pi\*s\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set foreground
+ \*(Ps = \*3\*8\*:\*2\*:\*(Pi\*s\*:\*(Pr\*s\*:\*(Pg\*s\*:\*(Pb \(-> Set foreground
color using RGB values.
If \fI\*(xt\fP is not compiled with direct-color support,
it uses the closest match in its palette
for the given RGB \*(Pr/\*(Pg/\*(Pb.
The color space identifier \*(Pi is ignored.
- \*(Pm = \*3\*8\*;\*5\*;\*(Ps \(-> Set foreground color to \*(Ps,
+ \*(Ps = \*3\*8\*:\*5\*:\*(Ps \(-> Set foreground color to \*(Ps,
using indexed color.
- \*(Pm = \*4\*8\*;\*2\*;\*(Pi\*s\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set background
+ \*(Ps = \*4\*8\*:\*2\*:\*(Pi\*s\*:\*(Pr\*s\*:\*(Pg\*s\*:\*(Pb \(-> Set background
color using RGB values.
If \fI\*(xt\fP is not compiled with direct-color support,
it uses the closest match in its palette
for the given RGB \*(Pr/\*(Pg/\*(Pb.
The color space identifier \*(Pi is ignored.
- \*(Pm = \*4\*8\*;\*5\*;\*(Ps \(-> Set background color to \*(Ps,
+ \*(Ps = \*4\*8\*:\*5\*:\*(Ps \(-> Set background color to \*(Ps,
using indexed color.
.sP
This variation on ISO-8613-6 is supported for compatibility with KDE konsole:
- \*(Pm = \*3\*8\*;\*2\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set foreground color
+ \*(Ps = \*3\*8\*;\*2\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set foreground color
using RGB values.
If \fI\*(xt\fP is not compiled with direct-color support,
it uses the closest match in its palette
for the given RGB \*(Pr/\*(Pg/\*(Pb.
- \*(Pm = \*4\*8\*;\*2\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set background color
+ \*(Ps = \*4\*8\*;\*2\*;\*(Pr\*s\*;\*(Pg\*s\*;\*(Pb \(-> Set background color
using RGB values.
If \fI\*(xt\fP is not compiled with direct-color support,
it uses the closest match in its palette
@@ -1627,7 +1686,7 @@ rather than choosing the closest match,
.iP
.IP \\*(Cs\\*>\\*(Pp\\*s\\*;\*(Pv\\*s\\*m
.IP \\*(Cs\\*>\\*(Pp\\*s\\*m
-Set/reset key modifier options, \fI\*(xt\fP.
+Set/reset key modifier options (XTMODKEYS), \fI\*(xt\fP.
Set or reset resource-values used by \fI\*(xt\fP to decide whether to
construct escape sequences holding information about the modifiers
pressed with a given key.
@@ -1677,7 +1736,7 @@ The \fBmodifyFunctionKeys\fP and \fBmodifyKeyboard\fP resources
can change the form of the string sent from the modified F1 key.
.
.iP
-.IP \\*(Cs\\*>\\*(Pm\\*s\\*n
+.IP \\*(Cs\\*>\\*(Ps\\*s\\*n
Disable key modifier options, \fI\*(xt\fP.
These modifiers may be enabled via the
\*(Cs\*>\*(Pm\*s\*m
@@ -1746,9 +1805,9 @@ The response is
\*(Ps = \*6\*2 \(-> Report macro space (DECMSR).
The response is
\*(Cs\*(Pn\*s\**\*s\*{.
- \*(Ps = \*6\*3 \(-> Report memory checksum (DECCKSR).
+ \*(Ps = \*6\*3 \(-> Report memory checksum (DECCKSR), VT420 and up.
The response is
-\*(Dc\*(Pt\*s\*!x\*sx\*sx\*sx\*s\*(ST.
+\*(Dc\*(Pt\*s\*!\*~x\*sx\*sx\*sx\*s\*(ST.
.br
\*(Pt is the request id (from an optional parameter to the request).
The x's are hexadecimal digits 0-9 and A-F.
@@ -1761,7 +1820,7 @@ The response is
.
.iP
.IP \\*(Cs\\*>\\*(Ps\\*s\\*p
-Set resource value \fBpointerMode\fP.
+Set resource value \fBpointerMode\fP (XTSMPOINTER), \*(xt.
This is used by \fI\*(xt\fP to decide whether to
hide the pointer cursor as the user types.
.iP
@@ -1806,7 +1865,7 @@ but DECSCL is preferred.
Request ANSI mode (DECRQM).
For VT300 and up, reply DECRPM is
.br
- \*(Cs\*(Ps\*;\*(Pm\*$\*y
+ \*(Cs\*(Ps\*;\*(Pm\*s\*$\*y
.br
where \*(Ps is the mode number as in SM/RM,
and \*(Pm is the mode value:
@@ -1822,7 +1881,7 @@ and \*(Pm is the mode value:
Request DEC private mode (DECRQM).
For VT300 and up, reply DECRPM is
.br
- \*(Cs\*?\*(Ps\*;\*(Pm\*$\*y
+ \*(Cs\*?\*(Ps\*;\*(Pm\*s\*$\*y
.br
where \*(Ps is the mode number as in DECSET/DECSET,
\*(Pm is the mode value as in the ANSI DECRQM.
@@ -1839,6 +1898,10 @@ This is an alias for \*(Cs\*#\*{,
used to work around language limitations of C#.
.
.iP
+.IP \\*(Cs\\*>\\*(Ps\\*s\\*q
+\*(Ps = \*0 \(-> Report \fI\*(xt\fP name and version (XTVERSION).
+The response is a DSR sequence identifying the version: \*(Dc\*>\*|text \*(ST
+.iP
.IP \\*(Cs\\*(Ps\\*s\\*q
Load LEDs (DECLL), VT100.
\*(Ps = \*0 \(-> Clear all LEDS (default).
@@ -1862,7 +1925,7 @@ Set cursor style (DECSCUSR), VT520.
.
.iP
.IP \\*(Cs\\*(Ps\\*s\\*(Dq\\*q
-Select character protection attribute (DECSCA).
+Select character protection attribute (DECSCA), VT220.
Valid values for the parameter:
\*(Ps = \*0 \(-> DECSED and DECSEL can erase (default).
\*(Ps = \*1 \(-> DECSED and DECSEL cannot erase.
@@ -1881,7 +1944,7 @@ Set Scrolling Region [top;bottom] (default = full size of window)
.
.iP
.IP \\*(Cs\\*?\\*(Pm\\*s\\*r
-Restore DEC Private Mode Values.
+Restore DEC Private Mode Values (XTRESTORE), \*(xt.
The value of \*(Ps previously saved is restored.
\*(Ps values are the same as for DECSET.
.
@@ -1901,13 +1964,29 @@ Set left and right margins (DECSLRM), VT420 and up.
This is available only when DECLRMM is enabled.
.
.iP
+.IP \\*(Cs\\*>\\*(Ps\\*s\\*(cs
+Set/reset shift-escape options (XTSHIFTESCAPE), \fI\*(xt\fP.
+This corresponds to the \fBshiftEscape\fP resource.
+.iP
+Valid values for the parameter:
+ \*(Ps = \*0 \(-> allow shift-key to override mouse protocol.
+ \*(Ps = \*1 \(-> conditionally allow shift-key as modifier in mouse protocol.
+.iP
+These resource values are disallowed in the control sequence:
+ \*(Ps = \*2 \(-> always allow shift-key as modifier in mouse protocol.
+ \*(Ps = \*3 \(-> never allow shift-key as modifier in mouse protocol.
+.iP
+If no parameter is given, \fI\*(xt\fP uses the default,
+which is \*0.
+.
+.iP
.IP \\*(Cs\\*?\\*(Pm\\*s\\*(cs
-Save DEC Private Mode Values.
+Save DEC Private Mode Values (XTSAVE), \*(xt.
\*(Ps values are the same as for DECSET.
.
.iP
.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*;\\*(Ps\\*s\\*t
-Window manipulation (from \fIdtterm\fP, as well as extensions by \fI\*(xt\fP).
+Window manipulation (XTWINOPS), \fIdtterm\fP, extended by \fI\*(xt\fP.
These controls may be disabled using the \fBallowWindowOps\fP resource.
.iP
\fI\*(xt\fP uses \fIExtended Window Manager Hints\fP (EWMH) to maximize
@@ -2009,7 +2088,7 @@ from stack.
.iP
.IP \\*(Cs\\*>\\*(Pm\\*s\\*t
This \fI\*(xt\fP control
-sets one or more features of the title modes.
+sets one or more features of the title modes (XTSMTITLE), \*(xt.
Each parameter enables a single feature.
\*(Ps = \*0 \(-> Set window/icon labels using hexadecimal.
\*(Ps = \*1 \(-> Query window/icon labels using hexadecimal.
@@ -2081,7 +2160,7 @@ an outside rectangle event is generated and the rectangle is disabled.
Filter rectangles are always treated as \*(``one-shot\*('' events.
Any parameters that are omitted default to the current locator position.
If all parameters are omitted, any locator motion will be reported.
-DECELR always cancels any prevous rectangle definition.
+DECELR always cancels any previous rectangle definition.
.
.iP
.IP \\*(Cs\\*(Ps\\*s\\*x
@@ -2184,9 +2263,9 @@ except for colors (which do not have a unique SGR code):
\*(Ps = \*7 \(-> Inverse.
\*(Ps = \*8 \(-> Invisible.
\*(Ps = \*9 \(-> Crossed-out characters.
- \*(Ps = \*1\*0 \(-> Foreground color.
- \*(Ps = \*1\*1 \(-> Background color.
\*(Ps = \*2\*1 \(-> Doubly-underlined.
+ \*(Ps = \*3\*0 \(-> Foreground color.
+ \*(Ps = \*3\*1 \(-> Background color.
.iP
.IP
If no parameters are given, all of the video attributes are saved.
@@ -2265,11 +2344,11 @@ Popping restores the video-attributes which were saved using XTPUSHSGR
to their previous state.
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*(qu\\*}
+.IP \\*(Cs\\*(Ps\\*s\\*(qu\\*}
Insert \*(Ps Column(s) (default = 1) (DECIC), VT420 and up.
.
.iP
-.IP \\*(Cs\\*(Pm\\*s\\*(qu\\*~
+.IP \\*(Cs\\*(Ps\\*s\\*(qu\\*~
Delete \*(Ps Column(s) (default = 1) (DECDC), VT420 and up.
.
.Ed
@@ -2281,12 +2360,32 @@ Delete \*(Ps Column(s) (default = 1) (DECDC), VT420 and up.
.iP
.IP \\*(Os\\*(Ps\\*s\\*;\\*(Pt\\*s\\*(ST
Set Text Parameters.
+Some control sequences return information:
+.RS
+.bP
For colors and font,
if \*(Pt is a \*(``?\*('',
the control sequence elicits a response which consists
of the control sequence which would set the corresponding value.
+.bP
The \fIdtterm\fP control sequences allow you to determine the icon name
and window title.
+.RE
+.sP
+\*(XT accepts either \*(Be or \*(ST for terminating \*(Os sequences,
+and when returning information, uses the same terminator used in a query.
+While the latter is preferred,
+the former is supported for legacy applications:
+.RS
+.bP
+Although documented in the changes for X.V10R4 (December 1986),
+\*(Be as a string terminator dates from X11R4 (December 1989).
+.bP
+Since XFree86-3.1.2Ee (August 1996), \*(xt has accepted \*(ST
+(the documented string terminator in ECMA-48).
+.RE
+.sP
+\*(Ps specifies the type of operation to perform:
\*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt.
\*(Ps = \*1 \(-> Change Icon Name to \*(Pt.
\*(Ps = \*2 \(-> Change Window Title to \*(Pt.
@@ -2351,8 +2450,8 @@ be given in one control sequence, \fI\*(xt\fR can make more than one reply.
\*(Ps = \*1\*0 \(-> Change VT100 text foreground color to \*(Pt.
\*(Ps = \*1\*1 \(-> Change VT100 text background color to \*(Pt.
\*(Ps = \*1\*2 \(-> Change text cursor color to \*(Pt.
- \*(Ps = \*1\*3 \(-> Change mouse foreground color to \*(Pt.
- \*(Ps = \*1\*4 \(-> Change mouse background color to \*(Pt.
+ \*(Ps = \*1\*3 \(-> Change pointer foreground color to \*(Pt.
+ \*(Ps = \*1\*4 \(-> Change pointer background color to \*(Pt.
\*(Ps = \*1\*5 \(-> Change Tektronix foreground color to \*(Pt.
\*(Ps = \*1\*6 \(-> Change Tektronix background color to \*(Pt.
\*(Ps = \*1\*7 \(-> Change highlight background color to \*(Pt.
@@ -2447,8 +2546,8 @@ 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.
\*(Ps = \*1\*1\*2 \(-> Reset text cursor color.
- \*(Ps = \*1\*1\*3 \(-> Reset mouse foreground color.
- \*(Ps = \*1\*1\*4 \(-> Reset mouse background color.
+ \*(Ps = \*1\*1\*3 \(-> Reset pointer foreground color.
+ \*(Ps = \*1\*1\*4 \(-> Reset pointer background color.
\*(Ps = \*1\*1\*5 \(-> Reset Tektronix foreground color.
\*(Ps = \*1\*1\*6 \(-> Reset Tektronix background color.
\*(Ps = \*1\*1\*7 \(-> Reset highlight color.
@@ -2533,14 +2632,17 @@ for example \fIalt-Tab\fP sends
One drawback to this format is that applications may confuse it with
\*(Cs\*u (restore-cursor).
.LP
-The \fI\*(xt\fP FAQ section
+The \fI\*(xt\fP FAQ sections
.br
.ID 3
.\" https://invisible-island.net/xterm/xterm.faq.html#xterm_modother
\fIHow can my program distinguish control-I from tab?\fP
+.ID 3
+.\" https://invisible-island.net/xterm/modified-keys.html
+\fIXTerm - \*(``Other\*('' Modified Keys\fP
.DE
.br
-goes into greater detail on this topic.
+go into greater detail on this topic.
.LP
The table shows the result for a given character \*(``x\*('' with modifiers
according to the default translations with the resources set on or off.
@@ -3073,11 +3175,12 @@ are defined in \fIxcharmouse.h\fP as follows:
.sP
#define SET_FOCUS_EVENT_MOUSE 1004
.sP
+#define SET_ALTERNATE_SCROLL 1007
+.sP
#define SET_EXT_MODE_MOUSE 1005
#define SET_SGR_EXT_MODE_MOUSE 1006
#define SET_URXVT_EXT_MODE_MOUSE 1015
-.sP
-#define SET_ALTERNATE_SCROLL 1007
+#define SET_PIXEL_POSITION_MOUSE 1016
.ft 1
.DE
.br
@@ -3116,15 +3219,40 @@ On button press or release, \fI\*(xt\fP sends
\*(Cs\*M\*(Cb\*(Cx\*(Cy.
.bP
The low two bits of \*(Cb encode button information:
-0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.
+.RS
+.IP
+0=MB1 pressed,
+.br
+1=MB2 pressed,
+.br
+2=MB3 pressed, and
+.br
+3=release.
+.RE
.bP
The next three bits encode the modifiers which were down when the button was
-pressed and are added together: 4=Shift, 8=Meta, 16=Control.
-Note however that the shift and control bits are normally unavailable
-because \fI\*(xt\fP uses the control modifier with mouse for popup menus,
-and the shift modifier is used in the default translations for button events.
-The \fIMeta\fP modifier recognized by \fI\*(xt\fP is the \fImod1\fP mask,
-and is not necessarily the \*(``Meta\*('' key (see \fBxmodmap\fP(1)).
+pressed and are added together:
+.RS
+.IP
+4=Shift,
+.br
+8=Meta, and
+.br
+16=Control.
+.RE
+.IP
+The \fIshift\fP and \fIcontrol\fP modifiers are normally irrelevant
+because \fI\*(xt\fP uses the \fIcontrol\fP modifier with mouse for popup menus,
+and the \fIshift\fP modifier is used in the default translations for button
+events.
+.IP
+There is no predefined \fImeta\fP modifier.
+\fI\*(XT\fP checks first if the keysyms listed in the predefined modifiers
+include \fBMeta_L\fP or \fBMeta_R\fP.
+If found, \fI\*(xt\fP uses that modifier for \fImeta\fP.
+Next, it tries \fBAlt_L\fP or \fBAlt_R\fP.
+If none of those are found, \fI\*(xt\fP uses the \fImod1\fP modifier,
+This is not necessarily the \*(``Meta\*('' key according to \fBxmodmap\fP(1).
.bP
\*(Cx and \*(Cy are the x and y coordinates of the mouse event, encoded as
in X10 mode.
@@ -3135,11 +3263,14 @@ Those buttons are represented by the same event codes
as buttons 1 and 2 respectively,
except that 64 is added to the event code.
Release events for the wheel buttons are not reported.
+.LP
By default,
-the wheel mouse events are translated to \fIscroll-back\fP
-and \fIscroll-forw\fP actions.
+the wheel mouse events (buttons 4 and 5)
+are translated to \fIscroll-back\fP
+and \fIscroll-forw\fP actions, respectively.
Those actions normally scroll the whole window,
as if the scrollbar was used.
+.LP
However if \fIAlternate Scroll\fP mode is set,
then cursor up/down controls are sent when the terminal is displaying
the \fIAlternate Screen Buffer\fP.
@@ -3147,6 +3278,9 @@ The initial state of \fIAlternate Scroll\fP mode is set
using the \fBalternateScroll\fP resource.
.Ss Other buttons
.LP
+Some wheel mice can send additional button events,
+e.g., by tilting the scroll wheel left and right.
+.LP
Additional buttons are encoded like the wheel mice,
.bP
by adding 64 (for buttons 6 and 7), or
@@ -3155,9 +3289,12 @@ by adding 128 (for buttons 8 through 11).
.LP
Past button 11, the encoding is ambiguous because the same code
may correspond to different button/modifier combinations.
+.LP
It is not possible to use these buttons (6-11) in \fI\*(xt\fP's
\fBtranslations\fP resource because their names are not in the X Toolkit's
symbol table.
+However, applications can check for the reports, e.g.,
+button 7 (left) and button 6 (right) with a Logitech mouse.
.Ss Highlight tracking
.LP
Mouse highlight tracking notifies a program of a button press, receives a
@@ -3323,7 +3460,10 @@ However, \*(Cs\*M can be mistaken for DL (delete lines),
while the highlight tracking \*(Cs\*T can be mistaken for SD (scroll down),
and the Window manipulation controls.
For these reasons, the 1015 control is not recommended;
-it is not an improvement over 1005.
+it is not an improvement over 1006.
+.IP "SGR-Pixels (1016)"
+Use the same mouse response format as the 1006 control,
+but report position in \fIpixels\fP rather than character \fIcells\fP.
.
.Sh "Sixel Graphics"
.LP
@@ -3333,7 +3473,10 @@ VT241,
VT330,
VT340 or
VT382
-using the \fBdecTerminalID\fP resource,
+using the
+\fBdecTerminalID\fP or
+\fBdecGraphicsID\fP
+resource,
it supports Sixel Graphics controls, a palleted bitmap graphics system
using sets of six vertical pixels as the basic element.
.St
@@ -3375,7 +3518,10 @@ VT240,
VT241,
VT330 or
VT340
-using the \fBdecTerminalID\fP resource,
+using the
+\fBdecTerminalID\fP or
+\fBdecGraphicsID\fP
+resource,
it supports Remote Graphic Instruction Set, a graphics description language.
.St
.IP \\*(Cs\\*(Ps\\*s\\*c
@@ -3839,7 +3985,7 @@ The change-notes for \fI\*(xt\fP's \fIresize\fP program in X10.4 (1986)
mention its use of these \*(``Sun tty emulation escape sequences\*(''
for resizing the window.
The X10.4 \fI\*(xt\fP program recognized these sequences for resizing
-the terminal, except for the iconfig/deiconfy pair.
+the terminal, except for the iconify/deiconify pair.
SunView also introduced the SIGWINCH signal,
used by the X10.4 \fI\*(xt\fP and mentioned in its \fICHANGES\fP file:
.iP
@@ -3866,8 +4012,8 @@ Starting in July 1996,
and further extended the group of window controls.
.IP
There were two sets of controls
-(\*(Cs\*(Ps[\*s\*;\*(Pm\*s\*;\*(Pm]\*t,
-and \*(Os\*(Ps\fItext\fP\*(ST) implemented
+(\*(Cs\*(Ps\*s\fI[\fP\*s\*;\*(Pm\*s\*;\*(Pm\*s\fI]\fP\*s\*t,
+and \*(Os\*(Ps\*s\fItext\fP\*s\*(ST) implemented
by \fIshelltool\fP, documented in appendix E of both
\fIPHIGS Programming Manual\fP (1992), and the unpublished
\fIX Window System User's Guide (OPEN LOOK Edition)\fP (1995).
@@ -3927,13 +4073,11 @@ The latter was introduced in X10.4:
.RS
.ft C
.na
-.hy 0
-Most Dec Private mode settings can be save away internally using \\E[?ns,
+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
example, to turn off saving of lines, but restore whatever the original
state was on exit.
-.hy
.ad
.ft R
.RE
@@ -3948,7 +4092,6 @@ That is implied by the description's mention of \fIHFT\fP:
.iP
.RS
.na
-.hy 0
.ft C
The aixterm command provides a standard terminal type for programs that
do not interact directly with Enhanced X-Windows.
@@ -3958,7 +4101,6 @@ The VT102 mode is activated by the -v flag.
.ft R
.ad
.RE
-.hy
.IP
Unlike \fI\*(xt\fP, there are no resource names for the 16 colors,
leaving the reader to assume that the mapping is hard-coded.
diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt
index d1faa6dd5..3e06c0e26 100644
--- a/app/xterm/ctlseqs.txt
+++ b/app/xterm/ctlseqs.txt
@@ -20,8 +20,8 @@
Thomas Dickey
XFree86 Project (1996-2006)
- invisible-island.net (2006-2019)
- updated for XTerm Patch #350 (2019/11/02)
+ invisible-island.net (2006-2020)
+ updated for XTerm Patch #363 (2020/12/25)
@@ -38,8 +38,9 @@ C A single (required) character.
Ps A single (usually optional) numeric parameter, composed of one or
more digits.
-Pm Any number of single numeric parameters, separated by ; charac-
- ter(s). Individual values for the parameters are listed with Ps .
+Pm Any number of single numeric parameters, separated by ;
+ character(s). Individual values for the parameters are listed with
+ Ps .
Pt A text parameter composed of printable characters.
@@ -59,8 +60,8 @@ o This means that a C1 control can be mistaken for badly-formed UTF-8
continuation bytes of a UTF-8 encoded (multibyte) value.
o It is not possible to use a C1 control obtained from decoding the
- UTF-8 text, because that would require reprocessing the data. Con-
- sequently there is no ambiguity in the way this document uses the
+ UTF-8 text, because that would require reprocessing the data.
+ Consequently there is no ambiguity in the way this document uses the
term "character" to refer to bytes in a control sequence.
The order of processing is a necessary consequence of the way ECMA-48 is
@@ -81,8 +82,8 @@ o Eight-bit controls can have intermediate, etc., bytes in the range
160 to 255. Those can be treated as their counterparts in the range
32 to 127.
-o Single-byte controls can be handled separately from multi-byte con-
- trol sequences because ECMA-48's rules are unambiguous.
+o Single-byte controls can be handled separately from multi-byte
+ control sequences because ECMA-48's rules are unambiguous.
As a special case, ECMA-48 (section 9) mentions that the control
functions shift-in and shift-out are allowed to occur within a 7-bit
@@ -92,36 +93,36 @@ o Single-byte controls can be handled separately from multi-byte con-
o Some controls (such as OSC ) introduce a string mode, which is ended
on a ST (string terminator).
- ECMA-48 describes only correct behavior, telling what types of char-
- acters are expected at each stage of the control sequences. It says
- that the action taken in error recovery is implementation-dependent.
- XTerm decodes control sequences using a state machine. It handles
- errors in decoding i.e., unexpected characters, by resetting to the
- initial (ground) state. That is different from the treatment of
- unimplemented (but correctly formatted) features.
+ ECMA-48 describes only correct behavior, telling what types of
+ characters are expected at each stage of the control sequences. It
+ says that the action taken in error recovery is implementation-
+ dependent. XTerm decodes control sequences using a state machine.
+ It handles errors in decoding i.e., unexpected characters, by
+ resetting to the initial (ground) state. That is different from the
+ treatment of unimplemented (but correctly formatted) features.
If an application does not send the string terminator, that is also
an error from the standpoint of a user. To accommodate users of
- those applications, xterm has resource settings which allow work-
- arounds:
+ those applications, xterm has resource settings which allow
+ workarounds:
- o The Linux console's palette sequences do not use a string termi-
- nator. The brokenLinuxOSC resource setting tells xterm to
+ o The Linux console's palette sequences do not use a string
+ terminator. The brokenLinuxOSC resource setting tells xterm to
ignore those particular sequences.
o The terminal should accept single-byte controls within the
string. But some applications omit a string terminator, like
the Linux console. The brokenStringTerm resource setting tells
- xterm to exit string mode if it decodes a common control charac-
- ter such as carriage return before the string terminator.
+ xterm to exit string mode if it decodes a common control
+ character such as carriage return before the string terminator.
C1 (8-Bit) Control Characters
The xterm program recognizes both 8-bit and 7-bit control characters.
It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled.
-The following pairs of 7-bit and 8-bit control characters are equiva-
-lent:
+The following pairs of 7-bit and 8-bit control characters are
+equivalent:
ESC D
Index (IND is 0x84).
@@ -191,13 +192,13 @@ brevity, the document refers to the related models:
Most of these control sequences are standard VT102 control sequences,
but there is support for later DEC VT terminals (i.e., VT220, VT320,
VT420, VT510), as well as ECMA-48 and aixterm color controls. The only
-VT102 feature not supported is auto-repeat, since the only way X pro-
-vides for this will affect all windows.
+VT102 feature not supported is auto-repeat, since the only way X
+provides for this will affect all windows.
-There are additional control sequences to provide xterm-dependent func-
-tions, 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 paren-
-theses.
+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
+parentheses.
The escape codes to designate and invoke character sets are specified by
ISO 2022 (see that document for a discussion of character sets).
@@ -215,8 +216,8 @@ BS Backspace (BS is Ctrl-H).
CR Carriage Return (CR is Ctrl-M).
ENQ Return Terminal Status (ENQ is Ctrl-E). Default response is
- an empty string, but may be overridden by a resource answer-
- backString.
+ an empty string, but may be overridden by a resource
+ answerbackString.
FF Form Feed or New Page (NP ). (FF is Ctrl-L). FF is treated
the same as LF .
@@ -281,13 +282,13 @@ ESC ( C Designate G0 Character Set, VT100, ISO 2022.
o a few were introduced in the VT300 series, and
o a few more were introduced in the VT500 series.
The VT220 character sets, together with a few others (such as
- Portuguese) are activated by the National Replacement Charac-
- ter Set (NRCS) controls. The term "replacement" says that the
- character set is formed by replacing some of the characters in
- a set (termed the Multinational Character Set) with more use-
- ful ones for a given language. The ASCII and DEC Supplemental
- character sets make up the two halves of the Multinational
- Character set, initially mapped to GL and GR.
+ Portuguese) are activated by the National Replacement
+ Character Set (NRCS) controls. The term "replacement" says
+ that the character set is formed by replacing some of the
+ characters in a set (termed the Multinational Character Set)
+ with more useful ones for a given language. The ASCII and DEC
+ Supplemental character sets make up the two halves of the
+ Multinational Character set, initially mapped to GL and GR.
The valid final characters C for this control are:
C = A -> United Kingdom (UK), VT100.
C = B -> United States (USASCII), VT100.
@@ -312,14 +313,15 @@ ESC ( C Designate G0 Character Set, VT100, ISO 2022.
C = 0 -> DEC Special Character and Line Drawing Set, VT100.
C = < -> DEC Supplemental, VT200.
C = > -> DEC Technical, VT300.
- These are documented as NRCS:
+ These are documented as 94-character sets (like USASCII)
+ without NRCS:
C = " 4 -> DEC Hebrew, VT500.
C = " ? -> DEC Greek, VT500.
C = % 0 -> DEC Turkish, VT500.
C = % 5 -> DEC Supplemental Graphics, VT300.
C = & 4 -> DEC Cyrillic, VT500.
- The VT520 reference manual lists a few more, but no documenta-
- tion has been found for the mappings:
+ The VT520 reference manual lists a few more, but no
+ documentation has been found for the mappings:
C = % 3 -> SCS NRCS, VT500.
C = & 5 -> DEC Russian, VT500.
@@ -338,6 +340,7 @@ ESC - C Designate G1 Character Set, VT300.
space and DEL for the mapping of 0x20 and 0x7f. The valid
final characters C for this control are:
C = A -> ISO Latin-1 Supplemental, VT300.
+ C = B -> ISO Latin-2 Supplemental, VT500.
C = F -> ISO Greek Supplemental, VT500.
C = H -> ISO Hebrew Supplemental, VT500.
C = L -> ISO Latin-Cyrillic, VT500.
@@ -366,14 +369,14 @@ ESC F Cursor to lower left corner of screen. This is enabled by the
ESC c Full Reset (RIS), VT100.
-ESC l Memory Lock (per HP terminals). Locks memory above the cur-
- sor.
+ESC l Memory Lock (per HP terminals). Locks memory above the
+ cursor.
ESC m Memory Unlock (per HP terminals).
-ESC n Invoke the G2 Character Set as GL (LS2) as GL.
+ESC n Invoke the G2 Character Set as GL (LS2).
-ESC o Invoke the G3 Character Set as GL (LS3) as GL.
+ESC o Invoke the G3 Character Set as GL (LS3).
ESC | Invoke the G3 Character Set as GR (LS3R).
@@ -402,10 +405,10 @@ DCS Ps ; Ps | Pt ST
Ps = 0 <- Lock the keys (default).
Ps = 1 <- Do not lock.
- The third parameter is a ';'-separated list of strings denot-
- ing the key-code separated by a '/' from the hex-encoded key
- value. The key codes correspond to the DEC function-key codes
- (e.g., F6=17).
+ The third parameter is a ";"-separated list of strings
+ denoting the key-code separated by a "/" from the hex-encoded
+ key value. The key codes correspond to the DEC function-key
+ codes (e.g., F6=17).
DCS $ q Pt ST
Request Status String (DECRQSS), VT420 and up.
@@ -424,15 +427,15 @@ DCS $ q Pt ST
r Pt ST for invalid requests.
DCS Ps $ t Pt ST
- Restore presentation status (DECRSPS), VT320 and up. The con-
- trol can be converted from a response from DECCIR or DECTABSR
- by changing the first "u" to a "t"
+ Restore presentation status (DECRSPS), VT320 and up. The
+ control can be converted from a response from DECCIR or
+ DECTABSR by changing the first "u" to a "t"
Ps = 1 -> DECCIR
Ps = 2 -> DECTABSR
DCS + Q Pt ST
- Request resource values (XTGETXRES), xterm. The string fol-
- lowing the "Q" is a list of names encoded in hexadecimal (2
+ Request resource values (XTGETXRES), xterm. The string
+ following the "Q" is a list of names encoded in hexadecimal (2
digits per character) separated by ; which correspond to xterm
resource names. Only boolean, numeric and string resources
are supported by this query.
@@ -442,23 +445,23 @@ DCS + Q Pt ST
the value of the corresponding resource that xterm is using,
or
DCS 0 + R Pt ST for invalid requests.
- The strings are encoded in hexadecimal (2 digits per charac-
- ter).
+ The strings are encoded in hexadecimal (2 digits per
+ character).
DCS + p Pt ST
- Set Termcap/Terminfo Data (XTSETTCAP), xterm. The string fol-
- lowing the "p" is a name to use for retrieving data from the
- terminal database. The data will be used for the "tcap" key-
- board configuration's function- and special-keys, as well as
- by the Request Termcap/Terminfo String control.
+ Set Termcap/Terminfo Data (XTSETTCAP), xterm. The string
+ following the "p" is a name to use for retrieving data from
+ the terminal database. The data will be used for the "tcap"
+ keyboard configuration's function- and special-keys, as well
+ as by the Request Termcap/Terminfo String control.
DCS + q Pt ST
Request Termcap/Terminfo String (XTGETTCAP), xterm. The
- string following the "q" is a list of names encoded in hexa-
- decimal (2 digits per character) separated by ; which corre-
- spond to termcap or terminfo key names.
+ string following the "q" is a list of names encoded in
+ hexadecimal (2 digits per character) separated by ; which
+ correspond to termcap or terminfo key names.
A few special features are also recognized, which are not key
names:
@@ -467,16 +470,16 @@ DCS + q Pt ST
o TN for termcap name (or name for terminfo name).
o RGB for the ncurses direct-color extension.
- Only a terminfo name is provided, since termcap applica-
- tions cannot use this information.
+ Only a terminfo name is provided, since termcap
+ applications cannot use this information.
xterm responds with
DCS 1 + r Pt ST for valid requests, adding to Pt an = , and
the value of the corresponding string that xterm would send,
or
DCS 0 + r Pt ST for invalid requests.
- The strings are encoded in hexadecimal (2 digits per charac-
- ter).
+ The strings are encoded in hexadecimal (2 digits per
+ character).
Functions using CSI , ordered by the final character(s)
@@ -538,13 +541,31 @@ CSI Ps M Delete Ps Line(s) (default = 1) (DL).
CSI Ps P Delete Ps Character(s) (default = 1) (DCH).
+CSI # P
+CSI Pm # P
+ Push current dynamic- and ANSI-palette colors onto stack
+ (XTPUSHCOLORS), xterm. Parameters (integers in the range 1
+ through 10, since the default 0 will push) may be used to
+ store the palette into the stack without pushing.
+
+CSI # Q
+CSI Pm # Q
+ Pop stack to set dynamic- and ANSI-palette colors
+ (XTPOPCOLORS), xterm. Parameters (integers in the range 1
+ through 10, since the default 0 will pop) may be used to
+ restore the palette from the stack without popping.
+
+CSI # R Report the current entry on the palette stack, and the number
+ of palettes stored on the stack, using the same form as
+ XTPOPCOLOR (default = 0) (XTREPORTCOLORS), xterm.
+
CSI Ps S Scroll up Ps lines (default = 1) (SU), VT420, ECMA-48.
CSI ? Pi ; Pa ; Pv S
- Set or request graphics attribute, xterm. If configured to
- support either Sixel Graphics or ReGIS Graphics, xterm accepts
- a three-parameter control sequence, where Pi, Pa and Pv are
- the item, action and value:
+ Set or request graphics attribute (XTSMGRAPHICS), xterm. If
+ configured to support either Sixel Graphics or ReGIS Graphics,
+ xterm accepts a three-parameter control sequence, where Pi, Pa
+ and Pv are the item, action and value:
Pi = 1 -> item is number of color registers.
Pi = 2 -> item is Sixel graphics geometry (in pixels).
@@ -555,7 +576,7 @@ CSI ? Pi ; Pa ; Pv S
Pa = 3 -> set to value in Pv.
Pa = 4 -> read the maximum allowed value.
- Pv can be omitted except when setting (Pa == 3 ).
+ Pv is ignored by xterm except when setting (Pa == 3 ).
Pv = n <- A single integer is used for color registers.
Pv = width ; height <- Two integers for graphics geometry.
@@ -587,19 +608,19 @@ CSI ? Pi ; Pa ; Pv S
CSI Ps T Scroll down Ps lines (default = 1) (SD), VT420.
CSI Ps ; Ps ; Ps ; Ps ; Ps T
- Initiate highlight mouse tracking. Parameters are
- [func;startx;starty;firstrow;lastrow]. See the section Mouse
- Tracking.
+ Initiate highlight mouse tracking (XTHIMOUSE), xterm.
+ Parameters are [func;startx;starty;firstrow;lastrow]. See the
+ section Mouse Tracking.
CSI > Pm T
- Reset title mode features to default value, xterm. Normally,
- "reset" disables the feature. It is possible to disable the
- ability to reset features by compiling a different default for
- the title modes into xterm.
+ Reset title mode features to default value (XTRMTITLE), xterm.
+ Normally, "reset" disables the feature. It is possible to
+ disable the ability to reset features by compiling a different
+ default for the title modes into xterm.
Ps = 0 -> Do not set window/icon labels using hexadecimal.
- Ps = 1 -> Do not query window/icon labels using hexadeci-
- mal.
+ Ps = 1 -> Do not query window/icon labels using
+ hexadecimal.
Ps = 2 -> Do not set window/icon labels using UTF-8.
Ps = 3 -> Do not query window/icon labels using UTF-8.
@@ -610,13 +631,13 @@ CSI Ps X Erase Ps Character(s) (default = 1) (ECH).
CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).
CSI Ps ^ Scroll down Ps lines (default = 1) (SD), ECMA-48.
- This was a publication error in the original ECMA-48 5th edi-
- tion (1991) corrected in 2003.
+ This was a publication error in the original ECMA-48 5th
+ edition (1991) corrected in 2003.
-CSI Pm ` Character Position Absolute [column] (default = [row,1])
+CSI Ps ` Character Position Absolute [column] (default = [row,1])
(HPA).
-CSI Pm a Character Position Relative [columns] (default = [row,col+1])
+CSI Ps a Character Position Relative [columns] (default = [row,col+1])
(HPR).
CSI Ps b Repeat the preceding graphic character Ps times (REP).
@@ -626,10 +647,13 @@ CSI Ps c Send Device Attributes (Primary DA).
response depends on the decTerminalID resource setting.
-> CSI ? 1 ; 2 c ("VT100 with Advanced Video Option")
-> CSI ? 1 ; 0 c ("VT101 with No Options")
+ -> CSI ? 4 ; 6 c ("VT132 with Advanced Video and Graphics")
-> CSI ? 6 c ("VT102")
- -> CSI ? 6 2 ; Psc ("VT220")
- -> CSI ? 6 3 ; Psc ("VT320")
- -> CSI ? 6 4 ; Psc ("VT420")
+ -> CSI ? 7 c ("VT131")
+ -> CSI ? 1 2 ; Ps c ("VT125")
+ -> CSI ? 6 2 ; Ps c ("VT220")
+ -> CSI ? 6 3 ; Ps c ("VT320")
+ -> CSI ? 6 4 ; Ps c ("VT420")
The VT100-style response parameters do not mean anything by
themselves. VT220 (and higher) parameters do, telling the
@@ -653,10 +677,10 @@ CSI Ps c Send Device Attributes (Primary DA).
XTerm supports part of the User windows feature, providing a
single page (which corresponds to its visible window). Rather
than resizing the font to change the number of lines/columns
- in a fixed-size display, xterm uses the window extension con-
- trols (DECSNLS, DECSCPP, DECSLPP) to adjust its visible win-
- dow's size. The "cursor coupling" controls (DECHCCM, DECPCCM,
- DECVCCM) are ignored.
+ in a fixed-size display, xterm uses the window extension
+ controls (DECSNLS, DECSCPP, DECSLPP) to adjust its visible
+ window's size. The "cursor coupling" controls (DECHCCM,
+ DECPCCM, DECVCCM) are ignored.
CSI = Ps c
Send Device Attributes (Tertiary DA).
@@ -667,30 +691,31 @@ CSI = Ps c
CSI > Ps c
Send Device Attributes (Secondary DA).
Ps = 0 or omitted -> request the terminal's identification
- code. The response depends on the decTerminalID resource set-
- ting. It should apply only to VT220 and up, but xterm extends
- this to VT100.
+ code. The response depends on the decTerminalID resource
+ setting. It should apply only to VT220 and up, but xterm
+ extends this to VT100.
-> CSI > Pp ; Pv ; Pc c
where Pp denotes the terminal type
Pp = 0 -> "VT100".
Pp = 1 -> "VT220".
- Pp = 2 -> "VT240".
+ Pp = 2 -> "VT240" or "VT241".
Pp = 1 8 -> "VT330".
Pp = 1 9 -> "VT340".
Pp = 2 4 -> "VT320".
+ Pp = 3 2 -> "VT382".
Pp = 4 1 -> "VT420".
Pp = 6 1 -> "VT510".
Pp = 6 4 -> "VT520".
Pp = 6 5 -> "VT525".
and Pv is the firmware version (for xterm, this was originally
- the XFree86 patch number, starting with 95). In a DEC termi-
- nal, Pc indicates the ROM cartridge registration number and is
- always zero.
+ the XFree86 patch number, starting with 95). In a DEC
+ terminal, Pc indicates the ROM cartridge registration number
+ and is always zero.
-CSI Pm d Line Position Absolute [row] (default = [1,column]) (VPA).
+CSI Ps d Line Position Absolute [row] (default = [1,column]) (VPA).
-CSI Pm e Line Position Relative [rows] (default = [row+1,column])
+CSI Ps e Line Position Relative [rows] (default = [row+1,column])
(VPR).
CSI Ps ; Ps f
@@ -702,7 +727,7 @@ CSI Ps g Tab Clear (TBC).
Ps = 3 -> Clear All.
CSI Pm h Set Mode (SM).
- Ps = 2 -> Keyboard Action Mode (AM).
+ Ps = 2 -> Keyboard Action Mode (KAM).
Ps = 4 -> Insert Mode (IRM).
Ps = 1 2 -> Send/receive (SRM).
Ps = 2 0 -> Automatic Newline (LNM).
@@ -716,34 +741,38 @@ CSI ? Pm h
Ps = 4 -> Smooth (Slow) Scroll (DECSCLM), VT100.
Ps = 5 -> Reverse Video (DECSCNM), VT100.
Ps = 6 -> Origin Mode (DECOM), VT100.
- Ps = 7 -> Auto-wrap Mode (DECAWM), VT100.
- Ps = 8 -> Auto-repeat Keys (DECARM), VT100.
- Ps = 9 -> Send Mouse X & Y on button press. See the sec-
- tion Mouse Tracking. This is the X10 xterm mouse protocol.
+ Ps = 7 -> Auto-Wrap Mode (DECAWM), VT100.
+ Ps = 8 -> Auto-Repeat Keys (DECARM), VT100.
+ Ps = 9 -> Send Mouse X & Y on button press. See the
+ section Mouse Tracking. This is the X10 xterm mouse protocol.
Ps = 1 0 -> Show toolbar (rxvt).
- Ps = 1 2 -> Start Blinking Cursor (AT&T 610).
- Ps = 1 3 -> Start Blinking Cursor (set only via resource or
+ Ps = 1 2 -> Start blinking cursor (AT&T 610).
+ Ps = 1 3 -> Start blinking cursor (set only via resource or
menu).
- Ps = 1 4 -> Enable XOR of Blinking Cursor control sequence
+ Ps = 1 4 -> Enable XOR of blinking cursor control sequence
and menu.
- Ps = 1 8 -> Print form feed (DECPFF), VT220.
+ Ps = 1 8 -> Print Form Feed (DECPFF), VT220.
Ps = 1 9 -> Set print extent to full screen (DECPEX),
VT220.
- Ps = 2 5 -> Show Cursor (DECTCEM), VT220.
+ Ps = 2 5 -> Show cursor (DECTCEM), VT220.
Ps = 3 0 -> Show scrollbar (rxvt).
Ps = 3 5 -> Enable font-shifting functions (rxvt).
- Ps = 3 8 -> Enter Tektronix Mode (DECTEK), VT240, xterm.
- Ps = 4 0 -> Allow 80 -> 132 Mode, xterm.
+ Ps = 3 8 -> Enter Tektronix mode (DECTEK), VT240, xterm.
+ Ps = 4 0 -> Allow 80 -> 132 mode, xterm.
Ps = 4 1 -> more(1) fix (see curses resource).
Ps = 4 2 -> Enable National Replacement Character sets
(DECNRCM), VT220.
- Ps = 4 4 -> Turn On Margin Bell, xterm.
- Ps = 4 5 -> Reverse-wraparound Mode, xterm.
- Ps = 4 6 -> Start Logging, xterm. This is normally dis-
- abled by a compile-time option.
+ Ps = 4 3 -> Enable Graphics Expanded Print Mode (DECGEPM).
+ Ps = 4 4 -> Turn on margin bell, xterm.
+ Ps = 4 4 -> Enable Graphics Print Color Mode (DECGPCM).
+ Ps = 4 5 -> Reverse-wraparound mode, xterm.
+ Ps = 4 5 -> Enable Graphics Print ColorSpace (DECGPCS).
+ Ps = 4 6 -> Start logging, xterm. This is normally
+ disabled by a compile-time option.
Ps = 4 7 -> Use Alternate Screen Buffer, xterm. This may
be disabled by the titeInhibit resource.
- Ps = 6 6 -> Application keypad (DECNKM), VT320.
+ Ps = 4 7 -> Enable Graphics Rotated Print Mode (DECGRPM).
+ Ps = 6 6 -> Application keypad mode (DECNKM), VT320.
Ps = 6 7 -> Backarrow key sends backspace (DECBKM), VT340,
VT420. This sets the backarrowKey resource to "true".
Ps = 6 9 -> Enable left and right margin mode (DECLRMM),
@@ -769,11 +798,12 @@ CSI ? Pm h
Ps = 1 0 1 1 -> Scroll to bottom on key press (rxvt). This
sets the scrollKey resource to "true".
Ps = 1 0 1 5 -> Enable urxvt Mouse Mode.
+ Ps = 1 0 1 6 -> Enable SGR Mouse PixelMode, xterm.
Ps = 1 0 3 4 -> Interpret "meta" key, xterm. This sets the
eighth bit of keyboard input (and enables the eightBitInput
resource).
- Ps = 1 0 3 5 -> Enable special modifiers for Alt and Num-
- Lock keys, xterm. This enables the numLock resource.
+ Ps = 1 0 3 5 -> Enable special modifiers for Alt and
+ NumLock keys, xterm. This enables the numLock resource.
Ps = 1 0 3 6 -> Send ESC when Meta modifies a key, xterm.
This enables the metaSendsEscape resource.
Ps = 1 0 3 7 -> Send DEL from the editing-keypad Delete
@@ -789,18 +819,18 @@ CSI ? Pm h
resource.
Ps = 1 0 4 3 -> Enable raising of the window when Control-G
is received, xterm. This enables the popOnBell resource.
- Ps = 1 0 4 4 -> Reuse the most recent data copied to CLIP-
- BOARD, xterm. This enables the keepClipboard resource.
+ Ps = 1 0 4 4 -> Reuse the most recent data copied to
+ CLIPBOARD, xterm. This enables the keepClipboard resource.
Ps = 1 0 4 6 -> Enable switching to/from Alternate Screen
- Buffer, xterm. This works for terminfo-based systems, updat-
- ing the titeInhibit resource.
+ Buffer, xterm. This works for terminfo-based systems,
+ updating the titeInhibit resource.
Ps = 1 0 4 7 -> Use Alternate Screen Buffer, xterm. This
may be disabled by the titeInhibit resource.
Ps = 1 0 4 8 -> Save cursor as in DECSC, xterm. This may
be disabled by the titeInhibit resource.
- Ps = 1 0 4 9 -> Save cursor as in DECSC, xterm. After sav-
- ing the cursor, switch to the Alternate Screen Buffer, clear-
- ing it first. This may be disabled by the titeInhibit
+ Ps = 1 0 4 9 -> Save cursor as in DECSC, xterm. After
+ saving the cursor, switch to the Alternate Screen Buffer,
+ clearing it first. This may be disabled by the titeInhibit
resource. This control combines the effects of the 1 0 4 7
and 1 0 4 8 modes. Use this with terminfo-based applications
rather than the 4 7 mode.
@@ -814,14 +844,14 @@ CSI ? Pm h
Ps = 1 0 6 1 -> Set VT220 keyboard emulation, xterm.
Ps = 2 0 0 4 -> Set bracketed paste mode, xterm.
-CSI Pm i Media Copy (MC).
+CSI Ps i Media Copy (MC).
Ps = 0 -> Print screen (default).
Ps = 4 -> Turn off printer controller mode.
Ps = 5 -> Turn on printer controller mode.
Ps = 1 0 -> HTML screen dump, xterm.
Ps = 1 1 -> SVG screen dump, xterm.
-CSI ? Pm i
+CSI ? Ps i
Media Copy (MC), DEC-specific.
Ps = 1 -> Print line containing cursor.
Ps = 4 -> Turn off autoprint mode.
@@ -830,7 +860,7 @@ CSI ? Pm i
Ps = 1 1 -> Print all pages.
CSI Pm l Reset Mode (RM).
- Ps = 2 -> Keyboard Action Mode (AM).
+ Ps = 2 -> Keyboard Action Mode (KAM).
Ps = 4 -> Replace Mode (IRM).
Ps = 1 2 -> Send/receive (SRM).
Ps = 2 0 -> Normal Linefeed (LNM).
@@ -843,37 +873,42 @@ CSI ? Pm l
Ps = 4 -> Jump (Fast) Scroll (DECSCLM), VT100.
Ps = 5 -> Normal Video (DECSCNM), VT100.
Ps = 6 -> Normal Cursor Mode (DECOM), VT100.
- Ps = 7 -> No Auto-wrap Mode (DECAWM), VT100.
- Ps = 8 -> No Auto-repeat Keys (DECARM), VT100.
+ Ps = 7 -> No Auto-Wrap Mode (DECAWM), VT100.
+ Ps = 8 -> No Auto-Repeat Keys (DECARM), VT100.
Ps = 9 -> Don't send Mouse X & Y on button press, xterm.
Ps = 1 0 -> Hide toolbar (rxvt).
- Ps = 1 2 -> Stop Blinking Cursor (AT&T 610).
- Ps = 1 3 -> Disable Blinking Cursor (reset only via
+ Ps = 1 2 -> Stop blinking cursor (AT&T 610).
+ Ps = 1 3 -> Disable blinking cursor (reset only via
resource or menu).
- Ps = 1 4 -> Disable XOR of Blinking Cursor control sequence
+ Ps = 1 4 -> Disable XOR of blinking cursor control sequence
and menu.
- Ps = 1 8 -> Don't print form feed (DECPFF).
- Ps = 1 9 -> Limit print to scrolling region (DECPEX).
- Ps = 2 5 -> Hide Cursor (DECTCEM), VT220.
+ Ps = 1 8 -> Don't Print Form Feed (DECPFF), VT220.
+ Ps = 1 9 -> Limit print to scrolling region (DECPEX),
+ VT220.
+ Ps = 2 5 -> Hide cursor (DECTCEM), VT220.
Ps = 3 0 -> Don't show scrollbar (rxvt).
Ps = 3 5 -> Disable font-shifting functions (rxvt).
- Ps = 4 0 -> Disallow 80 -> 132 Mode, xterm.
+ Ps = 4 0 -> Disallow 80 -> 132 mode, xterm.
Ps = 4 1 -> No more(1) fix (see curses resource).
Ps = 4 2 -> Disable National Replacement Character sets
(DECNRCM), VT220.
- Ps = 4 4 -> Turn Off Margin Bell, xterm.
- Ps = 4 5 -> No Reverse-wraparound Mode, xterm.
- Ps = 4 6 -> Stop Logging, xterm. This is normally disabled
+ Ps = 4 3 -> Disable Graphics Expanded Print Mode (DECGEPM).
+ Ps = 4 4 -> Turn off margin bell, xterm.
+ Ps = 4 4 -> Disable Graphics Print Color Mode (DECGPCM).
+ Ps = 4 5 -> No Reverse-wraparound mode, xterm.
+ Ps = 4 5 -> Disable Graphics Print ColorSpace (DECGPCS).
+ Ps = 4 6 -> Stop logging, xterm. This is normally disabled
by a compile-time option.
Ps = 4 7 -> Use Normal Screen Buffer, xterm.
- Ps = 6 6 -> Numeric keypad (DECNKM), VT320.
+ Ps = 4 7 -> Disable Graphics Rotated Print Mode (DECGRPM).
+ Ps = 6 6 -> Numeric keypad mode (DECNKM), VT320.
Ps = 6 7 -> Backarrow key sends delete (DECBKM), VT340,
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 = 9 5 -> Clear screen when DECCOLM is set/reset (DEC-
- NCSM), VT510 and up.
+ 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
release. See the section Mouse Tracking.
Ps = 1 0 0 1 -> Don't use Hilite Mouse Tracking, xterm.
@@ -891,10 +926,11 @@ CSI ? Pm l
Ps = 1 0 1 1 -> Don't scroll to bottom on key press (rxvt).
This sets the scrollKey resource to "false".
Ps = 1 0 1 5 -> Disable urxvt Mouse Mode.
+ Ps = 1 0 1 6 -> Disable SGR Mouse Pixel-Mode, xterm.
Ps = 1 0 3 4 -> Don't interpret "meta" key, xterm. This
disables the eightBitInput resource.
- Ps = 1 0 3 5 -> Disable special modifiers for Alt and Num-
- Lock keys, xterm. This disables the numLock resource.
+ Ps = 1 0 3 5 -> Disable special modifiers for Alt and
+ NumLock keys, xterm. This disables the numLock resource.
Ps = 1 0 3 6 -> Don't send ESC when Meta modifies a key,
xterm. This disables the metaSendsEscape resource.
Ps = 1 0 3 7 -> Send VT220 Remove from the editing-keypad
@@ -911,10 +947,10 @@ CSI ? Pm l
Ps = 1 0 4 3 -> Disable raising of the window when Control-
G is received, xterm. This disables the popOnBell resource.
Ps = 1 0 4 6 -> Disable switching to/from Alternate Screen
- Buffer, xterm. This works for terminfo-based systems, updat-
- ing the titeInhibit resource. If currently using the Alter-
- nate Screen Buffer, xterm switches to the Normal Screen Buf-
- fer.
+ Buffer, xterm. This works for terminfo-based systems,
+ updating the titeInhibit resource. If currently using the
+ Alternate Screen Buffer, xterm switches to the Normal Screen
+ Buffer.
Ps = 1 0 4 7 -> Use Normal Screen Buffer, xterm. Clear the
screen first if in the Alternate Screen Buffer. This may be
disabled by the titeInhibit resource.
@@ -980,8 +1016,8 @@ CSI Pm m Character Attributes (SGR).
listed codes through 6 5 (skipping several toward the end of
the range). Most of the ECMA-48 codes not implemented in
xterm were never implemented in a hardware terminal. Several
- (such as 3 9 and 4 9 ) are either noted in ECMA-48 as imple-
- mentation defined, or described in vague terms.
+ (such as 3 9 and 4 9 ) are either noted in ECMA-48 as
+ implementation defined, or described in vague terms.
The successive editions of ECMA-48 give little attention to
changes from one edition to the next, except to comment on
@@ -998,8 +1034,8 @@ CSI Pm m Character Attributes (SGR).
known to differ from xterm; useful documentation on this
series became available too late to influence xterm.
- If 16-color support is compiled, the following aixterm con-
- trols apply. Assume that xterm's resources are set so that
+ If 16-color support is compiled, the following aixterm
+ controls apply. Assume that xterm's resources are set so that
the ISO color codes are the first 8 of a set of 16. Then the
aixterm colors are the bright versions of the ISO colors:
@@ -1030,48 +1066,58 @@ CSI Pm m Character Attributes (SGR).
is compiled, the following apply:
o All parameters are decimal integers.
o RGB values range from zero (0) to 255.
- o ISO-8613-6 has been interpreted in more than one way;
- xterm allows the semicolons separating the subparameters
- in this control to be replaced by colons (but after the
+ o The 88- and 256-color support uses subparameters described
+ in ISO-8613-6 for indexed color. ISO-8613-6 also mentions
+ direct color, using a similar scheme. xterm supports
+ that, too.
+ o xterm allows either colons (standard) or semicolons
+ (legacy) to separate the subparameters (but after the
first colon, colons must be used).
+ The indexed- and direct-color features are summarized in the
+ FAQ, which explains why semicolon is accepted as a
+ subparameter delimiter:
+
+ Can I set a color by its number?
+
+
These ISO-8613-6 controls (marked in ECMA-48 5th edition as
"reserved for future standardization") are supported by xterm:
- Pm = 3 8 ; 2 ; Pi ; Pr ; Pg ; Pb -> Set foreground color
+ Ps = 3 8 : 2 : Pi : Pr : Pg : Pb -> Set foreground color
using RGB values. If xterm is not compiled with direct-color
support, it uses the closest match in its palette for the
given RGB Pr/Pg/Pb. The color space identifier Pi is ignored.
- Pm = 3 8 ; 5 ; Ps -> Set foreground color to Ps, using
+ Ps = 3 8 : 5 : Ps -> Set foreground color to Ps, using
indexed color.
- Pm = 4 8 ; 2 ; Pi ; Pr ; Pg ; Pb -> Set background color
+ Ps = 4 8 : 2 : Pi : Pr : Pg : Pb -> Set background color
using RGB values. If xterm is not compiled with direct-color
support, it uses the closest match in its palette for the
given RGB Pr/Pg/Pb. The color space identifier Pi is ignored.
- Pm = 4 8 ; 5 ; Ps -> Set background color to Ps, using
+ Ps = 4 8 : 5 : Ps -> Set background color to Ps, using
indexed color.
This variation on ISO-8613-6 is supported for compatibility
with KDE konsole:
- Pm = 3 8 ; 2 ; Pr ; Pg ; Pb -> Set foreground color using
- RGB values. If xterm is not compiled with direct-color sup-
- port, it uses the closest match in its palette for the given
- RGB Pr/Pg/Pb.
- Pm = 4 8 ; 2 ; Pr ; Pg ; Pb -> Set background color using
- RGB values. If xterm is not compiled with direct-color sup-
- port, it uses the closest match in its palette for the given
- RGB Pr/Pg/Pb.
+ Ps = 3 8 ; 2 ; Pr ; Pg ; Pb -> Set foreground color using
+ RGB values. If xterm is not compiled with direct-color
+ support, it uses the closest match in its palette for the
+ given RGB Pr/Pg/Pb.
+ Ps = 4 8 ; 2 ; Pr ; Pg ; Pb -> Set background color using
+ RGB values. If xterm is not compiled with direct-color
+ support, it uses the closest match in its palette for the
+ given RGB Pr/Pg/Pb.
In each case, if xterm is compiled with direct-color support,
- and the resource directColor is true, then rather than choos-
- ing the closest match, xterm asks the X server to directly
- render a given color.
+ and the resource directColor is true, then rather than
+ choosing the closest match, xterm asks the X server to
+ directly render a given color.
CSI > Pp ; Pv m
CSI > Pp m
- Set/reset key modifier options, xterm. Set or reset resource-
- values used by xterm to decide whether to construct escape
- sequences holding information about the modifiers pressed with
- a given key.
+ Set/reset key modifier options (XTMODKEYS), xterm. Set or
+ reset resource-values used by xterm to decide whether to
+ construct escape sequences holding information about the
+ modifiers pressed with a given key.
The first parameter Pp identifies the resource to set/reset.
The second parameter Pv is the value to assign to the
@@ -1095,10 +1141,10 @@ CSI Ps n Device Status Report (DSR).
Ps = 6 -> Report Cursor Position (CPR) [row;column].
Result is CSI r ; c R
- Note: it is possible for this sequence to be sent by a func-
- tion key. For example, with the default keyboard configura-
- tion the shifted F1 key may send (with shift-, control-, alt-
- modifiers)
+ Note: it is possible for this sequence to be sent by a
+ function key. For example, with the default keyboard
+ configuration the shifted F1 key may send (with shift-,
+ control-, alt-modifiers)
CSI 1 ; 2 R , or
CSI 1 ; 5 R , or
@@ -1110,7 +1156,7 @@ CSI Ps n Device Status Report (DSR).
can change the form of the string sent from the modified F1
key.
-CSI > Pm n
+CSI > Ps n
Disable key modifier options, xterm. These modifiers may be
enabled via the CSI > Pm m sequence. This control sequence
corresponds to a resource value of "-1", which cannot be set
@@ -1126,8 +1172,8 @@ CSI > Pm n
If the parameter is omitted, modifyFunctionKeys is disabled.
When modifyFunctionKeys is disabled, xterm uses the modifier
keys to make an extended sequence of function keys rather than
- adding a parameter to each function key to denote the modi-
- fiers.
+ adding a parameter to each function key to denote the
+ modifiers.
CSI ? Ps n
Device Status Report (DSR, DEC-specific).
@@ -1155,12 +1201,12 @@ CSI ? Ps n
3 n Locator available, if compiled-in, or CSI ? 5 0 n No
Locator, if not.
Ps = 5 6 -> Report Locator type. The response is CSI ? 5 7
- ; 1 n Mouse, if compiled-in, or CSI ? 5 7 ; 0 n Cannot iden-
- tify, if not.
+ ; 1 n Mouse, if compiled-in, or CSI ? 5 7 ; 0 n Cannot
+ identify, if not.
Ps = 6 2 -> Report macro space (DECMSR). The response is
CSI Pn * { .
- Ps = 6 3 -> Report memory checksum (DECCKSR). The response
- is DCS Pt ! x x x x ST .
+ Ps = 6 3 -> Report memory checksum (DECCKSR), VT420 and up.
+ The response is DCS Pt ! ~ x x x x ST .
Pt is the request id (from an optional parameter to the
request).
The x's are hexadecimal digits 0-9 and A-F.
@@ -1171,8 +1217,9 @@ CSI ? Ps n
operation).
CSI > Ps p
- Set resource value pointerMode. This is used by xterm to
- decide whether to hide the pointer cursor as the user types.
+ Set resource value pointerMode (XTSMPOINTER), xterm. This is
+ used by xterm to decide whether to hide the pointer cursor as
+ the user types.
Valid values for the parameter:
Ps = 0 -> never hide the pointer.
@@ -1189,8 +1236,8 @@ CSI ! p Soft terminal reset (DECSTR), VT220 and up.
CSI Pl ; Pc " p
Set conformance level (DECSCL), VT220 and up.
- The first parameter selects the conformance level. Valid val-
- ues are:
+ The first parameter selects the conformance level. Valid
+ values are:
Pl = 6 1 -> level 1, e.g., VT100.
Pl = 6 2 -> level 2, e.g., VT200.
Pl = 6 3 -> level 3, e.g., VT300.
@@ -1209,7 +1256,7 @@ CSI Pl ; Pc " p
CSI Ps $ p
Request ANSI mode (DECRQM). For VT300 and up, reply DECRPM is
- CSI Ps; Pm$ y
+ CSI Ps; Pm $ y
where Ps is the mode number as in SM/RM, and Pm is the mode
value:
0 - not recognized
@@ -1221,18 +1268,23 @@ CSI Ps $ p
CSI ? Ps $ p
Request DEC private mode (DECRQM). For VT300 and up, reply
DECRPM is
- CSI ? Ps; Pm$ y
+ CSI ? Ps; Pm $ y
where Ps is the mode number as in DECSET/DECSET, Pm is the
mode value as in the ANSI DECRQM.
- Two private modes are read-only (i.e., 1 3 and 1 4 ), pro-
- vided only for reporting their values using this control
+ Two private modes are read-only (i.e., 1 3 and 1 4 ),
+ provided only for reporting their values using this control
sequence. They correspond to the resources cursorBlink and
cursorBlinkXOR.
CSI # p
CSI Pm # p
Push video attributes onto stack (XTPUSHSGR), xterm. This is
- an alias for CSI # { , used to work around language limita-
- tions of C#.
+ an alias for CSI # { , used to work around language
+ limitations of C#.
+
+CSI > Ps q
+ Ps = 0 -> Report xterm name and version (XTVERSION). The
+ response is a DSR sequence identifying the version: DCS > |
+ text ST
CSI Ps q Load LEDs (DECLL), VT100.
Ps = 0 -> Clear all LEDS (default).
@@ -1254,8 +1306,8 @@ CSI Ps SP q
Ps = 6 -> steady bar, xterm.
CSI Ps " q
- Select character protection attribute (DECSCA). Valid values
- for the parameter:
+ Select character protection attribute (DECSCA), VT220. Valid
+ values for the parameter:
Ps = 0 -> DECSED and DECSEL can erase (default).
Ps = 1 -> DECSED and DECSEL cannot erase.
Ps = 2 -> DECSED and DECSEL can erase.
@@ -1265,12 +1317,13 @@ CSI # q Pop video attributes from stack (XTPOPSGR), xterm. This is an
of C#.
CSI Ps ; Ps r
- Set Scrolling Region [top;bottom] (default = full size of win-
- dow) (DECSTBM), VT100.
+ Set Scrolling Region [top;bottom] (default = full size of
+ window) (DECSTBM), VT100.
CSI ? Pm r
- Restore DEC Private Mode Values. The value of Ps previously
- saved is restored. Ps values are the same as for DECSET.
+ Restore DEC Private Mode Values (XTRESTORE), xterm. The value
+ of Ps previously saved is restored. Ps values are the same as
+ for DECSET.
CSI Pt ; Pl ; Pb ; Pr ; Ps $ r
Change Attributes in Rectangular Area (DECCARA), VT400 and up.
@@ -1284,20 +1337,37 @@ CSI Pl ; Pr s
Set left and right margins (DECSLRM), VT420 and up. This is
available only when DECLRMM is enabled.
+CSI > Ps s
+ Set/reset shift-escape options (XTSHIFTESCAPE), xterm. This
+ corresponds to the shiftEscape resource.
+
+ Valid values for the parameter:
+ Ps = 0 -> allow shift-key to override mouse protocol.
+ Ps = 1 -> conditionally allow shift-key as modifier in
+ mouse protocol.
+
+ These resource values are disallowed in the control sequence:
+ Ps = 2 -> always allow shift-key as modifier in mouse
+ protocol.
+ Ps = 3 -> never allow shift-key as modifier in mouse
+ protocol.
+
+ If no parameter is given, xterm uses the default, which is 0 .
+
CSI ? Pm s
- Save DEC Private Mode Values. Ps values are the same as for
- DECSET.
+ Save DEC Private Mode Values (XTSAVE), xterm. Ps values are
+ the same as for DECSET.
CSI Ps ; Ps ; Ps t
- Window manipulation (from dtterm, as well as extensions by
- xterm). These controls may be disabled using the allowWin-
- dowOps resource.
+ Window manipulation (XTWINOPS), dtterm, extended by xterm.
+ These controls may be disabled using the allowWindowOps
+ resource.
xterm uses Extended Window Manager Hints (EWMH) to maximize
the window. Some window managers have incomplete support for
- EWMH. For instance, fvwm, flwm and quartz-wm advertise sup-
- port for maximizing windows horizontally or vertically, but in
- fact equate those to the maximize operation.
+ EWMH. For instance, fvwm, flwm and quartz-wm advertise
+ support for maximizing windows horizontally or vertically, but
+ in fact equate those to the maximize operation.
Valid values for the first (and any additional parameters)
are:
@@ -1306,10 +1376,10 @@ CSI Ps ; Ps ; Ps t
Ps = 3 ; x ; y -> Move window to [x, y].
Ps = 4 ; height ; width -> Resize the xterm window to
given height and width in pixels. Omitted parameters reuse
- the current height or width. Zero parameters use the dis-
- play's height or width.
- Ps = 5 -> Raise the xterm window to the front of the stack-
- ing order.
+ the current height or width. Zero parameters use the
+ display's height or width.
+ Ps = 5 -> Raise the xterm window to the front of the
+ stacking order.
Ps = 6 -> Lower the xterm window to the bottom of the
stacking order.
Ps = 7 -> Refresh the xterm window.
@@ -1339,8 +1409,8 @@ CSI Ps ; Ps ; Ps t
Result is CSI 4 ; height ; width t
Ps = 1 4 ; 2 -> Report xterm window size in pixels.
Normally xterm's window is larger than its text area, since it
- includes the frame (or decoration) applied by the window man-
- ager, as well as the area used by a scroll-bar.
+ includes the frame (or decoration) applied by the window
+ manager, as well as the area used by a scroll-bar.
Result is CSI 4 ; height ; width t
Ps = 1 5 -> Report size of the screen in pixels.
Result is CSI 5 ; height ; width t
@@ -1366,12 +1436,13 @@ CSI Ps ; Ps ; Ps t
CSI > Pm t
This xterm control sets one or more features of the title
- modes. Each parameter enables a single feature.
+ modes (XTSMTITLE), xterm. Each parameter enables a single
+ feature.
Ps = 0 -> Set window/icon labels using hexadecimal.
Ps = 1 -> Query window/icon labels using hexadecimal.
Ps = 2 -> Set window/icon labels using UTF-8.
- Ps = 3 -> Query window/icon labels using UTF-8. (See dis-
- cussion of Title Modes)
+ Ps = 3 -> Query window/icon labels using UTF-8. (See
+ discussion of Title Modes)
CSI Ps SP t
Set warning-bell volume (DECSWBV), VT520.
@@ -1422,9 +1493,9 @@ CSI Pt ; Pl ; Pb ; Pr ' w
rectangle, an outside rectangle event is generated and the
rectangle is disabled. Filter rectangles are always treated
as "one-shot" events. Any parameters that are omitted default
- to the current locator position. If all parameters are omit-
- ted, any locator motion will be reported. DECELR always can-
- cels any prevous rectangle definition.
+ to the current locator position. If all parameters are
+ omitted, any locator motion will be reported. DECELR always
+ cancels any previous rectangle definition.
CSI Ps x Request Terminal Parameters (DECREQTPARM).
if Ps is a "0" (default) or "1", and xterm is emulating VT100,
@@ -1511,9 +1582,9 @@ CSI Pm # {
Ps = 7 -> Inverse.
Ps = 8 -> Invisible.
Ps = 9 -> Crossed-out characters.
- Ps = 1 0 -> Foreground color.
- Ps = 1 1 -> Background color.
Ps = 2 1 -> Doubly-underlined.
+ Ps = 3 0 -> Foreground color.
+ Ps = 3 1 -> Background color.
If no parameters are given, all of the video attributes are
saved. The stack is limited to 10 levels.
@@ -1570,8 +1641,8 @@ CSI Ps ' |
Pb & 4 <- left button down.
Pb & 8 <- M4 button down.
The "row" and "column" parameters are the coordinates of the
- locator position in the xterm window, encoded as ASCII deci-
- mal.
+ locator position in the xterm window, encoded as ASCII
+ decimal.
The "page" parameter is not used by xterm.
CSI Ps * |
@@ -1581,10 +1652,10 @@ CSI # } Pop video attributes from stack (XTPOPSGR), xterm. Popping
restores the video-attributes which were saved using XTPUSHSGR
to their previous state.
-CSI Pm ' }
+CSI Ps ' }
Insert Ps Column(s) (default = 1) (DECIC), VT420 and up.
-CSI Pm ' ~
+CSI Ps ' ~
Delete Ps Column(s) (default = 1) (DECDC), VT420 and up.
@@ -1593,17 +1664,31 @@ Operating System Commands
OSC Ps ; Pt BEL
OSC Ps ; Pt ST
- Set Text Parameters. For colors and font, if Pt is a "?", the
- control sequence elicits a response which consists of the con-
- trol sequence which would set the corresponding value. The
- dtterm control sequences allow you to determine the icon name
- and window title.
+ Set Text Parameters. Some control sequences return
+ information:
+ o For colors and font, if Pt is a "?", the control sequence
+ elicits a response which consists of the control sequence
+ which would set the corresponding value.
+ o The dtterm control sequences allow you to determine the
+ icon name and window title.
+
+ XTerm accepts either BEL or ST for terminating OSC
+ sequences, and when returning information, uses the same
+ terminator used in a query. While the latter is preferred,
+ the former is supported for legacy applications:
+ o Although documented in the changes for X.V10R4 (December
+ 1986), BEL as a string terminator dates from X11R4
+ (December 1989).
+ o Since XFree86-3.1.2Ee (August 1996), xterm has accepted ST
+ (the documented string terminator in ECMA-48).
+
+ Ps specifies the type of operation to perform:
Ps = 0 -> Change Icon Name and Window Title to Pt.
Ps = 1 -> Change Icon Name to Pt.
Ps = 2 -> Change Window Title to Pt.
Ps = 3 -> Set X property on top-level window. Pt should be
- in the form "prop=value", or just "prop" to delete the prop-
- erty.
+ 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.
@@ -1618,10 +1703,11 @@ 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 specifica-
- tion as per XParseColor. Any number of c/spec pairs may be
- given. The special colors can also be set by adding the maxi-
- mum number of colors to these codes in an OSC 4 control:
+ 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:
Pc = 0 <- resource colorBD (BOLD).
Pc = 1 <- resource colorUL (UNDERLINE).
@@ -1635,17 +1721,18 @@ OSC Ps ; Pt ST
as OSC 1 0 6 .
The 10 colors (below) which may be set or queried using 1 0
- through 1 9 are denoted dynamic colors, since the correspond-
- ing control sequences were the first means for setting xterm's
- colors dynamically, i.e., after it was started. They are not
- the same as the ANSI colors (however, the dynamic text fore-
- ground and background colors are used when ANSI colors are
- reset using SGR 3 9 and 4 9 , respectively). These controls
- may be disabled using the allowColorOps resource. At least
- one parameter is expected for Pt. Each successive parameter
- changes the next color in the list. The value of Ps tells the
- starting point in the list. The colors are specified by name
- or RGB specification as per XParseColor.
+ through 1 9 are denoted dynamic colors, since the
+ corresponding control sequences were the first means for
+ setting xterm's colors dynamically, i.e., after it was
+ started. They are not the same as the ANSI colors (however,
+ the dynamic text foreground and background colors are used
+ when ANSI colors are reset using SGR 3 9 and 4 9 ,
+ respectively). These controls may be disabled using the
+ allowColorOps resource. At least one parameter is expected
+ for Pt. Each successive parameter changes the next color in
+ the list. The value of Ps tells the starting point in the
+ list. The colors are specified by name or RGB specification
+ as per XParseColor.
If a "?" is given rather than a name or RGB specification,
xterm replies with a control sequence of the same form which
@@ -1657,16 +1744,16 @@ OSC Ps ; Pt ST
Ps = 1 0 -> Change VT100 text foreground color to Pt.
Ps = 1 1 -> Change VT100 text background color to Pt.
Ps = 1 2 -> Change text cursor color to Pt.
- Ps = 1 3 -> Change mouse foreground color to Pt.
- Ps = 1 4 -> Change mouse background color to Pt.
+ Ps = 1 3 -> Change pointer foreground color to Pt.
+ Ps = 1 4 -> Change pointer background color to Pt.
Ps = 1 5 -> Change Tektronix foreground color to Pt.
Ps = 1 6 -> Change Tektronix background color to Pt.
Ps = 1 7 -> Change highlight background color to Pt.
Ps = 1 8 -> Change Tektronix cursor color to Pt.
Ps = 1 9 -> Change highlight foreground color to Pt.
- Ps = 4 6 -> Change Log File to Pt. This is normally dis-
- abled by a compile-time option.
+ Ps = 4 6 -> Change Log File to Pt. This is normally
+ disabled by a compile-time option.
Ps = 5 0 -> Set Font to Pt. These controls may be disabled
using the allowFontOps resource. If Pt begins with a "#",
@@ -1693,11 +1780,11 @@ OSC Ps ; Pt ST
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 clip-
- board, 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.
+ used to construct a list of selection parameters for
+ 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.
The second parameter, Pd, gives the selection data. Normally
this is a string encoded in base64 (RFC-4648). The data
@@ -1715,15 +1802,15 @@ OSC Ps ; Pt ST
Ps = 1 0 4 ; c -> Reset Color Number c. It is reset to the
color specified by the corresponding X resource. Any number
of c parameters may be given. These parameters correspond to
- the ANSI colors 0-7, their bright versions 8-15, and if sup-
- ported, the remainder of the 88-color or 256-color table. If
- no parameters are given, the entire table will be reset.
+ the ANSI colors 0-7, their bright versions 8-15, and if
+ supported, the remainder of the 88-color or 256-color table.
+ If no parameters are given, the entire table will be reset.
Ps = 1 0 5 ; c -> Reset Special Color Number c. It is reset
to the color specified by the corresponding X resource. Any
- number of c parameters may be given. These parameters corre-
- spond to the special colors which can be set using an OSC 5
- control (or by adding the maximum number of colors using an
+ number of c parameters may be given. These parameters
+ correspond to the special colors which can be set using an OSC
+ 5 control (or by adding the maximum number of colors using an
OSC 4 control).
Ps = 1 0 6 ; c ; f -> Enable/disable Special Color Number c.
@@ -1742,8 +1829,8 @@ OSC Ps ; Pt ST
Ps = 1 1 0 -> Reset VT100 text foreground color.
Ps = 1 1 1 -> Reset VT100 text background color.
Ps = 1 1 2 -> Reset text cursor color.
- Ps = 1 1 3 -> Reset mouse foreground color.
- Ps = 1 1 4 -> Reset mouse background color.
+ Ps = 1 1 3 -> Reset pointer foreground color.
+ Ps = 1 1 4 -> Reset pointer background color.
Ps = 1 1 5 -> Reset Tektronix foreground color.
Ps = 1 1 6 -> Reset Tektronix background color.
Ps = 1 1 7 -> Reset highlight color.
@@ -1805,14 +1892,16 @@ o When modifyOtherKeys is set to 2, all of the modifiers apply. For
The formatOtherKeys resource tells n to change the format of the escape
sequences sent when modifyOtherKeys applies. When modifyOtherKeys is
set to 1, for example alt-Tab sends CSI 9 ; 3 u (changing the order of
-parameters). One drawback to this format is that applications may con-
-fuse it with CSI u (restore-cursor).
+parameters). One drawback to this format is that applications may
+confuse it with CSI u (restore-cursor).
-The xterm FAQ section
+The xterm FAQ sections
How can my program distinguish control-I from tab?
-goes into greater detail on this topic.
+ XTerm - "Other" Modified Keys
+
+go into greater detail on this topic.
The table shows the result for a given character "x" with modifiers
according to the default translations with the resources set on or off.
@@ -1876,9 +1965,9 @@ also controlled by the DECCKM escape sequence:
---------+----------+-------------
-The application keypad transmits the following escape sequences depend-
-ing on the mode specified via the DECKPNM and DECKPAM escape sequences.
-Use the NumLock key to override the application mode.
+The application keypad transmits the following escape sequences
+depending on the mode specified via the DECKPNM and DECKPAM escape
+sequences. Use the NumLock key to override the application mode.
Not all keys are present on the Sun/PC keypad (e.g., PF1, Tab), but are
supported by the program.
@@ -1911,8 +2000,8 @@ supported by the program.
= (equal) | = | SS3 X | - | -
---------------+----------+-------------+----------+----------
-They also provide 12 function keys, as well as a few other special-pur-
-pose keys:
+They also provide 12 function keys, as well as a few other special-
+purpose keys:
Key Escape Sequence
---------+-----------------
@@ -1934,9 +2023,9 @@ pose keys:
Note that F1 through F4 are prefixed with SS3 , while the other keys are
prefixed with CSI . Older versions of xterm implement different escape
sequences for F1 through F4, with a CSI prefix. These can be activated
-by setting the oldXtermFKeys resource. However, since they do not cor-
-respond to any hardware terminal, they have been deprecated. (The DEC
-VT220 reserves F1 through F5 for local functions such as Setup).
+by setting the oldXtermFKeys resource. However, since they do not
+correspond to any hardware terminal, they have been deprecated. (The
+DEC VT220 reserves F1 through F5 for local functions such as Setup).
Key Escape Sequence
---------+-----------------
@@ -1949,8 +2038,8 @@ VT220 reserves F1 through F5 for local functions such as Setup).
In normal mode, i.e., a Sun/PC keyboard when the sunKeyboard resource is
false (and none of the other keyboard resources such as oldXtermFKeys
resource is set), xterm encodes function key modifiers as parameters
-appended before the final character of the control sequence. As a spe-
-cial case, the SS3 sent before F1 through F4 is altered to CSI when
+appended before the final character of the control sequence. As a
+special case, the SS3 sent before F1 through F4 is altered to CSI when
sending a function key modifier as a parameter.
Code Modifiers
@@ -1974,34 +2063,34 @@ sending a function key modifier as a parameter.
For example, shift-F5 would be sent as CSI 1 5 ; 2 ~
-If the alwaysUseMods resource is set, the Meta modifier also is recog-
-nized, making parameters 9 through 16.
+If the alwaysUseMods resource is set, the Meta modifier also is
+recognized, making parameters 9 through 16.
The codes used for the PC-style function keys were inspired by a feature
of the VT510, referred to in its reference manual as DECFNK. In the
-DECFNK scheme, codes 2-8 identify modifiers for function-keys and cur-
-sor-, editing-keypad keys. Unlike xterm, the VT510 limits the modifiers
-which can be used with cursor- and editing-keypad keys. Although the
-name "DECFNK" implies that it is a mode, the VT510 manual mentions it
-only as a feature, which (like xterm) interacts with the DECUDK feature.
-Unlike xterm, VT510/VT520 provide an extension to DECUDK (DECPFK and
-DECPAK) which apparently was the reason for the feature in those termi-
-nals, i.e., for identifying a programmable key rather than making it
-simple for applications to obtain modifier information. It is not
-described in the related VT520 manual. Neither manual was readily
-available at the time the feature was added to xterm.
+DECFNK scheme, codes 2-8 identify modifiers for function-keys and
+cursor-, editing-keypad keys. Unlike xterm, the VT510 limits the
+modifiers which can be used with cursor- and editing-keypad keys.
+Although the name "DECFNK" implies that it is a mode, the VT510 manual
+mentions it only as a feature, which (like xterm) interacts with the
+DECUDK feature. Unlike xterm, VT510/VT520 provide an extension to
+DECUDK (DECPFK and DECPAK) which apparently was the reason for the
+feature in those terminals, i.e., for identifying a programmable key
+rather than making it simple for applications to obtain modifier
+information. It is not described in the related VT520 manual. Neither
+manual was readily available at the time the feature was added to xterm.
On the other hand, the VT510 and VT520 reference manuals do document a
related feature. That is its emulation of the SCO console, which is
-similar to the "xterm-sco" terminal description. The SCO console func-
-tion-keys are less useful to applications developers than the approach
-used by xterm because
+similar to the "xterm-sco" terminal description. The SCO console
+function-keys are less useful to applications developers than the
+approach used by xterm because
-o the relationship between modifiers and the characters sent by func-
- tion-keys is not readily apparent, and
+o the relationship between modifiers and the characters sent by
+ function-keys is not readily apparent, and
-o the scheme is not extensible, i.e., it is an ad hoc assignment lim-
- ited to two modifiers (shift and control).
+o the scheme is not extensible, i.e., it is an ad hoc assignment
+ limited to two modifiers (shift and control).
VT220-Style Function Keys
@@ -2011,8 +2100,8 @@ sunKeyboard resource to true to force a Sun/PC keyboard to act like a
VT220 keyboard.
The VT102/VT220 application keypad transmits unique escape sequences in
-application mode, which are distinct from the cursor and scrolling key-
-pad:
+application mode, which are distinct from the cursor and scrolling
+keypad:
Key Numeric Application VT100?
-------------+----------+-------------+----------
@@ -2043,14 +2132,14 @@ pad:
-------------+----------+-------------+----------
-The VT100/VT220 keypad did not have all of those keys. They were imple-
-mented in xterm in X11R1 (1987), defining a mapping of all X11 keys
+The VT100/VT220 keypad did not have all of those keys. They were
+implemented in xterm in X11R1 (1987), defining a mapping of all X11 keys
which might be provided on a keypad. For instance, a Sun4/II type-4
keyboard provided "=" (equal), "/" (divide), and "*" (multiply).
While the VT420 provided the same keypad, the VT520 used a PC-keyboard.
-Because that keyboard's keypad lacks the "," (comma), it was not possi-
-ble to use EDT's delete-character function with the keypad. XTerm
+Because that keyboard's keypad lacks the "," (comma), it was not
+possible to use EDT's delete-character function with the keypad. XTerm
solves that problem for the VT220-keyboard configuration by mapping
Ctrl + to , and
@@ -2167,15 +2256,15 @@ or the corresponding ti and te for termcap. The titeInhibit resource
removes the ti and te strings from the TERMCAP string which is set in
the environment for some platforms. That is not done when xterm is
built with terminfo libraries because terminfo does not provide the
-whole text of the termcap data in one piece. It would not work for ter-
-minfo anyway, since terminfo data is not passed in environment vari-
-ables; setting an environment variable in this manner would have no
-effect on the application's ability to switch between Normal and Alter-
-nate Screen buffers. Instead, the newer private mode controls (such as
-1 0 4 9 ) for switching between Normal and Alternate Screen buffers sim-
-ply disable the switching. They add other features such as clearing the
-display for the same reason: to make the details of switching indepen-
-dent of the application that requests the switch.
+whole text of the termcap data in one piece. It would not work for
+terminfo anyway, since terminfo data is not passed in environment
+variables; setting an environment variable in this manner would have no
+effect on the application's ability to switch between Normal and
+Alternate Screen buffers. Instead, the newer private mode controls
+(such as 1 0 4 9 ) for switching between Normal and Alternate Screen
+buffers simply disable the switching. They add other features such as
+clearing the display for the same reason: to make the details of
+switching independent of the application that requests the switch.
Bracketed Paste Mode
@@ -2194,9 +2283,9 @@ The window- and icon-labels can be set or queried using control
sequences. As a VT220-emulator, xterm "should" limit the character
encoding for the corresponding strings to ISO-8859-1. Indeed, it used
to be the case (and was documented) that window titles had to be
-ISO-8859-1. This is no longer the case. However, there are many appli-
-cations which still assume that titles are set using ISO-8859-1. So
-that is the default behavior.
+ISO-8859-1. This is no longer the case. However, there are many
+applications which still assume that titles are set using ISO-8859-1.
+So that is the default behavior.
If xterm is running with UTF-8 encoding, it is possible to use window-
and icon-labels encoded using UTF-8. That is because the underlying X
@@ -2221,9 +2310,10 @@ value.
Mouse Tracking
-The VT widget can be set to send the mouse position and other informa-
-tion on button presses. These modes are typically used by editors and
-other full-screen applications that want to make use of the mouse.
+The VT widget can be set to send the mouse position and other
+information on button presses. These modes are typically used by
+editors and other full-screen applications that want to make use of the
+mouse.
There are two sets of mutually exclusive modes:
@@ -2248,11 +2338,12 @@ as follows:
#define SET_FOCUS_EVENT_MOUSE 1004
+ #define SET_ALTERNATE_SCROLL 1007
+
#define SET_EXT_MODE_MOUSE 1005
#define SET_SGR_EXT_MODE_MOUSE 1006
#define SET_URXVT_EXT_MODE_MOUSE 1015
-
- #define SET_ALTERNATE_SCROLL 1007
+ #define SET_PIXEL_POSITION_MOUSE 1016
The motion reporting modes are strictly xterm extensions, and are not
part of any standard, though they are analogous to the DEC VT200 DECELR
@@ -2286,17 +2377,30 @@ release. Modifier key (shift, ctrl, meta) information is also sent. It
is enabled by specifying parameter 1000 to DECSET. On button press or
release, xterm sends CSI M CbCxCy.
-o The low two bits of Cb encode button information: 0=MB1 pressed,
- 1=MB2 pressed, 2=MB3 pressed, 3=release.
+o The low two bits of Cb encode button information:
+
+ 0=MB1 pressed,
+ 1=MB2 pressed,
+ 2=MB3 pressed, and
+ 3=release.
o The next three bits encode the modifiers which were down when the
- button was pressed and are added together: 4=Shift, 8=Meta, 16=Con-
- trol. Note however that the shift and control bits are normally
- unavailable because xterm uses the control modifier with mouse for
- popup menus, and the shift modifier is used in the default transla-
- tions for button events. The Meta modifier recognized by xterm is
- the mod1 mask, and is not necessarily the "Meta" key (see
- xmodmap(1)).
+ button was pressed and are added together:
+
+ 4=Shift,
+ 8=Meta, and
+ 16=Control.
+
+ The shift and control modifiers are normally irrelevant because
+ xterm uses the control modifier with mouse for popup menus, and the
+ shift modifier is used in the default translations for button
+ events.
+
+ There is no predefined meta modifier. XTerm checks first if the
+ keysyms listed in the predefined modifiers include Meta_L or Meta_R.
+ If found, xterm uses that modifier for meta. Next, it tries Alt_L
+ or Alt_R. If none of those are found, xterm uses the mod1 modifier,
+ This is not necessarily the "Meta" key according to xmodmap(1).
o Cx and Cy are the x and y coordinates of the mouse event, encoded as
in X10 mode.
@@ -2307,26 +2411,36 @@ Wheel mice
Wheel mice may return buttons 4 and 5. Those buttons are represented by
the same event codes as buttons 1 and 2 respectively, except that 64 is
added to the event code. Release events for the wheel buttons are not
-reported. By default, the wheel mouse events are translated to scroll-
-back and scroll-forw actions. Those actions normally scroll the whole
-window, as if the scrollbar was used. However if Alternate Scroll mode
-is set, then cursor up/down controls are sent when the terminal is dis-
-playing the Alternate Screen Buffer. The initial state of Alternate
-Scroll mode is set using the alternateScroll resource.
+reported.
+
+By default, the wheel mouse events (buttons 4 and 5) are translated to
+scroll-back and scroll-forw actions, respectively. Those actions
+normally scroll the whole window, as if the scrollbar was used.
+
+However if Alternate Scroll mode is set, then cursor up/down controls
+are sent when the terminal is displaying the Alternate Screen Buffer.
+The initial state of Alternate Scroll mode is set using the
+alternateScroll resource.
Other buttons
+Some wheel mice can send additional button events, e.g., by tilting the
+scroll wheel left and right.
+
Additional buttons are encoded like the wheel mice,
o by adding 64 (for buttons 6 and 7), or
o by adding 128 (for buttons 8 through 11).
-Past button 11, the encoding is ambiguous because the same code may cor-
-respond to different button/modifier combinations. It is not possible
-to use these buttons (6-11) in xterm's translations resource because
-their names are not in the X Toolkit's symbol table.
+Past button 11, the encoding is ambiguous because the same code may
+correspond to different button/modifier combinations.
+
+It is not possible to use these buttons (6-11) in xterm's translations
+resource because their names are not in the X Toolkit's symbol table.
+However, applications can check for the reports, e.g., button 7 (left)
+and button 6 (right) with a Logitech mouse.
Highlight tracking
@@ -2335,23 +2449,23 @@ Mouse highlight tracking notifies a program of a button press, receives
a range of lines from the program, highlights the region covered by the
mouse within that range until button release, and then sends the program
the release coordinates. It is enabled by specifying parameter 1001 to
-DECSET. Highlighting is performed only for button 1, though other but-
-ton events can be received.
+DECSET. Highlighting is performed only for button 1, though other
+button events can be received.
Warning: this mode requires a cooperating program, else xterm will hang.
-On button press, the same information as for normal tracking is gener-
-ated; xterm then waits for the program to send mouse tracking informa-
-tion. All X events are ignored until the proper escape sequence is
-received from the pty:
+On button press, the same information as for normal tracking is
+generated; xterm then waits for the program to send mouse tracking
+information. All X events are ignored until the proper escape sequence
+is received from the pty:
CSI Ps ; Ps ; Ps ; Ps ; Ps T
The parameters are func, startx, starty, firstrow, and lastrow:
o func is non-zero to initiate highlight tracking and zero to abort.
-o startx and starty give the starting x and y location for the high-
- lighted region.
+o startx and starty give the starting x and y location for the
+ highlighted region.
o The ending location tracks the mouse, but will never be above row
firstrow and will always be above row lastrow. (The top of the
@@ -2370,8 +2484,8 @@ o otherwise:
The parameters are startx, starty, endx, endy, mousex, and mousey:
-o startx, starty, endx, and endy give the starting and ending charac-
- ter positions of the region.
+o startx, starty, endx, and endy give the starting and ending
+ character positions of the region.
o mousex and mousey give the location of the mouse at button up, which
may not be over a character.
@@ -2426,17 +2540,17 @@ UTF-8 (1005)
This enables UTF-8 encoding for Cx and Cy under all tracking
modes, expanding the maximum encodable position from 223 to
2015. For positions less than 95, the resulting output is
- identical under both modes. Under extended mouse mode, posi-
- tions greater than 95 generate "extra" bytes which will con-
- fuse applications which do not treat their input as a UTF-8
- stream. Likewise, Cb will be UTF-8 encoded, to reduce confu-
- sion with wheel mouse events.
+ identical under both modes. Under extended mouse mode,
+ positions greater than 95 generate "extra" bytes which will
+ confuse applications which do not treat their input as a UTF-8
+ stream. Likewise, Cb will be UTF-8 encoded, to reduce
+ confusion with wheel mouse events.
Under normal mouse mode, positions outside (160,94) result in
- byte pairs which can be interpreted as a single UTF-8 charac-
- ter; applications which do treat their input as UTF-8 will
- almost certainly be confused unless extended mouse mode is
- active.
+ byte pairs which can be interpreted as a single UTF-8
+ character; applications which do treat their input as UTF-8
+ will almost certainly be confused unless extended mouse mode
+ is active.
This scheme has the drawback that the encoded coordinates will
not pass through luit(1) unchanged, e.g., for locales using
@@ -2465,8 +2579,8 @@ SGR (1006)
released.
The highlight tracking responses are also modified to an SGR-
- like format, using the same SGR-style scheme and button-encod-
- ings.
+ like format, using the same SGR-style scheme and button-
+ encodings.
URXVT (1015)
The normal mouse response is altered to use
@@ -2482,17 +2596,21 @@ URXVT (1015)
However, CSI M can be mistaken for DL (delete lines), while
the highlight tracking CSI T can be mistaken for SD (scroll
- down), and the Window manipulation controls. For these rea-
- sons, the 1015 control is not recommended; it is not an
- improvement over 1005.
+ down), and the Window manipulation controls. For these
+ reasons, the 1015 control is not recommended; it is not an
+ improvement over 1006.
+
+SGR-Pixels (1016)
+ Use the same mouse response format as the 1006 control, but
+ report position in pixels rather than character cells.
Sixel Graphics
If xterm is configured as VT240, VT241, VT330, VT340 or VT382 using the
-decTerminalID resource, it supports Sixel Graphics controls, a palleted
-bitmap graphics system using sets of six vertical pixels as the basic
-element.
+decTerminalID or decGraphicsID resource, it supports Sixel Graphics
+controls, a palleted bitmap graphics system using sets of six vertical
+pixels as the basic element.
CSI Ps c Send Device Attributes (Primary DA), xterm. xterm responds to
Send Device Attributes (Primary DA) with these additional
@@ -2526,8 +2644,8 @@ DCS Pa ; Pb ; Ph q Ps..Ps ST
ReGIS Graphics
If xterm is configured as VT125, VT240, VT241, VT330 or VT340 using the
-decTerminalID resource, it supports Remote Graphic Instruction Set, a
-graphics description language.
+decTerminalID or decGraphicsID resource, it supports Remote Graphic
+Instruction Set, a graphics description language.
CSI Ps c Send Device Attributes (Primary DA), DEC graphics terminals,
xterm. xterm responds to Send Device Attributes (Primary DA)
@@ -2547,8 +2665,8 @@ DCS Pm p Pr..Pr ST
Graphics Programming
Chapter 1 Introduction to ReGIS
- The ReGIS data device control string has one positional param-
- eter with four possible values:
+ The ReGIS data device control string has one positional
+ parameter with four possible values:
Pm = 0 -> resume command, use fullscreen mode.
Pm = 1 -> start new command, use fullscreen mode.
Pm = 2 -> resume command, use command display mode.
@@ -2565,11 +2683,11 @@ plotting modes but does describe the commands to switch modes.
Some of the sequences are specific to xterm. The Tektronix emulation
was added in X10R4 (1986). The VT240, introduced two years earlier,
-also supported Tektronix 4010/4014. Unlike xterm, the VT240 documenta-
-tion implies (there is an obvious error in section 6.9 "Entering and
-Exiting 4010/4014 Mode") that exiting back to ANSI mode is done by
-resetting private mode 3 8 (DECTEK) rather than ESC ETX . A real Tek-
-tronix 4014 would not respond to either.
+also supported Tektronix 4010/4014. Unlike xterm, the VT240
+documentation implies (there is an obvious error in section 6.9
+"Entering and Exiting 4010/4014 Mode") that exiting back to ANSI mode is
+done by resetting private mode 3 8 (DECTEK) rather than ESC ETX . A
+real Tektronix 4014 would not respond to either.
BEL Bell (Ctrl-G).
@@ -2617,8 +2735,8 @@ OSC Ps ; Pt BEL
Ps = 0 -> Change Icon Name and Window Title to Pt.
Ps = 1 -> Change Icon Name to Pt.
Ps = 2 -> Change Window Title to Pt.
- Ps = 4 6 -> Change Log File to Pt. This is normally dis-
- abled by a compile-time option.
+ Ps = 4 6 -> Change Log File to Pt. This is normally
+ disabled by a compile-time option.
ESC ` Normal Z Axis and Normal (solid) Vectors.
@@ -2703,24 +2821,24 @@ Further reading
Technical manuals
-Manuals for hardware terminals are more readily available than simi-
-larly-detailed documentation for terminal emulators such as aixterm,
+Manuals for hardware terminals are more readily available than
+similarly-detailed documentation for terminal emulators such as aixterm,
shelltool, dtterm.
However long, the technical manuals have problems:
-o DEC's manuals did not provide a comprehensive comparison of the fea-
- tures in different model.
+o DEC's manuals did not provide a comprehensive comparison of the
+ features in different model.
Peter Sichel's Host Interface Functions Checklist spreadsheet is
useful for noting which model introduced a given feature (although
there are a few apparent errors such as the DECRQSS feature cited
for VT320 whereas the technical manual omits it).
-o Sometimes the manuals disagree. For example, DEC's standard docu-
- ment (DEC STD 070) for terminals says that DECSCL performs a soft
- reset (DECSTR), while the VT420 manual says it does a hard reset
- (RIS).
+o Sometimes the manuals disagree. For example, DEC's standard
+ document (DEC STD 070) for terminals says that DECSCL performs a
+ soft reset (DECSTR), while the VT420 manual says it does a hard
+ reset (RIS).
o Sometimes the manuals are simply incorrect. For example, testing a
DEC VT420 in 1996 showed that the documented code for a valid or
@@ -2733,10 +2851,10 @@ o Sometimes the manuals are simply incorrect. For example, testing a
o Not all details are clear even in DEC STD 070 (which is more than
twice the length of the VT520 programmer's reference manual, and
- almost three times longer than the VT420 reference manual). How-
- ever, as an internal standards document, DEC STD 070 is more likely
- to describe the actual behavior of DEC's terminals than the more
- polished user's guides.
+ almost three times longer than the VT420 reference manual).
+ However, as an internal standards document, DEC STD 070 is more
+ likely to describe the actual behavior of DEC's terminals than the
+ more polished user's guides.
That said, here are technical manuals which have been used in developing
xterm. Not all were available initially. In August 1996 for instance,
@@ -2804,18 +2922,18 @@ o 4014 and 4014-1 Computer Display Terminal
Standards
The DEC terminal family (VT100 through VT525) is upward-compatible,
-using standards plus extensions, e.g., "private modes". Not all com-
-monly-used features are standard. For example, scrolling regions are
+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.
Again, it is possible to find discrepancies in the standards:
o The printed ECMA-48 5th edition (1991) and the first PDF produced
for that edition (April 1998) state that SD (scroll down) ends with
- 05/14, i.e., ^ , which disagrees with DEC's VT420 hardware implemen-
- tation and DEC's manuals which use 05/04 T . (A few other terminals
- such as AT&T 5620 and IBM 5151 also used 05/04, but the documenta-
- tion and dates are lacking).
+ 05/14, i.e., ^ , which disagrees with DEC's VT420 hardware
+ implementation and DEC's manuals which use 05/04 T . (A few other
+ terminals such as AT&T 5620 and IBM 5151 also used 05/04, 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
@@ -2845,44 +2963,44 @@ o DEC STD 070 Video Systems Reference Manual.
Miscellaneous
-A few hardware terminals survived into the 1990s only as terminal emula-
-tors. Documentation for these and other terminal emulators which have
-influenced xterm are generally available only in less-accessible and
-less-detailed manual pages.
+A few hardware terminals survived into the 1990s only as terminal
+emulators. Documentation for these and other terminal emulators which
+have influenced xterm are generally available only in less-accessible
+and less-detailed manual pages.
o XTerm supports control sequences for manipulating its window which
- were implemented by Sun's shelltool program. This was part of Sun-
- View (SunOS 3.0, 1986). The change-notes for xterm's resize program
- in X10.4 (1986) mention its use of these "Sun tty emulation escape
- sequences" for resizing the window. The X10.4 xterm program recog-
- nized these sequences for resizing the terminal, except for the
- iconfig/deiconfy pair. SunView also introduced the SIGWINCH signal,
- used by the X10.4 xterm and mentioned in its CHANGES file:
+ were implemented by Sun's shelltool program. This was part of
+ SunView (SunOS 3.0, 1986). The change-notes for xterm's resize
+ program in X10.4 (1986) mention its use of these "Sun tty emulation
+ escape sequences" for resizing the window. The X10.4 xterm program
+ recognized these sequences for resizing the terminal, except for the
+ iconify/deiconify pair. SunView also introduced the SIGWINCH
+ signal, used by the X10.4 xterm and mentioned in its CHANGES file:
The window size is passed to the operating system via TIOCSWINSZ
(4.3) or TIOCSSIZE (sun). A SIGWINCH signal is sent if the
vtXXX window is resized.
While support for the Sun control-sequences remained in resize, the
- next release of xterm (X11R1 in 1987) omitted the code for inter-
- preting them.
+ next release of xterm (X11R1 in 1987) omitted the code for
+ interpreting them.
Later, the SunView program was adapted for the OPEN LOOK environment
introduced 1988-1990.
Still later, in 1995, OPEN LOOK was abandoned in favor of CDE. The
- CDE terminal emulator dtterm implemented those controls, with a cou-
- ple of additions.
+ CDE terminal emulator dtterm implemented those controls, with a
+ couple of additions.
Starting in July 1996, xterm re-implemented those control sequences
(based on the dtterm manual pages) and further extended the group of
window controls.
- There were two sets of controls (CSI Ps[ ; Pm ; Pm]t , and OSC
- PstextST ) implemented by shelltool, documented in appendix E of
- both PHIGS Programming Manual (1992), and the unpublished X Window
- System User's Guide (OPEN LOOK Edition) (1995). The CDE program
- kept those, and added a few new ones.
+ There were two sets of controls (CSI Ps [ ; Pm ; Pm ] t , and OSC Ps
+ text ST ) implemented by shelltool, documented in appendix E of both
+ PHIGS Programming Manual (1992), and the unpublished X Window System
+ User's Guide (OPEN LOOK Edition) (1995). The CDE program kept
+ those, and added a few new ones.
Code Sun CDE XTerm Description
-----------------------------------------------------------------
@@ -2926,19 +3044,19 @@ 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 sav-
- ing/restoring "DEC Private Mode Values" may appear to be related
- (since the "save" controls both end with s ), but that is coinciden-
- tal. The latter was introduced in X10.4:
+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:
- Most Dec Private mode settings can be save away internally using
- \E[?ns, where n is the same number to set or reset the Dec
+ 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 example, to turn off saving of
lines, but restore whatever the original state was on exit.
- while the SCOSC/SCORC pair was added in 1995 by XFree86 (and docu-
- mented long afterwards).
+ while the SCOSC/SCORC pair was added in 1995 by XFree86 (and
+ documented long afterwards).
o The aixterm manual page gives the format of the control sequence for
foreground and background colors 8-15, but does not specify what
diff --git a/app/xterm/df-install.in b/app/xterm/df-install.in
index b7b947381..e99fb2539 100644
--- a/app/xterm/df-install.in
+++ b/app/xterm/df-install.in
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: df-install.in,v 1.15 2018/04/30 23:29:27 tom Exp $
+# $XTermId: df-install.in,v 1.17 2020/08/18 20:44:00 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2011-2012,2018 by Thomas E. Dickey
+# Copyright 2011-2018,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -37,6 +37,12 @@
#
# Parameters are passed to the desktop-file-install program. The last
# parameter is the name of the ".desktop" file to install.
+
+failed() {
+ echo "? $*" >&2
+ exit 1
+}
+
OPTS=
if test $# != 0
@@ -51,12 +57,20 @@ then
shift 1
fi
+TOOL=desktop-file-install
+
CDPATH=:
export CDPATH
while test $# != 0
do
case .$1 in #(vi
+ .DESTDIR=*) #(vi
+ if test "$1" != "DESTDIR="
+ then
+ DESTDIR=`echo "$1" | sed -e 's,^DESTDIR=,,'`
+ fi
+ ;;
*.desktop) #(vi
if test $# = 1
then
@@ -65,6 +79,10 @@ do
OPTS="$OPTS $1"
fi
;;
+ .--dir=*) #(vi
+ OPTS="$OPTS $1"
+ DESTDIR=
+ ;;
*)
OPTS="$OPTS $1"
;;
@@ -72,17 +90,51 @@ do
shift 1
done
+# If DESTDIR is set (either as an environment variable, or command-line
+# parameter), attempt to determine the full pathname (needed by the installer)
+# to tell it to use the alternate location. Because the installer has no
+# useful options for this purpose, we search along the path to find the tool,
+# and from that get the prefix, and assume that was the extent of customization
+# when the tool was configured/installed.
+if test -n "$DESTDIR"
+then
+ if test -d "$DESTDIR"
+ then
+ prefix=
+
+ save_IFS="$IFS"
+ IFS=':'
+ for P in $PATH
+ do
+ test -z "$P" && P=.
+ if test -f "$P/$TOOL"
+ then
+ prefix=`echo "$P" | sed -e 's,/[^/]*$,,'`
+ break
+ fi
+ done
+ IFS="$save_IFS"
+
+ test -z "$prefix" && failed "could not find $TOOL in PATH"
+
+ TARGET="${DESTDIR}${prefix}/share/applications"
+ mkdir -p "$TARGET"
+
+ OPTS="$OPTS --dir=${TARGET}"
+ else
+ failed "DESTDIR is not a directory: $DESTDIR"
+ fi
+fi
+
MY_TEMP=tempdir$$
rm -rf $MY_TEMP
if test -z "$OLD_FILE"
then
- echo "? not found: $OLD_FILE"
- exit 1
+ failed "not found: $OLD_FILE"
elif ! mkdir $MY_TEMP
then
- echo "? cannot mkdir: $MY_TEMP"
- exit 1
+ failed "cannot mkdir: $MY_TEMP"
fi
# The newer dfi whines about deprecation of encoding, but no release provides
@@ -94,19 +146,19 @@ else
NO_ENCODING="Encoding"
fi
-NEW_FILE=`basename $OLD_FILE`
+NEW_FILE=`basename "$OLD_FILE"`
sed \
- -e '/^Encoding=/s%Encoding%'$NO_ENCODING'%' \
- -e '/^[^#]*Icon=/s%=.*%='$ICON_NAME'%' \
+ -e '/^Encoding=/s%Encoding%'"$NO_ENCODING"'%' \
+ -e '/^[^#]*Icon=/s%=.*%='"$ICON_NAME"'%' \
-e '/^[^#]*Category=/s%=.*%=@DESKTOP_CATEGORY@%' \
-e '/^[^#]*Categories=/s%=.*%=@DESKTOP_CATEGORY@%' \
- -e '/^[^#]/s%xterm%'$APP_NAME'%g' \
+ -e '/^[^#]/s%xterm%'"$APP_NAME"'%g' \
-e '/^[^#]/s%XTerm%@APP_CLASS@%g' \
- $OLD_FILE >$MY_TEMP/$NEW_FILE
-diff -u $OLD_FILE $MY_TEMP/$NEW_FILE
-cd $MY_TEMP
+ "$OLD_FILE" >"$MY_TEMP/$NEW_FILE"
+diff -u "$OLD_FILE" "$MY_TEMP/$NEW_FILE"
+cd $MY_TEMP || exit 1
-desktop-file-install $OPTS $NEW_FILE
+"$TOOL" $OPTS "$NEW_FILE"
cd ..
rm -rf $MY_TEMP
diff --git a/app/xterm/doublechr.c b/app/xterm/doublechr.c
index a60f5bdf0..a802e32b9 100644
--- a/app/xterm/doublechr.c
+++ b/app/xterm/doublechr.c
@@ -1,7 +1,7 @@
-/* $XTermId: doublechr.c,v 1.101 2019/09/12 00:24:07 tom Exp $ */
+/* $XTermId: doublechr.c,v 1.104 2020/12/10 19:43:26 tom Exp $ */
/*
- * Copyright 1997-2018,2019 by Thomas E. Dickey
+ * Copyright 1997-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -68,7 +68,7 @@ repaint_line(XtermWidget xw, unsigned newChrSet)
TRACE(("repaint_line(%2d,%2d) (%s -> %s)\n", currow, screen->cur_col,
visibleDblChrset(oldChrSet),
visibleDblChrset(newChrSet)));
- HideCursor();
+ HideCursor(xw);
/* If switching from single-width, keep the cursor in the visible part
* of the line.
@@ -105,11 +105,12 @@ repaint_line(XtermWidget xw, unsigned newChrSet)
* we'll be using it for the top (true) or bottom (false) of the line.
*/
void
-xterm_DECDHL(XtermWidget xw GCC_UNUSED, Bool top)
+xterm_DECDHL(XtermWidget xw, Bool top)
{
#if OPT_DEC_CHRSET
repaint_line(xw, (unsigned) (top ? CSET_DHL_TOP : CSET_DHL_BOT));
#else
+ (void) xw;
(void) top;
#endif
}
@@ -118,10 +119,12 @@ xterm_DECDHL(XtermWidget xw GCC_UNUSED, Bool top)
* Set the line to single-width characters (the normal state).
*/
void
-xterm_DECSWL(XtermWidget xw GCC_UNUSED)
+xterm_DECSWL(XtermWidget xw)
{
#if OPT_DEC_CHRSET
repaint_line(xw, CSET_SWL);
+#else
+ (void) xw;
#endif
}
@@ -129,10 +132,12 @@ xterm_DECSWL(XtermWidget xw GCC_UNUSED)
* Set the line to double-width characters
*/
void
-xterm_DECDWL(XtermWidget xw GCC_UNUSED)
+xterm_DECDWL(XtermWidget xw)
{
#if OPT_DEC_CHRSET
repaint_line(xw, CSET_DWL);
+#else
+ (void) xw;
#endif
}
@@ -179,10 +184,7 @@ discard_font(XtermWidget xw, int n)
data->chrset = 0;
data->flags = 0;
- if (data->fn != 0) {
- free(data->fn);
- data->fn = 0;
- }
+ FreeAndNull(data->fn);
xtermCloseFont(xw, data);
screen->fonts_used -= 1;
@@ -274,8 +276,7 @@ xterm_DoubleGC(XTermDraw * params, GC old_gc, int *inxp)
if (!strcmp(data->fn, name)
&& data->fs != 0) {
found = True;
- free(name);
- name = NULL;
+ FreeAndNull(name);
} else {
discard_font(params->xw, n);
}
diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c
index e10ba9aae..19abe4bde 100644
--- a/app/xterm/fontutils.c
+++ b/app/xterm/fontutils.c
@@ -1,7 +1,7 @@
-/* $XTermId: fontutils.c,v 1.659 2019/11/13 23:00:11 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.697 2020/11/08 20:06:01 tom Exp $ */
/*
- * Copyright 1998-2018,2019 by Thomas E. Dickey
+ * Copyright 1998-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -54,7 +54,7 @@
#define NoFontWarning(data) (data)->warn = fwAlways
#define SetFontWidth(screen,dst,src) (dst)->f_width = (src)
-#define SetFontHeight(screen,dst,src) (dst)->f_height = dimRound((screen)->scale_height * (float) (src))
+#define SetFontHeight(screen,dst,src) (dst)->f_height = dimRound((double)((screen)->scale_height * (float) (src)))
/* from X11/Xlibint.h - not all vendors install this file */
#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
@@ -122,6 +122,32 @@ typedef struct {
char *end;
} FontNameProperties;
+#if OPT_WIDE_CHARS && (OPT_RENDERFONT || (OPT_TRACE > 1))
+#define MY_UCS(code,high,wide,name) { code, high, wide, #name }
+static const struct {
+ unsigned code, high, wide;
+ const char *name;
+} unicode_boxes[] = {
+
+ MY_UCS(0x2500, 0, 1, box drawings light horizontal),
+ MY_UCS(0x2502, 1, 0, box drawings light vertical),
+ MY_UCS(0x250c, 2, 2, box drawings light down and right),
+ MY_UCS(0x2510, 2, 2, box drawings light down and left),
+ MY_UCS(0x2514, 2, 2, box drawings light up and right),
+ MY_UCS(0x2518, 2, 2, box drawings light up and left),
+ MY_UCS(0x251c, 1, 2, box drawings light vertical and right),
+ MY_UCS(0x2524, 1, 2, box drawings light vertical and left),
+ MY_UCS(0x252c, 2, 1, box drawings light down and horizontal),
+ MY_UCS(0x2534, 2, 1, box drawings light up and horizontal),
+ MY_UCS(0x253c, 1, 1, box drawings light vertical and horizontal),
+ {
+ 0, 0, 0, NULL
+ }
+};
+
+#undef MY_UCS
+#endif /* OPT_WIDE_CHARS */
+
#if OPT_LOAD_VTFONTS || OPT_WIDE_CHARS
static Boolean merge_sublist(char ***, char **);
#endif
@@ -360,15 +386,13 @@ get_font_name_props(Display *dpy, XFontStruct *fs, char **result)
/*
* XGetAtomName allocates memory - don't leak
*/
- if (last_name != 0)
- XFree(last_name);
+ XFree(last_name);
last_name = name;
if (result != 0) {
if (!check_fontname(name))
return 0;
- if (*result != 0)
- free(*result);
+ free(*result);
*result = x_strdup(name);
}
@@ -552,7 +576,7 @@ open_italic_font(XtermWidget xw, int n, FontNameProperties *fp, XTermFonts * dat
#if OPT_REPORT_FONTS
if (resource.reportFonts) {
printf("opened italic version of %s:\n\t%s\n",
- whichFontEnum(n),
+ whichFontEnum((VTFontEnum) n),
name);
}
#endif
@@ -979,6 +1003,23 @@ cannotFont(XtermWidget xw, const char *who, const char *tag, const char *name)
name);
}
+#if OPT_RENDERFONT
+static void
+noUsableXft(XtermWidget xw, const char *name)
+{
+ switch (xw->misc.fontWarnings) {
+ case fwNever:
+ return;
+ case fwResource:
+ /* these combinations of wide/bold/italic are all "derived" */
+ return;
+ case fwAlways:
+ break;
+ }
+ xtermWarning("did not find a usable %s TrueType font\n", name);
+}
+#endif
+
/*
* Open the given font and verify that it is non-empty. Return a null on
* failure.
@@ -1093,10 +1134,7 @@ xtermFreeFontInfo(XTermFonts * target)
{
target->chrset = 0;
target->flags = 0;
- if (target->fn != 0) {
- free(target->fn);
- target->fn = 0;
- }
+ FreeAndNull(target->fn);
target->fs = 0;
}
@@ -1744,8 +1782,7 @@ xtermLoadFont(XtermWidget xw,
return 1;
bad:
- if (tmpname)
- free(tmpname);
+ free(tmpname);
#if OPT_RENDERFONT
if ((fontnum == fontMenu_fontsel) && (fontnum != screen->menu_font_number)) {
@@ -2014,6 +2051,7 @@ xtermLoadVTFonts(XtermWidget xw, String myName, String myClass)
Sres(XtNfont4, XtCFont4, MenuFontName(fontMenu_font4), NULL),
Sres(XtNfont5, XtCFont5, MenuFontName(fontMenu_font5), NULL),
Sres(XtNfont6, XtCFont6, MenuFontName(fontMenu_font6), NULL),
+ Sres(XtNfont7, XtCFont7, MenuFontName(fontMenu_font7), NULL),
};
Cardinal n, m;
Bool status = True;
@@ -2207,8 +2245,8 @@ xtermLoadDefaultFonts(XtermWidget xw)
void
HandleLoadVTFonts(Widget w,
XEvent *event GCC_UNUSED,
- String *params GCC_UNUSED,
- Cardinal *param_count GCC_UNUSED)
+ String *params,
+ Cardinal *param_count)
{
XtermWidget xw;
@@ -2285,7 +2323,7 @@ xtermSetCursorBox(TScreen *screen)
#if OPT_RENDERFONT
#define CACHE_XFT(dst,src) if (src.font != 0) {\
- int err = checkXft(xw, &(dst[fontnum]), &src);\
+ int err = checkXftWidth(xw, &(dst[fontnum]), &src);\
TRACE(("Xft metrics %s[%d] = %d (%d,%d)%s advance %d, actual %d%s%s\n",\
#dst,\
fontnum,\
@@ -2353,7 +2391,18 @@ xtermXftLastChar(XftFont *xft)
}
#endif /* OPT_REPORT_FONTS */
-#if OPT_TRACE > 1
+#if OPT_TRACE
+
+#if !OPT_WIDE_CHARS
+static Char *
+convertToUTF8(Char *buffer, int c)
+{
+ buffer[0] = (Char) c;
+ buffer[1] = 0;
+ return buffer;
+}
+#endif
+
static void
dumpXft(XtermWidget xw, XTermXftFonts *data)
{
@@ -2364,25 +2413,54 @@ dumpXft(XtermWidget xw, XTermXftFonts *data)
FcChar32 c;
FcChar32 first = xtermXftFirstChar(xft);
FcChar32 last = xtermXftLastChar(xft);
+ FcChar32 dump;
unsigned count = 0;
- unsigned outside = 0;
+ unsigned too_high = 0;
+ unsigned too_wide = 0;
+ Boolean skip = False;
TRACE(("dumpXft {{\n"));
- TRACE((" data range %#6x..%#6x\n", first, last));
+ TRACE(("\tdata range U+%04X..U+%04X\n", first, last));
+ TRACE(("\tcode\tcells\tdimensions\n"));
+#if OPT_TRACE < 2
+ dump = 255;
+#else
+ dump = last;
+#endif
for (c = first; c <= last; ++c) {
if (FcCharSetHasChar(xft->charset, c)) {
int width = CharWidth(c);
XGlyphInfo extents;
+ Boolean big_x;
+ Boolean big_y;
XftTextExtents32(XtDisplay(xw), xft, &c, 1, &extents);
- TRACE(("%#6x %2d %.1f\n", c, width,
- ((double) extents.width) / win->f_width));
- if (extents.width > win->f_width)
- ++outside;
+ big_x = (extents.width > win->f_width);
+ big_y = (extents.height > win->f_height);
+
+ if (c <= dump) {
+ Char buffer[80];
+
+ *convertToUTF8(buffer, c) = '\0';
+ TRACE(("%s%s\tU+%04X\t%d\t%.1f x %.1f\t%s\n",
+ (big_y ? "y" : ""),
+ (big_x ? "x" : ""),
+ c, width,
+ ((double) extents.height) / win->f_height,
+ ((double) extents.width) / win->f_width,
+ buffer));
+ } else if (!skip) {
+ skip = True;
+ TRACE(("\t...skipping\n"));
+ }
+ if (big_y)
+ ++too_high;
+ if (big_x)
+ ++too_wide;
++count;
}
}
- TRACE(("}} %u total, %u outside\n", count, outside));
+ TRACE(("}} %u total, %u too-high, %u too-wide\n", count, too_high, too_wide));
}
#define DUMP_XFT(xw, data) dumpXft(xw, data)
#else
@@ -2419,50 +2497,123 @@ isBogusXft(XftFont *font)
}
#endif
+#if OPT_BOX_CHARS
+static void
+setBrokenBoxChars(XtermWidget xw, Bool state)
+{
+ TRACE(("setBrokenBoxChars %s\n", BtoS(state)));
+ term->work.broken_box_chars = (Boolean) state;
+ TScreenOf(xw)->broken_box_chars = (Boolean) state;
+ update_font_boxchars();
+}
+
+#else
+#define setBrokenBoxChars(xw, state) /* nothing */
+#endif
+
+static Boolean
+checkedXftWidth(Display *dpy,
+ XTermXftFonts *source,
+ unsigned limit,
+ Dimension *width,
+ FcChar32 c)
+{
+ Boolean result = False;
+
+ if (FcCharSetHasChar(source->font->charset, c)) {
+ XGlyphInfo extents;
+
+ result = True;
+ XftTextExtents32(dpy, source->font, &c, 1, &extents);
+ if (*width < extents.width && extents.width <= limit) {
+ *width = extents.width;
+ }
+ }
+ return result;
+}
+
static int
-checkXft(XtermWidget xw, XTermXftFonts *target, XTermXftFonts *source)
+checkXftWidth(XtermWidget xw, XTermXftFonts *target, XTermXftFonts *source)
{
FcChar32 c;
+ FcChar32 last = xtermXftLastChar(source->font);
+ Dimension limit = (Dimension) source->font->max_advance_width;
Dimension width = 0;
+ Dimension width2 = 0;
int failed = 0;
+#if OPT_WIDE_CHARS
+ Cardinal n;
+#endif
target->font = source->font;
target->pattern = source->pattern;
target->map.min_width = 0;
- target->map.max_width = (Dimension) source->font->max_advance_width;
+ target->map.max_width = limit;
+
+#if OPT_WIDE_CHARS
+ /*
+ * Check if the line-drawing characters are all provided in the font.
+ * If so, take that into account for the cell-widths.
+ */
+ for (n = 0; n < XtNumber(unicode_boxes) - 1; ++n) {
+ if (!checkedXftWidth(XtDisplay(xw),
+ source,
+ limit,
+ &width2, unicode_boxes[n].code)) {
+ width2 = 0;
+ TRACE(("font omits U+%04X line-drawing symbol\n",
+ unicode_boxes[n].code));
+ break;
+ }
+ }
+#else
+ (void) width2;
+#endif
+
+ if (width2 > 0) {
+ Dimension check = (Dimension) (limit + 1) / 2;
+ TRACE(("font provides VT100-style line-drawing\n"));
+ /*
+ * The "VT100 line-drawing" characters happen to be all "ambiguous
+ * width" in Unicode's scheme. That means that they could be twice as
+ * wide as the Latin-1 characters.
+ */
+#define FC_ERR(n) (1.2 * (n))
+ if (width2 > FC_ERR(check)) {
+ TRACE(("line-drawing characters appear to be double-width (ignore)\n"));
+ setBrokenBoxChars(xw, True);
+ } else if (width2 > width) {
+ width = width2;
+ }
+ } else {
+ TRACE(("font does NOT provide VT100-style line-drawing\n"));
+ setBrokenBoxChars(xw, True);
+ }
/*
- * For each ASCII or ISO-8859-1 printable code, ask what its width is.
- * Given the maximum width for those, we have a reasonable estimate of
- * the single-column width.
+ * For each printable code, ask what its width is. Given the maximum width
+ * for those, we have a reasonable estimate of the single-column width.
*
* Ignore control characters - their extent information is misleading.
*/
- for (c = 32; c < 255; ++c) {
- if (c >= 127 && c <= 159)
+ for (c = 32; c < 256; ++c) {
+ if (CharWidth(c) <= 0)
continue;
if (FcCharSetHasChar(source->font->charset, c)) {
- XGlyphInfo extents;
-
- XftTextExtents32(XtDisplay(xw), source->font, &c, 1, &extents);
- if (width >= extents.width)
- continue;
- if (extents.width >= (3 * target->map.max_width)) {
- width = 0; /* metrics are bogus - give up */
- break;
- }
- if (extents.width > target->map.max_width)
- continue;
- width = extents.width;
+ (void) checkedXftWidth(XtDisplay(xw),
+ source,
+ target->map.max_width,
+ &width, c);
}
}
+
/*
* Sometimes someone uses a symbol font which has no useful ASCII or
* Latin-1 characters. Allow that, in case they did it intentionally.
*/
if (width == 0) {
failed = 1;
- if (xtermXftLastChar(source->font) >= 256) {
+ if (last >= 256) {
width = target->map.max_width;
}
}
@@ -2647,32 +2798,6 @@ dimSquareRoot(double value)
}
#endif
-#if OPT_WIDE_CHARS
-#define MY_UCS(code,high,wide,name) { code, high, wide, #name }
-static const struct {
- unsigned code, high, wide;
- const char *name;
-} unicode_boxes[] = {
-
- MY_UCS(0x2500, 0, 1, box drawings light horizontal),
- MY_UCS(0x2502, 1, 0, box drawings light vertical),
- MY_UCS(0x250c, 2, 2, box drawings light down and right),
- MY_UCS(0x2510, 2, 2, box drawings light down and left),
- MY_UCS(0x2514, 2, 2, box drawings light up and right),
- MY_UCS(0x2518, 2, 2, box drawings light up and left),
- MY_UCS(0x251c, 1, 2, box drawings light vertical and right),
- MY_UCS(0x2524, 1, 2, box drawings light vertical and left),
- MY_UCS(0x252c, 2, 1, box drawings light down and horizontal),
- MY_UCS(0x2534, 2, 1, box drawings light up and horizontal),
- MY_UCS(0x253c, 1, 1, box drawings light vertical and horizontal),
- {
- 0, 0, 0, NULL
- }
-};
-
-#undef MY_UCS
-#endif /* OPT_WIDE_CHARS */
-
#ifdef DEBUG_XFT
static void
trace_xft_glyph(TScreen *screen, XftFont *font, FT_Face face, int code, const char *name)
@@ -2702,20 +2827,7 @@ trace_xft_line_drawing(TScreen *screen, XftFont *font, FT_Face face)
#else
#define trace_xft_line_drawing(screen, font, face) /* nothing */
#endif
-#endif
-
-#if OPT_BOX_CHARS
-static void
-setBrokenBoxChars(XtermWidget xw, Bool state)
-{
- term->work.broken_box_chars = (Boolean) state;
- TScreenOf(xw)->broken_box_chars = (Boolean) state;
- update_font_boxchars();
-}
-
-#else
-#define setBrokenBoxChars(xw, state) /* nothing */
-#endif
+#endif /* DEBUG_XFT */
/*
* Check if the line-drawing characters do not fill the bounding box. If so,
@@ -2773,7 +2885,8 @@ linedrawing_gaps(XtermWidget xw, XftFont *font)
unsigned xx = 0;
switch (g->bitmap.pixel_mode) {
case FT_PIXEL_MODE_MONO:
- xx = (data[k + (c / 8)] >> (c % 8)) & 1;
+ xx = (unsigned) ((data[k + (c / 8)]
+ >> (c % 8)) & 1);
break;
case FT_PIXEL_MODE_GRAY:
xx = data[k + c];
@@ -2801,14 +2914,25 @@ linedrawing_gaps(XtermWidget xw, XftFont *font)
if (broken)
break;
}
+ /*
+ * The factor of two accounts for line-drawing that goes through
+ * the middle of a cell, possibly leaving half of the cell unused.
+ * A horizontal line has to extend the full width of the cell.
+ */
switch (unicode_boxes[n].high) {
case 1:
if ((unsigned) g->bitmap.rows < (unsigned) FontHeight(screen)) {
+ TRACE(("...bitmap is shorter than full-cell (%u vs %u)\n",
+ (unsigned) g->bitmap.rows,
+ (unsigned) FontHeight(screen)));
broken = True;
}
break;
case 2:
if ((unsigned) (g->bitmap.rows * 2) < (unsigned) FontHeight(screen)) {
+ TRACE(("...bitmap is too short for half-cell (%u vs %u)\n",
+ (unsigned) (g->bitmap.rows * 2),
+ (unsigned) FontHeight(screen)));
broken = True;
}
break;
@@ -2816,11 +2940,17 @@ linedrawing_gaps(XtermWidget xw, XftFont *font)
switch (unicode_boxes[n].wide) {
case 1:
if ((unsigned) g->bitmap.width < (unsigned) FontWidth(screen)) {
+ TRACE(("...bitmap is narrower than full-cell (%u vs %u)\n",
+ (unsigned) g->bitmap.width,
+ (unsigned) FontWidth(screen)));
broken = True;
}
break;
case 2:
if ((unsigned) (g->bitmap.width * 2) < (unsigned) FontWidth(screen)) {
+ TRACE(("...bitmap is too narrow for half-cell (%u vs %u)\n",
+ (unsigned) (g->bitmap.width * 2),
+ (unsigned) FontWidth(screen)));
broken = True;
}
break;
@@ -2836,7 +2966,7 @@ linedrawing_gaps(XtermWidget xw, XftFont *font)
#endif
if (broken) {
- TRACE(("Xft line-drawing would leave gaps\n"));
+ TRACE(("Xft line-drawing would not work\n"));
setBrokenBoxChars(xw, True);
}
}
@@ -2911,9 +3041,28 @@ setRenderFontsize(XtermWidget xw, VTwin *win, XftFont *font, const char *tag)
height = font->height;
ascent = font->ascent;
descent = font->descent;
- if (height < ascent + descent) {
- TRACE(("...increase height from %d to %d\n", height, ascent + descent));
+ if (screen->force_xft_height && height < ascent + descent) {
+ TRACE(("...height is less than ascent + descent (%u vs %u)\n",
+ height, ascent + descent));
+ if ((ascent + descent) > (height + 1)) {
+ /* this happens less than 10% of the time */
+ --ascent;
+ --descent;
+ TRACE(("...decrement both ascent and descent before retry\n"));
+ } else if (ascent > descent) {
+ /* this is the usual case */
+ --ascent;
+ TRACE(("...decrement ascent before retry\n"));
+ } else {
+ /* this could happen, though rare... */
+ --descent;
+ TRACE(("...decrement descent before retry\n"));
+ }
height = ascent + descent;
+ font->ascent = ascent;
+ font->descent = descent;
+ TRACE(("...updated height %d vs %d (ascent %d, descent %d)\n",
+ height, ascent + descent, ascent, descent));
}
if (is_double_width_font_xft(screen->display, font)) {
TRACE(("...reduce width from %d to %d\n", width, width >> 1));
@@ -2995,7 +3144,7 @@ xtermCloseXft(TScreen *screen, XTermXftFonts *pub)
* Get the faceName/faceNameDoublesize resource setting.
*/
String
-getFaceName(XtermWidget xw, Bool wideName GCC_UNUSED)
+getFaceName(XtermWidget xw, Bool wideName)
{
#if OPT_RENDERWIDE
String result = (wideName
@@ -3003,6 +3152,7 @@ getFaceName(XtermWidget xw, Bool wideName GCC_UNUSED)
: CurrentXftFont(xw));
#else
String result = CurrentXftFont(xw);
+ (void) wideName;
#endif
return x_nonempty(result);
}
@@ -3083,7 +3233,7 @@ xtermComputeFontInfo(XtermWidget xw,
TRACE(("Using FontConfig %d\n", FC_VERSION));
fillInFaceSize(xw, fontnum);
- face_size = xw->misc.face_size[fontnum];
+ face_size = (double) xw->misc.face_size[fontnum];
/*
* By observation (there is no documentation), XftPatternBuild is
@@ -3176,7 +3326,7 @@ xtermComputeFontInfo(XtermWidget xw,
CACHE_XFT(screen->renderFontBold, bold);
if (norm.font != 0 && !bold.font) {
- xtermWarning("did not find a usable bold TrueType font\n");
+ noUsableXft(xw, "bold");
XftPatternDestroy(bold.pattern);
bold.pattern = XftPatternDuplicate(pat);
XftPatternBuild(bold.pattern,
@@ -3189,7 +3339,7 @@ xtermComputeFontInfo(XtermWidget xw,
#if HAVE_ITALICS
CACHE_XFT(screen->renderFontItal, ital);
if (norm.font != 0 && !ital.font) {
- xtermWarning("did not find a usable italic TrueType font\n");
+ noUsableXft(xw, "italic");
XftPatternDestroy(ital.pattern);
ital.pattern = XftPatternDuplicate(pat);
XftPatternBuild(ital.pattern,
@@ -3201,7 +3351,7 @@ xtermComputeFontInfo(XtermWidget xw,
}
CACHE_XFT(screen->renderFontBtal, btal);
if (norm.font != 0 && !btal.font) {
- xtermWarning("did not find a usable bold italic TrueType font\n");
+ noUsableXft(xw, "bold italic");
XftPatternDestroy(btal.pattern);
btal.pattern = XftPatternDuplicate(pat);
XftPatternBuild(btal.pattern,
@@ -3270,7 +3420,7 @@ xtermComputeFontInfo(XtermWidget xw,
}
CACHE_XFT(screen->renderWideBtal, wbtal);
if (!wbtal.font) {
- xtermWarning("did not find a usable wide bold italic TrueType font\n");
+ noUsableXft(xw, "wide bold");
XftPatternDestroy(wbtal.pattern);
wbtal.pattern = XftPatternDuplicate(pat);
XftPatternBuild(wbtal.pattern,
@@ -3287,7 +3437,7 @@ xtermComputeFontInfo(XtermWidget xw,
CACHE_XFT(screen->renderWideBold, wbold);
if (wnorm.font != 0 && !wbold.font) {
- xtermWarning("did not find a usable wide-bold TrueType font\n");
+ noUsableXft(xw, "wide-bold");
XftPatternDestroy(wbold.pattern);
wbold.pattern = XftPatternDuplicate(pat);
XftPatternBuild(bold.pattern,
@@ -3300,7 +3450,7 @@ xtermComputeFontInfo(XtermWidget xw,
CACHE_XFT(screen->renderWideItal, wital);
if (wnorm.font != 0 && !wital.font) {
- xtermWarning("did not find a usable wide-italic TrueType font\n");
+ noUsableXft(xw, "wide-italic");
XftPatternDestroy(wital.pattern);
wital.pattern = XftPatternDuplicate(pat);
XftPatternBuild(wital.pattern,
@@ -3488,8 +3638,9 @@ xtermMissingChar(unsigned ch, XTermFonts * font)
/*
* ...since we'll scale the values anyway.
*/
-#define SCALED_X(n) ((int)(n) * (((int) font_width) - 1)) / (BOX_WIDE-1)
-#define SCALED_Y(n) ((int)(n) * (((int) font_height) - 1)) / (BOX_HIGH-1)
+#define Scale_XY(n,d,f) ((int)(n) * ((int)(f))) / (d)
+#define SCALED_X(n) Scale_XY(n, BOX_WIDE, font_width)
+#define SCALED_Y(n) Scale_XY(n, BOX_HIGH, font_height)
#define SCALE_X(n) n = SCALED_X(n)
#define SCALE_Y(n) n = SCALED_Y(n)
@@ -3505,7 +3656,8 @@ xtermDrawBoxChar(XTermDraw * params,
GC gc,
int x,
int y,
- int cells)
+ int cells,
+ Bool xftords)
{
TScreen *screen = TScreenOf(params->xw);
/* *INDENT-OFF* */
@@ -3644,43 +3796,46 @@ xtermDrawBoxChar(XTermDraw * params,
SEG( 0, MID_HIGH, CHR_WIDE, MID_HIGH),
-1
};
- /* *INDENT-ON* */
- static const short *lines[] =
+ static const struct {
+ const int mode; /* 1=y, 2=x, 3=both */
+ const short *data;
+ } lines[] =
{
- 0, /* 00 (unused) */
- 0, /* 01 diamond */
- 0, /* 02 box */
- glyph_ht, /* 03 HT */
- glyph_ff, /* 04 FF */
- 0, /* 05 CR */
- glyph_lf, /* 06 LF */
- 0, /* 07 degrees (small circle) */
- plus_or_minus, /* 08 */
- glyph_nl, /* 09 */
- glyph_vt, /* 0A */
- lower_right_corner, /* 0B */
- upper_right_corner, /* 0C */
- upper_left_corner, /* 0D */
- lower_left_corner, /* 0E */
- cross, /* 0F */
- scan_line_1, /* 10 */
- scan_line_3, /* 11 */
- scan_line_7, /* 12 */
- scan_line_9, /* 13 */
- horizontal_line, /* 14 */
- left_tee, /* 15 */
- right_tee, /* 16 */
- bottom_tee, /* 17 */
- top_tee, /* 18 */
- vertical_line, /* 19 */
- less_than_or_equal, /* 1A */
- greater_than_or_equal, /* 1B */
- greek_pi, /* 1C */
- not_equal_to, /* 1D */
- 0, /* 1E LB */
- 0, /* 1F bullet */
+ { 0, 0 }, /* 00 (unused) */
+ { 0, 0 }, /* 01 diamond */
+ { 0, 0 }, /* 02 box */
+ { 0, glyph_ht }, /* 03 HT */
+ { 0, glyph_ff }, /* 04 FF */
+ { 0, 0 }, /* 05 CR */
+ { 0, glyph_lf }, /* 06 LF */
+ { 0, 0 }, /* 07 degrees (small circle) */
+ { 3, plus_or_minus }, /* 08 */
+ { 0, glyph_nl }, /* 09 */
+ { 0, glyph_vt }, /* 0A */
+ { 3, lower_right_corner }, /* 0B */
+ { 3, upper_right_corner }, /* 0C */
+ { 3, upper_left_corner }, /* 0D */
+ { 3, lower_left_corner }, /* 0E */
+ { 3, cross }, /* 0F */
+ { 2, scan_line_1 }, /* 10 */
+ { 2, scan_line_3 }, /* 11 */
+ { 2, scan_line_7 }, /* 12 */
+ { 2, scan_line_9 }, /* 13 */
+ { 2, horizontal_line }, /* 14 */
+ { 3, left_tee }, /* 15 */
+ { 3, right_tee }, /* 16 */
+ { 3, bottom_tee }, /* 17 */
+ { 3, top_tee }, /* 18 */
+ { 1, vertical_line }, /* 19 */
+ { 0, less_than_or_equal }, /* 1A */
+ { 0, greater_than_or_equal }, /* 1B */
+ { 0, greek_pi }, /* 1C */
+ { 0, not_equal_to }, /* 1D */
+ { 0, 0 }, /* 1E LB */
+ { 0, 0 }, /* 1F bullet */
};
+ /* *INDENT-ON* */
GC gc2;
CgsEnum cgsId = (ch == 2) ? gcDots : gcLine;
@@ -3732,9 +3887,21 @@ xtermDrawBoxChar(XTermDraw * params,
}
#endif
- TRACE(("DRAW_BOX(%d) cell %dx%d at %d,%d%s\n",
+ /*
+ * Line-drawing characters show use the full (scaled) cellsize, while
+ * other characters should be shifted to center them vertically.
+ */
+ if (!xftords) {
+ if ((ch < XtNumber(lines)) && (lines[ch].mode & 3) != 0) {
+ font_height = (unsigned) ((float) font_height * screen->scale_height);
+ } else {
+ y += ScaleShift(screen);
+ }
+ }
+
+ TRACE(("DRAW_BOX(%02X) cell %dx%d at %d,%d%s\n",
ch, font_height, font_width, y, x,
- (ch >= (sizeof(lines) / sizeof(lines[0]))
+ ((ch >= XtNumber(lines))
? "-BAD"
: "")));
@@ -3792,8 +3959,8 @@ xtermDrawBoxChar(XTermDraw * params,
points[4].y = points[0].y;
for (n = 0; n < npoints; ++n) {
- points[n].x = (short) SCALED_X(points[n].x);
- points[n].y = (short) SCALED_Y(points[n].y);
+ points[n].x = (short) (SCALED_X(points[n].x));
+ points[n].y = (short) (SCALED_Y(points[n].y));
points[n].x = (short) (points[n].x + x);
points[n].y = (short) (points[n].y + y);
}
@@ -3830,8 +3997,8 @@ xtermDrawBoxChar(XTermDraw * params,
x + x_coord, y + y_coord, width, width,
0,
360 * 64);
- } else if (ch < (sizeof(lines) / sizeof(lines[0]))
- && (p = lines[ch]) != 0) {
+ } else if (ch < XtNumber(lines)
+ && (p = lines[ch].data) != 0) {
int coord[4];
int n = 0;
while (*p >= 0) {
@@ -3911,6 +4078,10 @@ markXftOpened(XtermWidget xw, XTermXftFonts *which, Cardinal n, unsigned wc)
}
}
+/*
+ * Check if the given character has a glyph known to Xft. If it is missing,
+ * try first to replace the font with a fallback that provides the glyph.
+ */
XftFont *
findXftGlyph(XtermWidget xw, XftFont *given, unsigned wc)
{
@@ -3957,7 +4128,7 @@ findXftGlyph(XtermWidget xw, XftFont *given, unsigned wc)
+ table[n]));
if (check[fontnum].font == given) {
which = &check[fontnum];
- tag = whichFontEnum(n);
+ tag = whichFontEnum((VTFontEnum) n);
break;
}
}
@@ -4067,8 +4238,7 @@ findXftGlyph(XtermWidget xw, XftFont *given, unsigned wc)
/*
* Check if the given character has a glyph known to Xft. If it is missing,
- * try first to replace the font with a fallback that provides the glyph.
- * If it is unable to provide a font containing the glyph, return true.
+ * return true.
*
* see xc/lib/Xft/xftglyphs.c
*/
@@ -4099,6 +4269,8 @@ unsigned
ucs2dec(TScreen *screen, unsigned ch)
{
unsigned result = ch;
+
+ (void) screen;
if ((ch > 127)
&& (ch != UCS_REPL)) {
#if OPT_VT52_MODE
@@ -4156,6 +4328,8 @@ unsigned
dec2ucs(TScreen *screen, unsigned ch)
{
unsigned result = ch;
+
+ (void) screen;
if (xtermIsDecGraphic(ch)) {
#if OPT_VT52_MODE
if (screen != 0 && !(screen->vtXX_level)) {
@@ -4281,7 +4455,7 @@ defaultFaceSize(void)
float value;
if (sscanf(DEFFACESIZE, "%f", &value) == 1)
- result = value;
+ result = (double) value;
else
result = 14.0;
return result;
@@ -4291,7 +4465,7 @@ static void
fillInFaceSize(XtermWidget xw, int fontnum)
{
TScreen *screen = TScreenOf(xw);
- double face_size = xw->misc.face_size[fontnum];
+ double face_size = (double) xw->misc.face_size[fontnum];
if (face_size <= 0.0) {
#if OPT_SHIFT_FONTS
@@ -4317,13 +4491,13 @@ fillInFaceSize(XtermWidget xw, int fontnum)
den = 1;
ratio = dimSquareRoot((double) num / (double) den);
- face_size = (ratio * xw->misc.face_size[0]);
+ face_size = (ratio * (double) xw->misc.face_size[0]);
TRACE(("scaled[%d] using %3ld/%ld = %.2f -> %f\n",
fontnum, num, den, ratio, face_size));
} else
#endif
{
-#define LikeBitmap(s) (((s) / 78.0) * xw->misc.face_size[fontMenu_default])
+#define LikeBitmap(s) (((s) / 78.0) * (double) xw->misc.face_size[fontMenu_default])
switch (fontnum) {
case fontMenu_font1:
face_size = LikeBitmap(2.0);
@@ -4346,6 +4520,9 @@ fillInFaceSize(XtermWidget xw, int fontnum)
case fontMenu_font6:
face_size = LikeBitmap(200.0);
break;
+ case fontMenu_font7:
+ face_size = LikeBitmap(240.0);
+ break;
}
TRACE(("builtin[%d] -> %f\n", fontnum, face_size));
}
@@ -4371,7 +4548,7 @@ useFaceSizes(XtermWidget xw)
int n;
for (n = 0; n < NMENU_RENDERFONTS; ++n) {
- if (xw->misc.face_size[n] <= 0.0) {
+ if (xw->misc.face_size[n] <= 0.0f) {
nonzero = False;
break;
}
@@ -4486,7 +4663,7 @@ lookupRelativeFontSize(XtermWidget xw, int old, int relative)
/* ARGSUSED */
void
-HandleLargerFont(Widget w GCC_UNUSED,
+HandleLargerFont(Widget w,
XEvent *event GCC_UNUSED,
String *params GCC_UNUSED,
Cardinal *param_count GCC_UNUSED)
@@ -4511,7 +4688,7 @@ HandleLargerFont(Widget w GCC_UNUSED,
/* ARGSUSED */
void
-HandleSmallerFont(Widget w GCC_UNUSED,
+HandleSmallerFont(Widget w,
XEvent *event GCC_UNUSED,
String *params GCC_UNUSED,
Cardinal *param_count GCC_UNUSED)
@@ -4564,6 +4741,9 @@ xtermGetFont(const char *param)
case '6':
fontnum = fontMenu_font6;
break;
+ case '7':
+ fontnum = fontMenu_font7;
+ break;
case 'e':
case 'E':
fontnum = fontMenu_fontescape;
@@ -4581,7 +4761,7 @@ xtermGetFont(const char *param)
/* ARGSUSED */
void
-HandleSetFont(Widget w GCC_UNUSED,
+HandleSetFont(Widget w,
XEvent *event GCC_UNUSED,
String *params,
Cardinal *param_count)
@@ -4608,6 +4788,7 @@ HandleSetFont(Widget w GCC_UNUSED,
case fontMenu_font4: /* FALLTHRU */
case fontMenu_font5: /* FALLTHRU */
case fontMenu_font6: /* FALLTHRU */
+ case fontMenu_font7: /* FALLTHRU */
break;
case fontMenu_fontescape:
#if OPT_WIDE_CHARS
@@ -4689,7 +4870,7 @@ SetVTFont(XtermWidget xw,
if (myfonts.field != 0) { \
if (screen->menu_font_names[which][name] == 0 \
|| strcmp(screen->menu_font_names[which][name], myfonts.field)) { \
- TRACE(("updating menu_font_names[%d][" #name "] to %s\n", \
+ TRACE(("updating menu_font_names[%d][" #name "] to \"%s\"\n", \
which, myfonts.field)); \
FREE_STRING(screen->menu_font_names[which][name]); \
screen->menu_font_names[which][name] = x_strdup(myfonts.field); \
@@ -5177,7 +5358,7 @@ getDoubleXftFont(XTermDraw * params, unsigned chrset, unsigned attr_flags)
if (chrset != CSET_SWL
&& (top_pattern = XftNameParse(face_name)) != 0) {
- double face_size = xw->misc.face_size[fontnum];
+ double face_size = (double) xw->misc.face_size[fontnum];
XftPattern *sub_pattern = XftPatternDuplicate(top_pattern);
switch (chrset) {
diff --git a/app/xterm/fontutils.h b/app/xterm/fontutils.h
index 9d530c5e7..85c6ae306 100644
--- a/app/xterm/fontutils.h
+++ b/app/xterm/fontutils.h
@@ -1,7 +1,7 @@
-/* $XTermId: fontutils.h,v 1.134 2019/11/12 10:05:06 tom Exp $ */
+/* $XTermId: fontutils.h,v 1.136 2020/10/30 00:09:09 tom Exp $ */
/*
- * Copyright 1998-2018,2019 by Thomas E. Dickey
+ * Copyright 1998-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -123,7 +123,7 @@ extern char *xtermSpecialFont (XTermDraw * /* params */);
: ((FontIsIncomplete(font) && xtermMissingChar(ch, font)) \
|| ForceBoxChars(screen, ch)))
-extern void xtermDrawBoxChar (XTermDraw * /* params */, unsigned /* ch */, GC /* gc */, int /* x */, int /* y */, int /* cols */);
+extern void xtermDrawBoxChar (XTermDraw * /* params */, unsigned /* ch */, GC /* gc */, int /* x */, int /* y */, int /* cols */, Bool /* xftords */);
#else
#define IsXtermMissingChar(screen, ch, font) False
#endif
diff --git a/app/xterm/graphics.c b/app/xterm/graphics.c
index cd461592c..496618b9a 100644
--- a/app/xterm/graphics.c
+++ b/app/xterm/graphics.c
@@ -1,7 +1,8 @@
-/* $XTermId: graphics.c,v 1.79 2019/06/29 17:29:09 tom Exp $ */
+/* $XTermId: graphics.c,v 1.92 2020/10/12 17:58:12 Walter.Harms Exp $ */
/*
- * Copyright 2013-2018,2019 by Ross Combs
+ * Copyright 2013-2019,2020 by Ross Combs
+ * Copyright 2013-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -150,6 +151,14 @@ static Graphic *displayed_graphics[MAX_GRAPHICS];
static unsigned next_graphic_id = 0U;
static unsigned used_graphics; /* 0 to MAX_GRAPHICS */
+#define DiffColor(this,that) \
+ (this.r != that.r || \
+ this.g != that.g || \
+ this.b != that.b)
+
+static ColorRegister null_color =
+{-1, -1, -1};
+
static ColorRegister *
allocRegisters(void)
{
@@ -160,10 +169,8 @@ static Graphic *
freeGraphic(Graphic *obj)
{
if (obj) {
- if (obj->pixels)
- free(obj->pixels);
- if (obj->private_color_registers)
- free(obj->private_color_registers);
+ free(obj->pixels);
+ free(obj->private_color_registers);
free(obj);
}
return NULL;
@@ -523,9 +530,9 @@ find_color_register(ColorRegister const *color_registers, int r, int g, int b)
}
static void
-init_color_registers(ColorRegister *color_registers, int terminal_id)
+init_color_registers(ColorRegister *color_registers, int graphics_termid)
{
- TRACE(("setting initial colors for terminal %d\n", terminal_id));
+ TRACE(("setting initial colors for terminal %d\n", graphics_termid));
{
unsigned i;
@@ -580,7 +587,7 @@ init_color_registers(ColorRegister *color_registers, int terminal_id)
* dxterm:
* ?
*/
- switch (terminal_id) {
+ switch (graphics_termid) {
case 125:
case 241:
set_color_register(color_registers, 0, 0, 0, 0);
@@ -663,7 +670,7 @@ get_color_register_count(TScreen const *screen)
* VT382 1 plane (two fixed colors: black and white) FIXME: verify
* dxterm ?
*/
- switch (screen->terminal_id) {
+ switch (screen->graphics_termid) {
case 125:
return 4U;
case 240:
@@ -685,7 +692,7 @@ get_color_register_count(TScreen const *screen)
static void
init_graphic(Graphic *graphic,
unsigned type,
- int terminal_id,
+ int graphics_termid,
int charrow,
int charcol,
unsigned num_color_registers,
@@ -695,7 +702,7 @@ init_graphic(Graphic *graphic,
graphic->max_height);
unsigned i;
- TRACE(("initializing graphic object\n"));
+ TRACE(("init_graphic at %d,%d\n", charrow, charcol));
graphic->hidden = 0;
graphic->dirty = 1;
@@ -735,7 +742,7 @@ init_graphic(Graphic *graphic,
graphic->private_colors = private_colors;
if (graphic->private_colors) {
TRACE(("using private color registers\n"));
- init_color_registers(graphic->private_color_registers, terminal_id);
+ init_color_registers(graphic->private_color_registers, graphics_termid);
graphic->color_registers = graphic->private_color_registers;
} else {
TRACE(("using shared color registers\n"));
@@ -753,8 +760,8 @@ get_new_graphic(XtermWidget xw, int charrow, int charcol, unsigned type)
{
TScreen const *screen = TScreenOf(xw);
int bufferid = screen->whichBuf;
- int terminal_id = screen->terminal_id;
- Graphic *graphic;
+ int graphics_termid = GraphicsTermId(screen);
+ Graphic *graphic = NULL;
unsigned ii;
FOR_EACH_SLOT(ii) {
@@ -789,7 +796,7 @@ get_new_graphic(XtermWidget xw, int charrow, int charcol, unsigned type)
graphic->id = next_graphic_id++;
init_graphic(graphic,
type,
- terminal_id,
+ graphics_termid,
charrow,
charcol,
num_color_registers,
@@ -845,27 +852,6 @@ get_new_or_matching_graphic(XtermWidget xw,
return graphic;
}
-static int
-lookup_allocated_color(const ColorRegister *reg, Pixel *pix)
-{
- unsigned const rr = ((unsigned) reg->r * (LOOKUP_WIDTH - 1)) / CHANNEL_MAX;
- unsigned const gg = ((unsigned) reg->g * (LOOKUP_WIDTH - 1)) / CHANNEL_MAX;
- unsigned const bb = ((unsigned) reg->b * (LOOKUP_WIDTH - 1)) / CHANNEL_MAX;
- const AllocatedColorRegister *search;
-
- for (search = allocated_colors[rr][gg][bb]; search; search = search->next) {
- if (search->r == reg->r &&
- search->g == reg->g &&
- search->b == reg->b) {
- *pix = search->pix;
- return 1;
- }
- }
-
- *pix = 0UL;
- return 0;
-}
-
#define ScaleForXColor(s) (unsigned short) ((long)(s) * 65535 / CHANNEL_MAX)
static int
@@ -886,37 +872,48 @@ save_allocated_color(const ColorRegister *reg, XtermWidget xw, Pixel *pix)
TRACE(("unable to allocate xcolor\n"));
*pix = 0UL;
return 0;
- }
-
- *pix = xcolor.pixel;
+ } else {
+ *pix = xcolor.pixel;
- if (!(new_color = malloc(sizeof(*new_color)))) {
- TRACE(("unable to save pixel %lu\n", (unsigned long) *pix));
- return 0;
- }
- new_color->r = reg->r;
- new_color->g = reg->g;
- new_color->b = reg->b;
- new_color->pix = *pix;
- new_color->next = allocated_colors[rr][gg][bb];
+ if (!(new_color = malloc(sizeof(*new_color)))) {
+ TRACE(("unable to save pixel %lu\n", (unsigned long) *pix));
+ return 0;
+ } else {
+ new_color->r = reg->r;
+ new_color->g = reg->g;
+ new_color->b = reg->b;
+ new_color->pix = *pix;
+ new_color->next = allocated_colors[rr][gg][bb];
- allocated_colors[rr][gg][bb] = new_color;
+ allocated_colors[rr][gg][bb] = new_color;
- return 1;
+ return 1;
+ }
+ }
}
+/* FIXME: with so many possible colors we need to determine
+ * when to free them to be nice to PseudoColor displays
+ */
static Pixel
color_register_to_xpixel(const ColorRegister *reg, XtermWidget xw)
{
- Pixel pix;
+ Pixel result;
+ unsigned const rr = ((unsigned) reg->r * (LOOKUP_WIDTH - 1)) / CHANNEL_MAX;
+ unsigned const gg = ((unsigned) reg->g * (LOOKUP_WIDTH - 1)) / CHANNEL_MAX;
+ unsigned const bb = ((unsigned) reg->b * (LOOKUP_WIDTH - 1)) / CHANNEL_MAX;
+ const AllocatedColorRegister *search;
- if (!lookup_allocated_color(reg, &pix))
- save_allocated_color(reg, xw, &pix);
+ for (search = allocated_colors[rr][gg][bb]; search; search = search->next) {
+ if (search->r == reg->r &&
+ search->g == reg->g &&
+ search->b == reg->b) {
+ return search->pix;
+ }
+ }
- /* FIXME: with so many possible colors we need to determine
- * when to free them to be nice to PseudoColor displays
- */
- return pix;
+ save_allocated_color(reg, xw, &result);
+ return result;
}
static void
@@ -940,7 +937,6 @@ refresh_graphic(TScreen const *screen,
int const graph_h = graphic->actual_height;
int const mw = graphic->max_width;
int r, c;
- int fillx, filly;
int holes, total, out_of_range;
RegisterNum regnum;
@@ -966,6 +962,12 @@ refresh_graphic(TScreen const *screen,
if (pmy > draw_y + draw_h - 1)
break;
+ if (pmy < draw_y || pmy > draw_y + draw_h - 1 ||
+ pmy < refresh_y || pmy > refresh_y + refresh_h - 1) {
+ out_of_range++;
+ continue;
+ }
+
for (c = 0; c < graph_w; c++) {
int pmx = graph_x + c * pw;
@@ -974,33 +976,20 @@ refresh_graphic(TScreen const *screen,
if (pmx > draw_x + draw_w - 1)
break;
+ if (pmx < draw_x || pmx > draw_x + draw_w - 1 ||
+ pmx < refresh_x || pmx > refresh_x + refresh_w - 1) {
+ out_of_range++;
+ continue;
+ }
+
total++;
regnum = graphic->pixels[r * mw + c];
if (regnum == COLOR_HOLE) {
holes++;
- continue;
- }
-
- for (fillx = 0; fillx < pw; fillx++) {
- for (filly = 0; filly < ph; filly++) {
- if (pmx < draw_x || pmx > draw_x + draw_w - 1 ||
- pmy < draw_y || pmy > draw_y + draw_h - 1) {
- out_of_range++;
- continue;
- }
-
- /* this shouldn't happen, but it doesn't hurt to check */
- if (pmx < refresh_x || pmx > refresh_x + refresh_w - 1 ||
- pmy < refresh_y || pmy > refresh_y + refresh_h - 1) {
- TRACE(("OUT OF RANGE: %d,%d (%d,%d)\n", pmx, pmy, r, c));
- out_of_range++;
- continue;
- }
-
- buffer[(pmy - refresh_y) * refresh_w +
- (pmx - refresh_x)] =
- graphic->color_registers[regnum];
- }
+ } else {
+ buffer[(pmy - refresh_y) * refresh_w +
+ (pmx - refresh_x)] =
+ graphic->color_registers[regnum];
}
}
}
@@ -1400,9 +1389,7 @@ refresh_graphics(XtermWidget xw,
}
for (yy = 0; yy < refresh_h; yy++) {
for (xx = 0; xx < refresh_w; xx++) {
- buffer[yy * refresh_w + xx].r = -1;
- buffer[yy * refresh_w + xx].g = -1;
- buffer[yy * refresh_w + xx].b = -1;
+ buffer[yy * refresh_w + xx] = null_color;
}
}
@@ -1496,14 +1483,24 @@ refresh_graphics(XtermWidget xw,
holes = 0U;
non_holes = 0U;
- for (yy = draw_y_min - refresh_y; yy <= draw_y_max - refresh_y; yy++) {
- for (xx = draw_x_min - refresh_x; xx <= draw_x_max - refresh_x; xx++) {
- const ColorRegister color = buffer[yy * refresh_w + xx];
- if (color.r < 0 || color.g < 0 || color.b < 0) {
- holes++;
- } else {
- non_holes++;
+ {
+ int y_min = draw_y_min - refresh_y;
+ int y_max = draw_y_max - refresh_y;
+ int x_min = draw_x_min - refresh_x;
+ int x_max = draw_x_max - refresh_x;
+ const ColorRegister *base = buffer + (y_min * refresh_w);
+
+ for (yy = y_min; yy <= y_max; yy++) {
+ const ColorRegister *scan = base + x_min;
+ for (xx = x_min; xx <= x_max; xx++) {
+ if (scan->r < 0 || scan->g < 0 || scan->b < 0) {
+ holes++;
+ } else {
+ non_holes++;
+ }
+ ++scan;
}
+ base += refresh_w;
}
}
@@ -1537,12 +1534,8 @@ refresh_graphics(XtermWidget xw,
return;
}
- last_color.r = -1;
- last_color.g = -1;
- last_color.b = -1;
- gc_color.r = -1;
- gc_color.g = -1;
- gc_color.b = -1;
+ last_color = null_color;
+ gc_color = null_color;
run = 0;
for (yy = draw_y_min - refresh_y; yy <= draw_y_max - refresh_y; yy++) {
for (xx = draw_x_min - refresh_x; xx <= draw_x_max - refresh_x;
@@ -1562,9 +1555,7 @@ refresh_graphics(XtermWidget xw,
continue;
}
- if (color.r != last_color.r ||
- color.g != last_color.g ||
- color.b != last_color.b) {
+ if (DiffColor(color, last_color)) {
last_color = color;
if (run > 0) {
XDrawLine(display, drawable, graphics_gc,
@@ -1575,9 +1566,7 @@ refresh_graphics(XtermWidget xw,
run = 0;
}
- if (color.r != gc_color.r ||
- color.g != gc_color.g ||
- color.b != gc_color.b) {
+ if (DiffColor(color, gc_color)) {
xgcv.foreground =
color_register_to_xpixel(&color, xw);
XChangeGC(display, graphics_gc, GCForeground, &xgcv);
@@ -1587,9 +1576,7 @@ refresh_graphics(XtermWidget xw,
run++;
}
if (run > 0) {
- last_color.r = -1;
- last_color.g = -1;
- last_color.b = -1;
+ last_color = null_color;
XDrawLine(display, drawable, graphics_gc,
OriginX(screen) + refresh_x + xx - run,
(OriginY(screen) - scroll_y) + refresh_y + yy,
@@ -1603,11 +1590,12 @@ refresh_graphics(XtermWidget xw,
} else {
XGCValues xgcv;
GC graphics_gc;
- ColorRegister old_color;
- Pixel fg;
+ ColorRegister old_colors[2];
+ Pixel fg, old_result[2];
XImage *image;
char *imgdata;
unsigned image_w, image_h;
+ int nn;
memset(&xgcv, 0, sizeof(xgcv));
xgcv.graphics_exposures = False;
@@ -1644,22 +1632,33 @@ refresh_graphics(XtermWidget xw,
image->data = imgdata;
fg = 0U;
- old_color.r = -1;
- old_color.g = -1;
- old_color.b = -1;
+ nn = 0;
+
+ /* two-level cache cuts down on lookup-calls */
+ old_result[0] = 0U;
+ old_result[1] = 0U;
+ old_colors[0] = null_color;
+ old_colors[1] = null_color;
+
for (yy = draw_y_min - refresh_y; yy <= draw_y_max - refresh_y; yy++) {
for (xx = draw_x_min - refresh_x; xx <= draw_x_max - refresh_x;
xx++) {
const ColorRegister color = buffer[yy * refresh_w + xx];
- if (color.r != old_color.r ||
- color.g != old_color.g ||
- color.b != old_color.b) {
- fg = color_register_to_xpixel(&color, xw);
- old_color = color;
+ if (DiffColor(color, old_colors[nn])) {
+ if (DiffColor(color, old_colors[!nn])) {
+ nn = !nn;
+ fg = color_register_to_xpixel(&color, xw);
+ old_result[nn] = fg;
+ old_colors[nn] = color;
+ } else {
+ nn = !nn;
+ fg = old_result[nn];
+ }
}
- XPutPixel(image, xx + refresh_x - draw_x_min,
+ XPutPixel(image,
+ xx + refresh_x - draw_x_min,
yy + refresh_y - draw_y_min, fg);
}
}
@@ -1789,7 +1788,7 @@ chararea_clear_displayed_graphics(TScreen const *screen,
void
reset_displayed_graphics(TScreen const *screen)
{
- init_color_registers(getSharedRegisters(), screen->terminal_id);
+ init_color_registers(getSharedRegisters(), GraphicsTermId(screen));
if (used_graphics) {
unsigned ii;
diff --git a/app/xterm/graphics_regis.c b/app/xterm/graphics_regis.c
index ffb3609ee..80c53ac24 100644
--- a/app/xterm/graphics_regis.c
+++ b/app/xterm/graphics_regis.c
@@ -1,7 +1,8 @@
-/* $XTermId: graphics_regis.c,v 1.113 2019/11/13 23:24:03 tom Exp $ */
+/* $XTermId: graphics_regis.c,v 1.126 2020/10/14 19:04:43 tom Exp $ */
/*
- * Copyright 2014-2018,2019 by Ross Combs
+ * Copyright 2014-2019,2020 by Ross Combs
+ * Copyright 2014-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -48,30 +49,6 @@
#define y1 my_y1
#define y0 my_y0
-#define IS_HEX_DIGIT(CH) ( \
- (CH) == '0' || \
- (CH) == '1' || \
- (CH) == '2' || \
- (CH) == '3' || \
- (CH) == '4' || \
- (CH) == '5' || \
- (CH) == '6' || \
- (CH) == '7' || \
- (CH) == '8' || \
- (CH) == '9' || \
- (CH) == 'a' || \
- (CH) == 'b' || \
- (CH) == 'c' || \
- (CH) == 'd' || \
- (CH) == 'e' || \
- (CH) == 'f' || \
- (CH) == 'A' || \
- (CH) == 'B' || \
- (CH) == 'C' || \
- (CH) == 'D' || \
- (CH) == 'E' || \
- (CH) == 'F' )
-
#define SCALE_FIXED_POINT 16U
#undef DEBUG_PARSING
@@ -92,7 +69,8 @@
#undef DEBUG_FONT_NAME
#undef DEBUG_FONT_SIZE_SEARCH
#undef DEBUG_XFT_GLYPH
-#undef DEBUG_USER_GLYPH
+#undef DEBUG_GLYPH_RETRIEVAL
+#undef DEBUG_XFT_GLYPH_LOADING
#undef DEBUG_LOAD
/* controls for extensions over VT3x0 limitations */
@@ -162,7 +140,7 @@ typedef struct RegisAlphabet {
char fontname[REGIS_FONTNAME_LEN];
int use_font;
int loaded[MAX_GLYPHS];
- unsigned char *bytes;
+ Char *bytes;
} RegisAlphabet;
typedef struct RegisDataFragment {
@@ -222,7 +200,7 @@ typedef struct RegisGraphicsContext {
XtermWidget current_widget;
Graphic *destination_graphic;
Graphic *display_graphic;
- int terminal_id;
+ int graphics_termid;
int x_off, y_off;
int x_div, y_div;
int width, height;
@@ -292,13 +270,13 @@ static RegisParseState persistent_state;
#define DRAW_ALL(C, COL) \
draw_solid_rectangle((C)->destination_graphic, 0, 0, (C)->width, (C)->height, (COL))
-static unsigned get_shade_character_pixel(unsigned char const *pixels,
+static unsigned get_shade_character_pixel(Char const *pixels,
unsigned w, unsigned h,
unsigned smaxf, unsigned scale,
int slant_dx, int px, int py);
static void get_bitmap_of_character(RegisGraphicsContext const *context,
int ch, unsigned maxw, unsigned maxh,
- unsigned char *pixels,
+ Char *pixels,
unsigned *w, unsigned *h,
unsigned max_pixels);
@@ -310,7 +288,7 @@ init_regis_load_state(RegisParseState *state)
state->load_h = 10U;
state->load_alphabet = 1U; /* FIXME: is this the correct default */
state->load_name[0] = '\0';
- state->load_glyph = (unsigned) (unsigned char) '\0';
+ state->load_glyph = (unsigned) (Char) '\0';
state->load_row = 0U;
}
@@ -448,7 +426,7 @@ shade_pattern_to_pixel(RegisGraphicsContext *context, unsigned dim, int ref,
}
static void
-shade_char_to_pixel(RegisGraphicsContext *context, unsigned char const *pixels,
+shade_char_to_pixel(RegisGraphicsContext *context, Char const *pixels,
unsigned w, unsigned h, unsigned dim, int ref, int x, int y)
{
unsigned xmaxf = context->current_text_controls->character_unit_cell_w;
@@ -513,7 +491,7 @@ shade_to_pixel(RegisGraphicsContext *context, unsigned dim, int ref,
unsigned xmaxf = context->current_text_controls->character_unit_cell_w;
unsigned ymaxf = context->current_text_controls->character_unit_cell_h;
char ch = context->temporary_write_controls.shading_character;
- unsigned char pixels[MAX_GLYPH_PIXELS];
+ Char pixels[MAX_GLYPH_PIXELS];
unsigned w, h;
get_bitmap_of_character(context, ch, xmaxf, ymaxf, pixels, &w, &h,
@@ -575,26 +553,86 @@ sort_points(void const *l, void const *r)
}
static void
-draw_filled_polygon(RegisGraphicsContext *context)
+draw_shaded_polygon(RegisGraphicsContext *context)
{
unsigned p;
int old_x, old_y;
int inside;
- unsigned char pixels[MAX_GLYPH_PIXELS];
+ Char pixels[MAX_GLYPH_PIXELS];
unsigned w = 1, h = 1;
- if (context->temporary_write_controls.shading_character != '\0') {
- char ch = context->temporary_write_controls.shading_character;
- unsigned xmaxf = context->current_text_controls->character_unit_cell_w;
- unsigned ymaxf = context->current_text_controls->character_unit_cell_h;
+ char ch = context->temporary_write_controls.shading_character;
+ unsigned xmaxf = context->current_text_controls->character_unit_cell_w;
+ unsigned ymaxf = context->current_text_controls->character_unit_cell_h;
- get_bitmap_of_character(context, ch, xmaxf, ymaxf, pixels, &w, &h,
- MAX_GLYPH_PIXELS);
- if (w < 1U || h < 1U) {
- return;
+ get_bitmap_of_character(context, ch, xmaxf, ymaxf, pixels, &w, &h,
+ MAX_GLYPH_PIXELS);
+ if (w < 1U || h < 1U) {
+ return;
+ }
+
+ qsort(context->fill_points, (size_t) context->fill_point_count,
+ sizeof(context->fill_points[0]), sort_points);
+
+ old_x = DUMMY_STACK_X;
+ old_y = DUMMY_STACK_Y;
+ inside = 0;
+ for (p = 0U; p < context->fill_point_count; p++) {
+ int new_x = context->fill_points[p].x;
+ int new_y = context->fill_points[p].y;
+#if 0
+ printf("got %d,%d (%d,%d) inside=%d\n", new_x, new_y, old_x, old_y, inside);
+#endif
+
+ /*
+ * FIXME: This is using pixels to represent lines which loses
+ * information about exact slope and how many lines are present which
+ * causes misbehavior with some inputs (especially complex polygons).
+ * It also takes more room than remembering vertices, but I'd rather
+ * not have to implement line segments for arcs. Maybe store a count
+ * at each vertex instead (doesn't fix the slope problem).
+ */
+ /*
+ * FIXME: Change this to only draw inside of polygons, and round
+ * points in a uniform direction to avoid overlapping drawing. As an
+ * option we could continue to support drawing the outline.
+ */
+ if (new_y != old_y) {
+ if (inside) {
+ /*
+ * Just draw the vertical line when there is not a matching
+ * edge on the right side.
+ */
+ shade_char_to_pixel(context, pixels, w, h,
+ WRITE_SHADING_REF_X,
+ old_x, old_x, old_y);
+ }
+ inside = 1;
+ } else {
+ if (inside) {
+ shade_char_to_pixel(context, pixels, w, h,
+ WRITE_SHADING_REF_X,
+ old_x, new_x, new_y);
+ }
+ if (new_x > old_x + 1) {
+ inside = !inside;
+ }
}
+
+ old_x = new_x;
+ old_y = new_y;
}
+ context->destination_graphic->dirty = 1;
+}
+
+static void
+draw_filled_polygon(RegisGraphicsContext *context)
+{
+ unsigned p;
+ int old_x, old_y;
+ int inside;
+
qsort(context->fill_points, (size_t) context->fill_point_count,
sizeof(context->fill_points[0]), sort_points);
@@ -627,26 +665,14 @@ draw_filled_polygon(RegisGraphicsContext *context)
* Just draw the vertical line when there is not a matching
* edge on the right side.
*/
- if (context->temporary_write_controls.shading_character != '\0') {
- shade_char_to_pixel(context, pixels, w, h,
- WRITE_SHADING_REF_X,
- old_x, old_x, old_y);
- } else {
- shade_pattern_to_pixel(context, WRITE_SHADING_REF_X,
- old_x, old_x, old_y);
- }
+ shade_pattern_to_pixel(context, WRITE_SHADING_REF_X,
+ old_x, old_x, old_y);
}
inside = 1;
} else {
if (inside) {
- if (context->temporary_write_controls.shading_character != '\0') {
- shade_char_to_pixel(context, pixels, w, h,
- WRITE_SHADING_REF_X,
- old_x, new_x, new_y);
- } else {
- shade_pattern_to_pixel(context, WRITE_SHADING_REF_X,
- old_x, new_x, new_y);
- }
+ shade_pattern_to_pixel(context, WRITE_SHADING_REF_X,
+ old_x, new_x, new_y);
}
if (new_x > old_x + 1) {
inside = !inside;
@@ -882,7 +908,8 @@ draw_patterned_arc(RegisGraphicsContext *context,
}
/*
- * The plot* functions are based on optimized rasterization primitves written by Zingl Alois.
+ * The plot* functions are based on optimized rasterization primitives written
+ * by Zingl Alois.
* See http://members.chello.at/easyfilter/bresenham.html
*/
@@ -943,7 +970,7 @@ plotQuadBezierSeg(int x0, int y0, int x1, int y1, int x2, int y2)
y0 = sy + y1;
cur = -cur; /* swap P0 P2 */
}
- if (cur != 0) { /* no straight line */
+ if (cur != 0.0) { /* no straight line */
long xy;
double dx, dy, err;
@@ -1060,7 +1087,7 @@ plotCubicBezierSeg(int x0, int y0,
assert((y1 - y0) * (y2 - y3) < EP &&
((y3 - y0) * (y1 - y2) < EP || yb * yb < ya * yc + EP));
- if (xa == 0 && ya == 0) { /* quadratic Bezier */
+ if (xa == 0.0 && ya == 0.0) { /* quadratic Bezier */
sx = ifloor((3 * x1 - x0 + 1) / 2);
sy = ifloor((3 * y1 - y0 + 1) / 2); /* new midpoint */
plotQuadBezierSeg(x0, y0, sx, sy, x3, y3);
@@ -1513,7 +1540,7 @@ find_free_alphabet_index(RegisGraphicsContext *context, unsigned alphabet,
#ifdef DEBUG_SPECIFIC_CHAR_METRICS
static void
-dump_bitmap_pixels(unsigned char const *pixels, unsigned w, unsigned h)
+dump_bitmap_pixels(Char const *pixels, unsigned w, unsigned h)
{
unsigned yy, xx;
@@ -1533,71 +1560,99 @@ dump_bitmap_pixels(unsigned char const *pixels, unsigned w, unsigned h)
#if OPT_RENDERFONT && defined(HAVE_TYPE_FCCHAR32)
static int
-copy_bitmap_from_xft_font(Display *display, XftFont *font, FcChar32 ch,
- unsigned char *pixels, unsigned w, unsigned h,
+copy_bitmap_from_xft_font(XtermWidget xw, XftFont *font, FcChar32 ch,
+ Char *pixels, unsigned w, unsigned h,
unsigned xmin, unsigned ymin)
{
/*
* FIXME: cache:
* - the bitmap for the last M characters and target dimensions
- * - resuse the pixmap object where possible
+ * - reuse the pixmap object where possible
*/
+ Display *display = XtDisplay(xw);
+ Screen *screen = XtScreen(xw);
XftColor bg, fg;
Pixmap bitmap;
XftDraw *draw;
XImage *image;
+ GC glyph_gc;
unsigned bmw, bmh;
unsigned xx, yy;
- bg.pixel = 0UL;
- bg.color.red = 0;
- bg.color.green = 0;
- bg.color.blue = 0;
- bg.color.alpha = 0x0;
-
- fg.pixel = 1UL;
- fg.color.red = 0xffff;
- fg.color.green = 0xffff;
- fg.color.blue = 0xffff;
- fg.color.alpha = 0xffff;
-
bmw = w + xmin;
bmh = h;
+ if (bmw < 1 || bmh < 1) {
+ TRACE(("refusing impossible bitmap size w=%d h=%d xmin=%d ymin=%d for ch='%c'\n",
+ bmw, bmh, xmin, ymin, ch));
+ return 0;
+ }
bitmap = XCreatePixmap(display,
DefaultRootWindow(display),
- bmw, bmh,
- 1);
+ bmw, bmh, (unsigned) getVisualDepth(xw));
if (bitmap == None) {
- TRACE(("Unable to create Pixmap\n"));
+ TRACE(("unable to create Pixmap for Xft\n"));
return 0;
}
- draw = XftDrawCreateBitmap(display, bitmap);
+ draw = XftDrawCreate(display, bitmap, xw->visInfo->visual,
+ XDefaultColormap(display,
+ XScreenNumberOfScreen(screen)));
if (!draw) {
- TRACE(("Unable to create XftDraw\n"));
+ TRACE(("unable to create XftDraw\n"));
XFreePixmap(display, bitmap);
return 0;
}
+ bg.pixel = 0UL;
+ bg.color.red = 0;
+ bg.color.green = 0;
+ bg.color.blue = 0;
+ bg.color.alpha = 0x0;
XftDrawRect(draw, &bg, 0, 0, bmw, bmh);
- XftDrawString32(draw, &fg, font, 0, font->ascent - (int) ymin,
+
+ fg.pixel = 1UL;
+ fg.color.red = 0xffff;
+ fg.color.green = 0xffff;
+ fg.color.blue = 0xffff;
+ fg.color.alpha = 0xffff;
+ XftDrawString32(draw, &fg, font, -(int) xmin, font->ascent - (int) ymin,
&ch, 1);
- image = XGetImage(display, bitmap, (int) xmin, 0, w, h, 1UL, XYPixmap);
+ glyph_gc = XCreateGC(display, bitmap, 0UL, NULL);
+ if (!glyph_gc) {
+ TRACE(("unable to create GC\n"));
+ XftDrawDestroy(draw);
+ XFreePixmap(display, bitmap);
+ return 0;
+ }
+ XSetForeground(display, glyph_gc, 1UL);
+ XSetBackground(display, glyph_gc, 0UL);
+ image = XGetImage(display, bitmap, 0, 0, w, h, 1UL, XYPixmap);
if (!image) {
- TRACE(("Unable to create XImage\n"));
+ TRACE(("unable to create XImage\n"));
+ XFreeGC(display, glyph_gc);
XftDrawDestroy(draw);
XFreePixmap(display, bitmap);
return 0;
}
for (yy = 0U; yy < h; yy++) {
+#ifdef DEBUG_XFT_GLYPH_COPY
+ TRACE(("'%c'[%02u]:", ch, yy));
+#endif
for (xx = 0U; xx < w; xx++) {
- pixels[yy * w + xx] = (unsigned char) XGetPixel(image,
- (int) xx,
- (int) yy);
+ unsigned long pix;
+ pix = XGetPixel(image, (int) xx, (int) yy);
+ pixels[yy * w + xx] = (unsigned char) pix;
+#ifdef DEBUG_XFT_GLYPH_COPY
+ TRACE((" %lu", pix));
+#endif
}
+#ifdef DEBUG_XFT_GLYPH_COPY
+ TRACE(("\n"));
+#endif
}
+ XFreeGC(display, glyph_gc);
XDestroyImage(image);
XftDrawDestroy(draw);
XFreePixmap(display, bitmap);
@@ -1605,12 +1660,13 @@ copy_bitmap_from_xft_font(Display *display, XftFont *font, FcChar32 ch,
}
static void
-get_xft_glyph_dimensions(Display *display, XftFont *font, unsigned *w,
+get_xft_glyph_dimensions(XtermWidget xw, XftFont *font, unsigned *w,
unsigned *h, unsigned *xmin, unsigned *ymin)
{
unsigned workw, workh;
FcChar32 ch;
- unsigned char *pixels;
+ Char *pixels;
+ Char *pixelp;
unsigned yy, xx;
unsigned char_count, pixel_count;
unsigned real_minx, real_maxx, real_miny, real_maxy;
@@ -1643,6 +1699,13 @@ get_xft_glyph_dimensions(Display *display, XftFont *font, unsigned *w,
if (!(pixels = malloc((size_t) (workw * workh)))) {
*w = 0U;
*h = 0U;
+#ifdef DEBUG_COMPUTED_FONT_METRICS
+ TRACE(("reported metrics:\n"));
+ TRACE((" %ux%u ascent=%u descent=%u\n", font->max_advance_width,
+ font->height, font->ascent, font->descent));
+ TRACE(("computed metrics:\n"));
+ TRACE((" (unable to allocate pixel array)\n"));
+#endif
return;
}
@@ -1653,37 +1716,60 @@ get_xft_glyph_dimensions(Display *display, XftFont *font, unsigned *w,
real_miny = workh - 1U;
real_maxy = 0U;
for (ch = 33; ch < 256; ++ch) {
- if (ch >= 127 && ch <= 160)
+ if (ch >= 127 && ch <= 160) {
+#ifdef DEBUG_SPECIFIC_CHAR_METRICS
+ if (IS_DEBUG_CHAR(ch))
+ printf("char: '%c' not in interesting range; ignoring\n",
+ (char) ch);
+#endif
continue;
- if (!FcCharSetHasChar(font->charset, ch))
+ }
+ if (!FcCharSetHasChar(font->charset, ch)) {
+#ifdef DEBUG_SPECIFIC_CHAR_METRICS
+ if (IS_DEBUG_CHAR(ch))
+ printf("char: '%c' not in charset; ignoring\n", (char) ch);
+#endif
continue;
+ }
- copy_bitmap_from_xft_font(display, font, ch, pixels,
- workw, workh, 0U, 0U);
+ if (!copy_bitmap_from_xft_font(xw, font, ch, pixels,
+ workw, workh, 0U, 0U)) {
+#ifdef DEBUG_SPECIFIC_CHAR_METRICS
+ if (IS_DEBUG_CHAR(ch))
+ printf("char: '%c' bitmap could not be copied; ignoring\n",
+ (char) ch);
+#endif
+ continue;
+ }
pixel_count = 0U;
char_minx = workh - 1U;
char_maxx = 0U;
char_miny = workh - 1U;
char_maxy = 0U;
+ pixelp = pixels;
for (yy = 0U; yy < workh; yy++) {
for (xx = 0U; xx < workw; xx++) {
- if (pixels[yy * workw + xx]) {
+ if (*pixelp++) {
if (xx < char_minx)
char_minx = xx;
- if (xx > char_maxx)
+ else if (xx > char_maxx)
char_maxx = xx;
if (yy < char_miny)
char_miny = yy;
- if (yy > char_maxy)
+ else if (yy > char_maxy)
char_maxy = yy;
pixel_count++;
}
}
}
- if (pixel_count < 1U)
+ if (pixel_count < 1U) {
+#ifdef DEBUG_SPECIFIC_CHAR_METRICS
+ if (IS_DEBUG_CHAR(ch))
+ printf("char: '%c' has no pixels; ignoring\n", (char) ch);
+#endif
continue;
-
+ }
#ifdef DEBUG_SPECIFIC_CHAR_METRICS
if (IS_DEBUG_CHAR(ch)) {
printf("char: '%c' (%d)\n", (char) ch, ch);
@@ -1710,6 +1796,13 @@ get_xft_glyph_dimensions(Display *display, XftFont *font, unsigned *w,
free(pixels);
if (char_count < 1U) {
+#ifdef DEBUG_COMPUTED_FONT_METRICS
+ TRACE(("reported metrics:\n"));
+ TRACE((" %ux%u ascent=%u descent=%u\n", font->max_advance_width,
+ font->height, font->ascent, font->descent));
+ TRACE(("computed metrics:\n"));
+ TRACE((" (no characters found)\n"));
+#endif
*w = 0U;
*h = 0U;
return;
@@ -1748,6 +1841,9 @@ find_best_xft_font_size(XtermWidget xw,
XftFont *font;
unsigned targeth;
unsigned ii, cacheindex;
+ /* FIXME: change cache to just cache the final result and put it in a
+ * wrapper function
+ */
static struct {
char fontname[REGIS_FONTNAME_LEN];
unsigned maxw, maxh, max_pixels;
@@ -1765,6 +1861,10 @@ find_best_xft_font_size(XtermWidget xw,
assert(xmin);
assert(ymin);
+#ifdef DEBUG_FONT_SIZE_SEARCH
+ TRACE(("determining best size of font '%s' for %ux%u glyph with max_pixels=%u\n",
+ fontname, maxw, maxh, max_pixels));
+#endif
cacheindex = FONT_SIZE_CACHE_SIZE;
for (ii = 0U; ii < FONT_SIZE_CACHE_SIZE; ii++) {
if (cache[ii].maxw == maxw && cache[ii].maxh == maxh &&
@@ -1782,8 +1882,8 @@ find_best_xft_font_size(XtermWidget xw,
}
for (;;) {
if (targeth <= 5U) {
- TRACE(("Giving up finding suitable Xft font size for %ux%u.\n",
- maxw, maxh));
+ TRACE(("Giving up finding suitable Xft font size for \"%s\" at %ux%u.\n",
+ fontname, maxw, maxh));
return NULL;
}
@@ -1795,8 +1895,10 @@ find_best_xft_font_size(XtermWidget xw,
* doesn't appear to matter).
*
* In those two cases it literally drops pixels, sometimes whole
- * columns, making the glyphs unreadable and ugly even when readable.
+ * columns, making the glyphs unreadable and at least ugly even when
+ * readable.
*/
+ font = NULL;
/*
* FIXME:
* Also, we need to scale the width and height separately. The
@@ -1810,11 +1912,15 @@ find_best_xft_font_size(XtermWidget xw,
XftPattern *match;
XftResult status;
- font = NULL;
if ((pat = XftNameParse(fontname))) {
+#ifdef DEBUG_FONT_SIZE_SEARCH
+ TRACE(("trying targeth=%g\n", targeth / 10.0));
+#endif
XftPatternBuild(pat,
+#if 0
/* arbitrary value */
XFT_SIZE, XftTypeDouble, 12.0,
+#endif
XFT_PIXEL_SIZE, XftTypeDouble, (double)
targeth / 10.0,
#if 0
@@ -1836,7 +1942,16 @@ find_best_xft_font_size(XtermWidget xw,
}
}
if (!font) {
- TRACE(("Unable to open a monospaced Xft font.\n"));
+#ifdef DEBUG_FONT_SIZE_SEARCH
+ {
+ char buffer[1024];
+
+ if (XftNameUnparse(font->pattern, buffer, (int) sizeof(buffer)))
+ printf("font name unparsed: \"%s\"\n", buffer);
+ }
+#endif
+ TRACE(("unable to open a monospaced Xft font matching '%s' with pixelsize %g\n",
+ fontname, targeth / 10.0));
return NULL;
}
#ifdef DEBUG_FONT_SIZE_SEARCH
@@ -1844,9 +1959,9 @@ find_best_xft_font_size(XtermWidget xw,
char buffer[1024];
if (XftNameUnparse(font->pattern, buffer, (int) sizeof(buffer))) {
- printf("Testing font named \"%s\"\n", buffer);
+ TRACE(("Testing font named \"%s\"\n", buffer));
} else {
- printf("Testing unknown font\n");
+ TRACE(("Testing unknown font\n"));
}
}
#endif
@@ -1858,17 +1973,26 @@ find_best_xft_font_size(XtermWidget xw,
*xmin = cache[cacheindex].xmin;
*ymin = cache[cacheindex].ymin;
} else {
- get_xft_glyph_dimensions(display, font, w, h, xmin, ymin);
+ get_xft_glyph_dimensions(xw, font, w, h, xmin, ymin);
+
+ if (*w < 1 || *h < 1) {
+#ifdef DEBUG_FONT_SIZE_SEARCH
+ TRACE(("got %ux%u dimensions for target size targeth=%d; trying reduced target size\n",
+ *w, *h, targeth));
+#endif
+ targeth--;
+ continue;
+ }
}
#ifdef DEBUG_FONT_SIZE_SEARCH
- printf("checking max=%ux%u targeth=%u.%u\n", maxw, maxh, targeth /
- 10U, targeth % 10U);
+ TRACE(("checking max=%ux%u targeth=%u.%u\n", maxw, maxh, targeth /
+ 10U, targeth % 10U));
#endif
if (*h > maxh) {
XftFontClose(display, font);
#ifdef DEBUG_FONT_SIZE_SEARCH
- printf("got %ux%u glyph; too tall; reducing target size\n", *w, *h);
+ TRACE(("got %ux%u glyph; too tall; reducing target size\n", *w, *h));
#endif
if (*h > 2U * maxh) {
targeth /= (*h / maxh);
@@ -1882,7 +2006,7 @@ find_best_xft_font_size(XtermWidget xw,
if (*w > maxw) {
XftFontClose(display, font);
#ifdef DEBUG_FONT_SIZE_SEARCH
- printf("got %ux%u glyph; too wide; reducing target size\n", *w, *h);
+ TRACE(("got %ux%u glyph; too wide; reducing target size\n", *w, *h));
#endif
if (*w > 2U * maxw) {
targeth /= (*w / maxw);
@@ -1896,8 +2020,8 @@ find_best_xft_font_size(XtermWidget xw,
if (*w * *h > max_pixels) {
XftFontClose(display, font);
#ifdef DEBUG_FONT_SIZE_SEARCH
- printf("got %ux%u glyph; too many pixels; reducing target size\n",
- *w, *h);
+ TRACE(("got %ux%u glyph; too many pixels; reducing target size\n",
+ *w, *h));
#endif
if (*w * *h > 2U * max_pixels) {
unsigned min = *w < *h ? *w : *h;
@@ -1919,11 +2043,11 @@ find_best_xft_font_size(XtermWidget xw,
char buffer[1024];
if (XftNameUnparse(font->pattern, buffer, (int) sizeof(buffer))) {
- printf("Final font for \"%s\" max %dx%d is \"%s\"\n",
- fontname, maxw, maxh, buffer);
+ TRACE(("Final font for \"%s\" max %dx%d is \"%s\"\n",
+ fontname, maxw, maxh, buffer));
} else {
- printf("Final font for \"%s\" max %dx%d is unknown\n",
- fontname, maxw, maxh);
+ TRACE(("Final font for \"%s\" max %dx%d is unknown\n",
+ fontname, maxw, maxh));
}
}
#endif
@@ -1965,7 +2089,7 @@ find_best_xft_font_size(XtermWidget xw,
static int
get_xft_bitmap_of_character(RegisGraphicsContext const *context,
char const *fontname, int ch,
- unsigned maxw, unsigned maxh, unsigned char *pixels,
+ unsigned maxw, unsigned maxh, Char *pixels,
unsigned max_pixels, unsigned *w, unsigned *h)
{
/*
@@ -1974,7 +2098,7 @@ get_xft_bitmap_of_character(RegisGraphicsContext const *context,
*/
/*
* FIXME: cache:
- * - resuse the font where possible
+ * - reuse the font where possible
*/
#ifdef XRENDERFONT
XtermWidget xw = context->destination_graphic->xw;
@@ -1982,19 +2106,32 @@ get_xft_bitmap_of_character(RegisGraphicsContext const *context,
XftFont *font;
unsigned xmin = 0U, ymin = 0U;
+# ifdef DEBUG_XFT_GLYPH_LOADING
+ TRACE(("trying to load glyph '%c' at max size %dx%d\n", ch, maxw, maxh));
+# endif
if (!(font = find_best_xft_font_size(xw, fontname, maxw, maxh,
max_pixels, w, h, &xmin, &ymin))) {
TRACE(("Unable to find suitable Xft font\n"));
return 0;
}
- if (!copy_bitmap_from_xft_font(display, font, CharOf(ch), pixels, *w, *h,
+ if (*w == 0U || *h == 0U) {
+ TRACE(("empty glyph found for '%c'\n", ch));
+ XftFontClose(display, font);
+ return 1;
+ }
+
+ if (!copy_bitmap_from_xft_font(xw, font, CharOf(ch), pixels, *w, *h,
xmin, ymin)) {
TRACE(("Unable to create bitmap for '%c'\n", ch));
XftFontClose(display, font);
return 0;
}
XftFontClose(display, font);
+# ifdef DEBUG_XFT_GLYPH_LOADING
+ TRACE(("loaded glyph '%c' at max size %dx%d\n", ch, maxw, maxh));
+# endif
+
return 1;
#else
(void) context;
@@ -2007,6 +2144,7 @@ get_xft_bitmap_of_character(RegisGraphicsContext const *context,
(void) w;
(void) h;
+ TRACE(("Not rendering Xft font for ReGIS (support not compiled in).\n"));
return 0;
#endif
}
@@ -2014,7 +2152,7 @@ get_xft_bitmap_of_character(RegisGraphicsContext const *context,
static unsigned
find_best_alphabet_index(RegisGraphicsContext const *context,
unsigned minw, unsigned minh,
- unsigned maxw, unsigned maxh,
+ unsigned targetw, unsigned targeth,
unsigned max_pixels)
{
unsigned ii;
@@ -2022,8 +2160,9 @@ find_best_alphabet_index(RegisGraphicsContext const *context,
unsigned bestw, besth;
assert(context);
- assert(maxw);
- assert(maxh);
+ assert(targetw);
+ assert(targeth);
+ assert(max_pixels);
bestmatch = MAX_REGIS_ALPHABETS;
bestw = 0U;
@@ -2033,10 +2172,12 @@ find_best_alphabet_index(RegisGraphicsContext const *context,
context->current_text_controls->alphabet_num &&
context->alphabets[ii].pixw >= minw &&
context->alphabets[ii].pixh >= minh &&
- context->alphabets[ii].pixw <= maxw &&
- context->alphabets[ii].pixh <= maxh &&
- context->alphabets[ii].pixw > bestw &&
- context->alphabets[ii].pixh > besth &&
+ context->alphabets[ii].pixw <= targetw &&
+ context->alphabets[ii].pixh <= targeth &&
+ ((context->alphabets[ii].pixw >= bestw &&
+ context->alphabets[ii].pixh > besth) ||
+ (context->alphabets[ii].pixw > bestw &&
+ context->alphabets[ii].pixh >= besth)) &&
context->alphabets[ii].pixw *
context->alphabets[ii].pixh <= max_pixels) {
bestmatch = ii;
@@ -2045,13 +2186,38 @@ find_best_alphabet_index(RegisGraphicsContext const *context,
}
}
+ /* If we can't find one to scale up, look for one to scale down. */
+ if (bestmatch == MAX_REGIS_ALPHABETS) {
+ bestw = max_pixels;
+ besth = max_pixels;
+ for (ii = 0U; ii < MAX_REGIS_ALPHABETS; ii++) {
+ if (context->alphabets[ii].alphabet_num ==
+ context->current_text_controls->alphabet_num &&
+ context->alphabets[ii].pixw >= minw &&
+ context->alphabets[ii].pixh >= minh &&
+ ((context->alphabets[ii].pixw <= bestw &&
+ context->alphabets[ii].pixh < besth) ||
+ (context->alphabets[ii].pixw < bestw &&
+ context->alphabets[ii].pixh <= besth)) &&
+ context->alphabets[ii].pixw *
+ context->alphabets[ii].pixh <= max_pixels) {
+ bestmatch = ii;
+ bestw = context->alphabets[ii].pixw;
+ besth = context->alphabets[ii].pixh;
+ }
+ }
+ }
#ifdef DEBUG_ALPHABET_LOOKUP
if (bestmatch < MAX_REGIS_ALPHABETS) {
- TRACE(("found alphabet %u at index %u size %ux%u font=%s\n",
- context->current_text_controls->alphabet_num, bestmatch,
+ TRACE(("for target size %ux%u alphabet %u found index %u size %ux%u font=%s\n",
+ targetw, targeth, context->current_text_controls->alphabet_num,
+ bestmatch,
bestw, besth,
context->alphabets[bestmatch].use_font ?
context->alphabets[bestmatch].fontname : "(none)"));
+ } else {
+ TRACE(("for target size %ux%u alphabet %u found no suitable alphabets\n",
+ targetw, targeth, context->current_text_controls->alphabet_num));
}
#endif
@@ -2064,9 +2230,10 @@ static int
get_user_bitmap_of_character(RegisGraphicsContext const *context,
int ch,
unsigned alphabet_index,
- unsigned char *pixels)
+ Char *pixels,
+ unsigned int max_pixels)
{
- const unsigned char *glyph;
+ const Char *glyph;
unsigned w, h;
unsigned xx, yy;
unsigned byte, bit;
@@ -2074,8 +2241,8 @@ get_user_bitmap_of_character(RegisGraphicsContext const *context,
assert(context);
assert(pixels);
- if (!context->alphabets[alphabet_index].loaded[(unsigned char) ch]) {
- TRACE(("in alphabet %u with alphabet index %u user glyph for '%c' not loaded\n",
+ if (!context->alphabets[alphabet_index].loaded[(Char) ch]) {
+ TRACE(("BUG: in alphabet %u with alphabet index %u user glyph for '%c' not loaded\n",
context->current_text_controls->alphabet_num, alphabet_index,
ch));
return 0;
@@ -2086,13 +2253,21 @@ get_user_bitmap_of_character(RegisGraphicsContext const *context,
w = context->alphabets[alphabet_index].pixw;
h = context->alphabets[alphabet_index].pixh;
glyph = &context->alphabets[alphabet_index]
- .bytes[(unsigned char) ch * GLYPH_WIDTH_BYTES(w) * h];
+ .bytes[(Char) ch * GLYPH_WIDTH_BYTES(w) * h];
+
+ if (w * h > max_pixels) {
+ TRACE(("in alphabet %u with alphabet index %u user glyph for '%c' is too large: %ux%u (max_pixels=%u)\n",
+ context->current_text_controls->alphabet_num, alphabet_index,
+ ch, w, h, max_pixels));
+ return 0;
+ }
for (yy = 0U; yy < h; yy++) {
for (xx = 0U; xx < w; xx++) {
byte = yy * GLYPH_WIDTH_BYTES(w) + (xx >> 3U);
bit = xx & 7U;
- pixels[yy * w + xx] = ((unsigned) glyph[byte] >> (7U - bit)) & 1U;
+ pixels[yy * w + xx] = (Char) (((unsigned) glyph[byte]
+ >> (7U - bit)) & 1U);
}
}
@@ -2135,7 +2310,7 @@ get_user_bitmap_of_character(RegisGraphicsContext const *context,
*/
static void
get_bitmap_of_character(RegisGraphicsContext const *context, int ch,
- unsigned maxw, unsigned maxh, unsigned char *pixels,
+ unsigned maxw, unsigned maxh, Char *pixels,
unsigned *w, unsigned *h, unsigned max_pixels)
{
unsigned bestmatch;
@@ -2145,6 +2320,17 @@ get_bitmap_of_character(RegisGraphicsContext const *context, int ch,
assert(w);
assert(h);
+#ifdef DEBUG_GLYPH_RETRIEVAL
+ TRACE(("getting bitmap of glyph %d, current alphabet %d\n", ch,
+ context->current_text_controls->alphabet_num));
+#endif
+
+ if (maxw < 1U || maxh < 1U || max_pixels < 1U) {
+ *w = 0U;
+ *h = 0U;
+ return;
+ }
+
if (context->current_text_controls->alphabet_num == 0)
fontname = context->builtin_font;
@@ -2156,11 +2342,17 @@ get_bitmap_of_character(RegisGraphicsContext const *context, int ch,
if (bestmatch < MAX_REGIS_ALPHABETS) {
RegisAlphabet const *alpha = &context->alphabets[bestmatch];
+#ifdef DEBUG_GLYPH_RETRIEVAL
+ TRACE(("checking user glyph for slot=%u alphabet=%d use_font=%d loaded=%d\n",
+ bestmatch, alpha->alphabet_num, alpha->use_font,
+ alpha->loaded[ch]));
+#endif
if (!alpha->use_font &&
- get_user_bitmap_of_character(context, ch, bestmatch, pixels)) {
-#ifdef DEBUG_USER_GLYPH
+ get_user_bitmap_of_character(context, ch, bestmatch, pixels,
+ max_pixels)) {
+#ifdef DEBUG_GLYPH_RETRIEVAL
TRACE(("found user glyph for alphabet number %d (index %u)\n\n",
- context->current_text_controls->alphabet_num, bestmatch));
+ alpha->alphabet_num, bestmatch));
#endif
*w = alpha->pixw;
*h = alpha->pixh;
@@ -2172,6 +2364,9 @@ get_bitmap_of_character(RegisGraphicsContext const *context, int ch,
}
if (fontname) {
+#ifdef DEBUG_GLYPH_RETRIEVAL
+ TRACE(("using xft font %s\n", fontname));
+#endif
if (get_xft_bitmap_of_character(context, fontname, ch,
maxw, maxh, pixels,
max_pixels, w, h)) {
@@ -2223,7 +2418,7 @@ get_bitmap_of_character(RegisGraphicsContext const *context, int ch,
#define SIGNED_UNSIGNED_MOD(VAL, BASE) ( (((VAL) % (int) (BASE)) + (int) (BASE)) % (int) (BASE) )
static unsigned
-get_shade_character_pixel(unsigned char const *pixels, unsigned w, unsigned h,
+get_shade_character_pixel(Char const *pixels, unsigned w, unsigned h,
unsigned smaxf, unsigned scale, int slant_dx,
int px, int py)
{
@@ -2262,7 +2457,7 @@ draw_character(RegisGraphicsContext *context, int ch,
int ox, oy;
unsigned pad_left, pad_right;
unsigned pad_top, pad_bottom;
- unsigned char pixels[MAX_GLYPH_PIXELS];
+ Char pixels[MAX_GLYPH_PIXELS];
unsigned value;
get_bitmap_of_character(context, ch, xmaxf, ymaxf, pixels, &w, &h,
@@ -3214,18 +3409,10 @@ regis_num_to_int(RegisDataFragment const *input, int *out)
/* FIXME: handle exponential notation and rounding */
/* FIXME: check for junk after the number */
ch = peek_fragment(input);
- if (ch != '0' &&
- ch != '1' &&
- ch != '2' &&
- ch != '3' &&
- ch != '4' &&
- ch != '5' &&
- ch != '6' &&
- ch != '7' &&
- ch != '8' &&
- ch != '9' &&
+ if (!isdigit(CharOf(ch)) &&
ch != '+' &&
ch != '-') {
+ *out = 0;
return 0;
}
@@ -3444,7 +3631,7 @@ load_regis_colorspec(RegisGraphicsContext const *context,
/*
* The VT240 and VT330 models convert to the closest grayscale value.
*/
- if (context->terminal_id == 240 || context->terminal_id == 330) {
+ if (context->graphics_termid == 240 || context->graphics_termid == 330) {
hls2rgb(0, l, 0, &r, &g, &b);
TRACE(("converted to grayscale: %hd,%hd,%hd\n", r, g, b));
}
@@ -4372,7 +4559,7 @@ load_regis_write_control_set(RegisParseState *state,
}
static void
-init_regis_write_controls(int terminal_id, unsigned all_planes,
+init_regis_write_controls(int graphics_termid, unsigned all_planes,
RegisWriteControls *controls)
{
controls->pv_multiplier = 1U;
@@ -4381,7 +4568,7 @@ init_regis_write_controls(int terminal_id, unsigned all_planes,
controls->invert_pattern = 0U;
controls->plane_mask = all_planes;
controls->write_style = WRITE_STYLE_OVERLAY;
- switch (terminal_id) {
+ switch (graphics_termid) {
case 125: /* FIXME: verify */
case 240: /* FIXME: verify */
case 241: /* FIXME: verify */
@@ -4535,7 +4722,7 @@ init_regis_alphabets(RegisGraphicsContext *context)
}
static void
-init_regis_graphics_context(int terminal_id, int width, int height,
+init_regis_graphics_context(int graphics_termid, int width, int height,
unsigned max_colors, const char *builtin_font,
RegisGraphicsContext *context)
{
@@ -4543,7 +4730,7 @@ init_regis_graphics_context(int terminal_id, int width, int height,
context->display_graphic = NULL;
context->display_page = 0U;
context->destination_page = 0U;
- context->terminal_id = terminal_id;
+ context->graphics_termid = graphics_termid;
/* reset addressing / clear user coordinates */
context->width = width;
@@ -4567,7 +4754,7 @@ init_regis_graphics_context(int terminal_id, int width, int height,
context->builtin_font = builtin_font;
- init_regis_write_controls(terminal_id, context->all_planes,
+ init_regis_write_controls(graphics_termid, context->all_planes,
&context->persistent_write_controls);
copy_regis_write_controls(&context->persistent_write_controls,
&context->temporary_write_controls);
@@ -4679,7 +4866,7 @@ parse_regis_command(RegisParseState *state)
* (M(=) # macrograph storage (free bytes of total bytes)
* (P) # absolute output cursor position
* (P(I)) # interactive locator mode (in one-shot or multiple mode)
- * (P(I[xmul,ymul])) # interactive locator mode with arrow key movement multiplers
+ * (P(I[xmul,ymul])) # interactive locator mode with arrow key movement multipliers
*/
TRACE(("found ReGIS command \"%c\" (report status)\n", ch));
state->command = 'r';
@@ -4689,7 +4876,7 @@ parse_regis_command(RegisParseState *state)
/* Screen
* S
- * (A[<upper left>][<lower right>]) # adjust screen cordinates
+ * (A[<upper left>][<lower right>]) # adjust screen coordinates
* (C<setting> # 0 (cursor output off), 1 (cursor output on)
* (E) # erase to background color, resets shades, curves, and stacks
* (F) # print the graphic and erase the screen (DECprint extension)
@@ -5575,14 +5762,14 @@ parse_regis_option(RegisParseState *state, RegisGraphicsContext *context)
if (suboption == 'i' || suboption == 'I') {
output = 0; /* input location report */
} else {
- TRACE(("DATA_ERROR: unknown ReGIS postion report suboption '%c'\n",
+ TRACE(("DATA_ERROR: unknown ReGIS position report suboption '%c'\n",
suboption));
break;
}
skip_regis_whitespace(&suboptionarg);
if (!fragment_consumed(&optionarg)) {
- TRACE(("DATA_ERROR: unexpected content in ReGIS postion report suboptions: \"%s\"\n",
+ TRACE(("DATA_ERROR: unexpected content in ReGIS position report suboptions: \"%s\"\n",
fragment_to_tempstr(&suboptionarg)));
break;
}
@@ -5916,8 +6103,8 @@ parse_regis_option(RegisParseState *state, RegisGraphicsContext *context)
}
if (color_only &&
- (context->terminal_id == 240 ||
- context->terminal_id == 330)) {
+ (context->graphics_termid == 240 ||
+ context->graphics_termid == 330)) {
TRACE(("NOT setting color register %d to %hd,%hd,%hd\n",
register_num, r, g, b));
} else {
@@ -7038,7 +7225,7 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
case 'l':
/* FIXME: confirm that extra characters are ignored */
TRACE(("found character to load: \"%s\"\n", state->temp));
- state->load_glyph = (unsigned) (unsigned char) state->temp[0];
+ state->load_glyph = (unsigned) (Char) state->temp[0];
state->load_row = 0U;
break;
case 't':
@@ -7063,7 +7250,7 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
for (digit = 0U; digit < (state->load_w + 3U) >> 2U; digit++) {
char ch = peek_fragment(input);
- if (!IS_HEX_DIGIT(ch)) {
+ if (!isxdigit(CharOf(ch))) {
if (ch != ',' && ch != ';' &&
ch != ' ' && ch != '\r' &&
ch != '\n') {
@@ -7117,13 +7304,13 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
* context->alphabets[state->load_index].pixh;
if (context->alphabets[state->load_index].bytes == NULL) {
if (!(context->alphabets[state->load_index].bytes =
- calloc((size_t) (MAX_GLYPHS * glyph_size), sizeof(unsigned char)))) {
+ calloc((size_t) (MAX_GLYPHS * glyph_size), sizeof(Char)))) {
TRACE(("ERROR: unable to allocate %u bytes for glyph storage\n",
MAX_GLYPHS * glyph_size));
return 0;
}
} {
- unsigned char *glyph;
+ Char *glyph;
unsigned bytew;
unsigned byte;
unsigned unused_bits;
@@ -7139,9 +7326,9 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
}
for (byte = 0U; byte < bytew; byte++) {
glyph[state->load_row * bytew + byte] =
- (unsigned char) (((val << unused_bits) >>
- ((bytew - (byte + 1U)) << 3U))
- & 255U);
+ (Char) (((val << unused_bits) >>
+ ((bytew - (byte + 1U)) << 3U))
+ & 255U);
#ifdef DEBUG_LOAD
TRACE(("bytew=%u val=%lx byte=%u output=%x\n",
bytew, val,
@@ -7151,6 +7338,7 @@ parse_regis_items(RegisParseState *state, RegisGraphicsContext *context)
}
state->load_row++;
+ context->alphabets[state->load_index].use_font = 0;
context->alphabets[state->load_index]
.loaded[state->load_glyph] = 1;
#ifdef DEBUG_LOAD
@@ -7273,7 +7461,7 @@ parse_regis_toplevel(RegisParseState *state, RegisGraphicsContext *context)
}
/* Load statements contain hex values which may look like commands. */
ch = peek_fragment(&state->input);
- if (state->command != 'l' || !IS_HEX_DIGIT(ch)) {
+ if (state->command != 'l' || !isxdigit(CharOf(ch))) {
#ifdef DEBUG_PARSING
TRACE(("checking for top level command...\n"));
#endif
@@ -7308,7 +7496,11 @@ parse_regis_toplevel(RegisParseState *state, RegisGraphicsContext *context)
context->fill_point_count = 0U;
while (!fragment_consumed(&state->input))
parse_regis_toplevel(state, context);
- draw_filled_polygon(context);
+ if (context->temporary_write_controls.shading_character != '\0') {
+ draw_shaded_polygon(context);
+ } else {
+ draw_filled_polygon(context);
+ }
context->fill_point_count = 0U;
context->fill_mode = 0;
state->command = 'f';
@@ -7431,7 +7623,7 @@ parse_regis(XtermWidget xw, ANSI *params, char const *string)
if (context->width == 0 || context->height == 0 ||
Pmode == 1 || Pmode == 3) {
init_regis_parse_state(state);
- init_regis_graphics_context(screen->terminal_id,
+ init_regis_graphics_context(GraphicsTermId(screen),
screen->graphics_regis_def_wide,
screen->graphics_regis_def_high,
get_color_register_count(screen),
@@ -7456,6 +7648,7 @@ parse_regis(XtermWidget xw, ANSI *params, char const *string)
* end of the fill command.
*/
iterations++;
+ memset(&curr_tv, 0, sizeof(curr_tv));
if (context->force_refresh) {
X_GETTIMEOFDAY(&curr_tv);
need_refresh = 1;
diff --git a/app/xterm/graphics_sixel.c b/app/xterm/graphics_sixel.c
index d06691191..304fa8f22 100644
--- a/app/xterm/graphics_sixel.c
+++ b/app/xterm/graphics_sixel.c
@@ -1,7 +1,8 @@
-/* $XTermId: graphics_sixel.c,v 1.18 2016/06/05 20:04:01 tom Exp $ */
+/* $XTermId: graphics_sixel.c,v 1.28 2020/08/06 20:32:33 Ben.Wong Exp $ */
/*
- * Copyright 2014,2016 by Ross Combs
+ * Copyright 2014-2016,2020 by Ross Combs
+ * Copyright 2014-2016,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -122,7 +123,9 @@ typedef struct {
static void
init_sixel_background(Graphic *graphic, SixelContext const *context)
{
- const int mw = graphic->max_width;
+ RegisterNum *source;
+ RegisterNum *target;
+ size_t length;
int r, c;
TRACE(("initializing sixel background to size=%dx%d bgcolor=%hu\n",
@@ -133,10 +136,15 @@ init_sixel_background(Graphic *graphic, SixelContext const *context)
if (context->background == COLOR_HOLE)
return;
- for (r = 0; r < graphic->actual_height; r++) {
- for (c = 0; c < graphic->actual_width; c++) {
- graphic->pixels[r * mw + c] = context->background;
- }
+ source = graphic->pixels;
+ for (c = 0; c < graphic->actual_width; c++) {
+ source[c] = context->background;
+ }
+ target = source;
+ length = (size_t) graphic->actual_width * sizeof(*target);
+ for (r = 1; r < graphic->actual_height; r++) {
+ target += graphic->max_width;
+ memcpy(target, source, length);
}
graphic->color_registers_used[context->background] = 1;
}
@@ -248,9 +256,12 @@ finished_parsing(XtermWidget xw, Graphic *graphic)
new_col = 0;
}
- TRACE(("setting text position after %dx%d graphic starting on row=%d col=%d: cursor new_row=%d new_col=%d\n",
+ TRACE(("setting text position after %dx%d\t%.1f start (%d %d): cursor (%d,%d)\n",
graphic->actual_width * graphic->pixw,
graphic->actual_height * graphic->pixh,
+ ((double) graphic->charrow
+ + ((double) (graphic->actual_height * graphic->pixh)
+ / (double) FontHeight(screen))),
graphic->charrow,
graphic->charcol,
new_row, new_col));
@@ -451,7 +462,8 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
init_sixel_background(graphic, &context);
graphic->valid = 1;
}
- set_sixel(graphic, &context, sixel);
+ if (sixel)
+ set_sixel(graphic, &context, sixel);
context.col++;
} else if (ch == '$') { /* DECGCR */
/* ignore DECCRNLM in sixel mode */
@@ -462,7 +474,8 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
TRACE(("sixel NL\n"));
scroll_lines = 0;
while (graphic->charrow - scroll_lines +
- (((context.row + 6) * graphic->pixh
+ (((context.row + Min(6, graphic->actual_height - context.row))
+ * graphic->pixh
+ FontHeight(screen) - 1)
/ FontHeight(screen)) > screen->bot_marg) {
scroll_lines++;
@@ -491,24 +504,11 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
int Pcount;
const char *start;
int sixel;
- int i;
start = ++string;
for (;;) {
ch = CharOf(*string);
- if (ch != '0' &&
- ch != '1' &&
- ch != '2' &&
- ch != '3' &&
- ch != '4' &&
- ch != '5' &&
- ch != '6' &&
- ch != '7' &&
- ch != '8' &&
- ch != '9' &&
- ch != ' ' &&
- ch != '\r' &&
- ch != '\n')
+ if (!(isdigit(ch) || isspace(ch)))
break;
string++;
}
@@ -528,9 +528,14 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
init_sixel_background(graphic, &context);
graphic->valid = 1;
}
- for (i = 0; i < Pcount; i++) {
- set_sixel(graphic, &context, sixel);
- context.col++;
+ if (sixel) {
+ int i;
+ for (i = 0; i < Pcount; i++) {
+ set_sixel(graphic, &context, sixel);
+ context.col++;
+ }
+ } else {
+ context.col += Pcount;
}
} else if (ch == '#') { /* DECGCI */
ANSI color_params;
@@ -540,7 +545,7 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
Pregister = color_params.a_param[0];
if (Pregister >= (int) graphic->valid_registers) {
TRACE(("DATA_WARNING: sixel color operator uses out-of-range register %d\n", Pregister));
- /* FIXME: supposedly the DEC terminals wrapped register indicies -- verify */
+ /* FIXME: supposedly the DEC terminals wrapped register indices -- verify */
while (Pregister >= (int) graphic->valid_registers)
Pregister -= (int) graphic->valid_registers;
TRACE(("DATA_WARNING: converted to %d\n", Pregister));
diff --git a/app/xterm/html.c b/app/xterm/html.c
index 05c8023be..ccdea5ceb 100644
--- a/app/xterm/html.c
+++ b/app/xterm/html.c
@@ -1,8 +1,8 @@
-/* $XTermId: html.c,v 1.17 2019/11/02 15:03:43 tom Exp $ */
+/* $XTermId: html.c,v 1.19 2020/06/02 23:24:26 tom Exp $ */
/*
- * Copyright 2018,2019 Thomas E. Dickey
- * Copyright 2015,2018 Jens Schweikhardt
+ * Copyright 2018-2019,2020 Thomas E. Dickey
+ * Copyright 2015,2018 Jens Schweikhardt
*
* All Rights Reserved
*
@@ -50,9 +50,11 @@ static void writeStyle(XtermWidget, FILE *fp);
void
xtermDumpHtml(XtermWidget xw)
{
+ char *saveLocale;
FILE *fp;
TRACE(("xtermDumpHtml...\n"));
+ saveLocale = xtermSetLocale(LC_NUMERIC, "C");
fp = create_printfile(xw, ".xhtml");
if (fp != 0) {
dumpHtmlHeader(xw, fp);
@@ -60,6 +62,7 @@ xtermDumpHtml(XtermWidget xw)
dumpHtmlFooter(xw, fp);
fclose(fp);
}
+ xtermResetLocale(LC_NUMERIC, saveLocale);
TRACE(("...xtermDumpHtml done\n"));
}
@@ -273,7 +276,7 @@ dumpHtmlLine(XtermWidget xw, int row, FILE *fp)
}
static void
-dumpHtmlFooter(XtermWidget xw GCC_UNUSED, FILE *fp)
+dumpHtmlFooter(XtermWidget xw, FILE *fp)
{
fputs("</pre>\n", fp);
fputs(" </div>\n", fp);
diff --git a/app/xterm/icons/filled-xterm.svg b/app/xterm/icons/filled-xterm.svg
index bee340e14..53c6228b0 100644
--- a/app/xterm/icons/filled-xterm.svg
+++ b/app/xterm/icons/filled-xterm.svg
@@ -13,13 +13,13 @@
height="48px"
id="svg2985"
version="1.1"
- inkscape:version="0.47 r22583"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="filled-xterm.svg"
sodipodi:version="0.32"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
enable-background="new">
<title
- id="title2983">terminal</title>
+ id="title2983">filled-xterm</title>
<defs
id="defs2987">
<inkscape:perspective
@@ -38,16 +38,16 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="9.8994949"
- inkscape:cx="28.142409"
+ inkscape:cx="2.6865649"
inkscape:cy="22.28651"
inkscape:current-layer="layer2"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="961"
- inkscape:window-height="767"
+ inkscape:window-height="741"
inkscape:window-x="28"
- inkscape:window-y="33"
+ inkscape:window-y="31"
inkscape:window-maximized="0"
objecttolerance="2">
<inkscape:grid
@@ -66,9 +66,9 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>xterm</dc:title>
+ <dc:title>filled-xterm</dc:title>
<cc:license
- rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
+ rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
<dc:creator>
<cc:Agent>
<dc:title>Thomas E. Dickey</dc:title>
@@ -81,11 +81,11 @@
</dc:rights>
<dc:description>XTerm icon, in SVG format.</dc:description>
<dc:date>June 14, 2012</dc:date>
- <dc:source>http://invisible-island.net/xterm/</dc:source>
- <dc:identifier>http://invisible-island.net/xterm/xterm</dc:identifier>
+ <dc:source>https://invisible-island.net/xterm/xterm.icon.html</dc:source>
+ <dc:identifier>https://invisible-island.net/xterm/images/icons-xterm_281.png</dc:identifier>
</cc:Work>
<cc:License
- rdf:about="http://creativecommons.org/licenses/by/3.0/">
+ rdf:about="http://creativecommons.org/licenses/by/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
@@ -628,26 +628,26 @@
d="M 33,44.5 A 0.5,0.5 0 1 1 32,44.5 A 0.5,0.5 0 1 1 33,44.5 z" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Serif;-inkscape-font-specification:Serif"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:serif;-inkscape-font-specification:Serif;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="9.3944197"
y="17.392376"
- id="text2446"
- sodipodi:linespacing="125%"><tspan
+ id="text2446"><tspan
sodipodi:role="line"
id="tspan2448"
x="9.3944197"
- y="17.392376">X</tspan></text>
+ y="17.392376"
+ style="font-size:14px;line-height:1.25;font-family:serif">X</tspan></text>
<text
xml:space="preserve"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Verdana';-inkscape-font-specification:'Verdana';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="9.2934036"
y="27.796949"
- id="text2450"
- sodipodi:linespacing="125%"><tspan
+ id="text2450"><tspan
sodipodi:role="line"
id="tspan2452"
x="9.2934036"
- y="27.796949">TERM</tspan></text>
+ y="27.796949"
+ style="font-size:10px;line-height:1.25">TERM</tspan></text>
<path
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.06060915000000000;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 6.4143258,32.603522 -0.3740542,-0.383067 0,-14.749406 0,-14.7494054 0.3331086,-0.3228616 0.3331087,-0.3228616 16.3145921,0 16.314593,0 0.322861,0.3331086 0.322862,0.3331086 0,14.7481714 0,14.74817 -0.383066,0.374055 -0.383067,0.374054 -16.213441,0 -16.213443,0 -0.3740542,-0.383066 z m 31.4694872,-1.711421 1.188447,-1.185351 0,-12.222844 0,-12.2228439 -1.134774,-1.1380022 -1.134774,-1.1380022 -13.788649,0 -13.7886497,0 -1.1380022,1.1347738 -1.1380022,1.1347739 0,12.2229766 0,12.222976 1.1853501,1.188447 1.1853502,1.188446 13.6876288,0 13.687629,0 1.188446,-1.18535 z"
diff --git a/app/xterm/icons/mini.xterm.svg b/app/xterm/icons/mini.xterm.svg
index 856674480..4946c09c3 100644
--- a/app/xterm/icons/mini.xterm.svg
+++ b/app/xterm/icons/mini.xterm.svg
@@ -13,7 +13,7 @@
height="48px"
id="svg2383"
sodipodi:version="0.32"
- inkscape:version="0.47 r22583"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="mini.xterm.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
@@ -35,7 +35,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.8994949"
- inkscape:cx="26.678508"
+ inkscape:cx="13.950586"
inkscape:cy="23.385677"
inkscape:current-layer="layer2"
showgrid="true"
@@ -43,9 +43,9 @@
inkscape:document-units="px"
gridtolerance="2"
inkscape:window-width="1018"
- inkscape:window-height="771"
+ inkscape:window-height="741"
inkscape:window-x="49"
- inkscape:window-y="22"
+ inkscape:window-y="31"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
@@ -70,10 +70,12 @@
</cc:Agent>
</dc:creator>
<cc:license
- rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
+ rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
+ <dc:source>https://invisible-island.net/xterm/xterm.icon.html</dc:source>
+ <dc:identifier>https://invisible-island.net/xterm/images/mini.xterm_256.png</dc:identifier>
</cc:Work>
<cc:License
- rdf:about="http://creativecommons.org/licenses/by/3.0/">
+ rdf:about="http://creativecommons.org/licenses/by/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
@@ -95,17 +97,16 @@
sodipodi:insensitive="true">
<text
xml:space="preserve"
- style="font-size:59.79689407px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff5e00;fill-opacity:1;stroke:#ff0000;stroke-width:1.19999993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ff5e00;fill-opacity:1;stroke:#ff0000;stroke-width:1.19999993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
x="2.2518597"
y="46.207344"
id="text2393"
- transform="scale(1.0175137,0.9827878)"
- sodipodi:linespacing="125%"><tspan
+ transform="scale(1.0175137,0.9827878)"><tspan
sodipodi:role="line"
id="tspan2395"
x="2.2518597"
y="46.207344"
- style="fill:#ff5e00;fill-opacity:1;stroke:#ff0000;stroke-width:1.19999993;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">X</tspan></text>
+ style="font-size:59.79689407px;line-height:1.25;fill:#ff5e00;fill-opacity:1;stroke:#ff0000;stroke-width:1.19999993;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">X</tspan></text>
</g>
<g
inkscape:groupmode="layer"
@@ -113,16 +114,15 @@
inkscape:label="blue">
<text
xml:space="preserve"
- style="font-size:52.76168442000000169px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#0000f1;fill-opacity:1;stroke:#00a2ff;stroke-width:0.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:URW Bookman L;-inkscape-font-specification:URW Bookman L"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'URW Bookman';-inkscape-font-specification:'URW Bookman';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#0000f1;fill-opacity:1;stroke:#00a2ff;stroke-width:0.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
x="5.3948884"
y="45.424522"
id="text3153"
- sodipodi:linespacing="125%"
transform="scale(1.1128485,0.8985949)"><tspan
sodipodi:role="line"
id="tspan3155"
x="5.3948884"
y="45.424522"
- style="stroke-width:0.6;stroke-miterlimit:4;stroke-dasharray:none">T</tspan></text>
+ style="font-size:52.76168442px;line-height:1.25;stroke-width:0.60000002;stroke-miterlimit:4;stroke-dasharray:none">T</tspan></text>
</g>
</svg>
diff --git a/app/xterm/icons/terminal_48x48.svg b/app/xterm/icons/terminal_48x48.svg
index 8f11627c3..62c2ded66 100644
--- a/app/xterm/icons/terminal_48x48.svg
+++ b/app/xterm/icons/terminal_48x48.svg
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -13,7 +14,7 @@
height="48px"
id="svg2985"
version="1.1"
- inkscape:version="0.46"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="terminal_48x48.svg"
sodipodi:version="0.32"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
@@ -21,15 +22,7 @@
<title
id="title2983">terminal</title>
<defs
- id="defs2987">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 24 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="48 : 24 : 1"
- inkscape:persp3d-origin="24 : 16 : 1"
- id="perspective11" />
- </defs>
+ id="defs2987" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
@@ -38,7 +31,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.8994949"
- inkscape:cx="33.357908"
+ inkscape:cx="7.9020639"
inkscape:cy="21.429765"
inkscape:current-layer="layer2"
showgrid="true"
@@ -68,7 +61,7 @@
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>terminal</dc:title>
<cc:license
- rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
+ rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
<dc:creator>
<cc:Agent>
<dc:title>Thomas E. Dickey</dc:title>
@@ -81,11 +74,11 @@
</dc:rights>
<dc:description>Translated from the X11 bitmaps/terminal file through stages to svg.</dc:description>
<dc:date>June 14, 2012</dc:date>
- <dc:source>http://invisible-island.net/xterm/</dc:source>
- <dc:identifier>http://invisible-island.net/xterm/terminal_48x48</dc:identifier>
+ <dc:source>https://invisible-island.net/xterm/xterm.icon.html</dc:source>
+ <dc:identifier>https://invisible-island.net/xterm/images/icons-terminal.png</dc:identifier>
</cc:Work>
<cc:License
- rdf:about="http://creativecommons.org/licenses/by/3.0/">
+ rdf:about="http://creativecommons.org/licenses/by/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
diff --git a/app/xterm/icons/xterm-color.svg b/app/xterm/icons/xterm-color.svg
index 24d48eee9..b35ed914f 100644
--- a/app/xterm/icons/xterm-color.svg
+++ b/app/xterm/icons/xterm-color.svg
@@ -13,13 +13,13 @@
height="48px"
id="svg2985"
version="1.1"
- inkscape:version="0.47 r22583"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="xterm-color.svg"
sodipodi:version="0.32"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
enable-background="new">
<title
- id="title2983">terminal</title>
+ id="title2983">xterm-color</title>
<defs
id="defs2987">
<inkscape:perspective
@@ -38,16 +38,16 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.313708"
- inkscape:cx="23.637681"
+ inkscape:cx="12.500749"
inkscape:cy="25.479115"
inkscape:current-layer="layer3"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
- inkscape:window-width="1258"
- inkscape:window-height="786"
- inkscape:window-x="3"
- inkscape:window-y="44"
+ inkscape:window-width="1172"
+ inkscape:window-height="741"
+ inkscape:window-x="0"
+ inkscape:window-y="31"
inkscape:window-maximized="0"
objecttolerance="2">
<inkscape:grid
@@ -66,9 +66,9 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>xterm</dc:title>
+ <dc:title>xterm-color</dc:title>
<cc:license
- rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
+ rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
<dc:creator>
<cc:Agent>
<dc:title>Thomas E. Dickey</dc:title>
@@ -81,11 +81,11 @@
</dc:rights>
<dc:description>XTerm icon, in SVG format.</dc:description>
<dc:date>June 14, 2012</dc:date>
- <dc:source>http://invisible-island.net/xterm/</dc:source>
- <dc:identifier>http://invisible-island.net/xterm/xterm</dc:identifier>
+ <dc:source>https://invisible-island.net/xterm/xterm.icon.html</dc:source>
+ <dc:identifier>https://invisible-island.net/xterm/images/icons-xterm-color_226.png</dc:identifier>
</cc:Work>
<cc:License
- rdf:about="http://creativecommons.org/licenses/by/3.0/">
+ rdf:about="http://creativecommons.org/licenses/by/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
@@ -687,27 +687,27 @@
inkscape:groupmode="layer"
sodipodi:insensitive="true">
<text
- sodipodi:linespacing="125%"
id="text3038"
y="17.392376"
x="9.3944197"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Serif;-inkscape-font-specification:Serif"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:serif;-inkscape-font-specification:Serif;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
y="17.392376"
x="9.3944197"
id="tspan3040"
- sodipodi:role="line">X</tspan></text>
+ sodipodi:role="line"
+ style="font-size:14px;line-height:1.25;font-family:serif">X</tspan></text>
<text
- sodipodi:linespacing="125%"
id="text3042"
y="27.796949"
x="9.2934036"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Verdana';-inkscape-font-specification:'Verdana';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
y="27.796949"
x="9.2934036"
id="tspan3044"
- sodipodi:role="line">TERM</tspan></text>
+ sodipodi:role="line"
+ style="font-size:10px;line-height:1.25">TERM</tspan></text>
<path
inkscape:connector-curvature="0"
id="path3046"
diff --git a/app/xterm/icons/xterm.svg b/app/xterm/icons/xterm.svg
index 0f9641a09..675367b58 100644
--- a/app/xterm/icons/xterm.svg
+++ b/app/xterm/icons/xterm.svg
@@ -13,13 +13,13 @@
height="48px"
id="svg2985"
version="1.1"
- inkscape:version="0.47 r22583"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="xterm.svg"
sodipodi:version="0.32"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
enable-background="new">
<title
- id="title2983">terminal</title>
+ id="title2983">xterm</title>
<defs
id="defs2987">
<inkscape:perspective
@@ -32,13 +32,13 @@
</defs>
<sodipodi:namedview
id="base"
- pagecolor="#000000"
+ pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
- inkscape:pageopacity="0"
+ inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.8994949"
- inkscape:cx="10.099708"
+ inkscape:cx="-15.356136"
inkscape:cy="22.28651"
inkscape:current-layer="layer2"
showgrid="true"
@@ -68,7 +68,7 @@
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>xterm</dc:title>
<cc:license
- rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
+ rdf:resource="http://creativecommons.org/licenses/by/4.0/" />
<dc:creator>
<cc:Agent>
<dc:title>Thomas E. Dickey</dc:title>
@@ -81,11 +81,11 @@
</dc:rights>
<dc:description>XTerm icon, in SVG format.</dc:description>
<dc:date>June 14, 2012</dc:date>
- <dc:source>http://invisible-island.net/xterm/</dc:source>
- <dc:identifier>http://invisible-island.net/xterm/xterm</dc:identifier>
+ <dc:source>https://invisible-island.net/xterm/xterm.icon.html</dc:source>
+ <dc:identifier>https://invisible-island.net/xterm/images/icons-xterm_281.png</dc:identifier>
</cc:Work>
<cc:License
- rdf:about="http://creativecommons.org/licenses/by/3.0/">
+ rdf:about="http://creativecommons.org/licenses/by/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
@@ -628,25 +628,25 @@
d="M 33,44.5 A 0.5,0.5 0 1 1 32,44.5 A 0.5,0.5 0 1 1 33,44.5 z" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Serif;-inkscape-font-specification:Serif"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:serif;-inkscape-font-specification:Serif;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="9.3944197"
y="17.392376"
- id="text2446"
- sodipodi:linespacing="125%"><tspan
+ id="text2446"><tspan
sodipodi:role="line"
id="tspan2448"
x="9.3944197"
- y="17.392376">X</tspan></text>
+ y="17.392376"
+ style="font-size:14px;line-height:1.25;font-family:serif">X</tspan></text>
<text
xml:space="preserve"
- style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Verdana';-inkscape-font-specification:'Verdana';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="9.2934036"
y="27.796949"
- id="text2450"
- sodipodi:linespacing="125%"><tspan
+ id="text2450"><tspan
sodipodi:role="line"
id="tspan2452"
x="9.2934036"
- y="27.796949">TERM</tspan></text>
+ y="27.796949"
+ style="font-size:10px;line-height:1.25">TERM</tspan></text>
</g>
</svg>
diff --git a/app/xterm/input.c b/app/xterm/input.c
index c48b9f4ea..82ad56d4c 100644
--- a/app/xterm/input.c
+++ b/app/xterm/input.c
@@ -1,7 +1,7 @@
-/* $XTermId: input.c,v 1.363 2019/11/13 23:05:06 tom Exp $ */
+/* $XTermId: input.c,v 1.365 2020/10/12 19:21:53 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -2050,14 +2050,8 @@ VTInitModifiers(XtermWidget xw)
/*
* Force TranslationsUseKeyword() to reload.
*/
- if (xw->keyboard.shell_translations) {
- free(xw->keyboard.shell_translations);
- xw->keyboard.shell_translations = 0;
- }
- if (xw->keyboard.xterm_translations) {
- free(xw->keyboard.xterm_translations);
- xw->keyboard.xterm_translations = 0;
- }
+ FreeAndNull(xw->keyboard.shell_translations);
+ FreeAndNull(xw->keyboard.xterm_translations);
/*
* If the Alt modifier is used in translations, we would rather not
diff --git a/app/xterm/main.c b/app/xterm/main.c
index 3a5637f98..ce2bda8ee 100644
--- a/app/xterm/main.c
+++ b/app/xterm/main.c
@@ -1,7 +1,7 @@
-/* $XTermId: main.c,v 1.859 2019/11/17 20:11:09 tom Exp $ */
+/* $XTermId: main.c,v 1.866 2020/10/12 18:37:02 tom Exp $ */
/*
- * Copyright 2002-2018,2019 by Thomas E. Dickey
+ * Copyright 2002-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -94,7 +94,6 @@
#include <graphics.h>
#include <X11/cursorfont.h>
-#include <X11/Xlocale.h>
#if OPT_TOOLBAR
@@ -137,6 +136,7 @@
#include <grp.h> /* initgroups() */
#endif
+static void hungtty(int) GCC_NORETURN;
static void Syntax(char *) GCC_NORETURN;
static void HsSysError(int) GCC_NORETURN;
@@ -1086,6 +1086,7 @@ DATA("-nul", "*underLine", XrmoptionNoArg, "off"),
DATA("+nul", "*underLine", XrmoptionNoArg, "on"),
DATA("-pc", "*boldColors", XrmoptionNoArg, "on"),
DATA("+pc", "*boldColors", XrmoptionNoArg, "off"),
+DATA("-pf", "*pointerFont", XrmoptionSepArg, NULL),
DATA("-rw", "*reverseWrap", XrmoptionNoArg, "on"),
DATA("+rw", "*reverseWrap", XrmoptionNoArg, "off"),
DATA("-s", "*multiScroll", XrmoptionNoArg, "on"),
@@ -1255,6 +1256,7 @@ static OptionHelp xtermOptions[] = {
{ "-cc classrange", "specify additional character classes" },
{ "-/+cm", "turn off/on ANSI color mode" },
{ "-/+cn", "turn on/off cut newline inhibit" },
+{ "-pf fontname", "cursor font for text area pointer" },
{ "-cr color", "text cursor color" },
{ "-/+cu", "turn on/off curses emulation" },
{ "-/+dc", "turn off/on dynamic color selection" },
@@ -1556,7 +1558,6 @@ parseArg(int *num, char **argv, char **valuep)
};
#undef DATA
/* *INDENT-ON* */
-
XrmOptionDescRec *result = 0;
Cardinal inlist;
Cardinal limit = XtNumber(optionDescList) + XtNumber(opTable);
@@ -2578,12 +2579,14 @@ main(int argc, char *argv[]ENVP_ARG)
case 'b':
if (strcmp(argv[0], "-baudrate"))
Syntax(*argv);
- argc--, argv++;
+ argc--;
+ argv++;
continue;
case 'c':
if (strcmp(argv[0], "-class"))
Syntax(*argv);
- argc--, argv++;
+ argc--;
+ argv++;
continue;
case 'e':
if (strcmp(argv[0], "-e"))
@@ -2593,7 +2596,8 @@ main(int argc, char *argv[]ENVP_ARG)
case 'i':
if (strcmp(argv[0], "-into"))
Syntax(*argv);
- argc--, argv++;
+ argc--;
+ argv++;
continue;
default:
@@ -3177,7 +3181,7 @@ static const char *const vtterm[] =
"x11term", /* for people who want special term name */
#endif
DFT_TERMTYPE, /* for people who want special term name */
- "xterm", /* the prefered name, should be fastest */
+ "xterm", /* the preferred name, should be fastest */
"vt102",
"vt100",
"ansi",
@@ -3224,7 +3228,7 @@ typedef struct {
/* the buffer is large enough that we can always have a trailing null */
#define copy_handshake(dst, src) \
- strncpy(dst.buffer, src, HANDSHAKE_LEN - 1)[HANDSHAKE_LEN - 1] = '\0'
+ strncpy(dst.buffer, src, (size_t)HANDSHAKE_LEN - 1)[HANDSHAKE_LEN - 1] = '\0'
#if OPT_TRACE
static void
@@ -3615,8 +3619,7 @@ resetShell(char *oldPath)
{
char *newPath = x_strdup("/bin/sh");
char *envPath = getenv("SHELL");
- if (oldPath != 0)
- free(oldPath);
+ free(oldPath);
if (!IsEmpty(envPath))
xtermSetenv("SHELL", newPath);
return newPath;
@@ -5056,7 +5059,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed)
signal(SIGHUP, SIG_DFL);
#endif
- if ((shname_minus = TextAlloc(strlen(shname) + 1)) != 0) {
+ if ((shname_minus = malloc(strlen(shname) + 2)) != 0) {
(void) strcpy(shname_minus, "-");
(void) strcat(shname_minus, shname);
} else {
diff --git a/app/xterm/main.h b/app/xterm/main.h
index 71358e165..a9fc18f77 100644
--- a/app/xterm/main.h
+++ b/app/xterm/main.h
@@ -1,7 +1,7 @@
-/* $XTermId: main.h,v 1.72 2019/07/19 00:45:03 tom Exp $ */
+/* $XTermId: main.h,v 1.74 2020/12/19 00:19:51 tom Exp $ */
/*
- * Copyright 2000-2018,2019 by Thomas E. Dickey
+ * Copyright 2000-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -132,7 +132,7 @@
#endif
#ifndef DEF_DISALLOWED_PASTE_CONTROLS
-#define DEF_DISALLOWED_PASTE_CONTROLS "BS,HT,DEL,ESC"
+#define DEF_DISALLOWED_PASTE_CONTROLS "BS,DEL,ENQ,EOT,ESC,NUL"
#endif
#ifndef DEF_DISALLOWED_TCAP
@@ -255,6 +255,9 @@
#define DEFLOCALEFILTER DEFLOCALEFILTER1(PROJECTROOT) "/bin/luit"
#endif
+#define MIN_SCALE_HEIGHT 0.9f
+#define MAX_SCALE_HEIGHT 1.5f
+
/*
* See lib/Xt/Resources.c
*/
diff --git a/app/xterm/menu.c b/app/xterm/menu.c
index 7580c3cda..8f704e6fe 100644
--- a/app/xterm/menu.c
+++ b/app/xterm/menu.c
@@ -1,7 +1,7 @@
-/* $XTermId: menu.c,v 1.358 2019/09/17 08:11:55 tom Exp $ */
+/* $XTermId: menu.c,v 1.364 2020/10/13 08:07:27 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -59,8 +59,6 @@
#include <fontutils.h>
#include <xstrings.h>
-#include <locale.h>
-
#include <X11/Xmu/CharSet.h>
#define app_con Xaw_app_con /* quiet a warning from SimpleMenu.h */
@@ -151,14 +149,14 @@ static void do_autolinefeed PROTO_XT_CALLBACK_ARGS;
static void do_autowrap PROTO_XT_CALLBACK_ARGS;
static void do_backarrow PROTO_XT_CALLBACK_ARGS;
static void do_bellIsUrgent PROTO_XT_CALLBACK_ARGS;
-static void do_clearsavedlines PROTO_XT_CALLBACK_ARGS;
+static void do_clearsavedlines PROTO_XT_CALLBACK_ARGS GCC_NORETURN;
static void do_continue PROTO_XT_CALLBACK_ARGS;
static void do_delete_del PROTO_XT_CALLBACK_ARGS;
#if OPT_SCREEN_DUMPS
static void do_dump_html PROTO_XT_CALLBACK_ARGS;
static void do_dump_svg PROTO_XT_CALLBACK_ARGS;
#endif
-static void do_hardreset PROTO_XT_CALLBACK_ARGS;
+static void do_hardreset PROTO_XT_CALLBACK_ARGS GCC_NORETURN;
static void do_interrupt PROTO_XT_CALLBACK_ARGS;
static void do_jumpscroll PROTO_XT_CALLBACK_ARGS;
static void do_keepClipboard PROTO_XT_CALLBACK_ARGS;
@@ -168,7 +166,7 @@ static void do_old_fkeys PROTO_XT_CALLBACK_ARGS;
static void do_poponbell PROTO_XT_CALLBACK_ARGS;
static void do_print PROTO_XT_CALLBACK_ARGS;
static void do_print_redir PROTO_XT_CALLBACK_ARGS;
-static void do_quit PROTO_XT_CALLBACK_ARGS;
+static void do_quit PROTO_XT_CALLBACK_ARGS GCC_NORETURN;
static void do_redraw PROTO_XT_CALLBACK_ARGS;
static void do_reversevideo PROTO_XT_CALLBACK_ARGS;
static void do_reversewrap PROTO_XT_CALLBACK_ARGS;
@@ -177,7 +175,7 @@ static void do_scrollkey PROTO_XT_CALLBACK_ARGS;
static void do_scrollttyoutput PROTO_XT_CALLBACK_ARGS;
static void do_securekbd PROTO_XT_CALLBACK_ARGS;
static void do_selectClipboard PROTO_XT_CALLBACK_ARGS;
-static void do_softreset PROTO_XT_CALLBACK_ARGS;
+static void do_softreset PROTO_XT_CALLBACK_ARGS GCC_NORETURN;
static void do_suspend PROTO_XT_CALLBACK_ARGS;
static void do_terminate PROTO_XT_CALLBACK_ARGS;
static void do_titeInhibit PROTO_XT_CALLBACK_ARGS;
@@ -412,6 +410,7 @@ MenuEntry fontMenuEntries[] = {
{ "font4", do_vtfont, NULL },
{ "font5", do_vtfont, NULL },
{ "font6", do_vtfont, NULL },
+ { "font7", do_vtfont, NULL },
/* this is after the last builtin font; the other entries are special */
{ "fontescape", do_vtfont, NULL },
{ "fontsel", do_vtfont, NULL },
@@ -508,31 +507,11 @@ static MenuList vt_shell[NUM_POPUP_MENUS];
static MenuList tek_shell[NUM_POPUP_MENUS];
#endif
-static String
-setMenuLocale(Bool before, String substitute)
-{
- String result = setlocale(LC_CTYPE, 0);
-
- if (before) {
- result = x_strdup(result);
- }
- (void) setlocale(LC_CTYPE, substitute);
- TRACE(("setMenuLocale %s:%s\n",
- (before
- ? "before"
- : "after"),
- NonNull(result)));
- if (!before) {
- free((void *) substitute);
- }
- return result;
-}
-
/*
* Returns a pointer to the MenuList entry that matches the popup menu.
*/
static MenuList *
-select_menu(Widget w GCC_UNUSED, MenuIndex num)
+select_menu(Widget w, MenuIndex num)
{
#if OPT_TEK4014 && OPT_TOOLBAR
while (w != 0) {
@@ -541,6 +520,8 @@ select_menu(Widget w GCC_UNUSED, MenuIndex num)
}
w = XtParent(w);
}
+#else
+ (void) w;
#endif
return &vt_shell[num];
}
@@ -618,7 +599,7 @@ unusedEntries(XtermWidget xw, MenuIndex num)
}
break;
case vtMenu:
-#ifndef NO_ACTIVE_ICON
+#if !defined(NO_ACTIVE_ICON) && !OPT_TOOLBAR
if (!getIconicFont(screen)->fs || !screen->iconVwin.window) {
result[vtMenu_activeicon] = True;
}
@@ -687,7 +668,7 @@ create_menu(Widget w, XtermWidget xw, MenuIndex num)
struct _MenuEntry *entries = data->entry_list;
Cardinal nentries = data->entry_len;
#if !OPT_TOOLBAR
- String saveLocale;
+ char *saveLocale;
#endif
if (screen->menu_item_bitmap == None) {
@@ -708,7 +689,7 @@ create_menu(Widget w, XtermWidget xw, MenuIndex num)
(char *) check_bits, check_width, check_height);
}
#if !OPT_TOOLBAR
- saveLocale = setMenuLocale(True, resource.menuLocale);
+ saveLocale = xtermSetLocale(LC_CTYPE, resource.menuLocale);
list->w = XtCreatePopupShell(data->internal_name,
simpleMenuWidgetClass,
toplevel,
@@ -745,7 +726,7 @@ create_menu(Widget w, XtermWidget xw, MenuIndex num)
#endif
}
#if !OPT_TOOLBAR
- (void) setMenuLocale(False, saveLocale);
+ xtermResetLocale(LC_CTYPE, saveLocale);
#endif
/* do not realize at this point */
@@ -868,7 +849,7 @@ domenu(Widget w,
int n;
set_menu_font(True);
- for (n = fontMenu_font1; n <= fontMenu_font6; ++n) {
+ for (n = fontMenu_font1; n <= fontMenu_font7; ++n) {
if (IsEmpty(screen->menu_font_names[n][fNorm]))
SetItemSensitivity(fontMenuEntries[n].widget, False);
}
@@ -2181,8 +2162,8 @@ HandleWriteError(Widget w,
void
HandlePrintScreen(Widget w GCC_UNUSED,
XEvent *event GCC_UNUSED,
- String *params GCC_UNUSED,
- Cardinal *param_count GCC_UNUSED)
+ String *params,
+ Cardinal *param_count)
{
xtermPrintScreen(term, True, getPrinterFlags(term, params, param_count));
}
@@ -2313,8 +2294,8 @@ do_fullscreen(Widget gw GCC_UNUSED,
void
HandleFullscreen(Widget w,
XEvent *event GCC_UNUSED,
- String *params GCC_UNUSED,
- Cardinal *param_count GCC_UNUSED)
+ String *params,
+ Cardinal *param_count)
{
XtermWidget xw = term;
@@ -3042,7 +3023,7 @@ SetupShell(Widget *menus, MenuList * shell, int n, int m)
char *external_name = 0;
Dimension button_height;
Dimension button_border;
- String saveLocale = setMenuLocale(True, resource.menuLocale);
+ char *saveLocale = xtermSetLocale(LC_CTYPE, resource.menuLocale);
shell[n].w = XtVaCreatePopupShell(menu_names[n].internal_name,
simpleMenuWidgetClass,
@@ -3075,7 +3056,7 @@ SetupShell(Widget *menus, MenuList * shell, int n, int m)
XtNborderWidth, &button_border,
(XtPointer) 0);
- (void) setMenuLocale(False, saveLocale);
+ xtermResetLocale(LC_CTYPE, saveLocale);
return (Dimension) (button_height + (button_border * 2));
}
#endif /* OPT_TOOLBAR */
@@ -3305,13 +3286,35 @@ ShowToolbar(Bool enable)
resource.toolBar = (Boolean) enable;
update_toolbar();
}
+#if OPT_TOOLBAR
+ /*
+ * Layout for the toolbar confuses the Shell widget. Remind it that we
+ * would like to be iconified if the corresponding resource was set.
+ */
+ {
+ static Bool first = True;
+ if (first && XtIsRealized(toplevel)) {
+ Boolean iconic = 0;
+
+ XtVaGetValues(toplevel,
+ XtNiconic, &iconic,
+ (XtPointer) 0);
+
+ if (iconic) {
+ TRACE(("...please iconify window %#lx\n", XtWindow(toplevel)));
+ xtermIconify(xw);
+ }
+ first = False;
+ }
+ }
+#endif
}
void
HandleToolbar(Widget w,
XEvent *event GCC_UNUSED,
- String *params GCC_UNUSED,
- Cardinal *param_count GCC_UNUSED)
+ String *params,
+ Cardinal *param_count)
{
XtermWidget xw = term;
diff --git a/app/xterm/menu.h b/app/xterm/menu.h
index 2cc328293..ff1210973 100644
--- a/app/xterm/menu.h
+++ b/app/xterm/menu.h
@@ -1,7 +1,7 @@
-/* $XTermId: menu.h,v 1.143 2019/01/13 17:21:25 tom Exp $ */
+/* $XTermId: menu.h,v 1.145 2020/09/15 11:09:06 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -95,7 +95,7 @@ extern void HandleAutoLineFeed PROTO_XT_ACTIONS_ARGS;
extern void HandleAutoWrap PROTO_XT_ACTIONS_ARGS;
extern void HandleBackarrow PROTO_XT_ACTIONS_ARGS;
extern void HandleBellIsUrgent PROTO_XT_ACTIONS_ARGS;
-extern void HandleClearSavedLines PROTO_XT_ACTIONS_ARGS;
+extern void HandleClearSavedLines PROTO_XT_ACTIONS_ARGS GCC_NORETURN;
extern void HandleCreateMenu PROTO_XT_ACTIONS_ARGS;
extern void HandleCursesEmul PROTO_XT_ACTIONS_ARGS;
extern void HandleCursorBlink PROTO_XT_ACTIONS_ARGS;
@@ -107,7 +107,7 @@ extern void HandleFontDoublesize PROTO_XT_ACTIONS_ARGS;
extern void HandleFontLoading PROTO_XT_ACTIONS_ARGS;
extern void HandleFontPacked PROTO_XT_ACTIONS_ARGS;
extern void HandleFullscreen PROTO_XT_ACTIONS_ARGS;
-extern void HandleHardReset PROTO_XT_ACTIONS_ARGS;
+extern void HandleHardReset PROTO_XT_ACTIONS_ARGS GCC_NORETURN;
extern void HandleHpFunctionKeys PROTO_XT_ACTIONS_ARGS;
extern void HandleJumpscroll PROTO_XT_ACTIONS_ARGS;
extern void HandleKeepClipboard PROTO_XT_ACTIONS_ARGS;
@@ -123,7 +123,7 @@ extern void HandlePrintEverything PROTO_XT_ACTIONS_ARGS;
extern void HandlePrintImmediate PROTO_XT_ACTIONS_ARGS;
extern void HandlePrintOnError PROTO_XT_ACTIONS_ARGS;
extern void HandlePrintScreen PROTO_XT_ACTIONS_ARGS;
-extern void HandleQuit PROTO_XT_ACTIONS_ARGS;
+extern void HandleQuit PROTO_XT_ACTIONS_ARGS GCC_NORETURN;
extern void HandleRedraw PROTO_XT_ACTIONS_ARGS;
extern void HandleRenderFont PROTO_XT_ACTIONS_ARGS;
extern void HandleReverseVideo PROTO_XT_ACTIONS_ARGS;
@@ -141,7 +141,7 @@ extern void HandleSetTekText PROTO_XT_ACTIONS_ARGS;
extern void HandleSetTerminalType PROTO_XT_ACTIONS_ARGS;
extern void HandleSetVisualBell PROTO_XT_ACTIONS_ARGS;
extern void HandleSixelScrolling PROTO_XT_ACTIONS_ARGS;
-extern void HandleSoftReset PROTO_XT_ACTIONS_ARGS;
+extern void HandleSoftReset PROTO_XT_ACTIONS_ARGS GCC_NORETURN;
extern void HandleSunFunctionKeys PROTO_XT_ACTIONS_ARGS;
extern void HandleSunKeyboard PROTO_XT_ACTIONS_ARGS;
extern void HandleTekCopy PROTO_XT_ACTIONS_ARGS;
@@ -293,7 +293,8 @@ typedef enum {
fontMenu_font4,
fontMenu_font5,
fontMenu_font6,
-#define fontMenu_lastBuiltin fontMenu_font6
+ fontMenu_font7,
+#define fontMenu_lastBuiltin fontMenu_font7
fontMenu_fontescape,
fontMenu_fontsel,
/* number of non-line items down to here should match NMENUFONTS in ptyx.h */
diff --git a/app/xterm/misc.c b/app/xterm/misc.c
index fe60c54ed..c8e8049d0 100644
--- a/app/xterm/misc.c
+++ b/app/xterm/misc.c
@@ -1,7 +1,7 @@
-/* $XTermId: misc.c,v 1.916 2019/11/14 01:11:46 tom Exp $ */
+/* $XTermId: misc.c,v 1.965 2020/12/23 00:21:44 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -68,7 +68,6 @@
#include <X11/keysym.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
-#include <X11/Xlocale.h>
#include <X11/Xmu/Error.h>
#include <X11/Xmu/SysUtil.h>
@@ -204,10 +203,10 @@ selectwindow(XtermWidget xw, int flag)
#endif
if (screen->cursor_state && CursorMoved(screen))
- HideCursor();
+ HideCursor(xw);
screen->select |= flag;
if (screen->cursor_state)
- ShowCursor();
+ ShowCursor(xw);
}
GetScrollLock(screen);
}
@@ -243,9 +242,9 @@ unselectwindow(XtermWidget xw, int flag)
screen->select &= ~flag;
if (screen->cursor_state && CursorMoved(screen))
- HideCursor();
+ HideCursor(xw);
if (screen->cursor_state)
- ShowCursor();
+ ShowCursor(xw);
}
}
}
@@ -486,6 +485,41 @@ mergeConfigureEvents(XEvent *target)
}
/*
+ * Work around a bug in the X mouse code, which delivers duplicate events.
+ */
+static XtInputMask
+mergeButtonEvents(XEvent *target)
+{
+ XEvent next_event;
+ XButtonEvent *p;
+
+ XtAppNextEvent(app_con, target);
+ p = (XButtonEvent *) target;
+
+ if (XtAppPending(app_con)
+ && XtAppPeekEvent(app_con, &next_event)
+ && !memcmp(target, &next_event, sizeof(XButtonEvent))) {
+ Boolean merge_this = False;
+ XButtonEvent *q = (XButtonEvent *) (&next_event);
+
+ XtAppNextEvent(app_con, &next_event);
+ TRACE_EVENT("pending", &next_event, (String *) 0, 0);
+
+ if (p->window == q->window) {
+ TRACE(("pending ButtonEvent...merged\n"));
+ merge_this = True;
+ }
+ if (!merge_this) {
+ TRACE(("pending ButtonEvent...skipped\n"));
+ XtDispatchEvent(target);
+ }
+ *target = next_event;
+ }
+ XtDispatchEvent(target);
+ return XtAppPending(app_con);
+}
+
+/*
* Filter redundant Expose- and ConfigureNotify-events. This is limited to
* adjacent events because there could be other event-loop processing. Absent
* that limitation, it might be possible to scan ahead to find when the screen
@@ -508,6 +542,9 @@ xtermAppPending(void)
result = mergeExposeEvents(&this_event);
} else if (this_event.type == ConfigureNotify) {
result = mergeConfigureEvents(&this_event);
+ } else if (this_event.type == ButtonPress ||
+ this_event.type == ButtonRelease) {
+ result = mergeButtonEvents(&this_event);
} else {
break;
}
@@ -583,16 +620,20 @@ xevents(XtermWidget xw)
DoSpecialEnterNotify(xw, &event.xcrossing);
} else if (OUR_EVENT(event, LeaveNotify)) {
DoSpecialLeaveNotify(xw, &event.xcrossing);
- } else if ((screen->send_mouse_pos == ANY_EVENT_MOUSE
+ } else if (event.xany.type == MotionNotify
+ && event.xcrossing.window == XtWindow(xw)) {
+ switch (screen->send_mouse_pos) {
+ case ANY_EVENT_MOUSE:
#if OPT_DEC_LOCATOR
- || screen->send_mouse_pos == DEC_LOCATOR
+ case DEC_LOCATOR:
#endif /* OPT_DEC_LOCATOR */
- )
- && event.xany.type == MotionNotify
- && event.xcrossing.window == XtWindow(xw)) {
- SendMousePosition(xw, &event);
- xtermShowPointer(xw, True);
- continue;
+ SendMousePosition(xw, &event);
+ xtermShowPointer(xw, True);
+ continue;
+ case BTN_EVENT_MOUSE:
+ SendMousePosition(xw, &event);
+ xtermShowPointer(xw, True);
+ }
}
/*
@@ -633,6 +674,10 @@ xevents(XtermWidget xw)
(event.xany.type != ButtonPress) &&
(event.xany.type != ButtonRelease))) {
+ if (event.xany.type == MappingNotify) {
+ XRefreshKeyboardMapping(&(event.xmapping));
+ VTInitModifiers(xw);
+ }
XtDispatchEvent(&event);
}
} while (xtermAppPending() & XtIMXEvent);
@@ -659,15 +704,15 @@ make_hidden_cursor(XtermWidget xw)
fn = XLoadQueryFont(dpy, DEFFONT);
}
- if (fn != 0) {
+ if (fn != None) {
/* a space character seems to work as a cursor (dots are not needed) */
c = XCreateGlyphCursor(dpy, fn->fid, fn->fid, 'X', ' ', &dummy, &dummy);
XFreeFont(dpy, fn);
} else {
- c = 0;
+ c = None;
}
TRACE(("XCreateGlyphCursor ->%#lx\n", c));
- return (c);
+ return c;
}
/*
@@ -766,19 +811,56 @@ cleanup_colored_cursor(void)
}
Cursor
-make_colored_cursor(unsigned cursorindex, /* index into font */
+make_colored_cursor(unsigned c_index, /* index into font */
unsigned long fg, /* pixel value */
unsigned long bg) /* pixel value */
{
TScreen *screen = TScreenOf(term);
- Cursor c;
+ Cursor c = None;
Display *dpy = screen->display;
- c = XCreateFontCursor(dpy, cursorindex);
+ TRACE(("alternate cursor font is \"%s\"\n", screen->cursor_font_name));
+ if (!IsEmpty(screen->cursor_font_name)) {
+ static XTermFonts myFont;
+
+ /* adapted from XCreateFontCursor(), which hardcodes the font name */
+ TRACE(("loading cursor from alternate cursor font\n"));
+ if ((myFont.fs = XLoadQueryFont(dpy, screen->cursor_font_name)) != 0) {
+ if (!xtermMissingChar(c_index, &myFont)
+ && !xtermMissingChar(c_index + 1, &myFont)) {
+#define DATA(c) { 0UL, c, c, c, 0, 0 }
+ static XColor foreground = DATA(0);
+ static XColor background = DATA(65535);
+#undef DATA
+
+ /*
+ * Cursor fonts follow each shape glyph with a mask glyph; so
+ * that character position 0 contains a shape, 1 the mask for
+ * 0, 2 a shape, 3 a mask for 2, etc. <X11/cursorfont.h>
+ * contains defined names for each shape.
+ */
+ c = XCreateGlyphCursor(dpy,
+ myFont.fs->fid, /* source_font */
+ myFont.fs->fid, /* mask_font */
+ c_index + 0, /* source_char */
+ c_index + 1, /* mask_char */
+ &foreground,
+ &background);
+ }
+ XFreeFont(dpy, myFont.fs);
+ }
+ if (c == None) {
+ xtermWarning("cannot load cursor %u from alternate cursor font \"%s\"\n",
+ c_index, screen->cursor_font_name);
+ }
+ }
+ if (c == None)
+ c = XCreateFontCursor(dpy, c_index);
+
if (c != None) {
recolor_cursor(screen, c, fg, bg);
}
- return (c);
+ return c;
}
/* ARGSUSED */
@@ -936,8 +1018,7 @@ HandleSpawnTerminal(Widget w GCC_UNUSED,
}
/* We are the parent; clean up */
- if (child_cwd)
- free(child_cwd);
+ free(child_cwd);
free(child_exe);
}
#endif /* OPT_EXEC_XTERM */
@@ -1290,7 +1371,7 @@ void
xtermPerror(const char *fmt, ...)
{
int save_err = errno;
- char *msg = strerror(errno);
+ const char *msg = strerror(errno);
va_list ap;
fflush(stdout);
@@ -1426,13 +1507,11 @@ dabbrev_expand(XtermWidget xw)
cell.col = screen->cur_col;
cell.row = screen->cur_row;
- if (dabbrev_hint != 0)
- free(dabbrev_hint);
+ free(dabbrev_hint);
if ((dabbrev_hint = dabbrev_prev_word(xw, &cell, &ld)) != 0) {
- if (lastexpansion != 0)
- free(lastexpansion);
+ free(lastexpansion);
if ((lastexpansion = strdup(dabbrev_hint)) != 0) {
@@ -1448,10 +1527,8 @@ dabbrev_expand(XtermWidget xw)
return result;
}
if (!screen->dabbrev_working) {
- if (lastexpansion != 0) {
- free(lastexpansion);
- lastexpansion = 0;
- }
+ free(lastexpansion);
+ lastexpansion = 0;
return result;
}
}
@@ -1521,6 +1598,104 @@ HandleDabbrevExpand(Widget w,
}
#endif /* OPT_DABBREV */
+void
+xtermDeiconify(XtermWidget xw)
+{
+ TScreen *screen = TScreenOf(xw);
+ Display *dpy = screen->display;
+ Window target = VShellWindow(xw);
+ XEvent e;
+ Atom atom_state = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
+
+ if (xtermIsIconified(xw)) {
+ TRACE(("...de-iconify window %#lx\n", target));
+ XMapWindow(dpy, target);
+
+ memset(&e, 0, sizeof(e));
+ e.xclient.type = ClientMessage;
+ e.xclient.message_type = atom_state;
+ e.xclient.display = dpy;
+ e.xclient.window = target;
+ e.xclient.format = 32;
+ e.xclient.data.l[0] = 1;
+ e.xclient.data.l[1] = CurrentTime;
+
+ XSendEvent(dpy, DefaultRootWindow(dpy), False,
+ SubstructureRedirectMask | SubstructureNotifyMask, &e);
+ xevents(xw);
+ }
+}
+
+void
+xtermIconify(XtermWidget xw)
+{
+ TScreen *screen = TScreenOf(xw);
+ Window target = VShellWindow(xw);
+
+ if (!xtermIsIconified(xw)) {
+ TRACE(("...iconify window %#lx\n", target));
+ XIconifyWindow(screen->display,
+ target,
+ DefaultScreen(screen->display));
+ xevents(xw);
+ }
+}
+
+Boolean
+xtermIsIconified(XtermWidget xw)
+{
+ XWindowAttributes win_attrs;
+ TScreen *screen = TScreenOf(xw);
+ Window target = VShellWindow(xw);
+ Display *dpy = screen->display;
+ Boolean result = False;
+
+ if (xtermGetWinAttrs(dpy, target, &win_attrs)) {
+ Atom actual_return_type;
+ int actual_format_return = 0;
+ unsigned long nitems_return = 0;
+ unsigned long bytes_after_return = 0;
+ unsigned char *prop_return = 0;
+ long long_length = 1024;
+ Atom requested_type = XA_ATOM;
+ Atom is_hidden = XInternAtom(dpy, "_NET_WM_STATE_HIDDEN", False);
+ Atom wm_state = XInternAtom(dpy, "_NET_WM_STATE", False);
+
+ /* this works with non-EWMH */
+ result = (win_attrs.map_state != IsViewable) ? True : False;
+
+ /* this is a convention used by some EWMH applications */
+ if (xtermGetWinProp(dpy,
+ target,
+ wm_state,
+ 0L,
+ long_length,
+ requested_type,
+ &actual_return_type,
+ &actual_format_return,
+ &nitems_return,
+ &bytes_after_return,
+ &prop_return)
+ && prop_return != 0
+ && actual_return_type == requested_type
+ && actual_format_return == 32) {
+ unsigned long n;
+ for (n = 0; n < nitems_return; ++n) {
+ unsigned long check = (((unsigned long *)
+ (void *) prop_return)[n]);
+ if (check == is_hidden) {
+ result = True;
+ break;
+ }
+ }
+ }
+ }
+ TRACE(("...window %#lx is%s iconified\n",
+ target,
+ result ? "" : " not"));
+ return result;
+}
+
#if OPT_MAXIMIZE
/*ARGSUSED*/
void
@@ -1532,8 +1707,7 @@ HandleDeIconify(Widget w,
XtermWidget xw;
if ((xw = getXtermWidget(w)) != 0) {
- TScreen *screen = TScreenOf(xw);
- XMapWindow(screen->display, VShellWindow(xw));
+ xtermDeiconify(xw);
}
}
@@ -1547,10 +1721,7 @@ HandleIconify(Widget w,
XtermWidget xw;
if ((xw = getXtermWidget(w)) != 0) {
- TScreen *screen = TScreenOf(xw);
- XIconifyWindow(screen->display,
- VShellWindow(xw),
- DefaultScreen(screen->display));
+ xtermIconify(xw);
}
}
@@ -1616,7 +1787,7 @@ RequestMaximize(XtermWidget xw, int maximize)
{
TScreen *screen = TScreenOf(xw);
XWindowAttributes wm_attrs, vshell_attrs;
- unsigned root_width, root_height;
+ unsigned root_width = 0, root_height = 0;
Boolean success = False;
TRACE(("RequestMaximize %d:%s\n",
@@ -2370,11 +2541,17 @@ loadColorTable(XtermWidget xw, unsigned length)
if (screen->cmap_data != 0) {
unsigned i;
+ unsigned shift;
+
+ if (getVisualInfo(xw))
+ shift = xw->rgb_shifts[2];
+ else
+ shift = 0;
screen->cmap_size = length;
for (i = 0; i < screen->cmap_size; i++) {
- screen->cmap_data[i].pixel = (unsigned long) i;
+ screen->cmap_data[i].pixel = (unsigned long) i << shift;
}
result = (Boolean) (XQueryColors(screen->display,
cmap,
@@ -3167,7 +3344,8 @@ ManipulateSelectionData(XtermWidget xw, TScreen *screen, char *buf, int final)
screen->selection_time =
XtLastTimestampProcessed(TScreenOf(xw)->display);
- for (j = 0, buf = old; j < n; ++j) {
+ for (j = 0; j < n; ++j) {
+ buf = old;
ClearSelectionBuffer(screen, select_args[j]);
while (*buf != '\0') {
AppendToSelectionBuffer(screen,
@@ -3364,7 +3542,7 @@ ReportColorRequest(XtermWidget xw, int ndx, int final)
}
static Bool
-UpdateOldColors(XtermWidget xw GCC_UNUSED, ScrnColors * pNew)
+UpdateOldColors(XtermWidget xw, ScrnColors * pNew)
{
int i;
@@ -3800,6 +3978,9 @@ do_osc(XtermWidget xw, Char *oscbuf, size_t len, int final)
xw->work.palette_changed = False;
xtermRepaint(xw);
break;
+ default:
+ xtermNeedSwap(xw, 1);
+ break;
}
}
@@ -3991,8 +4172,7 @@ do_osc(XtermWidget xw, Char *oscbuf, size_t len, int final)
if (strcmp(buf, "?")) {
char *bp;
if ((bp = x_strdup(buf)) != NULL) {
- if (screen->logfile)
- free(screen->logfile);
+ free(screen->logfile);
screen->logfile = bp;
break;
}
@@ -4062,11 +4242,8 @@ reset_decudk(XtermWidget xw)
{
int n;
for (n = 0; n < MAX_UDK; n++) {
- if (xw->work.user_keys[n].str != 0) {
- free(xw->work.user_keys[n].str);
- xw->work.user_keys[n].str = 0;
- xw->work.user_keys[n].len = 0;
- }
+ FreeAndNull(xw->work.user_keys[n].str);
+ xw->work.user_keys[n].len = 0;
}
}
@@ -4078,7 +4255,7 @@ parse_decudk(XtermWidget xw, const char *cp)
{
while (*cp) {
const char *base = cp;
- char *str = TextAlloc(strlen(cp) + 2);
+ char *str = malloc(strlen(cp) + 3);
unsigned key = 0;
int len = 0;
@@ -4099,8 +4276,7 @@ parse_decudk(XtermWidget xw, const char *cp)
}
if (len > 0 && key < MAX_UDK) {
str[len] = '\0';
- if (xw->work.user_keys[key].str != 0)
- free(xw->work.user_keys[key].str);
+ free(xw->work.user_keys[key].str);
xw->work.user_keys[key].str = str;
xw->work.user_keys[key].len = len;
TRACE(("parse_decudk %d:%.*s\n", key, len, str));
@@ -4377,9 +4553,9 @@ restore_DECCIR(XtermWidget xw, const char *cp)
/* SCS designators */
for (value = 0; value < NUM_GSETS; ++value) {
if (*cp == '%') {
- xtermDecodeSCS(xw, value, '%', *++cp);
+ xtermDecodeSCS(xw, value, 0, '%', *++cp);
} else if (*cp != '\0') {
- xtermDecodeSCS(xw, value, '\0', *cp);
+ xtermDecodeSCS(xw, value, 0, '\0', *cp);
} else {
return;
}
@@ -4567,14 +4743,14 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
/* XK_COLORS is a fake code for the "Co" entry (maximum
* number of colors) */
if (code == XK_COLORS) {
- unparseputn(xw, (UParm) NUM_ANSI_COLORS);
+ unparseputn(xw, (unsigned) NUM_ANSI_COLORS);
} else
#if OPT_DIRECT_COLOR
if (code == XK_RGB) {
if (TScreenOf(xw)->direct_color && xw->has_rgb) {
if (xw->rgb_widths[0] == xw->rgb_widths[1] &&
xw->rgb_widths[1] == xw->rgb_widths[2]) {
- unparseputn(xw, (UParm) xw->rgb_widths[0]);
+ unparseputn(xw, xw->rgb_widths[0]);
} else {
char temp[1024];
sprintf(temp, "%d/%d/%d",
@@ -4695,31 +4871,23 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen)
#endif
/* FALLTHRU */
default:
- if (screen->terminal_id == 125 ||
+ if (optRegisGraphics(screen) ||
+ optSixelGraphics(screen) ||
screen->vtXX_level >= 2) { /* VT220 */
parse_ansi_params(&params, &cp);
switch (params.a_final) {
- case 'p':
+ case 'p': /* ReGIS */
#if OPT_REGIS_GRAPHICS
- if (screen->terminal_id == 125 ||
- screen->terminal_id == 240 ||
- screen->terminal_id == 241 ||
- screen->terminal_id == 330 ||
- screen->terminal_id == 340) {
+ if (optRegisGraphics(screen)) {
parse_regis(xw, &params, cp);
}
#else
TRACE(("ignoring ReGIS graphic (compilation flag not enabled)\n"));
#endif
break;
- case 'q':
+ case 'q': /* sixel */
#if OPT_SIXEL_GRAPHICS
- if (screen->terminal_id == 125 ||
- screen->terminal_id == 240 ||
- screen->terminal_id == 241 ||
- screen->terminal_id == 330 ||
- screen->terminal_id == 340 ||
- screen->terminal_id == 382) {
+ if (optSixelGraphics(screen)) {
(void) parse_sixel(xw, &params, cp);
}
#else
@@ -4941,27 +5109,40 @@ do_dec_rqm(XtermWidget xw, int nparams, int *params)
case srm_MARGIN_BELL: /* margin bell */
result = MdBool(screen->marginbell);
break;
+#if OPT_PRINT_GRAPHICS
+ case srm_DECGEPM: /* Graphics Expanded Print Mode */
+ result = MdBool(screen->graphics_expanded_print_mode);
+ break;
+#endif
case srm_REVERSEWRAP: /* reverse wraparound */
- result = MdFlag(xw->flags, REVERSEWRAP);
+ if_PRINT_GRAPHICS2(result = MdBool(screen->graphics_print_color_syntax))
+ result = MdFlag(xw->flags, REVERSEWRAP);
break;
-#ifdef ALLOWLOGGING
+#if defined(ALLOWLOGGING)
case srm_ALLOWLOGGING: /* logging */
-#ifdef ALLOWLOGFILEONOFF
- result = MdBool(screen->logging);
+ if_PRINT_GRAPHICS2(result = MdBool(screen->graphics_print_background_mode))
+#if defined(ALLOWLOGFILEONOFF)
+ result = MdBool(screen->logging);
#else
- result = ((MdBool(screen->logging) == mdMaybeSet)
- ? mdAlwaysSet
- : mdAlwaysReset);
-#endif /* ALLOWLOGFILEONOFF */
+ result = ((MdBool(screen->logging) == mdMaybeSet)
+ ? mdAlwaysSet
+ : mdAlwaysReset);
+#endif
+ break;
+#elif OPT_PRINT_GRAPHICS
+ case srm_DECGPBM: /* Graphics Print Background Mode */
+ result = MdBool(screen->graphics_print_background_mode);
break;
#endif
case srm_OPT_ALTBUF_CURSOR: /* alternate buffer & cursor */
/* FALLTHRU */
case srm_OPT_ALTBUF:
- /* FALLTHRU */
- case srm_ALTBUF:
result = MdBool(screen->whichBuf);
break;
+ case srm_ALTBUF:
+ if_PRINT_GRAPHICS2(result = MdBool(screen->graphics_print_background_mode))
+ result = MdBool(screen->whichBuf);
+ break;
case srm_DECNKM:
result = MdFlag(xw->keyboard.flags, MODE_DECKPAM);
break;
@@ -4987,7 +5168,7 @@ do_dec_rqm(XtermWidget xw, int nparams, int *params)
result = 0;
}
break;
- case srm_VT200_MOUSE: /* xterm bogus sequence */
+ case srm_VT200_MOUSE: /* xterm bogus sequence */
result = MdBool(screen->send_mouse_pos == VT200_MOUSE);
break;
case srm_VT200_HIGHLIGHT_MOUSE: /* xterm sequence w/hilite tracking */
@@ -5009,6 +5190,8 @@ do_dec_rqm(XtermWidget xw, int nparams, int *params)
case srm_SGR_EXT_MODE_MOUSE:
/* FALLTHRU */
case srm_URXVT_EXT_MODE_MOUSE:
+ /* FALLTHRU */
+ case srm_PIXEL_POSITION_MOUSE:
result = MdBool(screen->extend_coords == params[0]);
break;
case srm_ALTERNATE_SCROLL:
@@ -5206,10 +5389,7 @@ x_find_icon(char **work, int *state, const char *filename, const char *suffix)
if (*state >= 0) {
size_t length;
- if (*work) {
- free(*work);
- *work = 0;
- }
+ FreeAndNull(*work);
length = 3 + strlen(prefix) + strlen(filename) + strlen(larger) +
strlen(suffix);
if ((result = malloc(length)) != 0) {
@@ -5384,11 +5564,11 @@ xtermLoadIcon(XtermWidget xw, const char *icon_hint)
}
}
- if (workname != 0)
- free(workname);
+ free(workname);
#else
(void) xw;
+ (void) icon_hint;
#endif
}
@@ -5500,7 +5680,7 @@ ChangeGroup(XtermWidget xw, const char *attribute, char *value)
TRACE(("ChangeGroup: assume ISO-8859-1\n"));
for (c1 = (Char *) value; *c1 != '\0'; ++c1) {
- *c1 = OnlyLatin1(*c1);
+ *c1 = (Char) OnlyLatin1(*c1);
}
}
@@ -5682,7 +5862,7 @@ ReverseOldColors(XtermWidget xw)
char *tmpName;
if (pOld) {
- /* change text cursor, if necesary */
+ /* change text cursor, if necessary */
if (pOld->colors[TEXT_CURSOR] == pOld->colors[TEXT_FG]) {
pOld->colors[TEXT_CURSOR] = pOld->colors[TEXT_BG];
if (pOld->names[TEXT_CURSOR]) {
@@ -5706,6 +5886,7 @@ ReverseOldColors(XtermWidget xw)
EXCHANGE(pOld->colors[TEK_FG], pOld->colors[TEK_BG], tmpPix);
EXCHANGE(pOld->names[TEK_FG], pOld->names[TEK_BG], tmpName);
#endif
+ FreeMarkGCs(xw);
}
return;
}
@@ -5763,7 +5944,7 @@ const char *
SysErrorMsg(int code)
{
static const char unknown[] = "unknown error";
- char *s = strerror(code);
+ const char *s = strerror(code);
return s ? s : unknown;
}
@@ -6137,7 +6318,7 @@ xtermSetenv(const char *var, const char *value)
environ = environ;
}
- environ[found] = TextAlloc(1 + len + strlen(value));
+ environ[found] = malloc(2 + len + strlen(value));
if (environ[found] == 0) {
xtermWarning("Cannot allocate environment %s\n", var);
return;
@@ -6413,10 +6594,7 @@ sortedOptDescs(XrmOptionDescRec * descs, Cardinal res_count)
#ifdef NO_LEAKS
if (descs == 0) {
- if (res_array != 0) {
- free(res_array);
- res_array = 0;
- }
+ FreeAndNull(res_array);
} else
#endif
if (res_array == 0) {
@@ -6447,8 +6625,7 @@ sortedOpts(OptionHelp * options, XrmOptionDescRec * descs, Cardinal numDescs)
#ifdef NO_LEAKS
if (descs == 0 && opt_array != 0) {
sortedOptDescs(descs, numDescs);
- free(opt_array);
- opt_array = 0;
+ FreeAndNull(opt_array);
return 0;
} else if (options == 0 || descs == 0) {
return 0;
@@ -6508,9 +6685,9 @@ sortedOpts(OptionHelp * options, XrmOptionDescRec * descs, Cardinal numDescs)
}
if (strncmp(mesg, opt_array[j].desc, strlen(mesg))) {
if (strncmp(opt_array[j].desc, "turn ", (size_t) 5)) {
- char *s = TextAlloc(strlen(mesg)
- + 1
- + strlen(opt_array[j].desc));
+ char *s = malloc(strlen(mesg)
+ + strlen(opt_array[j].desc)
+ + 2);
if (s != 0) {
sprintf(s, "%s %s", mesg, opt_array[j].desc);
opt_array[j].desc = s;
@@ -6563,7 +6740,7 @@ xtermEnvEncoding(void)
#ifdef HAVE_LANGINFO_CODESET
result = nl_langinfo(CODESET);
#else
- char *locale = xtermEnvLocale();
+ const char *locale = xtermEnvLocale();
if (!strcmp(locale, "C") || !strcmp(locale, "POSIX")) {
result = x_strdup("ASCII");
} else {
@@ -6731,6 +6908,17 @@ xtermOpenApplication(XtAppContext * app_context_return,
return result;
}
+/*
+ * Some calls to XGetAtom() will fail, and we don't want to stop. So we use
+ * our own error-handler.
+ */
+/* ARGSUSED */
+int
+ignore_x11_error(Display *dpy GCC_UNUSED, XErrorEvent *event GCC_UNUSED)
+{
+ return 1;
+}
+
static int x11_errors;
static int
@@ -6834,23 +7022,31 @@ free_string(String value)
}
/* Set tty's idea of window size, using the given file descriptor 'fd'. */
-void
+int
update_winsize(int fd, int rows, int cols, int height, int width)
{
+ int code = -1;
#ifdef TTYSIZE_STRUCT
- TTYSIZE_STRUCT ts;
- int code;
+ static int last_rows = -1;
+ static int last_cols = -1;
- setup_winsize(ts, rows, cols, height, width);
- TRACE_RC(code, SET_TTYSIZE(fd, ts));
- trace_winsize(ts, "from SET_TTYSIZE");
- (void) code;
+ if (rows != last_rows || cols != last_cols) {
+ TTYSIZE_STRUCT ts;
+
+ last_rows = rows;
+ last_cols = cols;
+ setup_winsize(ts, rows, cols, height, width);
+ TRACE_RC(code, SET_TTYSIZE(fd, ts));
+ trace_winsize(ts, "from SET_TTYSIZE");
+ }
#endif
(void) rows;
(void) cols;
(void) height;
(void) width;
+
+ return code;
}
/*
@@ -7097,4 +7293,143 @@ xtermPopSGR(XtermWidget xw)
#endif
}
}
+
+#if OPT_ISO_COLORS
+static ColorSlot *
+allocColorSlot(XtermWidget xw, int slot)
+{
+ SavedColors *s = &(xw->saved_colors);
+ ColorSlot *result = NULL;
+
+ if (slot >= 0 && slot < MAX_SAVED_SGR) {
+ if (s->palettes[slot] == NULL) {
+ s->palettes[slot] = (ColorSlot *) calloc((size_t) 1,
+ sizeof(ColorSlot)
+ + (sizeof(ColorRes)
+ * MAXCOLORS));
+ }
+ result = s->palettes[slot];
+ }
+ return result;
+}
+
+static void
+popOldColors(XtermWidget xw, ScrnColors * source)
+{
+ Boolean changed = False;
+ ScrnColors *target = xw->work.oldColors;
+
+ if (source->which != target->which) {
+ changed = True;
+ } else {
+ int n;
+ for (n = 0; n < NCOLORS; ++n) {
+ if (COLOR_DEFINED(source, n)) {
+ if (COLOR_DEFINED(target, n)) {
+ if (source->colors[n] != target->colors[n]) {
+ changed = True;
+ break;
+ }
+ } else {
+ changed = True;
+ break;
+ }
+ } else if (COLOR_DEFINED(target, n)) {
+ changed = True;
+ break;
+ }
+ }
+ }
+ if (changed) {
+ ChangeColors(xw, source);
+ UpdateOldColors(xw, source);
+ }
+}
+#endif /* OPT_ISO_COLORS */
+
+#define DiffColorSlot(d,s,n) (memcmp((d), (s), (n) * sizeof(ColorRes)) ? True : False)
+#define CopyColorSlot(d,s,n) memcpy((d), (s), (n) * sizeof(ColorRes))
+
+/*
+ * By default, a "push" increments the stack after copying to the current
+ * slot. But a specific target allows one to copy into a specific slot.
+ */
+void
+xtermPushColors(XtermWidget xw, int value)
+{
+#if OPT_ISO_COLORS
+ SavedColors *s = &(xw->saved_colors);
+ int pushed = s->used;
+ int actual = (value <= 0) ? pushed : (value - 1);
+
+ TRACE(("xtermPushColors %d:%d\n", actual, pushed));
+ if (actual < MAX_SAVED_SGR && actual >= 0) {
+ TScreen *screen = TScreenOf(xw);
+ ColorSlot *palette;
+
+ if ((palette = allocColorSlot(xw, actual)) != NULL) {
+ GetColors(xw, &(palette->base));
+ CopyColorSlot(&(palette->ansi[0]), screen->Acolors, MAXCOLORS);
+ if (value < 0) {
+ s->used++;
+ if (s->last < s->used)
+ s->last = s->used;
+ } else {
+ s->used = value;
+ }
+ }
+ }
+#else
+ (void) xw;
+ (void) value;
+#endif
+}
+
+void
+xtermPopColors(XtermWidget xw, int value)
+{
+#if OPT_ISO_COLORS
+ SavedColors *s = &(xw->saved_colors);
+ int popped = (s->used - 1);
+ int actual = (value <= 0) ? popped : (value - 1);
+
+ TRACE(("xtermPopColors %d:%d\n", actual, popped));
+ if (actual < MAX_SAVED_SGR && actual >= 0) {
+ TScreen *screen = TScreenOf(xw);
+ ColorSlot *palette;
+
+ if ((palette = s->palettes[actual]) != NULL) {
+ Boolean changed = DiffColorSlot(screen->Acolors,
+ palette->ansi,
+ MAXCOLORS);
+
+ GetOldColors(xw);
+ popOldColors(xw, &(palette->base));
+ CopyColorSlot(screen->Acolors, &(palette->ansi[0]), MAXCOLORS);
+ s->used = actual;
+ if (changed)
+ xtermRepaint(xw);
+ }
+ }
+#else
+ (void) xw;
+ (void) value;
+#endif
+}
+
+void
+xtermReportColors(XtermWidget xw)
+{
+ ANSI reply;
+ SavedColors *s = &(xw->saved_colors);
+
+ memset(&reply, 0, sizeof(reply));
+ reply.a_type = ANSI_CSI;
+ reply.a_pintro = '?';
+ reply.a_param[reply.a_nparam++] = (ParmType) s->used;
+ reply.a_param[reply.a_nparam++] = (ParmType) s->last;
+ reply.a_inters = '#';
+ reply.a_final = 'Q';
+ unparseseq(xw, &reply);
+}
#endif /* OPT_XTERM_SGR */
diff --git a/app/xterm/package/debian/changelog b/app/xterm/package/debian/changelog
index cbfa97503..d2c006433 100644
--- a/app/xterm/package/debian/changelog
+++ b/app/xterm/package/debian/changelog
@@ -1,3 +1,75 @@
+xterm-dev (363) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 15 Nov 2020 11:38:35 -0500
+
+xterm-dev (362) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 18 Oct 2020 06:27:36 -0400
+
+xterm-dev (361) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 Sep 2020 08:39:10 -0400
+
+xterm-dev (360) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Tue, 18 Aug 2020 16:53:17 -0400
+
+xterm-dev (359) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 25 Jul 2020 13:48:12 -0400
+
+xterm-dev (358) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 05 Jul 2020 20:35:21 -0400
+
+xterm-dev (357) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 18 May 2020 16:21:11 -0400
+
+xterm-dev (356) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 06:19:22 -0400
+
+xterm-dev (355) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 27 Apr 2020 14:58:28 -0400
+
+xterm-dev (354) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 28 Feb 2020 19:23:02 -0500
+
+xterm-dev (353) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 18 Jan 2020 10:53:11 -0500
+
+xterm-dev (352) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 18 Nov 2019 04:22:56 -0500
+
xterm-dev (351) unstable; urgency=low
* maintenance updates
diff --git a/app/xterm/package/debian/compat b/app/xterm/package/debian/compat
index 7ed6ff82d..f599e28b8 100644
--- a/app/xterm/package/debian/compat
+++ b/app/xterm/package/debian/compat
@@ -1 +1 @@
-5
+10
diff --git a/app/xterm/package/debian/copyright b/app/xterm/package/debian/copyright
index 2236d07e0..1ea0b28eb 100644
--- a/app/xterm/package/debian/copyright
+++ b/app/xterm/package/debian/copyright
@@ -35,7 +35,7 @@ authorization.
Files: * */*
License: MIT-X11
-Copyright 1996-2018,2019 by Thomas E. Dickey
+Copyright 1996-2019,2020 by Thomas E. Dickey
(date ranges vary, depending on when the respective files were first changed
significantly, and run through the most recent change date).
diff --git a/app/xterm/package/debian/rules b/app/xterm/package/debian/rules
index 1bf8cf22b..a0de82cc1 100644
--- a/app/xterm/package/debian/rules
+++ b/app/xterm/package/debian/rules
@@ -75,7 +75,6 @@ configure-stamp:
--enable-mini-luit \
--enable-regis-graphics \
--enable-sco-fkeys \
- --enable-sixel-graphics \
--enable-toolbar \
--enable-xmc-glitch \
--with-app-defaults=$(PKG_APPDEFAULTS) \
@@ -153,10 +152,14 @@ binary-indep: build install
done' ; \
exit 0 )
- # The Debian package does not install desktop files.
+ # The Debian package stopped installing xterm's desktop files; a
+ # subsequent revision added that back with limitations. xterm's
+ # configure script checks for categories which are used by other
+ # terminal emulators. The Debian package overrides that to a single
+ # category.
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486317
$(MAKE) install-desktop \
- DESKTOP_FLAGS="--vendor='$(DESKTOP_VENDOR)' --dir $(MY_DESKTOP)"
+ DESKTOP_FLAGS="--dir $(MY_DESKTOP)"
( cd $(DSTDIR)$(PKG_DESKTOP) \
&& $(SHELL) -c 'for p in *;do \
diff --git a/app/xterm/package/freebsd/Makefile b/app/xterm/package/freebsd/Makefile
index 02116cdcf..1c04d3ed8 100644
--- a/app/xterm/package/freebsd/Makefile
+++ b/app/xterm/package/freebsd/Makefile
@@ -1,4 +1,4 @@
-# $XTermId: Makefile,v 1.71 2019/11/04 21:16:46 tom Exp $
+# $XTermId: Makefile,v 1.84 2020/11/15 16:38:35 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= 351
+PORTVERSION= 363
CATEGORIES= x11
MASTER_SITES= ftp://ftp.invisible-island.net/xterm/:src1 \
https://invisible-mirror.net/archives/xterm/:src1
@@ -43,7 +43,7 @@ OPTIONS_RADIO_3D= XAW3D XAW3DXFT NEXTAW
DABBREV_DESC= Enable support for dabbrev-expand
DECTERM_DESC= Enable DECterm Locator support
-LUIT_DESC= Use LUIT for locale convertion from/to UTF-8
+LUIT_DESC= Use LUIT for locale conversion from/to UTF-8
SIXEL_DESC= Enable Sixel graphics support
REGIS_DESC= Enable ReGIS graphics support
WCHAR_DESC= Enable wide-character support
diff --git a/app/xterm/package/freebsd/distinfo b/app/xterm/package/freebsd/distinfo
index 157bec68e..704ae9b92 100644
--- a/app/xterm/package/freebsd/distinfo
+++ b/app/xterm/package/freebsd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1574032551
-SHA256 (xterm-351.tgz) = 790d033d72dafb9869c6a90054b9e7a4fa1fb7041d9cf2fe69a147899147fc33
-SIZE (xterm-351.tgz) = 1400804
+TIMESTAMP = 1593990998
+SHA256 (xterm-357.tgz) = a2fbe692f7d9324f6db8820ace7ec4696e838d3053edb45d13801fd684dabdc3
+SIZE (xterm-357.tgz) = 1422256
diff --git a/app/xterm/package/pkgsrc/Makefile b/app/xterm/package/pkgsrc/Makefile
index 7781e7fe9..26591f109 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-351
+DISTNAME= xterm-363
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 c61fb7e7b..86fb4cb60 100644
--- a/app/xterm/package/xterm.spec
+++ b/app/xterm/package/xterm.spec
@@ -1,11 +1,11 @@
-# $XTermId: xterm.spec,v 1.123 2019/11/18 00:46:31 tom Exp $
+# $XTermId: xterm.spec,v 1.138 2020/11/15 16:38:35 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: 351
+Version: 363
Release: 1
License: X11
Group: User Interface/X
@@ -66,8 +66,7 @@ for the program and its resource class, to avoid conflict with other packages.
%prep
-%global desktop_vendor dickey
-%global target_appdata %{desktop_vendor}-%{fullname}.appdata.xml
+%global target_appdata %{fullname}.appdata.xml
%define desktop_utils %(if which desktop-file-install 2>&1 >/dev/null ; then echo 1 || echo 0 ; fi)
%define icon_theme %(test -d /usr/share/icons/hicolor && echo 1 || echo 0)
@@ -124,7 +123,6 @@ CPPFLAGS="-DMISC_EXP -DEXP_HTTP_HEADERS" \
--enable-mini-luit \
--enable-regis-graphics \
--enable-sco-fkeys \
- --enable-sixel-graphics \
--enable-toolbar \
--enable-xmc-glitch \
--with-app-defaults=%{_xresdir} \
@@ -171,7 +169,7 @@ make install-bin install-man install-app install-icon \
%if "%{desktop_utils}"
make install-desktop \
- DESKTOP_FLAGS="--vendor='%{desktop_vendor}' --dir $RPM_BUILD_ROOT%{_datadir}/applications"
+ DESKTOP_FLAGS="--dir $RPM_BUILD_ROOT%{_datadir}/applications"
test -n "%{my_suffix}" && \
( cd $RPM_BUILD_ROOT%{_datadir}/applications
@@ -185,7 +183,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata && \
install -m 644 xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \
( cd $RPM_BUILD_ROOT%{_datadir}/appdata
sed -i \
- -e 's/>xterm\.desktop</>%{desktop_vendor}-%{fullname}.desktop</' \
+ -e 's/>xterm\.desktop</>%{fullname}.desktop</' \
-e 's/>XTerm</>%{my_class}</' \
%{target_appdata}
)
@@ -234,8 +232,8 @@ exit 0
%if "%{desktop_utils}"
%config(missingok) %{_datadir}/appdata/%{target_appdata}
-%config(missingok) %{_datadir}/applications/%{desktop_vendor}-%{fullname}.desktop
-%config(missingok) %{_datadir}/applications/%{desktop_vendor}-u%{fullname}.desktop
+%config(missingok) %{_datadir}/applications/%{fullname}.desktop
+%config(missingok) %{_datadir}/applications/u%{fullname}.desktop
%endif
%if "%{icon_theme}"
@@ -248,6 +246,12 @@ exit 0
%changelog
+* Sat Jul 25 2020 Thomas E. Dickey
+- sixels are enabled by default
+
+* Sun Mar 08 2020 Thomas E. Dickey
+- remove "--vendor" option from desktop-file-install
+
* Sun Nov 17 2019 Thomas E. Dickey
- install appdata.xml file
diff --git a/app/xterm/print.c b/app/xterm/print.c
index 5040dbe72..1c51808f0 100644
--- a/app/xterm/print.c
+++ b/app/xterm/print.c
@@ -1,7 +1,7 @@
-/* $XTermId: print.c,v 1.166 2017/12/19 23:47:15 tom Exp $ */
+/* $XTermId: print.c,v 1.170 2020/09/19 16:28:48 Ross.Combs Exp $ */
/*
- * Copyright 1997-2016,2017 by Thomas E. Dickey
+ * Copyright 1997-2017,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -74,6 +74,13 @@ static void send_SGR(XtermWidget /* xw */ ,
static void stringToPrinter(XtermWidget /* xw */ ,
const char * /*str */ );
+#if OPT_PRINT_GRAPHICS
+static void setGraphicsPrintToHost(XtermWidget /* xw */ ,
+ int /* enabled */ );
+#else
+#define setGraphicsPrintToHost(xw, enabled) /* nothing */
+#endif
+
static void
closePrinter(XtermWidget xw)
{
@@ -417,7 +424,7 @@ charToPrinter(XtermWidget xw, unsigned chr)
* This implementation only knows how to write to a file. When the
* file is closed the print command executes. Print command must
* be of the form:
- * print/que=name/delete [/otherflags].
+ * print/queue=name/delete [/otherflags].
*/
SPS.fp = fopen(VMS_TEMP_PRINT_FILE, "w");
#else
@@ -534,19 +541,28 @@ xtermMediaControl(XtermWidget xw, int param, int private_seq)
if (private_seq) {
switch (param) {
+ case -1:
+ case 0: /* VT125 */
+ setGraphicsPrintToHost(xw, 0); /* graphics to printer */
+ break;
case 1:
printCursorLine(xw);
break;
+ case 2: /* VT125 */
+ setGraphicsPrintToHost(xw, 1); /* graphics to host */
+ break;
case 4:
- setPrinterControlMode(xw, 0);
+ setPrinterControlMode(xw, 0); /* autoprint disable */
break;
case 5:
- setPrinterControlMode(xw, 1);
+ setPrinterControlMode(xw, 1); /* autoprint enable */
break;
case 10: /* VT320 */
+ /* print whole screen, across sessions */
xtermPrintScreen(xw, False, getPrinterFlags(xw, NULL, 0));
break;
case 11: /* VT320 */
+ /* print all pages in current session */
xtermPrintEverything(xw, getPrinterFlags(xw, NULL, 0));
break;
}
@@ -557,10 +573,10 @@ xtermMediaControl(XtermWidget xw, int param, int private_seq)
xtermPrintScreen(xw, True, getPrinterFlags(xw, NULL, 0));
break;
case 4:
- setPrinterControlMode(xw, 0);
+ setPrinterControlMode(xw, 0); /* printer controller mode off */
break;
case 5:
- setPrinterControlMode(xw, 2);
+ setPrinterControlMode(xw, 2); /* printer controller mode on */
break;
#if OPT_SCREEN_DUMPS
case 10:
@@ -704,6 +720,17 @@ xtermHasPrinter(XtermWidget xw)
return result;
}
+#if OPT_PRINT_GRAPHICS
+static void
+setGraphicsPrintToHost(XtermWidget xw, int enabled)
+{
+ TScreen *screen = TScreenOf(xw);
+
+ TRACE(("graphics print to host enabled=%d\n", enabled));
+ screen->graphics_print_to_host = (Boolean) enabled;
+}
+#endif
+
#define showPrinterControlMode(mode) \
(((mode) == 0) \
? "normal" \
diff --git a/app/xterm/ptydata.c b/app/xterm/ptydata.c
index 5a1f7a3de..f3dfa3df8 100644
--- a/app/xterm/ptydata.c
+++ b/app/xterm/ptydata.c
@@ -1,7 +1,7 @@
-/* $XTermId: ptydata.c,v 1.121 2019/09/18 23:28:41 tom Exp $ */
+/* $XTermId: ptydata.c,v 1.150 2020/10/12 18:46:28 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -37,6 +37,14 @@
#include <wcwidth.h>
#endif
+#ifdef TEST_DRIVER
+#undef TRACE
+#define TRACE(p) if (1) printf p
+#undef TRACE2
+#define TRACE2(p) if (0) printf p
+#define visibleChars(buf, len) "buffer"
+#endif
+
/*
* Check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
* systems are broken and return EWOULDBLOCK when they should return EAGAIN.
@@ -99,6 +107,22 @@ decodeUtf8(TScreen *screen, PtyData *data)
data->utf_data = (IChar) (screen->c1_printable ? c : UCS_REPL);
data->utf_size = (i + 1);
break;
+ } else if (screen->utf8_weblike
+ && (utf_count == 3
+ && utf_char == 0x04
+ && c >= 0x90)) {
+ /* The encoding would form a code point beyond U+10FFFF. */
+ data->utf_size = i;
+ data->utf_data = UCS_REPL;
+ break;
+ } else if (screen->utf8_weblike
+ && (utf_count == 2
+ && utf_char == 0x0d
+ && c >= 0xa0)) {
+ /* The encoding would form a surrogate code point. */
+ data->utf_size = i;
+ data->utf_data = UCS_REPL;
+ break;
} else {
/* Check for overlong UTF-8 sequences for which a shorter
* encoding would exist and replace them with UCS_REPL.
@@ -111,7 +135,14 @@ decodeUtf8(TScreen *screen, PtyData *data)
* 11111100 100000xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
*/
if (!utf_char && !((c & 0x7f) >> (7 - utf_count))) {
- utf_char = UCS_REPL;
+ if (screen->utf8_weblike) {
+ /* overlong sequence continued */
+ data->utf_data = UCS_REPL;
+ data->utf_size = i;
+ break;
+ } else {
+ utf_char = UCS_REPL;
+ }
}
utf_char <<= 6;
utf_char |= (c & 0x3f);
@@ -138,32 +169,57 @@ decodeUtf8(TScreen *screen, PtyData *data)
} else {
/* We received a sequence start byte */
if (utf_count > 0) {
- data->utf_data = UCS_REPL; /* prev. sequence incomplete */
- data->utf_size = (i + 1);
+ /* previous sequence is incomplete */
+ data->utf_data = UCS_REPL;
+ data->utf_size = i;
break;
}
- if (c < 0xe0) {
- utf_count = 1;
- utf_char = (c & 0x1f);
- if (!(c & 0x1e)) {
- utf_char = UCS_REPL; /* overlong sequence */
+ if (screen->utf8_weblike) {
+ if (c < 0xe0) {
+ if (!(c & 0x1e)) {
+ /* overlong sequence start */
+ data->utf_data = UCS_REPL;
+ data->utf_size = (i + 1);
+ break;
+ }
+ utf_count = 1;
+ utf_char = (c & 0x1f);
+ } else if (c < 0xf0) {
+ utf_count = 2;
+ utf_char = (c & 0x0f);
+ } else if (c < 0xf5) {
+ utf_count = 3;
+ utf_char = (c & 0x07);
+ } else {
+ data->utf_data = UCS_REPL;
+ data->utf_size = (i + 1);
+ break;
}
- } else if (c < 0xf0) {
- utf_count = 2;
- utf_char = (c & 0x0f);
- } else if (c < 0xf8) {
- utf_count = 3;
- utf_char = (c & 0x07);
- } else if (c < 0xfc) {
- utf_count = 4;
- utf_char = (c & 0x03);
- } else if (c < 0xfe) {
- utf_count = 5;
- utf_char = (c & 0x01);
} else {
- data->utf_data = UCS_REPL;
- data->utf_size = (i + 1);
- break;
+ if (c < 0xe0) {
+ utf_count = 1;
+ utf_char = (c & 0x1f);
+ if (!(c & 0x1e)) {
+ /* overlong sequence */
+ utf_char = UCS_REPL;
+ }
+ } else if (c < 0xf0) {
+ utf_count = 2;
+ utf_char = (c & 0x0f);
+ } else if (c < 0xf8) {
+ utf_count = 3;
+ utf_char = (c & 0x07);
+ } else if (c < 0xfc) {
+ utf_count = 4;
+ utf_char = (c & 0x03);
+ } else if (c < 0xfe) {
+ utf_count = 5;
+ utf_char = (c & 0x01);
+ } else {
+ data->utf_data = UCS_REPL;
+ data->utf_size = (i + 1);
+ break;
+ }
}
}
}
@@ -305,8 +361,8 @@ initPtyData(PtyData **result)
{
PtyData *data;
- TRACE(("initPtyData given minBufSize %d, maxBufSize %d\n",
- FRG_SIZE, BUF_SIZE));
+ TRACE2(("initPtyData given minBufSize %d, maxBufSize %d\n",
+ FRG_SIZE, BUF_SIZE));
if (FRG_SIZE < 64)
FRG_SIZE = 64;
@@ -315,8 +371,8 @@ initPtyData(PtyData **result)
if (BUF_SIZE % FRG_SIZE)
BUF_SIZE = BUF_SIZE + FRG_SIZE - (BUF_SIZE % FRG_SIZE);
- TRACE(("initPtyData using minBufSize %d, maxBufSize %d\n",
- FRG_SIZE, BUF_SIZE));
+ TRACE2(("initPtyData using minBufSize %d, maxBufSize %d\n",
+ FRG_SIZE, BUF_SIZE));
data = TypeXtMallocX(PtyData, (BUF_SIZE + FRG_SIZE));
@@ -348,8 +404,9 @@ fakePtyData(PtyData *result, Char *next, Char *last)
* e.g., a continuation-read.
*/
void
-trimPtyData(XtermWidget xw GCC_UNUSED, PtyData *data)
+trimPtyData(XtermWidget xw, PtyData *data)
{
+ (void) xw;
FlushLog(xw);
if (data->next != data->buffer) {
@@ -561,7 +618,7 @@ writePtyData(int f, IChar *d, unsigned len)
for (n = 0; n < len; n++)
VTbuffer->write_buf[n] = (Char) d[n];
- TRACE(("writePtyData %d:%s\n", n,
+ TRACE(("writePtyData %u:%s\n", n,
visibleChars(VTbuffer->write_buf, n)));
v_write(f, VTbuffer->write_buf, n);
}
@@ -573,51 +630,149 @@ noleaks_ptydata(void)
{
if (VTbuffer != 0) {
#if OPT_WIDE_CHARS
- if (VTbuffer->write_buf != 0)
- free(VTbuffer->write_buf);
+ free(VTbuffer->write_buf);
#endif
- free(VTbuffer);
- VTbuffer = 0;
+ FreeAndNull(VTbuffer);
}
}
#endif
-#ifdef TEST_PTYDATA
+#ifdef TEST_DRIVER
+
+#include "data.c"
+
void
-test_ptydata(XtermWidget xw)
+NormalExit(void)
{
- TScreen *screen = TScreenOf(xw);
- unsigned code;
- PtyData *data;
- Char *next;
+ fprintf(stderr, "NormalExit!\n");
+ exit(EXIT_SUCCESS);
+}
- for (code = 0; code < 256; code++) {
- initPtyData(&data);
- next = convertToUTF8(data->buffer, code);
- *next = 0;
- data->next = data->buffer;
- data->last = next;
- decodeUtf8(screen, data);
- TRACE(("TEST %04X (%d:%s) ->%04X\n", code,
- (int) (next - data->buffer),
- data->buffer,
- data->utf_data));
- if (code != data->utf_data) {
- fprintf(stderr, "Mismatch: %04X vs %04X\n", code, data->utf_data);
+void
+Panic(const char *s, int a)
+{
+ (void) s;
+ (void) a;
+ fprintf(stderr, "Panic!\n");
+ exit(EXIT_FAILURE);
+}
+
+#if OPT_WIDE_CHARS
+
+#ifdef ALLOWLOGGING
+void
+FlushLog(XtermWidget xw)
+{
+ (void) xw;
+}
+#endif
+
+void
+v_write(int f, const Char *data, unsigned len)
+{
+ (void) f;
+ (void) data;
+ (void) len;
+}
+
+void
+mk_wcwidth_init(int mode)
+{
+ (void) mode;
+}
+
+void
+update_font_utf8_mode(void)
+{
+}
+
+static int message_level = 0;
+static int opt_all = 0;
+static int opt_illegal = 0;
+static int opt_convert = 0;
+static int opt_reverse = 0;
+static long total_test = 0;
+static long total_errs = 0;
+
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: test_ptydata [options] [c1[-c1b] [c2-[c2b] [...]]]",
+ "",
+ "Options:",
+ " -a exercise all legal encode/decode to/from UTF-8",
+ " -c call convertFromUTF8 rather than decodeUTF8",
+ " -i ignore illegal UTF-8 when testing -r option",
+ " -q quieter",
+ " -r reverse/decode from UTF-8 byte-string to/from Unicode",
+ " -v more verbose"
+ };
+ size_t n;
+ for (n = 0; n < sizeof(msg) / sizeof(msg[0]); ++n) {
+ fprintf(stderr, "%s\n", msg[n]);
+ }
+ exit(EXIT_FAILURE);
+}
+
+/*
+ * http://www.unicode.org/versions/corrigendum1.html, table 3.1B
+ */
+#define OkRange(n,lo,hi) \
+ if (value[n] < lo || value[n] > hi) { \
+ result = False; \
+ break; \
+ }
+static Bool
+is_legal_utf8(const Char *value)
+{
+ Bool result = True;
+ Char ch;
+ while ((ch = *value) != '\0') {
+ if (ch <= 0x7f) {
+ ++value;
+ } else if (ch >= 0xc2 && ch <= 0xdf) {
+ OkRange(1, 0x80, 0xbf);
+ value += 2;
+ } else if (ch == 0xe0) {
+ OkRange(1, 0xa0, 0xbf);
+ OkRange(2, 0x80, 0xbf);
+ value += 3;
+ } else if (ch >= 0xe1 && ch <= 0xef) {
+ OkRange(1, 0x80, 0xbf);
+ OkRange(2, 0x80, 0xbf);
+ value += 3;
+ } else if (ch == 0xf0) {
+ OkRange(1, 0x90, 0xbf);
+ OkRange(2, 0x80, 0xbf);
+ OkRange(3, 0x80, 0xbf);
+ value += 4;
+ } else if (ch >= 0xf1 && ch <= 0xf3) {
+ OkRange(1, 0x80, 0xbf);
+ OkRange(2, 0x80, 0xbf);
+ OkRange(3, 0x80, 0xbf);
+ value += 4;
+ } else if (ch == 0xf4) {
+ OkRange(1, 0x80, 0x8f);
+ OkRange(2, 0x80, 0xbf);
+ OkRange(3, 0x80, 0xbf);
+ value += 4;
+ } else {
+ result = False;
+ break;
}
- free(data);
}
+ return result;
}
-#endif /* TEST_PTYDATA */
-#ifdef TEST_UTF8_CONVERT
-void
+static void
test_utf8_convert(void)
{
unsigned c_in, c_out;
Char buffer[10];
Char *result;
- unsigned limit = 1 << 24;
+ unsigned limit = 0x110000;
unsigned success = 0;
unsigned bucket[256];
@@ -640,7 +795,7 @@ test_utf8_convert(void)
}
}
}
- TRACE(("test_utf8_convert: %u/%u successful\n", success, limit));
+ TRACE(("%u/%u successful\n", success, limit));
for (c_in = 0; c_in < 256; ++c_in) {
if ((c_in % 8) == 0) {
TRACE((" %02X:", c_in));
@@ -651,4 +806,209 @@ test_utf8_convert(void)
}
}
}
+
+static int
+decode_one(const char *source, char **target)
+{
+ int result = -1;
+ long check;
+ int radix = 0;
+ if ((source[0] == 'u' || source[0] == 'U') && source[1] == '+') {
+ source += 2;
+ radix = 16;
+ } else if (source[0] == '0' && source[1] == 'b') {
+ source += 2;
+ radix = 2;
+ }
+ check = strtol(source, target, radix);
+ if (*target != NULL && *target != source)
+ result = (int) check;
+ return result;
+}
+
+static int
+decode_range(const char *source, int *lo, int *hi)
+{
+ int result = 0;
+ char *after1;
+ char *after2;
+ if ((*lo = decode_one(source, &after1)) >= 0) {
+ after1 += strspn(after1, ":-.\t ");
+ if ((*hi = decode_one(after1, &after2)) < 0) {
+ *hi = *lo;
+ }
+ result = 1;
+ }
+ return result;
+}
+
+#define MAX_BYTES 6
+
+static void
+do_range(const char *source)
+{
+ int lo, hi;
+
+ TScreen screen;
+ memset(&screen, 0, sizeof(screen));
+
+ if (decode_range(source, &lo, &hi)) {
+ while (lo <= hi) {
+ unsigned c_in = (unsigned) lo++;
+ PtyData *data;
+ Char *next;
+ Char buffer[MAX_BYTES + 1];
+
+ if (opt_reverse) {
+ Bool skip = False;
+ Bool first = True;
+ int j, k;
+ for (j = 0; j < MAX_BYTES; ++j) {
+ unsigned long bits = ((unsigned long) c_in >> (8 * j));
+ if ((buffer[j] = (Char) bits) == 0) {
+ skip = (bits != 0);
+ break;
+ }
+ }
+ if (skip)
+ continue;
+ initPtyData(&data);
+ for (k = 0; k <= j; ++k) {
+ data->buffer[k] = buffer[j - k - 1];
+ }
+ if (opt_illegal && !is_legal_utf8(data->buffer)) {
+ free(data);
+ continue;
+ }
+ if (message_level > 1) {
+ printf("TEST ");
+ for (k = 0; k < j; ++k) {
+ printf("%02X", data->buffer[k]);
+ }
+ }
+ data->next = data->buffer;
+ data->last = data->buffer + j;
+ while (decodeUtf8(&screen, data)) {
+ total_test++;
+ if (data->utf_data == UCS_REPL)
+ total_errs++;
+ data->next += data->utf_size;
+ if (message_level > 1) {
+ printf("%s%04X", first ? " ->" : ", ", data->utf_data);
+ }
+ first = False;
+ }
+ if (!first)
+ total_test--;
+ if (message_level > 1) {
+ printf("\n");
+ fflush(stdout);
+ }
+ free(data);
+ } else if (opt_convert) {
+ unsigned c_out;
+ Char *result;
+
+ memset(buffer, 0, sizeof(buffer));
+ if ((result = next = convertToUTF8(buffer, c_in)) == 0) {
+ fprintf(stderr,
+ "conversion of U+%04X to UTF-8 failed\n", c_in);
+ } else if ((result = convertFromUTF8(buffer, &c_out)) == 0) {
+ fprintf(stderr,
+ "conversion of U+%04X from UTF-8 failed\n", c_in);
+ total_errs++;
+ } else if (c_in != c_out) {
+ fprintf(stderr,
+ "conversion of U+%04X to/from UTF-8 gave U+%04X\n",
+ c_in, c_out);
+ } else if (message_level > 1) {
+ *next = '\0';
+ printf("TEST %04X (%d:%s) ->%04X\n", c_in,
+ (int) (next - buffer),
+ buffer,
+ c_out);
+ fflush(stdout);
+ }
+ } else {
+ initPtyData(&data);
+ next = convertToUTF8(data->buffer, c_in);
+ *next = 0;
+ data->next = data->buffer;
+ data->last = next;
+ decodeUtf8(&screen, data);
+ if (message_level > 1) {
+ printf("TEST %04X (%d:%s) ->%04X\n", c_in,
+ (int) (next - data->buffer),
+ data->buffer,
+ data->utf_data);
+ fflush(stdout);
+ }
+ if (c_in != data->utf_data) {
+ fprintf(stderr, "Mismatch: %04X vs %04X\n", c_in, data->utf_data);
+ total_errs++;
+ }
+ free(data);
+ }
+ total_test++;
+ }
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ int ch;
+
+ setlocale(LC_ALL, "");
+ while ((ch = getopt(argc, argv, "aciqrv")) != -1) {
+ switch (ch) {
+ case 'a':
+ opt_all = 1;
+ break;
+ case 'c':
+ opt_convert = 1;
+ break;
+ case 'i':
+ opt_illegal = 1;
+ break;
+ case 'q':
+ message_level--;
+ break;
+ case 'r':
+ opt_reverse = 1;
+ break;
+ case 'v':
+ message_level++;
+ break;
+ default:
+ usage();
+ }
+ }
+ if (opt_all) {
+ test_utf8_convert();
+ } else {
+ if (optind >= argc)
+ usage();
+ while (optind < argc) {
+ do_range(argv[optind++]);
+ }
+ if (total_test) {
+ printf("%ld/%ld mismatches (%.0f%%)\n",
+ total_errs,
+ total_test,
+ (100.0 * (double) total_errs) / (double) total_test);
+ }
+ }
+ return EXIT_SUCCESS;
+}
+#else
+int
+main(int argc, char **argv)
+{
+ (void) argc;
+ (void) argv;
+ printf("Nothing to be done here...\n");
+ return EXIT_SUCCESS;
+}
+#endif /* OPT_WIDE_CHARS */
#endif
diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h
index 1c9ad8eee..0d9dc0eee 100644
--- a/app/xterm/ptyx.h
+++ b/app/xterm/ptyx.h
@@ -1,7 +1,7 @@
-/* $XTermId: ptyx.h,v 1.987 2019/11/17 20:07:59 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.1026 2020/12/25 15:15:37 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -111,8 +111,6 @@
#define TypeXtMallocN(type,n) (type *)(void *)XtMalloc((Cardinal)(sizeof(type) * (size_t) (n)))
#define TypeXtMalloc(type) TypeXtMallocN(type, 1)
-/* use these to allocate partly-structured data */
-#define TextAlloc(n) (char *)malloc(sizeof(char) * (size_t) ((n) + 1))
#define CastMalloc(type) (type *)malloc(sizeof(type))
#define BumpBuffer(type, buffer, size, want) \
@@ -132,11 +130,16 @@
BumpBuffer(type, BfBuf(type), BfLen(type), want)
#define FreeTypedBuffer(type) \
- if (BfBuf(type) != 0) { \
- free(BfBuf(type)); \
- BfBuf(type) = 0; \
- } \
- BfLen(type) = 0
+ do { \
+ FreeAndNull(BfBuf(type)); \
+ BfLen(type) = 0; \
+ } while (0)
+
+#define FreeAndNull(value) \
+ do { \
+ free((void *)(value)); \
+ value = NULL; \
+ } while (0)
/*
** System V definitions
@@ -397,7 +400,7 @@ typedef struct {
#define MAX_DECID 525 /* ...through VT525 */
#ifndef DFT_DECID
-#define DFT_DECID "vt420" /* default VT420 */
+#define DFT_DECID "420" /* default VT420 */
#endif
#ifndef DFT_KBD_DIALECT
@@ -412,7 +415,7 @@ typedef struct {
#define MAX_XLFD_FONTS 1
#define MAX_XFT_FONTS 1
-#define NMENUFONTS 9 /* font entries in fontMenu */
+#define NMENUFONTS 10 /* font entries in fontMenu */
#define NBOX 5 /* Number of Points in box */
#define NPARAM 30 /* Max. parameters */
@@ -565,6 +568,10 @@ typedef enum {
#define OPT_SIXEL_GRAPHICS 0 /* true if xterm supports VT240-style sixel graphics */
#endif
+#ifndef OPT_PRINT_GRAPHICS
+#define OPT_PRINT_GRAPHICS 0 /* true if xterm supports screen dumps as sixel graphics */
+#endif
+
#ifndef OPT_SCREEN_DUMPS
#define OPT_SCREEN_DUMPS 1 /* true if xterm supports screen dumps */
#endif
@@ -801,6 +808,10 @@ typedef enum {
#define OPT_TRACE_FLAGS 0 /* additional tracing used for SCRN_BUF_FLAGS */
#endif
+#ifndef OPT_TRACE_UNIQUE
+#define OPT_TRACE_UNIQUE 0 /* true if we're using multiple trace files */
+#endif
+
#ifndef OPT_VT52_MODE
#define OPT_VT52_MODE 1 /* true if xterm supports VT52 emulation */
#endif
@@ -1015,7 +1026,7 @@ typedef enum {
nrc_ASCII = 0
,nrc_British /* vt100 */
,nrc_British_Latin_1 /* vt3xx */
- ,nrc_Cyrillic /* vt5xx */
+ ,nrc_DEC_Cyrillic /* vt5xx */
,nrc_DEC_Spec_Graphic /* vt100 */
,nrc_DEC_Alt_Chars /* vt100 */
,nrc_DEC_Alt_Graphics /* vt100 */
@@ -1037,6 +1048,8 @@ typedef enum {
,nrc_Hebrew /* vt5xx */
,nrc_ISO_Hebrew_Supp /* vt5xx */
,nrc_Italian /* vt2xx */
+ ,nrc_ISO_Latin_1_Supp /* vt5xx */
+ ,nrc_ISO_Latin_2_Supp /* vt5xx */
,nrc_ISO_Latin_5_Supp /* vt5xx */
,nrc_ISO_Latin_Cyrillic /* vt5xx */
,nrc_Norwegian_Danish /* vt3xx */
@@ -1089,12 +1102,17 @@ typedef enum {
,srm_132COLS = 40
,srm_CURSES_HACK = 41
,srm_DECNRCM = 42
- ,srm_MARGIN_BELL = 44
- ,srm_REVERSEWRAP = 45
+#if OPT_PRINT_GRAPHICS
+ ,srm_DECGEPM = 43 /* Graphics Expanded Print Mode */
+#endif
+ ,srm_MARGIN_BELL = 44 /* also DECGPCM (Graphics Print Color Mode) */
+ ,srm_REVERSEWRAP = 45 /* also DECGPCS (Graphics Print Color Syntax) */
#ifdef ALLOWLOGGING
- ,srm_ALLOWLOGGING = 46
+ ,srm_ALLOWLOGGING = 46 /* also DECGPBM (Graphics Print Background Mode) */
+#elif OPT_PRINT_GRAPHICS
+ ,srm_DECGPBM = 46 /* Graphics Print Background Mode */
#endif
- ,srm_ALTBUF = 47
+ ,srm_ALTBUF = 47 /* also DECGRPM (Graphics Rotated Print Mode) */
,srm_DECNKM = 66
,srm_DECBKM = 67
,srm_DECLRMM = 69
@@ -1112,6 +1130,7 @@ typedef enum {
,srm_EXT_MODE_MOUSE = SET_EXT_MODE_MOUSE
,srm_SGR_EXT_MODE_MOUSE = SET_SGR_EXT_MODE_MOUSE
,srm_URXVT_EXT_MODE_MOUSE = SET_URXVT_EXT_MODE_MOUSE
+ ,srm_PIXEL_POSITION_MOUSE = SET_PIXEL_POSITION_MOUSE
,srm_ALTERNATE_SCROLL = SET_ALTERNATE_SCROLL
,srm_RXVT_SCROLL_TTY_OUTPUT = 1010
,srm_RXVT_SCROLL_TTY_KEYPRESS = 1011
@@ -1245,17 +1264,54 @@ typedef enum {
} MouseOps;
typedef enum {
- epC0 = 1
- , epBS
- , epCR
- , epDEL
- , epESC
- , epFF
- , epHT
- , epNL
+#define DATA(name) ep##name
+ DATA(NUL) = 0
+ , DATA(SOH) = 1
+ , DATA(STX) = 2
+ , DATA(ETX) = 3
+ , DATA(EOT) = 4
+ , DATA(ENQ) = 5
+ , DATA(ACK) = 6
+ , DATA(BEL) = 7
+ , DATA(BS) = 8
+ , DATA(HT) = 9
+ , DATA(LF) = 10
+ , DATA(VT) = 11
+ , DATA(FF) = 12
+ , DATA(CR) = 13
+ , DATA(SO) = 14
+ , DATA(SI) = 15
+ , DATA(DLE) = 16
+ , DATA(DC1) = 17
+ , DATA(DC2) = 18
+ , DATA(DC3) = 19
+ , DATA(DC4) = 20
+ , DATA(NAK) = 21
+ , DATA(SYN) = 22
+ , DATA(ETB) = 23
+ , DATA(CAN) = 24
+ , DATA(EM) = 25
+ , DATA(SUB) = 26
+ , DATA(ESC) = 27
+ , DATA(FS) = 28
+ , DATA(GS) = 29
+ , DATA(RS) = 30
+ , DATA(US) = 31
+ /* aliases */
+ , DATA(C0)
+ , DATA(DEL)
+#undef DATA
, epLAST
} PasteControls;
+typedef enum { /* legal values for keyboard.shift_escape */
+ ssFalse = 0
+ , ssTrue = 1
+ , ssAlways = 2
+ , ssNever = 3
+ , ssLAST
+} ShiftEscapeOps;
+
/*
* xterm uses these codes for the its push-SGR feature. They match where
* possible the corresponding SGR coding. The foreground and background colors
@@ -1275,13 +1331,19 @@ typedef enum {
#if OPT_WIDE_ATTRS
, psATR_STRIKEOUT = 9
#endif
+ /* SGR 10-19 correspond to primary/alternate fonts, currently unused */
#if OPT_ISO_COLORS
- , psFG_COLOR = 10
- , psBG_COLOR = 11
+ , psFG_COLOR_obs = 10
+ , psBG_COLOR_obs = 11
#endif
#if OPT_WIDE_ATTRS
, psATR_DBL_UNDER = 21
#endif
+ /* SGR 22-29 mostly are used to reset SGR 1-9 */
+#if OPT_ISO_COLORS
+ , psFG_COLOR = 30 /* stack maps many colors to one state */
+ , psBG_COLOR = 31
+#endif
, MAX_PUSH_SGR
} PushSGR;
@@ -1497,9 +1559,9 @@ typedef enum {
#define SetLineDblCS(ld,cs) (ld)->bufHead = (RowData) ((ld->bufHead & LINEFLAG_MASK) | (cs << LINEFLAG_BITS))
#define LineCharSet(screen, ld) \
- ((CSET_DOUBLE(GetLineDblCS(ld))) \
- ? GetLineDblCS(ld) \
- : (screen)->cur_chrset)
+ (unsigned) ((CSET_DOUBLE(GetLineDblCS(ld))) \
+ ? GetLineDblCS(ld) \
+ : (screen)->cur_chrset)
#define LineMaxCol(screen, ld) \
(CSET_DOUBLE(GetLineDblCS(ld)) \
? (screen->max_col / 2) \
@@ -1516,8 +1578,8 @@ typedef enum {
#define if_OPT_DEC_CHRSET(code) /*nothing*/
#define CSET_SWL 0
-#define GetLineDblCS(ld) 0
-#define LineCharSet(screen, ld) 0
+#define GetLineDblCS(ld) 0U
+#define LineCharSet(screen, ld) 0U
#define LineMaxCol(screen, ld) screen->max_col
#define LineCursorX(screen, ld, col) CursorX(screen, col)
#define LineFontWidth(screen, ld) FontWidth(screen)
@@ -1986,10 +2048,19 @@ typedef enum {
#if OPT_TOOLBAR
DP_TOOLBAR,
#endif
+#if OPT_GRAPHICS
DP_X_PRIVATE_COLOR_REGISTERS,
+#endif
#if OPT_SIXEL_GRAPHICS
DP_SIXEL_SCROLLS_RIGHT,
#endif
+#if OPT_PRINT_GRAPHICS
+ DP_DECGEPM, /* Graphics Expanded Print Mode */
+ DP_DECGPCM, /* Graphics Print Color Mode */
+ DP_DECGPCS, /* Graphics Print Color Syntax */
+ DP_DECGPBM, /* Graphics Print Background Mode */
+ DP_DECGRPM, /* Graphics Rotated Print Mode */
+#endif
DP_LAST
} SaveModes;
@@ -2107,8 +2178,8 @@ typedef struct {
typedef struct {
Window window; /* X window id */
- int width; /* width of columns */
- int height; /* height of rows */
+ int width; /* width of columns in pixels */
+ int height; /* height of rows in pixels */
Dimension fullwidth; /* full width of window */
Dimension fullheight; /* full height of window */
int f_width; /* width of fonts in pixels */
@@ -2118,6 +2189,7 @@ typedef struct {
SbInfo sb_info;
GC filler_gc; /* filler's fg/bg */
GC border_gc; /* inner border's fg/bg */
+ GC marker_gc[2]; /* wrap-marks */
#if USE_DOUBLE_BUFFER
Drawable drawable; /* X drawable id */
#endif
@@ -2202,6 +2274,43 @@ typedef enum {
, STEADY_BAR
} XtCursorStyle;
+#if OPT_GRAPHICS
+#define GraphicsTermId(screen) (\
+ (screen)->graphics_termid \
+ ? (screen)->graphics_termid \
+ : (screen)->terminal_id)
+#else
+#define GraphicsTermId(screen) (screen)->terminal_id
+#endif
+
+#if OPT_REGIS_GRAPHICS
+#define optRegisGraphics(screen) \
+ (GraphicsTermId(screen) == 125 || \
+ GraphicsTermId(screen) == 240 || \
+ GraphicsTermId(screen) == 241 || \
+ GraphicsTermId(screen) == 330 || \
+ GraphicsTermId(screen) == 340)
+#else
+#define optRegisGraphics(screen) False
+#endif
+
+#if OPT_SIXEL_GRAPHICS
+#define optSixelGraphics(screen) \
+ (GraphicsTermId(screen) == 240 || \
+ GraphicsTermId(screen) == 241 || \
+ GraphicsTermId(screen) == 330 || \
+ GraphicsTermId(screen) == 340 || \
+ GraphicsTermId(screen) == 382)
+#else
+#define optSixelGraphics(screen) False
+#endif
+
+#if OPT_PRINT_GRAPHICS
+#define if_PRINT_GRAPHICS2(statement) if (optRegisGraphics(screen)) { statement; } else
+#else
+#define if_PRINT_GRAPHICS2(statement) /* nothing */
+#endif
+
typedef struct {
/* These parameters apply to both windows */
Display *display; /* X display for screen */
@@ -2275,6 +2384,7 @@ typedef struct {
int utf8_title; /* use UTF-8 EWHM props: 0-2 */
int max_combining; /* maximum # of combining chars */
Boolean utf8_latin1; /* use UTF-8 with Latin-1 bias */
+ Boolean utf8_weblike; /* use UTF-8 with browser bias */
int latin9_mode; /* poor man's luit, latin9 */
int unicode_font; /* font uses unicode encoding */
int utf_count; /* state of utf_char */
@@ -2407,6 +2517,7 @@ typedef struct {
int pointer_mode; /* when to use hidden_cursor */
int pointer_mode0; /* ...initial value */
Boolean hide_pointer; /* true to use "hidden_cursor" */
+ String pointer_shape; /* name of shape in cursor font */
Cursor pointer_cursor; /* pointer cursor in window */
Cursor hidden_cursor; /* hidden cursor in window */
@@ -2602,6 +2713,8 @@ typedef struct {
#endif
#if OPT_GRAPHICS
+ String graph_termid; /* resource for graphics_termid */
+ int graphics_termid; /* based on terminal_id */
String graphics_max_size; /* given a size in pixels */
Dimension graphics_max_wide; /* ...corresponding width */
Dimension graphics_max_high; /* ...and height */
@@ -2624,6 +2737,16 @@ typedef struct {
Boolean privatecolorregisters; /* private color registers for each graphic */
#endif
+ /* Graphics Printing */
+#if OPT_PRINT_GRAPHICS
+ Boolean graphics_print_to_host;
+ Boolean graphics_expanded_print_mode;
+ Boolean graphics_print_color_mode;
+ Boolean graphics_print_color_syntax;
+ Boolean graphics_print_background_mode;
+ Boolean graphics_rotated_print_mode;
+#endif
+
#if OPT_VT52_MODE
IFlags vt52_save_flags;
Char vt52_save_curgl;
@@ -2753,6 +2876,7 @@ typedef struct {
void * icon_cgs_cache;
#endif
#if OPT_RENDERFONT
+ Boolean force_xft_height;
ListXftFonts *list_xft_fonts;
XTermXftFonts renderFontNorm[NMENUFONTS];
XTermXftFonts renderFontBold[NMENUFONTS];
@@ -2778,6 +2902,7 @@ typedef struct {
#if OPT_TCAP_FKEYS
char ** tcap_fkeys;
#endif
+ String cursor_font_name; /* alternate cursor font */
} TScreen;
typedef XTermFonts *(*MyGetFont) (TScreen *, int);
@@ -2942,9 +3067,13 @@ typedef struct
{
xtermKeyboardType type;
IFlags flags;
- char *shell_translations;
- char *xterm_translations;
+ char *shell_translations; /* shell's translations, for input check */
+ char *xterm_translations; /* xterm's translations, for input check */
char *extra_translations;
+ char *print_translations; /* printable translations for buttons */
+ unsigned shift_buttons; /* special shift-modifier for mouse-buttons */
+ int shift_escape; /* working value of shiftEscape */
+ char * shift_escape_s; /* resource for shiftEscape */
#if OPT_INITIAL_ERASE
int reset_DECBKM; /* reset should set DECBKM */
#endif
@@ -3143,7 +3272,18 @@ typedef struct {
#endif
} stack[MAX_SAVED_SGR];
} SavedSGR;
-#endif
+
+typedef struct {
+ ScrnColors base;
+ ColorRes ansi[1];
+} ColorSlot;
+
+typedef struct {
+ int used; /* currently saved or restored */
+ int last; /* maximum number of saved palettes */
+ ColorSlot *palettes[MAX_SAVED_SGR];
+} SavedColors;
+#endif /* OPT_XTERM_SGR */
typedef struct _XtermWidgetRec {
CorePart core;
@@ -3174,6 +3314,7 @@ typedef struct _XtermWidgetRec {
Work work; /* workspace (no resources) */
#if OPT_XTERM_SGR
SavedSGR saved_sgr;
+ SavedColors saved_colors;
#endif
} XtermWidgetRec, *XtermWidget;
@@ -3416,6 +3557,13 @@ extern Window VDrawable(TScreen * /* screen */);
#define ScrollbarWidth(screen) WhichVWin(screen)->sb_info.width
+/* y -> y_shift, to center text versus the cursor */
+#define ScaleShift(screen) \
+ (int) ((IsIcon(screen) || (screen->scale_height <= 1.0f)) \
+ ? 0.0f \
+ : ((float) WhichVWin(screen)->f_height \
+ * ((float) screen->scale_height - 1.0f) / 2.0f))
+
#define BorderGC(w,sp) WhichVWin(sp)->border_gc
#define FillerGC(w,sp) WhichVWin(sp)->filler_gc
#define NormalGC(w,sp) getCgsGC(w, WhichVWin(sp), gcNorm)
diff --git a/app/xterm/resize.c b/app/xterm/resize.c
index 4e0831d7e..57da7b5eb 100644
--- a/app/xterm/resize.c
+++ b/app/xterm/resize.c
@@ -1,7 +1,7 @@
-/* $XTermId: resize.c,v 1.142 2018/12/16 22:47:21 tom Exp $ */
+/* $XTermId: resize.c,v 1.144 2020/06/03 00:26:23 tom Exp $ */
/*
- * Copyright 2003-2017,2018 by Thomas E. Dickey
+ * Copyright 2003-2018,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -103,6 +103,7 @@ int ignore_unused;
#define SHELL_UNKNOWN 0
#define SHELL_C 1
#define SHELL_BOURNE 2
+
/* *INDENT-OFF* */
static struct {
const char *name;
@@ -181,6 +182,11 @@ static const char *wsize[EMULATIONS] =
};
#endif /* USE_STRUCT_WINSIZE */
+static void failed(const char *) GCC_NORETURN;
+static void onintr(int) GCC_NORETURN;
+static void resize_timeout(int) GCC_NORETURN;
+static void Usage(void) GCC_NORETURN;
+
static void
failed(const char *s)
{
diff --git a/app/xterm/run-tic.sh b/app/xterm/run-tic.sh
index 7c14d755a..c486d46c5 100644
--- a/app/xterm/run-tic.sh
+++ b/app/xterm/run-tic.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: run-tic.sh,v 1.11 2019/05/12 00:44:47 tom Exp $
+# $XTermId: run-tic.sh,v 1.12 2020/01/18 16:27:34 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2006-2007,2019 by Thomas E. Dickey
+# Copyright 2006-2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -36,6 +36,25 @@
# messages for the extensions which are otherwise ignored by other versions of
# tic.
+USE_NCURSES=20190609
+
+failed() {
+ echo "? $*" >&2
+ exit 1
+}
+
+need_ncurses() {
+ failed "This terminal description relies on ncurses 6.1 $USE_NCURSES"
+}
+
+use_ncurses6() {
+ VER=`infocmp6 -V 2>/dev/null`
+ test -n "$VER" && INFOCMP_PROG=infocmp6
+ VER=`tic6 -V 2>/dev/null`
+ test -n "$VER" && TIC_PROG=tic6
+ test -z "$VER" && need_ncurses
+}
+
MYTEMP=`mktemp -d 2>/dev/null`
if test -z "$MYTEMP"
then
@@ -64,22 +83,21 @@ case "x$VER" in
# large numbers (used in xterm-direct) and large entries (an issue with
# xterm-nrc).
case "$VER" in
- *\ [789].*|*\ 6.[123456789].*)
+ *\ [7-9].*|*\ 6.[1-9].20[12][0-9]*)
+ check=`echo "$VER" | sed -e 's/^.*\.//' -e 's/[^0-9].*$//'`
+ [ "$check" -lt "$USE_NCURSES" ] && use_ncurses6
;;
*)
# On systems with only ncurses 5, check for development version
# of ncurses.
- VER=`infocmp6 -V 2>/dev/null`
- test -n "$VER" && INFOCMP_PROG=infocmp6
- VER=`tic6 -V 2>/dev/null`
- test -n "$VER" && TIC_PROG=tic6
+ use_ncurses6
;;
esac
echo "** using tic from $VER"
# If this is 6.1.20180127 or later and using ABI 6, then it supports
# entries larger than 4096 bytes (up to 32768).
case "$VER" in
- *\ [789].*|*\ 6.[123456789].*)
+ *\ [7-9].*|*\ 6.[1-9].20[12][0-9]*)
expect=" cols#100000,"
cat >$MYTEMP/fake.ti <<EOF
fake|test 32-bit numbers,
diff --git a/app/xterm/screen.c b/app/xterm/screen.c
index f0076885f..6fb6b3b1e 100644
--- a/app/xterm/screen.c
+++ b/app/xterm/screen.c
@@ -1,7 +1,7 @@
-/* $XTermId: screen.c,v 1.588 2019/11/16 11:11:35 tom Exp $ */
+/* $XTermId: screen.c,v 1.596 2020/12/10 19:43:26 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -503,10 +503,10 @@ Reallocate(XtermWidget xw,
(unsigned) move_down
#endif
);
- free(oldBufHead);
/* Now free the old data */
free(oldBufData);
+ free(oldBufHead);
TRACE(("...Reallocate %dx%d ->%p\n", nrow, ncol, (void *) newBufHead));
return move_down ? move_down : -move_up; /* convert to rows */
@@ -1430,15 +1430,55 @@ ScrnDeleteChar(XtermWidget xw, unsigned n)
}
});
LineClrWrapped(ld);
- if (screen->show_wrap_marks) {
- ShowWrapMarks(xw, row, ld);
- }
+ ShowWrapMarks(xw, row, ld);
}
ClearCells(xw, 0, n, row, (last - (int) n));
#undef MemMove
}
+#define WhichMarkGC(set) (set ? 1 : 0)
+#define WhichMarkColor(set) T_COLOR(screen, (set ? TEXT_CURSOR : TEXT_BG))
+
+void
+FreeMarkGCs(XtermWidget xw)
+{
+ TScreen *const screen = TScreenOf(xw);
+ Display *const display = screen->display;
+ VTwin *vwin = WhichVWin(screen);
+ int which;
+
+ for (which = 0; which < 2; ++which) {
+ if (vwin->marker_gc[which] != NULL) {
+ XFreeGC(display, vwin->marker_gc[which]);
+ vwin->marker_gc[which] = NULL;
+ }
+ }
+}
+
+static GC
+MakeMarkGC(XtermWidget xw, Bool set)
+{
+ TScreen *const screen = TScreenOf(xw);
+ VTwin *vwin = WhichVWin(screen);
+ int which = WhichMarkGC(set);
+
+ if (vwin->marker_gc[which] == NULL) {
+ Display *const display = screen->display;
+ Window const drawable = VDrawable(screen);
+ XGCValues xgcv;
+ XtGCMask mask = GCForeground;
+
+ memset(&xgcv, 0, sizeof(xgcv));
+ xgcv.foreground = WhichMarkColor(set);
+ vwin->marker_gc[which] = XCreateGC(display,
+ drawable,
+ mask,
+ &xgcv);
+ }
+ return vwin->marker_gc[which];
+}
+
/*
* This is useful for debugging both xterm and applications that may manipulate
* its line-wrapping state.
@@ -1447,19 +1487,20 @@ void
ShowWrapMarks(XtermWidget xw, int row, CLineData *ld)
{
TScreen *screen = TScreenOf(xw);
- Boolean set = (Boolean) LineTstWrapped(ld);
- CgsEnum cgsId = set ? gcVTcursFilled : gcVTcursReverse;
- VTwin *currentWin = WhichVWin(screen);
- int y = row * FontHeight(screen) + screen->border;
- int x = LineCursorX(screen, ld, screen->max_col + 1);
-
- TRACE2(("ShowWrapMarks %d:%s\n", row, BtoS(set)));
-
- XFillRectangle(screen->display, VDrawable(screen),
- getCgsGC(xw, currentWin, cgsId),
- x, y,
- (unsigned) screen->border,
- (unsigned) FontHeight(screen));
+ if (screen->show_wrap_marks) {
+ Bool set = (Bool) LineTstWrapped(ld);
+ int y = row * FontHeight(screen) + screen->border;
+ int x = LineCursorX(screen, ld, screen->max_col + 1);
+
+ TRACE2(("ShowWrapMarks %d:%s\n", row, BtoS(set)));
+
+ XFillRectangle(screen->display,
+ VDrawable(screen),
+ MakeMarkGC(xw, set),
+ x, y,
+ (unsigned) screen->border,
+ (unsigned) FontHeight(screen));
+ }
}
/*
@@ -1552,9 +1593,7 @@ ScrnRefresh(XtermWidget xw,
break;
}
- if (screen->show_wrap_marks) {
- ShowWrapMarks(xw, lastind, ld);
- }
+ ShowWrapMarks(xw, lastind, ld);
if (maxcol >= (int) ld->lineSize) {
maxcol = ld->lineSize - 1;
@@ -1907,9 +1946,7 @@ ClearBufRows(XtermWidget xw,
SetLineDblCS(ld, CSET_SWL);
});
LineClrWrapped(ld);
- if (screen->show_wrap_marks) {
- ShowWrapMarks(xw, row, ld);
- }
+ ShowWrapMarks(xw, row, ld);
ClearCells(xw, 0, len, row, 0);
}
}
@@ -1995,7 +2032,7 @@ ScreenResize(XtermWidget xw,
: 0);
#endif
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
#if OPT_SAVE_LINES
/*
* The non-visible buffer is simple, since we will not copy data
@@ -2292,20 +2329,19 @@ ScreenResize(XtermWidget xw,
#endif /* NO_ACTIVE_ICON */
#ifdef TTYSIZE_STRUCT
- update_winsize(screen->respond, rows, cols, height, width);
-
+ if (update_winsize(screen->respond, rows, cols, height, width) == 0) {
#if defined(SIGWINCH) && defined(TIOCGPGRP)
- if (screen->pid > 1) {
- int pgrp;
+ if (screen->pid > 1) {
+ int pgrp;
- TRACE(("getting process-group\n"));
- if (ioctl(screen->respond, TIOCGPGRP, &pgrp) != -1) {
- TRACE(("sending SIGWINCH to process group %d\n", pgrp));
- kill_process_group(pgrp, SIGWINCH);
+ TRACE(("getting process-group\n"));
+ if (ioctl(screen->respond, TIOCGPGRP, &pgrp) != -1) {
+ TRACE(("sending SIGWINCH to process group %d\n", pgrp));
+ kill_process_group(pgrp, SIGWINCH);
+ }
}
- }
#endif /* SIGWINCH */
-
+ }
#else
TRACE(("ScreenResize cannot do anything to pty\n"));
#endif /* TTYSIZE_STRUCT */
@@ -2440,9 +2476,11 @@ ScrnFillRectangle(XtermWidget xw,
unsigned flags,
Bool keepColors)
{
+ IChar actual = (IChar) value;
TScreen *screen = TScreenOf(xw);
- TRACE(("filling rectangle with '%c' flags %#x\n", value, flags));
+ TRACE(("filling rectangle with '%s' flags %#x\n",
+ visibleIChars(&actual, 1), flags));
if (validRect(xw, target)) {
LineData *ld;
int top = (target->top - 1);
@@ -2501,7 +2539,7 @@ ScrnFillRectangle(XtermWidget xw,
}
for (col = left; col <= right; ++col)
- ld->charData[col] = (CharData) value;
+ ld->charData[col] = actual;
if_OPT_WIDE_CHARS(screen, {
size_t off;
@@ -2967,7 +3005,7 @@ set_resize_increments(XtermWidget xw)
TRACE_HINTS(&sizehints);
XSetWMNormalHints(screen->display, VShellWindow(xw), &sizehints);
- TRACE(("setting values for widget %p:\n", SHELL_OF(xw)));
+ TRACE(("setting values for widget %p:\n", (void *) SHELL_OF(xw)));
TRACE((" base width %d\n", min_width));
TRACE((" base height %d\n", min_width));
TRACE((" min width %d\n", min_width + FontWidth(screen)));
diff --git a/app/xterm/scrollback.c b/app/xterm/scrollback.c
index ae7419e96..6d255cf2d 100644
--- a/app/xterm/scrollback.c
+++ b/app/xterm/scrollback.c
@@ -1,7 +1,7 @@
-/* $XTermId: scrollback.c,v 1.19 2019/06/30 19:10:00 tom Exp $ */
+/* $XTermId: scrollback.c,v 1.21 2020/10/12 19:22:13 tom Exp $ */
/*
- * Copyright 2009-2016,2019 by Thomas E. Dickey
+ * Copyright 2009-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -87,8 +87,7 @@ addScrollback(TScreen *screen)
if (prior->attribs != 0) {
TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n",
which, (void *) prior, (void *) prior->attribs));
- free(prior->attribs);
- prior->attribs = 0;
+ FreeAndNull(prior->attribs);
}
if (screen->saved_fifo > 2 * screen->savelines) {
screen->saved_fifo -= screen->savelines;
@@ -122,8 +121,7 @@ deleteScrollback(TScreen *screen)
if (prior->attribs != 0) {
TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n",
which, (void *) prior, (void *) prior->attribs));
- free(prior->attribs);
- prior->attribs = 0;
+ FreeAndNull(prior->attribs);
}
screen->saved_fifo--;
}
diff --git a/app/xterm/scrollbar.c b/app/xterm/scrollbar.c
index ac69404fa..62e5ea008 100644
--- a/app/xterm/scrollbar.c
+++ b/app/xterm/scrollbar.c
@@ -1,7 +1,7 @@
-/* $XTermId: scrollbar.c,v 1.208 2019/07/19 00:40:41 tom Exp $ */
+/* $XTermId: scrollbar.c,v 1.210 2020/12/10 19:43:26 tom Exp $ */
/*
- * Copyright 2000-2018,2019 by Thomas E. Dickey
+ * Copyright 2000-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -373,10 +373,11 @@ ResizeScrollBar(XtermWidget xw)
}
void
-WindowScroll(XtermWidget xw, int top, Bool always GCC_UNUSED)
+WindowScroll(XtermWidget xw, int top, Bool always)
{
TScreen *screen = TScreenOf(xw);
+ (void) always;
#if OPT_SCROLL_LOCK
if (screen->allowScrollLock && (screen->scroll_lock && !always)) {
if (screen->scroll_dirty) {
@@ -399,7 +400,7 @@ WindowScroll(XtermWidget xw, int top, Bool always GCC_UNUSED)
int scrolltop, scrollheight, refreshtop;
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
lines = i > 0 ? i : -i;
if (lines > MaxRows(screen))
lines = MaxRows(screen);
@@ -622,7 +623,8 @@ CompareWidths(const char *a, const char *b, int *modifier)
cb = x_toupper(*b);
if (ca != cb || ca == '\0')
break; /* if not eq else both nul */
- a++, b++;
+ a++;
+ b++;
}
if (cb != '\0')
return 0;
diff --git a/app/xterm/svg.c b/app/xterm/svg.c
index 56fcb3131..b4b5c61bd 100644
--- a/app/xterm/svg.c
+++ b/app/xterm/svg.c
@@ -1,7 +1,7 @@
-/* $XTermId: svg.c,v 1.15 2019/11/02 15:04:31 tom Exp $ */
+/* $XTermId: svg.c,v 1.17 2020/06/02 23:24:31 tom Exp $ */
/*
- * Copyright 2017,2019 Thomas E. Dickey
+ * Copyright 2017-2019,2020 Thomas E. Dickey
* Copyright 2015-2016,2017 Jens Schweikhardt
*
* All Rights Reserved
@@ -57,10 +57,11 @@ static int ib = 0; /* internalBorder */
void
xtermDumpSvg(XtermWidget xw)
{
+ char *saveLocale;
FILE *fp;
TRACE(("xtermDumpSvg...\n"));
-
+ saveLocale = xtermSetLocale(LC_NUMERIC, "C");
fp = create_printfile(xw, ".svg");
if (fp != 0) {
dumpSvgHeader(xw, fp);
@@ -68,6 +69,7 @@ xtermDumpSvg(XtermWidget xw)
dumpSvgFooter(xw, fp);
fclose(fp);
}
+ xtermResetLocale(LC_NUMERIC, saveLocale);
TRACE(("...xtermDumpSvg done\n"));
}
@@ -276,7 +278,7 @@ dumpSvgLine(XtermWidget xw, int row, FILE *fp)
}
static void
-dumpSvgFooter(XtermWidget xw GCC_UNUSED, FILE *fp)
+dumpSvgFooter(XtermWidget xw, FILE *fp)
{
fputs(" </g>\n</svg>\n", fp);
xevents(xw);
diff --git a/app/xterm/terminfo b/app/xterm/terminfo
index 0346b1061..268686e9a 100644
--- a/app/xterm/terminfo
+++ b/app/xterm/terminfo
@@ -1,10 +1,10 @@
-# $XTermId: terminfo,v 1.184 2019/11/04 21:55:11 tom Exp $
+# $XTermId: terminfo,v 1.190 2020/12/11 09:23:14 tom Exp $
#
# Updates/notes/new entries (e.g., xterm-8bit, xterm-16color, xterm-256color)
# - Thomas E. Dickey
#
#------------------------------------------------------------------------------
-# Copyright 1996-2017,2019 by Thomas E. Dickey
+# Copyright 1996-2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -919,8 +919,8 @@ xterm+sm+1006|xterm SGR-mouse,
%e
l
%;,
- xm=\E[<
- %p1%d;%p2%d;%p3%d;
+ xm=\E[<%i
+ %p3%d;%p1%d;%p2%d;
%?
%p4
%tM
@@ -942,10 +942,10 @@ xterm+x11mouse|X11 xterm mouse protocol,
xm=\E[M
%?
%p4
- %t3
- %e
- %p3%'\s'%+%c
+ %t%p3
+ %e%{3}
%;
+ %'\s'%+%c
%p2%'!'%+%c%p1%'!'%+%c,
# This chunk is used for building the VT220/Sun/PC keyboard variants.
@@ -1012,6 +1012,7 @@ xterm-basic|modern xterm terminal emulator - common,
mc5=\E[5i,
meml=\El,
memu=\Em,
+ nel=\EE,
op=\E[39;49m,
rc=\E8,
rev=\E[7m,
@@ -1194,6 +1195,47 @@ xterm-vt52|xterm emulating dec vt52,
rmacs=\EG,
smacs=\EF,
use=xterm+kbs,
+ use=vt52+keypad,
+
+# from ncurses 6.2:
+# DECScope of course had no "function keys", but this building block assigns
+# the three blank keys at the top of the auxiliary (numeric) keypad, using
+# the same analogy as vt100 (also lacking function-keys).
+#
+# These assignments use the same layout for 0-9 as vt100+keypad; the vt52
+# keypad had its cursor-keys on the right-column as shown -TD
+# _______________________________________
+# | PF1 | PF2 | PF3 | c-up |
+# | \EP | \EQ | \ER | \EA |
+# |_kf1__k1_|_kf2__k2_|_kf3__k3_|kcuu1_k4_|
+# | 7 8 9 c-down |
+# | \E?w | \E?x | \E?y | \EB |
+# |_kf9__k9_|_kf10_k;_|_kf0__k0_|kcud1____|
+# | 4 | 5 | 6 | c-right |
+# | \E?t | \E?u | \E?v | \EC |
+# |_kf5__k5_|_kf6__k6_|_kf7__k7_|kcuf1_k8_|
+# | 1 | 2 | 3 | c-left |
+# | \E?q | \E?r | \E?s | \ED |
+# |_ka1__K1_|_kb2__K2_|_ka3__K3_|kcub1____|
+# | 0 | . | enter |
+# | \E?p | \E?n | \E?M |
+# |___kc1_______K4____|_kc3__K5_|_kent_@8_|
+#
+vt52+keypad|DECScope auxiliary keypad,
+ ka1=\E?q,
+ ka3=\E?s,
+ kb2=\E?r,
+ kc1=\E?p,
+ kc3=\E?n,
+ kf0=\E?y,
+ kf1=\EP,
+ kf2=\EQ,
+ kf3=\ER,
+ kf5=\E?t,
+ kf6=\E?u,
+ kf7=\E?v,
+ kf8=\E?w,
+ kf9=\E?x,
#
# Sun does not number the function keys this way in their sparse termcap; their
# terminal descriptions ignore the keypads. kb(7M) states that there are codes
@@ -1522,7 +1564,32 @@ xterm+alt+title|xterm 90 and 251 features combined,
rmcup=\E[?1049l\E[23;0;0t,
smcup=\E[?1049h\E[22;0;0t,
-# from development after ncurses 6.1
+# 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
+# PF1 is NumLock (which happens to be reserved for other use). To work around
+# that, PF1-PF4 are emulated via F1-F4, which leaves the "/", "*" and "+" not
+# directly related to VT100.
+#
+# With the VT220 keypad block that uses the 1-9 keys as suggested in
+# terminfo(5), the other keys can be handled with user-defined capabilities:
+#
+# _______________________________________
+# | NumLock | / | * | - |
+# | | $Oo | $Oj | $OS |
+# |_________|__kpDIV__|__kpMUL__|__kpSUB__|
+# | 7 8 9 | |
+# | $Ow | $Ox | $Oy | + |
+# |_ka1__K1_|_________|_ka3__K3_| $Ok |
+# | 4 | 5 | 6 | kpADD |
+# | $Ot | $Ou | $Ov | |
+# |_________|_kb2__K2_|_________|_________|
+# | 1 | 2 | 3 | |
+# | $Oq | $Or | $Os | |
+# |_kc1__K4_|_________|_kc3__K5_| enter |
+# | 0 | . | $OM |
+# | $Op | $On | |
+# |___________________|_________|_kent_@8_|
xterm+keypad|xterm emulating VT100/VT220 numeric keypad,
kp5=\EOE,
kpADD=\EOk,
@@ -1534,7 +1601,27 @@ xterm+keypad|xterm emulating VT100/VT220 numeric keypad,
kpZRO=\EOp,
use=vt220+keypad,
-# from develoment after ncurses 5.2
+# from development after ncurses 5.2:
+# A better adaptation to modern keyboards such as the PC's, which have a dozen
+# function keys and the keypad 2,4,6,8 keys are labeled with arrows keys, is to
+# use the 5-key arrangement to model the arrow keys as suggested in the
+# terminfo guidelines:
+# _______________________________________
+# | PF1 | PF2 | PF3 | PF4 |
+# | $OP | $OQ | $OR | $OS |
+# |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_|
+# | 7 8 9 - |
+# | $Ow | $Ox | $Oy | $Om |
+# |_ka1__K1_|_________|_ka3__K3_|_________|
+# | 4 | 5 | 6 | , |
+# | $Ot | $Ou | $Ov | $Ol |
+# |_________|_kb2__K2_|_________|_________|
+# | 1 | 2 | 3 | |
+# | $Oq | $Or | $Os | enter |
+# |_kc1__K4_|_________|_kc3__K5_| $OM |
+# | 0 | . | |
+# | $Op | $On | |
+# |___________________|_________|_kent_@8_|
vt220+keypad|dec vt220 numeric keypad,
ka1=\EOw,
ka3=\EOy,
@@ -1754,7 +1841,7 @@ xterm-16color|xterm with 16 colors,
%e%ga%d
%;
m,
- use=xterm+256color,
+ use=xterm+256color2,
use=xterm+osc104,
use=xterm-new,
@@ -1777,7 +1864,7 @@ xterm+osc104|reset color palette,
# in a signed short. Most people will not notice problems with only 32767
# pairs. With ncurses 6.1, numbers are stored in a signed integer (at least
# 32-bits), and the inconsistency regarding pairs is eliminated.
-xterm+256color|xterm 256-color feature,
+xterm+256color|original xterm 256-color feature,
ccc,
colors#0x100,
pairs#0x10000,
@@ -1808,8 +1895,32 @@ xterm+256color|xterm 256-color feature,
m,
setb@,
setf@,
-xterm-256color|xterm with 256 colors,
+xterm+256color2|xterm 256-color feature,
+ setab=\E[
+ %?
+ %p1%{8}%<
+ %t4%p1%d
+ %e
+ %p1%{16}%<
+ %t10%p1%{8}%-%d
+ %e48\:5\:
+ %p1%d
+ %;
+ m,
+ setaf=\E[
+ %?
+ %p1%{8}%<
+ %t3%p1%d
+ %e
+ %p1%{16}%<
+ %t9%p1%{8}%-%d
+ %e38\:5\:
+ %p1%d
+ %;
+ m,
use=xterm+256color,
+xterm-256color|xterm with 256 colors,
+ use=xterm+256color2,
use=xterm+osc104,
use=xterm-new,
xterm-88color|xterm with 88 colors,
@@ -1833,6 +1944,7 @@ xterm+direct|xterm with direct-color indexing,
RGB,
colors#0x1000000,
pairs#0x10000,
+ CO#8,
initc@,
op=\E[39;49m,
setab=\E[
diff --git a/app/xterm/testxmc.c b/app/xterm/testxmc.c
index 1af2c089b..32aa98a6f 100644
--- a/app/xterm/testxmc.c
+++ b/app/xterm/testxmc.c
@@ -1,7 +1,7 @@
-/* $XTermId: testxmc.c,v 1.53 2019/06/30 18:56:50 tom Exp $ */
+/* $XTermId: testxmc.c,v 1.54 2020/11/08 20:12:21 tom Exp $ */
/*
- * Copyright 1997-2014,2019 by Thomas E. Dickey
+ * Copyright 1997-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -150,7 +150,7 @@ Mark_XMC(XtermWidget xw, int param)
xw->flags ^= whichone;
TRACE(("XMC Writing glitch (%d/%d) after SGR %d\n", my_attrs,
whichone, param));
- dotext(xw, '?', glitch, screen->xmc_glitch);
+ dotext(xw, (DECNRCM_codes) '?', glitch, screen->xmc_glitch);
xw->flags = save;
}
}
diff --git a/app/xterm/trace.c b/app/xterm/trace.c
index e60fbaa8c..82a472cc0 100644
--- a/app/xterm/trace.c
+++ b/app/xterm/trace.c
@@ -1,7 +1,7 @@
-/* $XTermId: trace.c,v 1.215 2019/11/16 14:48:19 tom Exp $ */
+/* $XTermId: trace.c,v 1.230 2020/12/25 15:15:37 tom Exp $ */
/*
- * Copyright 1997-2018,2019 by Thomas E. Dickey
+ * Copyright 1997-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -89,37 +89,30 @@ TraceOpen(void)
trace_out = trace_who;
if (!trace_fp) {
+ static char dot[] = ".";
mode_t oldmask = umask(077);
- char name[BUFSIZ];
-#if 0 /* usually I do not want unique names */
+ /*
+ * Put the trace-file in user's home-directory if the current
+ * directory is not writable.
+ */
+ char *home = (access(dot, R_OK | W_OK) == 0) ? dot : getenv("HOME");
+ char *name = malloc(strlen(home) + strlen(trace_who) + 50);
+#if OPT_TRACE_UNIQUE /* usually I do not want unique names */
int unique;
for (unique = 0;; ++unique) {
if (unique)
- sprintf(name, "Trace-%s.out-%d", trace_who, unique);
+ sprintf(name, "%s/Trace-%s.out-%d", home, trace_who, unique);
else
- sprintf(name, "Trace-%s.out", trace_who);
+ sprintf(name, "%s/Trace-%s.out", home, trace_who);
if ((trace_fp = fopen(name, "r")) == 0) {
break;
}
fclose(trace_fp);
}
#else
- sprintf(name, "Trace-%s.out", trace_who);
+ sprintf(name, "%s/Trace-%s.out", home, trace_who);
#endif
trace_fp = fopen(name, "w");
- /*
- * Try to put the trace-file in user's home-directory if the current
- * directory is not writable.
- */
- if (trace_fp == 0) {
- char *home = getenv("HOME");
- if (home != 0) {
- sprintf(name, "%.*s/Trace-%.8s.out",
- (BUFSIZ - 21), home,
- trace_who);
- trace_fp = fopen(name, "w");
- }
- }
if (trace_fp != 0) {
fprintf(trace_fp, "%s\n", xtermVersion());
TraceIds(NULL, 0);
@@ -129,6 +122,7 @@ TraceOpen(void)
exit(EXIT_FAILURE);
}
(void) umask(oldmask);
+ free(name);
}
return trace_fp;
}
@@ -264,7 +258,7 @@ visibleScsCode(DECNRCM_codes chrset)
MAP("B", nrc_ASCII);
MAP("A", nrc_British);
MAP("A", nrc_British_Latin_1);
- MAP("&4", nrc_Cyrillic);
+ MAP("&4", nrc_DEC_Cyrillic);
MAP("0", nrc_DEC_Spec_Graphic);
MAP("1", nrc_DEC_Alt_Chars);
MAP("2", nrc_DEC_Alt_Graphics);
@@ -286,6 +280,8 @@ visibleScsCode(DECNRCM_codes chrset)
MAP("%=", nrc_Hebrew);
MAP("H", nrc_ISO_Hebrew_Supp);
MAP("Y", nrc_Italian);
+ MAP("A", nrc_ISO_Latin_1_Supp);
+ MAP("B", nrc_ISO_Latin_2_Supp);
MAP("M", nrc_ISO_Latin_5_Supp);
MAP("L", nrc_ISO_Latin_Cyrillic);
MAP("`", nrc_Norwegian_Danish);
@@ -328,9 +324,8 @@ visibleChars(const Char *buf, unsigned len)
dst += strlen(dst);
}
}
- } else if (result != 0) {
- free(result);
- result = 0;
+ } else {
+ FreeAndNull(result);
used = 0;
}
return NonNull(result);
@@ -384,9 +379,8 @@ visibleIChars(const IChar *buf, unsigned len)
dst += strlen(dst);
}
}
- } else if (result != 0) {
- free(result);
- result = 0;
+ } else {
+ FreeAndNull(result);
used = 0;
}
return NonNull(result);
@@ -396,7 +390,7 @@ const char *
visibleUChar(unsigned chr)
{
IChar buf[1];
- buf[0] = chr;
+ buf[0] = (IChar) chr;
return visibleIChars(buf, 1);
}
@@ -443,6 +437,18 @@ visibleEventType(int type)
}
const char *
+visibleMappingMode(int code)
+{
+ const char *result = "?";
+ switch (code) {
+ CASETYPE(MappingModifier);
+ CASETYPE(MappingKeyboard);
+ CASETYPE(MappingPointer);
+ }
+ return result;
+}
+
+const char *
visibleNotifyMode(int code)
{
const char *result = "?";
@@ -790,14 +796,17 @@ TraceEvent(const char *tag, XEvent *ev, String *params, Cardinal *num_params)
case ButtonPress:
/* FALLTHRU */
case ButtonRelease:
- TRACE((" button %u %s",
+ TRACE((" button %u state %#x %s",
ev->xbutton.button,
+ ev->xbutton.state,
formatEventMask(mask_buffer, ev->xbutton.state, True)));
break;
case MotionNotify:
- TRACE((" (%d,%d)",
+ TRACE((" (%d,%d) state %#x %s",
ev->xmotion.y_root,
- ev->xmotion.x_root));
+ ev->xmotion.x_root,
+ ev->xmotion.state,
+ formatEventMask(mask_buffer, ev->xmotion.state, True)));
break;
case EnterNotify:
case LeaveNotify:
@@ -842,6 +851,19 @@ TraceEvent(const char *tag, XEvent *ev, String *params, Cardinal *num_params)
ev->xconfigure.border_width,
ev->xconfigure.above));
break;
+ case CreateNotify:
+ TRACE((" at %d,%d size %dx%d bd %d",
+ ev->xcreatewindow.y,
+ ev->xcreatewindow.x,
+ ev->xcreatewindow.height,
+ ev->xcreatewindow.width,
+ ev->xcreatewindow.border_width));
+ break;
+ case ResizeRequest:
+ TRACE((" size %dx%d",
+ ev->xresizerequest.height,
+ ev->xresizerequest.width));
+ break;
case PropertyNotify:
TRACE((" %s %s",
TraceAtomName(XtDisplay(toplevel), ev->xproperty.atom),
@@ -860,8 +882,59 @@ TraceEvent(const char *tag, XEvent *ev, String *params, Cardinal *num_params)
ev->xexpose.width,
ev->xexpose.count));
break;
+ case MappingNotify:
+ TRACE((" %s first_keycode %d count %d",
+ visibleMappingMode(ev->xmapping.request),
+ ev->xmapping.first_keycode,
+ ev->xmapping.count));
+ break;
+ case VisibilityNotify:
+ TRACE((" state %d",
+ ev->xvisibility.state));
+ break;
+ case KeymapNotify:
+ {
+ Cardinal j;
+ for (j = 0; j < XtNumber(ev->xkeymap.key_vector); ++j) {
+ if (ev->xkeymap.key_vector[j] != 0) {
+ Cardinal k;
+ for (k = 0; k < 8; ++k) {
+ if (ev->xkeymap.key_vector[j] & (1 << k)) {
+ TRACE((" key%u", (j * 8) + k));
+ }
+ }
+ }
+ }
+ }
+ break;
+ case NoExpose:
+ TRACE((" send_event:%d display %p major:%d minor:%d",
+ ev->xnoexpose.send_event,
+ (void *) ev->xnoexpose.display,
+ ev->xnoexpose.major_code,
+ ev->xnoexpose.minor_code));
+ break;
+ case SelectionClear:
+ TRACE((" selection:%s",
+ TraceAtomName(ev->xselectionclear.display,
+ ev->xselectionclear.selection)));
+ break;
+ case SelectionRequest:
+ TRACE((" owner:%#lx requestor:%#lx",
+ ev->xselectionrequest.owner,
+ ev->xselectionrequest.requestor));
+ TRACE((" selection:%s",
+ TraceAtomName(ev->xselectionrequest.display,
+ ev->xselectionrequest.selection)));
+ TRACE((" target:%s",
+ TraceAtomName(ev->xselectionrequest.display,
+ ev->xselectionrequest.target)));
+ TRACE((" property:%s",
+ TraceAtomName(ev->xselectionrequest.display,
+ ev->xselectionrequest.property)));
+ break;
default:
- TRACE(("FIXME\n"));
+ TRACE((":FIXME"));
break;
}
TRACE(("\n"));
@@ -1063,17 +1136,6 @@ TraceWMSizeHints(XtermWidget xw)
xw->hints = sizehints;
}
-/*
- * Some calls to XGetAtom() will fail, and we don't want to stop. So we use
- * our own error-handler.
- */
-/* ARGSUSED */
-static int
-no_error(Display *dpy GCC_UNUSED, XErrorEvent *event GCC_UNUSED)
-{
- return 1;
-}
-
const char *
ModifierName(unsigned modifier)
{
@@ -1101,7 +1163,7 @@ void
TraceTranslations(const char *name, Widget w)
{
String result;
- XErrorHandler save = XSetErrorHandler(no_error);
+ XErrorHandler save = XSetErrorHandler(ignore_x11_error);
XtTranslations xlations;
Widget xcelerat;
diff --git a/app/xterm/trace.h b/app/xterm/trace.h
index b89218e6f..4554f0b0b 100644
--- a/app/xterm/trace.h
+++ b/app/xterm/trace.h
@@ -1,7 +1,7 @@
-/* $XTermId: trace.h,v 1.89 2019/09/25 20:38:04 tom Exp $ */
+/* $XTermId: trace.h,v 1.91 2020/01/29 18:48:24 tom Exp $ */
/*
- * Copyright 1997-2018,2019 by Thomas E. Dickey
+ * Copyright 1997-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -69,6 +69,7 @@ extern const char * visibleIChars(const IChar * /* buf */, unsigned /* len */);
extern const char * visibleUChar(unsigned);
extern const char * visibleDblChrset(unsigned /* chrset */);
extern const char * visibleEventType (int);
+extern const char * visibleMappingMode (int);
extern const char * visibleNotifyDetail(int /* code */);
extern const char * visibleNotifyMode (int /* code */);
extern const char * visibleScsCode(DECNRCM_codes /* chrset */);
@@ -91,10 +92,12 @@ extern void TraceEvent(const char *, XEvent *, String *, Cardinal *);
#undef TRACE_EVENT
#define TRACE_EVENT(t,e,s,n) TraceEvent(t, (XEvent *)e, s, n)
+#undef TRACE_FALLBACK
#if OPT_RENDERFONT && OPT_WIDE_CHARS
extern void TraceFallback(XtermWidget, const char *, unsigned, int, XftFont *);
-#undef TRACE_FALLBACK
#define TRACE_FALLBACK(w,t,c,n,f) TraceFallback(w, t, c, n, f)
+#else
+#define TRACE_FALLBACK(w,t,c,n,f) /*nothing*/
#endif
extern void TraceFocus(Widget, XEvent *);
diff --git a/app/xterm/util.c b/app/xterm/util.c
index 3fee93cfb..11ba4896c 100644
--- a/app/xterm/util.c
+++ b/app/xterm/util.c
@@ -1,7 +1,7 @@
-/* $XTermId: util.c,v 1.846 2019/11/13 22:55:08 tom Exp $ */
+/* $XTermId: util.c,v 1.871 2020/12/21 22:01:11 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -189,7 +189,7 @@ FlushScroll(XtermWidget xw)
Boolean full_lines = (Boolean) ((left == 0) && (right == screen->max_col));
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
TRACE(("FlushScroll %s-lines scroll:%d refresh %d\n",
full_lines ? "full" : "partial",
@@ -617,7 +617,7 @@ xtermScroll(XtermWidget xw, int amount)
screen->cursor_moved = True;
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
i = screen->bot_marg - screen->top_marg + 1;
if (amount > i)
@@ -882,7 +882,7 @@ RevScroll(XtermWidget xw, int amount)
screen->cursor_moved = True;
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
if (amount > i)
amount = i;
@@ -1015,7 +1015,7 @@ showZIconBeep(XtermWidget xw, char *name)
if (resource.zIconBeep && TScreenOf(xw)->zIconBeep_flagged) {
char *format = resource.zIconFormat;
- char *newname = TextAlloc(strlen(name) + strlen(format) + 1);
+ char *newname = malloc(strlen(name) + strlen(format) + 2);
if (!newname) {
xtermWarning("malloc failed in showZIconBeep\n");
} else {
@@ -1053,7 +1053,7 @@ resetZIconBeep(XtermWidget xw)
char *icon_name = getIconName();
screen->zIconBeep_flagged = False;
if (icon_name != NULL) {
- char *buf = TextAlloc(strlen(icon_name));
+ char *buf = malloc(strlen(icon_name) + 1);
if (buf == NULL) {
screen->zIconBeep_flagged = True;
} else {
@@ -1120,6 +1120,19 @@ WriteText(XtermWidget xw, IChar *str, Cardinal len)
&& ScrnIsRowInSelection(screen, INX2ROW(screen, screen->cur_row))) {
ScrnDisownSelection(xw);
}
+#if OPT_ISO_COLORS
+ /* if colorBDMode is set, and enabled */
+ if (screen->colorBDMode &&
+ screen->boldColors &&
+ !hasDirectFG(attr_flags) &&
+ /* and bold foreground color on bold background color */
+ GetCellColorFG(fg_bg) > COLOR_7 &&
+ GetCellColorFG(fg_bg) < MIN_ANSI_COLORS &&
+ /* and both colors are the same */
+ GetCellColorFG(fg_bg) == GetCellColorBG(fg_bg))
+ /* clear BOLD flag, else it will be colorBD on bold background color */
+ UIntClr(attr_flags, BOLD);
+#endif
/* if we are in insert-mode, reserve space for the new cells */
if (attr_flags & INSERT) {
@@ -1131,7 +1144,7 @@ WriteText(XtermWidget xw, IChar *str, Cardinal len)
unsigned test;
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
/*
* If we overwrite part of a multi-column character, fill the rest
@@ -1152,8 +1165,8 @@ WriteText(XtermWidget xw, IChar *str, Cardinal len)
TRACE(("WriteText calling drawXtermText (%d) (%d,%d)\n",
LineCharSet(screen, ld),
- screen->cur_col,
- screen->cur_row));
+ screen->cur_row,
+ screen->cur_col));
test = attr_flags;
#if OPT_ISO_COLORS
@@ -1217,7 +1230,7 @@ InsertLine(XtermWidget xw, int n)
set_cur_col(screen, ScrnLeftMargin(xw));
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
if (ScrnHaveSelection(screen)
&& ScrnAreRowsInSelection(screen,
@@ -1310,7 +1323,7 @@ DeleteLine(XtermWidget xw, int n)
set_cur_col(screen, ScrnLeftMargin(xw));
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
if (n > (i = screen->bot_marg - screen->cur_row + 1)) {
n = i;
@@ -1426,7 +1439,7 @@ InsertChar(XtermWidget xw, unsigned n)
int right = ScrnRightMargin(xw);
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
TRACE(("InsertChar count=%d\n", n));
@@ -1508,7 +1521,7 @@ DeleteChar(XtermWidget xw, unsigned n)
int right = ScrnRightMargin(xw);
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
if (!ScrnIsColInMargins(screen, screen->cur_col))
return;
@@ -1584,7 +1597,7 @@ ClearAbove(XtermWidget xw)
int top;
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
if ((top = INX2ROW(screen, 0)) <= screen->max_row) {
int height;
@@ -1723,7 +1736,7 @@ ClearInLine2(XtermWidget xw, int flags, int row, int col, unsigned len)
/* fall through to the final non-protected segment */
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
ResetWrap(screen);
if (AddToVisible(xw)
@@ -1809,9 +1822,7 @@ ClearRight(XtermWidget xw, int n)
/* with the right part cleared, we can't be wrapping */
LineClrWrapped(ld);
- if (screen->show_wrap_marks) {
- ShowWrapMarks(xw, screen->cur_row, ld);
- }
+ ShowWrapMarks(xw, screen->cur_row, ld);
ResetWrap(screen);
}
@@ -1862,7 +1873,7 @@ ClearScreen(XtermWidget xw)
TRACE(("ClearScreen\n"));
if (screen->cursor_state)
- HideCursor();
+ HideCursor(xw);
ScrnDisownSelection(xw);
ResetWrap(screen);
@@ -1890,6 +1901,21 @@ ClearScreen(XtermWidget xw)
* ignore the protected flags.
*/
void
+do_erase_char(XtermWidget xw, int param, int mode)
+{
+ TScreen *screen = TScreenOf(xw);
+ int saved_mode = screen->protected_mode;
+
+ if (saved_mode == DEC_PROTECT
+ && saved_mode != mode) {
+ screen->protected_mode = OFF_PROTECT;
+ }
+
+ ClearRight(xw, param);
+ screen->protected_mode = saved_mode;
+}
+
+void
do_erase_line(XtermWidget xw, int param, int mode)
{
TScreen *screen = TScreenOf(xw);
@@ -2050,6 +2076,9 @@ CopyWait(XtermWidget xw)
TScreen *screen = TScreenOf(xw);
XEvent reply;
XEvent *rep = &reply;
+#ifndef NO_ACTIVE_ICON
+ int retries = 0;
+#endif
#if USE_DOUBLE_BUFFER
if (resource.buffered)
@@ -2057,7 +2086,30 @@ CopyWait(XtermWidget xw)
#endif
for (;;) {
- XWindowEvent(screen->display, VWindow(screen), ExposureMask, &reply);
+#ifndef NO_ACTIVE_ICON
+ if (xw->work.active_icon != eiFalse) {
+ /*
+ * The XWindowEvent call blocks until an event is available. That
+ * can hang when using active-icon and iconifying/deiconifying
+ * while the terminal is receiving lots of output. Checking with
+ * this call on the other hand may lose exposure events which
+ * arrive too late. As a compromise, try several times with a
+ * time-delay before assuming no more events are available.
+ */
+ if (XCheckWindowEvent(screen->display,
+ VWindow(screen),
+ ExposureMask,
+ &reply)) {
+ retries = 0;
+ } else {
+ if (++retries >= 10)
+ return;
+ usleep(10000U); /* wait 10msec */
+ continue;
+ }
+ } else
+#endif
+ XWindowEvent(screen->display, VWindow(screen), ExposureMask, &reply);
switch (reply.type) {
case Expose:
HandleExposure(xw, &reply);
@@ -2174,11 +2226,14 @@ vertical_copy_area(XtermWidget xw,
if (screen->show_wrap_marks) {
int row;
+ int first = firstline - amount;
+ int last = firstline + nlines + amount;
- for (row = firstline; row < firstline + nlines; ++row) {
+ for (row = first; row < last; ++row) {
CLineData *ld;
+ int mapped = amount + row + screen->topline;
- if ((ld = getLineData(screen, row)) != 0) {
+ if ((ld = getLineData(screen, mapped)) != 0) {
ShowWrapMarks(xw, row, ld);
}
}
@@ -2262,7 +2317,7 @@ HandleExposure(XtermWidget xw, XEvent *event)
}
static void
-set_background(XtermWidget xw, int color GCC_UNUSED)
+set_background(XtermWidget xw, int color)
{
TScreen *screen = TScreenOf(xw);
Pixel c = getXtermBG(xw, xw->flags, color);
@@ -2451,6 +2506,7 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew)
if (COLOR_DEFINED(pNew, TEXT_CURSOR)) {
T_COLOR(screen, TEXT_CURSOR) = COLOR_VALUE(pNew, TEXT_CURSOR);
TRACE(("... TEXT_CURSOR: %#lx\n", T_COLOR(screen, TEXT_CURSOR)));
+ FreeMarkGCs(xw);
/* no repaint needed */
} else if ((T_COLOR(screen, TEXT_CURSOR) == T_COLOR(screen, TEXT_FG)) &&
(COLOR_DEFINED(pNew, TEXT_FG))) {
@@ -2460,6 +2516,7 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew)
if (screen->Vshow)
repaint = True;
}
+ FreeMarkGCs(xw);
}
if (COLOR_DEFINED(pNew, TEXT_FG)) {
@@ -2473,6 +2530,7 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew)
setCgsBack(xw, win, gcBoldReverse, fg);
repaint = True;
}
+ FreeMarkGCs(xw);
}
if (COLOR_DEFINED(pNew, TEXT_BG)) {
@@ -2693,6 +2751,7 @@ reallySwapColors(XtermWidget xw, ToSwap * list, int count)
redoCgs(xw, list[j].fg, list[j].bg, (CgsEnum) k);
}
}
+ FreeMarkGCs(xw);
}
static void
@@ -2727,9 +2786,9 @@ ReverseVideo(XtermWidget xw)
swapAColor(8, 15);
});
- if (T_COLOR(screen, TEXT_CURSOR) == T_COLOR(screen, TEXT_FG))
+ if (T_COLOR(screen, TEXT_CURSOR) == T_COLOR(screen, TEXT_FG)) {
T_COLOR(screen, TEXT_CURSOR) = T_COLOR(screen, TEXT_BG);
-
+ }
#define swapTColor(a,b) swapAnyColor(Tcolors, a, b)
swapTColor(TEXT_FG, TEXT_BG);
swapTColor(MOUSE_FG, MOUSE_BG);
@@ -3023,7 +3082,7 @@ getNormXftFont(XTermDraw * params,
*/
static int
xtermXftDrawString(XTermDraw * params,
- unsigned attr_flags GCC_UNUSED,
+ unsigned attr_flags,
XftColor *color,
XftFont *font,
int x,
@@ -3035,6 +3094,7 @@ xtermXftDrawString(XTermDraw * params,
TScreen *screen = TScreenOf(params->xw);
int ncells = 0;
+ (void) attr_flags;
if (len != 0) {
#if OPT_RENDERWIDE
XftCharSpec *sbuf;
@@ -3450,7 +3510,7 @@ drawClippedXftString(XTermDraw * params,
#endif
if (screen->use_clipping || halfHigh) {
XRectangle clip;
- double adds = (screen->scale_height - 1.0) * fontHigh;
+ double adds = ((double) screen->scale_height - 1.0f) * fontHigh;
int height = dimRound(adds + fontHigh);
int descnt = dimRound(adds / 2.0) + FontDescent(screen);
int clip_x = (x);
@@ -3497,7 +3557,7 @@ drawClippedXftString(XTermDraw * params,
xtermXftDrawString(params, attr_flags,
fg_color,
- font, x, y,
+ font, x, y + ScaleShift(screen),
text,
len,
True);
@@ -3515,7 +3575,7 @@ drawClippedXftString(XTermDraw * params,
GetNormalFont(screen, name)
#endif
-static int
+static void
drawUnderline(XtermWidget xw,
GC gc,
unsigned attr_flags,
@@ -3556,7 +3616,6 @@ drawUnderline(XtermWidget xw,
y);
}
}
- return y;
}
#if OPT_WIDE_ATTRS
@@ -3642,6 +3701,8 @@ fakeDoubleChars(XTermDraw * params,
TRACE(("%s %s: missing %d %04X\n", __FILE__, tag, missing, ch)); \
missing = 1
+#define MaxImageString 255
+
/*
* Draws text with the specified combination of bold/underline. The return
* value is the updated x position.
@@ -3655,9 +3716,10 @@ drawXtermText(XTermDraw * params,
Cardinal len)
{
XTermDraw recur = *params;
+ TScreen *screen = TScreenOf(recur.xw);
int x = start_x;
int y = start_y;
- TScreen *screen = TScreenOf(recur.xw);
+ int y_shift = ScaleShift(screen);
Cardinal real_length = len;
Cardinal underline_len = 0;
/* Intended width of the font to draw (as opposed to the actual width of
@@ -3674,6 +3736,11 @@ drawXtermText(XTermDraw * params,
if (text == 0)
return 0;
#endif
+ TRACE(("DRAWTEXT%c[%4d,%4d] (%d)%3d:%s\n",
+ screen->cursor_state == OFF ? ' ' : '*',
+ y, x, recur.this_chrset, len,
+ visibleIChars(text, len)));
+
#if OPT_DEC_CHRSET
if (CSET_DOUBLE(recur.this_chrset)) {
/* We could try drawing double-size characters in the icon, but
@@ -3683,11 +3750,6 @@ drawXtermText(XTermDraw * params,
int inx = 0;
GC gc2;
- TRACE(("DRAWTEXT%c[%4d,%4d] (%d)%3d:%s\n",
- screen->cursor_state == OFF ? ' ' : '*',
- y, x, recur.this_chrset, len,
- visibleIChars(text, len)));
-
#if OPT_RENDERFONT
if (UsingRenderFont(recur.xw)) {
if (!IsIcon(screen) && screen->font_doublesize) {
@@ -3882,10 +3944,10 @@ drawXtermText(XTermDraw * params,
XftFont *tempFont = 0;
#define CURR_TEMP (tempFont ? tempFont : currFont)
- if (xtermIsDecGraphic(ch)) {
+ if (xtermIsDecGraphic(ch) || ch == 0) {
/*
* Xft generally does not have the line-drawing characters
- * in cells 1-31. Assume this (we cannot inspect the
+ * in cells 0-31. Assume this (we cannot inspect the
* picture easily...), and attempt to fill in from real
* line-drawing character in the font at the Unicode
* position. Failing that, use our own box-characters.
@@ -3972,9 +4034,13 @@ drawXtermText(XTermDraw * params,
Dimension old_high = screen->fnt_high;
screen->fnt_wide = (Dimension) FontWidth(screen);
screen->fnt_high = (Dimension) FontHeight(screen);
+
xtermDrawBoxChar(&recur, ch,
gc,
- curX, y - FontAscent(screen), 1);
+ curX,
+ y - FontAscent(screen),
+ 1,
+ True);
curX += FontWidth(screen);
underline_len += 1;
screen->fnt_wide = old_wide;
@@ -4034,14 +4100,14 @@ drawXtermText(XTermDraw * params,
}
#endif /* OPT_BOX_CHARS */
- (void) drawUnderline(recur.xw,
- gc,
- recur.attr_flags,
- underline_len,
- FontWidth(screen),
- x,
- y,
- did_ul);
+ drawUnderline(recur.xw,
+ gc,
+ recur.attr_flags,
+ underline_len,
+ FontWidth(screen),
+ x,
+ y + y_shift,
+ did_ul);
x += (int) len *FontWidth(screen);
@@ -4191,10 +4257,10 @@ drawXtermText(XTermDraw * params,
else if (ch_width < 0)
ch_width = 1; /* special case for combining char */
if (!ucs_workaround(&recur, ch, gc, x, y)) {
- xtermDrawBoxChar(&recur, ch, gc, x, y, ch_width);
+ xtermDrawBoxChar(&recur, ch, gc, x, y, ch_width, False);
}
#else
- xtermDrawBoxChar(&recur, ch, gc, x, y, ch_width);
+ xtermDrawBoxChar(&recur, ch, gc, x, y, ch_width, False);
#endif
x += (ch_width * FontWidth(screen));
first = last + 1;
@@ -4236,7 +4302,7 @@ drawXtermText(XTermDraw * params,
DrawFlags(),
recur.this_chrset, len,
visibleIChars(text, len)));
- if (screen->scale_height != 1.0) {
+ if (screen->scale_height != 1.0f) {
xtermFillCells(&recur, gc, x, y, (Cardinal) len);
}
y += FontAscent(screen);
@@ -4419,13 +4485,26 @@ drawXtermText(XTermDraw * params,
if (recur.draw_flags & NOBACKGROUND) {
XDrawString16(screen->display,
VDrawable(screen), gc,
- x, y + ascent_adjust,
+ x, y + y_shift + ascent_adjust,
buffer, dst);
- } else {
+ } else if (dst <= MaxImageString) {
XDrawImageString16(screen->display,
VDrawable(screen), gc,
- x, y + ascent_adjust,
+ x, y + y_shift + ascent_adjust,
buffer, dst);
+ } else {
+ int b_pos;
+ int b_max = MaxImageString;
+ for (b_pos = 0; b_pos < dst; b_pos += b_max) {
+ if (b_pos + b_max > dst)
+ b_max = (dst - b_pos);
+ XDrawImageString16(screen->display,
+ VDrawable(screen), gc,
+ x + (b_pos * FontWidth(screen)),
+ y + y_shift + ascent_adjust,
+ buffer + b_pos,
+ b_max);
+ }
}
#if OPT_WIDE_ATTRS
if (need_clipping) {
@@ -4439,7 +4518,7 @@ drawXtermText(XTermDraw * params,
}
XDrawString16(screen->display, VDrawable(screen), gc,
x + 1,
- y + ascent_adjust,
+ y + y_shift + ascent_adjust,
buffer, dst);
if (!(recur.draw_flags & (DOUBLEWFONT | DOUBLEHFONT))) {
endClipping(screen, gc);
@@ -4473,10 +4552,23 @@ drawXtermText(XTermDraw * params,
if (recur.draw_flags & NOBACKGROUND) {
XDrawString(screen->display, VDrawable(screen), gc,
- x, y, buffer, length);
- } else {
+ x, y + y_shift, buffer, length);
+ } else if (length <= MaxImageString) {
XDrawImageString(screen->display, VDrawable(screen), gc,
- x, y, buffer, length);
+ x, y + y_shift, buffer, length);
+ } else {
+ int b_pos;
+ int b_max = MaxImageString;
+ for (b_pos = 0; b_pos < length; b_pos += b_max) {
+ if (b_pos + b_max > length)
+ b_max = (length - b_pos);
+ XDrawImageString(screen->display,
+ VDrawable(screen), gc,
+ x + (b_pos * FontWidth(screen)),
+ y + y_shift,
+ buffer + b_pos,
+ b_max);
+ }
}
#if OPT_WIDE_ATTRS
@@ -4490,21 +4582,21 @@ drawXtermText(XTermDraw * params,
beginClipping(screen, gc, font_width, length);
}
XDrawString(screen->display, VDrawable(screen), gc,
- x + 1, y, buffer, length);
+ x + 1, y + y_shift, buffer, length);
if (!(recur.draw_flags & (DOUBLEWFONT | DOUBLEHFONT))) {
endClipping(screen, gc);
}
}
}
- (void) drawUnderline(recur.xw,
- gc,
- recur.attr_flags,
- underline_len,
- font_width,
- x,
- y,
- did_ul);
+ drawUnderline(recur.xw,
+ gc,
+ recur.attr_flags,
+ underline_len,
+ font_width,
+ x,
+ y + y_shift,
+ did_ul);
x += ((int) real_length) * FontWidth(screen);
return x;
@@ -4843,7 +4935,7 @@ ClearCurBackground(XtermWidget xw,
xtermClear2(xw,
CursorX2(screen, left, fw),
- CursorY(screen, top),
+ CursorY2(screen, top),
(width * fw),
(height * (unsigned) FontHeight(screen)));
@@ -5439,3 +5531,22 @@ discardRenderDraw(TScreen *screen)
}
#endif
#endif /* OPT_RENDERFONT */
+
+char *
+xtermSetLocale(int category, String after)
+{
+ char *before = x_strdup(setlocale(category, 0));
+
+ (void) setlocale(category, after);
+ TRACE(("before setlocale :%s\n", NonNull(before)));
+ TRACE(("updated locale :%s\n", NonNull(setlocale(category, 0))));
+ return before;
+}
+
+void
+xtermResetLocale(int category, char *before)
+{
+ (void) setlocale(category, before);
+ free(before);
+ TRACE(("restored locale :%s\n", NonNull(setlocale(category, 0))));
+}
diff --git a/app/xterm/uxterm b/app/xterm/uxterm
index 94b085aab..25c6f5f21 100644
--- a/app/xterm/uxterm
+++ b/app/xterm/uxterm
@@ -1,9 +1,9 @@
#!/bin/sh
-# $XTermId: uxterm,v 1.26 2007/12/30 16:33:36 tom Exp $
+# $XTermId: uxterm,v 1.29 2020/03/07 15:52:31 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2001-2006,2007 by Thomas E. Dickey
+# Copyright 2001-2007,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -36,7 +36,7 @@
whoami=uxterm
-: ${XTERM_PROGRAM=xterm}
+: "${XTERM_PROGRAM=xterm}"
# Check if there is a workable locale program. If there is not, we will read
# something via the standard error. Ignore whatever is written to the
@@ -56,7 +56,7 @@ then
esac
fi
-# Check environment variables that xterm does, in the same order:
+# Check environment variables that might be used for encoding:
for name in LC_ALL LC_CTYPE LANG
do
eval 'value=$'$name
@@ -68,10 +68,9 @@ do
*.utf8@*|*.UTF8@*|*.utf-8@*|*.UTF-8@*)
found=yes
;;
- C|POSIX)
- # Yes, I know this is not the same - but why are you
- # here then?
- value=en_US
+ *)
+ value="" # ignore
+ continue # keep trying
;;
esac
break
@@ -86,8 +85,43 @@ if test $found != yes ; then
if test -n "$value" ; then
value=`echo ${value} |sed -e 's/[.@].*//'`.UTF-8
else
- name="LC_CTYPE"
- value="en_US.UTF-8"
+ expect=
+ for name in LC_ALL LC_CTYPE LANG
+ do
+ eval 'check=$'$name
+ if test -n "$check"
+ then
+ expect=`echo "$check" | sed -e 's/[.@].*$//'`
+ test -n "$expect" && break
+ fi
+ done
+ if test -z "$expect" ; then
+ name="LC_CTYPE"
+ expect="en_US"
+ fi
+ value=`locale -a | awk -v "expect=$expect" 'BEGIN {
+ exact=""
+ maybe=""
+ }
+ /[.](utf|UTF)[-]?8(@.*)?$/ {
+ if (index($0, "C.") == 1) {
+ maybe=$0;
+ }
+ if (index($0, expect ".") == 1) {
+ exact=$0;
+ }
+ }
+ END {
+ if ( exact != "" ) {
+ print exact;
+ } else if ( maybe != "" ) {
+ print maybe;
+ } else {
+ print "";
+ }
+ }
+ '`
+ test -z "$value" && value="en_US.UTF-8"
fi
eval save=\$${name}
eval ${name}=${value}
@@ -96,7 +130,7 @@ if test $found != yes ; then
# The 'locale' program tries to do a sanity check.
check=`sh -c "locale >/dev/null" 2>&1`
if test -n "$check" ; then
- eval ${name}=${save}
+ eval ${name}="${save}"
eval export ${name}
echo "$whoami tried to use locale $value by setting \$$name" >&2
@@ -112,4 +146,4 @@ fi
# for testing:
#test -f ./xterm && XTERM_PROGRAM=./xterm
-exec $XTERM_PROGRAM -class UXTerm -title $whoami -en UTF-8 "$@"
+exec "$XTERM_PROGRAM" -class UXTerm -title "$whoami" -u8 "$@"
diff --git a/app/xterm/version.c b/app/xterm/version.c
index 6a35e04b8..ab8bf52fc 100644
--- a/app/xterm/version.c
+++ b/app/xterm/version.c
@@ -1,7 +1,7 @@
-/* $XTermId: version.c,v 1.6 2019/11/13 23:52:20 tom Exp $ */
+/* $XTermId: version.c,v 1.7 2020/06/23 22:46:02 tom Exp $ */
/*
- * Copyright 2013-2018,2019 by Thomas E. Dickey
+ * Copyright 2013-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -49,7 +49,7 @@ xtermVersion(void)
if (buffer == 0) {
const char *vendor = vendor_version;
- buffer = TextAlloc(sizeof(vendor_version) + 256);
+ buffer = malloc(sizeof(vendor_version) + 256);
if (buffer == 0) {
result = vendor;
} else {
diff --git a/app/xterm/version.h b/app/xterm/version.h
index 8fe04007d..dd06fb1fc 100644
--- a/app/xterm/version.h
+++ b/app/xterm/version.h
@@ -1,7 +1,7 @@
-/* $XTermId: version.h,v 1.482 2019/11/18 01:49:36 tom Exp $ */
+/* $XTermId: version.h,v 1.505 2020/12/26 14:39:42 tom Exp $ */
/*
- * Copyright 1998-2018,2019 by Thomas E. Dickey
+ * Copyright 1998-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -38,8 +38,8 @@
* version of X to which this version of xterm has been built. The resulting
* number in parentheses is my patch number (Thomas E. Dickey).
*/
-#define XTERM_PATCH 351
-#define XTERM_DATE 2019-11-17
+#define XTERM_PATCH 363
+#define XTERM_DATE 2020-12-26
#ifndef __vendorversion__
#define __vendorversion__ "XTerm/OpenBSD"
diff --git a/app/xterm/vms.c b/app/xterm/vms.c
index 6f89e9e6a..e318c5c91 100644
--- a/app/xterm/vms.c
+++ b/app/xterm/vms.c
@@ -1,4 +1,4 @@
-/* $XTermId: vms.c,v 1.13 2010/10/11 08:05:35 tom Exp $ */
+/* $XTermId: vms.c,v 1.14 2020/01/18 18:32:45 tom Exp $ */
/* vms.c
*
@@ -314,7 +314,7 @@ void spawn (void)
/* has special code for DECWINDOWS that will: */
/* 1) do a DEFINE/JOB DECW$DISPLAY 'f$trnlnm(sys$error)' */
/* 2) then redefine SYS$ERROR to match SYS$OUTPUT! */
- /* This will propogate DECW$DISPLAY to the XTERM process!!! */
+ /* This will propagate DECW$DISPLAY to the XTERM process!!! */
/* Thanks go to Joel M Snyder who posted this info to INFO-VAX */
flags = PRC$M_INTER | PRC$M_NOPASSWORD | PRC$M_DETACH;
@@ -381,8 +381,8 @@ static void tt_echo_ast(TT_BUF_STRUCT *buff_addr)
/*
* This routine writes to the pseudo terminal. If there is a free
- * buffer then write with an echo buffer completing asyncronously, else
- * write syncronously using the buffer reserved for writing. All errors
+ * buffer then write with an echo buffer completing asynchronously, else
+ * write synchronously using the buffer reserved for writing. All errors
* are fatal, except DATAOVERUN and DATALOST,these errors can be ignored.
CAREFUL! Whatever calls this must NOT pass more than VMS_TERM_BUFFER_SIZE
@@ -554,7 +554,7 @@ static void send_bell(void)
* page size changed. If it did, resize the widget, otherwise, ignore
* it! This routine just gets the new term dimensions and sets a flag
* to indicate the term chars have changed. The widget gets resized in
- * the routine in_put in the module CHARPROC.C. You cant resize the
+ * the routine in_put in the module CHARPROC.C. You can't resize the
* widget in this routine because this is an AST and X is not reenterent.
*/
@@ -563,7 +563,7 @@ static void char_change(void)
int status;
/*
- * Dont do anything if in Tek mode
+ * Don't do anything if in Tek mode
*/
if(!(TScreenOf(term)->TekEmu))
diff --git a/app/xterm/vttests/256colors2.pl b/app/xterm/vttests/256colors2.pl
index 60d13a81b..2d63277a9 100644
--- a/app/xterm/vttests/256colors2.pl
+++ b/app/xterm/vttests/256colors2.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: 256colors2.pl,v 1.24 2018/08/10 15:03:34 tom Exp $
+# $XTermId: 256colors2.pl,v 1.25 2020/06/07 22:52:05 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1999-2016,2018 by Thomas E. Dickey
+# Copyright 1999-2018,2020 by Thomas E. Dickey
# Copyright 2002 by Steve Wall
# Copyright 1999 by Todd Larason
#
@@ -44,15 +44,16 @@ use warnings;
use Getopt::Std;
use Encode 'encode_utf8';
-our ( $opt_8, $opt_c, $opt_d, $opt_h, $opt_q, $opt_r, $opt_s, $opt_u );
+our ( $opt_8, $opt_c, $opt_C, $opt_d, $opt_h, $opt_q, $opt_r, $opt_s, $opt_u );
$Getopt::Std::STANDARD_HELP_VERSION = 1;
-&getopts('8cdhqrsu') || die("Usage: $0 [options]");
+&getopts('8cCdhqrsu') || die("Usage: $0 [options]");
die(
"Usage: $0 [options]\n
Options:
-8 use 8-bit controls
-c use colons for separating parameter values in SGR 38/48
+ -C like -c, but allow semicolon plus colon
-d use rgb values rather than palette index
-h display this message
-q quieter output by merging all palette initialization
@@ -66,7 +67,7 @@ our $cube = 6;
our (@steps);
our ( $red, $green, $blue );
our ( $gray, $level, $color );
-our ( $csi, $osc, $sep, $st );
+our ( $csi, $osc, $sep, $sep2, $st );
our @rgb;
@@ -98,10 +99,10 @@ sub define_color($$$$) {
sub select_color($) {
my $index = $_[0];
if ( $opt_d and defined( $rgb[$index] ) ) {
- printf "%s48;2%s%sm ", $csi, $sep, $rgb[$index];
+ printf "%s48%s2%s%sm ", $csi, $sep, $sep2, $rgb[$index];
}
else {
- printf "%s48;5%s%sm ", $csi, $sep, $index;
+ printf "%s48%s5%s%sm ", $csi, $sep, $sep2, $index;
}
}
@@ -131,6 +132,12 @@ if ($opt_c) {
else {
$sep = ";";
}
+$sep2 = $sep;
+
+if ($opt_C) {
+ $sep = ";";
+ $sep2 = ":";
+}
if ( $opt_8 and $opt_u ) {
my $lc_ctype = `locale 2>/dev/null | fgrep LC_CTYPE | sed -e 's/^.*=//'`;
@@ -140,6 +147,7 @@ if ( $opt_8 and $opt_u ) {
}
printf( "%s4", $osc ) if ($opt_q);
+
if ($opt_s) {
&system_color( 0, 0, 0, 0 );
&system_color( 1, 205, 0, 0 );
diff --git a/app/xterm/vttests/88colors2.pl b/app/xterm/vttests/88colors2.pl
index 6bfca1fd4..b0ca162e9 100644
--- a/app/xterm/vttests/88colors2.pl
+++ b/app/xterm/vttests/88colors2.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: 88colors2.pl,v 1.18 2018/08/10 15:03:34 tom Exp $
+# $XTermId: 88colors2.pl,v 1.19 2020/06/07 22:48:11 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 1999-2016,2018 by Thomas E. Dickey
+# Copyright 1999-2018,2020 by Thomas E. Dickey
# Copyright 1999 by Steve Wall
#
# All Rights Reserved
@@ -45,15 +45,16 @@ use warnings;
use Getopt::Std;
use Encode 'encode_utf8';
-our ( $opt_8, $opt_c, $opt_d, $opt_h, $opt_q, $opt_r, $opt_s, $opt_u );
+our ( $opt_8, $opt_c, $opt_C, $opt_d, $opt_h, $opt_q, $opt_r, $opt_s, $opt_u );
$Getopt::Std::STANDARD_HELP_VERSION = 1;
-&getopts('8cdhqrsu') || die("Usage: $0 [options]");
+&getopts('8cCdhqrsu') || die("Usage: $0 [options]");
die(
"Usage: $0 [options]\n
Options:
-8 use 8-bit controls
-c use colons for separating parameter values in SGR 38/48
+ -C like -c, but allow semicolon plus colon
-d use rgb values rather than palette index
-h display this message
-q quieter output by merging all palette initialization
@@ -67,7 +68,7 @@ our $cube = 4;
our (@steps);
our ( $red, $green, $blue );
our ( $gray, $level, $color );
-our ( $csi, $osc, $sep, $st );
+our ( $csi, $osc, $sep, $sep2, $st );
our @rgb;
@@ -99,10 +100,10 @@ sub define_color($$$$) {
sub select_color($) {
my $index = $_[0];
if ( $opt_d and defined( $rgb[$index] ) ) {
- printf "%s48;2%s%sm ", $csi, $sep, $rgb[$index];
+ printf "%s48%s2%s%sm ", $csi, $sep, $sep2, $rgb[$index];
}
else {
- printf "%s48;5%s%sm ", $csi, $sep, $index;
+ printf "%s48%s5%s%sm ", $csi, $sep, $sep2, $index;
}
}
@@ -132,6 +133,12 @@ if ($opt_c) {
else {
$sep = ";";
}
+$sep2 = $sep;
+
+if ($opt_C) {
+ $sep = ";";
+ $sep2 = ":";
+}
if ( $opt_8 and $opt_u ) {
my $lc_ctype = `locale 2>/dev/null | fgrep LC_CTYPE | sed -e 's/^.*=//'`;
diff --git a/app/xterm/vttests/closest-rgb.pl b/app/xterm/vttests/closest-rgb.pl
index 21e177d4d..e0fa9db7f 100755
--- a/app/xterm/vttests/closest-rgb.pl
+++ b/app/xterm/vttests/closest-rgb.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: closest-rgb.pl,v 1.11 2018/08/10 18:02:55 tom Exp $
+# $XTermId: closest-rgb.pl,v 1.12 2020/12/13 15:07:02 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2017,2018 by Thomas E. Dickey
+# Copyright 2017-2018,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -36,7 +36,6 @@
use strict;
use warnings;
-use diagnostics;
use Getopt::Std;
diff --git a/app/xterm/vttests/modify-keys.pl b/app/xterm/vttests/modify-keys.pl
index 78524f7c8..4f60b1556 100644
--- a/app/xterm/vttests/modify-keys.pl
+++ b/app/xterm/vttests/modify-keys.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: modify-keys.pl,v 1.89 2019/10/29 00:22:23 tom Exp $
+# $XTermId: modify-keys.pl,v 1.91 2020/11/15 16:43:35 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2019 by Thomas E. Dickey
+# Copyright 2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -988,7 +988,7 @@ sub print_data() {
# different modifier combinations can produce the same
# keysym. Since it appears that the slots that the
# user would expect are filled in first, just ignoring
- # the duplicate works well enought.
+ # the duplicate works well enough.
if ( not $linkUsed{$value} ) {
$props .= " name=\"$value\"";
$linkUsed{$value} = 1;
@@ -1404,11 +1404,16 @@ sub report_keys_used() {
$Shifted{$code} = $code unless ( $Shifted{$code} );
for my $t ( 1 .. $type{SIZE} - 1 ) {
- $sym = $symCache[ $obj{CODE} + $t ];
- $code = "";
- $code = $keySyms{$sym} if ( $keySyms{$sym} );
- $keysUsed{$code} = $sym;
- $links[0] = &link_data( "symmap", "summary", 4, $sym );
+ $sym = $symCache[ $obj{CODE} + $t ];
+ if ( $keySyms{$sym} ) {
+ $code = $keySyms{$sym};
+ $keysUsed{$code} = $sym;
+ $links[0] = &link_data( "symmap", "summary", 4, $sym );
+ }
+ else {
+ $code = "";
+ @links = ();
+ }
&print_data(
\@links,
5, "", #
diff --git a/app/xterm/vttests/mouse-codes b/app/xterm/vttests/mouse-codes
index 2a8dcb36d..bdcb6141d 100644
--- a/app/xterm/vttests/mouse-codes
+++ b/app/xterm/vttests/mouse-codes
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: mouse-codes,v 1.6 2019/01/04 00:49:41 tom Exp $
+# $XTermId: mouse-codes,v 1.7 2020/12/13 15:07:02 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2018,2019 by Thomas E. Dickey
+# Copyright 2018-2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -35,7 +35,6 @@
# event state) versus output (xterm mouse-code).
use strict;
use warnings;
-use diagnostics;
use Getopt::Std;
diff --git a/app/xterm/vttests/print-vt-chars.pl b/app/xterm/vttests/print-vt-chars.pl
index 57ca527e6..e7ab8db3e 100644
--- a/app/xterm/vttests/print-vt-chars.pl
+++ b/app/xterm/vttests/print-vt-chars.pl
@@ -1,9 +1,9 @@
#!/usr/bin/perl -w
-# $Id: print-vt-chars.pl,v 1.1 2019/02/24 11:41:43 matthieu Exp $
+# XTerm$Id: print-vt-chars.pl,v 1.2 2021/01/10 09:23:58 matthieu Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2018 by Thomas E. Dickey
+# Copyright 2018,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -35,7 +35,6 @@
use strict;
use warnings;
-use diagnostics;
$| = 2;
@@ -308,7 +307,7 @@ EOF
&init_charset( "DEC_Technical", 0, '>', 3, 9, 0 );
&init_charset( "French_Canadian2", 0, '9', 3, 9, 1 );
&init_charset( "Norwegian_Danish", 0, '`', 3, 9, 1 );
-&init_charset( "Portugese", 0, '%6', 3, 9, 1 );
+&init_charset( "Portuguese", 0, '%6', 3, 9, 1 );
&init_charset( "ISO_Greek_Supp", 1, 'F', 5, 9, 0 );
&init_charset( "ISO_Hebrew_Supp", 1, 'H', 5, 9, 0 );
&init_charset( "ISO_Latin_5_Supp", 1, 'M', 5, 9, 0 );
diff --git a/app/xterm/vttests/query-color.pl b/app/xterm/vttests/query-color.pl
index 4e097884c..5964f0cf3 100644
--- a/app/xterm/vttests/query-color.pl
+++ b/app/xterm/vttests/query-color.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: query-color.pl,v 1.20 2019/05/19 08:56:22 tom Exp $
+# $XTermId: query-color.pl,v 1.26 2020/12/13 18:17:40 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2012-2018,2019 by Thomas E. Dickey
+# Copyright 2012-2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -33,26 +33,25 @@
# -----------------------------------------------------------------------------
# Test the color-query features of xterm using OSC 4 or OSC 5.
-# TODO: optionally show result in #rrggbb format.
-
use strict;
use warnings;
-use diagnostics;
use Getopt::Std;
use IO::Handle;
-our ( $opt_4, $opt_a, $opt_n, $opt_q, $opt_s );
+our ( $opt_4, $opt_a, $opt_n, $opt_q, $opt_r, $opt_s, $opt_t );
$Getopt::Std::STANDARD_HELP_VERSION = 1;
-&getopts('4an:qs') || die(
+&getopts('4an:qrst') || die(
"Usage: $0 [options] [color1[-color2]]\n
Options:\n
-4 use OSC 4 for special colors rather than OSC 5
-a query all \"ANSI\" colors
-n NUM assume terminal supports NUM \"ANSI\" colors rather than 256
-q quicker results by merging queries
+ -r show reported color in #rrggbb format
-s use ^G rather than ST
+ -t show actual color
"
);
@@ -147,19 +146,56 @@ sub add_param($) {
sub show_reply($) {
my $reply = shift;
- printf "data={%s}", &visible($reply);
- if ( $reply =~ /^\d+;rgb:.*/ and ( $opt_4 or ( $this_op == 5 ) ) ) {
- my $num = $reply;
- my $max = $opt_4 ? $num_ansi_colors : 0;
- $num =~ s/;.*//;
- if ( $num >= $max ) {
- my $name = &code2special( $num - $max );
- printf " %s", $name if ($name);
+ my $shown = sprintf "data={%s}", &visible($reply);
+ my $limit = 30;
+ if ( $reply =~ /^\d+;rgb:.*/ ) {
+ my $color = $reply;
+ $color =~ s/^\d+;rgb://;
+ if ( $color =~ /^[[:xdigit:]]{4}(\/[[:xdigit:]]{4}){2}/ ) {
+ $color =~ s/..$//;
+ $color =~ s/..\///g;
+ if ($opt_r) {
+ $shown = sprintf "#%s", $color;
+ $limit = 7;
+ }
+ }
+ printf "%s", $shown;
+ if ( $opt_4 or ( $this_op == 5 ) ) {
+ my $num = $reply;
+ my $max = $opt_4 ? $num_ansi_colors : 0;
+ $num =~ s/;.*//;
+ if ( $num >= $max ) {
+ my $name = &code2special( $num - $max );
+ printf " %s", $name if ($name);
+ }
}
+ if ($opt_t) {
+ my $num = $reply;
+ $num =~ s/;.*//;
+ printf "%*s", $limit - length($shown), " ";
+ if ( $num < 8 ) {
+ printf "\x1b[%dm", 40 + $num;
+ }
+ elsif ( $num < 16 ) {
+ printf "\x1b[%dm", 100 + $num - 8;
+ }
+ elsif ( $num < $num_ansi_colors ) {
+ printf "\x1b[48;5;%dm", $num;
+ }
+ else {
+ }
+ printf " ";
+ printf "\x1b[K";
+ printf "\x1b[m";
+ }
+ }
+ else {
+ printf "%s", $shown;
}
}
sub finish_query() {
+ my $query;
my $reply;
my $n;
my $st = $opt_s ? qr/\007/ : qr/\x1b\\/;
@@ -167,13 +203,20 @@ sub finish_query() {
my $match = qr/^(${osc}.*${st})+$/;
my $params = sprintf "%s;?;", ( join( ";?;", @query_params ) );
- $reply = &get_reply( "\x1b]$this_op;" . $params . $ST );
+ $query = "\x1b]$this_op;" . $params . $ST;
+ $reply = &get_reply($query);
- printf "query%s{%s}%*s", $this_op, &visible($params), 3 - length($params),
- " ";
+ if ($opt_q) {
+ printf "query %s\n", &visible($query);
+ }
+ else {
+ printf "query %s%*s ", &visible($query),
+ 15 - length( &visible($query) ),
+ " ";
+ }
if ( defined $reply ) {
- printf "len=%2d ", length($reply);
+ printf "reply len=%2d ", length($reply);
if ( $reply =~ /${match}/ ) {
my @chunks = split /${st}${osc}/, $reply;
printf "\n" if ( $#chunks > 0 );
@@ -181,7 +224,7 @@ sub finish_query() {
$chunks[$c] =~ s/^${osc}// if ( $c == 0 );
$chunks[$c] =~ s/${st}$// if ( $c == $#chunks );
$chunks[$c] =~ s/^;//;
- printf "\t%d: ", $c if ( $#chunks > 0 );
+ printf "%3d: ", $c if ( $#chunks > 0 );
&show_reply( $chunks[$c] );
printf "\n" if ( $c < $#chunks );
}
diff --git a/app/xterm/vttests/query-xres.pl b/app/xterm/vttests/query-xres.pl
index 1b3caf94a..3645d17f6 100644
--- a/app/xterm/vttests/query-xres.pl
+++ b/app/xterm/vttests/query-xres.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $XTermId: query-feature.pl,v 1.6 2019/10/06 23:56:18 tom Exp $
+# $XTermId: query-xres.pl,v 1.6 2019/10/06 23:56:18 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
diff --git a/app/xterm/vttests/sgrPushPop2.pl b/app/xterm/vttests/sgrPushPop2.pl
index 29575b91f..f1fa5e28c 100644
--- a/app/xterm/vttests/sgrPushPop2.pl
+++ b/app/xterm/vttests/sgrPushPop2.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
-# $XTermId: sgrPushPop2.pl,v 1.2 2019/05/03 23:59:26 tom Exp $
+# $XTermId: sgrPushPop2.pl,v 1.4 2020/12/13 15:05:06 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
-# Copyright 2019 by Thomas E. Dickey
+# Copyright 2019,2020 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -34,7 +34,6 @@
use strict;
use warnings;
-use diagnostics;
use Getopt::Std;
@@ -200,14 +199,14 @@ printf "Testing white-on-black with columns %s,%s,%s\n",
for my $row ( 0 .. $opt_n ) {
- &pushSGR("10;11"); # save/restore only foreground/background color
+ &pushSGR("30;31"); # save/restore only foreground/background color
&set_video($row); # this attribute is set for the whole row
&run_example(0);
&popSGR;
&run_example(1);
- &pushSGR("10;11"); # save/restore only foreground/background color
+ &pushSGR("30;31"); # save/restore only foreground/background color
&run_example(2);
&popSGR;
printf "END!"; # this is in the last color used in the middle column
diff --git a/app/xterm/wcwidth.c b/app/xterm/wcwidth.c
index 33ce24869..658b3ac15 100644
--- a/app/xterm/wcwidth.c
+++ b/app/xterm/wcwidth.c
@@ -1,9 +1,9 @@
-/* $XTermId: wcwidth.c,v 1.55 2019/06/10 23:41:53 tom Exp $ */
+/* $XTermId: wcwidth.c,v 1.57 2020/04/27 21:45:06 tom Exp $ */
/* $XFree86: xc/programs/xterm/wcwidth.c,v 1.9 2006/06/19 00:36:52 dickey Exp $ */
/*
- * Copyright 2002-2018,2019 by Thomas E. Dickey
+ * Copyright 2002-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -214,7 +214,7 @@ int mk_wcwidth(wchar_t ucs)
* uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c
*/
/* *INDENT-OFF* */
- /* generated by run-uniset 1.5 */
+ /* generated by run-uniset 1.6 */
static const struct interval combining[] = {
{ 0x0300, 0x036F }, { 0x0483, 0x0489 }, { 0x0591, 0x05BD },
{ 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, { 0x05C4, 0x05C5 },
@@ -236,97 +236,99 @@ int mk_wcwidth(wchar_t ucs)
{ 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0AE2, 0x0AE3 },
{ 0x0AFA, 0x0AFF }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
{ 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B44 }, { 0x0B4D, 0x0B4D },
- { 0x0B56, 0x0B56 }, { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 },
+ { 0x0B55, 0x0B56 }, { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 },
{ 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C00, 0x0C00 },
{ 0x0C04, 0x0C04 }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
{ 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0C62, 0x0C63 },
{ 0x0C81, 0x0C81 }, { 0x0CBC, 0x0CBC }, { 0x0CBF, 0x0CBF },
{ 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, { 0x0CE2, 0x0CE3 },
{ 0x0D00, 0x0D01 }, { 0x0D3B, 0x0D3C }, { 0x0D41, 0x0D44 },
- { 0x0D4D, 0x0D4D }, { 0x0D62, 0x0D63 }, { 0x0DCA, 0x0DCA },
- { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, { 0x0E31, 0x0E31 },
- { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB1, 0x0EB1 },
- { 0x0EB4, 0x0EBC }, { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 },
- { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 },
- { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 },
- { 0x0F8D, 0x0F97 }, { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 },
- { 0x102D, 0x1030 }, { 0x1032, 0x1037 }, { 0x1039, 0x103A },
- { 0x103D, 0x103E }, { 0x1058, 0x1059 }, { 0x105E, 0x1060 },
- { 0x1071, 0x1074 }, { 0x1082, 0x1082 }, { 0x1085, 0x1086 },
- { 0x108D, 0x108D }, { 0x109D, 0x109D }, { 0x1160, 0x11FF },
- { 0x135D, 0x135F }, { 0x1712, 0x1714 }, { 0x1732, 0x1734 },
- { 0x1752, 0x1753 }, { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 },
- { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 },
- { 0x17DD, 0x17DD }, { 0x180B, 0x180E }, { 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, 0x1ABE },
- { 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 },
- { 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 }, { 0x10F46, 0x10F50 },
+ { 0x0D4D, 0x0D4D }, { 0x0D62, 0x0D63 }, { 0x0D81, 0x0D81 },
+ { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
+ { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
+ { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EBC }, { 0x0EC8, 0x0ECD },
+ { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 },
+ { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 },
+ { 0x0F86, 0x0F87 }, { 0x0F8D, 0x0F97 }, { 0x0F99, 0x0FBC },
+ { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1037 },
+ { 0x1039, 0x103A }, { 0x103D, 0x103E }, { 0x1058, 0x1059 },
+ { 0x105E, 0x1060 }, { 0x1071, 0x1074 }, { 0x1082, 0x1082 },
+ { 0x1085, 0x1086 }, { 0x108D, 0x108D }, { 0x109D, 0x109D },
+ { 0x1160, 0x11FF }, { 0x135D, 0x135F }, { 0x1712, 0x1714 },
+ { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, { 0x1772, 0x1773 },
+ { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 },
+ { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, { 0x180B, 0x180E },
+ { 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 },
+ { 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 },
{ 0x110CD, 0x110CD }, { 0x11100, 0x11102 }, { 0x11127, 0x1112B },
{ 0x1112D, 0x11134 }, { 0x11173, 0x11173 }, { 0x11180, 0x11181 },
- { 0x111B6, 0x111BE }, { 0x111C9, 0x111CC }, { 0x1122F, 0x11231 },
- { 0x11234, 0x11234 }, { 0x11236, 0x11237 }, { 0x1123E, 0x1123E },
- { 0x112DF, 0x112DF }, { 0x112E3, 0x112EA }, { 0x11300, 0x11301 },
- { 0x1133B, 0x1133C }, { 0x11340, 0x11340 }, { 0x11366, 0x1136C },
- { 0x11370, 0x11374 }, { 0x11438, 0x1143F }, { 0x11442, 0x11444 },
- { 0x11446, 0x11446 }, { 0x1145E, 0x1145E }, { 0x114B3, 0x114B8 },
- { 0x114BA, 0x114BA }, { 0x114BF, 0x114C0 }, { 0x114C2, 0x114C3 },
- { 0x115B2, 0x115B5 }, { 0x115BC, 0x115BD }, { 0x115BF, 0x115C0 },
- { 0x115DC, 0x115DD }, { 0x11633, 0x1163A }, { 0x1163D, 0x1163D },
- { 0x1163F, 0x11640 }, { 0x116AB, 0x116AB }, { 0x116AD, 0x116AD },
- { 0x116B0, 0x116B5 }, { 0x116B7, 0x116B7 }, { 0x1171D, 0x1171F },
- { 0x11722, 0x11725 }, { 0x11727, 0x1172B }, { 0x1182F, 0x11837 },
- { 0x11839, 0x1183A }, { 0x119D4, 0x119D7 }, { 0x119DA, 0x119DB },
- { 0x119E0, 0x119E0 }, { 0x11A01, 0x11A0A }, { 0x11A33, 0x11A38 },
- { 0x11A3B, 0x11A3E }, { 0x11A47, 0x11A47 }, { 0x11A51, 0x11A56 },
- { 0x11A59, 0x11A5B }, { 0x11A8A, 0x11A96 }, { 0x11A98, 0x11A99 },
- { 0x11C30, 0x11C36 }, { 0x11C38, 0x11C3D }, { 0x11C3F, 0x11C3F },
- { 0x11C92, 0x11CA7 }, { 0x11CAA, 0x11CB0 }, { 0x11CB2, 0x11CB3 },
- { 0x11CB5, 0x11CB6 }, { 0x11D31, 0x11D36 }, { 0x11D3A, 0x11D3A },
- { 0x11D3C, 0x11D3D }, { 0x11D3F, 0x11D45 }, { 0x11D47, 0x11D47 },
- { 0x11D90, 0x11D91 }, { 0x11D95, 0x11D95 }, { 0x11D97, 0x11D97 },
- { 0x11EF3, 0x11EF4 }, { 0x13430, 0x13438 }, { 0x16AF0, 0x16AF4 },
- { 0x16B30, 0x16B36 }, { 0x16F4F, 0x16F4F }, { 0x16F8F, 0x16F92 },
- { 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 }, { 0x1E2EC, 0x1E2EF }, { 0x1E8D0, 0x1E8D6 },
- { 0x1E944, 0x1E94A }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },
- { 0xE0100, 0xE01EF }
+ { 0x111B6, 0x111BE }, { 0x111C9, 0x111CC }, { 0x111CF, 0x111CF },
+ { 0x1122F, 0x11231 }, { 0x11234, 0x11234 }, { 0x11236, 0x11237 },
+ { 0x1123E, 0x1123E }, { 0x112DF, 0x112DF }, { 0x112E3, 0x112EA },
+ { 0x11300, 0x11301 }, { 0x1133B, 0x1133C }, { 0x11340, 0x11340 },
+ { 0x11366, 0x1136C }, { 0x11370, 0x11374 }, { 0x11438, 0x1143F },
+ { 0x11442, 0x11444 }, { 0x11446, 0x11446 }, { 0x1145E, 0x1145E },
+ { 0x114B3, 0x114B8 }, { 0x114BA, 0x114BA }, { 0x114BF, 0x114C0 },
+ { 0x114C2, 0x114C3 }, { 0x115B2, 0x115B5 }, { 0x115BC, 0x115BD },
+ { 0x115BF, 0x115C0 }, { 0x115DC, 0x115DD }, { 0x11633, 0x1163A },
+ { 0x1163D, 0x1163D }, { 0x1163F, 0x11640 }, { 0x116AB, 0x116AB },
+ { 0x116AD, 0x116AD }, { 0x116B0, 0x116B5 }, { 0x116B7, 0x116B7 },
+ { 0x1171D, 0x1171F }, { 0x11722, 0x11725 }, { 0x11727, 0x1172B },
+ { 0x1182F, 0x11837 }, { 0x11839, 0x1183A }, { 0x1193B, 0x1193C },
+ { 0x1193E, 0x1193E }, { 0x11943, 0x11943 }, { 0x119D4, 0x119D7 },
+ { 0x119DA, 0x119DB }, { 0x119E0, 0x119E0 }, { 0x11A01, 0x11A0A },
+ { 0x11A33, 0x11A38 }, { 0x11A3B, 0x11A3E }, { 0x11A47, 0x11A47 },
+ { 0x11A51, 0x11A56 }, { 0x11A59, 0x11A5B }, { 0x11A8A, 0x11A96 },
+ { 0x11A98, 0x11A99 }, { 0x11C30, 0x11C36 }, { 0x11C38, 0x11C3D },
+ { 0x11C3F, 0x11C3F }, { 0x11C92, 0x11CA7 }, { 0x11CAA, 0x11CB0 },
+ { 0x11CB2, 0x11CB3 }, { 0x11CB5, 0x11CB6 }, { 0x11D31, 0x11D36 },
+ { 0x11D3A, 0x11D3A }, { 0x11D3C, 0x11D3D }, { 0x11D3F, 0x11D45 },
+ { 0x11D47, 0x11D47 }, { 0x11D90, 0x11D91 }, { 0x11D95, 0x11D95 },
+ { 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 },
+ { 0x1E2EC, 0x1E2EF }, { 0x1E8D0, 0x1E8D6 }, { 0x1E944, 0x1E94A },
+ { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, { 0xE0100, 0xE01EF }
};
/* *INDENT-ON* */
@@ -335,6 +337,7 @@ int mk_wcwidth(wchar_t ucs)
* uniset +0000..DFFF -4e00..9fd5 +F900..10FFFD unknown +2028..2029 c
*/
/* *INDENT-OFF* */
+ /* generated by run-uniset_unk 1.6 */
static const struct interval unknowns[] = {
{ 0x0378, 0x0379 }, { 0x0380, 0x0383 }, { 0x038B, 0x038B },
{ 0x038D, 0x038D }, { 0x03A2, 0x03A2 }, { 0x0530, 0x0530 },
@@ -343,7 +346,7 @@ int mk_wcwidth(wchar_t ucs)
{ 0x061D, 0x061D }, { 0x070E, 0x070E }, { 0x074B, 0x074C },
{ 0x07B2, 0x07BF }, { 0x07FB, 0x07FC }, { 0x082E, 0x082F },
{ 0x083F, 0x083F }, { 0x085C, 0x085D }, { 0x085F, 0x085F },
- { 0x086B, 0x089F }, { 0x08B5, 0x08B5 }, { 0x08BE, 0x08D2 },
+ { 0x086B, 0x089F }, { 0x08B5, 0x08B5 }, { 0x08C8, 0x08D2 },
{ 0x0984, 0x0984 }, { 0x098D, 0x098E }, { 0x0991, 0x0992 },
{ 0x09A9, 0x09A9 }, { 0x09B1, 0x09B1 }, { 0x09B3, 0x09B5 },
{ 0x09BA, 0x09BB }, { 0x09C5, 0x09C6 }, { 0x09C9, 0x09CA },
@@ -361,7 +364,7 @@ int mk_wcwidth(wchar_t ucs)
{ 0x0AF2, 0x0AF8 }, { 0x0B00, 0x0B00 }, { 0x0B04, 0x0B04 },
{ 0x0B0D, 0x0B0E }, { 0x0B11, 0x0B12 }, { 0x0B29, 0x0B29 },
{ 0x0B31, 0x0B31 }, { 0x0B34, 0x0B34 }, { 0x0B3A, 0x0B3B },
- { 0x0B45, 0x0B46 }, { 0x0B49, 0x0B4A }, { 0x0B4E, 0x0B55 },
+ { 0x0B45, 0x0B46 }, { 0x0B49, 0x0B4A }, { 0x0B4E, 0x0B54 },
{ 0x0B58, 0x0B5B }, { 0x0B5E, 0x0B5E }, { 0x0B64, 0x0B65 },
{ 0x0B78, 0x0B81 }, { 0x0B84, 0x0B84 }, { 0x0B8B, 0x0B8D },
{ 0x0B91, 0x0B91 }, { 0x0B96, 0x0B98 }, { 0x0B9B, 0x0B9B },
@@ -376,142 +379,145 @@ int mk_wcwidth(wchar_t ucs)
{ 0x0CA9, 0x0CA9 }, { 0x0CB4, 0x0CB4 }, { 0x0CBA, 0x0CBB },
{ 0x0CC5, 0x0CC5 }, { 0x0CC9, 0x0CC9 }, { 0x0CCE, 0x0CD4 },
{ 0x0CD7, 0x0CDD }, { 0x0CDF, 0x0CDF }, { 0x0CE4, 0x0CE5 },
- { 0x0CF0, 0x0CF0 }, { 0x0CF3, 0x0CFF }, { 0x0D04, 0x0D04 },
- { 0x0D0D, 0x0D0D }, { 0x0D11, 0x0D11 }, { 0x0D45, 0x0D45 },
- { 0x0D49, 0x0D49 }, { 0x0D50, 0x0D53 }, { 0x0D64, 0x0D65 },
- { 0x0D80, 0x0D81 }, { 0x0D84, 0x0D84 }, { 0x0D97, 0x0D99 },
- { 0x0DB2, 0x0DB2 }, { 0x0DBC, 0x0DBC }, { 0x0DBE, 0x0DBF },
- { 0x0DC7, 0x0DC9 }, { 0x0DCB, 0x0DCE }, { 0x0DD5, 0x0DD5 },
- { 0x0DD7, 0x0DD7 }, { 0x0DE0, 0x0DE5 }, { 0x0DF0, 0x0DF1 },
- { 0x0DF5, 0x0E00 }, { 0x0E3B, 0x0E3E }, { 0x0E5C, 0x0E80 },
- { 0x0E83, 0x0E83 }, { 0x0E85, 0x0E85 }, { 0x0E8B, 0x0E8B },
- { 0x0EA4, 0x0EA4 }, { 0x0EA6, 0x0EA6 }, { 0x0EBE, 0x0EBF },
- { 0x0EC5, 0x0EC5 }, { 0x0EC7, 0x0EC7 }, { 0x0ECE, 0x0ECF },
- { 0x0EDA, 0x0EDB }, { 0x0EE0, 0x0EFF }, { 0x0F48, 0x0F48 },
- { 0x0F6D, 0x0F70 }, { 0x0F98, 0x0F98 }, { 0x0FBD, 0x0FBD },
- { 0x0FCD, 0x0FCD }, { 0x0FDB, 0x0FFF }, { 0x10C6, 0x10C6 },
- { 0x10C8, 0x10CC }, { 0x10CE, 0x10CF }, { 0x1249, 0x1249 },
- { 0x124E, 0x124F }, { 0x1257, 0x1257 }, { 0x1259, 0x1259 },
- { 0x125E, 0x125F }, { 0x1289, 0x1289 }, { 0x128E, 0x128F },
- { 0x12B1, 0x12B1 }, { 0x12B6, 0x12B7 }, { 0x12BF, 0x12BF },
- { 0x12C1, 0x12C1 }, { 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 },
- { 0x1ABF, 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 }, { 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 }, { 0x218C, 0x218F }, { 0x2427, 0x243F },
- { 0x244B, 0x245F }, { 0x2B74, 0x2B75 }, { 0x2B96, 0x2B97 },
- { 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 }, { 0x2E50, 0x2E7F },
- { 0x2E9A, 0x2E9A }, { 0x2EF4, 0x2EFF }, { 0x2FD6, 0x2FEF },
- { 0x2FFC, 0x2FFF }, { 0x3040, 0x3040 }, { 0x3097, 0x3098 },
- { 0x3100, 0x3104 }, { 0x3130, 0x3130 }, { 0x318F, 0x318F },
- { 0x31BB, 0x31BF }, { 0x31E4, 0x31EF }, { 0x321F, 0x321F },
- { 0x4DB6, 0x4DBF }, { 0x9FD6, 0x9FFF }, { 0xA48D, 0xA48F },
- { 0xA4C7, 0xA4CF }, { 0xA62C, 0xA63F }, { 0xA6F8, 0xA6FF },
- { 0xA7C0, 0xA7C1 }, { 0xA7C7, 0xA7F6 }, { 0xA82C, 0xA82F },
- { 0xA83A, 0xA83F }, { 0xA878, 0xA87F }, { 0xA8C6, 0xA8CD },
- { 0xA8DA, 0xA8DF }, { 0xA954, 0xA95E }, { 0xA97D, 0xA97F },
- { 0xA9CE, 0xA9CE }, { 0xA9DA, 0xA9DD }, { 0xA9FF, 0xA9FF },
- { 0xAA37, 0xAA3F }, { 0xAA4E, 0xAA4F }, { 0xAA5A, 0xAA5B },
- { 0xAAC3, 0xAADA }, { 0xAAF7, 0xAB00 }, { 0xAB07, 0xAB08 },
- { 0xAB0F, 0xAB10 }, { 0xAB17, 0xAB1F }, { 0xAB27, 0xAB27 },
- { 0xAB2F, 0xAB2F }, { 0xAB68, 0xAB6F }, { 0xABEE, 0xABEF },
- { 0xABFA, 0xABFF }, { 0xD7A4, 0xD7AF }, { 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 }, { 0x1019C, 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 }, { 0x10806, 0x10807 },
- { 0x10809, 0x10809 }, { 0x10836, 0x10836 }, { 0x10839, 0x1083B },
- { 0x1083D, 0x1083E }, { 0x10856, 0x10856 }, { 0x1089F, 0x108A6 },
- { 0x108B0, 0x108DF }, { 0x108F3, 0x108F3 }, { 0x108F6, 0x108FA },
- { 0x1091C, 0x1091E }, { 0x1093A, 0x1093E }, { 0x10940, 0x1097F },
- { 0x109B8, 0x109BB }, { 0x109D0, 0x109D1 }, { 0x10A04, 0x10A04 },
- { 0x10A07, 0x10A0B }, { 0x10A14, 0x10A14 }, { 0x10A18, 0x10A18 },
- { 0x10A36, 0x10A37 }, { 0x10A3B, 0x10A3E }, { 0x10A49, 0x10A4F },
- { 0x10A59, 0x10A5F }, { 0x10AA0, 0x10ABF }, { 0x10AE7, 0x10AEA },
- { 0x10AF7, 0x10AFF }, { 0x10B36, 0x10B38 }, { 0x10B56, 0x10B57 },
- { 0x10B73, 0x10B77 }, { 0x10B92, 0x10B98 }, { 0x10B9D, 0x10BA8 },
- { 0x10BB0, 0x10BFF }, { 0x10C49, 0x10C7F }, { 0x10CB3, 0x10CBF },
- { 0x10CF3, 0x10CF9 }, { 0x10D28, 0x10D2F }, { 0x10D3A, 0x10E5F },
- { 0x10E7F, 0x10EFF }, { 0x10F28, 0x10F2F }, { 0x10F5A, 0x10FDF },
- { 0x10FF7, 0x10FFF }, { 0x1104E, 0x11051 }, { 0x11070, 0x1107E },
- { 0x110C2, 0x110CC }, { 0x110CE, 0x110CF }, { 0x110E9, 0x110EF },
- { 0x110FA, 0x110FF }, { 0x11135, 0x11135 }, { 0x11147, 0x1114F },
- { 0x11177, 0x1117F }, { 0x111CE, 0x111CF }, { 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 }, { 0x1145A, 0x1145A }, { 0x1145C, 0x1145C },
- { 0x11460, 0x1147F }, { 0x114C8, 0x114CF }, { 0x114DA, 0x1157F },
+ { 0x0CF0, 0x0CF0 }, { 0x0CF3, 0x0CFF }, { 0x0D0D, 0x0D0D },
+ { 0x0D11, 0x0D11 }, { 0x0D45, 0x0D45 }, { 0x0D49, 0x0D49 },
+ { 0x0D50, 0x0D53 }, { 0x0D64, 0x0D65 }, { 0x0D80, 0x0D80 },
+ { 0x0D84, 0x0D84 }, { 0x0D97, 0x0D99 }, { 0x0DB2, 0x0DB2 },
+ { 0x0DBC, 0x0DBC }, { 0x0DBE, 0x0DBF }, { 0x0DC7, 0x0DC9 },
+ { 0x0DCB, 0x0DCE }, { 0x0DD5, 0x0DD5 }, { 0x0DD7, 0x0DD7 },
+ { 0x0DE0, 0x0DE5 }, { 0x0DF0, 0x0DF1 }, { 0x0DF5, 0x0E00 },
+ { 0x0E3B, 0x0E3E }, { 0x0E5C, 0x0E80 }, { 0x0E83, 0x0E83 },
+ { 0x0E85, 0x0E85 }, { 0x0E8B, 0x0E8B }, { 0x0EA4, 0x0EA4 },
+ { 0x0EA6, 0x0EA6 }, { 0x0EBE, 0x0EBF }, { 0x0EC5, 0x0EC5 },
+ { 0x0EC7, 0x0EC7 }, { 0x0ECE, 0x0ECF }, { 0x0EDA, 0x0EDB },
+ { 0x0EE0, 0x0EFF }, { 0x0F48, 0x0F48 }, { 0x0F6D, 0x0F70 },
+ { 0x0F98, 0x0F98 }, { 0x0FBD, 0x0FBD }, { 0x0FCD, 0x0FCD },
+ { 0x0FDB, 0x0FFF }, { 0x10C6, 0x10C6 }, { 0x10C8, 0x10CC },
+ { 0x10CE, 0x10CF }, { 0x1249, 0x1249 }, { 0x124E, 0x124F },
+ { 0x1257, 0x1257 }, { 0x1259, 0x1259 }, { 0x125E, 0x125F },
+ { 0x1289, 0x1289 }, { 0x128E, 0x128F }, { 0x12B1, 0x12B1 },
+ { 0x12B6, 0x12B7 }, { 0x12BF, 0x12BF }, { 0x12C1, 0x12C1 },
+ { 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 },
+ { 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 },
+ { 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 },
+ { 0xA82D, 0xA82F }, { 0xA83A, 0xA83F }, { 0xA878, 0xA87F },
+ { 0xA8C6, 0xA8CD }, { 0xA8DA, 0xA8DF }, { 0xA954, 0xA95E },
+ { 0xA97D, 0xA97F }, { 0xA9CE, 0xA9CE }, { 0xA9DA, 0xA9DD },
+ { 0xA9FF, 0xA9FF }, { 0xAA37, 0xAA3F }, { 0xAA4E, 0xAA4F },
+ { 0xAA5A, 0xAA5B }, { 0xAAC3, 0xAADA }, { 0xAAF7, 0xAB00 },
+ { 0xAB07, 0xAB08 }, { 0xAB0F, 0xAB10 }, { 0xAB17, 0xAB1F },
+ { 0xAB27, 0xAB27 }, { 0xAB2F, 0xAB2F }, { 0xAB6C, 0xAB6F },
+ { 0xABEE, 0xABEF }, { 0xABFA, 0xABFF }, { 0xD7A4, 0xD7AF },
+ { 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 },
+ { 0x10806, 0x10807 }, { 0x10809, 0x10809 }, { 0x10836, 0x10836 },
+ { 0x10839, 0x1083B }, { 0x1083D, 0x1083E }, { 0x10856, 0x10856 },
+ { 0x1089F, 0x108A6 }, { 0x108B0, 0x108DF }, { 0x108F3, 0x108F3 },
+ { 0x108F6, 0x108FA }, { 0x1091C, 0x1091E }, { 0x1093A, 0x1093E },
+ { 0x10940, 0x1097F }, { 0x109B8, 0x109BB }, { 0x109D0, 0x109D1 },
+ { 0x10A04, 0x10A04 }, { 0x10A07, 0x10A0B }, { 0x10A14, 0x10A14 },
+ { 0x10A18, 0x10A18 }, { 0x10A36, 0x10A37 }, { 0x10A3B, 0x10A3E },
+ { 0x10A49, 0x10A4F }, { 0x10A59, 0x10A5F }, { 0x10AA0, 0x10ABF },
+ { 0x10AE7, 0x10AEA }, { 0x10AF7, 0x10AFF }, { 0x10B36, 0x10B38 },
+ { 0x10B56, 0x10B57 }, { 0x10B73, 0x10B77 }, { 0x10B92, 0x10B98 },
+ { 0x10B9D, 0x10BA8 }, { 0x10BB0, 0x10BFF }, { 0x10C49, 0x10C7F },
+ { 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 },
- { 0x11900, 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, 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 }, { 0x16AEE, 0x16AEF }, { 0x16AF6, 0x16AFF },
- { 0x16B46, 0x16B4F }, { 0x16B5A, 0x16B5A }, { 0x16B62, 0x16B62 },
- { 0x16B78, 0x16B7C }, { 0x16B90, 0x16E3F }, { 0x16E9B, 0x16EFF },
- { 0x16F4B, 0x16F4E }, { 0x16F88, 0x16F8E }, { 0x16FA0, 0x16FDF },
- { 0x16FE4, 0x187FF }, { 0x18AF3, 0x1AFFF }, { 0x1B11F, 0x1B14F },
+ { 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 },
+ { 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 },
{ 0x1B153, 0x1B163 }, { 0x1B168, 0x1B16F }, { 0x1B2FC, 0x1BBFF },
{ 0x1BC6B, 0x1BC6F }, { 0x1BC7D, 0x1BC7F }, { 0x1BC89, 0x1BC8F },
{ 0x1BC9A, 0x1BC9B }, { 0x1BCA4, 0x1CFFF }, { 0x1D0F6, 0x1D0FF },
@@ -544,18 +550,19 @@ int mk_wcwidth(wchar_t ucs)
{ 0x1EEAA, 0x1EEAA }, { 0x1EEBC, 0x1EEEF }, { 0x1EEF2, 0x1EFFF },
{ 0x1F02C, 0x1F02F }, { 0x1F094, 0x1F09F }, { 0x1F0AF, 0x1F0B0 },
{ 0x1F0C0, 0x1F0C0 }, { 0x1F0D0, 0x1F0D0 }, { 0x1F0F6, 0x1F0FF },
- { 0x1F10D, 0x1F10F }, { 0x1F16D, 0x1F16F }, { 0x1F1AD, 0x1F1E5 },
- { 0x1F203, 0x1F20F }, { 0x1F23C, 0x1F23F }, { 0x1F249, 0x1F24F },
- { 0x1F252, 0x1F25F }, { 0x1F266, 0x1F2FF }, { 0x1F6D6, 0x1F6DF },
- { 0x1F6ED, 0x1F6EF }, { 0x1F6FB, 0x1F6FF }, { 0x1F774, 0x1F77F },
- { 0x1F7D9, 0x1F7DF }, { 0x1F7EC, 0x1F7FF }, { 0x1F80C, 0x1F80F },
- { 0x1F848, 0x1F84F }, { 0x1F85A, 0x1F85F }, { 0x1F888, 0x1F88F },
- { 0x1F8AE, 0x1F8FF }, { 0x1F90C, 0x1F90C }, { 0x1F972, 0x1F972 },
- { 0x1F977, 0x1F979 }, { 0x1F9A3, 0x1F9A4 }, { 0x1F9AB, 0x1F9AD },
- { 0x1F9CB, 0x1F9CC }, { 0x1FA54, 0x1FA5F }, { 0x1FA6E, 0x1FA6F },
- { 0x1FA74, 0x1FA77 }, { 0x1FA7B, 0x1FA7F }, { 0x1FA83, 0x1FA8F },
- { 0x1FA96, 0x1FFFF }, { 0x2A6D7, 0x2F7FF }, { 0x2FA1E, 0xE0000 },
- { 0xE0002, 0xE001F }, { 0xE0080, 0xE00FF }, { 0xE01F0, 0x10FFFD }
+ { 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 }
};
/* *INDENT-ON* */
@@ -564,7 +571,7 @@ int mk_wcwidth(wchar_t ucs)
* uniset +WIDTH-W -cat=Cn -cat=Mn c
*/
/* *INDENT-OFF* */
- /* generated by run-uniset_dbl 1.1 */
+ /* generated by run-uniset_dbl 1.2 */
static const struct interval doublewidth[] = {
{ 0x1100, 0x115F }, { 0x231A, 0x231B }, { 0x2329, 0x232A },
{ 0x23E9, 0x23EC }, { 0x23F0, 0x23F0 }, { 0x23F3, 0x23F3 },
@@ -581,29 +588,30 @@ int mk_wcwidth(wchar_t ucs)
{ 0x2E9B, 0x2EF3 }, { 0x2F00, 0x2FD5 }, { 0x2FF0, 0x2FFB },
{ 0x3000, 0x3029 }, { 0x302E, 0x303E }, { 0x3041, 0x3096 },
{ 0x309B, 0x30FF }, { 0x3105, 0x312F }, { 0x3131, 0x318E },
- { 0x3190, 0x31BA }, { 0x31C0, 0x31E3 }, { 0x31F0, 0x321E },
- { 0x3220, 0x3247 }, { 0x3250, 0x4DBF }, { 0x4E00, 0xA48C },
- { 0xA490, 0xA4C6 }, { 0xA960, 0xA97C }, { 0xAC00, 0xD7A3 },
- { 0xF900, 0xFAFF }, { 0xFE10, 0xFE19 }, { 0xFE30, 0xFE52 },
- { 0xFE54, 0xFE66 }, { 0xFE68, 0xFE6B }, { 0xFF01, 0xFF60 },
- { 0xFFE0, 0xFFE6 }, { 0x16FE0, 0x16FE3 }, { 0x17000, 0x187F7 },
- { 0x18800, 0x18AF2 }, { 0x1B000, 0x1B11E }, { 0x1B150, 0x1B152 },
- { 0x1B164, 0x1B167 }, { 0x1B170, 0x1B2FB }, { 0x1F004, 0x1F004 },
- { 0x1F0CF, 0x1F0CF }, { 0x1F18E, 0x1F18E }, { 0x1F191, 0x1F19A },
- { 0x1F200, 0x1F202 }, { 0x1F210, 0x1F23B }, { 0x1F240, 0x1F248 },
- { 0x1F250, 0x1F251 }, { 0x1F260, 0x1F265 }, { 0x1F300, 0x1F320 },
- { 0x1F32D, 0x1F335 }, { 0x1F337, 0x1F37C }, { 0x1F37E, 0x1F393 },
- { 0x1F3A0, 0x1F3CA }, { 0x1F3CF, 0x1F3D3 }, { 0x1F3E0, 0x1F3F0 },
- { 0x1F3F4, 0x1F3F4 }, { 0x1F3F8, 0x1F43E }, { 0x1F440, 0x1F440 },
- { 0x1F442, 0x1F4FC }, { 0x1F4FF, 0x1F53D }, { 0x1F54B, 0x1F54E },
- { 0x1F550, 0x1F567 }, { 0x1F57A, 0x1F57A }, { 0x1F595, 0x1F596 },
- { 0x1F5A4, 0x1F5A4 }, { 0x1F5FB, 0x1F64F }, { 0x1F680, 0x1F6C5 },
- { 0x1F6CC, 0x1F6CC }, { 0x1F6D0, 0x1F6D2 }, { 0x1F6D5, 0x1F6D5 },
- { 0x1F6EB, 0x1F6EC }, { 0x1F6F4, 0x1F6FA }, { 0x1F7E0, 0x1F7EB },
- { 0x1F90D, 0x1F971 }, { 0x1F973, 0x1F976 }, { 0x1F97A, 0x1F9A2 },
- { 0x1F9A5, 0x1F9AA }, { 0x1F9AE, 0x1F9CA }, { 0x1F9CD, 0x1F9FF },
- { 0x1FA70, 0x1FA73 }, { 0x1FA78, 0x1FA7A }, { 0x1FA80, 0x1FA82 },
- { 0x1FA90, 0x1FA95 }, { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD }
+ { 0x3190, 0x31E3 }, { 0x31F0, 0x321E }, { 0x3220, 0x3247 },
+ { 0x3250, 0x4DBF }, { 0x4E00, 0xA48C }, { 0xA490, 0xA4C6 },
+ { 0xA960, 0xA97C }, { 0xAC00, 0xD7A3 }, { 0xF900, 0xFAFF },
+ { 0xFE10, 0xFE19 }, { 0xFE30, 0xFE52 }, { 0xFE54, 0xFE66 },
+ { 0xFE68, 0xFE6B }, { 0xFF01, 0xFF60 }, { 0xFFE0, 0xFFE6 },
+ { 0x16FE0, 0x16FE3 }, { 0x16FF0, 0x16FF1 }, { 0x17000, 0x187F7 },
+ { 0x18800, 0x18CD5 }, { 0x18D00, 0x18D08 }, { 0x1B000, 0x1B11E },
+ { 0x1B150, 0x1B152 }, { 0x1B164, 0x1B167 }, { 0x1B170, 0x1B2FB },
+ { 0x1F004, 0x1F004 }, { 0x1F0CF, 0x1F0CF }, { 0x1F18E, 0x1F18E },
+ { 0x1F191, 0x1F19A }, { 0x1F200, 0x1F202 }, { 0x1F210, 0x1F23B },
+ { 0x1F240, 0x1F248 }, { 0x1F250, 0x1F251 }, { 0x1F260, 0x1F265 },
+ { 0x1F300, 0x1F320 }, { 0x1F32D, 0x1F335 }, { 0x1F337, 0x1F37C },
+ { 0x1F37E, 0x1F393 }, { 0x1F3A0, 0x1F3CA }, { 0x1F3CF, 0x1F3D3 },
+ { 0x1F3E0, 0x1F3F0 }, { 0x1F3F4, 0x1F3F4 }, { 0x1F3F8, 0x1F43E },
+ { 0x1F440, 0x1F440 }, { 0x1F442, 0x1F4FC }, { 0x1F4FF, 0x1F53D },
+ { 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 }
};
/* *INDENT-ON* */
@@ -680,6 +688,7 @@ int mk_wcwidth_cjk(wchar_t ucs)
* all lines with "COMBINING"
*/
/* *INDENT-OFF* */
+ /* generated by run-uniset_cjk 1.5 */
static const struct interval ambiguous[] = {
{ 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 },
{ 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 },
@@ -792,9 +801,9 @@ static void usage(void)
exit(EXIT_FAILURE);
}
-static long decode_one(const char *source, char **target)
+static int decode_one(const char *source, char **target)
{
- long result = -1;
+ int result = -1;
long check;
int radix = 0;
if ((source[0] == 'u' || source[0] == 'U') && source[1] == '+') {
@@ -803,11 +812,11 @@ static long decode_one(const char *source, char **target)
}
check = strtol(source, target, radix);
if (*target != NULL && *target != source)
- result = check;
+ result = (int) check;
return result;
}
-static int decode_range(const char *source, long *lo, long *hi)
+static int decode_range(const char *source, int *lo, int *hi)
{
int result = 0;
char *after1;
@@ -824,7 +833,7 @@ static int decode_range(const char *source, long *lo, long *hi)
static void do_range(const char *source)
{
- long lo, hi;
+ int lo, hi;
if (decode_range(source, &lo, &hi)) {
while (lo <= hi) {
int local_rc = opt_wider ? mk_wcwidth_cjk(lo) : mk_wcwidth(lo);
@@ -832,7 +841,7 @@ static void do_range(const char *source)
++total_test;
if (opt_all || (local_rc != other_rc)) {
if (!opt_quiet)
- printf("U+%04lX\t%d\t%d\n", lo, local_rc, other_rc);
+ printf("U+%04X\t%d\t%d\n", lo, local_rc, other_rc);
}
if (local_rc != other_rc) {
++total_errs;
@@ -871,7 +880,7 @@ int main(int argc, char **argv)
printf("%ld/%ld mismatches (%.0f%%)\n",
total_errs,
total_test,
- (100.0 * total_errs) / total_test);
+ (100.0 * (double) total_errs) / (double) total_test);
}
return EXIT_SUCCESS;
}
diff --git a/app/xterm/xcharmouse.h b/app/xterm/xcharmouse.h
index 1ce2126f7..a971b7ba6 100644
--- a/app/xterm/xcharmouse.h
+++ b/app/xterm/xcharmouse.h
@@ -1,8 +1,8 @@
-/* $XTermId: xcharmouse.h,v 1.18 2012/09/26 00:39:14 tom Exp $ */
+/* $XTermId: xcharmouse.h,v 1.19 2020/08/03 23:14:06 tom Exp $ */
/************************************************************
-Copyright 1997-2011,2012 by Thomas E. Dickey
+Copyright 1997-2012,2020 by Thomas E. Dickey
Copyright 1998 by Jason Bacon <acadix@execpc.com>
All Rights Reserved
@@ -50,12 +50,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define SET_FOCUS_EVENT_MOUSE 1004 /* can be combined with above */
#endif
+#define SET_ALTERNATE_SCROLL 1007 /* wheel mouse may send cursor-keys */
+
/* Extend mouse tracking for terminals wider(taller) than 223 cols(rows) */
#define SET_EXT_MODE_MOUSE 1005 /* compatible with above */
#define SET_SGR_EXT_MODE_MOUSE 1006
#define SET_URXVT_EXT_MODE_MOUSE 1015
-#define SET_ALTERNATE_SCROLL 1007 /* wheel mouse may send cursor-keys */
+#define SET_PIXEL_POSITION_MOUSE 1016 /* like 1006, but pixels not chars */
#define SET_BUTTON1_MOVE_POINT 2001 /* click1 emit Esc seq to move point*/
#define SET_BUTTON2_MOVE_POINT 2002 /* press2 emit Esc seq to move point*/
diff --git a/app/xterm/xstrings.c b/app/xterm/xstrings.c
index 92c5c1765..0fc6e873b 100644
--- a/app/xterm/xstrings.c
+++ b/app/xterm/xstrings.c
@@ -1,7 +1,7 @@
-/* $XTermId: xstrings.c,v 1.73 2019/10/06 23:09:43 tom Exp $ */
+/* $XTermId: xstrings.c,v 1.78 2020/10/12 18:50:28 tom Exp $ */
/*
- * Copyright 2000-2018,2019 by Thomas E. Dickey
+ * Copyright 2000-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -175,8 +175,7 @@ login_alias(char *login_name, uid_t uid, struct passwd *in_out)
/* use the other passwd-data including shell */
alloc_pw(in_out, &pw2);
} else {
- free(login_name);
- login_name = NULL;
+ FreeAndNull(login_name);
}
if (ok2)
free_pw(&pw2);
@@ -388,8 +387,7 @@ void
x_freeargs(char **argv)
{
if (argv != 0) {
- if (*argv != 0)
- free(*argv);
+ free(*argv);
free(argv);
}
}
@@ -415,7 +413,8 @@ x_strncasecmp(const char *s1, const char *s2, unsigned n)
return 1;
if (c1 == 0)
break;
- s1++, s2++;
+ s1++;
+ s2++;
}
return 0;
@@ -430,7 +429,7 @@ x_strdup(const char *s)
char *result = 0;
if (s != 0) {
- char *t = TextAlloc(4 + strlen(s));
+ char *t = malloc(strlen(s) + 5);
if (t != 0) {
strcpy(t, s);
}
@@ -465,7 +464,9 @@ x_strtrim(const char *source)
{
char *result;
- if (source != 0 && *source != '\0') {
+ if (IsEmpty(source)) {
+ result = x_strdup("");
+ } else {
char *t = x_strdup(source);
if (t != 0) {
char *s = t;
@@ -483,8 +484,6 @@ x_strtrim(const char *source)
}
}
result = t;
- } else {
- result = x_strdup("");
}
return result;
}
@@ -497,7 +496,9 @@ x_strrtrim(const char *source)
{
char *result;
- if (source != 0 && *source != '\0') {
+ if (IsEmpty(source)) {
+ result = x_strdup("");
+ } else {
char *t = x_strdup(source);
if (t != 0) {
if (*t != '\0') {
@@ -508,8 +509,6 @@ x_strrtrim(const char *source)
}
}
result = t;
- } else {
- result = x_strdup("");
}
return result;
}
diff --git a/app/xterm/xterm.appdata.xml b/app/xterm/xterm.appdata.xml
index d1ff8af14..cd9ab6e27 100644
--- a/app/xterm/xterm.appdata.xml
+++ b/app/xterm/xterm.appdata.xml
@@ -1,26 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2014-2016,2019 Thomas Dickey <dickey@invisible-island.net> -->
+<!-- Copyright 2014-2019,2020 Thomas Dickey <dickey@invisible-island.net> -->
<component type="desktop">
<id>xterm.desktop</id>
<metadata_license>CC-BY-3.0</metadata_license>
+ <content_rating type="oars-1.0" />
<project_license>X11</project_license>
<name>XTerm</name>
<summary>Terminal emulator for the X Window System</summary>
<description>
<p>
- XTerm is the standard terminal emulator for the X Window System.
- It provides DEC VT102/VT220 and selected features from higher-level
- terminals such as VT320/VT420/VT520 (VTxxx). It also provides Tektronix
- 4014 emulation for programs that cannot use the window system directly.
- </p>
+ XTerm is the standard terminal emulator for the X Window System.
+ It provides DEC VT102/VT220 and selected features from higher-level
+ terminals such as VT320/VT420/VT520 (VTxxx). It also provides Tektronix
+ 4014 emulation for programs that cannot use the window system directly.
+ </p>
<p>
- You would use xterm to get a shell prompt, to run command-line programs.
- </p>
+ You would use xterm to get a shell prompt, to run command-line programs.
+ </p>
</description>
<screenshots>
- <screenshot type="default" height="539" width="813">
- <image>https://invisible-island.net/xterm/images/merged-xterm-menus.png</image>
- <caption>xterm with its popup menus superimposed</caption>
+ <screenshot type="default">
+ <image width="960" height="540">
+ https://invisible-island.net/xterm/images/merged-xterm-menus-16x9.png
+ </image>
+ <caption>XTerm with its popup menus superimposed</caption>
</screenshot>
</screenshots>
<keywords>
@@ -31,10 +34,13 @@
<keyword>cmd</keyword>
<keyword>terminal</keyword>
</keywords>
+ <releases>
+ <release version="363" date="2020-12-26"/>
+ </releases>
<url type="homepage">https://invisible-island.net/xterm/</url>
<update_contact>dickey@invisible-island.net</update_contact>
<developer_name>Thomas E. Dickey</developer_name>
- <url type="bugtracker">mailto:dickey@invisible-island.net</url>
+ <url type="bugtracker">https://invisible-island.net/xterm/xterm.faq.html#report_bugs</url>
<url type="donation"/>
<url type="help">https://invisible-island.net/xterm/xterm.faq.html</url>
<url type="translate"/>
diff --git a/app/xterm/xterm.dat b/app/xterm/xterm.dat
index 40d1c58c0..9ab20746f 100644
--- a/app/xterm/xterm.dat
+++ b/app/xterm/xterm.dat
@@ -91,6 +91,8 @@
*VT100*font5: -bitstream-terminal-medium-r-normal-gs-36-280-100-100-c-220-iso8859-1
*fontMenu*font6*Label: Large-Narrow
*VT100*font6: -bitstream-terminal-medium-r-narrow--18-180-75-75-c-70-iso8859-1
+*fontMenu*font7*Label: Enormous
+*VT100*font7: -bitstream-terminal-medium-r-normal--*-200-100-100-c-*-iso8859-1
*fontMenu*fontescape*Label: Escape Sequence
*fontMenu*fontsel*Label: Selection
!fontescape and fontsel overridden by application
diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h
index 92a8e5ffd..ada1fcb40 100644
--- a/app/xterm/xterm.h
+++ b/app/xterm/xterm.h
@@ -1,7 +1,7 @@
-/* $XTermId: xterm.h,v 1.860 2019/10/06 20:02:14 tom Exp $ */
+/* $XTermId: xterm.h,v 1.884 2020/12/23 00:21:44 tom Exp $ */
/*
- * Copyright 1999-2018,2019 by Thomas E. Dickey
+ * Copyright 1999-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -271,6 +271,8 @@ extern void free();
extern int errno;
#endif
+#include <X11/Xlocale.h>
+
/*
* FIXME: Toggling logging from xterm hangs under Linux 2.0.29 with libc5 if
* we use 'waitpid()', while 'wait()' seems to work properly.
@@ -486,6 +488,7 @@ extern char **environ;
#define XtNcursorUnderLine "cursorUnderLine"
#define XtNcutNewline "cutNewline"
#define XtNcutToBeginningOfLine "cutToBeginningOfLine"
+#define XtNdecGraphicsID "decGraphicsID"
#define XtNdecTerminalID "decTerminalID"
#define XtNdefaultString "defaultString"
#define XtNdeleteIsDEL "deleteIsDEL"
@@ -513,10 +516,12 @@ extern char **environ;
#define XtNfont4 "font4"
#define XtNfont5 "font5"
#define XtNfont6 "font6"
+#define XtNfont7 "font7"
#define XtNfontDoublesize "fontDoublesize"
#define XtNfontWarnings "fontWarnings"
#define XtNforceBoxChars "forceBoxChars"
#define XtNforcePackedFont "forcePackedFont"
+#define XtNforceXftHeight "forceXftHeight"
#define XtNformatOtherKeys "formatOtherKeys"
#define XtNfreeBoldBox "freeBoldBox"
#define XtNfullscreen "fullscreen"
@@ -568,6 +573,7 @@ extern char **environ;
#define XtNoldXtermFKeys "oldXtermFKeys"
#define XtNpointerColor "pointerColor"
#define XtNpointerColorBackground "pointerColorBackground"
+#define XtNpointerFont "pointerFont"
#define XtNpointerMode "pointerMode"
#define XtNpointerShape "pointerShape"
#define XtNpopOnBell "popOnBell"
@@ -596,6 +602,7 @@ extern char **environ;
#define XtNscrollLines "scrollLines"
#define XtNscrollTtyOutput "scrollTtyOutput"
#define XtNselectToClipboard "selectToClipboard"
+#define XtNshiftEscape "shiftEscape"
#define XtNshiftFonts "shiftFonts"
#define XtNshowBlinkAsBold "showBlinkAsBold"
#define XtNshowMissingGlyphs "showMissingGlyphs"
@@ -620,6 +627,7 @@ extern char **environ;
#define XtNutf8Latin1 "utf8Latin1"
#define XtNutf8SelectTypes "utf8SelectTypes"
#define XtNutf8Title "utf8Title"
+#define XtNutf8Weblike "utf8Weblike"
#define XtNveryBoldColors "veryBoldColors"
#define XtNvisualBell "visualBell"
#define XtNvisualBellDelay "visualBellDelay"
@@ -687,6 +695,7 @@ extern char **environ;
#define XtCCursorUnderLine "CursorUnderLine"
#define XtCCutNewline "CutNewline"
#define XtCCutToBeginningOfLine "CutToBeginningOfLine"
+#define XtCDecGraphicsID "DecGraphicsID"
#define XtCDecTerminalID "DecTerminalID"
#define XtCDefaultString "DefaultString"
#define XtCDeleteIsDEL "DeleteIsDEL"
@@ -714,10 +723,12 @@ extern char **environ;
#define XtCFont4 "Font4"
#define XtCFont5 "Font5"
#define XtCFont6 "Font6"
+#define XtCFont7 "Font7"
#define XtCFontDoublesize "FontDoublesize"
#define XtCFontWarnings "FontWarnings"
#define XtCForceBoxChars "ForceBoxChars"
#define XtCForcePackedFont "ForcePackedFont"
+#define XtCForceXftHeight "ForceXftHeight"
#define XtCFormatOtherKeys "FormatOtherKeys"
#define XtCFreeBoldBox "FreeBoldBox"
#define XtCFullscreen "Fullscreen"
@@ -762,6 +773,7 @@ extern char **environ;
#define XtCNumColorRegisters "NumColorRegisters"
#define XtCNumLock "NumLock"
#define XtCOldXtermFKeys "OldXtermFKeys"
+#define XtCPointerFont "PointerFont"
#define XtCPointerMode "PointerMode"
#define XtCPopOnBell "PopOnBell"
#define XtCPrecompose "Precompose"
@@ -788,6 +800,7 @@ extern char **environ;
#define XtCScrollCond "ScrollCond"
#define XtCScrollLines "ScrollLines"
#define XtCSelectToClipboard "SelectToClipboard"
+#define XtCShiftEscape "ShiftEscape"
#define XtCShiftFonts "ShiftFonts"
#define XtCShowBlinkAsBold "ShowBlinkAsBold"
#define XtCShowMissingGlyphs "ShowMissingGlyphs"
@@ -811,6 +824,7 @@ extern char **environ;
#define XtCUtf8Latin1 "Utf8Latin1"
#define XtCUtf8SelectTypes "Utf8SelectTypes"
#define XtCUtf8Title "Utf8Title"
+#define XtCUtf8Weblike "Utf8Weblike"
#define XtCVT100Graphics "VT100Graphics"
#define XtCVeryBoldColors "VeryBoldColors"
#define XtCVisualBell "VisualBell"
@@ -893,6 +907,8 @@ extern void HandleKeyboardSelectEnd PROTO_XT_ACTIONS_ARGS;
extern void HandleKeyboardSelectExtend PROTO_XT_ACTIONS_ARGS;
extern void HandleKeyboardSelectStart PROTO_XT_ACTIONS_ARGS;
extern void HandleKeyboardStartExtend PROTO_XT_ACTIONS_ARGS;
+extern void HandlePointerMotion PROTO_XT_ACTIONS_ARGS;
+extern void HandlePointerButton PROTO_XT_ACTIONS_ARGS;
extern void HandleSelectEnd PROTO_XT_ACTIONS_ARGS;
extern void HandleSelectExtend PROTO_XT_ACTIONS_ARGS;
extern void HandleSelectSet PROTO_XT_ACTIONS_ARGS;
@@ -903,7 +919,9 @@ extern void ScrollSelection (TScreen * /* screen */, int /* amount */, Bool /*
extern void TrackMouse (XtermWidget /* xw */, int /* func */, CELL * /* start */, int /* firstrow */, int /* lastrow */);
extern void ViButton PROTO_XT_ACTIONS_ARGS;
-extern int xtermUtf8ToTextList(XtermWidget /* xw */, XTextProperty * /* text_prop */, char *** /* text_list */, int * /* text_list_count */);
+extern void UnmapSelections (XtermWidget /* xw */);
+extern int xtermUtf8ToTextList (XtermWidget /* xw */, XTextProperty * /* text_prop */, char *** /* text_list */, int * /* text_list_count */);
+extern void xtermButtonInit (XtermWidget /* xw */);
#if OPT_DEC_LOCATOR
extern void GetLocatorPosition (XtermWidget /* w */);
@@ -970,9 +988,9 @@ extern Bool set_cursor_gcs (XtermWidget /* xw */);
extern char * vt100ResourceToString (XtermWidget /* xw */, const char * /* name */);
extern int VTInit (XtermWidget /* xw */);
extern void FindFontSelection (XtermWidget /* xw */, const char * /* atom_name */, Bool /* justprobe */);
-extern void HideCursor (void);
+extern void HideCursor (XtermWidget /* xw */);
extern void RestartBlinking(XtermWidget /* xw */);
-extern void ShowCursor (void);
+extern void ShowCursor (XtermWidget /* xw */);
extern void SwitchBufPtrs (TScreen * /* screen */, int /* toBuf */);
extern void ToggleAlternate (XtermWidget /* xw */);
extern void VTInitTranslations (void);
@@ -993,12 +1011,12 @@ extern void set_max_row(TScreen * /* screen */, int /* rows */);
extern void unparse_end (XtermWidget /* xw */);
extern void unparseputc (XtermWidget /* xw */, int /* c */);
extern void unparseputc1 (XtermWidget /* xw */, int /* c */);
-extern void unparseputn (XtermWidget /* xw */, UParm /* n */);
+extern void unparseputn (XtermWidget /* xw */, unsigned /* n */);
extern void unparseputs (XtermWidget /* xw */, const char * /* s */);
extern void unparseseq (XtermWidget /* xw */, ANSI * /* ap */);
extern void v_write (int /* f */, const Char * /* d */, unsigned /* len */);
extern void xtermAddInput (Widget /* w */);
-extern void xtermDecodeSCS (XtermWidget /* xw */, int /* which */, int /* prefix */, int /* suffix */);
+extern void xtermDecodeSCS (XtermWidget /* xw */, int /* which */, int /* sgroup */, int /* prefix */, int /* suffix */);
#if OPT_BLINK_CURS
extern void ToggleCursorBlink(XtermWidget /* xw */);
@@ -1051,6 +1069,10 @@ extern int set_cur_row(TScreen * /* screen */, int /* value */);
#define set_cur_row(screen, value) screen->cur_row = value
#endif
+/* cursorfont.c */
+extern Cursor CreateAlternateCursorFontCursor(Display * /* dpy */, char const * /* cursorfont */, unsigned int /* which */);
+extern int CursorFontIndexFromShapeName(char const * /* shapename */);
+
/* doublechr.c */
extern void xterm_DECDHL (XtermWidget /* xw */, Bool /* top */);
extern void xterm_DECSWL (XtermWidget /* xw */);
@@ -1073,6 +1095,8 @@ extern void StringInput (XtermWidget /* xw */, const Char * /* string */, size_t
#if OPT_NUM_LOCK
extern void VTInitModifiers(XtermWidget /* xw */);
+#else
+#define VTInitModifiers(xw) /* nothing */
#endif
/* linedata.c */
@@ -1123,6 +1147,7 @@ extern Boolean allocateBestRGB(XtermWidget /* xw */, XColor * /* def */);
extern Boolean validProgram(const char * /* pathname */);
extern Boolean xtermGetWinAttrs(Display * /* dpy */, Window /* win */, XWindowAttributes * /* attrs */);
extern Boolean xtermGetWinProp(Display * /* dpy */, Window /* win */, Atom /* property */, long /* long_offset */, long /* long_length */, Atom /* req_type */, Atom * /* actual_type_return */, int * /* actual_format_return */, unsigned long * /* nitems_return */, unsigned long * /* bytes_after_return */, unsigned char ** /* prop_return */);
+extern Boolean xtermIsIconified (XtermWidget /* xw */);
extern Cursor make_colored_cursor (unsigned /* cursorindex */, unsigned long /* fg */, unsigned long /* bg */);
extern FILE * create_printfile(XtermWidget /* xw */, const char * /* suffix */);
extern OptionHelp * sortedOpts(OptionHelp *, XrmOptionDescRec *, Cardinal);
@@ -1143,7 +1168,9 @@ 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 */);
extern int xerror (Display * /* d */, XErrorEvent * /* ev */);
extern int xioerror (Display * /* dpy */);
extern int xtermClosestColor (XtermWidget /* xw */, int /* red */, int /* green */, int /* blue */);
@@ -1180,20 +1207,21 @@ extern void end_vt_mode (void);
extern void free_string(String value);
extern void hide_tek_window (void);
extern void hide_vt_window (void);
-extern void ice_error (IceConn /* iceConn */);
+extern void ice_error (IceConn /* iceConn */) GCC_NORETURN;
extern void init_colored_cursor (Display * /* dpy */);
extern void reset_decudk (XtermWidget /* xw */);
extern void set_tek_visibility (Bool /* on */);
extern void set_vt_visibility (Bool /* on */);
extern void switch_modes (Bool /* tovt */);
extern void timestamp_filename(char * /* dst */, const char * /* src */);
-extern void update_winsize(int /* fd */, int /* rows */, int /* cols */, int /* height */, int /* width */);
extern void xevents (XtermWidget /* xw */);
extern void xt_error (String /* message */) GCC_NORETURN;
extern void xtermBell(XtermWidget /* xw */, int /* which */, int /* percent */);
extern void xtermCopyEnv (char ** /* oldenv */);
extern void xtermDisplayCursor (XtermWidget /* xw */);
+extern void xtermDeiconify (XtermWidget /* xw */);
extern void xtermEmbedWindow (Window /* winToEmbedInfo */);
+extern void xtermIconify (XtermWidget /* xw */);
extern void xtermLoadIcon (XtermWidget /* xw */, const char * /* icon_hint */);
extern void xtermPerror (const char * /*fmt*/,...) GCC_PRINTFLIKE(1,2);
extern void xtermSetenv (const char * /* var */, const char * /* value */);
@@ -1278,8 +1306,11 @@ extern Bool xtermEnvUTF8(void);
#if OPT_XTERM_SGR
extern void xtermPushSGR (XtermWidget /* xw */, int /* value */);
-extern void xtermReportSGR (XtermWidget /* xw */, XTermRect * /* value */);
extern void xtermPopSGR (XtermWidget /* xw */);
+extern void xtermReportSGR (XtermWidget /* xw */, XTermRect * /* value */);
+extern void xtermPushColors (XtermWidget /* xw */, int /* value */);
+extern void xtermPopColors (XtermWidget /* xw */, int /* value */);
+extern void xtermReportColors (XtermWidget /* xw */);
#endif
#ifdef ALLOWLOGGING
@@ -1377,6 +1408,7 @@ extern void ClearBufRows (XtermWidget /* xw */, int /* first */, int /* last *
extern void ClearCells (XtermWidget /* xw */, int /* flags */, unsigned /* len */, int /* row */, int /* col */);
extern void CopyCells (TScreen * /* screen */, LineData * /* src */, LineData * /* dst */, int /* col */, int /* len */, Bool /* down */);
extern void FullScreen (XtermWidget /* xw */, int /* mode */);
+extern void FreeMarkGCs (XtermWidget /* xw */);
extern void ScrnAllocBuf (XtermWidget /* xw */);
extern void ScrnClearCells (XtermWidget /* xw */, int /* row */, int /* col */, unsigned /* len */);
extern void ScrnDeleteChar (XtermWidget /* xw */, unsigned /* n */);
@@ -1500,20 +1532,21 @@ extern void TabClear (Tabs /* tabs */, int /* col */);
extern void TabReset (Tabs /* tabs */);
extern void TabSet (Tabs /* tabs */, int /* col */);
extern void TabZonk (Tabs /* tabs */);
-extern Bool TabIsSet(Tabs /* tabs */, int /* col */);
+extern Bool TabIsSet (Tabs /* tabs */, int /* col */);
/* util.c */
-extern Boolean isDefaultBackground(const char * /* name */);
-extern Boolean isDefaultForeground(const char * /* name */);
-extern CgsEnum whichXtermCgs(XtermWidget /* xw */, unsigned /* attr_flags */, Bool /* hilite */);
+extern Boolean isDefaultBackground (const char * /* name */);
+extern Boolean isDefaultForeground (const char * /* name */);
+extern CgsEnum whichXtermCgs (XtermWidget /* xw */, unsigned /* attr_flags */, Bool /* hilite */);
extern GC updatedXtermGC (XtermWidget /* xw */, unsigned /* flags */, CellColor /* fg_bg */, Bool /* hilite */);
-extern Pixel getXtermBackground(XtermWidget /* xw */, unsigned /* flags */, int /* color */);
-extern Pixel getXtermForeground(XtermWidget /* xw */, unsigned /* flags */, int /* color */);
+extern Pixel getXtermBackground (XtermWidget /* xw */, unsigned /* flags */, int /* color */);
+extern Pixel getXtermForeground (XtermWidget /* xw */, unsigned /* flags */, int /* color */);
+extern char * xtermSetLocale (int /* category */, String /* after */);
extern int ClearInLine (XtermWidget /* xw */, int /* row */, int /* col */, unsigned /* len */);
extern int HandleExposure (XtermWidget /* xw */, XEvent * /* event */);
extern int dimRound (double /* value */);
extern int drawXtermText (XTermDraw * /* param */, GC /* gc */, int /* x */, int /* y */, const IChar * /* text */, Cardinal /* len */);
-extern int extendedBoolean(const char * /* value */, const FlagList * /* table */, Cardinal /* limit */);
+extern int extendedBoolean (const char * /* value */, const FlagList * /* table */, Cardinal /* limit */);
extern void ChangeColors (XtermWidget /* xw */, ScrnColors * /* pNew */);
extern void ClearRight (XtermWidget /* xw */, int /* n */);
extern void ClearScreen (XtermWidget /* xw */);
@@ -1530,6 +1563,7 @@ extern void decode_keyboard_type (XtermWidget /* xw */, struct XTERM_RESOURCE *
extern void decode_wcwidth (XtermWidget /* xw */);
extern void do_cd_xtra_scroll (XtermWidget /* xw */);
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 */);
extern void do_ti_xtra_scroll (XtermWidget /* xw */);
extern void getXtermSizeHints (XtermWidget /* xw */);
@@ -1544,6 +1578,7 @@ extern void xtermClear2 (XtermWidget /* xw */, int /* x */, int /* y */, unsigne
extern void xtermColIndex (XtermWidget /* xw */, Bool /* toLeft */);
extern void xtermColScroll (XtermWidget /* xw */, int /* amount */, Bool /* toLeft */, int /* at_col */);
extern void xtermRepaint (XtermWidget /* xw */);
+extern void xtermResetLocale (int /* category */, char * /* before */);
extern void xtermScroll (XtermWidget /* xw */, int /* amount */);
extern void xtermScrollLR (XtermWidget /* xw */, int /* amount */, Bool /* toLeft */);
extern void xtermSizeHints (XtermWidget /* xw */, int /* scrollbarWidth */);
@@ -1638,7 +1673,7 @@ extern void discardRenderDraw(TScreen * /* screen */);
XClearArea (TScreenOf(xw)->display, \
VDrawable(TScreenOf(xw)), \
CursorX2(TScreenOf(xw), left, fw), \
- CursorY(TScreenOf(xw), top), \
+ CursorY2(TScreenOf(xw), top), \
((width) * (unsigned) fw), \
((height) * (unsigned) FontHeight(TScreenOf(xw))), \
False)
diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html
index e6bbf257c..3d5ed4c9b 100644
--- a/app/xterm/xterm.log.html
+++ b/app/xterm/xterm.log.html
@@ -2,7 +2,7 @@
*****************************************************************************
* this file is part of xterm *
* *
- * Copyright 1997-2018,2019 by Thomas E. Dickey *
+ * Copyright 1997-2019,2020 by Thomas E. Dickey *
* *
* All Rights Reserved *
* *
@@ -30,15 +30,13 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
*****************************************************************************
- $XTermId: xterm.log.html,v 1.2132 2019/11/18 01:50:54 tom Exp $
+ $XTermId: xterm.log.html,v 1.2289 2020/12/26 15:38:13 tom Exp $
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-
<html>
<head>
<meta name="generator" content=
- "HTML Tidy for HTML5 for Linux version 5.2.0">
-
+ "HTML Tidy for HTML5 for Linux version 5.6.0">
<title>XTERM - Change Log</title>
<link rel="author" href="mailto:dickey@invisible-island.net">
<meta http-equiv="Content-Type" content=
@@ -49,11 +47,10 @@
<link rel="SHORTCUT ICON" href="/img/icons/xterm.ico" type=
"image/x-icon">
</head>
-
<body>
<hr>
- <p>Copyright &copy; 1997-2018,2019 by <a href=
+ <p>Copyright &copy; 1997-2019,2020 by <a href=
"mailto:dickey@invisible-island.net">Thomas E. Dickey</a></p>
<hr>
@@ -73,6 +70,30 @@
CHANGELOG</a>).</p>
<ul>
+ <li><a href="#xterm_363">Patch #363 - 2020/12/26</a></li>
+
+ <li><a href="#xterm_362">Patch #362 - 2020/11/11</a></li>
+
+ <li><a href="#xterm_361">Patch #361 - 2020/10/14</a></li>
+
+ <li><a href="#xterm_360">Patch #360 - 2020/09/20</a></li>
+
+ <li><a href="#xterm_359">Patch #359 - 2020/08/17</a></li>
+
+ <li><a href="#xterm_358">Patch #358 - 2020/07/12</a></li>
+
+ <li><a href="#xterm_357">Patch #357 - 2020/07/05</a></li>
+
+ <li><a href="#xterm_356">Patch #356 - 2020/05/02</a></li>
+
+ <li><a href="#xterm_355">Patch #355 - 2020/05/01</a></li>
+
+ <li><a href="#xterm_354">Patch #354 - 2020/04/26</a></li>
+
+ <li><a href="#xterm_353">Patch #353 - 2020/02/01</a></li>
+
+ <li><a href="#xterm_352">Patch #352 - 2020/01/16</a></li>
+
<li><a href="#xterm_351">Patch #351 - 2019/11/17</a></li>
<li><a href="#xterm_350">Patch #350 - 2019/11/02</a></li>
@@ -983,6 +1004,586 @@
<li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li>
</ul>
+ <h1><a name="xterm_363" id="xterm_363">Patch #363 -
+ 2020/12/26</a></h1>
+
+ <ul>
+ <li>disable groff hyphenation in generated html when using
+ man2html.</li>
+
+ <li>change SCS &ldquo;<code>&amp;4</code>&rdquo; Cyrillic to
+ non-NRCS, per VT520 manual.</li>
+
+ <li>amend fix for SCS in <a href="#xterm_198">patch #198</a> to
+ remove <code>DEL</code> rather than converting it to a space
+ (report by Thomas Wolff).</li>
+
+ <li>modify state transitions for selecting character sets to
+ eliminate an ambiguity between the &ldquo;A&rdquo; used in
+ VT220 versus VT320.</li>
+
+ <li>improve error recovery when selecting characters by
+ resetting to US ASCII when no suitable encoding is found, e.g.,
+ attempting to use an NRCS sequence when NRCS is not
+ enabled.</li>
+
+ <li>turn off hyphenation in &ldquo;<code>.txt</code>&rdquo;
+ conversion, prompted by groff changes.</li>
+
+ <li>add VT5xx ISO Latin-2 (prompted by discussion with Thomas
+ Wolff).</li>
+
+ <li>amend change from <a href="#xterm_361">patch #361</a> to
+ event-handling in <code>CopyWait</code> to handle active-icon
+ as a special case (Debian #975687).</li>
+
+ <li>add call to <code>loadColorTable</code> to get the visual
+ information needed to decode BE RGBA32 color format (patch by
+ Leandro Lupori).</li>
+
+ <li>modify the resource-parsing for
+ <code>disallowedPasteControls</code> and similar lists of
+ names/numbers to recognize &ldquo;~;&rdquo; (tilde) for
+ cancelling a given name/number.</li>
+
+ <li>add ENQ, EOT and NUL to default for
+ <code>disallowedPasteControls</code>.</li>
+
+ <li>change default for <code>disallowedPasteControls</code> to
+ omit the tab character (suggested by Harald Dunkel).</li>
+
+ <li>fix swapped height/width in <code>regisScreenSize</code>
+ and <code>maxGraphicSize</code> resources using "auto" value,
+ from <a href="#xterm_314">patch #314</a> (report by Anton
+ Lavrentiev)</li>
+
+ <li>revise <a href="#xterm_362">patch #362</a> change for
+ shift-modifier versus mouse protocol and select/paste by adding
+ resource <code>shiftEscape</code>, which can be enabled via a
+ control sequence (prompted by discussion with Matthijs van
+ Duin).</li>
+
+ <li>simplify/improve ifdef in trace code for using a separate
+ set of files for each run of xterm.</li>
+
+ <li>add options <code>-r</code> and <code>-t</code> to
+ <code>vttests/query-color.pl</code> to show the 6-digit RGB
+ code and actual colors.</li>
+
+ <li>add <code>nel</code> to <code>xterm-basic</code>
+ terminfo.</li>
+
+ <li>alter <code>vttests/modify-keys.pl</code> to omit HTML
+ reference links to the modified-keys table where no keycode was
+ available.</li>
+ </ul>
+
+ <h1><a name="xterm_362" id="xterm_362">Patch #362 -
+ 2020/11/11</a></h1>
+
+ <ul>
+ <li>cleanup of calls to <code>free</code>, removing checks for
+ null (Walter Harms).</li>
+
+ <li>improved mouse-button reporting (prompted by discussion
+ with Stephane Chazelas)
+ <ul>
+ <li>narrow the scope of the change for shift-key in
+ <a href="#xterm_361">patch #361</a> to make it apply only
+ when the <code>modifyOtherKeys</code> resource is set to 2
+ (i.e., &ldquo;program mode&rdquo;). Also, when checking the
+ shift-key, ignore modifiers other than shift, control and
+ &ldquo;meta&rdquo;</li>
+
+ <li>use the alt/meta modifier information obtained in
+ <code>VTInitModifiers</code> to replace a hard-coded
+ <em>mod1</em> used to detect &ldquo;Meta&rdquo; for
+ mouse-button responses.</li>
+ </ul>
+ </li>
+
+ <li>reduce <code>SIGWINCH</code>'s sent to the client by
+ filtering out duplicates.</li>
+
+ <li>improve display when <code>scaleHeight</code> is greater
+ than 1:
+ <ul>
+ <li>the text-cursor is vertically-centered on the current
+ line, rather than only extending below the current line
+ (report by Manu Chaturvedi).</li>
+
+ <li>the built-in line-drawing characters extend to the
+ scaled cell-height.</li>
+ </ul>
+ </li>
+
+ <li>fill-in special case for motion-events to match the changes
+ for shift-key in pointer-button events from <a href=
+ "#xterm_361">patch #361</a>.</li>
+ </ul>
+
+ <h1><a name="xterm_361" id="xterm_361">Patch #361 -
+ 2020/10/14</a></h1>
+
+ <ul>
+ <li>treat the return value of <code>strerror</code> as readonly
+ (patch by Philipp Klaus Krause).</li>
+
+ <li>modify event-handling in <code>CopyWait</code> to work
+ around hanging while writing large amounts of text to an active
+ icon and at the same time iconifying/deiconifying (report by
+ Dave Kemper).</li>
+
+ <li>initialize double-buffer for active-icon window.</li>
+
+ <li>improve manual page description of scrollbar resources
+ (report by Brian Lindholm).</li>
+
+ <li>correct ifdef for menu entry for active-icon, when
+ initializing it with toolbar configuration.</li>
+
+ <li>add preprocessor option to makefile to set internal
+ definition of pixmaps directory to match the
+ install-configuration (FreeBSD #250036).</li>
+
+ <li>cleanup of calls to <code>free</code>, removing checks for
+ null (Walter Harms).</li>
+
+ <li>add fallback actions <code>pointer-button</code> and
+ <code>pointer-motion</code> which handle events for the mouse
+ control-sequences protocol if the <em>select</em>-related
+ translations are omitted with
+ <code>*omitTranslation:select</code> (prompted by discussion
+ with "Ergus")</li>
+
+ <li>amend rule for using shift-key to override mouse-protocol
+ for select/paste to limit that feature to mouse-buttons which
+ are actually bound to select/paste actions (prompted by
+ discussion with "Ergus").</li>
+
+ <li>corrected mapping in special case for repainting wrap-marks
+ when viewing the scrollback area.</li>
+
+ <li>use separate <em>GCs</em> for <code>showWrapMarks</code>
+ feature, to work around cursor coloring change in <a href=
+ "#xterm_345">patch #345</a> (report by Paulo Silva de
+ Al&iacute;bano).</li>
+ </ul>
+
+ <h1><a name="xterm_360" id="xterm_360">Patch #360 -
+ 2020/09/20</a></h1>
+
+ <ul>
+ <li>mention <code>decGraphicsID</code> in
+ <code>ctlseqs.ms</code> (suggested by Thomas Wolff).</li>
+
+ <li>modify pixel-coordinate mouse reponse to use as origin the
+ VT100-window rather than the underlying widget, which includes
+ the scrollbar (report by Thomas Wolff).</li>
+
+ <li>add configure option <code>--disable-print-graphics</code>
+ (Ross Combs).</li>
+
+ <li>add <code>test_ptydata</code> to &ldquo;make check&rdquo;
+ rule.</li>
+
+ <li>minor fixes for <code>ctlseqs.ms</code> (report by
+ Jean-Marc Bourguet).</li>
+
+ <li>minor fixes for manpage style (report/patch by
+ "a1346054").</li>
+
+ <li>correct cleanup from switch between italics/normal font in
+ the show/hide cursor functions (report/testcase by Peter
+ Fabinski).</li>
+
+ <li>integrated patch by Ross Combs:
+ <ul>
+ <li>internal renaming of GraphicsID symbols, for
+ readability.</li>
+
+ <li>adjust logic for VT125, treating it as a ReGIS
+ terminal.</li>
+ </ul>
+ </li>
+
+ <li>update configure macros, for compiler-warning fixes.</li>
+
+ <li>integrated patch by Ross Combs:
+ <ul>
+ <li>add control sequence modes for graphics printing.</li>
+
+ <li>improve conversion to bitmaps for TrueType fonts in
+ ReGIS</li>
+
+ <li>add <code>font7</code> resource, for an
+ &ldquo;enormous&rdquo; bitmap font.</li>
+
+ <li>do not reset graphics in a soft-reset.</li>
+
+ <li>add <code>pointerFont</code> resource, and
+ <code>-pf</code> command-line option.</li>
+ </ul>
+ </li>
+
+ <li>improve typography of manual page (patch by Branden
+ Robinson).</li>
+
+ <li>amend <a href="#xterm_359">patch #359</a> change to
+ <code>df-install.in</code> to ignore a command-line assignment
+ to <code>DESTDIR</code> if followed by an explicit
+ <code>--dir</code> (report by Sven Joachim).</li>
+ </ul>
+
+ <h1><a name="xterm_359" id="xterm_359">Patch #359 -
+ 2020/08/17</a></h1>
+
+ <ul>
+ <li>add special case in <code>WriteText</code> to allow colors
+ 8-15 to override <code>colorBDMode</code> (patch by Ingo
+ Br&uuml;ckl).</li>
+
+ <li>add <code>utf8Weblike</code> resource, to provide an
+ alternate scheme for handling ill-formed UTF-8 sequences
+ (adapted from patch by Dan Gohman).</li>
+
+ <li>improve computation for the number of lines needed to
+ scroll-up a SIXEL graphic (report/patch by Ben Wong).</li>
+
+ <li>correct manpage description for default value of
+ <code>disallowWindowOps</code> from changes in <a href=
+ "#xterm_331">xterm #331</a> (patch by Ben Wong).</li>
+
+ <li>correct a loop starting-point in
+ <code>refresh_graphics</code> from optimization in <a href=
+ "#xterm_358">patch #358</a> changes (report by Ben Wong).</li>
+
+ <li>add a new mouse mode 1016, which uses the same format as
+ mode 1006, but sends the mouse's position in pixels (suggested
+ by Igor van den Hoven).</li>
+
+ <li>fix an issue from <a href="#xterm_338">patch #338</a>
+ changes where only the first selection buffer specified in the
+ request would be updated using OSC 52 (patch by Michael
+ Gulick).</li>
+
+ <li>modify makefile/scripts to allow <code>DESTDIR</code> to
+ prefix the target directory for desktop-file-install (report by
+ Fred Heitkamp).</li>
+
+ <li>enable SIXEL feature by default.</li>
+
+ <li>update config.guess, config.sub</li>
+ </ul>
+
+ <h1><a name="xterm_358" id="xterm_358">Patch #358 -
+ 2020/07/12</a></h1>
+
+ <ul>
+ <li>correct logic for decodeTerminalID changes in <a href=
+ "#xterm_357">patch #357</a> (report by "Chartreuse").</li>
+
+ <li>modify makefile to use <code>plink.sh</code> when linking
+ test-programs, to fix build when using pcre (report by H Merijn
+ Brand)</li>
+
+ <li>build-fix for test_ptydata program (patch by H Merijn
+ Brand)</li>
+ </ul>
+
+ <h1><a name="xterm_357" id="xterm_357">Patch #357 -
+ 2020/07/05</a></h1>
+
+ <ul>
+ <li>several minor optimizations for the ReGIS and SIXEL
+ features, improving performance by 10%.</li>
+
+ <li>add resource <code>decGraphicsID</code> to allow displaying
+ graphics when the emulation level would ordinarily disallow
+ this (prompted by discussion with Thomas Wolff).</li>
+
+ <li>add control sequences for fast switching of color palettes:
+ <code>XTPUSHCOLORS</code>, <code>XTPOPCOLORS</code>,
+ <code>XTREPORTCOLORS</code></li>
+
+ <li>amend change for soft-hyphen from <a href=
+ "#xterm_328">patch #328</a> to avoid stripping
+ replacement-characters which would be shown with malformed or
+ overlong UTF-8 input.</li>
+
+ <li>corrected an error-handling case in
+ <code>decodeUtf8</code>, matching a similar fix in <a href=
+ "#xterm_268">patch #268</a> (report/patch by Dan Gohman).</li>
+
+ <li>add a test-driver for <code>ptydata.c</code></li>
+
+ <li>minor cleanup of macros (adapted from patch by Walter
+ Harms).</li>
+
+ <li>fix some errata in <code>ctlseqs.ms</code> (report by
+ Thomas Wolff).</li>
+
+ <li>allow immediate repaint-on-palette-changed if
+ double-buffering is enabled.</li>
+
+ <li>deprecate codes 10/11 in sgr push controls, changing those
+ to 30/31, to avoid confusion with sgr 10-19.</li>
+
+ <li>modify <code>SGR</code> parameter handling to stop if an
+ unrecognized parameter is encountered, to guard against
+ malformed or nonstandard sequences (report by Bram
+ Moolenaar).</li>
+
+ <li>modify <code>DECERA</code> color for consistency with other
+ erasures/clearing (report by Thomas Wolff).</li>
+
+ <li><code>ECH</code> should not be masked by
+ <code>DECSCA</code> (report by Thomas Wolff).</li>
+
+ <li>extend <code>DECFRA</code> and <code>REP</code> to accept
+ any &ldquo;graphic&rdquo; character rather than just Latin1,
+ etc. (report by Thomas Wolff).</li>
+
+ <li>add <code>-C</code> option to 256colors2.pl and
+ 88colors2.pl, to demonstrate mixed semicolon/colon separators
+ which are implied by ECMA-48.</li>
+
+ <li>update sample terminfo to reflect the documentation
+ improvements.</li>
+
+ <li>update description of 88/256/direct color in
+ <code>ctlseqs.ms</code> to point out that using semicolons is a
+ deprecated legacy feature, and standard terminal applications
+ should use colons (prompted by discussion with Bram
+ Moolenaar).</li>
+
+ <li>modify configure-check for <code>tgetent</code> to
+ conditionally include <code>termcap.h</code>, enabling
+ configuration using <code>clang</code>'s pedantic-errors option
+ (report by Dennis Clarke). See <a href=
+ "https://invisible-island.net/ncurses/man/curs_termcap.3x.html#h3-Other-Compatibility">
+ <em>Other Compatibility</em></a> in ncurses'
+ <em>curs_termcap(3X)</em>.</li>
+
+ <li>remove some unnecessary pointer checks (patch by Walter
+ Harms).</li>
+
+ <li>accept terminal-id and add DA response for VT131,
+ VT132.</li>
+ </ul>
+
+ <h1><a name="xterm_356" id="xterm_356">Patch #356 -
+ 2020/05/02</a></h1>
+
+ <ul>
+ <li>revise fix for Debian #954730, which interfered with wheel
+ mouse events (report by Gabriele Balducci).</li>
+ </ul>
+
+ <h1><a name="xterm_355" id="xterm_355">Patch #355 -
+ 2020/05/01</a></h1>
+
+ <ul>
+ <li>revise fix for Debian #954730, which interfered with wheel
+ mouse events (report by Henri Menke).</li>
+
+ <li>fix typos in documentation (reports by Stephen Hurd, Stefan
+ Assmann).</li>
+
+ <li>add mapping for <code>decTerminalID</code> for
+ &ldquo;100&rdquo; overlooked in <a href="#xterm_354">patch
+ #354</a>.</li>
+
+ <li>update tables in wcwidth.c based on Unicode 13.0.0</li>
+
+ <li>build-fix for &ldquo;make check&rdquo; when building
+ out-of-tree (report by Sven Joachim).</li>
+ </ul>
+
+ <h1><a name="xterm_354" id="xterm_354">Patch #354 -
+ 2020/04/26</a></h1>
+
+ <ul>
+ <li>work around performance problems of
+ <code>XDrawImageString</code> and
+ <code>XDrawImageString16</code> functions (Debian
+ #954845).</li>
+
+ <li>add a control sequence which reports xterm's version (patch
+ by Nicholas Marriott, mintty #881).</li>
+
+ <li>temporarily set numeric locale category to "C" when parsing
+ resources, so that <code>scaleHeight</code> and
+ <code>faceSize</code> settings do not depend on locale (Debian
+ #820803).</li>
+
+ <li>improve DA/DA2 response by ensuring that the
+ <code>decTerminalID</code> maps to one of the known
+ identifiers, as well as providing DA2 response for VT241 and
+ VT382.</li>
+
+ <li>terminfo improvements:
+ <ul>
+ <li>add (my) comments from ncurses which explain the keypad
+ layouts.</li>
+
+ <li>add <code>vt52+keypad</code> from ncurses</li>
+
+ <li>use improved <code>xm</code> example for
+ <code>xterm+x11mouse</code>, <code>xterm+sm+1006</code>
+ from ncurses 6.2 terminfo.src</li>
+ </ul>
+ </li>
+
+ <li>two fixes for left/right wheel mouse event reporting
+ (Debian #954730):
+ <ul>
+ <li>filter identical button-events</li>
+
+ <li>correct order of button-range versus protocol type (see
+ <a href="#xterm_345">patch #345</a>)</li>
+ </ul>
+ </li>
+
+ <li>change &ldquo;make check&rdquo; makefile-rule to use
+ test-drivers for charclass and wcwidth data.</li>
+
+ <li>quiet &ldquo;did not find a usable <em>xxx</em> TrueType
+ font&rdquo; warnings by making <code>fontWarnings</code> apply
+ to these messages (report by Jim Rees).</li>
+
+ <li>improve reinitialization of parameter list (report/testcase
+ by James Holderness).</li>
+
+ <li>temporarily set numeric locale category to "C" when
+ formatting SVG or XHTML screendumps, to make the radix
+ separator used in RGB values consistent (adapted from patch by
+ George Kouryachy).</li>
+
+ <li>add resource <code>forceXftHeight</code> to control whether
+ workaround from Debian #880407 is used.</li>
+
+ <li>apply updated ascent/descent in workaround from Debian
+ #880407 to fix a 1-pixel gap in built-in vertical lines
+ (report/testcase by Stefan Assmann).</li>
+
+ <li>improve round-off of scaling for built-in line-drawing
+ (prompted by discussion with Stefan Assmann).</li>
+
+ <li>adjust fonts in svg-icon files to accommodate reduced
+ functionality of new pango (report/analysis by YOKOTA
+ Hiroshi).</li>
+
+ <li>improve configure check for X Toolkit library.</li>
+
+ <li>correct Y-coordinate transformation in
+ <code>ClearCurBackground</code>, overlooked in changes for
+ <a href="#xterm_334">patch #334</a> (report/analysis by Chuck
+ Silvers).</li>
+
+ <li>remove <code>--vendor</code> option from test-packages'
+ install of desktop files; the feature is badly broken in
+ <em>gnome-shell</em>.</li>
+
+ <li>modify <code>uxterm</code> to make it possible to select
+ nonstandard locale <em>C.UTF-8</em>, e.g, if the user's locale
+ is set to &ldquo;C&rdquo; (Debian #940626).</li>
+
+ <li>re-save/tweak &ldquo;.svg&rdquo; icon-files to work around
+ breakage in toolset since the files were created in <a href=
+ "#xterm_283">patch #283</a>.</li>
+ </ul>
+
+ <h1><a name="xterm_353" id="xterm_353">Patch #353 -
+ 2020/02/01</a></h1>
+
+ <ul>
+ <li>amend change in <a href="#xterm_352">patch #352</a> for
+ button-events to fix a case where some followup events were not
+ processed soon enough (report/patch by Jimmy Aguilar
+ Mena).</li>
+
+ <li>handle <em>MappingNotify</em> X event, to improve recovery
+ when switching keyboard configurations using
+ <code>xkbcomp</code> (prompted by discussion with Frank Mosch,
+ Debian #661295). There is more work needed here, possibly in
+ the X libraries.</li>
+
+ <li>improve discussion of mouse-mode in <code>ctlseqs.ms</code>
+ (suggested by Igor van den Hoven).</li>
+
+ <li>further improve checks for Xft <em>max-advance-width</em>
+ to take into account fonts which use two cells for ambiguous
+ width characters. Also improve the time used for these checks
+ (reports by Yuri Pankov, Frank Mosch).</li>
+
+ <li>fix a few spelling errors reported by codespell (report by
+ Jens Schleusener).</li>
+
+ <li>modify <code>run-tic.sh</code> to prefer development
+ version of ncurses since changes to terminfo file in <a href=
+ "#xterm_345">patch #345</a> rely upon bug-fixes in ncurses
+ (prompted by discussion with Will Senn).</li>
+ </ul>
+
+ <h1><a name="xterm_352" id="xterm_352">Patch #352 -
+ 2020/01/16</a></h1>
+
+ <ul>
+ <li>adjust fontsize data to handle a minor inconsistency from
+ recent Xft versions (Debian #880407, adapted from patch by
+ Vincent Lef&egrave;vre).</li>
+
+ <li>add a table to the manual page description of
+ <code>forceBoxChars</code> to alert the reader to the special
+ characters aside from &ldquo;line-drawing&rdquo; which are
+ drawn directly when this resource is set (Debian #931305).</li>
+
+ <li>improve <code>checkXft</code> logic which attempts to
+ detect fonts whose <em>max-advance-width</em> is inconsistent
+ with the actual glyph widths. For some fonts, it is necessary
+ to check additional characters (report/analysis by Jan
+ Engelhardt).</li>
+
+ <li>improve configure-checks for X headers and libraries on
+ recent MacOS, which has moved those files under
+ <code>/usr/X11</code>.</li>
+
+ <li>improve portability of iconify/deiconify feature by taking
+ into account some window managers which manipulate the EWMH
+ <code>_NET_WM_STATE</code> property, adding/removing
+ <code>_NET_WM_STATE_HIDDEN</code> rather than actually
+ <em>minimizing</em> the window (prompted by discussion with
+ J&ouml;rg Breitbart).</li>
+
+ <li>improve workaround from <a href="#xterm_287">patch #287</a>
+ for the <code>-iconic</code> option when configured with
+ toolbar by postponing the extra request for minimizing the
+ window to the end of menu-initialization.</li>
+
+ <li>modify <code>xevents</code> special-case for mouse-events
+ to include button-events so that the meta key by itself can
+ generate button-events (report/analysis by Mattias
+ Engdeg&aring;rd).</li>
+
+ <li>amend SGR-stack change from <a href="#xterm_348">patch
+ #348</a> to not associate bold attribute with background color
+ (report by Nicholas Marriott).</li>
+
+ <li>fix copy/paste error in manual page (patch by Larry
+ Hynes).</li>
+
+ <li>add definitions in <code>xterm_io.h</code> so that GNU/Hurd
+ will use <code>posix_openpty</code> (patch by Samuel
+ Thibault).</li>
+
+ <li>build-fix in debug-tracing, for <code>esctest</code>.</li>
+
+ <li>updated autoconf macros</li>
+
+ <li>update config.guess</li>
+ </ul>
+
<h1><a name="xterm_351" id="xterm_351">Patch #351 -
2019/11/17</a></h1>
@@ -995,7 +1596,6 @@
<li>add <code>-report-icons</code> to help-message.</li>
<li>improved autoconf macros:
-
<ul>
<li><code>CF_ADD_LIBS</code>: the change to filter out
duplicates caused this to append rather than prepend.
@@ -1020,7 +1620,7 @@
struct-notify event handler to prevent recursion in the
Xft+buffered workaround in some cases when doing manual
resizing rather than resizing via escape sequences (reports by
- Stefan Assman, Mike Thornburg).</li>
+ Stefan Assmann, Mike Thornburg).</li>
<li>amend the workaround for Xft+buffered blanking by moving
the switch to bitmap-fonts to account for differences in font
@@ -1100,7 +1700,6 @@
<li>document window properties in the manual page.</li>
<li>improve title-string feature:
-
<ul>
<li>if any of <code>allowC1Printable</code>,
<code>utf8Title</code> or <code>titleModes</code> hint that
@@ -1256,7 +1855,6 @@
<li>two fixes for the double-buffer configuration, prompted by
MacPorts' switch to double-buffering (patch by Mike Thornburg,
MacPorts #58313):
-
<ul>
<li>ensure that the needSwap flag is set after drawing
TrueType text</li>
@@ -1278,8 +1876,8 @@
<li>reset flags including wraparound and reverse-wrap when
switching to VT52 mode, while noting that DEC's standard
- documention leaves that behavior <em>undefined</em> (report by
- Thomas Wolff).</li>
+ documentation leaves that behavior <em>undefined</em> (report
+ by Thomas Wolff).</li>
<li>ensure that italic font is turned off on hard/soft resets
(report by Martin Hostettler).</li>
@@ -1422,7 +2020,6 @@
P Wall).</li>
<li>modified configure script:
-
<ul>
<li>check/workaround for non-POSIX manipulation of
predefined symbols</li>
@@ -1480,7 +2077,6 @@
#940</a>). The <a href=
"https://developer.gnome.org/gio/stable/gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-search">
documentation</a> reads:
-
<blockquote>
<p>Searches desktop files for ones that match
<em><code>search_string</code></em>.</p>
@@ -1649,7 +2245,6 @@
is set to a non-directory value.</li>
<li>updated configure macros:
-
<ul>
<li><code>CF_WITH_PCRE2</code>, modified to work with
Debian's (mis-numbered) pcre3 package.</li>
@@ -1761,7 +2356,6 @@
xterm at a given time (Debian #901249).</li>
<li>documentation fixes (report by Lars Krueger):
-
<ul>
<li>document <code>SL</code> and <code>SR</code>.</li>
@@ -1779,7 +2373,6 @@
<li>several fixes for parsing/state (report/testcases by Martin
Hostettler):
-
<ul>
<li>remove an old/unimplemented entry for xterm-title from
state table.</li>
@@ -2080,7 +2673,6 @@
<li>fixes prompted by review of George Nachman's
<code>esctest</code> script:
-
<ul>
<li>add a null-pointer check and a limit-check in
<code>xtermCheckRect</code>.</li>
@@ -2147,7 +2739,6 @@
<li>improve a special case where a non-Unicode font's
line-drawing characters were not used, when specifying it via
the <code>utf8Fonts</code> resource, e.g.,
-
<blockquote>
<pre>
-fs 15 \
@@ -2257,7 +2848,6 @@
<li>improve legacy/NRC character set mapping (patch by Thomas
Wolff), e.g.,
-
<ul>
<li>enable alternate NRC set designators for French and
French Canadian, &lsquo;9&rsquo; and &lsquo;f&rsquo;
@@ -2269,7 +2859,6 @@
table to show capital delta.</li>
<li>referring to
-
<blockquote>
<p><a href=
"http://vt100.net/docs/vt220-rm/table2-3b.html">http://vt100.net/docs/vt220-rm/table2-3b.html</a><br>
@@ -2284,7 +2873,6 @@
</li>
<li>referring to
-
<blockquote>
<p><a href=
"http://www.vt100.net/charsets/technical.html">http://www.vt100.net/charsets/technical.html</a></p>
@@ -2360,7 +2948,6 @@
<ul>
<li>updates for ReGIS (Ross Combs):
-
<ul>
<li>remove redundant text command error check which broke
<code>T(B)</code> and <code>T(E)</code>.</li>
@@ -2439,7 +3026,6 @@
(Debian #858304).</li>
<li>updates for ReGIS (Ross Combs):
-
<ul>
<li>Strings specified with no command are used as
"comments". Print these in the log when tracing.</li>
@@ -2499,7 +3085,6 @@
<ul>
<li>revise parser for <code>charClass</code> resource, making
these improvements:
-
<ul>
<li>accept octal and hexadecimal values</li>
@@ -2535,7 +3120,6 @@
(see <a href="#xterm_311">patch #311</a>).</li>
<li>updates for ReGIS (Ross Combs):
-
<ul>
<li>the "H" option of the "T" command should multiply by
10, not 20.</li>
@@ -2559,7 +3143,6 @@
<code>smxx</code> and <code>rmxx</code>.</li>
<li>fixes from J&ouml;rg Sommer:
-
<ul>
<li>corrected a trace-message regarding maximum
graphics-size; it used the similar ReGIS maximum size which
@@ -2604,7 +3187,6 @@
<li>review/cleanup resources which were not in the manual page
(report by Maxwell Anselm):
-
<ul>
<li>add manual page description as needed.</li>
@@ -2635,7 +3217,6 @@
".desktop" files, including &ldquo;Terminal&rdquo;</li>
<li>several minor improvements to font utility functions:
-
<ul>
<li>provide for later modification to implement font-sets
by parsing the font resources as comma-separated
@@ -2717,7 +3298,6 @@
sort in an order not expected by <em>fontconfig</em>, causing
the request for a monospaced font to return <em>italics</em>,
e.g.,
-
<blockquote>
<pre>
$ fc-match 'Go Mono:spacing=monospace'
@@ -2859,7 +3439,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>fixed most <code>cppcheck --enable=all</code> warnings,
including for style (prompted by report by David Binderman).
There was one bug-fix:
-
<ul>
<li>RGB least-squares computation in
<code>allocateClosestRGB</code> used only one ordinate</li>
@@ -2873,7 +3452,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
lifetime issue (Ross Combs).</li>
<li>updates for SIXEL and ReGIS (Ross Combs):
-
<ul>
<li>Sixel drawing should still happen after an error if
some commands have been processed</li>
@@ -3028,7 +3606,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>fix a few minor bugs found with Coverity.</li>
<li>update pixelvector handling (Ross Combs):
-
<ul>
<li>split pixel-based and coord-based functions with common
parts factored out to a "raw" function</li>
@@ -3202,7 +3779,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
William Bulley).</li>
<li>fix/improve autoconf macros:
-
<ul>
<li>CF_WITH_APP_DEFAULTS, add paths for OSX</li>
@@ -3225,7 +3801,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
report).</li>
<li>improve paste64 feature (report by Olaf Rogalsky)
-
<ul>
<li>fix &ldquo;<code>p</code>;&rdquo; command in
<code>paste64.pl</code> example.</li>
@@ -3251,7 +3826,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>review and modify resource-settings which can be set via
control sequences, etc:
-
<ul>
<li>add <code>OSC&nbsp;6</code>, to enable/disable colors
set via <code>OSC&nbsp;5</code>, without changing the color
@@ -3273,7 +3847,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<code>-S</code> option value (report by Ben Longbons).</li>
<li>improve ReGIS graphics initialization (Ross Combs):
-
<ul>
<li>add a new string resource to set the default ReGIS
font.</li>
@@ -3327,7 +3900,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>fix some minor issues in manpage (Jens Schweikhardt).</li>
<li>improve ReGIS font-handling (Ross Combs):
-
<ul>
<li>remove "random junk" generation for unknown
characters</li>
@@ -3349,7 +3921,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
</li>
<li>improve ReGIS colorspec conversion (Ross Combs):
-
<ul>
<li>avoid some floating point math for colorspace
conversion</li>
@@ -3389,7 +3960,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>change the way that ReGIS graphics are refreshed (patch by
Ross Combs):
-
<ul>
<li>it pre-composes any overlapping graphics to avoid
unnecessary and flickering draws</li>
@@ -3565,7 +4135,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>fix memory leaks in bitmap font-name caching.</li>
<li>other changes to hard-reset behavior:
-
<ul>
<li>reset keyboard-type on hard-reset.</li>
@@ -3605,7 +4174,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>minor reorganization to implement &ldquo;filler&rdquo; SGR
features. There are no established applications which rely upon
these; some people find them amusing.
-
<ul>
<li>separate bits used to manage drawing state from
attribute-bits.</li>
@@ -3619,7 +4187,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
</li>
<li>additional changes for ReGIS support (Ross Combs):
-
<ul>
<li>fix some arc drawing bugs and add support for pattern
shading.</li>
@@ -3643,7 +4210,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>improve handling of the <code>fontsel</code>
(font-selection) menu item:
-
<ul>
<li>initialize the menu entry differently if the toolbar
configuration is used, i.e., enabling it without attempting
@@ -3669,7 +4235,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
by Matthieu Herrb).</li>
<li>configure macro updates:
-
<ul>
<li>drop the <code>-no-gcc</code> option from
CF_INTEL_COMPILER</li>
@@ -3683,7 +4248,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
cleanup storage usage in other modules.</li>
<li>initial changes for ReGIS support (Ross Combs):
-
<ul>
<li>document control-sequences</li>
@@ -3898,7 +4462,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>review/extend <code>DECNRCM</code> support (prompted by
report by Hayaki Saito asking about the two "A" codes).
-
<ul>
<li>make pasting of DECNRCM data work by translating the
pasted data into the selected encoding.</li>
@@ -4121,7 +4684,8 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>revert of <a href="#xterm_282">patch #282</a> change was
incomplete (report by Jim Reisert).</li>
- <li>fix typo in manpage (report by Vincent Lefevre).</li>
+ <li>fix typo in manpage (report by Vincent
+ Lef&egrave;vre).</li>
</ul>
<h1><a name="xterm_289" id="xterm_289">Patch #289 -
@@ -4249,7 +4813,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>remove deprecated files: proto.h, os2main.c</li>
<li>minor fixes based on Coverity scan, including:
-
<ul>
<li>correct caching of Atom value for the font menu's
"Selection" entry.</li>
@@ -4286,7 +4849,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
whose detail is <code>NotifyPointer</code>, since those are
sent in addition to focus-change events directed to the old/new
windows having focus. In particular, this prevents the
- urgency-hint from being reset inadvertantly (prompted by patch
+ urgency-hint from being reset inadvertently (prompted by patch
by Balazs Kezes).</li>
<li>modify description of <code>iconName</code> in manpage to
@@ -4378,7 +4941,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<code>Shell</code> widget (report by Emanuel Haupt).</li>
<li>fix documentation errata reported by Miroslav Lichvar:
-
<ul>
<li>correct manpage default for <code>allowTcapOps</code>
(see <a href="#xterm_243">patch #243</a></li>
@@ -4473,7 +5035,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>integrated patches from Arch Linux forum posting (patches
by Balazs Kezes):
-
<ul>
<li>modify reallocation limit of line-data when resizing
screen so that "lost" text will be restored if the screen
@@ -4739,7 +5300,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>fixes to improve vttest vt52 screen when running as a
VT420:
-
<ul>
<li>add checks for some VT2xx and up controls for
consistency: DECSCL, S1C8T, S1C7T.</li>
@@ -4841,7 +5401,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>add four new actions for making the selection or data
directly copied from the screen (prompted by discussion in
Debian #637001, as well as report by Arjen van Tol):
-
<ul>
<li>exec-formatted</li>
@@ -4886,7 +5445,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
honoring the option nor flagging an error.</li>
<li>add SGR 1006, as a better technical solution than SGR 1015:
-
<ul>
<li>the responses will not be confused with line-deletion
and scrolling controls.</li>
@@ -4916,7 +5474,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>add some changes for OpenBSD and MirBSD (adapted from patch
by Thorsten Glaser):
-
<ul>
<li>disable search for non-Unix96 ptys.</li>
@@ -5150,7 +5707,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>append a timestamp to filename used in
<code>printFileOnXError</code> feature, and restrict its
- permissions (request by Vincent Lefevre).</li>
+ permissions (request by Vincent Lef&egrave;vre).</li>
<li>add a check when cancelling cursor-blinking, in case the
cursor is blinked off. Fix so that the cursor is repainted
@@ -5245,7 +5802,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
a bitmap font is not installed.</li>
<li>improve behavior when there is no app-defaults file:
-
<ul>
<li>set the <code>toolBar</code> resource to false</li>
@@ -5319,7 +5875,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>add <code>omitTranslation</code> resource, which can be
used to suppress the default translations for these features:
-
<ul>
<li>fullscreen</li>
@@ -5332,7 +5887,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
</li>
<li>make the fullscreen feature configurable (Debian #612978)
-
<ul>
<li>add it to the configurable list
<code>disallowedWindowOps</code>.</li>
@@ -5434,7 +5988,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
values.</li>
<li>configure script improvements:
-
<ul>
<li>add workaround for removal of X11 dependency from Xt's
package file (report by Robert Hooker).</li>
@@ -5472,7 +6025,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<ul>
<li>fix a regression in fontname logic from <a href=
"#xterm_263">patch #263</a> changes (Debian #600707, reported
- by Vincent Lefevre).</li>
+ by Vincent Lef&egrave;vre).</li>
<li>revert modification of any-event/any-button protocol from
<a href="#xterm_263">patch #263</a> changes. It interferes with
@@ -5517,7 +6070,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
is hidden (Debian #594856).</li>
<li>further extend initialization for active-icon font to check
- if the font was not loaded succesfully, to retry with
+ if the font was not loaded successfully, to retry with
<code>font1</code>, or as even (if TrueType fonts are used) to
use a TrueType font. The retries are to help with cases as in
<a href="#xterm_241">patch #241</a> where the bitmap fonts are
@@ -5588,7 +6141,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
data to the screen (Debian #584801).</li>
<li>document in manpage some actions which were overlooked:
-
<ul>
<li>readline-button</li>
@@ -5697,7 +6249,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
"#xterm_249">249</a> (report by Thomas Wolff).</li>
<li>improve configure script:
-
<ul>
<li>corrected check for <code>_XOPEN_SOURCE</code> for
OpenSolaris.</li>
@@ -5816,7 +6367,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>improve font-setting/querying control
(<code>OSC&nbsp;50</code>):
-
<ul>
<li>when TrueType font is selected, the TrueType
<code>faceName</code> will be set, rather than the bitmap
@@ -6346,7 +6896,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
non-colored cell. This improves a special case where the cursor
is on a blank cell which had foreground color scrolled in
(report by Miroslav Lichvar).
-
<p>Also add the same logic when hiding cursor, so the outline
matches the in-focus cursor.</p>
</li>
@@ -6537,7 +7086,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<ul>
<li>add control sequences for some of the recent resource/menu
settings:
-
<ul>
<li><code>altSendsEscape</code> (private mode 1039)</li>
@@ -6611,7 +7159,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>bug-fixes for bugs.opensolaris.org (patches from Alan
Coopersmith)
-
<dl>
<dt>4029911</dt>
@@ -6757,7 +7304,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
fonts, to work with wide-characters (Debian #441354).</li>
<li>fixes/improvements for double-size characters:
-
<ul>
<li>correct old clipping calculation which used total
height of glyphs where ascent was needed.</li>
@@ -6835,7 +7381,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>synchronize terminfo with ncurses (report by Stephane
Chazelas)
-
<ul>
<li>equate <code>xterm-xfree86</code> and
<code>xterm-xf86-v44</code>.</li>
@@ -6906,7 +7451,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>correct index expression used to set line-wrapping flag,
making selection from scrollback work consistently (Debian
- #430121, report by Vincent Lefevre).</li>
+ #430121, report by Vincent Lef&egrave;vre).</li>
<li>amend changes to handshake in <a href="#xterm_226">patch
#226</a> to accommodate Solaris, which relies on the extra
@@ -7105,7 +7650,7 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<li>add "spawn-new-terminal" action, which can be assigned to
key translation, allowing one to spawn a new copy of xterm
- using the current process' working directory (adapted from
+ using the current process's working directory (adapted from
patch by Daniel Colascione).</li>
<li>improve select/paste between UTF-8 and Latin1 xterms by
@@ -7407,11 +7952,9 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
patch.</li>
<li>several changes to terminfo:
-
<ul>
<li>incorporate some minor changes from ncurses to help
keep these synchronized:
-
<dl>
<dt>2005-02-26</dt>
@@ -7643,7 +8186,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<code>_POSIX_C_SOURCE</code>, etc.</li>
<li>resync with XFree86 CVS
-
<ul>
<li>ifdef-out chmod of terminal device for OS/2 (XFree86
#1663, Frank Giessler).</li>
@@ -8052,7 +8594,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
installed setuid or setgid (report by Jeremy C. Reed).</li>
<li>patches from Emanuele Giaquinta:
-
<ul>
<li>ctlseqs.ms says that primary and secondary DA accept a
nonzero parameter, which is incorrect. Also modify code to
@@ -8071,7 +8612,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
</li>
<li>fixes for configure script:
-
<ul>
<li>add special case for QNX, defining _QNX_SOURCE.</li>
@@ -8095,7 +8635,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
around recent font server changes.</li>
<li>fixes for Novell #113277:
-
<ul>
<li>specify weight for wide font which may be derived from
normal fontname.</li>
@@ -9212,7 +9751,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
<ul>
<li>several fixes for rendering using Xft via option
<code>-fa</code>:
-
<ul>
<li>translate Unicode values, i.e,. from UTF-8 output to
xterm, for line-drawing to xterm's internal code, etc.,
@@ -9231,7 +9769,6 @@ Go-Mono-Italic.ttf: "Go Mono" "Italic"
</li>
<li>patches by Ilya Zakharevich:
-
<ul>
<li>improve drawXtermText() by making the recursive calls
communicate through arguments, and not through
@@ -9315,7 +9852,6 @@ Klanderman).
process-id rather than a random value.</li>
<li>resync with XFree86 CVS
-
<ul>
<li>Enable SCO function keys in xterm</li>
@@ -9575,7 +10111,6 @@ Klanderman).
<ul>
<li>fixes to make repainting of 256-color example work properly
(reports by Abigail Brady and Scott A Crosby).
-
<ul>
<li>set flag in <code>AllocateAnsiColor()</code> to ensure
the color is allocated once only.</li>
@@ -9608,7 +10143,6 @@ Klanderman).
<li>fix a few problems with the <code>$TERMCAP</code> string
generated by <code>resize</code>:
-
<ul>
<li>for Bourne shell, add an <code>export</code> command.
This was missing as far back as X11R5.</li>
@@ -9673,7 +10207,6 @@ Klanderman).
<li>update config.guess, config.sub</li>
<li>resync with XFree86 CVS
-
<ul>
<li>fix va_args glitches for xterm/libfontconfig: 0 ==
(void*)0 isn't true for all platforms (Egbert Eich).</li>
@@ -9770,8 +10303,8 @@ Klanderman).
<li>modify logic for <code>metaSendsEscape</code> to allow it
to work in a setup where the Meta-key is not recognized as a
modifier by the key-translations logic (discussion of
- eightBitInput with H.J.Lu). Note however that Vincent Lefevre
- reported this in January).</li>
+ eightBitInput with H.J.Lu). Note however that Vincent
+ Lef&egrave;vre reported this in January).</li>
<li>use null pointer values consistently, rather than literal
"0", for ending variable-length argument lists, e.g., for
@@ -9845,7 +10378,6 @@ Klanderman).
resource (reported by Tony Finch).</li>
<li>changes from OpenBSD:
-
<ul>
<li>Make xterm setgid utmp to be able to update utmp even
with root privileges revoked.</li>
@@ -9856,7 +10388,6 @@ Klanderman).
</li>
<li>changes from NetBSD:
-
<ul>
<li>Check that the return value from ttyslot() is greater
than 0 before writing the utmp file. Fixes w's "w: Stale
@@ -9905,7 +10436,7 @@ Klanderman).
<ul>
<li>correct a bug in selection: double clicking on a word which
was partly scrolled off the screen may select that text (report
- by Vincent Lefevre &lt;vincent@vinc17.org&gt;).</li>
+ by Vincent Lef&egrave;vre &lt;vincent@vinc17.org&gt;).</li>
<li>implement <code>veryBoldColors</code> resource to control
whether the corresponding video attribute such as
@@ -9958,7 +10489,6 @@ Klanderman).
that case (fixes Debian #134130).</li>
<li>resync with XFree86 CVS
-
<ul>
<li>Fix some xterm build warnings on *BSD (patch by David
Dawes).</li>
@@ -10016,7 +10546,6 @@ Klanderman).
(David Krause &lt;xfree86@davidkrause.com&gt;).</li>
<li>resync with XFree86 CVS
-
<ul>
<li>update language of copyrights in some files to reflect
the fact that they were reassigned from X Consortium to The
@@ -10069,7 +10598,7 @@ Klanderman).
rules to define location of app-defaults directory (Debian
#87611).</li>
- <li>review/update list of conflicting preprocesor symbols to
+ <li>review/update list of conflicting preprocessor symbols to
remove from $CPPFLAGS at the end of the configure script. In
particular, this allows one to configure xterm without the
utempter library on Redhat 7.1 (report/patch by Adam
@@ -10131,7 +10660,6 @@ Klanderman).
<li>add configure check for <code>&lt;ncurses/term.h&gt;</code>
to get rid of hardcoded <code>__CYGWIN__</code> ifdef in
resize.c
-
<p>NOTE: The CYGWIN port should not be linking
<code>resize</code> with ncurses. It appears that the only
reason it is, is because both the ncurses and termcap ports
@@ -10152,7 +10680,6 @@ Klanderman).
"#xterm_141">UXTerm</a> app-defaults file.</li>
<li>resync with XFree86 CVS
-
<ul>
<li>Modified xterm app default to use LFD fontnames instead
of old type (Michael Schroeder).</li>
@@ -10205,7 +10732,6 @@ Klanderman).
<li>implement "OverTheSpot" preedit type of XIM input (patch by
Tomohiro Kubota):
-
<ul>
<li>This preedit type is a reasonable compromise between
simpleness of implementation and usefulness. "Root" preedit
@@ -10242,7 +10768,7 @@ Klanderman).
behavior of other programs such as Rxvt, Kterm, Gedit.</li>
<li>A tiny XIM bugfix is also included. By calling
- XSetLocaleModifiers() with parameter of "", it can consier
+ XSetLocaleModifiers() with parameter of "", it can consider
XMODIFIERS environmental variable which is a standard way
for users to specify XIM server to be used.</li>
</ul>
@@ -10268,7 +10794,6 @@ Klanderman).
application flashes the screen (Bugzilla #38872).</li>
<li>resync with XFree86 CVS
-
<ul>
<li>remove ifdef's for X_NOT_STDC_ENV (patch by David
Dawes).</li>
@@ -10300,11 +10825,10 @@ Klanderman).
experiment with more complex versions without making the core
of XTerm more difficult to maintain. The functionality of the
emulation is as follows.
-
<ul>
<li>Xutf8TextListToTextProperty fully handles XStringstyle
and XUTF8StringStyle. It will only generate STRING for
- XStdICCTextStyle, and wil only generate Latin-1 in
+ XStdICCTextStyle, and will only generate Latin-1 in
XCompoundTextStyle (but label it as COMPOUND_TEXT, as the
spec requires). (I have hesitated to make this function
fail for XStdICCTextStyle and XCompoundTextStyle; this
@@ -10339,7 +10863,6 @@ Klanderman).
&lt;fletcher@catsreach.org&gt;).</li>
<li>two patches by Denis Zaitsev &lt;zzz@cd-club.ru&gt;:
-
<ul>
<li>added <code>forceBoxChars</code> resource to control
the "line-drawing characters" option.</li>
@@ -10408,7 +10931,6 @@ Klanderman).
&lt;vojta@math.berkeley.edu&gt;).</li>
<li>resync with XFree86 4.1.0:
-
<ul>
<li>Use TermcapLibrary as -lncurses instead of -ltermcap,
fixes problem building xterm/resize on Cygwin/XFree86
@@ -10470,7 +10992,6 @@ Klanderman).
<li>fixes/improvements for the <code>i18nSelection</code>
resource from patch #153, by Bruno Haible:
-
<ul>
<li>add missing initialization for
<code>i18nSelection</code> resource.</li>
@@ -10562,13 +11083,11 @@ Klanderman).
Juliusz Chroboczek). It is believed to follow the ICCCM +
UTF8_STRING to the letter, both in UTF-8 and in eight-bit mode.
From his description:
-
<ul>
<li>When compiled against XFree86 4.0.2, the patched XTerm
will make the selection available as COMPOUND_TEXT, STRING
or UTF8_STRING in both modes. It will request selections in
the following order:
-
<p>UTF-8 mode: UTF8_STRING, TEXT, COMPOUND_TEXT,
STRING.<br>
eight-bit mode: TEXT, COMPOUND_TEXT, UTF8_STRING,
@@ -10610,7 +11129,6 @@ Klanderman).
manager hints make it simple to resize xterm in terms of
character cells rather than pixels (reports by Christian
Weisgerber, Debian #79939).
-
<p>This applies to the normal configuration. When built with
toolbar support, the hints are applied to a different widget
level (more work will be needed to make hints work with the
@@ -10670,7 +11188,6 @@ Klanderman).
Alison Winters &lt;alison@mirrabooka.com&gt;).</li>
<li>fixes for wide/combining characters (Robert Brady):
-
<ul>
<li>fix a scrolling / combining characters display
anomaly</li>
@@ -10768,7 +11285,6 @@ Klanderman).
Moolenaar).</li>
<li>resync with XFree86 4.0.1g:
-
<ul>
<li>Rewrite Xft library for Render extension/core text and
font management Change xterm to use new interface (Keith
@@ -10794,7 +11310,6 @@ Klanderman).
(patch by Bram Moolenaar).</li>
<li>patch by Kiyokazu Suto &lt;suto@ks-and-ks.ne.jp&gt;:
-
<ul>
<li>add support for bold font for double width characters.
The font name may be specified with the command line option
@@ -10812,7 +11327,6 @@ Klanderman).
</li>
<li>some changes to align terminfo with ncurses 5.2:
-
<ul>
<li>remove xtermm description, retaining xterm-mono since
the former conflicts with ncurses.</li>
@@ -10837,7 +11351,6 @@ Klanderman).
to coerce the parameter to an unsigned char.</li>
<li>resync with XFree86 4.0.1d:
-
<ul>
<li>Add primitive support in xterm for Xft based fonts
(Keith Packard). The changes are ifdef'd with
@@ -10892,7 +11405,6 @@ Klanderman).
<ul>
<li>changes for UTF-8 configuration (Robert Brady):
-
<ul>
<li>doublewide characters don't lose their accents when the
cursor moves onto or from them (a visual bug)</li>
@@ -10917,7 +11429,6 @@ Klanderman).
<li>several changes to PTY logic (based on request by Tim Ryan
&lt;timryan@nortelnetworks.com&gt;).
-
<ul>
<li>modify treatment of <code>-S</code> option to to make
it work with Unix98 PTY's.</li>
@@ -11198,7 +11709,6 @@ Klanderman).
predefined.</li>
<li>patches from Stephen P Wall:
-
<ul>
<li>add support for two Sun-specific function keys. These
keys are labeled F11 and F12 on Sun Type 5 keyboards, but
@@ -11222,7 +11732,6 @@ Klanderman).
</li>
<li>fixes for os390 (Paul Gilmartin):
-
<ul>
<li>regularize the definition of CONTROL() and remove an
acknowledged "trial and error" table.</li>
@@ -11303,7 +11812,6 @@ Klanderman).
list in charproc.c</li>
<li>resync with XFree86 4.0a:
-
<ul>
<li>correct a typo in os2main.c (Holger Veit, from
4.0a).</li>
@@ -11317,7 +11825,6 @@ Klanderman).
<ul>
<li>improve logfile security (integrated patch by Branden
Robinson)
-
<ul>
<li>make the <code>creat_as()</code> function more strict
by using O_EXCL rather than O_APPEND.</li>
@@ -11558,7 +12065,6 @@ Klanderman).
adapted from Redhat 6.1 patch for XFree86 3.3.5</li>
<li>resync with XFree86 3.9.17a:
-
<ul>
<li>correction to QNX support (Frank Guangxin Liu)</li>
@@ -11600,7 +12106,6 @@ Klanderman).
<li>two corrections to simulation of bold font via
overstriking:
-
<ul>
<li>use clipping to avoid leaving trash at end of the text,
and</li>
@@ -11644,7 +12149,6 @@ Klanderman).
<li>modify default for OPT_I18N_SUPPORT to assume that
<code>XtSetLanguageProc()</code> is available in X11R5.
-
<p>Caveat: <code>XtSetLanguageProc()</code> was added fairly
late in the X11R5 patches, and some vendors shipped buggy
versions of this function (request by Tomas Vanhala).</p>
@@ -11831,7 +12335,6 @@ Klanderman).
<li>work around problem observed in XFree86 3.3.5 (patch by
Alexander V Lukyanov, Redhat #5419). From the problem report:
-
<blockquote>
<p>xterm consumes cpu when selecting text with mouse
(holding down left mouse button) and when a program working
@@ -11882,7 +12385,6 @@ Klanderman).
DECSLE, "Select Locator Events"
DECRQLP, "Request Locator Position"
</pre>
-
<p>This allows the xterm mouse to be used with applications
that use the DEC Locator sequences, such as VAX Tpu, or SMG$
based applications.</p>
@@ -11890,7 +12392,6 @@ Klanderman).
<li>improve print action (patch by Matthias Baake). From his
notes,
-
<ul>
<li>Bug 1<br>
Underlined text is preceded by ESC&nbsp;[0;2m . This should
@@ -12006,7 +12507,6 @@ Klanderman).
<li>corrected position of scrollbar set in ResizeScrollBar(),
which left it positioned incorrectly if the right scrollbar
were enabled from the popup menu but was not initially enabled.
-
<p>I have noticed some additional problems with
right-scrollbar on X11R5 which I will correct later.</p>
</li>
@@ -12044,7 +12544,6 @@ Klanderman).
colors 16-255.</li>
<li>fixes for os390 (Greg Smith):
-
<ul>
<li>add README.os390</li>
@@ -12058,7 +12557,6 @@ Klanderman).
</li>
<li>patches by Todd Larason:
-
<ul>
<li>enable SGR 48 5 in ISO color mode, not just 256 color
mode</li>
@@ -12223,7 +12721,6 @@ Klanderman).
<ul>
<li>Two changes from Stephen P Wall. From his description:
-
<blockquote>
<p>The first change is simple - I added ESC[3J to erase the
stored lines above the screen. That's what the changes to
@@ -12239,7 +12736,6 @@ Klanderman).
<li>improve selection (integrated patch by Juliusz Chroboczek).
From his description:
-
<blockquote>
<p>With this patch, selection conversion works
properly:</p>
@@ -12250,7 +12746,6 @@ Klanderman).
UTF-8 xterm -&gt; ISO 8859-1 xterm (transferred as STRING);
UTF-8 xterm -&gt; UTF-8 xterm (transferred as UTF-8).
</pre>
-
<p>It will not work properly if one xterm is in, say, ISO
8859-2. Actually, for this case xterm breaks the ICCCM
routinely (sending ISO 8859-2 data as STRING), so I
@@ -12324,7 +12819,6 @@ Klanderman).
<li>improved support for Unix98 PTY's, using patch in Debian
bug report #35650, by J.H.M. Dassen
&lt;jdassen@wi.leidenuniv.nl&gt;. From the patch description:
-
<blockquote>
<ul>
<li>No longer links xterm against libutil on a glibc2.1
@@ -12499,7 +12993,6 @@ Klanderman).
keyboard with the <em>sunKeyboard</em> resources in patch #94,
so that it normally matches the value of the stty erase
character:
-
<ul>
<li>Reported by Jae Gangemi
&lt;jgangemi@ccf.rutgers.edu&gt;, this caused emacs to not
@@ -12523,13 +13016,11 @@ Klanderman).
usable, i.e., display and refresh work, and I am able to
display the test cases which Markus provides. More work is
needed to complete this feature:
-
<ul>
<li>the control sequences for switching in/out of UTF-8
mode are partly implemented (don't use them). Similarly,
the switching between vt100 and tek4014 emulations when
UTF-8 mode is enabled will not work properly.
-
<p>You must use the -u8 command line option to use this
feature, as well as compile with the OPT_WIDE_CHARS
definition.</p>
@@ -12689,7 +13180,6 @@ Klanderman).
<li>changes for Linux-2.2.x with GLibc-2.1 and /dev/ptmx
support (integrated patch from Pavel Roskin):
-
<ul>
<li>main.c and resize.c were using different rules to
determine whether ATT should be defined (actually
@@ -12878,7 +13368,6 @@ Klanderman).
sequence, this clears the alternate screen when switching to it
rather than when switching to the normal screen, thus retaining
the alternate screen contents for select/paste operations.
-
<p>When I implemented the popup menu entry to toggle between
the normal and alternate screens, I considered only pasting
from the normal screen to the alternate; this improvement
@@ -12895,7 +13384,6 @@ Klanderman).
capabilities will restore the cursor to the original position
on the normal screen rather than to the most recent place where
a save-cursor operation was performed.
-
<p>I note that a real VT100 terminal would not behave in this
way, but it is a moot point since the VT100 does not
implement alternate screen, and therefore the save/restore
@@ -12975,7 +13463,6 @@ Klanderman).
-bitstream-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1
9x15
</pre>
-
<p>The iso8859 font does not include box characters, of course,
but looks good.</p>
@@ -13230,7 +13717,6 @@ Klanderman).
&lt;juphoff@tarsier.cv.nrao.edu&gt;)</li>
<li>modifications to terminfo file:
-
<ul>
<li>rename description to xterm-xfree86, adding an entry
'xterm' which is derived from xterm-xfree86 to simplify
@@ -13288,7 +13774,6 @@ Klanderman).
<li>document SGR 8, 28 (invisible/visible), add corresponding
capabilities to terminfo description.
-
<p>I would also add the 'prot protected capability, but the
control sequences for that would not be recognized or
properly ignored by the older xterm programs.</p>
@@ -13465,7 +13950,6 @@ Klanderman).
doing. (Occasionally during an exposure event xterm fails to
restore the proper colors for highlighted text, and printing
the screen will show the internal states nicely).
-
<p>The print facility now also displays the color
information. (I will probably make this a resource).</p>
</li>
@@ -13476,7 +13960,6 @@ Klanderman).
<li>reduced some clutter of the ifdef/includes (e.g., stdlib.h,
unistd.h, errno) making the configure script test for these.
-
<p>I removed the symbols Size_t and Time_t, since they no
longer serve a useful purpose.</p>
</li>
@@ -13484,7 +13967,6 @@ Klanderman).
<li>added some debugging traces to show the initial screen
size, and the success/failure of the ioctl calls pass handle
window resizing events to the application (for Clint Olsen).
-
<p>I also modified the trace code to produce two files since
some of the information is produced by the child process. So
now they are Trace-parent.out and Trace-child.out</p>
@@ -13621,7 +14103,6 @@ Klanderman).
attempt to use that unless it is different from the foreground
and background colors (reported by Stefan Dalibor
&lt;Stefan.Dalibor@informatik.uni-erlangen.de&gt;.
-
<p>I could not reproduce this until I noticed that the -rev
option exposed it nicely.</p>
</li>
@@ -13682,7 +14163,6 @@ Klanderman).
vim, which apparently assumed that switching between the normal
and alternate screens resets the colors (reported by Jim Battle
&lt;jb@chromatic.com&gt;).
-
<p>It would be nice to implement save/restore cursor as a
stack (and solve this type of problem completely), but that
would lead to incompatibility with applications which assume
@@ -13795,7 +14275,6 @@ Klanderman).
<ul>
<li>add support for blinking text.
-
<ul>
<li>This does not actually cause the text to flash, but
text with the blink attribute can be displayed in color,
@@ -13851,7 +14330,6 @@ Klanderman).
<ul>
<li>implement logic to permit xterm to work with proportional
fonts.
-
<ul>
<li>Thomas Wolff &lt;Thomas.Wolff@sietec.de&gt; requested
this (but it isn't exactly what he's asking for - that's a
@@ -13935,7 +14413,6 @@ Klanderman).
~Shift&lt;BtnUp&gt;: select-end(PRIMARY, CUT_BUFFER0)\n\
Shift&lt;BtnUp&gt;: select-end(CLIPBOARD, CUT_BUFFER1)
</pre>
-
<p>(The above resources intention is to be able to paste the
latest selection even if the xterm was cleared.)</p>
@@ -14195,7 +14672,6 @@ Klanderman).
<ul>
<li>minor correction to positioning of underlines for small
(e.g., 5x8) font size.
-
<p>The existing behavior allowed underlines to be drawn
outside the character-cell, so they weren't cleared properly
under some circumstances.</p>
@@ -14501,7 +14977,6 @@ Klanderman).
<pre>
-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1
</pre>
-
<p>but that's a known xterm limitation (the box characters must
be part of the font, in the first 32 locations).</p>
@@ -14626,7 +15101,6 @@ Klanderman).
<li>used that ifdef to isolate/modify logic so that if the user
doesn't have the colorMode enabled, then ISO color support is
disabled (saving memory).
-
<p>(If anyone needs numbers, I had savedLines set to 2000,
and found a reduction from ~700k to ~400k of allocated
memory, according to Purify).</p>
@@ -14648,7 +15122,6 @@ Klanderman).
<ul>
<li>fixes the core dump that I reported on IRIX 5.2 (in main.c)
-
<p>(it's worth noting that this bug exists in X11R6.1, so I'd
like to assume that someone's already submitted a fix to X
Consortium...)</p>
@@ -14775,7 +15248,6 @@ Klanderman).
<li>in both, corrected home/end keys to match the code
correction made by Thomas Mueller in 3.1.2Bk
-
<p>=&gt; (I'm still considering modifying the code &amp;
description to match the rxvt program).</p>
</li>
@@ -14804,7 +15276,6 @@ Klanderman).
<ul>
<li>button.c
-
<ul>
<li>(compiler warnings: shadowing of 'time', redundant
cast)</li>
@@ -14812,7 +15283,6 @@ Klanderman).
</li>
<li>charproc.c
-
<ul>
<li>renamed screen.colors[] array to screen.Acolors[] to
more easily distinguish the non-ANSI colors from the ANSI
@@ -14834,7 +15304,6 @@ Klanderman).
<li>ctlseqs.ms</li>
<li>xterm.man
-
<ul>
<li>(correct a misconception which I'd added that the
color0 through color6 resource values apply to non-ANSI
@@ -14843,7 +15312,6 @@ Klanderman).
</li>
<li>ptyx.h
-
<ul>
<li>added original_fg, original_bg to TScreen
structure.</li>
@@ -14851,14 +15319,12 @@ Klanderman).
</li>
<li>scrollbar.c
-
<ul>
<li>(compiler warnings: redundant cast)</li>
</ul>
</li>
<li>util.c
-
<ul>
<li>new functions getXtermForeground and getXtermBackground
replace the macros GET_FG and GET_BG, with the added
@@ -14975,14 +15441,12 @@ Klanderman).
<ul>
<li>charproc.c:
-
<ul>
<li>add/use new macros GET_FG, GET_BG - n/c.</li>
<li>add/use new functions SGR_Foreground() and
SGR_Background() to set corresponding colors in GC's, and
to retain sense of "original" colors.
-
<p>=&gt; This makes redundant some of the corresponding
logic in HideCursor to set the foreground and background,
but I left it in since it <em>may</em> be fixing an
@@ -14991,7 +15455,6 @@ Klanderman).
<li>set GC's in LoadNewFont() according to whether the SGR
fg/bg colors are active.
-
<p>=&gt; This fixes some glitches in the accompanying
resize, that leaves parts of the window in the original
background color.</p>
@@ -15000,7 +15463,6 @@ Klanderman).
</li>
<li>screen.c:
-
<ul>
<li>modified ClearBufRows() to use the SGR fg/bg colors if
they're set.</li>
@@ -15008,7 +15470,6 @@ Klanderman).
<li>added function ScrnClearLines(), used this to replace
portions of ScrnInsertLine() and ScrnDeleteLine(). The new
function uses the SGR fg/bg colors if they're set.
-
<p>=&gt; Otherwise, selection after an index or reverse
index will paint the wrong colors.</p>
</li>
@@ -15019,7 +15480,6 @@ Klanderman).
</li>
<li>util.c:
-
<ul>
<li>modified ClearRight() so that if either of the SGR
fg/bg colors is set, we don't bzero the attributes and
@@ -15046,7 +15506,6 @@ Klanderman).
<ul>
<li>charproc.c:
-
<ul>
<li>recode index expressions in ShowCursor() and
HideCursor() using SCRN_BUF_xxxxS macros - changes
@@ -15057,7 +15516,6 @@ Klanderman).
</li>
<li>ptyx.h:
-
<ul>
<li>defined the SCRN_BUF_xxxxS macros in terms of BUF_xxxxS
macros, to pick up references to ScrnBuf data directly, and
@@ -15067,7 +15525,6 @@ Klanderman).
</li>
<li>screen.c:
-
<ul>
<li>recode index expressions in ScreenWrite() using
SCRN_BUF_xxxxS macros - changes object.</li>
@@ -15082,7 +15539,6 @@ Klanderman).
</li>
<li>scrollbar.c:
-
<ul>
<li>replace constant '4' by MAX_PTRS - n/c.</li>
@@ -15101,21 +15557,18 @@ Klanderman).
<ul>
<li>button.c:
-
<ul>
<li>use SCRN_BUF_xxxxS macros - n/c</li>
</ul>
</li>
<li>charproc.c:
-
<ul>
<li>use SCRN_BUF_xxxxS macros - n/c</li>
</ul>
</li>
<li>ptyx.h:
-
<ul>
<li>added four macros: SCRN_BUF_CHARS, SCRN_BUF_ATTRS,
SCRN_BUF_FORES, SCRN_BUF_BACKS to represent the four arrays
@@ -15124,14 +15577,12 @@ Klanderman).
</li>
<li>screen.c:
-
<ul>
<li>use SCRN_BUF_xxxxS macros - n/c</li>
</ul>
</li>
<li>util.c:
-
<ul>
<li>use SCRN_BUF_xxxxS macros - n/c</li>
</ul>
@@ -15153,7 +15604,6 @@ Klanderman).
<ul>
<li>Tekproc.c:
-
<ul>
<li>changed several functions to 'static' that aren't used
outside this module -- changes object</li>
@@ -15161,7 +15611,6 @@ Klanderman).
</li>
<li>charproc.c:
-
<ul>
<li>changed several functions to 'static' that aren't used
outside this module -- changes object</li>
@@ -15172,7 +15621,6 @@ Klanderman).
</li>
<li>main.c:
-
<ul>
<li>changed several functions to 'static' that aren't used
outside this module -- changes object</li>
@@ -15189,14 +15637,12 @@ Klanderman).
</li>
<li>main.h:
-
<ul>
<li>deleted unused definition of DEFBORDERWIDTH - n/c</li>
</ul>
</li>
<li>misc.c:
-
<ul>
<li>changed several functions to 'static' that aren't used
outside this module -- changes object</li>
@@ -15207,7 +15653,6 @@ Klanderman).
</li>
<li>ptyx.h:
-
<ul>
<li>change sbuf_address and abuf_address to 'Char *' -
n/c</li>
@@ -15215,7 +15660,6 @@ Klanderman).
</li>
<li>resize.c:
-
<ul>
<li>changed several functions to 'static' that aren't used
outside this module -- changes object</li>
@@ -15223,14 +15667,12 @@ Klanderman).
</li>
<li>screen.c:
-
<ul>
<li>remove unnecessary 'Char **' casts - n/c</li>
</ul>
</li>
<li>util.c:
-
<ul>
<li>changed several functions to 'static' that aren't used
outside this module -- changes object</li>
@@ -15251,7 +15693,6 @@ Klanderman).
<pre>
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wnested-externs
</pre>
-
<p>(I also compiled with -Wshadow, but while that found some
things that I wanted to find, there's far too many warnings from
the X headers to be usable in this context).</p>
@@ -15260,7 +15701,6 @@ Klanderman).
<ul>
<li>Tekproc.c:
-
<ul>
<li>parenthesized expression to avoid gcc warning --
n/c.</li>
@@ -15272,7 +15712,6 @@ Klanderman).
</li>
<li>charproc.c:
-
<ul>
<li>corrected potentially-unintialized variables 'scstype',
'xim', and 'input_style' -- changes object.</li>
@@ -15289,7 +15728,6 @@ Klanderman).
</li>
<li>cursor.c:
-
<ul>
<li>corrected nested-extern declaration of 'term' --
n/c</li>
@@ -15300,7 +15738,6 @@ Klanderman).
</li>
<li>input.c:
-
<ul>
<li>change interface of StringInput to assume size_t (i.e.,
unsigned) nbytes -- changes object.</li>
@@ -15311,7 +15748,6 @@ Klanderman).
</li>
<li>main.c:
-
<ul>
<li>moved definitions of SIGNAL_T, SIGNAL_RETURN to proto.h
- n/c</li>
@@ -15333,7 +15769,6 @@ Klanderman).
</li>
<li>menu.c:
-
<ul>
<li>removed redundant prototype for 'do_hangup()' --
n/c.</li>
@@ -15344,7 +15779,6 @@ Klanderman).
</li>
<li>menu.h:
-
<ul>
<li>renamed 'time' parameters to avoid gcc -Wshadow warning
- n/c</li>
@@ -15352,7 +15786,6 @@ Klanderman).
</li>
<li>misc.c:
-
<ul>
<li>corrected definition of 'HandleFocusChange()' --
changes object</li>
@@ -15367,7 +15800,6 @@ Klanderman).
</li>
<li>proto.h:
-
<ul>
<li>moved definition of SIGNAL_T (and SIGNAL_RETURN) here
from main.c, resize.c to allow use of this symbol in
@@ -15379,7 +15811,6 @@ Klanderman).
</li>
<li>resize.c:
-
<ul>
<li>moved SIGNAL_T definition to proto.h -- n/c.</li>
@@ -15388,14 +15819,12 @@ Klanderman).
</li>
<li>screen.c:
-
<ul>
<li>use Size_t type - n/c.</li>
</ul>
</li>
<li>tabs.c:
-
<ul>
<li>corrected nested-extern declaration of 'term' --
n/c</li>
@@ -15403,7 +15832,6 @@ Klanderman).
</li>
<li>util.c:
-
<ul>
<li>corrected/supplied parameters to 'TekExpose()' --
changes object (note: 'TekExpose()' doesn't use its
@@ -15418,7 +15846,6 @@ Klanderman).
</li>
<li>xterm.h:
-
<ul>
<li>prototype 'do_hangup()', 'HandleFocusChange()',
'TekExpose()', 'Error()', 'Exit()' - forces changes in
@@ -15454,7 +15881,6 @@ Klanderman).
proto.h
xterm.h
</pre>
-
<p>I expect this to be the biggest patch by far. However (barring
a misplaced prototype), it shouldn't break anything, since the
intent of the patch is to provide missing declarations.</p>
diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man
index bcc7deced..0de7be00d 100644
--- a/app/xterm/xterm.man
+++ b/app/xterm/xterm.man
@@ -1,7 +1,7 @@
'\" t
-.\" $XTermId: xterm.man,v 1.802 2019/11/02 09:37:54 tom Exp $
+.\" $XTermId: xterm.man,v 1.833 2020/12/24 12:49:26 tom Exp $
.\"
-.\" Copyright 1996-2018,2019 by Thomas E. Dickey
+.\" Copyright 1996-2019,2020 by Thomas E. Dickey
.\"
.\" All Rights Reserved
.\"
@@ -442,7 +442,7 @@ This is equivalent to setting the \fIvt100\fP resource
.B \-aw
This option indicates that auto-wraparound should be allowed,
and is equivalent to setting the \fIvt100\fP resource
-\fBautoWrap\fP to \*(``false\*(''.
+\fBautoWrap\fP to \*(``true\*(''.
.IP
Auto-wraparound
allows the cursor to automatically wrap to the beginning of the next
@@ -467,14 +467,14 @@ use the line-speed when optimizing their output to the screen.
The
default is \*(``38400\*(''.
.TP 8
-.B +bc
-turn off text cursor blinking.
-This overrides the \fBcursorBlink\fR resource.
-.TP 8
.B \-bc
turn on text cursor blinking.
This overrides the \fBcursorBlink\fR resource.
.TP 8
+.B +bc
+turn off text cursor blinking.
+This overrides the \fBcursorBlink\fR resource.
+.TP 8
.BI \-bcf " milliseconds"
set the amount of time text cursor is off when blinking via the
\fBcursorOffTime\fP resource.
@@ -597,17 +597,6 @@ Encodings other than UTF-8 are supported by using \fIluit\fR.
The \fB\-lc\fR option should be used instead of \fB\-en\fR for
systems with locale support.
.TP 8
-.BI \-fb " font"
-This option specifies a font to be used when displaying bold text.
-It sets the \fBboldFont\fR resource.
-.IP
-This font must be the same height and width as the normal font,
-otherwise it is ignored.
-If only one of the normal or bold fonts is specified, it will be used as the
-normal font and the bold font will be produced by overstriking this font.
-.IP
-See also the discussion of \fBboldMode\fP and \fBalwaysBoldMode\fP resources.
-.TP 8
.BI \-fa " pattern"
This option sets the pattern for fonts selected from the FreeType
library if support for that library was compiled into \fI\*n\fP.
@@ -623,6 +612,17 @@ See also the \fBrenderFont\fP resource,
which combines with this to determine whether FreeType fonts are
initially active.
.TP 8
+.BI \-fb " font"
+This option specifies a font to be used when displaying bold text.
+It sets the \fBboldFont\fR resource.
+.IP
+This font must be the same height and width as the normal font,
+otherwise it is ignored.
+If only one of the normal or bold fonts is specified, it will be used as the
+normal font and the bold font will be produced by overstriking this font.
+.IP
+See also the discussion of \fBboldMode\fP and \fBalwaysBoldMode\fP resources.
+.TP 8
.B \-fbb
This option indicates that \fI\*n\fP should
compare normal and bold fonts bounding
@@ -848,7 +848,7 @@ Unix98 pseudo-terminals made the BSD scheme unnecessary.
Unless overridden by the \fB\-lf\fP option or the \fBlogFile\fP resource:
.RS
.bP
-If the filename is \*(``-\*('', then logging is sent to the standard output.
+If the filename is \*(``\-\*('', then logging is sent to the standard output.
.bP
Otherwise a filename is generated, and
the log file is written to the directory from which \fI\*n\fP is invoked.
@@ -894,12 +894,12 @@ This corresponds to the \fBlocaleFilter\fR resource.
.TP 8
.B \-leftbar
Force scrollbar to the left side of VT100 screen.
-This is the default, unless you have set the rightScrollBar resource.
+This is the default, unless you have set the \fBrightScrollBar\fR resource.
.TP 8
.BI \-lf " filename"
Specify the log filename.
This sets the \fBlogFile\fP resource.
-If set to \*(``-\*('',
+If set to \*(``\-\*('',
\fI\*n\fP writes its log to the standard output.
See the \fB\-l\fP option.
.TP 8
@@ -929,6 +929,10 @@ because \fI\*n\ \-ls\ \-e\fP does write a \fI/etc/wtmp\fP entry
(if configured to do so),
whereas \fI\*n\ \-e\fP does not.
.TP 8
+.B +ls
+This option indicates that the shell that is started should not be a login
+shell (i.e., it will be a normal \*(``subshell\*('').
+.TP 8
.B \-maximized
This option indicates that \fI\*n\fP should ask the window manager to
maximize its layout on startup.
@@ -941,10 +945,6 @@ it is possible to do both with certain window managers.
This option indicates that \fI\*n\fP should ask the window manager to
not maximize its layout on startup.
.TP 8
-.B +ls
-This option indicates that the shell that is started should not be a login
-shell (i.e., it will be a normal \*(``subshell\*('').
-.TP 8
.B \-mb
This option indicates that \fI\*n\fP should ring a margin bell when
the user types near the right end of a line.
@@ -996,6 +996,11 @@ This option enables the PC-style use of bold colors
.B +pc
This option disables the PC-style use of bold colors.
.TP 8
+.B \-pf \fIfont\fP
+This option specifies the font to be used for the pointer.
+The corresponding resource name is \fIpointerFont\fP.
+The resource value default is \fIcursor\fP.
+.TP 8
.B \-pob
This option indicates that the window should be raised whenever a
Control-G is received.
@@ -1233,7 +1238,7 @@ this option is ignored.
We recommend using
the \fB\-lc\fR option or the \*(``\fBlocale:\ true\fR\*('' resource
in UTF-8 locales when your operating system supports locale,
-or \fB\-en\ UTF-8\fP option or the \*(``\fBlocale:\ UTF-8\fR\*('' resource
+or \fB\-en\ UTF\-8\fP option or the \*(``\fBlocale:\ UTF\-8\fR\*('' resource
when your operating system does not support locale.
.TP 8
.B +u8
@@ -1498,6 +1503,27 @@ Abbreviated options also are supported, e.g.,
.
.SH RESOURCES
\fI\*N\fP understands all of the core X Toolkit resource names and classes.
+It also uses the X Toolkit resource types (such as
+booleans,
+colors,
+fonts,
+integers, and
+strings)
+along with their respective converters.
+Those resource types are not always sufficient:
+.bP
+\fI\*N\fP's resource values may be lists of names.
+X Toolkit resource types do not include lists.
+\fI\*N\fP uses a string for the resource, and parses it.
+.IP
+Comma-separated lists of names ignore case.
+.bP
+\fI\*N\fP may defer processing a resource until it is needed.
+For example, \fBfont2\fP through \fBfont7\fP are loaded as needed,
+to start faster.
+Again, the actual resource type is a string,
+parsed and used when needed.
+.PP
Application specific resources
(e.g., \*(``\fB__default_class__.\fP\fINAME\fP\*('') follow:
.SS Application Resources
@@ -1671,17 +1697,17 @@ mini.\*n_16x16,
mini.\*n_32x32,
mini.\*n_48x48
.bP
-filled-\*n_16x16,
-filled-\*n_32x32,
-filled-\*n_48x48
+filled\-\*n_16x16,
+filled\-\*n_32x32,
+filled\-\*n_48x48
.bP
\*n_16x16,
\*n_32x32,
\*n_48x48
.bP
-\*n-color_16x16,
-\*n-color_32x32,
-\*n-color_48x48
+\*n\-color_16x16,
+\*n\-color_32x32,
+\*n\-color_48x48
.RE
.IP
In either case, \fI\*n\fP allows for adding a \*(``_48x48\*('' to specify the
@@ -1757,11 +1783,6 @@ the fontsize used.
The default is
\*(``25\*(''.
.TP 8
-.B "messages\fP (class\fB Messages\fP)"
-Specifies whether write access to the terminal is allowed initially.
-See \fBmesg\fP(1).
-The default is \*(``true\*(''.
-.TP 8
.B "menuLocale\fP (class\fB MenuLocale\fP)"
Specify the locale used for character-set computations when loading
the popup menus.
@@ -1774,6 +1795,11 @@ To use the current locale
(only useful if you have localized the resource settings for the menu entries),
set the resource to an empty string.
.TP 8
+.B "messages\fP (class\fB Messages\fP)"
+Specifies whether write access to the terminal is allowed initially.
+See \fBmesg\fP(1).
+The default is \*(``true\*(''.
+.TP 8
.B "minBufSize\fP (class\fB MinBufSize\fP)"
Specify the minimum size of the input buffer, i.e., the amount of data
that \fI\*n\fR requests on each read.
@@ -1795,37 +1821,48 @@ assigns a key-binding to the \fBfullscreen()\fP action.
.TP
keypress
assigns keypresses by default to the
-\fBinsert-seven-bit()\fP and
-\fBinsert-eight-bit()\fP actions.
+\fBinsert\-seven\-bit()\fP and
+\fBinsert\-eight\-bit()\fP actions.
.TP
paging
assigns key bindings to the
-\fBscroll-back()\fP and
-\fBscroll-forw()\fP actions.
+\fBscroll\-back()\fP and
+\fBscroll\-forw()\fP actions.
+.TP
+pointer
+assigns pointer \fImotion\fP and \fIbutton\fP events to the
+\fBpointer\-motion()\fP and
+\fBpointer\-button()\fP actions respectively.
.TP
popup-menu
assigns mouse-buttons with the \fIcontrol\fP modifier to the popup-menus.
.TP
reset
assigns mouse-button 2
-with the \fImeta\fP modifier to the \fBclear-saved-lines\fP action.
+with the \fImeta\fP modifier to the \fBclear\-saved\-lines\fP action.
.TP
-scroll-lock
-assigns a key-binding to the \fBscroll-lock()\fP action.
+scroll\-lock
+assigns a key\-binding to the \fBscroll\-lock()\fP action.
.TP
select
assigns mouse- and keypress-combinations
to actions which manipulate the selection.
+.IP
+\fI\*N\fP also uses these actions to capture mouse button and motion
+events which can be manipulated with the mouse protocol control sequences.
+If the \fIselect\fP translations are omitted,
+then the \fBpointer\-motion\fP and \fBpointer\-button\fP handle
+these mouse protocol control sequences instead.
.TP
-shift-fonts
+shift\-fonts
assigns key-bindings to
-\fBlarger-vt-font()\fP and
-\fBsmaller-vt-font()\fP actions.
+\fBlarger\-vt\-font()\fP and
+\fBsmaller\-vt\-font()\fP actions.
.TP
-wheel-mouse
+wheel\-mouse
assigns buttons 4 and 5 with different modifiers to the
-\fBscroll-back()\fP and
-\fBscroll-forw()\fP actions.
+\fBscroll\-back()\fP and
+\fBscroll\-forw()\fP actions.
.RE
.TP 8
.B ptyHandshake\fP (class\fB PtyHandshake\fP)
@@ -2298,7 +2335,7 @@ The default is \*(``__alt_sends_esc__\*(''.
.TP 8
.B "alternateScroll\fP (class\fB ScrollCond\fP)"
If \*(``true\*('',
-the \fBscroll-back\fP and \fBscroll-forw\fP actions
+the \fBscroll\-back\fP and \fBscroll\-forw\fP actions
send cursor\-up and \-down keys
when \fI\*n\fP is displaying the alternate screen.
The default is \*(``false\*(''.
@@ -2456,7 +2493,7 @@ used for the bold attribute.
.IP
Note that \fI\*n\fP has one bold font which you may set explicitly.
\fI\*N\fP attempts to derive a bold font for the other font selections
-(\fBfont1\fP through \fBfont6\fP).
+(\fBfont1\fP through \fBfont7\fP).
If it cannot find a bold font, it will use the normal font.
In each case (whether the explicit resource or the derived font),
if the normal and bold fonts are distinct, this resource has no effect.
@@ -2621,7 +2658,7 @@ do not mask cell value to 7 bits.
.IP
With the default value (0),
\fI\*n\fP matches the behavior of DEC's terminals.
-To use all extensions, set all bits, \*(``-1\*('' for example.
+To use all extensions, set all bits, \*(``\-1\*('' for example.
.TP 8
.B "cjkWidth\fP (class\fB CjkWidth\fP)"
Specifies whether \fI\*n\fP should follow
@@ -2936,6 +2973,20 @@ current word forward.
If \*(``true\*('', the entire line is selected.
The default is \*(``true\*(''.
.TP 8
+.B "decGraphicsID\fP (class\fB DecGraphicsID\fP)"
+Allows a way to combine the graphics feature from certain DEC terminals
+(125, 240, 241, 330, 340 or 382) with other emulation levels which did
+not provide the graphics feature.
+As in \fBdecTerminalID\fP,
+leading non-digit characters are ignored,
+e.g., \*(``vt340\*('' and \*(``340\*('' are the same.
+.IP
+If the resource value is nonzero,
+\fI\*n\fP uses that emulation level when initializing the drawing region
+and decoding control sequences to draw graphics.
+.IP
+The default is \*(``0\*(''.
+.TP 8
.B "decTerminalID\fP (class\fB DecTerminalID\fP)"
Specifies the emulation level (100=VT100, 220=VT220, etc.), used to determine
the type of response to a DA control sequence.
@@ -3096,7 +3147,7 @@ The resource value is a comma-separated list of names.
\fI\*N\fP ignores capitalization.
The default value is
.NS
-BS,HT,DEL,ESC
+BS,DEL,ENT,EOT,ESC,NUL
.NE
.IP
The names are listed below:
@@ -3105,26 +3156,16 @@ The names are listed below:
C0
all ASCII control characters.
.TP 5
-BS
-ASCII backspace
-.TP 5
-CR
-ASCII carriage-return
+\fIIndividual C0 characters\fP
+NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, LF, VT,
+FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, FS,
+GS, RS, US
.TP 5
DEL
ASCII delete
.TP 5
-ESC
-ASCII escape
-.TP 5
-FF
-ASCII form-feed
-.TP 5
-HT
-ASCII tab
-.TP 5
NL
-ASCII line-feed, i.e., \*(``newline\*(''.
+ASCII line-feed, i.e., \*(``newline\*('' is the same as LF.
.RE
.TP 8
.B "disallowedTcapOps\fP (class\fB DisallowedTcapOps\fP)"
@@ -3154,7 +3195,7 @@ from \fIdtterm\fP the operation number).
The default value is
.NS
20,21,SetXprop,SetSelection
-(i.e.\& no operations are allowed).
+(i.e., all except a few \*(``dangerous\*('' operations are allowed).
.NE
.IP
The names are listed below.
@@ -3438,8 +3479,8 @@ font resources to obtain a TrueType pointsize.
If all of the \fBfaceSize\fP resources are set, then \fI\*n\fP
will use this information to determine the next smaller/larger
TrueType font for the
-\fBlarger-vt-font()\fP and
-\fBsmaller-vt-font()\fP actions.
+\fBlarger\-vt\-font()\fP and
+\fBsmaller\-vt\-font()\fP actions.
If any are not set, \fI\*n\fP will use only the areas of the bitmap fonts.
.TP 8
.B "faceSize1\fP (class\fB FaceSize1\fP)"
@@ -3460,6 +3501,13 @@ Specifies the pointsize of the fifth alternative font.
.B "faceSize6\fP (class\fB FaceSize6\fP)"
Specifies the pointsize of the sixth alternative font.
.TP 8
+.B "fastScroll\fP (class\fB FastScroll\fP)"
+Modifies the effect of jump scroll (\fBjumpScroll\fP)
+by suppressing screen refreshes
+for the special case when output to the screen has completely shifted
+the contents off-screen.
+For instance, \fIcat\fP'ing a large file to the screen does this.
+.TP 8
.B "font\fP (class\fB Font\fP)"
Specifies the name of the normal font.
The default is \*(``fixed\*(''.
@@ -3484,13 +3532,6 @@ xterm.vt100.utf8Fonts.font
.IP
which is probably not what you intended.
.TP 8
-.B "fastScroll\fP (class\fB FastScroll\fP)"
-Modifies the effect of jump scroll (\fBjumpScroll\fP)
-by suppressing screen refreshes
-for the special case when output to the screen has completely shifted
-the contents off-screen.
-For instance, \fIcat\fP'ing a large file to the screen does this.
-.TP 8
.B "font1\fP (class\fB Font1\fP)"
Specifies the name of the first alternative font,
corresponding to \*(``Unreadable\*('' in the standard menu.
@@ -3515,6 +3556,10 @@ corresponding to \*(``Large\*('' in the standard menu.
Specifies the name of the sixth alternative font,
corresponding to \*(``Huge\*('' in the standard menu.
.TP 8
+.B "font7\fP (class\fB Font7\fP)"
+Specifies the name of the seventh alternative font,
+corresponding to \*(``Enormous\*('' in the standard menu.
+.TP 8
.B "fontDoublesize\fP (class\fB FontDoublesize\fP)"
Specifies whether \fI\*n\fP should attempt to use font scaling to draw
double-sized characters.
@@ -3558,6 +3603,51 @@ and makes line-drawing characters directly as needed.
If \*(``true\*('', \fI\*n\fP assumes the font does not contain the
line-drawing characters, and draws them directly.
The default is \*(``false\*(''.
+.IP
+The VT100 line-drawing character set
+(also known as the \fIDEC Special Character and Line Drawing Set\fP)
+is shown in this table.
+It includes a few \fIspecial\fP characters which are not used for
+drawing lines:
+.TS
+l l l
+_ _ _
+l l l.
+\fICell\fR \fIUnicode\fR \fIDescription\fP
+0 U+25AE black vertical rectangle
+1 U+25C6 black diamond
+2 U+2592 medium shade
+3 U+2409 symbol for horizontal tabulation
+4 U+240C symbol for form feed
+5 U+240D symbol for carriage return
+6 U+240A symbol for line feed
+7 U+00B0 degree sign
+8 U+00B1 plus-minus sign
+9 U+2424 symbol for newline
+10 U+240B symbol for vertical tabulation
+11 U+2518 box drawings light up and left
+12 U+2510 box drawings light down and left
+13 U+250C box drawings light down and right
+14 U+2514 box drawings light up and right
+15 U+253C box drawings light vertical and horizontal
+16 U+23BA box drawings scan 1
+17 U+23BB box drawings scan 3
+18 U+2500 box drawings light horizontal
+19 U+23BC box drawings scan 7
+20 U+23BD box drawings scan 9
+21 U+251C box drawings light vertical and right
+22 U+2524 box drawings light vertical and left
+23 U+2534 box drawings light up and horizontal
+24 U+252C box drawings light down and horizontal
+25 U+2502 box drawings light vertical
+26 U+2264 less-than or equal to
+27 U+2265 greater-than or equal to
+28 U+03C0 greek small letter pi
+29 U+2260 not equal to
+30 U+00A3 pound sign
+31 U+00B7 middle dot
+_
+.TE
.TP 8
.B "forcePackedFont\fP (class\fB ForcePackedFont\fP)"
Specifies whether \fI\*n\fP should use the maximum or minimum glyph
@@ -3565,6 +3655,14 @@ width when displaying using a bitmap font.
Use the maximum width to help with proportional fonts.
The default is \*(``true\*('', denoting the minimum width.
.TP 8
+.B "forceXftHeight\fP (class\fB ForceXftHeight\fP)"
+Specifies whether \fI\*n\fP should use the given font metrics for
+TrueType fonts, or amend the ascent/descent to total no more than
+the given font-height.
+This optional feature is used to work around inconsistencies in
+FreeType's rounding computation.
+The default is \*(``false\*('', denoting the given metrics.
+.TP 8
.B "foreground\fP (class\fB Foreground\fP)"
Specifies the color to use for displaying text in the window.
Setting the
@@ -3741,7 +3839,7 @@ The default is \*(``nil2\*(''.
.TP 8
.B "initialFont\fP (class\fB InitialFont\fP)"
Specifies which of the VT100 fonts to use initially.
-Values are the same as for the \fBset-vt-font\fP action.
+Values are the same as for the \fBset\-vt\-font\fP action.
The default is \*(``d\*('', i.e., \*(``default\*(''.
.TP 8
.B "inputMethod\fP (class\fB InputMethod\fP)"
@@ -3785,9 +3883,6 @@ The value given is the same as the final character in the control sequences
which change character sets.
The default is \*(``B\*('', which corresponds to US ASCII.
.TP 8
-.B "\fIname\fP\fBKeymap\fP (class\fB \fIName\fP\fBKeymap\fP)"
-See the discussion of the \fBkeymap()\fP action.
-.TP 8
.B "limitFontsets\fP (class\fB LimitFontsets\fP)"
Limits the number of TrueType fallback fonts (i.e., fontset) which can be used.
The default is \*(``50\*(''.
@@ -3849,7 +3944,7 @@ For other encodings, \fI\*n\fR assumes that UTF-8 encoding is required.
or UTF-8 mode according to \fButf8\fR resource or \fB\-u8\fP option.
.RE
.IP
-Any other value, e.g., \*(``UTF-8\*('' or \*(``ISO8859-2\*('',
+Any other value, e.g., \*(``UTF\-8\*('' or \*(``ISO8859\-2\*('',
is assumed to be an encoding name;
\fIluit\fR will be invoked to support the encoding.
The actual list of supported encodings depends on \fIluit\fR.
@@ -3861,7 +3956,7 @@ Your configuration may not include this font,
or locale-support by \fI\*n\fP may not be needed.
.IP
At startup, \fI\*n\fP uses a mechanism equivalent to
-the \fBload-vt-fonts(utf8Fonts,\ Utf8Fonts)\fP action
+the \fBload\-vt\-fonts(utf8Fonts,\ Utf8Fonts)\fP action
to load font name subresources of the VT100 widget.
That is,
resource patterns such as \*(``\fB*vt100.utf8Fonts.font\fP\*('' will be loaded,
@@ -3877,7 +3972,7 @@ For instance, you could have this in your resource file:
.IP
When started with a UTF-8 locale, \fI\*n\fP would use 9x15, but
allow you to switch to the 12x24 font
-using the menu entry \*(``\fBUTF-8 Fonts\fP\*(''.
+using the menu entry \*(``\fBUTF\-8 Fonts\fP\*(''.
.IP
The resource files distributed with \fI\*n\fP use ISO-10646-1 fonts,
but do not rely on them unless you are using the locale mechanism.
@@ -3904,11 +3999,6 @@ When using a locale-filter, e.g., with the \fI\-e\fP option, or the shell,
If it fails, \fI\*n\fP will retry without the locale-filter.
\fI\*N\fP warns about the failure before retrying.
.TP 8
-.B "loginShell\fP (class\fB LoginShell\fP)"
-Specifies whether or not the shell to be run in the window should be started
-as a login shell.
-The default is \*(``false\*(''.
-.TP 8
.B "logFile\fP (class\fB Logfile\fP)"
Specify the name for \fI\*n\fP's log file.
If no name is specified, \fI\*n\fP will generate a name when
@@ -3928,6 +4018,11 @@ This resource is set/updated by the \fB\-l\fP option and the
menu entry \fBLog to File\fP.
The default is \*(``false\*(''.
.TP 8
+.B "loginShell\fP (class\fB LoginShell\fP)"
+Specifies whether or not the shell to be run in the window should be started
+as a login shell.
+The default is \*(``false\*(''.
+.TP 8
.B "marginBell\fP (class\fB MarginBell\fP)"
Specifies whether or not the bell should be rung when the user types near the
right margin.
@@ -3940,12 +4035,12 @@ this resource controls the maximum size of a graph which can be displayed.
The default is \*(``1000x1000\*('' (given as \fIwidth\fP by \fIheight\fP).
.IP
If the resource is \*(``auto\*('' then \fI\*n\fR will use the
-\fBdecTerminalID\fP resource:
+\fBdecGraphicsID\fP resource (or \fBdecTerminalID\fP if that is not set):
.TS
l l
_ _
r r.
-\fBResult\fR \fBdecTerminalID\fR
+\fBResult\fR \fBdecGraphicsID\fR
768x400 125
800x460 240
800x460 241
@@ -4156,6 +4251,7 @@ The Alt- and Meta- modifiers cause \fI\*n\fP to send escape sequences.
.RE
.IP
The \fI\*N\fP FAQ has an extended discussion of this feature, with examples:
+.sp
.RS
https://invisible\-island.net/xterm/modified\-keys.html
.RE
@@ -4174,6 +4270,9 @@ Specifies the number of characters from the right margin at which the margin
bell should be rung, when enabled by the \fBmarginBell\fP resource.
The default is \*(``10\*(''.
.TP 8
+.B "\fIname\fP\fBKeymap\fP (class\fB \fIName\fP\fBKeymap\fP)"
+See the discussion of the \fBkeymap()\fP action.
+.TP 8
.B "nextEventDelay\fP (class\fB NextEventDelay\fP)"
Specifies a delay time in milliseconds before checking for new X events.
The default is \*(``1\*(''.
@@ -4232,7 +4331,7 @@ but appear to have been invented for \fI\*n\fP in X11R4.
Specify selection behavior in response to multiple mouse clicks.
A single mouse click is always interpreted as described in
the \fBSelection Functions\fP section (see \fBPOINTER USAGE\fP).
-Multiple mouse clicks (using the button which activates the \fBselect-start\fP
+Multiple mouse clicks (using the button which activates the \fBselect\-start\fP
action) are interpreted according to the resource values of
\fBon2Clicks\fP, etc.
The resource value can be one of these:
@@ -4310,6 +4409,11 @@ Specifies the background color of the pointer.
The default is
\*(``XtDefaultBackground\*(''.
.TP 8
+.B "pointerFont\fP (class\fB PointerFont\fP)"
+Specifies the font to be used for the pointer.
+The shapes specified by \fBpointerShape\fP are glyphs in this font.
+The resource value default is \fIcursor\fP.
+.TP 8
.B "pointerMode\fP (class\fB PointerMode\fP)"
Specifies when the pointer may be hidden as the user types.
It will be redisplayed if the user moves the mouse,
@@ -4366,13 +4470,13 @@ but your printer may not handle these.
The default is \*(``1\*(''.
.TP 8
.B "printFileImmediate\fP (class \fBPrintFileImmediate\fP)"
-When the \fBprint-immediate\fP action is invoked,
+When the \fBprint\-immediate\fP action is invoked,
\fI\*n\fP prints the screen contents directly to a file.
Set this resource to the prefix of the filename
(a timestamp will be appended to the actual name).
.IP
The default is an empty string, i.e., \*(``\*('',
-However, when the \fBprint-immediate\fP action is invoked,
+However, when the \fBprint\-immediate\fP action is invoked,
if the string is empty, then \*(``__default_class__\*('' is used.
.TP 8
.B "printFileOnXError\fP (class \fBPrintFileOnXError\fP)"
@@ -4384,7 +4488,7 @@ To enable the feature, set this resource to the prefix of the filename
.IP
The default is an empty string, i.e., \*(``\*('',
which disables this feature.
-However, when the \fBprint-on-error\fP action is invoked,
+However, when the \fBprint\-on\-error\fP action is invoked,
if the string is empty, then \*(``XTermError\*('' is used.
.IP
These error codes are handled:
@@ -4393,7 +4497,7 @@ ERROR_XIOERROR and
ERROR_ICEERROR.
.TP 8
.B "printModeImmediate\fP (class \fBPrintModeImmediate\fP)"
-When the \fBprint-immediate\fP action is invoked,
+When the \fBprint\-immediate\fP action is invoked,
\fI\*n\fP prints the screen contents directly to a file.
You can use the \fBprintModeImmediate\fP resource to tell it to
use escape sequences to reconstruct the video attributes and colors.
@@ -4410,7 +4514,7 @@ The default is \*(``0\*(''.
.TP 8
.B "printOptsImmediate\fP (class \fBPrintOptsImmediate\fP)"
Specify the range of text which is printed to a file when
-the \fBprint-immediate\fP action is invoked.
+the \fBprint\-immediate\fP action is invoked.
.RS
.bP
If zero (0), then this selects the current (visible screen) plus the
@@ -4442,7 +4546,7 @@ plus saved lines, with no special case for the alternated screen.
.TP 8
.B "printOptsOnXError\fP (class \fBPrintOptsOnXError\fP)"
Specify the range of text which is printed to a file when
-the \fBprint-on-error\fP action is invoked.
+the \fBprint\-on\-error\fP action is invoked.
The resource value is interpreted the same as in \fBprintOptsImmediate\fP.
.IP
The default is \*(``9\*('', which selects the current visible screen
@@ -4528,12 +4632,15 @@ The application using ReGIS may use the \*(``A\*('' option of
the \*(``S\*('' command to adjust the coordinate space or change the
addressable portion of the screen.
.IP
-The default is \*(``1000x1000\*('' (given as \fIwidth\fP by \fIheight\fP).
-.IP
\fI\*N\fR accepts a special resource value \*(``auto\*('',
-which tells \fI\*n\fR to use the \fBdecTerminalID\fP resource to
+which tells \fI\*n\fR to use the
+\fBdecGraphicsID\fP and
+\fBdecTerminalID\fP
+resources to
set the default size based on the hardware terminal's limits.
Those limits are the same as for the \fBmaxGraphicSize\fP resource.
+.IP
+The default is \*(``auto\*(''.
.TP 8
.B "renderFont\fP (class\fB RenderFont\fP)"
If \fI\*n\fR is built with the Xft library,
@@ -4688,8 +4795,8 @@ The default is
\*(``false\*(''.
.TP 8
.B "scrollLines\fP (class\fB ScrollLines\fP)"
-Specifies the number of lines that the \fBscroll-back\fP and
-\fBscroll-forw\fP actions should use as a default.
+Specifies the number of lines that the \fBscroll\-back\fP and
+\fBscroll\-forw\fP actions should use as a default.
The default value is 1.
.TP 8
.B "scrollTtyOutput\fP (class\fB ScrollCond\fP)"
@@ -4700,15 +4807,85 @@ The default is \*(``true\*(''.
.B "selectToClipboard\fP (class\fB SelectToClipboard\fP)"
Tells \fI\*n\fP whether to use the \fBPRIMARY\fP or \fBCLIPBOARD\fP for
\fBSELECT\fP tokens in the selection mechanism.
-The \fBset-select\fP action can change this at runtime,
+The \fBset\-select\fP action can change this at runtime,
allowing the user to work with programs that handle only one of these
mechanisms.
The default is \*(``false\*('', which tells it to use \fBPRIMARY\fP.
.TP 8
+.B "shiftEscape\fP (class\fB ShiftEscape\fP)"
+\fI\*N\fP uses the \fBtranslations\fP resource to determine how
+to invoke actions for selecting and copying text using the
+pointer (e.g., a mouse).
+It also provides a mouse protocol which can be used by
+applications running in an xterm to detect mouse button clicks.
+.IP
+The mouse protocol causes \fI\*n\fP to send special escape sequences
+which allow an application to determine if \fImodifiers\fP
+(i.e., one or more of
+\fIshift\fP,
+\fIcontrol\fP,
+\fIalt\fP, and
+\fImeta\fP) were used.
+.IP
+\fI\*N\fP provides this mouse protocol by interpreting button-
+and motion-events in the functions which the \fBtranslations\fP resource
+calls for selecting and copying text:
+.RS
+.IP
+.nf
+\fBinsert-selection\fP
+\fBselect-end\fP
+\fBselect-extend\fP
+\fBselect-start\fP
+\fBstart-extend\fP
+.fi
+.RE
+.IP
+While the mouse protocol is active,
+\fI\*n\fP reserves most of the mouse button events
+for sending special escape sequences to the application.
+\fI\*N\fP normally allows you
+to use the \fIshift\fP-key
+to temporarily override this mouse protocol,
+permitting the selection and copying actions to be used.
+.IP
+The \fBshiftEscape\fP resource setting allows you
+to tell \fI\*n\fP whether to use
+the \fIshift\fP-key in this way (i.e., overriding the mouse protocol).
+\fI\*N\fP accepts either a keyword (ignoring case)
+or the number shown in parentheses:
+.RS
+.TP 3
+false (0)
+Mouse protocol does not send special escapes when \fIshift\fP-key is used.
+.TP 3
+true (1)
+Mouse protocol may send special escapes when \fIshift\fP-key is used.
+.IP
+At startup,
+\fI\*n\fP analyzes the \fBtranslations\fP to see which buttons are used
+in the (mouse) button-related bindings for selection and copying text.
+If the \fIshift\fP-key is not mentioned explicitly in a button's binding,
+\fI\*n\fP allows that button with \fIshift\fP-key for overriding the
+mouse protocol.
+.TP 3
+always (2)
+Mouse protocol can always send special escapes when \fIshift\fP-key is used.
+.TP 3
+never (3)
+Mouse protocol will never send special escapes when \fIshift\fP-key is used.
+.RE
+.IP
+\fI\*N\fP interprets a control sequence which can change this
+setting between
+\*(``true\*('' and
+\*(``false\*(''.
+The default is \*(``false\*(''.
+.TP 8
.B "shiftFonts\fP (class\fB ShiftFonts\fP)"
Specifies whether to enable the actions
-\fBlarger-vt-font()\fP and
-\fBsmaller-vt-font()\fP, which are normally bound to
+\fBlarger\-vt\-font()\fP and
+\fBsmaller\-vt\-font()\fP, which are normally bound to
the shifted KP_Add and KP_Subtract.
The default is \*(``true\*(''.
.TP 8
@@ -4883,7 +5060,7 @@ The default is \*(``true\*(''.
This specifies whether \fI\*n\fP will run in UTF-8 mode.
If you set this resource, \fI\*n\fP also sets the \fBwideChars\fP resource
as a side-effect.
-The resource can be set via the menu entry \*(``UTF-8 Encoding\*(''.
+The resource can be set via the menu entry \*(``UTF\-8 Encoding\*(''.
The default is \*(``default\*(''.
.IP
\fI\*N\fP accepts either a keyword (ignoring case)
@@ -4921,7 +5098,7 @@ See the discussion of the \fBlocale\fP resource.
This specifies whether \fI\*n\fP will use UTF-8 fonts specified via
resource patterns such as \*(``\fB*vt100.utf8Fonts.font\fP\*(''
or normal (ISO-8859-1) fonts via patterns such as \*(``\fB*vt100.font\fP\*(''.
-The resource can be set via the menu entry \*(``\fBUTF-8 Fonts\fP\*(''.
+The resource can be set via the menu entry \*(``\fBUTF\-8 Fonts\fP\*(''.
The default is \*(``default\*(''.
.IP
\fI\*N\fP accepts either a keyword (ignoring case)
@@ -5007,6 +5184,18 @@ according to the effective value of the \fButf8\fP resource.
.IP
The default is \*(``default\*(''.
.TP 8
+.B "utf8Weblike\fP (class\fB Utf8Weblike\fP)"
+Provide an alternate error-handling scheme for ill-formed UTF-8 as recommended
+in a W3C document.
+The Unicode standard does not require this for conformance.
+Some additional information can be found here:
+.sp
+.RS
+https://invisible\-island.net/xterm/bad\-utf8/
+.RE
+.IP
+The default is \*(``false\*(''.
+.TP 8
.B "veryBoldColors\fP (class\fB VeryBoldColors\fP)"
Specifies whether to combine video attributes with colors specified by
\fBcolorBD\fR,
@@ -5047,6 +5236,10 @@ which tells \fI\*n\fP to flash the entire screen.
.B "vt100Graphics\fP (class\fB VT100Graphics\fP)"
This specifies whether \fI\*n\fP will interpret VT100 graphic character
escape sequences while in UTF-8 mode.
+This feature also applies to code-pages (e.g., for VT320 and VT520)
+and National Replacement Character Sets (VT220 and up),
+but not US-ASCII (the initially selected character set),
+to avoid conflict with UTF-8.
The default is \*(``true\*('',
to provide support for various legacy applications.
.TP 8
@@ -5119,7 +5312,7 @@ Specifies the height of the Tektronix window in pixels.
.TP 8
.B "initialFont\fP (class\fB InitialFont\fP)"
Specifies which of the four Tektronix fonts to use initially.
-Values are the same as for the \fBset-tek-text\fP action.
+Values are the same as for the \fBset\-tek\-text\fP action.
The default is \*(``large\*(''.
.TP 8
.B "width\fP (class\fB Width\fP)"
@@ -5141,13 +5334,13 @@ The \fBMain Options\fP menu (widget name \fImainMenu\fP)
has the following entries:
.TP 8
.B "toolbar\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-toolbar(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-toolbar(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "securekbd\fP (class\fB SmeBSB\fP)"
This entry invokes the \fBsecure()\fP action.
.TP 8
.B "allowsends\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-send-events(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBallow\-send\-events(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "redraw\fP (class\fB SmeBSB\fP)"
This entry invokes the \fBredraw()\fP action.
@@ -5155,76 +5348,76 @@ This entry invokes the \fBredraw()\fP action.
.B "logging\fP (class\fB SmeBSB\fP)"
This entry invokes the \fBlogging(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "print-immediate\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBprint-immediate()\fP action.
+.B "print\-immediate\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBprint\-immediate()\fP action.
.TP 8
-.B "print-on-error\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBprint-on-error()\fP action.
+.B "print\-on\-error\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBprint\-on\-error()\fP action.
.TP 8
.B "print\fP (class\fB SmeBSB\fP)"
This entry invokes the \fBprint()\fP action.
.TP 8
-.B "print-redir\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBprint-redir()\fP action.
+.B "print\-redir\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBprint\-redir()\fP action.
.TP 8
-.B "dump-html\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBdump-html()\fP action.
+.B "dump\-html\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBdump\-html()\fP action.
.TP 8
-.B "dump-svg\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBdump-svg()\fP action.
+.B "dump\-svg\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBdump\-svg()\fP action.
.TP 8
-.B "8-bit-control\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-8-bit-control(\fP\fItoggle\fP\fB)\fP action.
+.B "8\-bit\-control\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-8\-bit\-control(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "backarrow\ key\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-backarrow(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-backarrow(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "num-lock\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-num-lock(\fP\fItoggle\fP\fB)\fP action.
+.B "num\-lock\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-num\-lock(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "alt-esc\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBalt-sends-escape(\fP\fItoggle\fP\fB)\fP action.
+.B "alt\-esc\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBalt\-sends\-escape(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "meta-esc\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBmeta-sends-escape(\fP\fItoggle\fP\fB)\fP action.
+.B "meta\-esc\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBmeta\-sends\-escape(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "delete-is-del\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBdelete-is-del(\fP\fItoggle\fP\fB)\fP action.
+.B "delete\-is\-del\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBdelete\-is\-del(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "oldFunctionKeys\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-old-function-keys(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-old\-function\-keys(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "hpFunctionKeys\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-hp-function-keys(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-hp\-function\-keys(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "scoFunctionKeys\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-sco-function-keys(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-sco\-function\-keys(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "sunFunctionKeys\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-sun-function-keys(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-sun\-function\-keys(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "sunKeyboard\fP (class\fB SmeBSB\fP)"
This entry invokes the \fBsunKeyboard(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "suspend\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsend-signal(\fP\fItstp\fP\fB)\fP action
+This entry invokes the \fBsend\-signal(\fP\fItstp\fP\fB)\fP action
on systems that support job control.
.TP 8
.B "continue\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsend-signal(\fP\fIcont\fP\fB)\fP action
+This entry invokes the \fBsend\-signal(\fP\fIcont\fP\fB)\fP action
on systems that support job control.
.TP 8
.B "interrupt\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsend-signal(\fP\fIint\fP\fB)\fP action.
+This entry invokes the \fBsend\-signal(\fP\fIint\fP\fB)\fP action.
.TP 8
.B "hangup\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsend-signal(\fP\fIhup\fP\fB)\fP action.
+This entry invokes the \fBsend\-signal(\fP\fIhup\fP\fB)\fP action.
.TP 8
.B "terminate\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsend-signal(\fP\fIterm\fP\fB)\fP action.
+This entry invokes the \fBsend\-signal(\fP\fIterm\fP\fB)\fP action.
.TP 8
.B "kill\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsend-signal(\fP\fIkill\fP\fB)\fP action.
+This entry invokes the \fBsend\-signal(\fP\fIkill\fP\fB)\fP action.
.TP 8
.B "quit\fP (class\fB SmeBSB\fP)"
This entry invokes the \fBquit()\fP action.
@@ -5234,62 +5427,62 @@ The \fBVT Options\fP menu (widget name \fIvtMenu\fP)
has the following entries:
.TP 8
.B "scrollbar\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-scrollbar(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-scrollbar(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "jumpscroll\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-jumpscroll(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-jumpscroll(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "reversevideo\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-reverse-video(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-reverse\-video(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "autowrap\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-autowrap(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-autowrap(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "reversewrap\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-reversewrap(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-reversewrap(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "autolinefeed\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-autolinefeed(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-autolinefeed(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "appcursor\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-appcursor(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-appcursor(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "appkeypad\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-appkeypad(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-appkeypad(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "scrollkey\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-scroll-on-key(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-scroll\-on\-key(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "scrollttyoutput\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-scroll-on-tty-output(\fP\fItoggle\fP\fB)\fP
+This entry invokes the \fBset\-scroll\-on\-tty\-output(\fP\fItoggle\fP\fB)\fP
action.
.TP 8
.B "allow132\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-allow132(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-allow132(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "cursesemul\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-cursesemul(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-cursesemul(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "keepSelection\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-keep-selection(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-keep\-selection(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "selectToClipboard\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-keep-clipboard(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-keep\-clipboard(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "visualbell\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-visual-bell(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-visual\-bell(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "bellIsUrgent\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-bellIsUrgent(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-bellIsUrgent(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "poponbell\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-pop-on-bell(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-pop\-on\-bell(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "cursorblink\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-cursorblink(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-cursorblink(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "titeInhibit\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-titeInhibit(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-titeInhibit(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "activeicon\fP (class\fB SmeBSB\fP)"
This entry toggles active icons on and off if this feature was
@@ -5299,166 +5492,181 @@ was started with the command line option +ai or the \fBactiveIcon\fP
resource is set to \*(``true\*(''.
.TP 8
.B "softreset\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBsoft-reset()\fP action.
+This entry invokes the \fBsoft\-reset()\fP action.
.TP 8
.B "hardreset\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBhard-reset()\fP action.
+This entry invokes the \fBhard\-reset()\fP action.
.TP 8
.B "clearsavedlines\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBclear-saved-lines()\fP action.
+This entry invokes the \fBclear\-saved\-lines()\fP action.
.TP 8
.B "tekshow\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-visibility(\fP\fItek,toggle\fP\fB)\fP action.
+This entry invokes the \fBset\-visibility(\fP\fItek,toggle\fP\fB)\fP action.
.TP 8
.B "tekmode\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-terminal-type(\fP\fItek\fP\fB)\fP action.
+This entry invokes the \fBset\-terminal\-type(\fP\fItek\fP\fB)\fP action.
.TP 8
.B "vthide\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-visibility(\fP\fIvt,off\fP\fB)\fP action.
+This entry invokes the \fBset\-visibility(\fP\fIvt,off\fP\fB)\fP action.
.TP 8
.B "altscreen\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-altscreen(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-altscreen(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "sixelScrolling\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-sixel-scrolling(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-sixel\-scrolling(\fP\fItoggle\fP\fB)\fP action.
.TP 8
.B "privateColorRegisters\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-private-colors(\fP\fItoggle\fP\fB)\fP action.
+This entry invokes the \fBset\-private\-colors(\fP\fItoggle\fP\fB)\fP action.
.
.PP
The \fBVT Fonts\fP menu (widget name \fIfontMenu\fP)
has the following entries:
.TP 8
.B "fontdefault\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fId\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fId\fP\fB)\fP action,
setting the font using the \fBfont\fP (default) resource,
e.g., \*(``Default\*('' in the menu.
.TP 8
.B "font1\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fI1\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fI1\fP\fB)\fP action,
setting the font using the \fBfont1\fP resource,
e.g., \*(``Unreadable\*('' in the menu.
.TP 8
.B "font2\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fI2\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fI2\fP\fB)\fP action,
setting the font using the \fBfont2\fP resource,
e.g., \*(``Tiny\*('' in the menu.
.TP 8
.B "font3\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fI3\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fI3\fP\fB)\fP action,
setting the font using the \fBfont3\fP resource,
e.g., \*(``Small\*('' in the menu.
.TP 8
.B "font4\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fI4\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fI4\fP\fB)\fP action,
letting the font using the \fBfont4\fP resource,
e.g., \*(``Medium\*('' in the menu.
.TP 8
.B "font5\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fI5\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fI5\fP\fB)\fP action,
letting the font using the \fBfont5\fP resource,
e.g., \*(``Large\*('' in the menu.
.TP 8
.B "font6\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fI6\fP\fB)\fP action,
+This entry invokes the \fBset\-vt\-font(\fP\fI6\fP\fB)\fP action,
letting the font using the \fBfont6\fP resource,
e.g., \*(``Huge\*('' in the menu.
.TP 8
+.B "font7\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-vt\-font(\fP\fI7\fP\fB)\fP action,
+letting the font using the \fBfont7\fP resource,
+e.g., \*(``Enormous\*('' in the menu.
+.TP 8
.B "fontescape\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fIe\fP\fB)\fP action.
+This entry invokes the \fBset\-vt\-font(\fP\fIe\fP\fB)\fP action.
.TP 8
.B "fontsel\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-vt-font(\fP\fIs\fP\fB)\fP action.
+This entry invokes the \fBset\-vt\-font(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "allow-bold-fonts\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-bold-fonts(\fP\fItoggle\fP\fB)\fP action.
+.B "allow\-bold\-fonts\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBallow\-bold\-fonts(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "font-linedrawing\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-font-linedrawing(\fP\fIs\fP\fB)\fP action.
+.B "font\-linedrawing\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-font\-linedrawing(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "font-packed\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-font-packed(\fP\fIs\fP\fB)\fP action.
+.B "font\-packed\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-font\-packed(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "font-doublesize\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-font-doublesize(\fP\fIs\fP\fB)\fP action.
+.B "font\-doublesize\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-font\-doublesize(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "render-font\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-render-font(\fP\fIs\fP\fB)\fP action.
+.B "render\-font\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-render\-font(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "utf8-fonts\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-utf8-fonts(\fP\fIs\fP\fB)\fP action.
+.B "utf8\-fonts\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-utf8\-fonts(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "utf8-mode\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-utf8-mode(\fP\fIs\fP\fB)\fP action.
+.B "utf8\-mode\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-utf8\-mode(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "utf8-title\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-utf8-title(\fP\fIs\fP\fB)\fP action.
+.B "utf8\-title\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBset\-utf8\-title(\fP\fIs\fP\fB)\fP action.
.TP 8
-.B "allow-color-ops\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-color-ops(\fP\fItoggle\fP\fB)\fP action.
+.B "allow\-color\-ops\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBallow\-color\-ops(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "allow-font-ops\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-fonts-ops(\fP\fItoggle\fP\fB)\fP action.
+.B "allow\-font\-ops\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBallow\-fonts\-ops(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "allow-tcap-ops\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-tcap-ops(\fP\fItoggle\fP\fB)\fP action.
+.B "allow\-tcap\-ops\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBallow\-tcap\-ops(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "allow-title-ops\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-title-ops(\fP\fItoggle\fP\fB)\fP action.
+.B "allow\-title\-ops\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBallow\-title\-ops(\fP\fItoggle\fP\fB)\fP action.
.TP 8
-.B "allow-window-ops\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBallow-window-ops(\fP\fItoggle\fP\fB)\fP action.
+.B "allow\-window\-ops\fP (class\fB SmeBSB\fP)"
+This entry invokes the \fBallow\-window\-ops(\fP\fItoggle\fP\fB)\fP action.
.
.PP
The \fBTek Options\fP menu (widget name \fItekMenu\fP)
has the following entries:
.TP 8
.B "tektextlarge\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-tek-text(\fP\fIlarge\fP\fB)\fP action.
+This entry invokes the \fBset\-tek\-text(\fP\fIlarge\fP\fB)\fP action.
.TP 8
.B "tektext2\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-tek-text(\fP\fI2\fP\fB)\fP action.
+This entry invokes the \fBset\-tek\-text(\fP\fI2\fP\fB)\fP action.
.TP 8
.B "tektext3\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-tek-text(\fP\fI3\fP\fB)\fP action.
+This entry invokes the \fBset\-tek\-text(\fP\fI3\fP\fB)\fP action.
.TP 8
.B "tektextsmall\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-tek-text(\fP\fIsmall\fP\fB)\fP action.
+This entry invokes the \fBset\-tek\-text(\fP\fIsmall\fP\fB)\fP action.
.TP 8
.B "tekpage\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBtek-page()\fP action.
+This entry invokes the \fBtek\-page()\fP action.
.TP 8
.B "tekreset\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBtek-reset()\fP action.
+This entry invokes the \fBtek\-reset()\fP action.
.TP 8
.B "tekcopy\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBtek-copy()\fP action.
+This entry invokes the \fBtek\-copy()\fP action.
.TP 8
.B "vtshow\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-visibility(\fP\fIvt,toggle\fP\fB)\fP action.
+This entry invokes the \fBset\-visibility(\fP\fIvt,toggle\fP\fB)\fP action.
.TP 8
.B "vtmode\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-terminal-type(\fP\fIvt\fP\fB)\fP action.
+This entry invokes the \fBset\-terminal\-type(\fP\fIvt\fP\fB)\fP action.
.TP 8
.B "tekhide\fP (class\fB SmeBSB\fP)"
-This entry invokes the \fBset-visibility(\fP\fItek,toggle\fP\fB)\fP action.
+This entry invokes the \fBset\-visibility(\fP\fItek,toggle\fP\fB)\fP action.
.\"
.SS Scrollbar Resources
.PP
The following resources are useful when specified for the Athena Scrollbar
widget:
.TP 8
-.B "thickness\fP (class\fB Thickness\fP)"
-Specifies the width in pixels of the scrollbar.
-.TP 8
.B "background\fP (class\fB Background\fP)"
Specifies the color to use for the background of the scrollbar.
.TP 8
.B "foreground\fP (class\fB Foreground\fP)"
Specifies the color to use for the foreground of the scrollbar.
-The \*(``thumb\*(''
-of the scrollbar is a simple checkerboard pattern alternating pixels for
+.TP 8
+.B "thickness\fP (class\fB Thickness\fP)"
+Specifies the width in pixels of the scrollbar (default: 14).
+.IP
+This may be overridden by the \fBwidth\fP resource.
+.TP 8
+.B "thumb\fP (class\fB Thumb\fP)"
+The default \*(``thumb\*('' pixmap used for
+the scrollbar is a simple checkerboard pattern alternating pixels for
foreground and background color.
+.TP 8
+.B "width\fP (class\fB Width\fP)"
+Specifies the width in pixels of the scrollbar (default: 0).
+.IP
+The widget checks the \fIwidth\fP resource first,
+using the \fIthickness\fP value if the \fIwidth\fP is zero.
.
.
.SH "POINTER USAGE"
@@ -5488,8 +5696,25 @@ for the built-in set of \fBtranslations\fP resources.
.
.SS "Selection Functions"
.PP
-The selection functions are invoked when the pointer buttons are used with no
-modifiers, and when they are used with the \*(``shift\*('' key.
+By default,
+the selection functions are invoked
+when the pointer buttons are used with no modifiers,
+and when they are used with the \*(``shift\*('' key.
+The \*(``shift\*('' key is special,
+because \fI\*n\fP uses that to ensure that selection functions
+are still available when it is programmed to send escape sequences
+in one of the mouse modes
+(see \fIXterm Control Sequences\fP,
+as well as the resource \fBdisallowedMouseOps\fP).
+.PP
+At startup, \fI\*n\fP inspects the \fBtranslations\fP resource to
+see which pointer buttons may be used in this way,
+and remembers these buttons when deciding whether to send
+escape sequences or perform selection
+when those buttons are used with the \*(``shift\*('' modifier.
+Other pointer buttons, e.g., typically those sent for wheel mouse events,
+are not affected.
+.PP
The assignment of the functions described below to keys and buttons may
be changed through the resource database; see \fBActions\fP below.
.
@@ -5780,7 +6005,7 @@ whereas applications can change the mouse prototol
.PP
However, the mouse protocol is interpreted within the \fIactions\fP
that are usually associated with the pointer buttons.
-\fI\*N\fP ignores the mouse protocol in the \fBinsert-selection\fP action
+\fI\*N\fP ignores the mouse protocol in the \fBinsert\-selection\fP action
if the shift-key is pressed at the same time.
It also modifies a few other actions if the shift-key is pressed,
e.g., suppressing the response with the pointer position,
@@ -5846,8 +6071,8 @@ Commands for capturing output:
Captures text sent to the screen in a log file,
as in the \fB\-l\fP logging option.
.TP
-.B Print-All Immediately\fP (resource \fBprint-immediate\fP)
-Invokes the \fBprint-immediate\fP action,
+.B Print-All Immediately\fP (resource \fBprint\-immediate\fP)
+Invokes the \fBprint\-immediate\fP action,
sending the text of the current window directly to a file,
as specified by the
\fBprintFileImmediate\fP,
@@ -5855,8 +6080,8 @@ as specified by the
\fBprintOptsImmediate\fP
resources.
.TP
-.B Print-All on Error\fP (resource \fBprint-on-error\fP)
-Invokes the \fBprint-on-error\fP action,
+.B Print-All on Error\fP (resource \fBprint\-on\-error\fP)
+Invokes the \fBprint\-on\-error\fP action,
which toggles a flag telling \fI\*n\fP that if it exits with an X error,
to send the text of the current window directly to a file,
as specified by the
@@ -5869,16 +6094,16 @@ resources.
Sends the text of the current window to the program given in the
\fBprinterCommand\fP resource.
.TP
-.B Redirect to Printer\fP (resource \fBprint-redir\fP)
+.B Redirect to Printer\fP (resource \fBprint\-redir\fP)
This sets the \fBprinterControlMode\fR to 0 or 2.
You can use this to turn the printer on as if an application had sent
the appropriate control sequence.
It is also useful for switching the printer
off if an application turns it on without resetting the print control mode.
.TP
-.B XHTML Screen Dump\fP (resource \fBdump-html\fP)
+.B XHTML Screen Dump\fP (resource \fBdump\-html\fP)
Available only when compiled with screen dump support.
-Invokes the \fBdump-html\fP action.
+Invokes the \fBdump\-html\fP action.
This creates an XHTML file matching the contents of the current screen,
including the border, internal border, colors and most attributes: bold, italic,
underline, faint, strikeout, reverse; blink is rendered as white-on-red;
@@ -5936,7 +6161,7 @@ when the screen dump was performed
(the file is created in the directory
\fI\*n\fP is started in, or the home directory for a login \fI\*n\fP).
.IP
-The \fBdump-html\fP action can also be triggered using the Media Copy
+The \fBdump\-html\fP action can also be triggered using the Media Copy
control sequence CSI 1 0 i, for example from a shell script with
.NS
printf \*(AQ\\033[10i\*(AQ
@@ -5944,9 +6169,9 @@ printf \*(AQ\\033[10i\*(AQ
.sp
Only the UTF-8 encoding is supported.
.TP
-.B SVG Screen Dump\fP (resource \fBdump-svg\fP)
+.B SVG Screen Dump\fP (resource \fBdump\-svg\fP)
Available only when compiled with screen dump support.
-Invokes the \fBdump-svg\fP action.
+Invokes the \fBdump\-svg\fP action.
This creates a Scalable Vector Graphics (SVG) file matching
the contents of the current screen, including the border,
internal border, colors and most attributes: bold, italic,
@@ -5974,7 +6199,7 @@ when the screen dump was performed
(the file is created in the directory
\fI\*n\fP is started in, or the home directory for a login \fI\*n\fP).
.IP
-The \fBdump-svg\fP action can also be triggered using the Media Copy
+The \fBdump\-svg\fP action can also be triggered using the Media Copy
control sequence CSI 1 1 i, for example from a shell script with
.NS
printf \*(AQ\\033[11i\*(AQ
@@ -5986,7 +6211,7 @@ Only the UTF-8 encoding is supported.
Modes for setting keyboard style:
.RS
.TP
-.B 8-Bit Controls\fP (resource \fB8-bit-control\fP)
+.B 8-Bit Controls\fP (resource \fB8\-bit\-control\fP)
Enabled for VT220 emulation, this controls whether \fI\*n\fP will send
8-bit control sequences rather than using 7-bit (ASCII) controls,
e.g., sending a byte in the range 128\(en159 rather than the escape character
@@ -6001,16 +6226,16 @@ either a backspace (8)
or delete (127) character.
This corresponds to the \fBbackarrowKey\fP resource.
.TP
-.B Alt/NumLock Modifiers\fP (resource \fBnum-lock\fP)
+.B Alt/NumLock Modifiers\fP (resource \fBnum\-lock\fP)
Controls the treatment of Alt- and NumLock-key modifiers.
This corresponds to the \fBnumLock\fP resource.
.TP
-.B Meta Sends Escape\fP (resource \fBmeta-esc\fP)
+.B Meta Sends Escape\fP (resource \fBmeta\-esc\fP)
Controls whether \fIMeta\fP keys are converted into a two-character
sequence with the character itself preceded by ESC.
This corresponds to the \fBmetaSendsEscape\fP resource.
.TP
-.B Delete is DEL\fP (resource \fBdelete-is-del\fP)
+.B Delete is DEL\fP (resource \fBdelete\-is\-del\fP)
Controls whether the Delete key on the editing keypad should send DEL (127)
or the VT220-style Remove escape sequence.
This corresponds to the \fBdeleteIsDEL\fP resource.
@@ -6054,7 +6279,7 @@ function is especially useful if the user has accidentally typed CTRL-Z,
suspending the process.
.TP
.B Quit\fP (resource \fBquit\fP)
-Stop processing X events except to support the \fB-hold\fP option,
+Stop processing X events except to support the \fB\-hold\fP option,
and then send a SIGHUP signal to
the process group of the process running under \fI\*n\fP (usually the shell).
.RE
@@ -6352,6 +6577,9 @@ Set the font to that given by the \fB*VT100.font5\fP resource.
.B Huge\fP (resource \fBfont6\fP)
Set the font to that given by the \fB*VT100.font6\fP resource.
.TP
+.B Enormous\fP (resource \fBfont7\fP)
+Set the font to that given by the \fB*VT100.font7\fP resource.
+.TP
.B Escape Sequence\fP (resource \fBfontescape\fP)
This allows you to set the font last specified by the Set
Font escape sequence (see \fI\*N Control Sequences\fP).
@@ -6364,23 +6592,23 @@ the current selection as a font name (if the \fBPRIMARY\fP selection is owned).
The second section allows you to modify the way it is displayed:
.RS
.TP
-.B Bold Fonts\fP (resource \fBallow-bold-fonts\fP)
+.B Bold Fonts\fP (resource \fBallow\-bold\-fonts\fP)
This is normally checked (enabled).
When unchecked, \fI\*n\fP will not use bold fonts.
The setting corresponds to the \fBallowBoldFonts\fP resource.
.TP
-.B Line-Drawing Characters\fP (resource \fBfont-linedrawing\fP)
+.B Line-Drawing Characters\fP (resource \fBfont\-linedrawing\fP)
When set, tells \fI\*n\fP to draw its own line-drawing characters.
Otherwise it relies on the font containing these.
Compare to the \fBforceBoxChars\fP resource.
.TP
-.B Packed Font\fP (resource \fBfont-packed\fP)
+.B Packed Font\fP (resource \fBfont\-packed\fP)
When set, tells \fI\*n\fP to use the minimum glyph-width from a font
when displaying characters.
Use the maximum width (unchecked) to help display proportional fonts.
Compare to the \fBforcePackedFont\fP resource.
.TP
-.B Doublesized Characters\fP (resource \fBfont-doublesize\fP)
+.B Doublesized Characters\fP (resource \fBfont\-doublesize\fP)
When set, \fI\*n\fP may ask the font server to produce scaled versions
of the normal font, for VT102 double-size characters.
.RE
@@ -6388,25 +6616,25 @@ of the normal font, for VT102 double-size characters.
The third section allows you to modify the way it is specified:
.RS
.TP
-.B TrueType Fonts\fP (resource \fBrender-font\fP)
+.B TrueType Fonts\fP (resource \fBrender\-font\fP)
If the \fBrenderFont\fP and corresponding resources were set,
this is a further control whether \fI\*n\fP will actually use the
Xft library calls to obtain a font.
.TP
-.B UTF-8 Encoding\fP (resource \fButf8-mode\fP)
+.B UTF-8 Encoding\fP (resource \fButf8\-mode\fP)
This controls whether \fI\*n\fP uses UTF-8 encoding of input/output.
It is useful for temporarily switching \fI\*n\fP to display
text from an application which does not follow the locale settings.
It corresponds to the \fButf8\fP resource.
.TP
-.B UTF-8 Fonts\fP (resource \fButf8-fonts\fP)
+.B UTF-8 Fonts\fP (resource \fButf8\-fonts\fP)
This controls whether \fI\*n\fP uses UTF-8 fonts for display.
It is useful for temporarily switching \fI\*n\fP to display
text from an application which does not follow the locale settings.
It combines the \fButf8\fP and \fButf8Fonts\fP resources,
subject to the \fBlocale\fP resource.
.TP
-.B UTF-8 Titles\fP (resource \fButf8-title\fP)
+.B UTF-8 Titles\fP (resource \fButf8\-title\fP)
This controls whether \fI\*n\fP accepts UTF-8 encoding for
title control sequences.
It corresponds to the \fButf8Fonts\fP resource.
@@ -6433,29 +6661,29 @@ which can be controlled by writing escape sequences to the terminal.
These are disabled if the SendEvents feature is enabled:
.RS
.TP
-.B Allow Color Ops\fP (resource \fBallow-font-ops\fP)
+.B Allow Color Ops\fP (resource \fBallow\-font\-ops\fP)
This corresponds to the \fBallowColorOps\fP resource.
Enable or disable control sequences that set/query the colors.
.TP
-.B Allow Font Ops\fP (resource \fBallow-font-ops\fP)
+.B Allow Font Ops\fP (resource \fBallow\-font\-ops\fP)
This corresponds to the \fBallowFontOps\fP resource.
Enable or disable control sequences that set/query the font.
.TP
-.B Allow Mouse Ops\fP (resource \fBallow-mouse-ops\fP)
+.B Allow Mouse Ops\fP (resource \fBallow\-mouse\-ops\fP)
Enable or disable control sequences that cause the terminal to
send escape sequences on pointer-clicks and movement.
This corresponds to the \fBallowMouseOps\fP resource.
.TP
-.B Allow Tcap Ops\fP (resource \fBallow-tcap-ops\fP)
+.B Allow Tcap Ops\fP (resource \fBallow\-tcap\-ops\fP)
Enable or disable control sequences that query the terminal's
notion of its function-key strings, as termcap or terminfo capabilities.
This corresponds to the \fBallowTcapOps\fP resource.
.TP
-.B Allow Title Ops\fP (resource \fBallow-title-ops\fP)
+.B Allow Title Ops\fP (resource \fBallow\-title\-ops\fP)
Enable or disable control sequences that modify the window title or icon name.
This corresponds to the \fBallowTitleOps\fP resource.
.TP
-.B Allow Window Ops\fP (resource \fBallow-window-ops\fP)
+.B Allow Window Ops\fP (resource \fBallow\-window\-ops\fP)
Enable or disable extended window control sequences (as used in dtterm).
This corresponds to the \fBallowWindowOps\fP resource.
.RE
@@ -6716,68 +6944,68 @@ The following
actions are provided for use within the \fIvt100\fP or \fItek4014\fP
\fBtranslations\fP resources:
.TP 8
-.B "allow-bold-fonts(\fIon/off/toggle\fP)"
+.B "allow\-bold\-fonts(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowBoldFonts\fP resource
-and is also invoked by the \fBallow-bold-fonts\fP entry in \fIfontMenu\fP.
+and is also invoked by the \fBallow\-bold\-fonts\fP entry in \fIfontMenu\fP.
.TP 8
-.B "allow-color-ops(\fIon/off/toggle\fP)"
+.B "allow\-color\-ops(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowColorOps\fP resource and is also
-invoked by the \fBallow-color-ops\fP entry in \fIfontMenu\fP.
+invoked by the \fBallow\-color\-ops\fP entry in \fIfontMenu\fP.
.TP 8
-.B "allow-font-ops(\fIon/off/toggle\fP)"
+.B "allow\-font\-ops(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowFontOps\fP resource and is also
-invoked by the \fBallow-font-ops\fP entry in \fIfontMenu\fP.
+invoked by the \fBallow\-font\-ops\fP entry in \fIfontMenu\fP.
.TP 8
-.B "allow-mouse-ops(\fIon/off/toggle\fP)"
+.B "allow\-mouse\-ops(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowMousepOps\fP resource
-and is also invoked by the \fBallow-mouse-ops\fP entry in \fIfontMenu\fP.
+and is also invoked by the \fBallow\-mouse\-ops\fP entry in \fIfontMenu\fP.
.TP 8
-.B "allow-send-events(\fIon/off/toggle\fP)"
+.B "allow\-send\-events(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowSendEvents\fP resource
and is also invoked by the \fBallowsends\fP entry in \fImainMenu\fP.
.TP 8
-.B "allow-tcap-ops(\fIon/off/toggle\fP)"
+.B "allow\-tcap\-ops(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowTcapOps\fP resource
-and is also invoked by the \fBallow-tcap-ops\fP entry in \fIfontMenu\fP.
+and is also invoked by the \fBallow\-tcap\-ops\fP entry in \fIfontMenu\fP.
.TP 8
-.B "allow-title-ops(\fIon/off/toggle\fP)"
+.B "allow\-title\-ops(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowTitleOps\fP resource
-and is also invoked by the \fBallow-title-ops\fP entry in \fIfontMenu\fP.
+and is also invoked by the \fBallow\-title\-ops\fP entry in \fIfontMenu\fP.
.TP 8
-.B "allow-window-ops(\fIon/off/toggle\fP)"
+.B "allow\-window\-ops(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBallowWindowOps\fP resource
-and is also invoked by the \fBallow-window-ops\fP entry in \fIfontMenu\fP.
+and is also invoked by the \fBallow\-window\-ops\fP entry in \fIfontMenu\fP.
.TP 8
-.B "alt-sends-escape()"
+.B "alt\-sends\-escape()"
This action toggles the state of the \fBaltSendsEscape\fP resource.
.TP 8
.B "bell([\fIpercent\fP])"
This action rings the keyboard bell at the specified percentage
above or below the base volume.
.TP 8
-.B "clear-saved-lines()"
-This action does \fBhard-reset()\fP and also clears the history
+.B "clear\-saved\-lines()"
+This action does \fBhard\-reset()\fP and also clears the history
of lines saved off the top of the screen.
It is also invoked from the \fBclearsavedlines\fP entry in \fIvtMenu\fP.
The effect is identical to a hardware reset (RIS) control sequence.
.TP 8
-.B "copy-selection(\fIdestname\fP [, \&...\&])"
+.B "copy\-selection(\fIdestname\fP [, \&...\&])"
This action puts the currently selected text into all of the selections or
cutbuffers specified by \fIdestname\fP.
-Unlike \fBselect-end\fP, it does not send a mouse position or otherwise
+Unlike \fBselect\-end\fP, it does not send a mouse position or otherwise
modify the internal selection state.
.TP 8
-.B "create-menu(\fIm/v/f/t\fP)"
+.B "create\-menu(\fIm/v/f/t\fP)"
This action creates one of the menus used by \fI\*n\fP,
if it has not been previously created.
The parameter values are the menu names:
\fImainMenu\fP, \fIvtMenu\fP, \fIfontMenu\fP, \fItekMenu\fP, respectively.
.TP 8
-.B "dabbrev-expand()"
+.B "dabbrev\-expand()"
Expands the word before cursor by searching in the preceding text on the
screen and in the scrollback buffer for words starting with that
abbreviation.
-Repeating \fBdabbrev-expand()\fP several times in sequence searches for an
+Repeating \fBdabbrev\-expand()\fP several times in sequence searches for an
alternative expansion by looking farther back.
Lack of more matches is signaled by a bell.
Attempts to expand an empty word
@@ -6796,10 +7024,10 @@ Here is a resource setting for \fI\*n\fP which will do the same thing:
.B "deiconify()"
Changes the window state back to normal, if it was iconified.
.TP 8
-.B "delete-is-del()"
+.B "delete\-is\-del()"
This action toggles the state of the \fBdeleteIsDEL\fP resource.
.TP 8
-.B "dired-button()"
+.B "dired\-button()"
Handles a button event (other than press and release)
by echoing the event's position
(i.e., character line and column) in the following format:
@@ -6807,17 +7035,18 @@ by echoing the event's position
^X ESC G <line+\*(`` \*(''> <col+\*(`` \*(''>
.NE
.TP 8
-.B "dump-html()"
+.B "dump\-html()"
Invokes the \fBXHTML Screen Dump\fP feature.
.TP 8
-.B "dump-svg()"
+.B "dump\-svg()"
Invokes the \fBSVG Screen Dump\fP feature.
.TP 8
-.B "exec-formatted(\fIformat\fP, \fIsourcename\fP [, \&...\&])"
+.B "exec\-formatted(\fIformat\fP, \fIsourcename\fP [, \&...\&])"
Execute an external command,
using the current selection for part of the command's parameters.
The first parameter, \fIformat\fP gives the basic command.
-Succeeding parameters specify the selection source as in \fBinsert-selection\fP.
+Succeeding parameters specify the selection source
+as in \fBinsert\-selection\fP.
.IP
The \fIformat\fP parameter allows these substitutions:
.RS
@@ -6875,11 +7104,11 @@ The new process is started when the mouse button is released:
<Btn1Up>:\fBexec\-formatted\fP("xterm \-e view \*(AQ%t\*(AQ", \fBSELECT\fP)
.NE
.TP 8
-.B "exec-selectable(\fIformat\fP, \fIonClicks\fP)"
+.B "exec\-selectable(\fIformat\fP, \fIonClicks\fP)"
Execute an external command,
using data copied from the screen for part of the command's parameters.
The first parameter, \fIformat\fP gives
-the basic command as in \fBexec-formatted\fP.
+the basic command as in \fBexec\-formatted\fP.
The second parameter specifies the method for copying
the data as in the \fBon2Clicks\fP resource.
.TP 8
@@ -6889,7 +7118,7 @@ This action sets, unsets or toggles the \fBfullscreen\fP resource.
.B "iconify()"
Iconifies the window.
.TP 8
-.B "hard-reset()"
+.B "hard\-reset()"
This action resets the scrolling region, tabs, window size, and cursor keys
and clears the screen.
It is also invoked from the \fBhardreset\fP
@@ -6903,7 +7132,7 @@ escape sequences.
This action inserts the character or string associated with
the key that was pressed.
.TP 8
-.B "insert-eight-bit()"
+.B "insert\-eight\-bit()"
This action inserts an eight-bit (Meta) version of the character or string
associated with the key that was pressed.
Only single-byte values are treated specially.
@@ -6929,20 +7158,21 @@ send an ESC byte before the key, or
send the key unaltered.
.RE
.TP 8
-.B "insert-formatted(\fIformat\fP, \fIsourcename\fP [, \&...\&])"
+.B "insert\-formatted(\fIformat\fP, \fIsourcename\fP [, \&...\&])"
Insert the current selection or data related to it, formatted.
The first parameter, \fIformat\fP gives the template for the data
-as in \fBexec-formatted\fP.
-Succeeding parameters specify the selection source as in \fBinsert-selection\fP.
+as in \fBexec\-formatted\fP.
+Succeeding parameters specify the selection source
+as in \fBinsert\-selection\fP.
.TP 8
-.B "insert-selectable(\fIformat\fP, \fIonClicks\fP)"
+.B "insert\-selectable(\fIformat\fP, \fIonClicks\fP)"
Insert data copied from the screen, formatted.
The first parameter, \fIformat\fP gives the template for the data
-as in \fBexec-formatted\fP.
+as in \fBexec\-formatted\fP.
The second parameter specifies the method for copying
the data as in the \fBon2Clicks\fP resource.
.TP 8
-.B "insert-selection(\fIsourcename\fP [, \&...\&])"
+.B "insert\-selection(\fIsourcename\fP [, \&...\&])"
This action inserts the string found in the selection or cutbuffer indicated
by \fIsourcename\fP.
Sources are checked in the order given (case is
@@ -6952,11 +7182,11 @@ Commonly-used selections include:
Cut buffers are
typically named \fBCUT_BUFFER0\fP through \fBCUT_BUFFER7\fP.
.TP 8
-.B "insert-seven-bit()"
+.B "insert\-seven\-bit()"
This action is a synonym for \fBinsert()\fP.
The term \*(``seven-bit\*('' is misleading:
it only implies that \fI\*n\fP does not try to add 128 to the key's value
-as in \fBinsert-eight-bit()\fP.
+as in \fBinsert\-eight\-bit()\fP.
.TP 8
.B "interpret(\fIcontrol-sequence\fP)"
Interpret the given control sequence locally, i.e., without passing it to
@@ -6973,17 +7203,17 @@ name is \fIname\fP with the suffix \*(``\fIKeymap\fP\*(''
(i.e., \fIname\fP\fBKeymap\fP, where case is significant).
The name \fINone\fP restores the original translation table.
.TP 8
-.B "larger-vt-font()"
+.B "larger\-vt\-font()"
Set the font to the next larger one, based on the font dimensions.
-See also \fBset-vt-font()\fP.
+See also \fBset\-vt\-font()\fP.
.TP 8
-.B "load-vt-fonts(\fIname\fP[,\fIclass\fP])"
+.B "load\-vt\-fonts(\fIname\fP[,\fIclass\fP])"
Load fontnames from the given subresource name and class.
That is, load the \*(``*VT100.\fIname\fP.font\*('',
resource as \*(``*VT100.font\*('' etc.
If no name is given, the original set of fontnames is restored.
.IP
-Unlike \fBset-vt-font()\fR, this does not affect the escape- and select-fonts,
+Unlike \fBset\-vt\-font()\fR, this does not affect the escape- and select-fonts,
since those are not based on resource values.
It does affect the fonts loosely organized under the \*(``Default\*('' menu
entry, including \fBfont\fP, \fBboldFont\fP, \fBwideFont\fP
@@ -6992,16 +7222,28 @@ and \fBwideBoldFont\fP.
.B "maximize()"
Resizes the window to fill the screen.
.TP 8
-.B "meta-sends-escape()"
+.B "meta\-sends\-escape()"
This action toggles the state of the \fBmetaSendsEscape\fP resource.
.TP 8
-.B "popup-menu(\fImenuname\fP)"
+.B "pointer\-button()"
+Use this action as a fall-back to handle button press- and release-events
+for the mouse control sequence protocol
+when the selection-related translations are suppressed with the
+\fBomitTranslation\fP resource.
+.TP 8
+.B "pointer\-motion()"
+Use this action as a fall-back to handle motion-events
+for the mouse control sequence protocol
+when the selection-related translations are suppressed with the
+\fBomitTranslation\fP resource.
+.TP 8
+.B "popup\-menu(\fImenuname\fP)"
This action displays the specified popup menu.
Valid names (case is
significant) include: \fImainMenu\fP, \fIvtMenu\fP, \fIfontMenu\fP,
and \fItekMenu\fP.
.TP 8
-.B "print(\fIprinter-flags\fP)"
+.B "print(\fIprinter\-flags\fP)"
This action prints the window.
It is also invoked by the \fBprint\fP entry in \fImainMenu\fP.
.IP
@@ -7041,14 +7283,14 @@ the page is printed with ANSI color attributes
(i.e., \fBprintAttributes\fP is \*(``2\*('').
.RE
.TP 8
-.B "print-everything(\fIprinter-flags\fP)"
+.B "print\-everything(\fIprinter\-flags\fP)"
This action sends the entire text history, in addition to the text
currently visible, to the program given in the \fBprinterCommand\fP resource.
It allows the same optional parameters as the \fBprint\fP action.
With a suitable printer command, the action can be used to load the text
history in an editor.
.TP 8
-.B "print-immediate()"
+.B "print\-immediate()"
Sends the text of the current window directly to a file,
as specified by the
\fBprintFileImmediate\fP,
@@ -7056,7 +7298,7 @@ as specified by the
\fBprintOptsImmediate\fP
resources.
.TP 8
-.B "print-on-error()"
+.B "print\-on\-error()"
Toggles a flag telling \fI\*n\fP that if it exits with an X error,
to send the text of the current window directly to a file,
as specified by the
@@ -7065,7 +7307,7 @@ as specified by the
\fBprintOptsOnXError\fP
resources.
.TP 8
-.B "print-redir()"
+.B "print\-redir()"
This action toggles the \fBprinterControlMode\fR between 0 and 2.
The corresponding popup menu entry is useful for switching the printer
off if you happen to change your mind after deciding to print random
@@ -7077,7 +7319,7 @@ This action sends a SIGHUP to the subprogram and exits.
It is also invoked
by the \fBquit\fP entry in \fImainMenu\fP.
.TP 8
-.B "readline-button()"
+.B "readline\-button()"
Supports the optional readline feature by echoing repeated cursor forward
or backward control sequences on button release event,
to request that the host application update its notion of the cursor's
@@ -7090,7 +7332,7 @@ It is also invoked by the \fBredraw\fP entry in \fImainMenu\fP.
.B "restore()"
Restores the window to the size before it was last maximized.
.TP 8
-.B "scroll-back(\fIcount\fP [,\fIunits\fP [,\fImouse\fP] ])"
+.B "scroll\-back(\fIcount\fP [,\fIunits\fP [,\fImouse\fP] ])"
This action scrolls the text window backward so that text that had previously
scrolled off the top of the screen is now visible.
.IP
@@ -7110,8 +7352,8 @@ If the second parameter is omitted \*(``lines\*('' is used.
If the third parameter \fImouse\fP is given, the action is ignored when
mouse reporting is enabled.
.TP 8
-.B "scroll-forw(\fIcount\fP [,\fIunits\fP [,\fImouse\fP] ])"
-This action is similar to \fBscroll-back\fP except that it scrolls
+.B "scroll\-forw(\fIcount\fP [,\fIunits\fP [,\fImouse\fP] ])"
+This action is similar to \fBscroll\-back\fP except that it scrolls
in the other direction.
.TP 8
.B "secure()"
@@ -7119,56 +7361,56 @@ This action toggles the \fISecure Keyboard\fP mode
(see \fBSECURITY\fP), and is invoked from the \fBsecurekbd\fP
entry in \fImainMenu\fP.
.TP 8
-.B "scroll-lock(\fIon/off/toggle\fP)"
+.B "scroll\-lock(\fIon/off/toggle\fP)"
This action sets, unsets or toggles internal state which tells
\fI\*n\fP whether Scroll Lock is active,
subject to the \fBallowScrollLock\fP resource.
.TP 8
-.B "scroll-to(\fIcount\fP)"
+.B "scroll\-to(\fIcount\fP)"
Scroll to the given line relative to the beginning of the saved-lines.
-For instance, \*(``\fBscroll-to(0)\fP\*('' would scroll to the beginning.
+For instance, \*(``\fBscroll\-to(0)\fP\*('' would scroll to the beginning.
Two special nonnumeric parameters are recognized:
.RS
.TP 8
-.B scroll-to(begin)
+.B scroll\-to(begin)
Scroll to the beginning of the saved lines.
.TP 8
-.B scroll-to(end)
+.B scroll\-to(end)
Scroll to the end of the saved lines, i.e., to the currently active page.
.RE
.TP 8
-.B "select-cursor-end(\fIdestname\fP [, \&...\&])"
-This action is similar to \fBselect-end\fP except that it should be used
-with \fBselect-cursor-start\fP.
+.B "select\-cursor\-end(\fIdestname\fP [, \&...\&])"
+This action is similar to \fBselect\-end\fP except that it should be used
+with \fBselect\-cursor\-start\fP.
.TP 8
-.B "select-cursor-extend()"
-This action is similar to \fBselect-extend\fP except that it should be used
-with \fBselect-cursor-start\fP.
+.B "select\-cursor\-extend()"
+This action is similar to \fBselect\-extend\fP except that it should be used
+with \fBselect\-cursor\-start\fP.
.TP 8
-.B "select-cursor-start()"
-This action is similar to \fBselect-start\fP except that it begins the
+.B "select\-cursor\-start()"
+This action is similar to \fBselect\-start\fP except that it begins the
selection at the current text cursor position.
.TP 8
-.B "select-end(\fIdestname\fP [, \&...\&])"
+.B "select\-end(\fIdestname\fP [, \&...\&])"
This action puts the currently selected text into all of the selections or
cutbuffers specified by \fIdestname\fP.
It also sends a mouse position and updates the internal selection state
to reflect the end of the selection process.
.TP 8
-.B "select-extend()"
+.B "select\-extend()"
This action tracks the pointer and extends the selection.
It should only be bound to Motion events.
.TP 8
-.B "select-set()"
+.B "select\-set()"
This action stores text that corresponds to the current selection,
without affecting the selection mode.
.TP 8
-.B "select-start()"
+.B "select\-start()"
This action begins text selection at the current pointer location.
See
the section on \fBPOINTER USAGE\fP for information on making selections.
.TP 8
-.B "send-signal(\fIsigname\fP)"
+.B "send\-signal(\fIsigname\fP)"
This action sends the signal named by \fIsigname\fP
to the \fI\*n\fP subprocess (the shell or program specified with
the \fI\-e\fP command line option).
@@ -7189,151 +7431,151 @@ as \fItstp\fP), \fIcont\fP
\fIquit\fP,
\fIalrm\fP, \fIalarm\fP (same as \fIalrm\fP) and \fIkill\fP.
.TP 8
-.B "set-8-bit-control(\fIon/off/toggle\fP)"
+.B "set\-8\-bit\-control(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBeightBitControl\fP resource.
-It is also invoked from the \fB8-bit-control\fP entry in \fIvtMenu\fP.
+It is also invoked from the \fB8\-bit\-control\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-allow132(\fIon/off/toggle\fP)"
+.B "set\-allow132(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBc132\fP resource.
It is also invoked from the \fBallow132\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-altscreen(\fIon/off/toggle\fP)"
+.B "set\-altscreen(\fIon/off/toggle\fP)"
This action sets, unsets or toggles between the alternate and current screens.
.TP 8
-.B "set-appcursor(\fIon/off/toggle\fP)"
+.B "set\-appcursor(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the handling Application Cursor Key mode
and is also invoked by the \fBappcursor\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-appkeypad(\fIon/off/toggle\fP)"
+.B "set\-appkeypad(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the handling of Application Keypad mode
and is also invoked by the \fBappkeypad\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-autolinefeed(\fIon/off/toggle\fP)"
+.B "set\-autolinefeed(\fIon/off/toggle\fP)"
This action sets, unsets or toggles automatic insertion of line feeds.
It is also invoked by the \fBautolinefeed\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-autowrap(\fIon/off/toggle\fP)"
+.B "set\-autowrap(\fIon/off/toggle\fP)"
This action sets, unsets or toggles automatic wrapping of long lines.
It is also invoked by the \fBautowrap\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-backarrow(\fIon/off/toggle\fP)"
+.B "set\-backarrow(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBbackarrowKey\fP resource.
It is also invoked from the \fBbackarrow key\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-bellIsUrgent(\fIon/off/toggle\fP)"
+.B "set\-bellIsUrgent(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBbellIsUrgent\fP resource.
It is also invoked by the \fBbellIsUrgent\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-cursorblink(\fIon/off/toggle\fP)"
+.B "set\-cursorblink(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBcursorBlink\fP resource.
It is also invoked from the \fBcursorblink\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-cursesemul(\fIon/off/toggle\fP)"
+.B "set\-cursesemul(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBcurses\fP resource.
It is also invoked from the \fBcursesemul\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-font-doublesize(\fIon/off/toggle\fP)"
+.B "set\-font\-doublesize(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBfontDoublesize\fP resource.
-It is also invoked by the \fBfont-doublesize\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fBfont\-doublesize\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-hp-function-keys(\fIon/off/toggle\fP)"
+.B "set\-hp\-function\-keys(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBhpFunctionKeys\fP resource.
It is also invoked by the \fBhpFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
-.B "set-jumpscroll(\fIon/off/toggle\fP)"
+.B "set\-jumpscroll(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBjumpscroll\fP resource.
It is also invoked by the \fBjumpscroll\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-font-linedrawing(\fIon/off/toggle\fP)"
+.B "set\-font\-linedrawing(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fI\*n\fR's state regarding whether
the current font has line-drawing characters and whether it should draw them
directly.
-It is also invoked by the \fBfont-linedrawing\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fBfont\-linedrawing\fP entry in \fIfontMenu\fP.
.\" .\" not implemented
.\" .TP 8
-.\" .B "set-font-loading(\fIon/off/toggle\fP)"
+.\" .B "set\-font\-loading(\fIon/off/toggle\fP)"
.\" This action sets, unsets or toggles the TBD resource
.\" which controls the ability to load VT220 soft fonts.
-.\" It is also invoked by the \fBfont-loadable\fP entry in \fIfontMenu\fP.
+.\" It is also invoked by the \fBfont\-loadable\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-font-packed(\fIon/off/toggle\fP)"
+.B "set\-font\-packed(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBforcePackedFont\fR resource
which controls use of the font's minimum or maximum glyph width.
-It is also invoked by the \fBfont-packed\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fBfont\-packed\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-keep-clipboard(\fIon/off/toggle\fP)"
+.B "set\-keep\-clipboard(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBkeepClipboard\fP resource.
.TP 8
-.B "set-keep-selection(\fIon/off/toggle\fP)"
+.B "set\-keep\-selection(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBkeepSelection\fP resource.
It is also invoked by the \fBkeepSelection\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-logging(\fIon/off/toggle\fP)"
+.B "set\-logging(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the state of the logging option.
.TP 8
-.B "set-old-function-keys(\fIon/off/toggle\fP)"
+.B "set\-old\-function\-keys(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the state of legacy function keys.
It is also invoked by the \fBoldFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
-.B "set-marginbell(\fIon/off/toggle\fP)"
+.B "set\-marginbell(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBmarginBell\fP resource.
.TP 8
-.B "set-num-lock(\fIon/off/toggle\fP)"
+.B "set\-num\-lock(\fIon/off/toggle\fP)"
This action toggles the state of the \fBnumLock\fP resource.
.TP 8
-.B "set-pop-on-bell(\fIon/off/toggle\fP)"
+.B "set\-pop\-on\-bell(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBpopOnBell\fP resource.
It is also invoked by the \fBpoponbell\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-private-colors(\fIon/off/toggle\fP)"
+.B "set\-private\-colors(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBprivateColorRegisters\fP resource.
.TP 8
-.B "set-render-font(\fIon/off/toggle\fP)"
+.B "set\-render\-font(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBrenderFont\fP resource.
-It is also invoked by the \fBrender-font\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fBrender\-font\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-reverse-video(\fIon/off/toggle\fP)"
+.B "set\-reverse\-video(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBreverseVideo\fP resource.
It is also invoked by the \fBreversevideo\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-reversewrap(\fIon/off/toggle\fP)"
+.B "set\-reversewrap(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBreverseWrap\fP resource.
It is also invoked by the \fBreversewrap\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-scroll-on-key(\fIon/off/toggle\fP)"
+.B "set\-scroll\-on\-key(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBscrollKey\fP resource.
It is also invoked from the \fBscrollkey\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-scroll-on-tty-output(\fIon/off/toggle\fP)"
+.B "set\-scroll\-on\-tty\-output(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBscrollTtyOutput\fP resource.
It is also invoked from the \fBscrollttyoutput\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-scrollbar(\fIon/off/toggle\fP)"
+.B "set\-scrollbar(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBscrollbar\fP resource.
It is also invoked by the \fBscrollbar\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-sco-function-keys(\fIon/off/toggle\fP)"
+.B "set\-sco\-function\-keys(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBscoFunctionKeys\fP resource.
It is also invoked by the \fBscoFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
-.B "set-select(\fIon/off/toggle\fP)"
+.B "set\-select(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBselectToClipboard\fP resource.
It is also invoked by the \fBselectToClipboard\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-sixel-scrolling(\fIon/off/toggle\fP)"
+.B "set\-sixel\-scrolling(\fIon/off/toggle\fP)"
This action toggles between inline (sixel scrolling) and absolute positioning.
It can also be controlled via DEC private mode 80 (DECSDM) or from
the \fBsixelScrolling\fP entry in the \fIbtMenu\fP.
.TP 8
-.B "set-sun-function-keys(\fIon/off/toggle\fP)"
+.B "set\-sun\-function\-keys(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBsunFunctionKeys\fP resource.
It is also invoked by the \fBsunFunctionKeys\fP entry in \fImainMenu\fP.
.TP 8
-.B "set-sun-keyboard(\fIon/off/toggle\fP)"
+.B "set\-sun\-keyboard(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBsunKeyboard\fP resource.
It is also invoked by the \fBsunKeyboard\fP entry in \fImainMenu\fP.
.TP 8
-.B "set-tek-text(\fIlarge/2/3/small\fP)"
+.B "set\-tek\-text(\fIlarge/2/3/small\fP)"
This action sets the font used in the Tektronix window to the value of the
selected resource according to the argument.
The argument can be either a keyword or single-letter alias,
@@ -7353,45 +7595,45 @@ small (s)
Use resource \fBfontSmall\fP, same as menu entry \fBtektextsmall\fP.
.RE
.TP 8
-.B "set-terminal-type(\fItype\fP)"
+.B "set\-terminal\-type(\fItype\fP)"
This action directs output to either the \fIvt\fP or \fItek\fP windows,
according to the \fItype\fP string.
It is also invoked by the
\fBtekmode\fP entry in \fIvtMenu\fP and the \fBvtmode\fP entry in
\fItekMenu\fP.
.TP 8
-.B "set-titeInhibit(\fIon/off/toggle\fP)"
+.B "set\-titeInhibit(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBtiteInhibit\fP resource,
which controls switching between the alternate and current screens.
.TP 8
-.B "set-toolbar(\fIon/off/toggle\fP)"
+.B "set\-toolbar(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the toolbar feature.
It is also invoked by the \fBtoolbar\fP entry in \fImainMenu\fP.
.TP 8
-.B "set-utf8-fonts(\fIon/off/toggle\fP)"
+.B "set\-utf8\-fonts(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fButf8Fonts\fP resource.
-It is also invoked by the \fButf8-fonts\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fButf8\-fonts\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-utf8-mode(\fIon/off/toggle\fP)"
+.B "set\-utf8\-mode(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fButf8\fP resource.
-It is also invoked by the \fButf8-mode\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fButf8\-mode\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-utf8-title(\fIon/off/toggle\fP)"
+.B "set\-utf8\-title(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fButf8Title\fP resource.
-It is also invoked by the \fButf8-title\fP entry in \fIfontMenu\fP.
+It is also invoked by the \fButf8\-title\fP entry in \fIfontMenu\fP.
.TP 8
-.B "set-visibility(\fIvt/tek\fP,\fIon/off/toggle\fP)"
+.B "set\-visibility(\fIvt/tek\fP,\fIon/off/toggle\fP)"
This action sets, unsets or toggles whether or not
the \fIvt\fP or \fItek\fP windows are visible.
It is also invoked from the \fBtekshow\fP and \fBvthide\fP entries
in \fIvtMenu\fP and the \fBvtshow\fP and \fBtekhide\fP entries in
\fItekMenu\fP.
.TP 8
-.B "set-visual-bell(\fIon/off/toggle\fP)"
+.B "set\-visual\-bell(\fIon/off/toggle\fP)"
This action sets, unsets or toggles the \fBvisualBell\fP resource.
It is also invoked by the \fBvisualbell\fP entry in \fIvtMenu\fP.
.TP 8
-.B "set-vt-font(\fId/1/2/3/4/5/6/e/s\fP [,\fInormalfont\fP [, \fIboldfont\fP]])"
+.B "set\-vt\-font(\fId/1/2/3/4/5/6/7/e/s\fP [,\fInormalfont\fP [, \fIboldfont\fP]])"
This action sets the font or fonts currently being used
in the VT\fIxxx\fP window.
The first argument is a single character that specifies the font to be used:
@@ -7401,8 +7643,8 @@ The first argument is a single character that specifies the font to be used:
used when
\fI\*n\fP was started),
.HP
-\fI1\fP through \fI6\fP indicate the fonts
-specified by the \fBfont1\fP through \fBfont6\fP resources,
+\fI1\fP through \fI7\fP indicate the fonts
+specified by the \fBfont1\fP through \fBfont7\fP resources,
.HP
\fIe\fP or \fIE\fP
indicate the normal and bold fonts that have been set through escape codes
@@ -7416,16 +7658,16 @@ If \fI\*n\fR is configured to support wide characters, an
additional two optional parameters are recognized for the \fIe\fP argument:
wide font and wide bold font.
.TP 8
-.B "smaller-vt-font()"
+.B "smaller\-vt\-font()"
Set the font to the next smaller one, based on the font dimensions.
-See also \fBset-vt-font()\fP.
+See also \fBset\-vt\-font()\fP.
.TP 8
-.B "soft-reset()"
+.B "soft\-reset()"
This action resets the scrolling region.
It is also invoked from the \fBsoftreset\fP entry in \fIvtMenu\fP.
The effect is identical to a soft reset (DECSTR) control sequence.
.TP 8
-.B "spawn-new-terminal(\fIparams\fP)"
+.B "spawn\-new\-terminal(\fIparams\fP)"
Spawn a new \fI\*n\fP process.
This is available on systems which have a modern version of the
process filesystem, e.g., \*(``/proc\*('', which \fI\*n\fP can read.
@@ -7440,12 +7682,12 @@ Otherwise, use the \fB$PATH\fP variable to find \fI\*n\fP.
If parameters are given in the action,
pass them to the new \fI\*n\fP process.
.TP 8
-.B "start-extend()"
-This action is similar to \fBselect-start\fP except that the
+.B "start\-extend()"
+This action is similar to \fBselect\-start\fP except that the
selection is extended to the current pointer location.
.TP 8
-.B "start-cursor-extend()"
-This action is similar to \fBselect-extend\fP except that the
+.B "start\-cursor\-extend()"
+This action is similar to \fBselect\-extend\fP except that the
selection is extended to the current text cursor position.
.TP 8
.B "string(\fIstring\fP)"
@@ -7456,20 +7698,20 @@ If the string argument begins with the
characters \*(``0x\*('', it is interpreted
as a hex character constant.
.TP 8
-.B "tek-copy()"
+.B "tek\-copy()"
This action copies the escape codes used to generate the current window
contents to a file in the current directory beginning with the name COPY.
It is also invoked from the \fBtekcopy\fP entry in \fItekMenu\fP.
.TP 8
-.B "tek-page()"
+.B "tek\-page()"
This action clears the Tektronix window.
It is also invoked by the \fBtekpage\fP entry in \fItekMenu\fP.
.TP 8
-.B "tek-reset()"
+.B "tek\-reset()"
This action resets the Tektronix window.
It is also invoked by the \fBtekreset\fP entry in \fItekMenu\fP.
.TP 8
-.B "vi-button()"
+.B "vi\-button()"
Handles a button event (other than press and release)
by echoing a control sequence computed from the event's line number
in the screen relative to the current line:
@@ -7489,13 +7731,13 @@ from the current line.
The control sequence is omitted altogether if the button event is on the
current line.
.TP 8
-.B "visual-bell()"
+.B "visual\-bell()"
This action flashes the window quickly.
.
.PP
The Tektronix window also has the following action:
.TP 8
-.B "gin-press(\fIl/L/m/M/r/R\fP)"
+.B "gin\-press(\fIl/L/m/M/r/R\fP)"
This action sends the indicated graphics input code.
.
.SS Default Key Bindings
@@ -7546,6 +7788,9 @@ These are for the \fIvt100\fP widget:
@Num_Lock Ctrl <Btn5Down>:\fBscroll\-forw\fP(1,halfpage,m) \\n\\\&
<Btn5Down>:\fBscroll\-forw\fP(5,line,m) \\n\\\&
<BtnUp>:\fBselect\-end\fP(\fBSELECT\fP, \fBCUT_BUFFER0\fP) \\n\\\&
+ <BtnMotion>:\fBpointer\-motion\fP() \\n\\\&
+ <BtnDown>:\fBpointer\-button\fP() \\n\\\&
+ <BtnUp>:\fBpointer\-button\fP() \\n\\\&
<BtnDown>:\fBignore\fP()
.NE
.PP
@@ -8050,7 +8295,7 @@ WM_CLIENT_LEADER(WINDOW): window id # 0x800023
This shows the command-line arguments for \fI\*n\fP
which are passed to X Toolkit during initialization, e.g.,
.NS
-WM_COMMAND(STRING) = { "xterm", "-class", "UXTerm", "-title", "uxterm", "-u8" }
+WM_COMMAND(STRING) = { "xterm", "\-class", "UXTerm", "\-title", "uxterm", "\-u8" }
.NE
.TP 5
.B WM_ICON_NAME
@@ -8064,7 +8309,7 @@ This shows the result from the \fBsetlocale\fP(3) function
for the \fILC_CTYPE\fP category,
e.g.,
.NS
-WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
+WM_LOCALE_NAME(STRING) = "en_US.UTF\-8"
.NE
.TP 5
.B WM_NAME
@@ -8459,14 +8704,14 @@ 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 211 at the end of 2018.
+The \fITHANKS\fP file in \fI\*n\fP's source lists 228 in September 2020.
Keep in mind these:
Jason Bacon,
Jens Schweikhardt,
Ross Combs,
Stephen P.\& Wall,
David Wexelblat, and
-Thomas Dickey (invisible-island.net).
+Thomas Dickey (invisible\-island.net).
.SH OPENBSD SPECIFICS
On OpenBSD, the Tektronix 4014 emulation is disabled and the following
resources have different default values:
diff --git a/app/xterm/xterm_io.h b/app/xterm/xterm_io.h
index 1d7092b04..c7cf8e6ba 100644
--- a/app/xterm/xterm_io.h
+++ b/app/xterm/xterm_io.h
@@ -1,7 +1,7 @@
-/* $XTermId: xterm_io.h,v 1.65 2018/06/28 21:35:01 tom Exp $ */
+/* $XTermId: xterm_io.h,v 1.67 2020/01/18 18:48:19 tom Exp $ */
/*
- * Copyright 2000-2017,2018 by Thomas E. Dickey
+ * Copyright 2000-2018,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -92,8 +92,15 @@
#undef SYSV /* pretend to be bsd (sgtty.h) */
#endif /* macII */
-#if defined(__GLIBC__) && !defined(linux)
-#define USE_POSIX_TERMIOS /* GNU/Hurd, GNU/KFreeBSD and GNU/KNetBSD */
+#ifdef __GNU__
+#define USE_POSIX_TERMIOS
+#define HAVE_POSIX_OPENPT 1
+#define HAVE_PTSNAME 1
+#define HAVE_GRANTPT_PTY_ISATTY 1
+#endif
+
+#if defined(__GLIBC__) && !(defined(linux) || defined(__GNU__))
+#define USE_POSIX_TERMIOS /* GNU/KFreeBSD and GNU/KNetBSD */
#endif
#ifdef __MVS__
@@ -211,7 +218,7 @@
#endif
#if defined (__sgi) || (defined(__linux__) && defined(__sparc__)) || defined(__UNIXWARE__)
-#undef TIOCLSET /* defined, but not useable */
+#undef TIOCLSET /* defined, but not usable */
#endif
#if defined(sun) || defined(__UNIXWARE__)
diff --git a/app/xterm/xtermcap.c b/app/xterm/xtermcap.c
index 7b38e8993..f4ee67cbe 100644
--- a/app/xterm/xtermcap.c
+++ b/app/xterm/xtermcap.c
@@ -1,7 +1,7 @@
-/* $XTermId: xtermcap.c,v 1.52 2018/12/15 15:15:00 tom Exp $ */
+/* $XTermId: xtermcap.c,v 1.56 2020/10/12 18:51:05 tom Exp $ */
/*
- * Copyright 2007-2016,2018 by Thomas E. Dickey
+ * Copyright 2007-2018,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -50,8 +50,10 @@
#if USE_TERMINFO
#define TcapInit(buffer, name) (setupterm(name, fileno(stdout), &ignored) == OK)
+#define TcapFree() (del_curterm(cur_term))
#else
#define TcapInit(buffer, name) (tgetent(buffer, name) == 1)
+#define TcapFree() /*nothing */
#endif
#define NO_STRING (char *)(-1)
@@ -543,13 +545,14 @@ get_tcap_buffer(XtermWidget xw)
* Retrieve the erase-key, for initialization in main program.
*/
char *
-get_tcap_erase(XtermWidget xw GCC_UNUSED)
+get_tcap_erase(XtermWidget xw)
{
#if !USE_TERMINFO
char *area = TScreenOf(xw)->tcap_area;
#endif
char *fkey;
+ (void) xw;
#if USE_TERMINFO
fkey = tigetstr("kbs");
#else
@@ -638,12 +641,12 @@ free_termcap(XtermWidget xw)
for (have = 0; have < want; ++have) {
char *fkey = screen->tcap_fkeys[have];
- if (fkey != 0 && fkey != NO_STRING) {
+ if (fkey != NO_STRING) {
free(fkey);
}
}
- free(screen->tcap_fkeys);
- screen->tcap_fkeys = 0;
+ FreeAndNull(screen->tcap_fkeys);
}
#endif
+ TcapFree();
}
diff --git a/app/xterm/xtermcfg.h b/app/xterm/xtermcfg.h
index 0a83c0cf8..e93db66d5 100644
--- a/app/xterm/xtermcfg.h
+++ b/app/xterm/xtermcfg.h
@@ -1,7 +1,7 @@
-/* $XTermId: xtermcfg.hin,v 1.216 2018/02/08 10:01:08 tom Exp $ */
+/* $XTermId: xtermcfg.hin,v 1.220 2020/10/05 22:42:06 tom Exp $ */
/*
- * Copyright 1997-2017,2018 by Thomas E. Dickey
+ * Copyright 1997-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -41,8 +41,7 @@
* ALLOWLOGFILEONOFF
* CANT_OPEN_DEV_TTY
* DEBUG* (any debug-option)
- * DUMP_BITMAP
- * DUMP_COLORS
+ * DUMP_* (mostly in the ReGIS/SIXEL code)
* HAS_LTCHARS
* HAVE_SYS_PTEM_H
* PUCC_PTYD
@@ -126,6 +125,7 @@
#define HAVE_X11_EXTENSIONS_XINERAMA_H 1 /* AC_CHECK_HEADERS(X11/extensions/Xinerama.h) */
#define HAVE_X11_EXTENSIONS_XKB_H 1 /* AC_CHECK_HEADERS(X11/extensions/XKB.h) */
#define HAVE_X11_SUNKEYSYM_H 1 /* AC_CHECK_HEADERS(X11/Sunkeysym.h) */
+#define HAVE_X11_TRANSLATEI_H 1 /* AC_CHECK_HEADERS(X11/TranslateI.h) */
#define HAVE_X11_XF86KEYSYM_H 1 /* AC_CHECK_HEADERS(X11/XF86keysym.h) */
#define HAVE_X11_XKBLIB_H /* AC_CHECK_HEADERS(X11/XKBlib.h) */
#define HAVE_X11_XPOLL_H 1 /* AC_CHECK_HEADERS(X11/Xpoll.h) */
@@ -138,7 +138,6 @@
#define LUIT_PATH "/usr/X11R6/bin/luit" /* CF_ARG_ENABLE(luit) */
/* #undef NO_ACTIVE_ICON */ /* CF_ARG_DISABLE(active-icon) */
/* #undef NO_LEAKS */ /* CF_ARG_DISABLE(leaks) */
-#define OPT_DIRECT_COLOR 1 /* CF_ARG_ENABLE(direct-color) */
#define OPT_256_COLORS 1 /* CF_ARG_ENABLE(256-color) */
/* #undef OPT_88_COLORS */ /* CF_ARG_ENABLE(88-color) */
/* #undef OPT_AIX_COLORS */ /* CF_ARG_DISABLE(16-color) */
@@ -153,10 +152,12 @@
/* #undef OPT_DABBREV */ /* CF_ARG_ENABLE(dabbrev) */
/* #undef OPT_DEC_CHRSET */ /* CF_ARG_DISABLE(doublechars) */
/* #undef OPT_DEC_LOCATOR */ /* CF_ARG_ENABLE(dec-locator) */
-/* #undef OPT_DOUBLE_BUFFER */ /* CF_ARG_ENABLE(double-buffer) */
#define OPT_DEC_RECTOPS 1 /* CF_ARG_ENABLE(rectangles) */
+#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) */
/* #undef OPT_I18N_SUPPORT */ /* CF_ARG_DISABLE(i18n) */
@@ -170,17 +171,17 @@
/* #undef OPT_NUM_LOCK */ /* CF_ARG_DISABLE(num-lock) */
#define OPT_PASTE64 0 /* CF_ARG_ENABLE(past64) */
/* #undef OPT_PC_COLORS */ /* CF_ARG_DISABLE(pc-color) */
-#define OPT_SCREEN_DUMPS 0 /* CF_ARG_ENABLE(screen-dumps) */
+#define OPT_PRINT_GRAPHICS 0 /* CF_ARG_ENABLE(print-graphics) */
#define OPT_PTY_HANDSHAKE 1 /* CF_ARG_ENABLE(pty-handshake) */
#define OPT_READLINE 0 /* CF_ARG_ENABLE(readline-mouse) */
+/* #undef OPT_REGIS_GRAPHICS */ /* CF_ARG_ENABLE(regis-graphics) */
/* #undef OPT_SAME_NAME */ /* CF_ARG_DISABLE(samename) */
/* #undef OPT_SCO_FUNC_KEYS */ /* CF_ARG_ENABLE(sco-fkeys) */
+#define OPT_SCREEN_DUMPS 0 /* CF_ARG_ENABLE(screen-dumps) */
/* #undef OPT_SELECTION_OPS */ /* CF_ARG_DISABLE(selection-ops) */
#define OPT_SELECT_REGEX 1 /* CF_ARG_DISABLE(regex) */
/* #undef OPT_SESSION_MGT */ /* CF_ARG_DISABLE(session-mgt) */
-/* #undef OPT_REGIS_GRAPHICS */ /* CF_ARG_ENABLE(regis-graphics) */
/* #undef OPT_SIXEL_GRAPHICS */ /* CF_ARG_ENABLE(sixel-graphics) */
-/* #undef OPT_GRAPHICS */ /* CF_ARG_ENABLE(graphics) */
/* #undef OPT_SUN_FUNC_KEYS */ /* CF_ARG_ENABLE(sun-fkeys) */
#define OPT_TCAP_FKEYS 0 /* CF_ARG_ENABLE(tcap-fkeys) */
#define OPT_TCAP_QUERY 0 /* CF_ARG_ENABLE(tcap-query) */
diff --git a/app/xterm/xtermcfg.hin b/app/xterm/xtermcfg.hin
index 1dbc3b825..c4455de0a 100644
--- a/app/xterm/xtermcfg.hin
+++ b/app/xterm/xtermcfg.hin
@@ -1,7 +1,7 @@
-/* $XTermId: xtermcfg.hin,v 1.217 2019/07/19 00:34:12 tom Exp $ */
+/* $XTermId: xtermcfg.hin,v 1.220 2020/10/05 22:42:06 tom Exp $ */
/*
- * Copyright 1997-2018,2019 by Thomas E. Dickey
+ * Copyright 1997-2019,2020 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -41,8 +41,7 @@
* ALLOWLOGFILEONOFF
* CANT_OPEN_DEV_TTY
* DEBUG* (any debug-option)
- * DUMP_BITMAP
- * DUMP_COLORS
+ * DUMP_* (mostly in the ReGIS/SIXEL code)
* HAS_LTCHARS
* HAVE_SYS_PTEM_H
* PUCC_PTYD
@@ -126,6 +125,7 @@
#undef HAVE_X11_EXTENSIONS_XINERAMA_H /* AC_CHECK_HEADERS(X11/extensions/Xinerama.h) */
#undef HAVE_X11_EXTENSIONS_XKB_H /* AC_CHECK_HEADERS(X11/extensions/XKB.h) */
#undef HAVE_X11_SUNKEYSYM_H /* AC_CHECK_HEADERS(X11/Sunkeysym.h) */
+#undef HAVE_X11_TRANSLATEI_H /* AC_CHECK_HEADERS(X11/TranslateI.h) */
#undef HAVE_X11_XF86KEYSYM_H /* AC_CHECK_HEADERS(X11/XF86keysym.h) */
#undef HAVE_X11_XKBLIB_H /* AC_CHECK_HEADERS(X11/XKBlib.h) */
#undef HAVE_X11_XPOLL_H /* AC_CHECK_HEADERS(X11/Xpoll.h) */
@@ -138,7 +138,6 @@
#undef LUIT_PATH /* CF_ARG_ENABLE(luit) */
#undef NO_ACTIVE_ICON /* CF_ARG_DISABLE(active-icon) */
#undef NO_LEAKS /* CF_ARG_DISABLE(leaks) */
-#undef OPT_DIRECT_COLOR /* CF_ARG_ENABLE(direct-color) */
#undef OPT_256_COLORS /* CF_ARG_ENABLE(256-color) */
#undef OPT_88_COLORS /* CF_ARG_ENABLE(88-color) */
#undef OPT_AIX_COLORS /* CF_ARG_DISABLE(16-color) */
@@ -153,10 +152,12 @@
#undef OPT_DABBREV /* CF_ARG_ENABLE(dabbrev) */
#undef OPT_DEC_CHRSET /* CF_ARG_DISABLE(doublechars) */
#undef OPT_DEC_LOCATOR /* CF_ARG_ENABLE(dec-locator) */
-#undef OPT_DOUBLE_BUFFER /* CF_ARG_ENABLE(double-buffer) */
#undef OPT_DEC_RECTOPS /* CF_ARG_ENABLE(rectangles) */
+#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) */
#undef OPT_I18N_SUPPORT /* CF_ARG_DISABLE(i18n) */
@@ -170,17 +171,17 @@
#undef OPT_NUM_LOCK /* CF_ARG_DISABLE(num-lock) */
#undef OPT_PASTE64 /* CF_ARG_ENABLE(past64) */
#undef OPT_PC_COLORS /* CF_ARG_DISABLE(pc-color) */
-#undef OPT_SCREEN_DUMPS /* CF_ARG_ENABLE(screen-dumps) */
+#undef OPT_PRINT_GRAPHICS /* CF_ARG_ENABLE(print-graphics) */
#undef OPT_PTY_HANDSHAKE /* CF_ARG_ENABLE(pty-handshake) */
#undef OPT_READLINE /* CF_ARG_ENABLE(readline-mouse) */
+#undef OPT_REGIS_GRAPHICS /* CF_ARG_ENABLE(regis-graphics) */
#undef OPT_SAME_NAME /* CF_ARG_DISABLE(samename) */
#undef OPT_SCO_FUNC_KEYS /* CF_ARG_ENABLE(sco-fkeys) */
+#undef OPT_SCREEN_DUMPS /* CF_ARG_ENABLE(screen-dumps) */
#undef OPT_SELECTION_OPS /* CF_ARG_DISABLE(selection-ops) */
#undef OPT_SELECT_REGEX /* CF_ARG_DISABLE(regex) */
#undef OPT_SESSION_MGT /* CF_ARG_DISABLE(session-mgt) */
-#undef OPT_REGIS_GRAPHICS /* CF_ARG_ENABLE(regis-graphics) */
#undef OPT_SIXEL_GRAPHICS /* CF_ARG_ENABLE(sixel-graphics) */
-#undef OPT_GRAPHICS /* CF_ARG_ENABLE(graphics) */
#undef OPT_SUN_FUNC_KEYS /* CF_ARG_ENABLE(sun-fkeys) */
#undef OPT_TCAP_FKEYS /* CF_ARG_ENABLE(tcap-fkeys) */
#undef OPT_TCAP_QUERY /* CF_ARG_ENABLE(tcap-query) */
diff --git a/app/xterm/xutf8.c b/app/xterm/xutf8.c
index d631e697d..4864bd15b 100644
--- a/app/xterm/xutf8.c
+++ b/app/xterm/xutf8.c
@@ -1,7 +1,7 @@
-/* $XTermId: xutf8.c,v 1.17 2019/09/16 20:29:20 tom Exp $ */
+/* $XTermId: xutf8.c,v 1.18 2020/06/23 22:45:51 tom Exp $ */
/*
- * Copyright 2002-2017,2019 by Thomas E. Dickey
+ * Copyright 2002-2019,2020 by Thomas E. Dickey
* Copyright (c) 2001 by Juliusz Chroboczek
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -226,7 +226,7 @@ Xutf8TextPropertyToTextList(Display *dpy,
else
len = l1countUtf8Bytes((char *) tp->value, datalen);
- start = TextAlloc(len);
+ start = malloc(len + 1);
if (!start) {
free(list);
return XNoMemory;