Skip to content

Commit

Permalink
ncurses 6.4 - patch 20230211
Browse files Browse the repository at this point in the history
+ 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).
  • Loading branch information
ThomasDickey committed Feb 12, 2023
1 parent 5b82f41 commit 9e08482
Show file tree
Hide file tree
Showing 14 changed files with 705 additions and 664 deletions.
9 changes: 8 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5:0:10 6.4 20230128
5:0:10 6.4 20230211
4 changes: 2 additions & 2 deletions dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions man/term_variables.3x
Original file line number Diff line number Diff line change
@@ -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 *
Expand Down Expand Up @@ -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
Expand Down
28 changes: 26 additions & 2 deletions ncurses/curses.priv.h
Original file line number Diff line number Diff line change
@@ -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 *
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 9e08482

Please sign in to comment.