OSDN Git Service

ncurses 6.2 - patch 20200907
authorThomas E. Dickey <dickey@invisible-island.net>
Mon, 7 Sep 2020 23:37:37 +0000 (23:37 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Mon, 7 Sep 2020 23:37:37 +0000 (23:37 +0000)
+ fix regression in setupterm validating non-empty $TERM (report by
  Soren Tempel).

14 files changed:
NEWS
VERSION
dist.mk
include/nc_win32.h
ncurses/base/lib_initscr.c
ncurses/curses.priv.h
ncurses/tinfo/lib_setup.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 b81abe7..d3fbc83 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.3556 2020/09/06 20:05:44 tom Exp $
+-- $Id: NEWS,v 1.3558 2020/09/07 16:47:17 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,10 @@ 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.
 
+20200907
+       + fix regression in setupterm validating non-empty $TERM (report by
+         Soren Tempel).
+
 20200906
        + merge/adapt in-progress work by Juergen Pfeifer for new version of
          win32-driver.
diff --git a/VERSION b/VERSION
index 074a917..2fc48a8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20200906
+5:0:10 6.2     20200907
diff --git a/dist.mk b/dist.mk
index 382761a..c6edb9e 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.1373 2020/09/06 20:05:44 tom Exp $
+# $Id: dist.mk,v 1.1374 2020/09/07 14:22:04 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 = 20200906
+NCURSES_PATCH = 20200907
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 8fa3986..1a0ba49 100644 (file)
@@ -31,7 +31,7 @@
  * Author: Thomas Dickey, 2008-on                                           *
  ****************************************************************************/
 
-/* $Id: nc_win32.h,v 1.7 2020/09/06 20:53:55 tom Exp $ */
+/* $Id: nc_win32.h,v 1.8 2020/09/07 14:27:05 tom Exp $ */
 
 #ifndef NC_WIN32_H
 #define NC_WIN32_H 1
@@ -107,15 +107,15 @@ extern NCURSES_EXPORT(int)    _nc_console_vt_supported(void);
 extern NCURSES_EXPORT(int)    _nc_console_checkmintty(int fd, LPHANDLE pMinTTY);
 #endif
 
-#undef CHECK_TERM_ENV
+#undef VALID_TERM_ENV
 #define MS_TERMINAL "ms-terminal"
-#define CHECK_TERM_ENV(term_env, no_terminal) \
+#define VALID_TERM_ENV(term_env, no_terminal) \
        (term_env = (NonEmpty(term_env) \
                      ? term_env \
                      : (_nc_console_vt_supported() \
                         ? MS_TERMINAL \
                         : no_terminal)), \
-        !NonEmpty(term_env))
+        NonEmpty(term_env))
 
   /*
    * Various Console mode definitions
index f663819..6b91491 100644 (file)
@@ -46,7 +46,7 @@
 #include <sys/termio.h>                /* needed for ISC */
 #endif
 
-MODULE_ID("$Id: lib_initscr.c,v 1.47 2020/09/06 20:48:55 tom Exp $")
+MODULE_ID("$Id: lib_initscr.c,v 1.48 2020/09/07 14:26:48 tom Exp $")
 
 NCURSES_EXPORT(WINDOW *)
 initscr(void)
@@ -67,7 +67,7 @@ initscr(void)
        _nc_globals.init_screen = TRUE;
 
        env = getenv("TERM");
-       (void) CHECK_TERM_ENV(env, "unknown");
+       (void) VALID_TERM_ENV(env, "unknown");
 
        if ((name = strdup(env)) == NULL) {
            fprintf(stderr, "Error opening allocating $TERM.\n");
index 1390221..0fea513 100644 (file)
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.636 2020/09/06 20:53:41 tom Exp $
+ * $Id: curses.priv.h,v 1.637 2020/09/07 14:27:13 tom Exp $
  *
  *     curses.priv.h
  *
@@ -297,11 +297,11 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
 #define NO_TERMINAL 0
 #endif
 
-#define CHECK_TERM_ENV(term_env, no_terminal) \
+#define VALID_TERM_ENV(term_env, no_terminal) \
        (term_env = (NonEmpty(term_env) \
                     ? term_env \
                     : no_terminal), \
-        !NonEmpty(term_env))
+        NonEmpty(term_env))
 
 /*
  * Note:  ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
index 73e5a32..19c6535 100644 (file)
@@ -49,7 +49,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.210 2020/09/06 21:03:33 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.211 2020/09/07 16:37:19 tom Exp $")
 
 /****************************************************************************
  *
@@ -663,12 +663,17 @@ TINFO_SETUP_TERM(TERMINAL **tp,
 
     if (tname == 0) {
        tname = getenv("TERM");
-#if defined(USE_TERM_DRIVER) && !defined(EXP_WIN32_DRIVER)
+#if defined(EXP_WIN32_DRIVER)
+       if (!VALID_TERM_ENV(tname, NO_TERMINAL)) {
+           T(("Failure with TERM=%s", NonNull(tname)));
+           ret_error0(TGETENT_ERR, "TERM environment variable not set.\n");
+       }
+#elif defined(USE_TERM_DRIVER)
        if (!NonEmpty(tname))
            tname = "unknown";
 #else
-       if (!CHECK_TERM_ENV(tname, NO_TERMINAL)) {
-           T(("Failure with TERM=%s", tname));
+       if (!NonEmpty(tname)) {
+           T(("Failure with TERM=%s", NonNull(tname)));
            ret_error0(TGETENT_ERR, "TERM environment variable not set.\n");
        }
 #endif
index 81f939b..63fc433 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20200906) unstable; urgency=low
+ncurses6 (6.2+20200907) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 06 Sep 2020 16:05:44 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 07 Sep 2020 10:22:04 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 81f939b..63fc433 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20200906) unstable; urgency=low
+ncurses6 (6.2+20200907) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 06 Sep 2020 16:05:44 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 07 Sep 2020 10:22:04 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index fbfc23d..7a244ad 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20200906) unstable; urgency=low
+ncurses6 (6.2+20200907) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 06 Sep 2020 16:05:44 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 07 Sep 2020 10:22:04 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index fcc75b5..8305862 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.417 2020/09/06 20:05:44 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.418 2020/09/07 14:22:04 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  "0906"\r
+!define VERSION_MMDD  "0907"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index fa77f55..fd755ce 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20200906
+Release: 20200907
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index a665987..44c7e6f 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20200906
+Release: 20200907
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 37aae7a..fdf1bc7 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20200906
+Release: 20200907
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz