Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xterm for openSUSE:Factory checked in at 2024-07-15 19:45:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xterm (Old) and /work/SRC/openSUSE:Factory/.xterm.new.17339 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xterm" Mon Jul 15 19:45:50 2024 rev:146 rq:1187223 version:393 Changes: -------- --- /work/SRC/openSUSE:Factory/xterm/xterm.changes 2024-07-03 20:29:54.392200398 +0200 +++ /work/SRC/openSUSE:Factory/.xterm.new.17339/xterm.changes 2024-07-15 19:45:56.172315641 +0200 @@ -1,0 +2,15 @@ +Fri Jul 12 16:03:25 UTC 2024 - Andreas Stieger <andreas.stie...@gmx.de> + +- update to 393: + * add a check for ANSI SC/RC, to ignore CSI parameters. + * improve check for missing characters for bitmap-fonts + * fix regression in error-recovery for SGR parameters + * change default for --enable-imake configure option + * fixes for wcwidth + * 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 + * fix some documentation typos + +------------------------------------------------------------------- Old: ---- xterm-392.tgz xterm-392.tgz.asc New: ---- xterm-393.tgz xterm-393.tgz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xterm.spec ++++++ --- /var/tmp/diff_new_pack.rvxafL/_old 2024-07-15 19:45:57.120350377 +0200 +++ /var/tmp/diff_new_pack.rvxafL/_new 2024-07-15 19:45:57.120350377 +0200 @@ -2,6 +2,7 @@ # spec file for package xterm # # Copyright (c) 2024 SUSE LLC +# Copyright (c) 2024 Andreas Stieger <andreas.stie...@gmx.de> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +19,7 @@ %define splitbin 0%{?suse_version} >= 1300 Name: xterm -Version: 392 +Version: 393 Release: 0 Summary: The basic X terminal program License: MIT ++++++ xterm-392.tgz -> xterm-393.tgz ++++++ ++++ 15631 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/INSTALL new/xterm-393/INSTALL --- old/xterm-392/INSTALL 2023-11-23 13:23:06.000000000 +0100 +++ new/xterm-393/INSTALL 2024-07-06 00:50:45.000000000 +0200 @@ -1,6 +1,6 @@ --- $XTermId: INSTALL,v 1.194 2023/11/23 12:23:06 tom Exp $ +-- $XTermId: INSTALL,v 1.195 2024/07/05 22:50:45 tom Exp $ ------------------------------------------------------------------------------- --- Copyright 1997-2022,2023 by Thomas E. Dickey +-- Copyright 1997-2023,2024 by Thomas E. Dickey -- -- All Rights Reserved -- @@ -198,14 +198,6 @@ Do not compile-in code to handle multi-byte characters. This is related to, but not identical with the input method logic. - --disable-imake disable use of imake for definitions - - Do not attempt to use imake to determine compiler options. - - The main.c file has many ifdef's which rely on obscure combinations - known only to imake. The configure script implements only a - portion of the tests needed to supplant imake. - --disable-initial-erase disable setup for stty erase Do not compile-in code which aligns the stty erase and the backarrow @@ -483,6 +475,14 @@ Compile-in code to support HP-style function keys. + --enable-imake enable use of imake for definitions + + Attempt to use imake to determine compiler options. + + The main.c file has many ifdef's which rely on obscure combinations + known only to imake. The configure script implements only a + portion of the tests needed to supplant imake. + --enable-load-vt-fonts enable load-vt-fonts() action Compile-in code that allows user to define load different VT-font @@ -522,12 +522,12 @@ with the X.org "modular" build, whose compiler options are unrelated to imake or older versions of any libraries that it may distribute. In this case, the configure script needs some help. Use this option to - enable or disable NARROW proto (and disable imake with the - --disable-imake option) to match the whims of X.org hackers. + enable or disable NARROW proto (and do not enable imake with the + --enable-imake option) to match the whims of X.org hackers. For instance - configure --disable-imake --disable-narrowproto + configure --disable-narrowproto --enable-pty-erase set default ptyInitialErase resource (default: false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/MANIFEST new/xterm-393/MANIFEST --- old/xterm-392/MANIFEST 2024-05-15 22:52:03.000000000 +0200 +++ new/xterm-393/MANIFEST 2024-07-12 01:41:52.000000000 +0200 @@ -1,4 +1,4 @@ -MANIFEST for xterm, version xterm-392 +MANIFEST for xterm, version xterm-393 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode @@ -150,6 +150,8 @@ icons/xterm_16x16.xpm normal icon 16x16 pixmap icons/xterm_32x32.xpm 32x32 monochrome icon icons/xterm_48x48.xpm 48x48 monochrome icon +package subdirectory +package/xterm.spec build-script package/debian subdirectory package/debian/changelog build-script package/debian/color.sed build-script @@ -159,14 +161,13 @@ package/debian/postinst post-install script for update-alternatives package/debian/prerm pre-remove script for update-alternatives package/debian/rules build-script -package/debian/source subdirectory -package/debian/source/format build-script -package/debian subdirectory package/debian/watch build-script package/debian/xterm-dev.docs build-script package/debian/xterm-dev.lintian-overrides ignore useless warnings from lintian package/debian/xterm-dev.menu Debian menu-file for xterm-dev package. package/debian/xterm-xres.sed build-script +package/debian/source subdirectory +package/debian/source/format build-script package/freebsd subdirectory package/freebsd/Makefile build-script package/freebsd/distinfo generated sums @@ -180,8 +181,6 @@ package/pkgsrc/PLIST build-script package/pkgsrc/distinfo build-script package/pkgsrc/options.mk build-script -package subdirectory -package/xterm.spec build-script tektests subdirectory tektests/aitest.tek tek4014 demo: draw a globe tektests/dmerc.tek tek4014 demo: draws a Mercator projection with orbit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/NEWS new/xterm-393/NEWS --- old/xterm-392/NEWS 2024-05-23 00:50:14.000000000 +0200 +++ new/xterm-393/NEWS 2024-07-12 01:37:57.000000000 +0200 @@ -1,19 +1,31 @@ The NEWS file was generated from xterm.log.html, which serves as the changelog for xterm. -------------------------------------------------------------------------------- - Patch #392 - 2024/05/22 + Patch #393 - 2024/07/11 - * improve input decoding for non-Latin1 character sets by preserving - the sense of GL/GR. - * add resource preferLatin1 to simplify UPSS configuration (Gentoo - #932154). - * build-fix for --disable-boxchars; patch #390 reuses that feature's - code to draw the part of the DEC Technical character set which has - no Unicode equivalent. - * modify #include of pty.h to work with musl (report by Khem Raj). - * improve definitions used in clock_gettime logic in - graphics_sixel.c, as well as updating comments (patch by Ben Wong). - * amend allowC1Printable changes from patch #391, restoring a special - case which caused C1 characters to be ignored (report/testcase by - Dmytro Bagrii). + * 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). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/charproc.c new/xterm-393/charproc.c --- old/xterm-392/charproc.c 2024-05-22 01:45:22.000000000 +0200 +++ new/xterm-393/charproc.c 2024-07-10 23:09:42.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.2021 2024/05/21 23:45:22 tom Exp $ */ +/* $XTermId: charproc.c,v 1.2032 2024/07/10 21:09:42 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -133,6 +133,7 @@ #include <charclass.h> #include <xstrings.h> #include <graphics.h> +#include <graphics_sixel.h> #ifdef NO_LEAKS #include <xtermcap.h> @@ -1723,7 +1724,12 @@ sp->print_used = 0; \ } \ -#define PARSE_SRM 1 +typedef enum { + sa_INIT + ,sa_LAST + ,sa_REGIS + ,sa_SIXEL +} StringArgs; struct ParseState { unsigned check_recur; @@ -1736,6 +1742,7 @@ int scssize; Bool private_function; /* distinguish private-mode from standard */ int string_mode; /* nonzero iff we're processing a string */ + StringArgs string_args; /* parse-state within string processing */ Bool string_skip; /* true if we will ignore the string */ int lastchar; /* positive iff we had a graphic character */ int nextstate; @@ -2192,6 +2199,12 @@ } static int +only_default(void) +{ + return (nparam <= 1) && (GetParam(0) == DEFAULT); +} + +static int zero_if_default(int which) { int result = (nparam > which) ? GetParam(which) : 0; @@ -2209,6 +2222,44 @@ return result; } +#define BeginString(mode) \ + do { \ + sp->string_mode = mode; \ + sp->string_args = sa_LAST; \ + sp->parsestate = sos_table; \ + } while (0) + +#define BeginString2(mode) \ + do { \ + sp->string_mode = mode; \ + sp->string_args = sa_INIT; \ + sp->parsestate = sos_table; \ + } while (0) + +static void +begin_sixel(XtermWidget xw, struct ParseState *sp) +{ + TScreen *screen = TScreenOf(xw); + + sp->string_args = sa_LAST; + if (optSixelGraphics(screen)) { +#if OPT_SIXEL_GRAPHICS + ANSI params; + const char *cp; + + cp = (const char *) sp->string_area; + sp->string_area[sp->string_used] = '\0'; + parse_ansi_params(¶ms, &cp); + parse_sixel_init(xw, ¶ms); + sp->string_args = sa_SIXEL; + sp->string_used = 0; +#else + (void) screen; + TRACE(("ignoring sixel graphic (compilation flag not enabled)\n")); +#endif + } +} + /* * Color palette changes using the OSC controls require a repaint of the * screen - but not immediately. Do the repaint as soon as we detect a @@ -3179,11 +3230,36 @@ } /* - * Accumulate string for APC, DCS, PM, OSC, SOS controls - * This should always be 8-bit characters. + * Accumulate string for DCS, OSC controls + * The string content should always be 8-bit characters. + * + * APC, PM and SOS are ignored; xterm currently does not use those. */ if (sp->parsestate == sos_table) { - if (sp->string_skip) { +#if OPT_WIDE_CHARS + /* + * We cannot display codes above 255, but let's try to + * accommodate the application a little by not aborting the + * string. + */ + if ((c & WIDEST_ICHAR) > 255) { + sp->nextstate = CASE_PRINT; + c = BAD_ASCII; + } +#endif + if (sp->string_mode == ANSI_APC || + sp->string_mode == ANSI_PM || + sp->string_mode == ANSI_SOS) { + /* EMPTY */ + } +#if OPT_SIXEL_GRAPHICS + else if (sp->string_args == sa_SIXEL) { + /* avoid adding the string-terminator */ + if (sos_table[CharOf(c)] == CASE_IGNORE) + parse_sixel_char((char) c); + } +#endif + else if (sp->string_skip) { sp->string_used++; } else if (sp->string_used > screen->strings_max) { sp->string_skip = True; @@ -3198,18 +3274,38 @@ continue; } SafeFree(sp->string_area, sp->string_size); -#if OPT_WIDE_CHARS /* - * We cannot display codes above 255, but let's try to - * accommodate the application a little by not aborting the - * string. + * ReGIS and SIXEL data can be detected by skipping over (only) + * parameters to the first non-parameter character and + * inspecting it. Since both are DCS, we can also ignore OSC. */ - if ((c & WIDEST_ICHAR) > 255) { - sp->nextstate = CASE_PRINT; - c = BAD_ASCII; - } -#endif sp->string_area[(sp->string_used)++] = CharOf(c); + if (sp->string_args < sa_LAST) { + switch (c) { + case ':': + case ';': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + break; + case 'p': + sp->string_args = sa_REGIS; + break; + case 'q': + begin_sixel(xw, sp); + break; + default: + sp->string_args = sa_LAST; + break; + } + } } } else if (sp->parsestate != esc_table) { /* if we were accumulating, we're not any more */ @@ -3951,7 +4047,7 @@ default: TRACE(("...unexpected subparameter in SGR\n")); item += skip; /* ignore this */ - op = NPARAM; /* will never use this, anyway */ + op = 9999; /* will never use this, anyway */ break; } } @@ -4504,7 +4600,7 @@ set_lr_margins(screen, left - 1, right - 1); CursorSet(screen, 0, 0, xw->flags); } - } else { + } else if (only_default()) { TRACE(("CASE_ANSI_SC - save cursor\n")); CursorSave(xw); } @@ -4518,6 +4614,8 @@ break; case CASE_ANSI_RC: + if (!only_default()) + break; /* FALLTHRU */ case CASE_DECRC: TRACE(("CASE_%sRC - restore cursor\n", @@ -4893,7 +4991,7 @@ (unsigned long) sp->string_used, sp->string_mode)); ResetState(sp); - if (!sp->string_used) + if (!sp->string_used && !sp->string_args) break; if (sp->string_skip) { xtermWarning("Ignoring too-long string (%lu) for mode %#02x\n", @@ -4902,14 +5000,21 @@ sp->string_skip = False; sp->string_used = 0; } else { - sp->string_area[--(sp->string_used)] = '\0'; + if (sp->string_used) + sp->string_area[--(sp->string_used)] = '\0'; if (sp->check_recur <= 1) { switch (sp->string_mode) { case ANSI_APC: /* ignored */ break; case ANSI_DCS: - do_dcs(xw, sp->string_area, sp->string_used); +#if OPT_SIXEL_GRAPHICS + if (sp->string_args == sa_SIXEL) { + parse_sixel_finished(); + TRACE(("DONE parsed sixel data\n")); + } else +#endif + do_dcs(xw, sp->string_area, sp->string_used); break; case ANSI_OSC: do_osc(xw, sp->string_area, sp->string_used, ANSI_ST); @@ -4931,8 +5036,7 @@ case CASE_SOS: TRACE(("CASE_SOS: Start of String\n")); if (ParseSOS(screen)) { - sp->string_mode = ANSI_SOS; - sp->parsestate = sos_table; + BeginString(ANSI_SOS); } else { illegal_parse(xw, c, sp); } @@ -4941,8 +5045,7 @@ case CASE_PM: TRACE(("CASE_PM: Privacy Message\n")); if (ParseSOS(screen)) { - sp->string_mode = ANSI_PM; - sp->parsestate = sos_table; + BeginString(ANSI_PM); } else { illegal_parse(xw, c, sp); } @@ -4950,15 +5053,13 @@ case CASE_DCS: TRACE(("CASE_DCS: Device Control String\n")); - sp->string_mode = ANSI_DCS; - sp->parsestate = sos_table; + BeginString2(ANSI_DCS); break; case CASE_APC: TRACE(("CASE_APC: Application Program Command\n")); if (ParseSOS(screen)) { - sp->string_mode = ANSI_APC; - sp->parsestate = sos_table; + BeginString(ANSI_APC); } else { illegal_parse(xw, c, sp); } @@ -5733,8 +5834,7 @@ case CASE_OSC: TRACE(("CASE_OSC: Operating System Command\n")); - sp->parsestate = sos_table; - sp->string_mode = ANSI_OSC; + BeginString(ANSI_OSC); break; case CASE_RIS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/ctlseqs.ms new/xterm-393/ctlseqs.ms --- old/xterm-392/ctlseqs.ms 2024-05-22 10:18:51.000000000 +0200 +++ new/xterm-393/ctlseqs.ms 2024-05-25 18:43:09.000000000 +0200 @@ -1,6 +1,6 @@ .\"#! troff -ms $1 -*- Nroff -*- .\" "XTerm Control Sequences" document -.\" $XTermId: ctlseqs.ms,v 1.716 2024/05/22 08:18:51 tom Exp $ +.\" $XTermId: ctlseqs.ms,v 1.717 2024/05/25 16:43:09 tom Exp $ .\" .\" .\" Copyright 1996-2023,2024 by Thomas E. Dickey @@ -70,7 +70,7 @@ .ds XT XTerm .ds xt xterm .ds LF Patch #392 -.ds RF 2024/05/22 +.ds RF 2024/05/25 .\" .if n .pl 9999v \" no page breaks in nroff .ND @@ -1939,8 +1939,8 @@ .iP \*(Ps = \*5\*5 \(-> Report Locator status. The response is -\*(Cs\*?\*5\*3\*n Locator available, if compiled-in, or -\*(Cs\*?\*5\*0\*n No Locator, if not. +\*(Cs\*?\*5\*0\*n Locator available, if compiled-in, or +\*(Cs\*?\*5\*3\*n No Locator, if not. \*(Ps = \*5\*6 \(-> Report Locator type. The response is \*(Cs\*?\*5\*7\*;\*1\*n Mouse, if compiled-in, or @@ -2295,7 +2295,7 @@ .br Response is .br - \*(Cs\*(Ph\*;\*(Pw\*;\*(Pc\*;\*(Pr\*;\*(Pp\*s\*(Dq\*v + \*(Cs\*(Ph\*;\*(Pw\*;\*(Pc\*;\*(Pr\*;\*(Pp\*s\*(Dq\*w .br where \*(Ph is the number of lines of the current page diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/ctlseqs.txt new/xterm-393/ctlseqs.txt --- old/xterm-392/ctlseqs.txt 2024-05-22 10:21:53.000000000 +0200 +++ new/xterm-393/ctlseqs.txt 2024-05-25 18:43:09.000000000 +0200 @@ -21,7 +21,7 @@ Thomas Dickey XFree86 Project (1996-2006) invisible-island.net (2006-2024) - updated for XTerm Patch #392 (2024/05/22) + updated for XTerm Patch #392 (2024/05/25) @@ -1308,7 +1308,7 @@ and VT400 & up (LK01) respectively. Ps = 5 5 -> Report Locator status. The response is CSI ? 5 - 3 n Locator available, if compiled-in, or CSI ? 5 0 n No + 0 n Locator available, if compiled-in, or CSI ? 5 3 n No Locator, if not. Ps = 5 6 -> Report Locator type. The response is CSI ? 5 7 ; 1 n Mouse, if compiled-in, or CSI ? 5 7 ; 0 n Cannot @@ -1595,7 +1595,7 @@ CSI " v Request Displayed Extent (DECRQDE), VT340, VT420. Response is - CSI Ph; Pw; Pc; Pr; Pp " v + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/fontutils.c new/xterm-393/fontutils.c --- old/xterm-392/fontutils.c 2024-05-17 21:54:51.000000000 +0200 +++ new/xterm-393/fontutils.c 2024-07-10 17:48:26.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.782 2024/05/17 19:54:51 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.783 2024/07/10 15:48:26 tom Exp $ */ /* * Copyright 1998-2023,2024 by Thomas E. Dickey @@ -1203,6 +1203,81 @@ } static void +fillXCharStruct(XCharStruct * cs, short value) +{ + cs->lbearing = value; + cs->rbearing = value; + cs->width = value; + cs->ascent = value; + cs->descent = value; +} + +/* if the per-character data differs from the summary, that is a problem */ +static void +compareXCharStruct(const char *tag, XCharStruct * actual, XCharStruct * expect) +{ +#define CompareXCharStruct(field) \ + if (actual->field != expect->field) \ + ReportFonts("\t\t%s %s differs: %d\n", tag, #field, actual->field) + CompareXCharStruct(lbearing); + CompareXCharStruct(rbearing); + CompareXCharStruct(width); + CompareXCharStruct(ascent); + CompareXCharStruct(descent); +} + +static void +reportXPerChar(XFontStruct *fs) +{ + XCharStruct *cs = fs->per_char; + + if (cs != NULL) { + XCharStruct min_bounds; + XCharStruct max_bounds; + int valid = 0; + int total = 0; + unsigned first_char = 0; + unsigned last_char = 0; + unsigned ch; + + if (fs->max_byte1 == 0) { + first_char = fs->min_char_or_byte2; + last_char = fs->max_char_or_byte2; + } else { + first_char = (fs->min_byte1 * 256) + fs->min_char_or_byte2; + last_char = (fs->max_byte1 * 256) + fs->max_char_or_byte2; + } + + fillXCharStruct(&max_bounds, -32768); + fillXCharStruct(&min_bounds, 32767); + for (ch = first_char; ch < last_char; ++ch) { + XCharStruct *item = cs + ch; + ++total; + if (!CI_NONEXISTCHAR(item)) { + ++valid; +#define MIN_BOUNDS(field) min_bounds.field = Min(min_bounds.field, item->field) + MIN_BOUNDS(lbearing); + MIN_BOUNDS(rbearing); + MIN_BOUNDS(width); + MIN_BOUNDS(ascent); + MIN_BOUNDS(descent); +#define MAX_BOUNDS(field) max_bounds.field = Max(max_bounds.field, item->field) + MAX_BOUNDS(lbearing); + MAX_BOUNDS(rbearing); + MAX_BOUNDS(width); + MAX_BOUNDS(ascent); + MAX_BOUNDS(descent); + } + } + ReportFonts("\t\tPer-character: %d/%d\n", valid, total); + compareXCharStruct("Max", &max_bounds, &(fs->max_bounds)); + compareXCharStruct("Min", &min_bounds, &(fs->min_bounds)); + } else { + ReportFonts("\t\tPer-character: none\n"); + } +} + +static void reportOneVTFont(const char *tag, XTermFonts * fnt) { @@ -1249,7 +1324,8 @@ ReportFonts("\t\tproperties: %d\n", fs->n_properties); reportXCharStruct("min_bounds", &(fs->min_bounds)); reportXCharStruct("max_bounds", &(fs->max_bounds)); - /* TODO: report fs->properties and fs->per_char */ + reportXPerChar(fs); + /* TODO: report fs->properties */ } } @@ -1265,11 +1341,12 @@ ReportFonts("Loaded VTFonts(default)\n"); } - reportOneVTFont("fNorm", GetNormalFont(screen, fNorm)); - reportOneVTFont("fBold", GetNormalFont(screen, fBold)); +#define ReportOneVTFont(name) reportOneVTFont(#name, screen->fnts + name) + ReportOneVTFont(fNorm); + ReportOneVTFont(fBold); #if OPT_WIDE_CHARS - reportOneVTFont("fWide", GetNormalFont(screen, fWide)); - reportOneVTFont("fWBold", GetNormalFont(screen, fWBold)); + ReportOneVTFont(fWide); + ReportOneVTFont(fWBold); #endif } } @@ -4101,7 +4178,7 @@ int which = (params->attr_flags & BOLD) ? fBold : fNorm; unsigned n; for (n = 1; n < 32; n++) { - if (xtermMissingChar(n, getNormalFont(screen, which))) + if (xtermMissingChar(n, XTermFontsRef(screen->fnts, which))) continue; if (dec2ucs(screen, n) != ch) continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/fontutils.h new/xterm-393/fontutils.h --- old/xterm-392/fontutils.h 2024-05-17 21:55:52.000000000 +0200 +++ new/xterm-393/fontutils.h 2024-07-11 10:16:39.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.h,v 1.145 2024/05/17 19:55:52 tom Exp $ */ +/* $XTermId: fontutils.h,v 1.147 2024/07/11 08:16:39 tom Exp $ */ /* * Copyright 1998-2022,2024 by Thomas E. Dickey @@ -130,6 +130,14 @@ extern void xtermDrawBoxChar (XTermDraw * /* params */, unsigned /* ch */, GC /* gc */, int /* x */, int /* y */, int /* cols */, Bool /* xftords */); #if OPT_BOX_CHARS || OPT_REPORT_FONTS +#define XTermFontsRef(fontList, which) \ + (((which) != fNorm && \ + ((fontList)[(which)].fs == NULL || \ + (fontList)[(which)].fs->per_char == NULL) && \ + ((fontList)[fNorm].fs != NULL && \ + (fontList)[fNorm].fs->per_char != NULL)) \ + ? &((fontList)[fNorm]) \ + : &((fontList)[(which)])) extern Bool xtermMissingChar (unsigned /* ch */, XTermFonts */* font */); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/graphics_sixel.c new/xterm-393/graphics_sixel.c --- old/xterm-392/graphics_sixel.c 2024-05-16 22:03:50.000000000 +0200 +++ new/xterm-393/graphics_sixel.c 2024-07-01 23:19:30.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: graphics_sixel.c,v 1.57 2024/05/16 20:03:50 tom Exp $ */ +/* $XTermId: graphics_sixel.c,v 1.62 2024/07/01 21:19:30 tom Exp $ */ /* * Copyright 2014-2023,2024 by Thomas E. Dickey @@ -272,18 +272,18 @@ #endif } -static int -finished_parsing(XtermWidget xw, Graphic *graphic) +static void +finished_parsing(Graphic *graphic) { - TScreen *screen = TScreenOf(xw); + TScreen *screen = TScreenOf(s_xw); /* Update the screen scrolling and do a refresh. * The refresh may not cover the whole graphic. */ if (screen->scroll_amt) - FlushScroll(xw); + FlushScroll(s_xw); - if (SixelScrolling(xw)) { + if (SixelScrolling(s_xw)) { int new_row, new_col; /* Note: XTerm follows the VT340 behavior in text cursor placement @@ -327,7 +327,7 @@ } while (new_row > screen->bot_marg) { - xtermScroll(xw, 1); + xtermScroll(s_xw, 1); new_row--; TRACE(("bottom row was past screen. new start row=%d, cursor row=%d\n", graphic->charrow, new_row)); @@ -344,16 +344,15 @@ } graphic->dirty = True; - refresh_modified_displayed_graphics(xw); + refresh_modified_displayed_graphics(s_xw); dump_graphic(graphic); - return 0; } /* * Handle Sixel protocol selector: Ps1 ; Ps2 ; Ps3 q * Refer to EK-PPLV2-PM, Table 5-1 "Macro Parameter Selections" */ -int +void parse_sixel_init(XtermWidget xw, ANSI *params) { s_xw = xw; @@ -455,8 +454,6 @@ } update_sixel_aspect(&s_context, s_graphic); - - return 0; } #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) @@ -537,7 +534,7 @@ s_prev_col = dirty_col; } -int +void parse_sixel_char(char cp) { /* s_* variables are static state, defined above */ @@ -546,9 +543,9 @@ if (s_repeating && cp == '\0') { TRACE(("DATA_ERROR: sixel data string terminated in the middle of a repeat operator\n")); s_repeating = False; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); } - return 0; + return; } if (isdigit(cp)) { @@ -556,7 +553,7 @@ s_accumulator = 0; s_accumulator *= 10; s_accumulator += cp - '0'; - return 0; + return; } if (s_repeating) { /* '!' ... */ @@ -580,7 +577,6 @@ set_sixel(s_graphic, &s_context, sixel)) { s_context.col++; } else { - s_context.col = 0; break; } } @@ -596,7 +592,7 @@ s_repeating = False; if (s_screen->incremental_graphics) parse_sixel_incremental_display(); - return 0; + return; } /* FIXME: Raster attributes (") can occur repeatedly and at any time. */ @@ -633,7 +629,8 @@ TRACE(("DATA_ERROR: raster " #field " %d > max %d\n", \ s_raster_params[state], s_graphic->max_ ## field)); \ s_raster_state = s_NOTRASTER; \ - return finished_parsing(s_xw, s_graphic); \ + finished_parsing(s_graphic); \ + return; \ } \ s_context.declared_ ## field = s_raster_params[state]; \ break @@ -649,7 +646,8 @@ TRACE(("DATA_ERROR: raster operator ('\"') with too many parameters (%d)\n, next char %c (%d)\n", s_raster_state, cp, cp)); s_raster_state = s_NOTRASTER; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } /* Save data from Raster Attributes */ @@ -664,7 +662,7 @@ s_raster_state++; if (cp == ';') { - return 0; + return; } /* cp (next character to consume) is not digit, space, or semicolon, so finish up with raster */ @@ -692,7 +690,8 @@ /* FIXME: What does VT340 do with default register? */ TRACE(("DATA_ERROR: sixel data string uses default color register, next char %c (%d)\n", cp, cp)); - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } s_Pregister = (RegisterNum) s_color_params[s_GETTINGREGISTER]; /* The DEC terminals wrapped register indices. */ @@ -705,7 +704,8 @@ /* FIXME: Default VT340 colorspace is HSL, right? */ TRACE(("DATA_ERROR: sixel data string uses default colorspace \n")); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } break; case s_GETTINGPC1: @@ -713,7 +713,8 @@ /* FIXME: Does VT340 sixel do the same as ReGIS and use the previous value for unspecified color components? */ TRACE(("DATA_ERROR: sixel data string uses default color component 1 \n")); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } break; case s_GETTINGPC2: @@ -721,7 +722,8 @@ /* FIXME: unspecified color components? */ TRACE(("DATA_ERROR: sixel data string uses default color component 2 \n")); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } break; case s_GETTINGPC3: @@ -729,7 +731,8 @@ /* FIXME: unspecified color components? */ TRACE(("DATA_ERROR: sixel data string uses default color component 3 \n")); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } break; case s_COLORINGDONE: @@ -741,20 +744,22 @@ TRACE(("DATA_ERROR: sixel switch color operator ('#') with too many parameters\n, next char %c (%d)\n", cp, cp)); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } s_accumulator = -1; s_color_state++; if (cp == ';') { - return 0; + return; } else { /* cp (next character to consume) is not digit, space, or semicolon, so finish up with color */ if (s_color_state != s_COLORINGDONE && s_color_state != s_GETTINGCOLORSPACE) { TRACE(("DATA_ERROR: sixel switch color operator with wrong number of parameters (%d)\n", s_color_state)); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } if (s_color_state == s_COLORINGDONE) { @@ -775,7 +780,8 @@ TRACE(("DATA_ERROR: sixel set color operator uses out-of-range HLS color coordinates %d,%d,%d\n", Pc1, Pc2, Pc3)); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } hls2rgb(Pc1, Pc2, Pc3, &r, &g, &b); break; @@ -784,7 +790,8 @@ TRACE(("DATA_ERROR: sixel set color operator uses out-of-range RGB color coordinates %d,%d,%d\n", Pc1, Pc2, Pc3)); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } r = (short) Pc1; g = (short) Pc2; @@ -793,7 +800,8 @@ default: /* unknown */ TRACE(("DATA_ERROR: sixel set color operator uses unknown color space %d\n", Pspace)); s_color_state = s_NOTCOLORING; - return finished_parsing(s_xw, s_graphic); + finished_parsing(s_graphic); + return; } update_color_register(s_graphic, s_Pregister, @@ -815,8 +823,7 @@ if (sixel) { if (!ValidColumn(s_graphic, &s_context) || !set_sixel(s_graphic, &s_context, sixel)) { - s_context.col = 0; - return 0; + return; } } s_context.col++; @@ -877,14 +884,11 @@ TRACE(("DATA_ERROR: skipping unknown sixel command %04x (%c)\n", (int) cp, cp)); } - - return 0; } -/* Just like finished_parsing, but called from do_dcs in misc.c */ -int -parse_sixel_finished(XtermWidget xw) +/* Just like finished_parsing, but called from charproc.c */ +void +parse_sixel_finished(void) { - /* FIXME: should use s_xw */ - return finished_parsing(xw, s_graphic); + finished_parsing(s_graphic); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/graphics_sixel.h new/xterm-393/graphics_sixel.h --- old/xterm-392/graphics_sixel.h 2024-05-05 22:42:14.000000000 +0200 +++ new/xterm-393/graphics_sixel.h 2024-07-01 23:19:14.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: graphics_sixel.h,v 1.5 2024/05/05 20:42:14 tom Exp $ */ +/* $XTermId: graphics_sixel.h,v 1.9 2024/07/01 21:19:14 tom Exp $ */ /* * Copyright 2014-2016,2024 by Thomas E. Dickey @@ -38,12 +38,9 @@ #include <ptyx.h> #if OPT_SIXEL_GRAPHICS -extern int parse_sixel(XtermWidget /* xw */, ANSI */* params */, char const */* string */); -extern int parse_sixel_init(XtermWidget /* xw */, ANSI * /* params */); -extern int parse_sixel_char(char /* cp */); -extern int parse_sixel_finished(XtermWidget /* xw */); -#else -#define parse_sixel(xw, params, string) /* nothing */ +extern void parse_sixel_init(XtermWidget /* xw */, ANSI * /* params */); +extern void parse_sixel_char(char /* cp */); +extern void parse_sixel_finished(void); #endif /* *INDENT-ON* */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/main.c new/xterm-393/main.c --- old/xterm-392/main.c 2024-05-22 22:11:43.000000000 +0200 +++ new/xterm-393/main.c 2024-07-09 10:03:49.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.921 2024/05/22 20:11:43 tom Exp $ */ +/* $XTermId: main.c,v 1.923 2024/07/09 08:03:49 tom Exp $ */ /* * Copyright 2002-2023,2024 by Thomas E. Dickey @@ -2905,7 +2905,7 @@ resource.title = x_strdup(my_class); for (n = 0; resource.title[n]; ++n) { if (isalpha(CharOf(resource.title[n]))) - resource.title[n] = (char) tolower(resource.title[n]); + resource.title[n] = (char) tolower(CharOf(resource.title[n])); } TRACE(("setting:\n\ttitle \"%s\"\n", resource.title)); XtSetArg(args[0], XtNtitle, resource.title); @@ -3877,6 +3877,7 @@ TRIM(0, WINDOW), /* screen */ TRIM(0, XCURSOR_PATH), KEEP(0, MC_XDG_OPEN), + KEEP(0, TERM_INGRES), TRIM(1, COLORFGBG), TRIM(1, COLORTERM), TRIM(1, GIO_LAUNCHED_), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/misc.c new/xterm-393/misc.c --- old/xterm-392/misc.c 2024-05-21 02:28:28.000000000 +0200 +++ new/xterm-393/misc.c 2024-06-26 10:05:39.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.1092 2024/05/21 00:28:28 tom Exp $ */ +/* $XTermId: misc.c,v 1.1094 2024/06/26 08:05:39 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -4458,7 +4458,7 @@ * Parse numeric parameters. Normally we use a state machine to simplify * interspersing with control characters, but have the string already. */ -static void +void parse_ansi_params(ANSI *params, const char **string) { const char *cp = *string; @@ -5272,7 +5272,6 @@ /* FALLTHRU */ default: if (optRegisGraphics(screen) || - optSixelGraphics(screen) || screen->vtXX_level >= 2) { /* VT220 */ parse_ansi_params(¶ms, &cp); switch (params.a_final) { @@ -5285,19 +5284,7 @@ TRACE(("ignoring ReGIS graphic (compilation flag not enabled)\n")); #endif break; - case 'q': /* sixel */ -#if OPT_SIXEL_GRAPHICS - if (optSixelGraphics(screen)) { - parse_sixel_init(xw, ¶ms); - while (*cp) { - parse_sixel_char(*cp++); - } - parse_sixel_finished(xw); - TRACE(("DONE parsed sixel data\n")); - } -#else - TRACE(("ignoring sixel graphic (compilation flag not enabled)\n")); -#endif + case 'q': /* sixel is done in charproc.c */ break; case '|': /* DECUDK */ if (screen->vtXX_level >= 2) { /* VT220 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/package/debian/changelog new/xterm-393/package/debian/changelog --- old/xterm-392/package/debian/changelog 2024-05-15 22:52:03.000000000 +0200 +++ new/xterm-393/package/debian/changelog 2024-05-25 15:03:00.000000000 +0200 @@ -1,3 +1,9 @@ +xterm-dev (393) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <dic...@invisible-island.net> Sat, 25 May 2024 09:03:00 -0400 + xterm-dev (392) unstable; urgency=low * maintenance updates diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/package/freebsd/Makefile new/xterm-393/package/freebsd/Makefile --- old/xterm-392/package/freebsd/Makefile 2024-05-15 22:52:03.000000000 +0200 +++ new/xterm-393/package/freebsd/Makefile 2024-05-25 15:03:00.000000000 +0200 @@ -1,4 +1,4 @@ -# $XTermId: Makefile,v 1.113 2024/05/15 20:52:03 tom Exp $ +# $XTermId: Makefile,v 1.114 2024/05/25 13:03:00 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= 392 +PORTVERSION= 393 CATEGORIES= x11 MASTER_SITES= ftp://ftp.invisible-island.net/xterm/:src1 \ https://invisible-mirror.net/archives/xterm/:src1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/package/pkgsrc/Makefile new/xterm-393/package/pkgsrc/Makefile --- old/xterm-392/package/pkgsrc/Makefile 2024-05-15 22:52:03.000000000 +0200 +++ new/xterm-393/package/pkgsrc/Makefile 2024-05-25 15:03:00.000000000 +0200 @@ -1,6 +1,6 @@ # $NetBSD: Makefile,v 1.117 2018/03/12 11:18:00 wiz Exp $ -DISTNAME= xterm-392 +DISTNAME= xterm-393 PKGREVISION= 1 CATEGORIES= x11 MASTER_SITES= ftp://ftp.invisible-island.net/xterm/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/package/xterm.spec new/xterm-393/package/xterm.spec --- old/xterm-392/package/xterm.spec 2024-05-15 22:52:03.000000000 +0200 +++ new/xterm-393/package/xterm.spec 2024-05-25 15:03:00.000000000 +0200 @@ -1,11 +1,11 @@ -# $XTermId: xterm.spec,v 1.171 2024/05/15 20:52:03 tom Exp $ +# $XTermId: xterm.spec,v 1.172 2024/05/25 13:03:00 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: 392 +Version: 393 Release: 1 License: X11 Group: User Interface/X diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/util.c new/xterm-393/util.c --- old/xterm-392/util.c 2024-05-18 02:18:02.000000000 +0200 +++ new/xterm-393/util.c 2024-07-10 22:22:19.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: util.c,v 1.948 2024/05/18 00:18:02 tom Exp $ */ +/* $XTermId: util.c,v 1.950 2024/07/10 20:22:19 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -3886,7 +3886,8 @@ XChar2b *buffer2 = BfBuf(XChar2b); VTwin *currentWin = WhichVWin(screen); XTermFonts *xf = getCgsFont(xw, currentWin, gc); - XTermFonts *fp = xf ? xf : getNormalFont(screen, fNorm); + XTermFonts *fn = getNormalFont(screen, fNorm); + XTermFonts *fp = xf ? xf : fn; for (src = dst = 0; src < (int) length; src++) { IChar ch = mapped[src]; @@ -3899,7 +3900,11 @@ #if OPT_WIDER_ICHAR (ch > NARROW_ICHAR) || #endif - xtermMissingChar(ch, fp)) { + xtermMissingChar(ch, + (((xf >= fn) && (xf - fn) <= fMAX) + ? XTermFontsRef(screen->fnts, + (VTFontEnum) (xf - fn)) + : fp))) { x = xtermPartString16(screen, flags, gc, x, y, dst); if (xtermIsDecTechnical(ch)) { xtermDrawBoxChar(params, ch, gc, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/version.h new/xterm-393/version.h --- old/xterm-392/version.h 2024-05-23 00:48:32.000000000 +0200 +++ new/xterm-393/version.h 2024-07-12 01:38:21.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.563 2024/05/22 22:48:32 tom Exp $ */ +/* $XTermId: version.h,v 1.565 2024/07/11 23:38:21 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 392 -#define XTERM_DATE 2024-05-22 +#define XTERM_PATCH 393 +#define XTERM_DATE 2024-07-11 #ifndef __vendorversion__ #define __vendorversion__ "XTerm" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/wcwidth.c new/xterm-393/wcwidth.c --- old/xterm-392/wcwidth.c 2023-10-15 23:20:12.000000000 +0200 +++ new/xterm-393/wcwidth.c 2024-07-06 02:45:04.000000000 +0200 @@ -1,9 +1,9 @@ -/* $XTermId: wcwidth.c,v 1.65 2023/10/15 21:20:12 tom Exp $ */ +/* $XTermId: wcwidth.c,v 1.73 2024/07/06 00:45:04 tom Exp $ */ /* $XFree86: xc/programs/xterm/wcwidth.c,v 1.9 2006/06/19 00:36:52 dickey Exp $ */ /* - * Copyright 2002-2022,2023 by Thomas E. Dickey + * Copyright 2002-2023,2024 by Thomas E. Dickey * * All Rights Reserved * @@ -115,16 +115,23 @@ *----------------------------------------------------------------------------- */ +#ifdef HAVE_CONFIG_H +#include <xtermcfg.h> +#endif + #ifdef TEST_DRIVER #include <stdio.h> #include <stdlib.h> /* EXIT_SUCCESS, etc. */ #include <unistd.h> /* getopt() */ #include <string.h> /* strncmp() */ #include <locale.h> /* setlocale() */ -#include <wchar.h> /* wcwidth() */ #include <wctype.h> /* this module */ #endif +#ifdef HAVE_WCHAR_H +#include <wchar.h> /* wcwidth() */ +#endif + #include <wcwidth.h> struct interval { @@ -623,30 +630,32 @@ { 0x3105, 0x312F }, { 0x3131, 0x318E }, { 0x3190, 0x31E3 }, { 0x31EF, 0x321E }, { 0x3220, 0x3247 }, { 0x3250, 0x4DBF }, { 0x4E00, 0xA48C }, { 0xA490, 0xA4C6 }, { 0xA960, 0xA97C }, - { 0xAC00, 0xD7A3 }, { 0xF900, 0xFAFF }, { 0xFE10, 0xFE19 }, - { 0xFE30, 0xFE52 }, { 0xFE54, 0xFE66 }, { 0xFE68, 0xFE6B }, - { 0xFF01, 0xFF60 }, { 0xFFE0, 0xFFE6 }, { 0x16FE0, 0x16FE3 }, - { 0x16FF0, 0x16FF1 }, { 0x17000, 0x187F7 }, { 0x18800, 0x18CD5 }, - { 0x18D00, 0x18D08 }, { 0x1AFF0, 0x1AFF3 }, { 0x1AFF5, 0x1AFFB }, - { 0x1AFFD, 0x1AFFE }, { 0x1B000, 0x1B122 }, { 0x1B132, 0x1B132 }, - { 0x1B150, 0x1B152 }, { 0x1B155, 0x1B155 }, { 0x1B164, 0x1B167 }, - { 0x1B170, 0x1B2FB }, { 0x1F004, 0x1F004 }, { 0x1F0CF, 0x1F0CF }, - { 0x1F18E, 0x1F18E }, { 0x1F191, 0x1F19A }, { 0x1F200, 0x1F202 }, - { 0x1F210, 0x1F23B }, { 0x1F240, 0x1F248 }, { 0x1F250, 0x1F251 }, - { 0x1F260, 0x1F265 }, { 0x1F300, 0x1F320 }, { 0x1F32D, 0x1F335 }, - { 0x1F337, 0x1F37C }, { 0x1F37E, 0x1F393 }, { 0x1F3A0, 0x1F3CA }, - { 0x1F3CF, 0x1F3D3 }, { 0x1F3E0, 0x1F3F0 }, { 0x1F3F4, 0x1F3F4 }, - { 0x1F3F8, 0x1F43E }, { 0x1F440, 0x1F440 }, { 0x1F442, 0x1F4FC }, - { 0x1F4FF, 0x1F53D }, { 0x1F54B, 0x1F54E }, { 0x1F550, 0x1F567 }, - { 0x1F57A, 0x1F57A }, { 0x1F595, 0x1F596 }, { 0x1F5A4, 0x1F5A4 }, - { 0x1F5FB, 0x1F64F }, { 0x1F680, 0x1F6C5 }, { 0x1F6CC, 0x1F6CC }, - { 0x1F6D0, 0x1F6D2 }, { 0x1F6D5, 0x1F6D7 }, { 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, 0x2FFFD }, - { 0x30000, 0x3FFFD } + { 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 }, + { 0x1F0CF, 0x1F0CF }, { 0x1F18E, 0x1F18E }, { 0x1F191, 0x1F19A }, + { 0x1F200, 0x1F202 }, { 0x1F210, 0x1F23B }, { 0x1F240, 0x1F248 }, + { 0x1F250, 0x1F251 }, { 0x1F260, 0x1F265 }, { 0x1F300, 0x1F320 }, + { 0x1F32D, 0x1F335 }, { 0x1F337, 0x1F37C }, { 0x1F37E, 0x1F393 }, + { 0x1F3A0, 0x1F3CA }, { 0x1F3CF, 0x1F3D3 }, { 0x1F3E0, 0x1F3F0 }, + { 0x1F3F4, 0x1F3F4 }, { 0x1F3F8, 0x1F43E }, { 0x1F440, 0x1F440 }, + { 0x1F442, 0x1F4FC }, { 0x1F4FF, 0x1F53D }, { 0x1F54B, 0x1F54E }, + { 0x1F550, 0x1F567 }, { 0x1F57A, 0x1F57A }, { 0x1F595, 0x1F596 }, + { 0x1F5A4, 0x1F5A4 }, { 0x1F5FB, 0x1F64F }, { 0x1F680, 0x1F6C5 }, + { 0x1F6CC, 0x1F6CC }, { 0x1F6D0, 0x1F6D2 }, { 0x1F6D5, 0x1F6D7 }, + { 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 } }; /* *INDENT-ON* */ @@ -665,7 +674,7 @@ result = use_latin1; } else if (Lookup(cmp, formatting)) { /* treat formatting characters like control characters */ - result = -1; + result = 0; } else if (Lookup(cmp, combining)) { /* binary search in table of non-spacing characters */ result = 0; @@ -675,6 +684,12 @@ if (Lookup(cmp, doublewidth)) { result = 2; + } else if (cmp >= 0xd800 && cmp <= 0xdfff) { +#ifdef HAVE_WCWIDTH + result = (wcwidth)(ucs); +#else + result = -1; +#endif } else if (cmp >= unknowns[0].first && Lookup(cmp, unknowns)) { result = -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/xterm.appdata.xml new/xterm-393/xterm.appdata.xml --- old/xterm-392/xterm.appdata.xml 2024-05-23 00:48:48.000000000 +0200 +++ new/xterm-393/xterm.appdata.xml 2024-07-12 01:38:44.000000000 +0200 @@ -35,7 +35,7 @@ <keyword>terminal</keyword> </keywords> <releases> - <release version="392" date="2024-05-22"/> + <release version="393" date="2024-07-11"/> </releases> <url type="homepage">https://invisible-island.net/xterm/</url> <update_contact>dic...@invisible-island.net</update_contact> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/xterm.h new/xterm-393/xterm.h --- old/xterm-392/xterm.h 2024-05-22 01:33:24.000000000 +0200 +++ new/xterm-393/xterm.h 2024-06-26 09:45:55.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.947 2024/05/21 23:33:24 tom Exp $ */ +/* $XTermId: xterm.h,v 1.948 2024/06/26 07:45:55 tom Exp $ */ /* * Copyright 1999-2023,2024 by Thomas E. Dickey @@ -1365,6 +1365,7 @@ extern void hide_vt_window (void); extern GCC_NORETURN void ice_error (IceConn /* iceConn */); extern void init_colored_cursor (Display * /* dpy */); +extern void parse_ansi_params(ANSI * /* params */, const char ** /* string */); extern void reset_decudk (XtermWidget /* xw */); extern void set_tek_visibility (Bool /* on */); extern void set_vt_visibility (Bool /* on */); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/xterm.log.html new/xterm-393/xterm.log.html --- old/xterm-392/xterm.log.html 2024-05-23 00:50:14.000000000 +0200 +++ new/xterm-393/xterm.log.html 2024-07-12 01:37:57.000000000 +0200 @@ -30,7 +30,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.2618 2024/05/22 22:50:14 tom Exp $ + $XTermId: xterm.log.html,v 1.2635 2024/07/11 23:37:57 tom Exp $ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> @@ -70,6 +70,8 @@ CHANGELOG</a>).</p> <ul> + <li><a href="#xterm_393">Patch #393 - 2024/07/11</a></li> + <li><a href="#xterm_392">Patch #392 - 2024/05/22</a></li> <li><a href="#xterm_391">Patch #391 - 2024/05/12</a></li> @@ -1062,6 +1064,58 @@ <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li> </ul> + <h1><a name="xterm_393" id="xterm_393">Patch #393 - + 2024/07/11</a></h1> + + <ul> + <li>add a check for ANSI SC/RC, to ignore CSI parameters.</li> + + <li>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).</li> + + <li>fix regression in error-recovery for SGR parameters from + <a href="#xterm_357">patch #357</a> (report by James + Holderness).</li> + + <li>remove some duplicates in <tt>xtermcfg.h</tt> (report by + Matthew Green).</li> + + <li>change default for <tt>--enable-imake</tt> configure + option.</li> + + <li>fixes for <tt>wcwidth</tt>: + <ul> + <li>return 0 for format effectors, like a zero-width + printing character rather than -1 like a control character + (report by Rajeev V. Pillai).</li> + + <li>correct <tt>doublewidth</tt> to account for reserved + codepoints which are listed in the EastAsianWidth + file.</li> + + <li>add a special case for surrogate pairs, which might be + checked in testing the <tt>wcwidth</tt> function.</li> + </ul> + </li> + + <li>amend sixel bounds-check added in <a href= + "#xterm_371">patch #371</a> to not wrap out-of-bounds + data.</li> + + <li>eliminate <tt>maxStringParse</tt> limit for SIXEL.</li> + + <li>improve logic which ignores APC, PM and SOS controls to + also not accumulate their data temporarily in a buffer.</li> + + <li>exclude <tt>TERM_INGRESS</tt> from cleanup of environment + variables (patch by Iain Riley).</li> + + <li>fix some documentation typos (report by Thomas Wolff).</li> + </ul> + <h1><a name="xterm_392" id="xterm_392">Patch #392 - 2024/05/22</a></h1> @@ -1417,7 +1471,7 @@ <li>use <tt>appcursorDefault</tt> and <tt>appkeypadDefault</tt> resources for reset of - <tt>DECCKM</tt> and <tt>DECKPM</tt>.</li> + <tt>DECCKM</tt> and <tt>DECKPAM</tt>.</li> <li>save initial resource values for <tt>sixelScrolling</tt> and <tt>privateColorRegisters</tt>, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/xterm.man new/xterm-393/xterm.man --- old/xterm-392/xterm.man 2024-05-22 10:15:46.000000000 +0200 +++ new/xterm-393/xterm.man 2024-06-29 01:56:28.000000000 +0200 @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.902 2024/05/22 08:15:46 tom Exp $ +.\" $XTermId: xterm.man,v 1.904 2024/06/28 23:56:28 tom Exp $ .\" .\" Copyright 1996-2023,2024 by Thomas E. Dickey .\" @@ -4243,7 +4243,7 @@ \fI\*N\fP reads these strings, accumulating them into a buffer until they are properly terminated. At that point, \fI\*n\fP interprets the strings. -If they happen to be \fBDCS\fP commands to draw ReGIS or SIXEL images, +If they happen to be \fBDCS\fP commands to draw ReGIS images, these strings may be large, in the hundreds of kilobytes. A few \fBOSC\fP commands may be as large as 10 kilobytes. .IP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-392/xtermcfg.hin new/xterm-393/xtermcfg.hin --- old/xterm-392/xtermcfg.hin 2024-05-17 10:13:42.000000000 +0200 +++ new/xterm-393/xtermcfg.hin 2024-07-06 01:37:42.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: xtermcfg.hin,v 1.232 2024/05/17 08:13:42 tom Exp $ */ +/* $XTermId: xtermcfg.hin,v 1.233 2024/07/05 23:37:42 tom Exp $ */ /* * Copyright 1997-2023,2024 by Thomas E. Dickey @@ -74,7 +74,6 @@ #undef HAVE_GRANTPT_PTY_ISATTY /* CF_FUNC_GRANTPT */ #undef HAVE_INITGROUPS /* AC_CHECK_FUNCS(initgroups) */ #undef HAVE_LANGINFO_CODESET /* AM_LANGINFO_CODESET */ -#undef HAVE_LASTLOG_H /* AC_CHECK_HEADERS(lastlog.h) */ #undef HAVE_LASTLOG_H /* CF_LASTLOG */ #undef HAVE_LIBUTIL_H /* AC_CHECK_HEADERS(libutil.h) */ #undef HAVE_LIBXPM /* CF_WITH_XPM */ @@ -90,12 +89,9 @@ #undef HAVE_MKSTEMP /* CF_MKSTEMP */ #undef HAVE_NCURSES_CURSES_H /* AC_CHECK_HEADERS(ncurses/curses.h) */ #undef HAVE_NCURSES_TERM_H /* AC_CHECK_HEADERS(ncurses/term.h) */ -#undef HAVE_PATHS_H /* AC_CHECK_HEADERS(paths.h) */ #undef HAVE_PATHS_H /* CF_LASTLOG */ -#undef HAVE_PCRE2POSIX_H /* AC_CHECK_HEADERS(pcre2posix.h) */ #undef HAVE_PCRE2POSIX_H /* CF_WITH_PCRE2 */ #undef HAVE_PCRE2REGCOMP /* CF_WITH_PCRE2 */ -#undef HAVE_PCREPOSIX_H /* AC_CHECK_HEADERS(pcreposix.h) */ #undef HAVE_PCREPOSIX_H /* CF_WITH_PCRE */ #undef HAVE_POSIX_OPENPT /* CF_FUNC_GRANTPT */ #undef HAVE_POSIX_SAVED_IDS /* CF_POSIX_SAVED_IDS */