]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.1 - patch 20190427
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 28 Apr 2019 01:27:21 +0000 (01:27 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 28 Apr 2019 01:27:21 +0000 (01:27 +0000)
+ corrected problem in terminfo load/realignment which prevented
  infocmp from comparing extended capabilities with the same name
  but different types.

NEWS
VERSION
dist.mk
ncurses/tinfo/alloc_ttype.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 572b75b879da70a1fd7800e957c236b563a4ba0d..5169e74f8084fb752e1f37e390a42a7249d1b4d0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3310 2019/04/20 20:23:58 tom Exp $
+-- $Id: NEWS,v 1.3311 2019/04/21 12:57:18 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,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.
 
+20190427
+       + corrected problem in terminfo load/realignment which prevented
+         infocmp from comparing extended capabilities with the same name
+         but different types.
+
 20190420
        + improve ifdef's for TABSIZE variable, to help with AIX/HPUX ports.
 
@@ -150,7 +155,7 @@ it is not possible to add this information.
        + add -p option to test/pair_content, test/color_content to show the
          return values from the tested functions.
        + improve manual page curs_color.3x discussion of error returns and
-         extensions. 
+         extensions.
        + add O_INPUT_FIELD extension to form library (patch by Leon Winter).
        + override/suppress --enable-db-install if --disable-database configure
          option was given.
@@ -168,7 +173,7 @@ it is not possible to add this information.
 20190105
        + add dummy "check" rule in top-level and test-Makefile to simply
          building test-packages for Arch.
-       + modify configure script to avoid conflict with a non-POSIX feature 
+       + modify configure script to avoid conflict with a non-POSIX feature
          that enables all parts of the system headers by default.  Some
          packagers have come to rely upon this behavior (FreeBSD #234049).
        + update config.guess, config.sub
diff --git a/VERSION b/VERSION
index ad875c89b1c170fff663a7cb8c7d1f0d3444ac99..a79ef7e633d0350058f531ca3b9deb41b8732a60 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.1     20190420
+5:0:10 6.1     20190427
diff --git a/dist.mk b/dist.mk
index f8aa05430421f48face60a671ef160925037cc48..ab9a61ce7de5866ffa012adcab5d6cfc22163728 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1279 2019/04/20 15:00:19 tom Exp $
+# $Id: dist.mk,v 1.1280 2019/04/21 12:56:30 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 1
-NCURSES_PATCH = 20190420
+NCURSES_PATCH = 20190427
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 6e830d0fdf003eb17af7664df63286b75a27542e..49169a13ee3fe1b2e7e6dd539f7a6f9451aa9476 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1999-2017,2018 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-2018,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +42,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_ttype.c,v 1.30 2018/04/14 19:24:54 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.31 2019/04/27 23:28:31 tom Exp $")
 
 #if NCURSES_XNAMES
 /*
@@ -61,7 +61,7 @@ merge_names(char **dst, char **a, int na, char **b, int nb)
        } else if (cmp > 0) {
            dst[n++] = *b++;
            nb--;
-       } else if (cmp == 0) {
+       } else {
            dst[n++] = *a;
            a++, b++;
            na--, nb--;
@@ -78,19 +78,27 @@ merge_names(char **dst, char **a, int na, char **b, int nb)
 }
 
 static bool
-find_name(char **table, int length, char *name)
+find_name(char **table, int item, int length, const char *name)
 {
-    while (length-- > 0) {
-       if (!strcmp(*table++, name)) {
-           DEBUG(4, ("found name '%s'", name));
-           return TRUE;
+    int n;
+    int result = -1;
+
+    for (n = item; n < length; ++n) {
+       if (!strcmp(table[n], name)) {
+           DEBUG(4, ("found name '%s' @%d", name, n));
+           result = n;
+           break;
        }
     }
-    DEBUG(4, ("did not find name '%s'", name));
-    return FALSE;
+    if (result < 0) {
+       DEBUG(4, ("did not find name '%s'", name));
+    }
+    return (result >= 0);
 }
 
 #define EXTEND_NUM(num, ext) \
+       DEBUG(4, ("extending " #num " from %d to %d", \
+        to->num, (unsigned short) (to->num + (ext - to->ext)))); \
        to->num = (unsigned short) (to->num + (ext - to->ext))
 
 static void
@@ -100,15 +108,29 @@ realign_data(TERMTYPE2 *to, char **ext_Names,
             int ext_Strings)
 {
     int n, m, base;
-    int limit = (to->ext_Booleans + to->ext_Numbers + to->ext_Strings);
+    int to_Booleans = to->ext_Booleans;
+    int to_Numbers = to->ext_Numbers;
+    int to_Strings = to->ext_Strings;
+    int to1, to2, from;
+
+    DEBUG(4, ("realign_data %d/%d/%d vs %d/%d/%d",
+             ext_Booleans,
+             ext_Numbers,
+             ext_Strings,
+             to->ext_Booleans,
+             to->ext_Numbers,
+             to->ext_Strings));
 
     if (to->ext_Booleans != ext_Booleans) {
+       to1 = 0;
+       to2 = to_Booleans + to1;
+       from = 0;
        EXTEND_NUM(num_Booleans, ext_Booleans);
        TYPE_REALLOC(NCURSES_SBOOL, to->num_Booleans, to->Booleans);
        for (n = to->ext_Booleans - 1,
             m = ext_Booleans - 1,
             base = to->num_Booleans - (m + 1); m >= 0; m--) {
-           if (find_name(to->ext_Names, limit, ext_Names[m])) {
+           if (find_name(to->ext_Names, to1, to2, ext_Names[m + from])) {
                to->Booleans[base + m] = to->Booleans[base + n--];
            } else {
                to->Booleans[base + m] = FALSE;
@@ -118,12 +140,15 @@ realign_data(TERMTYPE2 *to, char **ext_Names,
     }
 
     if (to->ext_Numbers != ext_Numbers) {
+       to1 = to_Booleans;
+       to2 = to_Numbers + to1;
+       from = ext_Booleans;
        EXTEND_NUM(num_Numbers, ext_Numbers);
        TYPE_REALLOC(NCURSES_INT2, to->num_Numbers, to->Numbers);
        for (n = to->ext_Numbers - 1,
             m = ext_Numbers - 1,
             base = to->num_Numbers - (m + 1); m >= 0; m--) {
-           if (find_name(to->ext_Names, limit, ext_Names[m + ext_Booleans])) {
+           if (find_name(to->ext_Names, to1, to2, ext_Names[m + from])) {
                to->Numbers[base + m] = to->Numbers[base + n--];
            } else {
                to->Numbers[base + m] = ABSENT_NUMERIC;
@@ -131,13 +156,17 @@ realign_data(TERMTYPE2 *to, char **ext_Names,
        }
        to->ext_Numbers = UShort(ext_Numbers);
     }
+
     if (to->ext_Strings != ext_Strings) {
+       to1 = to_Booleans + to_Numbers;
+       to2 = to_Strings + to1;
+       from = ext_Booleans + ext_Numbers;
        EXTEND_NUM(num_Strings, ext_Strings);
        TYPE_REALLOC(char *, to->num_Strings, to->Strings);
        for (n = to->ext_Strings - 1,
             m = ext_Strings - 1,
             base = to->num_Strings - (m + 1); m >= 0; m--) {
-           if (find_name(to->ext_Names, limit, ext_Names[m + ext_Booleans + ext_Numbers])) {
+           if (find_name(to->ext_Names, to1, to2, ext_Names[m + from])) {
                to->Strings[base + m] = to->Strings[base + n--];
            } else {
                to->Strings[base + m] = ABSENT_STRING;
index 1bf383a8b4482817e57abb4fd1bb5fcbb27ada92..5dac05f83f8672c6d7f103f4fde917bf6de3b7d0 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190420) unstable; urgency=low
+ncurses6 (6.1+20190427) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 20 Apr 2019 11:00:19 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 21 Apr 2019 08:56:30 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 1bf383a8b4482817e57abb4fd1bb5fcbb27ada92..5dac05f83f8672c6d7f103f4fde917bf6de3b7d0 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190420) unstable; urgency=low
+ncurses6 (6.1+20190427) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 20 Apr 2019 11:00:19 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 21 Apr 2019 08:56:30 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 008725cd92924f8dc09622fa46a498ea903f3072..a7fed8cf16e588d7d510eadc3f161affb35f14e3 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190420) unstable; urgency=low
+ncurses6 (6.1+20190427) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 20 Apr 2019 11:00:19 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 21 Apr 2019 08:56:30 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 04703cf9bc770e48ed85f555244311a11112151c..cc30424f113e49f504fa5becbb2ebde14ac9711d 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.325 2019/04/20 15:00:19 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.326 2019/04/21 12:56: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 "1"\r
 !define VERSION_YYYY  "2019"\r
-!define VERSION_MMDD  "0420"\r
+!define VERSION_MMDD  "0427"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 927e2438a6c6165fd16f75e294da777a6d080f47..cab83d3c9c34f893aedf3c14272ad4bd5df7b32e 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.1
-Release: 20190420
+Release: 20190427
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 2c2dad13e16af8b8b9f4ec105653a07c14732de4..893e2e6456b6e6c87ccecd27828f8e8e9a8f89f4 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.1
-Release: 20190420
+Release: 20190427
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index a0faa12e2fff9117705570b362379576fe1a5da5..1cb27871a0037071dc50ff7e82359e03149f111b 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.1
-Release: 20190420
+Release: 20190427
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz