From b73ae15cdc71aecdfd306f85bd3c37f9fd5024f4 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 22 Sep 2018 23:44:43 +0000 Subject: [PATCH] ncurses 6.1 - patch 20180922 + ignore interrupted system-call in test/ncurses's command-line, e.g., if the terminal were resized. + add shift/control/alt logic for decoding xterm's 1006 mode (Redhat #1610681, cf: 20141011). + modify rpm test-packages to not use --disable-relink with Redhat, since Fedora 28's tools do not work with that feature. --- NEWS | 10 +++++++++- VERSION | 2 +- dist.mk | 4 ++-- ncurses/base/lib_mouse.c | 14 ++++++++++++-- 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 | 13 ++++++++++--- package/ncursest.spec | 11 +++++++++-- test/ncurses.c | 6 +++++- 12 files changed, 57 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index f3a01908..5368fecb 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3185 2018/09/08 23:29:00 tom Exp $ +-- $Id: NEWS,v 1.3190 2018/09/22 21:23:32 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,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. +20180922 + + ignore interrupted system-call in test/ncurses's command-line, e.g., + if the terminal were resized. + + add shift/control/alt logic for decoding xterm's 1006 mode (Redhat + #1610681, cf: 20141011). + + modify rpm test-packages to not use --disable-relink with Redhat, + since Fedora 28's tools do not work with that feature. + 20180908 + document --with-pcre2 configure option in INSTALL. + improve workaround for special case in PutAttrChar() where a cell is diff --git a/VERSION b/VERSION index 809a5c17..be2fce22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20180908 +5:0:10 6.1 20180922 diff --git a/dist.mk b/dist.mk index c0884de6..aa5fe3ea 100644 --- 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.1240 2018/09/08 14:15:19 tom Exp $ +# $Id: dist.mk,v 1.1242 2018/09/22 16:36:59 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 = 1 -NCURSES_PATCH = 20180908 +NCURSES_PATCH = 20180922 # 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_mouse.c b/ncurses/base/lib_mouse.c index 8a0e4c1f..f703a24f 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -84,7 +84,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mouse.c,v 1.176 2017/11/18 22:12:06 Vassili.Courzakis Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.177 2018/09/22 19:54:21 tom Exp $") #include @@ -956,6 +956,7 @@ decode_X10_bstate(SCREEN *sp, MEVENT * eventp, unsigned intro) { bool result; + _tracef("decode_X10_bstate %#x", intro); eventp->bstate = 0; if (!handle_wheel(sp, eventp, (int) intro, (intro & 96) == 96)) { @@ -1276,6 +1277,15 @@ decode_xterm_SGR1006(SCREEN *sp, MEVENT * eventp) } else { eventp->bstate = REPORT_MOUSE_POSITION; } + if (b & 4) { + eventp->bstate |= BUTTON_SHIFT; + } + if (b & 8) { + eventp->bstate |= BUTTON_ALT; + } + if (b & 16) { + eventp->bstate |= BUTTON_CTRL; + } } result = (eventp->bstate & REPORT_MOUSE_POSITION) ? TRUE : FALSE; eventp->x = (data.params[1] ? (data.params[1] - 1) : 0); diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index 48656bb6..fa36f6c7 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180908) unstable; urgency=low +ncurses6 (6.1+20180922) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 08 Sep 2018 10:15:19 -0400 + -- Thomas E. Dickey Sat, 22 Sep 2018 12:36:59 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 48656bb6..fa36f6c7 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180908) unstable; urgency=low +ncurses6 (6.1+20180922) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 08 Sep 2018 10:15:19 -0400 + -- Thomas E. Dickey Sat, 22 Sep 2018 12:36:59 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 39a86612..f85c5ef0 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180908) unstable; urgency=low +ncurses6 (6.1+20180922) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 08 Sep 2018 10:15:19 -0400 + -- Thomas E. Dickey Sat, 22 Sep 2018 12:36:59 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 04b737a0..e1296a4c 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.287 2018/09/08 14:15:19 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.289 2018/09/22 16:36:59 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "1" !define VERSION_YYYY "2018" -!define VERSION_MMDD "0908" +!define VERSION_MMDD "0922" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index fd89e74f..a3ef00d4 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.1 -Release: 20180908 +Release: 20180922 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index e60ee53b..bd5d6652 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.1 -Release: 20180908 +Release: 20180922 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz @@ -44,10 +44,16 @@ This package is used for testing ABI %{MY_ABI}. %define _disable_ld_build_id 1 %endif +%if %{is_redhat} +# workaround for toolset breakage in Fedora 28 +%define _test_relink --enable-relink +%else +%define _test_relink --disable-relink +%endif + %setup -q -n ncurses-%{version}-%{release} %build -%define my_srcdir .. %define CFG_OPTS \\\ --target %{_target_platform} \\\ --prefix=%{_prefix} \\\ @@ -60,7 +66,7 @@ This package is used for testing ABI %{MY_ABI}. --disable-leaks \\\ --disable-macros \\\ --disable-overwrite \\\ - --disable-relink \\\ + %{_test_relink} \\\ --disable-termcap \\\ --enable-hard-tabs \\\ --enable-opaque-curses \\\ @@ -97,6 +103,7 @@ This package is used for testing ABI %{MY_ABI}. CFLAGS="%{CC_NORMAL}" \ RPATH_LIST=../lib:%{_libdir} \ %configure %{CFG_OPTS} + make %install diff --git a/package/ncursest.spec b/package/ncursest.spec index 42471d81..66cce443 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.1 -Release: 20180908 +Release: 20180922 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz @@ -44,6 +44,13 @@ This package is used for testing ABI %{MY_ABI} with POSIX threads. %define _disable_ld_build_id 1 %endif +%if %{is_redhat} +# workaround for toolset breakage in Fedora 28 +%define _test_relink --enable-relink +%else +%define _test_relink --disable-relink +%endif + %setup -q -n ncurses-%{version}-%{release} %build @@ -60,7 +67,7 @@ This package is used for testing ABI %{MY_ABI} with POSIX threads. --disable-leaks \\\ --disable-macros \\\ --disable-overwrite \\\ - --disable-relink \\\ + %{_test_relink} \\\ --disable-termcap \\\ --enable-hard-tabs \\\ --enable-opaque-curses \\\ diff --git a/test/ncurses.c b/test/ncurses.c index 9c751689..c9367296 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -40,7 +40,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.507 2018/06/23 21:35:06 tom Exp $ +$Id: ncurses.c,v 1.508 2018/09/22 21:21:43 tom Exp $ ***************************************************************************/ @@ -7775,6 +7775,10 @@ main_menu(bool top) if (read(fileno(stdin), &ch, (size_t) 1) <= 0) { if (command == 0) command = 'q'; + if (errno == EINTR) { + clearerr(stdin); + continue; + } break; } else if (command == 0 && !isspace(UChar(ch))) { command = ch; -- 2.44.0