diff options
Diffstat (limited to 'packages/ncurses/6.5/ncurses-6.5-20240914.patch')
-rw-r--r-- | packages/ncurses/6.5/ncurses-6.5-20240914.patch | 11059 |
1 files changed, 11059 insertions, 0 deletions
diff --git a/packages/ncurses/6.5/ncurses-6.5-20240914.patch b/packages/ncurses/6.5/ncurses-6.5-20240914.patch new file mode 100644 index 00000000..e87cda09 --- /dev/null +++ b/packages/ncurses/6.5/ncurses-6.5-20240914.patch @@ -0,0 +1,11059 @@ +# ncurses 6.5 - patch 20240914 - Thomas E. Dickey +# +# ------------------------------------------------------------------------------ +# +# Ncurses 6.5 is at +# https://invisible-island.net/archives/ncurses/ +# https://invisible-mirror.net/archives/ncurses/ +# https://ftp.gnu.org/gnu/ncurses/ +# +# Patches for ncurses 6.5 can be found at +# https://invisible-island.net/archives/ncurses/6.5 +# https://invisible-mirror.net/archives/ncurses/6.5 +# +# ------------------------------------------------------------------------------ +# https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20240914.patch.gz +# patch by Thomas E. Dickey <dickey@invisible-island.net> +# created Sun Sep 15 00:18:41 UTC 2024 +# ------------------------------------------------------------------------------ +# NEWS | 12 +# VERSION | 2 +# dist.mk | 4 +# doc/html/NCURSES-Programming-HOWTO.html | 4209 +++++++++++++++--------------- +# doc/html/man/captoinfo.1m.html | 53 +# doc/html/man/curs_bkgd.3x.html | 14 +# doc/html/man/curs_bkgrnd.3x.html | 30 +# doc/html/man/curs_extend.3x.html | 14 +# doc/html/man/curs_get_wch.3x.html | 18 +# doc/html/man/curs_getch.3x.html | 53 +# doc/html/man/curs_initscr.3x.html | 8 +# doc/html/man/curs_inopts.3x.html | 72 +# doc/html/man/curs_ins_wstr.3x.html | 10 +# doc/html/man/curs_instr.3x.html | 10 +# doc/html/man/curs_inwstr.3x.html | 16 +# doc/html/man/curs_kernel.3x.html | 106 +# doc/html/man/curs_outopts.3x.html | 28 +# doc/html/man/curs_refresh.3x.html | 10 +# doc/html/man/curs_scroll.3x.html | 32 +# doc/html/man/curs_termcap.3x.html | 75 +# doc/html/man/curs_terminfo.3x.html | 284 +- +# doc/html/man/curs_util.3x.html | 8 +# doc/html/man/curs_variables.3x.html | 16 +# doc/html/man/curs_window.3x.html | 42 +# doc/html/man/infocmp.1m.html | 25 +# doc/html/man/legacy_coding.3x.html | 14 +# doc/html/man/ncurses.3x.html | 625 ++-- +# doc/html/man/tabs.1.html | 75 +# doc/html/man/terminfo.5.html | 4 +# doc/html/man/tic.1m.html | 10 +# doc/html/man/tput.1.html | 12 +# man/captoinfo.1m | 11 +# man/curs_bkgd.3x | 10 +# man/curs_bkgrnd.3x | 19 +# man/curs_extend.3x | 6 +# man/curs_get_wch.3x | 14 +# man/curs_getch.3x | 15 +# man/curs_initscr.3x | 10 +# man/curs_inopts.3x | 25 +# man/curs_ins_wstr.3x | 6 +# man/curs_instr.3x | 26 +# man/curs_inwstr.3x | 28 +# man/curs_kernel.3x | 169 - +# man/curs_outopts.3x | 65 +# man/curs_refresh.3x | 6 +# man/curs_scroll.3x | 29 +# man/curs_termcap.3x | 295 +- +# man/curs_terminfo.3x | 105 +# man/curs_util.3x | 10 +# man/curs_variables.3x | 60 +# man/curs_window.3x | 38 +# man/infocmp.1m | 41 +# man/legacy_coding.3x | 17 +# man/manlinks.sed | 3 +# man/ncurses.3x | 49 +# man/tabs.1 | 42 +# man/terminfo.tail | 4 +# man/tic.1m | 6 +# man/tput.1 | 6 +# misc/ncurses-config.in | 6 +# misc/terminfo.src | 18 +# ncurses/tinfo/lib_tputs.c | 10 +# package/debian-mingw/changelog | 4 +# package/debian-mingw64/changelog | 4 +# package/debian/changelog | 4 +# package/mingw-ncurses.nsi | 4 +# package/mingw-ncurses.spec | 2 +# package/ncurses.spec | 2 +# package/ncursest.spec | 2 +# 69 files changed, 3799 insertions(+), 3263 deletions(-) +# ------------------------------------------------------------------------------ +Index: NEWS +Prereq: 1.4169 +--- ncurses-6.5-20240831+/NEWS 2024-08-31 21:21:26.000000000 +0000 ++++ ncurses-6.5-20240914/NEWS 2024-09-14 23:14:09.000000000 +0000 +@@ -26,7 +26,7 @@ + -- sale, use or other dealings in this Software without prior written -- + -- authorization. -- + ------------------------------------------------------------------------------- +--- $Id: NEWS,v 1.4169 2024/08/31 21:21:26 tom Exp $ ++-- $Id: NEWS,v 1.4175 2024/09/14 23:14:09 tom Exp $ + ------------------------------------------------------------------------------- + + This is a log of changes that ncurses has gone through since Zeyd started +@@ -46,6 +46,14 @@ + Changes through 1.9.9e did not credit all contributions; + it is not possible to add this information. + ++20240914 ++ + modify _nc_flush() to also flush stderr to help the flash capability ++ to work in bash (patch by Harm te Hennepe, cf: 20201128) ++ + omit -g and -fXXX flags from CFLAGS in misc/ncurses-config.in ++ + improve formatting/style of manpages (patches by Branden Robinson). ++ + improve examples in NCURSES-Programming-HOWTO.html ++ + update comments in terminfo.src -TD ++ + 20240831 + + build-fix for a case in msys2 where gettimeofday() was available but + the fallback was partly configured. +@@ -4387,7 +4395,7 @@ + 20140621 + + change shared-library suffix for AIX 5 and 6 to ".so", avoiding + conflict with the static library (report by Ben Lentz). +- + document RPATH_LIST in INSTALLATION file, as part of workarounds for ++ + document RPATH_LIST in INSTALL file, as part of workarounds for + upgrading an ncurses library using the "--with-shared" option. + + modify test/ncurses.c c/C tests to cycle through subsets of the + total number of colors, to better illustrate 8/16/88/256-colors by +Index: VERSION +--- ncurses-6.5-20240831+/VERSION 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/VERSION 2024-09-14 12:14:00.000000000 +0000 +@@ -1 +1 @@ +-5:0:10 6.5 20240831 ++5:0:10 6.5 20240914 +Index: dist.mk +Prereq: 1.1629 +--- ncurses-6.5-20240831+/dist.mk 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/dist.mk 2024-09-14 12:14:00.000000000 +0000 +@@ -26,7 +26,7 @@ + # use or other dealings in this Software without prior written # + # authorization. # + ############################################################################## +-# $Id: dist.mk,v 1.1629 2024/08/31 09:52:35 tom Exp $ ++# $Id: dist.mk,v 1.1631 2024/09/14 12:14:00 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 = 5 +-NCURSES_PATCH = 20240831 ++NCURSES_PATCH = 20240914 + + # We don't append the patch to the version, since this only applies to releases + VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) +Index: doc/html/NCURSES-Programming-HOWTO.html +--- ncurses-6.5-20240831+/doc/html/NCURSES-Programming-HOWTO.html 2023-10-21 16:35:57.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/NCURSES-Programming-HOWTO.html 2024-09-08 21:12:23.000000000 +0000 +@@ -15,21 +15,35 @@ + <h1 class="TITLE"><a name="AEN2" id="AEN2">NCURSES + Programming HOWTO</a></h1> + +- <h3 class="AUTHOR"><a name="AEN4" id="AEN4">Pradeep +- Padala</a></h3> ++ <div class="AUTHORGROUP"> ++ <a name="AEN4" id="AEN4"></a> ++ <h3 class="AUTHOR"><a name="AEN5" id="AEN5">Pradeep ++ Padala</a></h3> ++ ++ <div class="AFFILIATION"> ++ <div class="ADDRESS"> ++ <p class="ADDRESS"><code class="EMAIL"><<a href= ++ "mailto:ppadala@gmail.com">ppadala@gmail.com</a>></code> ++ </p> ++ </div> ++ </div> + +- <div class="AFFILIATION"> +- <div class="ADDRESS"> +- <p class="ADDRESS"><code class="EMAIL"><<a href= +- "mailto:ppadala@gmail.com">ppadala@gmail.com</a>></code> +- </p> ++ <h3 class="AUTHOR"><a name="AEN11" id="AEN11">Thomas E. ++ Dickey</a></h3> ++ ++ <div class="AFFILIATION"> ++ <div class="ADDRESS"> ++ <p class="ADDRESS"><code class="EMAIL"><<a href= ++ "mailto:dickey@invisible-island.net">dickey@invisible-island.net</a>></code> ++ </p> ++ </div> + </div> + </div> + +- <p class="PUBDATE">v1.9, 2005-06-20<br></p> ++ <p class="PUBDATE">v2.1, 2024-09-08<br></p> + + <div class="REVHISTORY"> +- <table width="100%" border="0" summary="revisions"> ++ <table width="100%" border="0"> + <tr> + <th align="left" valign="top" colspan="3"><b>Revision + History</b> +@@ -37,6 +51,18 @@ + </tr> + + <tr> ++ <td align="left">Revision 2.1</td> ++ <td align="left">2024-09-08</td> ++ <td align="left">Revised by: dickey</td> ++ </tr> ++ ++ <tr> ++ <td align="left" colspan="3">Fixes for the sample ++ programs. Remove obsolete mailing addresses. Update ++ publication date.</td> ++ </tr> ++ ++ <tr> + <td align="left">Revision 2.0</td> + <td align="left">2022-12-03</td> + <td align="left">Revised by: dickey</td> +@@ -179,14 +205,14 @@ + + <div> + <div class="ABSTRACT"> +- <a name="AEN72" id="AEN72"></a> ++ <a name="AEN85" id="AEN85"></a> + <p><span class="emphasis"><i class="EMPHASIS">This + document is intended to be an "All in One" guide for + programming with ncurses and its sister libraries. We + graduate from a simple "Hello World" program to more + complex form manipulation. No prior experience in ncurses + is assumed. Send comments to <a href= +- "mailto:ppadala@gmail.com" target="_top">this ++ "mailto:bug-ncurses@gnu.org" target="_top">this + address</a></i></span> + </p> + </div> +@@ -223,8 +249,8 @@ + + <dd> + <dl> +- <dt>1.6.1. <a href="#LISTFORMATS">Readily available +- formats from tldp.org</a></dt> ++ <dt>1.6.1. <a href="#LISTFORMATS">Alternative ++ formats</a></dt> + + <dt>1.6.2. <a href="#BUILDSOURCE">Building from + source</a></dt> +@@ -299,7 +325,7 @@ + <dt>6.1. <a href="#ADDCHCLASS">addch() class of + functions</a></dt> + +- <dt>6.2. <a href="#AEN303">mvaddch(), waddch() and ++ <dt>6.2. <a href="#AEN324">mvaddch(), waddch() and + mvwaddch()</a></dt> + + <dt>6.3. <a href="#PRINTWCLASS">printw() class of +@@ -658,7 +684,7 @@ + of bytes. All the capabilities (such as moving the cursor to + a new location, erasing part of the screen, scrolling the + screen, changing modes, etc.) of terminals could be accessed +- through these series of bytes. These control seeuqnces are ++ through these series of bytes. These control sequences are + usually called escape sequences, because they start with an + escape(0x1B) character. Even today, with proper emulation, we + can send escape sequences to the emulator and achieve the +@@ -767,36 +793,41 @@ + package</i></span> + </p> + +- <p>NCURSES can be obtained from <a href= +- "ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses.tar.gz" target= +- "_top">ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses.tar.gz</a> +- or any of the ftp sites mentioned in <a href= +- "https://www.gnu.org/order/ftp.html" target= +- "_top">https://www.gnu.org/order/ftp.html</a>.</p> ++ <p>NCURSES can be obtained from</p> + +- <p>Read the README and INSTALL files for details on to how +- to install it. It usually involves the following +- operations.</p> ++ <ul> ++ <li> ++ <p>the home page at <a href= ++ "https://invisible-island.net/" target= ++ "_top">https://invisible-island.net</a>, as well as</p> ++ </li> + +- <pre class= +- "PROGRAMLISTING"> tar zxvf ncurses<version>.tar.gz # unzip and untar the archive +- cd ncurses<version> # cd to the directory +- ./configure # configure the build according to your +- # environment +- make # make it +- su root # become root +- make install # install it</pre> +- <p><span class="emphasis"><i class="EMPHASIS">Using the +- RPM</i></span> +- </p> ++ <li> ++ <p><a href="https://ftp.gnu.org/pub/gnu/ncurses/" ++ target="_top">https://ftp.gnu.org/pub/gnu/ncurses/</a> ++ or</p> ++ </li> + +- <p>NCURSES RPM can be found and downloaded from <a href= +- "https://rpmfind.net" target="_top">https://rpmfind.net</a> +- . The RPM can be installed with the following command after +- becoming root.</p> ++ <li> ++ <p>any of the mirror sites mentioned in <a href= ++ "https://www.gnu.org/order/ftp.html" target= ++ "_top">https://www.gnu.org/order/ftp.html</a>.</p> ++ </li> ++ </ul> ++ ++ <p>Read the README and <a href= ++ "https://invisible-island.net/ncurses/INSTALL.html" target= ++ "_top">INSTALL</a> files for details on to how to install ++ it. It usually involves the following operations.</p> + + <pre class= +- "PROGRAMLISTING"> rpm -i <downloaded rpm></pre> ++ "PROGRAMLISTING"> tar zxvf ncurses<version>.tar.gz # unzip and untar the archive ++ cd ncurses<version> # cd to the directory ++ ./configure # configure the build according to your ++ # environment ++ make # make it ++ su root # become root ++ make install # install it</pre> + </div> + + <div class="SECT2"> +@@ -819,10 +850,10 @@ + <h3 class="SECT2"><a name="ABOUTPROGRAMS" id= + "ABOUTPROGRAMS">1.5. About the Programs</a></h3> + +- <p>All the programs in the document are available in zipped +- form <a href= +- "https://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs.tar.gz" +- target="_top">here</a>. Unzip and untar it. The directory ++ <p>All the programs in the document are available in ++ gzipped form <a href= ++ "https://invisible-island.net/ncurses/howto/ncurses_programs.tar.gz" ++ target="_top">here</a>. Ungzip and untar it. The directory + structure looks like this.</p> + + <pre class="PROGRAMLISTING">ncurses +@@ -850,7 +881,7 @@ + | + |----> hanoi.c -- The Towers of Hanoi Solver + |----> life.c -- The Game of Life demo +- |----> magic.c -- An Odd Order Magic Square builder ++ |----> magic.c -- An Odd Order Magic Square builder + |----> queens.c -- The famous N-Queens Solver + |----> shuffle.c -- A fun game, if you have time to kill + |----> tt.c -- A very trivial typing tutor +@@ -866,23 +897,23 @@ + | -- rt from box() + |----> printw_example.c -- A very simple printw() example + |----> scanw_example.c -- A very simple getstr() example +- |----> simple_attr.c -- A program that can print a c file with ++ |----> simple_attr.c -- A program that can print a c file with + | -- comments in attribute + |----> simple_color.c -- A simple example demonstrating colors +- |----> simple_key.c -- A menu accessible with keyboard UP, DOWN ++ |----> simple_key.c -- A menu accessible with keyboard UP, DOWN + | -- arrows + |----> temp_leave.c -- Demonstrates temporarily leaving curses mode + |----> win_border.c -- Shows Creation of windows and borders + |----> with_chgat.c -- chgat() usage example + +- forms ++ forms + | + |----> form_attrib.c -- Usage of field attributes + |----> form_options.c -- Usage of field options + |----> form_simple.c -- A simple form example + |----> form_win.c -- Demo of windows associated with forms + +- menus ++ menus + | + |----> menu_attrib.c -- Usage of menu attributes + |----> menu_item_data.c -- Usage of item_name(), etc. functions +@@ -894,9 +925,9 @@ + |----> menu_userptr.c -- Usage of user pointer + |----> menu_win.c -- Demo of windows associated with menus + +- panels ++ panels + | +- |----> panel_browse.c -- Panel browsing through tab. Usage of user ++ |----> panel_browse.c -- Panel browsing through tab. Usage of user + | -- pointer + |----> panel_hide.c -- Hiding and Un hiding of panels + |----> panel_resize.c -- Moving and resizing of panels +@@ -914,12 +945,6 @@ + <p>For every example, I have included path name for the + file relative to the examples directory.</p> + +- <p>If you prefer browsing individual programs, point your +- browser to <a href= +- "https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs/" +- target= +- "_top">https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs/</a></p> +- + <p>All the programs are released under the same license + that is used by ncurses (MIT-style). This gives you the + ability to do pretty much anything other than claiming them +@@ -933,40 +958,38 @@ + <h3 class="SECT2"><a name="OTHERFORMATS" id= + "OTHERFORMATS">1.6. Other Formats of the document</a></h3> + +- <p>This howto is also available in various other formats on +- the tldp.org site. Here are the links to other formats of +- this document.</p> ++ <p>This howto is also available in other formats. Here are ++ the links to other formats of this document.</p> + + <div class="SECT3"> + <hr> + + <h4 class="SECT3"><a name="LISTFORMATS" id= +- "LISTFORMATS">1.6.1. Readily available formats from +- tldp.org</a></h4> ++ "LISTFORMATS">1.6.1. Alternative formats</a></h4> + + <ul> + <li> + <p><a href= +- "https://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/NCURSES-Programming-HOWTO.pdf" ++ "https://invisible-island.net/ncurses/howto/NCURSES-Programming-HOWTO.pdf" + target="_top">Acrobat PDF Format</a></p> + </li> + + <li> + <p><a href= +- "https://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/ps/NCURSES-Programming-HOWTO.ps.gz" ++ "https://invisible-island.net/ncurses/howto/NCURSES-Programming-HOWTO.ps" + target="_top">PostScript Format</a></p> + </li> + + <li> + <p><a href= +- "https://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html/NCURSES-Programming-HOWTO-html.tar.gz" ++ "https://invisible-island.net/ncurses/howto/NCURSES-Programming-HOWTO-html.tar.gz" + target="_top">In Multiple HTML pages</a></p> + </li> + + <li> + <p><a href= +- "https://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/NCURSES-Programming-HOWTO.html" +- target="_top">In One big HTML format</a></p> ++ "https://invisible-island.net/ncurses/howto/NCURSES-Programming-HOWTO.html" ++ target="_top">A single HTML file.</a></p> + </li> + </ul> + </div> +@@ -977,37 +1000,29 @@ + <h4 class="SECT3"><a name="BUILDSOURCE" id= + "BUILDSOURCE">1.6.2. Building from source</a></h4> + +- <p>If above links are broken or if you want to experiment +- with sgml read on.</p> ++ <p>The sources for this HOWTO can be retrieved from</p> + +- <pre class= +- "PROGRAMLISTING"> Get both the source and the tar,gzipped programs, available at +- http://cvsview.tldp.org/index.cgi/LDP/howto/docbook/ +- NCURSES-HOWTO/NCURSES-Programming-HOWTO.sgml +- http://cvsview.tldp.org/index.cgi/LDP/howto/docbook/ +- NCURSES-HOWTO/ncurses_programs.tar.gz +- +- Unzip ncurses_programs.tar.gz with +- tar zxvf ncurses_programs.tar.gz +- +- Use jade to create various formats. For example if you just want to create +- the multiple html files, you would use +- jade -t sgml -i html -d <path to docbook html stylesheet> +- NCURSES-Programming-HOWTO.sgml +- to get pdf, first create a single html file of the HOWTO with +- jade -t sgml -i html -d <path to docbook html stylesheet> -V nochunks +- NCURSES-Programming-HOWTO.sgml > NCURSES-ONE-BIG-FILE.html +- then use htmldoc to get pdf file with +- htmldoc --size universal -t pdf --firstpage p1 -f <output file name.pdf> +- NCURSES-ONE-BIG-FILE.html +- for ps, you would use +- htmldoc --size universal -t ps --firstpage p1 -f <output file name.ps> +- NCURSES-ONE-BIG-FILE.html</pre> +- <p>See <a href= +- "https://www.tldp.org/LDP/LDP-Author-Guide/" target= +- "_top">LDP Author guide</a> for more details. If all else +- fails, mail me at <a href="ppadala@gmail.com" target= +- "_top">ppadala@gmail.com</a></p> ++ <div class="INFORMALEXAMPLE"> ++ <a name="AEN164" id="AEN164"></a> ++ ++ <pre class="PROGRAMLISTING"><a href= ++ "https://github.com/ThomasDickey/ncurses-howto-snapshots" ++ target= ++ "_top">https://github.com/ThomasDickey/ncurses-howto-snapshots</a></pre> ++ </div> ++ ++ <p>These tools were used to format the HOWTO and build ++ the examples:</p> ++ ++ <ul> ++ <li> ++ <p>docbook-utils (a Debian package)</p> ++ </li> ++ ++ <li> ++ <p>gcc</p> ++ </li> ++ </ul> + </div> + </div> + +@@ -1017,21 +1032,22 @@ + <h3 class="SECT2"><a name="CREDITS" id="CREDITS">1.7. + Credits</a></h3> + +- <p>I thank <a href="mailto:sharath_1@usa.net" target= +- "_top">Sharath</a> and Emre Akbas for helping me with few +- sections. The introduction was initially written by +- sharath. I rewrote it with few excerpts taken from his +- initial work. Emre helped in writing printw and scanw +- sections.</p> +- +- <p>Perl equivalents of the example programs are contributed +- by <a href="mailto:Aratnaweera@virtusa.com" target= +- "_top">Anuradha Ratnaweera</a>.</p> +- +- <p>Then comes <a href="mailto:parimi@ece.arizona.edu" +- target="_top">Ravi Parimi</a>, my dearest friend, who has +- been on this project before even one line was written. He +- constantly bombarded me with suggestions and patiently ++ <p>I thank <span class="emphasis"><i class= ++ "EMPHASIS">Sharath</i></span> and <span class= ++ "emphasis"><i class="EMPHASIS">Emre Akbas</i></span> for ++ helping me with few sections. The introduction was ++ initially written by Sharath. I rewrote it with few ++ excerpts taken from his initial work. Emre helped in ++ writing printw and scanw sections.</p> ++ ++ <p>Perl equivalents of the example programs were ++ contributed by <span class="emphasis"><i class= ++ "EMPHASIS">Anuradha Ratnaweera</i></span>.</p> ++ ++ <p>Then comes <span class="emphasis"><i class= ++ "EMPHASIS">Ravi Parimi</i></span>, my dearest friend, who ++ has been on this project before even one line was written. ++ He constantly bombarded me with suggestions and patiently + reviewed the whole text. He also checked each program on + Linux and Solaris.</p> + </div> +@@ -1150,15 +1166,16 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <curses.h> + +-int main() +-{ +- initscr(); /* Start curses mode */ +- printw("Hello World !!!"); /* Print Hello World */ +- refresh(); /* Print it on to the real screen */ +- getch(); /* Wait for user input */ +- endwin(); /* End curses mode */ ++int ++main(void) ++{ ++ initscr(); /* Start curses mode */ ++ printw("Hello World !!!"); /* Print Hello World */ ++ refresh(); /* Print it on to the real screen */ ++ getch(); /* Wait for user input */ ++ endwin(); /* End curses mode */ + +- return 0; ++ return 0; + }</span></pre> + </div> + </div> +@@ -1388,34 +1405,36 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <curses.h> + +-int main() +-{ int ch; ++int ++main(void) ++{ ++ int ch; + +- initscr(); /* Start curses mode */ +- raw(); /* Line buffering disabled */ +- keypad(stdscr, TRUE); /* We get F1, F2 etc.. */ +- noecho(); /* Don't echo() while we do getch */ +- +- printw("Type any character to see it in bold\n"); +- ch = getch(); /* If raw() hadn't been called +- * we have to press enter before it +- * gets to the program */ +- if(ch == KEY_F(1)) /* Without keypad enabled this will */ +- printw("F1 Key pressed");/* not get to us either */ +- /* Without noecho() some ugly escape +- * characters might have been printed +- * on screen */ +- else +- { printw("The pressed key is "); +- attron(A_BOLD); +- printw("%c", ch); +- attroff(A_BOLD); +- } +- refresh(); /* Print it on to the real screen */ +- getch(); /* Wait for user input */ +- endwin(); /* End curses mode */ ++ initscr(); /* Start curses mode */ ++ raw(); /* Line buffering disabled */ ++ keypad(stdscr, TRUE); /* We get F1, F2 etc.. */ ++ noecho(); /* Don't echo() while we do getch */ ++ ++ printw("Type any character to see it in bold\n"); ++ ch = getch(); /* If raw() hadn't been called ++ * we have to press enter before it ++ * gets to the program */ ++ if (ch == KEY_F(1)) /* Without keypad enabled this will */ ++ printw("F1 Key pressed"); /* not get to us either */ ++ /* Without noecho() some ugly escape ++ * characters might have been printed ++ * on screen */ ++ else { ++ printw("The pressed key is "); ++ attron(A_BOLD); ++ printw("%c", ch); ++ attroff(A_BOLD); ++ } ++ refresh(); /* Print it on to the real screen */ ++ getch(); /* Wait for user input */ ++ endwin(); /* End curses mode */ + +- return 0; ++ return 0; + }</span></pre> + </div> + +@@ -1573,7 +1592,7 @@ + <div class="SECT2"> + <hr> + +- <h3 class="SECT2"><a name="AEN303" id="AEN303">6.2. ++ <h3 class="SECT2"><a name="AEN324" id="AEN324">6.2. + mvaddch(), waddch() and mvwaddch()</a></h3> + + <p><tt class="LITERAL">mvaddch()</tt> is used to move the +@@ -1669,24 +1688,25 @@ + + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <curses.h> +-#include <string.h> +- +-int main() +-{ +- char mesg[]="Just a string"; /* message to be appeared on the screen */ +- int row,col; /* to store the number of rows and * +- * the number of columns of the screen */ +- initscr(); /* start the curses mode */ +- getmaxyx(stdscr,row,col); /* get the number of rows and columns */ +- mvprintw(row/2,(col-strlen(mesg))/2,"%s",mesg); +- /* print the message at the center of the screen */ +- mvprintw(row-2,0,"This screen has %d rows and %d columns\n",row,col); +- printw("Try resizing your window(if possible) and then run this program again"); +- refresh(); +- getch(); +- endwin(); ++#include <string.h> ++ ++int ++main(void) ++{ ++ char mesg[] = "Just a string"; /* message to be appeared on the screen */ ++ int row, col; /* to store the number of rows and * ++ * the number of columns of the screen */ ++ initscr(); /* start the curses mode */ ++ getmaxyx(stdscr, row, col); /* get the number of rows and columns */ ++ mvprintw(row / 2, (col - (int) strlen(mesg)) / 2, "%s", mesg); ++ /* print the message at the center of the screen */ ++ mvprintw(row - 2, 0, "This screen has %d rows and %d columns\n", row, col); ++ printw("Try resizing your window(if possible) and then run this program again"); ++ refresh(); ++ getch(); ++ endwin(); + +- return 0; ++ return 0; + }</span></pre> + </div> + +@@ -1865,24 +1885,25 @@ + + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <curses.h> +-#include <string.h> +- +-int main() +-{ +- char mesg[]="Enter a string: "; /* message to be appeared on the screen */ +- char str[80]; +- int row,col; /* to store the number of rows and * +- * the number of columns of the screen */ +- initscr(); /* start the curses mode */ +- getmaxyx(stdscr,row,col); /* get the number of rows and columns */ +- mvprintw(row/2,(col-strlen(mesg))/2,"%s",mesg); +- /* print the message at the center of the screen */ +- getstr(str); +- mvprintw(LINES - 2, 0, "You Entered: %s", str); +- getch(); +- endwin(); ++#include <string.h> ++ ++int ++main(void) ++{ ++ char mesg[] = "Enter a string: "; /* message to be appeared on the screen */ ++ char str[80]; ++ int row, col; /* to store the number of rows and * ++ * the number of columns of the screen */ ++ initscr(); /* start the curses mode */ ++ getmaxyx(stdscr, row, col); /* get the number of rows and columns */ ++ mvprintw(row / 2, (col - (int) strlen(mesg)) / 2, "%s", mesg); ++ /* print the message at the center of the screen */ ++ getstr(str); ++ mvprintw(LINES - 2, 0, "You Entered: %s", str); ++ getch(); ++ endwin(); + +- return 0; ++ return 0; + }</span></pre> + </div> + </div> +@@ -1911,55 +1932,54 @@ + #include <curses.h> + #include <stdlib.h> + +-int main(int argc, char *argv[]) +-{ +- int ch, prev, row, col; +- prev = EOF; +- FILE *fp; +- int y, x; +- +- if(argc != 2) +- { +- printf("Usage: %s <a c file name>\n", argv[0]); +- exit(1); +- } +- fp = fopen(argv[1], "r"); +- if(fp == NULL) +- { +- perror("Cannot open input file"); +- exit(1); +- } +- initscr(); /* Start curses mode */ +- getmaxyx(stdscr, row, col); /* find the boundaries of the screeen */ +- while((ch = fgetc(fp)) != EOF) /* read the file till we reach the end */ +- { +- getyx(stdscr, y, x); /* get the current cursor position */ +- if(y == (row - 1)) /* are we are at the end of the screen */ +- { +- printw("<-Press Any Key->"); /* tell the user to press a key */ +- getch(); +- clear(); /* clear the screen */ +- move(0, 0); /* start at the beginning of the screen */ ++int ++main(int argc, char *argv[]) ++{ ++ int ch, prev, row, col; ++ prev = EOF; ++ FILE *fp; ++ int y, x; ++ ++ if (argc != 2) { ++ printf("Usage: %s <a c file name>\n", argv[0]); ++ exit(1); + } +- if(prev == '/' && ch == '*') /* If it is / and * then only +- * switch bold on */ ++ fp = fopen(argv[1], "r"); ++ if (fp == NULL) { ++ perror("Cannot open input file"); ++ exit(1); ++ } ++ initscr(); /* Start curses mode */ ++ getmaxyx(stdscr, row, col); /* find the boundaries of the screeen */ ++ (void) col; ++ while ((ch = fgetc(fp)) != EOF) /* read the file till we reach the end */ + { +- attron(A_BOLD); /* cut bold on */ +- getyx(stdscr, y, x); /* get the current cursor position */ +- move(y, x - 1); /* back up one space */ +- printw("%c%c", '/', ch); /* The actual printing is done here */ ++ getyx(stdscr, y, x); /* get the current cursor position */ ++ if (y == (row - 1)) /* are we are at the end of the screen */ ++ { ++ printw("<-Press Any Key->"); /* tell the user to press a key */ ++ getch(); ++ clear(); /* clear the screen */ ++ move(0, 0); /* start at the beginning of the screen */ ++ } ++ if (prev == '/' && ch == '*') /* If it is / and * then only ++ * switch bold on */ ++ { ++ attron(A_BOLD); /* cut bold on */ ++ getyx(stdscr, y, x); /* get the current cursor position */ ++ move(y, x - 1); /* back up one space */ ++ printw("%c%c", '/', ch); /* The actual printing is done here */ ++ } else ++ printw("%c", ch); ++ refresh(); ++ if (prev == '*' && ch == '/') ++ attroff(A_BOLD); /* Switch it off once we got * ++ * and then / */ ++ prev = ch; + } +- else +- printw("%c", ch); +- refresh(); +- if(prev == '*' && ch == '/') +- attroff(A_BOLD); /* Switch it off once we got * +- * and then / */ +- prev = ch; +- } +- endwin(); /* End curses mode */ +- fclose(fp); +- return 0; ++ endwin(); /* End curses mode */ ++ fclose(fp); ++ return 0; + }</span></pre> + </div> + +@@ -2002,8 +2022,8 @@ + following video attributes, which are defined in + <curses.h> can be passed to these functions.</p> + +- <pre class="PROGRAMLISTING"> +- A_NORMAL Normal display (no highlight) ++ <pre class= ++ "PROGRAMLISTING"> A_NORMAL Normal display (no highlight) + A_STANDOUT Best highlighting mode of the terminal. + A_UNDERLINE Underlining + A_REVERSE Reverse video +@@ -2014,10 +2034,9 @@ + A_INVIS Invisible or blank mode + A_ALTCHARSET Alternate character set + A_CHARTEXT Bit-mask to extract a character +- COLOR_PAIR(n) Color-pair number n +- </pre> ++ COLOR_PAIR(n) Color-pair number n </pre> + <p>The last one is the most colorful one :-) Colors are +- explained in the <a href="#color" target="_top">next ++ explained in the <a href="#COLOR" target="_top">next + sections</a>.</p> + + <p>We can OR(|) any number of above attributes to get a +@@ -2129,27 +2148,29 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <curses.h> + +-int main(int argc, char *argv[]) +-{ initscr(); /* Start curses mode */ +- start_color(); /* Start color functionality */ +- +- init_pair(1, COLOR_CYAN, COLOR_BLACK); +- printw("A Big string which i didn't care to type fully "); +- mvchgat(0, 0, -1, A_BLINK, 1, NULL); +- /* +- * First two parameters specify the position at which to start +- * Third parameter number of characters to update. -1 means till +- * end of line +- * Forth parameter is the normal attribute you wanted to give +- * to the character +- * Fifth is the color index. It is the index given during init_pair() +- * use 0 if you didn't want color +- * Sixth one is always NULL +- */ +- refresh(); +- getch(); +- endwin(); /* End curses mode */ +- return 0; ++int ++main(void) ++{ ++ initscr(); /* Start curses mode */ ++ start_color(); /* Start color functionality */ ++ ++ init_pair(1, COLOR_CYAN, COLOR_BLACK); ++ printw("A Big string which i didn't care to type fully "); ++ mvchgat(0, 0, -1, A_BLINK, 1, NULL); ++ /* ++ * First two parameters specify the position at which to start ++ * Third parameter number of characters to update. -1 means till ++ * end of line ++ * Forth parameter is the normal attribute you wanted to give ++ * to the character ++ * Fifth is the color index. It is the index given during init_pair() ++ * use 0 if you didn't want color ++ * Sixth one is always NULL ++ */ ++ refresh(); ++ getch(); ++ endwin(); /* End curses mode */ ++ return 0; + }</span></pre> + </div> + +@@ -2222,81 +2243,86 @@ + WINDOW *create_newwin(int height, int width, int starty, int startx); + void destroy_win(WINDOW *local_win); + +-int main(int argc, char *argv[]) +-{ WINDOW *my_win; +- int startx, starty, width, height; +- int ch; +- +- initscr(); /* Start curses mode */ +- cbreak(); /* Line buffering disabled, Pass on +- * everty thing to me */ +- keypad(stdscr, TRUE); /* I need that nifty F1 */ +- +- height = 3; +- width = 10; +- starty = (LINES - height) / 2; /* Calculating for a center placement */ +- startx = (COLS - width) / 2; /* of the window */ +- printw("Press F1 to exit"); +- refresh(); +- my_win = create_newwin(height, width, starty, startx); ++int ++main(void) ++{ ++ WINDOW *my_win; ++ int startx, starty, width, height; ++ int ch; ++ ++ initscr(); /* Start curses mode */ ++ cbreak(); /* Line buffering disabled, Pass on ++ * every thing to me */ ++ keypad(stdscr, TRUE); /* I need that nifty F1 */ ++ ++ height = 3; ++ width = 10; ++ starty = (LINES - height) / 2; /* Calculating for a center placement */ ++ startx = (COLS - width) / 2; /* of the window */ ++ printw("Press F1 to exit"); ++ refresh(); ++ my_win = create_newwin(height, width, starty, startx); + +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case KEY_LEFT: +- destroy_win(my_win); +- my_win = create_newwin(height, width, starty,--startx); +- break; +- case KEY_RIGHT: +- destroy_win(my_win); +- my_win = create_newwin(height, width, starty,++startx); +- break; +- case KEY_UP: +- destroy_win(my_win); +- my_win = create_newwin(height, width, --starty,startx); +- break; +- case KEY_DOWN: +- destroy_win(my_win); +- my_win = create_newwin(height, width, ++starty,startx); +- break; +- } ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case KEY_LEFT: ++ destroy_win(my_win); ++ my_win = create_newwin(height, width, starty, --startx); ++ break; ++ case KEY_RIGHT: ++ destroy_win(my_win); ++ my_win = create_newwin(height, width, starty, ++startx); ++ break; ++ case KEY_UP: ++ destroy_win(my_win); ++ my_win = create_newwin(height, width, --starty, startx); ++ break; ++ case KEY_DOWN: ++ destroy_win(my_win); ++ my_win = create_newwin(height, width, ++starty, startx); ++ break; + } +- +- endwin(); /* End curses mode */ +- return 0; ++ } ++ ++ endwin(); /* End curses mode */ ++ return 0; + } + +-WINDOW *create_newwin(int height, int width, int starty, int startx) +-{ WINDOW *local_win; ++WINDOW * ++create_newwin(int height, int width, int starty, int startx) ++{ ++ WINDOW *local_win; + +- local_win = newwin(height, width, starty, startx); +- box(local_win, 0 , 0); /* 0, 0 gives default characters +- * for the vertical and horizontal +- * lines */ +- wrefresh(local_win); /* Show that box */ ++ local_win = newwin(height, width, starty, startx); ++ box(local_win, 0, 0); /* 0, 0 gives default characters ++ * for the vertical and horizontal ++ * lines */ ++ wrefresh(local_win); /* Show that box */ + +- return local_win; ++ return local_win; + } + +-void destroy_win(WINDOW *local_win) +-{ +- /* box(local_win, ' ', ' '); : This won't produce the desired +- * result of erasing the window. It will leave its four corners +- * and so an ugly remnant of window. +- */ +- wborder(local_win, ' ', ' ', ' ',' ',' ',' ',' ',' '); +- /* The parameters taken are +- * 1. win: the window on which to operate +- * 2. ls: character to be used for the left side of the window +- * 3. rs: character to be used for the right side of the window +- * 4. ts: character to be used for the top side of the window +- * 5. bs: character to be used for the bottom side of the window +- * 6. tl: character to be used for the top left corner of the window +- * 7. tr: character to be used for the top right corner of the window +- * 8. bl: character to be used for the bottom left corner of the window +- * 9. br: character to be used for the bottom right corner of the window +- */ +- wrefresh(local_win); +- delwin(local_win); ++void ++destroy_win(WINDOW *local_win) ++{ ++ /* box(local_win, ' ', ' '); : This won't produce the desired ++ * result of erasing the window. It will leave its four corners ++ * and so an ugly remnant of window. ++ */ ++ wborder(local_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); ++ /* The parameters taken are ++ * 1. win: the window on which to operate ++ * 2. ls: character to be used for the left side of the window ++ * 3. rs: character to be used for the right side of the window ++ * 4. ts: character to be used for the top side of the window ++ * 5. bs: character to be used for the bottom side of the window ++ * 6. tl: character to be used for the top left corner of the window ++ * 7. tr: character to be used for the top right corner of the window ++ * 8. bl: character to be used for the bottom left corner of the window ++ * 9. br: character to be used for the bottom right corner of the window ++ */ ++ wrefresh(local_win); ++ delwin(local_win); + }</span></pre> + </div> + </div> +@@ -2391,122 +2417,129 @@ + "INLINEMEDIAOBJECT">#include <curses.h> + + typedef struct _win_border_struct { +- chtype ls, rs, ts, bs, +- tl, tr, bl, br; +-}WIN_BORDER; ++ chtype ls, rs, ts, bs, tl, tr, bl, br; ++} WIN_BORDER; + + typedef struct _WIN_struct { + +- int startx, starty; +- int height, width; +- WIN_BORDER border; +-}WIN; +- +-void init_win_params(WIN *p_win); +-void print_win_params(WIN *p_win); +-void create_box(WIN *win, bool flag); +- +-int main(int argc, char *argv[]) +-{ WIN win; +- int ch; +- +- initscr(); /* Start curses mode */ +- start_color(); /* Start the color functionality */ +- cbreak(); /* Line buffering disabled, Pass on +- * everty thing to me */ +- keypad(stdscr, TRUE); /* I need that nifty F1 */ +- noecho(); +- init_pair(1, COLOR_CYAN, COLOR_BLACK); +- +- /* Initialize the window parameters */ +- init_win_params(&win); +- print_win_params(&win); ++ int startx, starty; ++ int height, width; ++ WIN_BORDER border; ++} WIN; ++ ++void init_win_params(WIN * p_win); ++void print_win_params(WIN * p_win); ++void create_box(WIN * win, bool flag); + +- attron(COLOR_PAIR(1)); +- printw("Press F1 to exit"); +- refresh(); +- attroff(COLOR_PAIR(1)); +- +- create_box(&win, TRUE); +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case KEY_LEFT: +- create_box(&win, FALSE); +- --win.startx; +- create_box(&win, TRUE); +- break; +- case KEY_RIGHT: +- create_box(&win, FALSE); +- ++win.startx; +- create_box(&win, TRUE); +- break; +- case KEY_UP: +- create_box(&win, FALSE); +- --win.starty; +- create_box(&win, TRUE); +- break; +- case KEY_DOWN: +- create_box(&win, FALSE); +- ++win.starty; +- create_box(&win, TRUE); +- break; +- } ++int ++main(void) ++{ ++ WIN win; ++ int ch; ++ ++ initscr(); /* Start curses mode */ ++ start_color(); /* Start the color functionality */ ++ cbreak(); /* Line buffering disabled, Pass on ++ * everty thing to me */ ++ keypad(stdscr, TRUE); /* I need that nifty F1 */ ++ noecho(); ++ init_pair(1, COLOR_CYAN, COLOR_BLACK); ++ ++ /* Initialize the window parameters */ ++ init_win_params(&win); ++ print_win_params(&win); ++ ++ attron(COLOR_PAIR(1)); ++ printw("Press F1 to exit"); ++ refresh(); ++ attroff(COLOR_PAIR(1)); ++ ++ create_box(&win, TRUE); ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case KEY_LEFT: ++ create_box(&win, FALSE); ++ --win.startx; ++ create_box(&win, TRUE); ++ break; ++ case KEY_RIGHT: ++ create_box(&win, FALSE); ++ ++win.startx; ++ create_box(&win, TRUE); ++ break; ++ case KEY_UP: ++ create_box(&win, FALSE); ++ --win.starty; ++ create_box(&win, TRUE); ++ break; ++ case KEY_DOWN: ++ create_box(&win, FALSE); ++ ++win.starty; ++ create_box(&win, TRUE); ++ break; + } +- endwin(); /* End curses mode */ +- return 0; ++ } ++ endwin(); /* End curses mode */ ++ return 0; + } +-void init_win_params(WIN *p_win) ++void ++init_win_params(WIN * p_win) + { +- p_win->height = 3; +- p_win->width = 10; +- p_win->starty = (LINES - p_win->height)/2; +- p_win->startx = (COLS - p_win->width)/2; +- +- p_win->border.ls = '|'; +- p_win->border.rs = '|'; +- p_win->border.ts = '-'; +- p_win->border.bs = '-'; +- p_win->border.tl = '+'; +- p_win->border.tr = '+'; +- p_win->border.bl = '+'; +- p_win->border.br = '+'; ++ p_win->height = 3; ++ p_win->width = 10; ++ p_win->starty = (LINES - p_win->height) / 2; ++ p_win->startx = (COLS - p_win->width) / 2; ++ ++ p_win->border.ls = '|'; ++ p_win->border.rs = '|'; ++ p_win->border.ts = '-'; ++ p_win->border.bs = '-'; ++ p_win->border.tl = '+'; ++ p_win->border.tr = '+'; ++ p_win->border.bl = '+'; ++ p_win->border.br = '+'; + + } +-void print_win_params(WIN *p_win) ++ ++void ++print_win_params(WIN * p_win) + { + #ifdef _DEBUG +- mvprintw(25, 0, "%d %d %d %d", p_win->startx, p_win->starty, +- p_win->width, p_win->height); +- refresh(); ++ mvprintw(25, 0, "%d %d %d %d", p_win->startx, p_win->starty, ++ p_win->width, p_win->height); ++ refresh(); ++#else ++ (void) p_win; + #endif + } +-void create_box(WIN *p_win, bool flag) +-{ int i, j; +- int x, y, w, h; +- +- x = p_win->startx; +- y = p_win->starty; +- w = p_win->width; +- h = p_win->height; +- +- if(flag == TRUE) +- { mvaddch(y, x, p_win->border.tl); +- mvaddch(y, x + w, p_win->border.tr); +- mvaddch(y + h, x, p_win->border.bl); +- mvaddch(y + h, x + w, p_win->border.br); +- mvhline(y, x + 1, p_win->border.ts, w - 1); +- mvhline(y + h, x + 1, p_win->border.bs, w - 1); +- mvvline(y + 1, x, p_win->border.ls, h - 1); +- mvvline(y + 1, x + w, p_win->border.rs, h - 1); + +- } +- else +- for(j = y; j <= y + h; ++j) +- for(i = x; i <= x + w; ++i) +- mvaddch(j, i, ' '); +- +- refresh(); ++void ++create_box(WIN * p_win, bool flag) ++{ ++ int i, j; ++ int x, y, w, h; + ++ x = p_win->startx; ++ y = p_win->starty; ++ w = p_win->width; ++ h = p_win->height; ++ ++ if (flag == TRUE) { ++ mvaddch(y, x, p_win->border.tl); ++ mvaddch(y, x + w, p_win->border.tr); ++ mvaddch(y + h, x, p_win->border.bl); ++ mvaddch(y + h, x + w, p_win->border.br); ++ mvhline(y, x + 1, p_win->border.ts, w - 1); ++ mvhline(y + h, x + 1, p_win->border.bs, w - 1); ++ mvvline(y + 1, x, p_win->border.ls, h - 1); ++ mvvline(y + 1, x + w, p_win->border.rs, h - 1); ++ ++ } else ++ for (j = y; j <= y + h; ++j) ++ for (i = x; i <= x + w; ++i) ++ mvaddch(j, i, ' '); ++ ++ refresh(); + }</span></pre> + </div> + </div> +@@ -2535,44 +2568,48 @@ + #include <string.h> + #include <curses.h> + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string); +-int main(int argc, char *argv[]) +-{ initscr(); /* Start curses mode */ +- if(has_colors() == FALSE) +- { endwin(); +- printf("Your terminal does not support color\n"); +- exit(1); +- } +- start_color(); /* Start color */ +- init_pair(1, COLOR_RED, COLOR_BLACK); ++void print_in_middle(WINDOW *win, int starty, int startx, int width, const char *string); + +- attron(COLOR_PAIR(1)); +- print_in_middle(stdscr, LINES / 2, 0, 0, "Viola !!! In color ..."); +- attroff(COLOR_PAIR(1)); +- getch(); ++int ++main(void) ++{ ++ initscr(); /* Start curses mode */ ++ if (has_colors() == FALSE) { + endwin(); ++ printf("Your terminal does not support color\n"); ++ exit(1); ++ } ++ start_color(); /* Start color */ ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ ++ attron(COLOR_PAIR(1)); ++ print_in_middle(stdscr, LINES / 2, 0, 0, "Viola !!! In color ..."); ++ attroff(COLOR_PAIR(1)); ++ getch(); ++ endwin(); + } +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- mvwprintw(win, y, x, "%s", string); +- refresh(); +-} +-</span></pre> ++void ++print_in_middle(WINDOW *win, int starty, int startx, int width, const char *string) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ mvwprintw(win, y, x, "%s", string); ++ refresh(); ++}</span></pre> + </div> + + <p>As you can see, to start using color, you should first +@@ -2724,93 +2761,100 @@ + "INLINEMEDIAOBJECT">#include <curses.h> + + #define WIDTH 30 +-#define HEIGHT 10 ++#define HEIGHT 10 + + int startx = 0; + int starty = 0; + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Exit", +- }; ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Exit", ++}; + int n_choices = sizeof(choices) / sizeof(char *); + void print_menu(WINDOW *menu_win, int highlight); + +-int main() +-{ WINDOW *menu_win; +- int highlight = 1; +- int choice = 0; +- int c; +- +- initscr(); +- clear(); +- noecho(); +- cbreak(); /* Line buffering disabled. pass on everything */ +- startx = (80 - WIDTH) / 2; +- starty = (24 - HEIGHT) / 2; +- +- menu_win = newwin(HEIGHT, WIDTH, starty, startx); +- keypad(menu_win, TRUE); +- mvprintw(0, 0, "Use arrow keys to go up and down, Press enter to select a choice"); +- refresh(); ++int ++main(void) ++{ ++ WINDOW *menu_win; ++ int highlight = 1; ++ int choice = 0; ++ int c; ++ ++ initscr(); ++ clear(); ++ noecho(); ++ cbreak(); /* Line buffering disabled. pass on everything */ ++ startx = (80 - WIDTH) / 2; ++ starty = (24 - HEIGHT) / 2; ++ ++ menu_win = newwin(HEIGHT, WIDTH, starty, startx); ++ keypad(menu_win, TRUE); ++ mvprintw(0, 0, ++ "Use arrow keys to go up and down, Press enter to select a choice"); ++ refresh(); ++ print_menu(menu_win, highlight); ++ while (1) { ++ c = wgetch(menu_win); ++ switch (c) { ++ case KEY_UP: ++ if (highlight == 1) ++ highlight = n_choices; ++ else ++ --highlight; ++ break; ++ case KEY_DOWN: ++ if (highlight == n_choices) ++ highlight = 1; ++ else ++ ++highlight; ++ break; ++ case 10: ++ choice = highlight; ++ break; ++ default: ++ mvprintw(24, 0, ++ "Character pressed is = %3d Hopefully it can be printed as '%c'", ++ c, c); ++ refresh(); ++ break; ++ } + print_menu(menu_win, highlight); +- while(1) +- { c = wgetch(menu_win); +- switch(c) +- { case KEY_UP: +- if(highlight == 1) +- highlight = n_choices; +- else +- --highlight; +- break; +- case KEY_DOWN: +- if(highlight == n_choices) +- highlight = 1; +- else +- ++highlight; +- break; +- case 10: +- choice = highlight; +- break; +- default: +- mvprintw(24, 0, "Character pressed is = %3d Hopefully it can be printed as '%c'", c, c); +- refresh(); +- break; +- } +- print_menu(menu_win, highlight); +- if(choice != 0) /* User did a choice come out of the infinite loop */ +- break; +- } +- mvprintw(23, 0, "You chose choice %d with choice string %s\n", choice, choices[choice - 1]); +- clrtoeol(); +- refresh(); +- endwin(); +- return 0; ++ if (choice != 0) /* User did a choice come out of the infinite loop */ ++ break; ++ } ++ mvprintw(23, 0, "You chose choice %d with choice string %s\n", choice, ++ choices[choice - 1]); ++ clrtoeol(); ++ refresh(); ++ endwin(); ++ return 0; + } + +-void print_menu(WINDOW *menu_win, int highlight) ++void ++print_menu(WINDOW *menu_win, int highlight) + { +- int x, y, i; ++ int x, y, i; + +- x = 2; +- y = 2; +- box(menu_win, 0, 0); +- for(i = 0; i < n_choices; ++i) +- { if(highlight == i + 1) /* High light the present choice */ +- { wattron(menu_win, A_REVERSE); +- mvwprintw(menu_win, y, x, "%s", choices[i]); +- wattroff(menu_win, A_REVERSE); +- } +- else +- mvwprintw(menu_win, y, x, "%s", choices[i]); +- ++y; +- } +- wrefresh(menu_win); +-} +-</span></pre> ++ x = 2; ++ y = 2; ++ box(menu_win, 0, 0); ++ for (i = 0; i < n_choices; ++i) { ++ if (highlight == i + 1) /* Highlight the present choice */ ++ { ++ wattron(menu_win, A_REVERSE); ++ mvwprintw(menu_win, y, x, "%s", choices[i]); ++ wattroff(menu_win, A_REVERSE); ++ } else ++ mvwprintw(menu_win, y, x, "%s", choices[i]); ++ ++y; ++ } ++ wrefresh(menu_win); ++}</span></pre> + </div> + </div> + </div> +@@ -2904,7 +2948,7 @@ + short id; /* ID to distinguish multiple devices */ + int x, y, z; /* event coordinates */ + mmask_t bstate; /* button state bits */ +- } </pre> ++ }</pre> + <p>The <tt class="LITERAL">bstate</tt> is the main variable + we are interested in. It tells the button state of the + mouse.</p> +@@ -2942,103 +2986,112 @@ + int startx = 0; + int starty = 0; + +-char *choices[] = { "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Exit", +- }; ++const char *choices[] = ++{"Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Exit", ++}; + + int n_choices = sizeof(choices) / sizeof(char *); + + void print_menu(WINDOW *menu_win, int highlight); + void report_choice(int mouse_x, int mouse_y, int *p_choice); + +-int main() +-{ int c, choice = 0; +- WINDOW *menu_win; +- MEVENT event; +- +- /* Initialize curses */ +- initscr(); +- clear(); +- noecho(); +- cbreak(); //Line buffering disabled. pass on everything +- +- /* Try to put the window in the middle of screen */ +- startx = (80 - WIDTH) / 2; +- starty = (24 - HEIGHT) / 2; +- +- attron(A_REVERSE); +- mvprintw(23, 1, "Click on Exit to quit (Works best in a virtual console)"); +- refresh(); +- attroff(A_REVERSE); ++int ++main(void) ++{ ++ int c, choice = 0; ++ WINDOW *menu_win; ++ MEVENT event; ++ ++ /* Initialize curses */ ++ initscr(); ++ clear(); ++ noecho(); ++ cbreak(); /* Line buffering disabled. pass everything */ ++ ++ /* Try to put the window in the middle of screen */ ++ startx = (80 - WIDTH) / 2; ++ starty = (24 - HEIGHT) / 2; ++ ++ attron(A_REVERSE); ++ mvprintw(23, 1, ++ "Click on Exit to quit (Works best in a virtual console)"); ++ refresh(); ++ attroff(A_REVERSE); + +- /* Print the menu for the first time */ +- menu_win = newwin(HEIGHT, WIDTH, starty, startx); +- keypad(menu_win, TRUE); +- print_menu(menu_win, 1); +- /* Get all the mouse events */ +- mousemask(ALL_MOUSE_EVENTS, NULL); +- +- while(1) +- { c = wgetch(menu_win); +- switch(c) +- { case KEY_MOUSE: +- if(getmouse(&event) == OK) +- { /* When the user clicks left mouse button */ +- if(event.bstate & BUTTON1_PRESSED) +- { report_choice(event.x + 1, event.y + 1, &choice); +- if(choice == -1) //Exit chosen +- goto end; +- mvprintw(22, 1, "Choice made is : %d String Chosen is \"%10s\"", choice, choices[choice - 1]); +- refresh(); +- } +- } +- print_menu(menu_win, choice); +- break; ++ /* Print the menu for the first time */ ++ menu_win = newwin(HEIGHT, WIDTH, starty, startx); ++ keypad(menu_win, TRUE); ++ print_menu(menu_win, 1); ++ /* Get all the mouse events */ ++ mousemask(ALL_MOUSE_EVENTS, NULL); ++ ++ while (1) { ++ c = wgetch(menu_win); ++ switch (c) { ++ case KEY_MOUSE: ++ if (getmouse(&event) == OK) { /* When the user clicks left mouse button */ ++ if (event.bstate & BUTTON1_PRESSED) { ++ report_choice(event.x + 1, event.y + 1, &choice); ++ if (choice == -1) /* Exit chosen */ ++ goto end; ++ mvprintw(22, 1, ++ "Choice made is : %d String Chosen is \"%10s\"", ++ choice, choices[choice - 1]); ++ refresh(); + } ++ } ++ print_menu(menu_win, choice); ++ break; + } +-end: +- endwin(); +- return 0; ++ } ++ end: ++ endwin(); ++ return 0; + } + +-void print_menu(WINDOW *menu_win, int highlight) ++void ++print_menu(WINDOW *menu_win, int highlight) + { +- int x, y, i; ++ int x, y, i; + +- x = 2; +- y = 2; +- box(menu_win, 0, 0); +- for(i = 0; i < n_choices; ++i) +- { if(highlight == i + 1) +- { wattron(menu_win, A_REVERSE); +- mvwprintw(menu_win, y, x, "%s", choices[i]); +- wattroff(menu_win, A_REVERSE); +- } +- else +- mvwprintw(menu_win, y, x, "%s", choices[i]); +- ++y; +- } +- wrefresh(menu_win); ++ x = 2; ++ y = 2; ++ box(menu_win, 0, 0); ++ for (i = 0; i < n_choices; ++i) { ++ if (highlight == i + 1) { ++ wattron(menu_win, A_REVERSE); ++ mvwprintw(menu_win, y, x, "%s", choices[i]); ++ wattroff(menu_win, A_REVERSE); ++ } else ++ mvwprintw(menu_win, y, x, "%s", choices[i]); ++ ++y; ++ } ++ wrefresh(menu_win); + } + + /* Report the choice according to mouse position */ +-void report_choice(int mouse_x, int mouse_y, int *p_choice) +-{ int i,j, choice; ++void ++report_choice(int mouse_x, int mouse_y, int *p_choice) ++{ ++ int i, j, choice; + +- i = startx + 2; +- j = starty + 3; ++ i = startx + 2; ++ j = starty + 3; + +- for(choice = 0; choice < n_choices; ++choice) +- if(mouse_y == j + choice && mouse_x >= i && mouse_x <= i + strlen(choices[choice])) +- { if(choice == n_choices - 1) +- *p_choice = -1; +- else +- *p_choice = choice + 1; +- break; +- } ++ for (choice = 0; choice < n_choices; ++choice) ++ if (mouse_y == j + choice ++ && mouse_x >= i ++ && mouse_x <= i + (int) strlen(choices[choice])) { ++ if (choice == n_choices - 1) ++ *p_choice = -1; ++ else ++ *p_choice = choice + 1; ++ break; ++ } + }</span></pre> + </div> + </div> +@@ -3086,7 +3139,7 @@ + + <pre class="PROGRAMLISTING"> getyx(win, y, x); + /* win: window pointer +- * y, x: y, x co-ordinates will be put into this variables ++ * y, x: y, x co-ordinates will be put into this variables + */</pre> + <p>The function getparyx() gets the beginning co-ordinates + of the sub window relative to the main window. This is some +@@ -3195,23 +3248,24 @@ + "INLINEMEDIAOBJECT">#include <stdlib.h> + #include <curses.h> + +-int main() +-{ +- initscr(); /* Start curses mode */ +- printw("Hello World !!!\n"); /* Print Hello World */ +- refresh(); /* Print it on to the real screen */ +- def_prog_mode(); /* Save the tty modes */ +- endwin(); /* End curses mode temporarily */ +- system("/bin/sh"); /* Do whatever you like in cooked mode */ +- reset_prog_mode(); /* Return to the previous tty mode*/ +- /* stored by def_prog_mode() */ +- refresh(); /* Do refresh() to restore the */ +- /* Screen contents */ +- printw("Another String\n"); /* Back to curses use the full */ +- refresh(); /* capabilities of curses */ +- endwin(); /* End curses mode */ ++int ++main(void) ++{ ++ initscr(); /* Start curses mode */ ++ printw("Hello World !!!\n"); /* Print Hello World */ ++ refresh(); /* Print it on to the real screen */ ++ def_prog_mode(); /* Save the tty modes */ ++ endwin(); /* End curses mode temporarily */ ++ system("/bin/sh"); /* Do whatever you like in cooked mode */ ++ reset_prog_mode(); /* Return to the previous tty mode */ ++ /* stored by def_prog_mode() */ ++ refresh(); /* Do refresh() to restore the */ ++ /* Screen contents */ ++ printw("Another String\n"); /* Back to curses use the full */ ++ refresh(); /* capabilities of curses */ ++ endwin(); /* End curses mode */ + +- return 0; ++ return 0; + }</span></pre> + </div> + </div> +@@ -3239,47 +3293,47 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <curses.h> + +-int main() ++int main(void) + { +- initscr(); ++ initscr(); + +- printw("Upper left corner "); addch(ACS_ULCORNER); printw("\n"); +- printw("Lower left corner "); addch(ACS_LLCORNER); printw("\n"); +- printw("Lower right corner "); addch(ACS_LRCORNER); printw("\n"); +- printw("Tee pointing right "); addch(ACS_LTEE); printw("\n"); +- printw("Tee pointing left "); addch(ACS_RTEE); printw("\n"); +- printw("Tee pointing up "); addch(ACS_BTEE); printw("\n"); +- printw("Tee pointing down "); addch(ACS_TTEE); printw("\n"); +- printw("Horizontal line "); addch(ACS_HLINE); printw("\n"); +- printw("Vertical line "); addch(ACS_VLINE); printw("\n"); +- printw("Large Plus or cross over "); addch(ACS_PLUS); printw("\n"); +- printw("Scan Line 1 "); addch(ACS_S1); printw("\n"); +- printw("Scan Line 3 "); addch(ACS_S3); printw("\n"); +- printw("Scan Line 7 "); addch(ACS_S7); printw("\n"); +- printw("Scan Line 9 "); addch(ACS_S9); printw("\n"); +- printw("Diamond "); addch(ACS_DIAMOND); printw("\n"); +- printw("Checker board (stipple) "); addch(ACS_CKBOARD); printw("\n"); +- printw("Degree Symbol "); addch(ACS_DEGREE); printw("\n"); +- printw("Plus/Minus Symbol "); addch(ACS_PLMINUS); printw("\n"); +- printw("Bullet "); addch(ACS_BULLET); printw("\n"); +- printw("Arrow Pointing Left "); addch(ACS_LARROW); printw("\n"); +- printw("Arrow Pointing Right "); addch(ACS_RARROW); printw("\n"); +- printw("Arrow Pointing Down "); addch(ACS_DARROW); printw("\n"); +- printw("Arrow Pointing Up "); addch(ACS_UARROW); printw("\n"); +- printw("Board of squares "); addch(ACS_BOARD); printw("\n"); +- printw("Lantern Symbol "); addch(ACS_LANTERN); printw("\n"); +- printw("Solid Square Block "); addch(ACS_BLOCK); printw("\n"); +- printw("Less/Equal sign "); addch(ACS_LEQUAL); printw("\n"); +- printw("Greater/Equal sign "); addch(ACS_GEQUAL); printw("\n"); +- printw("Pi "); addch(ACS_PI); printw("\n"); +- printw("Not equal "); addch(ACS_NEQUAL); printw("\n"); +- printw("UK pound sign "); addch(ACS_STERLING); printw("\n"); ++ printw("Upper left corner "); addch(ACS_ULCORNER); printw("\n"); ++ printw("Lower left corner "); addch(ACS_LLCORNER); printw("\n"); ++ printw("Lower right corner "); addch(ACS_LRCORNER); printw("\n"); ++ printw("Tee pointing right "); addch(ACS_LTEE); printw("\n"); ++ printw("Tee pointing left "); addch(ACS_RTEE); printw("\n"); ++ printw("Tee pointing up "); addch(ACS_BTEE); printw("\n"); ++ printw("Tee pointing down "); addch(ACS_TTEE); printw("\n"); ++ printw("Horizontal line "); addch(ACS_HLINE); printw("\n"); ++ printw("Vertical line "); addch(ACS_VLINE); printw("\n"); ++ printw("Large Plus or cross over "); addch(ACS_PLUS); printw("\n"); ++ printw("Scan Line 1 "); addch(ACS_S1); printw("\n"); ++ printw("Scan Line 3 "); addch(ACS_S3); printw("\n"); ++ printw("Scan Line 7 "); addch(ACS_S7); printw("\n"); ++ printw("Scan Line 9 "); addch(ACS_S9); printw("\n"); ++ printw("Diamond "); addch(ACS_DIAMOND); printw("\n"); ++ printw("Checker board (stipple) "); addch(ACS_CKBOARD); printw("\n"); ++ printw("Degree Symbol "); addch(ACS_DEGREE); printw("\n"); ++ printw("Plus/Minus Symbol "); addch(ACS_PLMINUS); printw("\n"); ++ printw("Bullet "); addch(ACS_BULLET); printw("\n"); ++ printw("Arrow Pointing Left "); addch(ACS_LARROW); printw("\n"); ++ printw("Arrow Pointing Right "); addch(ACS_RARROW); printw("\n"); ++ printw("Arrow Pointing Down "); addch(ACS_DARROW); printw("\n"); ++ printw("Arrow Pointing Up "); addch(ACS_UARROW); printw("\n"); ++ printw("Board of squares "); addch(ACS_BOARD); printw("\n"); ++ printw("Lantern Symbol "); addch(ACS_LANTERN); printw("\n"); ++ printw("Solid Square Block "); addch(ACS_BLOCK); printw("\n"); ++ printw("Less/Equal sign "); addch(ACS_LEQUAL); printw("\n"); ++ printw("Greater/Equal sign "); addch(ACS_GEQUAL); printw("\n"); ++ printw("Pi "); addch(ACS_PI); printw("\n"); ++ printw("Not equal "); addch(ACS_NEQUAL); printw("\n"); ++ printw("UK pound sign "); addch(ACS_STERLING); printw("\n"); + +- refresh(); +- getch(); +- endwin(); ++ refresh(); ++ getch(); ++ endwin(); + +- return 0; ++ return 0; + }</span></pre> + </div> + </div> +@@ -3415,42 +3469,45 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <panel.h> + +-int main() +-{ WINDOW *my_wins[3]; +- PANEL *my_panels[3]; +- int lines = 10, cols = 40, y = 2, x = 4, i; +- +- initscr(); +- cbreak(); +- noecho(); +- +- /* Create windows for the panels */ +- my_wins[0] = newwin(lines, cols, y, x); +- my_wins[1] = newwin(lines, cols, y + 1, x + 5); +- my_wins[2] = newwin(lines, cols, y + 2, x + 10); +- +- /* +- * Create borders around the windows so that you can see the effect +- * of panels +- */ +- for(i = 0; i < 3; ++i) +- box(my_wins[i], 0, 0); +- +- /* Attach a panel to each window */ /* Order is bottom up */ +- my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ +- my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ +- my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ +- +- /* Update the stacking order. 2nd panel will be on top */ +- update_panels(); +- +- /* Show it on the screen */ +- doupdate(); +- +- getch(); +- endwin(); +-} +-</span></pre> ++int ++main(void) ++{ ++ WINDOW *my_wins[3]; ++ PANEL *my_panels[3]; ++ int lines = 10, cols = 40, y = 2, x = 4, i; ++ ++ initscr(); ++ cbreak(); ++ noecho(); ++ ++ /* Create windows for the panels */ ++ my_wins[0] = newwin(lines, cols, y, x); ++ my_wins[1] = newwin(lines, cols, y + 1, x + 5); ++ my_wins[2] = newwin(lines, cols, y + 2, x + 10); ++ ++ /* ++ * Create borders around the windows so that you can see the effect ++ * of panels ++ */ ++ for (i = 0; i < 3; ++i) ++ box(my_wins[i], 0, 0); ++ ++ /* Attach a panel to each window */ ++ /* Order is bottom up */ ++ my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ ++ my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ ++ my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ ++ ++ /* Update the stacking order. 2nd panel will be on top */ ++ update_panels(); ++ ++ /* Show it on the screen */ ++ doupdate(); ++ ++ getch(); ++ endwin(); ++ return 0; ++}</span></pre> + </div> + + <p>As you can see, above program follows a simple flow as +@@ -3484,116 +3541,128 @@ + #define NCOLS 40 + + void init_wins(WINDOW **wins, int n); +-void win_show(WINDOW *win, char *label, int label_color); +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); ++void win_show(WINDOW *win, const char *label, int label_color); ++void print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color); + +-int main() +-{ WINDOW *my_wins[3]; +- PANEL *my_panels[3]; +- PANEL *top; +- int ch; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize all the colors */ +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_GREEN, COLOR_BLACK); +- init_pair(3, COLOR_BLUE, COLOR_BLACK); +- init_pair(4, COLOR_CYAN, COLOR_BLACK); +- +- init_wins(my_wins, 3); +- +- /* Attach a panel to each window */ /* Order is bottom up */ +- my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ +- my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ +- my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ +- +- /* Set up the user pointers to the next panel */ +- set_panel_userptr(my_panels[0], my_panels[1]); +- set_panel_userptr(my_panels[1], my_panels[2]); +- set_panel_userptr(my_panels[2], my_panels[0]); +- +- /* Update the stacking order. 2nd panel will be on top */ ++int ++main(void) ++{ ++ WINDOW *my_wins[3]; ++ PANEL *my_panels[3]; ++ PANEL *top; ++ int ch; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize all the colors */ ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_GREEN, COLOR_BLACK); ++ init_pair(3, COLOR_BLUE, COLOR_BLACK); ++ init_pair(4, COLOR_CYAN, COLOR_BLACK); ++ ++ init_wins(my_wins, 3); ++ ++ /* Attach a panel to each window */ ++ /* Order is bottom up */ ++ my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ ++ my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ ++ my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ ++ ++ /* Set up the user pointers to the next panel */ ++ set_panel_userptr(my_panels[0], my_panels[1]); ++ set_panel_userptr(my_panels[1], my_panels[2]); ++ set_panel_userptr(my_panels[2], my_panels[0]); ++ ++ /* Update the stacking order. 2nd panel will be on top */ ++ update_panels(); ++ ++ /* Show it on the screen */ ++ attron(COLOR_PAIR(4)); ++ mvprintw(LINES - 2, 0, ++ "Use tab to browse through the windows (F1 to Exit)"); ++ attroff(COLOR_PAIR(4)); ++ doupdate(); ++ ++ top = my_panels[2]; ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case 9: ++ top = (PANEL *) panel_userptr(top); ++ top_panel(top); ++ break; ++ } + update_panels(); +- +- /* Show it on the screen */ +- attron(COLOR_PAIR(4)); +- mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); +- attroff(COLOR_PAIR(4)); + doupdate(); +- +- top = my_panels[2]; +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case 9: +- top = (PANEL *)panel_userptr(top); +- top_panel(top); +- break; +- } +- update_panels(); +- doupdate(); +- } +- endwin(); +- return 0; ++ } ++ endwin(); ++ return 0; + } + + /* Put all the windows */ +-void init_wins(WINDOW **wins, int n) +-{ int x, y, i; +- char label[80]; +- +- y = 2; +- x = 10; +- for(i = 0; i < n; ++i) +- { wins[i] = newwin(NLINES, NCOLS, y, x); +- sprintf(label, "Window Number %d", i + 1); +- win_show(wins[i], label, i + 1); +- y += 3; +- x += 7; +- } ++void ++init_wins(WINDOW **wins, int n) ++{ ++ int x, y, i; ++ char label[80]; ++ ++ y = 2; ++ x = 10; ++ for (i = 0; i < n; ++i) { ++ wins[i] = newwin(NLINES, NCOLS, y, x); ++ sprintf(label, "Window Number %d", i + 1); ++ win_show(wins[i], label, i + 1); ++ y += 3; ++ x += 7; ++ } + } + + /* Show the window with a border and a label */ +-void win_show(WINDOW *win, char *label, int label_color) +-{ int startx, starty, height, width; ++void ++win_show(WINDOW *win, const char *label, int label_color) ++{ ++ int height, width; + +- getbegyx(win, starty, startx); +- getmaxyx(win, height, width); ++ getmaxyx(win, height, width); ++ (void) height; + +- box(win, 0, 0); +- mvwaddch(win, 2, 0, ACS_LTEE); +- mvwhline(win, 2, 1, ACS_HLINE, width - 2); +- mvwaddch(win, 2, width - 1, ACS_RTEE); +- +- print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); ++ box(win, 0, 0); ++ mvwaddch(win, 2, 0, ACS_LTEE); ++ mvwhline(win, 2, 1, ACS_HLINE, width - 2); ++ mvwaddch(win, 2, width - 1, ACS_RTEE); ++ ++ print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); + } + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- wattron(win, color); +- mvwprintw(win, y, x, "%s", string); +- wattroff(win, color); +- refresh(); ++void ++print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ wattron(win, color); ++ mvwprintw(win, y, x, "%s", string); ++ wattroff(win, color); ++ refresh(); + }</span></pre> + </div> + </div> +@@ -3660,236 +3729,253 @@ + #include <panel.h> + + typedef struct _PANEL_DATA { +- int x, y, w, h; +- char label[80]; +- int label_color; +- PANEL *next; +-}PANEL_DATA; ++ int x, y, w, h; ++ char label[80]; ++ int label_color; ++ PANEL *next; ++} PANEL_DATA; + + #define NLINES 10 + #define NCOLS 40 + + void init_wins(WINDOW **wins, int n); +-void win_show(WINDOW *win, char *label, int label_color); +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); ++void win_show(WINDOW *win, const char *label, int label_color); ++void print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color); + void set_user_ptrs(PANEL **panels, int n); + +-int main() +-{ WINDOW *my_wins[3]; +- PANEL *my_panels[3]; +- PANEL_DATA *top; +- PANEL *stack_top; +- WINDOW *temp_win, *old_win; +- int ch; +- int newx, newy, neww, newh; +- int size = FALSE, move = FALSE; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize all the colors */ +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_GREEN, COLOR_BLACK); +- init_pair(3, COLOR_BLUE, COLOR_BLACK); +- init_pair(4, COLOR_CYAN, COLOR_BLACK); +- +- init_wins(my_wins, 3); +- +- /* Attach a panel to each window */ /* Order is bottom up */ +- my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ +- my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ +- my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ +- +- set_user_ptrs(my_panels, 3); +- /* Update the stacking order. 2nd panel will be on top */ +- update_panels(); ++int ++main(void) ++{ ++ WINDOW *my_wins[3]; ++ PANEL *my_panels[3]; ++ PANEL_DATA *top; ++ PANEL *stack_top; ++ WINDOW *temp_win, *old_win; ++ int ch; ++ int newx, newy, neww, newh; ++ int size = FALSE, move = FALSE; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize all the colors */ ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_GREEN, COLOR_BLACK); ++ init_pair(3, COLOR_BLUE, COLOR_BLACK); ++ init_pair(4, COLOR_CYAN, COLOR_BLACK); ++ ++ init_wins(my_wins, 3); ++ ++ /* Attach a panel to each window */ ++ /* Order is bottom up */ ++ my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ ++ my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ ++ my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ ++ ++ set_user_ptrs(my_panels, 3); ++ /* Update the stacking order. 2nd panel will be on top */ ++ update_panels(); ++ ++ /* Show it on the screen */ ++ attron(COLOR_PAIR(4)); ++ mvprintw(LINES - 3, 0, "Use 'm' for moving, 'r' for resizing"); ++ mvprintw(LINES - 2, 0, ++ "Use tab to browse through the windows (F1 to Exit)"); ++ attroff(COLOR_PAIR(4)); ++ doupdate(); ++ ++ stack_top = my_panels[2]; ++ top = (PANEL_DATA *) panel_userptr(stack_top); ++ newx = top->x; ++ newy = top->y; ++ neww = top->w; ++ newh = top->h; ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case 9: /* Tab */ ++ top = (PANEL_DATA *) panel_userptr(stack_top); ++ top_panel(top->next); ++ stack_top = top->next; ++ top = (PANEL_DATA *) panel_userptr(stack_top); ++ newx = top->x; ++ newy = top->y; ++ neww = top->w; ++ newh = top->h; ++ break; ++ case 'r': /* Re-Size */ ++ size = TRUE; ++ attron(COLOR_PAIR(4)); ++ mvprintw(LINES - 4, 0, ++ "Entered Resizing :Use Arrow Keys to resize and press <ENTER> to end resizing"); ++ refresh(); ++ attroff(COLOR_PAIR(4)); ++ break; ++ case 'm': /* Move */ ++ attron(COLOR_PAIR(4)); ++ mvprintw(LINES - 4, 0, ++ "Entered Moving: Use Arrow Keys to Move and press <ENTER> to end moving"); ++ refresh(); ++ attroff(COLOR_PAIR(4)); ++ move = TRUE; ++ break; ++ case KEY_LEFT: ++ if (size == TRUE) { ++ --newx; ++ ++neww; ++ } ++ if (move == TRUE) ++ --newx; ++ break; ++ case KEY_RIGHT: ++ if (size == TRUE) { ++ ++newx; ++ --neww; ++ } ++ if (move == TRUE) ++ ++newx; ++ break; ++ case KEY_UP: ++ if (size == TRUE) { ++ --newy; ++ ++newh; ++ } ++ if (move == TRUE) ++ --newy; ++ break; ++ case KEY_DOWN: ++ if (size == TRUE) { ++ ++newy; ++ --newh; ++ } ++ if (move == TRUE) ++ ++newy; ++ break; ++ case 10: /* Enter */ ++ move(LINES - 4, 0); ++ clrtoeol(); ++ refresh(); ++ if (size == TRUE) { ++ old_win = panel_window(stack_top); ++ temp_win = newwin(newh, neww, newy, newx); ++ replace_panel(stack_top, temp_win); ++ win_show(temp_win, top->label, top->label_color); ++ delwin(old_win); ++ size = FALSE; ++ } ++ if (move == TRUE) { ++ move_panel(stack_top, newy, newx); ++ move = FALSE; ++ } ++ break; + +- /* Show it on the screen */ ++ } + attron(COLOR_PAIR(4)); + mvprintw(LINES - 3, 0, "Use 'm' for moving, 'r' for resizing"); +- mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); ++ mvprintw(LINES - 2, 0, ++ "Use tab to browse through the windows (F1 to Exit)"); + attroff(COLOR_PAIR(4)); ++ refresh(); ++ update_panels(); + doupdate(); +- +- stack_top = my_panels[2]; +- top = (PANEL_DATA *)panel_userptr(stack_top); +- newx = top->x; +- newy = top->y; +- neww = top->w; +- newh = top->h; +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case 9: /* Tab */ +- top = (PANEL_DATA *)panel_userptr(stack_top); +- top_panel(top->next); +- stack_top = top->next; +- top = (PANEL_DATA *)panel_userptr(stack_top); +- newx = top->x; +- newy = top->y; +- neww = top->w; +- newh = top->h; +- break; +- case 'r': /* Re-Size*/ +- size = TRUE; +- attron(COLOR_PAIR(4)); +- mvprintw(LINES - 4, 0, "Entered Resizing :Use Arrow Keys to resize and press <ENTER> to end resizing"); +- refresh(); +- attroff(COLOR_PAIR(4)); +- break; +- case 'm': /* Move */ +- attron(COLOR_PAIR(4)); +- mvprintw(LINES - 4, 0, "Entered Moving: Use Arrow Keys to Move and press <ENTER> to end moving"); +- refresh(); +- attroff(COLOR_PAIR(4)); +- move = TRUE; +- break; +- case KEY_LEFT: +- if(size == TRUE) +- { --newx; +- ++neww; +- } +- if(move == TRUE) +- --newx; +- break; +- case KEY_RIGHT: +- if(size == TRUE) +- { ++newx; +- --neww; +- } +- if(move == TRUE) +- ++newx; +- break; +- case KEY_UP: +- if(size == TRUE) +- { --newy; +- ++newh; +- } +- if(move == TRUE) +- --newy; +- break; +- case KEY_DOWN: +- if(size == TRUE) +- { ++newy; +- --newh; +- } +- if(move == TRUE) +- ++newy; +- break; +- case 10: /* Enter */ +- move(LINES - 4, 0); +- clrtoeol(); +- refresh(); +- if(size == TRUE) +- { old_win = panel_window(stack_top); +- temp_win = newwin(newh, neww, newy, newx); +- replace_panel(stack_top, temp_win); +- win_show(temp_win, top->label, top->label_color); +- delwin(old_win); +- size = FALSE; +- } +- if(move == TRUE) +- { move_panel(stack_top, newy, newx); +- move = FALSE; +- } +- break; +- +- } +- attron(COLOR_PAIR(4)); +- mvprintw(LINES - 3, 0, "Use 'm' for moving, 'r' for resizing"); +- mvprintw(LINES - 2, 0, "Use tab to browse through the windows (F1 to Exit)"); +- attroff(COLOR_PAIR(4)); +- refresh(); +- update_panels(); +- doupdate(); +- } +- endwin(); +- return 0; ++ } ++ endwin(); ++ return 0; + } + + /* Put all the windows */ +-void init_wins(WINDOW **wins, int n) +-{ int x, y, i; +- char label[80]; +- +- y = 2; +- x = 10; +- for(i = 0; i < n; ++i) +- { wins[i] = newwin(NLINES, NCOLS, y, x); +- sprintf(label, "Window Number %d", i + 1); +- win_show(wins[i], label, i + 1); +- y += 3; +- x += 7; +- } ++void ++init_wins(WINDOW **wins, int n) ++{ ++ int x, y, i; ++ char label[80]; ++ ++ y = 2; ++ x = 10; ++ for (i = 0; i < n; ++i) { ++ wins[i] = newwin(NLINES, NCOLS, y, x); ++ sprintf(label, "Window Number %d", i + 1); ++ win_show(wins[i], label, i + 1); ++ y += 3; ++ x += 7; ++ } + } + + /* Set the PANEL_DATA structures for individual panels */ +-void set_user_ptrs(PANEL **panels, int n) +-{ PANEL_DATA *ptrs; +- WINDOW *win; +- int x, y, w, h, i; +- char temp[80]; +- +- ptrs = (PANEL_DATA *)calloc(n, sizeof(PANEL_DATA)); +- +- for(i = 0;i < n; ++i) +- { win = panel_window(panels[i]); +- getbegyx(win, y, x); +- getmaxyx(win, h, w); +- ptrs[i].x = x; +- ptrs[i].y = y; +- ptrs[i].w = w; +- ptrs[i].h = h; +- sprintf(temp, "Window Number %d", i + 1); +- strcpy(ptrs[i].label, temp); +- ptrs[i].label_color = i + 1; +- if(i + 1 == n) +- ptrs[i].next = panels[0]; +- else +- ptrs[i].next = panels[i + 1]; +- set_panel_userptr(panels[i], &ptrs[i]); +- } ++void ++set_user_ptrs(PANEL **panels, int n) ++{ ++ PANEL_DATA *ptrs; ++ WINDOW *win; ++ int x, y, w, h, i; ++ char temp[80]; ++ ++ ptrs = (PANEL_DATA *) calloc((size_t) n, sizeof(PANEL_DATA)); ++ ++ for (i = 0; i < n; ++i) { ++ win = panel_window(panels[i]); ++ getbegyx(win, y, x); ++ getmaxyx(win, h, w); ++ ptrs[i].x = x; ++ ptrs[i].y = y; ++ ptrs[i].w = w; ++ ptrs[i].h = h; ++ sprintf(temp, "Window Number %d", i + 1); ++ strcpy(ptrs[i].label, temp); ++ ptrs[i].label_color = i + 1; ++ if (i + 1 == n) ++ ptrs[i].next = panels[0]; ++ else ++ ptrs[i].next = panels[i + 1]; ++ set_panel_userptr(panels[i], &ptrs[i]); ++ } + } + + /* Show the window with a border and a label */ +-void win_show(WINDOW *win, char *label, int label_color) +-{ int startx, starty, height, width; ++void ++win_show(WINDOW *win, const char *label, int label_color) ++{ ++ int height, width; ++ ++ getmaxyx(win, height, width); ++ (void) height; + +- getbegyx(win, starty, startx); +- getmaxyx(win, height, width); ++ box(win, 0, 0); ++ mvwaddch(win, 2, 0, ACS_LTEE); ++ mvwhline(win, 2, 1, ACS_HLINE, width - 2); ++ mvwaddch(win, 2, width - 1, ACS_RTEE); + +- box(win, 0, 0); +- mvwaddch(win, 2, 0, ACS_LTEE); +- mvwhline(win, 2, 1, ACS_HLINE, width - 2); +- mvwaddch(win, 2, width - 1, ACS_RTEE); +- +- print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); ++ print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); + } + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- wattron(win, color); +- mvwprintw(win, y, x, "%s", string); +- wattroff(win, color); +- refresh(); ++void ++print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ wattron(win, color); ++ mvwprintw(win, y, x, "%s", string); ++ wattroff(win, color); ++ refresh(); + }</span></pre> + </div> + +@@ -3952,158 +4038,167 @@ + #include <panel.h> + + typedef struct _PANEL_DATA { +- int hide; /* TRUE if panel is hidden */ +-}PANEL_DATA; ++ int hide; /* TRUE if panel is hidden */ ++} PANEL_DATA; + + #define NLINES 10 + #define NCOLS 40 + + void init_wins(WINDOW **wins, int n); +-void win_show(WINDOW *win, char *label, int label_color); +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); +- +-int main() +-{ WINDOW *my_wins[3]; +- PANEL *my_panels[3]; +- PANEL_DATA panel_datas[3]; +- PANEL_DATA *temp; +- int ch; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize all the colors */ +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_GREEN, COLOR_BLACK); +- init_pair(3, COLOR_BLUE, COLOR_BLACK); +- init_pair(4, COLOR_CYAN, COLOR_BLACK); +- +- init_wins(my_wins, 3); +- +- /* Attach a panel to each window */ /* Order is bottom up */ +- my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ +- my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ +- my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ +- +- /* Initialize panel data saying that nothing is hidden */ +- panel_datas[0].hide = FALSE; +- panel_datas[1].hide = FALSE; +- panel_datas[2].hide = FALSE; +- +- set_panel_userptr(my_panels[0], &panel_datas[0]); +- set_panel_userptr(my_panels[1], &panel_datas[1]); +- set_panel_userptr(my_panels[2], &panel_datas[2]); ++void win_show(WINDOW *win, const char *label, int label_color); ++void print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color); + +- /* Update the stacking order. 2nd panel will be on top */ ++int ++main(void) ++{ ++ WINDOW *my_wins[3]; ++ PANEL *my_panels[3]; ++ PANEL_DATA panel_datas[3]; ++ PANEL_DATA *temp; ++ int ch; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize all the colors */ ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_GREEN, COLOR_BLACK); ++ init_pair(3, COLOR_BLUE, COLOR_BLACK); ++ init_pair(4, COLOR_CYAN, COLOR_BLACK); ++ ++ init_wins(my_wins, 3); ++ ++ /* Attach a panel to each window */ ++ /* Order is bottom up */ ++ my_panels[0] = new_panel(my_wins[0]); /* Push 0, order: stdscr-0 */ ++ my_panels[1] = new_panel(my_wins[1]); /* Push 1, order: stdscr-0-1 */ ++ my_panels[2] = new_panel(my_wins[2]); /* Push 2, order: stdscr-0-1-2 */ ++ ++ /* Initialize panel data saying that nothing is hidden */ ++ panel_datas[0].hide = FALSE; ++ panel_datas[1].hide = FALSE; ++ panel_datas[2].hide = FALSE; ++ ++ set_panel_userptr(my_panels[0], &panel_datas[0]); ++ set_panel_userptr(my_panels[1], &panel_datas[1]); ++ set_panel_userptr(my_panels[2], &panel_datas[2]); ++ ++ /* Update the stacking order. 2nd panel will be on top */ ++ update_panels(); ++ ++ /* Show it on the screen */ ++ attron(COLOR_PAIR(4)); ++ mvprintw(LINES - 3, 0, ++ "Show or Hide a window with 'a'(first window) 'b'(Second Window) 'c'(Third Window)"); ++ mvprintw(LINES - 2, 0, "F1 to Exit"); ++ ++ attroff(COLOR_PAIR(4)); ++ doupdate(); ++ ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case 'a': ++ temp = (PANEL_DATA *) panel_userptr(my_panels[0]); ++ if (temp->hide == FALSE) { ++ hide_panel(my_panels[0]); ++ temp->hide = TRUE; ++ } else { ++ show_panel(my_panels[0]); ++ temp->hide = FALSE; ++ } ++ break; ++ case 'b': ++ temp = (PANEL_DATA *) panel_userptr(my_panels[1]); ++ if (temp->hide == FALSE) { ++ hide_panel(my_panels[1]); ++ temp->hide = TRUE; ++ } else { ++ show_panel(my_panels[1]); ++ temp->hide = FALSE; ++ } ++ break; ++ case 'c': ++ temp = (PANEL_DATA *) panel_userptr(my_panels[2]); ++ if (temp->hide == FALSE) { ++ hide_panel(my_panels[2]); ++ temp->hide = TRUE; ++ } else { ++ show_panel(my_panels[2]); ++ temp->hide = FALSE; ++ } ++ break; ++ } + update_panels(); +- +- /* Show it on the screen */ +- attron(COLOR_PAIR(4)); +- mvprintw(LINES - 3, 0, "Show or Hide a window with 'a'(first window) 'b'(Second Window) 'c'(Third Window)"); +- mvprintw(LINES - 2, 0, "F1 to Exit"); +- +- attroff(COLOR_PAIR(4)); + doupdate(); +- +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case 'a': +- temp = (PANEL_DATA *)panel_userptr(my_panels[0]); +- if(temp->hide == FALSE) +- { hide_panel(my_panels[0]); +- temp->hide = TRUE; +- } +- else +- { show_panel(my_panels[0]); +- temp->hide = FALSE; +- } +- break; +- case 'b': +- temp = (PANEL_DATA *)panel_userptr(my_panels[1]); +- if(temp->hide == FALSE) +- { hide_panel(my_panels[1]); +- temp->hide = TRUE; +- } +- else +- { show_panel(my_panels[1]); +- temp->hide = FALSE; +- } +- break; +- case 'c': +- temp = (PANEL_DATA *)panel_userptr(my_panels[2]); +- if(temp->hide == FALSE) +- { hide_panel(my_panels[2]); +- temp->hide = TRUE; +- } +- else +- { show_panel(my_panels[2]); +- temp->hide = FALSE; +- } +- break; +- } +- update_panels(); +- doupdate(); +- } +- endwin(); +- return 0; ++ } ++ endwin(); ++ return 0; + } + + /* Put all the windows */ +-void init_wins(WINDOW **wins, int n) +-{ int x, y, i; +- char label[80]; +- +- y = 2; +- x = 10; +- for(i = 0; i < n; ++i) +- { wins[i] = newwin(NLINES, NCOLS, y, x); +- sprintf(label, "Window Number %d", i + 1); +- win_show(wins[i], label, i + 1); +- y += 3; +- x += 7; +- } ++void ++init_wins(WINDOW **wins, int n) ++{ ++ int x, y, i; ++ char label[80]; ++ ++ y = 2; ++ x = 10; ++ for (i = 0; i < n; ++i) { ++ wins[i] = newwin(NLINES, NCOLS, y, x); ++ sprintf(label, "Window Number %d", i + 1); ++ win_show(wins[i], label, i + 1); ++ y += 3; ++ x += 7; ++ } + } + + /* Show the window with a border and a label */ +-void win_show(WINDOW *win, char *label, int label_color) +-{ int startx, starty, height, width; ++void ++win_show(WINDOW *win, const char *label, int label_color) ++{ ++ int height, width; ++ ++ getmaxyx(win, height, width); ++ (void) height; + +- getbegyx(win, starty, startx); +- getmaxyx(win, height, width); ++ box(win, 0, 0); ++ mvwaddch(win, 2, 0, ACS_LTEE); ++ mvwhline(win, 2, 1, ACS_HLINE, width - 2); ++ mvwaddch(win, 2, width - 1, ACS_RTEE); + +- box(win, 0, 0); +- mvwaddch(win, 2, 0, ACS_LTEE); +- mvwhline(win, 2, 1, ACS_HLINE, width - 2); +- mvwaddch(win, 2, width - 1, ACS_RTEE); +- +- print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); ++ print_in_middle(win, 1, 0, width, label, COLOR_PAIR(label_color)); + } + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- wattron(win, color); +- mvwprintw(win, y, x, "%s", string); +- wattroff(win, color); +- refresh(); ++void ++print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ wattron(win, color); ++ mvwprintw(win, y, x, "%s", string); ++ wattroff(win, color); ++ refresh(); + }</span></pre> + </div> + </div> +@@ -4235,56 +4330,56 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Exit", +- }; +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- int n_choices, i; +- ITEM *cur_item; +- +- +- initscr(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); +- +- for(i = 0; i < n_choices; ++i) +- my_items[i] = new_item(choices[i], choices[i]); +- my_items[n_choices] = (ITEM *)NULL; +- +- my_menu = new_menu((ITEM **)my_items); +- mvprintw(LINES - 2, 0, "F1 to Exit"); +- post_menu(my_menu); +- refresh(); ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Exit", ++}; + +- while((c = getch()) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- } +- } ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ int n_choices, i; ++ ++ initscr(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) (n_choices + 1), sizeof(ITEM *)); ++ ++ for (i = 0; i < n_choices; ++i) ++ my_items[i] = new_item(choices[i], choices[i]); ++ my_items[n_choices] = (ITEM *) NULL; ++ ++ my_menu = new_menu((ITEM **) my_items); ++ mvprintw(LINES - 2, 0, "F1 to Exit"); ++ post_menu(my_menu); ++ refresh(); + +- free_item(my_items[0]); +- free_item(my_items[1]); +- free_menu(my_menu); +- endwin(); +-} +- </span></pre> ++ while ((c = getch()) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ } ++ } ++ ++ free_item(my_items[0]); ++ free_item(my_items[1]); ++ free_menu(my_menu); ++ endwin(); ++}</span></pre> + </div> + + <p>This program demonstrates the basic concepts involved in +@@ -4304,21 +4399,21 @@ + requests.</p> + + <pre class= +- "PROGRAMLISTING"> REQ_LEFT_ITEM Move left to an item. +- REQ_RIGHT_ITEM Move right to an item. +- REQ_UP_ITEM Move up to an item. +- REQ_DOWN_ITEM Move down to an item. +- REQ_SCR_ULINE Scroll up a line. +- REQ_SCR_DLINE Scroll down a line. +- REQ_SCR_DPAGE Scroll down a page. +- REQ_SCR_UPAGE Scroll up a page. ++ "PROGRAMLISTING"> REQ_LEFT_ITEM Move left to an item. ++ REQ_RIGHT_ITEM Move right to an item. ++ REQ_UP_ITEM Move up to an item. ++ REQ_DOWN_ITEM Move down to an item. ++ REQ_SCR_ULINE Scroll up a line. ++ REQ_SCR_DLINE Scroll down a line. ++ REQ_SCR_DPAGE Scroll down a page. ++ REQ_SCR_UPAGE Scroll up a page. + REQ_FIRST_ITEM Move to the first item. +- REQ_LAST_ITEM Move to the last item. +- REQ_NEXT_ITEM Move to the next item. +- REQ_PREV_ITEM Move to the previous item. +- REQ_TOGGLE_ITEM Select/deselect an item. +- REQ_CLEAR_PATTERN Clear the menu pattern buffer. +- REQ_BACK_PATTERN Delete the previous character from the pattern buffer. ++ REQ_LAST_ITEM Move to the last item. ++ REQ_NEXT_ITEM Move to the next item. ++ REQ_PREV_ITEM Move to the previous item. ++ REQ_TOGGLE_ITEM Select/deselect an item. ++ REQ_CLEAR_PATTERN Clear the menu pattern buffer. ++ REQ_BACK_PATTERN Delete the previous character from the pattern buffer. + REQ_NEXT_MATCH Move to the next item matching the pattern match. + REQ_PREV_MATCH Move to the previous item matching the pattern match. </pre> + <p>Don't get overwhelmed by the number of options. We will +@@ -4485,105 +4580,113 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Exit", +- (char *)NULL, +- }; +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- WINDOW *my_menu_win; +- int n_choices, i; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- init_pair(1, COLOR_RED, COLOR_BLACK); +- +- /* Create items */ +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices, sizeof(ITEM *)); +- for(i = 0; i < n_choices; ++i) +- my_items[i] = new_item(choices[i], choices[i]); +- +- /* Create menu */ +- my_menu = new_menu((ITEM **)my_items); +- +- /* Create the window to be associated with the menu */ +- my_menu_win = newwin(10, 40, 4, 4); +- keypad(my_menu_win, TRUE); +- +- /* Set main window and sub window */ +- set_menu_win(my_menu, my_menu_win); +- set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1)); +- +- /* Set menu mark to the string " * " */ +- set_menu_mark(my_menu, " * "); +- +- /* Print a border around the main window and print a title */ +- box(my_menu_win, 0, 0); +- print_in_middle(my_menu_win, 1, 0, 40, "My Menu", COLOR_PAIR(1)); +- mvwaddch(my_menu_win, 2, 0, ACS_LTEE); +- mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38); +- mvwaddch(my_menu_win, 2, 39, ACS_RTEE); +- mvprintw(LINES - 2, 0, "F1 to exit"); +- refresh(); +- +- /* Post the menu */ +- post_menu(my_menu); +- wrefresh(my_menu_win); ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Exit", ++ (char *) NULL, ++}; + +- while((c = wgetch(my_menu_win)) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- } +- wrefresh(my_menu_win); +- } ++void print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color); + +- /* Unpost and free all the memory taken up */ +- unpost_menu(my_menu); +- free_menu(my_menu); +- for(i = 0; i < n_choices; ++i) +- free_item(my_items[i]); +- endwin(); ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ WINDOW *my_menu_win; ++ int n_choices, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ ++ /* Create items */ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) n_choices, sizeof(ITEM *)); ++ for (i = 0; i < n_choices; ++i) ++ my_items[i] = new_item(choices[i], choices[i]); ++ ++ /* Create menu */ ++ my_menu = new_menu((ITEM **) my_items); ++ ++ /* Create the window to be associated with the menu */ ++ my_menu_win = newwin(10, 40, 4, 4); ++ keypad(my_menu_win, TRUE); ++ ++ /* Set main window and sub window */ ++ set_menu_win(my_menu, my_menu_win); ++ set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1)); ++ ++ /* Set menu mark to the string " * " */ ++ set_menu_mark(my_menu, " * "); ++ ++ /* Print a border around the main window and print a title */ ++ box(my_menu_win, 0, 0); ++ print_in_middle(my_menu_win, 1, 0, 40, "My Menu", COLOR_PAIR(1)); ++ mvwaddch(my_menu_win, 2, 0, ACS_LTEE); ++ mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38); ++ mvwaddch(my_menu_win, 2, 39, ACS_RTEE); ++ mvprintw(LINES - 2, 0, "F1 to exit"); ++ refresh(); ++ ++ /* Post the menu */ ++ post_menu(my_menu); ++ wrefresh(my_menu_win); ++ ++ while ((c = wgetch(my_menu_win)) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ } ++ wrefresh(my_menu_win); ++ } ++ ++ /* Unpost and free all the memory taken up */ ++ unpost_menu(my_menu); ++ free_menu(my_menu); ++ for (i = 0; i < n_choices; ++i) ++ free_item(my_items[i]); ++ endwin(); + } + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- wattron(win, color); +- mvwprintw(win, y, x, "%s", string); +- wattroff(win, color); +- refresh(); ++void ++print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ wattron(win, color); ++ mvwprintw(win, y, x, "%s", string); ++ wattroff(win, color); ++ refresh(); + }</span></pre> + </div> + +@@ -4624,123 +4727,132 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Choice 5", +- "Choice 6", +- "Choice 7", +- "Choice 8", +- "Choice 9", +- "Choice 10", +- "Exit", +- (char *)NULL, +- }; +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- WINDOW *my_menu_win; +- int n_choices, i; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_CYAN, COLOR_BLACK); +- +- /* Create items */ +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices, sizeof(ITEM *)); +- for(i = 0; i < n_choices; ++i) +- my_items[i] = new_item(choices[i], choices[i]); +- +- /* Create menu */ +- my_menu = new_menu((ITEM **)my_items); +- +- /* Create the window to be associated with the menu */ +- my_menu_win = newwin(10, 40, 4, 4); +- keypad(my_menu_win, TRUE); +- +- /* Set main window and sub window */ +- set_menu_win(my_menu, my_menu_win); +- set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1)); +- set_menu_format(my_menu, 5, 1); +- +- /* Set menu mark to the string " * " */ +- set_menu_mark(my_menu, " * "); +- +- /* Print a border around the main window and print a title */ +- box(my_menu_win, 0, 0); +- print_in_middle(my_menu_win, 1, 0, 40, "My Menu", COLOR_PAIR(1)); +- mvwaddch(my_menu_win, 2, 0, ACS_LTEE); +- mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38); +- mvwaddch(my_menu_win, 2, 39, ACS_RTEE); +- +- /* Post the menu */ +- post_menu(my_menu); +- wrefresh(my_menu_win); +- +- attron(COLOR_PAIR(2)); +- mvprintw(LINES - 2, 0, "Use PageUp and PageDown to scroll down or up a page of items"); +- mvprintw(LINES - 1, 0, "Arrow Keys to navigate (F1 to Exit)"); +- attroff(COLOR_PAIR(2)); +- refresh(); ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Choice 5", ++ "Choice 6", ++ "Choice 7", ++ "Choice 8", ++ "Choice 9", ++ "Choice 10", ++ "Exit", ++ (char *) NULL, ++}; + +- while((c = wgetch(my_menu_win)) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- case KEY_NPAGE: +- menu_driver(my_menu, REQ_SCR_DPAGE); +- break; +- case KEY_PPAGE: +- menu_driver(my_menu, REQ_SCR_UPAGE); +- break; +- } +- wrefresh(my_menu_win); +- } ++void print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color); + +- /* Unpost and free all the memory taken up */ +- unpost_menu(my_menu); +- free_menu(my_menu); +- for(i = 0; i < n_choices; ++i) +- free_item(my_items[i]); +- endwin(); ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ WINDOW *my_menu_win; ++ int n_choices, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_CYAN, COLOR_BLACK); ++ ++ /* Create items */ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) n_choices, sizeof(ITEM *)); ++ for (i = 0; i < n_choices; ++i) ++ my_items[i] = new_item(choices[i], choices[i]); ++ ++ /* Create menu */ ++ my_menu = new_menu((ITEM **) my_items); ++ ++ /* Create the window to be associated with the menu */ ++ my_menu_win = newwin(10, 40, 4, 4); ++ keypad(my_menu_win, TRUE); ++ ++ /* Set main window and sub window */ ++ set_menu_win(my_menu, my_menu_win); ++ set_menu_sub(my_menu, derwin(my_menu_win, 6, 38, 3, 1)); ++ set_menu_format(my_menu, 5, 1); ++ ++ /* Set menu mark to the string " * " */ ++ set_menu_mark(my_menu, " * "); ++ ++ /* Print a border around the main window and print a title */ ++ box(my_menu_win, 0, 0); ++ print_in_middle(my_menu_win, 1, 0, 40, "My Menu", COLOR_PAIR(1)); ++ mvwaddch(my_menu_win, 2, 0, ACS_LTEE); ++ mvwhline(my_menu_win, 2, 1, ACS_HLINE, 38); ++ mvwaddch(my_menu_win, 2, 39, ACS_RTEE); ++ ++ /* Post the menu */ ++ post_menu(my_menu); ++ wrefresh(my_menu_win); ++ ++ attron(COLOR_PAIR(2)); ++ mvprintw(LINES - 2, 0, ++ "Use PageUp and PageDown to scroll down or up a page of items"); ++ mvprintw(LINES - 1, 0, "Arrow Keys to navigate (F1 to Exit)"); ++ attroff(COLOR_PAIR(2)); ++ refresh(); ++ ++ while ((c = wgetch(my_menu_win)) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ case KEY_NPAGE: ++ menu_driver(my_menu, REQ_SCR_DPAGE); ++ break; ++ case KEY_PPAGE: ++ menu_driver(my_menu, REQ_SCR_UPAGE); ++ break; ++ } ++ wrefresh(my_menu_win); ++ } ++ ++ /* Unpost and free all the memory taken up */ ++ unpost_menu(my_menu); ++ free_menu(my_menu); ++ for (i = 0; i < n_choices; ++i) ++ free_item(my_items[i]); ++ endwin(); + } + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- wattron(win, color); +- mvwprintw(win, y, x, "%s", string); +- wattroff(win, color); +- refresh(); ++void ++print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ wattron(win, color); ++ mvwprintw(win, y, x, "%s", string); ++ wattroff(win, color); ++ refresh(); + }</span></pre> + </div> + +@@ -4785,96 +4897,99 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Choice 5", +- "Choice 6", "Choice 7", "Choice 8", "Choice 9", "Choice 10", +- "Choice 11", "Choice 12", "Choice 13", "Choice 14", "Choice 15", +- "Choice 16", "Choice 17", "Choice 18", "Choice 19", "Choice 20", +- "Exit", +- (char *)NULL, +- }; +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- WINDOW *my_menu_win; +- int n_choices, i; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_CYAN, COLOR_BLACK); +- +- /* Create items */ +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices, sizeof(ITEM *)); +- for(i = 0; i < n_choices; ++i) +- my_items[i] = new_item(choices[i], choices[i]); +- +- /* Create menu */ +- my_menu = new_menu((ITEM **)my_items); +- +- /* Set menu option not to show the description */ +- menu_opts_off(my_menu, O_SHOWDESC); +- +- /* Create the window to be associated with the menu */ +- my_menu_win = newwin(10, 70, 4, 4); +- keypad(my_menu_win, TRUE); +- +- /* Set main window and sub window */ +- set_menu_win(my_menu, my_menu_win); +- set_menu_sub(my_menu, derwin(my_menu_win, 6, 68, 3, 1)); +- set_menu_format(my_menu, 5, 3); +- set_menu_mark(my_menu, " * "); +- +- /* Print a border around the main window and print a title */ +- box(my_menu_win, 0, 0); +- +- attron(COLOR_PAIR(2)); +- mvprintw(LINES - 3, 0, "Use PageUp and PageDown to scroll"); +- mvprintw(LINES - 2, 0, "Use Arrow Keys to navigate (F1 to Exit)"); +- attroff(COLOR_PAIR(2)); +- refresh(); ++const char *choices[] = ++{ ++ "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Choice 5", ++ "Choice 6", "Choice 7", "Choice 8", "Choice 9", "Choice 10", ++ "Choice 11", "Choice 12", "Choice 13", "Choice 14", "Choice 15", ++ "Choice 16", "Choice 17", "Choice 18", "Choice 19", "Choice 20", ++ "Exit", ++ (char *) NULL, ++}; ++ ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ WINDOW *my_menu_win; ++ int n_choices, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_CYAN, COLOR_BLACK); ++ ++ /* Create items */ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) n_choices, sizeof(ITEM *)); ++ for (i = 0; i < n_choices; ++i) ++ my_items[i] = new_item(choices[i], choices[i]); ++ ++ /* Create menu */ ++ my_menu = new_menu((ITEM **) my_items); ++ ++ /* Set menu option not to show the description */ ++ menu_opts_off(my_menu, O_SHOWDESC); ++ ++ /* Create the window to be associated with the menu */ ++ my_menu_win = newwin(10, 70, 4, 4); ++ keypad(my_menu_win, TRUE); ++ ++ /* Set main window and sub window */ ++ set_menu_win(my_menu, my_menu_win); ++ set_menu_sub(my_menu, derwin(my_menu_win, 6, 68, 3, 1)); ++ set_menu_format(my_menu, 5, 3); ++ set_menu_mark(my_menu, " * "); ++ ++ /* Print a border around the main window and print a title */ ++ box(my_menu_win, 0, 0); ++ ++ attron(COLOR_PAIR(2)); ++ mvprintw(LINES - 3, 0, "Use PageUp and PageDown to scroll"); ++ mvprintw(LINES - 2, 0, "Use Arrow Keys to navigate (F1 to Exit)"); ++ attroff(COLOR_PAIR(2)); ++ refresh(); + +- /* Post the menu */ +- post_menu(my_menu); ++ /* Post the menu */ ++ post_menu(my_menu); ++ wrefresh(my_menu_win); ++ ++ while ((c = wgetch(my_menu_win)) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ case KEY_LEFT: ++ menu_driver(my_menu, REQ_LEFT_ITEM); ++ break; ++ case KEY_RIGHT: ++ menu_driver(my_menu, REQ_RIGHT_ITEM); ++ break; ++ case KEY_NPAGE: ++ menu_driver(my_menu, REQ_SCR_DPAGE); ++ break; ++ case KEY_PPAGE: ++ menu_driver(my_menu, REQ_SCR_UPAGE); ++ break; ++ } + wrefresh(my_menu_win); +- +- while((c = wgetch(my_menu_win)) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- case KEY_LEFT: +- menu_driver(my_menu, REQ_LEFT_ITEM); +- break; +- case KEY_RIGHT: +- menu_driver(my_menu, REQ_RIGHT_ITEM); +- break; +- case KEY_NPAGE: +- menu_driver(my_menu, REQ_SCR_DPAGE); +- break; +- case KEY_PPAGE: +- menu_driver(my_menu, REQ_SCR_UPAGE); +- break; +- } +- wrefresh(my_menu_win); +- } ++ } + +- /* Unpost and free all the memory taken up */ +- unpost_menu(my_menu); +- free_menu(my_menu); +- for(i = 0; i < n_choices; ++i) +- free_item(my_items[i]); +- endwin(); ++ /* Unpost and free all the memory taken up */ ++ unpost_menu(my_menu); ++ free_menu(my_menu); ++ for (i = 0; i < n_choices; ++i) ++ free_item(my_items[i]); ++ endwin(); + }</span></pre> + </div> + +@@ -4940,84 +5055,87 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Choice 5", +- "Choice 6", +- "Choice 7", +- "Exit", +- }; +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- int n_choices, i; +- ITEM *cur_item; +- +- /* Initialize curses */ +- initscr(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize items */ +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); +- for(i = 0; i < n_choices; ++i) +- my_items[i] = new_item(choices[i], choices[i]); +- my_items[n_choices] = (ITEM *)NULL; +- +- my_menu = new_menu((ITEM **)my_items); +- +- /* Make the menu multi valued */ +- menu_opts_off(my_menu, O_ONEVALUE); +- +- mvprintw(LINES - 3, 0, "Use <SPACE> to select or unselect an item."); +- mvprintw(LINES - 2, 0, "<ENTER> to see presently selected items(F1 to Exit)"); +- post_menu(my_menu); +- refresh(); ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Choice 5", ++ "Choice 6", ++ "Choice 7", ++ "Exit", ++}; + +- while((c = getch()) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- case ' ': +- menu_driver(my_menu, REQ_TOGGLE_ITEM); +- break; +- case 10: /* Enter */ +- { char temp[200]; +- ITEM **items; +- +- items = menu_items(my_menu); +- temp[0] = '\0'; +- for(i = 0; i < item_count(my_menu); ++i) +- if(item_value(items[i]) == TRUE) +- { strcat(temp, item_name(items[i])); +- strcat(temp, " "); +- } +- move(20, 0); +- clrtoeol(); +- mvprintw(20, 0, temp); +- refresh(); +- } +- break; +- } +- } ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ int n_choices, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize items */ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) (n_choices + 1), sizeof(ITEM *)); ++ for (i = 0; i < n_choices; ++i) ++ my_items[i] = new_item(choices[i], choices[i]); ++ my_items[n_choices] = (ITEM *) NULL; ++ ++ my_menu = new_menu((ITEM **) my_items); ++ ++ /* Make the menu multi valued */ ++ menu_opts_off(my_menu, O_ONEVALUE); ++ ++ mvprintw(LINES - 3, 0, "Use <SPACE> to select or unselect an item."); ++ mvprintw(LINES - 2, 0, ++ "<ENTER> to see presently selected items(F1 to Exit)"); ++ post_menu(my_menu); ++ refresh(); + +- free_item(my_items[0]); +- free_item(my_items[1]); +- free_menu(my_menu); +- endwin(); +-} +- </span></pre> ++ while ((c = getch()) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ case ' ': ++ menu_driver(my_menu, REQ_TOGGLE_ITEM); ++ break; ++ case 10: /* Enter */ ++ { ++ char temp[200]; ++ ITEM **items; ++ ++ items = menu_items(my_menu); ++ temp[0] = '\0'; ++ for (i = 0; i < item_count(my_menu); ++i) ++ if (item_value(items[i]) == TRUE) { ++ strcat(temp, item_name(items[i])); ++ strcat(temp, " "); ++ } ++ move(20, 0); ++ clrtoeol(); ++ mvaddstr(20, 0, temp); ++ refresh(); ++ } ++ break; ++ } ++ } ++ ++ free_item(my_items[0]); ++ free_item(my_items[1]); ++ free_menu(my_menu); ++ endwin(); ++}</span></pre> + </div> + + <p>Whew, A lot of new functions. Let's take them one after +@@ -5077,81 +5195,82 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Choice 5", +- "Choice 6", +- "Choice 7", +- "Exit", +- }; +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- int n_choices, i; +- ITEM *cur_item; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_GREEN, COLOR_BLACK); +- init_pair(3, COLOR_MAGENTA, COLOR_BLACK); +- +- /* Initialize items */ +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); +- for(i = 0; i < n_choices; ++i) +- my_items[i] = new_item(choices[i], choices[i]); +- my_items[n_choices] = (ITEM *)NULL; +- item_opts_off(my_items[3], O_SELECTABLE); +- item_opts_off(my_items[6], O_SELECTABLE); +- +- /* Create menu */ +- my_menu = new_menu((ITEM **)my_items); +- +- /* Set fore ground and back ground of the menu */ +- set_menu_fore(my_menu, COLOR_PAIR(1) | A_REVERSE); +- set_menu_back(my_menu, COLOR_PAIR(2)); +- set_menu_grey(my_menu, COLOR_PAIR(3)); +- +- /* Post the menu */ +- mvprintw(LINES - 3, 0, "Press <ENTER> to see the option selected"); +- mvprintw(LINES - 2, 0, "Up and Down arrow keys to navigate (F1 to Exit)"); +- post_menu(my_menu); +- refresh(); ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Choice 5", ++ "Choice 6", ++ "Choice 7", ++ "Exit", ++}; + +- while((c = getch()) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- case 10: /* Enter */ +- move(20, 0); +- clrtoeol(); +- mvprintw(20, 0, "Item selected is : %s", +- item_name(current_item(my_menu))); +- pos_menu_cursor(my_menu); +- break; +- } +- } +- unpost_menu(my_menu); +- for(i = 0; i < n_choices; ++i) +- free_item(my_items[i]); +- free_menu(my_menu); +- endwin(); +-} +- </span></pre> ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ int n_choices, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_GREEN, COLOR_BLACK); ++ init_pair(3, COLOR_MAGENTA, COLOR_BLACK); ++ ++ /* Initialize items */ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) (n_choices + 1), sizeof(ITEM *)); ++ for (i = 0; i < n_choices; ++i) ++ my_items[i] = new_item(choices[i], choices[i]); ++ my_items[n_choices] = (ITEM *) NULL; ++ item_opts_off(my_items[3], O_SELECTABLE); ++ item_opts_off(my_items[6], O_SELECTABLE); ++ ++ /* Create menu */ ++ my_menu = new_menu((ITEM **) my_items); ++ ++ /* Set fore ground and back ground of the menu */ ++ set_menu_fore(my_menu, COLOR_PAIR(1) | A_REVERSE); ++ set_menu_back(my_menu, COLOR_PAIR(2)); ++ set_menu_grey(my_menu, COLOR_PAIR(3)); ++ ++ /* Post the menu */ ++ mvprintw(LINES - 3, 0, "Press <ENTER> to see the option selected"); ++ mvprintw(LINES - 2, 0, "Up and Down arrow keys to navigate (F1 to Exit)"); ++ post_menu(my_menu); ++ refresh(); ++ ++ while ((c = getch()) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ case 10: /* Enter */ ++ move(20, 0); ++ clrtoeol(); ++ mvprintw(20, 0, "Item selected is : %s", ++ item_name(current_item(my_menu))); ++ pos_menu_cursor(my_menu); ++ break; ++ } ++ } ++ unpost_menu(my_menu); ++ for (i = 0; i < n_choices; ++i) ++ free_item(my_items[i]); ++ free_menu(my_menu); ++ endwin(); ++}</span></pre> + </div> + </div> + +@@ -5181,87 +5300,99 @@ + #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + #define CTRLD 4 + +-char *choices[] = { +- "Choice 1", +- "Choice 2", +- "Choice 3", +- "Choice 4", +- "Choice 5", +- "Choice 6", +- "Choice 7", +- "Exit", +- }; +-void func(char *name); +- +-int main() +-{ ITEM **my_items; +- int c; +- MENU *my_menu; +- int n_choices, i; +- ITEM *cur_item; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- init_pair(1, COLOR_RED, COLOR_BLACK); +- init_pair(2, COLOR_GREEN, COLOR_BLACK); +- init_pair(3, COLOR_MAGENTA, COLOR_BLACK); +- +- /* Initialize items */ +- n_choices = ARRAY_SIZE(choices); +- my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); +- for(i = 0; i < n_choices; ++i) +- { my_items[i] = new_item(choices[i], choices[i]); +- /* Set the user pointer */ +- set_item_userptr(my_items[i], func); +- } +- my_items[n_choices] = (ITEM *)NULL; ++const char *choices[] = ++{ ++ "Choice 1", ++ "Choice 2", ++ "Choice 3", ++ "Choice 4", ++ "Choice 5", ++ "Choice 6", ++ "Choice 7", ++ "Exit", ++}; ++ ++typedef union { ++ void (*my_func) (const char *); ++ void *data; ++} MY_DATA; + +- /* Create menu */ +- my_menu = new_menu((ITEM **)my_items); ++void func(const char *name); + +- /* Post the menu */ +- mvprintw(LINES - 3, 0, "Press <ENTER> to see the option selected"); +- mvprintw(LINES - 2, 0, "Up and Down arrow keys to navigate (F1 to Exit)"); +- post_menu(my_menu); +- refresh(); ++int ++main(void) ++{ ++ ITEM **my_items; ++ int c; ++ MENU *my_menu; ++ int n_choices, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ init_pair(2, COLOR_GREEN, COLOR_BLACK); ++ init_pair(3, COLOR_MAGENTA, COLOR_BLACK); ++ ++ /* Initialize items */ ++ n_choices = ARRAY_SIZE(choices); ++ my_items = (ITEM **) calloc((size_t) (n_choices + 1), sizeof(ITEM *)); ++ for (i = 0; i < n_choices; ++i) { ++ MY_DATA data = { func }; ++ my_items[i] = new_item(choices[i], choices[i]); ++ /* Set the user pointer */ ++ set_item_userptr(my_items[i], (void *) &data); ++ } ++ my_items[n_choices] = (ITEM *) NULL; + +- while((c = getch()) != KEY_F(1)) +- { switch(c) +- { case KEY_DOWN: +- menu_driver(my_menu, REQ_DOWN_ITEM); +- break; +- case KEY_UP: +- menu_driver(my_menu, REQ_UP_ITEM); +- break; +- case 10: /* Enter */ +- { ITEM *cur; +- void (*p)(char *); +- +- cur = current_item(my_menu); +- p = item_userptr(cur); +- p((char *)item_name(cur)); +- pos_menu_cursor(my_menu); +- break; +- } +- break; +- } +- } +- unpost_menu(my_menu); +- for(i = 0; i < n_choices; ++i) +- free_item(my_items[i]); +- free_menu(my_menu); +- endwin(); ++ /* Create menu */ ++ my_menu = new_menu((ITEM **) my_items); ++ ++ /* Post the menu */ ++ mvprintw(LINES - 3, 0, "Press <ENTER> to see the option selected"); ++ mvprintw(LINES - 2, 0, "Up and Down arrow keys to navigate (F1 to Exit)"); ++ post_menu(my_menu); ++ refresh(); ++ ++ while ((c = getch()) != KEY_F(1)) { ++ switch (c) { ++ case KEY_DOWN: ++ menu_driver(my_menu, REQ_DOWN_ITEM); ++ break; ++ case KEY_UP: ++ menu_driver(my_menu, REQ_UP_ITEM); ++ break; ++ case 10: /* Enter */ ++ { ++ ITEM *cur; ++ const MY_DATA *data; ++ ++ cur = current_item(my_menu); ++ data = item_userptr(cur); ++ data->my_func(item_name(cur)); ++ pos_menu_cursor(my_menu); ++ break; ++ } ++ break; ++ } ++ } ++ unpost_menu(my_menu); ++ for (i = 0; i < n_choices; ++i) ++ free_item(my_items[i]); ++ free_menu(my_menu); ++ endwin(); + } + +-void func(char *name) +-{ move(20, 0); +- clrtoeol(); +- mvprintw(20, 0, "Item selected is : %s", name); +-} </span></pre> ++void ++func(const char *name) ++{ ++ move(20, 0); ++ clrtoeol(); ++ mvprintw(20, 0, "Item selected is : %s", name); ++}</span></pre> + </div> + </div> + </div> +@@ -5384,69 +5515,71 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <form.h> + +-int main() +-{ FIELD *field[3]; +- FORM *my_form; +- int ch; +- +- /* Initialize curses */ +- initscr(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize the fields */ +- field[0] = new_field(1, 10, 4, 18, 0, 0); +- field[1] = new_field(1, 10, 6, 18, 0, 0); +- field[2] = NULL; +- +- /* Set field options */ +- set_field_back(field[0], A_UNDERLINE); /* Print a line for the option */ +- field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ ++int ++main(void) ++{ ++ FIELD *field[3]; ++ FORM *my_form; ++ int ch; ++ ++ /* Initialize curses */ ++ initscr(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize the fields */ ++ field[0] = new_field(1, 10, 4, 18, 0, 0); ++ field[1] = new_field(1, 10, 6, 18, 0, 0); ++ field[2] = NULL; ++ ++ /* Set field options */ ++ set_field_back(field[0], A_UNDERLINE); /* Print a line for the option */ ++ field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ + /* Field is filled up */ +- set_field_back(field[1], A_UNDERLINE); +- field_opts_off(field[1], O_AUTOSKIP); ++ set_field_back(field[1], A_UNDERLINE); ++ field_opts_off(field[1], O_AUTOSKIP); + +- /* Create the form and post it */ +- my_form = new_form(field); +- post_form(my_form); +- refresh(); +- +- mvprintw(4, 10, "Value 1:"); +- mvprintw(6, 10, "Value 2:"); +- refresh(); ++ /* Create the form and post it */ ++ my_form = new_form(field); ++ post_form(my_form); ++ refresh(); + +- /* Loop through to get user requests */ +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case KEY_DOWN: +- /* Go to next field */ +- form_driver(my_form, REQ_NEXT_FIELD); +- /* Go to the end of the present buffer */ +- /* Leaves nicely at the last character */ +- form_driver(my_form, REQ_END_LINE); +- break; +- case KEY_UP: +- /* Go to previous field */ +- form_driver(my_form, REQ_PREV_FIELD); +- form_driver(my_form, REQ_END_LINE); +- break; +- default: +- /* If this is a normal character, it gets */ +- /* Printed */ +- form_driver(my_form, ch); +- break; +- } ++ mvprintw(4, 10, "Value 1:"); ++ mvprintw(6, 10, "Value 2:"); ++ refresh(); ++ ++ /* Loop through to get user requests */ ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case KEY_DOWN: ++ /* Go to next field */ ++ form_driver(my_form, REQ_NEXT_FIELD); ++ /* Go to the end of the present buffer */ ++ /* Leaves nicely at the last character */ ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ case KEY_UP: ++ /* Go to previous field */ ++ form_driver(my_form, REQ_PREV_FIELD); ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ default: ++ /* If this is a normal character, it gets */ ++ /* Printed */ ++ form_driver(my_form, ch); ++ break; + } ++ } + +- /* Un post form and free the memory */ +- unpost_form(my_form); +- free_form(my_form); +- free_field(field[0]); +- free_field(field[1]); ++ /* Un post form and free the memory */ ++ unpost_form(my_form); ++ free_form(my_form); ++ free_field(field[0]); ++ free_field(field[1]); + +- endwin(); +- return 0; ++ endwin(); ++ return 0; + }</span></pre> + </div> + +@@ -5502,7 +5635,7 @@ + + <pre class= + "PROGRAMLISTING">int field_info( FIELD *field, /* field from which to fetch */ +- int *height, *int width, /* field size */ ++ int *height, *int width, /* field size */ + int *top, int *left, /* upper left corner */ + int *offscreen, /* number of offscreen rows */ + int *nbuf); /* number of working buffers */</pre> +@@ -5562,21 +5695,21 @@ + + <pre class= + "PROGRAMLISTING"> int set_field_fore(FIELD *field, /* field to alter */ +- chtype attr); /* attribute to set */ ++ chtype attr); /* attribute to set */ + + chtype field_fore(FIELD *field); /* field to query */ + /* returns foreground attribute */ + + int set_field_back(FIELD *field, /* field to alter */ +- chtype attr); /* attribute to set */ ++ chtype attr); /* attribute to set */ + + chtype field_back(FIELD *field); /* field to query */ + /* returns background attribute */ + + int set_field_pad(FIELD *field, /* field to alter */ +- int pad); /* pad character to set */ ++ int pad); /* pad character to set */ + +-chtype field_pad(FIELD *field); /* field to query */ ++chtype field_pad(FIELD *field); /* field to query */ + /* returns present pad character */ </pre> + <p>Though above functions seem quite simple, using colors + with set_field_fore() may be frustrating in the +@@ -5599,78 +5732,81 @@ + <pre class="PROGRAMLISTING"><span class= + "INLINEMEDIAOBJECT">#include <form.h> + +-int main() +-{ FIELD *field[3]; +- FORM *my_form; +- int ch; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize few color pairs */ +- init_pair(1, COLOR_WHITE, COLOR_BLUE); +- init_pair(2, COLOR_WHITE, COLOR_BLUE); +- +- /* Initialize the fields */ +- field[0] = new_field(1, 10, 4, 18, 0, 0); +- field[1] = new_field(1, 10, 6, 18, 0, 0); +- field[2] = NULL; +- +- /* Set field options */ +- set_field_fore(field[0], COLOR_PAIR(1));/* Put the field with blue background */ +- set_field_back(field[0], COLOR_PAIR(2));/* and white foreground (characters */ ++int ++main(void) ++{ ++ FIELD *field[3]; ++ FORM *my_form; ++ int ch; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize few color pairs */ ++ init_pair(1, COLOR_WHITE, COLOR_BLUE); ++ init_pair(2, COLOR_WHITE, COLOR_BLUE); ++ ++ /* Initialize the fields */ ++ field[0] = new_field(1, 10, 4, 18, 0, 0); ++ field[1] = new_field(1, 10, 6, 18, 0, 0); ++ field[2] = NULL; ++ ++ /* Set field options */ ++ set_field_fore(field[0], COLOR_PAIR(1)); /* Put the field with blue background */ ++ set_field_back(field[0], COLOR_PAIR(2)); /* and white foreground (characters */ + /* are printed in white */ +- field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ ++ field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ + /* Field is filled up */ +- set_field_back(field[1], A_UNDERLINE); +- field_opts_off(field[1], O_AUTOSKIP); ++ set_field_back(field[1], A_UNDERLINE); ++ field_opts_off(field[1], O_AUTOSKIP); + +- /* Create the form and post it */ +- my_form = new_form(field); +- post_form(my_form); +- refresh(); +- +- set_current_field(my_form, field[0]); /* Set focus to the colored field */ +- mvprintw(4, 10, "Value 1:"); +- mvprintw(6, 10, "Value 2:"); +- mvprintw(LINES - 2, 0, "Use UP, DOWN arrow keys to switch between fields"); +- refresh(); ++ /* Create the form and post it */ ++ my_form = new_form(field); ++ post_form(my_form); ++ refresh(); + +- /* Loop through to get user requests */ +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case KEY_DOWN: +- /* Go to next field */ +- form_driver(my_form, REQ_NEXT_FIELD); +- /* Go to the end of the present buffer */ +- /* Leaves nicely at the last character */ +- form_driver(my_form, REQ_END_LINE); +- break; +- case KEY_UP: +- /* Go to previous field */ +- form_driver(my_form, REQ_PREV_FIELD); +- form_driver(my_form, REQ_END_LINE); +- break; +- default: +- /* If this is a normal character, it gets */ +- /* Printed */ +- form_driver(my_form, ch); +- break; +- } ++ set_current_field(my_form, field[0]); /* Set focus to the colored field */ ++ mvprintw(4, 10, "Value 1:"); ++ mvprintw(6, 10, "Value 2:"); ++ mvprintw(LINES - 2, 0, ++ "Use UP, DOWN arrow keys to switch between fields"); ++ refresh(); ++ ++ /* Loop through to get user requests */ ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case KEY_DOWN: ++ /* Go to next field */ ++ form_driver(my_form, REQ_NEXT_FIELD); ++ /* Go to the end of the present buffer */ ++ /* Leaves nicely at the last character */ ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ case KEY_UP: ++ /* Go to previous field */ ++ form_driver(my_form, REQ_PREV_FIELD); ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ default: ++ /* If this is a normal character, it gets */ ++ /* Printed */ ++ form_driver(my_form, ch); ++ break; + } ++ } + +- /* Un post form and free the memory */ +- unpost_form(my_form); +- free_form(my_form); +- free_field(field[0]); +- free_field(field[1]); ++ /* Un post form and free the memory */ ++ unpost_form(my_form); ++ free_form(my_form); ++ free_field(field[0]); ++ free_field(field[1]); + +- endwin(); +- return 0; ++ endwin(); ++ return 0; + }</span></pre> + </div> + +@@ -5694,15 +5830,15 @@ + + <pre class= + "PROGRAMLISTING">int set_field_opts(FIELD *field, /* field to alter */ +- int attr); /* attribute to set */ ++ int attr); /* attribute to set */ + + int field_opts_on(FIELD *field, /* field to alter */ +- int attr); /* attributes to turn on */ ++ int attr); /* attributes to turn on */ + + int field_opts_off(FIELD *field, /* field to alter */ +- int attr); /* attributes to turn off */ ++ int attr); /* attributes to turn off */ + +-int field_opts(FIELD *field); /* field to query */ </pre> ++int field_opts(FIELD *field); /* field to query */</pre> + <p>The function set_field_opts() can be used to directly + set attributes of a field or you can choose to switch a + few attributes on and off with field_opts_on() and +@@ -5842,73 +5978,75 @@ + + #define N_FIELDS 3 + +-int main() +-{ FIELD *field[N_FIELDS]; +- FORM *my_form; +- int ch, i; +- +- /* Initialize curses */ +- initscr(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize the fields */ +- for(i = 0; i < N_FIELDS - 1; ++i) +- field[i] = new_field(1, WIDTH, STARTY + i * 2, STARTX, 0, 0); +- field[N_FIELDS - 1] = NULL; +- +- /* Set field options */ +- set_field_back(field[1], A_UNDERLINE); /* Print a line for the option */ +- +- field_opts_off(field[0], O_ACTIVE); /* This field is a static label */ +- field_opts_off(field[1], O_PUBLIC); /* This filed is like a password field*/ +- field_opts_off(field[1], O_AUTOSKIP); /* To avoid entering the same field */ +- /* after last character is entered */ +- +- /* Create the form and post it */ +- my_form = new_form(field); +- post_form(my_form); +- refresh(); +- +- set_field_just(field[0], JUSTIFY_CENTER); /* Center Justification */ +- set_field_buffer(field[0], 0, "This is a static Field"); +- /* Initialize the field */ +- mvprintw(STARTY, STARTX - 10, "Field 1:"); +- mvprintw(STARTY + 2, STARTX - 10, "Field 2:"); +- refresh(); ++int ++main(void) ++{ ++ FIELD *field[N_FIELDS]; ++ FORM *my_form; ++ int ch, i; ++ ++ /* Initialize curses */ ++ initscr(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize the fields */ ++ for (i = 0; i < N_FIELDS - 1; ++i) ++ field[i] = new_field(1, WIDTH, STARTY + i * 2, STARTX, 0, 0); ++ field[N_FIELDS - 1] = NULL; ++ ++ /* Set field options */ ++ set_field_back(field[1], A_UNDERLINE); /* Print a line for the option */ ++ ++ field_opts_off(field[0], O_ACTIVE); /* This field is a static label */ ++ field_opts_off(field[1], O_PUBLIC); /* This filed is like a password field */ ++ field_opts_off(field[1], O_AUTOSKIP); /* To avoid entering the same field */ ++ /* after last character is entered */ ++ ++ /* Create the form and post it */ ++ my_form = new_form(field); ++ post_form(my_form); ++ refresh(); + +- /* Loop through to get user requests */ +- while((ch = getch()) != KEY_F(1)) +- { switch(ch) +- { case KEY_DOWN: +- /* Go to next field */ +- form_driver(my_form, REQ_NEXT_FIELD); +- /* Go to the end of the present buffer */ +- /* Leaves nicely at the last character */ +- form_driver(my_form, REQ_END_LINE); +- break; +- case KEY_UP: +- /* Go to previous field */ +- form_driver(my_form, REQ_PREV_FIELD); +- form_driver(my_form, REQ_END_LINE); +- break; +- default: +- /* If this is a normal character, it gets */ +- /* Printed */ +- form_driver(my_form, ch); +- break; +- } ++ set_field_just(field[0], JUSTIFY_CENTER); /* Center Justification */ ++ set_field_buffer(field[0], 0, "This is a static Field"); ++ /* Initialize the field */ ++ mvprintw(STARTY, STARTX - 10, "Field 1:"); ++ mvprintw(STARTY + 2, STARTX - 10, "Field 2:"); ++ refresh(); ++ ++ /* Loop through to get user requests */ ++ while ((ch = getch()) != KEY_F(1)) { ++ switch (ch) { ++ case KEY_DOWN: ++ /* Go to next field */ ++ form_driver(my_form, REQ_NEXT_FIELD); ++ /* Go to the end of the present buffer */ ++ /* Leaves nicely at the last character */ ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ case KEY_UP: ++ /* Go to previous field */ ++ form_driver(my_form, REQ_PREV_FIELD); ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ default: ++ /* If this is a normal character, it gets */ ++ /* Printed */ ++ form_driver(my_form, ch); ++ break; + } ++ } + +- /* Un post form and free the memory */ +- unpost_form(my_form); +- free_form(my_form); +- free_field(field[0]); +- free_field(field[1]); ++ /* Un post form and free the memory */ ++ unpost_form(my_form); ++ free_form(my_form); ++ free_field(field[0]); ++ free_field(field[1]); + +- endwin(); +- return 0; ++ endwin(); ++ return 0; + }</span></pre> + </div> + +@@ -5961,7 +6099,7 @@ + pointer.</p> + + <pre class= +- "PROGRAMLISTING">int set_field_userptr(FIELD *field, ++ "PROGRAMLISTING">int set_field_userptr(FIELD *field, + char *userptr); /* the user pointer you wish to associate */ + /* with the field */ + +@@ -6132,115 +6270,122 @@ + "INLINEMEDIAOBJECT">#include <string.h> + #include <form.h> + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color); ++void print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color); + +-int main() ++int ++main(void) + { +- FIELD *field[3]; +- FORM *my_form; +- WINDOW *my_form_win; +- int ch, rows, cols; +- +- /* Initialize curses */ +- initscr(); +- start_color(); +- cbreak(); +- noecho(); +- keypad(stdscr, TRUE); +- +- /* Initialize few color pairs */ +- init_pair(1, COLOR_RED, COLOR_BLACK); +- +- /* Initialize the fields */ +- field[0] = new_field(1, 10, 6, 1, 0, 0); +- field[1] = new_field(1, 10, 8, 1, 0, 0); +- field[2] = NULL; +- +- /* Set field options */ +- set_field_back(field[0], A_UNDERLINE); +- field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */ +- /* Field is filled up */ +- set_field_back(field[1], A_UNDERLINE); +- field_opts_off(field[1], O_AUTOSKIP); +- +- /* Create the form and post it */ +- my_form = new_form(field); +- +- /* Calculate the area required for the form */ +- scale_form(my_form, &rows, &cols); +- +- /* Create the window to be associated with the form */ +- my_form_win = newwin(rows + 4, cols + 4, 4, 4); +- keypad(my_form_win, TRUE); +- +- /* Set main window and sub window */ +- set_form_win(my_form, my_form_win); +- set_form_sub(my_form, derwin(my_form_win, rows, cols, 2, 2)); +- +- /* Print a border around the main window and print a title */ +- box(my_form_win, 0, 0); +- print_in_middle(my_form_win, 1, 0, cols + 4, "My Form", COLOR_PAIR(1)); +- +- post_form(my_form); +- wrefresh(my_form_win); ++ FIELD *field[3]; ++ FORM *my_form; ++ WINDOW *my_form_win; ++ int ch, rows, cols; ++ ++ /* Initialize curses */ ++ initscr(); ++ start_color(); ++ cbreak(); ++ noecho(); ++ keypad(stdscr, TRUE); ++ ++ /* Initialize few color pairs */ ++ init_pair(1, COLOR_RED, COLOR_BLACK); ++ ++ /* Initialize the fields */ ++ field[0] = new_field(1, 10, 6, 1, 0, 0); ++ field[1] = new_field(1, 10, 8, 1, 0, 0); ++ field[2] = NULL; ++ ++ /* Set field options */ ++ set_field_back(field[0], A_UNDERLINE); ++ field_opts_off(field[0], O_AUTOSKIP); ++ /* Don't go to next field when this */ ++ /* Field is filled up */ ++ set_field_back(field[1], A_UNDERLINE); ++ field_opts_off(field[1], O_AUTOSKIP); ++ ++ /* Create the form and post it */ ++ my_form = new_form(field); ++ ++ /* Calculate the area required for the form */ ++ scale_form(my_form, &rows, &cols); ++ ++ /* Create the window to be associated with the form */ ++ my_form_win = newwin(rows + 4, cols + 4, 4, 4); ++ keypad(my_form_win, TRUE); ++ ++ /* Set main window and sub window */ ++ set_form_win(my_form, my_form_win); ++ set_form_sub(my_form, derwin(my_form_win, rows, cols, 2, 2)); ++ ++ /* Print a border around the main window and print a title */ ++ box(my_form_win, 0, 0); ++ print_in_middle(my_form_win, 1, 0, cols + 4, "My Form", COLOR_PAIR(1)); + +- mvprintw(LINES - 2, 0, "Use UP, DOWN arrow keys to switch between fields"); +- refresh(); ++ post_form(my_form); ++ wrefresh(my_form_win); + +- /* Loop through to get user requests */ +- while((ch = wgetch(my_form_win)) != KEY_F(1)) +- { switch(ch) +- { case KEY_DOWN: +- /* Go to next field */ +- form_driver(my_form, REQ_NEXT_FIELD); +- /* Go to the end of the present buffer */ +- /* Leaves nicely at the last character */ +- form_driver(my_form, REQ_END_LINE); +- break; +- case KEY_UP: +- /* Go to previous field */ +- form_driver(my_form, REQ_PREV_FIELD); +- form_driver(my_form, REQ_END_LINE); +- break; +- default: +- /* If this is a normal character, it gets */ +- /* Printed */ +- form_driver(my_form, ch); +- break; +- } ++ mvprintw(LINES - 2, 0, ++ "Use UP, DOWN arrow keys to switch between fields"); ++ refresh(); ++ ++ /* Loop through to get user requests */ ++ while ((ch = wgetch(my_form_win)) != KEY_F(1)) { ++ switch (ch) { ++ case KEY_DOWN: ++ /* Go to next field */ ++ form_driver(my_form, REQ_NEXT_FIELD); ++ /* Go to the end of the present buffer */ ++ /* Leaves nicely at the last character */ ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ case KEY_UP: ++ /* Go to previous field */ ++ form_driver(my_form, REQ_PREV_FIELD); ++ form_driver(my_form, REQ_END_LINE); ++ break; ++ default: ++ /* If this is a normal character, it gets */ ++ /* Printed */ ++ form_driver(my_form, ch); ++ break; + } ++ } + +- /* Un post form and free the memory */ +- unpost_form(my_form); +- free_form(my_form); +- free_field(field[0]); +- free_field(field[1]); ++ /* Un post form and free the memory */ ++ unpost_form(my_form); ++ free_form(my_form); ++ free_field(field[0]); ++ free_field(field[1]); + +- endwin(); +- return 0; ++ endwin(); ++ return 0; + } + +-void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color) +-{ int length, x, y; +- float temp; +- +- if(win == NULL) +- win = stdscr; +- getyx(win, y, x); +- if(startx != 0) +- x = startx; +- if(starty != 0) +- y = starty; +- if(width == 0) +- width = 80; +- +- length = strlen(string); +- temp = (width - length)/ 2; +- x = startx + (int)temp; +- wattron(win, color); +- mvwprintw(win, y, x, "%s", string); +- wattroff(win, color); +- refresh(); ++void ++print_in_middle(WINDOW *win, int starty, int startx, ++ int width, const char *string, chtype color) ++{ ++ int length, x, y; ++ float temp; ++ ++ if (win == NULL) ++ win = stdscr; ++ getyx(win, y, x); ++ if (startx != 0) ++ x = startx; ++ if (starty != 0) ++ y = starty; ++ if (width == 0) ++ width = 80; ++ ++ length = (int) strlen(string); ++ temp = (float) (width - length) / 2; ++ x = startx + (int) temp; ++ wattron(win, color); ++ mvwprintw(win, y, x, "%s", string); ++ wattroff(win, color); ++ refresh(); + }</span></pre> + </div> + </div> +@@ -6290,8 +6435,8 @@ + can also specify custom validation, though it is a bit + tricky and cumbersome.</p> + +- <h1 class="BRIDGEHEAD"><a name="AEN1074" id= +- "AEN1074"></a>TYPE_ALPHA</h1> ++ <h1 class="BRIDGEHEAD"><a name="AEN1095" id= ++ "AEN1095"></a>TYPE_ALPHA</h1> + + <p>This field type accepts alphabetic data; no blanks, no + digits, no special characters (this is checked at +@@ -6308,8 +6453,8 @@ + width, the validation check will always fail. A minimum + width of zero makes field completion optional.</p> + +- <h1 class="BRIDGEHEAD"><a name="AEN1078" id= +- "AEN1078"></a>TYPE_ALNUM</h1> ++ <h1 class="BRIDGEHEAD"><a name="AEN1099" id= ++ "AEN1099"></a>TYPE_ALNUM</h1> + + <p>This field type accepts alphabetic data and digits; no + blanks, no special characters (this is checked at +@@ -6325,8 +6470,8 @@ + validation check will always fail. A minimum width of zero + makes field completion optional.</p> + +- <h1 class="BRIDGEHEAD"><a name="AEN1082" id= +- "AEN1082"></a>TYPE_ENUM</h1> ++ <h1 class="BRIDGEHEAD"><a name="AEN1103" id= ++ "AEN1103"></a>TYPE_ENUM</h1> + + <p>This type allows you to restrict a field's values to be + among a specified set of string values (for example, the +@@ -6358,8 +6503,8 @@ + <p>The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests + can be particularly useful with these fields.</p> + +- <h1 class="BRIDGEHEAD"><a name="AEN1089" id= +- "AEN1089"></a>TYPE_INTEGER</h1> ++ <h1 class="BRIDGEHEAD"><a name="AEN1110" id= ++ "AEN1110"></a>TYPE_INTEGER</h1> + + <p>This field type accepts an integer. It is set up as + follows:</p> +@@ -6381,8 +6526,8 @@ + <p>A TYPE_INTEGER value buffer can conveniently be + interpreted with the C library function atoi(3).</p> + +- <h1 class="BRIDGEHEAD"><a name="AEN1095" id= +- "AEN1095"></a>TYPE_NUMERIC</h1> ++ <h1 class="BRIDGEHEAD"><a name="AEN1116" id= ++ "AEN1116"></a>TYPE_NUMERIC</h1> + + <p>This field type accepts a decimal number. It is set up + as follows:</p> +@@ -6404,8 +6549,8 @@ + <p>A TYPE_NUMERIC value buffer can conveniently be + interpreted with the C library function atof(3).</p> + +- <h1 class="BRIDGEHEAD"><a name="AEN1101" id= +- "AEN1101"></a>TYPE_REGEXP</h1> ++ <h1 class="BRIDGEHEAD"><a name="AEN1122" id= ++ "AEN1122"></a>TYPE_REGEXP</h1> + + <p>This field type accepts data matching a regular + expression. It is set up as follows:</p> +@@ -7034,7 +7179,7 @@ + Alphalist Allows a user to select from a list of words, with + the ability to narrow the search list by typing in a + few characters of the desired word. +-Buttonbox This creates a multiple button widget. ++Buttonbox This creates a multiple button widget. + Calendar Creates a little simple calendar widget. + Dialog Prompts the user with a message, and the user + can pick an answer from the buttons provided. +@@ -7057,17 +7202,17 @@ + field) + Radio List Creates a radio button list. + Scale Creates a numeric scale. Used for allowing a user to +- pick a numeric value and restrict them to a range of ++ pick a numeric value and restrict them to a range of + values. + Scrolling List Creates a scrolling list/menu list. +-Scrolling Window Creates a scrolling log file viewer. Can add +- information into the window while its running. ++Scrolling Window Creates a scrolling log file viewer. Can add ++ information into the window while its running. + A good widget for displaying the progress of + something. (akin to a console window) + Selection List Creates a multiple option selection list. + Slider Akin to the scale widget, this widget provides a + visual slide bar to represent the numeric value. +-Template Creates a entry field with character sensitive ++Template Creates a entry field with character sensitive + positions. Used for pre-formatted fields like + dates and phone numbers. + Viewer This is a file/information viewer. Very useful +Index: doc/html/man/captoinfo.1m.html +--- ncurses-6.5-20240831+/doc/html/man/captoinfo.1m.html 2024-04-27 18:38:45.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/captoinfo.1m.html 2024-09-14 20:23:25.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: captoinfo.1m,v 1.63 2024/03/23 20:37:25 tom Exp @ ++ * @Id: captoinfo.1m,v 1.65 2024/09/14 00:39:51 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>captoinfo 1m 2024-03-23 ncurses 6.5 User commands</TITLE> ++<TITLE>captoinfo 1m 2024-09-13 ncurses 6.5 User commands</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">captoinfo 1m 2024-03-23 ncurses 6.5 User commands</H1> ++<H1 class="no-header">captoinfo 1m 2024-09-13 ncurses 6.5 User commands</H1> + <PRE> + <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG> User commands <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG> + +@@ -77,12 +77,11 @@ + + </PRE><H3><a name="h3-Translations-from-Nonstandard-Capabilities">Translations from Nonstandard Capabilities</a></H3><PRE> + <STRONG>captoinfo</STRONG> translates some obsolete, nonstandard capabilities into +- standard (SVr4/XSI Curses) <EM>terminfo</EM> capabilities. It issues a +- diagnostic to the standard error stream for each, inviting the user to +- check that it has not mistakenly translated an unknown or mistyped +- capability name. ++ standard <EM>terminfo</EM> capabilities. It issues a diagnostic to the standard ++ error stream for each, inviting the user to check that it has not ++ mistakenly translated an unknown or mistyped capability name. + +- <STRONG>Name</STRONG> ++ <STRONG><EM>termcap</EM></STRONG> <STRONG>Code</STRONG> + <STRONG>Obsolete</STRONG> <STRONG>Standard</STRONG> <STRONG>Origin</STRONG> <STRONG><EM>terminfo</EM></STRONG> <STRONG>capability</STRONG> + --------------------------------------------------------- + <STRONG>BO</STRONG> <STRONG>mr</STRONG> AT&T <STRONG>enter_reverse_mode</STRONG> +@@ -111,14 +110,14 @@ + <STRONG>KE</STRONG> <STRONG>F4</STRONG> Tektronix <STRONG>key_f14</STRONG> + <STRONG>KF</STRONG> <STRONG>F5</STRONG> Tektronix <STRONG>key_f15</STRONG> + <STRONG>BC</STRONG> <STRONG>Sb</STRONG> Tektronix <STRONG>set_background</STRONG> +- + <STRONG>FC</STRONG> <STRONG>Sf</STRONG> Tektronix <STRONG>set_foreground</STRONG> ++ + <STRONG>HS</STRONG> <STRONG>mh</STRONG> IRIX <STRONG>enter_dim_mode</STRONG> + + XENIX <EM>termcap</EM> had a set of extension capabilities, corresponding to box + drawing characters of CCSID ("code page") 437, as follows. + +- <STRONG><EM>termcap</EM></STRONG> <STRONG>Name</STRONG> <STRONG>Graphic</STRONG> ++ <STRONG><EM>termcap</EM></STRONG> <STRONG>Code</STRONG> <STRONG>Graphic</STRONG> + ----------------------------------------- + <STRONG>G2</STRONG> upper left corner + <STRONG>G3</STRONG> lower left corner +@@ -144,27 +143,27 @@ + <STRONG>Gc</STRONG> double intersection + <STRONG>GG</STRONG> ACS magic cookie count + +- <STRONG>captoinfo</STRONG> composes single-line capabilities into an <STRONG>acsc</STRONG> string, and ++ <STRONG>captoinfo</STRONG> composes single-line capabilities into an <STRONG>acsc</STRONG> string, and + discards <STRONG>GG</STRONG> and double-line capabilities with a warning diagnostic. + +- IBM's AIX has a <EM>terminfo</EM> facility descended from SVr1 <EM>terminfo</EM>, but +- which is incompatible with the SVr4 format. <STRONG>captoinfo</STRONG> translates the ++ IBM's AIX has a <EM>terminfo</EM> facility descended from SVr1 <EM>terminfo</EM>, but ++ which is incompatible with the SVr4 format. <STRONG>captoinfo</STRONG> translates the + following AIX extensions. + +- <STRONG>IBM</STRONG> <STRONG>XSI</STRONG> +- ------------- +- ksel kslt +- kbtab kcbt +- font0 s0ds +- font1 s1ds +- font2 s2ds +- font3 s3ds ++ <STRONG>IBM</STRONG> <STRONG>X/Open</STRONG> ++ --------------- ++ ksel kslt ++ kbtab kcbt ++ font0 s0ds ++ font1 s1ds ++ font2 s2ds ++ font3 s3ds + +- Additionally, this program translates the AIX <STRONG>box1</STRONG> capability to an ++ Additionally, this program translates the AIX <STRONG>box1</STRONG> capability to an + <STRONG>acsc</STRONG> string. + +- The HP-UX <EM>terminfo</EM> library supports two nonstandard <EM>terminfo</EM> +- capabilities, <STRONG>meml</STRONG> (memory lock) and <STRONG>memu</STRONG> (memory unlock). <STRONG>captoinfo</STRONG> ++ The HP-UX <EM>terminfo</EM> library supports two nonstandard <EM>terminfo</EM> ++ capabilities, <STRONG>meml</STRONG> (memory lock) and <STRONG>memu</STRONG> (memory unlock). <STRONG>captoinfo</STRONG> + discards these with a warning message. + + +@@ -174,11 +173,11 @@ + + + </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE> +- X/Open Curses, Issue 7 (2009) describes <STRONG>tic</STRONG> briefly, but omits this ++ X/Open Curses, Issue 7 (2009) describes <STRONG>tic</STRONG> briefly, but omits this + program. + + SVr4 systems provide <STRONG>captoinfo</STRONG> as a separate application from <STRONG>tic</STRONG>. Its +- <STRONG>-v</STRONG> option does not accept a trace level argument <EM>n</EM>; repeat <STRONG>-v</STRONG> <EM>n</EM> times ++ <STRONG>-v</STRONG> option does not accept a trace level argument <EM>n</EM>; repeat <STRONG>-v</STRONG> <EM>n</EM> times + instead. + + NetBSD does not provide this application. +@@ -194,7 +193,7 @@ + + + +-ncurses 6.5 2024-03-23 <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG> ++ncurses 6.5 2024-09-13 <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_bkgd.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_bkgd.3x.html 2024-04-27 18:38:46.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_bkgd.3x.html 2024-09-14 20:23:25.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_bkgd.3x,v 1.61 2024/04/20 18:54:36 tom Exp @ ++ * @Id: curs_bkgd.3x,v 1.63 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_bkgd 3x 2024-04-20 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_bkgd 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_bkgd 3x 2024-04-20 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_bkgd 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> + +@@ -64,7 +64,7 @@ + + + </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> +- The <EM>background</EM> of a <EM>curses</EM> window (in the library's non-"wide" ++ The <EM>background</EM> of a <EM>curses</EM> window (in the library's non-wide + configuration) is a <EM>chtype</EM> combining a set of attributes (see + <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>) with a character called the <EM>blank</EM> <EM>character.</EM> + +@@ -177,19 +177,19 @@ + Neither X/Open Curses nor the SVr4 manual pages detail how the + rendition of characters on the screen updates when <STRONG>bkgd</STRONG> or <STRONG>wbkgd</STRONG> + changes the background character. <EM>ncurses</EM>, like SVr4 <EM>curses</EM>, does not +- (in its non-"wide" configuration) store the background and window ++ (in its non-wide configuration) store the background and window + attribute contributions to each character cell separately. + + + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> +- <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG> describes the corresponding functions in the "wide" ++ <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG> describes the corresponding functions in the wide + configuration of <EM>ncurses</EM>. + + <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG> + + + +-ncurses 6.5 2024-04-20 <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_bkgrnd.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_bkgrnd.3x.html 2024-04-27 18:38:46.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_bkgrnd.3x.html 2024-09-14 20:23:25.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_bkgrnd.3x,v 1.42 2024/04/20 18:54:36 tom Exp @ ++ * @Id: curs_bkgrnd.3x,v 1.44 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_bkgrnd 3x 2024-04-20 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_bkgrnd 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_bkgrnd 3x 2024-04-20 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_bkgrnd 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG> + +@@ -65,15 +65,15 @@ + + + </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> +- The <EM>background</EM> of a <EM>curses</EM> window (in the library's "wide" +- configuration) is a <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> combining a set of attributes (see +- <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>) with a complex character called the <EM>blank</EM> <EM>character.</EM> +- +- The blank character is a spacing character that populates a window's +- character cells when their contents are erased without replacement. +- The background's attributes are combined with all non-blank characters +- written to the window, as with the <STRONG><A HREF="curs_add_wch.3x.html">wadd_wch(3x)</A></STRONG> and <STRONG><A HREF="curs_ins_wch.3x.html">wins_wch(3x)</A></STRONG> +- families of functions. ++ The <EM>background</EM> of a <EM>curses</EM> window (in the library's wide configuration) ++ is a <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> combining a set of attributes (see <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>) with the ++ window's blank character. ++ ++ The <EM>blank</EM> <EM>character</EM> is a spacing complex character that populates a ++ window's character cells when their contents are erased without ++ replacement. The background's attributes are combined with all non- ++ blank characters written to the window, as with the <STRONG><A HREF="curs_add_wch.3x.html">wadd_wch(3x)</A></STRONG> and ++ <STRONG><A HREF="curs_ins_wch.3x.html">wins_wch(3x)</A></STRONG> families of functions. + + The blank character and attributes of the background combine with + characters written to the window as described below. The background +@@ -156,7 +156,7 @@ + </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE> + <STRONG>bkgrnd</STRONG>, <STRONG>bkgrndset</STRONG>, and <STRONG>getbkgrnd</STRONG> may be implemented as macros. + +- Unlike their counterparts in the non-"wide" configuration of <EM>ncurses</EM>, ++ Unlike their counterparts in the non-wide configuration of <EM>ncurses</EM>, + <STRONG>getbkgrnd</STRONG> and <STRONG>wgetbkgrnd</STRONG> supply the background character and attribute + in a modifiable <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> parameter, not as the return value. + +@@ -170,14 +170,14 @@ + + + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> +- <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> describes the corresponding functions in the non-"wide" ++ <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> describes the corresponding functions in the non-wide + configuration of <EM>ncurses</EM>. + + <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>, <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG> + + + +-ncurses 6.5 2024-04-20 <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_bkgrnd.3x.html">curs_bkgrnd(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_extend.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_extend.3x.html 2024-07-27 23:23:56.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_extend.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -28,19 +28,19 @@ + * authorization. * + **************************************************************************** + * Author: Thomas E. Dickey 1999-on +- * @Id: curs_extend.3x,v 1.49 2024/07/27 23:21:36 tom Exp @ ++ * @Id: curs_extend.3x,v 1.51 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_extend 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_extend 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_extend 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_extend 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG> + +@@ -110,13 +110,13 @@ + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> + <EM>ncurses</EM> offers several other extensions to the X/Open Curses API. + +- <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>, <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>, <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>, <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>, +- <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>, <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>, <STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG>, <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>, +- <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>, <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG> ++ <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>, <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>, <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>, ++ <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>, <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>, <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>, <STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG>, ++ <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>, <STRONG><A HREF="new_pair.3x.html">new_pair(3x)</A></STRONG>, <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>, <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG> + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_extend.3x.html">curs_extend(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_get_wch.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_get_wch.3x.html 2024-07-20 22:19:03.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_get_wch.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_get_wch.3x,v 1.45 2024/07/20 21:43:33 tom Exp @ ++ * @Id: curs_get_wch.3x,v 1.47 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_get_wch 3x 2024-07-20 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_get_wch 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_get_wch 3x 2024-07-20 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_get_wch 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG> + +@@ -48,16 +48,16 @@ + + </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE> + <STRONG>get_wch</STRONG>, <STRONG>wget_wch</STRONG>, <STRONG>mvget_wch</STRONG>, <STRONG>mvwget_wch</STRONG>, <STRONG>unget_wch</STRONG> - get (or push +- back) a wide character from <EM>curses</EM> terminal keyboard ++ back) a wide character from <EM>curses</EM> terminal keyboard buffer + + + </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE> + <STRONG>#include</STRONG> <STRONG><curses.h></STRONG> + +- <STRONG>int</STRONG> <STRONG>get_wch(wint_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>wget_wch(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>wint_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>mvget_wch(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wint_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>mvwget_wch(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wint_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>get_wch(wint_t</STRONG> <STRONG>*</STRONG> <EM>wch</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>wget_wch(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>wint_t</STRONG> <STRONG>*</STRONG> <EM>wch</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>mvget_wch(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wint_t</STRONG> <STRONG>*</STRONG> <EM>wch</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>mvwget_wch(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>wint_t</STRONG> <STRONG>*</STRONG> <EM>wch</EM><STRONG>);</STRONG> + + <STRONG>int</STRONG> <STRONG>unget_wch(const</STRONG> <STRONG>wchar_t</STRONG> <EM>wc</EM><STRONG>);</STRONG> + +@@ -172,7 +172,7 @@ + + + +-ncurses 6.5 2024-07-20 <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_getch.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_getch.3x.html 2024-07-20 22:19:03.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_getch.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_getch.3x,v 1.99 2024/07/20 21:43:33 tom Exp @ ++ * @Id: curs_getch.3x,v 1.101 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_getch 3x 2024-07-20 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_getch 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_getch 3x 2024-07-20 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_getch 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> + +@@ -49,16 +49,16 @@ + + </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE> + <STRONG>getch</STRONG>, <STRONG>wgetch</STRONG>, <STRONG>mvgetch</STRONG>, <STRONG>mvwgetch</STRONG>, <STRONG>ungetch</STRONG>, <STRONG>has_key</STRONG> - get (or push back) +- characters from <EM>curses</EM> terminal keyboard ++ characters from <EM>curses</EM> terminal keyboard buffer + + + </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE> + <STRONG>#include</STRONG> <STRONG><curses.h></STRONG> + + <STRONG>int</STRONG> <STRONG>getch(void);</STRONG> +- <STRONG>int</STRONG> <STRONG>wgetch(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>wgetch(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>);</STRONG> + <STRONG>int</STRONG> <STRONG>mvgetch(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>mvwgetch(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>mvwgetch(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG> + + <STRONG>int</STRONG> <STRONG>ungetch(int</STRONG> <EM>c</EM><STRONG>);</STRONG> + +@@ -367,16 +367,17 @@ + fewer. A <EM>curses</EM> application can expect such a keyboard to transmit key + codes <STRONG>KEY_UP</STRONG>, <STRONG>KEY_DOWN</STRONG>, <STRONG>KEY_LEFT</STRONG>, <STRONG>KEY_RIGHT</STRONG>, <STRONG>KEY_HOME</STRONG>, <STRONG>KEY_END</STRONG>, + <STRONG>KEY_PPAGE</STRONG> (Page Up), <STRONG>KEY_NPAGE</STRONG> (Page Down), <STRONG>KEY_IC</STRONG> (Insert), <STRONG>KEY_DC</STRONG> +- (Delete), and <STRONG>KEY_F(</STRONG><EM>n</EM><STRONG>)</STRONG> for 1 <= <EM>n</EM> <= 12. ++ (Delete), <STRONG>KEY_A1</STRONG>, <STRONG>KEY_A3</STRONG>, <STRONG>KEY_B2</STRONG>, <STRONG>KEY_C1</STRONG>, <STRONG>KEY_C3</STRONG>, and <STRONG>KEY_F(</STRONG><EM>n</EM><STRONG>)</STRONG> for 1 <= ++ <EM>n</EM> <= 12. + + + </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE> + In <EM>ncurses</EM>, when a window's "no time-out" mode is <EM>not</EM> set, the <STRONG>ESCDELAY</STRONG> +- variable configures the duration of the timer used to disambiguate a +- function key character sequence from a series of key strokes beginning ++ variable configures the duration of the timer used to disambiguate a ++ function key character sequence from a series of key strokes beginning + with ESC typed by the user; see <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>. + +- <STRONG>has_key</STRONG> was designed for <EM>ncurses</EM>, and is not found in SVr4 <EM>curses</EM>, ++ <STRONG>has_key</STRONG> was designed for <EM>ncurses</EM>, and is not found in SVr4 <EM>curses</EM>, + 4.4BSD <EM>curses</EM>, or any other previous <EM>curses</EM> implementation. + + +@@ -384,50 +385,50 @@ + Applications employing <EM>ncurses</EM> extensions should condition their use on + the visibility of the <STRONG>NCURSES_VERSION</STRONG> preprocessor macro. + +- Except as noted in section "EXTENSIONS" above, X/Open Curses, Issue 4 ++ Except as noted in section "EXTENSIONS" above, X/Open Curses, Issue 4 + describes these functions. It specifies no error conditions for them. + + <STRONG>wgetch</STRONG> reads only single-byte characters. + +- The echo behavior of these functions on input of <STRONG>KEY_</STRONG> or backspace ++ The echo behavior of these functions on input of <STRONG>KEY_</STRONG> or backspace + characters is not documented in SVr4 <EM>curses</EM>. + +- The behavior of <STRONG>wgetch</STRONG> in the presence of signal handlers is not +- documented in SVr4 <EM>curses</EM> and is unspecified by X/Open Curses. In +- historical <EM>curses</EM> implementations, it varied depending on whether the +- operating system's dispatch of a signal to a handler interrupted a ++ The behavior of <STRONG>wgetch</STRONG> in the presence of signal handlers is not ++ documented in SVr4 <EM>curses</EM> and is unspecified by X/Open Curses. In ++ historical <EM>curses</EM> implementations, it varied depending on whether the ++ operating system's dispatch of a signal to a handler interrupted a + <STRONG>read(2)</STRONG> call in progress, and also (in some implementations) whether an +- input timeout or non-blocking mode had been set. A portable <EM>curses</EM> +- application prepares for two cases: (a) signal receipt does not ++ input timeout or non-blocking mode had been set. A portable <EM>curses</EM> ++ application prepares for two cases: (a) signal receipt does not + interrupt <STRONG>wgetch</STRONG>; or (b) signal receipt interrupts <STRONG>wgetch</STRONG> and causes it + to return <STRONG>ERR</STRONG> with <STRONG>errno</STRONG> set to <STRONG>EINTR</STRONG>. + + <STRONG>KEY_MOUSE</STRONG> is mentioned in X/Open Curses, along with a few related <EM>term-</EM> +- <EM>info</EM> capabilities, but no higher-level functions use the feature. The ++ <EM>info</EM> capabilities, but no higher-level functions use the feature. The + implementation in <EM>ncurses</EM> is an extension. + +- <STRONG>KEY_RESIZE</STRONG> and <STRONG>has_key</STRONG> are extensions first implemented for <EM>ncurses</EM>. ++ <STRONG>KEY_RESIZE</STRONG> and <STRONG>has_key</STRONG> are extensions first implemented for <EM>ncurses</EM>. + By 2022, <EM>PDCurses</EM> and NetBSD <EM>curses</EM> had added them along with + <STRONG>KEY_MOUSE</STRONG>. + + + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> +- ECMA-6 "7-bit coded Character Set" <https://ecma-international.org/ ++ ECMA-6 "7-bit coded Character Set" <https://ecma-international.org/ + publications-and-standards/standards/ecma-6/> + +- ECMA-48 "Control Functions for Coded Character Sets" <https:// ++ ECMA-48 "Control Functions for Coded Character Sets" <https:// + ecma-international.org/publications-and-standards/standards/ecma-48/> + +- <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG> describes comparable functions of the <EM>ncurses</EM> library ++ <STRONG><A HREF="curs_get_wch.3x.html">curs_get_wch(3x)</A></STRONG> describes comparable functions of the <EM>ncurses</EM> library + in its wide-character configuration (<EM>ncursesw</EM>). + +- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>, +- <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(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_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>, ++ <STRONG><A HREF="curs_move.3x.html">curs_move(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>, + <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>, <STRONG>ascii(7)</STRONG> + + + +-ncurses 6.5 2024-07-20 <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_initscr.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_initscr.3x.html 2024-06-08 23:12:49.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_initscr.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_initscr.3x,v 1.75 2024/06/08 20:34:23 tom Exp @ ++ * @Id: curs_initscr.3x,v 1.77 2024/09/11 21:00:07 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_initscr 3x 2024-06-08 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_initscr 3x 2024-09-11 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_initscr 3x 2024-06-08 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_initscr 3x 2024-09-11 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG> + +@@ -303,7 +303,7 @@ + + + +-ncurses 6.5 2024-06-08 <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG> ++ncurses 6.5 2024-09-11 <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_inopts.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_inopts.3x.html 2024-06-15 20:39:28.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_inopts.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_inopts.3x,v 1.75 2024/06/15 19:49:39 tom Exp @ ++ * @Id: curs_inopts.3x,v 1.77 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_inopts 3x 2024-06-15 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_inopts 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_inopts 3x 2024-06-15 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_inopts 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG> + +@@ -114,7 +114,7 @@ + buffering and erase and kill character processing (the interrupt, quit, + suspend, and flow control characters are unaffected) and makes + characters typed by the user immediately available to the program. +- <STRONG>nocbreak</STRONG> returns the terminal to normal ("cooked") mode. ++ <STRONG>nocbreak</STRONG> restores the terminal's normal ("cooked") line discipline. + + The state of the terminal is unknown to a <EM>curses</EM> application when it + starts; therefore, a program should call <STRONG>cbreak</STRONG> or <STRONG>nocbreak</STRONG> explicitly. +@@ -163,24 +163,24 @@ + + </PRE><H3><a name="h3-meta">meta</a></H3><PRE> + Initially, whether the terminal returns 7- or 8-bit character codes on +- input depends on the configuration of the terminal driver; see +- <STRONG>termios(3)</STRONG>. To force 8 bits to be returned, call <STRONG>meta(</STRONG>...<STRONG>,</STRONG> <STRONG>TRUE)</STRONG>; this +- is equivalent, on POSIX systems, to setting the CS8 flag on the +- terminal. To force 7 bits to be returned, call <STRONG>meta(</STRONG>...<STRONG>,</STRONG> <STRONG>FALSE)</STRONG>; this +- is equivalent, on POSIX systems, to setting the CS7 flag on the +- terminal. The window argument, <EM>win</EM>, is always ignored. If the <EM>term-</EM> +- <EM>info</EM> string capabilities <STRONG>meta_on</STRONG> (<STRONG>smm</STRONG>) and <STRONG>meta_off</STRONG> (<STRONG>rmm</STRONG>) are defined +- for the terminal type, enabling meta mode sends <STRONG>smm</STRONG> to the terminal and +- disabling it sends <STRONG>rmm</STRONG> to the terminal. ++ input depends on the configuration of the terminal driver; on POSIX ++ systems, see <STRONG>termios(3)</STRONG>. To force 8 bits to be returned, call ++ <STRONG>meta(</STRONG>...<STRONG>,</STRONG> <STRONG>TRUE)</STRONG>; this is equivalent, on POSIX systems, to setting the ++ CS8 flag on the terminal. To force 7 bits to be returned, call ++ <STRONG>meta(</STRONG>...<STRONG>,</STRONG> <STRONG>FALSE)</STRONG>; this is equivalent, on POSIX systems, to setting the ++ CS7 flag on the terminal. The window argument, <EM>win</EM>, is always ignored. ++ If the <EM>terminfo</EM> string capabilities <STRONG>meta_on</STRONG> (<STRONG>smm</STRONG>) and <STRONG>meta_off</STRONG> (<STRONG>rmm</STRONG>) ++ are defined for the terminal type, enabling meta mode sends <STRONG>smm</STRONG> to the ++ terminal and disabling it sends <STRONG>rmm</STRONG> to the terminal. + + + </PRE><H3><a name="h3-nl_nonl">nl, nonl</a></H3><PRE> + Initially, whether the terminal reports a carriage return using the + character code for a line feed in cbreak or raw modes depends on the + configuration of the terminal driver; see <STRONG>termios(3)</STRONG>. <STRONG>nl</STRONG> configures +- the terminal to perform this translation. <STRONG>nonl</STRONG> disables it. In normal +- (or "cooked") mode, the terminal driver always translates carriage +- returns to line feeds. ++ the terminal to perform this translation. <STRONG>nonl</STRONG> disables it. Under its ++ normal ("cooked") line discipline, the terminal driver always ++ translates carriage returns to line feeds. + + + </PRE><H3><a name="h3-nodelay">nodelay</a></H3><PRE> +@@ -202,17 +202,17 @@ + </PRE><H3><a name="h3-qiflush_noqiflush">qiflush, noqiflush</a></H3><PRE> + <STRONG>qiflush</STRONG> and <STRONG>noqiflush</STRONG> configure the terminal driver's treatment of its + input and output queues when it handles the interrupt, suspend, or quit +- characters in <EM>cbreak</EM> and "cooked" modes; on POSIX systems, see +- <STRONG>termios(3)</STRONG>. The default behavior is inherited from the terminal driver +- settings. Calling <STRONG>qiflush</STRONG> configures the terminal to flush the queues +- when any of these events occurs, giving the impression of faster +- response to user input, but making the library's model of the screen +- contents incorrect. Calling <STRONG>noqiflush</STRONG> prevents such flushing, but +- might frustrate impatient users on slow connections if a <EM>curses</EM> update +- of the screen is in progress when the event occurs; see <STRONG>typeahead</STRONG> below +- for a mitigation of this problem. You may want to call <STRONG>noqiflush</STRONG> in a +- signal handler if you want output to continue after the handler exits +- as though the interrupt had not occurred. ++ characters under the normal ("cooked") or cbreak line discplines on ++ POSIX systems; see <STRONG>termios(3)</STRONG>. The default behavior is inherited from ++ the terminal driver settings. Calling <STRONG>qiflush</STRONG> configures the terminal ++ to flush the queues when any of these events occurs, giving the ++ impression of faster response to user input, but making the library's ++ model of the screen contents incorrect. Calling <STRONG>noqiflush</STRONG> prevents ++ such flushing, but might frustrate impatient users on slow connections ++ if a <EM>curses</EM> update of the screen is in progress when the event occurs; ++ see <STRONG>typeahead</STRONG> below for a mitigation of this problem. You may want to ++ call <STRONG>noqiflush</STRONG> in a signal handler if you want output to continue after ++ the handler exits as though the interrupt had not occurred. + + + </PRE><H3><a name="h3-raw_noraw">raw, noraw</a></H3><PRE> +@@ -222,8 +222,8 @@ + control characters uninterpreted to the application, instead of + generating a signal or acting on I/O flow. The behavior of the + terminal's "Break" key (if any) depends on terminal driver +- configuration parameters that <EM>curses</EM> does not handle. <STRONG>noraw</STRONG> returns +- the terminal to normal ("cooked") mode. ++ configuration parameters that <EM>curses</EM> does not handle. <STRONG>noraw</STRONG> restores ++ the terminal's normal ("cooked") line discipline. + + + </PRE><H3><a name="h3-timeout_wtimeout">timeout, wtimeout</a></H3><PRE> +@@ -272,10 +272,10 @@ + <STRONG>noqiflush</STRONG>, <STRONG>qiflush</STRONG>, <STRONG>timeout</STRONG>, and <STRONG>wtimeout</STRONG> may be implemented as macros. + + <STRONG>noraw</STRONG> and <STRONG>nocbreak</STRONG> follow historical practice in that they attempt to +- restore normal ("cooked") mode from raw and cbreak modes, respectively. +- Mixing <STRONG>raw</STRONG>/<STRONG>noraw</STRONG> calls with <STRONG>cbreak</STRONG>/<STRONG>nocbreak</STRONG> calls leads to terminal +- driver control states that are hard to predict or understand; doing so +- is not recommended. ++ restore the terminal's normal ("cooked") line discipline from raw and ++ cbreak, respectively. Mixing <STRONG>raw</STRONG>/<STRONG>noraw</STRONG> calls with <STRONG>cbreak</STRONG>/<STRONG>nocbreak</STRONG> ++ calls leads to terminal driver control states that are hard to predict ++ or understand; doing so is not recommended. + + + </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE> +@@ -312,8 +312,8 @@ + <EM>curses</EM>, clearing the terminal driver's "echo" flag when initializing + the screen. BSD <EM>curses</EM> did not, but its <EM>raw</EM> function turned it off as + a side effect. For best portability, call <STRONG>echo</STRONG> or <STRONG>noecho</STRONG> explicitly +- just after initialization, even if your program remains in normal +- ("cooked") mode. ++ just after initialization, even if your program retains the terminal's ++ normal ("cooked") line discipline. + + X/Open Curses is ambiguous regarding whether <EM>raw</EM> should disable the + carriage return and line feed translation feature controlled by <EM>nl</EM> and +@@ -382,7 +382,7 @@ + + + +-ncurses 6.5 2024-06-15 <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_ins_wstr.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_ins_wstr.3x.html 2024-07-27 23:11:31.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_ins_wstr.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_ins_wstr.3x,v 1.44 2024/07/27 20:15:31 tom Exp @ ++ * @Id: curs_ins_wstr.3x,v 1.46 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_ins_wstr 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_ins_wstr 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_ins_wstr 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_ins_wstr 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG> + +@@ -120,7 +120,7 @@ + functions named <EM>winswstr</EM> and <EM>winsnwstr</EM> (and the usual variants). These + were later additions to SVr4.<EM>x</EM>, not appearing in the first SVr4 (1989). + They differ from X/Open's later <EM>wins</EM><STRONG>_</STRONG><EM>wstr</EM> and <EM>wins</EM><STRONG>_</STRONG><EM>nwstr</EM> in that their +- <EM>wstr</EM> parameters are not <EM>const</EM>-qualified<EM>.</EM> ++ <EM>wstr</EM> parameters are not <EM>const</EM>-qualified. + + + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> +@@ -131,7 +131,7 @@ + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_instr.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_instr.3x.html 2024-06-08 23:12:49.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_instr.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_instr.3x,v 1.57 2024/06/08 20:47:39 tom Exp @ ++ * @Id: curs_instr.3x,v 1.59 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_instr 3x 2024-06-08 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_instr 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_instr 3x 2024-06-08 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_instr 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG> + +@@ -47,7 +47,7 @@ + + + </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE> +- <STRONG>instr</STRONG>, <STRONG>innstr</STRONG>, <STRONG>winstr</STRONG>, <STRONG>winnstr</STRONG>, <STRONG>mvinstr</STRONG>, <STRONG>mvinnstr</STRONG>, <STRONG>mvwinstr</STRONG>, <STRONG>mvwinnstr</STRONG> ++ <STRONG>instr</STRONG>, <STRONG>winstr</STRONG>, <STRONG>mvinstr</STRONG>, <STRONG>mvwinstr</STRONG>, <STRONG>innstr</STRONG>, <STRONG>winnstr</STRONG>, <STRONG>mvinnstr</STRONG>, <STRONG>mvwinnstr</STRONG> + - get a string from a <EM>curses</EM> window + + +@@ -138,7 +138,7 @@ + + + +-ncurses 6.5 2024-06-08 <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_inwstr.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_inwstr.3x.html 2024-06-08 23:12:49.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_inwstr.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_inwstr.3x,v 1.45 2024/06/08 21:19:18 tom Exp @ ++ * @Id: curs_inwstr.3x,v 1.47 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_inwstr 3x 2024-06-08 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_inwstr 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_inwstr 3x 2024-06-08 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_inwstr 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG> + +@@ -47,7 +47,7 @@ + + + </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE> +- <STRONG>inwstr</STRONG>, <STRONG>innwstr</STRONG>, <STRONG>winwstr</STRONG>, <STRONG>winnwstr</STRONG>, <STRONG>mvinwstr</STRONG>, <STRONG>mvinnwstr</STRONG>, <STRONG>mvwinwstr</STRONG>, ++ <STRONG>inwstr</STRONG>, <STRONG>winwstr</STRONG>, <STRONG>mvinwstr</STRONG>, <STRONG>mvwinwstr</STRONG>, <STRONG>innwstr</STRONG>, <STRONG>winnwstr</STRONG>, <STRONG>mvinnwstr</STRONG>, + <STRONG>mvwinnwstr</STRONG> - get a wide-character string from a <EM>curses</EM> window + + +@@ -70,9 +70,9 @@ + starting at the cursor and stopping at the end of the line, and stores + it in <EM>wstr</EM>, terminating it with a wide null character and omitting any + attributes and color pair identifier that <EM>curses</EM> associates with each +- character. <STRONG>winnwstr</STRONG> does the same, but copies at most <EM>n</EM> characters +- from <EM>win</EM>. An <EM>n</EM> of <STRONG>-1</STRONG> implies no limit; <STRONG>winnwstr</STRONG> then works like +- <STRONG>winwstr</STRONG>. <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> describes the variants of these functions. ++ character. <STRONG>winnwstr</STRONG> does the same, but copies at most <EM>n</EM> wide ++ characters from <EM>win</EM>. An <EM>n</EM> of <STRONG>-1</STRONG> implies no limit; <STRONG>winnwstr</STRONG> then works ++ like <STRONG>winwstr</STRONG>. <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> describes the variants of these functions. + + + </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> +@@ -135,7 +135,7 @@ + + + +-ncurses 6.5 2024-06-08 <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_kernel.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_kernel.3x.html 2024-06-22 22:55:08.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_kernel.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_kernel.3x,v 1.67 2024/06/22 21:24:26 tom Exp @ ++ * @Id: curs_kernel.3x,v 1.70 2024/09/14 20:14:54 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_kernel 3x 2024-06-22 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_kernel 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_kernel 3x 2024-06-22 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_kernel 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> + +@@ -124,10 +124,10 @@ + + + </PRE><H3><a name="h3-curs_set">curs_set</a></H3><PRE> +- The <STRONG>curs_set</STRONG> routine sets the cursor state to invisible, normal, or +- very visible for <STRONG>visibility</STRONG> equal to <STRONG>0</STRONG>, <STRONG>1</STRONG>, or <STRONG>2</STRONG> respectively. If the +- terminal supports the <EM>visibility</EM> requested, the previous <EM>cursor</EM> state +- is returned; otherwise, <STRONG>ERR</STRONG> is returned. ++ <STRONG>curs_set</STRONG> adjusts the cursor visibility to "invisible", "visible", "very ++ visible", as its argument is <STRONG>0</STRONG>, <STRONG>1</STRONG>, or <STRONG>2</STRONG>, respectively. It returns the ++ previous <EM>visibility</EM> if the requested one is supported, and <STRONG>ERR</STRONG> ++ otherwise. + + + </PRE><H3><a name="h3-mvcur">mvcur</a></H3><PRE> +@@ -178,41 +178,44 @@ + + + </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> +- Except for <STRONG>curs_set</STRONG>, these routines always return <STRONG>OK</STRONG>. ++ Except for <STRONG>curs_set</STRONG>, these functions return <STRONG>OK</STRONG> on success and <STRONG>ERR</STRONG> on ++ failure. + +- <STRONG>curs_set</STRONG> returns the previous cursor state, or <STRONG>ERR</STRONG> if the requested +- <EM>visibility</EM> is not supported. ++ <STRONG>curs_set</STRONG> returns the previous cursor visibility, and returns <STRONG>ERR</STRONG> if the ++ terminal type does not support the requested <EM>visibility</EM>. + +- X/Open defines no error conditions. In this implementation ++ <STRONG>napms</STRONG> always succeeds. + +- <STRONG>def_prog_mode</STRONG>, <STRONG>def_shell_mode</STRONG>, <STRONG>reset_prog_mode</STRONG>, <STRONG>reset_shell_mode</STRONG> +- return <STRONG>ERR</STRONG> if the terminal was not initialized, or if the I/O call +- to obtain the terminal settings fails. ++ <STRONG>mvcur</STRONG> fails if the position (<EM>newrow</EM>, <EM>newcol</EM>) is outside the screen ++ boundaries. + +- <STRONG>ripoffline</STRONG> +- returns <STRONG>ERR</STRONG> if the maximum number of ripped-off lines exceeds the +- maximum (5). ++ In <EM>ncurses</EM>, + ++ <STRONG>o</STRONG> <STRONG>def_prog_mode</STRONG>, <STRONG>def_shell_mode</STRONG>, <STRONG>reset_prog_mode</STRONG>, and ++ <STRONG>reset_shell_mode</STRONG> return <STRONG>ERR</STRONG> if the terminal was not initialized, or ++ if the operating system's function for obtaining terminal settings ++ fails. + +-</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE> +- Note that <STRONG>getsyx</STRONG> is a macro, so <STRONG>&</STRONG> is not necessary before the variables +- <EM>y</EM> and <EM>x</EM>. ++ <STRONG>o</STRONG> <STRONG>ripoffline</STRONG> returns <STRONG>ERR</STRONG> if the maximum number of ripped-off lines ++ exceeds the maximum (5). + +- Older SVr4 man pages warn that the return value of <STRONG>curs_set</STRONG> "is +- currently incorrect". This implementation gets it right, but it may be +- unwise to count on the correctness of the return value anywhere else. + +- Both <EM>ncurses</EM> and SVr4 will call <STRONG>curs_set</STRONG> in <STRONG>endwin</STRONG> if <STRONG>curs_set</STRONG> has been +- called to make the cursor other than normal, i.e., either invisible or +- very visible. There is no way for <EM>ncurses</EM> to determine the initial +- cursor state to restore that. ++</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE> ++ <STRONG>getsyx</STRONG> is a macro; use of the <STRONG>&</STRONG> operator before its arguments is ++ unnecessary. ++ ++ The <STRONG>endwin</STRONG> function of both <EM>ncurses</EM> and SVr4 <EM>curses</EM> calls <STRONG>curs_set</STRONG> if ++ the latter has previously been called to set the cursor visiblility to ++ a value other than normal; that is, either invisible or very visible. ++ There is no way for <EM>ncurses</EM> to determine the initial cursor visibility ++ to restore it. + + + </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE> +- In <EM>ncurses</EM>, <STRONG>mvcur</STRONG> accepts <STRONG>-1</STRONG> for either or both old coordinates. This +- value tells <EM>ncurses</EM> that the old location is unknown, and that it must +- use only absolute motion, as with the <STRONG>cursor_address</STRONG> (<STRONG>cup</STRONG>) capability, +- rather than the least costly combination of absolute and relative ++ In <EM>ncurses</EM>, <STRONG>mvcur</STRONG> accepts <STRONG>-1</STRONG> for either or both old coordinates. This ++ value tells <EM>ncurses</EM> that the old location is unknown, and that it must ++ use only absolute motion, as with the <STRONG>cursor_address</STRONG> (<STRONG>cup</STRONG>) capability, ++ rather than the least costly combination of absolute and relative + motion. + + +@@ -220,28 +223,37 @@ + Applications employing <EM>ncurses</EM> extensions should condition their use on + the visibility of the <STRONG>NCURSES_VERSION</STRONG> preprocessor macro. + +- The <EM>virtual</EM> <EM>screen</EM> functions <STRONG>setsyx</STRONG> and <STRONG>getsyx</STRONG> are not described in +- X/Open Curses, Issue 4. All other functions are as described in X/Open +- Curses. +- +- The SVr4 documentation describes <STRONG>setsyx</STRONG> and <STRONG>getsyx</STRONG> as having return +- type int. This is misleading, as they are macros with no documented +- semantics for the return value. ++ The <EM>virtual</EM> <EM>screen</EM> functions <EM>setsyx</EM> and <EM>getsyx</EM> are not described in ++ X/Open Curses Issue 4. SVr4 documents each of them as returning an ++ <EM>int</EM>. This is misleading, as they are macros with no documented ++ semantics for returning values. ++ ++ All other functions are as described in X/Open Curses. It specifies no ++ error conditions for them, except as described for <EM>curs</EM><STRONG>_</STRONG><EM>set</EM> in section ++ "RETURN VALUE" above. ++ ++ Older SVr4 man pages warn that the return value of <STRONG>curs_set</STRONG> "is ++ currently incorrect". This implementation gets it right, but counting ++ on its correctness anywhere else may be unwise. ++ ++ X/Open Curses specifies <EM>ripoffline</EM> as returning <STRONG>OK</STRONG> with no possibility ++ of failure ("[c]alls to <EM>ripoffline</EM> above this limit [five lines] have ++ no effect but report success"). + + X/Open Curses notes: + +- "After use of <EM>mvcur</EM>(), the model Curses maintains of the state +- of the terminal might not match the actual state of the +- terminal. An application should touch and refresh the window +- before resuming conventional use of Curses." ++ After use of <EM>mvcur</EM>(), the model Curses maintains of the state of ++ the terminal might not match the actual state of the terminal. ++ An application should touch and refresh the window before ++ resuming conventional use of Curses. + +- Both <EM>ncurses</EM> and SVr4 <EM>curses</EM> implement <STRONG>mvcur</STRONG> using the <EM>SCREEN</EM> data ++ Both <EM>ncurses</EM> and SVr4 <EM>curses</EM> implement <STRONG>mvcur</STRONG> using the <EM>SCREEN</EM> object + allocated in either <STRONG><A HREF="curs_initscr.3x.html">initscr(3x)</A></STRONG> or <STRONG><A HREF="curs_initscr.3x.html">newterm(3x)</A></STRONG>. X/Open Curses states +- that the old location must be given for <STRONG>mvcur</STRONG> to accommodate terminals ++ that the old location must be given for <EM>mvcur</EM> to accommodate terminals + that lack absolute cursor positioning. + +- If interrupted, <EM>ncurses</EM> restarts <STRONG>napms</STRONG>. That, and the limitation to 30 +- seconds, are different from other implementations. ++ If interrupted by a signal, <EM>ncurses</EM> restarts <EM>napms</EM>. That, and the ++ limitation to 30 seconds, differ from other implementations. + + + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> +@@ -250,7 +262,7 @@ + + + +-ncurses 6.5 2024-06-22 <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_outopts.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_outopts.3x.html 2024-07-27 23:11:32.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_outopts.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_outopts.3x,v 1.69 2024/07/27 19:55:45 tom Exp @ ++ * @Id: curs_outopts.3x,v 1.71 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_outopts 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_outopts 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_outopts 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_outopts 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> + +@@ -166,22 +166,22 @@ + + + </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE> +- These functions are described in X/Open Curses, Issue 4. It specifies +- no error conditions for them. ++ X/Open Curses, Issue 4 describes these functions. It specifies no ++ error conditions for them. + +- Some historic curses implementations had, as an undocumented feature, +- the ability to do the equivalent of <STRONG>clearok(...,</STRONG> <STRONG>1)</STRONG> by saying +- <STRONG>touchwin(stdscr)</STRONG> or <STRONG>clear(stdscr)</STRONG>. This will not work under <EM>ncurses</EM>. ++ Some historic <EM>curses</EM> implementations, as an undocumented feature, did ++ the equivalent of "<STRONG>clearok(</STRONG>...<STRONG>,</STRONG> <STRONG>1)</STRONG>" when <STRONG>touchwin(stdstr)</STRONG> or ++ <STRONG>clear(stdstr)</STRONG> were used. This trick does not work with <EM>ncurses</EM>. + +- Earlier System V curses implementations specified that with <STRONG>scrollok</STRONG> ++ Early System V <EM>curses</EM> implementations specified that with <STRONG>scrollok</STRONG> + enabled, any window modification triggering a scroll also forced a + physical refresh. X/Open Curses does not require this, and <EM>ncurses</EM> +- avoids doing it to perform better vertical-motion optimization at +- <STRONG>wrefresh</STRONG> time. ++ avoids doing so to better optimize vertical motions upon a ++ <STRONG><A HREF="curs_refresh.3x.html">wrefresh(3x)</A></STRONG>. + + X/Open Curses does not mention that the cursor should be made invisible +- as a side-effect of <STRONG>leaveok</STRONG>. SVr4 curses documentation does this, but +- the code does not. Use <STRONG>curs_set</STRONG> to make the cursor invisible. ++ as a side-effect of <STRONG>leaveok</STRONG>. SVr4 <EM>curses</EM> documentation notes this, but ++ the code neglects it. Use <STRONG><A HREF="curs_kernel.3x.html">curs_set(3x)</A></STRONG> to make the cursor invisible. + + + </PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE> +@@ -195,7 +195,7 @@ + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_refresh.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_refresh.3x.html 2024-07-27 23:11:32.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_refresh.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_refresh.3x,v 1.50 2024/07/27 19:55:45 tom Exp @ ++ * @Id: curs_refresh.3x,v 1.52 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_refresh 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_refresh 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_refresh 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_refresh 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> + +@@ -155,11 +155,11 @@ + + + </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_outopts.3x.html">curs_outopts(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_outopts.3x.html">curs_outopts(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG> + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_scroll.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_scroll.3x.html 2024-05-25 22:33:42.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_scroll.3x.html 2024-09-14 20:23:26.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_scroll.3x,v 1.45 2024/05/25 20:16:27 tom Exp @ ++ * @Id: curs_scroll.3x,v 1.47 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_scroll 3x 2024-05-25 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_scroll 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_scroll 3x 2024-05-25 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_scroll 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG> + +@@ -63,16 +63,18 @@ + <STRONG>scroll</STRONG> scrolls the given window up one line. That is, every visible + line we might number <EM>i</EM> becomes line <EM>i</EM>-1. The text of the top line in + the window disappears and the bottom line is populated with blank +- characters; see <STRONG><A HREF="curs_bkgd.3x.html">bkgd(3x)</A></STRONG> or <STRONG><A HREF="curs_bkgrnd.3x.html">bkgrnd(3x)</A></STRONG>. As an optimization, if the +- scrolling region of the window is the entire screen, the physical +- screen may be scrolled at the same time; see <STRONG><A HREF="curs_variables.3x.html">curscr(3x)</A></STRONG>. ++ characters; see <STRONG><A HREF="curs_bkgd.3x.html">bkgd(3x)</A></STRONG> (wide-character API users: <STRONG><A HREF="curs_bkgrnd.3x.html">bkgrnd(3x)</A></STRONG>). As an ++ optimization, if the scrolling region of the window is the entire ++ screen, the physical screen may be scrolled at the same time; see ++ <STRONG><A HREF="curs_variables.3x.html">curscr(3x)</A></STRONG>. + +- <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> scroll <STRONG>stdscr</STRONG> or the specified window up or down +- depending on the sign of <EM>n</EM>. ++ <STRONG>scrl</STRONG> and <STRONG>wscrl</STRONG> scrolls the specified window <EM>win</EM> up or down per the sign ++ of <EM>n</EM>. + + <STRONG>o</STRONG> For positive <EM>n</EM>, line <EM>i</EM>+<EM>n</EM> becomes <EM>i</EM> (scrolling up); + +- <STRONG>o</STRONG> for negative <EM>n</EM>, line <EM>i</EM>-<EM>n</EM> becomes <EM>i</EM> (scrolling down). ++ <STRONG>o</STRONG> for negative <EM>n</EM>, line <EM>i</EM>-<EM>n</EM> becomes <EM>i</EM> (scrolling down). <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> ++ describes the <STRONG>scrl</STRONG> variant of this function. + + The cursor does not move. These functions perform no operation unless + scrolling is enabled for the window via <STRONG><A HREF="scrollok.3x.html">scrollok(3x)</A></STRONG>. +@@ -102,12 +104,12 @@ + SVr4 indicates that the optimization of physically scrolling + immediately if the scroll region is the entire screen "is" performed, + not "may be" performed. <EM>ncurses</EM> deliberately does not guarantee that +- this will occur, to leave open the possibility of smarter optimization +- of multiple scroll actions on the next update. ++ this occurs, to leave open the possibility of better optimization of ++ multiple scroll actions on the next update. + +- Neither SVr4 <EM>curses</EM> nor X/Open Curses specify whether the current +- attribute or current color pair of blanks generated by the scroll +- function are zeroed. <EM>ncurses</EM> does so. ++ Neither SVr4 <EM>curses</EM> nor X/Open Curses specify whether these functions ++ zero the attributes or color pair identifier of the blank character. ++ In <EM>ncurses</EM>, they do not. + + + </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> +@@ -115,7 +117,7 @@ + + + +-ncurses 6.5 2024-05-25 <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_termcap.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_termcap.3x.html 2024-06-22 22:55:08.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_termcap.3x.html 2024-09-14 20:23:27.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_termcap.3x,v 1.87 2024/06/22 21:28:07 tom Exp @ ++ * @Id: curs_termcap.3x,v 1.89 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_termcap 3x 2024-06-22 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_termcap 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_termcap 3x 2024-06-22 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_termcap 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG> + +@@ -229,55 +229,55 @@ + <STRONG>o</STRONG> X/Open Curses, Issue 4, Version 2 (1996), describes these + functions, marking them as "TO BE WITHDRAWN". + +- <STRONG>o</STRONG> X/Open Curses, Issue 7 (2009) marks the <EM>termcap</EM> interface (along +- with <STRONG>vwprintw</STRONG> and <STRONG>vwscanw</STRONG>) as withdrawn. ++ <STRONG>o</STRONG> X/Open Curses, Issue 7 (2009) withdrew the <EM>termcap</EM> interface (along ++ with the <EM>vwprintw</EM> and <EM>vwscanw</EM> functions). + + Neither X/Open Curses nor the SVr4 man pages documented the return +- values of <STRONG>tgetent</STRONG> correctly, though all three shown here were in fact ++ values of <EM>tgetent</EM> correctly, though all three shown here were in fact + returned ever since SVr1. In particular, an omission in the X/Open +- Curses specification has been misinterpreted to mean that <STRONG>tgetent</STRONG> ++ Curses specification has been misinterpreted to mean that <EM>tgetent</EM> + returns <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>. Because the purpose of these functions is to + provide compatibility with the <EM>termcap</EM> library, that is a defect in + X/Open Curses, Issue 4, Version 2 rather than in <EM>ncurses</EM>. + +- <STRONG>Compatibility</STRONG> <STRONG>with</STRONG> <STRONG>BSD</STRONG> <EM>termcap</EM> +- Externally visible variables are provided for support of certain ++ <STRONG>Compatibility</STRONG> <STRONG>with</STRONG> <STRONG>BSD</STRONG> <STRONG><EM>termcap</EM></STRONG> ++ <EM>ncurses</EM> provides externally visible variables to support certain + <EM>termcap</EM> applications. However, their correct usage is poorly + documented; for example, it is unclear when reading and writing them is + meaningful. In particular, some applications are reported to declare + and/or modify <STRONG>ospeed</STRONG>. + + The constraint that only the first two characters of the <EM>id</EM> parameter +- are used escapes many application developers. The BSD <EM>termcap</EM> library +- did not require a trailing null character on the capability identifier +- passed to <STRONG>tgetstr</STRONG>, <STRONG>tgetnum</STRONG>, and <STRONG>tgetflag</STRONG>. Some applications thus +- assume that the <EM>termcap</EM> interface does not require the trailing null +- character for the capability identifier. +- +- <STRONG>o</STRONG> <EM>ncurses</EM> disallows matches by the <EM>termcap</EM> interface against extended +- capability names that are longer than two characters; see +- <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>. ++ are looked up in the terminal database escapes many application ++ developers. The BSD <EM>termcap</EM> library did not require a trailing null ++ character after the capability identifier passed to <EM>tgetstr</EM>, <EM>tgetnum</EM>, ++ and <EM>tgetflag</EM>. Some applications thus assume that the <EM>termcap</EM> interface ++ does not require the trailing null character for the capability ++ identifier. + +- The BSD <EM>termcap</EM> function <STRONG>tgetent</STRONG> returns the text of a <EM>termcap</EM> entry in ++ <EM>ncurses</EM> disallows matches by the <EM>termcap</EM> interface against extended ++ capability names that are longer than two characters; see <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>. ++ ++ The BSD <EM>termcap</EM> function <EM>tgetent</EM> returns the text of a <EM>termcap</EM> entry in + the buffer passed as an argument. This library, like other <EM>terminfo</EM> + implementations, does not store terminal type descriptions as text. It + sets the buffer contents to a null-terminated string. + + + </PRE><H3><a name="h3-Header-File">Header File</a></H3><PRE> +- This library includes a <EM>termcap.h</EM> header for compatibility with other +- implementations, but the header is rarely used because the other +- implementations are not strictly compatible. ++ This library includes a <EM>termcap.h</EM> header file for compatibility with ++ other implementations, but it is rarely used because the other ++ implementations are not mutually compatible; see below. + + + </PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE> + Bill Joy originated a forerunner of <EM>termcap</EM> called "ttycap", dated + September 1977, and released in 1BSD (March 1978). It used many of the +- same function names as the later <EM>termcap</EM>, such as <STRONG>tgetent</STRONG>, <STRONG>tgetflag</STRONG>, +- <STRONG>tgetnum</STRONG>, and <STRONG>tgetstr</STRONG>. ++ same function names as the later <EM>termcap</EM>, such as <EM>tgetent</EM>, <EM>tgetflag</EM>, ++ <EM>tgetnum</EM>, and <EM>tgetstr</EM>. + + A clear descendant, the <EM>termlib</EM> library, followed in 2BSD (May 1979), +- adding <STRONG>tgoto</STRONG> and <STRONG>tputs</STRONG>. The former applied at that time only to cursor ++ adding <EM>tgoto</EM> and <EM>tputs</EM>. The former applied at that time only to cursor + positioning capabilities, thus the overly specific name. Little + changed in 3BSD (late 1979) except the addition of test programs and a + <EM>termlib</EM> man page, which documented the API shown in section "SYNOPSIS" +@@ -300,18 +300,18 @@ + shows that this was added in mid-1992. The <EM>libedit</EM> header file was + used internally as a convenience for compiling the <EM>editline</EM> + library. It declared function prototypes, but no global variables. +- This header file was added to NetBSD's <EM>termcap</EM> library in mid-1994. ++ NetBSD's <EM>termcap</EM> library added this header file in mid-1994. + + Meanwhile, GNU <EM>termcap</EM> began development in 1990. Its first release +- (1.0) in 1991 included a <EM>termcap.h</EM> header. Its second (1.1) in +- September 1992 modified the header to use <EM>const</EM> for the function +- prototypes in the header where one would expect the parameters to be +- read-only. BSD <EM>termcap</EM> did not. The prototype for <STRONG>tputs</STRONG> also ++ (1.0) in 1991 included a <EM>termcap.h</EM> header file. Its second (1.1) ++ release in September 1992 modified the file to use <EM>const</EM> for the ++ function prototypes in the header where one would expect parameters to ++ be read-only. BSD <EM>termcap</EM> did not. The prototype for <EM>tputs</EM> also + differed, but in that instance, it was <EM>libedit</EM> that differed from BSD + <EM>termcap</EM>. + +- GNU <EM>termcap</EM> 1.3 was bundled with <STRONG>bash(1)</STRONG> in mid-1993 to support the +- <STRONG>readline(3)</STRONG> library. ++ GNU <STRONG>bash(1)</STRONG> has bundled GNU <EM>termcap</EM> 1.3 since mid-1993 to support its ++ <STRONG>readline(3)</STRONG> library, and continues to use it if configured to do so. + + <EM>ncurses</EM> 1.8.1 (November 1993) provided a <EM>termcap.h</EM> file. It reflected + influence from GNU <EM>termcap</EM> and <STRONG>emacs(1)</STRONG> (rather than <STRONG>jove(1)</STRONG>), +@@ -321,9 +321,9 @@ + + <STRONG>o</STRONG> <EM>const</EM>-qualified function prototypes, and + +- <STRONG>o</STRONG> a prototype for <STRONG>tparam</STRONG>, a GNU <EM>termcap</EM> feature. ++ <STRONG>o</STRONG> a prototype for <EM>tparam</EM>, a GNU <EM>termcap</EM> feature. + +- Later (in mid-1996) the <STRONG>tparam</STRONG> function was removed from <EM>ncurses</EM>. Any ++ Later (in mid-1996) the <EM>tparam</EM> function was removed from <EM>ncurses</EM>. Any + two of the four implementations thus differ, and programs that intend + to work with all <EM>termcap</EM> library interfaces must account for that fact. + +@@ -363,13 +363,14 @@ + + + </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_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>putc(3)</STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> ++ <EM>TCTEST</EM> <EM>-</EM> <EM>A</EM> <EM>Termcap</EM> <EM>Test</EM> <EM>Utility</EM> ++ <https://invisible-island.net/ncurses/tctest.html> + +- https://invisible-island.net/ncurses/tctest.html ++ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>putc(3)</STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> + + + +-ncurses 6.5 2024-06-22 <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_terminfo.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_terminfo.3x.html 2024-06-08 23:12:49.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_terminfo.3x.html 2024-09-14 20:23:27.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_terminfo.3x,v 1.142 2024/06/08 23:05:52 tom Exp @ ++ * @Id: curs_terminfo.3x,v 1.144 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_terminfo 3x 2024-06-08 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_terminfo 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_terminfo 3x 2024-06-08 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_terminfo 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> + +@@ -210,81 +210,80 @@ + <STRONG>setupterm</STRONG> stores its information about the terminal in a <EM>TERMINAL</EM> + structure pointed to by the global variable <STRONG>cur_term</STRONG>. If it detects an + error, or decides that the terminal is unsuitable (hardcopy or +- generic), it discards this information, making it not available to ++ generic), it discards this information, making it unavailable to + applications. + +- If <STRONG>setupterm</STRONG> is called repeatedly for the same terminal type, it will +- reuse the information. It maintains only one copy of a given +- terminal's capabilities in memory. If it is called for different +- terminal types, <STRONG>setupterm</STRONG> allocates new storage for each set of +- terminal capabilities. +- +- <STRONG>set_curterm</STRONG> sets <STRONG>cur_term</STRONG> to <EM>nterm</EM>, and makes all of the <EM>terminfo</EM> +- Boolean, numeric, and string variables use the values from <EM>nterm</EM>. It +- returns the old value of <STRONG>cur_term</STRONG>. +- +- <STRONG>del_curterm</STRONG> frees the space pointed to by <EM>oterm</EM> and makes it available +- for further use. If <EM>oterm</EM> is the same as <STRONG>cur_term</STRONG>, references to any +- of the <EM>terminfo</EM> Boolean, numeric, and string variables thereafter may +- refer to invalid memory locations until another <STRONG>setupterm</STRONG> has been +- called. +- +- <STRONG>restartterm</STRONG> is similar to <STRONG>setupterm</STRONG> and <STRONG>initscr</STRONG>, except that it is +- called after restoring memory to a previous state (for example, when +- reloading a game saved as a core image dump). <STRONG>restartterm</STRONG> assumes that +- the windows and the input and output options are the same as when +- memory was saved, but the terminal type and baud rate may be different. +- Accordingly, <STRONG>restartterm</STRONG> saves various terminal state bits, calls +- <STRONG>setupterm</STRONG>, and then restores the bits. ++ If <STRONG>setupterm</STRONG> is called repeatedly for the same terminal type, it reuses ++ the information. It maintains only one copy of a given type's ++ capabilities in memory. If called for different types, <STRONG>setupterm</STRONG> ++ allocates new storage for each set of terminal capabilities. ++ ++ <STRONG>set_curterm</STRONG> sets <STRONG>cur_term</STRONG> to <EM>nterm</EM>, making all of the <EM>terminfo</EM> Boolean, ++ numeric, and string capabilities use the values from <EM>nterm</EM>. It returns ++ the old value of <STRONG>cur_term</STRONG>. ++ ++ <STRONG>del_curterm</STRONG> frees the memory pointed to by <STRONG>oterm</STRONG>, making it available ++ for further use. If <STRONG>oterm</STRONG> is the same as <STRONG>cur_term</STRONG>, references to any ++ of the <EM>terminfo</EM> Boolean, numeric, and string capabilities thereafter ++ may refer to invalid memory locations until <STRONG>setupterm</STRONG> is called again. ++ ++ <STRONG>restartterm</STRONG> is similar to <STRONG>setupterm</STRONG>, but is intended for use after ++ restoring program memory to a previous state (for example, when ++ reloading an application that has been suspended from one terminal ++ session and restored in another). <STRONG>restartterm</STRONG> assumes that the display ++ dimensions and the input and output options are the same as when memory ++ was saved, but the terminal type and line speed may differ. ++ Accordingly, <STRONG>restartterm</STRONG> saves relevant terminal state, calls ++ <STRONG>setupterm</STRONG>, then restores that state. + + + </PRE><H3><a name="h3-Formatting-Output">Formatting Output</a></H3><PRE> +- <STRONG>tparm</STRONG> instantiates the string <EM>str</EM> with parameters <EM>pi</EM>. A pointer is ++ <STRONG>tparm</STRONG> instantiates the string <EM>str</EM> with parameters <EM>pi</EM>. A pointer is + returned to the result of <EM>str</EM> with the parameters applied. Application + developers should keep in mind these quirks of the interface: + +- <STRONG>o</STRONG> Although <STRONG>tparm</STRONG>'s actual parameters may be integers or strings, the ++ <STRONG>o</STRONG> Although <STRONG>tparm</STRONG>'s actual parameters may be integers or strings, the + prototype expects <EM>long</EM> (integer) values. + +- <STRONG>o</STRONG> Aside from the <STRONG>set_attributes</STRONG> (<STRONG>sgr</STRONG>) capability, most terminal ++ <STRONG>o</STRONG> Aside from the <STRONG>set_attributes</STRONG> (<STRONG>sgr</STRONG>) capability, most terminal + capabilities require no more than one or two parameters. + +- <STRONG>o</STRONG> Padding information is ignored by <STRONG>tparm</STRONG>; it is interpreted by ++ <STRONG>o</STRONG> Padding information is ignored by <STRONG>tparm</STRONG>; it is interpreted by + <STRONG>tputs</STRONG>. + +- <STRONG>o</STRONG> The capability string is null-terminated. Use "\200" where an ++ <STRONG>o</STRONG> The capability string is null-terminated. Use "\200" where an + ASCII NUL is needed in the output. + +- <STRONG>tiparm</STRONG> is a newer form of <STRONG>tparm</STRONG> which uses <EM>stdarg.h</EM> rather than a +- fixed-parameter list. Its numeric parameters are <EM>int</EM>s rather than ++ <STRONG>tiparm</STRONG> is a newer form of <STRONG>tparm</STRONG> which uses <EM>stdarg.h</EM> rather than a ++ fixed-parameter list. Its numeric parameters are <EM>int</EM>s rather than + <EM>long</EM>s. + +- Both <STRONG>tparm</STRONG> and <STRONG>tiparm</STRONG> assume that the application passes parameters +- consistent with the terminal description. Two extensions are provided ++ Both <STRONG>tparm</STRONG> and <STRONG>tiparm</STRONG> assume that the application passes parameters ++ consistent with the terminal description. Two extensions are provided + as alternatives to deal with untrusted data. + +- <STRONG>o</STRONG> <STRONG>tiparm_s</STRONG> is an extension which is a safer formatting function than ++ <STRONG>o</STRONG> <STRONG>tiparm_s</STRONG> is an extension which is a safer formatting function than + <STRONG>tparm</STRONG> or <STRONG>tiparm</STRONG>, because it allows the developer to tell the <EM>curses</EM> +- library how many parameters to expect in the parameter list, and ++ library how many parameters to expect in the parameter list, and + which may be string parameters. + +- The <EM>mask</EM> parameter has one bit set for each of the parameters (up ++ The <EM>mask</EM> parameter has one bit set for each of the parameters (up + to 9) passed as <EM>char</EM> pointers rather than numbers. + +- <STRONG>o</STRONG> The extension <STRONG>tiscan_s</STRONG> allows the application to inspect a ++ <STRONG>o</STRONG> The extension <STRONG>tiscan_s</STRONG> allows the application to inspect a + formatting capability to see what the <EM>curses</EM> library would assume. + + + </PRE><H3><a name="h3-Output-Functions">Output Functions</a></H3><PRE> +- String capabilities can contain padding information, a time delay ++ String capabilities can contain padding information, a time delay + (accommodating performance limitations of hardware terminals) expressed + as <STRONG>$<</STRONG><EM>n</EM><STRONG>></STRONG>, where <EM>n</EM> is a nonnegative integral count of milliseconds. If <EM>n</EM> + exceeds 30,000 (thirty seconds), it is capped at that value. + +- <STRONG>tputs</STRONG> interprets time-delay information in the string <EM>str</EM> and outputs ++ <STRONG>tputs</STRONG> interprets time-delay information in the string <EM>str</EM> and outputs + it, executing the delays: + +- <STRONG>o</STRONG> The <EM>str</EM> parameter must be a <EM>terminfo</EM> string variable or the return ++ <STRONG>o</STRONG> The <EM>str</EM> parameter must be a <EM>terminfo</EM> string variable or the return + value of <STRONG>tparm</STRONG> or <STRONG>tiparm</STRONG>. + + <STRONG>o</STRONG> <EM>affcnt</EM> is the number of lines affected, or <STRONG>1</STRONG> if not applicable. +@@ -292,8 +291,8 @@ + <STRONG>o</STRONG> <EM>putc</EM> is a <EM>putchar</EM>-like function to which the characters are passed, + one at a time. + +- If <STRONG>tputs</STRONG> processes a time-delay, it uses the <STRONG><A HREF="curs_util.3x.html">delay_output(3x)</A></STRONG> +- function, routing any resulting padding characters through this ++ If <STRONG>tputs</STRONG> processes a time-delay, it uses the <STRONG><A HREF="curs_util.3x.html">delay_output(3x)</A></STRONG> ++ function, routing any resulting padding characters through this + function. + + <STRONG>putp</STRONG> calls "<STRONG>tputs(</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>1,</STRONG> <STRONG>putchar)</STRONG>". The output of <STRONG>putp</STRONG> always goes to +@@ -305,30 +304,30 @@ + + <STRONG>vidattr</STRONG> is like <STRONG>vidputs</STRONG>, except that it outputs through <STRONG>putchar(3)</STRONG>. + +- <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> correspond to <STRONG>vidattr</STRONG> and <STRONG>vidputs</STRONG>, respectively. +- They use multiple parameters to represent the character attributes and ++ <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> correspond to <STRONG>vidattr</STRONG> and <STRONG>vidputs</STRONG>, respectively. ++ They use multiple parameters to represent the character attributes and + color; namely, + + <STRONG>o</STRONG> <EM>attrs</EM>, of type <EM>attr</EM><STRONG>_</STRONG><EM>t</EM>, for the attributes and + + <STRONG>o</STRONG> <EM>pair</EM>, of type <EM>short</EM>, for the color pair number. + +- Use the attribute constants prefixed with "<STRONG>WA_</STRONG>" with <STRONG>vid_attr</STRONG> and ++ Use the attribute constants prefixed with "<STRONG>WA_</STRONG>" with <STRONG>vid_attr</STRONG> and + <STRONG>vid_puts</STRONG>. + +- X/Open Curses reserves the <EM>opts</EM> argument for future use, saying that +- applications must provide a null pointer for that argument; but see ++ X/Open Curses reserves the <EM>opts</EM> argument for future use, saying that ++ applications must provide a null pointer for that argument; but see + section "EXTENSIONS" below. + +- While <STRONG>putp</STRONG> is a low-level function that does not use high-level <EM>curses</EM> +- state, <EM>ncurses</EM> declares it in <EM>curses.h</EM> because System V did this (see ++ While <STRONG>putp</STRONG> is a low-level function that does not use high-level <EM>curses</EM> ++ state, <EM>ncurses</EM> declares it in <EM>curses.h</EM> because System V did this (see + section "HISTORY" below). + + + </PRE><H3><a name="h3-Terminal-Capability-Functions">Terminal Capability Functions</a></H3><PRE> +- <STRONG>tigetflag</STRONG>, <STRONG>tigetnum</STRONG>, and <STRONG>tigetstr</STRONG> return the value of the capability +- corresponding to the <EM>terminfo</EM> <EM>cap-code</EM>, such as <STRONG>xenl</STRONG>, passed to them. +- The <EM>cap-code</EM> for each capability is given in the table column entitled ++ <STRONG>tigetflag</STRONG>, <STRONG>tigetnum</STRONG>, and <STRONG>tigetstr</STRONG> return the value of the capability ++ corresponding to the <EM>terminfo</EM> <EM>cap-code</EM>, such as <STRONG>xenl</STRONG>, passed to them. ++ The <EM>cap-code</EM> for each capability is given in the table column entitled + <EM>cap-code</EM> code in the capabilities section of <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. + + These functions return special values to denote errors. +@@ -371,26 +370,26 @@ + + </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 ++ description. As a side effect, it sets <STRONG>cur_term</STRONG> to point to this + memory. If an application calls + + del_curterm(cur_term); + + the memory will be freed. + +- The formatting functions <STRONG>tparm</STRONG> and <STRONG>tiparm</STRONG> extend the storage allocated ++ The formatting functions <STRONG>tparm</STRONG> and <STRONG>tiparm</STRONG> extend the storage allocated + by <STRONG>setupterm</STRONG> as follows. + +- <STRONG>o</STRONG> They add the "static" <EM>terminfo</EM> variables [a-z]. Before <EM>ncurses</EM> ++ <STRONG>o</STRONG> They add the "static" <EM>terminfo</EM> variables [a-z]. Before <EM>ncurses</EM> + 6.3, those were shared by all screens. With <EM>ncurses</EM> 6.3, those are + allocated per screen. See <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. + +- <STRONG>o</STRONG> To improve performance, <EM>ncurses</EM> 6.3 caches the result of analyzing +- <EM>terminfo</EM> strings for their parameter types. That is stored as a ++ <STRONG>o</STRONG> To improve performance, <EM>ncurses</EM> 6.3 caches the result of analyzing ++ <EM>terminfo</EM> strings for their parameter types. That is stored as a + binary tree referenced from the <EM>TERMINAL</EM> 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 ++ 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. + + +@@ -406,35 +405,35 @@ + fails if the associated call to <STRONG>setupterm</STRONG> returns <STRONG>ERR</STRONG>. + + <STRONG>setupterm</STRONG> +- fails if it cannot allocate enough memory, or create the initial +- windows (<STRONG>stdscr</STRONG>, <STRONG>curscr</STRONG>, and <STRONG>newscr</STRONG>) Other error conditions are ++ fails if it cannot allocate enough memory, or create the initial ++ windows (<STRONG>stdscr</STRONG>, <STRONG>curscr</STRONG>, and <STRONG>newscr</STRONG>) Other error conditions are + documented above. + + <STRONG>tparm</STRONG> +- returns a null pointer if the capability would require unexpected +- parameters; that is, too many, too few, or incorrect types ++ returns a null pointer if the capability would require unexpected ++ parameters; that is, too many, too few, or incorrect types + (strings where integers are expected, or vice versa). + + <STRONG>tputs</STRONG> +- fails if the string parameter is null. It does not detect I/O +- errors: X/Open Curses states that <STRONG>tputs</STRONG> ignores the return value ++ fails if the string parameter is null. It does not detect I/O ++ errors: X/Open Curses states that <STRONG>tputs</STRONG> ignores the return value + of the output function <EM>putc</EM>. + + + </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE> +- The <STRONG>vid_attr</STRONG> function in <EM>ncurses</EM> is a special case. It was originally ++ The <STRONG>vid_attr</STRONG> function in <EM>ncurses</EM> is a special case. It was originally + implemented based on a draft of X/Open Curses, as a macro, before other +- parts of the <EM>ncurses</EM> wide-character API were developed, and unlike the +- other wide-character functions, is also provided in the non-wide- ++ parts of the <EM>ncurses</EM> wide-character API were developed, and unlike the ++ other wide-character functions, is also provided in the non-wide- + character configuration. + + + </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE> +- The functions marked as extensions were designed for <EM>ncurses</EM>, and are +- not found in SVr4 <EM>curses</EM>, 4.4BSD <EM>curses</EM>, or any other previous <EM>curses</EM> ++ The functions marked as extensions were designed for <EM>ncurses</EM>, and are ++ not found in SVr4 <EM>curses</EM>, 4.4BSD <EM>curses</EM>, or any other previous <EM>curses</EM> + implementation. + +- <EM>ncurses</EM> allows <EM>opts</EM> to be a pointer to <EM>int</EM>, which overrides the <EM>pair</EM> ++ <EM>ncurses</EM> allows <EM>opts</EM> to be a pointer to <EM>int</EM>, which overrides the <EM>pair</EM> + (<EM>short</EM>) argument. + + +@@ -444,78 +443,79 @@ + + + </PRE><H3><a name="h3-Compatibility-Macros">Compatibility Macros</a></H3><PRE> +- This implementation provides a few macros for compatibility with +- systems before SVr4 (see section "HISTORY" below). They include +- <STRONG>Bcrmode</STRONG>, <STRONG>Bfixterm</STRONG>, <STRONG>Bgettmode</STRONG>, <STRONG>Bnocrmode</STRONG>, <STRONG>Bresetterm</STRONG>, <STRONG>Bsaveterm</STRONG>, and ++ This implementation provides a few macros for compatibility with ++ systems before SVr4 (see section "HISTORY" below). They include ++ <STRONG>Bcrmode</STRONG>, <STRONG>Bfixterm</STRONG>, <STRONG>Bgettmode</STRONG>, <STRONG>Bnocrmode</STRONG>, <STRONG>Bresetterm</STRONG>, <STRONG>Bsaveterm</STRONG>, and + <STRONG>Bsetterm</STRONG>. + +- In SVr4, these are found in <EM>curses.h</EM>, but except for <STRONG>setterm</STRONG>, are ++ In SVr4, these are found in <EM>curses.h</EM>, but except for <STRONG>setterm</STRONG>, are + likewise macros. The one function, <STRONG>setterm</STRONG>, is mentioned in the manual + page. It further notes that <STRONG>setterm</STRONG> was replaced by <STRONG>setupterm</STRONG>, stating + that the call + setupterm(<EM>term</EM>, 1, (int *)0) +- provides the same functionality as <STRONG>setterm(</STRONG><EM>term</EM><STRONG>)</STRONG>, discouraging the +- latter for new programs. <EM>ncurses</EM> implements each of these symbols as ++ ++ provides the same functionality as <STRONG>setterm(</STRONG><EM>term</EM><STRONG>)</STRONG>, discouraging the ++ latter for new programs. <EM>ncurses</EM> implements each of these symbols as + macros for BSD <EM>curses</EM> compatibility. + + + </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 +- provide them without declaring them. X/Open Curses does not specify ++ Other implementions may not declare the capability name arrays. Some ++ provide them without declaring them. X/Open Curses does not specify + them. + +- Extended terminal capability names, as defined by "<STRONG>tic</STRONG> <STRONG>-x</STRONG>", are not ++ Extended terminal capability names, as defined by "<STRONG>tic</STRONG> <STRONG>-x</STRONG>", are not + stored in the arrays described here. + + + </PRE><H3><a name="h3-Output-Buffering">Output Buffering</a></H3><PRE> +- Older versions of <EM>ncurses</EM> assumed that the file descriptor passed to ++ Older versions of <EM>ncurses</EM> 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 +- terminal was left in block-buffered mode on exit (like System V +- <EM>curses</EM>), it was problematic because <EM>ncurses</EM> did not allow a reliable ++ the corresponding stream. In addition to the limitation that the ++ terminal was left in block-buffered mode on exit (like System V ++ <EM>curses</EM>), it was problematic because <EM>ncurses</EM> did not allow a reliable + way to clean up on receiving <STRONG>SIGTSTP</STRONG>. + +- The current version (ncurses6) uses output buffers managed directly by ++ The current version (ncurses6) uses output buffers managed directly by + <EM>ncurses</EM>. Some of the low-level functions described in this manual page +- write to the standard output. They are not signal-safe. The high- ++ write to the standard output. They are not signal-safe. The high- + level functions in <EM>ncurses</EM> employ alternate versions of these functions + using the more reliable buffering scheme. + + + </PRE><H3><a name="h3-Function-Prototypes">Function Prototypes</a></H3><PRE> +- The X/Open Curses prototypes are based on the SVr4 <EM>curses</EM> header +- declarations, which were defined at the same time the C language was ++ The X/Open Curses prototypes are based on the SVr4 <EM>curses</EM> header ++ declarations, which were defined at the same time the C language was + first standardized in the late 1980s. + +- <STRONG>o</STRONG> X/Open Curses uses <EM>const</EM> less effectively than a later design +- might, sometimes applying it needlessly to values that are already +- constant, and in most cases overlooking parameters that normally +- would use <EM>const</EM>. Passing <EM>const</EM>-qualified parameters to functions +- that do not declare them <EM>const</EM> may prevent the program from +- compiling. On the other hand, "writable strings" are an ++ <STRONG>o</STRONG> X/Open Curses uses <EM>const</EM> less effectively than a later design ++ might, sometimes applying it needlessly to values that are already ++ constant, and in most cases overlooking parameters that normally ++ would use <EM>const</EM>. Passing <EM>const</EM>-qualified parameters to functions ++ that do not declare them <EM>const</EM> may prevent the program from ++ compiling. On the other hand, "writable strings" are an + obsolescent feature. + +- As an extension, this implementation can be configured to change +- the function prototypes to use the <EM>const</EM> keyword. The <EM>ncurses</EM> ABI ++ As an extension, this implementation can be configured to change ++ the function prototypes to use the <EM>const</EM> keyword. The <EM>ncurses</EM> 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 +- configured to use the fixed-parameter list. Portable applications +- should provide nine parameters after the format; zeroes are fine ++ This implementation uses a variable argument list, but can be ++ configured to use the fixed-parameter list. Portable applications ++ should provide nine 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. + +- While <STRONG>tiparm</STRONG> is always provided in <EM>ncurses</EM>, the older form is only +- available as a build-time configuration option. If not specially ++ While <STRONG>tiparm</STRONG> is always provided in <EM>ncurses</EM>, the older form is only ++ available as a build-time configuration option. If not specially + configured, <STRONG>tparm</STRONG> is the same as <STRONG>tiparm</STRONG>. + + Both forms of <STRONG>tparm</STRONG> have drawbacks: +@@ -523,56 +523,56 @@ + <STRONG>o</STRONG> Most of the calls to <STRONG>tparm</STRONG> use only one or two parameters. Passing + nine on each call is awkward. + +- Using <EM>long</EM> for the numeric parameter type is a workaround to make +- the parameter use the same amount of stack as a pointer. That +- approach dates back to the mid-1980s, before C was standardized. +- Since then, there is a standard (and pointers are not required to ++ Using <EM>long</EM> for the numeric parameter type is a workaround to make ++ the parameter use the same amount of stack as a pointer. That ++ approach dates back to the mid-1980s, before C was standardized. ++ Since then, there is a standard (and pointers are not required to + fit in a <EM>long</EM>). + +- <STRONG>o</STRONG> Providing the right number of parameters for a variadic function ++ <STRONG>o</STRONG> Providing the right number of parameters for a variadic function + such as <STRONG>tiparm</STRONG> can be a problem, in particular for string +- parameters. However, only a few <EM>terminfo</EM> capabilities use string +- parameters (for instance, the ones used for programmable function ++ parameters. However, only a few <EM>terminfo</EM> capabilities use string ++ parameters (for instance, the ones used for programmable function + keys). + + The <EM>ncurses</EM> library checks usage of these capabilities, and returns +- <STRONG>ERR</STRONG> if the capability mishandles string parameters. But it cannot ++ <STRONG>ERR</STRONG> if the capability mishandles string parameters. But it cannot + check if a calling program provides strings in the right places for + the <STRONG>tparm</STRONG> calls. + +- The <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG> program checks its use of these capabilities with a ++ The <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG> program checks its use of these capabilities with a + table, so that it calls <STRONG>tparm</STRONG> correctly. + + <STRONG>Special</STRONG> <EM>TERM</EM> <STRONG>treatment</STRONG> + If configured to use the terminal driver, as with the MinGW port, + +- <STRONG>o</STRONG> <STRONG>setupterm</STRONG> interprets a missing/empty <EM>TERM</EM> variable as the special ++ <STRONG>o</STRONG> <STRONG>setupterm</STRONG> interprets a missing/empty <EM>TERM</EM> variable as the special + value "unknown". + + SVr4 <EM>curses</EM> uses the special value "dumb". + +- The difference between the two is that the former uses the +- <STRONG>generic_type</STRONG> (<STRONG>gn</STRONG>) <EM>terminfo</EM> capability, while the latter does not. ++ The difference between the two is that the former uses the ++ <STRONG>generic_type</STRONG> (<STRONG>gn</STRONG>) <EM>terminfo</EM> capability, while the latter does not. + A generic terminal is unsuitable for full-screen applications. + +- <STRONG>o</STRONG> <STRONG>setupterm</STRONG> allows explicit use of the the windows console driver by +- checking if <STRONG>$TERM</STRONG> 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 <STRONG>$TERM</STRONG> 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 SVr4, <STRONG>set_curterm</STRONG> returns an <EM>int</EM>, <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>. We have chosen to ++ In SVr4, <EM>set</EM><STRONG>_</STRONG><EM>curterm</EM> returns an <EM>int</EM>, <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>. We have chosen to + implement the X/Open Curses semantics. + +- In SVr4, the third argument of <STRONG>tputs</STRONG> has the type "<STRONG>int</STRONG> <STRONG>(*putc)(char)</STRONG>". ++ In SVr4, the third argument of <EM>tputs</EM> 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> or <STRONG>ERR</STRONG> from <STRONG>tputs</STRONG>. It instead returns the length of the ++ At least one implementation of X/Open Curses (Solaris) returns a value ++ other than <STRONG>OK</STRONG> or <STRONG>ERR</STRONG> from <EM>tputs</EM>. It instead returns the length of the + string, and does no error checking. + + + </PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE> +- SVr2 (1984) introduced the <EM>terminfo</EM> feature. Its programming manual ++ SVr2 (1984) introduced the <EM>terminfo</EM> feature. Its programming manual + mentioned the following low-level functions. + + <STRONG>Function</STRONG> <STRONG>Description</STRONG> +@@ -592,7 +592,7 @@ + <STRONG>vidattr</STRONG> like <STRONG>vidputs</STRONG>, but output through <EM>putchar</EM> + <STRONG>vidputs</STRONG> write string to terminal, applying specified attributes + +- The programming manual also mentioned functions provided for <EM>termcap</EM> ++ The programming manual also mentioned functions provided for <EM>termcap</EM> + compatibility (commenting that they "may go away at a later date"). + + <STRONG>Function</STRONG> <STRONG>Description</STRONG> +@@ -604,11 +604,11 @@ + <STRONG>tgoto</STRONG> apply parameters to given capability + <STRONG>tputs</STRONG> write characters via a function parameter, applying padding + +- Early <EM>terminfo</EM> programs obtained capability values from the <EM>TERMINAL</EM> ++ Early <EM>terminfo</EM> programs obtained capability values from the <EM>TERMINAL</EM> + structure initialized by <STRONG>setupterm</STRONG>. + +- SVr3 (1987) extended <EM>terminfo</EM> by adding functions to retrieve +- capability values (like the <EM>termcap</EM> interface), and reusing <STRONG>tgoto</STRONG> and ++ SVr3 (1987) extended <EM>terminfo</EM> by adding functions to retrieve ++ capability values (like the <EM>termcap</EM> interface), and reusing <STRONG>tgoto</STRONG> and + <STRONG>tputs</STRONG>. + + <STRONG>Function</STRONG> <STRONG>Description</STRONG> +@@ -617,7 +617,7 @@ + <STRONG>tigetnum</STRONG> get numeric entry for given <EM>id</EM> + <STRONG>tigetstr</STRONG> get string entry for given <EM>id</EM> + +- SVr3 also replaced several of the SVr2 <EM>terminfo</EM> functions that had no ++ SVr3 also replaced several of the SVr2 <EM>terminfo</EM> functions that had no + counterpart in the <EM>termcap</EM> interface, documenting them as obsolete. + + <STRONG>Function</STRONG> <STRONG>Replaced</STRONG> <STRONG>by</STRONG> +@@ -630,37 +630,37 @@ + 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 to +- handle capabilities accessed by functions such as <STRONG>vidattr</STRONG> (which used ++ 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 to ++ handle capabilities accessed by functions such as <STRONG>vidattr</STRONG> (which used + more than the two parameters supported by <STRONG>tgoto</STRONG>). + +- SVr3 introduced the functions for switching between terminal +- descriptions; for example, <STRONG>set_curterm</STRONG>. Some changes reflected ++ SVr3 introduced the functions for switching between terminal ++ descriptions; for example, <STRONG>set_curterm</STRONG>. Some changes reflected + incremental improvements to the SVr2 library. + +- <STRONG>o</STRONG> The <EM>TERMINAL</EM> type definition was introduced in SVr3.01, for the ++ <STRONG>o</STRONG> The <EM>TERMINAL</EM> type definition was introduced in SVr3.01, for the + <EM>term</EM> structure provided in SVr2. + +- <STRONG>o</STRONG> Various global variables such as <STRONG>boolnames</STRONG> were mentioned in the +- programming manual at this point, though the variables had been ++ <STRONG>o</STRONG> Various global variables such as <STRONG>boolnames</STRONG> were mentioned in the ++ programming manual at this point, though the variables had been + provided in SVr2. + + SVr4 (1989) added the <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> functions. + +- Other low-level functions are declared in the <EM>curses</EM> header files of +- Unix systems, but none are documented. Those noted as "obsolete" by ++ Other low-level functions are declared in the <EM>curses</EM> header files of ++ Unix systems, but none are documented. Those noted as "obsolete" by + SVr3 remained in use by System V's <STRONG>vi(1)</STRONG> editor. + + + </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_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>putc(3)</STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(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>putc(3)</STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, + <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> + + + +-ncurses 6.5 2024-06-08 <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_util.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_util.3x.html 2024-07-27 23:11:32.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_util.3x.html 2024-09-14 20:23:27.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_util.3x,v 1.114 2024/07/27 19:55:45 tom Exp @ ++ * @Id: curs_util.3x,v 1.116 2024/09/11 21:02:40 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_util 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_util 3x 2024-09-11 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_util 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_util 3x 2024-09-11 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG> + +@@ -405,7 +405,7 @@ + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG> ++ncurses 6.5 2024-09-11 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_variables.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_variables.3x.html 2024-06-22 22:55:09.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_variables.3x.html 2024-09-14 20:23:27.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_variables.3x,v 1.49 2024/06/22 21:25:23 tom Exp @ ++ * @Id: curs_variables.3x,v 1.51 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_variables 3x 2024-06-22 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_variables 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_variables 3x 2024-06-22 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_variables 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG> + +@@ -258,15 +258,15 @@ + + + </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_color.3x.html">curs_color(3x)</A></STRONG>, <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, +- <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> +- +- [UAX #29] "Unicode Standard Annex #29: Unicode Text Segmentation"; ++ [UAX #29] "Unicode Standard Annex #29: Unicode Text Segmentation" + <https://unicode.org/reports/tr29/> + ++ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>, <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, ++ <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> ++ + + +-ncurses 6.5 2024-06-22 <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/curs_window.3x.html +--- ncurses-6.5-20240831+/doc/html/man/curs_window.3x.html 2024-06-01 23:07:17.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/curs_window.3x.html 2024-09-14 20:23:27.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: curs_window.3x,v 1.52 2024/06/01 22:29:08 tom Exp @ ++ * @Id: curs_window.3x,v 1.54 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>curs_window 3x 2024-06-01 ncurses 6.5 Library calls</TITLE> ++<TITLE>curs_window 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">curs_window 3x 2024-06-01 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">curs_window 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG> + +@@ -54,23 +54,23 @@ + </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE> + <STRONG>#include</STRONG> <STRONG><curses.h></STRONG> + +- <STRONG>WINDOW</STRONG> <STRONG>*newwin(</STRONG> +- <STRONG>int</STRONG> <EM>nlines</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>ncols</EM><STRONG>,</STRONG> +- <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>delwin(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>mvwin(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG> +- <STRONG>WINDOW</STRONG> <STRONG>*subwin(WINDOW</STRONG> <STRONG>*</STRONG><EM>orig</EM><STRONG>,</STRONG> +- <STRONG>int</STRONG> <EM>nlines</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>ncols</EM><STRONG>,</STRONG> +- <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> +- <STRONG>WINDOW</STRONG> <STRONG>*derwin(WINDOW</STRONG> <STRONG>*</STRONG><EM>orig</EM><STRONG>,</STRONG> +- <STRONG>int</STRONG> <EM>nlines</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>ncols</EM><STRONG>,</STRONG> +- <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>mvderwin(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>par</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>par</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> +- <STRONG>WINDOW</STRONG> <STRONG>*dupwin(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG> +- <STRONG>void</STRONG> <STRONG>wsyncup(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG> +- <STRONG>int</STRONG> <STRONG>syncok(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>,</STRONG> <STRONG>bool</STRONG> <EM>bf</EM><STRONG>);</STRONG> +- <STRONG>void</STRONG> <STRONG>wcursyncup(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG> +- <STRONG>void</STRONG> <STRONG>wsyncdown(WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM><STRONG>);</STRONG> ++ <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>newwin(</STRONG> ++ <STRONG>int</STRONG> <EM>nlines</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>ncols</EM><STRONG>,</STRONG> ++ <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>delwin(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>mvwin(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>);</STRONG> ++ <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>subwin(WINDOW</STRONG> <STRONG>*</STRONG> <EM>orig</EM><STRONG>,</STRONG> ++ <STRONG>int</STRONG> <EM>nlines</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>ncols</EM><STRONG>,</STRONG> ++ <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> ++ <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>derwin(WINDOW</STRONG> <STRONG>*</STRONG> <EM>orig</EM><STRONG>,</STRONG> ++ <STRONG>int</STRONG> <EM>nlines</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>ncols</EM><STRONG>,</STRONG> ++ <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>begin</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>mvderwin(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>par</EM><STRONG>_</STRONG><EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>par</EM><STRONG>_</STRONG><EM>x</EM><STRONG>);</STRONG> ++ <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>dupwin(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>);</STRONG> ++ <STRONG>void</STRONG> <STRONG>wsyncup(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>);</STRONG> ++ <STRONG>int</STRONG> <STRONG>syncok(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>bool</STRONG> <EM>bf</EM><STRONG>);</STRONG> ++ <STRONG>void</STRONG> <STRONG>wcursyncup(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>);</STRONG> ++ <STRONG>void</STRONG> <STRONG>wsyncdown(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>);</STRONG> + + + </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> +@@ -248,7 +248,7 @@ + + + +-ncurses 6.5 2024-06-01 <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="curs_window.3x.html">curs_window(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/infocmp.1m.html +--- ncurses-6.5-20240831+/doc/html/man/infocmp.1m.html 2024-05-11 21:39:58.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/infocmp.1m.html 2024-09-14 20:23:28.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: infocmp.1m,v 1.110 2024/05/11 20:39:53 tom Exp @ ++ * @Id: infocmp.1m,v 1.112 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>infocmp 1m 2024-05-11 ncurses 6.5 User commands</TITLE> ++<TITLE>infocmp 1m 2024-09-14 ncurses 6.5 User commands</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">infocmp 1m 2024-05-11 ncurses 6.5 User commands</H1> ++<H1 class="no-header">infocmp 1m 2024-09-14 ncurses 6.5 User commands</H1> + <PRE> + <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> User commands <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> + +@@ -52,10 +52,9 @@ + + + </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE> +- <STRONG>infocmp</STRONG> [<STRONG>-1cCdDeEFgGiIKlLnpqrtTuUVWx</STRONG>] +- [<STRONG>-v</STRONG> <EM>n</EM>] [<STRONG>-s</STRONG> <STRONG>d</STRONG>| <STRONG>i</STRONG>| <STRONG>l</STRONG>| <STRONG>c</STRONG>] [<STRONG>-Q</STRONG> <EM>n</EM>] [<STRONG>-R</STRONG> <STRONG>subset</STRONG>] +- [<STRONG>-w</STRONG> <EM>width</EM>] [<STRONG>-A</STRONG> <EM>directory</EM>] [<STRONG>-B</STRONG> <EM>directory</EM>] +- [<EM>terminal-type</EM> ...] ++ <STRONG>infocmp</STRONG> [<STRONG>-1cCdDeEFgGiIKlLnpqrtTuUVWx]</STRONG> [<STRONG>-A</STRONG> <EM>directory</EM>] [<STRONG>-B</STRONG> <EM>directory</EM>] ++ [<STRONG>-Q</STRONG> <EM>encoding</EM>] [<STRONG>-R</STRONG> <EM>subset</EM>] [<STRONG>-s</STRONG> <EM>key</EM>] [<STRONG>-v</STRONG> <EM>level</EM>] [<STRONG>-w</STRONG> <EM>width</EM>] ++ [<EM>terminal-type</EM> ... ] + + + </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> +@@ -84,7 +83,7 @@ + + <STRONG>o</STRONG> <STRONG>NULL</STRONG> for missing integer or string variables + +- Use the <STRONG>-q</STRONG> option to show the distinction between <EM>absent</EM> and <EM>cancelled</EM> ++ Use the <STRONG>-q</STRONG> option to show the distinction between <EM>absent</EM> and <EM>canceled</EM> + capabilities. + + These options produce a list which you can use to compare two or more +@@ -217,7 +216,7 @@ + are superfluous. <STRONG>infocmp</STRONG> will flag any other <EM>terminal-type</EM> <EM>use=</EM> fields + that were not needed. + +- <STRONG>Changing</STRONG> <STRONG>Databases</STRONG> <STRONG>[-A</STRONG> <EM>directory</EM>] [-B <EM>directory</EM>] ++ <STRONG>Changing</STRONG> <STRONG>Databases</STRONG> <STRONG>[-A</STRONG> <STRONG><EM>directory</EM></STRONG><STRONG>]</STRONG> <STRONG>[-B</STRONG> <STRONG><EM>directory</EM></STRONG><STRONG>]</STRONG> + Like other <EM>ncurses</EM> utilities, <STRONG>infocmp</STRONG> looks for the terminal + descriptions in several places. You can use the <EM>TERMINFO</EM> and + <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM> environment variables to override the compiled-in default +@@ -313,10 +312,10 @@ + LL home-down + RSR reset scroll region + ----------------------------------------- +- + DECSTR soft reset (VT320) + S7C1T 7-bit controls (VT220) + ----------------------------------------- ++ + ISO DEC G0 enable DEC graphics for G0 + ISO UK G0 enable UK chars for G0 + ISO US G0 enable US chars for G0 +@@ -378,7 +377,7 @@ + and using "-" for absent capabilities, "@" for canceled rather + than "NULL". + +- <STRONG>o</STRONG> However, show differences between absent and cancelled ++ <STRONG>o</STRONG> However, show differences between absent and canceled + capabilities. + + <STRONG>o</STRONG> Omit the "Reconstructed from" comment for source listings. +@@ -472,7 +471,7 @@ + The <STRONG>-0</STRONG>, <STRONG>-1</STRONG>, <STRONG>-E</STRONG>, <STRONG>-F</STRONG>, <STRONG>-G</STRONG>, <STRONG>-Q</STRONG>, <STRONG>-R</STRONG>, <STRONG>-T</STRONG>, <STRONG>-V</STRONG>, <STRONG>-a</STRONG>, <STRONG>-e</STRONG>, <STRONG>-f</STRONG>, <STRONG>-g</STRONG>, <STRONG>-i</STRONG>, <STRONG>-l</STRONG>, <STRONG>-p</STRONG>, <STRONG>-q</STRONG> + and <STRONG>-t</STRONG> options are not supported in SVr4 curses. + +- SVr4 infocmp does not distinguish between absent and cancelled ++ SVr4 infocmp does not distinguish between absent and canceled + capabilities. Also, it shows missing integer capabilities as <STRONG>-1</STRONG> (the + internal value used to represent missing integers). This + implementation shows those as "NULL", for consistency with missing +@@ -531,7 +530,7 @@ + + + +-ncurses 6.5 2024-05-11 <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/legacy_coding.3x.html +--- ncurses-6.5-20240831+/doc/html/man/legacy_coding.3x.html 2024-07-27 23:11:33.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/legacy_coding.3x.html 2024-09-14 20:23:28.000000000 +0000 +@@ -28,19 +28,19 @@ + * authorization. * + **************************************************************************** + * Author: Thomas E. Dickey +- * @Id: legacy_coding.3x,v 1.30 2024/07/27 19:44:30 tom Exp @ ++ * @Id: legacy_coding.3x,v 1.32 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>legacy_coding 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>legacy_coding 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">legacy_coding 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">legacy_coding 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="legacy_coding.3x.html">legacy_coding(3x)</A></STRONG> Library calls <STRONG><A HREF="legacy_coding.3x.html">legacy_coding(3x)</A></STRONG> + +@@ -58,11 +58,11 @@ + + + </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> +- <STRONG>use_legacy_coding</STRONG> is an extension to the <EM>curses</EM> library. It allows the +- caller to change the result of <STRONG><A HREF="unctrl.3x.html">unctrl(3x)</A></STRONG>, suppressing <STRONG>isprint(3)</STRONG>-based ++ <STRONG>use_legacy_coding</STRONG>, an <EM>ncurses</EM> extension to the <EM>curses</EM> library, permits ++ customiztion of <STRONG><A HREF="unctrl.3x.html">unctrl(3x)</A></STRONG> behavior, suppressing <STRONG>isprint(3)</STRONG>-based + checks within the library that would normally cause nonprinting + characters to be rendered in visible form. The alteration affects only +- eight-bit characters. ++ byte-wide characters with the most significant bit set. + + The <EM>level</EM> parameter controls the result. + +@@ -105,7 +105,7 @@ + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="legacy_coding.3x.html">legacy_coding(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="legacy_coding.3x.html">legacy_coding(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/ncurses.3x.html +--- ncurses-6.5-20240831+/doc/html/man/ncurses.3x.html 2024-07-27 23:11:34.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/ncurses.3x.html 2024-09-14 20:23:28.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: ncurses.3x,v 1.229 2024/07/27 20:10:07 tom Exp @ ++ * @Id: ncurses.3x,v 1.231 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>ncurses 3x 2024-07-27 ncurses 6.5 Library calls</TITLE> ++<TITLE>ncurses 3x 2024-09-14 ncurses 6.5 Library calls</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">ncurses 3x 2024-07-27 ncurses 6.5 Library calls</H1> ++<H1 class="no-header">ncurses 3x 2024-09-14 ncurses 6.5 Library calls</H1> + <PRE> + <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> Library calls <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> + +@@ -57,11 +57,11 @@ + + </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> + The "new curses" library offers the programmer a terminal-independent +- means of reading keyboard and mouse input and updating character-cell +- terminals with output optimized to minimize screen updates. <EM>ncurses</EM> ++ means of reading keyboard and mouse input and writing to character-cell ++ displays with output optimized to minimize screen updates. <EM>ncurses</EM> + replaces the <EM>curses</EM> libraries from System V Release 4 Unix ("SVr4") and + 4.4BSD Unix, the development of which ceased in the 1990s. This +- document describes <EM>ncurses</EM> version 6.5 (patch 20240727). ++ document describes <EM>ncurses</EM> version 6.5 (patch 20240914). + + <EM>ncurses</EM> permits control of the terminal screen's contents; abstraction + and subdivision thereof with <EM>windows</EM> and <EM>pads</EM>; acquisition of keyboard +@@ -122,7 +122,7 @@ + behavior from the library when the locale has not been set up. + + <STRONG><A HREF="curs_initscr.3x.html">initscr(3x)</A></STRONG> or <STRONG><A HREF="curs_initscr.3x.html">newterm(3x)</A></STRONG> must be called to initialize <EM>curses</EM> before +- use of any functions that deal with windows and screens. ++ use of any functions that access or manipulate windows or screens. + + To get character-at-a-time input without echoing--most interactive, + screen-oriented programs want this--use the following sequence. +@@ -232,7 +232,7 @@ + The "w" function is typically the elemental one; the removal of this + prefix usually indicates operation on <STRONG>stdscr</STRONG>. + +- Four functions prefixed with "p" require a pad argument. ++ Four functions prefixed with "p" require a <EM>pad</EM> argument; see below. + + In function synopses, <EM>ncurses</EM> man pages apply the following names to + parameters. We introduce the character types in the next subsection. +@@ -280,60 +280,59 @@ + variants to their non-wide counterparts; where a non-wide + function name contains "ch" or "str", prefix it with "_w" to + obtain the wide counterpart. For example, <STRONG>waddch</STRONG> becomes +- <STRONG>wadd_wch</STRONG>. (Exceptions that add only "w" comprise <STRONG>addwstr</STRONG>, +- <STRONG>inwstr</STRONG>, and their variants.) Another exception is <STRONG>ins_nwstr</STRONG> +- and its variants, which is spelled thus instead of +- "insn_wstr". ++ <STRONG>wadd_wch</STRONG>. Another exception is <STRONG>ins_nwstr</STRONG> (and its variants), ++ spelled thus instead of "insn_wstr". (Exceptions that add ++ only "w" comprise <STRONG>addwstr</STRONG>, <STRONG>inwstr</STRONG>, and their variants.) + +- This convention is inapplicable to some non-wide function ++ This convention is inapplicable to some non-wide function + names, so other transformations are used for the wide + configuration: the window background management function +- "bkgd" becomes "bkgrnd"; the window border-drawing and +- -clearing functions are suffixed with "_set"; and character +- attribute manipulation functions like "attron" become ++ "bkgd" becomes "bkgrnd"; the window border-drawing and ++ -clearing functions are suffixed with "_set"; and character ++ attribute manipulation functions like "attron" become + "attr_on". + + <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> is a <EM>curses</EM> <EM>complex</EM> <EM>character</EM> and corresponds to the +- non-wide configuration's <EM>chtype</EM>. It is a structure +- type because it requires more storage than a +- standard scalar type offers. A character code may +- not be representable as a <EM>char</EM>, and moreover more ++ non-wide configuration's <EM>chtype</EM>. It is a structure ++ type because it requires more storage than a ++ standard scalar type offers. A character code may ++ not be representable as a <EM>char</EM>, and moreover more + than one character may occupy a cell (as with accent +- marks and other diacritics). Each character is of ++ marks and other diacritics). Each character is of + type <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM>; a complex character contains one + spacing character and zero or more non-spacing +- characters (see below). A string of complex +- characters ends with a <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> whose <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> member +- is the null wide character. Attributes and a color ++ characters (see below). A string of complex ++ characters ends with a <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> whose <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> member ++ is the null wide character. Attributes and a color + pair identifier are stored in separate fields of the + structure, not combined into an integer as in + <EM>chtype</EM>. + + Each cell of a <EM>WINDOW</EM> is stored as a <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>. + +- <STRONG><A HREF="curs_getcchar.3x.html">setcchar(3x)</A></STRONG> and <STRONG><A HREF="curs_getcchar.3x.html">getcchar(3x)</A></STRONG> store and retrieve <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> +- data. The wide library API of <EM>ncurses</EM> depends on two data ++ <STRONG><A HREF="curs_getcchar.3x.html">setcchar(3x)</A></STRONG> and <STRONG><A HREF="curs_getcchar.3x.html">getcchar(3x)</A></STRONG> store and retrieve <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM> ++ data. The wide library API of <EM>ncurses</EM> depends on two data + types standardized by ISO C95. + +- <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> stores a wide character. Like <EM>chtype</EM>, it may be an +- alias of <EM>int</EM>. Depending on the character encoding, +- a wide character may be <EM>spacing</EM>, meaning that it +- occupies a character cell by itself and typically +- accompanies cursor advancement, or <EM>non-spacing</EM>, +- meaning that it occupies the same cell as a spacing +- character, is often regarded as a "modifier" of the +- base glyph with which it combines, and typically ++ <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> stores a wide character. Like <EM>chtype</EM>, it may be an ++ alias of <EM>int</EM>. Depending on the character encoding, ++ a wide character may be <EM>spacing</EM>, meaning that it ++ occupies a character cell by itself and typically ++ accompanies cursor advancement, or <EM>non-spacing</EM>, ++ meaning that it occupies the same cell as a spacing ++ character, is often regarded as a "modifier" of the ++ base glyph with which it combines, and typically + does not advance the cursor. + +- <EM>wint</EM><STRONG>_</STRONG><EM>t</EM> can store a <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> or the constant <STRONG>WEOF</STRONG>, +- analogously to the <EM>int</EM>-sized character manipulation ++ <EM>wint</EM><STRONG>_</STRONG><EM>t</EM> can store a <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> or the constant <STRONG>WEOF</STRONG>, ++ analogously to the <EM>int</EM>-sized character manipulation + functions of ISO C and its constant <STRONG>EOF</STRONG>. + + + </PRE><H3><a name="h3-Function-Name-Index">Function Name Index</a></H3><PRE> + The following table lists the <EM>curses</EM> functions provided in the non-wide +- and wide APIs and the corresponding man pages that describe them. +- Those flagged with "*" are <EM>ncurses</EM>-specific, neither described by ++ and wide APIs and the corresponding man pages that describe them. ++ Those flagged with "*" are <EM>ncurses</EM>-specific, neither described by + X/Open Curses nor present in SVr4. + + <STRONG><EM>curses</EM></STRONG> Function Name Man Page +@@ -385,8 +384,8 @@ + def_prog_mode <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> + def_shell_mode <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> + define_key <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>* +- + del_curterm <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> ++ + delay_output <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG> + delch <STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG> + deleteln <STRONG><A HREF="curs_deleteln.3x.html">curs_deleteln(3x)</A></STRONG> +@@ -452,8 +451,8 @@ + in_wch <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG> + in_wchnstr <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG> + in_wchstr <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG> +- + inch <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG> ++ + inchnstr <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG> + inchstr <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG> + init_color <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG> +@@ -519,8 +518,8 @@ + mvaddnstr <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG> + mvaddnwstr <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG> + mvaddstr <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG> +- + mvaddwstr <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG> ++ + mvchgat <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG> + mvcur <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG> + mvdelch <STRONG><A HREF="curs_delch.3x.html">curs_delch(3x)</A></STRONG> +@@ -586,8 +585,8 @@ + mvwins_wch <STRONG><A HREF="curs_ins_wch.3x.html">curs_ins_wch(3x)</A></STRONG> + mvwins_wstr <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG> + mvwinsch <STRONG><A HREF="curs_insch.3x.html">curs_insch(3x)</A></STRONG> +- + mvwinsnstr <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG> ++ + mvwinsstr <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG> + mvwinstr <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG> + mvwinwstr <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG> +@@ -653,8 +652,8 @@ + slk_attr_set <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> + slk_attroff <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> + slk_attron <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> +- + slk_attrset <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> ++ + slk_clear <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> + slk_color <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> + slk_init <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> +@@ -720,8 +719,8 @@ + wadd_wchstr <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG> + waddch <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG> + waddchnstr <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG> +- + waddchstr <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG> ++ + waddnstr <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG> + waddnwstr <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG> + waddstr <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG> +@@ -787,8 +786,8 @@ + wprintw <STRONG><A HREF="curs_printw.3x.html">curs_printw(3x)</A></STRONG> + wredrawln <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> + wrefresh <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> +- + wresize <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG>* ++ + wscanw <STRONG><A HREF="curs_scanw.3x.html">curs_scanw(3x)</A></STRONG> + wscrl <STRONG><A HREF="curs_scroll.3x.html">curs_scroll(3x)</A></STRONG> + wsetscrreg <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> +@@ -802,43 +801,43 @@ + wvline <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG> + wvline_set <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG> + +- <EM>ncurses</EM>'s <EM>screen-pointer</EM> <EM>extension</EM> adds additional functions +- corresponding to many of the above, each with an "_sp" suffix; see ++ <EM>ncurses</EM>'s <EM>screen-pointer</EM> <EM>extension</EM> adds additional functions ++ corresponding to many of the above, each with an "_sp" suffix; see + <STRONG><A HREF="curs_sp_funcs.3x.html">curs_sp_funcs(3x)</A></STRONG>. + +- The availability of some extensions is configurable when <EM>ncurses</EM> is +- compiled; see sections "ALTERNATE CONFIGURATIONS" and "EXTENSIONS" ++ The availability of some extensions is configurable when <EM>ncurses</EM> is ++ compiled; see sections "ALTERNATE CONFIGURATIONS" and "EXTENSIONS" + below. + + + </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> +- Unless otherwise noted, functions that return integers return the +- constants <STRONG>OK</STRONG> on success and <STRONG>ERR</STRONG> on failure; see <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>. +- Functions that return pointers return <STRONG>NULL</STRONG> on failure. Typically, +- <EM>ncurses</EM> treats a null pointer passed as a function parameter as a +- failure. Functions prefixed with "mv" first perform cursor movement ++ Unless otherwise noted, functions that return integers return the ++ constants <STRONG>OK</STRONG> on success and <STRONG>ERR</STRONG> on failure; see <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>. ++ Functions that return pointers return <STRONG>NULL</STRONG> on failure. Typically, ++ <EM>ncurses</EM> treats a null pointer passed as a function parameter as a ++ failure. Functions prefixed with "mv" first perform cursor movement + and fail if the position (<EM>y</EM>, <EM>x</EM>) is outside the window boundaries. + + + </PRE><H2><a name="h2-ENVIRONMENT">ENVIRONMENT</a></H2><PRE> +- The following symbols from the process environment customize the +- runtime behavior of <EM>ncurses</EM> applications. The library may be +- configured to disregard the variables <EM>TERMINFO</EM>, <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM>, +- <EM>TERMPATH</EM>, and <EM>HOME</EM>, if the user is the superuser (root), or the ++ The following symbols from the process environment customize the ++ runtime behavior of <EM>ncurses</EM> applications. The library may be ++ configured to disregard the variables <EM>TERMINFO</EM>, <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM>, ++ <EM>TERMPATH</EM>, and <EM>HOME</EM>, if the user is the superuser (root), or the + application uses <STRONG>setuid(2)</STRONG> or <STRONG>setgid(2)</STRONG>. + + + </PRE><H3><a name="h3-BAUDRATE"><EM>BAUDRATE</EM></a></H3><PRE> +- The debugging library checks this variable when the application has +- redirected output to a file. Its integral value is used for the baud +- rate. If that value is absent or invalid, <EM>ncurses</EM> uses 9600. This +- feature allows developers to construct repeatable test cases that take +- into account optimization decisions that depend on the terminal's line +- speed. ++ The debugging library checks this variable when the application has ++ redirected output to a file. <EM>ncurses</EM> interprets its integral value as ++ the terminal's line speed in bits per second. If that value is absent ++ or invalid, <EM>ncurses</EM> uses 9600. This feature allows developers to ++ construct repeatable test cases that take into account optimization ++ decisions that depend on the terminal's line speed. + + + </PRE><H3><a name="h3-CC-_command-character_"><EM>CC</EM> (command character)</a></H3><PRE> +- When set, the <STRONG>command_character</STRONG> (<STRONG>cmdch</STRONG>) capability value of loaded ++ When set, the <STRONG>command_character</STRONG> (<STRONG>cmdch</STRONG>) capability value of loaded + <EM>terminfo</EM> entries changes to the value of this variable. Very few <EM>term-</EM> + <EM>info</EM> entries provide this feature. + +@@ -849,9 +848,10 @@ + + </PRE><H3><a name="h3-COLUMNS"><EM>COLUMNS</EM></a></H3><PRE> + This variable specifies the width of the screen in characters. +- Applications running in a windowing environment usually are able to +- obtain the width of the window in which they are executing. If <EM>COLUMNS</EM> +- is not defined and the terminal's screen size is not available from the ++ Applications running in a windowing environment usually are able to ++ obtain the width of the window in which they are executing. <EM>ncurses</EM> ++ enforces an upper limit of 512 when reading the value. If <EM>COLUMNS</EM> is ++ not defined and the terminal's screen size is not available from the + terminal driver, <EM>ncurses</EM> uses the size specified by the <STRONG>columns</STRONG> (<STRONG>cols</STRONG>) + capability of the terminal type's entry in the <EM>terminfo</EM> database, if + any. +@@ -864,177 +864,176 @@ + overrides the library's use of the screen size obtained from the + operating system. + +- The <EM>COLUMNS</EM> and <EM>LINES</EM> variables may be specified independently. +- <EM>ncurses</EM> enforces an upper limit of 512 on each when reading the value. +- This property is useful to circumvent misfeatures of legacy terminal +- type descriptions; <STRONG>xterm(1)</STRONG> descriptions specifying 65 lines were once +- notorious. For best results, avoid specifying <STRONG>cols</STRONG> and <STRONG>lines</STRONG> ++ The <EM>COLUMNS</EM> and <EM>LINES</EM> variables may be specified independently. This ++ property is useful to circumvent misfeatures of legacy terminal type ++ descriptions; <STRONG>xterm(1)</STRONG> descriptions specifying 65 lines were once ++ notorious. For best results, avoid specifying <STRONG>cols</STRONG> and <STRONG>lines</STRONG> + capability codes in <EM>terminfo</EM> descriptions of terminal emulators. + +- <STRONG><A HREF="curs_util.3x.html">use_env(3x)</A></STRONG> can disable use of the process environment in determining +- the screen size. <STRONG><A HREF="curs_util.3x.html">use_tioctl(3x)</A></STRONG> can update <EM>COLUMNS</EM> and <EM>LINES</EM> to match ++ <STRONG><A HREF="curs_util.3x.html">use_env(3x)</A></STRONG> can disable use of the process environment in determining ++ the screen size. <STRONG><A HREF="curs_util.3x.html">use_tioctl(3x)</A></STRONG> can update <EM>COLUMNS</EM> and <EM>LINES</EM> to match + the screen size obtained from system calls or the terminal database. + + + </PRE><H3><a name="h3-ESCDELAY"><EM>ESCDELAY</EM></a></H3><PRE> +- For <EM>curses</EM> to distinguish the ESC character resulting from a user's +- press of the "Escape" key on the input device from one beginning an ++ For <EM>curses</EM> to distinguish the ESC character resulting from a user's ++ press of the "Escape" key on the input device from one beginning an + <EM>escape</EM> <EM>sequence</EM> (as commonly produced by function keys), it waits after +- receiving the escape character to see if further characters are +- available on the input stream within a short interval. A global +- variable <STRONG>ESCDELAY</STRONG> stores this interval in milliseconds. The default ++ receiving the escape character to see if further characters are ++ available on the input stream within a short interval. A global ++ variable <STRONG>ESCDELAY</STRONG> stores this interval in milliseconds. The default + value of 1000 (one second) is adequate for most uses. This environment +- variable overrides it; <EM>ncurses</EM> enforces an upper limit of 30,000 (30 ++ variable overrides it; <EM>ncurses</EM> enforces an upper limit of 30,000 (30 + seconds) when reading the value. + +- The most common instance where you may wish to change this value is to ++ The most common instance where you may wish to change this value is to + work with a remote host over a slow communication channel. If the host +- running a <EM>curses</EM> application does not receive the characters of an +- escape sequence in a timely manner, the library can interpret them as ++ running a <EM>curses</EM> application does not receive the characters of an ++ escape sequence in a timely manner, the library can interpret them as + multiple key stroke events. + + <STRONG>xterm(1)</STRONG> mouse events are a form of escape sequence; therefore, if your +- application makes heavy use of multiple-clicking, you may wish to +- lengthen the default value because the delay applies to the composite ++ application makes heavy use of multiple-clicking, you may wish to ++ lengthen the default value because the delay applies to the composite + multi-click event as well as the individual clicks. + +- Portable applications should not rely upon the presence of <STRONG>ESCDELAY</STRONG> in +- either form, but setting the environment variable rather than the ++ Portable applications should not rely upon the presence of <STRONG>ESCDELAY</STRONG> in ++ either form, but setting the environment variable rather than the + global variable does not create problems when compiling an application. + +- If <STRONG><A HREF="curs_inopts.3x.html">keypad(3x)</A></STRONG> is disabled for the <EM>curses</EM> window receiving input, a ++ If <STRONG><A HREF="curs_inopts.3x.html">keypad(3x)</A></STRONG> is disabled for the <EM>curses</EM> window receiving input, a + program must disambiguate escape sequences itself. + + + </PRE><H3><a name="h3-HOME"><EM>HOME</EM></a></H3><PRE> +- <EM>ncurses</EM> may read and write auxiliary terminal descriptions in <EM>.termcap</EM> ++ <EM>ncurses</EM> may read and write auxiliary terminal descriptions in <EM>.termcap</EM> + and <EM>.terminfo</EM> files in the user's home directory. + + + </PRE><H3><a name="h3-LINES"><EM>LINES</EM></a></H3><PRE> +- This counterpart to <EM>COLUMNS</EM> specifies the height of the screen in +- characters. The corresponding <EM>terminfo</EM> capability and code is <STRONG>lines</STRONG>. ++ This counterpart to <EM>COLUMNS</EM> specifies the height of the screen in ++ characters. The corresponding <EM>terminfo</EM> capability and code is <STRONG>lines</STRONG>. + See the description of the <EM>COLUMNS</EM> variable above. + + + </PRE><H3><a name="h3-MOUSE_BUTTONS_123"><EM>MOUSE_BUTTONS_123</EM></a></H3><PRE> +- (OS/2 EMX port only) OS/2 numbers a three-button mouse inconsistently +- with other platforms, such that 1 is the left button, 2 the right, and +- 3 the middle. This variable customizes the mouse button numbering. +- Its value must be three digits 1-3 in any order. By default, <EM>ncurses</EM> ++ (OS/2 EMX port only) OS/2 numbers a three-button mouse inconsistently ++ with other platforms, such that 1 is the left button, 2 the right, and ++ 3 the middle. This variable customizes the mouse button numbering. ++ Its value must be three digits 1-3 in any order. By default, <EM>ncurses</EM> + assumes a numbering of "132". + + + </PRE><H3><a name="h3-NCURSES_ASSUMED_COLORS"><EM>NCURSES_ASSUMED_COLORS</EM></a></H3><PRE> +- If set, this variable overrides the <EM>ncurses</EM> library's compiled-in +- assumption that the terminal's default colors are white on black; see +- <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>. Set the foreground and background color values +- with this environment variable by assigning it two integer values ++ If set, this variable overrides the <EM>ncurses</EM> library's compiled-in ++ assumption that the terminal's default colors are white on black; see ++ <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>. Set the foreground and background color values ++ with this environment variable by assigning it two integer values + separated by a comma, indicating foregound and background color + numbers, respectively. + +- For example, to tell <EM>ncurses</EM> not to assume anything about the colors, +- use a value of "-1,-1". To make the default color scheme green on +- black, use "2,0". <EM>ncurses</EM> accepts integral values from -1 up to the ++ For example, to tell <EM>ncurses</EM> not to assume anything about the colors, ++ use a value of "-1,-1". To make the default color scheme green on ++ black, use "2,0". <EM>ncurses</EM> accepts integral values from -1 up to the + value of the <EM>terminfo</EM> <STRONG>max_colors</STRONG> (<STRONG>colors</STRONG>) capability. + + + </PRE><H3><a name="h3-NCURSES_CONSOLE2"><EM>NCURSES_CONSOLE2</EM></a></H3><PRE> +- (MinGW port only) The <EM>Console2</EM> program defectively handles the +- Microsoft Console API call <EM>CreateConsoleScreenBuffer</EM>. Applications +- that use it will hang. However, it is possible to simulate the action +- of this call by mapping coordinates, explicitly saving and restoring +- the original screen contents. Setting the environment variable <EM>NCGDB</EM> ++ (MinGW port only) The <EM>Console2</EM> program defectively handles the ++ Microsoft Console API call <EM>CreateConsoleScreenBuffer</EM>. Applications ++ that use it will hang. However, it is possible to simulate the action ++ of this call by mapping coordinates, explicitly saving and restoring ++ the original screen contents. Setting the environment variable <EM>NCGDB</EM> + has the same effect. + + + </PRE><H3><a name="h3-NCURSES_GPM_TERMS"><EM>NCURSES_GPM_TERMS</EM></a></H3><PRE> +- (Linux only) When <EM>ncurses</EM> is configured to use the GPM interface, this +- variable may list one or more terminal type names, delimited by +- vertical bars (<STRONG>|</STRONG>) or colons (<STRONG>:</STRONG>), against which the <EM>TERM</EM> variable (see +- below) is matched. An empty value disables the GPM interface, using +- <EM>ncurses</EM>'s built-in support for <STRONG>xterm(1)</STRONG> mouse protocols instead. If +- the variable is absent, <EM>ncurses</EM> attempts to open GPM if <EM>TERM</EM> contains ++ (Linux only) When <EM>ncurses</EM> is configured to use the GPM interface, this ++ variable may list one or more terminal type names, delimited by ++ vertical bars (<STRONG>|</STRONG>) or colons (<STRONG>:</STRONG>), against which the <EM>TERM</EM> variable (see ++ below) is matched. An empty value disables the GPM interface, using ++ <EM>ncurses</EM>'s built-in support for <STRONG>xterm(1)</STRONG> mouse protocols instead. If ++ the variable is absent, <EM>ncurses</EM> attempts to open GPM if <EM>TERM</EM> contains + "linux". + + + </PRE><H3><a name="h3-NCURSES_NO_HARD_TABS"><EM>NCURSES_NO_HARD_TABS</EM></a></H3><PRE> +- <EM>ncurses</EM> may use tab characters in cursor movement optimization. In +- some cases, your terminal driver may not handle them properly. Set ++ <EM>ncurses</EM> may use tab characters in cursor movement optimization. In ++ some cases, your terminal driver may not handle them properly. Set + this environment variable to any value to disable the feature. You can + also adjust your <STRONG>stty(1)</STRONG> settings to avoid the problem. + + + </PRE><H3><a name="h3-NCURSES_NO_MAGIC_COOKIE"><EM>NCURSES_NO_MAGIC_COOKIE</EM></a></H3><PRE> +- Many terminals store video attributes as a property of a character +- cell, as <EM>curses</EM> does. Historically, some recorded changes in video +- attributes as data that logically <EM>occupies</EM> character cells on the +- display, switching attributes on or off, similarly to tags in a markup +- language; these are termed "magic cookies", and must be subsequently +- overprinted. If the <EM>terminfo</EM> entry for your terminal type does not ++ Many terminals store video attributes as a property of a character ++ cell, as <EM>curses</EM> does. Historically, some recorded changes in video ++ attributes as data that logically <EM>occupies</EM> character cells on the ++ display, switching attributes on or off, similarly to tags in a markup ++ language; these are termed "magic cookies", and must be subsequently ++ overprinted. If the <EM>terminfo</EM> entry for your terminal type does not + adequately describe its handling of magic cookies, set this variable to + any value to instruct <EM>ncurses</EM> to disable attributes entirely. + + + </PRE><H3><a name="h3-NCURSES_NO_PADDING"><EM>NCURSES_NO_PADDING</EM></a></H3><PRE> + Most terminal type descriptions in the <EM>terminfo</EM> database detail +- hardware devices. Many people use <EM>curses</EM>-based applications in +- terminal emulator programs that run in a windowing environment. These +- programs can duplicate all of the important features of a hardware +- terminal, but often lack their limitations. Chief among these absent ++ hardware devices. Many people use <EM>curses</EM>-based applications in ++ terminal emulator programs that run in a windowing environment. These ++ programs can duplicate all of the important features of a hardware ++ terminal, but often lack their limitations. Chief among these absent + drawbacks is the problem of data flow management; that is, limiting the +- speed of communication to what the hardware could handle. Unless a +- hardware terminal is interfaced into a terminal concentrator (which +- does flow control), an application must manage flow itself to prevent ++ speed of communication to what the hardware could handle. Unless a ++ hardware terminal is interfaced into a terminal concentrator (which ++ does flow control), an application must manage flow itself to prevent + overruns and data loss. + +- A solution that comes at no hardware cost is for an application to +- pause after directing a terminal to execute an operation that it +- performs slowly, such as clearing the display. Many terminal type +- descriptions, including that for the VT100, embed delay specifications +- in capabilities. You may wish to use these terminal descriptions +- without paying the performance penalty. Set <EM>NCURSES</EM><STRONG>_</STRONG><EM>NO</EM><STRONG>_</STRONG><EM>PADDING</EM> to any +- value to disable all but mandatory padding. Mandatory padding is used ++ A solution that comes at no hardware cost is for an application to ++ pause after directing a terminal to execute an operation that it ++ performs slowly, such as clearing the display. Many terminal type ++ descriptions, including that for the VT100, embed delay specifications ++ in capabilities. You may wish to use these terminal descriptions ++ without paying the performance penalty. Set <EM>NCURSES</EM><STRONG>_</STRONG><EM>NO</EM><STRONG>_</STRONG><EM>PADDING</EM> to any ++ value to disable all but mandatory padding. Mandatory padding is used + by such terminal capabilities as <STRONG>flash_screen</STRONG> (<STRONG>flash</STRONG>). + + + </PRE><H3><a name="h3-NCURSES_NO_SETBUF"><EM>NCURSES_NO_SETBUF</EM></a></H3><PRE> +- (Obsolete) Prior to internal changes developed in <EM>ncurses</EM> 5.9 (patches +- 20120825 through 20130126), the library used <STRONG>setbuf(3)</STRONG> to enable fully +- buffered output when initializing the terminal. This was done, as in +- SVr4 <EM>curses</EM>, to increase performance. For testing purposes, both of +- <EM>ncurses</EM> and of certain applications, this feature was made optional. +- Setting this variable disabled output buffering, leaving the output ++ (Obsolete) Prior to internal changes developed in <EM>ncurses</EM> 5.9 (patches ++ 20120825 through 20130126), the library used <STRONG>setbuf(3)</STRONG> to enable fully ++ buffered output when initializing the terminal. This was done, as in ++ SVr4 <EM>curses</EM>, to increase performance. For testing purposes, both of ++ <EM>ncurses</EM> and of certain applications, this feature was made optional. ++ Setting this variable disabled output buffering, leaving the output + stream in the original (usually line-buffered) mode. + +- Nowadays, <EM>ncurses</EM> performs its own buffering and does not require this +- workaround; it does not modify the buffering of the standard output +- stream. This approach makes signal handling, as for interrupts, more +- robust. A drawback is that certain unconventional programs mixed +- <STRONG>stdio(3)</STRONG> calls with <EM>ncurses</EM> calls and (usually) got the behavior they +- expected. This is no longer the case; <EM>ncurses</EM> does not write to the ++ Nowadays, <EM>ncurses</EM> performs its own buffering and does not require this ++ workaround; it does not modify the buffering of the standard output ++ stream. This approach makes signal handling, as for interrupts, more ++ robust. A drawback is that certain unconventional programs mixed ++ <STRONG>stdio(3)</STRONG> calls with <EM>ncurses</EM> calls and (usually) got the behavior they ++ expected. This is no longer the case; <EM>ncurses</EM> does not write to the + standard output file descriptor through a <EM>stdio</EM>-buffered stream. + +- As a special case, low-level API calls such as <STRONG><A HREF="curs_terminfo.3x.html">putp(3x)</A></STRONG> still use the +- standard output stream. High-level <EM>curses</EM> calls such as <STRONG><A HREF="curs_printw.3x.html">printw(3x)</A></STRONG> do ++ As a special case, low-level API calls such as <STRONG><A HREF="curs_terminfo.3x.html">putp(3x)</A></STRONG> still use the ++ standard output stream. High-level <EM>curses</EM> calls such as <STRONG><A HREF="curs_printw.3x.html">printw(3x)</A></STRONG> do + not. + + + </PRE><H3><a name="h3-NCURSES_NO_UTF8_ACS"><EM>NCURSES_NO_UTF8_ACS</EM></a></H3><PRE> +- At initialization, <EM>ncurses</EM> inspects the <EM>TERM</EM> environment variable for +- special cases where VT100 forms-drawing characters (and the +- corresponding alternate character set <EM>terminfo</EM> capabilities) are known ++ At initialization, <EM>ncurses</EM> inspects the <EM>TERM</EM> environment variable for ++ special cases where VT100 forms-drawing characters (and the ++ corresponding alternate character set <EM>terminfo</EM> capabilities) are known + to be unsupported by terminal types that otherwise claim VT100 + compatibility. Specifically, when running in a UTF-8 locale, the Linux +- virtual console device and the GNU <STRONG>screen(1)</STRONG> program ignore them. Set ++ virtual console device and the GNU <STRONG>screen(1)</STRONG> program ignore them. Set + this variable to a nonzero value to instruct <EM>ncurses</EM> that the + terminal's ACS support is broken; the library then outputs Unicode code + points that correspond to the forms-drawing characters. Set it to zero + (or a non-integer) to disable the special check for terminal type names +- matching "linux" or "screen", directing <EM>ncurses</EM> to assume that the ACS ++ matching "linux" or "screen", directing <EM>ncurses</EM> to assume that the ACS + feature works if the terminal type description advertises it. + +- As an alternative to use of this variable, <EM>ncurses</EM> checks for an ++ As an alternative to use of this variable, <EM>ncurses</EM> checks for an + extended <EM>terminfo</EM> numeric capability <STRONG>U8</STRONG> that can be compiled using "<STRONG>tic</STRONG> + <STRONG>-x</STRONG>". Examples follow. + +@@ -1047,62 +1046,62 @@ + xterm-utf8|xterm relying on UTF-8 line-graphics, + U8#1, use=xterm, + +- The two-character name "U8" was chosen to permit its use via <EM>ncurses</EM>'s ++ The two-character name "U8" was chosen to permit its use via <EM>ncurses</EM>'s + <EM>termcap</EM> interface. + + + </PRE><H3><a name="h3-NCURSES_TRACE"><EM>NCURSES_TRACE</EM></a></H3><PRE> +- At initialization, <EM>ncurses</EM> (in its debugging configuration) checks for +- this variable's presence. If defined with an integral value, the ++ At initialization, <EM>ncurses</EM> (in its debugging configuration) checks for ++ this variable's presence. If defined with an integral value, the + library calls <STRONG><A HREF="curs_trace.3x.html">curses_trace(3x)</A></STRONG> with that value as the argument. + + + </PRE><H3><a name="h3-TERM"><EM>TERM</EM></a></H3><PRE> +- The <EM>TERM</EM> variable denotes the terminal type. Each is distinct, though +- many are similar. It is commonly set by terminal emulators to help +- applications find a workable terminal description. Some choose a +- popular approximation such as "ansi", "vt100", or "xterm" rather than +- an exact fit to their capabilities. Not infrequently, an application +- will have problems with that approach; for example, a key stroke may +- not operate correctly, or produce no effect but seeming garbage ++ The <EM>TERM</EM> variable denotes the terminal type. Each is distinct, though ++ many are similar. It is commonly set by terminal emulators to help ++ applications find a workable terminal description. Some choose a ++ popular approximation such as "ansi", "vt100", or "xterm" rather than ++ an exact fit to their capabilities. Not infrequently, an application ++ will have problems with that approach; for example, a key stroke may ++ not operate correctly, or produce no effect but seeming garbage + characters on the screen. + +- Setting <EM>TERM</EM> has no effect on hardware operation; it affects the way +- applications communicate with the terminal. Likewise, as a general +- rule (<STRONG>xterm(1)</STRONG> being a rare exception), terminal emulators that allow ++ Setting <EM>TERM</EM> has no effect on hardware operation; it affects the way ++ applications communicate with the terminal. Likewise, as a general ++ rule (<STRONG>xterm(1)</STRONG> being a rare exception), terminal emulators that allow + you to specify <EM>TERM</EM> as a parameter or configuration value do not change + their behavior to match that setting. + + + </PRE><H3><a name="h3-TERMCAP"><EM>TERMCAP</EM></a></H3><PRE> + If <EM>ncurses</EM> is configured with <EM>termcap</EM> support, it checks for a terminal +- type description in <EM>termcap</EM> format if one in <EM>terminfo</EM> format is not +- available. Setting this variable directs <EM>ncurses</EM> to ignore the usual +- <EM>termcap</EM> database location, <EM>/etc/termcap</EM>; see <EM>TERMPATH</EM> below. <EM>TERMCAP</EM> +- should contain either a terminal description (with newlines stripped +- out), or a file name indicating where the information required by the ++ type description in <EM>termcap</EM> format if one in <EM>terminfo</EM> format is not ++ available. Setting this variable directs <EM>ncurses</EM> to ignore the usual ++ <EM>termcap</EM> database location, <EM>/etc/termcap</EM>; see <EM>TERMPATH</EM> below. <EM>TERMCAP</EM> ++ should contain either a terminal description (with newlines stripped ++ out), or a file name indicating where the information required by the + <EM>TERM</EM> environment variable is stored. + + + </PRE><H3><a name="h3-TERMINFO"><EM>TERMINFO</EM></a></H3><PRE> +- <EM>ncurses</EM> can be configured to read terminal type description databases +- in various locations using different formats. This variable overrides ++ <EM>ncurses</EM> can be configured to read terminal type description databases ++ in various locations using different formats. This variable overrides + the default location. + +- <STRONG>o</STRONG> Descriptions in <EM>terminfo</EM> format are normally stored in a directory +- tree using subdirectories named by the common first letters of the ++ <STRONG>o</STRONG> Descriptions in <EM>terminfo</EM> format are normally stored in a directory ++ tree using subdirectories named by the common first letters of the + terminal types named therein. This is the scheme used in System V. + + <STRONG>o</STRONG> If <EM>ncurses</EM> is configured to use hashed databases, then <EM>TERMINFO</EM> may +- name its location, such as <EM>/usr/share/terminfo.db</EM>, rather than ++ name its location, such as <EM>/usr/share/terminfo.db</EM>, rather than + <EM>/usr/share/terminfo/</EM>. + +- The hashed database uses less disk space and is a little faster than ++ The hashed database uses less disk space and is a little faster than + the directory tree. However, some applications assume the existence of + the directory tree, and read it directly rather than using the <EM>terminfo</EM> + API. + +- <STRONG>o</STRONG> If <EM>ncurses</EM> is configured with <EM>termcap</EM> support, this variable may ++ <STRONG>o</STRONG> If <EM>ncurses</EM> is configured with <EM>termcap</EM> support, this variable may + contain the location of a <EM>termcap</EM> file. + + <STRONG>o</STRONG> If the value of <EM>TERMINFO</EM> begins with "hex:" or "b64:", <EM>ncurses</EM> uses +@@ -1112,10 +1111,10 @@ + TERMINFO=$(infocmp -0 -Q2 -q) + export TERMINFO + +- The compiled description is used only if it corresponds to the ++ The compiled description is used only if it corresponds to the + terminal type identified by <EM>TERM</EM>. + +- Setting <EM>TERMINFO</EM> is the simplest, but not the only, way to direct ++ Setting <EM>TERMINFO</EM> is the simplest, but not the only, way to direct + <EM>ncurses</EM> to a terminal database. The search path is as follows. + + <STRONG>o</STRONG> the last terminal database to which the running <EM>ncurses</EM> application +@@ -1133,16 +1132,16 @@ + + + </PRE><H3><a name="h3-TERMINFO_DIRS"><EM>TERMINFO_DIRS</EM></a></H3><PRE> +- This variable specifies a list of locations, akin to <EM>PATH</EM>, in which +- <EM>ncurses</EM> searches for the terminal type descriptions described by +- <EM>TERMINFO</EM> above. The list items are separated by colons on Unix and +- semicolons on OS/2 EMX. System V <EM>terminfo</EM> lacks a corresponding ++ This variable specifies a list of locations, akin to <EM>PATH</EM>, in which ++ <EM>ncurses</EM> searches for the terminal type descriptions described by ++ <EM>TERMINFO</EM> above. The list items are separated by colons on Unix and ++ semicolons on OS/2 EMX. System V <EM>terminfo</EM> lacks a corresponding + feature; <EM>TERMINFO</EM><STRONG>_</STRONG><EM>DIRS</EM> is an <EM>ncurses</EM> extension. + + + </PRE><H3><a name="h3-TERMPATH"><EM>TERMPATH</EM></a></H3><PRE> + If <EM>TERMCAP</EM> does not hold a terminal type description or file name, then +- <EM>ncurses</EM> checks the contents of <EM>TERMPATH</EM>, a list of locations, akin to ++ <EM>ncurses</EM> checks the contents of <EM>TERMPATH</EM>, a list of locations, akin to + <EM>PATH</EM>, in which it searches for <EM>termcap</EM> terminal type descriptions. The + list items are separated by colons on Unix and semicolons on OS/2 EMX. + +@@ -1152,9 +1151,9 @@ + + + </PRE><H2><a name="h2-ALTERNATE-CONFIGURATIONS">ALTERNATE CONFIGURATIONS</a></H2><PRE> +- Many different <EM>ncurses</EM> configurations are possible, determined by the +- options given to the <EM>configure</EM> script when building the library. Run +- the script with the <STRONG>--help</STRONG> option to peruse them all. A few are of ++ Many different <EM>ncurses</EM> configurations are possible, determined by the ++ options given to the <EM>configure</EM> script when building the library. Run ++ the script with the <STRONG>--help</STRONG> option to peruse them all. A few are of + particular significance to the application developer employing <EM>ncurses</EM>. + + <STRONG>--disable-overwrite</STRONG> +@@ -1163,24 +1162,24 @@ + + <STRONG>#include</STRONG> <STRONG><curses.h></STRONG> + +- This option is used to avoid file name conflicts between <EM>ncurses</EM> +- and an existing <EM>curses</EM> installation on the system. If <EM>ncurses</EM> is +- installed disabling overwrite, it puts its header files in a ++ This option is used to avoid file name conflicts between <EM>ncurses</EM> ++ and an existing <EM>curses</EM> installation on the system. If <EM>ncurses</EM> is ++ installed disabling overwrite, it puts its header files in a + subdirectory. Here is an example. + + <STRONG>#include</STRONG> <STRONG><ncurses/curses.h></STRONG> + +- Installation also omits a symbolic link that would cause the +- compiler's <STRONG>-lcurses</STRONG> option to link object files with <EM>ncurses</EM> ++ Installation also omits a symbolic link that would cause the ++ compiler's <STRONG>-lcurses</STRONG> option to link object files with <EM>ncurses</EM> + instead of the system <EM>curses</EM> library. + +- The directory used by this configuration of <EM>ncurses</EM> is shown in ++ The directory used by this configuration of <EM>ncurses</EM> is shown in + section "SYNOPSIS" above. + + <STRONG>--enable-widec</STRONG> +- The configure script renames the library and (if the +- <STRONG>--disable-overwrite</STRONG> option is used) puts the header files in a +- different subdirectory. All of the library names have a "w" ++ The configure script renames the library and (if the ++ <STRONG>--disable-overwrite</STRONG> option is used) puts the header files in a ++ different subdirectory. All of the library names have a "w" + appended to them, i.e., instead of + + <STRONG>-lncurses</STRONG> +@@ -1189,62 +1188,62 @@ + + <STRONG>-lncursesw</STRONG> + +- You must also enable the wide-character features in the header +- file when compiling for the wide-character library to use the +- extended (wide-character) functions. The symbol which enables ++ You must also enable the wide-character features in the header ++ file when compiling for the wide-character library to use the ++ extended (wide-character) functions. The symbol which enables + these features has changed since X/Open Curses, Issue 4: + +- <STRONG>o</STRONG> Originally, the wide-character feature required the symbol ++ <STRONG>o</STRONG> Originally, the wide-character feature required the symbol + <STRONG>_XOPEN_SOURCE_EXTENDED</STRONG> but that was only valid for XPG4 + (1996). + +- <STRONG>o</STRONG> Later, that was deemed conflicting with <STRONG>_XOPEN_SOURCE</STRONG> defined ++ <STRONG>o</STRONG> Later, that was deemed conflicting with <STRONG>_XOPEN_SOURCE</STRONG> defined + to 500. + +- <STRONG>o</STRONG> As of mid-2018, none of the features in this implementation +- require a <STRONG>_XOPEN_SOURCE</STRONG> feature greater than 600. However, ++ <STRONG>o</STRONG> As of mid-2018, none of the features in this implementation ++ require a <STRONG>_XOPEN_SOURCE</STRONG> feature greater than 600. However, + X/Open Curses, Issue 7 (2009) recommends defining it to 700. + +- <STRONG>o</STRONG> Alternatively, you can enable the feature by defining +- <STRONG>NCURSES_WIDECHAR</STRONG> with the caveat that some other header file +- than <STRONG>curses.h</STRONG> may require a specific value for <STRONG>_XOPEN_SOURCE</STRONG> ++ <STRONG>o</STRONG> Alternatively, you can enable the feature by defining ++ <STRONG>NCURSES_WIDECHAR</STRONG> with the caveat that some other header file ++ than <STRONG>curses.h</STRONG> may require a specific value for <STRONG>_XOPEN_SOURCE</STRONG> + (or a system-specific symbol). + +- The <EM>curses.h</EM> header file installed for the wide-character library +- is designed to be compatible with the non-wide library's header. +- Only the size of the <EM>WINDOW</EM> structure differs; few applications ++ The <EM>curses.h</EM> header file installed for the wide-character library ++ is designed to be compatible with the non-wide library's header. ++ Only the size of the <EM>WINDOW</EM> structure differs; few applications + require more than pointers to <EM>WINDOW</EM>s. + + If the headers are installed allowing overwrite, the wide- +- character library's headers should be installed last, to allow ++ character library's headers should be installed last, to allow + applications to be built using either library from the same set of + headers. + + <STRONG>--with-pthread</STRONG> +- The configure script renames the library. All of the library +- names have a "t" appended to them (before any "w" added by ++ The configure script renames the library. All of the library ++ names have a "t" appended to them (before any "w" added by + <STRONG>--enable-widec</STRONG>). + + The global variables such as <STRONG>LINES</STRONG> are replaced by macros to allow + read-only access. At the same time, setter-functions are provided +- to set these values. Some applications (very few) may require ++ to set these values. Some applications (very few) may require + changes to work with this convention. + + <STRONG>--with-shared</STRONG> + <STRONG>--with-normal</STRONG> + <STRONG>--with-debug</STRONG> + <STRONG>--with-profile</STRONG> +- The shared and normal (static) library names differ by their +- suffixes, e.g., <STRONG>libncurses.so</STRONG> and <STRONG>libncurses.a</STRONG>. The debug and +- profiling libraries add a "_g" and a "_p" to the root names ++ The shared and normal (static) library names differ by their ++ suffixes, e.g., <STRONG>libncurses.so</STRONG> and <STRONG>libncurses.a</STRONG>. The debug and ++ profiling libraries add a "_g" and a "_p" to the root names + respectively, e.g., <STRONG>libncurses_g.a</STRONG> and <STRONG>libncurses_p.a</STRONG>. + + <STRONG>--with-termlib</STRONG> +- Low-level functions which do not depend upon whether the library ++ Low-level functions which do not depend upon whether the library + supports wide-characters, are provided in the tinfo library. + +- By doing this, it is possible to share the tinfo library between +- wide/normal configurations as well as reduce the size of the ++ By doing this, it is possible to share the tinfo library between ++ wide/normal configurations as well as reduce the size of the + library when only low-level functions are needed. + + Those functions are described in these pages: +@@ -1264,8 +1263,8 @@ + <STRONG>o</STRONG> <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG> - miscellaneous <EM>curses</EM> utility routines + + <STRONG>--with-trace</STRONG> +- The <STRONG>trace</STRONG> function normally resides in the debug library, but it +- is sometimes useful to configure this in the shared library. ++ The <STRONG>trace</STRONG> function normally resides in the debug library, but it ++ is sometimes useful to configure this in the shared library. + Configure scripts should check for the function's existence rather + than assuming it is always in the debug library. + +@@ -1279,213 +1278,213 @@ + + + </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE> +- X/Open Curses permits most functions it specifies to be made available ++ X/Open Curses permits most functions it specifies to be made available + as macros as well. <EM>ncurses</EM> does so + + <STRONG>o</STRONG> for functions that return values via their parameters, + + <STRONG>o</STRONG> to support obsolete features, + +- <STRONG>o</STRONG> to reuse functions (for example, those that move the cursor before ++ <STRONG>o</STRONG> to reuse functions (for example, those that move the cursor before + another operation), and + + <STRONG>o</STRONG> in a few special cases. + +- If the standard output file descriptor of an <EM>ncurses</EM> program is +- redirected to something that is not a terminal device, the library +- writes screen updates to the standard error file descriptor. This was ++ If the standard output file descriptor of an <EM>ncurses</EM> program is ++ redirected to something that is not a terminal device, the library ++ writes screen updates to the standard error file descriptor. This was + an undocumented feature of SVr3 <EM>curses</EM>. + +- See subsection "Header Files" below regarding symbols exposed by ++ See subsection "Header Files" below regarding symbols exposed by + inclusion of <EM>curses.h</EM>. + + + </PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE> +- <EM>ncurses</EM> enables an application to capture mouse events on certain ++ <EM>ncurses</EM> enables an application to capture mouse events on certain + terminals, including <STRONG>xterm(1)</STRONG>; see <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>. + +- <EM>ncurses</EM> provides a means of responding to window resizing events, as +- when running in a GUI terminal emulator application such as <EM>xterm</EM>; see ++ <EM>ncurses</EM> provides a means of responding to window resizing events, as ++ when running in a GUI terminal emulator application such as <EM>xterm</EM>; see + <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG> and <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG>. + + <EM>ncurses</EM> allows an application to query the terminal for the presence of + a wide variety of special keys; see <STRONG><A HREF="curs_getch.3x.html">has_key(3x)</A></STRONG>. + + <EM>ncurses</EM> extends the fixed set of function key capabilities specified by +- X/Open Curses by allowing the application programmer to define +- additional key events at runtime; see <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>, <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>, ++ X/Open Curses by allowing the application programmer to define ++ additional key events at runtime; see <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>, <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>, + <STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG>, and <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>. + +- <EM>ncurses</EM> can exploit the capabilities of terminals implementing +- ISO 6429/ECMA-48 SGR 39 and SGR 49 sequences, which allow an +- application to reset the terminal to its original foreground and +- background colors. From a user's perspective, the application is able +- to draw colored text on a background whose color is set independently, ++ <EM>ncurses</EM> can exploit the capabilities of terminals implementing ++ ISO 6429/ECMA-48 SGR 39 and SGR 49 sequences, which allow an ++ application to reset the terminal to its original foreground and ++ background colors. From a user's perspective, the application is able ++ to draw colored text on a background whose color is set independently, + providing better control over color contrasts. See <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>. + +- An <EM>ncurses</EM> application can eschew knowledge of <EM>SCREEN</EM> and <EM>WINDOW</EM> +- structure internals, instead using accessor functions such as ++ An <EM>ncurses</EM> application can eschew knowledge of <EM>SCREEN</EM> and <EM>WINDOW</EM> ++ structure internals, instead using accessor functions such as + <STRONG><A HREF="curs_inopts.3x.html">is_cbreak(3x)</A></STRONG> and <STRONG><A HREF="curs_opaque.3x.html">is_scrollok(3x)</A></STRONG>. + +- <EM>ncurses</EM> enables an application to direct its output to a printer ++ <EM>ncurses</EM> enables an application to direct its output to a printer + attached to the terminal device; see <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>. + +- <EM>ncurses</EM> offers <STRONG><A HREF="curs_slk.3x.html">slk_attr(3x)</A></STRONG> as a counterpart of <STRONG><A HREF="curs_attr.3x.html">attr_get(3x)</A></STRONG> for soft- +- label key lines, and <STRONG><A HREF="curs_slk.3x.html">extended_slk_color(3x)</A></STRONG> as a form of <STRONG><A HREF="curs_slk.3x.html">slk_color(3x)</A></STRONG> +- that can gather color information from them when many colors are ++ <EM>ncurses</EM> offers <STRONG><A HREF="curs_slk.3x.html">slk_attr(3x)</A></STRONG> as a counterpart of <STRONG><A HREF="curs_attr.3x.html">attr_get(3x)</A></STRONG> for soft- ++ label key lines, and <STRONG><A HREF="curs_slk.3x.html">extended_slk_color(3x)</A></STRONG> as a form of <STRONG><A HREF="curs_slk.3x.html">slk_color(3x)</A></STRONG> ++ that can gather color information from them when many colors are + supported. + +- <EM>ncurses</EM> permits modification of <STRONG><A HREF="unctrl.3x.html">unctrl(3x)</A></STRONG>'s behavior; see ++ <EM>ncurses</EM> permits modification of <STRONG><A HREF="unctrl.3x.html">unctrl(3x)</A></STRONG>'s behavior; see + <STRONG><A HREF="legacy_coding.3x.html">use_legacy_coding(3x)</A></STRONG>. + +- Rudimentary support for multi-threaded applications may be available; ++ Rudimentary support for multi-threaded applications may be available; + see <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>. + +- Functions that ease the management of multiple screens can be exposed; ++ Functions that ease the management of multiple screens can be exposed; + see <STRONG><A HREF="curs_sp_funcs.3x.html">curs_sp_funcs(3x)</A></STRONG>. + +- To aid applications to debug their memory usage, <EM>ncurses</EM> optionally +- offers functions to more aggressively free memory it dynamically ++ To aid applications to debug their memory usage, <EM>ncurses</EM> optionally ++ offers functions to more aggressively free memory it dynamically + allocates itself; see <STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG>. + +- The library facilitates auditing and troubleshooting of its behavior; ++ The library facilitates auditing and troubleshooting of its behavior; + see <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>. + +- Compiling <EM>ncurses</EM> with the option <STRONG>-DUSE_GETCAP</STRONG> causes it to fall back +- to reading <EM>/etc/termcap</EM> if the terminal setup code cannot find a <EM>term-</EM> ++ Compiling <EM>ncurses</EM> with the option <STRONG>-DUSE_GETCAP</STRONG> causes it to fall back ++ to reading <EM>/etc/termcap</EM> if the terminal setup code cannot find a <EM>term-</EM> + <EM>info</EM> entry corresponding to <EM>TERM</EM>. Use of this feature is not +- recommended, as it essentially includes an entire <EM>termcap</EM> compiler in +- the <EM>ncurses</EM> startup code, at a cost in memory usage and application ++ recommended, as it essentially includes an entire <EM>termcap</EM> compiler in ++ the <EM>ncurses</EM> startup code, at a cost in memory usage and application + launch latency. + +- <EM>PDCurses</EM> and NetBSD <EM>curses</EM> incorporate some <EM>ncurses</EM> extensions. ++ <EM>PDCurses</EM> and NetBSD <EM>curses</EM> incorporate some <EM>ncurses</EM> extensions. + Individual man pages indicate where this is the case. + + + </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE> + X/Open Curses defines two levels of conformance, "base" and "enhanced". + The latter includes several additional features, such as wide-character +- and color support. <EM>ncurses</EM> intends base-level conformance with X/Open +- Curses, and supports all features of its enhanced level except the ++ and color support. <EM>ncurses</EM> intends base-level conformance with X/Open ++ Curses, and supports all features of its enhanced level except the + <EM>untic</EM> utility. + +- Differences between X/Open Curses and <EM>ncurses</EM> are documented in the ++ Differences between X/Open Curses and <EM>ncurses</EM> are documented in the + "PORTABILITY" sections of applicable man pages. + + + </PRE><H3><a name="h3-Error-Checking">Error Checking</a></H3><PRE> +- In many cases, X/Open Curses is vague about error conditions, omitting ++ In many cases, X/Open Curses is vague about error conditions, omitting + some of the SVr4 documentation. + +- Unlike other implementations, <EM>ncurses</EM> checks pointer parameters, such +- as those to <EM>WINDOW</EM> structures, to ensure that they are not null. This +- is done primarily to guard against programmer error. The standard ++ Unlike other implementations, <EM>ncurses</EM> checks pointer parameters, such ++ as those to <EM>WINDOW</EM> structures, to ensure that they are not null. This ++ is done primarily to guard against programmer error. The standard + interface does not provide a way for the library to tell an application +- which of several possible errors occurred. An application that relies +- on <EM>ncurses</EM> to check its function parameters for validity limits its ++ which of several possible errors occurred. An application that relies ++ on <EM>ncurses</EM> to check its function parameters for validity limits its + portability and robustness. + + + </PRE><H3><a name="h3-Padding-Differences">Padding Differences</a></H3><PRE> +- In historical <EM>curses</EM> implementations, delays embedded in the <EM>terminfo</EM> +- capabilities <STRONG>carriage_return</STRONG> (<STRONG>cr</STRONG>), <STRONG>scroll_forward</STRONG> (<STRONG>ind</STRONG>), <STRONG>cursor_left</STRONG> ++ In historical <EM>curses</EM> implementations, delays embedded in the <EM>terminfo</EM> ++ capabilities <STRONG>carriage_return</STRONG> (<STRONG>cr</STRONG>), <STRONG>scroll_forward</STRONG> (<STRONG>ind</STRONG>), <STRONG>cursor_left</STRONG> + (<STRONG>cub1</STRONG>), <STRONG>form_feed</STRONG> (<STRONG>ff</STRONG>), and <STRONG>tab</STRONG> (<STRONG>ht</STRONG>) activated corresponding delay bits +- in the Unix terminal driver. <EM>ncurses</EM> performs all padding by sending +- NUL bytes to the device. This method is slightly more expensive, but +- narrows the interface to the Unix kernel significantly and ++ in the Unix terminal driver. <EM>ncurses</EM> performs all padding by sending ++ NUL bytes to the device. This method is slightly more expensive, but ++ narrows the interface to the Unix kernel significantly and + correspondingly increases the package's portability. + + + </PRE><H3><a name="h3-Header-Files">Header Files</a></H3><PRE> +- The header file <EM>curses.h</EM> itself includes the header files <EM>stdio.h</EM> and ++ The header file <EM>curses.h</EM> itself includes the header files <EM>stdio.h</EM> and + <EM>unctrl.h</EM>. + + X/Open Curses has more to say, + +- The inclusion of <EM>curses.h</EM> may make visible all symbols from the ++ The inclusion of <EM>curses.h</EM> may make visible all symbols from the + headers <EM>stdio.h</EM>, <EM>term.h</EM>, <EM>termios.h</EM>, and <EM>wchar.h</EM>. + + but does not finish the story. A more complete account follows. + + <STRONG>o</STRONG> The first <EM>curses</EM>, in 4BSD, provided a <EM>curses.h</EM> file. + +- BSD <EM>curses</EM> code included <EM>curses.h</EM> and <EM>unctrl.h</EM> from an internal ++ BSD <EM>curses</EM> code included <EM>curses.h</EM> and <EM>unctrl.h</EM> from an internal + header file <EM>curses.ext</EM>, where "ext" abbreviated "externs". + +- The implementations of <EM>printw</EM> and <EM>scanw</EM> used undocumented internal +- functions of the standard I/O library (<STRONG>_</STRONG><EM>doprnt</EM> and <STRONG>_</STRONG><EM>doscan</EM>), but ++ The implementations of <EM>printw</EM> and <EM>scanw</EM> used undocumented internal ++ functions of the standard I/O library (<STRONG>_</STRONG><EM>doprnt</EM> and <STRONG>_</STRONG><EM>doscan</EM>), but + nothing in <EM>curses.h</EM> itself relied upon <EM>stdio.h</EM>. + +- <STRONG>o</STRONG> SVr2 <EM>curses</EM> added <EM>newterm</EM>, which relies upon <EM>stdio.h</EM> because its ++ <STRONG>o</STRONG> SVr2 <EM>curses</EM> added <EM>newterm</EM>, which relies upon <EM>stdio.h</EM> because its + function prototype employs the <EM>FILE</EM> type. + + SVr4 <EM>curses</EM> added <EM>putwin</EM> and <EM>getwin</EM>, which also use <EM>stdio.h</EM>. + + X/Open Curses specifies all three of these functions. + +- SVr4 <EM>curses</EM> and X/Open Curses do not require the developer to +- include <EM>stdio.h</EM> before <EM>curses.h</EM>. Both document use of <EM>curses</EM> as ++ SVr4 <EM>curses</EM> and X/Open Curses do not require the developer to ++ include <EM>stdio.h</EM> before <EM>curses.h</EM>. Both document use of <EM>curses</EM> as + requiring only <EM>curses.h</EM>. + + As a result, standard <EM>curses.h</EM> always includes <EM>stdio.h</EM>. + +- <STRONG>o</STRONG> X/Open Curses and SVr4 <EM>curses</EM> are inconsistent with respect to ++ <STRONG>o</STRONG> X/Open Curses and SVr4 <EM>curses</EM> are inconsistent with respect to + <EM>unctrl.h</EM>. + +- As noted in <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>, <EM>ncurses</EM> includes <EM>unctrl.h</EM> from <EM>curses.h</EM> ++ As noted in <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>, <EM>ncurses</EM> includes <EM>unctrl.h</EM> from <EM>curses.h</EM> + (as SVr4 does). + +- <STRONG>o</STRONG> X/Open Curses's comments about <EM>term.h</EM> and <EM>termios.h</EM> may refer to ++ <STRONG>o</STRONG> X/Open Curses's comments about <EM>term.h</EM> and <EM>termios.h</EM> may refer to + HP-UX and AIX. + +- HP-UX <EM>curses</EM> includes <EM>term.h</EM> from <EM>curses.h</EM> to declare <EM>setupterm</EM> in ++ HP-UX <EM>curses</EM> includes <EM>term.h</EM> from <EM>curses.h</EM> to declare <EM>setupterm</EM> in + <EM>curses.h</EM>, but <EM>ncurses</EM> and Solaris <EM>curses</EM> do not. + +- AIX <EM>curses</EM> includes <EM>term.h</EM> and <EM>termios.h</EM>. Again, <EM>ncurses</EM> and ++ AIX <EM>curses</EM> includes <EM>term.h</EM> and <EM>termios.h</EM>. Again, <EM>ncurses</EM> and + Solaris <EM>curses</EM> do not. + +- <STRONG>o</STRONG> X/Open Curses says that <EM>curses.h</EM> <STRONG>may</STRONG> include <EM>term.h</EM>, but does not ++ <STRONG>o</STRONG> X/Open Curses says that <EM>curses.h</EM> <STRONG>may</STRONG> include <EM>term.h</EM>, but does not + require it to do so. + +- Some programs use functions declared in both <EM>curses.h</EM> and <EM>term.h</EM>, +- and must include both header files in the same module. Very old +- versions of AIX <EM>curses</EM> required inclusion of <EM>curses.h</EM> before ++ Some programs use functions declared in both <EM>curses.h</EM> and <EM>term.h</EM>, ++ and must include both header files in the same module. Very old ++ versions of AIX <EM>curses</EM> required inclusion of <EM>curses.h</EM> before + <EM>term.h</EM>. + +- The header files supplied by <EM>ncurses</EM> include the standard library +- headers required for its declarations, so <EM>ncurses</EM>'s own header +- files can be included in any order. But for portability, you +- should include <EM>curses.h</EM> before <EM>term.h</EM>. ++ The header files supplied by <EM>ncurses</EM> include the standard library ++ headers required for its declarations, so <EM>ncurses</EM>'s own header ++ files can be included in any order. For portability even to old ++ AIX systems, include <EM>curses.h</EM> before <EM>term.h</EM>. + +- <STRONG>o</STRONG> X/Open Curses says "may make visible" because including a header +- file does not necessarily make visible all of the symbols in it ++ <STRONG>o</STRONG> X/Open Curses says "may make visible" because including a header ++ file does not necessarily make visible all of the symbols in it + (consider <STRONG>#ifdef</STRONG> and similar). + +- For instance, <EM>ncurses</EM>'s <EM>curses.h</EM> <STRONG>may</STRONG> include <EM>wchar.h</EM> if the proper +- symbol is defined, and if <EM>ncurses</EM> is configured for wide-character +- support. If <EM>wchar.h</EM> is included, its symbols <STRONG>may</STRONG> be made visible ++ For instance, <EM>ncurses</EM>'s <EM>curses.h</EM> <STRONG>may</STRONG> include <EM>wchar.h</EM> if the proper ++ symbol is defined, and if <EM>ncurses</EM> is configured for wide-character ++ support. If <EM>wchar.h</EM> is included, its symbols <STRONG>may</STRONG> be made visible + depending on the value of the <STRONG>_XOPEN_SOURCE</STRONG> feature test macro. + + <STRONG>o</STRONG> X/Open Curses mandates an application's inclusion of one standard C +- library header in a special case: <EM>stdarg.h</EM> before <EM>curses.h</EM> to +- prototype the functions <EM>vw</EM><STRONG>_</STRONG><EM>printw</EM> and <EM>vw</EM><STRONG>_</STRONG><EM>scanw</EM> (as well as the +- obsolete <EM>vwprintw</EM> and <EM>vwscanw</EM>). Each of these takes a variadic ++ library header in a special case: <EM>stdarg.h</EM> before <EM>curses.h</EM> to ++ prototype the functions <EM>vw</EM><STRONG>_</STRONG><EM>printw</EM> and <EM>vw</EM><STRONG>_</STRONG><EM>scanw</EM> (as well as the ++ obsolete <EM>vwprintw</EM> and <EM>vwscanw</EM>). Each of these takes a variadic + argument list, a <EM>va</EM><STRONG>_</STRONG><EM>list</EM> parameter, like that of <STRONG>printf(3)</STRONG>. + +- SVr3 <EM>curses</EM> introduced the two obsolete functions, and X/Open +- Curses the others. In between, SVr4 <EM>curses</EM> provided for the +- possibility that an application might include either <EM>varargs.h</EM> or +- <EM>stdarg.h</EM>. These represented contrasting approaches to handling +- variadic argument lists. The older interface, <EM>varargs.h</EM>, used a +- pointer to <EM>char</EM> for variadic functions' <EM>va</EM><STRONG>_</STRONG><EM>list</EM> parameter. Later, +- the list acquired its own standard data type, <EM>va</EM><STRONG>_</STRONG><EM>list</EM>, defined in +- <EM>stdarg.h</EM>, empowering the compiler to check the types of a function +- call's actual parameters against the formal ones declared in its ++ SVr3 <EM>curses</EM> introduced the two obsolete functions, and X/Open ++ Curses the others. In between, SVr4 <EM>curses</EM> provided for the ++ possibility that an application might include either <EM>varargs.h</EM> or ++ <EM>stdarg.h</EM>. These represented contrasting approaches to handling ++ variadic argument lists. The older interface, <EM>varargs.h</EM>, used a ++ pointer to <EM>char</EM> for variadic functions' <EM>va</EM><STRONG>_</STRONG><EM>list</EM> parameter. Later, ++ the list acquired its own standard data type, <EM>va</EM><STRONG>_</STRONG><EM>list</EM>, defined in ++ <EM>stdarg.h</EM>, empowering the compiler to check the types of a function ++ call's actual parameters against the formal ones declared in its + prototype. + +- No conforming implementations of X/Open Curses require an ++ No conforming implementations of X/Open Curses require an + application to include <EM>stdarg.h</EM> before <EM>curses.h</EM> because they either +- have allowed for a special type, or, like <EM>ncurses</EM>, they include ++ have allowed for a special type, or, like <EM>ncurses</EM>, they include + <EM>stdarg.h</EM> themselves to provide a portable interface. + + +@@ -1499,7 +1498,7 @@ + + + +-ncurses 6.5 2024-07-27 <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/tabs.1.html +--- ncurses-6.5-20240831+/doc/html/man/tabs.1.html 2024-06-22 22:55:11.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/tabs.1.html 2024-09-14 20:23:29.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: tabs.1,v 1.61 2024/06/22 22:15:32 tom Exp @ ++ * @Id: tabs.1,v 1.63 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>tabs 1 2024-06-22 ncurses 6.5 User commands</TITLE> ++<TITLE>tabs 1 2024-09-14 ncurses 6.5 User commands</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">tabs 1 2024-06-22 ncurses 6.5 User commands</H1> ++<H1 class="no-header">tabs 1 2024-09-14 ncurses 6.5 User commands</H1> + <PRE> + <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG> User commands <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG> + +@@ -195,61 +195,60 @@ + + + </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE> +- IEEE Std 1003.1/The Open Group Base Specifications Issue 7 +- (POSIX.1-2008) describes a <STRONG>tabs</STRONG> utility. However, ++ IEEE Std 1003.1/The Open Group Base Specifications Issue 7 ++ (POSIX.1-2008) describes a <EM>tabs</EM> utility. However, + + <STRONG>o</STRONG> this standard describes a <STRONG>+m</STRONG> option to set a terminal's left + margin. Very few of the entries in the terminal database provide + the <STRONG>set_left_margin</STRONG> (<STRONG>smgl</STRONG>) or <STRONG>set_left_margin_parm</STRONG> (<STRONG>smglp</STRONG>) + capabilities needed to support the feature. + +- <STRONG>o</STRONG> There is no counterpart in X/Open Curses Issue 7 for this utility, +- unlike <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>. ++ <STRONG>o</STRONG> Unlike <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <EM>tabs</EM> has no specification in X/Open Curses Issue 7. + +- The <STRONG>-d</STRONG> (debug) and <STRONG>-n</STRONG> (no-op) options are <EM>ncurses</EM> extensions not ++ The <STRONG>-d</STRONG> (debug) and <STRONG>-n</STRONG> (no-op) options are <EM>ncurses</EM> extensions not + provided by other implementations. + + + </PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE> +- A <STRONG>tabs</STRONG> utility appeared in PWB/Unix 1.0 (1977). A reduced version +- shipped in Seventh Edition Unix (early 1979) and in 3BSD (later the +- same year); it supported a "-n" option to set the first tab stop at the +- left margin. That option is not specified by POSIX. +- +- The PWB/Unix <STRONG>tabs</STRONG> utility returned in System III (1980), and used +- built-in tables to support a half-dozen hardcopy terminal (printer) +- types. It also had logic to support setting the left margin, as well ++ A <EM>tabs</EM> utility appeared in PWB/Unix 1.0 (1977). A reduced version ++ shipped in Seventh Edition Unix (early 1979) and in 3BSD (later the ++ same year); it supported an option "-n" to set the first tab stop at ++ the left margin. That option is not specified by POSIX. ++ ++ The PWB/Unix <STRONG>tabs</STRONG> utility returned in System III (1980), and used ++ built-in tables to support a half-dozen hardcopy terminal (printer) ++ types. It also had logic to support setting the left margin, as well + as a feature for copying the tab settings from a file. + +- Versions of the program in later releases of AT&T Unix, such as SVr4, +- added support for the terminal database, but retained the tables to +- support the printers. By this time, System V <STRONG>tput</STRONG> had incorporated the +- tab stop initialization feature of BSD's <STRONG>tset</STRONG> from 1982, but employed ++ Versions of the program in later releases of AT&T Unix, such as SVr4, ++ added support for the terminal database, but retained the tables to ++ support the printers. By this time, System V <EM>tput</EM> had incorporated the ++ tab stop initialization feature of BSD's <EM>tset</EM> from 1982, but employed + the <EM>terminfo</EM> database to do so. + +- The <STRONG>+m</STRONG> option was documented in the POSIX Base Specifications Issue 5 +- (Unix98, 1997), then omitted in Issue 6 (Unix03, 2004) without express +- motivation, though an introductory comment "and optionally adjusts the +- margin" remains, overlooked in the removal. The <STRONG>tabs</STRONG> utility +- documented in Issues 6 and later has no mechanism for setting margins. +- The <STRONG>+m</STRONG> option in <EM>ncurses</EM> <STRONG>tabs</STRONG> differs from the SVr4 feature by using +- terminal capabilities rather than built-in tables. +- +- POSIX documents no limit on the number of tab stops. Other +- implementations impose one; the limit is 20 in PWB/Unix's <STRONG>tabs</STRONG> utility. +- While some terminals may not accept an arbitrary number of tab stops, +- <EM>ncurses</EM> <STRONG>tabs</STRONG> attempts to set tab stops up to the right margin if the ++ The <STRONG>+m</STRONG> option was documented in the POSIX Base Specifications Issue 5 ++ (Unix98, 1997), then omitted in Issue 6 (Unix03, 2004) without express ++ motivation, though an introductory comment "and optionally adjusts the ++ margin" remains, overlooked in the removal. The <EM>tabs</EM> utility ++ documented in Issues 6 and later has no mechanism for setting margins. ++ The <STRONG>+m</STRONG> option in <EM>ncurses</EM> <EM>tabs</EM> (<STRONG>tabs</STRONG>) differs from the SVr4 feature by ++ using terminal capabilities rather than built-in tables. ++ ++ POSIX documents no limit on the number of tab stops. Other ++ implementations impose one; the limit is 20 in PWB/Unix's <EM>tabs</EM> utility. ++ While some terminals may not accept an arbitrary number of tab stops, ++ <EM>ncurses</EM> <STRONG>tabs</STRONG> attempts to set tab stops up to the right margin if the + list thereof is sufficiently long. + +- The "Rationale" section of the Issue 6 <STRONG>tabs</STRONG> reference page details how +- the committee considered redesigning the <STRONG>tabs</STRONG> and <STRONG>tput</STRONG> utilities, ++ The "Rationale" section of the Issue 6 <EM>tabs</EM> reference page details how ++ the committee considered redesigning the <EM>tabs</EM> and <EM>tput</EM> utilities, + without settling on an improved solution. It claims that + +- no known historical version of <EM>tabs</EM> supports the capability of ++ no known historical version of <EM>tabs</EM> supports the capability of + setting arbitrary tab stops. + +- The feature described in subsection "Explicit Lists" above was +- implemented in PWB/Unix, and permitted the setting of abitrary tab ++ The feature described in subsection "Explicit Lists" above was ++ implemented in PWB/Unix, and permitted the setting of abitrary tab + stops nevertheless. + + +@@ -258,7 +257,7 @@ + + + +-ncurses 6.5 2024-06-22 <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/terminfo.5.html +--- ncurses-6.5-20240831+/doc/html/man/terminfo.5.html 2024-07-27 23:11:34.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/terminfo.5.html 2024-09-14 20:23:29.000000000 +0000 +@@ -71,7 +71,7 @@ + have, by specifying how to perform screen operations, and by specifying + padding requirements and initialization sequences. + +- This document describes <EM>ncurses</EM> version 6.5 (patch 20240727). ++ This document describes <EM>ncurses</EM> version 6.5 (patch 20240914). + + + </PRE><H3><a name="h3-terminfo-Entry-Syntax"><EM>terminfo</EM> Entry Syntax</a></H3><PRE> +@@ -2437,7 +2437,7 @@ + X/Open Curses does not mention italics. Portable applications must + assume that numeric capabilities are signed 16-bit values. This + includes the <EM>no</EM><STRONG>_</STRONG><EM>color</EM><STRONG>_</STRONG><EM>video</EM> (<STRONG>ncv</STRONG>) capability. The 32768 mask value +- used for italics with <STRONG>ncv</STRONG> can be confused with an absent or cancelled ++ used for italics with <STRONG>ncv</STRONG> can be confused with an absent or canceled + <STRONG>ncv</STRONG>. If italics should work with colors, then the <STRONG>ncv</STRONG> value must be + specified, even if it is zero. + +Index: doc/html/man/tic.1m.html +--- ncurses-6.5-20240831+/doc/html/man/tic.1m.html 2024-05-11 21:39:59.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/tic.1m.html 2024-09-14 20:23:29.000000000 +0000 +@@ -27,19 +27,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: tic.1m,v 1.111 2024/05/11 20:39:53 tom Exp @ ++ * @Id: tic.1m,v 1.113 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>tic 1m 2024-05-11 ncurses 6.5 User commands</TITLE> ++<TITLE>tic 1m 2024-09-14 ncurses 6.5 User commands</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">tic 1m 2024-05-11 ncurses 6.5 User commands</H1> ++<H1 class="no-header">tic 1m 2024-09-14 ncurses 6.5 User commands</H1> + <PRE> + <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> User commands <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> + +@@ -420,7 +420,7 @@ + System V Release 2 provided a <STRONG>tic</STRONG> utility. It accepted a single + option: <STRONG>-v</STRONG> (optionally followed by a number). According to Ross + Ridge's comment in <EM>mytinfo</EM>, this version of <STRONG>tic</STRONG> was unable to represent +- cancelled capabilities. ++ canceled capabilities. + + System V Release 3 provided a different <STRONG>tic</STRONG> utility, written by Pavel + Curtis, (originally named "compile" in <EM>pcurses</EM>). This added an option +@@ -482,7 +482,7 @@ + + + +-ncurses 6.5 2024-05-11 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: doc/html/man/tput.1.html +--- ncurses-6.5-20240831+/doc/html/man/tput.1.html 2024-06-22 22:55:11.000000000 +0000 ++++ ncurses-6.5-20240914/doc/html/man/tput.1.html 2024-09-14 20:23:29.000000000 +0000 +@@ -28,19 +28,19 @@ + * sale, use or other dealings in this Software without prior written * + * authorization. * + **************************************************************************** +- * @Id: tput.1,v 1.118 2024/06/22 21:28:35 tom Exp @ ++ * @Id: tput.1,v 1.120 2024/09/14 20:06:50 tom Exp @ + --> + <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + <HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> +-<TITLE>tput 1 2024-06-22 ncurses 6.5 User commands</TITLE> ++<TITLE>tput 1 2024-09-14 ncurses 6.5 User commands</TITLE> + <link rel="author" href="mailto:bug-ncurses@gnu.org"> + + </HEAD> + <BODY> +-<H1 class="no-header">tput 1 2024-06-22 ncurses 6.5 User commands</H1> ++<H1 class="no-header">tput 1 2024-09-14 ncurses 6.5 User commands</H1> + <PRE> + <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG> User commands <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG> + +@@ -411,8 +411,8 @@ + <STRONG>o</STRONG> It assigns exit status 255 to a numeric variable that is not + specified in the <EM>terminfo</EM> database. That likely is a documentation + error, mistaking the "-1" written to the standard output to +- indicate an absent or cancelled numeric capability for an +- (unsigned) exit status. ++ indicate an absent or canceled numeric capability for an (unsigned) ++ exit status. + + The various System V implementations (AIX, HP-UX, Solaris) use the same + exit statuses as <EM>ncurses</EM>. +@@ -559,7 +559,7 @@ + + + +-ncurses 6.5 2024-06-22 <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG> ++ncurses 6.5 2024-09-14 <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG> + </PRE> + <div class="nav"> + <ul> +Index: man/captoinfo.1m +Prereq: 1.63 +--- ncurses-6.5-20240831+/man/captoinfo.1m 2024-03-23 20:37:25.000000000 +0000 ++++ ncurses-6.5-20240914/man/captoinfo.1m 2024-09-14 00:39:51.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: captoinfo.1m,v 1.63 2024/03/23 20:37:25 tom Exp $ +-.TH @CAPTOINFO@ 1M 2024-03-23 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" ++.\" $Id: captoinfo.1m,v 1.65 2024/09/14 00:39:51 tom Exp $ ++.TH @CAPTOINFO@ 1M 2024-09-13 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -84,7 +84,6 @@ + .SS "Translations from Nonstandard Capabilities" + \fB\%@CAPTOINFO@\fP translates some obsolete, + nonstandard capabilities into standard +-(SVr4/XSI Curses) + \fI\%\%term\%info\fP capabilities. + It issues a diagnostic to the standard error stream for each, + inviting the user to check that it has not mistakenly translated an +@@ -96,7 +95,7 @@ + Cb S L L + Cb Cb Cb Cb + Cb Cb C Lb. +-Name ++\f(BItermcap\fP Code + Obsolete Standard Origin \f(BIterminfo\fP capability + _ + BO mr AT&T enter_reverse_mode +@@ -138,7 +137,7 @@ + center; + cb cb + cb l . +-\f(BItermcap\fP Name Graphic ++\f(BItermcap\fP Code Graphic + _ + G2 upper left corner + G3 lower left corner +@@ -184,7 +183,7 @@ + center; + cb cb + l l . +-IBM XSI ++IBM X/Open + _ + ksel kslt + kbtab kcbt +Index: man/curs_bkgd.3x +Prereq: 1.61 +--- ncurses-6.5-20240831+/man/curs_bkgd.3x 2024-04-20 18:54:36.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_bkgd.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_bkgd.3x,v 1.61 2024/04/20 18:54:36 tom Exp $ +-.TH curs_bkgd 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_bkgd.3x,v 1.63 2024/09/14 20:06:50 tom Exp $ ++.TH curs_bkgd 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -69,7 +69,7 @@ + of a + .I curses + window +-(in the library's non-\*(``wide\*('' configuration) ++(in the library's non-wide configuration) + is a + .I \%chtype + combining a set of attributes +@@ -213,12 +213,12 @@ + like SVr4 + .IR curses , + does not +-(in its non-\*(``wide\*('' configuration) ++(in its non-wide configuration) + store the background and window attribute contributions to each + character cell separately. + .SH SEE ALSO + \fB\%curs_bkgrnd\fP(3X) describes the corresponding functions in the +-\*(``wide\*('' configuration of ++wide configuration of + .IR \%ncurses . + .PP + \fB\%curses\fP(3X), +Index: man/curs_bkgrnd.3x +Prereq: 1.42 +--- ncurses-6.5-20240831+/man/curs_bkgrnd.3x 2024-04-20 18:54:36.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_bkgrnd.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_bkgrnd.3x,v 1.42 2024/04/20 18:54:36 tom Exp $ +-.TH curs_bkgrnd 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_bkgrnd.3x,v 1.44 2024/09/14 20:06:50 tom Exp $ ++.TH curs_bkgrnd 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -71,16 +71,17 @@ + of a + .I curses + window +-(in the library's \*(``wide\*('' configuration) ++(in the library's wide configuration) + is a + .I \%cchar_t + combining a set of attributes + (see \fB\%curs_attr\fP(3X)) +-with a complex character called the +-.I "blank character." ++with the window's blank character. + .PP +-The blank character is a spacing character that populates a window's +-character cells when their contents are erased without replacement. ++The ++.I "blank character" ++is a spacing complex character that populates a window's character cells ++when their contents are erased without replacement. + The background's attributes are combined with all non-blank characters + written to the window, + as with the \fB\%wadd_wch\fP(3X) and \fB\%wins_wch\fP(3X) families of +@@ -191,7 +192,7 @@ + \fB\%getbkgrnd\fP + may be implemented as macros. + .PP +-Unlike their counterparts in the non-\*(``wide\*('' configuration of ++Unlike their counterparts in the non-wide configuration of + .IR \%ncurses , + \fB\%getbkgrnd\fP and \fB\%wgetbkgrnd\fP supply the background character + and attribute in a modifiable +@@ -208,7 +209,7 @@ + .IR curses . + .SH SEE ALSO + \fB\%curs_bkgd\fP(3X) describes the corresponding functions in the +-non-\*(``wide\*('' configuration of ++non-wide configuration of + .IR \%ncurses . + .PP + \fB\%curses\fP(3X), +Index: man/curs_extend.3x +Prereq: 1.49 +--- ncurses-6.5-20240831+/man/curs_extend.3x 2024-07-27 23:21:36.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_extend.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -29,8 +29,8 @@ + .\" + .\" Author: Thomas E. Dickey 1999-on + .\" +-.\" $Id: curs_extend.3x,v 1.49 2024/07/27 23:21:36 tom Exp $ +-.TH curs_extend 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_extend.3x,v 1.51 2024/09/14 20:06:50 tom Exp $ ++.TH curs_extend 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -115,6 +115,7 @@ + offers several other extensions to the X/Open Curses API. + .PP + \fB\%curs_getch\fP(3X), ++\fB\%curs_inopts\fP(3X), + \fB\%curs_mouse\fP(3X), + \fB\%curs_print\fP(3X), + \fB\%curs_util\fP(3X), +@@ -122,5 +123,6 @@ + \fB\%define_key\fP(3X), + \fB\%keybound\fP(3X), + \fB\%keyok\fP(3X), ++\fB\%new_pair\fP(3X), + \fB\%resizeterm\fP(3X), + \fB\%wresize\fP(3X) +Index: man/curs_get_wch.3x +Prereq: 1.45 +--- ncurses-6.5-20240831+/man/curs_get_wch.3x 2024-07-20 21:43:33.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_get_wch.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_get_wch.3x,v 1.45 2024/07/20 21:43:33 tom Exp $ +-.TH curs_get_wch 3X 2024-07-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_get_wch.3x,v 1.47 2024/09/14 20:06:50 tom Exp $ ++.TH curs_get_wch 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -50,15 +50,15 @@ + \fB\%mvget_wch\fP, + \fB\%mvwget_wch\fP, + \fB\%unget_wch\fP \- +-get (or push back) a wide character from \fIcurses\fR terminal keyboard ++get (or push back) a wide character from \fIcurses\fR terminal keyboard buffer + .SH SYNOPSIS + .nf + \fB#include <curses.h> + .PP +-\fBint get_wch(wint_t *\fIwch\fP); +-\fBint wget_wch(WINDOW *\fIwin\fP, wint_t *\fIwch\fP); +-\fBint mvget_wch(int \fIy\fP, int \fIx\fP, wint_t *\fIwch\fP); +-\fBint mvwget_wch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wint_t *\fIwch\fP); ++\fBint get_wch(wint_t * \fIwch\fP); ++\fBint wget_wch(WINDOW * \fIwin\fP, wint_t * \fIwch\fP); ++\fBint mvget_wch(int \fIy\fP, int \fIx\fP, wint_t * \fIwch\fP); ++\fBint mvwget_wch(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, wint_t * \fIwch\fP); + .PP + \fBint unget_wch(const wchar_t \fIwc\fP); + .fi +Index: man/curs_getch.3x +Prereq: 1.99 +--- ncurses-6.5-20240831+/man/curs_getch.3x 2024-07-20 21:43:33.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_getch.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_getch.3x,v 1.99 2024/07/20 21:43:33 tom Exp $ +-.TH curs_getch 3X 2024-07-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_getch.3x,v 1.101 2024/09/14 20:06:50 tom Exp $ ++.TH curs_getch 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -57,15 +57,15 @@ + \fB\%mvwgetch\fP, + \fB\%ungetch\fP, + \fB\%has_key\fP \- +-get (or push back) characters from \fIcurses\fR terminal keyboard ++get (or push back) characters from \fIcurses\fR terminal keyboard buffer + .SH SYNOPSIS + .nf + .B #include <curses.h> + .PP + .B int getch(void); +-.B int wgetch(WINDOW *\fIwin\fP); ++.B int wgetch(WINDOW * \fIwin\fP); + .B int mvgetch(int \fIy\fP, int \fIx\fP); +-.B int mvwgetch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP); ++.B int mvwgetch(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP); + .PP + .B int ungetch(int \fIc\fP); + .PP +@@ -594,6 +594,11 @@ + (Insert), + .B \%KEY_DC + (Delete), ++.BR \%KEY_A1 "," ++.BR \%KEY_A3 "," ++.BR \%KEY_B2 "," ++.BR \%KEY_C1 "," ++.BR \%KEY_C3 "," + and + .BI \%KEY_F( n ) + for 1 \(<= +Index: man/curs_initscr.3x +Prereq: 1.75 +--- ncurses-6.5-20240831+/man/curs_initscr.3x 2024-06-08 20:34:23.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_initscr.3x 2024-09-11 21:00:07.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_initscr.3x,v 1.75 2024/06/08 20:34:23 tom Exp $ +-.TH curs_initscr 3X 2024-06-08 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_initscr.3x,v 1.77 2024/09/11 21:00:07 tom Exp $ ++.TH curs_initscr 3X 2024-09-11 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -77,7 +77,7 @@ + .PP + The initscr code determines the terminal type and initializes all \fBcurses\fP + data structures. +-\fBinitscr\fP also causes the first call to \fBrefresh\fP(3X) ++\fBinitscr\fP also causes the first call to \fB\%refresh\fP(3X) + to clear the screen. + If errors occur, \fBinitscr\fP writes an appropriate error + message to standard error and exits; +@@ -128,11 +128,11 @@ + .bP + restores tty modes (see \fBreset_shell_mode\fP(3X)). + .PP +-Calling \fBrefresh\fP(3X) or \fBdoupdate\fP(3X) after a ++Calling \fB\%refresh\fP(3X) or \fBdoupdate\fP(3X) after a + temporary escape causes the program to resume visual mode. + .SS isendwin + The \fBisendwin\fP routine returns \fBTRUE\fP if \fBendwin\fP has been +-called without any subsequent calls to \fBwrefresh\fP, ++called without any subsequent calls to \fB\%wrefresh\fP, + and \fBFALSE\fP otherwise. + .SS set_term + The \fBset_term\fP routine is used to switch between different terminals. +Index: man/curs_inopts.3x +Prereq: 1.75 +--- ncurses-6.5-20240831+/man/curs_inopts.3x 2024-06-15 19:49:39.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_inopts.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_inopts.3x,v 1.75 2024/06/15 19:49:39 tom Exp $ +-.TH curs_inopts 3X 2024-06-15 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_inopts.3x,v 1.77 2024/09/14 20:06:50 tom Exp $ ++.TH curs_inopts 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -147,7 +147,7 @@ + and makes characters typed by the user immediately available to the + program. + .B \%nocbreak +-returns the terminal to normal (\*(``cooked\*('') mode. ++restores the terminal's normal (\*(``cooked\*('') line discipline. + .PP + The state of the terminal is unknown to a + .I curses +@@ -283,6 +283,7 @@ + Initially, + whether the terminal returns 7- or 8-bit character codes on input + depends on the configuration of the terminal driver; ++on POSIX systems, + see \fI\%termios\fP(3). + To force 8 bits to be returned, + call +@@ -327,7 +328,7 @@ + configures the terminal to perform this translation. + .B nonl + disables it. +-In normal (or \*(``cooked\*('') mode, ++Under its normal (\*(``cooked\*('') line discipline, + the terminal driver always translates carriage returns to line feeds. + .\" + .SS nodelay +@@ -364,10 +365,8 @@ + configure the terminal driver's treatment of its input and output queues + when it handles the interrupt, + suspend, +-or quit characters in +-.I \%cbreak +-and \*(``cooked\*('' modes; +-on POSIX systems, ++or quit characters under the normal (\*(``cooked\*('') ++or cbreak line discplines on POSIX systems; + see \fI\%termios\fP(3). + The default behavior is inherited from the terminal driver settings. + Calling +@@ -413,7 +412,7 @@ + .I curses + does not handle. + .B \%noraw +-returns the terminal to normal (\*(``cooked\*('') mode. ++restores the terminal's normal (\*(``cooked\*('') line discipline. + .\" + .SS "timeout, wtimeout" + .B \%wtimeout +@@ -558,8 +557,9 @@ + .B \%noraw + and + .B \%nocbreak +-follow historical practice in that they attempt to restore normal +-(\*(``cooked\*('') mode from raw and cbreak modes, ++follow historical practice in that they attempt to restore ++the terminal's normal (\*(``cooked\*('') line discipline ++from raw and cbreak, + respectively. + Mixing + .BR \%raw / noraw +@@ -642,7 +642,8 @@ + or + .B \%noecho + explicitly just after initialization, +-even if your program remains in normal (\*(``cooked\*('') mode. ++even if your program retains the terminal's normal (\*(``cooked\*('') ++line discipline. + .PP + X/Open Curses is ambiguous regarding whether + .I raw +Index: man/curs_ins_wstr.3x +Prereq: 1.44 +--- ncurses-6.5-20240831+/man/curs_ins_wstr.3x 2024-07-27 20:15:31.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_ins_wstr.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_ins_wstr.3x,v 1.44 2024/07/27 20:15:31 tom Exp $ +-.TH curs_ins_wstr 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_ins_wstr.3x,v 1.46 2024/09/14 20:06:50 tom Exp $ ++.TH curs_ins_wstr 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -188,7 +188,7 @@ + in that their + .I wstr + parameters are not +-.IR const -qualified . ++.IR const "-qualified." + .SH SEE ALSO + \fB\%curs_insstr\fP(3X) describes comparable functions of the + .I \%ncurses +Index: man/curs_instr.3x +Prereq: 1.57 +--- ncurses-6.5-20240831+/man/curs_instr.3x 2024-06-08 20:47:39.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_instr.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_instr.3x,v 1.57 2024/06/08 20:47:39 tom Exp $ +-.TH curs_instr 3X 2024-06-08 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_instr.3x,v 1.59 2024/09/14 20:06:50 tom Exp $ ++.TH curs_instr 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -46,27 +46,27 @@ + .. + .SH NAME + \fB\%instr\fP, +-\fB\%innstr\fP, + \fB\%winstr\fP, +-\fB\%winnstr\fP, + \fB\%mvinstr\fP, +-\fB\%mvinnstr\fP, + \fB\%mvwinstr\fP, ++\fB\%innstr\fP, ++\fB\%winnstr\fP, ++\fB\%mvinnstr\fP, + \fB\%mvwinnstr\fP \- + get a string from a \fIcurses\fR window + .SH SYNOPSIS + .nf + \fB#include <curses.h> + .PP +-\fBint instr(char *\ \fIstr\fP); +-\fBint winstr(WINDOW *\ \fIwin\fP, char *\ \fIstr\fP); +-\fBint mvinstr(int \fIy\fP, int \fIx\fP, char *\ \fIstr\fP); +-\fBint mvwinstr(WINDOW *\ \fIwin\fP, int \fIy\fP, int \fIx\fP, char *\ \fIstr\fP); ++\fBint instr(char * \fIstr\fP); ++\fBint winstr(WINDOW * \fIwin\fP, char * \fIstr\fP); ++\fBint mvinstr(int \fIy\fP, int \fIx\fP, char * \fIstr\fP); ++\fBint mvwinstr(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, char * \fIstr\fP); + .PP +-\fBint innstr(char *\ \fIstr\fP, int \fIn\fP); +-\fBint winnstr(WINDOW *\ \fIwin\fP, char *\ \fIstr\fP, int \fIn\fP); +-\fBint mvinnstr(int \fIy\fP, int \fIx\fP, char *\ \fIstr\fP, int \fIn\fP); +-\fBint mvwinnstr(WINDOW *\ \fIwin\fP, int \fIy\fP, int \fIx\fP, char *\ \fIstr\fP, int \fIn\fP); ++\fBint innstr(char * \fIstr\fP, int \fIn\fP); ++\fBint winnstr(WINDOW * \fIwin\fP, char * \fIstr\fP, int \fIn\fP); ++\fBint mvinnstr(int \fIy\fP, int \fIx\fP, char * \fIstr\fP, int \fIn\fP); ++\fBint mvwinnstr(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, char * \fIstr\fP, int \fIn\fP); + .fi + .SH DESCRIPTION + .B \%winstr +Index: man/curs_inwstr.3x +Prereq: 1.45 +--- ncurses-6.5-20240831+/man/curs_inwstr.3x 2024-06-08 21:19:18.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_inwstr.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_inwstr.3x,v 1.45 2024/06/08 21:19:18 tom Exp $ +-.TH curs_inwstr 3X 2024-06-08 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_inwstr.3x,v 1.47 2024/09/14 20:06:50 tom Exp $ ++.TH curs_inwstr 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -45,27 +45,27 @@ + .. + .SH NAME + \fB\%inwstr\fP, +-\fB\%innwstr\fP, + \fB\%winwstr\fP, +-\fB\%winnwstr\fP, + \fB\%mvinwstr\fP, +-\fB\%mvinnwstr\fP, + \fB\%mvwinwstr\fP, ++\fB\%innwstr\fP, ++\fB\%winnwstr\fP, ++\fB\%mvinnwstr\fP, + \fB\%mvwinnwstr\fP \- + get a wide-character string from a \fIcurses\fR window + .SH SYNOPSIS + .nf + \fB#include <curses.h> + .PP +-\fBint inwstr(wchar_t *\ \fIwstr\fP); +-\fBint winwstr(WINDOW *\ \fIwin\fP, wchar_t *\ \fIwstr\fP); +-\fBint mvinwstr(int \fIy\fP, int \fIx\fP, wchar_t *\ \fIwstr\fP); +-\fBint mvwinwstr(WINDOW *\ \fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t *\ \fIwstr\fP); ++\fBint inwstr(wchar_t * \fIwstr\fP); ++\fBint winwstr(WINDOW * \fIwin\fP, wchar_t * \fIwstr\fP); ++\fBint mvinwstr(int \fIy\fP, int \fIx\fP, wchar_t * \fIwstr\fP); ++\fBint mvwinwstr(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t * \fIwstr\fP); + .PP +-\fBint innwstr(wchar_t *\ \fIwstr\fP, int \fIn\fP); +-\fBint winnwstr(WINDOW *\ \fIwin\fP, wchar_t *\ \fIwstr\fP, int \fIn\fP); +-\fBint mvinnwstr(int \fIy\fP, int \fIx\fP, wchar_t *\ \fIwstr\fP, int \fIn\fP); +-\fBint mvwinnwstr(WINDOW *\ \fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t *\ \fIwstr\fP, int \fIn\fP); ++\fBint innwstr(wchar_t * \fIwstr\fP, int \fIn\fP); ++\fBint winnwstr(WINDOW * \fIwin\fP, wchar_t * \fIwstr\fP, int \fIn\fP); ++\fBint mvinnwstr(int \fIy\fP, int \fIx\fP, wchar_t * \fIwstr\fP, int \fIn\fP); ++\fBint mvwinnwstr(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t * \fIwstr\fP, int \fIn\fP); + .fi + .SH DESCRIPTION + .B \%winwstr +@@ -86,7 +86,7 @@ + does the same, + but copies at most + .I n +-characters from ++wide characters from + .IR win "." + An + .I n +Index: man/curs_kernel.3x +Prereq: 1.67 +--- ncurses-6.5-20240831+/man/curs_kernel.3x 2024-06-22 21:24:26.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_kernel.3x 2024-09-14 20:14:54.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_kernel.3x,v 1.67 2024/06/22 21:24:26 tom Exp $ +-.TH curs_kernel 3X 2024-06-22 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_kernel.3x,v 1.70 2024/09/14 20:14:54 tom Exp $ ++.TH curs_kernel 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -167,12 +167,23 @@ + Few applications use this feature; + most call \fB\%wmove\fP(3X) instead. + .SS curs_set +-The \fBcurs_set\fP routine sets the cursor state to invisible, +-normal, or very visible for \fBvisibility\fP equal to \fB0\fP, +-\fB1\fP, or \fB2\fP respectively. +-If the terminal supports the \fIvisibility\fP requested, +-the previous \fIcursor\fP state is returned; +-otherwise, \fBERR\fP is returned. ++.B \%curs_set ++adjusts the cursor visibility to ++\*(``invisible\*('', ++\*(``visible\*('', ++\*(``very visible\*('', ++as its argument is ++.BR 0 , ++.BR 1 , ++or ++.BR 2 , ++respectively. ++It returns the previous ++.I visibility ++if the requested one is supported, ++and ++.B ERR ++otherwise. + .SS mvcur + .B \%mvcur + provides low-level cursor motion. +@@ -245,41 +256,72 @@ + \fBripoffline\fP can be called up to five times before calling \fBinitscr\fP or + \fBnewterm\fP. + .SH RETURN VALUE +-Except for \fBcurs_set\fP, these routines always return \fBOK\fP. ++Except for ++.BR \%curs_set "," ++these functions return ++.B OK ++on success and ++.B ERR ++on failure. ++.PP ++.B \%curs_set ++returns the previous cursor visibility, ++and returns ++.B ERR ++if the terminal type does not support the requested ++.IR visibility "." ++.PP ++.B \%napms ++always succeeds. + .PP +-\fBcurs_set\fP +-returns the previous cursor state, or \fBERR\fP if the +-requested \fIvisibility\fP is not supported. +-.PP +-X/Open defines no error conditions. +-In this implementation +-.TP 5 +-\fBdef_prog_mode\fP, \fBdef_shell_mode\fP, \fBreset_prog_mode\fP, \fBreset_shell_mode\fP ++.B \%mvcur ++fails if the position ++.RI ( newrow , ++.IR newcol ) ++is outside the screen boundaries. ++.PP ++In ++.IR \%ncurses "," ++.bP ++.BR \%def_prog_mode "," ++.BR \%def_shell_mode "," ++.BR \%reset_prog_mode "," ++and ++.B \%reset_shell_mode + return + .B ERR +-if the terminal was not initialized, or +-if the I/O call to obtain the terminal settings fails. +-.TP 5 +-\fBripoffline\fP ++if the terminal was not initialized, ++or if the operating system's function for obtaining terminal settings ++fails. ++.bP ++.B \%ripoffline + returns + .B ERR + if the maximum number of ripped-off lines + exceeds the maximum (5). + .SH NOTES +-Note that \fBgetsyx\fP is a macro, so \fB&\fP is not necessary before +-the variables \fIy\fP and \fIx\fP. +-.PP +-Older SVr4 man pages warn that the return value +-of \fBcurs_set\fP \*(``is currently incorrect\*(''. +-This implementation gets it right, but it may be unwise to count +-on the correctness of the return value anywhere else. +-.PP +-Both \fI\%ncurses\fP and SVr4 will call \fBcurs_set\fP in \fBendwin\fP +-if \fBcurs_set\fP +-has been called to make the cursor other than normal, i.e., either ++.B \%getsyx ++is a macro; ++use of the ++.B & ++operator before its arguments is unnecessary. ++.PP ++The ++.B \%endwin ++function of both ++.I \%ncurses ++and SVr4 ++.I curses ++calls ++.B \%curs_set ++if the latter has previously been called to set the cursor visiblility ++to a value other than normal; ++that is, ++either + invisible or very visible. +-There is no way for \fI\%ncurses\fP to determine the initial cursor +-state to restore that. ++There is no way for ++.I \%ncurses ++to determine the initial cursor visibility to restore it. + .SH EXTENSIONS + In + .IR \%ncurses "," +@@ -304,24 +346,51 @@ + .B \%NCURSES_VERSION + preprocessor macro. + .PP +-The \fIvirtual screen\fP functions \fBsetsyx\fP and \fBgetsyx\fP +-are not described in X/Open Curses, Issue 4. +-All other functions are as described in X/Open Curses. ++The ++.I "virtual screen" ++functions ++.I \%setsyx ++and ++.I \%getsyx ++are not described in X/Open Curses Issue\ 4. ++SVr4 documents each of them ++as returning an ++.IR int "." ++This is misleading, ++as they are macros with no documented semantics for returning values. + .PP +-The SVr4 documentation describes \fBsetsyx\fP and \fBgetsyx\fP +-as having return type int. +-This is misleading, as they are macros with no documented semantics +-for the return value. ++All other functions are as described in X/Open Curses. ++It specifies no error conditions for them, ++except as described for ++.I \%curs_set ++in section \*(``RETURN VALUE\*('' above. ++.PP ++Older SVr4 man pages warn that the return value of ++.B \%curs_set ++\*(``is currently incorrect\*(''. ++This implementation gets it right, ++but counting on its correctness anywhere else may be unwise. ++.PP ++X/Open Curses specifies ++.I \%ripoffline ++as returning ++.B OK ++with no possibility of failure ++(\*(``[c]alls to ++.I \%ripoffline ++above this limit ++[five lines] ++have no effect but report success\*(''). + .PP + X/Open Curses notes: + .RS + .PP +-\*(``After use of ++After use of + .IR \%mvcur "()," + the model Curses maintains of the state of the terminal might not + match the actual state of the terminal. + An application should touch and refresh the window before +-resuming conventional use of Curses.\*('' ++resuming conventional use of Curses. + .RE + .PP + Both +@@ -332,15 +401,19 @@ + .B \%mvcur + using the + .I SCREEN +-data allocated in either \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X). ++object allocated in either \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X). + X/Open Curses states that the old location must be given for +-.B \%mvcur ++.I \%mvcur + to accommodate terminals that lack absolute cursor positioning. + .\" X/Open Curses Issue 7, p. 161 + .PP +-If interrupted, \fI\%ncurses\fP restarts \fBnapms\fP. +-That, and the limitation to 30 seconds, +-are different from other implementations. ++If interrupted by a signal, ++.I \%ncurses ++restarts ++.IR \%napms "." ++That, ++and the limitation to 30 seconds, ++differ from other implementations. + .SH SEE ALSO + \fB\%curses\fP(3X), + \fB\%curs_initscr\fP(3X), +Index: man/curs_outopts.3x +Prereq: 1.69 +--- ncurses-6.5-20240831+/man/curs_outopts.3x 2024-07-27 19:55:45.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_outopts.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,19 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_outopts.3x,v 1.69 2024/07/27 19:55:45 tom Exp $ +-.TH curs_outopts 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_outopts.3x,v 1.71 2024/09/14 20:06:50 tom Exp $ ++.TH curs_outopts 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.ie \n(.g \{\ ++.ds `` \(lq ++.ds '' \(rq ++.\} ++.el \{\ ++.ie t .ds `` `` ++.el .ds `` "" ++.ie t .ds '' '' ++.el .ds '' "" ++.\} ++. + .de bP + .ie n .IP \(bu 4 + .el .IP \(bu 2 +@@ -166,25 +177,45 @@ + The \fBimmedok\fP routine is useful for windows that are used as terminal + emulators. + .SH PORTABILITY +-These functions are described in X/Open Curses, Issue 4. ++X/Open Curses, ++Issue 4 describes these functions. + It specifies no error conditions for them. + .PP +-Some historic curses implementations had, as an undocumented feature, the +-ability to do the equivalent of \fBclearok(..., 1)\fP by saying +-\fBtouchwin(stdscr)\fP or \fBclear(stdscr)\fP. +-This will not work under \fI\%ncurses\fP. +-.PP +-Earlier System V curses implementations specified that with \fBscrollok\fP +-enabled, any window modification triggering a scroll also forced a physical +-refresh. +-X/Open Curses does not require this, and \fI\%ncurses\fP avoids doing +-it to perform better vertical-motion optimization at \fBwrefresh\fP +-time. ++Some historic ++.I curses ++implementations, ++as an undocumented feature, ++did the equivalent of ++.RB \*(`` \%clearok( .\|.\|. ", 1)" \*('' ++when ++.B \%touchwin(stdstr) ++or ++.B \%clear(stdstr) ++were used. ++This trick does not work with ++.IR \%ncurses . ++.PP ++Early System\ V ++.I curses ++implementations specified that with ++.B \%scrollok ++enabled, ++any window modification triggering a scroll ++also forced a physical refresh. ++X/Open Curses does not require this, ++and ++.I \%ncurses ++avoids doing so to better optimize vertical motions upon a ++\fB\%wrefresh\fP(3X). + .PP + X/Open Curses does not mention that the cursor should be +-made invisible as a side-effect of \fBleaveok\fP. +-SVr4 curses documentation does this, but the code does not. +-Use \fBcurs_set\fP to make the cursor invisible. ++made invisible as a side-effect of ++.BR \%leaveok . ++SVr4 ++.I curses ++documentation notes this, ++but the code neglects it. ++Use \fB\%curs_set\fP(3X) to make the cursor invisible. + .SH HISTORY + .I \%ncurses + formerly treated \fBnl\fP(3X) and \fBnonl\fP(3X) as both input +Index: man/curs_refresh.3x +Prereq: 1.50 +--- ncurses-6.5-20240831+/man/curs_refresh.3x 2024-07-27 19:55:45.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_refresh.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_refresh.3x,v 1.50 2024/07/27 19:55:45 tom Exp $ +-.TH curs_refresh 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_refresh.3x,v 1.52 2024/09/14 20:06:50 tom Exp $ ++.TH curs_refresh 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -164,5 +164,5 @@ + \fBwnoutrefresh\fP call to guarantee an entire-contents copy anywhere. + .SH SEE ALSO + \fB\%curses\fP(3X), +-\fB\%curs_outopts\fP(3X) ++\fB\%curs_outopts\fP(3X), + \fB\%curs_variables\fP(3X) +Index: man/curs_scroll.3x +Prereq: 1.45 +--- ncurses-6.5-20240831+/man/curs_scroll.3x 2024-05-25 20:16:27.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_scroll.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_scroll.3x,v 1.45 2024/05/25 20:16:27 tom Exp $ +-.TH curs_scroll 3X 2024-05-25 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_scroll.3x,v 1.47 2024/09/14 20:06:50 tom Exp $ ++.TH curs_scroll 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -68,7 +68,8 @@ + .IR i "\-1." + The text of the top line in the window disappears and the bottom line + is populated with blank characters; +-see \fB\%bkgd\fP(3X) or \fB\%bkgrnd\fP(3X). ++see \fB\%bkgd\fP(3X) ++(wide-character API users: \fB\%bkgrnd\fP(3X)). + As an optimization, + if the scrolling region of the window is the entire screen, + the physical screen may be scrolled at the same time; +@@ -77,9 +78,9 @@ + .B \%scrl + and + .B \%wscrl +-scroll +-.B \%stdscr +-or the specified window up or down depending on the sign of ++scrolls the specified window ++.I win ++up or down per the sign of + .IR n "." + .bP + For positive +@@ -97,6 +98,9 @@ + becomes + .I i + (scrolling down). ++\fB\%ncurses\fP(3X) describes the ++.B \%scrl ++variant of this function. + .PP + The cursor does not move. + These functions perform no operation unless scrolling is enabled for the +@@ -147,16 +151,17 @@ + if the scroll region is the entire screen \*(``is\*('' performed, + not \*(``may be\*('' performed. + .I \%ncurses +-deliberately does not guarantee that this will occur, +-to leave open the possibility of smarter optimization of multiple scroll ++deliberately does not guarantee that this occurs, ++to leave open the possibility of better optimization of multiple scroll + actions on the next update. + .PP + Neither SVr4 + .I curses +-nor X/Open Curses specify whether the current attribute or current color +-pair of blanks generated by the scroll function are zeroed. +-.I \%ncurses +-does so. ++nor X/Open Curses specify whether these functions zero the attributes or ++color pair identifier of the blank character. ++In ++.IR \%ncurses "," ++they do not. + .SH SEE ALSO + \fB\%curses\fP(3X), + \fB\%curs_outopts\fP(3X) +Index: man/curs_termcap.3x +Prereq: 1.87 +--- ncurses-6.5-20240831+/man/curs_termcap.3x 2024-06-22 21:28:07.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_termcap.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_termcap.3x,v 1.87 2024/06/22 21:28:07 tom Exp $ +-.TH curs_termcap 3X 2024-06-22 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_termcap.3x,v 1.89 2024/09/14 20:06:50 tom Exp $ ++.TH curs_termcap 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -45,6 +45,51 @@ + .el .IP \(bu 2 + .. + . ++.\" URL hyperlink support macros from groff's "an-ext.tmac" ++. ++.\" Save the automatic hyphenation mode. ++.\" ++.\" In AT&T troff, there was no register exposing the hyphenation mode, ++.\" and no way to save and restore it. Set `mH` to a reasonable value ++.\" for your implementation and preference. ++.de mY ++. ie !\\n(.g \ ++. nr mH 14 ++. el \ ++. do nr mH \\n[.hy] \" groff extension register ++.. ++. ++.\" Prepare link text for mail/web hyperlinks. `MT` and `UR` call this. ++.de mV ++. ds mU \\$1\" ++.. ++. ++.\" Emit hyperlink. The optional argument supplies trailing punctuation ++.\" after link text. `ME` and `UE` call this. ++.de mQ ++. mY ++. nh ++<\\*(mU>\\$1 ++. hy \\n(mH ++. rm mU ++.. ++. ++.\" Start URL. ++.\" .UR url ++.if !\n(.g \{\ ++.de UR ++. mV \\$1 ++.. ++.\} ++. ++.\" End URL. ++.\" .UE [punctuation] ++.if !\n(.g \{\ ++.de UE ++. mQ \\$1 ++.. ++.\} ++. + .SH NAME + \fB\%PC\fP, + \fB\%UP\fP, +@@ -302,96 +347,148 @@ + .SH PORTABILITY + These functions are no longer standardized + (and the variables never were); +-\fI\%ncurses\fP provides them to support legacy applications. ++.I \%ncurses ++provides them to support legacy applications. + They should not be used in new programs. + .SS Standards + .bP +-X/Open Curses, Issue 4, Version 2 (1996), ++X/Open Curses, ++Issue 4, ++Version 2 (1996), + describes these functions, + marking them as + \*(``TO BE WITHDRAWN\*(''. + .bP +-X/Open Curses, Issue 7 (2009) marks the \fItermcap\fP interface +-(along with \fB\%vwprintw\fP and \fB\%vwscanw\fP) as withdrawn. ++X/Open Curses, ++Issue 7 (2009) withdrew the ++.I termcap ++interface ++(along with the ++.I \%vwprintw ++and ++.I \%vwscanw ++functions). + .PP + Neither X/Open Curses nor the SVr4 man pages documented the return +-values of \fB\%tgetent\fP correctly, ++values of ++.I \%tgetent ++correctly, + though all three shown here were in fact returned ever since SVr1. + In particular, + an omission in the X/Open Curses specification has been misinterpreted +-to mean that \fB\%tgetent\fP returns \fBOK\fP or \fBERR\fP. ++to mean that ++.I \%tgetent ++returns ++.B OK ++or ++.BR ERR "." + Because the purpose of these functions is to provide compatibility with +-the \fItermcap\fP library, +-that is a defect in X/Open Curses, Issue 4, Version 2 +-rather than in \fI\%ncurses\fP. +-.SS "Compatibility with BSD \fItermcap\fP" +-Externally visible variables are provided for support of certain +-\fItermcap\fP applications. ++the ++.I termcap ++library, ++that is a defect in X/Open Curses, ++Issue 4, ++Version 2 ++rather than in ++.IR \%ncurses "." ++.SS "Compatibility with BSD \f(BItermcap\fP" ++.I \%ncurses ++provides externally visible variables to support certain ++.I termcap ++applications. + However, + their correct usage is poorly documented; + for example, + it is unclear when reading and writing them is meaningful. + In particular, +-some applications are reported to declare and/or modify \fB\%ospeed\fP. ++some applications are reported to declare and/or modify ++.BR \%ospeed "." + .PP +-The constraint that only the first two characters of the \fIid\fP +-parameter are used escapes many application developers. +-The BSD \fItermcap\fP library did not require a trailing null character +-on the capability identifier passed to \fB\%tgetstr\fP, +-\fB\%tgetnum\fP, ++The constraint that only the first two characters of the ++.I id ++parameter are looked up in the terminal database ++escapes many application developers. ++The BSD ++.I termcap ++library did not require a trailing null character ++after the capability identifier passed to ++.IR \%tgetstr "," ++.IR \%tgetnum "," + and +-\fB\%tgetflag\fP. ++.IR \%tgetflag "." + .\" See <https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/\ + .\" termlib/termcap.c>. +-Some applications thus assume that the \fItermcap\fP interface does not +-require the trailing null character for the capability identifier. +-.bP ++Some applications thus assume that the ++.I termcap ++interface does not require the trailing null character ++for the capability identifier. ++.PP + .I \%ncurses +-disallows matches by the \fItermcap\fP interface against extended +-capability names that are longer than two characters; ++disallows matches by the ++.I termcap ++interface against extended capability names ++that are longer than two characters; + see \fB\%user_caps\fP(5). + .PP +-The BSD \fItermcap\fP function \fB\%tgetent\fP returns the text of a +-\fItermcap\fP entry in the buffer passed as an argument. ++The BSD ++.I termcap ++function ++.I \%tgetent ++returns the text of a ++.I termcap ++entry in the buffer passed as an argument. + This library, +-like other \fI\%term\%info\fP implementations, ++like other ++.I \%term\%info ++implementations, + does not store terminal type descriptions as text. + It sets the buffer contents to a null-terminated string. + .SS "Header File" +-This library includes a \fI\%termcap.h\fP header for compatibility with +-other implementations, +-but the header is rarely used because the other implementations are not +-strictly compatible. ++This library includes a ++.I \%termcap.h ++header file for compatibility with other implementations, ++but it is rarely used because the other implementations ++are not mutually compatible; ++see below. + .SH HISTORY + .\" See https://www.oreilly.com/openbook/opensources/book/kirkmck.html + .\" for much BSD release history. +-Bill Joy originated a forerunner of \fItermcap\fP called +-\*(``ttycap\*('', ++Bill Joy originated a forerunner of ++.I termcap ++called \*(``ttycap\*('', + dated September 1977, + and released in 1BSD + (March 1978). + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/s7/ttycap.c + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/man7/ttycap.7 +-It used many of the same function names as the later \fItermcap\fP, ++It used many of the same function names as the later ++.IR termcap "," + such as +-\fB\%tgetent\fP, +-\fB\%tgetflag\fP, +-\fB\%tgetnum\fP, ++.IR \%tgetent "," ++.IR \%tgetflag "," ++.IR \%tgetnum "," + and +-\fB\%tgetstr\fP. ++.IR \%tgetstr "." + .PP + A clear descendant, +-the \fItermlib\fP library, ++the ++.I termlib ++library, + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/src/termlib/ + followed in 2BSD + (May 1979), +-adding \fB\%tgoto\fP and \fB\%tputs\fP. ++adding ++.I \%tgoto ++and ++.IR \%tputs "." + The former applied at that time only to cursor positioning capabilities, + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=2BSD/bin/etc/termcap + thus the overly specific name. + Little changed in 3BSD + (late 1979) +-except the addition of test programs and a \fI\%termlib\fP man page, ++except the addition of test programs and a ++.I termlib ++man page, + which documented the API shown in section \*(``SYNOPSIS\*('' above. + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/lib/\ + .\" libtermlib/ +@@ -400,7 +497,10 @@ + .PP + 4BSD + (November 1980) +-renamed \fItermlib\fP to \fItermcap\fP ++renamed ++.I termlib ++to ++.I termcap + .\" ...except in the source tree... + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/lib/\ + .\" libtermlib/makefile +@@ -418,8 +518,9 @@ + The library long antedated the standard and thus provided no header file + declaring them. + Nevertheless, +-the BSD sources included two different \fI\%termcap.h\fP header files +-over time. ++the BSD sources included two different ++.I \%termcap.h ++header files over time. + .bP + One was used internally by \fIjove\fP(1) from 4.3BSD onward. + .\" 2BSD became a branch retaining support for non-virtual memory +@@ -435,55 +536,93 @@ + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD/usr/contrib/\ + .\" jove/Makefile + .\" --much too late for 2BSD (1979). +-It declared global symbols for the \fItermcap\fP variables that it used. ++It declared global symbols for the ++.I termcap ++variables that it used. + .bP + The other appeared in 4.4BSD-Lite Release 2 + (June 1995) +-as part of \fIlibedit\fP +-(also known as the \fI\%edit\%line\fP library). ++as part of ++.I libedit ++(also known as the ++.I \%edit\%line ++library). + CSRG source history shows that this was added in mid-1992. +-The \fIlibedit\fP header file was used internally as a convenience for +-compiling the \fI\%edit\%line\fP library. ++The ++.I libedit ++header file was used internally as a convenience ++for compiling the ++.I \%edit\%line ++library. + It declared function prototypes, + but no global variables. +-This header file was added to NetBSD's \fItermcap\fP library in +-mid-1994. ++NetBSD's ++.I termcap ++library added this header file in mid-1994. + .PP + Meanwhile, +-GNU \fItermcap\fP began development in 1990. +-Its first release (1.0) in 1991 included a \fI\%termcap.h\fP header. +-Its second (1.1) in September 1992 modified the header to use +-\fIconst\fP for the function prototypes in the header where one would +-expect the parameters to be read-only. +-BSD \fItermcap\fP did not. +-The prototype for \fB\%tputs\fP also differed, ++GNU ++.I termcap ++began development in 1990. ++Its first release (1.0) in 1991 included a ++.I \%termcap.h ++header file. ++Its second (1.1) release in September 1992 modified the file to use ++.I const ++for the function prototypes in the header where one would ++expect parameters to be read-only. ++BSD ++.I termcap ++did not. ++The prototype for ++.I \%tputs ++also differed, + but in that instance, +-it was \fIlibedit\fP that differed from BSD \fItermcap\fP. +-.PP +-GNU \fItermcap\fP 1.3 was bundled with \fIbash\fP(1) in mid-1993 to +-support the \fI\%readline\fP(3) library. ++it was ++.I libedit ++that differed from BSD ++.IR termcap "." ++.PP ++GNU \fIbash\fP(1) has bundled GNU ++.I termcap ++1.3 since mid-1993 to support its \fI\%readline\fP(3) library, ++and continues to use it if configured to do so. + .PP +-\fI\%ncurses\fP 1.8.1 ++.I \%ncurses ++1.8.1 + (November 1993) +-provided a \fI\%termcap.h\fP file. +-It reflected influence from GNU \fItermcap\fP and \fI\%emacs\fP(1) ++provided a ++.I \%termcap.h ++file. ++It reflected influence from GNU ++.I termcap ++and \fI\%emacs\fP(1) + (rather than \fIjove\fP(1)), + providing the following interface: + .bP +-global symbols used by \fI\%emacs\fP, ++global symbols used by ++.IR \%emacs "," + .bP +-\fIconst\fP-qualified function prototypes, ++.IR const -qualified ++function prototypes, + and + .bP +-a prototype for \fBtparam\fP, +-a GNU \fItermcap\fP feature. ++a prototype for ++.IR tparam "," ++a GNU ++.I termcap ++feature. + .PP + Later + (in mid-1996) +-the \fB\%tparam\fP function was removed from \fI\%ncurses\fP. ++the ++.I tparam ++function was removed from ++.IR \%ncurses "." + Any two of the four implementations thus differ, +-and programs that intend to work with all \fItermcap\fP library +-interfaces must account for that fact. ++and programs that intend to work with all ++.I termcap ++library interfaces must account for that fact. + .SH BUGS + If you call \fB\%tgetstr\fP to fetch + .B \%column_address +@@ -538,10 +677,14 @@ + the \fItermcap\fP interface to accommodate the latter's limitation in + this respect. + .SH "SEE ALSO" ++.na ++.UR https://invisible\-island.net/ncurses/tctest.html ++\fITCTEST - A Termcap Test Utility\fP ++.UE ++.ad ++.PP + \fB\%curses\fP(3X), + \fB\%curs_terminfo\fP(3X), + \fB\%putc\fP(3), + \fB\%term_variables\fP(3X), + \fB\%terminfo\fP(5) +-.PP +-https://invisible\-island.net/ncurses/tctest.html +Index: man/curs_terminfo.3x +Prereq: 1.142 +--- ncurses-6.5-20240831+/man/curs_terminfo.3x 2024-06-08 23:05:52.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_terminfo.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_terminfo.3x,v 1.142 2024/06/08 23:05:52 tom Exp $ +-.TH curs_terminfo 3X 2024-06-08 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_terminfo.3x,v 1.144 2024/09/14 20:06:50 tom Exp $ ++.TH curs_terminfo 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -330,57 +330,76 @@ + .RE + .\" ******************************************************************** + .SS "The Terminal State" +-\fB\%setupterm\fP stores its information about the terminal in a ++.B \%setupterm ++stores its information about the terminal in a + .I \%TERMINAL +-structure pointed to by the global variable \fB\%cur_term\fP. ++structure pointed to by the global variable ++.BR \%cur_term "." + If it detects an error, + or decides that the terminal is unsuitable + (hardcopy or generic), + it discards this information, +-making it not available to applications. ++making it unavailable to applications. + .PP +-If \fB\%setupterm\fP is called repeatedly for the same terminal type, +-it will reuse the information. +-It maintains only one copy of a given terminal's capabilities in memory. +-If it is called for different terminal types, +-\fB\%setupterm\fP allocates new storage for each set of terminal +-capabilities. +-.PP +-\fB\%set_curterm\fP sets \fB\%cur_term\fP to +-.IR \%nterm , +-and makes all of the ++If ++.B \%setupterm ++is called repeatedly for the same terminal type, ++it reuses the information. ++It maintains only one copy of a given type's capabilities in memory. ++If called for different types, ++.B \%setupterm ++allocates new storage for each set of terminal capabilities. ++.PP ++.B \%set_curterm ++sets ++.B \%cur_term ++to ++.IR \%nterm "," ++making all of the + .I \%term\%info + Boolean, + numeric, +-and string variables use the values from +-.IR \%nterm . +-It returns the old value of \fB\%cur_term\fP. +-.PP +-\fB\%del_curterm\fP frees the space pointed to by +-.I \%oterm +-and makes it available for further use. ++and string capabilities use the values from ++.IR \%nterm "." ++It returns the old value of ++.BR \%cur_term "." ++.PP ++.B \%del_curterm ++frees the memory pointed to by ++.BR \%oterm "," ++making it available for further use. + If +-.I \%oterm ++.B \%oterm + is +-the same as \fB\%cur_term\fP, ++the same as ++.BR \%cur_term "," + references to any of the + .I \%term\%info + Boolean, + numeric, +-and string variables thereafter may refer to invalid memory locations +-until another \fB\%setupterm\fP has been called. +-.PP +-\fB\%restartterm\fP is similar to \fB\%setupterm\fP and \fB\%initscr\fP, +-except that it is called after restoring memory to a previous state ++and string capabilities thereafter may refer to invalid memory locations ++until ++.B \%setupterm ++is called again. ++.PP ++.B \%restartterm ++is similar to ++.BR \%setupterm "," ++but is intended for use after restoring program memory ++to a previous state + (for example, +-when reloading a game saved as a core image dump). +-\fB\%restartterm\fP assumes that the windows and the input and output +-options are the same as when memory was saved, +-but the terminal type and baud rate may be different. ++when reloading an application that has been suspended from one terminal ++session and restored in another). ++.B \%restartterm ++assumes that the display dimensions ++and the input and output options are the same as when memory was saved, ++but the terminal type and line speed may differ. + Accordingly, +-\fB\%restartterm\fP saves various terminal state bits, +-calls \fB\%setupterm\fP, +-and then restores the bits. ++.B \%restartterm ++saves relevant terminal state, ++calls ++.BR \%setupterm "," ++then restores that state. + .\" ******************************************************************** + .SS "Formatting Output" + \fB\%tparm\fP instantiates the string +@@ -922,15 +941,18 @@ + \*(``#win32con\*('' or an abbreviation of that string. + .SS "Other Portability Issues" + In SVr4, +-\fB\%set_curterm\fP returns an +-.IR int , ++.I \%set_curterm ++returns an ++.IR int "," + .B OK + or +-.BR ERR . ++.BR ERR "." + We have chosen to implement the X/Open Curses semantics. + .PP + In SVr4, +-the third argument of \fB\%tputs\fP has the type ++the third argument of ++.I \%tputs ++has the type + .RB \*(`` "int (*putc)(char)" \*(''. + .PP + At least one implementation of X/Open Curses (Solaris) returns a value +@@ -938,7 +960,8 @@ + .B OK + or + .B ERR +-from \fB\%tputs\fP. ++from ++.IR \%tputs "." + It instead returns the length of the string, + and does no error checking. + .\" ******************************************************************** +Index: man/curs_util.3x +Prereq: 1.114 +--- ncurses-6.5-20240831+/man/curs_util.3x 2024-07-27 19:55:45.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_util.3x 2024-09-11 21:02:40.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_util.3x,v 1.114 2024/07/27 19:55:45 tom Exp $ +-.TH curs_util 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_util.3x,v 1.116 2024/09/11 21:02:40 tom Exp $ ++.TH curs_util 3X 2024-09-11 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -418,7 +418,7 @@ + the parameter is in the range 128\-159, + i.e., + a C1 control code. +-If \fBuse_legacy_coding\fP(3X) has been called with a \fB2\fP parameter, ++If \fB\%use_legacy_coding\fP(3X) has been called with a \fB2\fP parameter, + \fBunctrl\fP returns the parameter, + i.e., + a one-character string with +@@ -453,7 +453,7 @@ + printable. + This implementation uses 8 bits + but does not modify the string to reflect locale. +-The \fBuse_legacy_coding\fP(3X) function allows the caller to ++The \fB\%use_legacy_coding\fP(3X) function allows the caller to + change the output of \fBunctrl\fP. + .PP + Likewise, +@@ -462,7 +462,7 @@ + i.e., + it determines whether to use the \*(``M\-\*('' prefix + for \*(``meta\*('' keys (codes in the range 128 to 255). +-Both \fBuse_legacy_coding\fP(3X) and \fBmeta\fP(3X) succeed only after ++Both \fB\%use_legacy_coding\fP(3X) and \fBmeta\fP(3X) succeed only after + curses is initialized. + X/Open Curses does not document the treatment of codes 128 to 159. + When treating them as \*(``meta\*('' keys +Index: man/curs_variables.3x +Prereq: 1.49 +--- ncurses-6.5-20240831+/man/curs_variables.3x 2024-06-22 21:25:23.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_variables.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_variables.3x,v 1.49 2024/06/22 21:25:23 tom Exp $ +-.TH curs_variables 3X 2024-06-22 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_variables.3x,v 1.51 2024/09/14 20:06:50 tom Exp $ ++.TH curs_variables 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -48,6 +48,51 @@ + .el .IP \(bu 2 + .. + . ++.\" URL hyperlink support macros from groff's "an-ext.tmac" ++. ++.\" Save the automatic hyphenation mode. ++.\" ++.\" In AT&T troff, there was no register exposing the hyphenation mode, ++.\" and no way to save and restore it. Set `mH` to a reasonable value ++.\" for your implementation and preference. ++.de mY ++. ie !\\n(.g \ ++. nr mH 14 ++. el \ ++. do nr mH \\n[.hy] \" groff extension register ++.. ++. ++.\" Prepare link text for mail/web hyperlinks. `MT` and `UR` call this. ++.de mV ++. ds mU \\$1\" ++.. ++. ++.\" Emit hyperlink. The optional argument supplies trailing punctuation ++.\" after link text. `ME` and `UE` call this. ++.de mQ ++. mY ++. nh ++<\\*(mU>\\$1 ++. hy \\n(mH ++. rm mU ++.. ++. ++.\" Start URL. ++.\" .UR url ++.if !\n(.g \{\ ++.de UR ++. mV \\$1 ++.. ++.\} ++. ++.\" End URL. ++.\" .UE [punctuation] ++.if !\n(.g \{\ ++.de UE ++. mQ \\$1 ++.. ++.\} ++. + .SH NAME + \fI\%bool\fP, + \fI\%chtype\fP, +@@ -316,6 +361,13 @@ + most users have decided either to override the value, + or to rely upon its default. + .SH SEE ALSO ++.na ++.UR https://\*:unicode\*:.org/\*:reports/\*:tr29/ ++[UAX #29] \*(``Unicode Standard Annex #29: Unicode Text ++Segmentation\*('' ++.UE ++.ad ++.PP + \fB\%curses\fP(3X), + \fB\%curs_color\fP(3X), + \fB\%curs_opaque\fP(3X), +@@ -323,7 +375,3 @@ + \fB\%curs_threads\fP(3X), + \fB\%term_variables\fP(3X), + \fB\%terminfo\fP(5) +-.PP +-[UAX #29] \*(``Unicode Standard Annex #29: Unicode Text +-Segmentation\*(''; +-\%<https://\*:unicode\*:.org/\*:reports/\*:tr29/> +Index: man/curs_window.3x +Prereq: 1.52 +--- ncurses-6.5-20240831+/man/curs_window.3x 2024-06-01 22:29:08.000000000 +0000 ++++ ncurses-6.5-20240914/man/curs_window.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: curs_window.3x,v 1.52 2024/06/01 22:29:08 tom Exp $ +-.TH curs_window 3X 2024-06-01 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: curs_window.3x,v 1.54 2024/09/14 20:06:50 tom Exp $ ++.TH curs_window 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .SH NAME + \fB\%newwin\fP, + \fB\%delwin\fP, +@@ -46,23 +46,23 @@ + .nf + \fB#include <curses.h> + .PP +-\fBWINDOW *newwin( +- \fBint \fInlines\fB, int \fIncols\fB,\fR +- \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR +-\fBint delwin(WINDOW *\fIwin\fB);\fR +-\fBint mvwin(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR +-\fBWINDOW *subwin(WINDOW *\fIorig\fB,\fR +- \fBint \fInlines\fB, int \fIncols\fB,\fR +- \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR +-\fBWINDOW *derwin(WINDOW *\fIorig\fB,\fR +- \fBint \fInlines\fB, int \fIncols\fB,\fR +- \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR +-\fBint mvderwin(WINDOW *\fIwin\fB, int \fIpar_y\fB, int \fIpar_x\fB);\fR +-\fBWINDOW *dupwin(WINDOW *\fIwin\fB);\fR +-\fBvoid wsyncup(WINDOW *\fIwin\fB);\fR +-\fBint syncok(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR +-\fBvoid wcursyncup(WINDOW *\fIwin\fB);\fR +-\fBvoid wsyncdown(WINDOW *\fIwin\fB);\fR ++\fBWINDOW * newwin( ++ int \fInlines\fP, int \fIncols\fP, ++ int \fIbegin_y\fP, int \fIbegin_x\fP); ++\fBint delwin(WINDOW * \fIwin\fP); ++\fBint mvwin(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP); ++\fBWINDOW * subwin(WINDOW * \fIorig\fP, ++ int \fInlines\fP, int \fIncols\fP, ++ int \fIbegin_y\fP, int \fIbegin_x\fP); ++\fBWINDOW * derwin(WINDOW * \fIorig\fP, ++ int \fInlines\fP, int \fIncols\fP, ++ int \fIbegin_y\fP, int \fIbegin_x\fP); ++\fBint mvderwin(WINDOW * \fIwin\fP, int \fIpar_y\fP, int \fIpar_x\fP); ++\fBWINDOW * dupwin(WINDOW * \fIwin\fP); ++\fBvoid wsyncup(WINDOW * \fIwin\fP); ++\fBint syncok(WINDOW * \fIwin\fP, bool \fIbf\fP); ++\fBvoid wcursyncup(WINDOW * \fIwin\fP); ++\fBvoid wsyncdown(WINDOW * \fIwin\fP); + .fi + .SH DESCRIPTION + .SS newwin +Index: man/infocmp.1m +Prereq: 1.110 +--- ncurses-6.5-20240831+/man/infocmp.1m 2024-05-11 20:39:53.000000000 +0000 ++++ ncurses-6.5-20240914/man/infocmp.1m 2024-09-14 20:06:50.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: infocmp.1m,v 1.110 2024/05/11 20:39:53 tom Exp $ +-.TH @INFOCMP@ 1M 2024-05-11 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" ++.\" $Id: infocmp.1m,v 1.112 2024/09/14 20:06:50 tom Exp $ ++.TH @INFOCMP@ 1M 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -53,7 +53,10 @@ + \fB@INFOCMP@\fP \- + compare or print out \fIterminfo\fP descriptions + .SH SYNOPSIS +-\fB@INFOCMP@\fP [\fB\-\ ++.na ++.HP ++.B @INFOCMP@ ++.RB [ \-\ + 1\ + c\ + C\ +@@ -80,10 +83,24 @@ + V\ + W\ + x\ +-\fP] +- [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-Q\fR \fIn\fR] [\fB\-R \fBsubset\fR] +- [\fB\-w\fP\ \fIwidth\fP] [\fB\-A\fP\ \fIdirectory\fP] [\fB\-B\fP\ \fIdirectory\fP] +- [\fIterminal-type\fP ...] ++] ++.RB [ \-A\ \c ++.IR directory ] ++.RB [ \-B\ \c ++.IR directory ] ++.RB [ \-Q\ \c ++.IR encoding ] ++.RB [ \-R\ \c ++.IR subset ] ++.RB [ \-s\ \c ++.IR key ] ++.RB [ \-v\ \c ++.IR level ] ++.RB [ \-w\ \c ++.IR width ] ++.RI [ \%terminal\%-type ++\&.\|.\|.\& ] ++.ad + .SH DESCRIPTION + \fB@INFOCMP@\fP can be used to compare a binary \fBterminfo\fP entry with other + terminfo entries, rewrite a \fBterminfo\fP description to take advantage of the +@@ -111,7 +128,7 @@ + \fBNULL\fP for missing integer or string variables + .PP + Use the \fB\-q\fP option to show the distinction between +-\fIabsent\fP and \fIcancelled\fP capabilities. ++\fIabsent\fP and \fIcanceled\fP capabilities. + .PP + These options produce a list which you can use to compare two + or more terminal descriptions: +@@ -277,7 +294,7 @@ + superfluous. + \fB@INFOCMP@\fP will flag any other \fIterminal-type use=\fP fields that + were not needed. +-.SS "Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR]" ++.SS "Changing Databases [\-A \f(BIdirectory\fP] [\-B \f(BIdirectory\fP]" + Like other \fI\%ncurses\fP utilities, + \fB@INFOCMP@\fP looks for the terminal descriptions in several places. + You can use the \fI\%TERMINFO\fP and \fI\%TERMINFO_DIRS\fP environment +@@ -478,7 +495,8 @@ + \*(``\-\*('' for absent capabilities, \*(``@\*('' + for canceled rather than \*(``NULL\*(''. + .bP +-However, show differences between absent and cancelled capabilities. ++However, ++show differences between absent and canceled capabilities. + .bP + Omit the \*(``Reconstructed from\*('' comment for source listings. + .RE +@@ -607,7 +625,8 @@ + \fB\-t\fP + options are not supported in SVr4 curses. + .PP +-SVr4 infocmp does not distinguish between absent and cancelled capabilities. ++SVr4 ++infocmp does not distinguish between absent and canceled capabilities. + Also, it shows missing integer capabilities as \fB\-1\fP + (the internal value used to represent missing integers). + This implementation shows those as \*(``NULL\*('', +Index: man/legacy_coding.3x +Prereq: 1.30 +--- ncurses-6.5-20240831+/man/legacy_coding.3x 2024-07-27 19:44:30.000000000 +0000 ++++ ncurses-6.5-20240914/man/legacy_coding.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -29,8 +29,8 @@ + .\" + .\" Author: Thomas E. Dickey + .\" +-.\" $Id: legacy_coding.3x,v 1.30 2024/07/27 19:44:30 tom Exp $ +-.TH legacy_coding 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: legacy_coding.3x,v 1.32 2024/09/14 20:06:50 tom Exp $ ++.TH legacy_coding 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .SH NAME + \fB\%use_legacy_coding\fP \- + override \fIcurses\fR locale encoding checks +@@ -41,15 +41,18 @@ + \fBint use_legacy_coding(int \fIlevel\fP); + .fi + .SH DESCRIPTION +-.B \%use_legacy_coding +-is an extension to the ++.BR \%use_legacy_coding "," ++an ++.I \%ncurses ++extension to the + .I curses +-library. +-It allows the caller to change the result of \fB\%unctrl\fP(3X), ++library, ++permits customiztion of \fB\%unctrl\fP(3X) behavior, + suppressing \fI\%isprint\fP(3)-based checks within the library that + would normally cause nonprinting characters to be rendered in visible + form. +-The alteration affects only eight-bit characters. ++The alteration affects only byte-wide characters with the most ++significant bit set. + .PP + The + .I level +Index: man/manlinks.sed +Prereq: 1.21 +--- ncurses-6.5-20240831+/man/manlinks.sed 2024-04-20 22:25:36.000000000 +0000 ++++ ncurses-6.5-20240914/man/manlinks.sed 2024-09-14 23:49:39.000000000 +0000 +@@ -1,4 +1,4 @@ +-# $Id: manlinks.sed,v 1.21 2024/04/20 22:25:36 tom Exp $ ++# $Id: manlinks.sed,v 1.22 2024/09/14 23:49:39 tom Exp $ + ############################################################################## + # Copyright 2020-2023,2024 Thomas E. Dickey # + # Copyright 2000-2003,2008 Free Software Foundation, Inc. # +@@ -53,6 +53,7 @@ + s/[ ][ ]*$// + s/[ ][ ]*/ /g + /^$/d ++/^[<>]/d + # + # convert ".SH" into a more manageable form + s/\.SH[ ][ ]*/.SH_(/ +Index: man/ncurses.3x +Prereq: 1.229 +--- ncurses-6.5-20240831+/man/ncurses.3x 2024-07-27 20:10:07.000000000 +0000 ++++ ncurses-6.5-20240914/man/ncurses.3x 2024-09-14 20:06:50.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: ncurses.3x,v 1.229 2024/07/27 20:10:07 tom Exp $ +-.TH ncurses 3X 2024-07-27 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" ++.\" $Id: ncurses.3x,v 1.231 2024/09/14 20:06:50 tom Exp $ ++.TH ncurses 3X 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -64,7 +64,7 @@ + .SH DESCRIPTION + The \*(``new curses\*('' library offers the programmer a + terminal-independent means of reading keyboard and mouse input and +-updating character-cell terminals with output optimized to minimize ++writing to character-cell displays with output optimized to minimize + screen updates. + .I \%ncurses + replaces the +@@ -200,7 +200,8 @@ + \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X) + must be called to initialize + .I curses +-before use of any functions that deal with windows and screens. ++before use of any functions ++that access or manipulate windows or screens. + .PP + To get character-at-a-time input without echoing\(emmost interactive, + screen-oriented programs want this\(emuse the following sequence. +@@ -419,7 +420,10 @@ + the removal of this prefix usually indicates operation on + .BR \%stdscr . + .PP +-Four functions prefixed with \*(``p\*('' require a pad argument. ++Four functions prefixed with \*(``p\*('' require a ++.I pad ++argument; ++see below. + .PP + In function synopses, + .I \%ncurses +@@ -507,6 +511,10 @@ + prefix it with \*(``_w\*('' to obtain the wide counterpart. + For example, + \fB\%waddch\fP becomes \fB\%wadd_wch\fP. ++Another exception is ++.B \%ins_nwstr ++(and its variants), ++spelled thus instead of \*(``insn_wstr\*(''. + (Exceptions that add only \*(``w\*('' comprise + .BR \%addwstr , + .BR \%inwstr , +@@ -517,10 +525,6 @@ + .\" operated on `chtype`s assuming that they were wide enough for a + .\" `wchar_t` plus attribute and color pair bits; X/Open Curses did not + .\" standardize these. +-Another exception is +-.B \%ins_nwstr +-and its variants, +-which is spelled thus instead of \*(``insn_wstr\*(''. + .IP + This convention is inapplicable to some non-wide function names, + so other transformations are used for the wide configuration: +@@ -1119,7 +1123,9 @@ + .SS "\fIBAUDRATE\fP" + The debugging library checks this variable when the application has + redirected output to a file. +-Its integral value is used for the baud rate. ++.I \%ncurses ++interprets its integral value as the terminal's line speed ++in bits per second. + If that value is absent or invalid, + .I \%ncurses + uses 9600. +@@ -1146,6 +1152,8 @@ + This variable specifies the width of the screen in characters. + Applications running in a windowing environment usually are able to + obtain the width of the window in which they are executing. ++.I \%ncurses ++enforces an upper limit of 512 when reading the value. + If + .I \%COLUMNS + is not defined and the terminal's screen size is not available from the +@@ -1176,8 +1184,6 @@ + and + .I \%LINES + variables may be specified independently. +-.I \%ncurses +-enforces an upper limit of 512 on each when reading the value. + This property is useful to circumvent misfeatures of legacy terminal + type descriptions; + \fI\%xterm\fP(1) descriptions specifying 65 lines were once notorious. +@@ -1719,7 +1725,7 @@ + .I \%configure + script when building the library. + Run the script with the +-.B \-\-help ++.B \%\-\-help + option to peruse them all. + A few are of particular significance to the application developer + employing +@@ -1759,7 +1765,7 @@ + .RE + .PP + Installation also omits a symbolic link that would cause the compiler's +-.B \-lcurses ++.B \%\-lcurses + option to link object files with + .I \%ncurses + instead of the system +@@ -1773,7 +1779,9 @@ + .TP 5 + .B \-\-enable\-widec + The configure script renames the library and +-(if the \fB\-\-disable\-overwrite\fP option is used) ++(if the ++.B \%\-\-disable\-overwrite ++option is used) + puts the header files in a different subdirectory. + All of the library names have a \*(``w\*('' appended to them, + i.e., instead of +@@ -1781,7 +1789,7 @@ + .PP + .RS 4 + .EX +-\fB\-lncurses\fP ++.B \-lncurses + .EE + .RE + .PP +@@ -1789,7 +1797,7 @@ + .PP + .RS 4 + .EX +-\fB\-lncursesw\fP ++.B \-lncursesw + .EE + .RE + .PP +@@ -1829,7 +1837,8 @@ + .B \-\-with\-pthread + The configure script renames the library. + All of the library names have a \*(``t\*('' appended to them +-(before any \*(``w\*('' added by \fB\-\-enable\-widec\fP). ++(before any \*(``w\*('' added by ++.BR \%\-\-enable\-widec ). + .IP + The global variables such as \fBLINES\fP are replaced by macros to + allow read-only access. +@@ -2244,8 +2253,8 @@ + so + .IR \%ncurses 's + own header files can be included in any order. +-But for portability, +-you should include ++For portability even to old AIX systems, ++include + .I \%curses.h + before + .IR \%term.h . +Index: man/tabs.1 +Prereq: 1.61 +--- ncurses-6.5-20240831+/man/tabs.1 2024-06-22 22:15:32.000000000 +0000 ++++ ncurses-6.5-20240914/man/tabs.1 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: tabs.1,v 1.61 2024/06/22 22:15:32 tom Exp $ +-.TH @TABS@ 1 2024-06-22 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" ++.\" $Id: tabs.1,v 1.63 2024/09/14 20:06:50 tom Exp $ ++.TH @TABS@ 1 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -78,7 +78,7 @@ + .PP + .RS 4 + .EX +-tabs \-8 ++@TABS@ \-8 + .EE + .RE + .PP +@@ -128,8 +128,8 @@ + .PP + .RS 4 + .EX +-tabs 1,6,11,16,21 +-tabs 1 6 11 16 21 ++@TABS@ 1,6,11,16,21 ++@TABS@ 1 6 11 16 21 + .EE + .RE + .PP +@@ -139,7 +139,7 @@ + .PP + .RS 4 + .EX +-tabs 1,+5,+5,+5,+5 ++@TABS@ 1,+5,+5,+5,+5 + .EE + .RE + .PP +@@ -229,10 +229,10 @@ + .I @DATADIR@/tabset + tab stop initialization database + .SH PORTABILITY +-IEEE Std 1003.1/The Open Group Base Specifications Issue 7 ++IEEE Std 1003.1/The Open Group Base Specifications Issue\ 7 + (POSIX.1-2008) + describes a +-.B tabs ++.I tabs + utility. + However, + .bP +@@ -247,8 +247,9 @@ + .RB \%( smglp ) + capabilities needed to support the feature. + .bP +-There is no counterpart in X/Open Curses Issue 7 for this utility, +-unlike \fB@TPUT@\fP(1). ++Unlike \fB@TPUT@\fP(1), ++.I tabs ++has no specification in X/Open Curses Issue\ 7. + .PP + The + .B \-d +@@ -259,7 +260,7 @@ + extensions not provided by other implementations. + .SH HISTORY + A +-.B tabs ++.I tabs + utility appeared in PWB/Unix 1.0 (1977). + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/source/s2/\ + .\" tabs.c +@@ -270,7 +271,7 @@ + .\" https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/cmd/\ + .\" tabs.c + (later the same year); +-it supported a \*(``\-n\*('' option to set the first tab stop at the ++it supported an option \*(``\-n\*('' to set the first tab stop at the + left margin. + That option is not specified by POSIX. + .PP +@@ -289,9 +290,9 @@ + but retained the tables to support the printers. + By this time, + System\ V +-.B tput ++.I tput + had incorporated the tab stop initialization feature of BSD's +-.B tset ++.I tset + from 1982, + but employed the + .I \%term\%info +@@ -308,20 +309,21 @@ + \*(``and optionally adjusts the margin\*('' remains, + overlooked in the removal. + The +-.B tabs ++.I tabs + utility documented in Issues 6 and later has no mechanism for setting + margins. + The + .B +m + option in + .I \%ncurses +-\fB\%@TABS@\fP differs from the SVr4 feature by using terminal ++.I tabs ++(\fB\%@TABS@\fP) differs from the SVr4 feature by using terminal + capabilities rather than built-in tables. + .PP + POSIX documents no limit on the number of tab stops. + Other implementations impose one; + the limit is 20 in PWB/Unix's +-.B tabs ++.I tabs + utility. + While some terminals may not accept an arbitrary number of tab stops, + .I \%ncurses +@@ -329,13 +331,13 @@ + list thereof is sufficiently long. + .PP + The \*(``Rationale\*('' section of the Issue 6 +-.B tabs ++.I tabs + reference page + .\" https://pubs.opengroup.org/onlinepubs/009604499/utilities/tabs.html + details how the committee considered redesigning the +-.B tabs ++.I tabs + and +-.B tput ++.I tput + utilities, + without settling on an improved solution. + It claims that +Index: man/terminfo.tail +Prereq: 1.151 +--- ncurses-6.5-20240831+/man/terminfo.tail 2024-06-22 21:25:23.000000000 +0000 ++++ ncurses-6.5-20240914/man/terminfo.tail 2024-09-14 00:43:08.000000000 +0000 +@@ -27,7 +27,7 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: terminfo.tail,v 1.151 2024/06/22 21:25:23 tom Exp $ ++.\" $Id: terminfo.tail,v 1.152 2024/09/14 00:43:08 Branden.Robinson Exp $ + .ps +1 + .SS "User-Defined Capabilities" + . +@@ -2059,7 +2059,7 @@ + signed 16-bit values. + This includes the \fIno_color_video\fP (\fBncv\fP) capability. + The 32768 mask value used for italics with \fBncv\fP can be confused with +-an absent or cancelled \fBncv\fP. ++an absent or canceled \fBncv\fP. + If italics should work with colors, + then the \fBncv\fP value must be specified, even if it is zero. + .PP +Index: man/tic.1m +Prereq: 1.111 +--- ncurses-6.5-20240831+/man/tic.1m 2024-05-11 20:39:53.000000000 +0000 ++++ ncurses-6.5-20240914/man/tic.1m 2024-09-14 20:06:50.000000000 +0000 +@@ -27,8 +27,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: tic.1m,v 1.111 2024/05/11 20:39:53 tom Exp $ +-.TH @TIC@ 1M 2024-05-11 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" ++.\" $Id: tic.1m,v 1.113 2024/09/14 20:06:50 tom Exp $ ++.TH @TIC@ 1M 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -547,7 +547,7 @@ + It accepted a single option: \fB\-v\fP (optionally followed by a number). + According to Ross Ridge's comment in \fImytinfo\fP, + this version of \fBtic\fP was +-unable to represent cancelled capabilities. ++unable to represent canceled capabilities. + .PP + System V Release 3 provided a different \fBtic\fP utility, + written by Pavel Curtis, +Index: man/tput.1 +Prereq: 1.118 +--- ncurses-6.5-20240831+/man/tput.1 2024-06-22 21:28:35.000000000 +0000 ++++ ncurses-6.5-20240914/man/tput.1 2024-09-14 20:06:50.000000000 +0000 +@@ -28,8 +28,8 @@ + .\" authorization. * + .\"*************************************************************************** + .\" +-.\" $Id: tput.1,v 1.118 2024/06/22 21:28:35 tom Exp $ +-.TH @TPUT@ 1 2024-06-22 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" ++.\" $Id: tput.1,v 1.120 2024/09/14 20:06:50 tom Exp $ ++.TH @TPUT@ 1 2024-09-14 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands" + .ie \n(.g \{\ + .ds `` \(lq + .ds '' \(rq +@@ -730,7 +730,7 @@ + database. + That likely is a documentation error, + mistaking the \*(``\-1\*('' written to the standard output to indicate +-an absent or cancelled numeric capability for an (unsigned) exit status. ++an absent or canceled numeric capability for an (unsigned) exit status. + .PP + The various System\ V implementations + (AIX, +Index: misc/ncurses-config.in +Prereq: 1.54 +--- ncurses-6.5-20240831+/misc/ncurses-config.in 2024-07-13 20:00:52.000000000 +0000 ++++ ncurses-6.5-20240914/misc/ncurses-config.in 2024-09-14 22:16:56.000000000 +0000 +@@ -1,5 +1,5 @@ + #!@SHELL@ +-# $Id: ncurses-config.in,v 1.54 2024/07/13 20:00:52 tom Exp $ ++# $Id: ncurses-config.in,v 1.55 2024/09/14 22:16:56 tom Exp $ + ############################################################################## + # Copyright 2018-2022,2024 Thomas E. Dickey # + # Copyright 2006-2015,2017 Free Software Foundation, Inc. # +@@ -208,7 +208,7 @@ + for opt in $CFLAGS + do + case "x$opt" in +- x-[OW]*) ++ x-[fgOW]*) + opt= + ;; + esac +@@ -244,7 +244,7 @@ + for opt in $CFLAGS + do + case "x$opt" in +- x-[I]*|x-[OW]*) ++ x-[I]*|x-[fgOW]*) + opt= + ;; + esac +Index: misc/terminfo.src +--- ncurses-6.5-20240831+/misc/terminfo.src 2024-08-17 22:45:40.000000000 +0000 ++++ ncurses-6.5-20240914/misc/terminfo.src 2024-09-07 16:23:31.000000000 +0000 +@@ -6,8 +6,8 @@ + # Report bugs and new terminal descriptions to + # bug-ncurses@gnu.org + # +-# $Revision: 1.1149 $ +-# $Date: 2024/08/17 22:45:40 $ ++# $Revision: 1.1150 $ ++# $Date: 2024/09/07 16:23:31 $ + # + # The original header is preserved below for reference. It is noted that there + # is a "newer" version which differs in some cosmetic details (but actually +@@ -3683,7 +3683,8 @@ + # features. + # + # iTerm2 3.5.0 comes with a 4-year-old copy of xterm's terminfo (June 2020), +-# which is modified: ++# which is modified, using the ncurses TERMINFO_DIRS variable to substitute ++# this locally: + # + xterm-nrc and xterm+pcfN are removed + # + the developer made changes to adapt it to the 16-year-old version of + # ncurses bundled with MacOS, i.e., changing the mouse protocol to the +@@ -7985,10 +7986,10 @@ + # Testing AppImage for 3.2.0, on Fedora 40: + # + appears to implement erase-display by painting a double-line on the screen, + # doesn't use full screen for ded though it sort-of works for vi. +-# + sets TERMINFO in its shell, and TERM=domterm-xterm which doesn't work when +-# doing sudo. According to the git log, that was April 1, 2023. The VTE +-# developers copied this feature (i.e., a partially workable private terminal +-# database) in February 2024. ++# + sets TERMINFO in its shell (imitating iTerm2), and TERM=domterm-xterm which ++# doesn't work when doing sudo. According to the git log, that was April 1, ++# 2023. The VTE developers copied the feature (i.e., a partially workable ++# private terminal database) in February 2024. + # + the canonical name for the terminal description is still "domterm", and + # presumably the "domterm-xterm" alias is a workaround for hardcoded scripts + # that look for "xterm". +@@ -27640,4 +27641,7 @@ + # + review/update foot for 1.18.1 -TD + # + add a note about DomTerm 3.2.0 -TD + # ++# 2024-09-07 ++# + update comments -TD ++# + ######## SHANTIH! SHANTIH! SHANTIH! +Index: ncurses/tinfo/lib_tputs.c +Prereq: 1.111 +--- ncurses-6.5-20240831+/ncurses/tinfo/lib_tputs.c 2023-09-16 16:05:15.000000000 +0000 ++++ ncurses-6.5-20240914/ncurses/tinfo/lib_tputs.c 2024-09-14 23:11:32.000000000 +0000 +@@ -1,5 +1,5 @@ + /**************************************************************************** +- * Copyright 2018-2022,2023 Thomas E. Dickey * ++ * Copyright 2018-2023,2024 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.111 2023/09/16 16:05:15 tom Exp $") ++MODULE_ID("$Id: lib_tputs.c,v 1.113 2024/09/14 23:11:32 tom Exp $") + + NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ + NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ +@@ -150,12 +150,14 @@ + } + } + } else if (SP_PARM->out_buffer == 0) { +- TR(TRACE_CHARPUT, ("flushing stdout")); ++ TR(TRACE_CHARPUT, ("flushing stdout/stderr")); + fflush(stdout); ++ fflush(stderr); + } + } else { +- TR(TRACE_CHARPUT, ("flushing stdout")); ++ TR(TRACE_CHARPUT, ("flushing stdout/stderr")); + fflush(stdout); ++ fflush(stderr); + } + if (SP_PARM != 0) + SP_PARM->out_inuse = 0; +Index: package/debian-mingw/changelog +--- ncurses-6.5-20240831+/package/debian-mingw/changelog 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/debian-mingw/changelog 2024-09-13 23:30:09.000000000 +0000 +@@ -1,8 +1,8 @@ +-ncurses6td (6.5+20240831) unstable; urgency=low ++ncurses6td (6.5+20240914) unstable; urgency=low + + * latest weekly patch + +- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 31 Aug 2024 05:52:35 -0400 ++ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 13 Sep 2024 19:30:09 -0400 + + ncurses6 (5.9+20131005) unstable; urgency=low + +Index: package/debian-mingw64/changelog +--- ncurses-6.5-20240831+/package/debian-mingw64/changelog 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/debian-mingw64/changelog 2024-09-13 23:30:09.000000000 +0000 +@@ -1,8 +1,8 @@ +-ncurses6td (6.5+20240831) unstable; urgency=low ++ncurses6td (6.5+20240914) unstable; urgency=low + + * latest weekly patch + +- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 31 Aug 2024 05:52:35 -0400 ++ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 13 Sep 2024 19:30:09 -0400 + + ncurses6 (5.9+20131005) unstable; urgency=low + +Index: package/debian/changelog +--- ncurses-6.5-20240831+/package/debian/changelog 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/debian/changelog 2024-09-13 23:30:09.000000000 +0000 +@@ -1,8 +1,8 @@ +-ncurses6td (6.5+20240831) unstable; urgency=low ++ncurses6td (6.5+20240914) unstable; urgency=low + + * latest weekly patch + +- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 31 Aug 2024 05:52:35 -0400 ++ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 13 Sep 2024 19:30:09 -0400 + + ncurses6 (5.9+20120608) unstable; urgency=low + +Index: package/mingw-ncurses.nsi +Prereq: 1.664 +--- ncurses-6.5-20240831+/package/mingw-ncurses.nsi 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/mingw-ncurses.nsi 2024-09-13 23:30:09.000000000 +0000 +@@ -1,4 +1,4 @@ +-; $Id: mingw-ncurses.nsi,v 1.664 2024/08/31 09:52:35 tom Exp $
++; $Id: mingw-ncurses.nsi,v 1.666 2024/09/13 23:30:09 tom Exp $
+
+ ; TODO add examples
+ ; TODO bump ABI to 6
+@@ -10,7 +10,7 @@ + !define VERSION_MAJOR "6"
+ !define VERSION_MINOR "5"
+ !define VERSION_YYYY "2024"
+-!define VERSION_MMDD "0831"
++!define VERSION_MMDD "0914"
+ !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
+
+ !define MY_ABI "5"
+Index: package/mingw-ncurses.spec +--- ncurses-6.5-20240831+/package/mingw-ncurses.spec 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/mingw-ncurses.spec 2024-09-13 23:30:09.000000000 +0000 +@@ -3,7 +3,7 @@ + Summary: shared libraries for terminal handling + Name: mingw32-ncurses6 + Version: 6.5 +-Release: 20240831 ++Release: 20240914 + License: X11 + Group: Development/Libraries + URL: https://invisible-island.net/ncurses/ +Index: package/ncurses.spec +--- ncurses-6.5-20240831+/package/ncurses.spec 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/ncurses.spec 2024-09-13 23:30:09.000000000 +0000 +@@ -1,7 +1,7 @@ + Summary: shared libraries for terminal handling + Name: ncurses6 + Version: 6.5 +-Release: 20240831 ++Release: 20240914 + License: X11 + Group: Development/Libraries + URL: https://invisible-island.net/ncurses/ +Index: package/ncursest.spec +--- ncurses-6.5-20240831+/package/ncursest.spec 2024-08-31 09:52:35.000000000 +0000 ++++ ncurses-6.5-20240914/package/ncursest.spec 2024-09-13 23:30:09.000000000 +0000 +@@ -1,7 +1,7 @@ + Summary: Curses library with POSIX thread support. + Name: ncursest6 + Version: 6.5 +-Release: 20240831 ++Release: 20240914 + License: X11 + Group: Development/Libraries + Source: ncurses-%{version}-%{release}.tgz |