]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20240203
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 4 Feb 2024 00:57:23 +0000 (00:57 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 4 Feb 2024 00:57:23 +0000 (00:57 +0000)
+ minor changes to tracing and locale-checks.

15 files changed:
NEWS
VERSION
dist.mk
ncurses/base/MKunctrl.awk
ncurses/tinfo/lib_setup.c
ncurses/trace/lib_traceatr.c
ncurses/trace/lib_tracechr.c
ncurses/tty/tty_update.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

diff --git a/NEWS b/NEWS
index 05e5aeeaab65196c9b5eca5c4cb90ef060249ef3..33feec26d9572ab8b2acec80429e75927b4f0f09 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.4071 2024/01/27 22:04:17 tom Exp $
+-- $Id: NEWS,v 1.4075 2024/02/04 00:53:44 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,9 @@ 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.
 
+20240203
+       + minor changes to tracing and locale-checks.
+
 20240127
        + amend change to z39-a (report by Sven Joachim).
        + use xterm+nopcfkeys, vt52-basic, dec+pp, dec+sl, vt52+arrows,
diff --git a/VERSION b/VERSION
index 25dee1cdcc91f70a52a4956fd2086bdae0b40e31..3ad4554759964927848a6a351b3fd112d567a145 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20240127
+5:0:10 6.4     20240203
diff --git a/dist.mk b/dist.mk
index 8f193da0f7e484c57d08059246b22eb21062027c..163c0b51f56bd06fd73fd7999440d1755aaa5cc1 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.1595 2024/01/27 11:04:16 tom Exp $
+# $Id: dist.mk,v 1.1596 2024/02/03 10:52:10 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 = 20240127
+NCURSES_PATCH = 20240203
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 9a2a6db63876c9fc4474ac89b979656c59c3722e..e5362bd60d150d400927fe4a954f498b5e247e37 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: MKunctrl.awk,v 1.29 2020/02/02 23:34:34 tom Exp $
+# $Id: MKunctrl.awk,v 1.30 2024/02/03 21:09:14 tom Exp $
 ##############################################################################
-# Copyright 2020 Thomas E. Dickey                                            #
+# Copyright 2020,2024 Thomas E. Dickey                                       #
 # Copyright 1998-2012,2017 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -144,7 +144,7 @@ END {
                print  "\tint check = (int) ChCharOf(ch);"
                print  "\tconst char *result;"
                print  ""
-               print  "(void) sp;"
+               print  "\t(void) sp;"
                print  "\tif (check >= 0 && check < (int)SIZEOF(unctrl_table)) {"
                print  "#if NCURSES_EXT_FUNCS"
                print  "\t\tif ((sp != 0)"
@@ -155,6 +155,7 @@ END {
                print  "\t\telse"
                print  "\t\tif ((check >= 160)"
                print  "\t\t && (check < 256)"
+               print  "\t\t && !_nc_unicode_locale()"
                print  "\t\t && ((sp != 0)"
                print  "\t\t  && ((sp->_legacy_coding > 0)"
                print  "\t\t   || (sp->_legacy_coding == 0"
index f2d2bb36344ca9f9d0bc18bb9c58fb01f9321887..4752ba899d4d884414a4cb17dcaedc46512cf93a 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  *
@@ -49,7 +49,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.230 2023/11/04 21:02:27 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.231 2024/02/04 00:09:34 tom Exp $")
 
 /****************************************************************************
  *
@@ -707,22 +707,27 @@ _nc_get_locale(void)
 NCURSES_EXPORT(int)
 _nc_unicode_locale(void)
 {
-    int result = 0;
+    static bool initialized = FALSE;
+    static int result = 0;
+
+    if (!initialized) {
 #if defined(_NC_WINDOWS) && USE_WIDEC_SUPPORT
-    result = 1;
+       result = 1;
 #elif HAVE_LANGINFO_CODESET
-    char *env = nl_langinfo(CODESET);
-    result = !strcmp(env, "UTF-8");
-    T(("_nc_unicode_locale(%s) ->%d", env, result));
+       char *env = nl_langinfo(CODESET);
+       result = !strcmp(env, "UTF-8");
+       T(("_nc_unicode_locale(%s) ->%d", env, result));
 #else
-    char *env = _nc_get_locale();
-    if (env != 0) {
-       if (strstr(env, ".UTF-8") != 0) {
-           result = 1;
-           T(("_nc_unicode_locale(%s) ->%d", env, result));
+       char *env = _nc_get_locale();
+       if (env != 0) {
+           if (strstr(env, ".UTF-8") != 0) {
+               result = 1;
+               T(("_nc_unicode_locale(%s) ->%d", env, result));
+           }
        }
-    }
 #endif
+       initialized = TRUE;
+    }
     return result;
 }
 
index d397fb21c66fa6745bdf76c3c1fcfe7f3fe452bd..b36286253d6d7fd6c8ac04e51fe6b2406dc448ce 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2022 Thomas E. Dickey                                *
+ * Copyright 2018-2022,2024 Thomas E. Dickey                                *
  * Copyright 1998-2017,2018 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -44,7 +44,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_traceatr.c,v 1.95 2022/06/11 22:40:56 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.96 2024/02/04 00:11:35 tom Exp $")
 
 #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
 
@@ -343,6 +343,7 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
            } else {
                PUTC_DATA;
                int n;
+               int assume_unicode = _nc_unicode_locale()? 128 : 255;
 
                (void) _nc_trace_bufcat(bufnum, "{ ");
                for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
@@ -362,10 +363,10 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
                                                                  UChar(ch->chars[PUTC_i])));
                        }
                        break;
-                   } else if (ch->chars[PUTC_i] > 255) {
+                   } else if (ch->chars[PUTC_i] > assume_unicode) {
                        char temp[80];
                        _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
-                                   "{%d:\\u%lx}",
+                                   "{%d:\\u%04lx}",
                                    _nc_wacs_width(ch->chars[PUTC_i]),
                                    (unsigned long) ch->chars[PUTC_i]);
                        (void) _nc_trace_bufcat(bufnum, temp);
index 36158d6f45a6725d455ed9db17d293ef155f9f9a..9c879dc6739784bdb8483be012b3ecf0a0ac00eb 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2024 Thomas E. Dickey                                     *
  * Copyright 1998-2009,2012 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -40,7 +40,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_tracechr.c,v 1.23 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_tracechr.c,v 1.24 2024/02/04 00:11:35 tom Exp $")
 
 #ifdef TRACE
 
@@ -54,26 +54,28 @@ _nc_tracechar(SCREEN *sp, int ch)
                      ? sp->tracechr_buf
                      : _nc_globals.tracechr_buf);
 
-    if (ch > KEY_MIN || ch < 0) {
+    if ((ch > KEY_MIN && !_nc_unicode_locale()) || ch < 0) {
        name = safe_keyname(SP_PARM, ch);
        if (name == 0 || *name == '\0')
            name = "NULL";
        _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize)
-                   "'%.30s' = %#03o", name, ch);
-    } else if (!is8bits(ch) || !isprint(UChar(ch))) {
+                   "'%.30s' = \\x%02x", name, ch);
+    } else if (!is8bits(ch)
+              || (_nc_unicode_locale() && !is7bits(ch))
+              || !isprint(UChar(ch))) {
        /*
         * workaround for glibc bug:
         * sprintf changes the result from unctrl() to an empty string if it
         * does not correspond to a valid multibyte sequence.
         */
        _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize)
-                   "%#03o", ch);
+                   "\\x%02x", ch);
     } else {
        name = safe_unctrl(SP_PARM, (chtype) ch);
        if (name == 0 || *name == 0)
            name = "null";      /* shouldn't happen */
        _nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize)
-                   "'%.30s' = %#03o", name, ch);
+                   "'%.30s' = \\x%02x", name, ch);
     }
     return (MyBuffer);
 }
index 066b7fce3ccdbfec39995d87d1c2dabee575bbe4..0427024cb084988428c56bad1805dbf37a99ae78 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  *
@@ -85,7 +85,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.315 2023/09/16 16:38:41 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.316 2024/02/04 00:09:34 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -256,6 +256,7 @@ PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch)
         *    not checked.
         */
        if (is8bits(CharOf(CHDEREF(ch)))
+           && (!is7bits(CharOf(CHDEREF(ch))) && _nc_unicode_locale())
            && (isprint(CharOf(CHDEREF(ch)))
                || (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
                || (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
index 190ac14d05fa44330d05af69606b714958643e03..619876e3e798ee5ce1b06245730af2e58811e2c4 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240127) unstable; urgency=low
+ncurses6 (6.4+20240203) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 27 Jan 2024 06:04:16 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Feb 2024 05:52:10 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 190ac14d05fa44330d05af69606b714958643e03..619876e3e798ee5ce1b06245730af2e58811e2c4 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240127) unstable; urgency=low
+ncurses6 (6.4+20240203) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 27 Jan 2024 06:04:16 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Feb 2024 05:52:10 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index fde41393150461ca755e518151036158f3ed0fe0..deb1c258e2f10719eaea2bcf2777859e629bfe96 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20240127) unstable; urgency=low
+ncurses6 (6.4+20240203) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 27 Jan 2024 06:04:16 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Feb 2024 05:52:10 -0500
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index 4c4122c0fb93ef96d9d711ac165a2dba48294128..05db5415946943f33ceb8998a82bd0c89331453e 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.630 2024/01/27 11:04:16 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.631 2024/02/03 10:52:10 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  "0127"\r
+!define VERSION_MMDD  "0203"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index ad5a7f28f27f0a91b6efbd445fbd5e0c30b7906b..488246143ba4813121f22a82881d0a9ffa913503 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20240127
+Release: 20240203
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 775f770c32b3bb989d991d960d8483ad423500ca..6af03fb990edf740c848969129ccb9f3864160ef 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20240127
+Release: 20240203
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 59460a5a36822de81fce16d8c40d9b1df3b98148..c14511b62ef2940dd4e608ca782d9764c2a0d2ab 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20240127
+Release: 20240203
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz