]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.2 - patch 20210417
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 18 Apr 2021 01:15:31 +0000 (01:15 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 18 Apr 2021 01:15:31 +0000 (01:15 +0000)
+ extend --disable-pkg-ldflags option to also control whether $LDFLAGS
  from the build is provided in -config and .pc files (Debian #986764).
+ fix some cppcheck warnings, mostly style, in ncurses and c++
  libraries and progs directory.
+ fix off-by-one limit for tput's processing command-line arguments
  (patch by Hadrien Lacour).

32 files changed:
INSTALL
NEWS
VERSION
c++/cursesf.cc
c++/cursesf.h
c++/cursesm.cc
c++/cursesp.h
c++/cursesw.h
c++/cursslk.h
c++/etip.h.in
configure
configure.in
dist.mk
misc/gen-pkgconfig.in
misc/ncurses-config.in
ncurses/base/lib_set_term.c
ncurses/tinfo/lib_print.c
ncurses/widechar/lib_get_wch.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
progs/Makefile.in
progs/dump_entry.c
progs/infocmp.c
progs/modules
progs/tic.c
progs/tput.c
test/ditto.c

diff --git a/INSTALL b/INSTALL
index 7ce88a72bdd499a335eb282cf1f59fdfa9e6774c..dddedd1149c2c344bd11971cdfa7f79d89796e1b 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: INSTALL,v 1.228 2021/03/23 00:42:13 tom Exp $
+-- $Id: INSTALL,v 1.229 2021/04/17 22:26:34 tom Exp $
 ---------------------------------------------------------------------
              How to install Ncurses/Terminfo on your system
 ---------------------------------------------------------------------
@@ -453,8 +453,8 @@ CONFIGURE OPTIONS:
                --with-panel-libname=npanel
 
     --disable-pkg-ldflags
-       Omit options in $EXTRA_LDFLAGS from the pkg-config ".pc" and
-       corresponding ncurses*-config script which normally are listed via
+       Omit options in $LDFLAGS and $EXTRA_LDFLAGS from the pkg-config ".pc"
+       and corresponding ncurses*-config script which normally are listed via
        the "--libs" option.  These options are normally used to facilitate
        linking to ncurses when it was configured to use the rpath feature.
 
diff --git a/NEWS b/NEWS
index 4748265f6b92188feec7d93b2b6fa76b54835d3b..1d0d1983fb9169e635959f68581540f7b86b989b 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.3650 2021/04/03 22:44:41 tom Exp $
+-- $Id: NEWS,v 1.3653 2021/04/17 22:26:02 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,14 @@ 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.
 
+20210417
+       + extend --disable-pkg-ldflags option to also control whether $LDFLAGS
+         from the build is provided in -config and .pc files (Debian #986764).
+       + fix some cppcheck warnings, mostly style, in ncurses and c++
+         libraries and progs directory.
+       + fix off-by-one limit for tput's processing command-line arguments
+         (patch by Hadrien Lacour).
+
 20210403
        + fix some cppcheck warnings, mostly style, in ncurses library and
          progs directory.
diff --git a/VERSION b/VERSION
index 4be3b80b9e150f43e50eb89b2c9189ce4e8a99e7..057ef076efc0a32c5a70efe352e14284d1951103 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20210403
+5:0:10 6.2     20210417
index fcf0080f9db5bfd1cdade3b4fa72a3455ccad2f5..5d316489ea00faf7faa46b59c5f0871bfb83715f 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2005,2011 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -36,7 +36,7 @@
 #include "cursesf.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursesf.cc,v 1.25 2020/07/18 19:57:11 anonymous.maarten Exp $")
+MODULE_ID("$Id: cursesf.cc,v 1.26 2021/04/17 18:11:08 tom Exp $")
 
 NCursesFormField::~NCursesFormField () THROWS(NCursesException)
 {
@@ -285,15 +285,15 @@ NCursesFormField*
 NCursesForm::operator()(void)
 {
   int drvCmnd;
-  int err;
   int c;
 
   post();
   show();
   refresh();
 
-  while (((drvCmnd = virtualize((c=getKey()))) != CMD_QUIT)) {
-    switch((err=driver(drvCmnd))) {
+  while (((drvCmnd = virtualize((c = getKey()))) != CMD_QUIT)) {
+    int err;
+    switch((err = driver(drvCmnd))) {
     case E_REQUEST_DENIED:
       On_Request_Denied(c);
       break;
index c7000948e16e6684bb99dc82dac4987e8b41cfd8..ea1aaf0d1536f0f8eba2bb855760e57a8f252d47 100644 (file)
@@ -1,6 +1,7 @@
 // * This makes emacs happy -*-Mode: C++;-*-
+// vile:cppmode
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2012,2014 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -32,7 +33,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursesf.h,v 1.37 2020/07/18 19:57:11 anonymous.maarten Exp $
+// $Id: cursesf.h,v 1.38 2021/04/17 18:11:08 tom Exp $
 
 #ifndef NCURSES_CURSESF_H_incl
 #define NCURSES_CURSESF_H_incl 1
@@ -731,7 +732,7 @@ private:
   }
 
 public:
-  Alpha_Field(int width)
+  explicit Alpha_Field(int width)
     : NCursesFieldType(TYPE_ALPHA),
       min_field_width(width) {
   }
@@ -747,7 +748,7 @@ private:
   }
 
 public:
-  Alphanumeric_Field(int width)
+  explicit Alphanumeric_Field(int width)
     : NCursesFieldType(TYPE_ALNUM),
       min_field_width(width) {
   }
@@ -805,7 +806,7 @@ private:
   }
 
 public:
-  Regular_Expression_Field(const char *expr)
+  explicit Regular_Expression_Field(const char *expr)
     : NCursesFieldType(TYPE_REGEXP),
       regex(NULL)
   {
index 2215a16891c6851b6f5196349349289ef7ae4f8d..64f36358cd9980a0c649a718adf534d6d9239b6f 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2011,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -36,7 +36,7 @@
 #include "cursesm.h"
 #include "cursesapp.h"
 
-MODULE_ID("$Id: cursesm.cc,v 1.26 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: cursesm.cc,v 1.27 2021/04/17 18:11:08 tom Exp $")
 
 NCursesMenuItem::~NCursesMenuItem() THROWS(NCursesException)
 {
@@ -301,7 +301,6 @@ NCursesMenuItem*
 NCursesMenu::operator()(void)
 {
   int drvCmnd;
-  int err;
   int c;
   bool b_action = FALSE;
 
@@ -309,9 +308,10 @@ NCursesMenu::operator()(void)
   show();
   refresh();
 
-  while (!b_action && ((drvCmnd = virtualize((c=getKey()))) != CMD_QUIT)) {
+  while (!b_action && ((drvCmnd = virtualize((c = getKey()))) != CMD_QUIT)) {
+    int err;
 
-    switch((err=driver(drvCmnd))) {
+    switch((err = driver(drvCmnd))) {
     case E_REQUEST_DENIED:
       On_Request_Denied(c);
       break;
index eb9111b7aedd2ae82b06e6864a96aa78b599ba07..1eb90e9535484ca7c54b3c2e3e6fccec50dbbb9f 100644 (file)
@@ -1,6 +1,7 @@
 // * This makes emacs happy -*-Mode: C++;-*-
+// vile:cppmode
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2012,2014 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -35,7 +36,7 @@
 #ifndef NCURSES_CURSESP_H_incl
 #define NCURSES_CURSESP_H_incl 1
 
-// $Id: cursesp.h,v 1.34 2020/05/24 01:40:20 anonymous.maarten Exp $
+// $Id: cursesp.h,v 1.35 2021/04/17 18:11:08 tom Exp $
 
 #include <cursesw.h>
 
@@ -243,7 +244,7 @@ public:
   // This creates an user panel of the requested size with associated
   // user data pointed to by p_UserData.
 
-  NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
+  explicit NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
   {
     if (p)
       set_user(const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
index 602b7a9650912544cac6ad385dc1324d8c1b5a94..001f6dbcab4c75afd725bc68023fd730795d2367 100644 (file)
@@ -1,7 +1,7 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 // vile:cppmode
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2014,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -32,7 +32,7 @@
 #ifndef NCURSES_CURSESW_H_incl
 #define NCURSES_CURSESW_H_incl 1
 
-// $Id: cursesw.h,v 1.57 2020/07/04 20:38:43 tom Exp $
+// $Id: cursesw.h,v 1.58 2021/04/17 18:11:08 tom Exp $
 
 extern "C" {
 #  include   <curses.h>
@@ -816,7 +816,7 @@ protected:
   NCursesWindow();
 
 public:
-  NCursesWindow(WINDOW* window);   // useful only for stdscr
+  explicit NCursesWindow(WINDOW* window);   // useful only for stdscr
 
   NCursesWindow(int nlines,        // number of lines
                int ncols,         // number of columns
@@ -1385,7 +1385,7 @@ public:
 class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow
 {
 public:
-  NCursesColorWindow(WINDOW* &window)   // useful only for stdscr
+  explicit NCursesColorWindow(WINDOW* &window)   // useful only for stdscr
     : NCursesWindow(window) {
       useColors(); }
 
index 4a34400916d38f830c1c52140a7e19ecdc9ba8b0..66564fe3a479d0d09626f5a8dd03e1fea0889ccf 100644 (file)
@@ -1,6 +1,7 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
+// vile:cppmode
 /****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey                                     *
+ * Copyright 2019-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2003,2005 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -32,7 +33,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursslk.h,v 1.18 2020/07/18 19:57:11 anonymous.maarten Exp $
+// $Id: cursslk.h,v 1.19 2021/04/17 18:11:08 tom Exp $
 
 #ifndef NCURSES_CURSSLK_H_incl
 #define NCURSES_CURSSLK_H_incl
@@ -140,7 +141,7 @@ public:
   // You must create a Soft_Label_Key_Set before you create any object of
   // the NCursesWindow, NCursesPanel or derived classes. (Actually before
   // ::initscr() is called).
-  Soft_Label_Key_Set(Label_Layout fmt);
+  explicit Soft_Label_Key_Set(Label_Layout fmt);
 
   // This constructor assumes, that you already constructed a Key Set
   // with a layout by the constructor above. This layout will be reused.
index 6dc41042e61d6c3e33623dcb8b78b7ac4675bdce..3ce19e8e0f3732e29be1794635877b57e63b102a 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2012,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -32,7 +32,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: etip.h.in,v 1.45 2020/05/24 01:40:20 anonymous.maarten Exp $
+// $Id: etip.h.in,v 1.46 2021/04/17 17:59:57 tom Exp $
 
 #ifndef NCURSES_ETIP_H_incl
 #define NCURSES_ETIP_H_incl 1
@@ -154,12 +154,13 @@ public:
     : message(msg), errorno (err)
     {};
 
-  NCursesException (const char* msg)
+  explicit NCursesException (const char* msg)
     : message(msg), errorno (E_SYSTEM_ERROR)
     {};
 
   NCursesException& operator=(const NCursesException& rhs)
   {
+    message = rhs.message;
     errorno = rhs.errorno;
     return *this;
   }
@@ -195,7 +196,7 @@ public:
     p (panel)
     {};
 
-  NCursesPanelException (int err) :
+  explicit NCursesPanelException (int err) :
     NCursesException ("panel library error", err),
     p (0)
     {};
@@ -246,7 +247,7 @@ public:
     m (menu)
     {};
 
-  NCursesMenuException (int err) :
+  explicit NCursesMenuException (int err) :
     NCursesException ("menu library error", err),
     m (0)
     {};
@@ -297,7 +298,7 @@ public:
     f (form)
     {};
 
-  NCursesFormException (int err) :
+  explicit NCursesFormException (int err) :
     NCursesException ("form library error", err),
     f (0)
     {};
index a5afbc1f7b16aef01ddff23c9208cf0c553f2593..2a4fe9b2529be3f08953996d647cdedbfc892d28 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.729 .
+# From configure.in Revision: 1.730 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by Autoconf 2.52.20210105.
 #
@@ -8139,7 +8139,7 @@ fi
 ### Depending on the system, someone may use rpath to build ncurses but not
 # want users of the package to rely upon that feature.  Give those people an
 # option to suppress that detail from EXTRA_LDFLAGS.
-EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
+EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
 if test -n "$EXTRA_PKG_LDFLAGS"
 then
        echo "$as_me:8145: checking if you want to disable extra LDFLAGS for package-scripts" >&5
index f2013a9fbbe958df4790ed4df72d5f9fbd31b4f9..7d8e69539bbda1ff09a3b7e675825392f5491ab2 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.729 2021/01/09 11:20:52 tom Exp $
+dnl $Id: configure.in,v 1.730 2021/04/17 22:22:17 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl For additional information, see
@@ -38,7 +38,7 @@ dnl     https://invisible-island.net/autoconf/my-autoconf.html
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.52.20210101)
-AC_REVISION($Revision: 1.729 $)
+AC_REVISION($Revision: 1.730 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -553,7 +553,7 @@ fi
 ### Depending on the system, someone may use rpath to build ncurses but not
 # want users of the package to rely upon that feature.  Give those people an
 # option to suppress that detail from EXTRA_LDFLAGS.
-EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
+EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
 if test -n "$EXTRA_PKG_LDFLAGS"
 then
        AC_MSG_CHECKING(if you want to disable extra LDFLAGS for package-scripts)
diff --git a/dist.mk b/dist.mk
index bf685d68ed51873a54f722c012356c63d0a421ee..22671b59529a5a6f49e6c1eb8c8aed7899afda28 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.1408 2021/04/03 12:37:45 tom Exp $
+# $Id: dist.mk,v 1.1410 2021/04/17 10:16:06 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 = 20210403
+NCURSES_PATCH = 20210417
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 1fc0a02093a624f348bda6b9158a88dd92b34a0e..d7c947a7bd57dfe2ae99aea4c183d9c92e8742fe 100644 (file)
@@ -1,5 +1,5 @@
 #!@SHELL@
-# $Id: gen-pkgconfig.in,v 1.50 2021/03/27 20:26:16 tom Exp $
+# $Id: gen-pkgconfig.in,v 1.51 2021/04/17 22:22:29 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2009-2015,2018 Free Software Foundation, Inc.                    #
@@ -83,7 +83,7 @@ if [ "$includedir" != "/usr/include" ]; then
 fi
 
 lib_flags=
-for opt in -L$libdir @LDFLAGS@ @EXTRA_PKG_LDFLAGS@ @LIBS@
+for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@
 do
        case $opt in
        -l*) # LIBS is handled specially below
index f4fd4101aaba0ebe72af96b07234724cc52bd5a4..c6851ebd206f23d28c723f29f1cd8d648bdf9814 100644 (file)
@@ -1,5 +1,5 @@
 #!@SHELL@
-# $Id: ncurses-config.in,v 1.47 2021/03/27 20:26:04 tom Exp $
+# $Id: ncurses-config.in,v 1.48 2021/04/17 22:22:52 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2006-2015,2017 Free Software Foundation, Inc.                    #
@@ -101,7 +101,7 @@ fi
 # There is no portable way to find the list of standard library directories. 
 # Require a POSIX shell anyway, to keep this simple.
 lib_flags=
-for opt in -L$libdir @LDFLAGS@ @EXTRA_PKG_LDFLAGS@ $LIBS
+for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ $LIBS
 do
        case $opt in
        -specs*) # ignore linker specs-files which were used to build library
index f1d49a93be4d649a15a6fcb59deb22f508ac23cd..c2751ec4853ba9559a9e22090125087e88604a77 100644 (file)
@@ -54,7 +54,7 @@
 #undef CUR
 #define CUR SP_TERMTYPE
 
-MODULE_ID("$Id: lib_set_term.c,v 1.176 2021/04/03 22:23:39 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.177 2021/04/17 15:04:41 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -147,8 +147,8 @@ delscreen(SCREEN *sp)
     _nc_lock_global(curses);
     if (delink_screen(sp)) {
 #ifdef USE_SP_RIPOFF
-       ripoff_t *rop;
        if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) {
+           ripoff_t *rop;
            for (rop = safe_ripoff_stack;
                 rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS;
                 rop++) {
index 4accdf6786ea7a7701955d3b5f852e8e82165bff..c256ba9989b350adafd5c647ba57c8c5aed4ec10 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2011,2012 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -40,7 +40,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_print.c,v 1.28 2020/08/29 16:22:03 juergen Exp $")
+MODULE_ID("$Id: lib_print.c,v 1.29 2021/04/17 16:12:54 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
@@ -73,6 +73,7 @@ NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
 
     if (switchon == 0
        || (mybuf = typeMalloc(char, need + 1)) == 0) {
+       free(mybuf);
        errno = ENOMEM;
        return (ERR);
     }
index 2bd49187aa125d766ba9f200670543e5884f328c..9f10d3bcf121063a791e411602c3801d699e5650 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 2002-2011,2016 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -41,7 +41,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_get_wch.c,v 1.25 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_get_wch.c,v 1.26 2021/04/17 16:12:54 tom Exp $")
 
 NCURSES_EXPORT(int)
 wget_wch(WINDOW *win, wint_t *result)
@@ -49,7 +49,6 @@ wget_wch(WINDOW *win, wint_t *result)
     SCREEN *sp;
     int code;
     int value = 0;
-    wchar_t wch;
 #ifndef state_unused
     mbstate_t state;
 #endif
@@ -98,6 +97,7 @@ wget_wch(WINDOW *win, wint_t *result)
                reset_mbytes(state);
                status = count_mbytes(buffer, count, state);
                if (status >= 0) {
+                   wchar_t wch;
                    reset_mbytes(state);
                    if (check_mbytes(wch, buffer, count, state) != status) {
                        code = ERR;     /* the two calls should match */
index b79216ab5a44755d3264e6fcf9db100fcdbadc2a..1937d00f58a1a0737b44aa24b789b7965aecd5fe 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210403) unstable; urgency=low
+ncurses6 (6.2+20210417) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Apr 2021 08:37:45 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 17 Apr 2021 06:16:07 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index b79216ab5a44755d3264e6fcf9db100fcdbadc2a..1937d00f58a1a0737b44aa24b789b7965aecd5fe 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210403) unstable; urgency=low
+ncurses6 (6.2+20210417) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Apr 2021 08:37:45 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 17 Apr 2021 06:16:07 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 52dae30982c4845351f03a2882835a8b8aa5c457..93f56b65c6feecb0b270e4e63dbb690448eebed0 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210403) unstable; urgency=low
+ncurses6 (6.2+20210417) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 03 Apr 2021 08:37:45 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 17 Apr 2021 06:16:07 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 0ddc71d00fa1a578c42de3c33ec029f72e5faf38..809f13560f9946469a813f769c7e75819859743a 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.451 2021/04/03 12:37:45 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.453 2021/04/17 10:16:06 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  "2021"\r
-!define VERSION_MMDD  "0403"\r
+!define VERSION_MMDD  "0417"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index d993e9dbe48bad28b35a85b092977438f1a0a89c..5617c041c09d91761c7aa9a0695a148640e4646f 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20210403
+Release: 20210417
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 8b431af2e33e7b68dac43ae113c5b71b90c9480a..1f92c3d46da18c19eee4aee3bf61c796460b7870 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20210403
+Release: 20210417
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 422cbe28257fd896220b6a5c19964877305fba0f..4eee924c4501029561a7f4e24a6343fdfa1bb7ae 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20210403
+Release: 20210417
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 1511ec271210bd394ae17c2bdbbb6bb67039752f..f2378d991e2fa2f3b005295ecb31515dec568406 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.108 2021/01/23 20:42:08 tom Exp $
+# $Id: Makefile.in,v 1.109 2021/04/17 15:32:22 tom Exp $
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2016,2018 Free Software Foundation, Inc.                    #
@@ -329,12 +329,12 @@ $(DEPS_CURSES) :
 
 lint:
 @MAKE_TERMINFO@        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tic.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
-@MAKE_TERMINFO@        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c     $(srcdir)/dump_entry.c $(LINT_LIBS)
+@MAKE_TERMINFO@        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c                    $(LINT_LIBS)
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c                          $(LINT_LIBS)
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tabs.c                           $(LINT_LIBS)
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
-       $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c    $(srcdir)/dump_entry.c $(LINT_LIBS)
+       $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c                           $(LINT_LIBS)
 
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
index acafaf76c076499ac05637b1e636d1a3e02d9565..2bc83ba1f024ef96594b8c8df37be451ef2caaac 100644 (file)
@@ -40,7 +40,7 @@
 #include "termsort.c"          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.184 2021/04/03 23:01:08 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.185 2021/04/17 15:24:04 tom Exp $")
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
@@ -915,7 +915,6 @@ fmt_entry(TERMTYPE2 *tterm,
 {
     PredIdx i, j;
     char buffer[MAX_TERMINFO_LENGTH + EXTRA_CAP];
-    char *capability;
     NCURSES_CONST char *name;
     int predval, len;
     PredIdx num_bools = 0;
@@ -1035,6 +1034,7 @@ fmt_entry(TERMTYPE2 *tterm,
     }
 
     for_each_string(j, tterm) {
+       char *capability;
        i = StrIndirect(j);
        name = ExtStrname(tterm, (int) i, str_names);
        assert(strlen(name) < sizeof(buffer) - EXTRA_CAP);
@@ -1483,7 +1483,7 @@ dump_entry(TERMTYPE2 *tterm,
           PredFunc pred)
 {
     TERMTYPE2 save_tterm;
-    int len, critlen;
+    int critlen;
     const char *legend;
     bool infodump;
 
@@ -1609,6 +1609,7 @@ dump_entry(TERMTYPE2 *tterm,
            }
            if (!changed || (FMT_ENTRY() > critlen)) {
                int oldversion = tversion;
+               int len;
 
                tversion = V_BSD;
                SHOW_WHY("# (terminfo-only capabilities suppressed to fit entry within %d bytes)\n",
index 78cfad788596f4f49907e3a7fccde7a48853618f..adc53ba0de66d9774a2b5ed6fb74b14541350a2b 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <dump_entry.h>
 
-MODULE_ID("$Id: infocmp.c,v 1.148 2021/04/03 22:57:56 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.149 2021/04/17 15:24:04 tom Exp $")
 
 #define MAX_STRING     1024    /* maximum formatted string */
 
@@ -1532,7 +1532,7 @@ main(int argc, char *argv[])
     char **myargv;
 
     char *firstdir, *restdir;
-    int c, i, len;
+    int c;
     bool formatted = FALSE;
     bool filecompare = FALSE;
     int initdump = 0;
@@ -1884,6 +1884,8 @@ main(int argc, char *argv[])
            analyze_string("rmkx", keypad_local, &entries[0].tterm);
 #undef CUR
        } else {
+           int i;
+           int len;
 
            /*
             * Here's where the real work gets done
index f2bba15c1eb8e2d16ae1d2bb152ba99058342906..72662de4cdbdb1a07c380e4e480866d7560465b3 100644 (file)
@@ -1,7 +1,7 @@
-# $Id: modules,v 1.22 2020/02/02 23:34:34 tom Exp $
+# $Id: modules,v 1.23 2021/04/17 16:05:34 tom Exp $
 # Program modules (some are in ncurses lib!)
 ##############################################################################
-# Copyright 2020 Thomas E. Dickey                                            #
+# Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2014,2016 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -42,8 +42,8 @@ infocmp               progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h
 reset_cmd      progs           $(srcdir)       $(HEADER_DEPS) reset_cmd.h tty_settings.h
 tabs           progs           $(srcdir)       $(HEADER_DEPS)
 tparm_type     progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/tparm_type.h
-tput           progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h $(srcdir)/tparm_type.h termsort.c reset_cmd.h tty_settings.h
-tset           progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h ../include/termcap.h reset_cmd.h  tty_settings.h
+tput           progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/tparm_type.h termsort.c reset_cmd.h tty_settings.h
+tset           progs           $(srcdir)       $(HEADER_DEPS) transform.h ../include/termcap.h reset_cmd.h  tty_settings.h
 transform      progs           $(srcdir)       $(HEADER_DEPS) transform.h
 tty_settings   progs           $(srcdir)       $(HEADER_DEPS) tty_settings.h
 
index 49e0a1d8b77abff9bbf24f9764c7566e630a3c88..775889d688ed1d6ade1f9aa433d937a41a33b94a 100644 (file)
@@ -49,7 +49,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.294 2021/04/03 22:51:09 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.295 2021/04/17 15:18:02 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -116,8 +116,6 @@ free_namelist(char **src)
 static void
 cleanup(void)
 {
-    int rc;
-
 #if NO_LEAKS
     free_namelist(namelst);
     _nc_leaks_dump_entry();
@@ -125,6 +123,8 @@ cleanup(void)
     if (tmp_fp != 0)
        fclose(tmp_fp);
     if (to_remove != 0) {
+       int rc;
+
 #if HAVE_REMOVE
        rc = remove(to_remove);
 #else
@@ -2683,11 +2683,11 @@ static void
 check_conflict(TERMTYPE2 *tp)
 {
     bool conflict = FALSE;
-    unsigned j, k;
 
     if (!(_nc_syntax == SYN_TERMCAP && capdump)) {
        char *check = calloc((size_t) (NUM_STRINGS(tp) + 1), sizeof(char));
        NAME_VALUE *given = get_fkey_list(tp);
+       unsigned j, k;
 
        if (check == 0)
            failed("check_conflict");
index 8ca363cb9ffdbdd1348e83c6580f3d514e874202..94539251382b55800f81c4f107bc8aa2ee7658c2 100644 (file)
 #include <reset_cmd.h>
 
 #if !PURE_TERMINFO
-#include <dump_entry.h>
 #include <termsort.c>
 #endif
 #include <transform.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: tput.c,v 1.86 2021/03/20 23:46:57 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.88 2021/04/17 15:34:16 tom Exp $")
 
 #define PUTS(s)                fputs(s, stdout)
 
@@ -232,7 +231,7 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
             * representations
             */
 
-           for (k = 1; (k < argc) && (k < NUM_PARM); k++) {
+           for (k = 1; (k < argc) && (k <= NUM_PARM); k++) {
                char *tmp = 0;
                strings[k] = argv[k];
                numbers[k] = strtol(argv[k], &tmp, 0);
index 6d8ba46e1606369630b23322e3a0431acac80d2c..aecd342ca8334681c34637448595f8cb05ae870d 100644 (file)
@@ -30,7 +30,7 @@
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
- * $Id: ditto.c,v 1.50 2021/03/20 16:05:49 tom Exp $
+ * $Id: ditto.c,v 1.51 2021/04/17 17:39:43 tom Exp $
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
@@ -353,7 +353,6 @@ static void *
 handle_screen(void *arg)
 {
     DDATA ddata;
-    int ch;
 
     memset(&ddata, 0, sizeof(ddata));
     ddata.ditto = (DITTO *) arg;
@@ -361,7 +360,7 @@ handle_screen(void *arg)
     ddata.ditto -= ddata.source;       /* -> base of array */
 
     for (;;) {
-       ch = read_screen(ddata.ditto->screen, &ddata);
+       int ch = read_screen(ddata.ditto->screen, &ddata);
        if (ch == CTRL('D')) {
            int later = (ddata.source ? ddata.source : -1);
            int j;