]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.3 - patch 20220724
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 24 Jul 2022 22:50:11 +0000 (22:50 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 24 Jul 2022 22:50:11 +0000 (22:50 +0000)
+ add portability notes for delscreen and delwin in manual.
+ improve pthread-configuration for test/worm.c, test/rain.c
+ improve pointer/limit checks associated with deleting a screen
  (Debian #1015756).

39 files changed:
NEWS
VERSION
dist.mk
doc/html/man/adacurses6-config.1.html
doc/html/man/captoinfo.1m.html
doc/html/man/clear.1.html
doc/html/man/curs_initscr.3x.html
doc/html/man/curs_window.3x.html
doc/html/man/form.3x.html
doc/html/man/infocmp.1m.html
doc/html/man/infotocap.1m.html
doc/html/man/menu.3x.html
doc/html/man/ncurses.3x.html
doc/html/man/ncurses6-config.1.html
doc/html/man/panel.3x.html
doc/html/man/tabs.1.html
doc/html/man/terminfo.5.html
doc/html/man/tic.1m.html
doc/html/man/toe.1m.html
doc/html/man/tput.1.html
doc/html/man/tset.1.html
doc/html/man/user_caps.5.html
man/curs_initscr.3x
man/curs_window.3x
ncurses/base/lib_set_term.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_tputs.c
ncurses/trace/lib_trace.c
ncurses/tty/tty_update.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
test/rain.c
test/test_mouse.c
test/worm.c

diff --git a/NEWS b/NEWS
index 08fdee8d6b52183600ef6a40751504f2436a4075..cc91b40dcf60f49b0ac639c0285edfd877ffb3b9 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.3831 2022/07/16 18:43:58 tom Exp $
+-- $Id: NEWS,v 1.3836 2022/07/24 10:06:18 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,12 @@ 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.
 
+20220724
+       + add portability notes for delscreen and delwin in manual.
+       + improve pthread-configuration for test/worm.c, test/rain.c
+       + improve pointer/limit checks associated with deleting a screen
+         (Debian #1015756).
+
 20220716
        + build-fix for test_mouse.c, for non-standard cfmakeraw.
        + improve shell-scripts with shellcheck
diff --git a/VERSION b/VERSION
index 4f88e7824fa739da02e3e4628b0fe628ebc2d40d..ec9534b9736ccbf335353bf8453c010d0843d6d6 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.3     20220716
+5:0:10 6.3     20220724
diff --git a/dist.mk b/dist.mk
index 0f350b28ad22afebdd8e96a49a4d2b8832adaf36..928c6d6b2e9e9a6baeaa846549a0dee6dabb9fb7 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.1492 2022/07/16 10:45:29 tom Exp $
+# $Id: dist.mk,v 1.1494 2022/07/24 09:45:40 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 = 20220716
+NCURSES_PATCH = 20220724
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 257b5234636701c3f865a768f3d42b5e4c63b3b7..e1e4b8e383fd690104f3abb0d8b7b252deacec39 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index 8671ed66f7557c784821640b6345a335fac2daad..522f97be195ccca9158f5537200b2cf846aa3b4f 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index db2a0edf8badc7a57264045b21cc8be2aba8b229..94ba5d55864b3411b8d9d29ddca6c0e661a6f5ba 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG>xterm(1)</STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index f7600061fbcf107982540a258a3258dd76c583e5..08d21a61da83814819ac6d9e2e31c39d8cc0b651 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_initscr.3x,v 1.37 2022/02/12 20:07:29 tom Exp @
+  * @Id: curs_initscr.3x,v 1.39 2022/07/24 15:46:49 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 
        <STRONG>o</STRONG>   This implementation allows using <STRONG>initscr</STRONG> after <STRONG>endwin</STRONG>.
 
-       Old versions of curses, e.g., BSD 4.4, may have returned a null pointer
-       from <STRONG>initscr</STRONG> when an error is detected, rather  than  exiting.   It  is
-       safe but redundant to check the return value of <STRONG>initscr</STRONG> in XSI Curses.
+       Old versions of curses, e.g., BSD 4.4, would return a null pointer from
+       <STRONG>initscr</STRONG> when an error is detected, rather than exiting.  It is safe but
+       redundant to check the return value of <STRONG>initscr</STRONG> in XSI Curses.
+
+       Calling  <STRONG>endwin</STRONG>  does not dispose of the memory allocated in <STRONG>initscr</STRONG> or
+       <STRONG>newterm</STRONG>.  Deleting a <STRONG>SCREEN</STRONG> provides a way to do this:
+
+       <STRONG>o</STRONG>   X/Open Curses does not say what happens to <STRONG>WINDOW</STRONG>s  when  <STRONG>delscreen</STRONG>
+           "frees  storage associated with the <STRONG>SCREEN</STRONG>" nor does the SVr4 docu-
+           mentation help, adding that it should be called after <STRONG>endwin</STRONG>  if  a
+           <STRONG>SCREEN</STRONG> is no longer needed.
+
+       <STRONG>o</STRONG>   However,  <STRONG>WINDOW</STRONG>s are implicitly associated with a <STRONG>SCREEN</STRONG>.  so that
+           it is reasonable to expect <STRONG>delscreen</STRONG> to deal with these.
+
+       <STRONG>o</STRONG>   SVr4 curses deletes  the  standard  <STRONG>WINDOW</STRONG>  structures  <STRONG>stdscr</STRONG>  and
+           <STRONG>curscr</STRONG>  as  well  as a work area <STRONG>newscr</STRONG>.  SVr4 curses ignores other
+           windows.
+
+       <STRONG>o</STRONG>   Since version 4.0 (1996), ncurses has maintained a list of all win-
+           dows  for  each screen, using that information to delete those win-
+           dows when <STRONG>delscreen</STRONG> is called.
+
+       <STRONG>o</STRONG>   NetBSD copied this feature of ncurses in  2001.   PDCurses  follows
+           the SVr4 model, deleting only the standard <STRONG>WINDOW</STRONG> structures.
 
 
 </PRE><H3><a name="h3-Unset-TERM-Variable">Unset TERM Variable</a></H3><PRE>
index 9583670b4e83c4ec878e73ae7a231d383e2000d4..1bd25353603a792615b0253279bd221ba6d208f0 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_window.3x,v 1.25 2022/02/12 20:06:41 tom Exp @
+  * @Id: curs_window.3x,v 1.27 2022/07/24 15:35:15 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
        The XSI Curses standard, Issue 4 describes these functions.
 
+       X/Open Curses states regarding <STRONG>delwin</STRONG>:
+
+       <STRONG>o</STRONG>   It must delete subwindows before deleting their parent.
+
+       <STRONG>o</STRONG>   If  <STRONG>delwin</STRONG>  is asked to delete a parent window, it can only succeed
+           if the curses library keeps a list of the subwindows.  SVr4  curses
+           kept  a  count  of the number of subwindows rather than a list.  It
+           simply returned <STRONG>ERR</STRONG> when asked  to  delete  a  subwindow.   Solaris
+           X/Open curses does not even make that check, and will delete a par-
+           ent window which still has subwindows.
+
+       <STRONG>o</STRONG>   Since release 4.0 (1996), ncurses maintains a list of  windows  for
+           each  screen,  and  is  able  to recursively delete subwindows when
+           asked to delete their parent.
+
+       <STRONG>o</STRONG>   NetBSD copied this feature of ncurses in 2003.
+           PDCurses follows the scheme used in Solaris X/Open curses.
+
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
-       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
+       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,   <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>,    <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>,    <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>,
+       <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
 
 
 
index 5381b50bbd00346dbc46d1c21fc9dcd796128b57..ad408f0df8a75f5bbf9c30eb5a1814a2c7ec2420 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "form_"  for  detailed
        descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index bda0a7b5834b157cb8fd93787b2ea88b2329f3a5..79dff9ee143f59680d84b7e36b0653b6df6952fc 100644 (file)
 
        https://invisible-island.net/ncurses/tctest.html
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 29055404c187f4a2a9fffc1d0127d56e0df0a114..c6c32f206a153bc4184eb905a1929931f10138c5 100644 (file)
@@ -91,7 +91,7 @@
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index b1a4515575bb7f21e6db324d80fbba7e750e0efc..755298580223cf1da13e0d70c8c37bfa7b83f8c5 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "menu_"  for  detailed
        descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index 7cb2044d0995370acc838051f45ad2d7fd281aa6..93ff3ca232651f8585a8aaaf8b89bd45e36afa93 100644 (file)
@@ -60,7 +60,7 @@
        method of updating  character  screens  with  reasonable  optimization.
        This  implementation  is  "new  curses"  (ncurses)  and is the approved
        replacement for 4.4BSD classic curses,  which  has  been  discontinued.
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
        The  <STRONG>ncurses</STRONG>  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
index d0860f9eaf623602fcdd8f4d738e75f0cfdc4d53..fc8193ec54f141cddb7dc310a48cda0ba0dcc77c 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index 0176a49406a9d1e6751d6952201a9ce498383bc8..26dc1b18fa5cb9ea9dfcde623d59036277d02fb7 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 4d29b6c0a5c20b47983b6dacc7c7e27b01ec4df6..84cb384b92b8a726ccd59d08bea7afe10189f7a9 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index afafa7ae7dbad8972535ef2955c96751b9c82ef6..a3ea785bbdf5c828e254a0018e2d1ae63b4ef707 100644 (file)
        have, by specifying how to perform screen operations, and by specifying
        padding requirements and initialization sequences.
 
-       This manual describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This manual describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 </PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
index 2009919f48342e281459122b6ec775aabd4c28b8..e4c99e14be13590b106f7ec527d0eb0e1cdca3c4 100644 (file)
        <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.  <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 1963869f389143229cf0f5a6ea7b28c7a0d26164..d097fc10387022ec6df14d321b1604643571dedc 100644 (file)
        <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index 4661022768049cb8e5a29239a6594730ed1f54b7..8d68b72b147fbff6a4bb93b4a4a891c3478db815 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index 796770b3def7bdea852f78c6f3921985a9c660df..6359953e0e4565cfc0103fd36c508cd2fbf64f6e 100644 (file)
        <STRONG>csh(1)</STRONG>,   <STRONG>sh(1)</STRONG>,   <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,  <STRONG>tty(4)</STRONG>,  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
        <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220703).
+       This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220724).
 
 
 
index 52d69b728e732abe3b9ca49d867421e605fddf50..d99c5397bea728532a2c443b9b2df0051820e798 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ****************************************************************************
-  * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+  * Copyright 2018-2021,2022 Thomas E. Dickey                                *
   * Copyright 2017 Free Software Foundation, Inc.                            *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: user_caps.5,v 1.21 2022/07/03 20:01:04 tom Exp @
+  * @Id: user_caps.5,v 1.22 2022/07/03 20:01:04 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
index 17e5fb9c5adcd4c39bb45df617e54fd660a5628f..5e17ead0a659bd23838095397ea0e3b03bb0a443 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_initscr.3x,v 1.37 2022/02/12 20:07:29 tom Exp $
+.\" $Id: curs_initscr.3x,v 1.39 2022/07/24 15:46:49 tom Exp $
 .TH curs_initscr 3X ""
 .de bP
 .ie n  .IP \(bu 4
@@ -176,10 +176,35 @@ to restore the screen after \fBendwin\fP.
 .bP
 This implementation allows using \fBinitscr\fP after \fBendwin\fP.
 .PP
-Old versions of curses, e.g., BSD 4.4, may have returned a null pointer
+Old versions of curses, e.g., BSD 4.4, would return a null pointer
 from \fBinitscr\fP when an error is detected, rather than exiting.
 It is safe but redundant to check the return value of \fBinitscr\fP
 in XSI Curses.
+.PP
+Calling \fBendwin\fP does not dispose of the memory allocated in \fBinitscr\fP
+or \fBnewterm\fP.
+Deleting a \fBSCREEN\fP provides a way to do this:
+.bP
+X/Open Curses does not say what happens to \fBWINDOW\fPs when \fBdelscreen\fP
+\*(``frees storage associated with the \fBSCREEN\fP\*(''
+nor does the SVr4 documentation help,
+adding that it should be called after \fBendwin\fP if a \fBSCREEN\fP
+is no longer needed.
+.bP
+However, \fBWINDOW\fPs are implicitly associated with a \fBSCREEN\fP.
+so that it is reasonable to expect \fBdelscreen\fP to deal with these.
+.bP
+SVr4 curses deletes the standard \fBWINDOW\fP structures
+\fBstdscr\fP and \fBcurscr\fP as well as a work area \fBnewscr\fP.
+SVr4 curses ignores other windows.
+.bP
+Since version 4.0 (1996), ncurses has maintained a list of all windows
+for each screen,
+using that information to delete those windows when \fBdelscreen\fP is called.
+.bP
+NetBSD copied this feature of ncurses in 2001.
+PDCurses follows the SVr4 model,
+deleting only the standard \fBWINDOW\fP structures.
 .SS Unset TERM Variable
 .PP
 If the TERM variable is missing or empty, \fBinitscr\fP uses the
index 5a671c707a8af9c056a8a18d344289755faf561c..c786650ecf4dc062d9c675e0d76dc64955e0453d 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_window.3x,v 1.25 2022/02/12 20:06:41 tom Exp $
+.\" $Id: curs_window.3x,v 1.27 2022/07/24 15:35:15 tom Exp $
 .TH curs_window 3X ""
 .de bP
 .ie n  .IP \(bu 4
@@ -256,8 +256,27 @@ is patterned on the XPG4 curses standard.
 The weaker XPG4 spec may result in slower updates.
 .SH PORTABILITY
 The XSI Curses standard, Issue 4 describes these functions.
+.PP
+X/Open Curses states regarding \fBdelwin\fP:
+.bP
+It must delete subwindows before deleting their parent.
+.bP
+If \fBdelwin\fP is asked to delete a parent window,
+it can only succeed if the curses library keeps a list of the subwindows.
+SVr4 curses kept a count of the number of subwindows rather than a list.
+It simply returned \fBERR\fP when asked to delete a subwindow.
+Solaris X/Open curses does not even make that check,
+and will delete a parent window which still has subwindows.
+.bP
+Since release 4.0 (1996), ncurses maintains a list of windows for each screen,
+and is able to recursively delete subwindows when asked to delete their parent.
+.bP
+NetBSD copied this feature of ncurses in 2003.
+.br
+PDCurses follows the scheme used in Solaris X/Open curses.
 .SH SEE ALSO
 \fBcurses\fP(3X),
+\fBcurs_initscr\fP(3X),
 \fBcurs_refresh\fP(3X),
 \fBcurs_touch\fP(3X),
 \fBcurs_variables\fP(3X)
index 2d28b7514575fa4b5c18530b84701beeeb2a9762..9d61f5aea58d9605e6e4ad69bf2fa585a7ebf146 100644 (file)
@@ -54,7 +54,7 @@
 #undef CUR
 #define CUR SP_TERMTYPE
 
-MODULE_ID("$Id: lib_set_term.c,v 1.180 2022/07/09 18:58:58 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.181 2022/07/21 23:35:21 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -146,6 +146,8 @@ delscreen(SCREEN *sp)
 
     _nc_lock_global(curses);
     if (delink_screen(sp)) {
+       bool is_current = (sp == CURRENT_SCREEN);
+
 #ifdef USE_SP_RIPOFF
        if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) {
            ripoff_t *rop;
@@ -219,7 +221,7 @@ delscreen(SCREEN *sp)
         * application might try to use (except cur_term, which may have
         * multiple references in different screens).
         */
-       if (sp == CURRENT_SCREEN) {
+       if (is_current) {
 #if !USE_REENTRANT
            curscr = 0;
            newscr = 0;
@@ -234,6 +236,8 @@ delscreen(SCREEN *sp)
                _nc_wacs = 0;
            }
 #endif
+       } else {
+           set_term(CURRENT_SCREEN);
        }
     }
     _nc_unlock_global(curses);
index 5ed47409bb0abb39fa29fa8255af77c238f93143..89c40f9681e11ebd72511caa918e4a898412840f 100644 (file)
@@ -49,7 +49,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.216 2022/07/09 18:58:58 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.217 2022/07/21 08:24:50 tom Exp $")
 
 /****************************************************************************
  *
@@ -831,7 +831,7 @@ TINFO_SETUP_TERM(TERMINAL **tp,
        if (NC_ISATTY(Filedes)) {
            NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
            NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
-           baudrate();
+           NCURSES_SP_NAME(baudrate)(NCURSES_SP_ARG);
        }
        code = OK;
 #endif
index b9ca41cc10b14ceccf1e8f325e3552fffe8f29cb..0e52a40151a913c3b23fad8a59539b24c1f54035 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2022 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -52,7 +52,7 @@
 #include <termcap.h>           /* ospeed */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tputs.c,v 1.108 2021/05/08 23:27:40 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.109 2022/07/21 23:26:34 tom Exp $")
 
 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
@@ -128,9 +128,8 @@ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0)
                           SP_PARM->out_buffer));
        if (SP_PARM->out_inuse) {
            char *buf = SP_PARM->out_buffer;
-           size_t amount = SP->out_inuse;
+           size_t amount = SP_PARM->out_inuse;
 
-           SP->out_inuse = 0;
            TR(TRACE_CHARPUT, ("flushing %ld/%ld bytes",
                               (unsigned long) amount, _nc_outchars));
            while (amount) {
@@ -155,6 +154,8 @@ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0)
        TR(TRACE_CHARPUT, ("flushing stdout"));
        fflush(stdout);
     }
+    if (SP_PARM != 0)
+       SP_PARM->out_inuse = 0;
     returnVoid;
 }
 
index 9acbd4716575116e833e3ff54fa9039ad392aee0..b6f2a75e5ed3ee0a821a8bde2768f81261b6cc79 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2022 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -48,7 +48,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_trace.c,v 1.99 2021/06/26 20:44:59 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.100 2022/07/23 20:08:45 tom Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -94,12 +94,22 @@ NCURSES_EXPORT_VAR(long) _nc_outchars = 0;
 #define MyNested       _nc_globals.nested_tracef
 #endif /* TRACE */
 
+#if USE_REENTRANT
+#define Locked(statement) { \
+       _nc_lock_global(tst_tracef); \
+       statement; \
+       _nc_unlock_global(tst_tracef); \
+    }
+#else
+#define Locked(statement) statement
+#endif
+
 NCURSES_EXPORT(unsigned)
 curses_trace(unsigned tracelevel)
 {
     unsigned result;
 #if defined(TRACE)
-    result = _nc_tracing;
+    Locked(result = _nc_tracing);
     if ((MyFP == 0) && tracelevel) {
        MyInit = TRUE;
        if (MyFD >= 0) {
@@ -125,7 +135,7 @@ curses_trace(unsigned tracelevel)
                ;               /* EMPTY */
            }
        }
-       _nc_tracing = tracelevel;
+       Locked(_nc_tracing = tracelevel);
        /* Try to set line-buffered mode, or (failing that) unbuffered,
         * so that the trace-output gets flushed automatically at the
         * end of each line.  This is useful in case the program dies.
@@ -147,9 +157,9 @@ curses_trace(unsigned tracelevel)
            fclose(MyFP);
            MyFP = 0;
        }
-       _nc_tracing = tracelevel;
+       Locked(_nc_tracing = tracelevel);
     } else if (_nc_tracing != tracelevel) {
-       _nc_tracing = tracelevel;
+       Locked(_nc_tracing = tracelevel);
        _tracef("tracelevel=%#x", tracelevel);
     }
 #else
index bdd673bec0c8e601182c5825f120b15dfeb2ee18..80815244bb9b1162dd54fb4a9cb7d8215236fb4b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2022 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -85,7 +85,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.312 2021/09/04 10:29:59 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.314 2022/07/23 22:12:59 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -757,14 +757,20 @@ TINFO_DOUPDATE(NCURSES_SP_DCL0)
      * We do not allow applications to assign new values in the reentrant
      * model.
      */
+#if NCURSES_SP_FUNCS
+    if (SP_PARM == CURRENT_SCREEN) {
+#endif
 #define SyncScreens(internal,exported) \
        if (internal == 0) internal = exported; \
        if (internal != exported) exported = internal
 
-    SyncScreens(CurScreen(SP_PARM), curscr);
-    SyncScreens(NewScreen(SP_PARM), newscr);
-    SyncScreens(StdScreen(SP_PARM), stdscr);
+       SyncScreens(CurScreen(SP_PARM), curscr);
+       SyncScreens(NewScreen(SP_PARM), newscr);
+       SyncScreens(StdScreen(SP_PARM), stdscr);
+#if NCURSES_SP_FUNCS
+    }
 #endif
+#endif /* !USE_REENTRANT */
 
     if (CurScreen(SP_PARM) == 0
        || NewScreen(SP_PARM) == 0
index 49a5357f2b06b30ae9cba2580030eb264533aeb4..dbde558c6a7a493f5b40cfb0b74262647732b534 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220716) unstable; urgency=low
+ncurses6 (6.3+20220724) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 16 Jul 2022 06:45:29 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 24 Jul 2022 05:45:41 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 49a5357f2b06b30ae9cba2580030eb264533aeb4..dbde558c6a7a493f5b40cfb0b74262647732b534 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220716) unstable; urgency=low
+ncurses6 (6.3+20220724) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 16 Jul 2022 06:45:29 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 24 Jul 2022 05:45:41 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 6d2c769e988b2e6eb3a6e29417152d20af8b88fd..1c0a2bc63b67800fb08f70d9e099ce03065095ef 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.3+20220716) unstable; urgency=low
+ncurses6 (6.3+20220724) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 16 Jul 2022 06:45:29 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 24 Jul 2022 05:45:41 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 3bab9baed78b18784c2d2e70ba90530fc92d5942..026fc01f3d6fad2acb94368f5c8c2bc781b5e73a 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.532 2022/07/16 10:45:29 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.534 2022/07/24 09:45:40 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  "2022"\r
-!define VERSION_MMDD  "0716"\r
+!define VERSION_MMDD  "0724"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index a1e162f4890155a4e4be6a77d9b3a2aab34188bf..c2ced9eb468040cbf2f532de22fa3326a851d679 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.3
-Release: 20220716
+Release: 20220724
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index dac8d9ff4803fc516b241533a5679e24a2fa84fa..4067ae977d5352dc425e37574202eb5d2f16c414 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.3
-Release: 20220716
+Release: 20220724
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index e83ae9d69c5f8a78f2fbdfb154a0de86751db9f5..07e361bbccbd497e04ceb54111b0fe3bf4ab26f8 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.3
-Release: 20220716
+Release: 20220724
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 4c3568cffcda89ff89999d04d681c677d2e3dd9f..dde411b2b3e43cf000e6cfb363fb8be808115f60 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2022 Thomas E. Dickey                                *
  * Copyright 1998-2014,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: rain.c,v 1.52 2020/08/29 16:22:03 juergen Exp $
+ * $Id: rain.c,v 1.54 2022/07/23 22:47:38 tom Exp $
  */
 #include <test.priv.h>
 #include <popup_msg.h>
@@ -57,6 +57,7 @@ typedef struct DATA {
 
 #ifdef USE_PTHREADS
 pthread_cond_t cond_next_drop;
+pthread_mutex_t mutex_drop_data;
 pthread_mutex_t mutex_next_drop;
 static int used_threads;
 
@@ -200,7 +201,7 @@ draw_part(void (*func) (DATA *), int state, DATA * data)
 static int
 put_next_drop(void)
 {
-    pthread_cond_signal(&cond_next_drop);
+    pthread_cond_broadcast(&cond_next_drop);
     pthread_mutex_unlock(&mutex_next_drop);
 
     return 0;
@@ -246,7 +247,9 @@ draw_drop(void *arg)
         * to the data which it uses for setting up this thread (but it has
         * been modified to use different coordinates).
         */
+       pthread_mutex_lock(&mutex_drop_data);
        mydata = *(DATA *) arg;
+       pthread_mutex_unlock(&mutex_drop_data);
 
        draw_part(part1, 0, &mydata);
        draw_part(part2, 1, &mydata);
@@ -254,6 +257,7 @@ draw_drop(void *arg)
        draw_part(part4, 3, &mydata);
        draw_part(part5, 4, &mydata);
        draw_part(part6, 0, &mydata);
+
     } while (get_next_drop());
 
     return NULL;
@@ -374,7 +378,9 @@ main(int argc, char *argv[])
     curs_set(0);
     timeout(0);
 
-#ifndef USE_PTHREADS
+#ifdef USE_PTHREADS
+    pthread_mutex_init(&mutex_drop_data, NULL);
+#else /* !USE_PTHREADS */
     for (j = MAX_DROP; --j >= 0;) {
        last[j].x = random_x();
        last[j].y = random_y();
@@ -383,14 +389,21 @@ main(int argc, char *argv[])
 #endif
 
     while (!done) {
+#ifdef USE_PTHREADS
+       pthread_mutex_lock(&mutex_drop_data);
+
        drop.x = random_x();
        drop.y = random_y();
 
-#ifdef USE_PTHREADS
        if (start_drop(&drop) != 0) {
            beep();
        }
+
+       pthread_mutex_unlock(&mutex_drop_data);
 #else
+       drop.x = random_x();
+       drop.y = random_y();
+
        /*
         * The non-threaded code draws parts of each drop on each loop.
         */
index c898080a9e63e43e5bad0db8d8a6a27a3a689cba..602df4cf98c10b535b2af1703cf3ded05f7d13a0 100644 (file)
@@ -22,7 +22,7 @@
  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
  ****************************************************************************/
 /*
- * $Id: test_mouse.c,v 1.20 2022/07/16 18:52:09 tom Exp $
+ * $Id: test_mouse.c,v 1.22 2022/07/24 15:18:53 tom Exp $
  *
  * Author: Leonid S Usov
  *
@@ -47,11 +47,11 @@ raw_loop(void)
     cfmakeraw(&tty);
 #else
     tty = old;
-    tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
-                    | INLCR | IGNCR | ICRNL | IXON);
-    tty.c_oflag &= ~OPOST;
-    tty.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
-    tty.c_cflag &= ~(CSIZE | PARENB);
+    tty.c_iflag &= (unsigned) (~(IGNBRK | BRKINT | PARMRK | ISTRIP
+                                | INLCR | IGNCR | ICRNL | IXON));
+    tty.c_oflag &= (unsigned) (~OPOST);
+    tty.c_lflag &= (unsigned) (~(ECHO | ECHONL | ICANON | ISIG | IEXTEN));
+    tty.c_cflag &= (unsigned) (~(CSIZE | PARENB));
     tty.c_cflag |= CS8;
     tcsetattr(0, TCSANOW, &tty);
 #endif
@@ -121,7 +121,7 @@ usage(void)
     {
        "Usage: test_mouse [options]",
        "",
-       "Test mouse events.  These examples for $TERM demonstrate xterm"
+       "Test mouse events.  These examples for $TERM demonstrate xterm",
        "features:",
        "    xterm",
        "    xterm-1002",
index ab1eb9faf66b0ee5218adb0d7dad948ac0be545c..4888a519c8a256ac2b3a5040a5857d9e5b59d0bc 100644 (file)
@@ -53,7 +53,7 @@
   traces will be dumped.  The program stops and waits for one character of
   input at the beginning and end of the interval.
 
-  $Id: worm.c,v 1.83 2022/07/09 20:51:25 tom Exp $
+  $Id: worm.c,v 1.84 2022/07/23 17:06:16 tom Exp $
 */
 
 #include <test.priv.h>
@@ -107,6 +107,18 @@ static int length = 16, number = 3;
 static chtype trail = ' ';
 
 static unsigned pending;
+
+#ifdef USE_PTHREADS
+#define Locked(statement) { \
+       pthread_mutex_lock(&pending_mutex); \
+       statement; \
+       pthread_mutex_unlock(&pending_mutex); \
+    }
+pthread_mutex_t pending_mutex;
+#else
+#define Locked(statement) statement
+#endif
+
 #ifdef TRACE
 static int generation, trace_start, trace_end;
 #endif /* TRACE */
@@ -248,13 +260,18 @@ draw_worm(WINDOW *win, void *data)
     WORM *w = (WORM *) data;
     const struct options *op;
     unsigned mask = (unsigned) (~(1 << (w - worm)));
-    chtype attrs = w->attrs | ((mask & pending) ? A_REVERSE : 0);
+    chtype attrs;
 
     int x;
     int y;
     int h;
 
     bool done = FALSE;
+    bool is_pending;
+
+    Locked(is_pending = ((mask & pending) != 0));
+
+    attrs = w->attrs | (is_pending ? A_REVERSE : 0);
 
     if ((x = w->xpos[h = w->head]) < 0) {
        wmove(win, y = w->ypos[h] = last_y, x = w->xpos[h] = 0);
@@ -336,9 +353,12 @@ draw_worm(WINDOW *win, void *data)
 static bool
 quit_worm(int bitnum)
 {
-    pending = (pending | (unsigned) (1 << bitnum));
+    Locked(pending = (pending | (unsigned) (1 << bitnum)));
+
     napms(10);                 /* let the other thread(s) have a chance */
-    pending = (pending & (unsigned) ~(1 << bitnum));
+
+    Locked(pending = (pending & (unsigned) ~(1 << bitnum)));
+
     return quitting;
 }
 
@@ -593,8 +613,12 @@ main(int argc, char *argv[])
     USING_WINDOW1(stdscr, wrefresh, safe_wrefresh);
     nodelay(stdscr, TRUE);
 
+#ifdef USE_PTHREADS
+    pthread_mutex_init(&pending_mutex, NULL);
+#endif
+
     while (!done) {
-       ++sequence;
+       Locked(++sequence);
        if ((ch = get_input()) > 0) {
 #ifdef TRACE
            if (trace_start || trace_end) {