diff options
Diffstat (limited to 'app/xterm')
51 files changed, 1420 insertions, 1952 deletions
diff --git a/app/xterm/AAA_README_VMS.txt b/app/xterm/AAA_README_VMS.txt deleted file mode 100644 index edf8ef198..000000000 --- a/app/xterm/AAA_README_VMS.txt +++ /dev/null @@ -1,48 +0,0 @@ -http://dickey.his.com/xterm/xterm.html - -Downloaded 1.22 variant (current Linux version) on 18-JAN-2000. - -Port stalled for a few days because OpenVMS X11 lacks XtGravity. - -X11KIT shared libraries almost work, but missing _XA_ symbols -for some reason. - -Copied X11KIT [.xaw3d] and [.xmu] into [.lib], put together simplified -build procedures. Made a few mods. Merged in some changes from -Patrick Young. Now these build mostly ok except for tons of bcopy -related warnings and problems with LAYOUT.C. - -Merged changes from Xterm021 into here. - -Made changes here and there to get it all to work. - -25-JAN-2000, more or less done. Logging doesn't work but PRINT -does, as does regular VT emulation, TEK emulation, 80 and 132 wide -modes. The resource file needs work. Cleaned up a really nasty problem -with infinite loops on copy/paste in button.c (see tt_pasting). - -To build this, if you have DECC, DW 1.2-5 and VMS 7.2-1 (the latter -probably doesn't matter) do: - -$ @make - -in the top directory. Expect a bunch of I and W warnings, but nothing -worse. Then define a foreign symbol for xterm for the resulting .exe. - -26-JAN-2000. Enabled logging. When this is turned on from the menu -it creates a new file SYS$SCRATCH:XTERM_LOG.TXT and writes everything that -goes to the screen into it. This may slow down output a bit as each block -of data read must be copied to disk. The log file has RMS format stream-lf -and typically has a <CR> at the end of each line. - -27-JAN-2000. Discovered a bug when doing an X11 paste into an EDT session, -had to add a tt_start_read() in button.c after the paste to reenable the -read AST. Rearranged code in VMS.C to make the compiler happy and -eliminate warnings. - -David Mathog -mathog@seqaxp.bio.caltech.edu -Manager, sequence analysis facility, biology division, Caltech - - -$XFree86: xc/programs/xterm/AAA_README_VMS.txt,v 1.2 2000/06/13 02:28:37 dawes Exp $ diff --git a/app/xterm/MANIFEST b/app/xterm/MANIFEST index 59f555025..a762700ab 100644 --- a/app/xterm/MANIFEST +++ b/app/xterm/MANIFEST @@ -1,11 +1,10 @@ -MANIFEST for xterm, version xterm-393 +MANIFEST for xterm, version xterm-395 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode 256colres.pl script to generate 256colres.h 88colres.h resource definitions for 88-color mode 88colres.pl script to generate 88colres.h -AAA_README_VMS.txt note for VMS port of 'xterm' COPYING license for this program INSTALL configure script: options and related install instructions Imakefile imake template for Makefile @@ -13,7 +12,6 @@ KOI8RXTerm.ad resources for koi8rxterm Makefile.in configure script template for Makefile README overview & caveats for 'xterm' README.i18n i18n readme: -README.os390 overview for os390 (EBCDIC) port of 'xterm' THANKS list of direct contributors TekPrsTbl.c Tek4014 parser state tables Tekparse.def template for generating Tekparse.h @@ -65,10 +63,8 @@ keysym2ucs.h interface of keysym2ucs.c koi8rxterm KOI-8 wrapper from Debian (originally me) koi8rxterm.man manpage for koi8rxterm linedata.c manage all line-data for VT100 widget -link_axp.com build-script for VMS port of xterm main.c main program of 'xterm' main.h default definitions for 'xterm' -make.com build-script for VMS port of 'xterm' menu.c popup/pulldown menus for 'xterm' menu.h interface of menu.c minstall.in script for installing manpages @@ -99,20 +95,16 @@ uxterm.desktop sample desktop file for uxterm uxterm.man manpage for uxterm, from Debian version.c xterm package version, used also in resize version.h version of xterm -vms.c VMS version of xterm's spawn(), etc. -vms.h system headers and definitions for vms.c wcwidth.c wide-character utility functions wcwidth.h interface of wcwidth.c xcharmouse.h Jason Bacon's mouse-defs, cleaned up a little xstrings.c a few common string functions xstrings.h interface of xstrings.c xterm.appdata.xml sample "appdata.xml" file -xterm.dat application defaults for VMS port of 'xterm' xterm.desktop sample desktop file for xterm. xterm.h common includes, definitions and prototypes for 'xterm' xterm.log.html changelog for xterm xterm.man manual page for 'xterm' -xterm_axp.opt linker options file for VMS port of 'xterm' xterm_io.h split-out definitions of termio/termios/sgtty and winsize from main.c, os2main.c, screen.c and resize.c xtermcap.c termcap-related functions. xtermcap.h interface of xtermcap.c diff --git a/app/xterm/NEWS b/app/xterm/NEWS index d0a7a2732..199f84d95 100644 --- a/app/xterm/NEWS +++ b/app/xterm/NEWS @@ -1,31 +1,18 @@ The NEWS file was generated from xterm.log.html, which serves as the changelog for xterm. -------------------------------------------------------------------------------- - Patch #393 - 2024/07/11 + Patch #395 - 2024/10/24 - * add a check for ANSI SC/RC, to ignore CSI parameters. - * improve check for missing characters for bitmap-fonts by using the - normal font for reference in the case where the current font, e.g., - the wide-font was derived from the normal font and lacks - per-character metrics (report by Rajeev V. Pillai). - * fix regression in error-recovery for SGR parameters from patch #357 - (report by James Holderness). - * remove some duplicates in xtermcfg.h (report by Matthew Green). - * change default for --enable-imake configure option. - * fixes for wcwidth: - + return 0 for format effectors, like a zero-width printing - character rather than -1 like a control character (report by - Rajeev V. Pillai). - + correct doublewidth to account for reserved codepoints which - are listed in the EastAsianWidth file. - + add a special case for surrogate pairs, which might be checked - in testing the wcwidth function. - * amend sixel bounds-check added in patch #371 to not wrap - out-of-bounds data. - * eliminate maxStringParse limit for SIXEL. - * improve logic which ignores APC, PM and SOS controls to also not - accumulate their data temporarily in a buffer. - * exclude TERM_INGRESS from cleanup of environment variables (patch - by Iain Riley). - * fix some documentation typos (report by Thomas Wolff). + * add DECRQSS response for DECSTGLT, i.e., ANSI SGR color. + * add Russian and SCS NRCS character set mappings. + * remove obsolete code for OS390 and VMS. + * minor fixes to work with vttest 20240929's 7-bit parsing test. + * improve DECRPM responses for unsupported modes; those which are + valid for a given DEC terminal are reported as permanently reset + rather than unknown. + * add JIS-Roman and JIS-Katakana character sets, for VT382. + * fix typo in ctlseqs.ms note about function key vs DSR (report by + Michael Thomas Greer). + * formatting fixes for ctlseqs.ms (report by Mark Manning). + * update tables in wcwidth.c based on Unicode 16.0.0 diff --git a/app/xterm/README.os390 b/app/xterm/README.os390 deleted file mode 100644 index 2fe50b604..000000000 --- a/app/xterm/README.os390 +++ /dev/null @@ -1,74 +0,0 @@ --- $XFree86: xc/programs/xterm/README.os390,v 1.3 2000/09/22 10:42:05 alanh Exp $ - -Below are install instructions for os/390 2.5 & below and -for os/390 2.6 & above. The basic reasons for exporting -the LIBS and CFLAGS variables is to get the configure -script to run properly under os/390. configure, when -checking for X, attempts to compile a program something like - - int main() { - XtMalloc() - ; return 0; } - -using 'cc -o conftest conftest.c -lXt'. However this results -in a number of linkedit messages such as: - - IEW2456E 9207 SYMBOL xcatd UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE - DESIGNATED CALL LIBRARY. NAME SPACE = 3 - IEW2456E 9207 SYMBOL XrmQGetResource UNRESOLVED. MEMBER COULD NOT BE INCLUDED - FROM THE DESIGNATED CALL LIBRARY. - IEW2456E 9207 SYMBOL XrmGetDatabase UNRESOLVED. MEMBER COULD NOT BE INCLUDED - FROM THE DESIGNATED CALL LIBRARY. - -The only way I can get this program to compile and link is to -use 'cc -o conftest conftest.c -lXt -lX11 -lSM -lICE'. -With os/390 2.6 and above, IBM has provided X functions in dlls; -this is the reason for the separate install steps. In fact, -trying to use the X archive files (eg -lX11) when linking xterm -results in an abend0C1 in low storage when X tries to call the -initialize function (at least on my system). This has something -to do with the calling X routine thinking it has a function pointer -descriptor (c++) when it actually has just a function pointer (c). -Unfortunately, I have been unable to recreate the problem in a -simple testcase, so I haven't reported it to IBM. Anyway, for os/390 -2.6 and above, configure will build a Makefile with the following line: - - LIBS = -lXaw -lXext -lXmu -lXt -lSM -lICE -lX11 /usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x -lcurses - -The '-lXaw -lXext -lXmu -lXt -lSM -lICE -lX11' should be manually removed; -this isn't strictly necessary, but will reduce the size of the executable -by about 4M. - -The '-Wl,EDIT=NO' causes the Binder to produce a non-editable executable, -dramatically reducing the size of the executable file. - -Good Luck!! -Greg Smith -rys@trex.rtpnc.epa.gov - - - -Install instructions for os/390 2.5 and *below*: ------------------------------------------------- - gunzip xterm.tar.gz - pax -o from=ISO8859-1,to=IBM-1047 -rf xterm.tar - cd xterm - export LIBS='-lXt -lX11 -lSM -lICE' - export CFLAGS='-D_ALL_SOURCE -Wl,EDIT=NO' - ./configure - make - export DISPLAY=my.xserver.name:0 - ./xterm - - -Install instructions for os/390 2.6 and *above*: ------------------------------------------------- - gunzip xterm.tar.gz - pax -o from=ISO8859-1,to=IBM-1047 -rf xterm.tar - cd xterm - ./configure # LIBS, CFLAGS, and CC are defined by configure for os/390 2.6. - [optional: edit the Makefile and remove '-lXaw -lXext -lXmu -lXt -lSM -lICE -lX11' - from the LIBS assignment] - make - export DISPLAY=my.xserver.name:0 - ./xterm diff --git a/app/xterm/THANKS b/app/xterm/THANKS index 1964ab437..9b6b8bce3 100644 --- a/app/xterm/THANKS +++ b/app/xterm/THANKS @@ -1,4 +1,4 @@ --- $XTermId: THANKS,v 1.39 2024/02/10 01:24:54 tom Exp $ +-- $XTermId: THANKS,v 1.40 2024/08/11 23:05:42 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. @@ -49,6 +49,7 @@ Brendan O' Dea Bruno Haible Cade Foster Caetano Jimenez Carezzato +Casper Dik Chris Adams Chris Clayton Christian Biere @@ -104,6 +105,7 @@ Greg Smith H Merijn Brand Hasso Tepper Holger Veit +Iain Riley Ilya Zakharevich Ingo Brückl Iwamoto Kouichi @@ -138,6 +140,7 @@ Ken Martin Kevin Buhr Kevin Ryde Kevin Schoedel +Khem Raj Kiyokazu Suto Larry Hynes Larry Riedel diff --git a/app/xterm/TekPrsTbl.c b/app/xterm/TekPrsTbl.c index a16d18de1..4b95a702b 100644 --- a/app/xterm/TekPrsTbl.c +++ b/app/xterm/TekPrsTbl.c @@ -1,7 +1,7 @@ -/* $XTermId: TekPrsTbl.c,v 1.9 2006/02/13 01:14:57 tom Exp $ */ +/* $XTermId: TekPrsTbl.c,v 1.10 2024/09/02 16:07:11 tom Exp $ */ /* - * Copyright 1998-2001,2006 by Thomas E. Dickey + * Copyright 1998-2006,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -54,8 +54,9 @@ /* $XFree86: xc/programs/xterm/TekPrsTbl.c,v 3.5 2006/02/13 01:14:57 dickey Exp $ */ #include <Tekparse.h> +/* *INDENT-OFF* */ -Const int Talptable[] = /* US (^_) normal alpha mode */ +const int Talptable[] = /* US (^_) normal alpha mode */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -379,7 +380,7 @@ CASE_PRINT, CASE_PRINT, }; -Const int Tbestable[] = /* ESC while in bypass state */ +const int Tbestable[] = /* ESC while in bypass state */ { /* NUL SOH STX ETX */ CASE_BYP_STATE, @@ -703,7 +704,7 @@ CASE_BYP_STATE, CASE_BYP_STATE, }; -Const int Tbyptable[] = /* ESC CAN (^X) bypass state */ +const int Tbyptable[] = /* ESC CAN (^X) bypass state */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -1027,7 +1028,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const int Tesctable[] = /* ESC */ +const int Tesctable[] = /* ESC */ { /* NUL SOH STX ETX */ CASE_CURSTATE, @@ -1351,7 +1352,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const int Tipltable[] = /* RS (^^) incremental plot */ +const int Tipltable[] = /* RS (^^) incremental plot */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -1675,7 +1676,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const int Tplttable[] = /* GS (^]) graph (plot) mode */ +const int Tplttable[] = /* GS (^]) graph (plot) mode */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -1999,7 +2000,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const int Tpttable[] = /* FS (^\) point plot mode */ +const int Tpttable[] = /* FS (^\) point plot mode */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -2323,7 +2324,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const int Tspttable[] = /* ESC FS (^\) special point plot */ +const int Tspttable[] = /* ESC FS (^\) special point plot */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -2646,3 +2647,4 @@ CASE_IGNORE, CASE_IGNORE, CASE_IGNORE, }; +/* *INDENT-ON* */ diff --git a/app/xterm/Tekparse.h b/app/xterm/Tekparse.h index aac98513f..8eb72107d 100644 --- a/app/xterm/Tekparse.h +++ b/app/xterm/Tekparse.h @@ -1,7 +1,7 @@ -/* $XTermId: Tekparse.h,v 1.8 2016/10/06 00:32:30 tom Exp $ */ +/* $XTermId: Tekparse.h,v 1.9 2024/09/02 16:05:58 tom Exp $ */ /* - * Copyright 1998-2006,2016 by Thomas E. Dickey + * Copyright 1998-2016,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -33,22 +33,14 @@ #ifndef included_Tekparse_h #define included_Tekparse_h 1 -#ifndef Const -# if defined(__STDC__) && !defined(__cplusplus) -# define Const const -# else -# define Const /**/ -# endif -#endif - -extern Const int Talptable[]; -extern Const int Tbestable[]; -extern Const int Tbyptable[]; -extern Const int Tesctable[]; -extern Const int Tipltable[]; -extern Const int Tplttable[]; -extern Const int Tpttable[]; -extern Const int Tspttable[]; +extern const int Talptable[]; +extern const int Tbestable[]; +extern const int Tbyptable[]; +extern const int Tesctable[]; +extern const int Tipltable[]; +extern const int Tplttable[]; +extern const int Tpttable[]; +extern const int Tspttable[]; #include <Tekparse.hin> diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c index dd24882d3..7ffa27f32 100644 --- a/app/xterm/Tekproc.c +++ b/app/xterm/Tekproc.c @@ -1,7 +1,7 @@ -/* $XTermId: Tekproc.c,v 1.249 2022/10/06 19:41:47 tom Exp $ */ +/* $XTermId: Tekproc.c,v 1.252 2024/09/30 07:44:22 tom Exp $ */ /* - * Copyright 2001-2021,2022 by Thomas E. Dickey + * Copyright 2001-2022,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -181,8 +181,8 @@ static jmp_buf Tekjump; static TekLink *TekRecord; static XSegment *Tline; -static Const int *curstate = Talptable; -static Const int *Tparsestate = Talptable; +static const int *curstate = Talptable; +static const int *Tparsestate = Talptable; static char defaultTranslations[] = "\ ~Meta<KeyPress>: insert-seven-bit() \n\ @@ -258,11 +258,7 @@ static Dimension defOne = 1; #define GIN_TERM_CR 1 #define GIN_TERM_EOT 2 -#ifdef VMS -#define DFT_FONT_SMALL "FIXED" -#else #define DFT_FONT_SMALL "6x10" -#endif static XtResource resources[] = { @@ -822,11 +818,7 @@ Tinput(TekWidget tw) if (nplot > 0) /* flush line */ TekFlush(tw); -#ifdef VMS - Tselect_mask = pty_mask; /* force a read */ -#else /* VMS */ XFD_COPYSET(&pty_mask, &Tselect_mask); -#endif /* VMS */ for (;;) { #ifdef CRAY struct timeval crocktimeout; @@ -844,17 +836,9 @@ Tinput(TekWidget tw) Ttoggled = False; } if (xtermAppPending() & XtIMXEvent) { -#ifdef VMS - Tselect_mask = X_mask; -#else /* VMS */ XFD_COPYSET(&X_mask, &Tselect_mask); -#endif /* VMS */ } else { XFlush(XtDisplay(tw)); -#ifdef VMS - Tselect_mask = Select_mask; - -#else /* VMS */ XFD_COPYSET(&Select_mask, &Tselect_mask); if (need_cleanup) Cleanup(0); @@ -863,21 +847,12 @@ Tinput(TekWidget tw) SysError(ERROR_TSELECT); continue; } -#endif /* VMS */ - } -#ifdef VMS - if (Tselect_mask & X_mask) { - xevents(tw->vt); - if (VTbuffer->update != update) - goto again; } -#else /* VMS */ if (FD_ISSET(ConnectionNumber(XtDisplay(tw)), &Tselect_mask)) { xevents(tw->vt); if (VTbuffer->update != update) goto again; } -#endif /* VMS */ } if (!Ttoggled && curstate == Talptable) { TCursorToggle(tw, TOGGLE); @@ -1336,11 +1311,7 @@ TekEnq(TekWidget tw, cplot[len++] = '\r'; if (tekscr->gin_terminator == GIN_TERM_EOT) cplot[len++] = '\004'; -#ifdef VMS - tt_write(cplot + adj, (size_t) (len - adj)); -#else /* VMS */ v_write(screen->respond, cplot + adj, (size_t) (len - adj)); -#endif /* VMS */ } void @@ -1355,7 +1326,7 @@ TekRun(void) if (tekWidget != 0) { TRACE(("TekRun ...\n")); - if (!TEK4014_SHOWN(xw)) { + if (!TEK4014_SHOWN(xw) && !resource.notMapped) { set_tek_visibility(True); } update_vttekmode(); @@ -2030,12 +2001,10 @@ TekCopy(TekWidget tw) Bell(tw->vt, XkbBI_MinorError, 0); return; } -#ifndef VMS if (access(".", W_OK) < 0) { /* can't write in directory */ Bell(tw->vt, XkbBI_MinorError, 0); return; } -#endif tekcopyfd = open_userfile(screen->uid, screen->gid, buf, False); if (tekcopyfd >= 0) { diff --git a/app/xterm/VTPrsTbl.c b/app/xterm/VTPrsTbl.c index d5952eef9..d6f2d5f1b 100644 --- a/app/xterm/VTPrsTbl.c +++ b/app/xterm/VTPrsTbl.c @@ -1,7 +1,7 @@ -/* $XTermId: VTPrsTbl.c,v 1.117 2023/12/27 22:46:08 tom Exp $ */ +/* $XTermId: VTPrsTbl.c,v 1.120 2024/10/03 23:02:04 tom Exp $ */ /* - * Copyright 1999-2022,2023 by Thomas E. Dickey + * Copyright 1999-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -93,7 +93,7 @@ * it happy, we put each onto a separate line.... Sigh... */ -Const PARSE_T ansi_table[] = +const PARSE_T ansi_table[] = { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -417,7 +417,7 @@ CASE_PRINT, CASE_PRINT, }; -Const PARSE_T csi_table[] = /* CSI */ +const PARSE_T csi_table[] = /* CSI */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -741,7 +741,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T csi2_table[] = /* CSI */ +const PARSE_T csi2_table[] = /* CSI */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -1065,7 +1065,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T csi_ex_table[] = /* CSI ! */ +const PARSE_T csi_ex_table[] = /* CSI ! */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -1389,7 +1389,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T csi_quo_table[] = /* CSI ... " */ +const PARSE_T csi_quo_table[] = /* CSI ... " */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -1714,7 +1714,7 @@ CASE_IGNORE, }; #if OPT_BLINK_CURS -Const PARSE_T csi_sp_table[] = /* CSI ... SP */ +const PARSE_T csi_sp_table[] = /* CSI ... SP */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -2039,7 +2039,7 @@ CASE_IGNORE, }; #endif -Const PARSE_T csi_tick_table[] = /* CSI ... ' */ +const PARSE_T csi_tick_table[] = /* CSI ... ' */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -2364,7 +2364,7 @@ CASE_IGNORE, }; #if OPT_XTERM_SGR -Const PARSE_T csi_hash_table[] = /* CSI ... # */ +const PARSE_T csi_hash_table[] = /* CSI ... # */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -2689,7 +2689,7 @@ CASE_GROUND_STATE, }; #endif -Const PARSE_T csi_amp_table[] = /* CSI ... & */ +const PARSE_T csi_amp_table[] = /* CSI ... & */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -3014,7 +3014,7 @@ CASE_GROUND_STATE, }; #if OPT_DEC_RECTOPS -Const PARSE_T csi_dollar_table[] = /* CSI ... $ */ +const PARSE_T csi_dollar_table[] = /* CSI ... $ */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -3338,7 +3338,7 @@ CASE_DECSSDT, CASE_GROUND_STATE, }; -Const PARSE_T csi_star_table[] = /* CSI ... * */ +const PARSE_T csi_star_table[] = /* CSI ... * */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -3664,7 +3664,7 @@ CASE_GROUND_STATE, #endif /* OPT_DEC_RECTOPS */ #if OPT_VT525_COLORS -Const PARSE_T csi_comma_table[] = /* CSI ... , */ +const PARSE_T csi_comma_table[] = /* CSI ... , */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -3989,7 +3989,7 @@ CASE_GROUND_STATE, }; #endif /* OPT_VT525_COLORS */ -Const PARSE_T dec_table[] = /* CSI ? */ +const PARSE_T dec_table[] = /* CSI ? */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -4314,7 +4314,7 @@ CASE_IGNORE, }; #if OPT_DEC_RECTOPS -Const PARSE_T csi_dec_dollar_table[] = /* CSI ?... $ */ +const PARSE_T csi_dec_dollar_table[] = /* CSI ?... $ */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -4639,7 +4639,7 @@ CASE_GROUND_STATE, }; #endif /* OPT_DEC_RECTOPS */ -Const PARSE_T dec2_table[] = /* CSI > */ +const PARSE_T dec2_table[] = /* CSI > */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -4963,7 +4963,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T dec3_table[] = /* CSI = */ +const PARSE_T dec3_table[] = /* CSI = */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -5287,7 +5287,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T cigtable[] = /* CASE_CSI_IGNORE */ +const PARSE_T cigtable[] = /* CASE_CSI_IGNORE */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -5611,7 +5611,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T eigtable[] = /* CASE_ESC_IGNORE */ +const PARSE_T eigtable[] = /* CASE_ESC_IGNORE */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -5935,7 +5935,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T esc_table[] = /* ESC */ +const PARSE_T esc_table[] = /* ESC */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -6259,7 +6259,7 @@ CASE_LS1R, CASE_IGNORE, }; -Const PARSE_T esc_sp_table[] = /* ESC SP */ +const PARSE_T esc_sp_table[] = /* ESC SP */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -6583,7 +6583,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T scrtable[] = /* ESC # */ +const PARSE_T scrtable[] = /* ESC # */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -6907,7 +6907,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T scstable[] = /* ESC ( etc. */ +const PARSE_T scstable[] = /* ESC ( etc. */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -7001,8 +7001,8 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, /* H I J K */ CASE_GSETS, -CASE_GROUND_STATE, -CASE_GROUND_STATE, +CASE_GSETS, +CASE_GSETS, CASE_GSETS, /* L M N O */ CASE_GROUND_STATE, @@ -7161,8 +7161,8 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, /* Egrave Eacute Ecircumflex Ediaeresis */ CASE_GSETS, -CASE_GROUND_STATE, -CASE_GROUND_STATE, +CASE_GSETS, +CASE_GSETS, CASE_GSETS, /* Igrave Iacute Icircumflex Idiaeresis */ CASE_GROUND_STATE, @@ -7231,7 +7231,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T scs96table[] = /* ESC - etc. */ +const PARSE_T scs96table[] = /* ESC - etc. */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -7559,7 +7559,7 @@ CASE_IGNORE, * This table is treated specially. The CASE_IGNORE entries correspond to the * characters that can be accumulated for the string function (e.g., OSC). */ -Const PARSE_T sos_table[] = /* OSC, DCS, etc. */ +const PARSE_T sos_table[] = /* OSC, DCS, etc. */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -7884,7 +7884,7 @@ CASE_IGNORE, }; #if OPT_WIDE_CHARS -Const PARSE_T esc_pct_table[] = /* ESC % */ +const PARSE_T esc_pct_table[] = /* ESC % */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -8208,7 +8208,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T scs_2qt_table[] = /* SCS " */ +const PARSE_T scs_2qt_table[] = /* SCS " */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -8532,7 +8532,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T scs_amp_table[] = /* SCS & */ +const PARSE_T scs_amp_table[] = /* SCS & */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -8601,7 +8601,7 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, /* 4 5 6 7 */ CASE_GSETS_AMPRSND, -CASE_GROUND_STATE, +CASE_GSETS_AMPRSND, CASE_GROUND_STATE, CASE_GROUND_STATE, /* 8 9 : ; */ @@ -8761,7 +8761,7 @@ CASE_GROUND_STATE, CASE_GROUND_STATE, /* acute mu paragraph periodcentered */ CASE_GSETS_AMPRSND, -CASE_GROUND_STATE, +CASE_GSETS_AMPRSND, CASE_GROUND_STATE, CASE_GROUND_STATE, /* cedilla onesuperior masculine guillemotright */ @@ -8856,7 +8856,7 @@ CASE_GROUND_STATE, CASE_IGNORE, }; -Const PARSE_T scs_pct_table[] = /* SCS % */ +const PARSE_T scs_pct_table[] = /* SCS % */ { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -9182,7 +9182,7 @@ CASE_IGNORE, #endif /* OPT_WIDE_CHARS */ #if OPT_VT52_MODE -Const PARSE_T vt52_table[] = +const PARSE_T vt52_table[] = { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -9506,7 +9506,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const PARSE_T vt52_esc_table[] = +const PARSE_T vt52_esc_table[] = { /* NUL SOH STX ETX */ CASE_IGNORE, @@ -9830,7 +9830,7 @@ CASE_IGNORE, CASE_IGNORE, }; -Const PARSE_T vt52_ignore_table[] = +const PARSE_T vt52_ignore_table[] = { /* NUL SOH STX ETX */ CASE_IGNORE, diff --git a/app/xterm/VTparse.h b/app/xterm/VTparse.h index 940ab225c..c83491f4f 100644 --- a/app/xterm/VTparse.h +++ b/app/xterm/VTparse.h @@ -1,7 +1,7 @@ -/* $XTermId: VTparse.h,v 1.72 2023/11/24 13:18:38 tom Exp $ */ +/* $XTermId: VTparse.h,v 1.73 2024/09/02 16:06:16 tom Exp $ */ /* - * Copyright 1996-2019,2023 by Thomas E. Dickey + * Copyright 1996-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -35,64 +35,56 @@ #include <xterm.h> -#ifndef Const -# if defined(__STDC__) && !defined(__cplusplus) -# define Const const -# else -# define Const /**/ -# endif -#endif - /* * PARSE_T has to be large enough to handle the number of cases enumerated here. */ typedef unsigned char PARSE_T; -extern Const PARSE_T ansi_table[]; -extern Const PARSE_T cigtable[]; -extern Const PARSE_T csi2_table[]; -extern Const PARSE_T csi_amp_table[]; -extern Const PARSE_T csi_dec_dollar_table[]; -extern Const PARSE_T csi_ex_table[]; -extern Const PARSE_T csi_quo_table[]; -extern Const PARSE_T csi_sp_table[]; -extern Const PARSE_T csi_table[]; -extern Const PARSE_T csi_tick_table[]; -extern Const PARSE_T dec2_table[]; -extern Const PARSE_T dec3_table[]; -extern Const PARSE_T dec_table[]; -extern Const PARSE_T eigtable[]; -extern Const PARSE_T esc_sp_table[]; -extern Const PARSE_T esc_table[]; -extern Const PARSE_T scrtable[]; -extern Const PARSE_T scs96table[]; -extern Const PARSE_T scstable[]; -extern Const PARSE_T sos_table[]; +extern const PARSE_T ansi_table[]; +extern const PARSE_T cigtable[]; +extern const PARSE_T csi2_table[]; +extern const PARSE_T csi_amp_table[]; +extern const PARSE_T csi_dec_dollar_table[]; +extern const PARSE_T csi_ex_table[]; +extern const PARSE_T csi_quo_table[]; +extern const PARSE_T csi_sp_table[]; +extern const PARSE_T csi_table[]; +extern const PARSE_T csi_tick_table[]; +extern const PARSE_T dec2_table[]; +extern const PARSE_T dec3_table[]; +extern const PARSE_T dec_table[]; +extern const PARSE_T eigtable[]; +extern const PARSE_T esc_sp_table[]; +extern const PARSE_T esc_table[]; +extern const PARSE_T scrtable[]; +extern const PARSE_T scs96table[]; +extern const PARSE_T scstable[]; +extern const PARSE_T sos_table[]; #if OPT_DEC_RECTOPS -extern Const PARSE_T csi_dollar_table[]; -extern Const PARSE_T csi_star_table[]; +extern const PARSE_T csi_dollar_table[]; +extern const PARSE_T csi_star_table[]; #endif /* OPT_DEC_LOCATOR */ #if OPT_VT52_MODE -extern Const PARSE_T vt52_table[]; -extern Const PARSE_T vt52_esc_table[]; -extern Const PARSE_T vt52_ignore_table[]; +extern const PARSE_T vt52_table[]; +extern const PARSE_T vt52_esc_table[]; +extern const PARSE_T vt52_ignore_table[]; #endif #if OPT_VT525_COLORS -extern Const PARSE_T csi_comma_table[]; +extern const PARSE_T csi_comma_table[]; #endif #if OPT_WIDE_CHARS -extern Const PARSE_T esc_pct_table[]; -extern Const PARSE_T scs_amp_table[]; -extern Const PARSE_T scs_pct_table[]; -extern Const PARSE_T scs_2qt_table[]; +extern const PARSE_T esc_pct_table[]; +extern const PARSE_T scs_amp_table[]; +extern const PARSE_T scs_pct_table[]; +extern const PARSE_T scs_2qt_table[]; #endif #if OPT_XTERM_SGR -extern Const PARSE_T csi_hash_table[]; +extern const PARSE_T csi_hash_table[]; #endif #include <VTparse.hin> diff --git a/app/xterm/button.c b/app/xterm/button.c index ae1ae43f5..02e25a8d8 100644 --- a/app/xterm/button.c +++ b/app/xterm/button.c @@ -1,4 +1,4 @@ -/* $XTermId: button.c,v 1.663 2024/04/19 07:42:00 tom Exp $ */ +/* $XTermId: button.c,v 1.666 2024/09/30 07:44:57 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -2285,11 +2285,7 @@ GettingSelection(Display *dpy, Atom type, Char *line, unsigned long len) #define GettingSelection(dpy,type,line,len) /* nothing */ #endif -#ifdef VMS -# define tty_vwrite(pty,lag,l) tt_write(lag,l) -#else /* !( VMS ) */ -# define tty_vwrite(pty,lag,l) v_write(pty,lag,(size_t) l) -#endif /* defined VMS */ +#define tty_vwrite(pty,lag,l) v_write(pty,lag,(size_t) l) #if OPT_PASTE64 /* Return base64 code character given 6-bit number */ @@ -2487,14 +2483,6 @@ _WriteSelectionData(XtermWidget xw, Char *line, size_t length) TScreen *screen = TScreenOf(xw); #endif - /* in the VMS version, if tt_pasting isn't set to True then qio - reads aren't blocked and an infinite loop is entered, where the - pasted text shows up as new input, goes in again, shows up - again, ad nauseum. */ -#ifdef VMS - tt_pasting = True; -#endif - #if OPT_PASTE64 if (screen->base64_paste) { _qWriteSelectionData(xw, line, length); @@ -2513,10 +2501,6 @@ _WriteSelectionData(XtermWidget xw, Char *line, size_t length) _qWriteSelectionData(xw, line, length); } -#ifdef VMS - tt_pasting = False; - tt_start_read(); /* reenable reads or a character may be lost */ -#endif } #if OPT_PASTE64 || OPT_READLINE @@ -3754,7 +3738,13 @@ okPosition(TScreen *screen, { Boolean result = True; - if (cell->row > screen->max_row) { + assert(ld != NULL); + assert(*ld != NULL); + + if (*ld == NULL) { + result = False; + TRACE(("okPosition LineData is null!\n")); + } else if (cell->row > screen->max_row) { result = False; TRACE(("okPosition cell row %d > screen max %d\n", cell->row, screen->max_row)); } else if (cell->col > (LastTextCol(screen, *ld, cell->row) + 1)) { @@ -5168,7 +5158,7 @@ SaveText(TScreen *screen, for (i = scol; i < ecol; i++) { unsigned c; assert(i < (int) ld->lineSize); - c = E2A(ld->charData[i]); + c = ld->charData[i]; if (ld->attribs[i] & INVISIBLE) continue; #if OPT_WIDE_CHARS @@ -5212,15 +5202,15 @@ SaveText(TScreen *screen, #endif { if (c == 0) { - c = E2A(' '); - } else if (c < E2A(' ')) { + c = ' '; + } else if (c < ' ') { c = DECtoASCII(c); } else if (c == 0x7f) { c = 0x5f; } - *lp++ = CharOf(A2E(c)); + *lp++ = CharOf(c); } - if (c != E2A(' ')) + if (c != ' ') result = lp; } diff --git a/app/xterm/cachedGCs.c b/app/xterm/cachedGCs.c index cbba73173..c01693770 100644 --- a/app/xterm/cachedGCs.c +++ b/app/xterm/cachedGCs.c @@ -1,4 +1,4 @@ -/* $XTermId: cachedGCs.c,v 1.82 2024/05/17 20:59:36 tom Exp $ */ +/* $XTermId: cachedGCs.c,v 1.83 2024/09/01 21:26:44 tom Exp $ */ /* * Copyright 2007-2021,2024 by Thomas E. Dickey @@ -121,7 +121,7 @@ traceCgsEnum(CgsEnum value) #undef CASE static const char * -traceVTwin(XtermWidget xw, VTwin *value) +traceVTwin(XtermWidget xw, const VTwin *value) { const char *result = "?"; if (value == 0) diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c index c49284ba7..fbf7301a1 100644 --- a/app/xterm/charproc.c +++ b/app/xterm/charproc.c @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.2032 2024/07/10 21:09:42 tom Exp $ */ +/* $XTermId: charproc.c,v 1.2047 2024/10/03 22:56:45 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -870,14 +870,7 @@ static void VTResize(Widget w); static void VTInitI18N(XtermWidget); #endif -#ifdef VMS -globaldef { - "xtermclassrec" -} noshare - -#else static -#endif /* VMS */ WidgetClassRec xtermClassRec = { { @@ -917,12 +910,6 @@ WidgetClassRec xtermClassRec = } }; -#ifdef VMS -globaldef { - "xtermwidgetclass" -} -noshare -#endif /* VMS */ WidgetClass xtermWidgetClass = (WidgetClass) & xtermClassRec; /* @@ -1231,7 +1218,7 @@ saveCharsets(TScreen *screen, DECNRCM_codes * target) } void -restoreCharsets(TScreen *screen, DECNRCM_codes * source) +restoreCharsets(TScreen *screen, const DECNRCM_codes * source) { int g; for (g = 0; g < NUM_GSETS2; ++g) { @@ -1417,7 +1404,7 @@ set_max_row(TScreen *screen, int rows) #if OPT_TRACE #define DATA(name) { name, #name } static const struct { - Const PARSE_T *table; + const PARSE_T *table; const char *name; } all_tables[] = { @@ -1471,7 +1458,7 @@ static const struct { #define WHICH_TABLE(name) if (table == name) result = #name static const char * -which_table(Const PARSE_T * table) +which_table(const PARSE_T * table) { const char *result = "?"; Cardinal n; @@ -1496,7 +1483,7 @@ check_tables(void) TRACE(("** check_tables\n")); for (n = 0; n < XtNumber(all_tables); ++n) { - Const PARSE_T *table = all_tables[n].table; + const PARSE_T *table = all_tables[n].table; TRACE(("*** %s\n", all_tables[n].name)); /* * Most of the tables should use the same codes in 0..31, 128..159 @@ -1571,7 +1558,7 @@ check_bitmasks(void) static struct { int mode; int code; - Const char *name; + const char *name; } table[] = { DATA(DGRP(1), INVERSE), DATA(DGRP(1), UNDERLINE), @@ -1736,8 +1723,8 @@ struct ParseState { #if OPT_VT52_MODE Bool vt52_cup; #endif - Const PARSE_T *groundtable; - Const PARSE_T *parsestate; + const PARSE_T *groundtable; + const PARSE_T *parsestate; int scstype; int scssize; Bool private_function; /* distinguish private-mode from standard */ @@ -1835,9 +1822,13 @@ static const struct { { nrc_Norwegian_Danish, 0, '`', 3, 9, 1, 0 }, { nrc_Portugese, '%', '6', 3, 9, 1, 0 }, { nrc_ISO_Latin_1_Supp, 0, 'A', 3, 9, 0, 1 }, + { nrc_JIS_Katakana, 0, 'I', 3, 3, 0, 0 }, + { nrc_JIS_Roman, 0, 'J', 3, 3, 0, 0 }, /* VT5xx */ { nrc_Greek, '"', '>', 5, 9, 1, 0 }, { nrc_Hebrew, '%', '=', 5, 9, 1, 0 }, + { nrc_Russian, '&', '5', 5, 9, 1, 0 }, + { nrc_SCS_NRCS, '%', '3', 5, 9, 1, 0 }, { nrc_Turkish, '%', '2', 5, 9, 1, 0 }, { nrc_DEC_Cyrillic, '&', '4', 5, 9, 0, 0 }, { nrc_DEC_Greek_Supp, '"', '?', 5, 9, 0, 0 }, @@ -1848,11 +1839,6 @@ static const struct { { nrc_ISO_Latin_2_Supp, 0, 'B', 5, 9, 0, 1 }, { nrc_ISO_Latin_5_Supp, 0, 'M', 5, 9, 0, 1 }, { nrc_ISO_Latin_Cyrillic,0, 'L', 5, 9, 0, 1 }, - /* VT5xx (not implemented) */ -#if 0 - { nrc_Russian, '&', '5', 5, 9, 1, 0 }, - { nrc_SCS_NRCS, '%', '3', 5, 9, 0, 0 }, -#endif }; /* *INDENT-ON* */ @@ -1901,7 +1887,8 @@ xtermDecodeSCS(XtermWidget xw, int which, int sgroup, int prefix, int suffix) Cardinal n; DECNRCM_codes result = nrc_Unknown; - suffix &= 0x7f; + prefix = AsciiOf(prefix); + suffix = AsciiOf(suffix); for (n = 0; n < XtNumber(scs_table); ++n) { if (prefix == scs_table[n].prefix && suffix == scs_table[n].suffix @@ -2205,22 +2192,17 @@ only_default(void) } static int -zero_if_default(int which) +use_default_value(int which, int default_value) { - int result = (nparam > which) ? GetParam(which) : 0; + int result = (nparam > which) ? GetParam(which) : default_value; if (result <= 0) - result = 0; + result = default_value; return result; } -static int -one_if_default(int which) -{ - int result = (nparam > which) ? GetParam(which) : 0; - if (result <= 0) - result = 1; - return result; -} +#define zero_if_default(which) use_default_value(which, 0) + +#define one_if_default(which) use_default_value(which, 1) #define BeginString(mode) \ do { \ @@ -2319,7 +2301,7 @@ static void illegal_parse(XtermWidget xw, unsigned c, struct ParseState *sp) { ResetState(sp); - sp->nextstate = sp->parsestate[E2A(c)]; + sp->nextstate = sp->parsestate[c]; Bell(xw, XkbBI_MinorError, 0); } @@ -2939,6 +2921,8 @@ update_vt52_vt100_settings(void) } #endif +#define TRACE_GSETS(name) TRACE(("CASE_GSETS%s(%d) = '%c'\n", name, sp->scstype, AsciiOf(c))) + static Boolean doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) { @@ -3047,7 +3031,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) #if OPT_VT52_MODE if (sp->vt52_cup) { if (nparam < NPARAM - 1) { - SetParam(nparam++, (int) (c & 0x7f) - 32); + SetParam(nparam++, (int) AsciiOf(c) - 32); parms.is_sub[nparam] = 0; } if (nparam < 2) @@ -3092,7 +3076,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) } } else #endif - sp->nextstate = sp->parsestate[E2A(c)]; + sp->nextstate = sp->parsestate[c]; #if OPT_BROKEN_OSC /* @@ -3161,7 +3145,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) && (c >= 128 && c < 256)) { sp->nextstate = (sp->parsestate == esc_table ? CASE_ESC_IGNORE - : sp->parsestate[E2A(160)]); + : sp->parsestate[160]); TRACE(("allowC1Printable %04X %s ->%s\n", c, which_table(sp->parsestate), visibleVTparse(sp->nextstate))); @@ -3212,7 +3196,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) * doing this for so long we shouldn't change this behavior. */ if (screen->vtXX_level < 1) - c &= 0x7f; + c = AsciiOf(c); #endif sp->print_area[sp->print_used++] = (IChar) c; sp->lastchar = thischar = (int) c; @@ -3256,7 +3240,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) else if (sp->string_args == sa_SIXEL) { /* avoid adding the string-terminator */ if (sos_table[CharOf(c)] == CASE_IGNORE) - parse_sixel_char((char) c); + parse_sixel_char(AsciiOf(c)); } #endif else if (sp->string_skip) { @@ -3279,7 +3263,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) * parameters to the first non-parameter character and * inspecting it. Since both are DCS, we can also ignore OSC. */ - sp->string_area[(sp->string_used)++] = CharOf(c); + sp->string_area[(sp->string_used)++] = AsciiOf(c); if (sp->string_args < sa_LAST) { switch (c) { case ':': @@ -3543,16 +3527,20 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) break; case CASE_DECDHL: - xterm_DECDHL(xw, c == '3'); + TRACE(("CASE_DECDHL - double-height line: %s\n", + (AsciiOf(c) == '3') ? "top" : "bottom")); + xterm_DECDHL(xw, AsciiOf(c) == '3'); ResetState(sp); break; case CASE_DECSWL: + TRACE(("CASE_DECSWL - single-width line\n")); xterm_DECSWL(xw); ResetState(sp); break; case CASE_DECDWL: + TRACE(("CASE_DECDWL - double-width line\n")); xterm_DECDWL(xw); ResetState(sp); break; @@ -3606,7 +3594,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) /* digit in csi or dec mode */ if (nparam > 0) { value = zero_if_default(nparam - 1); - SetParam(nparam - 1, (10 * value) + ((int) c - '0')); + SetParam(nparam - 1, (10 * value) + (int) (AsciiOf(c) - '0')); if (GetParam(nparam - 1) > MAX_I_PARAM) SetParam(nparam - 1, MAX_I_PARAM); if (sp->parsestate == csi_table) @@ -4560,7 +4548,7 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_GSETS5: if (screen->vtXX_level >= 5) { - TRACE(("CASE_GSETS5(%d) = '%c'\n", sp->scstype, c)); + TRACE_GSETS("5"); xtermDecodeSCS(xw, sp->scstype, 5, 0, (int) c); } ResetState(sp); @@ -4568,18 +4556,18 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_GSETS3: if (screen->vtXX_level >= 3) { - TRACE(("CASE_GSETS3(%d) = '%c'\n", sp->scstype, c)); + TRACE_GSETS("3"); xtermDecodeSCS(xw, sp->scstype, 3, 0, (int) c); } ResetState(sp); break; case CASE_GSETS: - if (strchr("012AB", (int) c) != 0) { - TRACE(("CASE_GSETS(%d) = '%c'\n", sp->scstype, c)); + if (strchr("012AB", AsciiOf(c)) != 0) { + TRACE_GSETS(""); xtermDecodeSCS(xw, sp->scstype, 1, 0, (int) c); } else if (screen->vtXX_level >= 2) { - TRACE(("CASE_GSETS(%d) = '%c'\n", sp->scstype, c)); + TRACE_GSETS(""); xtermDecodeSCS(xw, sp->scstype, 2, 0, (int) c); } ResetState(sp); @@ -5366,10 +5354,15 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) case CASE_DECFRA: if (screen->vtXX_level >= 4) { - value = zero_if_default(0); + value = use_default_value(0, ' '); TRACE(("CASE_DECFRA - Fill rectangular area\n")); - if (nparam > 0 && CharWidth(screen, value) > 0) { + /* DEC 070, page 5-170 says the fill-character is either + * ASCII or Latin1; xterm allows printable Unicode values. + */ + if (nparam > 0 + && ((value >= 256 && CharWidth(screen, value) > 0) + || IsLatin1(value))) { xtermParseRect(xw, ParamPair(1), &myRect); ScrnFillRectangle(xw, &myRect, value, xw->flags, True); } @@ -5926,19 +5919,19 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp) TRACE(("CASE_UTF8 wide:%d, utf8:%d, req:%s\n", screen->wide_chars, screen->utf8_mode, - BtoS(c == 'G'))); - if ((!screen->wide_chars) && (c == 'G')) { + BtoS(AsciiOf(c) == 'G'))); + if ((!screen->wide_chars) && (AsciiOf(c) == 'G')) { WriteNow(); ChangeToWide(xw); } if (screen->wide_chars && !screen->utf8_always) { - switchPtyData(screen, c == 'G'); + switchPtyData(screen, AsciiOf(c) == 'G'); TRACE(("UTF8 mode %s\n", BtoS(screen->utf8_mode))); } else { TRACE(("UTF8 mode NOT turned %s (%s)\n", - BtoS(c == 'G'), + BtoS(AsciiOf(c) == 'G'), (screen->utf8_mode == uAlways) ? "UTF-8 mode set from command-line" : "wideChars resource was not set")); @@ -5953,7 +5946,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)); + TRACE_GSETS("_DQUOTE"); xtermDecodeSCS(xw, sp->scstype, 5, '"', (int) c); } ResetState(sp); @@ -5966,7 +5959,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)); + TRACE_GSETS("_AMPRSND"); xtermDecodeSCS(xw, sp->scstype, 5, '&', (int) c); } ResetState(sp); @@ -5979,8 +5972,8 @@ 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)); - switch (c) { + TRACE_GSETS("_PERCENT"); + switch (AsciiOf(c)) { case '0': /* DEC Turkish */ case '2': /* Turkish */ case '=': /* Hebrew */ @@ -6221,17 +6214,10 @@ v_write(int f, const Char *data, size_t len) fprintf(stderr, "\n"); }); -#ifdef VMS - if ((1 << f) != pty_mask) { - tt_write((const char *) data, len); - return; - } -#else /* VMS */ if (!FD_ISSET(f, &pty_mask)) { IGNORE_RC(write(f, (const char *) data, (size_t) len)); return; } -#endif /* VMS */ /* * Append to the block we already have. @@ -6305,20 +6291,11 @@ v_write(int f, const Char *data, size_t len) if (v_bufptr > v_bufstr) { int riten; -#ifdef VMS - riten = tt_write(v_bufstr, - (size_t) ((v_bufptr - v_bufstr <= VMS_TERM_BUFFER_SIZE) - ? v_bufptr - v_bufstr - : VMS_TERM_BUFFER_SIZE)); - if (riten == 0) - return (riten); -#else /* VMS */ riten = (int) write(f, v_bufstr, (size_t) ((v_bufptr - v_bufstr <= MAX_PTY_WRITE) ? v_bufptr - v_bufstr : MAX_PTY_WRITE)); if (riten < 0) -#endif /* VMS */ { if_DEBUG({ perror("write"); @@ -6414,84 +6391,6 @@ update_the_screen(XtermWidget xw) } } -#ifdef VMS -#define ptymask() (v_bufptr > v_bufstr ? pty_mask : 0) - -static void -in_put(XtermWidget xw) -{ - static PtySelect select_mask; - static PtySelect write_mask; - int update = VTbuffer->update; - int size; - - int status; - Dimension replyWidth, replyHeight; - XtGeometryResult stat; - - TScreen *screen = TScreenOf(xw); - char *cp; - int i; - - select_mask = pty_mask; /* force initial read */ - for (;;) { - - /* if the terminal changed size, resize the widget */ - if (tt_changed) { - tt_changed = False; - - stat = REQ_RESIZE((Widget) xw, - ((Dimension) FontWidth(screen) - * (tt_width) - + 2 * screen->border - + screen->fullVwin.sb_info.width), - ((Dimension) FontHeight(screen) - * (tt_length) - + 2 * screen->border), - &replyWidth, &replyHeight); - - if (stat == XtGeometryYes || stat == XtGeometryDone) { - xw->core.width = replyWidth; - xw->core.height = replyHeight; - - ScreenResize(xw, replyWidth, replyHeight, &xw->flags); - } - repairSizeHints(); - } - - if (screen->eventMode == NORMAL - && readPtyData(xw, &select_mask, VTbuffer)) { - if (screen->scrollWidget - && screen->scrollttyoutput - && screen->topline < 0) - /* Scroll to bottom */ - WindowScroll(xw, 0, False); - break; - } - update_the_screen(xw); - - if (QLength(screen->display)) { - select_mask = X_mask; - } else { - write_mask = ptymask(); - XFlush(screen->display); - select_mask = Select_mask; - if (screen->eventMode != NORMAL) - select_mask = X_mask; - } - if (write_mask & ptymask()) { - v_write(screen->respond, 0, 0); /* flush buffer */ - } - - if (select_mask & X_mask) { - xevents(xw); - if (VTbuffer->update != update) - break; - } - } -} -#else /* VMS */ - static void init_timeval(struct timeval *target, long usecs) { @@ -6686,7 +6585,6 @@ in_put(XtermWidget xw) } } -#endif /* VMS */ static IChar doinput(XtermWidget xw) @@ -7375,6 +7273,9 @@ dpmodes(XtermWidget xw, BitFunc func) case srm_RXVT_TOOLBAR: ShowToolbar(IsSM()); break; +#else + case srm_DECEDM: /* vt330:edit */ + break; #endif #if OPT_BLINK_CURS case srm_ATT610_BLINK: /* AT&T 610: Start/stop blinking cursor */ @@ -7389,6 +7290,11 @@ dpmodes(XtermWidget xw, BitFunc func) case srm_XOR_CURSOR_BLINKS: /* intentionally ignored (this is user-preference) */ break; +#else + case srm_DECKANAM: /* vt382:Katakana shift */ + case srm_DECSCFDM: /* vt330:space compression field delimiter */ + case srm_DECTEM: /* vt330:transmission execution */ + break; #endif case srm_DECPFF: /* print form feed */ set_bool_mode(PrinterOf(screen).printer_formfeed); @@ -7739,25 +7645,29 @@ dpmodes(XtermWidget xw, BitFunc func) } break; #endif + case srm_DEC131TM: /* ignore */ + case srm_DECAAM: /* ignore */ case srm_DECARSM: /* ignore */ case srm_DECATCBM: /* ignore */ case srm_DECATCUM: /* ignore */ case srm_DECBBSM: /* ignore */ - case srm_DECCAAM: /* ignore */ case srm_DECCANSM: /* ignore */ case srm_DECCAPSLK: /* ignore */ case srm_DECCRTSM: /* ignore */ case srm_DECECM: /* ignore */ + case srm_DECEKEM: /* ignore */ + case srm_DECESKM: /* ignore */ case srm_DECFWM: /* ignore */ + case srm_DECHCCM: /* ignore */ case srm_DECHDPXM: /* ignore */ case srm_DECHEM: /* ignore */ - case srm_DECHCCM: /* ignore */ case srm_DECHWUM: /* ignore */ case srm_DECIPEM: /* ignore */ case srm_DECKBUM: /* ignore */ case srm_DECKLHIM: /* ignore */ + case srm_DECKKDM: /* ignore */ case srm_DECKPM: /* ignore */ - case srm_DECRLM: /* ignore */ + case srm_DECLTM: /* ignore */ case srm_DECMCM: /* ignore */ case srm_DECNAKB: /* ignore */ case srm_DECNULM: /* ignore */ @@ -7765,6 +7675,7 @@ dpmodes(XtermWidget xw, BitFunc func) case srm_DECOSCNM: /* ignore */ case srm_DECPCCM: /* ignore */ case srm_DECRLCM: /* ignore */ + case srm_DECRLM: /* ignore */ case srm_DECRPL: /* ignore */ case srm_DECVCCM: /* ignore */ case srm_DECXRLM: /* ignore */ @@ -7824,6 +7735,9 @@ savemodes(XtermWidget xw) case srm_RXVT_TOOLBAR: DoSM(DP_TOOLBAR, resource.toolBar); break; +#else + case srm_DECEDM: /* vt330:edit */ + break; #endif #if OPT_BLINK_CURS case srm_ATT610_BLINK: /* AT&T 610: Start/stop blinking cursor */ @@ -7837,6 +7751,11 @@ savemodes(XtermWidget xw) case srm_XOR_CURSOR_BLINKS: /* intentionally ignored (this is user-preference) */ break; +#else + case srm_DECKANAM: /* vt382:Katakana shift */ + case srm_DECSCFDM: /* vt330:space compression field delimiter */ + case srm_DECTEM: /* vt330:transmission execution */ + break; #endif case srm_DECPFF: /* print form feed */ DoSM(DP_PRN_FORMFEED, PrinterOf(screen).printer_formfeed); @@ -8067,15 +7986,18 @@ savemodes(XtermWidget xw) DoSM(DP_SIXEL_SCROLLS_RIGHT, screen->sixel_scrolls_right); break; #endif + case srm_DEC131TM: /* ignore */ + case srm_DECAAM: /* ignore */ case srm_DECARSM: /* ignore */ case srm_DECATCBM: /* ignore */ case srm_DECATCUM: /* ignore */ case srm_DECBBSM: /* ignore */ - case srm_DECCAAM: /* ignore */ case srm_DECCANSM: /* ignore */ case srm_DECCAPSLK: /* ignore */ case srm_DECCRTSM: /* ignore */ case srm_DECECM: /* ignore */ + case srm_DECEKEM: /* ignore */ + case srm_DECESKM: /* ignore */ case srm_DECFWM: /* ignore */ case srm_DECHCCM: /* ignore */ case srm_DECHDPXM: /* ignore */ @@ -8083,9 +8005,10 @@ savemodes(XtermWidget xw) case srm_DECHWUM: /* ignore */ case srm_DECIPEM: /* ignore */ case srm_DECKBUM: /* ignore */ + case srm_DECKKDM: /* ignore */ case srm_DECKLHIM: /* ignore */ case srm_DECKPM: /* ignore */ - case srm_DECRLM: /* ignore */ + case srm_DECLTM: /* ignore */ case srm_DECMCM: /* ignore */ case srm_DECNAKB: /* ignore */ case srm_DECNULM: /* ignore */ @@ -8093,6 +8016,7 @@ savemodes(XtermWidget xw) case srm_DECOSCNM: /* ignore */ case srm_DECPCCM: /* ignore */ case srm_DECRLCM: /* ignore */ + case srm_DECRLM: /* ignore */ case srm_DECRPL: /* ignore */ case srm_DECVCCM: /* ignore */ case srm_DECXRLM: /* ignore */ @@ -8181,6 +8105,9 @@ restoremodes(XtermWidget xw) DoRM(DP_TOOLBAR, resource.toolBar); ShowToolbar(resource.toolBar); break; +#else + case srm_DECEDM: /* vt330:edit */ + break; #endif #if OPT_BLINK_CURS case srm_ATT610_BLINK: /* Start/stop blinking cursor */ @@ -8195,6 +8122,11 @@ restoremodes(XtermWidget xw) case srm_XOR_CURSOR_BLINKS: /* intentionally ignored (this is user-preference) */ break; +#else + case srm_DECKANAM: /* vt382:Katakana shift */ + case srm_DECSCFDM: /* vt330:space compression field delimiter */ + case srm_DECTEM: /* vt330:transmission execution */ + break; #endif case srm_DECPFF: /* print form feed */ DoRM(DP_PRN_FORMFEED, PrinterOf(screen).printer_formfeed); @@ -8488,15 +8420,18 @@ restoremodes(XtermWidget xw) BtoS(screen->sixel_scrolls_right))); break; #endif + case srm_DEC131TM: /* ignore */ + case srm_DECAAM: /* ignore */ case srm_DECARSM: /* ignore */ case srm_DECATCBM: /* ignore */ case srm_DECATCUM: /* ignore */ case srm_DECBBSM: /* ignore */ - case srm_DECCAAM: /* ignore */ case srm_DECCANSM: /* ignore */ case srm_DECCAPSLK: /* ignore */ case srm_DECCRTSM: /* ignore */ case srm_DECECM: /* ignore */ + case srm_DECEKEM: /* ignore */ + case srm_DECESKM: /* ignore */ case srm_DECFWM: /* ignore */ case srm_DECHCCM: /* ignore */ case srm_DECHDPXM: /* ignore */ @@ -8504,9 +8439,10 @@ restoremodes(XtermWidget xw) case srm_DECHWUM: /* ignore */ case srm_DECIPEM: /* ignore */ case srm_DECKBUM: /* ignore */ + case srm_DECKKDM: /* ignore */ case srm_DECKLHIM: /* ignore */ case srm_DECKPM: /* ignore */ - case srm_DECRLM: /* ignore */ + case srm_DECLTM: /* ignore */ case srm_DECMCM: /* ignore */ case srm_DECNAKB: /* ignore */ case srm_DECNULM: /* ignore */ @@ -8514,6 +8450,7 @@ restoremodes(XtermWidget xw) case srm_DECOSCNM: /* ignore */ case srm_DECPCCM: /* ignore */ case srm_DECRLCM: /* ignore */ + case srm_DECRLM: /* ignore */ case srm_DECRPL: /* ignore */ case srm_DECVCCM: /* ignore */ case srm_DECXRLM: /* ignore */ @@ -9027,8 +8964,8 @@ unparseputc1(XtermWidget xw, int c) { if (c >= 0x80 && c <= 0x9F) { if (!TScreenOf(xw)->control_eight_bits) { - unparseputc(xw, A2E(ANSI_ESC)); - c = A2E(c - 0x40); + unparseputc(xw, ANSI_ESC); + c = c - 0x40; } } unparseputc(xw, c); @@ -9181,11 +9118,7 @@ unparse_end(XtermWidget xw) TRACE(("unparse_end %u:%s\n", screen->unparse_len, visibleIChars(screen->unparse_bfr, (size_t) screen->unparse_len))); -#ifdef VMS - tt_write(screen->unparse_bfr, screen->unparse_len); -#else /* VMS */ writePtyData(screen->respond, screen->unparse_bfr, (size_t) screen->unparse_len); -#endif /* VMS */ screen->unparse_len = 0; } } @@ -9313,7 +9246,7 @@ VTRun(XtermWidget xw) TRACE(("VTRun ...\n")); - if (!screen->Vshow) { + if (!screen->Vshow && !resource.notMapped) { set_vt_visibility(True); } update_vttekmode(); diff --git a/app/xterm/charsets.c b/app/xterm/charsets.c index 0ee4ef82e..b828f711d 100644 --- a/app/xterm/charsets.c +++ b/app/xterm/charsets.c @@ -1,4 +1,4 @@ -/* $XTermId: charsets.c,v 1.126 2024/05/22 00:27:53 tom Exp $ */ +/* $XTermId: charsets.c,v 1.129 2024/10/03 22:21:32 tom Exp $ */ /* * Copyright 1998-2023,2024 by Thomas E. Dickey @@ -110,6 +110,8 @@ isSevenBit(DECNRCM_codes cs) case nrc_Greek: case nrc_Hebrew: case nrc_Italian: + case nrc_JIS_Katakana: + case nrc_JIS_Roman: case nrc_Norwegian_Danish2: case nrc_Norwegian_Danish3: case nrc_Norwegian_Danish: @@ -248,6 +250,14 @@ xtermCharSetIn(XtermWidget xw, unsigned code, DECNRCM_codes charset) map_ISO_Latin_Cyrillic(code); break; + case nrc_JIS_Katakana: + map_JIS_Katakana(code); + break; + + case nrc_JIS_Roman: + map_JIS_Roman(code); + break; + case nrc_Norwegian_Danish: case nrc_Norwegian_Danish2: case nrc_Norwegian_Danish3: @@ -258,8 +268,12 @@ xtermCharSetIn(XtermWidget xw, unsigned code, DECNRCM_codes charset) map_NRCS_Portuguese(code); break; + case nrc_Russian: + map_NRCS_Russian(code); + break; + case nrc_SCS_NRCS: /* vt5xx - Serbo/Croatian */ - /* FIXME */ + map_NRCS_Serbo_Croatian(code); break; case nrc_Spanish: @@ -289,7 +303,6 @@ xtermCharSetIn(XtermWidget xw, unsigned code, DECNRCM_codes charset) case nrc_ISO_Latin_1_Supp: case nrc_British_Latin_1: - case nrc_Russian: case nrc_French_Canadian2: case nrc_Unknown: case nrc_DEC_UPSS: @@ -351,7 +364,7 @@ xtermCharSetOut(XtermWidget xw, Cardinal length, DECNRCM_codes leftset) #endif for (s = buf; s < ptr; ++s) { - int eight = CharOf(E2A(*s)); + int eight = CharOf(*s); int seven = eight & 0x7f; DECNRCM_codes cs = (eight >= 128) ? rightset : leftset; int chr = eight; @@ -497,6 +510,14 @@ xtermCharSetOut(XtermWidget xw, Cardinal length, DECNRCM_codes leftset) map_ISO_Latin_Cyrillic(chr = seven); break; + case nrc_JIS_Katakana: + map_JIS_Katakana(chr = seven); + break; + + case nrc_JIS_Roman: + map_JIS_Roman(chr = seven); + break; + case nrc_Norwegian_Danish: case nrc_Norwegian_Danish2: case nrc_Norwegian_Danish3: @@ -507,8 +528,12 @@ xtermCharSetOut(XtermWidget xw, Cardinal length, DECNRCM_codes leftset) map_NRCS_Portuguese(chr = seven); break; + case nrc_Russian: + map_NRCS_Russian(chr = seven); + break; + case nrc_SCS_NRCS: /* vt5xx - Serbo/Croatian */ - /* FIXME */ + map_NRCS_Serbo_Croatian(chr = seven); break; case nrc_Spanish: @@ -536,7 +561,6 @@ xtermCharSetOut(XtermWidget xw, Cardinal length, DECNRCM_codes leftset) map_DEC_Cyrillic(chr = seven); break; - case nrc_Russian: case nrc_Unknown: default: /* any character sets we don't recognize */ break; @@ -558,7 +582,7 @@ xtermCharSetOut(XtermWidget xw, Cardinal length, DECNRCM_codes leftset) } else { if (eight >= 128 && chr < 128 && chr > 32) chr |= 128; - *s = (IChar) A2E(chr); + *s = (IChar) chr; } } TRACE(("%d\t%s\n", @@ -707,6 +731,14 @@ xtermCharSetDec(XtermWidget xw, IChar chr, DECNRCM_codes cs) unmap_NRCS_Italian(chr, DFT_94(chr)); break; + case nrc_JIS_Katakana: + unmap_JIS_Katakana(chr, DFT_94(chr)); + break; + + case nrc_JIS_Roman: + unmap_JIS_Roman(chr, DFT_94(chr)); + break; + case nrc_ISO_Latin_1_Supp: unmap_ISO_Latin_1(chr, DFTMAP()); break; @@ -733,6 +765,14 @@ xtermCharSetDec(XtermWidget xw, IChar chr, DECNRCM_codes cs) unmap_NRCS_Portuguese(chr, DFT_94(chr)); break; + case nrc_Russian: + unmap_NRCS_Russian(chr, DFT_94(chr)); + break; + + case nrc_SCS_NRCS: + unmap_NRCS_Serbo_Croatian(chr, DFT_94(chr)); + break; + case nrc_Spanish: unmap_NRCS_Spanish(chr, DFT_94(chr)); break; @@ -755,8 +795,6 @@ xtermCharSetDec(XtermWidget xw, IChar chr, DECNRCM_codes cs) break; case nrc_British_Latin_1: - case nrc_SCS_NRCS: - case nrc_Russian: case nrc_Unknown: case nrc_DEC_UPSS: default: /* anything we cannot unmap */ diff --git a/app/xterm/charsets.dat b/app/xterm/charsets.dat index 125388233..26170b20a 100644 --- a/app/xterm/charsets.dat +++ b/app/xterm/charsets.dat @@ -1,4 +1,4 @@ -# $XTermId: charsets.dat,v 1.32 2024/02/08 08:52:10 tom Exp $ +# $XTermId: charsets.dat,v 1.35 2024/10/03 21:56:53 tom Exp $ # Copyright 2023,2024 by Thomas E. Dickey # @@ -344,6 +344,106 @@ map_DEC_Technical 7D U+2192 100 # RIGHTWARDS ARROW 7E U+2193 02 # DOWNWARDS ARROW +map_JIS_Roman + 5C U+00A5 # YEN SIGN + 7E U+203E # OVERLINE + +# Documented as if only GR, but encoded here to allow assignment to GL and GR. +map_JIS_Katakana + 21 U+FF61 # HALFWIDTH IDEOGRAPHIC FULL STOP + 22 U+FF62 # HALFWIDTH LEFT CORNER BRACKET + 23 U+FF63 # HALFWIDTH RIGHT CORNER BRACKET + 24 U+FF64 # HALFWIDTH IDEOGRAPHIC COMMA + 25 U+FF65 # HALFWIDTH KATAKANA MIDDLE DOT + 26 U+FF66 # HALFWIDTH KATAKANA LETTER WO + 27 U+FF67 # HALFWIDTH KATAKANA LETTER SMALL A + 28 U+FF68 # HALFWIDTH KATAKANA LETTER SMALL I + 29 U+FF69 # HALFWIDTH KATAKANA LETTER SMALL U + 2A U+FF6A # HALFWIDTH KATAKANA LETTER SMALL E + 2B U+FF6B # HALFWIDTH KATAKANA LETTER SMALL O + 2C U+FF6C # HALFWIDTH KATAKANA LETTER SMALL YA + 2D U+FF6D # HALFWIDTH KATAKANA LETTER SMALL YU + 2E U+FF6E # HALFWIDTH KATAKANA LETTER SMALL YO + 2F U+FF6F # HALFWIDTH KATAKANA LETTER SMALL TU + 30 U+FF70 # HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK + 31 U+FF71 # HALFWIDTH KATAKANA LETTER A + 32 U+FF72 # HALFWIDTH KATAKANA LETTER I + 33 U+FF73 # HALFWIDTH KATAKANA LETTER U + 34 U+FF74 # HALFWIDTH KATAKANA LETTER E + 35 U+FF75 # HALFWIDTH KATAKANA LETTER O + 36 U+FF76 # HALFWIDTH KATAKANA LETTER KA + 37 U+FF77 # HALFWIDTH KATAKANA LETTER KI + 38 U+FF78 # HALFWIDTH KATAKANA LETTER KU + 39 U+FF79 # HALFWIDTH KATAKANA LETTER KE + 3A U+FF7A # HALFWIDTH KATAKANA LETTER KO + 3B U+FF7B # HALFWIDTH KATAKANA LETTER SA + 3C U+FF7C # HALFWIDTH KATAKANA LETTER SI + 3D U+FF7D # HALFWIDTH KATAKANA LETTER SU + 3E U+FF7E # HALFWIDTH KATAKANA LETTER SE + 3F U+FF7F # HALFWIDTH KATAKANA LETTER SO + 40 U+FF80 # HALFWIDTH KATAKANA LETTER TA + 41 U+FF81 # HALFWIDTH KATAKANA LETTER TI + 42 U+FF82 # HALFWIDTH KATAKANA LETTER TU + 43 U+FF83 # HALFWIDTH KATAKANA LETTER TE + 44 U+FF84 # HALFWIDTH KATAKANA LETTER TO + 45 U+FF85 # HALFWIDTH KATAKANA LETTER NA + 46 U+FF86 # HALFWIDTH KATAKANA LETTER NI + 47 U+FF87 # HALFWIDTH KATAKANA LETTER NU + 48 U+FF88 # HALFWIDTH KATAKANA LETTER NE + 49 U+FF89 # HALFWIDTH KATAKANA LETTER NO + 4A U+FF8A # HALFWIDTH KATAKANA LETTER HA + 4B U+FF8B # HALFWIDTH KATAKANA LETTER HI + 4C U+FF8C # HALFWIDTH KATAKANA LETTER HU + 4D U+FF8D # HALFWIDTH KATAKANA LETTER HE + 4E U+FF8E # HALFWIDTH KATAKANA LETTER HO + 4F U+FF8F # HALFWIDTH KATAKANA LETTER MA + 50 U+FF90 # HALFWIDTH KATAKANA LETTER MI + 51 U+FF91 # HALFWIDTH KATAKANA LETTER MU + 52 U+FF92 # HALFWIDTH KATAKANA LETTER ME + 53 U+FF93 # HALFWIDTH KATAKANA LETTER MO + 54 U+FF94 # HALFWIDTH KATAKANA LETTER YA + 55 U+FF95 # HALFWIDTH KATAKANA LETTER YU + 56 U+FF96 # HALFWIDTH KATAKANA LETTER YO + 57 U+FF97 # HALFWIDTH KATAKANA LETTER RA + 58 U+FF98 # HALFWIDTH KATAKANA LETTER RI + 59 U+FF99 # HALFWIDTH KATAKANA LETTER RU + 5A U+FF9A # HALFWIDTH KATAKANA LETTER RE + 5B U+FF9B # HALFWIDTH KATAKANA LETTER RO + 5C U+FF9C # HALFWIDTH KATAKANA LETTER WA + 5D U+FF9D # HALFWIDTH KATAKANA LETTER N + 5E U+FF9E # HALFWIDTH KATAKANA VOICED SOUND MARK + 5F U+FF9F # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK + 60 UNDEF + 61 UNDEF + 62 UNDEF + 63 UNDEF + 64 UNDEF + 65 UNDEF + 66 UNDEF + 67 UNDEF + 68 UNDEF + 69 UNDEF + 6A UNDEF + 6B UNDEF + 6C UNDEF + 6D UNDEF + 6E UNDEF + 6F UNDEF + 70 UNDEF + 71 UNDEF + 72 UNDEF + 73 UNDEF + 74 UNDEF + 75 UNDEF + 76 UNDEF + 77 UNDEF + 78 UNDEF + 79 UNDEF + 7A UNDEF + 7B UNDEF + 7C UNDEF + 7D UNDEF + # ISO Latin/Cyrillic is 8859-5 map_ISO_Latin_Cyrillic 20 U+00A0 # NO-BREAK SPACE @@ -1287,6 +1387,56 @@ map_NRCS_Hebrew 79 U+05E9 # HEBREW LETTER SHIN 7a U+05EA # HEBREW LETTER TAV +# VT520/VT525 manual p 4-35 explains "SCS" as Serbo-Croatian. The remaining +# "S" may be Slovene. With that clue, choose ISO-IR-141, which provides a +# chart with names of suitable replacement characters. +map_NRCS_Serbo_Croatian + 40 U+017D # LATIN CAPITAL LETTER Z WITH CARON + 5B U+0160 # LATIN CAPITAL LETTER S WITH CARON + 5C U+0110 # LATIN CAPITAL LETTER D WITH STROKE + 5D U+0106 # LATIN CAPITAL LETTER C WITH ACUTE + 5E U+010C # LATIN CAPITAL LETTER C WITH CARON + 60 U+017E # LATIN SMALL LETTER Z WITH CARON + 7B U+0161 # LATIN SMALL LETTER S WITH CARON + 7C U+0111 # LATIN SMALL LETTER D WITH STROKE + 7D U+0107 # LATIN SMALL LETTER C WITH ACUTE + 7E U+010D # LATIN SMALL LETTER C WITH CARON + +# VT520/VT525 manual p 7-2 explains "Russian" as KOI-7, though the dialect +# is unknown. Choose the one Kermit used. +map_NRCS_Russian + 60 U+042E # CYRILLIC CAPITAL LETTER YU + 61 U+0410 # CYRILLIC CAPITAL LETTER A + 62 U+0411 # CYRILLIC CAPITAL LETTER BE + 63 U+0426 # CYRILLIC CAPITAL LETTER TSE + 64 U+0414 # CYRILLIC CAPITAL LETTER DE + 65 U+0415 # CYRILLIC CAPITAL LETTER IE + 66 U+0424 # CYRILLIC CAPITAL LETTER EF + 67 U+0413 # CYRILLIC CAPITAL LETTER GHE + 68 U+0425 # CYRILLIC CAPITAL LETTER HA + 69 U+0418 # CYRILLIC CAPITAL LETTER I + 6A U+0419 # CYRILLIC CAPITAL LETTER SHORT I + 6B U+041A # CYRILLIC CAPITAL LETTER KA + 6C U+041B # CYRILLIC CAPITAL LETTER EL + 6D U+041C # CYRILLIC CAPITAL LETTER EM + 6E U+041D # CYRILLIC CAPITAL LETTER EN + 6F U+041E # CYRILLIC CAPITAL LETTER O + 70 U+041F # CYRILLIC CAPITAL LETTER PE + 71 U+042F # CYRILLIC CAPITAL LETTER YA + 72 U+0420 # CYRILLIC CAPITAL LETTER ER + 73 U+0421 # CYRILLIC CAPITAL LETTER ES + 74 U+0422 # CYRILLIC CAPITAL LETTER TE + 75 U+0423 # CYRILLIC CAPITAL LETTER U + 76 U+0416 # CYRILLIC CAPITAL LETTER ZHE + 77 U+0412 # CYRILLIC CAPITAL LETTER VE + 78 U+042C # CYRILLIC CAPITAL LETTER SOFT SIGN + 79 U+042B # CYRILLIC CAPITAL LETTER YERU + 7A U+0417 # CYRILLIC CAPITAL LETTER ZE + 7B U+0428 # CYRILLIC CAPITAL LETTER SHA + 7C U+042D # CYRILLIC CAPITAL LETTER E + 7D U+0429 # CYRILLIC CAPITAL LETTER SHCHA + 7E U+0427 # CYRILLIC CAPITAL LETTER CHE + # figure A-26 "DEC 7-Bit Turkish Character Set" map_NRCS_Turkish 26 U+011F # LATIN SMALL LETTER G WITH BREVE diff --git a/app/xterm/charsets.h b/app/xterm/charsets.h index 5d876e6c6..c70f6f038 100644 --- a/app/xterm/charsets.h +++ b/app/xterm/charsets.h @@ -1,5 +1,5 @@ /* - * $XTermId: charsets.h,v 1.29 2024/02/08 08:52:16 tom Exp $ + * $XTermId: charsets.h,v 1.34 2024/10/03 22:01:16 tom Exp $ */ /* @@ -614,6 +614,120 @@ default: dft; break; \ } +#define map_JIS_Roman(code) \ + begin_CODEPAGE(94) \ + switch (code) { \ + UNI(0x5C, 0x00A5) /* YEN SIGN */ \ + UNI(0x7E, 0x203E) /* OVERLINE */ \ + } \ + end_CODEPAGE() + +#define unmap_JIS_Roman(code,dft) /* nothing */ + +/* + * Documented as if only GR, but encoded here to allow assignment to GL and GR. + */ +#define map_JIS_Katakana(code) \ + begin_CODEPAGE(94) \ + switch (code) { \ + UNI(0x21, 0xFF61) /* HALFWIDTH IDEOGRAPHIC FULL STOP */ \ + UNI(0x22, 0xFF62) /* HALFWIDTH LEFT CORNER BRACKET */ \ + UNI(0x23, 0xFF63) /* HALFWIDTH RIGHT CORNER BRACKET */ \ + UNI(0x24, 0xFF64) /* HALFWIDTH IDEOGRAPHIC COMMA */ \ + UNI(0x25, 0xFF65) /* HALFWIDTH KATAKANA MIDDLE DOT */ \ + UNI(0x26, 0xFF66) /* HALFWIDTH KATAKANA LETTER WO */ \ + UNI(0x27, 0xFF67) /* HALFWIDTH KATAKANA LETTER SMALL A */ \ + UNI(0x28, 0xFF68) /* HALFWIDTH KATAKANA LETTER SMALL I */ \ + UNI(0x29, 0xFF69) /* HALFWIDTH KATAKANA LETTER SMALL U */ \ + UNI(0x2A, 0xFF6A) /* HALFWIDTH KATAKANA LETTER SMALL E */ \ + UNI(0x2B, 0xFF6B) /* HALFWIDTH KATAKANA LETTER SMALL O */ \ + UNI(0x2C, 0xFF6C) /* HALFWIDTH KATAKANA LETTER SMALL YA */ \ + UNI(0x2D, 0xFF6D) /* HALFWIDTH KATAKANA LETTER SMALL YU */ \ + UNI(0x2E, 0xFF6E) /* HALFWIDTH KATAKANA LETTER SMALL YO */ \ + UNI(0x2F, 0xFF6F) /* HALFWIDTH KATAKANA LETTER SMALL TU */ \ + UNI(0x30, 0xFF70) /* HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK */ \ + UNI(0x31, 0xFF71) /* HALFWIDTH KATAKANA LETTER A */ \ + UNI(0x32, 0xFF72) /* HALFWIDTH KATAKANA LETTER I */ \ + UNI(0x33, 0xFF73) /* HALFWIDTH KATAKANA LETTER U */ \ + UNI(0x34, 0xFF74) /* HALFWIDTH KATAKANA LETTER E */ \ + UNI(0x35, 0xFF75) /* HALFWIDTH KATAKANA LETTER O */ \ + UNI(0x36, 0xFF76) /* HALFWIDTH KATAKANA LETTER KA */ \ + UNI(0x37, 0xFF77) /* HALFWIDTH KATAKANA LETTER KI */ \ + UNI(0x38, 0xFF78) /* HALFWIDTH KATAKANA LETTER KU */ \ + UNI(0x39, 0xFF79) /* HALFWIDTH KATAKANA LETTER KE */ \ + UNI(0x3A, 0xFF7A) /* HALFWIDTH KATAKANA LETTER KO */ \ + UNI(0x3B, 0xFF7B) /* HALFWIDTH KATAKANA LETTER SA */ \ + UNI(0x3C, 0xFF7C) /* HALFWIDTH KATAKANA LETTER SI */ \ + UNI(0x3D, 0xFF7D) /* HALFWIDTH KATAKANA LETTER SU */ \ + UNI(0x3E, 0xFF7E) /* HALFWIDTH KATAKANA LETTER SE */ \ + UNI(0x3F, 0xFF7F) /* HALFWIDTH KATAKANA LETTER SO */ \ + UNI(0x40, 0xFF80) /* HALFWIDTH KATAKANA LETTER TA */ \ + UNI(0x41, 0xFF81) /* HALFWIDTH KATAKANA LETTER TI */ \ + UNI(0x42, 0xFF82) /* HALFWIDTH KATAKANA LETTER TU */ \ + UNI(0x43, 0xFF83) /* HALFWIDTH KATAKANA LETTER TE */ \ + UNI(0x44, 0xFF84) /* HALFWIDTH KATAKANA LETTER TO */ \ + UNI(0x45, 0xFF85) /* HALFWIDTH KATAKANA LETTER NA */ \ + UNI(0x46, 0xFF86) /* HALFWIDTH KATAKANA LETTER NI */ \ + UNI(0x47, 0xFF87) /* HALFWIDTH KATAKANA LETTER NU */ \ + UNI(0x48, 0xFF88) /* HALFWIDTH KATAKANA LETTER NE */ \ + UNI(0x49, 0xFF89) /* HALFWIDTH KATAKANA LETTER NO */ \ + UNI(0x4A, 0xFF8A) /* HALFWIDTH KATAKANA LETTER HA */ \ + UNI(0x4B, 0xFF8B) /* HALFWIDTH KATAKANA LETTER HI */ \ + UNI(0x4C, 0xFF8C) /* HALFWIDTH KATAKANA LETTER HU */ \ + UNI(0x4D, 0xFF8D) /* HALFWIDTH KATAKANA LETTER HE */ \ + UNI(0x4E, 0xFF8E) /* HALFWIDTH KATAKANA LETTER HO */ \ + UNI(0x4F, 0xFF8F) /* HALFWIDTH KATAKANA LETTER MA */ \ + UNI(0x50, 0xFF90) /* HALFWIDTH KATAKANA LETTER MI */ \ + UNI(0x51, 0xFF91) /* HALFWIDTH KATAKANA LETTER MU */ \ + UNI(0x52, 0xFF92) /* HALFWIDTH KATAKANA LETTER ME */ \ + UNI(0x53, 0xFF93) /* HALFWIDTH KATAKANA LETTER MO */ \ + UNI(0x54, 0xFF94) /* HALFWIDTH KATAKANA LETTER YA */ \ + UNI(0x55, 0xFF95) /* HALFWIDTH KATAKANA LETTER YU */ \ + UNI(0x56, 0xFF96) /* HALFWIDTH KATAKANA LETTER YO */ \ + UNI(0x57, 0xFF97) /* HALFWIDTH KATAKANA LETTER RA */ \ + UNI(0x58, 0xFF98) /* HALFWIDTH KATAKANA LETTER RI */ \ + UNI(0x59, 0xFF99) /* HALFWIDTH KATAKANA LETTER RU */ \ + UNI(0x5A, 0xFF9A) /* HALFWIDTH KATAKANA LETTER RE */ \ + UNI(0x5B, 0xFF9B) /* HALFWIDTH KATAKANA LETTER RO */ \ + UNI(0x5C, 0xFF9C) /* HALFWIDTH KATAKANA LETTER WA */ \ + UNI(0x5D, 0xFF9D) /* HALFWIDTH KATAKANA LETTER N */ \ + UNI(0x5E, 0xFF9E) /* HALFWIDTH KATAKANA VOICED SOUND MARK */ \ + UNI(0x5F, 0xFF9F) /* HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK */ \ + XXX(0x60, UNDEF) \ + XXX(0x61, UNDEF) \ + XXX(0x62, UNDEF) \ + XXX(0x63, UNDEF) \ + XXX(0x64, UNDEF) \ + XXX(0x65, UNDEF) \ + XXX(0x66, UNDEF) \ + XXX(0x67, UNDEF) \ + XXX(0x68, UNDEF) \ + XXX(0x69, UNDEF) \ + XXX(0x6A, UNDEF) \ + XXX(0x6B, UNDEF) \ + XXX(0x6C, UNDEF) \ + XXX(0x6D, UNDEF) \ + XXX(0x6E, UNDEF) \ + XXX(0x6F, UNDEF) \ + XXX(0x70, UNDEF) \ + XXX(0x71, UNDEF) \ + XXX(0x72, UNDEF) \ + XXX(0x73, UNDEF) \ + XXX(0x74, UNDEF) \ + XXX(0x75, UNDEF) \ + XXX(0x76, UNDEF) \ + XXX(0x77, UNDEF) \ + XXX(0x78, UNDEF) \ + XXX(0x79, UNDEF) \ + XXX(0x7A, UNDEF) \ + XXX(0x7B, UNDEF) \ + XXX(0x7C, UNDEF) \ + XXX(0x7D, UNDEF) \ + } \ + end_CODEPAGE() + +#define unmap_JIS_Katakana(code,dft) /* nothing */ + /* * ISO Latin/Cyrillic is 8859-5 */ @@ -2236,6 +2350,68 @@ #define unmap_NRCS_Hebrew(code,dft) /* nothing */ /* + * VT520/VT525 manual p 4-35 explains "SCS" as Serbo-Croatian. The remaining + * "S" may be Slovene. With that clue, choose ISO-IR-141, which provides a + * chart with names of suitable replacement characters. + */ +#define map_NRCS_Serbo_Croatian(code) \ + switch (code) { \ + UNI(0x40, 0x017D) /* LATIN CAPITAL LETTER Z WITH CARON */ \ + UNI(0x5B, 0x0160) /* LATIN CAPITAL LETTER S WITH CARON */ \ + UNI(0x5C, 0x0110) /* LATIN CAPITAL LETTER D WITH STROKE */ \ + UNI(0x5D, 0x0106) /* LATIN CAPITAL LETTER C WITH ACUTE */ \ + UNI(0x5E, 0x010C) /* LATIN CAPITAL LETTER C WITH CARON */ \ + UNI(0x60, 0x017E) /* LATIN SMALL LETTER Z WITH CARON */ \ + UNI(0x7B, 0x0161) /* LATIN SMALL LETTER S WITH CARON */ \ + UNI(0x7C, 0x0111) /* LATIN SMALL LETTER D WITH STROKE */ \ + UNI(0x7D, 0x0107) /* LATIN SMALL LETTER C WITH ACUTE */ \ + UNI(0x7E, 0x010D) /* LATIN SMALL LETTER C WITH CARON */ \ + } + +#define unmap_NRCS_Serbo_Croatian(code,dft) /* nothing */ + +/* + * VT520/VT525 manual p 7-2 explains "Russian" as KOI-7, though the dialect + * is unknown. Choose the one Kermit used. + */ +#define map_NRCS_Russian(code) \ + switch (code) { \ + UNI(0x60, 0x042E) /* CYRILLIC CAPITAL LETTER YU */ \ + UNI(0x61, 0x0410) /* CYRILLIC CAPITAL LETTER A */ \ + UNI(0x62, 0x0411) /* CYRILLIC CAPITAL LETTER BE */ \ + UNI(0x63, 0x0426) /* CYRILLIC CAPITAL LETTER TSE */ \ + UNI(0x64, 0x0414) /* CYRILLIC CAPITAL LETTER DE */ \ + UNI(0x65, 0x0415) /* CYRILLIC CAPITAL LETTER IE */ \ + UNI(0x66, 0x0424) /* CYRILLIC CAPITAL LETTER EF */ \ + UNI(0x67, 0x0413) /* CYRILLIC CAPITAL LETTER GHE */ \ + UNI(0x68, 0x0425) /* CYRILLIC CAPITAL LETTER HA */ \ + UNI(0x69, 0x0418) /* CYRILLIC CAPITAL LETTER I */ \ + UNI(0x6A, 0x0419) /* CYRILLIC CAPITAL LETTER SHORT I */ \ + UNI(0x6B, 0x041A) /* CYRILLIC CAPITAL LETTER KA */ \ + UNI(0x6C, 0x041B) /* CYRILLIC CAPITAL LETTER EL */ \ + UNI(0x6D, 0x041C) /* CYRILLIC CAPITAL LETTER EM */ \ + UNI(0x6E, 0x041D) /* CYRILLIC CAPITAL LETTER EN */ \ + UNI(0x6F, 0x041E) /* CYRILLIC CAPITAL LETTER O */ \ + UNI(0x70, 0x041F) /* CYRILLIC CAPITAL LETTER PE */ \ + UNI(0x71, 0x042F) /* CYRILLIC CAPITAL LETTER YA */ \ + UNI(0x72, 0x0420) /* CYRILLIC CAPITAL LETTER ER */ \ + UNI(0x73, 0x0421) /* CYRILLIC CAPITAL LETTER ES */ \ + UNI(0x74, 0x0422) /* CYRILLIC CAPITAL LETTER TE */ \ + UNI(0x75, 0x0423) /* CYRILLIC CAPITAL LETTER U */ \ + UNI(0x76, 0x0416) /* CYRILLIC CAPITAL LETTER ZHE */ \ + UNI(0x77, 0x0412) /* CYRILLIC CAPITAL LETTER VE */ \ + UNI(0x78, 0x042C) /* CYRILLIC CAPITAL LETTER SOFT SIGN */ \ + UNI(0x79, 0x042B) /* CYRILLIC CAPITAL LETTER YERU */ \ + UNI(0x7A, 0x0417) /* CYRILLIC CAPITAL LETTER ZE */ \ + UNI(0x7B, 0x0428) /* CYRILLIC CAPITAL LETTER SHA */ \ + UNI(0x7C, 0x042D) /* CYRILLIC CAPITAL LETTER E */ \ + UNI(0x7D, 0x0429) /* CYRILLIC CAPITAL LETTER SHCHA */ \ + UNI(0x7E, 0x0427) /* CYRILLIC CAPITAL LETTER CHE */ \ + } + +#define unmap_NRCS_Russian(code,dft) /* nothing */ + +/* * figure A-26 "DEC 7-Bit Turkish Character Set" */ #define map_NRCS_Turkish(code) \ @@ -2275,10 +2451,18 @@ #define unmap_ISO_Latin_5(code,dft) dft #define map_ISO_Latin_Cyrillic(code) /* nothing */ #define unmap_ISO_Latin_Cyrillic(code,dft) dft +#define map_JIS_Katakana(code) /* nothing */ +#define unmap_JIS_Katakana(code,dft) dft +#define map_JIS_Roman(code) /* nothing */ +#define unmap_JIS_Roman(code,dft) dft #define map_NRCS_Greek(code) /* nothing */ #define unmap_NRCS_Greek(code,dft) dft #define map_NRCS_Hebrew(code) /* nothing */ #define unmap_NRCS_Hebrew(code,dft) dft +#define map_NRCS_Russian(code) /* nothing */ +#define unmap_NRCS_Russian(code,dft) dft +#define map_NRCS_Serbo_Croatian(code) /* nothing */ +#define unmap_NRCS_Serbo_Croatian(code,dft) dft #define map_NRCS_Turkish(code) /* nothing */ #define unmap_NRCS_Turkish(code,dft) dft #endif /* OPT_WIDE_CHARS */ diff --git a/app/xterm/ctlseqs.ms b/app/xterm/ctlseqs.ms index ff0b29649..1c1b4d0bb 100644 --- a/app/xterm/ctlseqs.ms +++ b/app/xterm/ctlseqs.ms @@ -1,6 +1,6 @@ .\"#! troff -ms $1 -*- Nroff -*- .\" "XTerm Control Sequences" document -.\" $XTermId: ctlseqs.ms,v 1.717 2024/05/25 16:43:09 tom Exp $ +.\" $XTermId: ctlseqs.ms,v 1.726 2024/10/14 16:52:40 tom Exp $ .\" .\" .\" Copyright 1996-2023,2024 by Thomas E. Dickey @@ -69,8 +69,8 @@ .\" .ds XT XTerm .ds xt xterm -.ds LF Patch #392 -.ds RF 2024/05/25 +.ds LF Patch #395 +.ds RF 2024/10/14 .\" .if n .pl 9999v \" no page breaks in nroff .ND @@ -449,6 +449,55 @@ sequence because those cannot alter the meaning of the control sequence. Some controls (such as \*(Os) introduce a string mode, which is ended on a \*(ST (string terminator). .IP +Section 9 of ECMA-48, like DEC STD 070, chapter 3, goes into detail to +explain that when processing 8-bit controls, the eighth bit of each +byte is ignored. +This applies to the content of APC, DCS, OSC, and PM strings, +as well as to the terminating bytes such as the two-byte string terminator. +Quoting from the latter, +3.5.4.5 \fIGR Graphic Characters within Control Strings\fP: +.in +4n +.ft \*(CW +.sp +GR (8-bit) graphic characters in APC, OSC, and PM control strings will be +treated as their 7-bit equivalent (the eighth bit will be ignored). +.sp +GR (8-bit) graphic characters are permitted within Device Control +Strings, and the graphic character's interpretation will be +dependent on the internal control string format. +When they occur in the introducer sequence to a Device Control String, +the eighth bit will be ignored, +and they will be treated as their 7-bit equivalent. +(Note that this is the same way 8-bit graphic characters +are handled within control sequences.) +.in -4n +.ft R +.IP +The reason for that is because ECMA-48 presents 7-bit controls as an +alternative to 8-bit controls. +It says this: +.in +4n +.ft \*(CW +.sp +The control functions defined in this Standard can be coded in a 7-bit code as +well as in an 8-bit code; both forms of coded representation are equivalent and +in accordance with Standard ECMA-35. +.in -4n +.ft R +.IP +and in turn, ECMA-35 9.1 says +.in +4n +.ft \*(CW +.sp +A 7-bit code shall have a structure which is based on a 7-bit +code table arranged in separate areas as follows (see figure 7): +.in -4n +.ft R +.IP +In short, a standard-compliant implementation of ECMA-48 ignores the +eighth bit of bytes in control strings other than the C1 controls. +\fI\*(XT\fP does this. +.IP ECMA-48 describes only correct behavior, telling what types of characters are expected at each stage of the control sequences. @@ -752,6 +801,8 @@ These are documented as 94-character sets (like USASCII) without NRCS: \*(Cc = \*%\*0 \(-> DEC Turkish, VT500. \*(Cc = \*%\*5 \(-> DEC Supplemental Graphics, VT300. \*(Cc = \*&\*4 \(-> DEC Cyrillic, VT500. + \*(Cc = \*I \(-> JIS-Katakana, VT382. + \*(Cc = \*J \(-> JIS-Roman, VT382. .br The VT520 reference manual lists a few more, but no documentation has been found for the mappings: @@ -891,7 +942,7 @@ 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 -.IP \\*(Dc\\*(Ps\\*!\\*u\\*(Pt\\*s\\*(ST +.IP \\*(Dc\\*(Ps\\*s\\*!\\*u\\*(Pt\\*s\\*(ST Assigning User-Preferred Supplemental Sets (DECAUPSS), VT320, VT510. \fI\*(XT\fP ignores this in UTF-8 mode, and uses the \fBpreferLatin1\fP resource to choose the default setting. @@ -931,6 +982,7 @@ The string following the \*(``q\*('' is one of the following: \*$\*| \(-> DECSCPP \*$\*} \(-> DECSASD \*$\*~ \(-> DECSSDT + \*)\*{ \(-> DECSTGLT (VT525 only) \**\*x \(-> DECSACE \**\*| \(-> DECSNLS \*,\*| \(-> DECAC (VT525 only) @@ -1870,7 +1922,7 @@ Result is \fBNote\fP: 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) +the shifted F3 key may send (with shift-, control-, alt-modifiers) .iP \*(Cs\*1\*;\*2\*s\*R, or \*(Cs\*1\*;\*5\*s\*R, or @@ -1880,7 +1932,7 @@ the shifted F1 key may send (with shift-, control-, alt-modifiers) The second parameter encodes the modifiers; values range from 2 to 16. See the section \fBPC-Style Function Keys\fP for the codes. The \fB\%modifyFunctionKeys\fP and \fB\%modifyKeyboard\fP resources -can change the form of the string sent from the modified F1 key. +can change the form of the string sent from the modified F3 key. . .iP .IP \\*(Cs\\*>\\*(Ps\\*s\\*n @@ -2008,7 +2060,7 @@ but DECSCL is preferred. Request ANSI mode (DECRQM). For VT300 and up, reply DECRPM is .br - \*(Cs\*(Ps\*;\*(Pm\*s\*$\*y + \*(Cs\*(Ps\*s\*;\*(Pm\*s\*$\*y .br where \*(Ps is the mode number as in SM/RM, and \*(Pm is the mode value: @@ -2024,7 +2076,7 @@ and \*(Pm is the mode value: Request DEC private mode (DECRQM). For VT300 and up, reply DECRPM is .br - \*(Cs\*?\*(Ps\*;\*(Pm\*s\*$\*y + \*(Cs\*?\*(Ps\*s\*;\*(Pm\*s\*$\*y .br where \*(Ps is the mode number as in DECSET/DECSET, \*(Pm is the mode value as in the ANSI DECRQM. @@ -2104,7 +2156,12 @@ Only those modes listed as parameters are restored. .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*;\\*(Pm\\*s\\*$\\*r Change Attributes in Rectangular Area (DECCARA), VT400 and up. \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle. - \*(Pm denotes the SGR attributes to change: 0, 1, 4, 5, 7. + \*(Pm denotes the SGR attributes to change: \*0, \*1, \*4, \*5, \*7, \*8. +Setting SGR \*0 resets modes \*1, \*4, \*5, \*7. +Those modes can be individually reset with SGR \*2\*2, \*2\*4, \*2\*5 and \*2\*7. +Setting SGR \*8 is an \fI\*(xt\fP extension; +it may be reset with SGR \*2\*8. +See DECSACE. . .iP .IP \\*(Cs\\*(cs @@ -2271,7 +2328,10 @@ Set warning-bell volume (DECSWBV), VT520. .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*;\\*(Pm\\*s\\*$\\*t Reverse Attributes in Rectangular Area (DECRARA), VT400 and up. \*(Pt\*s\*;\*(Pl\*s\*;\*(Pb\*s\*;\*(Pr denotes the rectangle. - \*(Pm denotes the attributes to reverse, i.e., 1, 4, 5, 7. + \*(Pm denotes the attributes to reverse, i.e., 0, 1, 4, 5, 7, 8. +Reversing SGR 0 reverses modes 1, 4, 5, 7. +Reversing SGR 8 is an \fI\*(xt\fP extension. +See DECSACE. . .iP .IP \\*(Cs\\*u @@ -2295,7 +2355,7 @@ Request Displayed Extent (DECRQDE), VT340, VT420. .br Response is .br - \*(Cs\*(Ph\*;\*(Pw\*;\*(Pc\*;\*(Pr\*;\*(Pp\*s\*(Dq\*w + \*(Cs\*(Ph\*s\*;\*(Pw\*s\*;\*(Pc\*s\*;\*(Pr\*s\*;\*(Pp\*s\*(Dq\*w .br where \*(Ph is the number of lines of the current page @@ -2368,6 +2428,23 @@ Select Attribute Change Extent (DECSACE), VT420 and up. \*(Ps = \*0 \(-> from start to end position, wrapped. \*(Ps = \*1 \(-> from start to end position, wrapped. \*(Ps = \*2 \(-> rectangle (exact). +.br +Modes \*0 and \*1 are the \fIstream\fP modes +of the DECCARA and DECRARA controls. +There are several aspects to \fIstream\fP versus \fIrectangle\fP modes: +.br +1. In both \fIstream\fP and \fIrectangle\fP modes, the +row- and column-positions are affected by Origin Mode. +.br +2. In \fIrectangle\fP mode, cells outside the row- and column-positions +are unaffected. +In \fIstream\fP mode, the row- and column-positions are the starting +and ending cells, with wrapping which ignores Origin Mode. +.br +3. In \fIstream\fP mode, +those controls affect only cells where a character was drawn. +In \fIrectangle\fP mode, cells where no character was drawn +are first filled in with a space. . .iP .IP \\*(Cs\\*(Pc\\*s\\*;\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*$\\*x @@ -2526,7 +2603,7 @@ Pop video attributes from stack (XTPOPSGR), \fI\*(xt\fP. Popping restores the video-attributes which were saved using XTPUSHSGR to their previous state. .iP -.IP \\*(Cs\\*(Ps\\*;\\*(Pf\\*;\\*(Pb\\*,\\*| +.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pf\\*s\\*;\\*(Pb\\*s\\*,\\*| Assign Color (DECAC), VT525 only. \*(Ps selects the color item \*(Pf is the foreground color index 0..15 @@ -2540,7 +2617,7 @@ Color items: update the VT100 window colors, like \*(Os \*1\*0 and \*1\*1. .iP -.IP \\*(Cs\\*(Ps\\*;\\*(Pf\\*;\\*(Pb\\*,\\*} +.IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pf\\*s\\*;\\*(Pb\\*s\\*,\\*} Alternate Text Color (DECATC), VT525 only. This feature specifies the colors to use when \%DECSTGLT is selected to 1 or 2. \*(Ps selects attribute combinations @@ -4668,6 +4745,14 @@ Besides the Sun-derived OSC controls for setting window title and icon label, The \fICDE\fP source was unavailable for inspection until 2012, so that clarification of the details of the window operations relied upon \fIvttest\fP. +However, the manual page for the control sequences +(i.e., \fB\%dtterm\fP(5) in the file formats section) was readily available. +DEC adapted the control sequences for setting the window and icon +labels in the VT525. +In doing so, DEC's VT520/VT525 manual changed +the letter \fBl\fP to a number \fB1\fP, +and added a parameter \fB2\fP before the \fIl/L\fP (or \fI1/L\fP) code used to +distinguish the window and icon labels. .bP The SCOSC/SCORC control sequences for saving/restoring the cursor and for saving/restoring \*(``DEC Private Mode Values\*('' @@ -4717,7 +4802,7 @@ private control in one of its terminals more than five years later (for the VT420 PCTerm, announced in February 1992). .IP In that model of the VT420, -\*(Cs\*?\*(Pm\*;\*(Pc\*s\*r +\*(Cs\*?\*(Pm\*s\*;\*(Pc\*s\*r selects the \fIPC TERM\fP emulation mode. When this mode is enabled, the keyboard sends \fIscan codes\fP rather than characters (analogous to X keyboard events). diff --git a/app/xterm/ctlseqs.txt b/app/xterm/ctlseqs.txt index b57f7b62f..9c69d9449 100644 --- a/app/xterm/ctlseqs.txt +++ b/app/xterm/ctlseqs.txt @@ -21,7 +21,7 @@ Thomas Dickey XFree86 Project (1996-2006) invisible-island.net (2006-2024) - updated for XTerm Patch #392 (2024/05/25) + updated for XTerm Patch #395 (2024/10/14) @@ -93,6 +93,42 @@ o Single-byte controls can be handled separately from multi-byte o Some controls (such as OSC ) introduce a string mode, which is ended on a ST (string terminator). + Section 9 of ECMA-48, like DEC STD 070, chapter 3, goes into detail + to explain that when processing 8-bit controls, the eighth bit of + each byte is ignored. This applies to the content of APC, DCS, OSC, + and PM strings, as well as to the terminating bytes such as the two- + byte string terminator. Quoting from the latter, 3.5.4.5 GR Graphic + Characters within Control Strings: + + GR (8-bit) graphic characters in APC, OSC, and PM control + strings will be treated as their 7-bit equivalent (the eighth + bit will be ignored). + + GR (8-bit) graphic characters are permitted within Device + Control Strings, and the graphic character's interpretation will + be dependent on the internal control string format. When they + occur in the introducer sequence to a Device Control String, the + eighth bit will be ignored, and they will be treated as their + 7-bit equivalent. (Note that this is the same way 8-bit graphic + characters are handled within control sequences.) + + The reason for that is because ECMA-48 presents 7-bit controls as an + alternative to 8-bit controls. It says this: + + The control functions defined in this Standard can be coded in a + 7-bit code as well as in an 8-bit code; both forms of coded + representation are equivalent and in accordance with Standard + ECMA-35. + + and in turn, ECMA-35 9.1 says + + A 7-bit code shall have a structure which is based on a 7-bit + code table arranged in separate areas as follows (see figure 7): + + In short, a standard-compliant implementation of ECMA-48 ignores the + eighth bit of bytes in control strings other than the C1 controls. + XTerm does this. + 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- @@ -324,6 +360,8 @@ ESC ( C Designate G0 Character Set, VT100, ISO 2022. C = % 0 -> DEC Turkish, VT500. C = % 5 -> DEC Supplemental Graphics, VT300. C = & 4 -> DEC Cyrillic, VT500. + C = I -> JIS-Katakana, VT382. + C = J -> JIS-Roman, VT382. The VT520 reference manual lists a few more, but no documentation has been found for the mappings: C = % 3 -> SCS NRCS, VT500. @@ -414,7 +452,7 @@ DCS Ps ; Ps | Pt ST key value. The key codes correspond to the DEC function-key codes (e.g., F6=17). -DCS Ps! u Pt ST +DCS Ps ! u Pt ST Assigning User-Preferred Supplemental Sets (DECAUPSS), VT320, VT510. XTerm ignores this in UTF-8 mode, and uses the preferLatin1 resource to choose the default setting. @@ -450,6 +488,7 @@ DCS $ q Pt ST $ | -> DECSCPP $ } -> DECSASD $ ~ -> DECSSDT + ) { -> DECSTGLT (VT525 only) * x -> DECSACE * | -> DECSNLS , | -> DECAC (VT525 only) @@ -1256,7 +1295,7 @@ CSI Ps n Device Status Report (DSR). 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-, + configuration the shifted F3 key may send (with shift-, control-, alt-modifiers) CSI 1 ; 2 R , or @@ -1266,7 +1305,7 @@ CSI Ps n Device Status Report (DSR). The second parameter encodes the modifiers; values range from 2 to 16. See the section PC-Style Function Keys for the codes. The modifyFunctionKeys and modifyKeyboard resources - can change the form of the string sent from the modified F1 + can change the form of the string sent from the modified F3 key. CSI > Ps n @@ -1366,7 +1405,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 @@ -1378,7 +1417,7 @@ 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 ), @@ -1443,7 +1482,11 @@ CSI ? Pm r CSI Pt ; Pl ; Pb ; Pr ; Pm $ r Change Attributes in Rectangular Area (DECCARA), VT400 and up. Pt ; Pl ; Pb ; Pr denotes the rectangle. - Pm denotes the SGR attributes to change: 0, 1, 4, 5, 7. + Pm denotes the SGR attributes to change: 0 , 1 , 4 , 5 , 7 , + 8 . Setting SGR 0 resets modes 1 , 4 , 5 , 7 . Those modes + can be individually reset with SGR 2 2 , 2 4 , 2 5 and 2 7 . + Setting SGR 8 is an xterm extension; it may be reset with SGR + 2 8 . See DECSACE. CSI s Save cursor, available only when DECLRMM is disabled (SCOSC, also ANSI.SYS). @@ -1580,7 +1623,9 @@ CSI Pt ; Pl ; Pb ; Pr ; Pm $ t Reverse Attributes in Rectangular Area (DECRARA), VT400 and up. Pt ; Pl ; Pb ; Pr denotes the rectangle. - Pm denotes the attributes to reverse, i.e., 1, 4, 5, 7. + Pm denotes the attributes to reverse, i.e., 0, 1, 4, 5, 7, + 8. Reversing SGR 0 reverses modes 1, 4, 5, 7. Reversing SGR + 8 is an xterm extension. See DECSACE. CSI u Restore cursor (SCORC, also ANSI.SYS). @@ -1595,7 +1640,7 @@ CSI Ps SP u CSI " v Request Displayed Extent (DECRQDE), VT340, VT420. Response is - CSI Ph; Pw; Pc; Pr; Pp " w + CSI Ph ; Pw ; Pc ; Pr ; Pp " w where Ph is the number of lines of the current page Pw is the number of columns of the current page @@ -1653,6 +1698,18 @@ CSI Ps * x Ps = 0 -> from start to end position, wrapped. Ps = 1 -> from start to end position, wrapped. Ps = 2 -> rectangle (exact). + Modes 0 and 1 are the stream modes of the DECCARA and + DECRARA controls. There are several aspects to stream versus + rectangle modes: + 1. In both stream and rectangle modes, the row- and column- + positions are affected by Origin Mode. + 2. In rectangle mode, cells outside the row- and column- + positions are unaffected. In stream mode, the row- and + column-positions are the starting and ending cells, with + wrapping which ignores Origin Mode. + 3. In stream mode, those controls affect only cells where a + character was drawn. In rectangle mode, cells where no + character was drawn are first filled in with a space. CSI Pc ; Pt ; Pl ; Pb ; Pr $ x Fill Rectangular Area (DECFRA), VT420 and up. @@ -1790,7 +1847,7 @@ CSI # } Pop video attributes from stack (XTPOPSGR), xterm. Popping restores the video-attributes which were saved using XTPUSHSGR to their previous state. -CSI Ps; Pf; Pb, | +CSI Ps ; Pf ; Pb , | Assign Color (DECAC), VT525 only. Ps selects the color item Pf is the foreground color index 0..15 @@ -1801,7 +1858,7 @@ CSI Ps; Pf; Pb, | xterm uses the SGR color palette with DECAC color item 1 to update the VT100 window colors, like OSC 1 0 and 1 1 . -CSI Ps; Pf; Pb, } +CSI Ps ; Pf ; Pb , } Alternate Text Color (DECATC), VT525 only. This feature specifies the colors to use when DECSTGLT is selected to 1 or 2. @@ -3526,7 +3583,12 @@ o XTerm supports control sequences for manipulating its window which The CDE source was unavailable for inspection until 2012, so that clarification of the details of the window operations relied upon - vttest. + vttest. However, the manual page for the control sequences (i.e., + dtterm(5) in the file formats section) was readily available. DEC + adapted the control sequences for setting the window and icon labels + in the VT525. In doing so, DEC's VT520/VT525 manual changed the + letter l to a number 1, and added a parameter 2 before the l/L (or + 1/L) code used to distinguish the window and icon labels. o The SCOSC/SCORC control sequences for saving/restoring the cursor and for saving/restoring "DEC Private Mode Values" (XTSAVE and @@ -3540,44 +3602,44 @@ o The SCOSC/SCORC control sequences for saving/restoring the cursor be used in termcap for vi(1), 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 + while the SCOSC/SCORC pair was added in 1995 by XFree86 (and documented long afterwards). - The SCO ANSI console terminal descriptions did not use these - controls (they used the VT100-compatible SC/RC pair). SCOSC/SCORC - were an artifact of DOS 2.00 (January 1983), by Microsoft and later + The SCO ANSI console terminal descriptions did not use these + controls (they used the VT100-compatible SC/RC pair). SCOSC/SCORC + were an artifact of DOS 2.00 (January 1983), by Microsoft and later supported by SCO and other vendors. - The SCOSC/SCORC pair is considered a private mode because the final + The SCOSC/SCORC pair is considered a private mode because the final characters (s and u ) fall in the range from "`" to "~" (octal 0140 - to octal 0176). Other private control sequences can be constructed + to octal 0176). Other private control sequences can be constructed by using octets 074 to 077 (characters "<", "=", ">", or "?") at the beginning of the parameter string. The XTSAVE and XTRESTORE controls use "?") in this manner. Because the XTSAVE and XTRESTORE controls are private, other - terminals may behave differently. For example, DEC (a contributor - to the early xterm as well as a manufacturer of terminals) used an - incompatible private control in one of its terminals more than five + terminals may behave differently. For example, DEC (a contributor + to the early xterm as well as a manufacturer of terminals) used an + incompatible private control in one of its terminals more than five years later (for the VT420 PCTerm, announced in February 1992). - In that model of the VT420, CSI ? Pm; Pc r selects the PC TERM - emulation mode. When this mode is enabled, the keyboard sends scan - codes rather than characters (analogous to X keyboard events). The - first parameter of this private control enables or disables PC TERM + In that model of the VT420, CSI ? Pm ; Pc r selects the PC TERM + emulation mode. When this mode is enabled, the keyboard sends scan + codes rather than characters (analogous to X keyboard events). The + first parameter of this private control enables or disables PC TERM mode, while the second selects a character set. An ambiguity arises if an application omits the second parameter. In that special case, - it cannot be distinguished from XTRESTORE. DEC did not take this + it cannot be distinguished from XTRESTORE. DEC did not take this into account when designing the feature. - If there were potential users, xterm could accommodate this by a - resource setting. In retrospect (thirty years later), there have - been no uses of PC TERM, while the XTRESTORE feature is still in + If there were potential users, xterm could accommodate this by a + resource setting. In retrospect (thirty years later), there have + been no uses of PC TERM, while the XTRESTORE feature is still in use. o The aixterm manual page gives the format of the control sequence for - foreground and background colors 8-15, but does not specify what - those colors are. That is implied by the description's mention of + foreground and background colors 8-15, but does not specify what + those colors are. That is implied by the description's mention of HFT: The aixterm command provides a standard terminal type for @@ -3587,7 +3649,7 @@ o The aixterm manual page gives the format of the control sequence for the -v flag. Unlike xterm, there are no resource names for the 16 colors, leaving - the reader to assume that the mapping is hard-coded. The control - sequences for colors 8-15 are not specified by ECMA-48, but rather - (as done in other instances by xterm) chosen to not conflict with + the reader to assume that the mapping is hard-coded. The control + sequences for colors 8-15 are not specified by ECMA-48, but rather + (as done in other instances by xterm) chosen to not conflict with current or future standards. diff --git a/app/xterm/data.h b/app/xterm/data.h index 8c5fbf1df..cf69eb26d 100644 --- a/app/xterm/data.h +++ b/app/xterm/data.h @@ -1,7 +1,7 @@ -/* $XTermId: data.h,v 1.141 2021/05/27 22:29:12 tom Exp $ */ +/* $XTermId: data.h,v 1.143 2024/09/30 07:48:05 tom Exp $ */ /* - * Copyright 2002-2019,2021 by Thomas E. Dickey + * Copyright 2002-2021,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -60,21 +60,6 @@ extern Widget toplevel; extern XtAppContext app_con; -#ifdef VMS -/* actually in vms.c */ -extern int tt_width; -extern int tt_length; -extern int tt_changed; -extern int tt_pasting; -extern int tt_new_output; -#define VMS_TERM_BUFFER_SIZE 500 -struct q_head { - int flink; - int blink; -}; -extern struct q_head read_queue; -#endif - #if OPT_TEK4014 extern Char *Tpushb; extern Char *Tpushback; @@ -170,6 +155,7 @@ typedef struct XTERM_RESOURCE { Boolean utmpInhibit; Boolean utmpDisplayId; Boolean messages; + Boolean notMapped; #ifdef HAVE_LIB_XCURSOR String cursorTheme; diff --git a/app/xterm/doublechr.c b/app/xterm/doublechr.c index 3e348dd66..a350bbcca 100644 --- a/app/xterm/doublechr.c +++ b/app/xterm/doublechr.c @@ -1,7 +1,7 @@ -/* $XTermId: doublechr.c,v 1.108 2022/10/23 14:46:14 tom Exp $ */ +/* $XTermId: doublechr.c,v 1.109 2024/09/01 22:49:10 tom Exp $ */ /* - * Copyright 1997-2021,2022 by Thomas E. Dickey + * Copyright 1997-2022,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -196,7 +196,7 @@ discard_font(XtermWidget xw, int n) /* push back existing fonts and create a new entry */ static XTermFonts * -pushback_font(XtermWidget xw, XTermFonts * source) +pushback_font(XtermWidget xw, const XTermFonts * source) { TScreen *screen = TScreenOf(xw); XTermFonts *data = getDoubleFont(screen, 0); @@ -219,7 +219,7 @@ pushback_font(XtermWidget xw, XTermFonts * source) } static int -xterm_Double_index(XTermDraw * params) +xterm_Double_index(const XTermDraw * params) { XTermDraw local = *params; int n; diff --git a/app/xterm/fontutils.c b/app/xterm/fontutils.c index 61467177e..fdcdef7be 100644 --- a/app/xterm/fontutils.c +++ b/app/xterm/fontutils.c @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.783 2024/07/10 15:48:26 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.786 2024/09/30 07:35:30 tom Exp $ */ /* * Copyright 1998-2023,2024 by Thomas E. Dickey @@ -1250,8 +1250,9 @@ reportXPerChar(XFontStruct *fs) fillXCharStruct(&max_bounds, -32768); fillXCharStruct(&min_bounds, 32767); + TRACE2(("\t\tCells: %d..%d\n", first_char, last_char)); for (ch = first_char; ch < last_char; ++ch) { - XCharStruct *item = cs + ch; + XCharStruct *item = cs + ch - first_char; ++total; if (!CI_NONEXISTCHAR(item)) { ++valid; @@ -1267,6 +1268,15 @@ reportXPerChar(XFontStruct *fs) MAX_BOUNDS(width); MAX_BOUNDS(ascent); MAX_BOUNDS(descent); + TRACE2(("\t\t\t%d: cell [%d .. %d] wide %d high %d / %d\n", + ch, + item->lbearing, + item->rbearing, + item->width, + item->ascent, + item->descent)); + } else { + TRACE(("\t\t\t%d: cell missing\n", ch)); } } ReportFonts("\t\tPer-character: %d/%d\n", valid, total); @@ -3872,7 +3882,7 @@ xtermMissingChar(unsigned ch, XTermFonts * font) if (ch < 256) #endif { - CI_GET_CHAR_INFO_1D(fs, E2A(ch), pc); + CI_GET_CHAR_INFO_1D(fs, ch, pc); } } #if OPT_WIDE_CHARS @@ -4449,7 +4459,7 @@ markXftOpened(XtermWidget xw, XTermXftFonts *which, int n, unsigned wc) } static char ** -xftData2List(XtermWidget xw, XTermXftFonts *fontData) +xftData2List(XtermWidget xw, const XTermXftFonts *fontData) { TScreen *screen = TScreenOf(xw); VTFontList *lists = &xw->work.fonts.xft; @@ -5998,7 +6008,7 @@ getMyXftFont(XtermWidget xw, int which, int fontnum) } const char * -whichXftFonts(XtermWidget xw, XTermXftFonts *data) +whichXftFonts(XtermWidget xw, const XTermXftFonts *data) { TScreen *screen = TScreenOf(xw); const char *result = "?"; @@ -6075,7 +6085,7 @@ whichFontEnum(VTFontEnum value) } const char * -whichFontList(XtermWidget xw, VTFontList * value) +whichFontList(XtermWidget xw, const VTFontList * value) { const char *result = "?"; if (value == &(xw->work.fonts.x11)) diff --git a/app/xterm/fontutils.h b/app/xterm/fontutils.h index 24b4c7079..c77ae091e 100644 --- a/app/xterm/fontutils.h +++ b/app/xterm/fontutils.h @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.h,v 1.147 2024/07/11 08:16:39 tom Exp $ */ +/* $XTermId: fontutils.h,v 1.149 2024/09/01 22:40:13 tom Exp $ */ /* * Copyright 1998-2022,2024 by Thomas E. Dickey @@ -45,7 +45,7 @@ extern XTermFonts * getNormalFont (TScreen * /* screen */, int /* which */); extern const VTFontNames * defaultVTFontNames(XtermWidget /* xw */); extern const VTFontNames * xtermFontName (const char */* normal */); extern const char * whichFontEnum (VTFontEnum /* value */); -extern const char * whichFontList (XtermWidget /* xw */, VTFontList * /* value */); +extern const char * whichFontList (XtermWidget /* xw */, const VTFontList * /* value */); extern const char * whichFontList2(XtermWidget /* xw */, char ** /* value */); extern int lookupRelativeFontSize (XtermWidget /* xw */, int /* old */, int /* relative */); extern int xtermGetFont (const char * /* param */); @@ -120,9 +120,11 @@ extern char *xtermSpecialFont (XTermDraw * /* params */); #define IsXtermMissingChar(screen, ch, font) \ (CheckedKnownMissing(font, ch) \ - ? ((font)->known_missing[(Char)(ch)] > 1) \ - : ((FontIsIncomplete(font) && xtermMissingChar(ch, font)) \ - || ForceBoxChars(screen, ch))) + ? ( (font)->known_missing[(Char)(ch)] > 1) \ + : ( ( ( FontIsIncomplete(font) \ + || ( (ch) < MaxUChar && !IsLatin1(ch) ) ) \ + && xtermMissingChar(ch, font) ) \ + || ForceBoxChars(screen, ch) ) ) #else #define IsXtermMissingChar(screen, ch, font) False #endif @@ -159,7 +161,7 @@ extern void xtermSaveVTFonts (XtermWidget /* xw */); extern Boolean maybeXftCache(XtermWidget /* xw */, XftFont * /* font */); extern Bool xtermXftMissing (XtermWidget /* xw */, XTermXftFonts * /* fontData */, int /* fontNum */, XftFont * /* font */, unsigned /* wc */); extern XTermXftFonts *getMyXftFont (XtermWidget /* xw */, int /* which */, int /* fontnum */); -extern const char * whichXftFonts(XtermWidget /* xw */, XTermXftFonts * /* data */); +extern const char * whichXftFonts(XtermWidget /* xw */, const XTermXftFonts * /* data */); extern int findXftGlyph (XtermWidget /* xw */, XTermXftFonts * /* fontData */, unsigned /* wc */); extern XftFont *getXftFont (XtermWidget /* xw */, VTFontEnum /* which */, int /* fontnum */); extern void closeCachedXft (TScreen * /* screen */, XftFont * /* font */); diff --git a/app/xterm/gen-charsets.pl b/app/xterm/gen-charsets.pl index 11c6b0e4f..ba303cf41 100644 --- a/app/xterm/gen-charsets.pl +++ b/app/xterm/gen-charsets.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# $XTermId: gen-charsets.pl,v 1.37 2024/02/09 01:11:52 tom Exp $ +# $XTermId: gen-charsets.pl,v 1.41 2024/10/03 22:01:13 tom Exp $ # ----------------------------------------------------------------------------- # this file is part of xterm # @@ -40,7 +40,7 @@ use Getopt::Std; $| = 1; -our ( $opt_d, $opt_i, $opt_v, $opt_x ); +our ( $opt_i, $opt_v, $opt_x ); our $undef = hex(0x2426); our $head_file = "charsets.h"; our $data_file = "charsets.dat"; @@ -57,8 +57,12 @@ our %wide_chars = qw( map_ISO_Latin_2 1 map_ISO_Latin_5 1 map_ISO_Latin_Cyrillic 1 + map_JIS_Roman 1 + map_JIS_Katakana 1 map_NRCS_Greek 1 map_NRCS_Hebrew 1 + map_NRCS_Serbo_Croatian 1 + map_NRCS_Russian 1 map_NRCS_Turkish 1 ); @@ -293,6 +297,7 @@ sub do_update($) { $state = 2; $codep = 0; $codep = 94 if ( $data =~ /_DEC_/ ); + $codep = 94 if ( $data =~ /_JIS_/ ); $codep = 96 if ( $data =~ /_ISO_/ ); $data .= "(code)" unless ( $data =~ /\(code/ ); @@ -402,7 +407,6 @@ sub main::HELP_MESSAGE() { Usage: $0 [options] Options: - -d debug -i import charset data from Unicode file -v verbose -x update charsets.h from $data_file diff --git a/app/xterm/graphics_regis.c b/app/xterm/graphics_regis.c index d1d00b6ee..db7619135 100644 --- a/app/xterm/graphics_regis.c +++ b/app/xterm/graphics_regis.c @@ -1,8 +1,8 @@ -/* $XTermId: graphics_regis.c,v 1.149 2023/10/08 23:11:35 tom Exp $ */ +/* $XTermId: graphics_regis.c,v 1.150 2024/09/01 22:49:10 tom Exp $ */ /* + * Copyright 2014-2023,2024 by Thomas E. Dickey * Copyright 2014-2022,2023 by Ross Combs - * Copyright 2014-2022,2023 by Thomas E. Dickey * * All Rights Reserved * @@ -4170,9 +4170,6 @@ load_regis_write_control(RegisParseState *state, TRACE(("DATA_ERROR: interpreting out of range value as 0 FIXME\n")); break; } - if (val == 1) { - TRACE(("ERROR: blink display method not supported FIXME\n")); - } } break; case 'C': diff --git a/app/xterm/input.c b/app/xterm/input.c index a7162aab7..773e20a84 100644 --- a/app/xterm/input.c +++ b/app/xterm/input.c @@ -1,7 +1,7 @@ -/* $XTermId: input.c,v 1.370 2023/05/09 08:14:04 tom Exp $ */ +/* $XTermId: input.c,v 1.373 2024/09/30 07:48:35 tom Exp $ */ /* - * Copyright 1999-2022,2023 by Thomas E. Dickey + * Copyright 1999-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -58,10 +58,6 @@ #include <X11/keysym.h> -#ifdef VMS -#include <X11/keysymdef.h> -#endif - #if HAVE_X11_DECKEYSYM_H #include <X11/DECkeysym.h> #endif @@ -1170,7 +1166,7 @@ Input(XtermWidget xw, && (dec_code >= 11 && dec_code <= 14)) { reply.a_type = ANSI_SS3; VT52_CURSOR_KEYS; - reply.a_final = (Char) A2E(dec_code - 11 + E2A('P')); + reply.a_final = (Char) (dec_code - 11 + 'P'); modifyCursorKey(&reply, keyboard->modify_now.function_keys, &modify_parm); @@ -1926,7 +1922,7 @@ xtermHasTranslation(XtermWidget xw, const char *keyword, Bool onlyInsert) onlyInsert)); } -#if OPT_EXTRA_PASTE +#if OPT_EXTRA_PASTE && (defined(XF86XK_Paste) || defined(SunXK_Paste)) static void addTranslation(XtermWidget xw, const char *fromString, const char *toString) { diff --git a/app/xterm/main.c b/app/xterm/main.c index 661a11cb2..a1981af85 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.923 2024/07/09 08:03:49 tom Exp $ */ +/* $XTermId: main.c,v 1.927 2024/09/30 08:03:20 tom Exp $ */ /* * Copyright 2002-2023,2024 by Thomas E. Dickey @@ -181,11 +181,6 @@ static GCC_NORETURN void HsSysError(int); #endif #endif -#ifdef __MVS__ -#define USE_SYSV_PGRP -#define USE_SYSV_SIGNALS -#endif - #ifdef __CYGWIN__ #define WTMP #endif @@ -290,7 +285,6 @@ ttyslot(void) #endif #ifndef __linux__ -#ifndef VMS #ifndef USE_POSIX_TERMIOS #ifndef USE_ANY_SYSV_TERMIO #include <sgtty.h> @@ -301,7 +295,6 @@ ttyslot(void) #else #include <sys/resource.h> #endif -#endif /* !VMS */ #endif /* !__linux__ */ #endif /* __QNX__ */ @@ -313,7 +306,7 @@ ttyslot(void) #ifndef NOFILE #define NOFILE OPEN_MAX #endif -#elif !(defined(VMS) || defined(WIN32) || defined(Lynx) || defined(__GNU__) || defined(__MVS__)) +#elif !(defined(WIN32) || defined(Lynx) || defined(__GNU__)) #include <sys/param.h> /* for NOFILE */ #endif @@ -468,7 +461,6 @@ extern char *ttyname(); extern char *ptsname(int); #endif -#ifndef VMS static void reapchild(int /* n */ ); static int spawnXTerm(XtermWidget /* xw */ ,unsigned /* line_speed */ ); @@ -476,7 +468,6 @@ static void remove_termcap_entry(char *, const char *); #ifdef USE_PTY_SEARCH static int pty_search(int * /* pty */ ); #endif -#endif /* ! VMS */ static int get_pty(int *pty, char *from); static void resize_termcap(XtermWidget xw); @@ -596,7 +587,6 @@ static unsigned command_length_with_luit = 0; #define CWERASE CONTROL('W') #endif -#ifndef VMS #ifdef TERMIO_STRUCT /* The following structures are initialized in main() in order ** to eliminate any assumptions about the internal order of their @@ -650,7 +640,6 @@ static struct jtchars d_jtc = }; #endif /* sony */ #endif /* TERMIO_STRUCT */ -#endif /* ! VMS */ /* * SYSV has the termio.c_cc[V] and ltchars; BSD has tchars and ltchars; @@ -898,6 +887,7 @@ static XtResource application_resources[] = Ires(XtNminBufSize, XtCMinBufSize, minBufSize, 4096), Ires(XtNmaxBufSize, XtCMaxBufSize, maxBufSize, 32768), Sres(XtNmenuLocale, XtCMenuLocale, menuLocale, DEF_MENU_LOCALE), + Bres(XtNnotMapped, XtCNotMapped, notMapped, False), Sres(XtNomitTranslation, XtCOmitTranslation, omitTranslation, NULL), Sres(XtNkeyboardType, XtCKeyboardType, keyboardType, "unknown"), #ifdef HAVE_LIB_XCURSOR @@ -1098,6 +1088,8 @@ OPTS("-mesg", NO_ARG(XtNmessages), "off"), OPTS("+mesg", NO_ARG(XtNmessages), "on"), OPTS("-ms", MY_ARG(XtNpointerColor), NULL), OPTS("-nb", MY_ARG(XtNnMarginBell), NULL), +OPTS("-nomap", NO_ARG(XtNnotMapped), "on"), +OPTS("+nomap", NO_ARG(XtNnotMapped), "off"), OPTS("-nul", NO_ARG(XtNunderLine), "off"), OPTS("+nul", NO_ARG(XtNunderLine), "on"), OPTS("-pc", NO_ARG(XtNboldColors), "on"), @@ -1309,6 +1301,7 @@ static OptionHelp xtermOptions[] = { { "-/+mesg", "forbid/allow messages" }, { "-ms color", "pointer color" }, { "-nb number", "margin bell in characters from right end" }, +{ "-/+nomap", "turn off/on initial mapping of window" }, { "-/+nul", "turn off/on display of underlining" }, { "-/+aw", "turn on/off auto wraparound" }, { "-/+pc", "turn on/off PC-style bold colors" }, @@ -1576,7 +1569,7 @@ decode_keyvalue(char **ptr, int termcap) if (*string == '^') { switch (*++string) { case '?': - value = A2E(ANSI_DEL); + value = ANSI_DEL; break; case '-': if (!termcap) { @@ -2167,12 +2160,7 @@ setEffectiveGroup(gid_t group) { TRACE(("process %d setEffectiveGroup(%d)\n", (int) getpid(), (int) group)); if (setegid(group) == -1) { -#ifdef __MVS__ - if (!(errno == EMVSERR)) /* could happen if _BPX_SHAREAS=REUSE */ -#endif - { - xtermPerror("setegid(%d)", (int) group); - } + xtermPerror("setegid(%d)", (int) group); } TRACE_IDS; } @@ -2184,12 +2172,7 @@ setEffectiveUser(uid_t user) { TRACE(("process %d setEffectiveUser(%d)\n", (int) getpid(), (int) user)); if (seteuid(user) == -1) { -#ifdef __MVS__ - if (!(errno == EMVSERR)) -#endif - { - xtermPerror("seteuid(%d)", (int) user); - } + xtermPerror("seteuid(%d)", (int) user); } TRACE_IDS; } @@ -2604,9 +2587,6 @@ main(int argc, char *argv[]ENVP_ARG) d_tio.c_cflag &= ~(HUPCL | PARENB); d_tio.c_iflag |= BRKINT | ISTRIP | IGNPAR; #endif -#ifdef __MVS__ - d_tio.c_cflag &= ~(HUPCL | PARENB); -#endif { Cardinal nn; int i; @@ -2755,13 +2735,9 @@ main(int argc, char *argv[]ENVP_ARG) TRACE_ARGV("After XtOpenApplication", argv); for (argc--, argv++; argc > 0; argc--, argv++) { if (!isOption(*argv)) { -#ifdef VMS - Syntax(*argv); -#else if (argc > 1) Syntax(*argv); continue; -#endif } TRACE(("parsing %s\n", argv[0])); @@ -2980,7 +2956,6 @@ main(int argc, char *argv[]ENVP_ARG) setresgid(save_rgid, save_rgid, save_rgid); save_egid = -1; -#ifndef VMS /* Child process is out there, let's catch its termination */ #ifdef USE_POSIX_SIGNALS @@ -3017,7 +2992,7 @@ main(int argc, char *argv[]ENVP_ARG) } #endif #endif -#if defined(USE_ANY_SYSV_TERMIO) || defined(__MVS__) || defined(__minix) +#if defined(USE_ANY_SYSV_TERMIO) || defined(__minix) if (0 > (mode = fcntl(screen->respond, F_GETFL, 0))) SysError(ERROR_F_GETFL); #ifdef O_NDELAY @@ -3054,7 +3029,6 @@ main(int argc, char *argv[]ENVP_ARG) ? (1 + ConnectionNumber(screen->display)) : (1 + screen->respond)); -#endif /* !VMS */ if_DEBUG({ TRACE(("debugging on pid %d\n", (int) getpid())); }); @@ -3235,11 +3209,7 @@ get_pty(int *pty, char *from GCC_UNUSED) result = pty_search(pty); #else #if defined(USE_USG_PTYS) || defined(__CYGWIN__) -#if defined(__MVS__) - result = pty_search(pty); -#else result = ((*pty = open("/dev/ptmx", O_RDWR)) < 0); -#endif #if defined(SVR4) || defined(__SCO__) if (!result) strcpy(ttydev, ptsname(*pty)); @@ -3392,7 +3362,7 @@ pty_search(int *pty) { static int devindex = 0, letter = 0; -#if defined(CRAY) || defined(__MVS__) +#if defined(CRAY) while (devindex < MAXPTTYS) { sprintf(ttydev, TTYFORMAT, devindex); sprintf(ptydev, PTYFORMAT, devindex); @@ -3403,7 +3373,7 @@ pty_search(int *pty) return 0; } } -#else /* CRAY || __MVS__ */ +#else /* CRAY */ while (PTYCHAR1[letter]) { ttydev[strlen(ttydev) - 2] = ptydev[strlen(ptydev) - 2] = PTYCHAR1[letter]; @@ -3648,7 +3618,6 @@ HsSysError(int error) } #endif /* OPT_PTY_HANDSHAKE else !OPT_PTY_HANDSHAKE */ -#ifndef VMS static void set_owner(char *device, unsigned uid, unsigned gid, unsigned mode) { @@ -4048,9 +4017,6 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) #ifdef TERMIO_STRUCT TERMIO_STRUCT tio; -#ifdef __MVS__ - TERMIO_STRUCT gio; -#endif /* __MVS__ */ #ifdef TIOCLSET unsigned lmode; #endif /* TIOCLSET */ @@ -4254,13 +4220,6 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) initial_erase)); } #endif -#ifdef __MVS__ - if (ttyGetAttr(ttyfd, &gio) == 0) { - gio.c_cflag &= ~(HUPCL | PARENB); - ttySetAttr(ttyfd, &gio); - } -#endif /* __MVS__ */ - close_fd(ttyfd); } @@ -4489,9 +4448,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) #endif /* SVR4 */ #endif /* I_PUSH */ ttyfd = ptyfd; -#ifndef __MVS__ close_fd(screen->respond); -#endif /* __MVS__ */ #ifdef TTYSIZE_STRUCT /* tell tty how big window is */ @@ -4540,10 +4497,8 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) /* we don't need the socket, or the pty master anymore */ close(ConnectionNumber(screen->display)); -#ifndef __MVS__ if (screen->respond >= 0) close(screen->respond); -#endif /* __MVS__ */ /* Now is the time to set up our process group and * open up the pty slave. @@ -4560,14 +4515,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) qsetlogin(getlogin(), ttydev); #endif if (ttyfd >= 0) { -#ifdef __MVS__ - if (ttyGetAttr(ttyfd, &gio) == 0) { - gio.c_cflag &= ~(HUPCL | PARENB); - ttySetAttr(ttyfd, &gio); - } -#else /* !__MVS__ */ close_fd(ttyfd); -#endif /* __MVS__ */ } for (;;) { @@ -4713,10 +4661,6 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) #else /* USE_POSIX_TERMIOS */ cfsetispeed(&tio, line_speed); cfsetospeed(&tio, line_speed); -#ifdef __MVS__ - /* turn off bits that can't be set from the slave side */ - tio.c_cflag &= ~(PACKET | PKT3270 | PTU3270 | PKTXTND); -#endif /* __MVS__ */ /* Clear CLOCAL so that SIGHUP is sent to us when the xterm ends */ tio.c_cflag &= (unsigned) ~CLOCAL; @@ -4734,15 +4678,6 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) for (nn = 0; nn < XtNumber(ttyChars); ++nn) { if (validTtyChar(tio, nn)) { int sysMode = ttyChars[nn].sysMode; -#ifdef __MVS__ - if (tio.c_cc[sysMode] != 0) { - switch (sysMode) { - case VEOL: - case VEOF: - continue; - } - } -#endif tio.c_cc[sysMode] = (cc_t) ttyChars[nn].myDefault; } } @@ -5878,8 +5813,6 @@ resize_termcap(XtermWidget xw) #endif /* USE_SYSV_ENVVARS */ } -#endif /* ! VMS */ - /* * Does a non-blocking wait for a child process. If the system * doesn't support non-blocking wait, do nothing. @@ -5908,8 +5841,6 @@ nonblocking_wait(void) return pid; } -#ifndef VMS - /* ARGSUSED */ static void reapchild(int n GCC_UNUSED) @@ -5940,7 +5871,6 @@ reapchild(int n GCC_UNUSED) errno = olderrno; } -#endif /* !VMS */ static void remove_termcap_entry(char *buf, const char *str) @@ -6080,7 +6010,7 @@ GetBytesAvailable(Display *dpy) #endif return result; } -#endif /* !VMS */ +#endif /* !GetBytesAvailable */ /* Utility function to try to hide system differences from everybody who used to call killpg() */ @@ -6096,26 +6026,6 @@ kill_process_group(int pid, int sig) #endif } -#if OPT_EBCDIC -int -A2E(int x) -{ - char c; - c = x; - __atoe_l(&c, 1); - return c; -} - -int -E2A(int x) -{ - char c; - c = x; - __etoa_l(&c, 1); - return c; -} -#endif - #if defined(__QNX__) && !defined(__QNXNTO__) #include <sys/types.h> #include <sys/proc_msg.h> diff --git a/app/xterm/menu.c b/app/xterm/menu.c index 50be11be4..110cde5f4 100644 --- a/app/xterm/menu.c +++ b/app/xterm/menu.c @@ -1,7 +1,7 @@ -/* $XTermId: menu.c,v 1.375 2023/12/01 21:39:31 tom Exp $ */ +/* $XTermId: menu.c,v 1.377 2024/09/30 07:53:29 tom Exp $ */ /* - * Copyright 1999-2022,2023 by Thomas E. Dickey + * Copyright 1999-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -769,7 +769,7 @@ static Bool domenu(Widget w, XEvent *event GCC_UNUSED, String *params, /* mainMenu, vtMenu, or tekMenu */ - Cardinal *param_count) /* 0 or 1 */ + const Cardinal *param_count) /* 0 or 1 */ { XtermWidget xw = term; TScreen *screen = TScreenOf(xw); @@ -984,14 +984,12 @@ HandlePopupMenu(Widget w, static void handle_send_signal(Widget gw GCC_UNUSED, int sig) { -#ifndef VMS TScreen *screen = TScreenOf(term); if (hold_screen > 1) hold_screen = 0; if (screen->pid > 1) kill_process_group(screen->pid, sig); -#endif } #if OPT_VT52_MODE diff --git a/app/xterm/misc.c b/app/xterm/misc.c index e3397261a..783afd8ae 100644 --- a/app/xterm/misc.c +++ b/app/xterm/misc.c @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.1094 2024/06/26 08:05:39 tom Exp $ */ +/* $XTermId: misc.c,v 1.1099 2024/10/14 16:00:49 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -105,13 +105,6 @@ #define MakeTemp(f) mktemp(f) #endif -#ifdef VMS -#define XTERM_VMS_LOGFILE "SYS$SCRATCH:XTERM_LOG.TXT" -#ifdef ALLOWLOGFILEEXEC -#undef ALLOWLOGFILEEXEC -#endif -#endif /* VMS */ - #if USE_DOUBLE_BUFFER #include <X11/extensions/Xdbe.h> #endif @@ -2116,11 +2109,7 @@ Redraw(void) #endif } -#ifdef VMS -#define TIMESTAMP_FMT "%s%d-%02d-%02d-%02d-%02d-%02d" -#else #define TIMESTAMP_FMT "%s%d-%02d-%02d.%02d:%02d:%02d" -#endif void timestamp_filename(char *dst, const char *src) @@ -2149,9 +2138,7 @@ create_printfile(XtermWidget xw, const char *suffix) int fd; FILE *fp; -#ifdef VMS - sprintf(fname, "sys$scratch:xterm%s", suffix); -#elif defined(HAVE_STRFTIME) +#if defined(HAVE_STRFTIME) { char format[1024]; time_t now; @@ -2181,17 +2168,6 @@ open_userfile(uid_t uid, gid_t gid, char *path, Bool append) int fd; struct stat sb; -#ifdef VMS - if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) < 0) { - int the_error = errno; - xtermWarning("cannot open %s: %d:%s\n", - path, - the_error, - SysErrorMsg(the_error)); - return -1; - } - chown(path, uid, gid); -#else if ((access(path, F_OK) != 0 && (errno != ENOENT)) || (creat_as(uid, gid, append, path, 0644) <= 0) || ((fd = open(path, O_WRONLY | O_APPEND)) < 0)) { @@ -2202,7 +2178,6 @@ open_userfile(uid_t uid, gid_t gid, char *path, Bool append) SysErrorMsg(the_error)); return -1; } -#endif /* * Doublecheck that the user really owns the file that we've opened before @@ -2218,7 +2193,6 @@ open_userfile(uid_t uid, gid_t gid, char *path, Bool append) return fd; } -#ifndef VMS /* * Create a file only if we could with the permissions of the real user id. * We could emulate this with careful use of access() and following @@ -2321,7 +2295,6 @@ creat_as(uid_t uid, gid_t gid, Bool append, char *pathname, unsigned mode) return retval; } } -#endif /* !VMS */ #endif /* OPT_SCREEN_DUMPS || defined(ALLOWLOGGING) */ int @@ -2496,13 +2469,6 @@ StartLog(XtermWidget xw) if (screen->logging || (screen->inhibit & I_LOG)) return; -#ifdef VMS /* file name is fixed in VMS variant */ - screen->logfd = open(XTERM_VMS_LOGFILE, - O_CREAT | O_TRUNC | O_APPEND | O_RDWR, - 0640); - if (screen->logfd < 0) - return; /* open failed */ -#else /*VMS */ /* if we weren't supplied with a logfile path, generate one */ if (IsEmpty(screen->logfile)) @@ -2529,7 +2495,6 @@ StartLog(XtermWidget xw) True)) < 0) return; } -#endif /*VMS */ screen->logstart = VTbuffer->next; screen->logging = True; update_logging(); @@ -2557,12 +2522,6 @@ FlushLog(XtermWidget xw) Char *cp; size_t i; -#ifdef VMS /* avoid logging output loops which otherwise occur sometimes - when there is no output and cp/screen->logstart are 1 apart */ - if (!tt_new_output) - return; - tt_new_output = False; -#endif /* VMS */ cp = VTbuffer->next; if (screen->logstart != 0 && (i = (size_t) (cp - screen->logstart)) > 0) { @@ -5021,6 +4980,12 @@ do_dcs(XtermWidget xw, Char *dcsbuf, size_t dcslen) okay = False; } } else if (screen->terminal_id == 525 + && !strcmp((cp2 = skip_params(cp)), "){")) { /* DECSTGLT */ + TRACE(("reply DECSTGLT:%s\n", cp)); + sprintf(reply, "%d%s", + 3, /* ANSI SGR color */ + cp); + } else if (screen->terminal_id == 525 && !strcmp((cp2 = skip_params(cp)), ",|")) { /* DECAC */ ival = parse_int_param(&cp); TRACE(("reply DECAC\n")); @@ -5556,7 +5521,7 @@ do_dec_rqm(XtermWidget xw, int nparams, int *params) result = MdFlag(xw->keyboard.flags, MODE_DECSDM); break; #endif - case srm_DECNCSM: + case srm_DECNCSM: /* no clearing screen on column change */ if (screen->vtXX_level >= 5) { /* VT510 */ result = MdFlag(xw->flags, NOCLEAR_COLM); } else { @@ -5701,35 +5666,64 @@ do_dec_rqm(XtermWidget xw, int nparams, int *params) result = MdBool(screen->sixel_scrolls_right); break; #endif - case srm_DECARSM: /* ignore */ - case srm_DECATCBM: /* ignore */ - case srm_DECATCUM: /* ignore */ - case srm_DECBBSM: /* ignore */ - case srm_DECCAAM: /* ignore */ - case srm_DECCANSM: /* ignore */ - case srm_DECCAPSLK: /* ignore */ - case srm_DECCRTSM: /* ignore */ - case srm_DECECM: /* ignore */ - case srm_DECFWM: /* ignore */ - case srm_DECHCCM: /* ignore */ - case srm_DECHDPXM: /* ignore */ - case srm_DECHEM: /* ignore */ - case srm_DECHWUM: /* ignore */ - case srm_DECIPEM: /* ignore */ - case srm_DECKBUM: /* ignore */ - case srm_DECKLHIM: /* ignore */ - case srm_DECKPM: /* ignore */ - case srm_DECRLM: /* ignore */ - case srm_DECMCM: /* ignore */ - case srm_DECNAKB: /* ignore */ - case srm_DECNULM: /* ignore */ - case srm_DECNUMLK: /* ignore */ - case srm_DECOSCNM: /* ignore */ - case srm_DECPCCM: /* ignore */ - case srm_DECRLCM: /* ignore */ - case srm_DECRPL: /* ignore */ - case srm_DECVCCM: /* ignore */ - case srm_DECXRLM: /* ignore */ + /* the remainder are recognized but unimplemented */ + /* VT3xx */ + case srm_DEC131TM: /* vt330:VT131 transmit */ + case srm_DECEKEM: /* vt330:edit key execution */ + case srm_DECHCCM: /* vt320:Horizontal Cursor-Coupling Mode */ + case srm_DECKBUM: /* vt330:Keyboard Usage mode */ + case srm_DECKKDM: /* vt382:Kanji/Katakana */ + case srm_DECLTM: /* vt330:line transmit */ + case srm_DECPCCM: /* vt330:Page Cursor-Coupling Mode */ + case srm_DECVCCM: /* vt330:Vertical Cursor-Coupling Mode */ + case srm_DECXRLM: /* vt330:Transmit Rate Limiting */ +#if !OPT_BLINK_CURS + case srm_DECKANAM: /* vt382:Katakana shift */ + case srm_DECSCFDM: /* vt330:space compression field delimiter */ + case srm_DECTEM: /* vt330:transmission execution */ +#endif +#if !OPT_TOOLBAR + case srm_DECEDM: /* vt330:edit */ +#endif + if (screen->vtXX_level >= 3) + result = mdAlwaysReset; + break; + /* VT4xx */ + case srm_DECKPM: /* vt420:Key Position Mode */ + if (screen->vtXX_level >= 4) + result = mdAlwaysReset; + break; + /* VT5xx */ + case srm_DECAAM: /* vt510:auto answerback */ + case srm_DECARSM: /* vt510:auto resize */ + case srm_DECATCBM: /* vt520:alternate text color blink */ + case srm_DECATCUM: /* vt520:alternate text color underline */ + case srm_DECBBSM: /* vt520:bold and blink style */ + case srm_DECCANSM: /* vt510:conceal answerback */ + case srm_DECCAPSLK: /* vt510:Caps Lock Mode */ + case srm_DECCRTSM: /* vt510:CRT save */ + case srm_DECECM: /* vt520:erase color */ + case srm_DECESKM: /* vt510:enable secondary keyboard language */ + case srm_DECFWM: /* vt520:framed windows */ + case srm_DECHDPXM: /* vt510:half duplex */ + case srm_DECHEM: /* vt510:Hebrew encoding */ + case srm_DECHWUM: /* vt520:host wake-up mode (CRT and energy saver) */ + case srm_DECIPEM: /* vt510:IBM ProPrinter Emulation Mode */ + case srm_DECKLHIM: /* vt510:ignore */ + case srm_DECMCM: /* vt510:modem control */ + case srm_DECNAKB: /* vt510:Greek/N-A Keyboard Mapping */ + case srm_DECNULM: /* vt510:Ignoring Null Mode */ + case srm_DECNUMLK: /* vt510:Num Lock Mode */ + case srm_DECOSCNM: /* vt510:Overscan Mode */ + case srm_DECRLCM: /* vt510:Right-to-Left Copy */ + case srm_DECRLM: /* vt510:left-to-right */ + case srm_DECRPL: /* vt520:Review Previous Lines */ +#if !OPT_SHIFT_FONTS + case srm_DECHEBM: /* vt520:Hebrew keyboard mapping */ +#endif + if (screen->vtXX_level >= 5) + result = mdAlwaysReset; + break; default: TRACE(("DATA_ERROR: requested report for unknown private mode %d\n", params[0])); @@ -6561,7 +6555,6 @@ validProgram(const char *pathname) return result; } -#ifndef VMS #ifndef PATH_MAX #define PATH_MAX 512 /* ... is not defined consistently in Xos.h */ #endif @@ -6635,7 +6628,6 @@ xtermFindShell(char *leaf, Bool warning) result = x_strdup(result); return result; } -#endif /* VMS */ #define ENV_HUNK(n) (unsigned) ((((n) + 1) | 31) + 1) @@ -6854,8 +6846,10 @@ set_vt_visibility(Bool on) TScreen *screen = TScreenOf(xw); TRACE(("set_vt_visibility(%d)\n", on)); + if (on) { if (!screen->Vshow && xw) { + resource.notMapped = False; VTInit(xw); XtMapWidget(XtParent(xw)); #if OPT_TOOLBAR @@ -6899,6 +6893,7 @@ set_tek_visibility(Bool on) } if (tekWidget != 0) { Widget tekParent = SHELL_OF(tekWidget); + resource.notMapped = False; XtRealizeWidget(tekParent); XtMapWidget(XtParent(tekWidget)); #if OPT_TOOLBAR diff --git a/app/xterm/package/debian/changelog b/app/xterm/package/debian/changelog index 9952d47bc..224a0ecac 100644 --- a/app/xterm/package/debian/changelog +++ b/app/xterm/package/debian/changelog @@ -1,3 +1,15 @@ +xterm-dev (395) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 11 Sep 2024 03:48:16 -0400 + +xterm-dev (394) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 09 Aug 2024 14:18:03 -0400 + xterm-dev (393) unstable; urgency=low * maintenance updates diff --git a/app/xterm/package/freebsd/Makefile b/app/xterm/package/freebsd/Makefile index 949b7404d..393c31a22 100644 --- a/app/xterm/package/freebsd/Makefile +++ b/app/xterm/package/freebsd/Makefile @@ -1,4 +1,4 @@ -# $XTermId: Makefile,v 1.114 2024/05/25 13:03:00 tom Exp $ +# $XTermId: Makefile,v 1.116 2024/09/11 07:48:16 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= 393 +PORTVERSION= 395 CATEGORIES= x11 MASTER_SITES= ftp://ftp.invisible-island.net/xterm/:src1 \ https://invisible-mirror.net/archives/xterm/:src1 diff --git a/app/xterm/package/pkgsrc/Makefile b/app/xterm/package/pkgsrc/Makefile index a9802af40..bfbb38852 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-393 +DISTNAME= xterm-395 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 5eaca8027..834adaa18 100644 --- a/app/xterm/package/xterm.spec +++ b/app/xterm/package/xterm.spec @@ -1,11 +1,11 @@ -# $XTermId: xterm.spec,v 1.172 2024/05/25 13:03:00 tom Exp $ +# $XTermId: xterm.spec,v 1.174 2024/09/11 07:48:16 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: 393 +Version: 395 Release: 1 License: X11 Group: User Interface/X diff --git a/app/xterm/print.c b/app/xterm/print.c index 4257e1372..7957ad33c 100644 --- a/app/xterm/print.c +++ b/app/xterm/print.c @@ -1,7 +1,7 @@ -/* $XTermId: print.c,v 1.176 2023/11/24 12:16:37 tom Exp $ */ +/* $XTermId: print.c,v 1.178 2024/09/30 08:11:40 tom Exp $ */ /* - * Copyright 1997-2022,2023 by Thomas E. Dickey + * Copyright 1997-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -55,10 +55,6 @@ #define SPS PrinterOf(screen) -#ifdef VMS -#define VMS_TEMP_PRINT_FILE "sys$scratch:xterm_print.txt" -#endif - static void charToPrinter(XtermWidget /* xw */ , unsigned /* chr */ ); static void printLine(XtermWidget /* xw */ , @@ -90,25 +86,13 @@ closePrinter(XtermWidget xw) fclose(SPS.fp); SPS.fp = 0; } else if (xtermHasPrinter(xw) != 0) { -#ifdef VMS - char pcommand[256]; - (void) sprintf(pcommand, "%s %s;", - SPS.printer_command, - VMS_TEMP_PRINT_FILE); -#endif DEBUG_MSG("closePrinter\n"); pclose(SPS.fp); TRACE(("closed printer, waiting...\n")); -#ifdef VMS /* This is a quick hack, really should use - spawn and check status or system services - and go straight to the queue */ - (void) system(pcommand); -#else /* VMS */ while (nonblocking_wait() > 0) { ; } -#endif /* VMS */ SPS.fp = 0; SPS.isOpen = False; TRACE(("closed printer\n")); @@ -431,15 +415,6 @@ charToPrinter(XtermWidget xw, unsigned chr) * write to a pipe. */ case False: -#ifdef VMS - /* - * 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/queue=name/delete [/otherflags]. - */ - SPS.fp = fopen(VMS_TEMP_PRINT_FILE, "w"); -#else { int my_pipe[2]; pid_t my_pid; @@ -510,7 +485,6 @@ charToPrinter(XtermWidget xw, unsigned chr) } } } -#endif break; case True: TRACE(("opening \"%s\" as printer output\n", SPS.printer_command)); diff --git a/app/xterm/ptydata.c b/app/xterm/ptydata.c index 3dd3d4a10..3abc58ec3 100644 --- a/app/xterm/ptydata.c +++ b/app/xterm/ptydata.c @@ -1,4 +1,4 @@ -/* $XTermId: ptydata.c,v 1.160 2024/05/10 22:54:17 tom Exp $ */ +/* $XTermId: ptydata.c,v 1.161 2024/09/30 07:55:25 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -251,19 +251,6 @@ readPtyData(XtermWidget xw, PtySelect * select_mask, PtyData *data) TScreen *screen = TScreenOf(xw); int size = 0; -#ifdef VMS - if (*select_mask & pty_mask) { - trimPtyData(xw, data); - if (read_queue.flink != 0) { - size = tt_read(data->next); - if (size == 0) { - Panic("input: read returned zero\n", 0); - } - } else { - sys$hiber(); - } - } -#else /* !VMS */ if (FD_ISSET(screen->respond, select_mask)) { int save_err; trimPtyData(xw, data); @@ -300,7 +287,6 @@ readPtyData(XtermWidget xw, PtySelect * select_mask, PtyData *data) } #endif /* f*ugly */ } -#endif /* VMS */ if (size) { #if OPT_TRACE diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h index 12e18bef1..588e06549 100644 --- a/app/xterm/ptyx.h +++ b/app/xterm/ptyx.h @@ -1,4 +1,4 @@ -/* $XTermId: ptyx.h,v 1.1124 2024/05/21 23:30:59 tom Exp $ */ +/* $XTermId: ptyx.h,v 1.1130 2024/09/30 08:03:20 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -186,9 +186,6 @@ #undef USE_PTY_DEVICE #undef USE_PTY_SEARCH #define USE_PTS_DEVICE 1 -#elif defined(VMS) -#undef USE_PTY_DEVICE -#undef USE_PTY_SEARCH #elif defined(PUCC_PTYD) #undef USE_PTY_SEARCH #elif (defined(sun) && defined(SVR4)) || defined(_ALL_SOURCE) || defined(__CYGWIN__) @@ -204,7 +201,7 @@ #if (defined (__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) #define USE_USG_PTYS -#elif (defined(ATT) && !defined(__sgi)) || defined(__MVS__) || (defined(SYSV) && defined(i386)) +#elif (defined(ATT) && !defined(__sgi)) || (defined(SYSV) && defined(i386)) #define USE_USG_PTYS #endif @@ -221,8 +218,6 @@ #ifndef PTYDEV #if defined(__hpux) #define PTYDEV "/dev/ptym/ptyxx" -#elif defined(__MVS__) -#define PTYDEV "/dev/ptypxxxx" #else #define PTYDEV "/dev/ptyxx" #endif @@ -231,8 +226,6 @@ #ifndef TTYDEV #if defined(__hpux) #define TTYDEV "/dev/pty/ttyxx" -#elif defined(__MVS__) -#define TTYDEV "/dev/ptypxxxx" #elif defined(USE_PTS_DEVICE) #define TTYDEV "/dev/pts/0" #else @@ -263,8 +256,6 @@ #ifndef TTYFORMAT #if defined(CRAY) #define TTYFORMAT "/dev/ttyp%03d" -#elif defined(__MVS__) -#define TTYFORMAT "/dev/ttyp%04d" #else #define TTYFORMAT "/dev/ttyp%d" #endif @@ -273,8 +264,6 @@ #ifndef PTYFORMAT #ifdef CRAY #define PTYFORMAT "/dev/pty/%03d" -#elif defined(__MVS__) -#define PTYFORMAT "/dev/ptyp%04d" #else #define PTYFORMAT "/dev/ptyp%d" #endif @@ -283,8 +272,6 @@ #ifndef PTYCHARLEN #ifdef CRAY #define PTYCHARLEN 3 -#elif defined(__MVS__) -#define PTYCHARLEN 8 /* OS/390 stores, e.g. ut_id="ttyp1234" */ #else #define PTYCHARLEN 2 #endif @@ -340,7 +327,8 @@ typedef Char *UString; #define CASETYPE(name) case name: result = #name; break -#define CharOf(n) ((Char)(n)) +#define AsciiOf(n) (0x7f & (n)) /* extract 7-bit character */ +#define CharOf(n) ((Char)(n)) /* extract 8-bit character */ typedef struct { int row; @@ -611,14 +599,6 @@ typedef enum { #define OPT_DOUBLE_BUFFER 0 /* true if using double-buffering */ #endif -#ifndef OPT_EBCDIC -#ifdef __MVS__ -#define OPT_EBCDIC 1 -#else -#define OPT_EBCDIC 0 -#endif -#endif - #ifndef OPT_EXEC_SELECTION #define OPT_EXEC_SELECTION 1 /* true if xterm can exec to process selection */ #endif @@ -1061,6 +1041,8 @@ typedef enum { ,nrc_ISO_Latin_2_Supp /* vt5xx */ ,nrc_ISO_Latin_5_Supp /* vt5xx */ ,nrc_ISO_Latin_Cyrillic /* vt5xx */ + ,nrc_JIS_Katakana /* vt382 */ + ,nrc_JIS_Roman /* vt382 */ ,nrc_Norwegian_Danish /* vt3xx */ ,nrc_Norwegian_Danish2 /* vt2xx */ ,nrc_Norwegian_Danish3 /* vt2xx */ @@ -1099,19 +1081,29 @@ typedef enum { ,srm_X10_MOUSE = SET_X10_MOUSE #if OPT_TOOLBAR ,srm_RXVT_TOOLBAR = 10 +#else + ,srm_DECEDM = 10 /* vt330:edit */ #endif + ,srm_DECLTM = 11 /* vt330:line transmit */ #if OPT_BLINK_CURS ,srm_ATT610_BLINK = 12 ,srm_CURSOR_BLINK_OPS = 13 ,srm_XOR_CURSOR_BLINKS = 14 +#else + ,srm_DECKANAM = 12 /* vt382:Katakana shift */ + ,srm_DECSCFDM = 13 /* vt330:space compression field delimiter */ + ,srm_DECTEM = 14 /* vt330:transmission execution */ #endif - ,srm_DECPFF = 18 /* Print Form Feed Mode */ - ,srm_DECPEX = 19 /* Printer Extent Mode */ + ,srm_DECEKEM = 16 /* vt330:edit key execution */ + ,srm_DECPFF = 18 /* vt220:Print Form Feed Mode */ + ,srm_DECPEX = 19 /* vt220:Printer Extent Mode */ ,srm_DECTCEM = 25 /* Text Cursor Enable Mode */ ,srm_RXVT_SCROLLBAR = 30 ,srm_DECRLM = 34 /* vt510:Cursor Right to Left Mode */ #if OPT_SHIFT_FONTS ,srm_RXVT_FONTSIZE = 35 /* also vt520:DECHEBM */ +#else + ,srm_DECHEBM = 35 /* vt520:Hebrew keyboard mapping */ #endif ,srm_DECHEM = 36 /* vt510:Hebrew Encoding Mode */ #if OPT_TEK4014 @@ -1131,8 +1123,10 @@ typedef enum { ,srm_DECGPBM = 46 /* Graphics Print Background Mode */ #endif ,srm_ALTBUF = 47 /* also DECGRPM (Graphics Rotated Print Mode) */ + ,srm_DEC131TM = 53 /* vt330:VT131 transmit */ ,srm_DECNAKB = 57 /* vt510:Greek/N-A Keyboard Mapping */ ,srm_DECIPEM = 58 /* vt510:IBM ProPrinter Emulation Mode */ + ,srm_DECKKDM = 59 /* vt382:Kanji/Katakana */ ,srm_DECHCCM = 60 /* vt420:Horizontal Cursor-Coupling Mode */ ,srm_DECVCCM = 61 /* vt420:Vertical Cursor-Coupling Mode */ ,srm_DECPCCM = 64 /* vt420:Page Cursor-Coupling Mode */ @@ -1142,7 +1136,7 @@ typedef enum { ,srm_DECLRMM = 69 /* vt420:Vertical Split Screen Mode (DECVSSM) */ ,srm_DECXRLM = 73 /* vt420:Transmit Rate Limiting */ #if OPT_SIXEL_GRAPHICS - ,srm_DECSDM = 80 /* Sixel Display Mode */ + ,srm_DECSDM = 80 /* vt320:Sixel Display Mode */ #endif ,srm_DECKPM = 81 /* vt420:Key Position Mode */ ,srm_DECNCSM = 95 /* vt510:No Clearing Screen On Column Change */ @@ -1150,10 +1144,11 @@ typedef enum { ,srm_DECCRTSM = 97 /* vt510:CRT Save Mode */ ,srm_DECARSM = 98 /* vt510:Auto Resize Mode */ ,srm_DECMCM = 99 /* vt510:Modem Control Mode */ - ,srm_DECCAAM = 100 /* vt510:Auto Answerback Mode */ + ,srm_DECAAM = 100 /* vt510:Auto Answerback Mode */ ,srm_DECCANSM = 101 /* vt510:Conceal Answerback Message Mode */ ,srm_DECNULM = 102 /* vt510:Ignoring Null Mode */ ,srm_DECHDPXM = 103 /* vt510:Half-Duplex Mode */ + ,srm_DECESKM = 104 /* vt510:enable secondary keyboard language */ ,srm_DECOSCNM = 106 /* vt510:Overscan Mode */ ,srm_DECNUMLK = 108 /* vt510:Num Lock Mode */ ,srm_DECCAPSLK = 109 /* vt510:Caps Lock Mode */ @@ -1598,7 +1593,7 @@ typedef enum { #define DBLCS_BITS 4 #define DBLCS_MASK BITS2MASK(DBLCS_BITS) -#define GetLineDblCS(ld) (((ld)->bufHead >> LINEFLAG_BITS) & DBLCS_MASK) +#define GetLineDblCS(ld) ((ld) != NULL ? (((ld)->bufHead >> LINEFLAG_BITS) & DBLCS_MASK) : 0) #define SetLineDblCS(ld,cs) (ld)->bufHead = (RowData) ((ld->bufHead & LINEFLAG_MASK) | (cs << LINEFLAG_BITS)) #define LineCharSet(screen, ld) \ @@ -1645,18 +1640,10 @@ typedef enum { /***====================================================================***/ -#if OPT_EBCDIC -extern int E2A(int); -extern int A2E(int); -#else -#define E2A(a) (a) -#define A2E(a) (a) -#endif - -#define CONTROL(a) (A2E(E2A(a)&037)) +#define CONTROL(a) ((a) & 037) -#define XTERM_ERASE A2E(CONTROL('H')) -#define XTERM_LNEXT A2E(CONTROL('V')) +#define XTERM_ERASE CONTROL('H') +#define XTERM_LNEXT CONTROL('V') /***====================================================================***/ diff --git a/app/xterm/resize.c b/app/xterm/resize.c index 2199e73e2..a122b1fd9 100644 --- a/app/xterm/resize.c +++ b/app/xterm/resize.c @@ -1,7 +1,7 @@ -/* $XTermId: resize.c,v 1.150 2023/03/31 23:09:38 tom Exp $ */ +/* $XTermId: resize.c,v 1.152 2024/09/30 08:11:57 tom Exp $ */ /* - * Copyright 2003-2022,2023 by Thomas E. Dickey + * Copyright 2003-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -88,11 +88,7 @@ int ignore_unused; #endif -#ifdef __MVS__ -#define ESCAPE(string) "\047" string -#else #define ESCAPE(string) "\033" string -#endif #define EMULATIONS 2 #define SUN 1 diff --git a/app/xterm/screen.c b/app/xterm/screen.c index 9fb636661..8887f8a6a 100644 --- a/app/xterm/screen.c +++ b/app/xterm/screen.c @@ -1,4 +1,4 @@ -/* $XTermId: screen.c,v 1.651 2024/02/13 22:10:51 tom Exp $ */ +/* $XTermId: screen.c,v 1.652 2024/09/01 19:16:42 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -2354,11 +2354,11 @@ non_blank_line(TScreen *screen, #define maxRectCol(screen) (getMaxCol(screen) + 1) static int -limitedParseRow(XtermWidget xw, int row, int err) +limitedParseRow(XtermWidget xw, int row) { TScreen *screen = TScreenOf(xw); int min_row = minRectRow(screen); - int max_row = maxRectRow(screen) + err; + int max_row = maxRectRow(screen); if (xw->flags & ORIGIN) row += screen->top_marg; @@ -2372,11 +2372,11 @@ limitedParseRow(XtermWidget xw, int row, int err) } static int -limitedParseCol(XtermWidget xw, int col, int err) +limitedParseCol(XtermWidget xw, int col) { TScreen *screen = TScreenOf(xw); int min_col = minRectCol(screen); - int max_col = maxRectCol(screen) + err; + int max_col = maxRectCol(screen); if (xw->flags & ORIGIN) col += screen->lft_marg; @@ -2389,8 +2389,8 @@ limitedParseCol(XtermWidget xw, int col, int err) return col; } -#define LimitedParse(num, func, dft, err) \ - func(xw, (nparams > num && params[num] > 0) ? params[num] : dft, err) +#define LimitedParse(num, func, dft) \ + func(xw, (nparams > num && params[num] > 0) ? params[num] : dft) /* * Copy the rectangle boundaries into a struct, providing default values as @@ -2402,10 +2402,10 @@ xtermParseRect(XtermWidget xw, int nparams, int *params, XTermRect *target) TScreen *screen = TScreenOf(xw); memset(target, 0, sizeof(*target)); - target->top = LimitedParse(0, limitedParseRow, minRectRow(screen), 1); - target->left = LimitedParse(1, limitedParseCol, minRectCol(screen), 1); - target->bottom = LimitedParse(2, limitedParseRow, maxRectRow(screen), 0); - target->right = LimitedParse(3, limitedParseCol, maxRectCol(screen), 0); + target->top = LimitedParse(0, limitedParseRow, minRectRow(screen)); + target->left = LimitedParse(1, limitedParseCol, minRectCol(screen)); + target->bottom = LimitedParse(2, limitedParseRow, maxRectRow(screen)); + target->right = LimitedParse(3, limitedParseCol, maxRectCol(screen)); TRACE(("parsed %d params for rectangle %d,%d %d,%d default %d,%d %d,%d\n", nparams, target->top, @@ -2648,6 +2648,65 @@ ScrnCopyRectangle(XtermWidget xw, XTermRect *source, int nparam, int *params) /* * Modifies the video-attributes only - so selection (not a video attribute) is * unaffected. Colors and double-size flags are unaffected as well. + * + * Reference: VSRM - Character Cell Display EL-00070-05 + * + * Section: + * ------- + * CHANGE ATTRIBUTES RECTANGULAR AREA -- DECCARA + * Page 5-173 + * + * Quote: + * The character positions affected depend on the current setting of DECSACE + * (STREAM or RECTANGLE). See DECSACE for details. + * + * Notes: + * xterm allows 8 (hidden) to be reversed, as an extension. + * + * Section: + * ------- + * REVERSE ATTRIBUTES RECTANGULAR AREA -- DECRARA + * Page 5-175 + * + * Quote: + * The video attribute(s) to be reversed are in the affected area are indicated + * by one or more subsequent parameters. These parameters are similar to the + * parameters of the Set Graphic Rendition control function (SGR): + * + * Parameter Parameter Meaning + * 0 Reverse all attributes + * 1 Reverse bold attribute + * 4 Reverse underscore attribute + * 5 Reverse blinking attribute + * 7 Reverse negative (reverse) image attribute + * + * All other parameter values shall be ignored unless they are part of a well + * defined extension to the architecture. Note if the Color Text Extension is + * present, the color text SGR values are ignored since the "reverse" of a + * color is not defined by the extension. + * + * Notes: + * xterm allows 8 (hidden) to be reversed, as an extension. + * + * Section: + * ------- + * SELECT ATTRIBUTE CHANGE EXTENT -- DECSACE + * Page 5-177 + * + * Quote: + * When Ps = 0 or 1, DECCARA and DECRARA affects the stream of character + * positions beginning with the first character position specified in the + * command, and ending with the second character position specified. + * + * Notes: + * The description of DECSACE goes on to state that "unoccupied" cells are + * not affected in STREAM mode, while in RECTANGLE mode they are converted + * to blanks. + * + * While STREAM uses the upper-left and lower-right cell coordinates for a + * RECTANGLE (which may take into account ORIGIN mode), the characters wrap, + * in STREAM mode, and DEC 070 does not appear to state that ORIGIN mode + * affects the wrap-margins. */ void ScrnMarkRectangle(XtermWidget xw, @@ -2675,10 +2734,10 @@ ScrnMarkRectangle(XtermWidget xw, for (row = top; row <= bottom; ++row) { int left = ((exact || (row == top)) ? (target->left - 1) - : getMinCol(screen)); + : 0); int right = ((exact || (row == bottom)) ? (target->right - 1) - : getMaxCol(screen)); + : screen->max_col); ld = getLineData(screen, row); @@ -2686,6 +2745,15 @@ ScrnMarkRectangle(XtermWidget xw, for (col = left; col <= right; ++col) { unsigned flags = ld->attribs[col]; + if (!(flags & CHARDRAWN)) { + if (exact) { + flags |= CHARDRAWN; + Clear1Cell(ld, col); + } else { + continue; + } + } + for (n = 0; n < nparam; ++n) { #if OPT_TRACE if (row == top && col == left) @@ -2693,6 +2761,9 @@ ScrnMarkRectangle(XtermWidget xw, #endif if (reverse) { switch (params[n]) { + case 0: + flags ^= SGR_MASK; + break; case 1: flags ^= BOLD; break; diff --git a/app/xterm/trace.c b/app/xterm/trace.c index 0b3f7292f..b07363472 100644 --- a/app/xterm/trace.c +++ b/app/xterm/trace.c @@ -1,7 +1,7 @@ -/* $XTermId: trace.c,v 1.240 2023/10/14 16:52:49 tom Exp $ */ +/* $XTermId: trace.c,v 1.243 2024/09/30 07:36:29 tom Exp $ */ /* - * Copyright 1997-2022,2023 by Thomas E. Dickey + * Copyright 1997-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -223,7 +223,7 @@ formatAscii(char *dst, unsigned value) sprintf(dst, "\\t"); break; default: - if (E2A(value) < 32 || (E2A(value) >= 127 && E2A(value) < 160)) + if (value < 32 || (value >= 127 && value < 160)) sprintf(dst, "\\%03o", value & 0xff); else sprintf(dst, "%c", CharOf(value)); @@ -289,6 +289,8 @@ visibleScsCode(DECNRCM_codes chrset) MAP("Y", nrc_Italian); MAP("A", nrc_ISO_Latin_1_Supp); MAP("B", nrc_ISO_Latin_2_Supp); + MAP("I", nrc_JIS_Katakana); + MAP("J", nrc_JIS_Roman); MAP("M", nrc_ISO_Latin_5_Supp); MAP("L", nrc_ISO_Latin_Cyrillic); MAP("`", nrc_Norwegian_Danish); @@ -784,7 +786,7 @@ formatEventMask(char *target, unsigned source, Boolean buttons) } void -TraceEvent(const char *tag, XEvent *ev, String *params, Cardinal *num_params) +TraceEvent(const char *tag, XEvent *ev, String *params, const Cardinal *num_params) { char mask_buffer[160]; diff --git a/app/xterm/trace.h b/app/xterm/trace.h index 3ed17c05a..b462db15b 100644 --- a/app/xterm/trace.h +++ b/app/xterm/trace.h @@ -1,4 +1,4 @@ -/* $XTermId: trace.h,v 1.95 2024/05/15 23:51:40 tom Exp $ */ +/* $XTermId: trace.h,v 1.96 2024/09/01 22:42:54 tom Exp $ */ /* * Copyright 1997-2022,2024 by Thomas E. Dickey @@ -94,7 +94,7 @@ extern const char *trace_who; #undef TRACE_CHILD #define TRACE_CHILD int tracing_child = (trace_who = "child") != 0; (void) tracing_child -extern void TraceEvent(const char *, XEvent *, String *, Cardinal *); +extern void TraceEvent(const char *, XEvent *, String *, const Cardinal *); #undef TRACE_EVENT #define TRACE_EVENT(t,e,s,n) TraceEvent(t, (XEvent *)e, s, n) diff --git a/app/xterm/util.c b/app/xterm/util.c index de73d112c..49dcc5acd 100644 --- a/app/xterm/util.c +++ b/app/xterm/util.c @@ -1,4 +1,4 @@ -/* $XTermId: util.c,v 1.950 2024/07/10 20:22:19 tom Exp $ */ +/* $XTermId: util.c,v 1.955 2024/09/01 22:51:57 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -3702,7 +3702,7 @@ fixupItalics(XTermDraw * params, #if OPT_DEC_CHRSET static int -fakeDoubleChars(XTermDraw * params, +fakeDoubleChars(const XTermDraw * params, GC gc, int y, int x, @@ -3905,8 +3905,11 @@ xtermFullString16(XTermDraw * params, unsigned flags, GC gc, ? XTermFontsRef(screen->fnts, (VTFontEnum) (xf - fn)) : fp))) { + unsigned part = ucs2dec(screen, ch); + if (xtermIsDecGraphic(part) && ch > 255) + ch = (IChar) part; x = xtermPartString16(screen, flags, gc, x, y, dst); - if (xtermIsDecTechnical(ch)) { + if (xtermIsInternalCs(ch)) { xtermDrawBoxChar(params, ch, gc, x, y - FontAscent(screen), 1, False); x += FontWidth(screen); @@ -3968,7 +3971,7 @@ xtermDrawString(TScreen *screen, unsigned flags, GC gc, int x, int y, int length * value is the updated x position. */ int -drawXtermText(XTermDraw * params, +drawXtermText(const XTermDraw * params, GC gc, int start_x, int start_y, @@ -4496,6 +4499,7 @@ drawXtermText(XTermDraw * params, Bool isMissing; int ch_width; #if OPT_WIDE_CHARS + unsigned part; if (ch == HIDDEN_CHAR) { if (last > first) { @@ -4533,8 +4537,8 @@ drawXtermText(XTermDraw * params, if (!isMissing && TScreenOf(recur.xw)->force_box_chars) { if (ch > 255 - && ucs2dec(screen, ch) < 32) { - ch = ucs2dec(screen, ch); + && (part = ucs2dec(screen, ch)) < 32) { + ch = part; isMissing = True; } else if (ch < 32) { isMissing = True; @@ -4557,7 +4561,9 @@ drawXtermText(XTermDraw * params, ch_width = 1; /* special case for line-drawing */ else if (ch_width < 0) ch_width = 1; /* special case for combining char */ - if (!ucs_workaround(&recur, ch, gc, x, y)) { + if (ch > 255 && (part = ucs2dec(screen, ch)) < 32) { + xtermDrawBoxChar(&recur, part, gc, x, y, 1, False); + } else if (!ucs_workaround(&recur, ch, gc, x, y)) { xtermDrawBoxChar(&recur, ch, gc, x, y, ch_width, False); } #else @@ -5269,7 +5275,7 @@ typedef struct _DimColorHT { } DimColorHT; static unsigned -jhash1(unsigned char *key, size_t len) +jhash1(const unsigned char *key, size_t len) { unsigned hash; size_t i; diff --git a/app/xterm/version.h b/app/xterm/version.h index e4b4c3756..5c0585351 100644 --- a/app/xterm/version.h +++ b/app/xterm/version.h @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.565 2024/07/11 23:38:21 tom Exp $ */ +/* $XTermId: version.h,v 1.569 2024/10/24 08:21:36 tom Exp $ */ /* * Copyright 1998-2023,2024 by Thomas E. Dickey @@ -38,8 +38,8 @@ * version of X to which this version of xterm has been built. The resulting * number in parentheses is my patch number (Thomas E. Dickey). */ -#define XTERM_PATCH 393 -#define XTERM_DATE 2024-07-11 +#define XTERM_PATCH 395 +#define XTERM_DATE 2024-10-24 #ifndef __vendorversion__ #define __vendorversion__ "XTerm/OpenBSD" diff --git a/app/xterm/vms.c b/app/xterm/vms.c deleted file mode 100644 index 138b7f218..000000000 --- a/app/xterm/vms.c +++ /dev/null @@ -1,724 +0,0 @@ -/* $XTermId: vms.c,v 1.15 2022/10/06 19:35:35 tom Exp $ */ - -/* vms.c - * - * This module contains the VMS version of the routine SPAWN (from the module - * MAIN.C) and the routines that do IO to the pseudo terminal. - * - * Modification History: - * Stephan Jansen 1-Mar-1990 Original version - * Hal R. Brand 5-Sep-1990 Added code to propagate DECW$DISPLAY - * Aaron Leonard 11-Sep-1990 Fix string descriptor lengths - * Stephan Jansen 2-Dec-1991 Modify to use new Pseudo terminal drivers - * (patterned after photo.c by Forrest A. Kenney) - * Patrick Mahan 7-Jan-1991 Removed reference to <dvidef.h> from VMS.C - * Forced device type to be VT102 since that is - * what we are emulating. - */ - -#include <libdef.h> -#include <lnmdef.h> - -#include <stdio.h> -#include <string.h> - -#include "xterm.h" -#include "data.h" -#include "vms.h" - -#define PTD$C_SEND_XON 0 /* Pseudo Terminal Driver event */ -#define PTD$C_SEND_BELL 1 -#define PTD$C_SEND_XOFF 2 -#define PTD$C_STOP_OUTPUT 3 -#define PTD$C_RESUME_OUTPUT 4 -#define PTD$C_CHAR_CHANGED 5 -#define PTD$C_ABORT_OUTPUT 6 -#define PTD$C_START_READ 7 -#define PTD$C_MIDDLE_READ 8 -#define PTD$C_END_READ 9 -#define PTD$C_ENABLE_READ 10 -#define PTD$C_DISABLE_READ 11 -#define PTD$C_MAX_EVENTS 12 - -#define BUFFERS 6 -#define PAGE 512 - -typedef struct tt_buffer -{ -unsigned int flink; -unsigned int blink; -short int status; -short int length; -char data[VMS_TERM_BUFFER_SIZE]; -} TT_BUF_STRUCT; - -TT_BUF_STRUCT *tt_w_buff; -struct q_head _align(QUADWORD) buffer_queue = (0,0); -struct q_head _align(QUADWORD) read_queue = (0,0); - -static char tt_name[64]; -static $DESCRIPTOR (tt_name_desc, &tt_name); - -static char ws_name[64]; -static $DESCRIPTOR (ws_name_desc, &ws_name); - -static struct tt_char { - char class; - char type; - short int page_width; - char characteristics[3]; - char length; - int extended; - } tt_mode, tt_chars, orig_tt_chars; - -struct mem_region -{ - TT_BUF_STRUCT *start; - TT_BUF_STRUCT *end; -} ret_addr; - -int read_stopped = False; -int write_stopped = False; - -int tt_width; -int tt_length; -int tt_changed; -int tt_pasting=False; /* drm */ -int tt_new_output=False; /* Cleared by flushlog(), set whenever something new - goes to the screen through tt_write */ - -int trnlnm(char *in,int id,char *out); -void spawn (void); - -static void tt_echo_ast(TT_BUF_STRUCT *buff_addr); -static void tt_read_ast(TT_BUF_STRUCT *buff_addr); - -/* -static void tt_start_read(void); -*/ -void tt_start_read(void); -int tt_read(char *buffer); -static void send_xon(void); -static void send_xoff(void); -static void send_bell(void); -static void char_change(void); -static void freeBuff (TT_BUF_STRUCT *buff_addr); -TT_BUF_STRUCT *getBuff(void); -static void CloseDown(int exit_status); -static void mbx_read_ast(void); -static void mbx_read(void); - - - -#define DESCRIPTOR(name,string) struct dsc$descriptor_s name = \ -{ strlen(string), DSC$K_DTYPE_T, DSC$K_CLASS_S, string } - -int trnlnm(char *in, int id, char *out) -{ - int status, num, len, attr = LNM$M_CASE_BLIND, foo = id; - short outlen; - struct itemlist - { - short buffer_length; - short item_code; - char *buffer_addr; - int *return_length; - } itmlst[] = - { - 4 , LNM$_INDEX , &foo, 0, - 255, LNM$_STRING , out , &outlen, - 4 , LNM$_MAX_INDEX, &num, &len, - 0 , 0 - }; - DESCRIPTOR(lognam,in); - DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); - - status = sys$trnlnm(&attr,&tabnam,&lognam,0,itmlst); - if(status != SS$_NORMAL) return(-1); /* error status */ - out[outlen] = 0; /* terminate the output string */ - return(++num); /* return number of translations */ -} - -static int pty; -static int Xsocket; - -void spawn (void) -{ - int status; - static $DESCRIPTOR (dtime, "0 00:00:00.01"); - static int delta[2]; - register TScreen *screen = TScreenOf(term); - static struct IOSB iosb; - static unsigned int flags; - static unsigned int uic; - static char imagename[64]; - static int privs; - static $DESCRIPTOR(device, "FTA0:"); - static int type; - static int class; - static int devdepend; - static int mem_size; - int i; - - /* if pid and mbx_chan are nonzero then close them in CloseDown() */ - pid = 0; - mbx_chan = 0; - - status = SYS$EXPREG (BUFFERS, &ret_addr, 0, 0); - if(!(status & SS$_NORMAL)) lib$signal(status); - - tt_w_buff = (char *)ret_addr.end - PAGE + 1; - - /* use one buffer for writing, the reset go in the free buffer queue */ - for(i=0; i < BUFFERS-1; i++) - { - freeBuff((char *)ret_addr.start +i*PAGE); - } - - /* avoid double MapWindow requests, for wm's that care... */ - XtSetMappedWhenManaged( screen->TekEmu ? XtParent(tekWidget) : - XtParent(term), False ); - /* Realize the Tek or VT widget, depending on which mode we're in. - If VT mode, this calls VTRealize (the widget's Realize proc) */ - XtRealizeWidget (screen->TekEmu ? XtParent(tekWidget) : - XtParent(term)); - - /* get the default device characteristics of the pseudo terminal */ - - itemlist[0].buflen = 4; - itemlist[0].code = DVI$_DEVTYPE; - itemlist[0].buffer = &type; - itemlist[0].return_addr = &tt_name_desc.dsc$w_length; - - itemlist[1].buflen = 4; - itemlist[1].code = DVI$_DEVCLASS; - itemlist[1].buffer = &class; - itemlist[1].return_addr = &tt_name_desc.dsc$w_length; - - itemlist[2].buflen = 4; - itemlist[2].code = DVI$_DEVDEPEND; - itemlist[2].buffer = &devdepend; - itemlist[2].return_addr = &tt_name_desc.dsc$w_length; - - itemlist[3].buflen = 4; - itemlist[3].code = DVI$_DEVDEPEND2; - itemlist[3].buffer = &tt_chars.extended; - itemlist[3].return_addr = &tt_name_desc.dsc$w_length; - - itemlist[4].buflen = 0; - itemlist[4].code = 0; - - - status = sys$getdviw(0,0,&device,&itemlist,&iosb,0,0,0); - if(!(status & SS$_NORMAL)) lib$signal(status); - if(!(iosb.status & SS$_NORMAL)) lib$signal(iosb.status); - - tt_chars.type = DT$_VT102; /* XTerm supports VT102 mode */ - tt_chars.class = class; - tt_chars.page_width = screen->max_col+1; - tt_chars.length = screen->max_row+1; - - /* copy the default char's along with the created window size */ - - bcopy(&devdepend, &tt_chars.characteristics, 3); - - tt_chars.extended |= TT2$M_ANSICRT | TT2$M_AVO | TT2$M_DECCRT; - - - /* create the pseudo terminal with the proper char's */ - status = ptd$create(&tt_chan,0,&tt_chars,12,0,0,0,&ret_addr); - if(!(status & SS$_NORMAL)) lib$signal(status); - - - /* get the device name of the Pseudo Terminal */ - - itemlist[0].buflen = 64; - itemlist[0].code = DVI$_DEVNAM; - itemlist[0].buffer = &tt_name; - itemlist[0].return_addr = &tt_name_desc.dsc$w_length; - - /* terminate the list */ - itemlist[1].buflen = 0; - itemlist[1].code = 0; - - status = sys$getdviw(0,tt_chan,0,&itemlist,&iosb,0,0,0); - if(!(status & SS$_NORMAL)) CloseDown(status); - if(!(iosb.status & SS$_NORMAL)) CloseDown(iosb.status); - - /* - * set up AST's for XON, XOFF, BELL and characteristics change. - */ - - status = ptd$set_event_notification(tt_chan,&send_xon,0,0,PTD$C_SEND_XON); - if(!(status & SS$_NORMAL)) CloseDown(status); - - status = ptd$set_event_notification(tt_chan,&send_xoff,0,0,PTD$C_SEND_XOFF); - if(!(status & SS$_NORMAL)) CloseDown(status); - - status = ptd$set_event_notification(tt_chan,&send_bell,0,0,PTD$C_SEND_BELL); - if(!(status & SS$_NORMAL)) CloseDown(status); - - status = ptd$set_event_notification(tt_chan,&char_change,0,0,PTD$C_CHAR_CHANGED); - if(!(status & SS$_NORMAL)) CloseDown(status); - - /* create a mailbox for the detached process to detect hangup */ - - status = sys$crembx(0,&mbx_chan,ACC$K_TERMLEN,0,255,0,0); - if(!(status & SS$_NORMAL)) CloseDown(status); - - - /* - * get the device unit number for created process completion - * status to be sent to. - */ - - itemlist[0].buflen = 4; - itemlist[0].code = DVI$_UNIT; - itemlist[0].buffer = &mbxunit; - itemlist[0].return_addr = 0; - - /* terminate the list */ - itemlist[1].buflen = 0; - itemlist[1].code = 0; - - status = sys$getdviw(0,mbx_chan,0,&itemlist,&iosb,0,0,0); - if(!(status & SS$_NORMAL)) CloseDown(status); - if(!(iosb.status & SS$_NORMAL)) CloseDown(iosb.status); - - - tt_start_read(); - - /* - * find the current process's UIC so that it can be used in the - * call to sys$creprc - */ - itemlist[0].buflen = 4; - itemlist[0].code = JPI$_UIC; - itemlist[0].buffer = &uic; - itemlist[0].return_addr = 0; - - /* terminate the list */ - itemlist[1].buflen = 0; - itemlist[1].code = 0; - - status = sys$getjpiw(0,0,0,&itemlist,0,0,0); - if(!(status & SS$_NORMAL)) CloseDown(status); - - /* Complete a descriptor for the WS (DECW$DISPLAY) device */ - - trnlnm("DECW$DISPLAY",0,ws_name); - ws_name_desc.dsc$w_length = strlen(ws_name); - - /* create the process */ - /* Set sys$error to be the WS (DECW$DISPLAY) device. LOGINOUT */ - /* 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 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; - status = sys$creprc(&pid,&image,&tt_name_desc,&tt_name_desc, - &ws_name_desc,0,0,0,4,uic,mbxunit,flags); - if(!(status & SS$_NORMAL)) CloseDown(status); - - - /* hang a read on the mailbox waiting for completion */ - mbx_read(); - - -/* set time value and schedule a periodic wakeup (every 1/100 of a second) - * this is used to prevent the controlling process from using up all the - * CPU. The controlling process will hibernate at strategic points in - * the program when it is just waiting for input. - */ - - status = sys$bintim(&dtime,&delta); - if (!(status & SS$_NORMAL)) CloseDown(status); - - status = sys$schdwk(0,0,&delta,&delta); - if (!(status & SS$_NORMAL)) CloseDown(status); - - - /* - * This is rather funky, but it saves me from having to totally - * rewrite some parts of the code (namely in_put in module CHARPROC.C) - */ - pty = 1; - screen->respond = pty; - pty_mask = 1 << pty; - Select_mask = pty_mask; - X_mask = 1 << Xsocket; - -} - - -/* - * This routine handles completion of write with echo. It takes the - * echo buffer and puts it on the read queue. It will then be processed - * by the routine tt_read. If the echo buffer is empty, it is put back - * on the free buffer queue. - */ - -static void tt_echo_ast(TT_BUF_STRUCT *buff_addr) -{ - int status; - - if (buff_addr->length != 0) - { - status = LIB$INSQTI(buff_addr, &read_queue); - if((status != SS$_NORMAL) && (status != LIB$_ONEENTQUE)) - { - CloseDown(status); - } - } - else - { - freeBuff(buff_addr); - } -} - - -/* - * This routine writes to the pseudo terminal. If there is a free - * 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 - bytes at a time. This definition has been moved to VMS.H - - */ - -int tt_write(const char *tt_write_buf, size_t size) -{ - int status; - TT_BUF_STRUCT *echoBuff; - - /* if writing stopped, return 0 until Xon */ - if(write_stopped) return (0); - - memmove(&tt_w_buff->data,tt_write_buf,size); - - echoBuff = getBuff(); - if (echoBuff != LIB$_QUEWASEMP) - { - status = PTD$WRITE (tt_chan, &tt_echo_ast, echoBuff, - &tt_w_buff->status, size, - &echoBuff->status, VMS_TERM_BUFFER_SIZE); - } - else - { - status = PTD$WRITE (tt_chan, 0, 0, &tt_w_buff->status, size, 0, 0); - } - if (status & SS$_NORMAL) - { - if ((tt_w_buff->status != SS$_NORMAL) && - (tt_w_buff->status != SS$_DATAOVERUN) && - (tt_w_buff->status != SS$_DATALOST)) - { - CloseDown(tt_w_buff->status); - } - } - else - { - CloseDown(status); - } - - return(size); -} - - -/* - * This routine is called when a read to the pseudo terminal completes. - * Put the newly read buffer onto the read queue. It will be processed - * and freed in the routine tt_read. - */ - -static void tt_read_ast(TT_BUF_STRUCT *buff_addr) -{ - int status; - - if (buff_addr->status & SS$_NORMAL) - { - status = LIB$INSQTI(buff_addr, &read_queue); - if ((status != SS$_NORMAL) && (status != LIB$_ONEENTQUE)) - { - CloseDown(status); - } - } - else - CloseDown(buff_addr->status); - - tt_start_read(); - sys$wake(0,0); - return; -} - - -/* - * If there is a free buffer on the buffer queue then Start a read from - * the pseudo terminal, otherwise set a flag, the reading will be restarted - * in the routine freeBuff when a buffer is freed. - */ - -void tt_start_read(void) -{ - int status; - static int size; - TT_BUF_STRUCT *buff_addr; - - buff_addr = getBuff(); - if (buff_addr != LIB$_QUEWASEMP) - { - if(!tt_pasting){ - status = PTD$READ (0, tt_chan, &tt_read_ast, buff_addr, - &buff_addr->status, VMS_TERM_BUFFER_SIZE); - if ((status & SS$_NORMAL) != SS$_NORMAL) - { - CloseDown(status); - } - } - } - else - { - read_stopped = True; - } - return; -} - - -/* - * Get data from the pseudo terminal. Return the data from the first item - * on the read queue, and put that buffer back onto the free buffer queue. - * Return the length or zero if the read queue is empty. - * - */ - -int tt_read(char *buffer) -{ - TT_BUF_STRUCT *read_buff; - int status; - int len; - - status = LIB$REMQHI(&read_queue, &read_buff); - if(status == LIB$_QUEWASEMP){ - return(0); - } - else if (status & SS$_NORMAL) - { - len = read_buff->length; - memmove(buffer,&read_buff->data,len); - freeBuff(read_buff); - tt_new_output=True; /* DRM something will be written */ - } - else - CloseDown(status); - - return(len); -} - - -/* - * if xon then it is safe to start writing again. - */ - -static void send_xon(void) -{ - write_stopped = False; -} - - -/* - * If Xoff then stop writing to the pseudo terminal until you get Xon. - */ -static void send_xoff(void) -{ - write_stopped = True; -} - - - -/* - * Beep the terminal to let the user know data will be lost because - * of too much data. - */ - -static void send_bell(void) -{ - Bell(term); -} - -/* - * if the pseudo terminal's characteristics change, check to see if the - * 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 can't resize the - * widget in this routine because this is an AST and X is not reenterent. - */ - -static void char_change(void) -{ - int status; - - /* - * Don't do anything if in Tek mode - */ - - if(!(TScreenOf(term)->TekEmu)) - { - status = sys$qiow(0,tt_chan,IO$_SENSEMODE,0,0,0,&tt_mode,8,0,0,0,0); - if(!(status & SS$_NORMAL)) CloseDown(status); - - if((TScreenOf(term)->max_row != tt_mode.length) || - (TScreenOf(term)->max_col != tt_mode.page_width)) - { - tt_length = tt_mode.length; - tt_width = tt_mode.page_width; - - tt_changed = True; - - } - } -} - - -/* - * Put a free buffer back onto the buffer queue. If reading was - * stopped for lack of free buffers, start reading again. - */ - -static void freeBuff (TT_BUF_STRUCT *buff_addr) -{ - int ast_stat; - int status; - - ast_stat = SYS$SETAST(0); - if (!read_stopped) - { - LIB$INSQHI(buff_addr, &buffer_queue); - } - else - { - status = PTD$READ (0, tt_chan, &tt_read_ast, buff_addr, - &buff_addr->status, VMS_TERM_BUFFER_SIZE); - if (status & SS$_NORMAL) - { - read_stopped = False; - } - else - { - CloseDown(status); - } - } - if (ast_stat == SS$_WASSET) ast_stat = SYS$SETAST(1); -} - - -/* - * return a free buffer from the buffer queue. - */ - -TT_BUF_STRUCT *getBuff(void) -{ - int status; - TT_BUF_STRUCT *buff_addr; - - status = LIB$REMQHI(&buffer_queue, &buff_addr); - if (status & SS$_NORMAL) - { - return(buff_addr); - } - else - { - return(status); - } -} - - -/* - * Close down and exit. Kill the detached process (if it still - * exists), deassign mailbox channell (if assigned), cancel any - * waiting IO to the pseudo terminal and delete it, exit with any - * status information. - */ - -static void CloseDown(int exit_status) -{ - int status; - - /* if process has not terminated, do so now! */ - if(pid != 0) - { - status = sys$forcex(&pid,0,0); - if(!(status & SS$_NORMAL)) lib$signal(status); - } - - /* if mbx_chan is assigned, deassign it */ - if(mbx_chan != 0) - { - sys$dassgn(mbx_chan); - } - - /* cancel pseudo terminal IO requests */ - status = ptd$cancel(tt_chan); - if(!(status & SS$_NORMAL)) lib$signal(status); - - /* delete pseudo terminal */ - status = ptd$delete(tt_chan); - if(!(status & SS$_NORMAL)) lib$signal(status); - - if(!(exit_status & SS$_NORMAL)) lib$signal(exit_status); - - exit(1); - -} - - -/* - * This routine gets called when the detached process terminates (for - * whatever reason). The mailbox buffer has final exit status. Close - * down and exit. - */ - -static void mbx_read_ast(void) -{ - int status; - - pid = 0; - - status = mbx_read_iosb.status; - if (!(status & SS$_NORMAL)) CloseDown(status); - - status = (unsigned long int) mbx_buf.acc$l_finalsts; - if (!(status & SS$_NORMAL)) CloseDown(status); - - CloseDown(1); - -} - - -/* - * This routine starts a read on the mailbox associated with the detached - * process. The AST routine gets called when the detached process terminates. - */ - -static void mbx_read(void) -{ -int status; -static int size; - - size = ACC$K_TERMLEN; - status = sys$qio(0,mbx_chan, - IO$_READVBLK, - &mbx_read_iosb, - &mbx_read_ast, - 0, - &mbx_buf, - size,0,0,0,0); - - if (!(status & SS$_NORMAL)) CloseDown(status); - - return; -} diff --git a/app/xterm/vms.h b/app/xterm/vms.h deleted file mode 100644 index c62889120..000000000 --- a/app/xterm/vms.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $XTermId: vms.h,v 1.6 2022/10/06 19:37:30 tom Exp $ */ - -/* vms.h - */ -#include <ssdef.h> -#include <iodef.h> -#include <msgdef.h> -#include <descrip.h> -#include <dvidef.h> -#include <jpidef.h> -#include <prcdef.h> -#include <dcdef.h> -#include <ttdef.h> -#include <tt2def.h> -#include <accdef.h> -#include <prvdef.h> - -struct IOSB -{ - short int status; - short int len; - int unused; -} mbx_read_iosb,iosb; - -#define MAXITEMLIST 5 - -short int tt_chan; /* channel to the Pseudo terminal */ -short int mbx_chan; /* channel to the mailbox */ -struct accdef mbx_buf; /* mailbox buffer */ -short int mbxunit; /* mailbox unit number */ -int pid; /* PID of created process */ -static $DESCRIPTOR (image, "SYS$SYSTEM:LOGINOUT.EXE"); - -static struct items { - short int buflen; - short int code; - int buffer; - int return_addr; -} itemlist[MAXITEMLIST]; - -int tt_write(const char *tt_write_buf, size_t size); diff --git a/app/xterm/wcwidth.c b/app/xterm/wcwidth.c index 6a15eb4f8..0590c77d8 100644 --- a/app/xterm/wcwidth.c +++ b/app/xterm/wcwidth.c @@ -1,4 +1,4 @@ -/* $XTermId: wcwidth.c,v 1.73 2024/07/06 00:45:04 tom Exp $ */ +/* $XTermId: wcwidth.c,v 1.75 2024/10/23 22:08:40 tom Exp $ */ /* $XFree86: xc/programs/xterm/wcwidth.c,v 1.9 2006/06/19 00:36:52 dickey Exp $ */ @@ -252,7 +252,7 @@ int mk_wcwidth(wchar_t ucs) { 0x0730, 0x074A }, { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x07FD, 0x07FD }, { 0x0816, 0x0819 }, { 0x081B, 0x0823 }, { 0x0825, 0x0827 }, { 0x0829, 0x082D }, { 0x0859, 0x085B }, - { 0x0898, 0x089F }, { 0x08CA, 0x08E1 }, { 0x08E3, 0x0902 }, + { 0x0897, 0x089F }, { 0x08CA, 0x08E1 }, { 0x08E3, 0x0902 }, { 0x093A, 0x093A }, { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0957 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, @@ -318,48 +318,51 @@ int mk_wcwidth(wchar_t ucs) { 0x102E0, 0x102E0 }, { 0x10376, 0x1037A }, { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x10AE5, 0x10AE6 }, { 0x10D24, 0x10D27 }, - { 0x10EAB, 0x10EAC }, { 0x10EFD, 0x10EFF }, { 0x10F46, 0x10F50 }, - { 0x10F82, 0x10F85 }, { 0x11001, 0x11001 }, { 0x11038, 0x11046 }, - { 0x11070, 0x11070 }, { 0x11073, 0x11074 }, { 0x1107F, 0x11081 }, - { 0x110B3, 0x110B6 }, { 0x110B9, 0x110BA }, { 0x110C2, 0x110C2 }, - { 0x11100, 0x11102 }, { 0x11127, 0x1112B }, { 0x1112D, 0x11134 }, - { 0x11173, 0x11173 }, { 0x11180, 0x11181 }, { 0x111B6, 0x111BE }, - { 0x111C9, 0x111CC }, { 0x111CF, 0x111CF }, { 0x1122F, 0x11231 }, - { 0x11234, 0x11234 }, { 0x11236, 0x11237 }, { 0x1123E, 0x1123E }, - { 0x11241, 0x11241 }, { 0x112DF, 0x112DF }, { 0x112E3, 0x112EA }, - { 0x11300, 0x11301 }, { 0x1133B, 0x1133C }, { 0x11340, 0x11340 }, - { 0x11366, 0x1136C }, { 0x11370, 0x11374 }, { 0x11438, 0x1143F }, + { 0x10D69, 0x10D6D }, { 0x10EAB, 0x10EAC }, { 0x10EFC, 0x10EFF }, + { 0x10F46, 0x10F50 }, { 0x10F82, 0x10F85 }, { 0x11001, 0x11001 }, + { 0x11038, 0x11046 }, { 0x11070, 0x11070 }, { 0x11073, 0x11074 }, + { 0x1107F, 0x11081 }, { 0x110B3, 0x110B6 }, { 0x110B9, 0x110BA }, + { 0x110C2, 0x110C2 }, { 0x11100, 0x11102 }, { 0x11127, 0x1112B }, + { 0x1112D, 0x11134 }, { 0x11173, 0x11173 }, { 0x11180, 0x11181 }, + { 0x111B6, 0x111BE }, { 0x111C9, 0x111CC }, { 0x111CF, 0x111CF }, + { 0x1122F, 0x11231 }, { 0x11234, 0x11234 }, { 0x11236, 0x11237 }, + { 0x1123E, 0x1123E }, { 0x11241, 0x11241 }, { 0x112DF, 0x112DF }, + { 0x112E3, 0x112EA }, { 0x11300, 0x11301 }, { 0x1133B, 0x1133C }, + { 0x11340, 0x11340 }, { 0x11366, 0x1136C }, { 0x11370, 0x11374 }, + { 0x113BB, 0x113C0 }, { 0x113CE, 0x113CE }, { 0x113D0, 0x113D0 }, + { 0x113D2, 0x113D2 }, { 0x113E1, 0x113E2 }, { 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 }, { 0x11F00, 0x11F01 }, - { 0x11F36, 0x11F3A }, { 0x11F40, 0x11F40 }, { 0x11F42, 0x11F42 }, - { 0x13440, 0x13440 }, { 0x13447, 0x13455 }, { 0x16AF0, 0x16AF4 }, - { 0x16B30, 0x16B36 }, { 0x16F4F, 0x16F4F }, { 0x16F8F, 0x16F92 }, - { 0x16FE4, 0x16FE4 }, { 0x1BC9D, 0x1BC9E }, { 0x1CF00, 0x1CF2D }, - { 0x1CF30, 0x1CF46 }, { 0x1D167, 0x1D169 }, { 0x1D17B, 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 }, { 0x1E08F, 0x1E08F }, - { 0x1E130, 0x1E136 }, { 0x1E2AE, 0x1E2AE }, { 0x1E2EC, 0x1E2EF }, - { 0x1E4EC, 0x1E4EF }, { 0x1E8D0, 0x1E8D6 }, { 0x1E944, 0x1E94A }, - { 0xE0100, 0xE01EF } + { 0x1171D, 0x1171D }, { 0x1171F, 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 }, + { 0x11F00, 0x11F01 }, { 0x11F36, 0x11F3A }, { 0x11F40, 0x11F40 }, + { 0x11F42, 0x11F42 }, { 0x11F5A, 0x11F5A }, { 0x13440, 0x13440 }, + { 0x13447, 0x13455 }, { 0x1611E, 0x16129 }, { 0x1612D, 0x1612F }, + { 0x16AF0, 0x16AF4 }, { 0x16B30, 0x16B36 }, { 0x16F4F, 0x16F4F }, + { 0x16F8F, 0x16F92 }, { 0x16FE4, 0x16FE4 }, { 0x1BC9D, 0x1BC9E }, + { 0x1CF00, 0x1CF2D }, { 0x1CF30, 0x1CF46 }, { 0x1D167, 0x1D169 }, + { 0x1D17B, 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 }, + { 0x1E08F, 0x1E08F }, { 0x1E130, 0x1E136 }, { 0x1E2AE, 0x1E2AE }, + { 0x1E2EC, 0x1E2EF }, { 0x1E4EC, 0x1E4EF }, { 0x1E5EE, 0x1E5EF }, + { 0x1E8D0, 0x1E8D6 }, { 0x1E944, 0x1E94A }, { 0xE0100, 0xE01EF } }; /* *INDENT-ON* */ @@ -377,7 +380,7 @@ int mk_wcwidth(wchar_t ucs) { 0x070E, 0x070E }, { 0x074B, 0x074C }, { 0x07B2, 0x07BF }, { 0x07FB, 0x07FC }, { 0x082E, 0x082F }, { 0x083F, 0x083F }, { 0x085C, 0x085D }, { 0x085F, 0x085F }, { 0x086B, 0x086F }, - { 0x088F, 0x088F }, { 0x0892, 0x0897 }, { 0x0984, 0x0984 }, + { 0x088F, 0x088F }, { 0x0892, 0x0896 }, { 0x0984, 0x0984 }, { 0x098D, 0x098E }, { 0x0991, 0x0992 }, { 0x09A9, 0x09A9 }, { 0x09B1, 0x09B1 }, { 0x09B3, 0x09B5 }, { 0x09BA, 0x09BB }, { 0x09C5, 0x09C6 }, { 0x09C9, 0x09CA }, { 0x09CF, 0x09D6 }, @@ -441,61 +444,61 @@ int mk_wcwidth(wchar_t ucs) { 0x19AC, 0x19AF }, { 0x19CA, 0x19CF }, { 0x19DB, 0x19DD }, { 0x1A1C, 0x1A1D }, { 0x1A5F, 0x1A5F }, { 0x1A7D, 0x1A7E }, { 0x1A8A, 0x1A8F }, { 0x1A9A, 0x1A9F }, { 0x1AAE, 0x1AAF }, - { 0x1ACF, 0x1AFF }, { 0x1B4D, 0x1B4F }, { 0x1B7F, 0x1B7F }, - { 0x1BF4, 0x1BFB }, { 0x1C38, 0x1C3A }, { 0x1C4A, 0x1C4C }, - { 0x1C89, 0x1C8F }, { 0x1CBB, 0x1CBC }, { 0x1CC8, 0x1CCF }, - { 0x1CFB, 0x1CFF }, { 0x1F16, 0x1F17 }, { 0x1F1E, 0x1F1F }, - { 0x1F46, 0x1F47 }, { 0x1F4E, 0x1F4F }, { 0x1F58, 0x1F58 }, - { 0x1F5A, 0x1F5A }, { 0x1F5C, 0x1F5C }, { 0x1F5E, 0x1F5E }, - { 0x1F7E, 0x1F7F }, { 0x1FB5, 0x1FB5 }, { 0x1FC5, 0x1FC5 }, - { 0x1FD4, 0x1FD5 }, { 0x1FDC, 0x1FDC }, { 0x1FF0, 0x1FF1 }, - { 0x1FF5, 0x1FF5 }, { 0x1FFF, 0x1FFF }, { 0x2028, 0x2029 }, - { 0x2065, 0x2065 }, { 0x2072, 0x2073 }, { 0x208F, 0x208F }, - { 0x209D, 0x209F }, { 0x20C1, 0x20CF }, { 0x20F1, 0x20FF }, - { 0x218C, 0x218F }, { 0x2427, 0x243F }, { 0x244B, 0x245F }, - { 0x2B74, 0x2B75 }, { 0x2B96, 0x2B96 }, { 0x2CF4, 0x2CF8 }, - { 0x2D26, 0x2D26 }, { 0x2D28, 0x2D2C }, { 0x2D2E, 0x2D2F }, - { 0x2D68, 0x2D6E }, { 0x2D71, 0x2D7E }, { 0x2D97, 0x2D9F }, - { 0x2DA7, 0x2DA7 }, { 0x2DAF, 0x2DAF }, { 0x2DB7, 0x2DB7 }, - { 0x2DBF, 0x2DBF }, { 0x2DC7, 0x2DC7 }, { 0x2DCF, 0x2DCF }, - { 0x2DD7, 0x2DD7 }, { 0x2DDF, 0x2DDF }, { 0x2E5E, 0x2E7F }, - { 0x2E9A, 0x2E9A }, { 0x2EF4, 0x2EFF }, { 0x2FD6, 0x2FEF }, - { 0x3040, 0x3040 }, { 0x3097, 0x3098 }, { 0x3100, 0x3104 }, - { 0x3130, 0x3130 }, { 0x318F, 0x318F }, { 0x31E4, 0x31EE }, - { 0x321F, 0x321F }, { 0x4DB6, 0x4DBF }, { 0x9FD6, 0x9FFF }, - { 0xA48D, 0xA48F }, { 0xA4C7, 0xA4CF }, { 0xA62C, 0xA63F }, - { 0xA6F8, 0xA6FF }, { 0xA7CB, 0xA7CF }, { 0xA7D2, 0xA7D2 }, - { 0xA7D4, 0xA7D4 }, { 0xA7DA, 0xA7F1 }, { 0xA82D, 0xA82F }, - { 0xA83A, 0xA83F }, { 0xA878, 0xA87F }, { 0xA8C6, 0xA8CD }, - { 0xA8DA, 0xA8DF }, { 0xA954, 0xA95E }, { 0xA97D, 0xA97F }, - { 0xA9CE, 0xA9CE }, { 0xA9DA, 0xA9DD }, { 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 }, { 0xFBC3, 0xFBD2 }, { 0xFD90, 0xFD91 }, - { 0xFDC8, 0xFDCE }, { 0xFDD0, 0xFDEF }, { 0xFE1A, 0xFE1F }, - { 0xFE53, 0xFE53 }, { 0xFE67, 0xFE67 }, { 0xFE6C, 0xFE6F }, - { 0xFE75, 0xFE75 }, { 0xFEFD, 0xFEFE }, { 0xFF00, 0xFF00 }, - { 0xFFBF, 0xFFC1 }, { 0xFFC8, 0xFFC9 }, { 0xFFD0, 0xFFD1 }, - { 0xFFD8, 0xFFD9 }, { 0xFFDD, 0xFFDF }, { 0xFFE7, 0xFFE7 }, - { 0xFFEF, 0xFFF8 }, { 0xFFFE, 0xFFFF }, { 0x1000C, 0x1000C }, - { 0x10027, 0x10027 }, { 0x1003B, 0x1003B }, { 0x1003E, 0x1003E }, - { 0x1004E, 0x1004F }, { 0x1005E, 0x1007F }, { 0x100FB, 0x100FF }, - { 0x10103, 0x10106 }, { 0x10134, 0x10136 }, { 0x1018F, 0x1018F }, - { 0x1019D, 0x1019F }, { 0x101A1, 0x101CF }, { 0x101FE, 0x1027F }, - { 0x1029D, 0x1029F }, { 0x102D1, 0x102DF }, { 0x102FC, 0x102FF }, - { 0x10324, 0x1032C }, { 0x1034B, 0x1034F }, { 0x1037B, 0x1037F }, - { 0x1039E, 0x1039E }, { 0x103C4, 0x103C7 }, { 0x103D6, 0x103FF }, - { 0x1049E, 0x1049F }, { 0x104AA, 0x104AF }, { 0x104D4, 0x104D7 }, - { 0x104FC, 0x104FF }, { 0x10528, 0x1052F }, { 0x10564, 0x1056E }, - { 0x1057B, 0x1057B }, { 0x1058B, 0x1058B }, { 0x10593, 0x10593 }, - { 0x10596, 0x10596 }, { 0x105A2, 0x105A2 }, { 0x105B2, 0x105B2 }, - { 0x105BA, 0x105BA }, { 0x105BD, 0x105FF }, { 0x10737, 0x1073F }, + { 0x1ACF, 0x1AFF }, { 0x1B4D, 0x1B4D }, { 0x1BF4, 0x1BFB }, + { 0x1C38, 0x1C3A }, { 0x1C4A, 0x1C4C }, { 0x1C8B, 0x1C8F }, + { 0x1CBB, 0x1CBC }, { 0x1CC8, 0x1CCF }, { 0x1CFB, 0x1CFF }, + { 0x1F16, 0x1F17 }, { 0x1F1E, 0x1F1F }, { 0x1F46, 0x1F47 }, + { 0x1F4E, 0x1F4F }, { 0x1F58, 0x1F58 }, { 0x1F5A, 0x1F5A }, + { 0x1F5C, 0x1F5C }, { 0x1F5E, 0x1F5E }, { 0x1F7E, 0x1F7F }, + { 0x1FB5, 0x1FB5 }, { 0x1FC5, 0x1FC5 }, { 0x1FD4, 0x1FD5 }, + { 0x1FDC, 0x1FDC }, { 0x1FF0, 0x1FF1 }, { 0x1FF5, 0x1FF5 }, + { 0x1FFF, 0x1FFF }, { 0x2028, 0x2029 }, { 0x2065, 0x2065 }, + { 0x2072, 0x2073 }, { 0x208F, 0x208F }, { 0x209D, 0x209F }, + { 0x20C1, 0x20CF }, { 0x20F1, 0x20FF }, { 0x218C, 0x218F }, + { 0x242A, 0x243F }, { 0x244B, 0x245F }, { 0x2B74, 0x2B75 }, + { 0x2B96, 0x2B96 }, { 0x2CF4, 0x2CF8 }, { 0x2D26, 0x2D26 }, + { 0x2D28, 0x2D2C }, { 0x2D2E, 0x2D2F }, { 0x2D68, 0x2D6E }, + { 0x2D71, 0x2D7E }, { 0x2D97, 0x2D9F }, { 0x2DA7, 0x2DA7 }, + { 0x2DAF, 0x2DAF }, { 0x2DB7, 0x2DB7 }, { 0x2DBF, 0x2DBF }, + { 0x2DC7, 0x2DC7 }, { 0x2DCF, 0x2DCF }, { 0x2DD7, 0x2DD7 }, + { 0x2DDF, 0x2DDF }, { 0x2E5E, 0x2E7F }, { 0x2E9A, 0x2E9A }, + { 0x2EF4, 0x2EFF }, { 0x2FD6, 0x2FEF }, { 0x3040, 0x3040 }, + { 0x3097, 0x3098 }, { 0x3100, 0x3104 }, { 0x3130, 0x3130 }, + { 0x318F, 0x318F }, { 0x31E6, 0x31EE }, { 0x321F, 0x321F }, + { 0x4DB6, 0x4DBF }, { 0x9FD6, 0x9FFF }, { 0xA48D, 0xA48F }, + { 0xA4C7, 0xA4CF }, { 0xA62C, 0xA63F }, { 0xA6F8, 0xA6FF }, + { 0xA7CE, 0xA7CF }, { 0xA7D2, 0xA7D2 }, { 0xA7D4, 0xA7D4 }, + { 0xA7DD, 0xA7F1 }, { 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 }, + { 0xFBC3, 0xFBD2 }, { 0xFD90, 0xFD91 }, { 0xFDC8, 0xFDCE }, + { 0xFDD0, 0xFDEF }, { 0xFE1A, 0xFE1F }, { 0xFE53, 0xFE53 }, + { 0xFE67, 0xFE67 }, { 0xFE6C, 0xFE6F }, { 0xFE75, 0xFE75 }, + { 0xFEFD, 0xFEFE }, { 0xFF00, 0xFF00 }, { 0xFFBF, 0xFFC1 }, + { 0xFFC8, 0xFFC9 }, { 0xFFD0, 0xFFD1 }, { 0xFFD8, 0xFFD9 }, + { 0xFFDD, 0xFFDF }, { 0xFFE7, 0xFFE7 }, { 0xFFEF, 0xFFF8 }, + { 0xFFFE, 0xFFFF }, { 0x1000C, 0x1000C }, { 0x10027, 0x10027 }, + { 0x1003B, 0x1003B }, { 0x1003E, 0x1003E }, { 0x1004E, 0x1004F }, + { 0x1005E, 0x1007F }, { 0x100FB, 0x100FF }, { 0x10103, 0x10106 }, + { 0x10134, 0x10136 }, { 0x1018F, 0x1018F }, { 0x1019D, 0x1019F }, + { 0x101A1, 0x101CF }, { 0x101FE, 0x1027F }, { 0x1029D, 0x1029F }, + { 0x102D1, 0x102DF }, { 0x102FC, 0x102FF }, { 0x10324, 0x1032C }, + { 0x1034B, 0x1034F }, { 0x1037B, 0x1037F }, { 0x1039E, 0x1039E }, + { 0x103C4, 0x103C7 }, { 0x103D6, 0x103FF }, { 0x1049E, 0x1049F }, + { 0x104AA, 0x104AF }, { 0x104D4, 0x104D7 }, { 0x104FC, 0x104FF }, + { 0x10528, 0x1052F }, { 0x10564, 0x1056E }, { 0x1057B, 0x1057B }, + { 0x1058B, 0x1058B }, { 0x10593, 0x10593 }, { 0x10596, 0x10596 }, + { 0x105A2, 0x105A2 }, { 0x105B2, 0x105B2 }, { 0x105BA, 0x105BA }, + { 0x105BD, 0x105BF }, { 0x105F4, 0x105FF }, { 0x10737, 0x1073F }, { 0x10756, 0x1075F }, { 0x10768, 0x1077F }, { 0x10786, 0x10786 }, { 0x107B1, 0x107B1 }, { 0x107BB, 0x107FF }, { 0x10806, 0x10807 }, { 0x10809, 0x10809 }, { 0x10836, 0x10836 }, { 0x10839, 0x1083B }, @@ -509,32 +512,38 @@ int mk_wcwidth(wchar_t ucs) { 0x10AF7, 0x10AFF }, { 0x10B36, 0x10B38 }, { 0x10B56, 0x10B57 }, { 0x10B73, 0x10B77 }, { 0x10B92, 0x10B98 }, { 0x10B9D, 0x10BA8 }, { 0x10BB0, 0x10BFF }, { 0x10C49, 0x10C7F }, { 0x10CB3, 0x10CBF }, - { 0x10CF3, 0x10CF9 }, { 0x10D28, 0x10D2F }, { 0x10D3A, 0x10E5F }, + { 0x10CF3, 0x10CF9 }, { 0x10D28, 0x10D2F }, { 0x10D3A, 0x10D3F }, + { 0x10D66, 0x10D68 }, { 0x10D86, 0x10D8D }, { 0x10D90, 0x10E5F }, { 0x10E7F, 0x10E7F }, { 0x10EAA, 0x10EAA }, { 0x10EAE, 0x10EAF }, - { 0x10EB2, 0x10EFC }, { 0x10F28, 0x10F2F }, { 0x10F5A, 0x10F6F }, - { 0x10F8A, 0x10FAF }, { 0x10FCC, 0x10FDF }, { 0x10FF7, 0x10FFF }, - { 0x1104E, 0x11051 }, { 0x11076, 0x1107E }, { 0x110C3, 0x110CC }, - { 0x110CE, 0x110CF }, { 0x110E9, 0x110EF }, { 0x110FA, 0x110FF }, - { 0x11135, 0x11135 }, { 0x11148, 0x1114F }, { 0x11177, 0x1117F }, - { 0x111E0, 0x111E0 }, { 0x111F5, 0x111FF }, { 0x11212, 0x11212 }, - { 0x11242, 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 }, + { 0x10EB2, 0x10EC1 }, { 0x10EC5, 0x10EFB }, { 0x10F28, 0x10F2F }, + { 0x10F5A, 0x10F6F }, { 0x10F8A, 0x10FAF }, { 0x10FCC, 0x10FDF }, + { 0x10FF7, 0x10FFF }, { 0x1104E, 0x11051 }, { 0x11076, 0x1107E }, + { 0x110C3, 0x110CC }, { 0x110CE, 0x110CF }, { 0x110E9, 0x110EF }, + { 0x110FA, 0x110FF }, { 0x11135, 0x11135 }, { 0x11148, 0x1114F }, + { 0x11177, 0x1117F }, { 0x111E0, 0x111E0 }, { 0x111F5, 0x111FF }, + { 0x11212, 0x11212 }, { 0x11242, 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, 0x1137F }, + { 0x1138A, 0x1138A }, { 0x1138C, 0x1138D }, { 0x1138F, 0x1138F }, + { 0x113B6, 0x113B6 }, { 0x113C1, 0x113C1 }, { 0x113C3, 0x113C4 }, + { 0x113C6, 0x113C6 }, { 0x113CB, 0x113CB }, { 0x113D6, 0x113D6 }, + { 0x113D9, 0x113E0 }, { 0x113E3, 0x113FF }, { 0x1145C, 0x1145C }, { 0x11462, 0x1147F }, { 0x114C8, 0x114CF }, { 0x114DA, 0x1157F }, { 0x115B6, 0x115B7 }, { 0x115DE, 0x115FF }, { 0x11645, 0x1164F }, { 0x1165A, 0x1165F }, { 0x1166D, 0x1167F }, { 0x116BA, 0x116BF }, - { 0x116CA, 0x116FF }, { 0x1171B, 0x1171C }, { 0x1172C, 0x1172F }, - { 0x11747, 0x117FF }, { 0x1183C, 0x1189F }, { 0x118F3, 0x118FE }, - { 0x11907, 0x11908 }, { 0x1190A, 0x1190B }, { 0x11914, 0x11914 }, - { 0x11917, 0x11917 }, { 0x11936, 0x11936 }, { 0x11939, 0x1193A }, - { 0x11947, 0x1194F }, { 0x1195A, 0x1199F }, { 0x119A8, 0x119A9 }, - { 0x119D8, 0x119D9 }, { 0x119E5, 0x119FF }, { 0x11A48, 0x11A4F }, - { 0x11AA3, 0x11AAF }, { 0x11AF9, 0x11AFF }, { 0x11B0A, 0x11BFF }, + { 0x116CA, 0x116CF }, { 0x116E4, 0x116FF }, { 0x1171B, 0x1171C }, + { 0x1172C, 0x1172F }, { 0x11747, 0x117FF }, { 0x1183C, 0x1189F }, + { 0x118F3, 0x118FE }, { 0x11907, 0x11908 }, { 0x1190A, 0x1190B }, + { 0x11914, 0x11914 }, { 0x11917, 0x11917 }, { 0x11936, 0x11936 }, + { 0x11939, 0x1193A }, { 0x11947, 0x1194F }, { 0x1195A, 0x1199F }, + { 0x119A8, 0x119A9 }, { 0x119D8, 0x119D9 }, { 0x119E5, 0x119FF }, + { 0x11A48, 0x11A4F }, { 0x11AA3, 0x11AAF }, { 0x11AF9, 0x11AFF }, + { 0x11B0A, 0x11BBF }, { 0x11BE2, 0x11BEF }, { 0x11BFA, 0x11BFF }, { 0x11C09, 0x11C09 }, { 0x11C37, 0x11C37 }, { 0x11C46, 0x11C4F }, { 0x11C6D, 0x11C6F }, { 0x11C90, 0x11C91 }, { 0x11CA8, 0x11CA8 }, { 0x11CB7, 0x11CFF }, { 0x11D07, 0x11D07 }, { 0x11D0A, 0x11D0A }, @@ -542,21 +551,23 @@ int mk_wcwidth(wchar_t ucs) { 0x11D48, 0x11D4F }, { 0x11D5A, 0x11D5F }, { 0x11D66, 0x11D66 }, { 0x11D69, 0x11D69 }, { 0x11D8F, 0x11D8F }, { 0x11D92, 0x11D92 }, { 0x11D99, 0x11D9F }, { 0x11DAA, 0x11EDF }, { 0x11EF9, 0x11EFF }, - { 0x11F11, 0x11F11 }, { 0x11F3B, 0x11F3D }, { 0x11F5A, 0x11FAF }, + { 0x11F11, 0x11F11 }, { 0x11F3B, 0x11F3D }, { 0x11F5B, 0x11FAF }, { 0x11FB1, 0x11FBF }, { 0x11FF2, 0x11FFE }, { 0x1239A, 0x123FF }, { 0x1246F, 0x1246F }, { 0x12475, 0x1247F }, { 0x12544, 0x12F8F }, - { 0x12FF3, 0x12FFF }, { 0x13456, 0x143FF }, { 0x14647, 0x167FF }, - { 0x16A39, 0x16A3F }, { 0x16A5F, 0x16A5F }, { 0x16A6A, 0x16A6D }, - { 0x16ABF, 0x16ABF }, { 0x16ACA, 0x16ACF }, { 0x16AEE, 0x16AEF }, - { 0x16AF6, 0x16AFF }, { 0x16B46, 0x16B4F }, { 0x16B5A, 0x16B5A }, - { 0x16B62, 0x16B62 }, { 0x16B78, 0x16B7C }, { 0x16B90, 0x16E3F }, + { 0x12FF3, 0x12FFF }, { 0x13456, 0x1345F }, { 0x143FB, 0x143FF }, + { 0x14647, 0x160FF }, { 0x1613A, 0x167FF }, { 0x16A39, 0x16A3F }, + { 0x16A5F, 0x16A5F }, { 0x16A6A, 0x16A6D }, { 0x16ABF, 0x16ABF }, + { 0x16ACA, 0x16ACF }, { 0x16AEE, 0x16AEF }, { 0x16AF6, 0x16AFF }, + { 0x16B46, 0x16B4F }, { 0x16B5A, 0x16B5A }, { 0x16B62, 0x16B62 }, + { 0x16B78, 0x16B7C }, { 0x16B90, 0x16D3F }, { 0x16D7A, 0x16E3F }, { 0x16E9B, 0x16EFF }, { 0x16F4B, 0x16F4E }, { 0x16F88, 0x16F8E }, { 0x16FA0, 0x16FDF }, { 0x16FE5, 0x16FEF }, { 0x16FF2, 0x187FF }, - { 0x18CD6, 0x1AFEF }, { 0x1AFF4, 0x1AFF4 }, { 0x1AFFC, 0x1AFFC }, - { 0x1AFFF, 0x1AFFF }, { 0x1B123, 0x1B131 }, { 0x1B133, 0x1B14F }, - { 0x1B153, 0x1B154 }, { 0x1B156, 0x1B163 }, { 0x1B168, 0x1B16F }, - { 0x1B2FC, 0x1BBFF }, { 0x1BC6B, 0x1BC6F }, { 0x1BC7D, 0x1BC7F }, - { 0x1BC89, 0x1BC8F }, { 0x1BC9A, 0x1BC9B }, { 0x1BCA4, 0x1CEFF }, + { 0x18CD6, 0x18CFE }, { 0x18D00, 0x1AFEF }, { 0x1AFF4, 0x1AFF4 }, + { 0x1AFFC, 0x1AFFC }, { 0x1AFFF, 0x1AFFF }, { 0x1B123, 0x1B131 }, + { 0x1B133, 0x1B14F }, { 0x1B153, 0x1B154 }, { 0x1B156, 0x1B163 }, + { 0x1B168, 0x1B16F }, { 0x1B2FC, 0x1BBFF }, { 0x1BC6B, 0x1BC6F }, + { 0x1BC7D, 0x1BC7F }, { 0x1BC89, 0x1BC8F }, { 0x1BC9A, 0x1BC9B }, + { 0x1BCA4, 0x1CBFF }, { 0x1CCFA, 0x1CCFF }, { 0x1CEB4, 0x1CEFF }, { 0x1CF2E, 0x1CF2F }, { 0x1CF47, 0x1CF4F }, { 0x1CFC4, 0x1CFFF }, { 0x1D0F6, 0x1D0FF }, { 0x1D127, 0x1D128 }, { 0x1D1EB, 0x1D1FF }, { 0x1D246, 0x1D2BF }, { 0x1D2D4, 0x1D2DF }, { 0x1D2F4, 0x1D2FF }, @@ -573,36 +584,37 @@ int mk_wcwidth(wchar_t ucs) { 0x1E025, 0x1E025 }, { 0x1E02B, 0x1E02F }, { 0x1E06E, 0x1E08E }, { 0x1E090, 0x1E0FF }, { 0x1E12D, 0x1E12F }, { 0x1E13E, 0x1E13F }, { 0x1E14A, 0x1E14D }, { 0x1E150, 0x1E28F }, { 0x1E2AF, 0x1E2BF }, - { 0x1E2FA, 0x1E2FE }, { 0x1E300, 0x1E4CF }, { 0x1E4FA, 0x1E7DF }, - { 0x1E7E7, 0x1E7E7 }, { 0x1E7EC, 0x1E7EC }, { 0x1E7EF, 0x1E7EF }, - { 0x1E7FF, 0x1E7FF }, { 0x1E8C5, 0x1E8C6 }, { 0x1E8D7, 0x1E8FF }, - { 0x1E94C, 0x1E94F }, { 0x1E95A, 0x1E95D }, { 0x1E960, 0x1EC70 }, - { 0x1ECB5, 0x1ED00 }, { 0x1ED3E, 0x1EDFF }, { 0x1EE04, 0x1EE04 }, - { 0x1EE20, 0x1EE20 }, { 0x1EE23, 0x1EE23 }, { 0x1EE25, 0x1EE26 }, - { 0x1EE28, 0x1EE28 }, { 0x1EE33, 0x1EE33 }, { 0x1EE38, 0x1EE38 }, - { 0x1EE3A, 0x1EE3A }, { 0x1EE3C, 0x1EE41 }, { 0x1EE43, 0x1EE46 }, - { 0x1EE48, 0x1EE48 }, { 0x1EE4A, 0x1EE4A }, { 0x1EE4C, 0x1EE4C }, - { 0x1EE50, 0x1EE50 }, { 0x1EE53, 0x1EE53 }, { 0x1EE55, 0x1EE56 }, - { 0x1EE58, 0x1EE58 }, { 0x1EE5A, 0x1EE5A }, { 0x1EE5C, 0x1EE5C }, - { 0x1EE5E, 0x1EE5E }, { 0x1EE60, 0x1EE60 }, { 0x1EE63, 0x1EE63 }, - { 0x1EE65, 0x1EE66 }, { 0x1EE6B, 0x1EE6B }, { 0x1EE73, 0x1EE73 }, - { 0x1EE78, 0x1EE78 }, { 0x1EE7D, 0x1EE7D }, { 0x1EE7F, 0x1EE7F }, - { 0x1EE8A, 0x1EE8A }, { 0x1EE9C, 0x1EEA0 }, { 0x1EEA4, 0x1EEA4 }, - { 0x1EEAA, 0x1EEAA }, { 0x1EEBC, 0x1EEEF }, { 0x1EEF2, 0x1EFFF }, - { 0x1F02C, 0x1F02F }, { 0x1F094, 0x1F09F }, { 0x1F0AF, 0x1F0B0 }, - { 0x1F0C0, 0x1F0C0 }, { 0x1F0D0, 0x1F0D0 }, { 0x1F0F6, 0x1F0FF }, - { 0x1F1AE, 0x1F1E5 }, { 0x1F203, 0x1F20F }, { 0x1F23C, 0x1F23F }, - { 0x1F249, 0x1F24F }, { 0x1F252, 0x1F25F }, { 0x1F266, 0x1F2FF }, - { 0x1F6D8, 0x1F6DB }, { 0x1F6ED, 0x1F6EF }, { 0x1F6FD, 0x1F6FF }, - { 0x1F777, 0x1F77A }, { 0x1F7DA, 0x1F7DF }, { 0x1F7EC, 0x1F7EF }, - { 0x1F7F1, 0x1F7FF }, { 0x1F80C, 0x1F80F }, { 0x1F848, 0x1F84F }, - { 0x1F85A, 0x1F85F }, { 0x1F888, 0x1F88F }, { 0x1F8AE, 0x1F8AF }, - { 0x1F8B2, 0x1F8FF }, { 0x1FA54, 0x1FA5F }, { 0x1FA6E, 0x1FA6F }, - { 0x1FA7D, 0x1FA7F }, { 0x1FA89, 0x1FA8F }, { 0x1FABE, 0x1FABE }, - { 0x1FAC6, 0x1FACD }, { 0x1FADC, 0x1FADF }, { 0x1FAE9, 0x1FAEF }, - { 0x1FAF9, 0x1FAFF }, { 0x1FB93, 0x1FB93 }, { 0x1FBCB, 0x1FBEF }, - { 0x1FBFA, 0x1FFFF }, { 0x2A6D7, 0x2F7FF }, { 0x2FA1E, 0xE0000 }, - { 0xE0002, 0xE001F }, { 0xE0080, 0xE00FF }, { 0xE01F0, 0x10FFFD } + { 0x1E2FA, 0x1E2FE }, { 0x1E300, 0x1E4CF }, { 0x1E4FA, 0x1E5CF }, + { 0x1E5FB, 0x1E5FE }, { 0x1E600, 0x1E7DF }, { 0x1E7E7, 0x1E7E7 }, + { 0x1E7EC, 0x1E7EC }, { 0x1E7EF, 0x1E7EF }, { 0x1E7FF, 0x1E7FF }, + { 0x1E8C5, 0x1E8C6 }, { 0x1E8D7, 0x1E8FF }, { 0x1E94C, 0x1E94F }, + { 0x1E95A, 0x1E95D }, { 0x1E960, 0x1EC70 }, { 0x1ECB5, 0x1ED00 }, + { 0x1ED3E, 0x1EDFF }, { 0x1EE04, 0x1EE04 }, { 0x1EE20, 0x1EE20 }, + { 0x1EE23, 0x1EE23 }, { 0x1EE25, 0x1EE26 }, { 0x1EE28, 0x1EE28 }, + { 0x1EE33, 0x1EE33 }, { 0x1EE38, 0x1EE38 }, { 0x1EE3A, 0x1EE3A }, + { 0x1EE3C, 0x1EE41 }, { 0x1EE43, 0x1EE46 }, { 0x1EE48, 0x1EE48 }, + { 0x1EE4A, 0x1EE4A }, { 0x1EE4C, 0x1EE4C }, { 0x1EE50, 0x1EE50 }, + { 0x1EE53, 0x1EE53 }, { 0x1EE55, 0x1EE56 }, { 0x1EE58, 0x1EE58 }, + { 0x1EE5A, 0x1EE5A }, { 0x1EE5C, 0x1EE5C }, { 0x1EE5E, 0x1EE5E }, + { 0x1EE60, 0x1EE60 }, { 0x1EE63, 0x1EE63 }, { 0x1EE65, 0x1EE66 }, + { 0x1EE6B, 0x1EE6B }, { 0x1EE73, 0x1EE73 }, { 0x1EE78, 0x1EE78 }, + { 0x1EE7D, 0x1EE7D }, { 0x1EE7F, 0x1EE7F }, { 0x1EE8A, 0x1EE8A }, + { 0x1EE9C, 0x1EEA0 }, { 0x1EEA4, 0x1EEA4 }, { 0x1EEAA, 0x1EEAA }, + { 0x1EEBC, 0x1EEEF }, { 0x1EEF2, 0x1EFFF }, { 0x1F02C, 0x1F02F }, + { 0x1F094, 0x1F09F }, { 0x1F0AF, 0x1F0B0 }, { 0x1F0C0, 0x1F0C0 }, + { 0x1F0D0, 0x1F0D0 }, { 0x1F0F6, 0x1F0FF }, { 0x1F1AE, 0x1F1E5 }, + { 0x1F203, 0x1F20F }, { 0x1F23C, 0x1F23F }, { 0x1F249, 0x1F24F }, + { 0x1F252, 0x1F25F }, { 0x1F266, 0x1F2FF }, { 0x1F6D8, 0x1F6DB }, + { 0x1F6ED, 0x1F6EF }, { 0x1F6FD, 0x1F6FF }, { 0x1F777, 0x1F77A }, + { 0x1F7DA, 0x1F7DF }, { 0x1F7EC, 0x1F7EF }, { 0x1F7F1, 0x1F7FF }, + { 0x1F80C, 0x1F80F }, { 0x1F848, 0x1F84F }, { 0x1F85A, 0x1F85F }, + { 0x1F888, 0x1F88F }, { 0x1F8AE, 0x1F8AF }, { 0x1F8BC, 0x1F8BF }, + { 0x1F8C2, 0x1F8FF }, { 0x1FA54, 0x1FA5F }, { 0x1FA6E, 0x1FA6F }, + { 0x1FA7D, 0x1FA7F }, { 0x1FA8A, 0x1FA8E }, { 0x1FAC7, 0x1FACD }, + { 0x1FADD, 0x1FADE }, { 0x1FAEA, 0x1FAEF }, { 0x1FAF9, 0x1FAFF }, + { 0x1FB93, 0x1FB93 }, { 0x1FBFA, 0x1FFFF }, { 0x2A6D7, 0x2F7FF }, + { 0x2FA1E, 0xE0000 }, { 0xE0002, 0xE001F }, { 0xE0080, 0xE00FF }, + { 0xE01F0, 0x10FFFD } }; /* *INDENT-ON* */ @@ -615,29 +627,30 @@ int mk_wcwidth(wchar_t ucs) static const struct interval doublewidth[] = { { 0x1100, 0x115F }, { 0x231A, 0x231B }, { 0x2329, 0x232A }, { 0x23E9, 0x23EC }, { 0x23F0, 0x23F0 }, { 0x23F3, 0x23F3 }, - { 0x25FD, 0x25FE }, { 0x2614, 0x2615 }, { 0x2648, 0x2653 }, - { 0x267F, 0x267F }, { 0x2693, 0x2693 }, { 0x26A1, 0x26A1 }, - { 0x26AA, 0x26AB }, { 0x26BD, 0x26BE }, { 0x26C4, 0x26C5 }, - { 0x26CE, 0x26CE }, { 0x26D4, 0x26D4 }, { 0x26EA, 0x26EA }, - { 0x26F2, 0x26F3 }, { 0x26F5, 0x26F5 }, { 0x26FA, 0x26FA }, - { 0x26FD, 0x26FD }, { 0x2705, 0x2705 }, { 0x270A, 0x270B }, - { 0x2728, 0x2728 }, { 0x274C, 0x274C }, { 0x274E, 0x274E }, - { 0x2753, 0x2755 }, { 0x2757, 0x2757 }, { 0x2795, 0x2797 }, - { 0x27B0, 0x27B0 }, { 0x27BF, 0x27BF }, { 0x2B1B, 0x2B1C }, - { 0x2B50, 0x2B50 }, { 0x2B55, 0x2B55 }, { 0x2E80, 0x2E99 }, - { 0x2E9B, 0x2EF3 }, { 0x2F00, 0x2FD5 }, { 0x2FF0, 0x3029 }, - { 0x302E, 0x303E }, { 0x3041, 0x3096 }, { 0x309B, 0x30FF }, - { 0x3105, 0x312F }, { 0x3131, 0x318E }, { 0x3190, 0x31E3 }, - { 0x31EF, 0x321E }, { 0x3220, 0x3247 }, { 0x3250, 0x4DBF }, - { 0x4E00, 0xA48C }, { 0xA490, 0xA4C6 }, { 0xA960, 0xA97C }, - { 0xAC00, 0xD7A3 }, { 0xF900, 0xFA6D }, { 0xFA70, 0xFAD9 }, - { 0xFE10, 0xFE19 }, { 0xFE30, 0xFE52 }, { 0xFE54, 0xFE66 }, - { 0xFE68, 0xFE6B }, { 0xFF01, 0xFF60 }, { 0xFFE0, 0xFFE6 }, - { 0x16FE0, 0x16FE3 }, { 0x16FF0, 0x16FF1 }, { 0x17000, 0x187F7 }, - { 0x18800, 0x18CD5 }, { 0x18D00, 0x18D08 }, { 0x1AFF0, 0x1AFF3 }, - { 0x1AFF5, 0x1AFFB }, { 0x1AFFD, 0x1AFFE }, { 0x1B000, 0x1B122 }, - { 0x1B132, 0x1B132 }, { 0x1B150, 0x1B152 }, { 0x1B155, 0x1B155 }, - { 0x1B164, 0x1B167 }, { 0x1B170, 0x1B2FB }, { 0x1F004, 0x1F004 }, + { 0x25FD, 0x25FE }, { 0x2614, 0x2615 }, { 0x2630, 0x2637 }, + { 0x2648, 0x2653 }, { 0x267F, 0x267F }, { 0x268A, 0x268F }, + { 0x2693, 0x2693 }, { 0x26A1, 0x26A1 }, { 0x26AA, 0x26AB }, + { 0x26BD, 0x26BE }, { 0x26C4, 0x26C5 }, { 0x26CE, 0x26CE }, + { 0x26D4, 0x26D4 }, { 0x26EA, 0x26EA }, { 0x26F2, 0x26F3 }, + { 0x26F5, 0x26F5 }, { 0x26FA, 0x26FA }, { 0x26FD, 0x26FD }, + { 0x2705, 0x2705 }, { 0x270A, 0x270B }, { 0x2728, 0x2728 }, + { 0x274C, 0x274C }, { 0x274E, 0x274E }, { 0x2753, 0x2755 }, + { 0x2757, 0x2757 }, { 0x2795, 0x2797 }, { 0x27B0, 0x27B0 }, + { 0x27BF, 0x27BF }, { 0x2B1B, 0x2B1C }, { 0x2B50, 0x2B50 }, + { 0x2B55, 0x2B55 }, { 0x2E80, 0x2E99 }, { 0x2E9B, 0x2EF3 }, + { 0x2F00, 0x2FD5 }, { 0x2FF0, 0x3029 }, { 0x302E, 0x303E }, + { 0x3041, 0x3096 }, { 0x309B, 0x30FF }, { 0x3105, 0x312F }, + { 0x3131, 0x318E }, { 0x3190, 0x31E5 }, { 0x31EF, 0x321E }, + { 0x3220, 0x3247 }, { 0x3250, 0xA48C }, { 0xA490, 0xA4C6 }, + { 0xA960, 0xA97C }, { 0xAC00, 0xD7A3 }, { 0xF900, 0xFA6D }, + { 0xFA70, 0xFAD9 }, { 0xFE10, 0xFE19 }, { 0xFE30, 0xFE52 }, + { 0xFE54, 0xFE66 }, { 0xFE68, 0xFE6B }, { 0xFF01, 0xFF60 }, + { 0xFFE0, 0xFFE6 }, { 0x16FE0, 0x16FE3 }, { 0x16FF0, 0x16FF1 }, + { 0x17000, 0x187F7 }, { 0x18800, 0x18CD5 }, { 0x18CFF, 0x18D08 }, + { 0x1AFF0, 0x1AFF3 }, { 0x1AFF5, 0x1AFFB }, { 0x1AFFD, 0x1AFFE }, + { 0x1B000, 0x1B122 }, { 0x1B132, 0x1B132 }, { 0x1B150, 0x1B152 }, + { 0x1B155, 0x1B155 }, { 0x1B164, 0x1B167 }, { 0x1B170, 0x1B2FB }, + { 0x1D300, 0x1D356 }, { 0x1D360, 0x1D376 }, { 0x1F004, 0x1F004 }, { 0x1F0CF, 0x1F0CF }, { 0x1F18E, 0x1F18E }, { 0x1F191, 0x1F19A }, { 0x1F200, 0x1F202 }, { 0x1F210, 0x1F23B }, { 0x1F240, 0x1F248 }, { 0x1F250, 0x1F251 }, { 0x1F260, 0x1F265 }, { 0x1F300, 0x1F320 }, @@ -651,11 +664,11 @@ int mk_wcwidth(wchar_t ucs) { 0x1F6DC, 0x1F6DF }, { 0x1F6EB, 0x1F6EC }, { 0x1F6F4, 0x1F6FC }, { 0x1F7E0, 0x1F7EB }, { 0x1F7F0, 0x1F7F0 }, { 0x1F90C, 0x1F93A }, { 0x1F93C, 0x1F945 }, { 0x1F947, 0x1F9FF }, { 0x1FA70, 0x1FA7C }, - { 0x1FA80, 0x1FA88 }, { 0x1FA90, 0x1FABD }, { 0x1FABF, 0x1FAC5 }, - { 0x1FACE, 0x1FADB }, { 0x1FAE0, 0x1FAE8 }, { 0x1FAF0, 0x1FAF8 }, - { 0x20000, 0x2A6DF }, { 0x2A700, 0x2B739 }, { 0x2B740, 0x2B81D }, - { 0x2B820, 0x2CEA1 }, { 0x2CEB0, 0x2EBE0 }, { 0x2EBF0, 0x2EE5D }, - { 0x2F800, 0x2FA1D }, { 0x30000, 0x3134A }, { 0x31350, 0x323AF } + { 0x1FA80, 0x1FA89 }, { 0x1FA8F, 0x1FAC6 }, { 0x1FACE, 0x1FADC }, + { 0x1FADF, 0x1FAE9 }, { 0x1FAF0, 0x1FAF8 }, { 0x20000, 0x2A6DF }, + { 0x2A700, 0x2B739 }, { 0x2B740, 0x2B81D }, { 0x2B820, 0x2CEA1 }, + { 0x2CEB0, 0x2EBE0 }, { 0x2EBF0, 0x2EE5D }, { 0x2F800, 0x2FA1D }, + { 0x30000, 0x3134A }, { 0x31350, 0x323AF } }; /* *INDENT-ON* */ @@ -698,6 +711,7 @@ int mk_wcwidth(wchar_t ucs) } +#ifdef UNUSED int mk_wcswidth(const wchar_t *pwcs, size_t n) { int width = 0; @@ -713,6 +727,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n) return width; } +#endif /* UNUSED */ /* @@ -813,6 +828,7 @@ int mk_wcwidth_cjk(wchar_t ucs) } +#ifdef UNUSED int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) { int width = 0; @@ -828,6 +844,7 @@ int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) return width; } +#endif /* UNUSED */ #ifdef TEST_DRIVER static int opt_all = 0; diff --git a/app/xterm/xterm.appdata.xml b/app/xterm/xterm.appdata.xml index 06387816e..58afef89e 100644 --- a/app/xterm/xterm.appdata.xml +++ b/app/xterm/xterm.appdata.xml @@ -35,7 +35,7 @@ <keyword>terminal</keyword> </keywords> <releases> - <release version="393" date="2024-07-11"/> + <release version="395" date="2024-10-24"/> </releases> <url type="homepage">https://invisible-island.net/xterm/</url> <update_contact>dickey@invisible-island.net</update_contact> diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h index 50001626e..81c64cc3b 100644 --- a/app/xterm/xterm.h +++ b/app/xterm/xterm.h @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.948 2024/06/26 07:45:55 tom Exp $ */ +/* $XTermId: xterm.h,v 1.952 2024/09/30 08:03:20 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -123,7 +123,7 @@ #define HAVE_UTMP 1 #endif -#if (defined(__MVS__) || defined(SVR4) || defined(__SCO__) || defined(BSD_UTMPX)) && !defined(__CYGWIN__) +#if (defined(SVR4) || defined(__SCO__) || defined(BSD_UTMPX)) && !defined(__CYGWIN__) #define UTMPX_FOR_UTMP 1 #endif @@ -131,7 +131,7 @@ #define HAVE_UTMP_UT_HOST 1 #endif -#if defined(UTMPX_FOR_UTMP) && !(defined(__MVS__) || defined(__hpux) || defined(__FreeBSD__)) +#if defined(UTMPX_FOR_UTMP) && !(defined(__hpux) || defined(__FreeBSD__)) #define HAVE_UTMP_UT_SESSION 1 #endif @@ -174,11 +174,11 @@ #define USE_POSIX_WAIT #endif -#if defined(AIXV3) || defined(CRAY) || defined(__SCO__) || defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__MVS__) || defined(__hpux) || defined(__osf__) || defined(__linux__) || defined(macII) || defined(BSD_UTMPX) +#if defined(AIXV3) || defined(CRAY) || defined(__SCO__) || defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__hpux) || defined(__osf__) || defined(__linux__) || defined(macII) || defined(BSD_UTMPX) #define USE_SYSV_UTMP #endif -#if defined(__GNU__) || defined(__MVS__) || defined(__osf__) +#if defined(__GNU__) || defined(__osf__) #define USE_TTY_GROUP #endif @@ -190,13 +190,6 @@ #define TTY_GROUP_NAME "terminal" #endif -#if defined(__MVS__) -#undef ut_xstatus -#define ut_name ut_user -#define ut_xstatus ut_exit.ut_e_exit -#define ut_xtime ut_tv.tv_sec -#endif - #if defined(ut_xstatus) #define HAVE_UTMP_UT_XSTATUS 1 #endif @@ -209,7 +202,7 @@ #define HAVE_POSIX_SAVED_IDS #endif -#if defined(__linux__) || defined(__GLIBC__) || (defined(SYSV) && (defined(CRAY) || defined(macII) || defined(__hpux) || defined(__osf__) || defined(__sgi))) || !(defined(SYSV) || defined(__QNX__) || defined(VMS) || defined(__INTERIX)) +#if defined(__linux__) || defined(__GLIBC__) || (defined(SYSV) && (defined(CRAY) || defined(macII) || defined(__hpux) || defined(__osf__) || defined(__sgi))) || !(defined(SYSV) || defined(__QNX__) || defined(__INTERIX)) #define HAVE_INITGROUPS #endif @@ -368,9 +361,6 @@ extern int errno; #else #define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval *)t) #define XFD_COPYSET(src,dst) memcpy((dst)->fds_bits, (src)->fds_bits, sizeof(fd_set)) -#if defined(__MVS__) && !defined(TIME_WITH_SYS_TIME) -#define TIME_WITH_SYS_TIME -#endif #endif #ifdef TIME_WITH_SYS_TIME @@ -400,7 +390,7 @@ extern int errno; #include <setjmp.h> -#if !defined(VMS) && !(defined(__linux__) && defined(__USE_GNU)) && !defined(__hpux) && !defined(_ALL_SOURCE) && !defined(__osf__) +#if !(defined(__linux__) && defined(__USE_GNU)) && !defined(__hpux) && !defined(_ALL_SOURCE) && !defined(__osf__) extern char **environ; #endif @@ -610,6 +600,7 @@ extern char **environ; #define XtNmultiScroll "multiScroll" #define XtNnMarginBell "nMarginBell" #define XtNnextEventDelay "nextEventDelay" +#define XtNnotMapped "notMapped" #define XtNnumColorRegisters "numColorRegisters" #define XtNnumLock "numLock" #define XtNoldXtermFKeys "oldXtermFKeys" @@ -868,6 +859,7 @@ extern char **environ; #define XtCMultiClickTime "MultiClickTime" #define XtCMultiScroll "MultiScroll" #define XtCNextEventDelay "NextEventDelay" +#define XtCNotMapped "NotMapped" #define XtCNumColorRegisters "NumColorRegisters" #define XtCNumLock "NumLock" #define XtCOldXtermFKeys "OldXtermFKeys" @@ -1142,7 +1134,7 @@ extern void releaseCursorGCs(XtermWidget /*xw*/); extern void releaseWindowGCs(XtermWidget /*xw*/, VTwin * /*win*/); extern void resetCharsets (TScreen * /* screen */); extern void resetMargins (XtermWidget /* xw */); -extern void restoreCharsets (TScreen * /* screen */, DECNRCM_codes * /* source */); +extern void restoreCharsets (TScreen * /* screen */, const DECNRCM_codes * /* source */); extern void saveCharsets (TScreen * /* screen */, DECNRCM_codes * /* target */); extern void set_max_col(TScreen * /* screen */, int /* cols */); extern void set_max_row(TScreen * /* screen */, int /* rows */); @@ -1270,10 +1262,6 @@ extern Atom CachedInternAtom(Display * /* display */, const char * /* name */); extern int get_tty_erase(int /* fd */, int /* default_erase */, const char * /* tag */); extern int get_tty_lnext(int /* fd */, int /* default_lnext */, const char * /* tag */); -#if (defined(VMS) || defined(__VMS)) -#define GetBytesAvailable(dpy) ((dpy)->qlen > 0) -#endif - #if OPT_PTY_HANDSHAKE extern void first_map_occurred (void); #else @@ -1516,11 +1504,7 @@ extern void xtermDumpSvg (XtermWidget /* xw */); #endif /* ptydata.c */ -#ifdef VMS -#define PtySelect int -#else #define PtySelect fd_set -#endif extern Bool decodeUtf8 (TScreen * /* screen */, PtyData * /* data */); extern int readPtyData (XtermWidget /* xw */, PtySelect * /* select_mask */, PtyData * /* data */); @@ -1722,7 +1706,7 @@ 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 drawXtermText (const 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 void ChangeColors (XtermWidget /* xw */, ScrnColors * /* pNew */); extern void ClearLine (XtermWidget /* xw */); diff --git a/app/xterm/xterm.log.html b/app/xterm/xterm.log.html index 7bed04559..1f76dc046 100644 --- a/app/xterm/xterm.log.html +++ b/app/xterm/xterm.log.html @@ -30,7 +30,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.2635 2024/07/11 23:37:57 tom Exp $ + $XTermId: xterm.log.html,v 1.2653 2024/10/24 08:21:09 tom Exp $ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> @@ -70,6 +70,10 @@ CHANGELOG</a>).</p> <ul> + <li><a href="#xterm_395">Patch #395 - 2024/10/24</a></li> + + <li><a href="#xterm_394">Patch #394 - 2024/09/02</a></li> + <li><a href="#xterm_393">Patch #393 - 2024/07/11</a></li> <li><a href="#xterm_392">Patch #392 - 2024/05/22</a></li> @@ -1064,6 +1068,62 @@ <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li> </ul> + <h1><a name="xterm_395" id="xterm_395">Patch #395 - + 2024/10/24</a></h1> + + <ul> + <li>add <tt>DECRQSS</tt> response for <tt>DECSTGLT</tt>, i.e., + ANSI SGR color.</li> + + <li>add Russian and SCS NRCS character set mappings.</li> + + <li>remove obsolete code for OS390 and VMS.</li> + + <li>minor fixes to work with vttest 20240929's 7-bit parsing + test.</li> + + <li>improve DECRPM responses for unsupported modes; those which + are valid for a given DEC terminal are reported as permanently + reset rather than unknown.</li> + + <li>add JIS-Roman and JIS-Katakana character sets, for + VT382.</li> + + <li>fix typo in <tt>ctlseqs.ms</tt> note about function key vs + DSR (report by Michael Thomas Greer).</li> + + <li>formatting fixes for <tt>ctlseqs.ms</tt> (report by Mark + Manning).</li> + + <li>update tables in <code>wcwidth.c</code> based on Unicode + 16.0.0</li> + </ul> + + <h1><a name="xterm_394" id="xterm_394">Patch #394 - + 2024/09/02</a></h1> + + <ul> + <li>add <tt>-nomap</tt> option (request by Tavis Ormandy).</li> + + <li>improve checks for rectangle operations, per DEC 070.</li> + + <li>improve check for missing characters in bitmap fonts, for a + case where the font is marked complete but its range does not + include non-Latin1 codes (prompted by discussion with Craig + Leres).</li> + + <li>correct upper-limit in check for missing characters, from + <a href="#xterm_393">patch #393</a> changes (report/patch by + Matthew Martin).</li> + + <li>fix for <tt>-report-fonts</tt> option when the font's first + character position is nonzero (prompted by discussion with + Craig Leres).</li> + + <li>add null-pointer check for a Heisenbug (Debian + #1078255).</li> + </ul> + <h1><a name="xterm_393" id="xterm_393">Patch #393 - 2024/07/11</a></h1> diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man index 15b07fe5e..07d6d7309 100644 --- a/app/xterm/xterm.man +++ b/app/xterm/xterm.man @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.904 2024/06/28 23:56:28 tom Exp $ +.\" $XTermId: xterm.man,v 1.908 2024/09/30 07:57:01 tom Exp $ .\" .\" Copyright 1996-2023,2024 by Thomas E. Dickey .\" @@ -1017,6 +1017,26 @@ This option specifies the number of characters from the right end of a line at which the margin bell, if enabled, will ring. The default is \*(``10\*(''. .TP 8 +.B "\-nomap" +This option disables the initial \fImapping\fP of the terminal window. +Mapping an X window makes it visible if it is \fImanaged\fP. +The default is \*(``false\*('' because \fI\*n\fP's window +is normally displayed on startup. +.IP +After startup, an unmapped \fI\*n\fP window can be mapped +by identifying its window-id, e.g., using \fBxwininfo\fP(1) +or \fBxlsclients\fP(1), +and then employing another program such as \fBxdotool\fP(1) +to ask the window manager to make it visible. +.IP +If the \fI\*n\fP window is visible (i.e., mapped), +\fI\*n\fP's menus and actions (i.e., \fBset\-visibility\fP) +allow one to select whether the VT100 or Tek4014 windows should be displayed. +.TP 8 +.B "+nomap" +This option enables the initial \fImapping\fP of the terminal window. +This is the default behavior. +.TP 8 .B "\-nul" This option disables the display of underlining. .TP 8 @@ -1279,11 +1299,11 @@ when your operating system does not support locale. This option resets the \fButf8\fP resource. .TP 8 .B "\-uc" -This option, corresponding to the \fBcursorUnderline\fP resource, +This option, corresponding to the \fBcursorUnderLine\fP resource, makes the cursor underlined instead of a box. .TP 8 .B "+uc" -This option m, corresponding to the \fBcursorUnderline\fP resource, +This option m, corresponding to the \fBcursorUnderLine\fP resource, akes the cursor a box instead of underlined. .TP 8 .B "\-ulc" @@ -1595,7 +1615,7 @@ First, \fI\*n\fP obtains the initial \fIerase\fP character: .bP \fI\*n\fP's internal value is ^H .bP -\fI\*n\fP asks the operating system for the value which \fBstty\fP shows +\fI\*n\fP asks the operating system for the value which \fBstty\fP(1) shows .bP the \fBttyModes\fP resource may override \fIerase\fP .bP @@ -2768,7 +2788,7 @@ You may have to set this option to \*(``true\*('' if you have some old East Asian terminal based programs that assume that line-drawing characters have a column width of 2. If this resource is false, the \fBmkWidth\fP resource controls the -choice between the system's \fBwcwidth\fP and \fI\*n\fP's built-in tables. +choice between the system's \fBwcwidth\fP(3) and \fI\*n\fP's built-in tables. The default is \*(``false\*(''. .TP 8 .B "color0\fP (class\fB Color0\fP)" @@ -2983,7 +3003,7 @@ The default is \*(``false\*(''. .TP 8 .B "cursorBar\fP (class\fB CursorBar\fP)" Specifies whether to make the cursor a left-bar or a box, -unless the \fBcursorUnderline\fP resource is set. +unless the \fBcursorUnderLine\fP resource is set. The default is \*(``false\*(''. .TP 8 .B "cursorBlink\fP (class\fB CursorBlink\fP)" @@ -3985,7 +4005,7 @@ the cursor position and the time/date: .IP If a \*(``%\*('' marker does not match any of the three special tokens used in the default resource setting, -\fI\*n\fP uses \fBstrftime\fP to interpret it. +\fI\*n\fP uses \fBstrftime\fP(3) to interpret it. .TP 8 .B "initialFont\fP (class\fB InitialFont\fP)" Specifies which of the VT100 fonts to use initially. @@ -4085,7 +4105,7 @@ The default is \*(``1024\*(''. The minimum value is \*(``256\*(''. .TP 8 .B "locale\fP (class\fB Locale\fP)" -Specifies how to use \fIluit\fR, an encoding converter between UTF-8 +Specifies how to use \fBluit\fR(1), an encoding converter between UTF-8 and locale encodings. The resource value (ignoring case) may be: .RS @@ -5960,7 +5980,7 @@ This entry invokes the \fBset\-utf8\-title(\fIs\fB)\fR action. This entry invokes the \fBallow\-color\-ops(\fItoggle\fB)\fR action. .TP 8 .B "allow\-font\-ops\fP (class\fB SmeBSB\fP)" -This entry invokes the \fBallow\-fonts\-ops(\fItoggle\fB)\fR action. +This entry invokes the \fBallow\-font\-ops(\fItoggle\fB)\fR action. .TP 8 .B "allow\-tcap\-ops\fP (class\fB SmeBSB\fP)" This entry invokes the \fBallow\-tcap\-ops(\fItoggle\fB)\fR action. @@ -6894,7 +6914,7 @@ Reset origin mode (DECOM). .bP Reset all margins (i.e., top/bottom and left/right). This can be convenient when some program has left the scroll regions -set incorrectly (often a problem when using VMS or TOPS-20). +set incorrectly. .bP Set autowrap and reverse wrapping according to the resource values .BR autoWrap " and" @@ -7421,7 +7441,7 @@ This action sets, unsets or toggles the \fBallowFontOps\fP resource and is also invoked by the \fBallow\-font\-ops\fP entry in \fIfontMenu\fP. .TP 8 .B "allow\-mouse\-ops(\fIon/off/toggle\fP)" -This action sets, unsets or toggles the \fBallowMousepOps\fP resource +This action sets, unsets or toggles the \fBallowMouseOps\fP resource and is also invoked by the \fBallow\-mouse\-ops\fP entry in \fIfontMenu\fP. .TP 8 .B "allow\-send\-events(\fIon/off/toggle\fP)" @@ -8487,7 +8507,7 @@ the shell to interpret the string \*(``\\e\*('' as the \fIescape\fP character and to suppress a trailing newline on output. Those are not portable, nor recommended. -Instead, use \fBprintf\fP (POSIX). +Instead, use \fBprintf\fP(1) (POSIX). .PP For example, to set the \fIwindow title\fP to \*(``Hello world!\*('', you could use one of these commands in a script: @@ -8498,7 +8518,7 @@ printf \*'\\033]2;%s\\033\\\\\*' "Hello world!" printf \*'\\033]2;%s\\007\*' "Hello world!" .NE .PP -The \fBprintf\fP command interprets the octal value \*(``\\033\*('' for +The \fBprintf\fP(1) command interprets the octal value \*(``\\033\*('' for \fIescape\fP, and (since it was not given in the format) omits a trailing newline from the output. .PP @@ -8612,7 +8632,7 @@ to convert a terminal capability with its parameters into a string that can be written to the terminal. .bP Shells lacking a comparable feature (such as \fBbash\fP) can always -use the program \fBtput\fP to do this transformation. +use the program \fBtput\fP(1) to do this transformation. .PP Hard-coded escape sequences are supported by each shell, but are not recommended because those rely upon particular configurations diff --git a/app/xterm/xterm_axp.opt b/app/xterm/xterm_axp.opt deleted file mode 100644 index 53dab4eb3..000000000 --- a/app/xterm/xterm_axp.opt +++ /dev/null @@ -1,28 +0,0 @@ -BUTTON.OBJ -CHARPROC.OBJ -CHARSETS.OBJ -CURSOR.OBJ -DATA.OBJ -DOUBLECHR.OBJ -FONTUTILS.OBJ -INPUT.OBJ -KEYSYM2UCS.OBJ -MAIN.OBJ -MENU.OBJ -MISC.OBJ -PRINT.OBJ -PTYDATA.OBJ -SCREEN.OBJ -SCROLLBAR.OBJ -TABS.OBJ -TEKPROC.OBJ -TEKPRSTBL.OBJ -TRACE.OBJ -TTYSVR.OBJ -UTIL.OBJ -VMS.OBJ -VTPRSTBL.OBJ -XAW3DLIB.OLB/LIB -XMULIB.OLB/LIB -SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE -SYS$SHARE:DECW$XLIBSHR.EXE/SHARE diff --git a/app/xterm/xterm_io.h b/app/xterm/xterm_io.h index ebdc8ca23..bf7014bee 100644 --- a/app/xterm/xterm_io.h +++ b/app/xterm/xterm_io.h @@ -1,4 +1,4 @@ -/* $XTermId: xterm_io.h,v 1.69 2024/05/03 23:32:26 tom Exp $ */ +/* $XTermId: xterm_io.h,v 1.71 2024/09/30 08:03:20 tom Exp $ */ /* * Copyright 2000-2023,2024 by Thomas E. Dickey @@ -103,11 +103,6 @@ #define USE_POSIX_TERMIOS /* GNU/KFreeBSD and GNU/KNetBSD */ #endif -#ifdef __MVS__ -#define SVR4 -#define USE_POSIX_TERMIOS -#endif - #ifdef __QNX__ #define USE_POSIX_TERMIOS #endif @@ -168,8 +163,6 @@ # endif #elif defined(SYSV) || defined(ISC) # include <sys/termio.h> -#elif !defined(VMS) -# include <sgtty.h> #endif /* USE_POSIX_TERMIOS */ /* @@ -203,7 +196,7 @@ #ifdef Lynx #include <resource.h> -#elif !(defined(SYSV) || defined(__linux__) || defined(VMS) || (defined(__QNX__)&&!defined(__QNXNTO__))) +#elif !(defined(SYSV) || defined(__linux__) || (defined(__QNX__)&&!defined(__QNXNTO__))) #include <sys/resource.h> #endif @@ -212,7 +205,7 @@ #undef FIONCLEX #endif /* macII */ -#if defined(__QNX__) || defined(__GNU__) || defined(__MVS__) || defined(__osf__) +#if defined(__QNX__) || defined(__GNU__) || defined(__osf__) #undef TIOCSLTC /* <sgtty.h> conflicts with <termios.h> */ #undef TIOCSLTC #endif @@ -225,7 +218,7 @@ #include <sys/filio.h> #endif -#if defined(TIOCSLTC) && ! (defined(__linux__) || defined(__MVS__) || defined(Lynx) || defined(SVR4)) +#if defined(TIOCSLTC) && ! (defined(__linux__) || defined(Lynx) || defined(SVR4)) #define HAS_LTCHARS #endif diff --git a/app/xterm/xtermcap.c b/app/xterm/xtermcap.c index 9cae2e7a4..39ea3d593 100644 --- a/app/xterm/xtermcap.c +++ b/app/xterm/xtermcap.c @@ -1,7 +1,7 @@ -/* $XTermId: xtermcap.c,v 1.59 2023/12/25 21:18:03 tom Exp $ */ +/* $XTermId: xtermcap.c,v 1.62 2024/10/23 21:14:15 tom Exp $ */ /* - * Copyright 2007-2020,2023 by Thomas E. Dickey + * Copyright 2007-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -36,10 +36,6 @@ #include <X11/keysym.h> #include <ctype.h> -#ifdef VMS -#include <X11/keysymdef.h> -#endif - #include <xstrings.h> #if USE_TERMINFO && defined(NCURSES_VERSION) && defined(HAVE_USE_EXTENDED_NAMES) @@ -544,6 +540,7 @@ get_tcap_buffer(XtermWidget xw) /* * Retrieve the erase-key, for initialization in main program. */ +#if OPT_INITIAL_ERASE char * get_tcap_erase(XtermWidget xw) { @@ -565,6 +562,7 @@ get_tcap_erase(XtermWidget xw) fkey = x_strdup(fkey); return fkey; } +#endif /* OPT_INITIAL_ERASE */ /* * A legal termcap (or terminfo) name consists solely of graphic characters, |