]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20211106
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 7 Nov 2021 00:20:43 +0000 (00:20 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 7 Nov 2021 00:20:43 +0000 (00:20 +0000)
+ improve check in misc/Makefile.in for empty $PKG_CONFIG_LIBDIR
+ modify wnoutrefresh to call pnoutrefresh if its parameter is a pad,
  rather than treating it as an error, and modify new_panel to permit
  its window-parameter to be a pad (report by Giorgos Xou).
+ fix a memory-leak in del_curterm (prompted by discussion with Bram
  Moolenaar, cf: 20210821).

16 files changed:
NEWS
VERSION
dist.mk
misc/Makefile.in
ncurses/base/lib_delwin.c
ncurses/base/lib_freeall.c
ncurses/base/lib_refresh.c
ncurses/tinfo/lib_cur_term.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
panel/p_new.c

diff --git a/NEWS b/NEWS
index 48304825161e8fbcc04a81cc8e037ab1f857a991..10b881720e87b18b1eb760f6f8698193f360ffb8 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.3738 2021/10/31 00:31:12 tom Exp $
+-- $Id: NEWS,v 1.3741 2021/11/06 23:43:40 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,14 @@ 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.
 
+20211106
+       + improve check in misc/Makefile.in for empty $PKG_CONFIG_LIBDIR
+       + modify wnoutrefresh to call pnoutrefresh if its parameter is a pad,
+         rather than treating it as an error, and modify new_panel to permit
+         its window-parameter to be a pad (report by Giorgos Xou).
+       + fix a memory-leak in del_curterm (prompted by discussion with Bram
+         Moolenaar, cf: 20210821).
+
 20211030
        + simplify some references to WINDOWS._flags using macros.
        + add a "check" rule in Ada95 makefile, to help with test-packages.
diff --git a/VERSION b/VERSION
index e0abb8e89fb868aa77656c0483e620cb34b85169..98fece81dff4427604a916647f3890ceea2474cd 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20211030
+5:0:10 6.3     20211106
diff --git a/dist.mk b/dist.mk
index 2bb8d59f30971c32b5c7f23cc94ff1e82f1eba17..dba6c9e10d4bd4498bc54f1d2b2c61617ed6e70e 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.1447 2021/10/30 08:33:19 tom Exp $
+# $Id: dist.mk,v 1.1448 2021/11/06 08:19:47 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 = 3
-NCURSES_PATCH = 20211030
+NCURSES_PATCH = 20211106
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index befbb0280ebea8e8d9760e0bda2e19d4a096318f..1539973fef073ecffa55bd9a04e5d60c2caddb93 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.78 2021/07/03 19:07:50 tom Exp $
+# $Id: Makefile.in,v 1.79 2021/11/06 23:36:12 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2016,2017 Free Software Foundation, Inc.                    #
@@ -147,7 +147,7 @@ install.libs :: $(DESTDIR)$(bindir) ncurses-config
 # directory during this rule:
 @MAKE_PC_FILES@install \
 @MAKE_PC_FILES@install.libs :: pc-files
-@MAKE_PC_FILES@        @$(SHELL) -c 'case "x$(DESTDIR)$(PKG_CONFIG_LIBDIR)" in \
+@MAKE_PC_FILES@        @$(SHELL) -c 'case "x$(PKG_CONFIG_LIBDIR)" in \
 @MAKE_PC_FILES@                x/*) \
 @MAKE_PC_FILES@                        mkdir -p $(DESTDIR)$(PKG_CONFIG_LIBDIR); \
 @MAKE_PC_FILES@                        for name in $(PC_FILES); do \
index 2f0621cf856c94673636cfc7c6a306ad827c9e84..efaf4ee112fe437347063c29b602d61c824c323b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2008,2009 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_delwin.c,v 1.21 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_delwin.c,v 1.22 2021/11/06 21:54:14 tom Exp $")
 
 static bool
 cannot_delete(WINDOW *win)
 {
     WINDOWLIST *p;
     bool result = TRUE;
+    if (IS_PAD(win)) {
+       result = FALSE;
+    } else {
 #ifdef USE_SP_WINDOWLIST
-    SCREEN *sp = _nc_screen_of(win);
+       SCREEN *sp = _nc_screen_of(win);
 #endif
 
-    for (each_window(SP_PARM, p)) {
-       if (&(p->win) == win) {
-           result = FALSE;
-       } else if ((p->win._flags & _SUBWIN) != 0
-                  && p->win._parent == win) {
-           result = TRUE;
-           break;
+       for (each_window(SP_PARM, p)) {
+           if (&(p->win) == win) {
+               result = FALSE;
+           } else if (IS_SUBWIN(&(p->win))
+                      && p->win._parent == win) {
+               result = TRUE;
+               break;
+           }
        }
     }
     return result;
@@ -77,15 +81,18 @@ delwin(WINDOW *win)
        if (win == 0
            || cannot_delete(win)) {
            result = ERR;
+       } else if (IS_PAD(win)) {
+           win->_parent = NULL;
+           result = OK;
        } else {
 #if NCURSES_SP_FUNCS
            SCREEN *sp = _nc_screen_of(win);
 #endif
-           if (win->_flags & _SUBWIN)
+           if (IS_SUBWIN(win)) {
                touchwin(win->_parent);
-           else if (CurScreen(SP_PARM) != 0)
+           } else if (CurScreen(SP_PARM) != 0) {
                touchwin(CurScreen(SP_PARM));
-
+           }
            result = _nc_freewin(win);
        }
        _nc_unlock_global(curses);
index 7af8c30a6569a8d76060030e6d9907b9a23552d9..75bbe77e34093be4c4efa70b4a40f18da2abaac1 100644 (file)
@@ -40,7 +40,7 @@
 extern int malloc_errfd;       /* FIXME */
 #endif
 
-MODULE_ID("$Id: lib_freeall.c,v 1.75 2021/10/23 18:53:46 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.76 2021/11/06 21:52:49 tom Exp $")
 
 /*
  * Free all ncurses data.  This is used for testing only (there's no practical
@@ -78,6 +78,9 @@ NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0)
                WINDOW *p_win = &(p->win);
                bool found = FALSE;
 
+               if (IS_PAD(p_win))
+                   continue;
+
 #ifndef USE_SP_WINDOWLIST
                if (p->screen != SP_PARM)
                    continue;
index d8444289c1528efc5ea2934b9a3c127c34e320f7..4579cbf81162053c2a8284120e4c85cf2afc9000 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2010,2011 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -43,7 +43,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_refresh.c,v 1.46 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.47 2021/11/06 22:22:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 wrefresh(WINDOW *win)
@@ -92,13 +92,21 @@ wnoutrefresh(WINDOW *win)
 
     T((T_CALLED("wnoutrefresh(%p)"), (void *) win));
 
-    /*
-     * This function will break badly if we try to refresh a pad.
-     */
-    if ((win == 0)
-       || (win->_flags & _ISPAD))
+    if (win == NULL)
        returnCode(ERR);
 
+    /*
+     * Handle pads as a special case.
+     */
+    if (IS_PAD(win)) {
+       returnCode(pnoutrefresh(win,
+                               win->_pad._pad_y,
+                               win->_pad._pad_x,
+                               win->_pad._pad_top,
+                               win->_pad._pad_left,
+                               win->_pad._pad_bottom,
+                               win->_pad._pad_right));
+    }
 #ifdef TRACE
     if (USE_TRACEF(TRACE_UPDATE)) {
        _tracedump("...win", win);
index 0373aebb11b93d576fc5d262ec747f0ad5cd64ad..b1303d6d45334cfdecf4d8291a39053bf689b5d5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -41,7 +41,7 @@
 #include <termcap.h>           /* ospeed */
 #include <tic.h>               /* VALID_STRING */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.43 2020/10/24 18:54:32 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.44 2021/11/06 19:04:21 tom Exp $")
 
 #undef CUR
 #define CUR TerminalType(termp).
@@ -167,10 +167,13 @@ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL *termp)
        /* discard memory used in tgetent's cache for this terminal */
        _nc_tgetent_leak(termp);
 #endif
+       free(termp->tparm_state.fmt_buff);
+       free(termp->tparm_state.out_buff);
        free(termp);
 
        rc = OK;
     }
+
     returnCode(rc);
 }
 
index 02f4db04e2cf5bc554dd7c205f068f8982a70975..1cbd0a7c263f542c01b8eb0e3cbafaca057e29d7 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211030) unstable; urgency=low
+ncurses6 (6.3+20211106) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 30 Oct 2021 04:33:19 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Nov 2021 04:19:47 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 02f4db04e2cf5bc554dd7c205f068f8982a70975..1cbd0a7c263f542c01b8eb0e3cbafaca057e29d7 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211030) unstable; urgency=low
+ncurses6 (6.3+20211106) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 30 Oct 2021 04:33:19 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Nov 2021 04:19:47 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 6e0d54165c7a804a0233472f47b7117680e4e767..52fb2d956864a00ae4877201b53c88b6d1131df9 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20211030) unstable; urgency=low
+ncurses6 (6.3+20211106) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 30 Oct 2021 04:33:19 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Nov 2021 04:19:47 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 632ca430d9187392f9b4b0fe88747c31b28fce26..a9c30c3de15b7fefb034b7700f647a0237077376 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.489 2021/10/30 08:33:19 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.490 2021/11/06 08:19:47 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 "3"\r
 !define VERSION_YYYY  "2021"\r
-!define VERSION_MMDD  "1030"\r
+!define VERSION_MMDD  "1106"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index ff79d856e8556496520ea7e821377f4af219eb54..f0070dca9cbfb4c383f22cd9d8d5f98aa654c769 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20211030
+Release: 20211106
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 80c2e6489bfade427c8284f120e0b10e3b2b4d62..e71bfbce773fc59d17d45a1560abec25754ce83c 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20211030
+Release: 20211106
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 7fd67829f3efa077afe736f0c57a37a8e5b0cca4..dcc95605dece6b1b93577692d75f8cbd62ec1efb 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20211030
+Release: 20211106
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 37f851da856d6983c61b3648f0c707a481142043..cf1164034f36b15fa1546278643c3e5645572f18 100644 (file)
@@ -39,7 +39,7 @@
  */
 #include "panel.priv.h"
 
-MODULE_ID("$Id: p_new.c,v 1.23 2021/06/17 21:20:30 tom Exp $")
+MODULE_ID("$Id: p_new.c,v 1.24 2021/10/23 15:12:06 tom Exp $")
 
 #ifdef TRACE
 static char *stdscr_id;
@@ -117,7 +117,7 @@ new_panel(WINDOW *win)
     (void)root_panel(NCURSES_SP_ARG);
   assert(_nc_stdscr_pseudo_panel);
 
-  if (!(win->_flags & _ISPAD) && (pan = AllocPanel("new_panel")))
+  if ((pan = AllocPanel("new_panel")) != NULL)
     {
       pan->win = win;
       pan->above = (PANEL *)0;