mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-11-27 06:49:54 +08:00
ncurses 6.2 - patch 20200502
+ add details on the change to Linux SGR 21 in 2018 -TD + add xterm-direct16 and xterm-direct256 -TD + modify lib_mouse.c to check for out-of-range button numbers, convert those to position reports.
This commit is contained in:
parent
89730563d0
commit
2db461ea0b
8
NEWS
8
NEWS
@ -26,7 +26,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.3479 2020/04/26 00:40:38 tom Exp $
|
||||
-- $Id: NEWS,v 1.3482 2020/05/02 23:42:21 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.
|
||||
|
||||
20200502
|
||||
+ add details on the change to Linux SGR 21 in 2018 -TD
|
||||
+ add xterm-direct16 and xterm-direct256 -TD
|
||||
+ modify lib_mouse.c to check for out-of-range button numbers, convert
|
||||
those to position reports.
|
||||
|
||||
20200425
|
||||
+ use vt100+fnkeys in putty -TD
|
||||
+ fix a typo in tput.1; "columns" should be "cols".
|
||||
|
4
dist.mk
4
dist.mk
@ -26,7 +26,7 @@
|
||||
# use or other dealings in this Software without prior written #
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
# $Id: dist.mk,v 1.1347 2020/04/25 09:36:39 tom Exp $
|
||||
# $Id: dist.mk,v 1.1348 2020/05/02 09:32:34 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 = 20200425
|
||||
NCURSES_PATCH = 20200502
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -28,7 +28,7 @@
|
||||
#
|
||||
# Author: Thomas E. Dickey
|
||||
#
|
||||
# $Id: Caps-ncurses,v 1.8 2020/02/02 23:34:34 tom Exp $
|
||||
# $Id: Caps-ncurses,v 1.9 2020/05/02 23:35:12 tom Exp $
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
@ -342,6 +342,7 @@ infoalias ksel kslt IBM key_select
|
||||
# are not listed here.
|
||||
#
|
||||
used_by ncurses
|
||||
userdef CO num n number of indexed colors overlaying RGB space
|
||||
userdef E3 str - clears the terminal's scrollback buffer.
|
||||
userdef RGB bool - use direct colors with 1/3 of color-pair bits per color.
|
||||
userdef RGB num n use direct colors with given number of bits per color.
|
||||
|
@ -6,8 +6,8 @@
|
||||
# Report bugs and new terminal descriptions to
|
||||
# bug-ncurses@gnu.org
|
||||
#
|
||||
# $Revision: 1.790 $
|
||||
# $Date: 2020/04/26 00:38:36 $
|
||||
# $Revision: 1.795 $
|
||||
# $Date: 2020/05/02 23:39:49 $
|
||||
#
|
||||
# The original header is preserved below for reference. It is noted that there
|
||||
# is a "newer" version which differs in some cosmetic details (but actually
|
||||
@ -1131,7 +1131,17 @@ fbterm|FbTerm for Linux with framebuffer,
|
||||
# (but nonstandard) SGR 21, which was supported in the Linux console since 1992
|
||||
# as an equivalent for SGR 22. Long after (early 2018), someone modified the
|
||||
# console driver to make it ignore SGR 21 because the ECMA-48 standard
|
||||
# suggested a different use for that particular code.
|
||||
# suggested a different use for that particular code:
|
||||
#
|
||||
# https://github.com/torvalds/linux/commit/65d9982d7e523a1a8e7c9af012da0d166f72fc56#diff-7da3c215d12c9f6b88e1a37d38b116f0
|
||||
#
|
||||
# Two years later, someone (unfamiliar with ECMA-48 this time) documented it:
|
||||
#
|
||||
# https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man4/console_codes.4?id=a133a6bc03d751a424fe0a4adea2198757599615
|
||||
#
|
||||
# For background, refer to the report on bug-ncurses:
|
||||
#
|
||||
# https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00059.html
|
||||
linux-16color|linux console with 16 colors,
|
||||
colors#16, ncv#42, pairs#0x100,
|
||||
setab=\E[4%p1%{8}%m%d%?%p1%{7}%>%t;5%e;25%;m,
|
||||
@ -4873,7 +4883,7 @@ xterm-88color|xterm with 88 colors,
|
||||
# for numeric capabilities provided in ncurses 6.1:
|
||||
xterm+direct2|xterm with direct-color indexing,
|
||||
RGB,
|
||||
colors#0x1000000, pairs#0x10000,
|
||||
colors#0x1000000, pairs#0x10000, CO#8,
|
||||
initc@, op=\E[39;49m,
|
||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:%p1%{65536}%/%d\:%p1
|
||||
%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
|
||||
@ -4888,7 +4898,7 @@ xterm-direct2|xterm with direct-color indexing (old),
|
||||
# identifier" parameter. This version provides for that parameter:
|
||||
xterm+direct|xterm with direct-color indexing,
|
||||
RGB,
|
||||
colors#0x1000000, pairs#0x10000,
|
||||
colors#0x1000000, pairs#0x10000, CO#8,
|
||||
initc@, op=\E[39;49m,
|
||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:\:%p1%{65536}%/%d\:%p1
|
||||
%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
|
||||
@ -4927,7 +4937,7 @@ vte-direct|vte with direct-color indexing,
|
||||
nsterm-direct|nsterm with direct-color indexing,
|
||||
use=xterm+indirect, use=nsterm,
|
||||
|
||||
# As for others:
|
||||
# As for others (commenting at the time of release for ncurses 6.1):
|
||||
# + Apple's Terminal.app does not recognize either form of the direct-color
|
||||
# sequences.
|
||||
# + Cygwin's mintty recognizes xterm's original implementation, does okay with
|
||||
@ -4939,6 +4949,36 @@ nsterm-direct|nsterm with direct-color indexing,
|
||||
# + terminology 0.91 recognizes xterm's original implementation, but does
|
||||
# nothing useful with it.
|
||||
|
||||
# Other variants are possible, e.g., by using more of xterm's indexed color
|
||||
# palette, though the intrusion of indexed colors on the direct-color space
|
||||
# would be more noticeable.
|
||||
|
||||
xterm+direct16|xterm with direct-color indexing,
|
||||
CO#16,
|
||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e%?%p1%{16}%<%t%p1%{92}%+%e48\:
|
||||
2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}
|
||||
%&%d%;%;m,
|
||||
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%?%p1%{16}%<%t%p1%'R'%+%e38\:2
|
||||
\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}
|
||||
%&%d%;%;m,
|
||||
setb@, setf@, use=xterm+direct,
|
||||
|
||||
xterm-direct16|xterm with direct-colors and 16 indexed colors,
|
||||
use=xterm, use=xterm+direct16,
|
||||
|
||||
xterm+direct256|xterm with direct-color indexing,
|
||||
CO#0x100,
|
||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e%?
|
||||
%p1%{256}%<%t48;5;%p1%d%e48\:2\:\:%p1%{65536}%/%d\:%p1
|
||||
%{256}%/%{255}%&%d\:%p1%{255}%&%d%;%;m,
|
||||
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e%?
|
||||
%p1%{256}%<%t38;5;%p1%d%e38\:2\:\:%p1%{65536}%/%d\:%p1
|
||||
%{256}%/%{255}%&%d\:%p1%{255}%&%d%;%;m,
|
||||
setb@, setf@, use=xterm+direct,
|
||||
|
||||
xterm-direct256|xterm with direct-colors and 256 indexed colors,
|
||||
use=xterm, use=xterm+direct256,
|
||||
|
||||
#### XTERM Features
|
||||
|
||||
# This chunk is based on suggestions by Ailin Nemui and Nicholas Marriott, who
|
||||
@ -24545,6 +24585,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
|
||||
# This was implemented for the Hurd.
|
||||
# rmxx/smxx describes the ECMA-48 strikeout/crossed-out attributes, as an
|
||||
# experimental feature of tmux.
|
||||
# CO gives the number of indexed ("ANSI") colors which overlay an RGB color
|
||||
# space.
|
||||
# E3 clears the terminal's scrollback buffer. This was implemented in the
|
||||
# Linux 3.0 kernel as a security feature. It matches a feature which was
|
||||
# added in xterm patch #107.
|
||||
@ -26488,4 +26530,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
|
||||
# 2020-04-25
|
||||
# + use vt100+fnkeys in putty -TD
|
||||
#
|
||||
# 2020-05-02
|
||||
# + add details on the change to Linux SGR 21 in 2018 -TD
|
||||
# + add xterm-direct16 and xterm-direct256 -TD
|
||||
#
|
||||
######## SHANTIH! SHANTIH! SHANTIH!
|
||||
|
@ -85,7 +85,7 @@
|
||||
#define CUR SP_TERMTYPE
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: lib_mouse.c,v 1.184 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: lib_mouse.c,v 1.186 2020/05/02 21:13:04 tom Exp $")
|
||||
|
||||
#include <tic.h>
|
||||
|
||||
@ -142,19 +142,29 @@ make an error
|
||||
#define MASK_RESERVED_EVENT(x) (mmask_t) NCURSES_MOUSE_MASK(x, 040)
|
||||
|
||||
#if NCURSES_MOUSE_VERSION == 1
|
||||
|
||||
#define BUTTON_CLICKED (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED | BUTTON4_CLICKED)
|
||||
#define BUTTON_PRESSED (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED | BUTTON4_PRESSED)
|
||||
#define BUTTON_RELEASED (BUTTON1_RELEASED | BUTTON2_RELEASED | BUTTON3_RELEASED | BUTTON4_RELEASED)
|
||||
#define BUTTON_DOUBLE_CLICKED (BUTTON1_DOUBLE_CLICKED | BUTTON2_DOUBLE_CLICKED | BUTTON3_DOUBLE_CLICKED | BUTTON4_DOUBLE_CLICKED)
|
||||
#define BUTTON_TRIPLE_CLICKED (BUTTON1_TRIPLE_CLICKED | BUTTON2_TRIPLE_CLICKED | BUTTON3_TRIPLE_CLICKED | BUTTON4_TRIPLE_CLICKED)
|
||||
|
||||
#define MAX_BUTTONS 4
|
||||
|
||||
#else
|
||||
|
||||
#define BUTTON_CLICKED (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED | BUTTON4_CLICKED | BUTTON5_CLICKED)
|
||||
#define BUTTON_PRESSED (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED | BUTTON4_PRESSED | BUTTON5_PRESSED)
|
||||
#define BUTTON_RELEASED (BUTTON1_RELEASED | BUTTON2_RELEASED | BUTTON3_RELEASED | BUTTON4_RELEASED | BUTTON5_RELEASED)
|
||||
#define BUTTON_DOUBLE_CLICKED (BUTTON1_DOUBLE_CLICKED | BUTTON2_DOUBLE_CLICKED | BUTTON3_DOUBLE_CLICKED | BUTTON4_DOUBLE_CLICKED | BUTTON5_DOUBLE_CLICKED)
|
||||
#define BUTTON_TRIPLE_CLICKED (BUTTON1_TRIPLE_CLICKED | BUTTON2_TRIPLE_CLICKED | BUTTON3_TRIPLE_CLICKED | BUTTON4_TRIPLE_CLICKED | BUTTON5_TRIPLE_CLICKED)
|
||||
|
||||
#if NCURSES_MOUSE_VERSION == 2
|
||||
#define MAX_BUTTONS 5
|
||||
#else
|
||||
#define MAX_BUTTONS 11
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define INVALID_EVENT -1
|
||||
@ -928,7 +938,7 @@ handle_wheel(SCREEN *sp, MEVENT * eventp, int button, int wheel)
|
||||
break;
|
||||
case 1:
|
||||
if (wheel) {
|
||||
#if NCURSES_MOUSE_VERSION == 2
|
||||
#if NCURSES_MOUSE_VERSION >= 2
|
||||
eventp->bstate = MASK_PRESS(5);
|
||||
/* See comment above for button 4 */
|
||||
#else
|
||||
@ -953,10 +963,24 @@ static bool
|
||||
decode_X10_bstate(SCREEN *sp, MEVENT * eventp, unsigned intro)
|
||||
{
|
||||
bool result;
|
||||
int button;
|
||||
int wheel = (intro & 96) == 96;
|
||||
|
||||
eventp->bstate = 0;
|
||||
|
||||
if (!handle_wheel(sp, eventp, (int) intro, (intro & 96) == 96)) {
|
||||
if (intro >= 96) {
|
||||
if (intro >= 160) {
|
||||
button = (intro - 152); /* buttons 8-11 */
|
||||
} else if (intro >= 96) {
|
||||
button = (intro - 92); /* buttons 4-7 */
|
||||
}
|
||||
} else {
|
||||
button = (intro & 3);
|
||||
}
|
||||
|
||||
if (button > MAX_BUTTONS) {
|
||||
eventp->bstate = REPORT_MOUSE_POSITION;
|
||||
} else if (!handle_wheel(sp, eventp, (int) intro, wheel)) {
|
||||
|
||||
/*
|
||||
* Release events aren't reported for individual buttons, just for
|
||||
@ -1261,10 +1285,21 @@ decode_xterm_SGR1006(SCREEN *sp, MEVENT * eventp)
|
||||
if (read_SGR(sp, &data)) {
|
||||
int b = data.params[0];
|
||||
int b3 = 1 + (b & 3);
|
||||
int wheel = ((b & 64) == 64);
|
||||
|
||||
if (b >= 132) {
|
||||
b3 = MAX_BUTTONS + 1;
|
||||
} else if (b >= 128) {
|
||||
b3 = (b - 120); /* buttons 8-11 */
|
||||
} else if (b >= 64) {
|
||||
b3 = (b - 60); /* buttons 6-7 */
|
||||
}
|
||||
|
||||
eventp->id = NORMAL_EVENT;
|
||||
if (data.final == 'M') {
|
||||
(void) handle_wheel(sp, eventp, b, (b & 64) == 64);
|
||||
(void) handle_wheel(sp, eventp, b, wheel);
|
||||
} else if (b3 > MAX_BUTTONS) {
|
||||
eventp->bstate = REPORT_MOUSE_POSITION;
|
||||
} else {
|
||||
mmask_t pressed = (mmask_t) NCURSES_MOUSE_MASK(b3, NCURSES_BUTTON_PRESSED);
|
||||
mmask_t release = (mmask_t) NCURSES_MOUSE_MASK(b3, NCURSES_BUTTON_RELEASED);
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.2+20200425) unstable; urgency=low
|
||||
ncurses6 (6.2+20200502) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 25 Apr 2020 05:36:39 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 05:32:34 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.2+20200425) unstable; urgency=low
|
||||
ncurses6 (6.2+20200502) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 25 Apr 2020 05:36:39 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 05:32:34 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.2+20200425) unstable; urgency=low
|
||||
ncurses6 (6.2+20200502) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 25 Apr 2020 05:36:39 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 05:32:34 -0400
|
||||
|
||||
ncurses6 (5.9-20120608) unstable; urgency=low
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; $Id: mingw-ncurses.nsi,v 1.391 2020/04/25 09:36:39 tom Exp $
|
||||
; $Id: mingw-ncurses.nsi,v 1.392 2020/05/02 09:32:34 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 "0425"
|
||||
!define VERSION_MMDD "0502"
|
||||
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
|
||||
|
||||
!define MY_ABI "5"
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: mingw32-ncurses6
|
||||
Version: 6.2
|
||||
Release: 20200425
|
||||
Release: 20200502
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: ncurses6
|
||||
Version: 6.2
|
||||
Release: 20200425
|
||||
Release: 20200502
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Curses library with POSIX thread support.
|
||||
Name: ncursest6
|
||||
Version: 6.2
|
||||
Release: 20200425
|
||||
Release: 20200502
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
Loading…
Reference in New Issue
Block a user