]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.2 - patch 20200411
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Apr 2020 01:22:49 +0000 (01:22 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Apr 2020 01:22:49 +0000 (01:22 +0000)
+ fix find_pair(), overlooked when refactoring for _nc_reserve_pairs()
  (report/testcase by Brad Town, cf: 20170812).
+ add a trailing null for magic-string in putwin, flagged by gcc 10
+ update check for gcc version versus gnat to work with gcc 10.x

14 files changed:
NEWS
VERSION
configure
dist.mk
ncurses/base/lib_screen.c
ncurses/base/new_pair.c
ncurses/new_pair.h
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 0af90c5bd0f751d9bdfcb98328837b06ef1f7aa1..ec05495936a43ed6eb6dfb20b32f2c65fb087d70 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.3471 2020/04/04 21:07:47 tom Exp $
+-- $Id: NEWS,v 1.3475 2020/04/11 17:01:12 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.
 
+20200411
+       + fix find_pair(), overlooked when refactoring for _nc_reserve_pairs()
+         (report/testcase by Brad Town, cf: 20170812).
+       + add a trailing null for magic-string in putwin, flagged by gcc 10
+       + update check for gcc version versus gnat to work with gcc 10.x
+
 20200404
        + modify -fvisibility check to work with g++
        > fixes for building with Visual Studio C++ and msys2 (patches by
diff --git a/VERSION b/VERSION
index b8883445eb3f75eb661091e15f39dd9dad4579df..570cd2b2396190fc16aee436bc72f708829095ad 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20200404
+5:0:10 6.2     20200411
index d0174d0cf511bd37691cd3dba1e21f2329b2d860..dde5a1b0f52997fa5614c84be445a7112b3df1e6 100755 (executable)
--- a/configure
+++ b/configure
@@ -24744,7 +24744,7 @@ echo "${ECHO_T}$cf_cv_gnat_version" >&6
 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
 
 case $cf_cv_gnat_version in
-(3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
+(3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]|[1-9][0-9].*)
        cf_cv_prog_gnat_correct=yes
        ;;
 (*)
diff --git a/dist.mk b/dist.mk
index ebf85c8ed0eb0d9ae28386dcd0ed7881ea80a34c..a186c9f852da65b1fa8934f9b75f3af98ad766c0 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.1344 2020/04/04 09:17:00 tom Exp $
+# $Id: dist.mk,v 1.1345 2020/04/11 13:11: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 = 2
-NCURSES_PATCH = 20200404
+NCURSES_PATCH = 20200411
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 164356dc41de6b55d38f10ff087aa4efb5b2613a..fd22cd51232a6648c3626d8daf00789a98d27703 100644 (file)
@@ -42,7 +42,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_screen.c,v 1.97 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.98 2020/04/06 00:33:50 tom Exp $")
 
 #define MAX_SIZE 0x3fff                /* 16k is big enough for a window or pad */
 
@@ -67,7 +67,7 @@ MODULE_ID("$Id: lib_screen.c,v 1.97 2020/02/02 23:34:34 tom Exp $")
  * format.  It happens to be unused in the file 5.22 database (2015/03/07).
  */
 static const char my_magic[] =
-{'\210', '\210', '\210', '\210'};
+{'\210', '\210', '\210', '\210', 0};
 
 #if NCURSES_EXT_PUTWIN
 typedef enum {
index 547ab28180668bed49f2562ef8f91640680d3886..92131232e8695edf52b51f8902fac008176ef61c 100644 (file)
@@ -61,7 +61,7 @@
 
 #endif
 
-MODULE_ID("$Id: new_pair.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: new_pair.c,v 1.20 2020/04/11 16:06:56 tom Exp $")
 
 #if NCURSES_EXT_COLORS
 
@@ -144,17 +144,16 @@ static int
 _nc_find_color_pair(SCREEN *sp, int fg, int bg)
 {
     colorpair_t find;
-    int result;
+    int result = -1;
     void *pp;
 
     find.fg = fg;
     find.bg = bg;
-    if (sp != 0 &&
-       (pp = tfind(&find, &sp->_ordered_pairs, compare_data)) != 0) {
-       colorpair_t *temp = *(colorpair_t **) pp;
-       result = (int) (temp - sp->_color_pairs);
-    } else {
-       result = -1;
+    if (sp != 0) {
+       if ((pp = tfind(&find, &sp->_ordered_pairs, compare_data)) != 0) {
+           colorpair_t *temp = *(colorpair_t **) pp;
+           result = (int) (temp - sp->_color_pairs);
+       }
     }
     return result;
 }
@@ -197,7 +196,10 @@ NCURSES_EXPORT(void)
 _nc_reset_color_pair(SCREEN *sp, int pair, colorpair_t * next)
 {
     colorpair_t *last;
+
     if (ValidPair(sp, pair)) {
+       bool used;
+
        ReservePairs(sp, pair);
        last = &(sp->_color_pairs[pair]);
        delink_color_pair(sp, pair);
@@ -205,6 +207,11 @@ _nc_reset_color_pair(SCREEN *sp, int pair, colorpair_t * next)
            (last->fg != next->fg || last->bg != next->bg)) {
            /* remove the old entry from fast index */
            tdelete(last, &sp->_ordered_pairs, compare_data);
+           used = FALSE;
+       } else {
+           used = (last->mode != cpFREE);
+       }
+       if (!used) {
            /* create a new entry in fast index */
            *last = *next;
            tsearch(last, &sp->_ordered_pairs, compare_data);
index 811abc11442b3395ee9928f1eb902fe6c2801ee5..dfda890772072e6eded861b1505eba242fabecf3 100644 (file)
@@ -34,7 +34,7 @@
 /*
  * Common type definitions and macros for new_pair.c, lib_color.c
  *
- * $Id: new_pair.h,v 1.10 2020/02/02 23:34:34 tom Exp $
+ * $Id: new_pair.h,v 1.11 2020/04/11 16:43:47 tom Exp $
  */
 
 #ifndef NEW_PAIR_H
@@ -77,8 +77,7 @@
 typedef enum {
     cpKEEP = -1,               /* color pair 0 */
     cpFREE = 0,                        /* free for use */
-    cpINIT = 1,                        /* init_pair() */
-    cpAUTO = 1                 /* alloc_pair() */
+    cpINIT = 1                 /* initialized */
 } CPMODE;
 
 typedef struct _color_pairs
index ae92601d53e142449c9ea1efbe0d3b4c270ccb53..a2d3d3049a9e7c04154c69c1512abe426896176e 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20200404) unstable; urgency=low
+ncurses6 (6.2+20200411) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Apr 2020 05:17:00 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Apr 2020 09:11:52 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index ae92601d53e142449c9ea1efbe0d3b4c270ccb53..a2d3d3049a9e7c04154c69c1512abe426896176e 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20200404) unstable; urgency=low
+ncurses6 (6.2+20200411) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Apr 2020 05:17:00 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Apr 2020 09:11:52 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 3412c6f120ddb5d2f4f91b8ffd91537704f82e74..13d22d0f27787b5357e0d2897c2e9d326a61a92c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20200404) unstable; urgency=low
+ncurses6 (6.2+20200411) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 04 Apr 2020 05:17:00 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Apr 2020 09:11:52 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index c39f852b1820283c9e453e1cdb091e64953c2e45..2d891b1922a78a8d417f86252254240addc172a7 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.388 2020/04/04 09:17:00 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.389 2020/04/11 13:11: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 "2"\r
 !define VERSION_YYYY  "2020"\r
-!define VERSION_MMDD  "0404"\r
+!define VERSION_MMDD  "0411"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index bbadd32957c12810f3ab225d2876f6610a436436..083b9448bd8d4116f3265b34f874d717496f68a9 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20200404
+Release: 20200411
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 0668b14787f6f3fbfd7dc826867e73482522a1c6..6d9f928d7e438833ef27cc1ff0308e5aeebe1ffe 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20200404
+Release: 20200411
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 7a3339f2ae6aaa5ae0cdff558fc0d1a5595c697c..fcb76d018dcd562d2e8b218010791c94fb9a4904 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20200404
+Release: 20200411
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz