]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20240210
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 11 Feb 2024 01:30:51 +0000 (01:30 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 11 Feb 2024 01:30:51 +0000 (01:30 +0000)
+ compiler-warning fixes, while investigating an optimizer bug in
  "gcc (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0"
  which results in only the first byte of a multibyte character being
  printed to the screen.

14 files changed:
NEWS
VERSION
dist.mk
man/tabs.1
ncurses/tinfo/comp_parse.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/test.priv.h
test/test_mouse.c

diff --git a/NEWS b/NEWS
index 33feec26d9572ab8b2acec80429e75927b4f0f09..331b4cda27b2b4a68446199f050f752ee0544ebe 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.4075 2024/02/04 00:53:44 tom Exp $
+-- $Id: NEWS,v 1.4078 2024/02/10 23:48:51 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.
 
+20240210
+       + compiler-warning fixes, while investigating an optimizer bug in
+         "gcc (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0"
+         which results in only the first byte of a multibyte character being
+         printed to the screen.
+
 20240203
        + minor changes to tracing and locale-checks.
 
diff --git a/VERSION b/VERSION
index 3ad4554759964927848a6a351b3fd112d567a145..cd1c0655c143424fb3e34d0719ab05f60c9b9174 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20240203
+5:0:10 6.4     20240210
diff --git a/dist.mk b/dist.mk
index 163c0b51f56bd06fd73fd7999440d1755aaa5cc1..8a24cb7d6a5e00f3f410e42e962ffb768803187e 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.1596 2024/02/03 10:52:10 tom Exp $
+# $Id: dist.mk,v 1.1597 2024/02/10 12:26:54 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 = 4
-NCURSES_PATCH = 20240203
+NCURSES_PATCH = 20240210
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index eedb1d2b07acefd9d2c9f5e3cf9fdbfcd507b457..3e683d684e8222cc1ab3b21b4c03e9ea91ebe489 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright 2018-2021,2023 Thomas E. Dickey                                *
+.\" Copyright 2018-2023,2024 Thomas E. Dickey                                *
 .\" Copyright 2008-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tabs.1,v 1.54 2024/01/20 16:54:03 tom Exp $
+.\" $Id: tabs.1,v 1.55 2024/01/20 16:54:03 tom Exp $
 .TH @TABS@ 1 2024-01-20 "ncurses 6.4" "User commands"
 .ie \n(.g \{\
 .ds `` \(lq
index 4244df4efed8f84a2c7d4c79a0b8245069387a80..dec4b925625efe1cd364cdd3829929eb92dbb541 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2022,2023 Thomas E. Dickey                                *
+ * Copyright 2018-2023,2024 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -48,7 +48,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.133 2023/05/27 20:13:10 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.134 2024/02/10 15:52:11 tom Exp $")
 
 static void sanity_check2(TERMTYPE2 *, bool);
 NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
@@ -404,7 +404,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
     ENTRY *qp, *rp, *lastread = 0;
     bool keepgoing;
     unsigned i, j;
-    int unresolved, total_unresolved, multiples;
+    int total_unresolved, multiples;
 
     DEBUG(2, (T_CALLED("_nc_resolve_uses2")));
 
@@ -444,7 +444,6 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
     total_unresolved = 0;
     _nc_curr_col = -1;
     for_entry_list(qp) {
-       unresolved = 0;
        for (i = 0; i < qp->nuses; i++) {
            bool foundit;
            char *child = _nc_first_name(qp->tterm.term_names);
@@ -513,7 +512,6 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
 
            /* no good, mark this one unresolvable and complain */
            if (!foundit) {
-               unresolved++;
                total_unresolved++;
 
                _nc_curr_line = (int) lookline;
index 619876e3e798ee5ce1b06245730af2e58811e2c4..935c5a27101b564f58d4045c07e14f2e02b4ac36 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240203) unstable; urgency=low
+ncurses6 (6.4+20240210) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Feb 2024 05:52:10 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 10 Feb 2024 07:26:54 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 619876e3e798ee5ce1b06245730af2e58811e2c4..935c5a27101b564f58d4045c07e14f2e02b4ac36 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240203) unstable; urgency=low
+ncurses6 (6.4+20240210) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Feb 2024 05:52:10 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 10 Feb 2024 07:26:54 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index deb1c258e2f10719eaea2bcf2777859e629bfe96..3ba3b2219e7b9d40bb5bd49893d70d8ee9ccfac8 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240203) unstable; urgency=low
+ncurses6 (6.4+20240210) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Feb 2024 05:52:10 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 10 Feb 2024 07:26:54 -0500
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index 05db5415946943f33ceb8998a82bd0c89331453e..8c34878fa0064a4d1b92193e6253945d0bd2e439 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.631 2024/02/03 10:52:10 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.632 2024/02/10 12:26:54 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 "4"\r
 !define VERSION_YYYY  "2024"\r
-!define VERSION_MMDD  "0203"\r
+!define VERSION_MMDD  "0210"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 488246143ba4813121f22a82881d0a9ffa913503..72b2e7b4bee426a889219e64a4764c7a4f88bdb7 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20240203
+Release: 20240210
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 6af03fb990edf740c848969129ccb9f3864160ef..df5949af7461985fa4c94ea24e0998312746eb30 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20240203
+Release: 20240210
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index c14511b62ef2940dd4e608ca782d9764c2a0d2ab..719ebada2520eec9d19e3125ed07f95ba1c1efb3 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20240203
+Release: 20240210
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 7b18557d2e6ca3ae6ac4e742af8ee152aa8ce9ae..a901185b8df04832530d68439c2fb78e4ff835e3 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2022,2023 Thomas E. Dickey                                *
+ * Copyright 2018-2023,2024 Thomas E. Dickey                                *
  * Copyright 1998-2017,2018 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -30,7 +30,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.217 2023/11/11 00:23:26 tom Exp $ */
+/* $Id: test.priv.h,v 1.218 2024/02/10 14:40:03 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
@@ -752,25 +752,27 @@ extern int optind;
 ," -V       show version of curses"
 
 #if HAVE_CURSES_VERSION
-#define format_version(buffer) strcpy(buffer, curses_version())
+#define format_version(buffer, size) strcpy(buffer, curses_version())
 #elif defined(NCURSES_VERSION_MAJOR) && defined(NCURSES_VERSION_MINOR) && defined(NCURSES_VERSION_PATCH)
-#define format_version(buffer) sprintf(buffer, "ncurses %d.%d.%d", \
-       NCURSES_VERSION_MAJOR, \
-       NCURSES_VERSION_MINOR, \
-       NCURSES_VERSION_PATCH)
+#define format_version(buffer, size) \
+       _nc_SPRINTF(buffer, _nc_SLIMIT(size) "ncurses %d.%d.%d", \
+                   NCURSES_VERSION_MAJOR, \
+                   NCURSES_VERSION_MINOR, \
+                   NCURSES_VERSION_PATCH)
 #else
-#define format_version(buffer) strcpy(buffer, "ncurses-examples")
+#define format_version(buffer, size) strcpy(buffer, "ncurses-examples")
 #endif
 
 #define VERSION_COMMON() \
 static char *version_common(char **argv) { \
        char *base = argv[0]; \
        char *part = strrchr(base, '/'); \
-       char *result = malloc(strlen(base) + 80); \
+       size_t need = strlen(base) + 80; \
+       char *result = malloc(need); \
        if (result != NULL) { \
            if (part++ == NULL) part = base; \
-           sprintf(result, "%.20s: ", part); \
-           format_version(result + strlen(result)); \
+           _nc_SPRINTF(result, _nc_SLIMIT(need) "%.20s: ", part); \
+           format_version(result + strlen(result), need - strlen(result)); \
        } \
        return result; \
 } \
@@ -1112,14 +1114,14 @@ extern int TABSIZE;
 #if HAVE_CLOCK_GETTIME
 # define GetClockTime(t) clock_gettime(CLOCK_REALTIME, t)
 # define TimeType struct timespec
-# define TimeScale 1000000000L         /* 1e9 */
+# define TimeScale 1000000000L /* 1e9 */
 # define ElapsedSeconds(b,e) \
            (double) (((e)->tv_sec - (b)->tv_sec) \
                    + ((e)->tv_nsec - (b)->tv_nsec) / TimeScale)
 #elif HAVE_GETTIMEOFDAY
 # define GetClockTime(t) gettimeofday(t, 0)
 # define TimeType struct timeval
-# define TimeScale 1000000L            /* 1e6 */
+# define TimeScale 1000000L    /* 1e6 */
 # define ElapsedSeconds(b,e) \
            (double) (((e)->tv_sec - (b)->tv_sec) \
                    + ((e)->tv_usec - (b)->tv_usec) / TimeScale)
index 9179105002e1f69e8f93c75effc29901494c571d..126d2d6de3f324e940096cf7008e2fd3a671af31 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2022,2023 Thomas E. Dickey                                     *
+ * Copyright 2022-2023,2024 Thomas E. Dickey                                *
  * Copyright 2022 Leonid S. Usov <leonid.s.usov at gmail.com>               *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -22,7 +22,7 @@
  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
  ****************************************************************************/
 /*
- * $Id: test_mouse.c,v 1.28 2023/04/16 17:36:47 tom Exp $
+ * $Id: test_mouse.c,v 1.29 2024/02/10 14:39:40 tom Exp $
  *
  * Author: Leonid S Usov
  *
@@ -152,6 +152,7 @@ main(int argc, char *argv[])
     int interval = 0;
     int ch;
     MEVENT event;
+    size_t my_len;
     char *my_environ = NULL;
     const char *term_format = "TERM=%s";
 
@@ -164,9 +165,10 @@ main(int argc, char *argv[])
            rawmode = TRUE;
            break;
        case 'T':
-           my_environ = malloc(strlen(term_format) + strlen(optarg));
+           my_len = strlen(term_format) + strlen(optarg) + 1;
+           my_environ = malloc(my_len);
            if (my_environ != NULL) {
-               sprintf(my_environ, term_format, optarg);
+               _nc_SPRINTF(my_environ, _nc_SLIMIT(my_len) term_format, optarg);
                putenv(my_environ);
            }
            break;