]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20220529
authorThomas E. Dickey <dickey@invisible-island.net>
Mon, 30 May 2022 00:05:21 +0000 (00:05 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Mon, 30 May 2022 00:05:21 +0000 (00:05 +0000)
+ expanded notes for teken/syscons -TD
+ fix overlooked copying of extended string-heap in copy_termtype
  (cf: 20220430).
+ update config.guess

17 files changed:
NEWS
VERSION
config.guess
dist.mk
include/term_entry.h
misc/terminfo.src
ncurses/tinfo/alloc_ttype.c
ncurses/tinfo/free_ttype.c
ncurses/tinfo/lib_cur_term.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.spec
test/pair_content.c

diff --git a/NEWS b/NEWS
index fd3e7b0605b6517b1fd1f4a339ea77b9aee6acd6..8e36f8c0d20a71723540881ca4a238945ab74598 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3809 2022/05/21 21:10:54 tom Exp $
+-- $Id: NEWS,v 1.3813 2022/05/29 18:40:52 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,12 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20220529
+       + expanded notes for teken/syscons -TD
+       + fix overlooked copying of extended string-heap in copy_termtype
+         (cf: 20220430).
+       + update config.guess
+
 20220521
        + improve memory-leak checking in several test-programs.
        + set trailing null on string passed from winsnstr() to wins_nwstr().
diff --git a/VERSION b/VERSION
index c8bff0a0ab3b5f2bbd4911c5d94cb12199bb78cd..69323c36ba77e74b9ce71c94dd84d170e202c54a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20220521
+5:0:10 6.3     20220529
index 7f76b6228f73d674f58cfcc3523f99e253ee5515..160ecf0951b98437659d21c66e9a3a02056260bc 100755 (executable)
@@ -4,7 +4,7 @@
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2022-01-09'
+timestamp='2022-05-08'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1151,16 +1151,27 @@ EOF
        ;;
     x86_64:Linux:*:*)
        set_cc_for_build
+       CPU=$UNAME_MACHINE
        LIBCABI=$LIBC
        if test "$CC_FOR_BUILD" != no_compiler_found; then
-           if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
-               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_X32 >/dev/null
-           then
-               LIBCABI=${LIBC}x32
-           fi
+           ABI=64
+           sed 's/^        //' << EOF > "$dummy.c"
+           #ifdef __i386__
+           ABI=x86
+           #else
+           #ifdef __ILP32__
+           ABI=x32
+           #endif
+           #endif
+EOF
+           cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+           eval "$cc_set_abi"
+           case $ABI in
+               x86) CPU=i686 ;;
+               x32) LIBCABI=${LIBC}x32 ;;
+           esac
        fi
-       GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+       GUESS=$CPU-pc-linux-$LIBCABI
        ;;
     xtensa*:Linux:*:*)
        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
diff --git a/dist.mk b/dist.mk
index b517ae414cfdbacbef3c13fc3a6a8dd7e3843a85..18c28362e44a6efdb8f1aae7055f3316254ba488 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1481 2022/05/21 15:40:09 tom Exp $
+# $Id: dist.mk,v 1.1483 2022/05/29 18:40:52 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -38,7 +38,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 3
-NCURSES_PATCH = 20220521
+NCURSES_PATCH = 20220529
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index e2cf8380f904c2832ed48cddd26443243642101e..503e4b8edec67e23c7d5304b909ab4c8cb4e7b64 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2022 Thomas E. Dickey                                *
  * Copyright 1998-2015,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -33,7 +33,7 @@
  *     and: Thomas E. Dickey                        1998-on                 *
  ****************************************************************************/
 
-/* $Id: term_entry.h,v 1.61 2021/09/04 10:52:55 tom Exp $ */
+/* $Id: term_entry.h,v 1.62 2022/05/28 17:59:42 tom Exp $ */
 
 /*
  *     term_entry.h -- interface to entry-manipulation code
@@ -176,6 +176,7 @@ extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
 extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
 
 /* free_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *);
 extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
 
 /* lib_termcap.c: trim sgr0 string for termcap users */
index c7fbc11f1d5c327cbc49bfb32229595ce587999f..35cc9492a4412adb5f75ea0402ce62bd06acd48a 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.1002 $
-#      $Date: 2022/04/30 23:24:59 $
+#      $Revision: 1.1003 $
+#      $Date: 2022/05/28 20:05:41 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -1953,6 +1953,8 @@ mgterm|MGL/MGL2 MobileGear Graphic Library,
        vpa=\E[%i%p1%dd, use=ecma+index,
 
 #### FreeBSD console entries
+
+# Originally from termcap:
 #
 # From: Andrey Chernov <ache@astral.msk.su> 29 Mar 1996
 # Andrey Chernov maintains the FreeBSD termcap distributions.
@@ -1964,8 +1966,9 @@ mgterm|MGL/MGL2 MobileGear Graphic Library,
 # I have seen FreeBSD-2.1.5R... The old el1 bug changed, but it is still there.
 # Now el1 clears not only to the line beginning, but also a large chunk
 # of previous line. But there is another bug - ech does not work at all.
-#
 
+# syscons, sc - the console driver
+#
 # for syscons
 # common entry without semigraphics
 # Bug: The <op> capability resets attributes.
@@ -1976,7 +1979,7 @@ mgterm|MGL/MGL2 MobileGear Graphic Library,
 # Setting colors turns off reverse; we cannot guarantee order, so use ncv.
 # Note that this disables standout with color.
 #
-# The emulator sends difference strings based on shift- and control-keys,
+# The emulator sends different strings based on shift- and control-keys,
 # like scoansi:
 #      F13-F24 are shifted F1-F12
 #      F25-F36 are control F1-F12
@@ -2077,21 +2080,50 @@ cons60l1|cons60-iso|FreeBSD console w/iso 8859-1 chars (60 lines),
 cons60l1-m|cons60-iso-m|FreeBSD console w/iso 8859-1 chars (60-line mono),
        lines#60, use=cons25l1-m,
 
+# vt - virtual terminal console driver
+#
 # Starting with FreeBSD 8, an alternative configuration for syscons is provided,
 # which is intended to be xterm-compatible.  See for example
 #      http://svnweb.freebsd.org/base/stable/8/sys/dev/syscons/
 # in particular scterm-teken.c
 #
+# Some of the documentation refers to this as "vt"; its proper name is "teken".
+#
+# The sc(4) manual page states that it is possible to switch between the two
+# by editing /boot/loader.conf, adding
+#      kern.vty=sc
+# Doing that does not change the default TERM variable.  That is hard-coded in
+# /etc/ttys, rather than deriving it from the kernel state.
+#
 # For FreeBSD 12 and 13:
 # ---------------------
 # In newer releases, it is no longer possible to boot into a configuration that
-# works with syscons.  teken's "cons25" configuration supports only the first
-# 12 function keys.  One may switch at runtime between the two flavors of
-# function keys using vidcontrol:
+# works with syscons.  According to efi(4),
+# "The vt(4) system console is automatically selected when booting via UEFI."
+# See FreeBSD #264226.
+#
+# FreeBSD 13 supports 64-bit machines which boot with UEFI:
+#      https://www.freebsd.org/platforms/
+# The i386 platform does not use UEFI (and modifying the loader configuration
+# does load sysconf); however because no updates (fixes) are available, most
+# developers will regard that as unsupported.
+#
+# With FreeBSD 13, even when syscons is loaded (e.g., with the i386 platform),
+# its function-keys are not configured.  Using
+#      vidcontrol -T cons25
+# repairs this.
+#
+# When teken is loaded, vidcontrol can switch at runtime between the
+# teken/cons25 function keys:
 #      vidcontrol -T cons25
 #      vidcontrol -T xterm
-# But for each, teken implements only about a quarter of the imitated terminal's
-# terminal descriptions.
+# However due to a limitation in the implementation, only the first 12 function
+# keys are available.  The real syscons supports 48 function keys (using the
+# shift and control modifiers), while xterm supports more than twice as many.
+#
+# vidcontrol does not change the emulation. As a result, the quarter (17/73) of
+# non-function key capabilities which differ between syscons and teken are
+# unsupported in the UEFI-based configurations.
 #
 # tack:
 #      VT100 line-drawing does not work (UTF-8 equivalents do).
@@ -27516,4 +27548,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      + modify samples for xterm mouse 1002/1003 modes to use 1006 mode, and
 #        also provide for focus in/out responses -TD
 #
+# 2022-05-28
+#      + expanded notes for teken/syscons -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index 9f866323058ee373f6b0f6368a9d952a31dff2e8..4f9dae32561bd7241bb35a376e58a8a56ddc407b 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_ttype.c,v 1.40 2022/05/08 00:11:44 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.43 2022/05/29 17:56:55 tom Exp $")
 
 #if NCURSES_XNAMES
 /*
@@ -557,7 +557,7 @@ copy_termtype(TERMTYPE2 *dst, const TERMTYPE2 *src, int mode)
            strcpy(dst->term_names + str_size, src->term_names);
        }
        str_size += strlen(src->term_names) + 1;
-       for (i = 0; i < NUM_STRINGS(dst); ++i) {
+       for (i = 0; i < STRCOUNT; ++i) {
            if (VALID_STRING(src->Strings[i])) {
                if (pass) {
                    strcpy(new_table + str_size, src->Strings[i]);
@@ -625,6 +625,19 @@ copy_termtype(TERMTYPE2 *dst, const TERMTYPE2 *src, int mode)
        new_table = NULL;
        for (pass = 0; pass < 2; ++pass) {
            size_t str_size = 0;
+           char *raw_data = src->ext_str_table;
+           if (raw_data != NULL) {
+               for (i = 0; i < src->ext_Strings; ++i) {
+                   size_t skip = strlen(raw_data) + 1;
+                   if (skip != 1) {
+                       if (pass) {
+                           strcpy(new_table + str_size, raw_data);
+                       }
+                       str_size += skip;
+                       raw_data += skip;
+                   }
+               }
+           }
            for (i = 0; i < NUM_EXT_NAMES(dst); ++i) {
                if (VALID_STRING(src->ext_Names[i])) {
                    if (pass) {
@@ -638,7 +651,7 @@ copy_termtype(TERMTYPE2 *dst, const TERMTYPE2 *src, int mode)
                dst->ext_str_table = new_table;
            } else {
                ++str_size;
-               new_table = malloc(str_size);
+               new_table = calloc(str_size, 1);
            }
        }
     } else {
index 973577636bcf45e37bcb9a0904704e55d32112c3..9622e0e11f4923b1d5a58b759d9217dcaef63458 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: free_ttype.c,v 1.20 2022/05/15 12:42:13 tom Exp $")
+MODULE_ID("$Id: free_ttype.c,v 1.21 2022/05/28 18:02:33 tom Exp $")
 
 static void
 really_free_termtype(TERMTYPE2 *ptr, bool freeStrings)
@@ -67,7 +67,7 @@ really_free_termtype(TERMTYPE2 *ptr, bool freeStrings)
 }
 
 /*
- * This entrypoint is used by tack 1.07
+ * This entrypoint was used by tack 1.07; deprecated with ncurses 6.2
  */
 NCURSES_EXPORT(void)
 _nc_free_termtype(TERMTYPE *ptr)
@@ -75,6 +75,15 @@ _nc_free_termtype(TERMTYPE *ptr)
     really_free_termtype((TERMTYPE2 *) ptr, !NCURSES_EXT_NUMBERS);
 }
 
+/*
+ * These similar entrypoints are not used outside of ncurses.
+ */
+NCURSES_EXPORT(void)
+_nc_free_termtype1(TERMTYPE *ptr)
+{
+    really_free_termtype((TERMTYPE2 *) ptr, TRUE);
+}
+
 #if NCURSES_EXT_NUMBERS
 NCURSES_EXPORT(void)
 _nc_free_termtype2(TERMTYPE2 *ptr)
index 7d7e7f1577f9c86378178438ebc93cfad05c8fb5..1f8db2c1e0c8587984503ffe69b0d22b239a24f9 100644 (file)
@@ -41,7 +41,7 @@
 #include <termcap.h>           /* ospeed */
 #include <tic.h>               /* VALID_STRING */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.48 2022/05/21 22:58:20 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.49 2022/05/28 17:56:55 tom Exp $")
 
 #undef CUR
 #define CUR TerminalType(termp).
@@ -148,7 +148,7 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL *termp)
 
 #if NCURSES_EXT_NUMBERS
 #if NCURSES_EXT_COLORS
-       _nc_free_termtype(&termp->type);
+       _nc_free_termtype1(&termp->type);
 #else
        _nc_free_termtype2(&termp->type);
 #endif
index bfb228b86c9f9fab67108c120620df25c990cf7f..f1451976e90aba2fdfcdfb215d4b58279d822c0c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220521) unstable; urgency=low
+ncurses6 (6.3+20220529) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 15 May 2022 08:43:22 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 29 May 2022 14:40:52 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index bfb228b86c9f9fab67108c120620df25c990cf7f..f1451976e90aba2fdfcdfb215d4b58279d822c0c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220521) unstable; urgency=low
+ncurses6 (6.3+20220529) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 15 May 2022 08:43:22 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 29 May 2022 14:40:52 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index c13c624ffa6e231456c8f83aad0b9620bb371dfe..c8da6cdb1c00537c0e5556be6b4b23bea2c81d00 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220521) unstable; urgency=low
+ncurses6 (6.3+20220529) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 15 May 2022 08:43:22 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 29 May 2022 14:40:52 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 0d5bec04f71418862553e326378529f131f9811a..4c844c8b761082db57a68f7f5963731a5d4fa1f8 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.521 2022/05/21 15:40:09 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.523 2022/05/29 18:40:52 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "3"\r
 !define VERSION_YYYY  "2022"\r
-!define VERSION_MMDD  "0521"\r
+!define VERSION_MMDD  "0529"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 5d12868ecc608ff9000773666125c5dd1d3a6797..61b3469a1af30a4bbd9792b5244d3da5f8d88adc 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20220521
+Release: 20220529
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index ff86a976d459b6a69b5e142674c3e7cbacff39cf..b05a6bcf679dd02b3c48cec1e8cf595760947e43 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20220521
+Release: 20220529
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index e765d60467e10b80ad5f60bf933febc3dd4497c9..1fceaee84951cd0c7ac44e73b2283beb30bfe26e 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20220521
+Release: 20220529
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 35e2fc4b44bde72233652c0191d3c2fc4630dfb2..c0e0e71d62e15b3b999bc1b67430cc797aff85bd 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: pair_content.c,v 1.16 2022/05/15 15:46:28 tom Exp $
+ * $Id: pair_content.c,v 1.17 2022/05/28 20:15:06 tom Exp $
  */
 
 #define NEED_TIME_H
@@ -62,7 +62,7 @@ static struct timeval initial_time;
 static struct timeval finish_time;
 #endif
 
-static void
+static GCC_NORETURN void
 finish(int code)
 {
     free(expected);