]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.4 - patch 20230211
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Feb 2023 01:42:50 +0000 (01:42 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Feb 2023 01:42:50 +0000 (01:42 +0000)
+ set dwShareMode in calls to CreateConsoleScreenBuffer() (patch by
  Hannes Domani).
+ use CreateFile with "CONIN$", "CONOUT$" rather than GetStdHandle to
  obtain a handle on the actual console, avoiding redirection in the
  MinGW/Win32 configurations (adapted from patch by LIU Hao).

14 files changed:
NEWS
VERSION
dist.mk
man/term_variables.3x
ncurses/curses.priv.h
ncurses/tinfo/lib_win32con.c
ncurses/win32con/win_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 d0761de89690526ab0022fedf1788d8d96d1d5ec..1549de7967db3117af3a1ab11fd4f15b4cb37a0b 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.3906 2023/01/28 23:31:29 tom Exp $
+-- $Id: NEWS,v 1.3909 2023/02/11 23:24:11 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,13 @@ 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.
 
+20230211
+       + set dwShareMode in calls to CreateConsoleScreenBuffer() (patch by
+         Hannes Domani).
+       + use CreateFile with "CONIN$", "CONOUT$" rather than GetStdHandle to
+         obtain a handle on the actual console, avoiding redirection in the
+         MinGW/Win32 configurations (adapted from patch by LIU Hao).
+
 20230128
        + document XF, kxIN and kxOUT -TD
        + add note on sun/wscons/cmdtool/shelltool -TD
diff --git a/VERSION b/VERSION
index 5fa0ff8e5b702a2dd2d29df6f5c9a3d89903364d..3ec9c8cad2917e2150482250bec50ba859f0552c 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.4     20230128
+5:0:10 6.4     20230211
diff --git a/dist.mk b/dist.mk
index 0d79e2c093965a621dfc64fe4b8656f7fa99052e..58127633d270cd7cd49091f333d147d92f8c0d3a 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.1524 2023/01/28 11:48:39 tom Exp $
+# $Id: dist.mk,v 1.1526 2023/02/11 12:14:37 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 = 20230128
+NCURSES_PATCH = 20230211
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index ccf441358681500cdb31d84601ca49760118523a..826204e641bde47759e5209e3cfa95567848c2b2 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright 2019-2021,2022 Thomas E. Dickey                                *
+.\" Copyright 2019-2022,2023 Thomas E. Dickey                                *
 .\" Copyright 2010-2015,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: term_variables.3x,v 1.16 2023/01/02 12:17:34 tom Exp $
+.\" $Id: term_variables.3x,v 1.17 2023/01/02 12:17:34 tom Exp $
 .TH term_variables 3X ""
 .ds n 5
 .ie \n(.g .ds `` \(lq
index ff57cbf0ba90a04f584b73583e0294c0ce7c53a7..2d536d2d77cb16fb7c5bebcb73caece84d3af1de 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey                                *
+ * Copyright 2018-2022,2023 Thomas E. Dickey                                *
  * Copyright 1998-2017,2018 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.653 2022/10/23 13:29:26 tom Exp $
+ * $Id: curses.priv.h,v 1.656 2023/02/12 00:13:11 tom Exp $
  *
  *     curses.priv.h
  *
@@ -210,6 +210,24 @@ extern int errno;
 #  define NCURSES_PATHSEP ';'
 #endif
 
+/*
+ * When the standard handles have been redirected (such as inside a text editor
+ * or the less utility), keystrokes must be read from the console rather than
+ * the redirected handle.  The standard output handle suffers from a similar
+ * problem.  Both handles are not closed once opened.  The console shall be
+ * considered reachable throughout the process.
+ */
+#if defined(_NC_WINDOWS)
+#define GetDirectHandle(fileName, shareMode) \
+       CreateFile(TEXT(fileName), \
+                  GENERIC_READ | GENERIC_WRITE, \
+                  shareMode, \
+                  0, \
+                  OPEN_EXISTING, \
+                  0, \
+                  0)
+#endif
+
 /*
  * Not all platforms have memmove; some have an equivalent bcopy.  (Some may
  * have neither).
@@ -2177,6 +2195,12 @@ extern int __MINGW_NOTHROW _nc_mblen(const char *, size_t);
 
 #endif /* _NC_WINDOWS && !_NC_MSC */
 
+#if defined(_NC_WINDOWS) || defined(_NC_MINGW)
+/* see wcwidth.c */
+NCURSES_EXPORT(int) mk_wcwidth(wchar_t);
+#define wcwidth(ucs) _nc_wcwidth(ucs)
+#endif
+
 #if HAVE_MBTOWC && HAVE_MBLEN
 #define reset_mbytes(state) IGNORE_RC(mblen(NULL, (size_t) 0)), IGNORE_RC(mbtowc(NULL, NULL, (size_t) 0))
 #define count_mbytes(buffer,length,state) mblen(buffer,length)
index 2bcea39a914de143875a3ca6b99f97c87faeee69..3b2a7c4dfa73dfaaaf7bcdd2bf241eada15754b5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 2020-2021,2023 Thomas E. Dickey                                *
  * Copyright 1998-2009,2010 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -38,7 +38,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_win32con.c,v 1.7 2021/09/04 10:54:35 tom Exp $")
+MODULE_ID("$Id: lib_win32con.c,v 1.11 2023/02/12 00:31:33 tom Exp $")
 
 #ifdef _NC_WINDOWS
 
@@ -62,13 +62,13 @@ static BOOL IsConsoleHandle(HANDLE hdl);
 static bool save_original_screen(void);
 static bool restore_original_screen(void) GCC_UNUSED;
 static bool read_screen_data(void);
-static int  Adjust(int milliseconds, int diff);
-static int  decode_mouse(SCREEN *sp, int mask);
+static int Adjust(int milliseconds, int diff);
+static int decode_mouse(SCREEN *sp, int mask);
 static bool handle_mouse(SCREEN *sp, MOUSE_EVENT_RECORD mer);
-static int  rkeycompare(const void *el1, const void *el2);
-static int  keycompare(const void *el1, const void *el2);
-static int  MapKey(WORD vKey);
-static int  AnsiKey(WORD vKey);
+static int rkeycompare(const void *el1, const void *el2);
+static int keycompare(const void *el1, const void *el2);
+static int MapKey(WORD vKey);
+static int AnsiKey(WORD vKey);
 
 static ULONGLONG tdiff(FILETIME fstart, FILETIME fend);
 
@@ -136,32 +136,32 @@ _nc_console_vt_supported(void)
        osvi.dwMinorVersion,
        osvi.dwBuildNumber));
     if (osvi.dwMajorVersion >= REQUIRED_MAX_V) {
-      if (osvi.dwMajorVersion == REQUIRED_MAX_V) {
-          if (((osvi.dwMinorVersion == REQUIRED_MIN_V) &&
-               (osvi.dwBuildNumber >= REQUIRED_BUILD)) ||
-              ((osvi.dwMinorVersion > REQUIRED_MIN_V)))
-              res = 1;
-      } else
-          res = 1;
+       if (osvi.dwMajorVersion == REQUIRED_MAX_V) {
+           if (((osvi.dwMinorVersion == REQUIRED_MIN_V) &&
+                (osvi.dwBuildNumber >= REQUIRED_BUILD)) ||
+               ((osvi.dwMinorVersion > REQUIRED_MIN_V)))
+               res = 1;
+       } else
+           res = 1;
     }
     returnCode(res);
 }
 
 NCURSES_EXPORT(void)
-_nc_console_size(int* Lines, int* Cols)
+_nc_console_size(int *Lines, int *Cols)
 {
-  EnsureInit();
-  if (Lines != NULL && Cols != NULL) {
-      if (WINCONSOLE.buffered) {
-          *Lines = (int) (WINCONSOLE.SBI.dwSize.Y);
-          *Cols = (int) (WINCONSOLE.SBI.dwSize.X);
-      } else {
-          *Lines = (int) (WINCONSOLE.SBI.srWindow.Bottom + 1 -
-                          WINCONSOLE.SBI.srWindow.Top);
-          *Cols = (int) (WINCONSOLE.SBI.srWindow.Right + 1 -
-                         WINCONSOLE.SBI.srWindow.Left);
-      }
-  }
+    EnsureInit();
+    if (Lines != NULL && Cols != NULL) {
+       if (WINCONSOLE.buffered) {
+           *Lines = (int) (WINCONSOLE.SBI.dwSize.Y);
+           *Cols = (int) (WINCONSOLE.SBI.dwSize.X);
+       } else {
+           *Lines = (int) (WINCONSOLE.SBI.srWindow.Bottom + 1 -
+                           WINCONSOLE.SBI.srWindow.Top);
+           *Cols = (int) (WINCONSOLE.SBI.srWindow.Right + 1 -
+                          WINCONSOLE.SBI.srWindow.Left);
+       }
+    }
 }
 
 /* Convert a file descriptor into a HANDLE
@@ -188,9 +188,9 @@ IsConsoleHandle(HANDLE hdl)
     EnsureInit();
 
     if (!GetConsoleMode(hdl, &dwFlag)) {
-        T(("GetConsoleMode failed"));
+       T(("GetConsoleMode failed"));
     } else {
-        result = TRUE;
+       result = TRUE;
     }
 
     returnBool(result);
@@ -219,8 +219,8 @@ NCURSES_EXPORT(void)
 _nc_console_selectActiveHandle(void)
 {
     if (WINCONSOLE.lastOut != WINCONSOLE.hdl) {
-        WINCONSOLE.lastOut = WINCONSOLE.hdl;
-        SetConsoleActiveScreenBuffer(WINCONSOLE.lastOut);
+       WINCONSOLE.lastOut = WINCONSOLE.hdl;
+       SetConsoleActiveScreenBuffer(WINCONSOLE.lastOut);
     }
 }
 
@@ -228,32 +228,32 @@ NCURSES_EXPORT(HANDLE)
 _nc_console_fd2handle(int fd)
 {
     HANDLE hdl = _nc_console_handle(fd);
-    if (hdl==WINCONSOLE.inp) {
-        T(("lib_win32con:validateHandle %d -> WINCONSOLE.inp", fd));
-    } else if (hdl==WINCONSOLE.hdl) {
-        T(("lib_win32con:validateHandle %d -> WINCONSOLE.hdl", fd));
-    } else if (hdl==WINCONSOLE.out) {
-        T(("lib_win32con:validateHandle %d -> WINCONSOLE.out", fd));
+    if (hdl == WINCONSOLE.inp) {
+       T(("lib_win32con:validateHandle %d -> WINCONSOLE.inp", fd));
+    } else if (hdl == WINCONSOLE.hdl) {
+       T(("lib_win32con:validateHandle %d -> WINCONSOLE.hdl", fd));
+    } else if (hdl == WINCONSOLE.out) {
+       T(("lib_win32con:validateHandle %d -> WINCONSOLE.out", fd));
     } else {
-        T(("lib_win32con:validateHandle %d maps to unknown HANDLE", fd));
-        hdl = INVALID_HANDLE_VALUE;
+       T(("lib_win32con:validateHandle %d maps to unknown HANDLE", fd));
+       hdl = INVALID_HANDLE_VALUE;
     }
 #if 1
     assert(hdl != INVALID_HANDLE_VALUE);
 #endif
     if (hdl != INVALID_HANDLE_VALUE) {
-        if (hdl != WINCONSOLE.inp && (!WINCONSOLE.isTermInfoConsole && WINCONSOLE.progMode)) {
-            if (hdl==WINCONSOLE.out && hdl!=WINCONSOLE.hdl) {
-                T(("lib_win32con:validateHandle forcing WINCONSOLE.out -> WINCONSOLE.hdl"));
-                hdl = WINCONSOLE.hdl;
-            }
-        }
+       if (hdl != WINCONSOLE.inp && (!WINCONSOLE.isTermInfoConsole && WINCONSOLE.progMode)) {
+           if (hdl == WINCONSOLE.out && hdl != WINCONSOLE.hdl) {
+               T(("lib_win32con:validateHandle forcing WINCONSOLE.out -> WINCONSOLE.hdl"));
+               hdl = WINCONSOLE.hdl;
+           }
+       }
     }
     return hdl;
 }
 
 NCURSES_EXPORT(int)
-_nc_console_setmode(HANDLE hdl, const TTY *arg)
+_nc_console_setmode(HANDLE hdl, const TTY * arg)
 {
     DWORD dwFlag = 0;
     int code = ERR;
@@ -261,86 +261,86 @@ _nc_console_setmode(HANDLE hdl, const TTY *arg)
 
     if (arg) {
 #ifdef TRACE
-        TTY TRCTTY;
+       TTY TRCTTY;
 #define TRCTTYOUT(flag) TRCTTY.dwFlagOut = flag
 #define TRCTTYIN(flag)  TRCTTY.dwFlagIn = flag
 #else
 #define TRCTTYOUT(flag)
 #define TRCTTYIN(flag)
 #endif
-        T(("lib_win32con:_nc_console_setmode %s", _nc_trace_ttymode(arg)));
-        if (hdl==WINCONSOLE.inp) {
-            dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT | VT_FLAG_IN;
-            if (WINCONSOLE.isTermInfoConsole)
-                dwFlag |= (VT_FLAG_IN);
-            else
-                dwFlag &= (DWORD) ~(VT_FLAG_IN);
-            TRCTTYIN(dwFlag);
-            SetConsoleMode(hdl, dwFlag);
-
-            alt = OutHandle();
-            dwFlag = arg->dwFlagOut;
-            if (WINCONSOLE.isTermInfoConsole)
-                dwFlag |= (VT_FLAG_OUT);
-            else
-                dwFlag |= (VT_FLAG_OUT);
-            TRCTTYOUT(dwFlag);
-            SetConsoleMode(alt, dwFlag);
-        } else {
-            dwFlag = arg->dwFlagOut;
-            if (WINCONSOLE.isTermInfoConsole)
-                dwFlag |= (VT_FLAG_OUT);
-            else
-                dwFlag |= (VT_FLAG_OUT);
-            TRCTTYOUT(dwFlag);
-            SetConsoleMode(hdl, dwFlag);
-
-            alt = WINCONSOLE.inp;
-            dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT;
-            if (WINCONSOLE.isTermInfoConsole)
-                dwFlag |= (VT_FLAG_IN);
-            else
-                dwFlag &= (DWORD) ~(VT_FLAG_IN);
-            TRCTTYIN(dwFlag);
-            SetConsoleMode(alt, dwFlag);
-            T(("effective mode set %s", _nc_trace_ttymode(&TRCTTY)));
-        }
-        code = OK;
+       T(("lib_win32con:_nc_console_setmode %s", _nc_trace_ttymode(arg)));
+       if (hdl == WINCONSOLE.inp) {
+           dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT | VT_FLAG_IN;
+           if (WINCONSOLE.isTermInfoConsole)
+               dwFlag |= (VT_FLAG_IN);
+           else
+               dwFlag &= (DWORD) ~ (VT_FLAG_IN);
+           TRCTTYIN(dwFlag);
+           SetConsoleMode(hdl, dwFlag);
+
+           alt = OutHandle();
+           dwFlag = arg->dwFlagOut;
+           if (WINCONSOLE.isTermInfoConsole)
+               dwFlag |= (VT_FLAG_OUT);
+           else
+               dwFlag |= (VT_FLAG_OUT);
+           TRCTTYOUT(dwFlag);
+           SetConsoleMode(alt, dwFlag);
+       } else {
+           dwFlag = arg->dwFlagOut;
+           if (WINCONSOLE.isTermInfoConsole)
+               dwFlag |= (VT_FLAG_OUT);
+           else
+               dwFlag |= (VT_FLAG_OUT);
+           TRCTTYOUT(dwFlag);
+           SetConsoleMode(hdl, dwFlag);
+
+           alt = WINCONSOLE.inp;
+           dwFlag = arg->dwFlagIn | ENABLE_MOUSE_INPUT;
+           if (WINCONSOLE.isTermInfoConsole)
+               dwFlag |= (VT_FLAG_IN);
+           else
+               dwFlag &= (DWORD) ~ (VT_FLAG_IN);
+           TRCTTYIN(dwFlag);
+           SetConsoleMode(alt, dwFlag);
+           T(("effective mode set %s", _nc_trace_ttymode(&TRCTTY)));
+       }
+       code = OK;
     }
-    return(code);
+    return (code);
 }
 
 NCURSES_EXPORT(int)
-_nc_console_getmode(HANDLE hdl, TTY *arg)
+_nc_console_getmode(HANDLE hdl, TTY * arg)
 {
     int code = ERR;
 
     if (arg) {
-        DWORD dwFlag = 0;
-        HANDLE alt;
-
-        if (hdl==WINCONSOLE.inp) {
-            if(GetConsoleMode(hdl, &dwFlag)) {
-                arg->dwFlagIn = dwFlag;
-                alt = OutHandle();
-                if (GetConsoleMode(alt, &dwFlag)) {
-                    arg->dwFlagOut = dwFlag;
-                    code = OK;
-                }
-            }
-        } else {
-            if (GetConsoleMode(hdl, &dwFlag)) {
-                arg->dwFlagOut = dwFlag;
-                alt = WINCONSOLE.inp;
-                if (GetConsoleMode(alt, &dwFlag)) {
-                    arg->dwFlagIn = dwFlag;
-                    code = OK;
-                }
-            }
-        }
+       DWORD dwFlag = 0;
+       HANDLE alt;
+
+       if (hdl == WINCONSOLE.inp) {
+           if (GetConsoleMode(hdl, &dwFlag)) {
+               arg->dwFlagIn = dwFlag;
+               alt = OutHandle();
+               if (GetConsoleMode(alt, &dwFlag)) {
+                   arg->dwFlagOut = dwFlag;
+                   code = OK;
+               }
+           }
+       } else {
+           if (GetConsoleMode(hdl, &dwFlag)) {
+               arg->dwFlagOut = dwFlag;
+               alt = WINCONSOLE.inp;
+               if (GetConsoleMode(alt, &dwFlag)) {
+                   arg->dwFlagIn = dwFlag;
+                   code = OK;
+               }
+           }
+       }
     }
     T(("lib_win32con:_nc_console_getmode %s", _nc_trace_ttymode(arg)));
-    return(code);
+    return (code);
 }
 
 NCURSES_EXPORT(int)
@@ -351,15 +351,15 @@ _nc_console_flush(HANDLE hdl)
     T((T_CALLED("lib_win32con::_nc_console_flush(hdl=%p"), hdl));
 
     if (hdl != INVALID_HANDLE_VALUE) {
-        if (hdl == WINCONSOLE.hdl ||
-            hdl == WINCONSOLE.inp ||
-            hdl == WINCONSOLE.out) {
-            if (!FlushConsoleInputBuffer(WINCONSOLE.inp))
-                code = ERR;
-        } else {
-            code = ERR;
-            T(("_nc_console_flush not requesting a handle owned by console."));
-        }
+       if (hdl == WINCONSOLE.hdl ||
+           hdl == WINCONSOLE.inp ||
+           hdl == WINCONSOLE.out) {
+           if (!FlushConsoleInputBuffer(WINCONSOLE.inp))
+               code = ERR;
+       } else {
+           code = ERR;
+           T(("_nc_console_flush not requesting a handle owned by console."));
+       }
     }
     returnCode(code);
 }
@@ -368,18 +368,17 @@ NCURSES_EXPORT(WORD)
 _nc_console_MapColor(bool fore, int color)
 {
     static const int _cmap[] =
-        {0, 4, 2, 6, 1, 5, 3, 7};
+    {0, 4, 2, 6, 1, 5, 3, 7};
     int a;
     if (color < 0 || color > 7)
-        a = fore ? 7 : 0;
+       a = fore ? 7 : 0;
     else
-        a = _cmap[color];
+       a = _cmap[color];
     if (!fore)
-        a = a << 4;
+       a = a << 4;
     return (WORD) a;
 }
 
-
 /*
  * Attempt to save the screen contents.  PDCurses does this if
  * PDC_RESTORE_SCREEN is set, giving the same visual appearance on
@@ -398,19 +397,19 @@ save_original_screen(void)
     WINCONSOLE.save_region.Right = (SHORT) (WINCONSOLE.SBI.dwSize.X - 1);
 
     if (read_screen_data()) {
-        result = TRUE;
+       result = TRUE;
     } else {
 
-        WINCONSOLE.save_region.Top = WINCONSOLE.SBI.srWindow.Top;
-        WINCONSOLE.save_region.Left = WINCONSOLE.SBI.srWindow.Left;
-        WINCONSOLE.save_region.Bottom = WINCONSOLE.SBI.srWindow.Bottom;
-        WINCONSOLE.save_region.Right = WINCONSOLE.SBI.srWindow.Right;
+       WINCONSOLE.save_region.Top = WINCONSOLE.SBI.srWindow.Top;
+       WINCONSOLE.save_region.Left = WINCONSOLE.SBI.srWindow.Left;
+       WINCONSOLE.save_region.Bottom = WINCONSOLE.SBI.srWindow.Bottom;
+       WINCONSOLE.save_region.Right = WINCONSOLE.SBI.srWindow.Right;
 
-        WINCONSOLE.window_only = TRUE;
+       WINCONSOLE.window_only = TRUE;
 
-        if (read_screen_data()) {
-            result = TRUE;
-        }
+       if (read_screen_data()) {
+           result = TRUE;
+       }
     }
 
     T(("... save original screen contents %s", result ? "ok" : "err"));
@@ -428,26 +427,26 @@ restore_original_screen(void)
        WINCONSOLE.window_only ? "window" : "entire buffer"));
 
     bufferCoord.X = (SHORT) (WINCONSOLE.window_only ?
-                             WINCONSOLE.SBI.srWindow.Left : 0);
+                            WINCONSOLE.SBI.srWindow.Left : 0);
     bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ?
-                             WINCONSOLE.SBI.srWindow.Top : 0);
+                            WINCONSOLE.SBI.srWindow.Top : 0);
 
     if (write_screen(WINCONSOLE.hdl,
-                     WINCONSOLE.save_screen,
-                     WINCONSOLE.save_size,
-                     bufferCoord,
-                     &save_region)) {
-        result = TRUE;
-        mvcur(-1, -1, LINES - 2, 0);
-        T(("... restore original screen contents ok %dx%d (%d,%d - %d,%d)",
-           WINCONSOLE.save_size.Y,
-           WINCONSOLE.save_size.X,
-           save_region.Top,
-           save_region.Left,
-           save_region.Bottom,
-           save_region.Right));
+                    WINCONSOLE.save_screen,
+                    WINCONSOLE.save_size,
+                    bufferCoord,
+                    &save_region)) {
+       result = TRUE;
+       mvcur(-1, -1, LINES - 2, 0);
+       T(("... restore original screen contents ok %dx%d (%d,%d - %d,%d)",
+          WINCONSOLE.save_size.Y,
+          WINCONSOLE.save_size.X,
+          save_region.Top,
+          save_region.Left,
+          save_region.Bottom,
+          save_region.Right));
     } else {
-        T(("... restore original screen contents err"));
+       T(("... restore original screen contents err"));
     }
     return result;
 }
@@ -460,38 +459,38 @@ read_screen_data(void)
     size_t want;
 
     WINCONSOLE.save_size.X = (SHORT) (WINCONSOLE.save_region.Right
-                                      - WINCONSOLE.save_region.Left + 1);
+                                     - WINCONSOLE.save_region.Left + 1);
     WINCONSOLE.save_size.Y = (SHORT) (WINCONSOLE.save_region.Bottom
-                                      - WINCONSOLE.save_region.Top + 1);
+                                     - WINCONSOLE.save_region.Top + 1);
 
     want = (size_t) (WINCONSOLE.save_size.X * WINCONSOLE.save_size.Y);
 
     if ((WINCONSOLE.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) {
-        bufferCoord.X = (SHORT) (WINCONSOLE.window_only ?
-                                 WINCONSOLE.SBI.srWindow.Left : 0);
-        bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ?
-                                 WINCONSOLE.SBI.srWindow.Top : 0);
-
-        T(("... reading console %s %dx%d into %d,%d - %d,%d at %d,%d",
-           WINCONSOLE.window_only ? "window" : "buffer",
-           WINCONSOLE.save_size.Y, WINCONSOLE.save_size.X,
-           WINCONSOLE.save_region.Top,
-           WINCONSOLE.save_region.Left,
-           WINCONSOLE.save_region.Bottom,
-           WINCONSOLE.save_region.Right,
-           bufferCoord.Y,
-           bufferCoord.X));
-
-        if (read_screen(WINCONSOLE.hdl,
-                        WINCONSOLE.save_screen,
-                        WINCONSOLE.save_size,
-                        bufferCoord,
-                        &WINCONSOLE.save_region)) {
-            result = TRUE;
-        } else {
-            T((" error %#lx", (unsigned long) GetLastError()));
-            FreeAndNull(WINCONSOLE.save_screen);
-        }
+       bufferCoord.X = (SHORT) (WINCONSOLE.window_only ?
+                                WINCONSOLE.SBI.srWindow.Left : 0);
+       bufferCoord.Y = (SHORT) (WINCONSOLE.window_only ?
+                                WINCONSOLE.SBI.srWindow.Top : 0);
+
+       T(("... reading console %s %dx%d into %d,%d - %d,%d at %d,%d",
+          WINCONSOLE.window_only ? "window" : "buffer",
+          WINCONSOLE.save_size.Y, WINCONSOLE.save_size.X,
+          WINCONSOLE.save_region.Top,
+          WINCONSOLE.save_region.Left,
+          WINCONSOLE.save_region.Bottom,
+          WINCONSOLE.save_region.Right,
+          bufferCoord.Y,
+          bufferCoord.X));
+
+       if (read_screen(WINCONSOLE.hdl,
+                       WINCONSOLE.save_screen,
+                       WINCONSOLE.save_size,
+                       bufferCoord,
+                       &WINCONSOLE.save_region)) {
+           result = TRUE;
+       } else {
+           T((" error %#lx", (unsigned long) GetLastError()));
+           FreeAndNull(WINCONSOLE.save_screen);
+       }
     }
 
     return result;
@@ -502,31 +501,31 @@ _nc_console_get_SBI(void)
 {
     bool rc = FALSE;
     if (GetConsoleScreenBufferInfo(WINCONSOLE.hdl, &(WINCONSOLE.SBI))) {
-        T(("GetConsoleScreenBufferInfo"));
-        T(("... buffer(X:%d Y:%d)",
-           WINCONSOLE.SBI.dwSize.X,
-           WINCONSOLE.SBI.dwSize.Y));
-        T(("... window(X:%d Y:%d)",
-           WINCONSOLE.SBI.dwMaximumWindowSize.X,
-           WINCONSOLE.SBI.dwMaximumWindowSize.Y));
-        T(("... cursor(X:%d Y:%d)",
-           WINCONSOLE.SBI.dwCursorPosition.X,
-           WINCONSOLE.SBI.dwCursorPosition.Y));
-        T(("... display(Top:%d Bottom:%d Left:%d Right:%d)",
-           WINCONSOLE.SBI.srWindow.Top,
-           WINCONSOLE.SBI.srWindow.Bottom,
-           WINCONSOLE.SBI.srWindow.Left,
-           WINCONSOLE.SBI.srWindow.Right));
-        if (WINCONSOLE.buffered) {
-            WINCONSOLE.origin.X = 0;
-            WINCONSOLE.origin.Y = 0;
-        } else {
-            WINCONSOLE.origin.X = WINCONSOLE.SBI.srWindow.Left;
-            WINCONSOLE.origin.Y = WINCONSOLE.SBI.srWindow.Top;
-        }
-        rc = TRUE;
+       T(("GetConsoleScreenBufferInfo"));
+       T(("... buffer(X:%d Y:%d)",
+          WINCONSOLE.SBI.dwSize.X,
+          WINCONSOLE.SBI.dwSize.Y));
+       T(("... window(X:%d Y:%d)",
+          WINCONSOLE.SBI.dwMaximumWindowSize.X,
+          WINCONSOLE.SBI.dwMaximumWindowSize.Y));
+       T(("... cursor(X:%d Y:%d)",
+          WINCONSOLE.SBI.dwCursorPosition.X,
+          WINCONSOLE.SBI.dwCursorPosition.Y));
+       T(("... display(Top:%d Bottom:%d Left:%d Right:%d)",
+          WINCONSOLE.SBI.srWindow.Top,
+          WINCONSOLE.SBI.srWindow.Bottom,
+          WINCONSOLE.SBI.srWindow.Left,
+          WINCONSOLE.SBI.srWindow.Right));
+       if (WINCONSOLE.buffered) {
+           WINCONSOLE.origin.X = 0;
+           WINCONSOLE.origin.Y = 0;
+       } else {
+           WINCONSOLE.origin.X = WINCONSOLE.SBI.srWindow.Left;
+           WINCONSOLE.origin.Y = WINCONSOLE.SBI.srWindow.Top;
+       }
+       rc = TRUE;
     } else {
-        T(("GetConsoleScreenBufferInfo ERR"));
+       T(("GetConsoleScreenBufferInfo ERR"));
     }
     return rc;
 }
@@ -546,8 +545,8 @@ _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info)
 
     T((T_CALLED("lib_win32con::_nc_console_set_scrollback(%s)"),
        (normal
-        ? "normal"
-        : "application")));
+       ? "normal"
+       : "application")));
 
     T(("... SBI.srWindow %d,%d .. %d,%d",
        info->srWindow.Top,
@@ -559,52 +558,52 @@ _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info)
        info->dwSize.X));
 
     if (normal) {
-        rect = info->srWindow;
-        coord = info->dwSize;
-        if (memcmp(info, &WINCONSOLE.SBI, sizeof(*info)) != 0) {
-            changed = TRUE;
-            WINCONSOLE.SBI = *info;
-        }
+       rect = info->srWindow;
+       coord = info->dwSize;
+       if (memcmp(info, &WINCONSOLE.SBI, sizeof(*info)) != 0) {
+           changed = TRUE;
+           WINCONSOLE.SBI = *info;
+       }
     } else {
-        int high = info->srWindow.Bottom - info->srWindow.Top + 1;
-        int wide = info->srWindow.Right - info->srWindow.Left + 1;
-
-        if (high < MIN_HIGH) {
-            T(("... height %d < %d", high, MIN_HIGH));
-            high = MIN_HIGH;
-            changed = TRUE;
-        }
-        if (wide < MIN_WIDE) {
-            T(("... width %d < %d", wide, MIN_WIDE));
-            wide = MIN_WIDE;
-            changed = TRUE;
-        }
-
-        rect.Left =
-            rect.Top = 0;
-        rect.Right = (SHORT) (wide - 1);
-        rect.Bottom = (SHORT) (high - 1);
-
-        coord.X = (SHORT) wide;
-        coord.Y = (SHORT) high;
-
-        if (info->dwSize.Y != high ||
-            info->dwSize.X != wide ||
-            info->srWindow.Top != 0 ||
-            info->srWindow.Left != 0) {
-            changed = TRUE;
-        }
+       int high = info->srWindow.Bottom - info->srWindow.Top + 1;
+       int wide = info->srWindow.Right - info->srWindow.Left + 1;
+
+       if (high < MIN_HIGH) {
+           T(("... height %d < %d", high, MIN_HIGH));
+           high = MIN_HIGH;
+           changed = TRUE;
+       }
+       if (wide < MIN_WIDE) {
+           T(("... width %d < %d", wide, MIN_WIDE));
+           wide = MIN_WIDE;
+           changed = TRUE;
+       }
+
+       rect.Left =
+           rect.Top = 0;
+       rect.Right = (SHORT) (wide - 1);
+       rect.Bottom = (SHORT) (high - 1);
+
+       coord.X = (SHORT) wide;
+       coord.Y = (SHORT) high;
+
+       if (info->dwSize.Y != high ||
+           info->dwSize.X != wide ||
+           info->srWindow.Top != 0 ||
+           info->srWindow.Left != 0) {
+           changed = TRUE;
+       }
 
     }
 
     if (changed) {
-        T(("... coord %d,%d", coord.Y, coord.X));
-        T(("... rect %d,%d - %d,%d",
-           rect.Top, rect.Left,
-           rect.Bottom, rect.Right));
-        SetConsoleScreenBufferSize(WINCONSOLE.hdl, coord);      /* dwSize */
-        SetConsoleWindowInfo(WINCONSOLE.hdl, TRUE, &rect);      /* srWindow */
-        _nc_console_get_SBI();
+       T(("... coord %d,%d", coord.Y, coord.X));
+       T(("... rect %d,%d - %d,%d",
+          rect.Top, rect.Left,
+          rect.Bottom, rect.Right));
+       SetConsoleScreenBufferSize(WINCONSOLE.hdl, coord);      /* dwSize */
+       SetConsoleWindowInfo(WINCONSOLE.hdl, TRUE, &rect);      /* srWindow */
+       _nc_console_get_SBI();
     }
     returnVoid;
 }
@@ -629,9 +628,9 @@ static int
 Adjust(int milliseconds, int diff)
 {
     if (milliseconds != INFINITY) {
-        milliseconds -= diff;
-        if (milliseconds < 0)
-            milliseconds = 0;
+       milliseconds -= diff;
+       if (milliseconds < 0)
+           milliseconds = 0;
     }
     return milliseconds;
 }
@@ -651,29 +650,29 @@ decode_mouse(SCREEN *sp, int mask)
     assert(sp && console_initialized);
 
     if (mask & FROM_LEFT_1ST_BUTTON_PRESSED)
-        result |= BUTTON1_PRESSED;
+       result |= BUTTON1_PRESSED;
     if (mask & FROM_LEFT_2ND_BUTTON_PRESSED)
-        result |= BUTTON2_PRESSED;
+       result |= BUTTON2_PRESSED;
     if (mask & FROM_LEFT_3RD_BUTTON_PRESSED)
-        result |= BUTTON3_PRESSED;
+       result |= BUTTON3_PRESSED;
     if (mask & FROM_LEFT_4TH_BUTTON_PRESSED)
-        result |= BUTTON4_PRESSED;
+       result |= BUTTON4_PRESSED;
 
     if (mask & RIGHTMOST_BUTTON_PRESSED) {
-        switch (WINCONSOLE.numButtons) {
-        case 1:
-            result |= BUTTON1_PRESSED;
-            break;
-        case 2:
-            result |= BUTTON2_PRESSED;
-            break;
-        case 3:
-            result |= BUTTON3_PRESSED;
-            break;
-        case 4:
-            result |= BUTTON4_PRESSED;
-            break;
-        }
+       switch (WINCONSOLE.numButtons) {
+       case 1:
+           result |= BUTTON1_PRESSED;
+           break;
+       case 2:
+           result |= BUTTON2_PRESSED;
+           break;
+       case 3:
+           result |= BUTTON3_PRESSED;
+           break;
+       case 4:
+           result |= BUTTON4_PRESSED;
+           break;
+       }
     }
 
     return result;
@@ -697,26 +696,26 @@ handle_mouse(SCREEN *sp, MOUSE_EVENT_RECORD mer)
      * FIXME: implement continuous event-tracking.
      */
     if (sp->_drv_mouse_new_buttons != sp->_drv_mouse_old_buttons) {
-        memset(&work, 0, sizeof(work));
-
-        if (sp->_drv_mouse_new_buttons) {
-            work.bstate |=
-                (mmask_t) decode_mouse(sp,
-                                       sp->_drv_mouse_new_buttons);
-        } else {
-            /* cf: BUTTON_PRESSED, BUTTON_RELEASED */
-            work.bstate |=
-                (mmask_t) (decode_mouse(sp,
-                                        sp->_drv_mouse_old_buttons)
-                           >> 1);
-            result = TRUE;
-        }
-
-        work.x = mer.dwMousePosition.X;
-        work.y = mer.dwMousePosition.Y - AdjustY();
-
-        sp->_drv_mouse_fifo[sp->_drv_mouse_tail] = work;
-        sp->_drv_mouse_tail += 1;
+       memset(&work, 0, sizeof(work));
+
+       if (sp->_drv_mouse_new_buttons) {
+           work.bstate |=
+               (mmask_t) decode_mouse(sp,
+                                      sp->_drv_mouse_new_buttons);
+       } else {
+           /* cf: BUTTON_PRESSED, BUTTON_RELEASED */
+           work.bstate |=
+               (mmask_t) (decode_mouse(sp,
+                                       sp->_drv_mouse_old_buttons)
+                          >> 1);
+           result = TRUE;
+       }
+
+       work.x = mer.dwMousePosition.X;
+       work.y = mer.dwMousePosition.Y - AdjustY();
+
+       sp->_drv_mouse_fifo[sp->_drv_mouse_tail] = work;
+       sp->_drv_mouse_tail += 1;
     }
     return result;
 }
@@ -730,7 +729,6 @@ rkeycompare(const void *el1, const void *el2)
     return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1));
 }
 
-
 static int
 keycompare(const void *el1, const void *el2)
 {
@@ -746,22 +744,22 @@ MapKey(WORD vKey)
     int code = -1;
 
     if (!WINCONSOLE.isTermInfoConsole) {
-        WORD nKey = 0;
-        void *res;
-        LONG key = GenMap(vKey, 0);
-
-        res = bsearch(&key,
-                      WINCONSOLE.map,
-                      (size_t) (N_INI + FKEYS),
-                      sizeof(keylist[0]),
-                      keycompare);
-        if (res) {
-            key = *((LONG *) res);
-            nKey = LOWORD(key);
-            code = (int) (nKey & 0x7fff);
-            if (nKey & 0x8000)
-                code = -code;
-        }
+       WORD nKey = 0;
+       void *res;
+       LONG key = GenMap(vKey, 0);
+
+       res = bsearch(&key,
+                     WINCONSOLE.map,
+                     (size_t) (N_INI + FKEYS),
+                     sizeof(keylist[0]),
+                     keycompare);
+       if (res) {
+           key = *((LONG *) res);
+           nKey = LOWORD(key);
+           code = (int) (nKey & 0x7fff);
+           if (nKey & 0x8000)
+               code = -code;
+       }
     }
     return code;
 }
@@ -772,22 +770,22 @@ AnsiKey(WORD vKey)
     int code = -1;
 
     if (!WINCONSOLE.isTermInfoConsole) {
-        WORD nKey = 0;
-        void *res;
-        LONG key = GenMap(vKey, 0);
-
-        res = bsearch(&key,
-                      WINCONSOLE.ansi_map,
-                      (size_t) (N_INI + FKEYS),
-                      sizeof(keylist[0]),
-                      keycompare);
-        if (res) {
-            key = *((LONG *) res);
-            nKey = LOWORD(key);
-            code = (int) (nKey & 0x7fff);
-            if (nKey & 0x8000)
-                code = -code;
-        }
+       WORD nKey = 0;
+       void *res;
+       LONG key = GenMap(vKey, 0);
+
+       res = bsearch(&key,
+                     WINCONSOLE.ansi_map,
+                     (size_t) (N_INI + FKEYS),
+                     sizeof(keylist[0]),
+                     keycompare);
+       if (res) {
+           key = *((LONG *) res);
+           nKey = LOWORD(key);
+           code = (int) (nKey & 0x7fff);
+           if (nKey & 0x8000)
+               code = -code;
+       }
     }
     return code;
 }
@@ -804,17 +802,17 @@ _nc_console_keyok(int keycode, int flag)
     T((T_CALLED("lib_win32con::_nc_console_keyok(%d, %d)"), keycode, flag));
 
     res = bsearch(&key,
-                  WINCONSOLE.rmap,
-                  (size_t) (N_INI + FKEYS),
-                  sizeof(keylist[0]),
-                  rkeycompare);
+                 WINCONSOLE.rmap,
+                 (size_t) (N_INI + FKEYS),
+                 sizeof(keylist[0]),
+                 rkeycompare);
     if (res) {
-        key = *((LONG *) res);
-        vKey = HIWORD(key);
-        nKey = (LOWORD(key)) & 0x7fff;
-        if (!flag)
-            nKey |= 0x8000;
-        *(LONG *) res = GenMap(vKey, nKey);
+       key = *((LONG *) res);
+       vKey = HIWORD(key);
+       nKey = (LOWORD(key)) & 0x7fff;
+       if (!flag)
+           nKey |= 0x8000;
+       *(LONG *) res = GenMap(vKey, nKey);
     }
     returnCode(code);
 }
@@ -829,27 +827,27 @@ _nc_console_keyExist(int keycode)
 
     T((T_CALLED("lib_win32con::_nc_console_keyExist(%d)"), keycode));
     res = bsearch(&key,
-                  WINCONSOLE.rmap,
-                  (size_t) (N_INI + FKEYS),
-                  sizeof(keylist[0]),
-                  rkeycompare);
+                 WINCONSOLE.rmap,
+                 (size_t) (N_INI + FKEYS),
+                 sizeof(keylist[0]),
+                 rkeycompare);
     if (res) {
-        key = *((LONG *) res);
-        nKey = LOWORD(key);
-        if (!(nKey & 0x8000))
-            found = TRUE;
+       key = *((LONG *) res);
+       nKey = LOWORD(key);
+       if (!(nKey & 0x8000))
+           found = TRUE;
     }
     returnCode(found);
 }
 
 NCURSES_EXPORT(int)
 _nc_console_twait(
-    SCREEN *sp,
-    HANDLE hdl,
-    int mode,
-    int milliseconds,
-    int *timeleft
-    EVENTLIST_2nd(_nc_eventlist * evl))
+                    SCREEN *sp,
+                    HANDLE hdl,
+                    int mode,
+                    int milliseconds,
+                    int *timeleft
+                    EVENTLIST_2nd(_nc_eventlist * evl))
 {
     INPUT_RECORD inp_rec;
     BOOL b;
@@ -861,7 +859,7 @@ _nc_console_twait(
     bool isNoDelay = (milliseconds == 0);
 
 #ifdef NCURSES_WGETCH_EVENTS
-    (void) evl;                 /* TODO: implement wgetch-events */
+    (void) evl;                        /* TODO: implement wgetch-events */
 #endif
 
 #define IGNORE_CTRL_KEYS (SHIFT_PRESSED|LEFT_ALT_PRESSED|RIGHT_ALT_PRESSED| \
@@ -871,174 +869,174 @@ _nc_console_twait(
     assert(sp);
 
     TR(TRACE_IEVENT, ("start twait: hdl=%p, %d milliseconds, mode: %d",
-                      hdl, milliseconds, mode));
+                     hdl, milliseconds, mode));
 
     if (milliseconds < 0)
-        milliseconds = INFINITY;
+       milliseconds = INFINITY;
 
     memset(&inp_rec, 0, sizeof(inp_rec));
 
     while (true) {
-        if (!isNoDelay) {
-            GetSystemTimeAsFileTime(&fstart);
-            rc = WaitForSingleObject(hdl, (DWORD) milliseconds);
-            GetSystemTimeAsFileTime(&fend);
-            diff = (int) tdiff(fstart, fend);
-            milliseconds = Adjust(milliseconds, diff);
-            if (milliseconds< 0)
-                break;
-        }
-
-        if (isNoDelay || (rc == WAIT_OBJECT_0)) {
-            if (mode) {
-                nRead = 0;
-                b = GetNumberOfConsoleInputEvents(hdl, &nRead);
-                if (!b) {
-                    T(("twait:err GetNumberOfConsoleInputEvents"));
-                }
-                if (isNoDelay && b) {
-                    T(("twait: Events Available: %ld", nRead));
-                    if (nRead==0) {
-                        code = 0;
-                        goto end;
-                    } else {
-                        DWORD n = 0;
-                        INPUT_RECORD* pInpRec =
-                            TypeAlloca(INPUT_RECORD, nRead);
-                        if (pInpRec != NULL) {
-                            DWORD i;
-                            BOOL f;
-                            memset(pInpRec, 0, sizeof(INPUT_RECORD)*nRead);
-                            f = PeekConsoleInput(hdl, pInpRec, nRead, &n);
-                            if (f) {
-                                for(i = 0; i < n; i++) {
-                                    if (pInpRec[i].EventType==KEY_EVENT) {
-                                        if(pInpRec[i].Event.KeyEvent.bKeyDown) {
-                                          DWORD ctrlMask =
-                                              (pInpRec[i].Event.KeyEvent.dwControlKeyState &
-                                               IGNORE_CTRL_KEYS);
-                                          if (!ctrlMask) {
-                                              code = TW_INPUT;
-                                              goto end;
-                                          }
-                                        }
-                                    }
-                                }
-                            } else {
-                                T(("twait:err PeekConsoleInput"));
-                            }
-                            code = 0;
-                            goto end;
-                        } else {
-                            T(("twait:err could not alloca input records"));
-                        }
-                    }
-                }
-                if (b && nRead > 0) {
-                    b = PeekConsoleInput(hdl, &inp_rec, 1, &nRead);
-                    if (!b) {
-                        T(("twait:err PeekConsoleInput"));
-                    }
-                    if (b && nRead > 0) {
-                        switch (inp_rec.EventType) {
-                        case KEY_EVENT:
-                            if (mode & TW_INPUT) {
-                                WORD vk =
-                                    inp_rec.Event.KeyEvent.wVirtualKeyCode;
-                                char ch =
-                                    inp_rec.Event.KeyEvent.uChar.AsciiChar;
-                                T(("twait:event KEY_EVENT"));
-                                T(("twait vk=%d, ch=%d, keydown=%d",
-                                   vk, ch, inp_rec.Event.KeyEvent.bKeyDown));
-                                if (inp_rec.Event.KeyEvent.bKeyDown) {
-                                    T(("twait:event KeyDown"));
-                                    if (!WINCONSOLE.isTermInfoConsole &&
-                                        (0 == ch)) {
-                                        int nKey = MapKey(vk);
-                                        if (nKey < 0) {
-                                            CONSUME();
-                                            continue;
-                                        }
-                                    }
-                                    code = TW_INPUT;
-                                    goto end;
-                                } else {
-                                    CONSUME();
-                                }
-                            }
-                            continue;
-                        case MOUSE_EVENT:
-                            T(("twait:event MOUSE_EVENT"));
-                            if (decode_mouse(sp,
-                                             (inp_rec.Event.MouseEvent.dwButtonState
-                                              & BUTTON_MASK)) == 0) {
-                                CONSUME();
-                            } else if (mode & TW_MOUSE) {
-                                code = TW_MOUSE;
-                                goto end;
-                            }
-                            continue;
-                            /* e.g., FOCUS_EVENT */
-                        default:
-                            T(("twait:event Tyoe %d", inp_rec.EventType));
-                            CONSUME();
-                            _nc_console_selectActiveHandle();
-                            continue;
-                        }
-                    }
-                }
-            }
-            continue;
-        } else {
-            if (rc != WAIT_TIMEOUT) {
-                code = -1;
-                break;
-            } else {
-                code = 0;
-                break;
-            }
-        }
+       if (!isNoDelay) {
+           GetSystemTimeAsFileTime(&fstart);
+           rc = WaitForSingleObject(hdl, (DWORD) milliseconds);
+           GetSystemTimeAsFileTime(&fend);
+           diff = (int) tdiff(fstart, fend);
+           milliseconds = Adjust(milliseconds, diff);
+           if (milliseconds < 0)
+               break;
+       }
+
+       if (isNoDelay || (rc == WAIT_OBJECT_0)) {
+           if (mode) {
+               nRead = 0;
+               b = GetNumberOfConsoleInputEvents(hdl, &nRead);
+               if (!b) {
+                   T(("twait:err GetNumberOfConsoleInputEvents"));
+               }
+               if (isNoDelay && b) {
+                   T(("twait: Events Available: %ld", nRead));
+                   if (nRead == 0) {
+                       code = 0;
+                       goto end;
+                   } else {
+                       DWORD n = 0;
+                       INPUT_RECORD *pInpRec =
+                       TypeAlloca(INPUT_RECORD, nRead);
+                       if (pInpRec != NULL) {
+                           DWORD i;
+                           BOOL f;
+                           memset(pInpRec, 0, sizeof(INPUT_RECORD) * nRead);
+                           f = PeekConsoleInput(hdl, pInpRec, nRead, &n);
+                           if (f) {
+                               for (i = 0; i < n; i++) {
+                                   if (pInpRec[i].EventType == KEY_EVENT) {
+                                       if (pInpRec[i].Event.KeyEvent.bKeyDown) {
+                                           DWORD ctrlMask =
+                                           (pInpRec[i].Event.KeyEvent.dwControlKeyState &
+                                            IGNORE_CTRL_KEYS);
+                                           if (!ctrlMask) {
+                                               code = TW_INPUT;
+                                               goto end;
+                                           }
+                                       }
+                                   }
+                               }
+                           } else {
+                               T(("twait:err PeekConsoleInput"));
+                           }
+                           code = 0;
+                           goto end;
+                       } else {
+                           T(("twait:err could not alloca input records"));
+                       }
+                   }
+               }
+               if (b && nRead > 0) {
+                   b = PeekConsoleInput(hdl, &inp_rec, 1, &nRead);
+                   if (!b) {
+                       T(("twait:err PeekConsoleInput"));
+                   }
+                   if (b && nRead > 0) {
+                       switch (inp_rec.EventType) {
+                       case KEY_EVENT:
+                           if (mode & TW_INPUT) {
+                               WORD vk =
+                               inp_rec.Event.KeyEvent.wVirtualKeyCode;
+                               char ch =
+                               inp_rec.Event.KeyEvent.uChar.AsciiChar;
+                               T(("twait:event KEY_EVENT"));
+                               T(("twait vk=%d, ch=%d, keydown=%d",
+                                  vk, ch, inp_rec.Event.KeyEvent.bKeyDown));
+                               if (inp_rec.Event.KeyEvent.bKeyDown) {
+                                   T(("twait:event KeyDown"));
+                                   if (!WINCONSOLE.isTermInfoConsole &&
+                                       (0 == ch)) {
+                                       int nKey = MapKey(vk);
+                                       if (nKey < 0) {
+                                           CONSUME();
+                                           continue;
+                                       }
+                                   }
+                                   code = TW_INPUT;
+                                   goto end;
+                               } else {
+                                   CONSUME();
+                               }
+                           }
+                           continue;
+                       case MOUSE_EVENT:
+                           T(("twait:event MOUSE_EVENT"));
+                           if (decode_mouse(sp,
+                                            (inp_rec.Event.MouseEvent.dwButtonState
+                                             & BUTTON_MASK)) == 0) {
+                               CONSUME();
+                           } else if (mode & TW_MOUSE) {
+                               code = TW_MOUSE;
+                               goto end;
+                           }
+                           continue;
+                           /* e.g., FOCUS_EVENT */
+                       default:
+                           T(("twait:event Tyoe %d", inp_rec.EventType));
+                           CONSUME();
+                           _nc_console_selectActiveHandle();
+                           continue;
+                       }
+                   }
+               }
+           }
+           continue;
+       } else {
+           if (rc != WAIT_TIMEOUT) {
+               code = -1;
+               break;
+           } else {
+               code = 0;
+               break;
+           }
+       }
     }
-end:
+  end:
 
     TR(TRACE_IEVENT, ("end twait: returned %d (%lu), remaining time %d msec",
-                      code, GetLastError(), milliseconds));
+                     code, GetLastError(), milliseconds));
 
     if (timeleft)
-        *timeleft = milliseconds;
+       *timeleft = milliseconds;
 
     return code;
 }
 
 NCURSES_EXPORT(int)
 _nc_console_testmouse(
-                      SCREEN *sp,
-                      HANDLE hdl,
-                      int delay
-                      EVENTLIST_2nd(_nc_eventlist * evl))
+                        SCREEN *sp,
+                        HANDLE hdl,
+                        int delay
+                        EVENTLIST_2nd(_nc_eventlist * evl))
 {
     int rc = 0;
 
     assert(sp);
 
     if (sp->_drv_mouse_head < sp->_drv_mouse_tail) {
-        rc = TW_MOUSE;
+       rc = TW_MOUSE;
     } else {
-        rc = _nc_console_twait(sp,
-                               hdl,
-                               TWAIT_MASK,
-                               delay,
-                               (int *) 0
-                               EVENTLIST_2nd(evl));
+       rc = _nc_console_twait(sp,
+                              hdl,
+                              TWAIT_MASK,
+                              delay,
+                              (int *) 0
+                              EVENTLIST_2nd(evl));
     }
     return rc;
 }
 
 NCURSES_EXPORT(int)
 _nc_console_read(
-                 SCREEN *sp,
-                 HANDLE hdl,
-                 int *buf)
+                   SCREEN *sp,
+                   HANDLE hdl,
+                   int *buf)
 {
     int rc = -1;
     INPUT_RECORD inp_rec;
@@ -1054,47 +1052,47 @@ _nc_console_read(
     T((T_CALLED("lib_win32con::_nc_console_read(%p)"), sp));
 
     while ((b = ReadConsoleInput(hdl, &inp_rec, 1, &nRead))) {
-        if (b && nRead > 0) {
-            if (rc < 0)
-                rc = 0;
-            rc = rc + (int) nRead;
-            if (inp_rec.EventType == KEY_EVENT) {
-                if (!inp_rec.Event.KeyEvent.bKeyDown)
-                    continue;
-                *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar;
-                vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
-                /*
-                 * There are 24 virtual function-keys, and typically
-                 * 12 function-keys on a keyboard.  Use the shift-modifier
-                 * to provide the remaining 12 keys.
-                 */
-                if (vk >= VK_F1 && vk <= VK_F12) {
-                    if (inp_rec.Event.KeyEvent.dwControlKeyState &
-                        SHIFT_PRESSED) {
-                        vk = (WORD) (vk + 12);
-                    }
-                }
-                if (*buf == 0) {
-                    int key = MapKey(vk);
-                    if (key < 0)
-                        continue;
-                    if (sp->_keypad_on) {
-                        *buf = key;
-                    } else {
-                        ungetch('\0');
-                        *buf = AnsiKey(vk);
-                    }
-                }
-                break;
-            } else if (inp_rec.EventType == MOUSE_EVENT) {
-                if (handle_mouse(sp,
-                                 inp_rec.Event.MouseEvent)) {
-                    *buf = KEY_MOUSE;
-                    break;
-                }
-            }
-            continue;
-        }
+       if (b && nRead > 0) {
+           if (rc < 0)
+               rc = 0;
+           rc = rc + (int) nRead;
+           if (inp_rec.EventType == KEY_EVENT) {
+               if (!inp_rec.Event.KeyEvent.bKeyDown)
+                   continue;
+               *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar;
+               vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
+               /*
+                * There are 24 virtual function-keys, and typically
+                * 12 function-keys on a keyboard.  Use the shift-modifier
+                * to provide the remaining 12 keys.
+                */
+               if (vk >= VK_F1 && vk <= VK_F12) {
+                   if (inp_rec.Event.KeyEvent.dwControlKeyState &
+                       SHIFT_PRESSED) {
+                       vk = (WORD) (vk + 12);
+                   }
+               }
+               if (*buf == 0) {
+                   int key = MapKey(vk);
+                   if (key < 0)
+                       continue;
+                   if (sp->_keypad_on) {
+                       *buf = key;
+                   } else {
+                       ungetch('\0');
+                       *buf = AnsiKey(vk);
+                   }
+               }
+               break;
+           } else if (inp_rec.EventType == MOUSE_EVENT) {
+               if (handle_mouse(sp,
+                                inp_rec.Event.MouseEvent)) {
+                   *buf = KEY_MOUSE;
+                   break;
+               }
+           }
+           continue;
+       }
     }
     returnCode(rc);
 }
@@ -1115,16 +1113,17 @@ _nc_console_isatty(int fd)
     T((T_CALLED("lib_win32con::_nc_console_isatty(%d"), fd));
 
     if (_isatty(fd))
-        result = 1;
+       result = 1;
 #ifdef _NC_CHECK_MINTTY
     else {
-        if (_nc_console_checkmintty(fd, NULL)) {
-            result = 2;
-            fprintf(stderr, "ncurses on Windows must run in a Windows console.\n");
-            fprintf(stderr, "On newer versions of Windows, the calling program should create a PTY-like.\n");
-            fprintf(stderr, "device using the CreatePseudoConsole Windows API call.\n");
-            exit(EXIT_FAILURE);
-        }
+       if (_nc_console_checkmintty(fd, NULL)) {
+           result = 2;
+           fprintf(stderr,
+                   "ncurses on Windows must run in a Windows console.\n"
+                   "On newer versions of Windows, the calling program should create a PTY-like.\n"
+                   "device using the CreatePseudoConsole Windows API call.\n");
+           exit(EXIT_FAILURE);
+       }
     }
 #endif
     returnCode(result);
@@ -1139,116 +1138,127 @@ _nc_console_checkinit(bool initFlag, bool assumeTermInfo)
        initFlag, assumeTermInfo));
 
     if (!initFlag) {
-        res = console_initialized;
+       res = console_initialized;
     } else {
-        /* initialize once, or not at all */
-        if (!console_initialized) {
-            int i;
-            DWORD num_buttons;
-            WORD a;
-            BOOL buffered = FALSE;
-            BOOL b;
-
-            START_TRACE();
-            WINCONSOLE.isTermInfoConsole = assumeTermInfo;
-
-            WINCONSOLE.map = (LPDWORD)malloc(sizeof(DWORD)*MAPSIZE);
-            WINCONSOLE.rmap = (LPDWORD)malloc(sizeof(DWORD)*MAPSIZE);
-            WINCONSOLE.ansi_map = (LPDWORD)malloc(sizeof(DWORD)*MAPSIZE);
-
-            for (i = 0; i < (N_INI + FKEYS); i++) {
-                if (i < N_INI) {
-                    WINCONSOLE.rmap[i] = WINCONSOLE.map[i] =
-                        (DWORD) keylist[i];
-                    WINCONSOLE.ansi_map[i] = (DWORD) ansi_keys[i];
-                } else {
-                    WINCONSOLE.rmap[i] = WINCONSOLE.map[i] =
-                        (DWORD) GenMap((VK_F1 + (i - N_INI)),
-                                       (KEY_F(1) + (i - N_INI)));
-                    WINCONSOLE.ansi_map[i] =
-                        (DWORD) GenMap((VK_F1 + (i - N_INI)),
-                                       (';' + (i - N_INI)));
-                }
-            }
-            qsort(WINCONSOLE.ansi_map,
-                  (size_t) (MAPSIZE),
-                  sizeof(keylist[0]),
-                  keycompare);
-            qsort(WINCONSOLE.map,
-                  (size_t) (MAPSIZE),
-                  sizeof(keylist[0]),
-                  keycompare);
-            qsort(WINCONSOLE.rmap,
-                  (size_t) (MAPSIZE),
-                  sizeof(keylist[0]),
-                  rkeycompare);
-
-            if (GetNumberOfConsoleMouseButtons(&num_buttons)) {
-                WINCONSOLE.numButtons = (int) num_buttons;
-            } else {
-                WINCONSOLE.numButtons = 1;
-            }
-
-            a = _nc_console_MapColor(true, COLOR_WHITE) |
-                _nc_console_MapColor(false, COLOR_BLACK);
-            for (i = 0; i < CON_NUMPAIRS; i++)
-                WINCONSOLE.pairs[i] = a;
-
-            WINCONSOLE.inp = GetStdHandle(STD_INPUT_HANDLE);
-            WINCONSOLE.out = GetStdHandle(STD_OUTPUT_HANDLE);
-            WINCONSOLE.hdl = WINCONSOLE.out;
-
-            GetConsoleMode(WINCONSOLE.inp, &WINCONSOLE.originalMode.dwFlagIn);
-            GetConsoleMode(WINCONSOLE.out, &WINCONSOLE.originalMode.dwFlagOut);
-
-            if (!WINCONSOLE.isTermInfoConsole) {
-                b = AllocConsole();
-
-                if (!b)
-                    b = AttachConsole(ATTACH_PARENT_PROCESS);
-
-                if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
-                    T(("... will not buffer console"));
-                } else {
-                    T(("... creating console buffer"));
-                    WINCONSOLE.hdl =
-                        CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
-                                                  0,
-                                                  NULL,
-                                                  CONSOLE_TEXTMODE_BUFFER,
-                                                  NULL);
-                    buffered = TRUE;
-                }
-            }
-
-            /* We set binary I/O even when using the console
-               driver to cover the situation, that the
-               TERM variable is set to #win32con, but actually
-               Windows supports virtual terminal processing.
-               So if terminfo functions are used in this setup,
-               they actually may work.
-            */
-            _setmode(fileno(stdin), _O_BINARY);
-            _setmode(fileno(stdout), _O_BINARY);
-
-            if (WINCONSOLE.hdl != INVALID_HANDLE_VALUE) {
-                WINCONSOLE.buffered = buffered;
-                _nc_console_get_SBI();
-                WINCONSOLE.save_SBI = WINCONSOLE.SBI;
-                if (!buffered) {
-                    save_original_screen();
-                    _nc_console_set_scrollback(FALSE, &WINCONSOLE.SBI);
-                }
-                GetConsoleCursorInfo(WINCONSOLE.hdl, &WINCONSOLE.save_CI);
-                T(("... initial cursor is %svisible, %d%%",
-                   (WINCONSOLE.save_CI.bVisible ? "" : "not-"),
-                   (int) WINCONSOLE.save_CI.dwSize));
-            }
-
-            WINCONSOLE.initialized = TRUE;
-            console_initialized = TRUE;
-        }
-        res = (WINCONSOLE.hdl != INVALID_HANDLE_VALUE);
+       /* initialize once, or not at all */
+       if (!console_initialized) {
+           int i;
+           DWORD num_buttons;
+           WORD a;
+           BOOL buffered = FALSE;
+           BOOL b;
+
+           START_TRACE();
+           WINCONSOLE.isTermInfoConsole = assumeTermInfo;
+
+           WINCONSOLE.map = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE);
+           WINCONSOLE.rmap = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE);
+           WINCONSOLE.ansi_map = (LPDWORD) malloc(sizeof(DWORD) * MAPSIZE);
+
+           for (i = 0; i < (N_INI + FKEYS); i++) {
+               if (i < N_INI) {
+                   WINCONSOLE.rmap[i] = WINCONSOLE.map[i] =
+                       (DWORD) keylist[i];
+                   WINCONSOLE.ansi_map[i] = (DWORD) ansi_keys[i];
+               } else {
+                   WINCONSOLE.rmap[i] = WINCONSOLE.map[i] =
+                       (DWORD) GenMap((VK_F1 + (i - N_INI)),
+                                      (KEY_F(1) + (i - N_INI)));
+                   WINCONSOLE.ansi_map[i] =
+                       (DWORD) GenMap((VK_F1 + (i - N_INI)),
+                                      (';' + (i - N_INI)));
+               }
+           }
+           qsort(WINCONSOLE.ansi_map,
+                 (size_t) (MAPSIZE),
+                 sizeof(keylist[0]),
+                 keycompare);
+           qsort(WINCONSOLE.map,
+                 (size_t) (MAPSIZE),
+                 sizeof(keylist[0]),
+                 keycompare);
+           qsort(WINCONSOLE.rmap,
+                 (size_t) (MAPSIZE),
+                 sizeof(keylist[0]),
+                 rkeycompare);
+
+           if (GetNumberOfConsoleMouseButtons(&num_buttons)) {
+               WINCONSOLE.numButtons = (int) num_buttons;
+           } else {
+               WINCONSOLE.numButtons = 1;
+           }
+
+           a = _nc_console_MapColor(true, COLOR_WHITE) |
+               _nc_console_MapColor(false, COLOR_BLACK);
+           for (i = 0; i < CON_NUMPAIRS; i++)
+               WINCONSOLE.pairs[i] = a;
+
+#define SaveConsoleMode(handle, data) \
+            GetConsoleMode(WINCONSOLE.handle, &WINCONSOLE.originalMode.value)
+
+           if (WINCONSOLE.isTermInfoConsole) {
+               WINCONSOLE.inp = GetStdHandle(STD_INPUT_HANDLE);
+               WINCONSOLE.out = GetStdHandle(STD_OUTPUT_HANDLE);
+               WINCONSOLE.hdl = WINCONSOLE.out;
+
+               SaveConsoleMode(inp, dwFlagIn);
+               SaveConsoleMode(out, dwFlagOut);
+
+           } else {
+               b = AllocConsole();
+
+               if (!b)
+                   b = AttachConsole(ATTACH_PARENT_PROCESS);
+
+               WINCONSOLE.inp = GetDirectHandle("CONIN$", FILE_SHARE_READ);
+               WINCONSOLE.out = GetDirectHandle("CONOUT$", FILE_SHARE_WRITE);
+
+               SaveConsoleMode(inp, dwFlagIn);
+               SaveConsoleMode(out, dwFlagOut);
+
+               if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
+                   WINCONSOLE.hdl = WINCONSOLE.out;
+                   T(("... will not buffer console"));
+               } else {
+                   T(("... creating console buffer"));
+                   WINCONSOLE.hdl =
+                       CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
+                                                 FILE_SHARE_READ | FILE_SHARE_WRITE,
+                                                 NULL,
+                                                 CONSOLE_TEXTMODE_BUFFER,
+                                                 NULL);
+                   buffered = TRUE;
+               }
+           }
+
+           /* We set binary I/O even when using the console
+              driver to cover the situation, that the
+              TERM variable is set to #win32con, but actually
+              Windows supports virtual terminal processing.
+              So if terminfo functions are used in this setup,
+              they actually may work.
+            */
+           _setmode(fileno(stdin), _O_BINARY);
+           _setmode(fileno(stdout), _O_BINARY);
+
+           if (WINCONSOLE.hdl != INVALID_HANDLE_VALUE) {
+               WINCONSOLE.buffered = buffered;
+               _nc_console_get_SBI();
+               WINCONSOLE.save_SBI = WINCONSOLE.SBI;
+               if (!buffered) {
+                   save_original_screen();
+                   _nc_console_set_scrollback(FALSE, &WINCONSOLE.SBI);
+               }
+               GetConsoleCursorInfo(WINCONSOLE.hdl, &WINCONSOLE.save_CI);
+               T(("... initial cursor is %svisible, %d%%",
+                  (WINCONSOLE.save_CI.bVisible ? "" : "not-"),
+                  (int) WINCONSOLE.save_CI.dwSize));
+           }
+
+           WINCONSOLE.initialized = TRUE;
+           console_initialized = TRUE;
+       }
+       res = (WINCONSOLE.hdl != INVALID_HANDLE_VALUE);
     }
     returnBool(res);
 }
index ad9e629a190446abd54289a5e17fe8ddb6681004..9822f125898baa167ebf291d78f015fd64366317 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2023 Thomas E. Dickey                                *
  * Copyright 2008-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -55,7 +55,7 @@
 
 #define CUR TerminalType(my_term).
 
-MODULE_ID("$Id: win_driver.c,v 1.67 2021/09/04 10:54:35 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.70 2023/02/12 00:31:33 tom Exp $")
 
 #define TypeAlloca(type,count) (type*) _alloca(sizeof(type) * (size_t) (count))
 
@@ -2213,14 +2213,14 @@ InitConsole(void)
        for (i = 0; i < NUMPAIRS; i++)
            CON.pairs[i] = a;
 
-       CON.inp = GetStdHandle(STD_INPUT_HANDLE);
-       CON.out = GetStdHandle(STD_OUTPUT_HANDLE);
-
        b = AllocConsole();
 
        if (!b)
            b = AttachConsole(ATTACH_PARENT_PROCESS);
 
+       CON.inp = GetDirectHandle("CONIN$", FILE_SHARE_READ);
+       CON.out = GetDirectHandle("CONOUT$", FILE_SHARE_WRITE);
+
        if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
            T(("... will not buffer console"));
            buffered = FALSE;
@@ -2228,7 +2228,7 @@ InitConsole(void)
        } else {
            T(("... creating console buffer"));
            CON.hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
-                                               0,
+                                               FILE_SHARE_READ | FILE_SHARE_WRITE,
                                                NULL,
                                                CONSOLE_TEXTMODE_BUFFER,
                                                NULL);
index a5a133ac5e85e1819a15b714a2eb41426551129a..6202f86a617eaa901eb2da1b2f9f2d9089352eb0 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230128) unstable; urgency=low
+ncurses6 (6.4+20230211) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Jan 2023 06:48:39 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Feb 2023 07:14:38 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index a5a133ac5e85e1819a15b714a2eb41426551129a..6202f86a617eaa901eb2da1b2f9f2d9089352eb0 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230128) unstable; urgency=low
+ncurses6 (6.4+20230211) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Jan 2023 06:48:39 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Feb 2023 07:14:38 -0500
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
index 11781eed390caeb1b1b9a36c1795f5c27563c7d3..68ecb505dfdf5fb5274eb3b63b7ece071df0b403 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230128) unstable; urgency=low
+ncurses6 (6.4+20230211) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Jan 2023 06:48:39 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 11 Feb 2023 07:14:38 -0500
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
index 869158d5b161b1a549e4e93792fd1e6f97a10a53..66c48cc4d30d4a3cc20c3a008fef484db05ac992 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.563 2023/01/28 11:48:39 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.565 2023/02/11 12:14:37 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  "0128"\r
+!define VERSION_MMDD  "0211"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 1aaba12a6fa4cf0cd05aa146d810c5d44ec45782..c79297d936aa1051a5917f29e8af1f744cbd28d0 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.4
-Release: 20230128
+Release: 20230211
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 45a2c3dc55221a4a60d71b697d058b73778b593f..3a5750d781b7107b2fa759ac7cf73abe1f773056 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20230128
+Release: 20230211
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 2016e4d7413b9667ce8120fb411e2bdd20bc8bd0..e58a6a3f8aa55472a7eac8dcce6ce3f0e70fcf7b 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20230128
+Release: 20230211
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz