]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20230401
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 2 Apr 2023 00:15:26 +0000 (00:15 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 2 Apr 2023 00:15:26 +0000 (00:15 +0000)
+ modify experimental Windows driver to work with xterm mouse protocol.
+ remove DECCOLM+DECSCLM from foot (patch by Daniel Ekloef).

14 files changed:
NEWS
VERSION
dist.mk
misc/terminfo.src
ncurses/base/lib_mouse.c
ncurses/curses.priv.h
ncurses/win32con/win32_driver.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

diff --git a/NEWS b/NEWS
index bc5be49f32d04f1b144b206b0878d85a8c0ecbdf..f3b7e0c2d139149fe41c1ba77d389aafbcee8bd4 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.3919 2023/03/12 00:14:16 tom Exp $
+-- $Id: NEWS,v 1.3923 2023/04/01 23:29:48 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,10 @@ 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.
 
+20230401
+       + modify experimental Windows driver to work with xterm mouse protocol.
+       + remove DECCOLM+DECSCLM from foot (patch by Daniel Ekloef).
+
 20230311
        + improve manpage description for addch versus unctrl format used for
          non-printable characters.
diff --git a/VERSION b/VERSION
index 2565b033fa02a62bab65ca91bb1b84ea314f48e6..34c01e4d7bdf85e895433d28ad783dc88cc7027d 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20230311
+5:0:10 6.4     20230401
diff --git a/dist.mk b/dist.mk
index e8161fec01d026ef7e70ea095fc53ef715a62c7b..d0c7cd8b86b25b9d011dfec40539fd90f744d725 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.1530 2023/03/11 12:02:16 tom Exp $
+# $Id: dist.mk,v 1.1533 2023/04/01 11:05:21 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 = 4
-NCURSES_PATCH = 20230311
+NCURSES_PATCH = 20230401
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 557662156d3fb25b4abf70c150aee04a611f3fd8..61b24111fdb5c36c6919d2baea4057c0ef3603b2 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.1052 $
-#      $Date: 2023/01/28 23:21:43 $
+#      $Revision: 1.1056 $
+#      $Date: 2023/04/01 23:24:35 $
 #
 # 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
@@ -4622,6 +4622,16 @@ ms-vt-utf8|vt-utf8|UTF-8 flavor of VT100+,
 # Windows Terminal (Preview)
 # https://github.com/microsoft/terminal
 #
+# Windows 10 22H2 (also Windows 11)
+# Version 1.16.10261.0
+#
+# - Windows Terminal #1553: "Feature Request:  Mouse/Touch/Pointer Bindings
+#   (like middle-click paste, right-click context menu, etc.)", compare to
+#   https://learn.microsoft.com/en-us/windows/console/mouse-event-record-str
+#   This appears to be related to a problem with its implementation of the
+#   Console API; the mouse does not work in a "Command Window" (e.g., as used
+#   in the ncurses MinGW driver), although escape sequences work.
+#
 # Windows 10 21H1
 # Version 1.9.1942.0
 #
@@ -7985,10 +7995,10 @@ foot+base|foot base fragment,
        bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r,
        cub1=^H, cud1=\n, dim=\E[2m, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
        el1=\E[1K, flash=\E]555\E\\, ind=\n, invis=\E[8m,
-       is2=\E[!p\E[?3;4l\E[4l\E>, kbs=^?, kcbt=\E[Z,
-       oc=\E]104\E\\, op=\E[39;49m, rev=\E[7m, ri=\EM, rmacs=\E(B,
-       rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
-       rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>,
+       is2=\E[!p\E[4l\E>, kbs=^?, kcbt=\E[Z, oc=\E]104\E\\,
+       op=\E[39;49m, rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l,
+       rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+       rs2=\E[!p\E[4l\E>,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;
            %?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
        sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smkx=\E[?1h\E=,
@@ -27776,13 +27786,13 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      + correct PS vs PE names in bracketed+paste (report by Bram Moolenaar)
 #        -TD
 #
-# 2022-01-07
+# 2023-01-07
 #      + add comment to bracketed+paste explaining that vim patch 9.0.1117 is
 #        needed for use with the updated xterm descriptions (suggested by Bram
 #        Moolenaar).
 #      + add RV report+version (suggested by Bram Moolenaar).
 #
-# 2022-01-14
+# 2023-01-14
 #      + change RV to XR/xr, to avoid conflict with pre-existing usage in vim,
 #        to use RV/rv to denote DA2 and its response (discussion with Bram
 #        Moolenaar) -TD
@@ -27790,8 +27800,11 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #        of terminals which may support focus in/out -TD
 #      + use xterm+focus in xterm-p370 and tmux -TD
 #
-# 2022-01-28
+# 2023-01-28
 #      + document XF, kxIN and kxOUT -TD
 #      + add note on sun/wscons/cmdtool/shelltool -TD
 #
+# 2023-04-01
+#      + remove DECCOLM+DECSCLM from foot (patch by Daniel Ekloef).
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index f4151b815bec87722f4f7dd33a0e9144aeeb02b7..319a276ae5e582396ff84822685efe5e338c9c7b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey                                *
+ * Copyright 2018-2022,2023 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -85,7 +85,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.197 2022/08/13 14:13:12 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.198 2023/03/25 23:27:28 tom Exp $")
 
 #include <tic.h>
 
@@ -380,7 +380,7 @@ handle_sysmouse(int sig GCC_UNUSED)
 }
 #endif /* USE_SYSMOUSE */
 
-#ifndef USE_TERM_DRIVER
+#if !defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER)
 #define xterm_kmous "\033[M"
 
 static void
@@ -442,6 +442,9 @@ init_xterm_mouse(SCREEN *sp)
 static void
 enable_xterm_mouse(SCREEN *sp, int enable)
 {
+    TPUTS_TRACE(enable
+               ? "xterm mouse initialization"
+               : "xterm mouse deinitialization");
 #if USE_EMX_MOUSE
     sp->_emxmouse_activated = enable;
 #else
@@ -450,6 +453,18 @@ enable_xterm_mouse(SCREEN *sp, int enable)
     sp->_mouse_active = enable;
 }
 
+#if defined(USE_TERM_DRIVER)
+static void
+enable_win32_mouse(SCREEN *sp, int enable)
+{
+#if defined(EXP_WIN32_DRIVER)
+    enable_xterm_mouse(sp, enable);
+#else
+    sp->_mouse_active = enable;
+#endif
+}
+#endif
+
 #if USE_GPM_SUPPORT
 static bool
 allow_gpm_mouse(SCREEN *sp GCC_UNUSED)
@@ -741,7 +756,8 @@ initialize_mousetype(SCREEN *sp)
 
 #ifdef USE_TERM_DRIVER
     CallDriver(sp, td_initmouse);
-#else
+#endif
+#if !defined(USE_TERM_DRIVER) || defined(EXP_WIN32_DRIVER)
     /* we know how to recognize mouse events under "xterm" */
     if (NonEmpty(key_mouse)) {
        init_xterm_mouse(sp);
@@ -760,13 +776,15 @@ _nc_mouse_init(SCREEN *sp)
 {
     bool result = FALSE;
 
+    T((T_CALLED("_nc_mouse_init(%p)"), sp));
+
     if (sp != 0) {
        if (!sp->_mouse_initialized) {
            int i;
 
            sp->_mouse_initialized = TRUE;
 
-           TR(MY_TRACE, ("_nc_mouse_init() called"));
+           TR(MY_TRACE, ("set _mouse_initialized"));
 
            sp->_mouse_eventp = FirstEV(sp);
            for (i = 0; i < EV_MAX; i++)
@@ -774,11 +792,11 @@ _nc_mouse_init(SCREEN *sp)
 
            initialize_mousetype(sp);
 
-           T(("_nc_mouse_init() set mousetype to %d", sp->_mouse_type));
+           T(("set _mouse_type to %d", sp->_mouse_type));
        }
        result = sp->_mouse_initialized;
     }
-    return result;
+    returnCode(result);
 }
 
 /*
@@ -1388,11 +1406,14 @@ _nc_mouse_inline(SCREEN *sp)
 static void
 mouse_activate(SCREEN *sp, int on)
 {
+    T((T_CALLED("mouse_activate(%p,%s)"),
+       (void *) SP_PARM, on ? "on" : "off"));
+
     if (!on && !sp->_mouse_initialized)
-       return;
+       returnVoid;
 
     if (!_nc_mouse_init(sp))
-       return;
+       returnVoid;
 
     if (on) {
        sp->_mouse_bstate = 0;
@@ -1401,7 +1422,6 @@ mouse_activate(SCREEN *sp, int on)
 #if NCURSES_EXT_FUNCS
            NCURSES_SP_NAME(keyok) (NCURSES_SP_ARGx KEY_MOUSE, on);
 #endif
-           TPUTS_TRACE("xterm mouse initialization");
            enable_xterm_mouse(sp, 1);
            break;
 #if USE_GPM_SUPPORT
@@ -1420,25 +1440,28 @@ mouse_activate(SCREEN *sp, int on)
 #endif
 #ifdef USE_TERM_DRIVER
        case M_TERM_DRIVER:
-           sp->_mouse_active = TRUE;
+           enable_win32_mouse(sp, TRUE);
            break;
 #endif
        case M_NONE:
-           return;
+           returnVoid;
+       default:
+           T(("unexpected mouse mode"));
+           break;
        }
        /* Make runtime binding to cut down on object size of applications that
         * do not use the mouse (e.g., 'clear').
         */
-       sp->_mouse_event = _nc_mouse_event;
+       /* *INDENT-EQLS* */
+       sp->_mouse_event  = _nc_mouse_event;
        sp->_mouse_inline = _nc_mouse_inline;
-       sp->_mouse_parse = _nc_mouse_parse;
+       sp->_mouse_parse  = _nc_mouse_parse;
        sp->_mouse_resume = _nc_mouse_resume;
-       sp->_mouse_wrap = _nc_mouse_wrap;
+       sp->_mouse_wrap   = _nc_mouse_wrap;
     } else {
 
        switch (sp->_mouse_type) {
        case M_XTERM:
-           TPUTS_TRACE("xterm mouse deinitialization");
            enable_xterm_mouse(sp, 0);
            break;
 #if USE_GPM_SUPPORT
@@ -1454,14 +1477,18 @@ mouse_activate(SCREEN *sp, int on)
 #endif
 #ifdef USE_TERM_DRIVER
        case M_TERM_DRIVER:
-           sp->_mouse_active = FALSE;
+           enable_win32_mouse(sp, FALSE);
            break;
 #endif
        case M_NONE:
-           return;
+           returnVoid;
+       default:
+           T(("unexpected mouse mode"));
+           break;
        }
     }
     NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
+    returnVoid;
 }
 
 /**************************************************************************
index b0ab21bf17bcebdc1910752dc61f79534cfd748c..3aa480d95389991f69f987625c67fe7c9001233c 100644 (file)
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.660 2023/02/25 21:24:20 tom Exp $
+ * $Id: curses.priv.h,v 1.661 2023/03/25 23:12:24 tom Exp $
  *
  *     curses.priv.h
  *
@@ -1657,7 +1657,7 @@ typedef void VoidFunc(void);
 #define returnMMask(code)      TRACE_RETURN_SP(code,mmask_t)
 #define returnPtr(code)                TRACE_RETURN1(code,ptr)
 #define returnSP(code)         TRACE_RETURN1(code,sp)
-#define returnVoid             T((T_RETURN(""))); return
+#define returnVoid             { T((T_RETURN(""))); return; }
 #define returnVoidPtr(code)    TRACE_RETURN1(code,void_ptr)
 #define returnWin(code)                TRACE_RETURN1(code,win)
 
index 45aadf2f596a3845a79cb99824e40780b903c5fc..67b816259c917c150fb9a6b46c234220357c7552 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2023 Thomas E. Dickey                                *
  * Copyright 2008-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -48,7 +48,7 @@
 
 #define CUR TerminalType(my_term).
 
-MODULE_ID("$Id: win32_driver.c,v 1.2 2020/11/21 23:35:56 tom Exp $")
+MODULE_ID("$Id: win32_driver.c,v 1.3 2023/03/25 14:08:36 tom Exp $")
 
 #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
 #define EXP_OPTIMIZE 0
@@ -924,11 +924,14 @@ wcon_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
 {
     SCREEN *sp;
 
+    T((T_CALLED("win32con::wcon_initmouse(%p)"), TCB));
+
     if (validateConsoleHandle()) {
        SetSP();
 
        sp->_mouse_type = M_TERM_DRIVER;
     }
+    returnVoid;
 }
 
 static int
@@ -939,6 +942,7 @@ wcon_testmouse(TERMINAL_CONTROL_BLOCK * TCB,
     int rc = 0;
     SCREEN *sp;
 
+    T((T_CALLED("win32con::wcon_testmouse(%p)"), TCB));
     if (validateConsoleHandle()) {
        SetSP();
 
@@ -953,7 +957,7 @@ wcon_testmouse(TERMINAL_CONTROL_BLOCK * TCB,
        }
     }
 
-    return rc;
+    returnCode(rc);
 }
 
 static int
index 858f4c869f10519eeb1b45bf5e8c65c4e26c5be9..dfdd012574c26a5cce52e8019c75b8b718e59973 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230311) unstable; urgency=low
+ncurses6 (6.4+20230401) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 05 Mar 2023 13:16:04 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 01 Apr 2023 07:05:21 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 858f4c869f10519eeb1b45bf5e8c65c4e26c5be9..dfdd012574c26a5cce52e8019c75b8b718e59973 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230311) unstable; urgency=low
+ncurses6 (6.4+20230401) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 05 Mar 2023 13:16:04 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 01 Apr 2023 07:05:21 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index a38471b0c0d557130f0d2ecb4471f9357b2a62fc..b0b297ccdd211bac2810ecfbdd7f65f63586ed64 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230311) unstable; urgency=low
+ncurses6 (6.4+20230401) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 05 Mar 2023 13:16:04 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 01 Apr 2023 07:05:21 -0400
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index 6b00844d02d7f6ad62fd22c07de6e4a61113d5fa..917556e82d2cdff3b605cdaa0c376137da7a2392 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.569 2023/03/05 18:16:04 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.572 2023/04/01 11:05:21 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 "4"\r
 !define VERSION_YYYY  "2023"\r
-!define VERSION_MMDD  "0311"\r
+!define VERSION_MMDD  "0401"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 0fdb061484d049e731b2bcbca051880832f61bbd..7934974974e44798ec40b316bc9dc0ed5b08a30b 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20230311
+Release: 20230401
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index aa4ca9dc4a1b7f1cbee6976211f038d6330a2cd4..cbc0cb6bde0f0b41213338ee96c553a1e438ff55 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20230311
+Release: 20230401
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
index 56c5bf023d0f8df8c1fc6951bc14d6005cd825fe..0403832b09cd05f2ebedf2b8f7de26d6914366dc 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20230311
+Release: 20230401
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz