]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.0 - patch 20171223
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 23 Dec 2017 23:06:29 +0000 (23:06 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 23 Dec 2017 23:06:29 +0000 (23:06 +0000)
+ modify ncurses-examples to quiet const-warnings when building with
  PDCurses.
+ modify toe to not exit if unable to read a terminal description,
  e.g., if there is a permission problem.
+ minor fix for progs/toe.c, using _nc_free_termtype2.
+ assign 0 to pointer in _nc_tgetent_leak() after freeing it. Also
  avoid reusing pointer from previous successful call to tgetent
  if the latest call is unsuccessful (patch by Michael Schroeder,
  OpenSuSE #1070450).
+ minor fix for test/tracemunch, initialize $awaiting variable.

15 files changed:
NEWS
VERSION
dist.mk
ncurses/tinfo/lib_termcap.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
progs/toe.c
test/movewindow.c
test/test.priv.h
test/testcurs.c
test/tracemunch

diff --git a/NEWS b/NEWS
index b69571424ca48ddb236bfe46a35be43594e0b73d..aca9d15815316e7f77e1b293b45d05ed6d983f79 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.3025 2017/12/17 00:14:16 tom Exp $
+-- $Id: NEWS,v 1.3030 2017/12/23 21:44:36 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,18 @@ 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.
 
+20171223
+       + modify ncurses-examples to quiet const-warnings when building with
+         PDCurses.
+       + modify toe to not exit if unable to read a terminal description,
+         e.g., if there is a permission problem.
+       + minor fix for progs/toe.c, using _nc_free_termtype2.
+       + assign 0 to pointer in _nc_tgetent_leak() after freeing it. Also
+         avoid reusing pointer from previous successful call to tgetent
+         if the latest call is unsuccessful (patch by Michael Schroeder,
+         OpenSuSE #1070450).
+       + minor fix for test/tracemunch, initialize $awaiting variable.
+
 20171216
        + repair template in test/package/ncurses-examples.spec (cf: 20171111).
        + improve tic's warning about the number of parameters tparm might use
diff --git a/VERSION b/VERSION
index 19de6ac4084d73578f6a9adc6e21ec453ebf6d2f..ae56f4f334eeca3daf637f92167e2b430589e214 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20171216
+5:0:9  6.0     20171223
diff --git a/dist.mk b/dist.mk
index 7bca63ee24bac4b9862d2536cfc14ca30504d128..526040face0cb39693722443471e62f69a2b5421 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.1196 2017/12/11 01:17:12 tom Exp $
+# $Id: dist.mk,v 1.1197 2017/12/17 20:03:11 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 = 0
-NCURSES_PATCH = 20171216
+NCURSES_PATCH = 20171223
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index a8addc6c5e10bd018263e3024f04bd366968a991..ebad5814fc5fffd803e6e6781c58fd738b453184 100644 (file)
@@ -48,7 +48,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_termcap.c,v 1.84 2017/04/11 01:15:11 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.86 2017/12/23 18:18:13 tom Exp $")
 
 NCURSES_EXPORT_VAR(char *) UP = 0;
 NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -153,8 +153,12 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
        }
        CacheInx = best;
     }
-    LAST_TRM = TerminalOf(SP_PARM);
-    LAST_SEQ = ++CacheSeq;
+    if (rc == 1) {
+       LAST_TRM = TerminalOf(SP_PARM);
+       LAST_SEQ = ++CacheSeq;
+    } else {
+       LAST_TRM = 0;
+    }
 
     PC = 0;
     UP = 0;
@@ -401,7 +405,7 @@ _nc_tgetent_leak(TERMINAL *termp)
        int num;
        for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) {
            if (LAST_TRM == termp) {
-               FreeIfNeeded(FIX_SGR0);
+               FreeAndNull(FIX_SGR0);
                if (LAST_TRM != 0) {
                    LAST_TRM = 0;
                }
index fa1baa6969fce43e125fbc24546d9d524778dcb4..b1b43325c87c7d91919e964cf34da4689b760f44 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20171216) unstable; urgency=low
+ncurses6 (6.0+20171223) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 10 Dec 2017 20:17:12 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 17 Dec 2017 15:03:11 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index fa1baa6969fce43e125fbc24546d9d524778dcb4..b1b43325c87c7d91919e964cf34da4689b760f44 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20171216) unstable; urgency=low
+ncurses6 (6.0+20171223) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 10 Dec 2017 20:17:12 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 17 Dec 2017 15:03:11 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index dbeeb14e816cb5fd11d8a1c0a9296314ffa506ec..3312d2051b718f2b9e908fb724e0cbc04ebda834 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20171216) unstable; urgency=low
+ncurses6 (6.0+20171223) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 10 Dec 2017 20:17:12 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 17 Dec 2017 15:03:11 -0500
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index b694cb97b7680f27c13040670b9c0f871a39ae1e..e841a5960c7804547dd2e0d7bf21219c6042b5a3 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.244 2017/12/11 01:17:12 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.245 2017/12/17 20:03:11 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 "0"\r
 !define VERSION_YYYY  "2017"\r
-!define VERSION_MMDD  "1216"\r
+!define VERSION_MMDD  "1223"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 2f78a8e0f7dab35b8002826c58894851d703d6bc..182c3107df407cdd33bcbafa47dd42c53ccf3ed0 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20171216
+Release: 20171223
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 902868724d21d634176dc097a0c3902f35eb19b5..75624e256f570fb3fe3cadc168b95d384b75719e 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20171216
+Release: 20171223
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 030230dcea31061e68b23f564c4c77403afbd4b6..5abb46de1ea90875b9256a63e1ab79b298309933 100644 (file)
@@ -44,7 +44,7 @@
 #include <hashed_db.h>
 #endif
 
-MODULE_ID("$Id: toe.c,v 1.75 2017/04/05 23:19:24 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.77 2017/12/23 19:23:40 tom Exp $")
 
 #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
 
@@ -440,11 +440,8 @@ typelist(int eargc, char *eargv[],
                        (void) fprintf(stderr,
                                       "%s: couldn't open terminfo file %s.\n",
                                       _nc_progname, name_2);
-                       free(cwd_buf);
                        free(name_2);
-                       closedir(entrydir);
-                       closedir(termdir);
-                       return (EXIT_FAILURE);
+                       continue;
                    }
 
                    /* only visit things once, by primary name */
@@ -489,7 +486,7 @@ typelist(int eargc, char *eargv[],
                                cn = _nc_first_name(lterm.term_names);
                                /* apply the selected hook function */
                                hook(i, eargc, cn, &lterm);
-                               _nc_free_termtype(&lterm);
+                               _nc_free_termtype2(&lterm);
                            }
                        }
                        code = _nc_db_next(capdbp, &key, &data);
index 285d92ef73a9ac04de2d690d260ab054ea63a72e..b8e9e049602dcf0298a27ae3c60a418a6e20e44d 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: movewindow.c,v 1.45 2017/09/06 20:08:11 tom Exp $
+ * $Id: movewindow.c,v 1.46 2017/12/23 21:36:59 tom Exp $
  *
  * Demonstrate move functions for windows and derived windows from the curses
  * library.
@@ -54,7 +54,7 @@ TODO:
 #undef derwin
 #endif
 
-#ifdef NCURSES_VERSION
+#if defined(NCURSES_VERSION) || defined(PDCURSES)
 #define CONST_FMT const
 #else
 #define CONST_FMT              /* nothing */
index c2b4bd4695cbee29d83bdc5706bea3210b47e809..fbc1fdb3c510d01a05f94f0ea6f2ebfd383ef5f0 100644 (file)
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.160 2017/10/12 01:00:59 tom Exp $ */
+/* $Id: test.priv.h,v 1.161 2017/12/23 21:40:21 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
@@ -887,8 +887,12 @@ extern char *strnames[], *strcodes[], *strfnames[];
  * that XSI shows.
  */
 #ifndef NCURSES_CONST
+#ifdef PDCURSES
+#define NCURSES_CONST          const /* close enough */
+#else
 #define NCURSES_CONST          /* nothing */
 #endif
+#endif
 
 /* out-of-band values for representing absent capabilities */
 #define ABSENT_BOOLEAN         ((signed char)-1)       /* 255 */
@@ -974,7 +978,7 @@ extern char *tgoto(char *, int, int);       /* available, but not prototyped */
 /*
  * ncurses uses const in some places where X/Open does (or did) not allow.
  */
-#ifdef NCURSES_VERSION
+#if defined(NCURSES_VERSION) || defined(PDCURSES)
 #define CONST_MENUS const
 #else
 #define CONST_MENUS            /* nothing */
index 0a90d8176968801fb50639d8c193f9032e73956d..fd3431ce1d9987234cc7426e808430a104cc0e22 100644 (file)
@@ -6,13 +6,13 @@
  *  wrs(5/28/93) -- modified to be consistent (perform identically) with either
  *                  PDCurses or under Unix System V, R4
  *
- * $Id: testcurs.c,v 1.52 2017/09/04 11:49:55 tom Exp $
+ * $Id: testcurs.c,v 1.53 2017/12/23 21:38:26 tom Exp $
  */
 
 #include <test.priv.h>
 
 #if defined(XCURSES)
-char *XCursesProgramName = "testcurs";
+const char *XCursesProgramName = "testcurs";
 #endif
 
 static int initTest(WINDOW **);
index b33b7d59e0df690213a987ed25f3c30ceedb97e2..1c9314321871f07aa0ef64d4d435af173a507bd9 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# $Id: tracemunch,v 1.16 2017/08/09 23:59:00 tom Exp $
+# $Id: tracemunch,v 1.17 2017/12/23 17:51:31 tom Exp $
 ##############################################################################
 # Copyright (c) 1998-2005,2017 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -92,7 +92,7 @@ sub transaddr {
 while (<STDIN>) {
     my $addr;
     my $n;
-    my $awaiting;
+    my $awaiting = "";
 
   CLASSIFY: {