From a5fe3726f7d4374e9b1551b535c8617b423996f2 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 18 Apr 2021 01:15:31 +0000 Subject: [PATCH] ncurses 6.2 - patch 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). --- INSTALL | 6 +++--- NEWS | 10 +++++++++- VERSION | 2 +- c++/cursesf.cc | 10 +++++----- c++/cursesf.h | 11 ++++++----- c++/cursesm.cc | 10 +++++----- c++/cursesp.h | 7 ++++--- c++/cursesw.h | 8 ++++---- c++/cursslk.h | 7 ++++--- c++/etip.h.in | 13 +++++++------ configure | 4 ++-- configure.in | 6 +++--- dist.mk | 4 ++-- misc/gen-pkgconfig.in | 4 ++-- misc/ncurses-config.in | 4 ++-- ncurses/base/lib_set_term.c | 4 ++-- ncurses/tinfo/lib_print.c | 5 +++-- ncurses/widechar/lib_get_wch.c | 6 +++--- package/debian-mingw/changelog | 4 ++-- package/debian-mingw64/changelog | 4 ++-- package/debian/changelog | 4 ++-- package/mingw-ncurses.nsi | 4 ++-- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- progs/Makefile.in | 6 +++--- progs/dump_entry.c | 7 ++++--- progs/infocmp.c | 6 ++++-- progs/modules | 8 ++++---- progs/tic.c | 8 ++++---- progs/tput.c | 5 ++--- test/ditto.c | 5 ++--- 32 files changed, 101 insertions(+), 87 deletions(-) diff --git a/INSTALL b/INSTALL index 7ce88a72..dddedd11 100644 --- 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 4748265f..1d0d1983 100644 --- 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 4be3b80b..057ef076 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20210403 +5:0:10 6.2 20210417 diff --git a/c++/cursesf.cc b/c++/cursesf.cc index fcf0080f..5d316489 100644 --- a/c++/cursesf.cc +++ b/c++/cursesf.cc @@ -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; diff --git a/c++/cursesf.h b/c++/cursesf.h index c7000948..ea1aaf0d 100644 --- a/c++/cursesf.h +++ b/c++/cursesf.h @@ -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) { diff --git a/c++/cursesm.cc b/c++/cursesm.cc index 2215a168..64f36358 100644 --- a/c++/cursesm.cc +++ b/c++/cursesm.cc @@ -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; diff --git a/c++/cursesp.h b/c++/cursesp.h index eb9111b7..1eb90e95 100644 --- a/c++/cursesp.h +++ b/c++/cursesp.h @@ -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 @@ -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(reinterpret_cast(p_UserData))); diff --git a/c++/cursesw.h b/c++/cursesw.h index 602b7a96..001f6dbc 100644 --- a/c++/cursesw.h +++ b/c++/cursesw.h @@ -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 @@ -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(); } diff --git a/c++/cursslk.h b/c++/cursslk.h index 4a344009..66564fe3 100644 --- a/c++/cursslk.h +++ b/c++/cursslk.h @@ -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. diff --git a/c++/etip.h.in b/c++/etip.h.in index 6dc41042..3ce19e8e 100644 --- a/c++/etip.h.in +++ b/c++/etip.h.in @@ -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) {}; diff --git a/configure b/configure index a5afbc1f..2a4fe9b2 100755 --- 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 diff --git a/configure.in b/configure.in index f2013a9f..7d8e6953 100644 --- a/configure.in +++ b/configure.in @@ -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 bf685d68..22671b59 100644 --- 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) diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in index 1fc0a020..d7c947a7 100644 --- a/misc/gen-pkgconfig.in +++ b/misc/gen-pkgconfig.in @@ -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 diff --git a/misc/ncurses-config.in b/misc/ncurses-config.in index f4fd4101..c6851ebd 100644 --- a/misc/ncurses-config.in +++ b/misc/ncurses-config.in @@ -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 diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index f1d49a93..c2751ec4 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -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++) { diff --git a/ncurses/tinfo/lib_print.c b/ncurses/tinfo/lib_print.c index 4accdf67..c256ba99 100644 --- a/ncurses/tinfo/lib_print.c +++ b/ncurses/tinfo/lib_print.c @@ -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); } diff --git a/ncurses/widechar/lib_get_wch.c b/ncurses/widechar/lib_get_wch.c index 2bd49187..9f10d3bc 100644 --- a/ncurses/widechar/lib_get_wch.c +++ b/ncurses/widechar/lib_get_wch.c @@ -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 #include -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 */ diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index b79216ab..1937d00f 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20210403) unstable; urgency=low +ncurses6 (6.2+20210417) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 03 Apr 2021 08:37:45 -0400 + -- Thomas E. Dickey Sat, 17 Apr 2021 06:16:07 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index b79216ab..1937d00f 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20210403) unstable; urgency=low +ncurses6 (6.2+20210417) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 03 Apr 2021 08:37:45 -0400 + -- Thomas E. Dickey Sat, 17 Apr 2021 06:16:07 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 52dae309..93f56b65 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20210403) unstable; urgency=low +ncurses6 (6.2+20210417) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 03 Apr 2021 08:37:45 -0400 + -- Thomas E. Dickey Sat, 17 Apr 2021 06:16:07 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 0ddc71d0..809f1356 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.451 2021/04/03 12:37:45 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.453 2021/04/17 10:16:06 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "2" !define VERSION_YYYY "2021" -!define VERSION_MMDD "0403" +!define VERSION_MMDD "0417" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index d993e9db..5617c041 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -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 diff --git a/package/ncurses.spec b/package/ncurses.spec index 8b431af2..1f92c3d4 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -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 diff --git a/package/ncursest.spec b/package/ncursest.spec index 422cbe28..4eee924c 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -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 diff --git a/progs/Makefile.in b/progs/Makefile.in index 1511ec27..f2378d99 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -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 diff --git a/progs/dump_entry.c b/progs/dump_entry.c index acafaf76..2bc83ba1 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -40,7 +40,7 @@ #include "termsort.c" /* this C file is generated */ #include /* 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", diff --git a/progs/infocmp.c b/progs/infocmp.c index 78cfad78..adc53ba0 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -43,7 +43,7 @@ #include -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 diff --git a/progs/modules b/progs/modules index f2bba15c..72662de4 100644 --- a/progs/modules +++ b/progs/modules @@ -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 diff --git a/progs/tic.c b/progs/tic.c index 49e0a1d8..775889d6 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -49,7 +49,7 @@ #include #include -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 "" @@ -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"); diff --git a/progs/tput.c b/progs/tput.c index 8ca363cb..94539251 100644 --- a/progs/tput.c +++ b/progs/tput.c @@ -45,13 +45,12 @@ #include #if !PURE_TERMINFO -#include #include #endif #include #include -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); diff --git a/test/ditto.c b/test/ditto.c index 6d8ba46e..aecd342c 100644 --- a/test/ditto.c +++ b/test/ditto.c @@ -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; -- 2.44.0