]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20220612
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Jun 2022 18:14:27 +0000 (18:14 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Jun 2022 18:14:27 +0000 (18:14 +0000)
+ modify waddch_literal() to allow for double-width base character when
  merging a combining character (report by Gavin Troy).
+ improve _tracecchar_t2() formatting of base+combining character.

13 files changed:
NEWS
VERSION
dist.mk
ncurses/base/lib_addch.c
ncurses/base/lib_addstr.c
ncurses/trace/lib_traceatr.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 b68ca23fc7aaacfa4d5d3c38cac40eefd5e5e02c..36fa566c684bbc4c9d6d1163cf8d816a106b275e 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.3815 2022/06/04 23:17:01 tom Exp $
+-- $Id: NEWS,v 1.3818 2022/06/12 10:22:30 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,11 @@ 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.
 
+20220612
+       + modify waddch_literal() to allow for double-width base character when
+         merging a combining character (report by Gavin Troy).
+       + improve _tracecchar_t2() formatting of base+combining character.
+
 20220604
        + add note on portable memory-leak checking in man/curs_memleaks.3x
        + remove u6-u9 from teken-2018 -TD
diff --git a/VERSION b/VERSION
index e63acbb84bbb99332cd5fbf608a374399c3bacb0..fb2ccc3c8dc1b2d29647fb49a1cd3c16ada1c0d9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20220604
+5:0:10 6.3     20220612
diff --git a/dist.mk b/dist.mk
index 5a6d8ea18cc6035fa7c792eded7c310290ec7eb7..bd757b7f3c7bfcd06ccbf4acb41cb05ba8a67b79 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.1484 2022/06/04 10:24:10 tom Exp $
+# $Id: dist.mk,v 1.1486 2022/06/12 10:22:30 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 = 20220604
+NCURSES_PATCH = 20220612
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index a144328936c1b9765897361009a89252d7ae482a..a14bfd3b0e05fe16e46a6db4bc385dc64f998066 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2019-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2019-2021,2022 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -37,7 +37,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_addch.c,v 1.138 2021/06/17 21:11:08 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.141 2022/06/12 15:16:41 tom Exp $")
 
 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
 
@@ -321,20 +321,29 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch)
        int len = _nc_wacs_width(CharOf(ch));
        int i;
        int j;
-       wchar_t *chars;
 
        if (len == 0) {         /* non-spacing */
            if ((x > 0 && y >= 0)
                || (win->_maxx >= 0 && win->_cury >= 1)) {
-               if (x > 0 && y >= 0)
-                   chars = (win->_line[y].text[x - 1].chars);
-               else
-                   chars = (win->_line[y - 1].text[win->_maxx].chars);
+               NCURSES_CH_T *dst;
+               wchar_t *chars;
+               if (x > 0 && y >= 0) {
+                   for (j = x - 1; j >= 0; --j) {
+                       if (!isWidecExt(win->_line[y].text[j])) {
+                           win->_curx = (NCURSES_SIZE_T) j;
+                           break;
+                       }
+                   }
+                   dst = &(win->_line[y].text[j]);
+               } else {
+                   dst = &(win->_line[y - 1].text[win->_maxx]);
+               }
+               chars = dst->chars;
                for (i = 0; i < CCHARW_MAX; ++i) {
                    if (chars[i] == 0) {
                        TR(TRACE_VIRTPUT,
-                          ("added non-spacing %d: %x",
-                           x, (int) CharOf(ch)));
+                          ("adding non-spacing %s (level %d)",
+                           _tracech_t(CHREF(ch)), i));
                        chars[i] = CharOf(ch);
                        break;
                    }
@@ -410,9 +419,9 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch)
   testwrapping:
     );
 
-    TR(TRACE_VIRTPUT, ("cell (%ld, %ld..%d) = %s",
-                      (long) win->_cury, (long) win->_curx, x - 1,
-                      _tracech_t(CHREF(ch))));
+    TR(TRACE_VIRTPUT, ("cell (%d, %d..%d) = %s",
+                      win->_cury, win->_curx, x - 1,
+                      _tracech_t(CHREF(line->text[win->_curx]))));
 
     if (x > win->_maxx) {
        return wrap_to_next_line(win);
index a1e8829dd7f5e255cf8e2d05dfe178e0248b4ae7..ea449794b1ab8b7d3c99c5dad8f4e7754696b7ec 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2022 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -45,7 +45,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_addstr.c,v 1.57 2020/12/05 20:06:19 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.58 2022/06/11 20:12:04 tom Exp $")
 
 NCURSES_EXPORT(int)
 waddnstr(WINDOW *win, const char *astr, int n)
@@ -59,10 +59,11 @@ waddnstr(WINDOW *win, const char *astr, int n)
        TR(TRACE_VIRTPUT | TRACE_ATTRS,
           ("... current %s", _traceattr(WINDOW_ATTRS(win))));
        code = OK;
+
+       TR(TRACE_VIRTPUT, ("str is not null, length = %d",
+                          ((n > 0) ? n : (int) strlen(str))));
        if (n < 0)
            n = INT_MAX;
-
-       TR(TRACE_VIRTPUT, ("str is not null, length = %d", n));
        while ((*str != '\0') && (n-- > 0)) {
            NCURSES_CH_T ch;
            TR(TRACE_VIRTPUT, ("*str = %#o", UChar(*str)));
@@ -231,10 +232,11 @@ waddnwstr(WINDOW *win, const wchar_t *str, int n)
        TR(TRACE_VIRTPUT | TRACE_ATTRS,
           ("... current %s", _traceattr(WINDOW_ATTRS(win))));
        code = OK;
+
+       TR(TRACE_VIRTPUT, ("str is not null, length = %d",
+                          ((n > 0) ? n : (int) wcslen(str))));
        if (n < 0)
            n = INT_MAX;
-
-       TR(TRACE_VIRTPUT, ("str is not null, length = %d", n));
        while ((*str != L('\0')) && (n-- > 0)) {
            NCURSES_CH_T ch;
            TR(TRACE_VIRTPUT, ("*str[0] = %#lx", (unsigned long) *str));
index 9402627505084d6a07163414c53cef8864272cc5..d397fb21c66fa6745bdf76c3c1fcfe7f3fe452bd 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2022 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.94 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.95 2022/06/11 22:40:56 tom Exp $")
 
 #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
 
@@ -369,14 +369,15 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
                                    _nc_wacs_width(ch->chars[PUTC_i]),
                                    (unsigned long) ch->chars[PUTC_i]);
                        (void) _nc_trace_bufcat(bufnum, temp);
-                       break;
-                   }
-                   for (n = 0; n < PUTC_n; n++) {
-                       if (n)
-                           (void) _nc_trace_bufcat(bufnum, ", ");
-                       (void) _nc_trace_bufcat(bufnum,
-                                               _nc_tracechar(CURRENT_SCREEN,
-                                                             UChar(PUTC_buf[n])));
+                       attr &= ~A_CHARTEXT;    /* ignore WidecExt(ch) */
+                   } else {
+                       for (n = 0; n < PUTC_n; n++) {
+                           if (n)
+                               (void) _nc_trace_bufcat(bufnum, ", ");
+                           (void) _nc_trace_bufcat(bufnum,
+                                                   _nc_tracechar(CURRENT_SCREEN,
+                                                                 UChar(PUTC_buf[n])));
+                       }
                    }
                }
                (void) _nc_trace_bufcat(bufnum, " }");
index 55e3a0fe1116069eae801bd94471ac3121c9f36f..f0eb8aa9b85060cdc8b94c502967557485e1e525 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220604) unstable; urgency=low
+ncurses6 (6.3+20220612) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Jun 2022 06:24:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 12 Jun 2022 06:22:30 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 55e3a0fe1116069eae801bd94471ac3121c9f36f..f0eb8aa9b85060cdc8b94c502967557485e1e525 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220604) unstable; urgency=low
+ncurses6 (6.3+20220612) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Jun 2022 06:24:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 12 Jun 2022 06:22:30 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 51d93ddb9f456246eaf81aeb1bb9d6bd260c89da..e550922f6035f16e90bf29a60d1b8483fea10c08 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220604) unstable; urgency=low
+ncurses6 (6.3+20220612) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Jun 2022 06:24:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 12 Jun 2022 06:22:30 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 76234c421e6f2c666a0831fc1f2dc4d28a08c77d..241fa075506e08e2d7a4ff137113788272d440dd 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.524 2022/06/04 10:24:10 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.526 2022/06/12 10:22:30 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  "0604"\r
+!define VERSION_MMDD  "0612"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 970e53c031fba05f72460a9238cef255080dc6aa..a3dfd187fe78ac218650b3b16f0e3aab3f54c706 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20220604
+Release: 20220612
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 783aea24d568bb28d5f362d2a40c3cbcfa865df0..04ac5b1853ca86e00184a9f25643279ee39da609 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20220604
+Release: 20220612
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 120f068ce8ba8968102d7a2d35520b0dd69b2867..7260ba20e89f3bc97457f4516de7405831c5fe3f 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20220604
+Release: 20220612
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz