# ncurses 6.3 - patch 20220101 - Thomas E. Dickey # # ------------------------------------------------------------------------------ # # Ncurses 6.3 is at # ftp://ftp.invisible-island.net/ncurses/ # https://invisible-mirror.net/archives/ncurses/ # https://ftp.gnu.org/gnu/ncurses/ # # Patches for ncurses 6.3 can be found at # ftp://ftp.invisible-island.net/ncurses/6.3 # https://invisible-mirror.net/archives/ncurses/6.3 # # ------------------------------------------------------------------------------ # ftp://ftp.invisible-island.net/ncurses/6.3/ncurses-6.3-20220101.patch.gz # patch by Thomas E. Dickey <dickey@invisible-island.net> # created Sun Jan 2 01:07:07 UTC 2022 # ------------------------------------------------------------------------------ # Ada95/package/debian/copyright | 2 # COPYING | 4 # NEWS | 8 + # VERSION | 2 # dist.mk | 6 - # doc/html/man/adacurses6-config.1.html | 2 # doc/html/man/captoinfo.1m.html | 2 # doc/html/man/clear.1.html | 2 # doc/html/man/curs_termcap.3x.html | 44 +++++++-- # doc/html/man/curs_terminfo.3x.html | 146 +++++++++++++++++++------------- # doc/html/man/form.3x.html | 2 # doc/html/man/infocmp.1m.html | 2 # doc/html/man/infotocap.1m.html | 2 # doc/html/man/menu.3x.html | 2 # doc/html/man/ncurses.3x.html | 2 # doc/html/man/ncurses6-config.1.html | 2 # doc/html/man/panel.3x.html | 2 # doc/html/man/tabs.1.html | 2 # doc/html/man/terminfo.5.html | 2 # doc/html/man/tic.1m.html | 2 # doc/html/man/toe.1m.html | 2 # doc/html/man/tput.1.html | 2 # doc/html/man/tset.1.html | 2 # man/curs_termcap.3x | 36 ++++++- # man/curs_terminfo.3x | 31 ++++++ # package/debian-mingw/changelog | 4 # package/debian-mingw/copyright | 2 # package/debian-mingw64/changelog | 4 # package/debian-mingw64/copyright | 2 # package/debian/changelog | 4 # package/debian/copyright | 2 # package/mingw-ncurses.nsi | 6 - # package/mingw-ncurses.spec | 2 # package/ncurses.spec | 2 # package/ncursest.spec | 2 # test/package/debian-mingw/copyright | 2 # test/package/debian-mingw64/copyright | 2 # test/package/debian/copyright | 2 # 38 files changed, 228 insertions(+), 119 deletions(-) # ------------------------------------------------------------------------------ Index: Ada95/package/debian/copyright --- ncurses-6.3-20211225+/Ada95/package/debian/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/Ada95/package/debian/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -4,7 +4,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 by Thomas E. Dickey +Copyright: 2017-2021,2022 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11 Index: COPYING Prereq: 1.10 --- ncurses-6.3-20211225+/COPYING 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/COPYING 2022-01-01 11:47:50.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 2018-2020,2021 Thomas E. Dickey +Copyright 2018-2021,2022 Thomas E. Dickey Copyright 1998-2017,2018 Free Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a @@ -26,4 +26,4 @@ authorization. -- vile:txtmode fc=72 --- $Id: COPYING,v 1.10 2021/01/01 09:54:30 tom Exp $ +-- $Id: COPYING,v 1.11 2022/01/01 11:47:50 tom Exp $ Index: NEWS Prereq: 1.3761 --- ncurses-6.3-20211225+/NEWS 2021-12-26 00:29:27.000000000 +0000 +++ ncurses-6.3-20220101/NEWS 2022-01-01 23:59:36.000000000 +0000 @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright 2018-2020,2021 Thomas E. Dickey -- +-- Copyright 2018-2021,2022 Thomas E. Dickey -- -- Copyright 1998-2017,2018 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3761 2021/12/26 00:29:27 tom Exp $ +-- $Id: NEWS,v 1.3764 2022/01/01 23:59:36 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,10 @@ Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20220101 + + add section on releasing memory to curs_termcap.3x and + curs_terminfo.3x manpages. + 20211225 + improve markup, e.g., for external manpage links in the manpages (prompted by report by Helge Kreutzmann). Index: VERSION --- ncurses-6.3-20211225+/VERSION 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/VERSION 2022-01-01 11:46:49.000000000 +0000 @@ -1 +1 @@ -5:0:10 6.3 20211225 +5:0:10 6.3 20220101 Index: dist.mk Prereq: 1.1458 --- ncurses-6.3-20211225+/dist.mk 2021-12-25 22:11:07.000000000 +0000 +++ ncurses-6.3-20220101/dist.mk 2022-01-01 11:48:38.000000000 +0000 @@ -1,5 +1,5 @@ ############################################################################## -# Copyright 2018-2020,2021 Thomas E. Dickey # +# Copyright 2018-2021,2022 Thomas E. Dickey # # Copyright 1998-2017,2018 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1458 2021/12/25 22:11:07 tom Exp $ +# $Id: dist.mk,v 1.1460 2022/01/01 11:48:38 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -38,7 +38,7 @@ # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 3 -NCURSES_PATCH = 20211225 +NCURSES_PATCH = 20220101 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) Index: doc/html/man/adacurses6-config.1.html --- ncurses-6.3-20211225+/doc/html/man/adacurses6-config.1.html 2021-12-25 22:12:43.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/adacurses6-config.1.html 2022-01-02 00:19:47.000000000 +0000 @@ -126,7 +126,7 @@ </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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/captoinfo.1m.html --- ncurses-6.3-20211225+/doc/html/man/captoinfo.1m.html 2021-12-25 22:12:43.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/captoinfo.1m.html 2022-01-02 00:19:47.000000000 +0000 @@ -199,7 +199,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="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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE> Index: doc/html/man/clear.1.html --- ncurses-6.3-20211225+/doc/html/man/clear.1.html 2021-12-26 00:19:27.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/clear.1.html 2022-01-02 00:19:47.000000000 +0000 @@ -150,7 +150,7 @@ </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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/curs_termcap.3x.html --- ncurses-6.3-20211225+/doc/html/man/curs_termcap.3x.html 2021-12-26 00:04:53.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/curs_termcap.3x.html 2022-01-02 00:19:51.000000000 +0000 @@ -1,6 +1,6 @@ <!-- **************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2017,2018 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: curs_termcap.3x,v 1.52 2021/12/25 21:31:00 tom Exp @ + * @Id: curs_termcap.3x,v 1.55 2022/01/01 23:49:07 tom Exp @ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML> @@ -76,7 +76,7 @@ been compiled. -</PRE><H3><a name="h3-INITIALIZATION">INITIALIZATION</a></H3><PRE> +</PRE><H3><a name="h3-Initialization">Initialization</a></H3><PRE> The <STRONG>tgetent</STRONG> routine loads the entry for <EM>name</EM>. It returns: 1 on success, @@ -100,7 +100,7 @@ ing. -</PRE><H3><a name="h3-CAPABILITY-VALUES">CAPABILITY VALUES</a></H3><PRE> +</PRE><H3><a name="h3-Capability-Values">Capability Values</a></H3><PRE> The <STRONG>tgetflag</STRONG> routine gets the boolean entry for <EM>id</EM>, or zero if it is not available. @@ -129,7 +129,7 @@ and <STRONG>tgetstr</STRONG> are compared in lookups. -</PRE><H3><a name="h3-FORMATTING-CAPABILITIES">FORMATTING CAPABILITIES</a></H3><PRE> +</PRE><H3><a name="h3-Formatting-Capabilities">Formatting Capabilities</a></H3><PRE> The <STRONG>tgoto</STRONG> routine expands the given capability using the parameters. <STRONG>o</STRONG> Because the capability may have padding characters, the output of @@ -157,7 +157,7 @@ It can retrieve capabilities by either termcap or terminfo name. -</PRE><H3><a name="h3-GLOBAL-VARIABLES">GLOBAL VARIABLES</a></H3><PRE> +</PRE><H3><a name="h3-Global-Variables">Global Variables</a></H3><PRE> The variables <STRONG>PC</STRONG>, <STRONG>UP</STRONG> and <STRONG>BC</STRONG> are set by <STRONG>tgetent</STRONG> to the terminfo entry's data for <STRONG>pad_char</STRONG>, <STRONG>cursor_up</STRONG> and <STRONG>backspace_if_not_bs</STRONG>, respectively. <STRONG>UP</STRONG> is not used by ncurses. <STRONG>PC</STRONG> is used in the <STRONG>tdelay_output</STRONG> function. <STRONG>BC</STRONG> @@ -165,6 +165,29 @@ in a system-specific coding to reflect the terminal speed. +</PRE><H3><a name="h3-Releasing-Memory">Releasing Memory</a></H3><PRE> + The termcap functions provide no means for freeing memory, because + legacy termcap implementations used only the buffer areas provided by + the caller via <STRONG>tgetent</STRONG> and <STRONG>tgetstr</STRONG>. Those buffers are unused in ter- + minfo. + + On the other hand, terminfo allocates memory. It uses <STRONG>setupterm</STRONG> to re- + trieve the data used by <STRONG>tgetent</STRONG> and the functions which return capabil- + ity values such as <STRONG>tgetstr</STRONG>. One could use + + <STRONG>del_curterm(cur_term);</STRONG> + + + to free this memory, but there is an additional complication with + ncurses. It uses a fixed-size <EM>pool</EM> of storage locations, one per set- + ting of the <STRONG>TERM</STRONG> variable when <STRONG>tgetent</STRONG> is called. The <STRONG>screen(1)</STRONG> pro- + gram relies upon this arrangement, to improve its performance. + + An application which uses only the low-level termcap functions could + free the memory using <STRONG>del_curterm</STRONG>, because the pool is freed using oth- + er functions (see <STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG>). + + </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> Except where explicitly noted, routines that return an integer return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 only specifies "an integer value other @@ -322,10 +345,11 @@ <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li> <li><a href="#h2-DESCRIPTION">DESCRIPTION</a> <ul> -<li><a href="#h3-INITIALIZATION">INITIALIZATION</a></li> -<li><a href="#h3-CAPABILITY-VALUES">CAPABILITY VALUES</a></li> -<li><a href="#h3-FORMATTING-CAPABILITIES">FORMATTING CAPABILITIES</a></li> -<li><a href="#h3-GLOBAL-VARIABLES">GLOBAL VARIABLES</a></li> +<li><a href="#h3-Initialization">Initialization</a></li> +<li><a href="#h3-Capability-Values">Capability Values</a></li> +<li><a href="#h3-Formatting-Capabilities">Formatting Capabilities</a></li> +<li><a href="#h3-Global-Variables">Global Variables</a></li> +<li><a href="#h3-Releasing-Memory">Releasing Memory</a></li> </ul> </li> <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li> Index: doc/html/man/curs_terminfo.3x.html --- ncurses-6.3-20211225+/doc/html/man/curs_terminfo.3x.html 2021-12-26 00:04:53.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/curs_terminfo.3x.html 2022-01-02 00:19:51.000000000 +0000 @@ -1,6 +1,6 @@ <!-- **************************************************************************** - * 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 * @@ -27,7 +27,9 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_terminfo.3x,v 1.79 2021/12/25 21:34:58 tom Exp @ + * @Id: curs_terminfo.3x,v 1.80 2022/01/01 21:50:06 tom Exp @ + * *************************************************************************** + * *************************************************************************** * *************************************************************************** * *************************************************************************** * *************************************************************************** @@ -348,9 +350,34 @@ <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*strnames[]</STRONG>, <STRONG>*strcodes[]</STRONG>, <STRONG>*strfnames[]</STRONG> +</PRE><H3><a name="h3-Releasing-Memory">Releasing Memory</a></H3><PRE> + Each successful call to <STRONG>setupterm</STRONG> allocates memory to hold the terminal + description. As a side-effect, it sets <STRONG>cur_term</STRONG> to point to this memo- + ry. If an application calls + + <STRONG>del_curterm(cur_term);</STRONG> + + the memory will be freed. + + The formatting functions <STRONG>tparm</STRONG> and <STRONG>tiparm</STRONG> extend the storage allocated + by <STRONG>setupterm</STRONG>: + + <STRONG>o</STRONG> the "static" terminfo variables [a-z]. Before ncurses 6.3, those + were shared by all screens. With ncurses 6.3, those are allocated + per screen. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for details. + + <STRONG>o</STRONG> to improve performance, ncurses 6.3 caches the result of analyzing + terminfo strings for their parameter types. That is stored as a + binary tree referenced from the <STRONG>TERMINAL</STRONG> structure. + + The higher-level <STRONG>initscr</STRONG> and <STRONG>newterm</STRONG> functions use <STRONG>setupterm</STRONG>. Normally + they do not free this memory, but it is possible to do that using the + <STRONG><A HREF="curs_initscr.3x.html">delscreen(3x)</A></STRONG> function. + + </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> - Routines that return an integer return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 - only specifies "an integer value other than <STRONG>ERR</STRONG>") upon successful com- + Routines that return an integer return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 + only specifies "an integer value other than <STRONG>ERR</STRONG>") upon successful com- pletion, unless otherwise noted in the preceding routine descriptions. Routines that return pointers always return <STRONG>NULL</STRONG> on error. @@ -372,25 +399,25 @@ ditions are documented above. <STRONG>tputs</STRONG> - returns an error if the string parameter is null. It does not - detect I/O errors: X/Open states that <STRONG>tputs</STRONG> ignores the return + returns an error if the string parameter is null. It does not + detect I/O errors: X/Open states that <STRONG>tputs</STRONG> ignores the return value of the output function <EM>putc</EM>. </PRE><H3><a name="h3-Compatibility-macros">Compatibility macros</a></H3><PRE> - This implementation provides a few macros for compatibility with sys- + This implementation provides a few macros for compatibility with sys- tems before SVr4 (see <EM>HISTORY</EM>). Those include <STRONG>crmode</STRONG>, <STRONG>fixterm</STRONG>, <STRONG>gettmode</STRONG>, <STRONG>nocrmode</STRONG>, <STRONG>resetterm</STRONG>, <STRONG>saveterm</STRONG>, and <STRONG>setterm</STRONG>. - In SVr4, those are found in <STRONG><curses.h></STRONG>, but except for <STRONG>setterm</STRONG>, are + In SVr4, those are found in <STRONG><curses.h></STRONG>, but except for <STRONG>setterm</STRONG>, are likewise macros. The one function, <STRONG>setterm</STRONG>, is mentioned in the manual - page. The manual page notes that the <STRONG>setterm</STRONG> routine was replaced by + page. The manual page notes that the <STRONG>setterm</STRONG> routine was replaced by <STRONG>setupterm</STRONG>, stating that the call: <STRONG>setupterm(</STRONG><EM>term</EM><STRONG>,</STRONG> <STRONG>1,</STRONG> <STRONG>(int</STRONG> <STRONG>*)0)</STRONG> provides the same functionality as <STRONG>setterm(</STRONG><EM>term</EM><STRONG>)</STRONG>, and is not recommend- - ed for new programs. This implementation provides each of those sym- + ed for new programs. This implementation provides each of those sym- bols as macros for BSD compatibility, @@ -403,7 +430,7 @@ fixterm restore tty to "in curses" state gettmode establish current tty modes mvcur low level cursor motion - putp utility function that uses <STRONG>tputs</STRONG> to send char- + putp utility function that uses <STRONG>tputs</STRONG> to send char- acters via <STRONG>putchar</STRONG>. resetterm set tty modes to "out of curses" state resetty reset tty flags to stored value @@ -414,10 +441,10 @@ tparm instantiate a string expression with parameters tputs apply padding information to a string vidattr like <STRONG>vidputs</STRONG>, but outputs through <STRONG>putchar</STRONG> - vidputs output a string to put terminal in a specified + vidputs output a string to put terminal in a specified video attribute mode - The programming manual also mentioned functions provided for termcap + The programming manual also mentioned functions provided for termcap compatibility (commenting that they "may go away at a later date"): <STRONG>Function</STRONG> <STRONG>Description</STRONG> @@ -430,19 +457,20 @@ tputs apply padding to capability, calling a function to put characters - Early terminfo programs obtained capability values from the <STRONG>TERMINAL</STRONG> + Early terminfo programs obtained capability values from the <STRONG>TERMINAL</STRONG> structure initialized by <STRONG>setupterm</STRONG>. - SVr3 extended terminfo by adding functions to retrieve capability val- + SVr3 extended terminfo by adding functions to retrieve capability val- ues (like the termcap interface), and reusing tgoto and tputs: <STRONG>Function</STRONG> <STRONG>Description</STRONG> ------------------------------------------- tigetflag get boolean entry for given <EM>id</EM> + tigetnum get numeric entry for given <EM>id</EM> tigetstr get string entry for given <EM>id</EM> - SVr3 also replaced several of the SVr2 terminfo functions which had no + SVr3 also replaced several of the SVr2 terminfo functions which had no counterpart in the termcap interface, documenting them as obsolete: <STRONG>Function</STRONG> <STRONG>Replaced</STRONG> <STRONG>by</STRONG> @@ -455,20 +483,20 @@ saveterm def_prog_mode setterm setupterm - SVr3 kept the <STRONG>mvcur</STRONG>, <STRONG>vidattr</STRONG> and <STRONG>vidputs</STRONG> functions, along with <STRONG>putp</STRONG>, - <STRONG>tparm</STRONG> and <STRONG>tputs</STRONG>. The latter were needed to support padding, and han- - dling functions such as <STRONG>vidattr</STRONG> (which used more than the two parame- + SVr3 kept the <STRONG>mvcur</STRONG>, <STRONG>vidattr</STRONG> and <STRONG>vidputs</STRONG> functions, along with <STRONG>putp</STRONG>, + <STRONG>tparm</STRONG> and <STRONG>tputs</STRONG>. The latter were needed to support padding, and han- + dling functions such as <STRONG>vidattr</STRONG> (which used more than the two parame- ters supported by <STRONG>tgoto</STRONG>). - SVr3 introduced the functions for switching between terminal descrip- + SVr3 introduced the functions for switching between terminal descrip- tions, e.g., <STRONG>set_curterm</STRONG>. Some of that was incremental improvements to the SVr2 library: - <STRONG>o</STRONG> The <STRONG>TERMINAL</STRONG> type definition was introduced in SVr3.01, for the + <STRONG>o</STRONG> The <STRONG>TERMINAL</STRONG> type definition was introduced in SVr3.01, for the <STRONG>term</STRONG> structure provided in SVr2. - <STRONG>o</STRONG> The various global variables such as <STRONG>boolnames</STRONG> were mentioned in - the programming manual at this point, though the variables were + <STRONG>o</STRONG> The various global variables such as <STRONG>boolnames</STRONG> were mentioned in + the programming manual at this point, though the variables were provided in SVr2. SVr4 added the <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> functions. @@ -483,15 +511,15 @@ </PRE><H3><a name="h3-Legacy-functions">Legacy functions</a></H3><PRE> X/Open notes that <STRONG>vidattr</STRONG> and <STRONG>vidputs</STRONG> may be macros. - The function <STRONG>setterm</STRONG> is not described by X/Open and must be considered + The function <STRONG>setterm</STRONG> is not described by X/Open and must be considered non-portable. All other functions are as described by X/Open. </PRE><H3><a name="h3-Legacy-data">Legacy data</a></H3><PRE> - <STRONG>setupterm</STRONG> copies the terminal name to the array <STRONG>ttytype</STRONG>. This is not + <STRONG>setupterm</STRONG> copies the terminal name to the array <STRONG>ttytype</STRONG>. This is not part of X/Open Curses, but is assumed by some applications. - Other implementions may not declare the capability name arrays. Some + Other implementions may not declare the capability name arrays. Some provide them without declaring them. X/Open does not specify them. Extended terminal capability names, e.g., as defined by <STRONG>tic</STRONG> <STRONG>-x</STRONG>, are not @@ -499,14 +527,14 @@ </PRE><H3><a name="h3-Output-buffering">Output buffering</a></H3><PRE> - Older versions of <STRONG>ncurses</STRONG> assumed that the file descriptor passed to + Older versions of <STRONG>ncurses</STRONG> assumed that the file descriptor passed to <STRONG>setupterm</STRONG> from <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG> uses buffered I/O, and would write to - the corresponding stream. In addition to the limitation that the ter- - minal was left in block-buffered mode on exit (like System V curses), - it was problematic because <STRONG>ncurses</STRONG> did not allow a reliable way to + the corresponding stream. In addition to the limitation that the ter- + minal was left in block-buffered mode on exit (like System V curses), + it was problematic because <STRONG>ncurses</STRONG> did not allow a reliable way to cleanup on receiving SIGTSTP. - The current version (ncurses6) uses output buffers managed directly by + The current version (ncurses6) uses output buffers managed directly by <STRONG>ncurses</STRONG>. Some of the low-level functions described in this manual page write to the standard output. They are not signal-safe. The high-lev- el functions in <STRONG>ncurses</STRONG> use alternate versions of these functions using @@ -515,70 +543,71 @@ </PRE><H3><a name="h3-Function-prototypes">Function prototypes</a></H3><PRE> The X/Open Curses prototypes are based on the SVr4 curses header decla- - rations, which were defined at the same time the C language was first + rations, which were defined at the same time the C language was first standardized in the late 1980s. - <STRONG>o</STRONG> X/Open Curses uses <STRONG>const</STRONG> less effectively than a later design - might, in some cases applying it needlessly to values are already - constant, and in most cases overlooking parameters which normally - would use <STRONG>const</STRONG>. Using constant parameters for functions which do + <STRONG>o</STRONG> X/Open Curses uses <STRONG>const</STRONG> less effectively than a later design + might, in some cases applying it needlessly to values are already + constant, and in most cases overlooking parameters which normally + would use <STRONG>const</STRONG>. Using constant parameters for functions which do not use <STRONG>const</STRONG> may prevent the program from compiling. On the other hand, <EM>writable</EM> <EM>strings</EM> are an obsolescent feature. - As an extension, this implementation can be configured to change - the function prototypes to use the <STRONG>const</STRONG> keyword. The ncurses ABI + As an extension, this implementation can be configured to change + the function prototypes to use the <STRONG>const</STRONG> keyword. The ncurses ABI 6 enables this feature by default. - <STRONG>o</STRONG> X/Open Curses prototypes <STRONG>tparm</STRONG> with a fixed number of parameters, + <STRONG>o</STRONG> X/Open Curses prototypes <STRONG>tparm</STRONG> with a fixed number of parameters, rather than a variable argument list. - This implementation uses a variable argument list, but can be con- - figured to use the fixed-parameter list. Portable applications - should provide 9 parameters after the format; zeroes are fine for + This implementation uses a variable argument list, but can be con- + figured to use the fixed-parameter list. Portable applications + should provide 9 parameters after the format; zeroes are fine for this purpose. - In response to review comments by Thomas E. Dickey, X/Open Curses + In response to review comments by Thomas E. Dickey, X/Open Curses Issue 7 proposed the <STRONG>tiparm</STRONG> function in mid-2009. </PRE><H3><a name="h3-Special-TERM-treatment">Special TERM treatment</a></H3><PRE> If configured to use the terminal-driver, e.g., for the MinGW port, - <STRONG>o</STRONG> <STRONG>setupterm</STRONG> interprets a missing/empty TERM variable as the special + <STRONG>o</STRONG> <STRONG>setupterm</STRONG> interprets a missing/empty TERM variable as the special value "unknown". - <STRONG>o</STRONG> <STRONG>setupterm</STRONG> allows explicit use of the the windows console driver by - checking if $TERM is set to "#win32con" or an abbreviation of that + <STRONG>o</STRONG> <STRONG>setupterm</STRONG> allows explicit use of the the windows console driver by + checking if $TERM is set to "#win32con" or an abbreviation of that string. </PRE><H3><a name="h3-Other-portability-issues">Other portability issues</a></H3><PRE> - In System V Release 4, <STRONG>set_curterm</STRONG> has an <STRONG>int</STRONG> return type and returns + In System V Release 4, <STRONG>set_curterm</STRONG> has an <STRONG>int</STRONG> return type and returns <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>. We have chosen to implement the X/Open Curses semantics. - In System V Release 4, the third argument of <STRONG>tputs</STRONG> has the type <STRONG>int</STRONG> + In System V Release 4, the third argument of <STRONG>tputs</STRONG> has the type <STRONG>int</STRONG> <STRONG>(*putc)(char)</STRONG>. - At least one implementation of X/Open Curses (Solaris) returns a value - other than <STRONG>OK</STRONG>/<STRONG>ERR</STRONG> from <STRONG>tputs</STRONG>. That returns the length of the string, + At least one implementation of X/Open Curses (Solaris) returns a value + other than <STRONG>OK</STRONG>/<STRONG>ERR</STRONG> from <STRONG>tputs</STRONG>. That returns the length of the string, and does no error-checking. - X/Open notes that after calling <STRONG>mvcur</STRONG>, the curses state may not match + X/Open notes that after calling <STRONG>mvcur</STRONG>, the curses state may not match the actual terminal state, and that an application should touch and re- fresh the window before resuming normal curses calls. Both <STRONG>ncurses</STRONG> and - System V Release 4 curses implement <STRONG>mvcur</STRONG> using the SCREEN data allo- - cated in either <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG>. So though it is documented as a - terminfo function, <STRONG>mvcur</STRONG> is really a curses function which is not well + System V Release 4 curses implement <STRONG>mvcur</STRONG> using the SCREEN data allo- + cated in either <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG>. So though it is documented as a + terminfo function, <STRONG>mvcur</STRONG> is really a curses function which is not well specified. - X/Open states that the old location must be given for <STRONG>mvcur</STRONG>. This im- - plementation allows the caller to use -1's for the old ordinates. In + X/Open states that the old location must be given for <STRONG>mvcur</STRONG>. This im- + plementation allows the caller to use -1's for the old ordinates. In that case, the old location is unknown. </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_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, - <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG>putc(3)</STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</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_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG>, + <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG>putc(3)</STRONG>, <STRONG>ter-</STRONG> + <STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG> @@ -596,6 +625,7 @@ <li><a href="#h3-Output-Functions">Output Functions</a></li> <li><a href="#h3-Terminal-Capability-Functions">Terminal Capability Functions</a></li> <li><a href="#h3-Terminal-Capability-Names">Terminal Capability Names</a></li> +<li><a href="#h3-Releasing-Memory">Releasing Memory</a></li> </ul> </li> <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a> Index: doc/html/man/form.3x.html --- ncurses-6.3-20211225+/doc/html/man/form.3x.html 2021-12-25 22:12:46.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/form.3x.html 2022-01-02 00:19:52.000000000 +0000 @@ -248,7 +248,7 @@ <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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/infocmp.1m.html --- ncurses-6.3-20211225+/doc/html/man/infocmp.1m.html 2021-12-25 22:12:47.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/infocmp.1m.html 2022-01-02 00:19:53.000000000 +0000 @@ -514,7 +514,7 @@ https://invisible-island.net/ncurses/tctest.html - This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE> Index: doc/html/man/infotocap.1m.html --- ncurses-6.3-20211225+/doc/html/man/infotocap.1m.html 2021-12-25 22:12:47.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/infotocap.1m.html 2022-01-02 00:19:53.000000000 +0000 @@ -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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE> Index: doc/html/man/menu.3x.html --- ncurses-6.3-20211225+/doc/html/man/menu.3x.html 2021-12-25 22:12:47.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/menu.3x.html 2022-01-02 00:19:53.000000000 +0000 @@ -223,7 +223,7 @@ <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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/ncurses.3x.html --- ncurses-6.3-20211225+/doc/html/man/ncurses.3x.html 2021-12-26 00:04:56.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/ncurses.3x.html 2022-01-02 00:19:55.000000000 +0000 @@ -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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). 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: doc/html/man/ncurses6-config.1.html --- ncurses-6.3-20211225+/doc/html/man/ncurses6-config.1.html 2021-12-25 22:12:48.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/ncurses6-config.1.html 2022-01-02 00:19:55.000000000 +0000 @@ -113,7 +113,7 @@ </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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/panel.3x.html --- ncurses-6.3-20211225+/doc/html/man/panel.3x.html 2021-12-25 22:12:48.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/panel.3x.html 2022-01-02 00:19:55.000000000 +0000 @@ -281,7 +281,7 @@ </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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE> Index: doc/html/man/tabs.1.html --- ncurses-6.3-20211225+/doc/html/man/tabs.1.html 2021-12-25 22:12:48.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/tabs.1.html 2022-01-02 00:19:55.000000000 +0000 @@ -252,7 +252,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="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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/terminfo.5.html --- ncurses-6.3-20211225+/doc/html/man/terminfo.5.html 2021-12-25 22:12:49.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/terminfo.5.html 2022-01-02 00:19:56.000000000 +0000 @@ -106,7 +106,7 @@ 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 20211225). + This manual describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). </PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE> Index: doc/html/man/tic.1m.html --- ncurses-6.3-20211225+/doc/html/man/tic.1m.html 2021-12-25 22:12:50.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/tic.1m.html 2022-01-02 00:19:56.000000000 +0000 @@ -461,7 +461,7 @@ <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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE> Index: doc/html/man/toe.1m.html --- ncurses-6.3-20211225+/doc/html/man/toe.1m.html 2021-12-25 22:12:50.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/toe.1m.html 2022-01-02 00:19:56.000000000 +0000 @@ -171,7 +171,7 @@ <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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/tput.1.html --- ncurses-6.3-20211225+/doc/html/man/tput.1.html 2021-12-26 00:04:56.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/tput.1.html 2022-01-02 00:19:56.000000000 +0000 @@ -545,7 +545,7 @@ </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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: doc/html/man/tset.1.html --- ncurses-6.3-20211225+/doc/html/man/tset.1.html 2021-12-26 00:04:57.000000000 +0000 +++ ncurses-6.3-20220101/doc/html/man/tset.1.html 2022-01-02 00:19:56.000000000 +0000 @@ -391,7 +391,7 @@ <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 20211225). + This describes <STRONG>ncurses</STRONG> version 6.3 (patch 20220101). Index: man/curs_termcap.3x Prereq: 1.52 --- ncurses-6.3-20211225+/man/curs_termcap.3x 2021-12-25 21:31:00.000000000 +0000 +++ ncurses-6.3-20220101/man/curs_termcap.3x 2022-01-01 23:49:07.000000000 +0000 @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2020,2021 Thomas E. Dickey * +.\" Copyright 2018-2021,2022 Thomas E. Dickey * .\" Copyright 1998-2017,2018 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_termcap.3x,v 1.52 2021/12/25 21:31:00 tom Exp $ +.\" $Id: curs_termcap.3x,v 1.55 2022/01/01 23:49:07 tom Exp $ .TH curs_termcap 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -86,7 +86,7 @@ Thus, they can only be used to query the capabilities of entries for which a terminfo entry has been compiled. -.SS INITIALIZATION +.SS Initialization .PP The \fBtgetent\fP routine loads the entry for \fIname\fP. It returns: @@ -118,7 +118,7 @@ description is marked with the \fIgeneric\fP capability, or if the terminal description has cursor-addressing. .RE -.SS CAPABILITY VALUES +.SS Capability Values .PP The \fBtgetflag\fP routine gets the boolean entry for \fIid\fP, or zero if it is not available. @@ -152,7 +152,7 @@ \fBtgetflag\fP, \fBtgetnum\fP and \fBtgetstr\fP are compared in lookups. -.SS FORMATTING CAPABILITIES +.SS Formatting Capabilities .PP The \fBtgoto\fP routine expands the given capability using the parameters. .bP @@ -181,7 +181,7 @@ The \fBtputs\fP routine is described on the \fBcurs_terminfo\fP(3X) manual page. It can retrieve capabilities by either termcap or terminfo name. -.SS GLOBAL VARIABLES +.SS Global Variables .PP The variables \fBPC\fP, @@ -197,6 +197,30 @@ \fBBC\fP is used in the \fBtgoto\fP emulation. The variable \fBospeed\fP is set by ncurses in a system-specific coding to reflect the terminal speed. +.SS Releasing Memory +The termcap functions provide no means for freeing memory, +because legacy termcap implementations used only the buffer +areas provided by the caller via \fBtgetent\fP and \fBtgetstr\fP. +Those buffers are unused in terminfo. +.PP +On the other hand, terminfo allocates memory. +It uses \fBsetupterm\fP to retrieve the data used by \fBtgetent\fP +and the functions which return capability values such as \fBtgetstr\fP. +One could use +.sp + \fBdel_curterm(cur_term);\fP +.sp +.PP +to free this memory, but there is an additional complication with ncurses. +It uses a fixed-size \fIpool\fP of storage locations, +one per setting of the \fBTERM\fP variable when \fBtgetent\fP is called. +The \fBscreen\fP(1) program relies upon this arrangement, +to improve its performance. +.PP +An application which uses only the low-level termcap functions could +free the memory using \fBdel_curterm\fP, +because the pool is freed using other functions +(see \fBcurs_memleaks\fP(3X)). . .SH RETURN VALUE Except where explicitly noted, Index: man/curs_terminfo.3x Prereq: 1.79 --- ncurses-6.3-20211225+/man/curs_terminfo.3x 2021-12-25 21:34:58.000000000 +0000 +++ ncurses-6.3-20220101/man/curs_terminfo.3x 2022-01-01 21:50:06.000000000 +0000 @@ -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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_terminfo.3x,v 1.79 2021/12/25 21:34:58 tom Exp $ +.\" $Id: curs_terminfo.3x,v 1.80 2022/01/01 21:50:06 tom Exp $ .TH curs_terminfo 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -407,6 +407,32 @@ .br \fBconst char *strnames[]\fP, \fB*strcodes[]\fP, \fB*strfnames[]\fP .RE +.\" *************************************************************************** +.SS Releasing Memory +Each successful call to \fBsetupterm\fP allocates memory to hold the terminal +description. As a side-effect, it sets \fBcur_term\fP to point to this memory. +If an application calls +.sp + \fBdel_curterm(cur_term);\fP +.sp +the memory will be freed. +.PP +The formatting functions \fBtparm\fP and \fBtiparm\fP extend the storage +allocated by \fBsetupterm\fP: +.bP +the \*(``static\*('' terminfo variables [a-z]. +Before ncurses 6.3, those were shared by all screens. +With ncurses 6.3, those are allocated per screen. +See \fBterminfo\fP(\*n) for details. +.bP +to improve performance, ncurses 6.3 caches the result of analyzing terminfo +strings for their parameter types. +That is stored as a binary tree referenced from the \fBTERMINAL\fP structure. +.PP +The higher-level \fBinitscr\fP and \fBnewterm\fP functions use \fBsetupterm\fP. +Normally they do not free this memory, but it is possible to do that using +the \fBdelscreen\fP(3X) function. +.\" *************************************************************************** .SH RETURN VALUE Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP (SVr4 only specifies \*(``an integer value other than \fBERR\fP\*('') @@ -675,6 +701,7 @@ \fBcurses\fP(3X), \fBcurs_initscr\fP(3X), \fBcurs_kernel\fP(3X), +\fBcurs_memleaks\fP(3X), \fBcurs_termcap\fP(3X), \fBcurs_variables\fP(3X), \fBterm_variables\fP(3X), Index: package/debian-mingw/changelog --- ncurses-6.3-20211225+/package/debian-mingw/changelog 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/debian-mingw/changelog 2022-01-01 11:46:49.000000000 +0000 @@ -1,8 +1,8 @@ -ncurses6 (6.3+20211225) unstable; urgency=low +ncurses6 (6.3+20220101) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 24 Dec 2021 15:26:19 -0500 + -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 Jan 2022 06:46:49 -0500 ncurses6 (5.9-20131005) unstable; urgency=low Index: package/debian-mingw/copyright --- ncurses-6.3-20211225+/package/debian-mingw/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/package/debian-mingw/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -5,7 +5,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 by Thomas E. Dickey +Copyright: 2017-2021,2022 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11 Index: package/debian-mingw64/changelog --- ncurses-6.3-20211225+/package/debian-mingw64/changelog 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/debian-mingw64/changelog 2022-01-01 11:46:49.000000000 +0000 @@ -1,8 +1,8 @@ -ncurses6 (6.3+20211225) unstable; urgency=low +ncurses6 (6.3+20220101) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 24 Dec 2021 15:26:19 -0500 + -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 Jan 2022 06:46:49 -0500 ncurses6 (5.9-20131005) unstable; urgency=low Index: package/debian-mingw64/copyright --- ncurses-6.3-20211225+/package/debian-mingw64/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/package/debian-mingw64/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -5,7 +5,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 by Thomas E. Dickey +Copyright: 2017-2021,2022 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11 Index: package/debian/changelog --- ncurses-6.3-20211225+/package/debian/changelog 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/debian/changelog 2022-01-01 11:46:49.000000000 +0000 @@ -1,8 +1,8 @@ -ncurses6 (6.3+20211225) unstable; urgency=low +ncurses6 (6.3+20220101) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 24 Dec 2021 15:26:19 -0500 + -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 Jan 2022 06:46:49 -0500 ncurses6 (5.9-20120608) unstable; urgency=low Index: package/debian/copyright --- ncurses-6.3-20211225+/package/debian/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/package/debian/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -5,7 +5,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 by Thomas E. Dickey +Copyright: 2017-2021,2022 by Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11 Index: package/mingw-ncurses.nsi Prereq: 1.499 --- ncurses-6.3-20211225+/package/mingw-ncurses.nsi 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/mingw-ncurses.nsi 2022-01-01 11:46:49.000000000 +0000 @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.499 2021/12/24 20:26:19 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.500 2022/01/01 11:46:49 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -9,8 +9,8 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "3" -!define VERSION_YYYY "2021" -!define VERSION_MMDD "1225" +!define VERSION_YYYY "2022" +!define VERSION_MMDD "0101" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" Index: package/mingw-ncurses.spec --- ncurses-6.3-20211225+/package/mingw-ncurses.spec 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/mingw-ncurses.spec 2022-01-01 11:46:49.000000000 +0000 @@ -3,7 +3,7 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 Version: 6.3 -Release: 20211225 +Release: 20220101 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz Index: package/ncurses.spec --- ncurses-6.3-20211225+/package/ncurses.spec 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/ncurses.spec 2022-01-01 11:46:49.000000000 +0000 @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.3 -Release: 20211225 +Release: 20220101 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz Index: package/ncursest.spec --- ncurses-6.3-20211225+/package/ncursest.spec 2021-12-24 20:26:19.000000000 +0000 +++ ncurses-6.3-20220101/package/ncursest.spec 2022-01-01 11:46:49.000000000 +0000 @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.3 -Release: 20211225 +Release: 20220101 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz Index: test/package/debian-mingw/copyright --- ncurses-6.3-20211225+/test/package/debian-mingw/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/test/package/debian-mingw/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -4,7 +4,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 Thomas E. Dickey +Copyright: 2017-2021,2022 Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11 Index: test/package/debian-mingw64/copyright --- ncurses-6.3-20211225+/test/package/debian-mingw64/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/test/package/debian-mingw64/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -4,7 +4,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 Thomas E. Dickey +Copyright: 2017-2021,2022 Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11 Index: test/package/debian/copyright --- ncurses-6.3-20211225+/test/package/debian/copyright 2021-01-01 09:54:30.000000000 +0000 +++ ncurses-6.3-20220101/test/package/debian/copyright 2022-01-02 00:28:07.000000000 +0000 @@ -4,7 +4,7 @@ ------------------------------------------------------------------------------- Files: * -Copyright: 2017-2020,2021 Thomas E. Dickey +Copyright: 2017-2021,2022 Thomas E. Dickey Copyright: 1998-2016,2017 Free Software Foundation, Inc. Licence: X11