From a6ff7e087fd944fd0035075d0bb528e95e498d81 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 2 Mar 2020 23:18:56 +0000 Subject: [PATCH] ncurses 6.2 - patch 20200301 + modify wbkgd() and wbkgrnd() to avoid storing a null in the background character, because it may be used in cases where the corresponding 0x80 is not treated as a null (report by Marc Rechte, cf: 20181208). --- NEWS | 8 +++++++- VERSION | 2 +- dist.mk | 4 ++-- ncurses/base/lib_bkgd.c | 12 +++++++++++- 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 +- 11 files changed, 32 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index b32e49cc..979c98c2 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.3455 2020/02/29 23:15:52 tom Exp $ +-- $Id: NEWS,v 1.3456 2020/03/02 01:55:08 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,12 @@ 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. +20200301 + + modify wbkgd() and wbkgrnd() to avoid storing a null in the + background character, because it may be used in cases where the + corresponding 0x80 is not treated as a null (report by Marc Rechte, + cf: 20181208). + 20200229 + modify CF_NCURSES_CONFIG to work around xcode's c99 "-W" option, which conflicts with conventional use for passing linker options. diff --git a/VERSION b/VERSION index 1d68683b..2d8d43af 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20200229 +5:0:10 6.2 20200301 diff --git a/dist.mk b/dist.mk index 9ae5cf75..1f01bf31 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.1337 2020/02/29 12:43:09 tom Exp $ +# $Id: dist.mk,v 1.1338 2020/03/02 01:55:47 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 = 20200229 +NCURSES_PATCH = 20200301 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/ncurses/base/lib_bkgd.c b/ncurses/base/lib_bkgd.c index 2030030f..1dcae90d 100644 --- a/ncurses/base/lib_bkgd.c +++ b/ncurses/base/lib_bkgd.c @@ -37,7 +37,9 @@ #include -MODULE_ID("$Id: lib_bkgd.c,v 1.54 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_bkgd.c,v 1.55 2020/03/02 01:34:48 tom Exp $") + +static const NCURSES_CH_T blank = NewChar(BLANK_TEXT); /* * Set the window's background information. @@ -143,6 +145,14 @@ wbkgrnd(WINDOW *win, const ARG_CH_T ch) SetPair(new_bkgd, 0); } + /* avoid setting background-character to a null */ + if (CharOf(new_bkgd) == 0) { + NCURSES_CH_T tmp_bkgd = blank; + SetAttr(tmp_bkgd, AttrOf(new_bkgd)); + SetPair(tmp_bkgd, GetPair(new_bkgd)); + new_bkgd = tmp_bkgd; + } + memset(&old_bkgd, 0, sizeof(old_bkgd)); (void) wgetbkgrnd(win, &old_bkgd); diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index 1b1bbca0..b92e00e8 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200229) unstable; urgency=low +ncurses6 (6.2+20200301) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 29 Feb 2020 07:43:09 -0500 + -- Thomas E. Dickey Sun, 01 Mar 2020 20:55:47 -0500 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 1b1bbca0..b92e00e8 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200229) unstable; urgency=low +ncurses6 (6.2+20200301) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 29 Feb 2020 07:43:09 -0500 + -- Thomas E. Dickey Sun, 01 Mar 2020 20:55:47 -0500 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index a8234d24..fef70638 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200229) unstable; urgency=low +ncurses6 (6.2+20200301) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 29 Feb 2020 07:43:09 -0500 + -- Thomas E. Dickey Sun, 01 Mar 2020 20:55:47 -0500 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 848a3e42..c8368912 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.380 2020/02/29 12:43:09 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.381 2020/03/02 01:55:47 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 "2020" -!define VERSION_MMDD "0229" +!define VERSION_MMDD "0301" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 00612f7d..49644546 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: 20200229 +Release: 20200301 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index a4f7b153..7ecf505e 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: 20200229 +Release: 20200301 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index e81986d2..d9469829 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: 20200229 +Release: 20200301 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz -- 2.44.0