-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3729 2021/10/17 15:11:55 tom Exp $
+-- $Id: NEWS,v 1.3730 2021/10/18 22:51:28 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20211018
+ + check for screen size-change in scr_init() and scr_restore(), in case
+ a screen dump does not match the current screen dimensions (report by
+ Frank Tkalcevic).
+
20211017
+ amend change for pkg-config to account for "none" being returned in
the libdir-path result rather than "no" (report by Gabriele Balducci).
-5:0:10 6.2 20211017
+5:0:10 6.2 20211018
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1441 2021/10/17 14:58:11 tom Exp $
+# $Id: dist.mk,v 1.1442 2021/10/18 23:31:58 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 2
-NCURSES_PATCH = 20211017
+NCURSES_PATCH = 20211018
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_screen.c,v 1.101 2021/06/26 20:43:19 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.103 2021/10/18 22:40:48 tom Exp $")
#define MAX_SIZE 0x3fff /* 16k is big enough for a window or pad */
if (ch == '\n') {
result[--used] = '\0';
- T(("READ:%s", result));
+ TR(TRACE_IEVENT, ("READ:%s", result));
} else if (used == 0) {
free(result);
result = 0;
{
bool found = FALSE;
- T(("decode_attr '%s'", source));
+ TR(TRACE_IEVENT, ("decode_attr '%s'", source));
while (*source) {
if (source[0] == MARKER && source[1] == L_CURL) {
int base = 16;
const char digits[] = "0123456789abcdef";
- T(("decode_char '%s'", source));
+ TR(TRACE_IEVENT, ("decode_char '%s'", source));
*target = ' ';
switch (*source) {
case MARKER:
int color = PAIR_NUMBER((int) attr);
int value;
- T(("decode_chtype '%s'", source));
+ TR(TRACE_IEVENT, ("decode_chtype '%s'", source));
source = decode_attr(source, &attr, &color);
source = decode_char(source, &value);
*target = (ChCharOf(value) | attr | (chtype) COLOR_PAIR(color));
int append = 0;
int value = 0;
- T(("decode_cchar '%s'", source));
+ TR(TRACE_IEVENT, ("decode_cchar '%s'", source));
*target = blank;
#if NCURSES_EXT_COLORS
color = fillin->ext_color;
returnCode(code);
}
+/*
+ * Replace a window covering the whole screen, i.e., newscr or curscr.
+ */
+static WINDOW *
+replace_window(WINDOW *target, FILE *source)
+{
+ WINDOW *result = getwin(source);
+#if NCURSES_EXT_FUNCS
+ if (result != NULL) {
+ if (getmaxx(result) != getmaxx(target)
+ || getmaxy(result) != getmaxy(target)) {
+ int code = wresize(result,
+ 1 + getmaxy(target),
+ 1 + getmaxx(target));
+ if (code != OK) {
+ delwin(result);
+ result = NULL;
+ }
+ }
+ }
+#endif
+ delwin(target);
+ return result;
+}
+
NCURSES_EXPORT(int)
NCURSES_SP_NAME(scr_restore) (NCURSES_SP_DCLx const char *file)
{
if (_nc_access(file, R_OK) >= 0
&& (fp = safe_fopen(file, BIN_R)) != 0) {
- delwin(NewScreen(SP_PARM));
- NewScreen(SP_PARM) = getwin(fp);
+ NewScreen(SP_PARM) = replace_window(NewScreen(SP_PARM), fp);
#if !USE_REENTRANT
newscr = NewScreen(SP_PARM);
#endif
if (_nc_access(file, R_OK) >= 0
&& (fp = safe_fopen(file, BIN_R)) != 0) {
- delwin(CurScreen(SP_PARM));
- CurScreen(SP_PARM) = getwin(fp);
+ CurScreen(SP_PARM) = replace_window(CurScreen(SP_PARM), fp);
#if !USE_REENTRANT
curscr = CurScreen(SP_PARM);
#endif
-ncurses6 (6.2+20211017) unstable; urgency=low
+ncurses6 (6.2+20211018) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 17 Oct 2021 10:58:11 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 18 Oct 2021 19:31:58 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20211017) unstable; urgency=low
+ncurses6 (6.2+20211018) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 17 Oct 2021 10:58:11 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 18 Oct 2021 19:31:58 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20211017) unstable; urgency=low
+ncurses6 (6.2+20211018) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 17 Oct 2021 10:58:11 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 18 Oct 2021 19:31:58 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.483 2021/10/17 14:58:11 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.484 2021/10/18 23:31:58 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "2"\r
!define VERSION_YYYY "2021"\r
-!define VERSION_MMDD "1017"\r
+!define VERSION_MMDD "1018"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.2
-Release: 20211017
+Release: 20211018
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.2
-Release: 20211017
+Release: 20211018
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.2
-Release: 20211017
+Release: 20211018
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz