-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.4001 2023/09/17 22:41:20 tom Exp $
+-- $Id: NEWS,v 1.4004 2023/09/23 23:48:03 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20230923
+ + improve formatting of manpages (patches by Branden Robinson).
+ + amend change to delscreen() to limit the windows which it creates to
+ just those associated with the screen (report by Frederic Boiteux,
+ cf: 20220813).
+
20230918
+ new tarball/errata (report by Sven Joachim).
-5:0:10 6.4 20230918
+5:0:10 6.4 20230923
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1566 2023/09/18 07:33:33 tom Exp $
+# $Id: dist.mk,v 1.1567 2023/09/23 09:27:19 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 4
-NCURSES_PATCH = 20230918
+NCURSES_PATCH = 20230923
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG>xterm(1)</STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_color.3x,v 1.77 2023/09/16 23:34:43 tom Exp @
+ * @Id: curs_color.3x,v 1.82 2023/09/23 22:24:15 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_color 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_color 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_color 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_color 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
<STRONG>int</STRONG> <STRONG>init_pair(short</STRONG> <EM>pair</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>f</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>b</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>init_color(short</STRONG> <EM>color</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>r</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>g</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>b</EM><STRONG>);</STRONG>
- /* extensions */
+ <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
<STRONG>int</STRONG> <STRONG>init_extended_pair(int</STRONG> <EM>pair</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>f</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>b</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>init_extended_color(int</STRONG> <EM>color</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>r</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>g</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>b</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>color_content(short</STRONG> <EM>color</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <STRONG>*</STRONG><EM>r</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <STRONG>*</STRONG><EM>g</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <STRONG>*</STRONG><EM>b</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>pair_content(short</STRONG> <EM>pair</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <STRONG>*</STRONG><EM>f</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <STRONG>*</STRONG><EM>b</EM><STRONG>);</STRONG>
- /* extensions */
+ <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
<STRONG>int</STRONG> <STRONG>extended_color_content(int</STRONG> <EM>color</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>*</STRONG><EM>r</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>*</STRONG><EM>g</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>*</STRONG><EM>b</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>extended_pair_content(int</STRONG> <EM>pair</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>*</STRONG><EM>f</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>*</STRONG><EM>b</EM><STRONG>);</STRONG>
- /* extensions */
+ <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
<STRONG>void</STRONG> <STRONG>reset_color_pairs(void);</STRONG>
<STRONG>int</STRONG> <STRONG>COLOR_PAIR(int</STRONG> <EM>n</EM><STRONG>);</STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
</PRE><H3><a name="h3-Overview">Overview</a></H3><PRE>
- <STRONG>curses</STRONG> supports color attributes on terminals with that capability. To
+ <EM>curses</EM> supports color attributes on terminals with that capability. To
use these routines <STRONG>start_color</STRONG> must be called, usually right after
<STRONG>initscr</STRONG>. Colors are always used in pairs (referred to as color-pairs).
A color-pair consists of a foreground color (for characters) and a
</PRE><H3><a name="h3-Color-Rendering">Color Rendering</a></H3><PRE>
- The <STRONG>curses</STRONG> library combines these inputs to produce the actual
+ The <EM>curses</EM> library combines these inputs to produce the actual
foreground and background colors shown on the screen:
<STRONG>o</STRONG> per-character video attributes (e.g., via <STRONG>waddch</STRONG>),
The background character is a special case: it includes a character
value, just as if it were passed to <STRONG>waddch</STRONG>.
- The <STRONG>curses</STRONG> library does the actual work of combining these color pairs
+ The <EM>curses</EM> library does the actual work of combining these color pairs
in an internal function called from <STRONG>waddch</STRONG>:
<STRONG>o</STRONG> If the parameter passed to <STRONG>waddch</STRONG> is <EM>blank</EM>, and it uses the special
color pair 0,
- <STRONG>o</STRONG> <STRONG>curses</STRONG> next checks the window attribute.
+ <STRONG>o</STRONG> <EM>curses</EM> next checks the window attribute.
- <STRONG>o</STRONG> If the window attribute does not use color pair 0, <STRONG>curses</STRONG> uses
+ <STRONG>o</STRONG> If the window attribute does not use color pair 0, <EM>curses</EM> uses
the color pair from the window attribute.
- <STRONG>o</STRONG> Otherwise, <STRONG>curses</STRONG> uses the background character.
+ <STRONG>o</STRONG> Otherwise, <EM>curses</EM> uses the background character.
<STRONG>o</STRONG> If the parameter passed to <STRONG>waddch</STRONG> is <EM>not</EM> <EM>blank</EM>, or it does not use
- the special color pair 0, <STRONG>curses</STRONG> prefers the color pair from the
+ the special color pair 0, <EM>curses</EM> prefers the color pair from the
parameter, if it is nonzero. Otherwise, it tries the window
attribute next, and finally the background character.
- Some <STRONG>curses</STRONG> functions such as <STRONG>wprintw</STRONG> call <STRONG>waddch</STRONG>. Those do not
+ Some <EM>curses</EM> functions such as <STRONG>wprintw</STRONG> call <STRONG>waddch</STRONG>. Those do not
combine its parameter with a color pair. Consequently those calls use
only the window attribute or the background character.
</PRE><H2><a name="h2-CONSTANTS">CONSTANTS</a></H2><PRE>
In <STRONG><curses.h></STRONG> the following macros are defined. These are the standard
- colors (ISO-6429). <STRONG>curses</STRONG> also assumes that <STRONG>COLOR_BLACK</STRONG> is the default
+ colors (ISO-6429). <EM>curses</EM> also assumes that <STRONG>COLOR_BLACK</STRONG> is the default
background color for all terminals.
<STRONG>COLOR_BLACK</STRONG>
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- In the <STRONG>ncurses</STRONG> implementation, there is a separate color activation
+ In the <EM>ncurses</EM> implementation, there is a separate color activation
flag, color palette, color pairs table, and associated <STRONG>COLORS</STRONG> and
<STRONG>COLOR_PAIRS</STRONG> counts for each screen; the <STRONG>start_color</STRONG> function only
affects the current screen. The SVr4/XSI interface is not really
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_getyx.3x,v 1.31 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_getyx.3x,v 1.37 2023/09/23 22:10:55 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_getyx 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_getyx 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_getyx 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_getyx 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
This implementation also provides functions <STRONG>getbegx</STRONG>, <STRONG>getbegy</STRONG>, <STRONG>getcurx</STRONG>,
<STRONG>getcury</STRONG>, <STRONG>getmaxx</STRONG>, <STRONG>getmaxy</STRONG>, <STRONG>getparx</STRONG> and <STRONG>getpary</STRONG> for compatibility with
- older versions of curses.
+ older versions of <EM>curses</EM>; see <STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG>.
Although X/Open Curses does not address this, many implementations
- provide members of the WINDOW structure containing values corresponding
+ provide members of the <STRONG>WINDOW</STRONG> structure containing values corresponding
to these macros. For best portability, do not rely on using the data
- in WINDOW, since some implementations make WINDOW opaque (do not allow
+ in <STRONG>WINDOW</STRONG>, since some implementations make <STRONG>WINDOW</STRONG> opaque (do not allow
direct use of its members).
Besides the problem of opaque structures, the data stored in like-named
members may not have like-values in different implementations. For
- example, the WINDOW._maxx and WINDOW._maxy values in ncurses have (at
+ example, the <STRONG>WINDOW._maxx</STRONG> and <STRONG>WINDOW._maxy</STRONG> values in <EM>ncurses</EM> have (at
least since release 1.8.1) differed by one from some other
implementations. The difference is hidden by means of the macro
<STRONG>getmaxyx</STRONG>.
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_getyx.3x.html">curs_getyx(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_inopts.3x,v 1.47 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_inopts.3x,v 1.54 2023/09/23 22:24:15 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 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_inopts 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_inopts 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_inopts 3x 2023-09-23 ncurses 6.4 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>
<STRONG>int</STRONG> <STRONG>typeahead(int</STRONG> <EM>fd</EM><STRONG>);</STRONG>
- /* extensions */
+ <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
<STRONG>int</STRONG> <STRONG>is_cbreak(void);</STRONG>
<STRONG>int</STRONG> <STRONG>is_echo(void);</STRONG>
<STRONG>int</STRONG> <STRONG>is_nl(void);</STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- The <STRONG>ncurses</STRONG> library provides several functions which let an application
+ The <EM>ncurses</EM> library provides several functions which let an application
change the way input from the terminal is handled. Some are global,
applying to all windows. Others apply only to a specific window.
Window-specific settings are not automatically applied to new or
Initially the terminal may or may not be in <STRONG>cbreak</STRONG> mode, as the mode is
inherited; therefore, a program should call <STRONG>cbreak</STRONG> or <STRONG>nocbreak</STRONG>
- explicitly. Most interactive programs using <STRONG>curses</STRONG> set the <STRONG>cbreak</STRONG>
+ explicitly. Most interactive programs using <EM>curses</EM> set the <STRONG>cbreak</STRONG>
mode. Note that <STRONG>cbreak</STRONG> overrides <STRONG>raw</STRONG>. [See <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG> for a
discussion of how these routines interact with <STRONG>echo</STRONG> and <STRONG>noecho</STRONG>.]
If the <STRONG>intrflush</STRONG> option is enabled (<EM>bf</EM> is <STRONG>TRUE</STRONG>), and an interrupt key
is pressed on the keyboard (interrupt, break, quit), all output in the
tty driver queue will be flushed, giving the effect of faster response
- to the interrupt, but causing <STRONG>curses</STRONG> to have the wrong idea of what is
+ to the interrupt, but causing <EM>curses</EM> to have the wrong idea of what is
on the screen. Disabling the option (<EM>bf</EM> is <STRONG>FALSE</STRONG>) prevents the flush.
The default for the option is inherited from the tty driver settings.
The window argument is ignored.
The <STRONG>keypad</STRONG> option enables the keypad of the user's terminal. If
enabled (<EM>bf</EM> is <STRONG>TRUE</STRONG>), the user can press a function key (such as an
arrow key) and <STRONG><A HREF="curs_getch.3x.html">wgetch(3x)</A></STRONG> returns a single value representing the
- function key, as in <STRONG>KEY_LEFT</STRONG>. If disabled (<EM>bf</EM> is <STRONG>FALSE</STRONG>), <STRONG>curses</STRONG> does
+ function key, as in <STRONG>KEY_LEFT</STRONG>. If disabled (<EM>bf</EM> is <STRONG>FALSE</STRONG>), <EM>curses</EM> does
not treat function keys specially and the program has to interpret the
escape sequences itself. If the keypad in the terminal can be turned
on (made to transmit) and off (made to work locally), turning on this
that in raw mode, the interrupt, quit, suspend, and flow control
characters are all passed through uninterpreted, instead of generating
a signal. The behavior of the BREAK key depends on other bits in the
- tty driver that are not set by <STRONG>curses</STRONG>.
+ tty driver that are not set by <EM>curses</EM>.
</PRE><H3><a name="h3-qiflush_noqiflush">qiflush/noqiflush</a></H3><PRE>
</PRE><H3><a name="h3-typeahead">typeahead</a></H3><PRE>
- The <STRONG>curses</STRONG> library does "line-breakout optimization" by looking for
+ The <EM>curses</EM> library does "line-breakout optimization" by looking for
typeahead periodically while updating the screen. If input is found,
and it is coming from a tty, the current update is postponed until
<STRONG><A HREF="curs_refresh.3x.html">refresh(3x)</A></STRONG> or <STRONG>doupdate</STRONG> is called again. This allows faster response
0 if the flag is reset, or
- -1 if the curses library was not initialized.
+ -1 if the <EM>curses</EM> library was not initialized.
- These routines are specific to ncurses. They were not supported on
+ These routines are specific to <EM>ncurses</EM>. They were not supported on
Version 7, BSD or System V implementations. It is recommended that any
- code depending on ncurses extensions be conditioned using
+ code depending on <EM>ncurses</EM> extensions be conditioned using
NCURSES_VERSION.
Except as noted in the section on extensions, these functions are
described in the XSI Curses standard, Issue 4.
- The ncurses library obeys the XPG4 standard and the historical practice
- of the AT&T curses implementations, in that the echo bit is cleared
- when curses initializes the terminal state. BSD curses differed from
+ The <EM>ncurses</EM> library obeys the XPG4 standard and the historical practice
+ of the AT&T <EM>curses</EM> implementations, in that the echo bit is cleared
+ when <EM>curses</EM> initializes the terminal state. BSD <EM>curses</EM> differed from
this slightly; it left the echo bit on at initialization, but the BSD
<STRONG>raw</STRONG> call turned it off as a side-effect. For best portability, set
<STRONG>echo</STRONG> or <STRONG>noecho</STRONG> explicitly just after initialization, even if your
The XSI Curses standard is ambiguous on the question of whether <STRONG>raw</STRONG>
should disable the CRLF translations controlled by <STRONG>nl</STRONG> and <STRONG>nonl</STRONG>. BSD
- curses did turn off these translations; AT&T curses (at least as late
+ <EM>curses</EM> did turn off these translations; AT&T <EM>curses</EM> (at least as late
as SVr1) did not. We chose to do so, on the theory that a programmer
requesting raw input wants a clean (ideally 8-bit clean) connection
that the operating system will not alter.
- When <STRONG>keypad</STRONG> is first enabled, ncurses loads the key-definitions for the
+ When <STRONG>keypad</STRONG> is first enabled, <EM>ncurses</EM> loads the key-definitions for the
current terminal description. If the terminal description includes
extended string capabilities, e.g., from using the <STRONG>-x</STRONG> option of <STRONG>tic</STRONG>,
- then ncurses also defines keys for the capabilities whose names begin
+ then <EM>ncurses</EM> also defines keys for the capabilities whose names begin
with "k". The corresponding keycodes are generated and (depending on
previous loads of terminal descriptions) may differ from one execution
of a program to the next. The generated keycodes are recognized by the
<STRONG>keyname</STRONG> function (which will then return a name beginning with "k"
- denoting the terminfo capability name rather than "K", used for curses
+ denoting the terminfo capability name rather than "K", used for <EM>curses</EM>
key-names). On the other hand, an application can use <STRONG>define_key</STRONG> to
establish a specific keycode for a given string. This makes it
possible for an application to check for an extended capability's
Low-level applications can use <STRONG>tigetstr</STRONG> to obtain the definition of any
particular string capability. Higher-level applications which use the
- curses <STRONG>wgetch</STRONG> and similar functions to return keycodes rely upon the
+ <EM>curses</EM> <STRONG>wgetch</STRONG> and similar functions to return keycodes rely upon the
order in which the strings are loaded. If more than one key definition
has the same string value, then <STRONG>wgetch</STRONG> can return only one keycode.
- Most curses implementations (including ncurses) load key definitions in
+ Most <EM>curses</EM> implementations (including <EM>ncurses</EM>) load key definitions in
the order defined by the array of string capability names. The last
key to be loaded determines the keycode which will be returned. In
- ncurses, you may also have extended capabilities interpreted as key
+ <EM>ncurses</EM>, you may also have extended capabilities interpreted as key
definitions. These are loaded after the predefined keys, and if a
capability's value is the same as a previously-loaded key definition,
the later definition is the one used.
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_legacy.3x,v 1.22 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_legacy.3x,v 1.27 2023/09/23 22:11:47 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_legacy 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_legacy 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_legacy 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_legacy 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- These legacy functions are simpler to use than the X/Open Curses
+ These legacy functions are simpler to use than the X/Open <EM>curses</EM>
functions:
<STRONG>o</STRONG> The <STRONG>getattrs</STRONG> function returns the same attribute data as <STRONG>wattr_get</STRONG>.
<STRONG>NCURSES_OPAQUE</STRONG> is defined. The standard forms such as <STRONG>getyx</STRONG> must be
implemented as macros, and (in this implementation) are defined in
terms of the functions described here, to avoid reliance on internal
- details of the WINDOW structure.
+ details of the <STRONG>WINDOW</STRONG> structure.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_memleaks.3x,v 1.21 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_memleaks.3x,v 1.25 2023/09/23 21:07:59 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_memleaks 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_memleaks 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_memleaks 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_memleaks 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>. <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
+ <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_memleaks.3x.html">curs_memleaks(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_mouse.3x,v 1.71 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_mouse.3x,v 1.78 2023/09/23 23:08: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_mouse 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_mouse 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_mouse 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_mouse 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
If the screen has not been initialized, or if the terminal does not
support mouse-events, this function returns 0.
- <STRONG>o</STRONG> If <EM>oldmask</EM> is non-NULL, this function fills the indicated location
+ <STRONG>o</STRONG> If <EM>oldmask</EM> is non-<STRONG>NULL</STRONG>, this function fills the indicated location
with the previous value of the current screen's mouse event mask.
As a side effect, setting a zero mousemask may turn off the mouse
<STRONG>Name</STRONG> <STRONG>Description</STRONG>
---------------------------------------------------------------------
- BUTTON1_PRESSED mouse button 1 down
- BUTTON1_RELEASED mouse button 1 up
- BUTTON1_CLICKED mouse button 1 clicked
+ <STRONG>BUTTON1_PRESSED</STRONG> mouse button 1 down
+ <STRONG>BUTTON1_RELEASED</STRONG> mouse button 1 up
+ <STRONG>BUTTON1_CLICKED</STRONG> mouse button 1 clicked
- BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked
- BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked
+ <STRONG>BUTTON1_DOUBLE_CLICKED</STRONG> mouse button 1 double clicked
+ <STRONG>BUTTON1_TRIPLE_CLICKED</STRONG> mouse button 1 triple clicked
---------------------------------------------------------------------
- BUTTON2_PRESSED mouse button 2 down
- BUTTON2_RELEASED mouse button 2 up
- BUTTON2_CLICKED mouse button 2 clicked
- BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked
- BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked
+ <STRONG>BUTTON2_PRESSED</STRONG> mouse button 2 down
+ <STRONG>BUTTON2_RELEASED</STRONG> mouse button 2 up
+ <STRONG>BUTTON2_CLICKED</STRONG> mouse button 2 clicked
+ <STRONG>BUTTON2_DOUBLE_CLICKED</STRONG> mouse button 2 double clicked
+ <STRONG>BUTTON2_TRIPLE_CLICKED</STRONG> mouse button 2 triple clicked
---------------------------------------------------------------------
- BUTTON3_PRESSED mouse button 3 down
- BUTTON3_RELEASED mouse button 3 up
- BUTTON3_CLICKED mouse button 3 clicked
- BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked
- BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked
+ <STRONG>BUTTON3_PRESSED</STRONG> mouse button 3 down
+ <STRONG>BUTTON3_RELEASED</STRONG> mouse button 3 up
+ <STRONG>BUTTON3_CLICKED</STRONG> mouse button 3 clicked
+ <STRONG>BUTTON3_DOUBLE_CLICKED</STRONG> mouse button 3 double clicked
+ <STRONG>BUTTON3_TRIPLE_CLICKED</STRONG> mouse button 3 triple clicked
---------------------------------------------------------------------
- BUTTON4_PRESSED mouse button 4 down
- BUTTON4_RELEASED mouse button 4 up
- BUTTON4_CLICKED mouse button 4 clicked
- BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked
- BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked
+ <STRONG>BUTTON4_PRESSED</STRONG> mouse button 4 down
+ <STRONG>BUTTON4_RELEASED</STRONG> mouse button 4 up
+ <STRONG>BUTTON4_CLICKED</STRONG> mouse button 4 clicked
+ <STRONG>BUTTON4_DOUBLE_CLICKED</STRONG> mouse button 4 double clicked
+ <STRONG>BUTTON4_TRIPLE_CLICKED</STRONG> mouse button 4 triple clicked
---------------------------------------------------------------------
- BUTTON5_PRESSED mouse button 5 down
- BUTTON5_RELEASED mouse button 5 up
- BUTTON5_CLICKED mouse button 5 clicked
- BUTTON5_DOUBLE_CLICKED mouse button 5 double clicked
- BUTTON5_TRIPLE_CLICKED mouse button 5 triple clicked
+ <STRONG>BUTTON5_PRESSED</STRONG> mouse button 5 down
+ <STRONG>BUTTON5_RELEASED</STRONG> mouse button 5 up
+ <STRONG>BUTTON5_CLICKED</STRONG> mouse button 5 clicked
+ <STRONG>BUTTON5_DOUBLE_CLICKED</STRONG> mouse button 5 double clicked
+ <STRONG>BUTTON5_TRIPLE_CLICKED</STRONG> mouse button 5 triple clicked
---------------------------------------------------------------------
- BUTTON_SHIFT shift was down during button state change
- BUTTON_CTRL control was down during button state change
- BUTTON_ALT alt was down during button state change
- ALL_MOUSE_EVENTS report all button state changes
- REPORT_MOUSE_POSITION report mouse movement
+ <STRONG>BUTTON_SHIFT</STRONG> shift was down during button state change
+ <STRONG>BUTTON_CTRL</STRONG> control was down during button state change
+ <STRONG>BUTTON_ALT</STRONG> alt was down during button state change
+ <STRONG>ALL_MOUSE_EVENTS</STRONG> report all button state changes
+ <STRONG>REPORT_MOUSE_POSITION</STRONG> report mouse movement
---------------------------------------------------------------------
through the pointers. If the conversion was successful, the
function returns <STRONG>TRUE</STRONG>.
- <STRONG>o</STRONG> If one of the parameters was NULL or the location is not inside the
+ <STRONG>o</STRONG> If one of the parameters was <STRONG>NULL</STRONG> or the location is not inside the
window, <STRONG>FALSE</STRONG> is returned.
<STRONG>o</STRONG> If <EM>to</EM><STRONG>_</STRONG><EM>screen</EM> is <STRONG>FALSE</STRONG>, the pointers <EM>pY,</EM> <EM>pX</EM> must reference window-
coordinates if the window <EM>win</EM> encloses this point. In this case
the function returns <STRONG>TRUE</STRONG>.
- <STRONG>o</STRONG> If one of the parameters is NULL or the point is not inside the
+ <STRONG>o</STRONG> If one of the parameters is <STRONG>NULL</STRONG> or the point is not inside the
window, <STRONG>FALSE</STRONG> is returned. The referenced coordinates are only
replaced by the converted coordinates if the transformation was
successful.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These calls were designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and are not found in SVr4
- curses, 4.4BSD curses, or any other previous version of curses.
+ These calls were designed for <EM>ncurses</EM>, and are not found in SVr4
+ <EM>curses</EM>, 4.4BSD <EM>curses</EM>, or any other previous version of <EM>curses</EM>.
- SVr4 curses had support for the mouse in a variant of <STRONG>xterm(1)</STRONG>. It is
+ SVr4 <EM>curses</EM> had support for the mouse in a variant of <STRONG>xterm(1)</STRONG>. It is
mentioned in a few places, but with no supporting documentation:
<STRONG>o</STRONG> the "libcurses" manual page lists functions for this feature which
mouse_info minfo Mi Mouse status information
req_mouse_pos reqmp RQ Request mouse position report
- <STRONG>o</STRONG> the interface made assumptions (as does ncurses) about the escape
+ <STRONG>o</STRONG> the interface made assumptions (as does <EM>ncurses</EM>) about the escape
sequences sent to and received from the terminal.
- For instance the SVr4 curses library used the <STRONG>get_mouse</STRONG> capability
+ For instance the SVr4 <EM>curses</EM> library used the <STRONG>get_mouse</STRONG> capability
to tell the terminal which mouse button events it should send,
passing the mouse-button bit-mask to the terminal. Also, it could
ask the terminal where the mouse was using the <STRONG>req_mouse_pos</STRONG>
capability.
Those features required a terminal which had been modified to work
- with curses. They were not part of the X Consortium's xterm.
+ with <EM>curses</EM>. They were not part of the X Consortium's xterm.
- When developing the xterm mouse support for ncurses in September 1995,
+ When developing the xterm mouse support for <EM>ncurses</EM> in September 1995,
Eric Raymond was uninterested in using the same interface due to its
lack of documentation. Later, in 1998, Mark Hesseling provided support
in PDCurses 2.3 using the SVr4 interface. PDCurses, however, does not
can be used to test whether these features are present. If the
interface is changed, the value of <STRONG>NCURSES_MOUSE_VERSION</STRONG> will be
incremented. These values for <STRONG>NCURSES_MOUSE_VERSION</STRONG> may be specified
- when configuring ncurses:
+ when configuring <EM>ncurses</EM>:
1 has definitions for reserved events. The mask uses 28 bits.
The order of the <STRONG>MEVENT</STRONG> structure members is not guaranteed.
Additional fields may be added to the structure in the future.
- Under <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, these calls are implemented using either xterm's
- built-in mouse-tracking API or platform-specific drivers including
+ Under <EM>ncurses</EM>, these calls are implemented using either xterm's built-
+ in mouse-tracking API or platform-specific drivers including
<STRONG>o</STRONG> Alessandro Rubini's gpm server
<STRONG>o</STRONG> OS/2 EMX
If you are using an unsupported configuration, mouse events will not be
- visible to <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> (and the <STRONG>mousemask</STRONG> function will always return
- <STRONG>0</STRONG>).
+ visible to <EM>ncurses</EM> (and the <STRONG>mousemask</STRONG> function will always return <STRONG>0</STRONG>).
- If the terminfo entry contains a <STRONG>XM</STRONG> string, this is used in the xterm
- mouse driver to control the way the terminal is initialized for mouse
- operation. The default, if <STRONG>XM</STRONG> is not found, corresponds to private
+ If the terminfo entry contains a <STRONG>XM</STRONG> string, this is used in the xterm
+ mouse driver to control the way the terminal is initialized for mouse
+ operation. The default, if <STRONG>XM</STRONG> is not found, corresponds to private
mode 1000 of xterm:
\E[?1000%?%p1%{1}%=%th%el%;
\E[?1006;1000%?%p1%{1}%=%th%el%;
- The <EM>z</EM> member in the event structure is not presently used. It is
- intended for use with touch screens (which may be pressure-sensitive)
+ The <EM>z</EM> member in the event structure is not presently used. It is
+ intended for use with touch screens (which may be pressure-sensitive)
or with 3D-mice/trackballs/power gloves.
- The <STRONG>ALL_MOUSE_EVENTS</STRONG> class does not include <STRONG>REPORT_MOUSE_POSITION</STRONG>.
- They are distinct. For example, in xterm, wheel/scrolling mice send
- position reports as a sequence of presses of buttons 4 or 5 without
+ The <STRONG>ALL_MOUSE_EVENTS</STRONG> class does not include <STRONG>REPORT_MOUSE_POSITION</STRONG>.
+ They are distinct. For example, in xterm, wheel/scrolling mice send
+ position reports as a sequence of presses of buttons 4 or 5 without
matching button-releases.
</PRE><H2><a name="h2-BUGS">BUGS</a></H2><PRE>
- Mouse events under xterm will not in fact be ignored during cooked
+ Mouse events under xterm will not in fact be ignored during cooked
mode, if they have been enabled by <STRONG>mousemask</STRONG>. Instead, the xterm mouse
report sequence will appear in the string read.
- Mouse events under xterm will not be detected correctly in a window
- with its keypad bit off, since they are interpreted as a variety of
- function key. Your terminfo description should have <STRONG>kmous</STRONG> set to
- "\E[M" (the beginning of the response from xterm for mouse clicks).
- Other values for <STRONG>kmous</STRONG> are permitted, but under the same assumption,
+ Mouse events under xterm will not be detected correctly in a window
+ with its keypad bit off, since they are interpreted as a variety of
+ function key. Your terminfo description should have <STRONG>kmous</STRONG> set to
+ "\E[M" (the beginning of the response from xterm for mouse clicks).
+ Other values for <STRONG>kmous</STRONG> are permitted, but under the same assumption,
i.e., it is the beginning of the response.
- Because there are no standard terminal responses that would serve to
- identify terminals which support the xterm mouse protocol, <STRONG>ncurses</STRONG>
+ Because there are no standard terminal responses that would serve to
+ identify terminals which support the xterm mouse protocol, <EM>ncurses</EM>
assumes that if <STRONG>kmous</STRONG> is defined in the terminal description, or if the
- terminal description's primary name or aliases contain the string
+ terminal description's primary name or aliases contain the string
"xterm", then the terminal may send mouse events. The <STRONG>kmous</STRONG> capability
- is checked first, allowing the use of newer xterm mouse protocols such
+ is checked first, allowing the use of newer xterm mouse protocols such
as xterm's private mode 1006.
</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_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>, <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>,
- <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>.
+ <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_mouse.3x.html">curs_mouse(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_opaque.3x,v 1.27 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_opaque.3x,v 1.33 2023/09/23 22:59:48 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_opaque 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_opaque 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_opaque 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_opaque 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
This implementation provides functions which return properties set in
- the WINDOW structure, allowing it to be "opaque" if the symbol
+ the <STRONG>WINDOW</STRONG> structure, allowing it to be "opaque" if the symbol
<STRONG>NCURSES_OPAQUE</STRONG> is defined:
<STRONG>is_cleared</STRONG>
returns the delay timeout as set in <STRONG><A HREF="wtimeout.3x.html">wtimeout(3x)</A></STRONG>.
<STRONG>wgetparent</STRONG>
- returns the parent WINDOW pointer for subwindows, or NULL for
+ returns the parent <STRONG>WINDOW</STRONG> pointer for subwindows, or <STRONG>NULL</STRONG> for
windows having no parent.
<STRONG>wgetscrreg</STRONG>
returns the top and bottom rows for the scrolling margin as set in
- <STRONG>wsetscrreg</STRONG>.
+ <STRONG><A HREF="curs_outopts.3x.html">wsetscrreg(3x)</A></STRONG>.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These routines are specific to ncurses. They were not supported on
+ These routines are specific to <EM>ncurses</EM>. They were not supported on
Version 7, BSD or System V implementations. It is recommended that any
- code depending on ncurses extensions be conditioned using
- NCURSES_VERSION.
+ code depending on <EM>ncurses</EM> extensions be conditioned using
+ <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_pad.3x,v 1.38 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_pad.3x,v 1.43 2023/09/23 22:49: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>curs_pad 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_pad 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_pad 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_pad 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- BSD curses has no <EM>pad</EM> feature.
+ BSD <EM>curses</EM> has no <EM>pad</EM> feature.
- SVr2 curses (1986) provided the <STRONG>newpad</STRONG> and related functions,
+ SVr2 <EM>curses</EM> (1986) provided the <STRONG>newpad</STRONG> and related functions,
documenting them in a single line each. SVr3 (1987) provided more
extensive documentation.
conditions. The behavior of <STRONG>subpad</STRONG> if the parent window is not a pad
is undocumented, and is not checked by the vendor Unix implementations:
- <STRONG>o</STRONG> SVr4 curses sets a flag in the <STRONG>WINDOW</STRONG> structure in <STRONG>newpad</STRONG> which
+ <STRONG>o</STRONG> SVr4 <EM>curses</EM> sets a flag in the <STRONG>WINDOW</STRONG> structure in <STRONG>newpad</STRONG> which
tells if the window is a <EM>pad</EM>.
However, it uses this information only in <STRONG>waddch</STRONG> (to decide if it
enough, a comment in the source code states that the lack of a
check was an MKS extension.
- <STRONG>o</STRONG> NetBSD 7 curses sets a flag in the <STRONG>WINDOW</STRONG> structure for <STRONG>newpad</STRONG> and
+ <STRONG>o</STRONG> NetBSD 7 <EM>curses</EM> sets a flag in the <STRONG>WINDOW</STRONG> structure for <STRONG>newpad</STRONG> and
<STRONG>subpad</STRONG>, using this to help with the distinction between
<STRONG>wnoutrefresh</STRONG> and <STRONG>pnoutrefresh</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_print.3x,v 1.25 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_print.3x,v 1.31 2023/09/23 23:04:49 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_print 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_print 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_print 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_print 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
some reason. In this case, <STRONG>errno</STRONG> will contain either an error
associated with <STRONG>write(2)</STRONG> or one of the following:
- ENODEV
+ <STRONG>ENODEV</STRONG>
Capabilities for printer redirection do not exist.
- ENOMEM
+ <STRONG>ENOMEM</STRONG>
Couldn't allocate sufficient memory to buffer the printer write.
When <STRONG>mcprint</STRONG> succeeds, it returns the number of characters actually
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- The <STRONG>mcprint</STRONG> call was designed for <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, and is not found in SVr4
- curses, 4.4BSD curses, or any other previous version of curses.
+ The <STRONG>mcprint</STRONG> call was designed for <EM>ncurses</EM>, and is not found in SVr4
+ <EM>curses</EM>, 4.4BSD <EM>curses</EM>, or any other previous version of <EM>curses</EM>. It is
+ recommended that any code depending on <EM>ncurses</EM> extensions be
+ conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-BUGS">BUGS</a></H2><PRE>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_print.3x.html">curs_print(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_slk.3x,v 1.53 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_slk.3x,v 1.60 2023/09/23 22:49: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>curs_slk 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_slk 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_slk 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_slk 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
<STRONG>int</STRONG> <STRONG>slk_attr_on(attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>void*</STRONG> <EM>opts</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>slk_attr_off(const</STRONG> <STRONG>attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG> <EM>opts</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>slk_attr_set(const</STRONG> <STRONG>attr_t</STRONG> <EM>attrs</EM><STRONG>,</STRONG> <STRONG>short</STRONG> <EM>pair</EM><STRONG>,</STRONG> <STRONG>void*</STRONG> <EM>opts</EM><STRONG>);</STRONG>
- /* extension */
+ <EM>/*</EM> <EM>extension</EM> <EM>*/</EM>
<STRONG>attr_t</STRONG> <STRONG>slk_attr(void);</STRONG>
<STRONG>int</STRONG> <STRONG>slk_color(short</STRONG> <EM>pair</EM><STRONG>);</STRONG>
- /* extension */
+ <EM>/*</EM> <EM>extension</EM> <EM>*/</EM>
<STRONG>int</STRONG> <STRONG>extended_slk_color(int</STRONG> <EM>pair</EM><STRONG>);</STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- The slk* functions manipulate the set of soft function-key labels that
+ The <STRONG>slk</STRONG>* functions manipulate the set of soft function-key labels that
exist on many terminals. For those terminals that do not have soft
- labels, <STRONG>curses</STRONG> takes over the bottom line of <STRONG>stdscr</STRONG>, reducing the size
- of <STRONG>stdscr</STRONG> and the variable <STRONG>LINES</STRONG>. <STRONG>curses</STRONG> standardizes on eight labels
- of up to eight characters each. In addition to this, the ncurses
+ labels, <EM>curses</EM> takes over the bottom line of <STRONG>stdscr</STRONG>, reducing the size
+ of <STRONG>stdscr</STRONG> and the variable <STRONG>LINES</STRONG>. <EM>curses</EM> standardizes on eight labels
+ of up to eight characters each. In addition to this, the <EM>ncurses</EM>
implementation supports a mode where it simulates 12 labels of up to
five characters each. This is useful for PC-like enduser devices.
- ncurses simulates this mode by taking over up to two lines at the
+ <EM>ncurses</EM> simulates this mode by taking over up to two lines at the
bottom of the screen; it does not try to use any hardware support for
this mode.
correspond to <STRONG>attron</STRONG>, <STRONG>attrset</STRONG>, <STRONG>attroff</STRONG> and <STRONG>attr_get</STRONG>, respectively.
They have an effect only if soft labels are simulated on the bottom
line of the screen. The default highlight for soft keys is A_STANDOUT
- (as in System V curses, which does not document this fact).
+ (as in System V <EM>curses</EM>, which does not document this fact).
</PRE><H3><a name="h3-Colors">Colors</a></H3><PRE>
<STRONG>slk_attr_set</STRONG>
returns an error if the terminal or the softkeys were not
initialized, or the color pair is outside the range
- 0..COLOR_PAIRS-1.
+ 0..<STRONG>COLOR_PAIRS</STRONG>-1.
<STRONG>slk_color</STRONG>
returns an error if the terminal or the softkeys were not
initialized, or the color pair is outside the range
- 0..COLOR_PAIRS-1.
+ 0..<STRONG>COLOR_PAIRS</STRONG>-1.
<STRONG>slk_init</STRONG>
returns an error if the format parameter is outside the range
</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
SVr3 introduced these functions:
- slk_clear
- slk_init
- slk_label
- slk_noutrefresh
- slk_refresh
- slk_restore
- slk_set
- slk_touch
+ <STRONG>slk_clear</STRONG>
+ <STRONG>slk_init</STRONG>
+ <STRONG>slk_label</STRONG>
+ <STRONG>slk_noutrefresh</STRONG>
+ <STRONG>slk_refresh</STRONG>
+ <STRONG>slk_restore</STRONG>
+ <STRONG>slk_set</STRONG>
+ <STRONG>slk_touch</STRONG>
SVr4 added these functions:
- slk_attroff
- slk_attron
- slk_attrset
- slk_start
+ <STRONG>slk_attroff</STRONG>
+ <STRONG>slk_attron</STRONG>
+ <STRONG>slk_attrset</STRONG>
+ <STRONG>slk_start</STRONG>
- X/Open Curses added these:
- slk_attr_off
- slk_attr_on
- slk_attr_set
- slk_color
- slk_wset
+ X/Open <EM>curses</EM> added these:
+ <STRONG>slk_attr_off</STRONG>
+ <STRONG>slk_attr_on</STRONG>
+ <STRONG>slk_attr_set</STRONG>
+ <STRONG>slk_color</STRONG>
+ <STRONG>slk_wset</STRONG>
</PRE><H2><a name="h2-EXTENSIONS">EXTENSIONS</a></H2><PRE>
- X/Open Curses documents the <EM>opts</EM> argument as reserved for future use,
+ X/Open <EM>curses</EM> documents the <EM>opts</EM> argument as reserved for future use,
saying that it must be null. This implementation uses that parameter
in ABI 6 for the functions which have a color-pair parameter to support
extended color pairs.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- The XSI Curses standard, Issue 4, described the soft-key functions,
- with some differences from SVr4 curses:
+ The XSI <EM>curses</EM> standard, Issue 4, described the soft-key functions,
+ with some differences from SVr4 <EM>curses</EM>:
<STRONG>o</STRONG> It added functions like the SVr4 attribute-manipulation functions
<STRONG>slk_attron</STRONG>, <STRONG>slk_attroff</STRONG>, <STRONG>slk_attrset</STRONG>, but which use <STRONG>attr_t</STRONG>
<STRONG>o</STRONG> It added <STRONG>slk_color</STRONG>.
- Although <STRONG>slk_start</STRONG> is declared in the curses header file, it was not
+ Although <STRONG>slk_start</STRONG> is declared in the <EM>curses</EM> header file, it was not
documented by SVr4 other than its presence in a list of libtermlib.so.1
symbols. Reading the source code (i.e., Illumos):
case, <STRONG>slk_start</STRONG> uses the number of groups <EM>ng</EM> (3 for the 3-2-3
layout, 2 for the 4-4 layout) which <STRONG>slk_init</STRONG> provided.
- If <EM>ng</EM> is neither 2 or 3, <STRONG>slk_start</STRONG> checks the terminfo <EM>fln</EM>
+ If <EM>ng</EM> is neither 2 or 3, <STRONG>slk_start</STRONG> checks the terminfo <STRONG>fln</STRONG>
(label_format) capability, interpreting that as a comma-separated
list of numbers, e.g., "3,2,3" for the 3-2-3 layout.
- Finally, if there is no <EM>fln</EM> capability, <STRONG>slk_start</STRONG> returns ERR.
+ Finally, if there is no <STRONG>fln</STRONG> capability, <STRONG>slk_start</STRONG> returns <STRONG>ERR</STRONG>.
<STRONG>o</STRONG> If <STRONG>slk_start</STRONG> is given a non-null <EM>gp</EM>, it copies the <EM>ng</EM> elements of
the group of soft-keys, up to 16.
If there are more than 16 elements, <STRONG>slk_start</STRONG> returns an error.
- <STRONG>o</STRONG> The format codes <STRONG>2</STRONG> and <STRONG>3</STRONG> for <STRONG>slk_init</STRONG> were added by ncurses in
+ <STRONG>o</STRONG> The format codes <STRONG>2</STRONG> and <STRONG>3</STRONG> for <STRONG>slk_init</STRONG> were added by <EM>ncurses</EM> in
1996. PDCurses 2.4 added this feature in 2001.
- The function <STRONG>slk_attr</STRONG> was added by ncurses in 1996.
+ The function <STRONG>slk_attr</STRONG> was added by <EM>ncurses</EM> in 1996.
- X/Open Curses does not specify a limit for the number of colors and
+ X/Open <EM>curses</EM> does not specify a limit for the number of colors and
color pairs which a terminal can support. However, in its use of <STRONG>short</STRONG>
for the parameters, it carries over SVr4's implementation detail for
the compiled terminfo database, which uses signed 16-bit numbers. This
</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_attr.3x.html">curs_attr(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>,
- <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>.
+ <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_terminfo.3x,v 1.99 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_terminfo.3x,v 1.108 2023/09/23 23:38:10 tom Exp @
* ***************************************************************************
* ***************************************************************************
* ***************************************************************************
<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 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_terminfo 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_terminfo 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_terminfo 3x 2023-09-23 ncurses 6.4 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>
<STRONG>char</STRONG> <STRONG>*tiparm(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>...);</STRONG>
- /* extensions */
+ <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
<STRONG>char</STRONG> <STRONG>*tiparm_s(int</STRONG> <EM>expected</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>mask</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>...);</STRONG>
<STRONG>int</STRONG> <STRONG>tiscan_s(int</STRONG> <STRONG>*</STRONG><EM>expected</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <STRONG>*</STRONG><EM>mask</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>str</EM><STRONG>);</STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These low-level routines must be called by programs that have to deal
- directly with the <STRONG>terminfo</STRONG> database to handle certain terminal
+ directly with the <EM>terminfo</EM> database to handle certain terminal
capabilities, such as programming function keys. For all other
- functionality, <STRONG>curses</STRONG> routines are more suitable and their use is
+ functionality, <EM>curses</EM> routines are more suitable and their use is
recommended.
None of these functions use (or are aware of) multibyte character
If <STRONG>ERR</STRONG> is returned, examine <EM>errret</EM>:
<STRONG>1</STRONG> means that the terminal is hardcopy, cannot be used for
- curses applications.
+ <EM>curses</EM> applications.
<STRONG>setupterm</STRONG> determines if the entry is a hardcopy type by
checking the <STRONG>hc</STRONG> (<STRONG>hardcopy</STRONG>) capability.
<STRONG>0</STRONG> means that the terminal could not be found, or that it is
- a generic type, having too little information for curses
+ a generic type, having too little information for <EM>curses</EM>
applications to run.
<STRONG>setupterm</STRONG> determines if the entry is a generic type by
checking the <STRONG>gn</STRONG> (<STRONG>generic_type</STRONG>) capability.
- <STRONG>-1</STRONG> means that the <STRONG>terminfo</STRONG> database could not be found.
+ <STRONG>-1</STRONG> means that the <EM>terminfo</EM> database could not be found.
If <EM>errret</EM> is null, <STRONG>setupterm</STRONG> prints an error message upon
finding an error and exits. Thus, the simplest call is:
- <STRONG>setupterm((char</STRONG> <STRONG>*)0,</STRONG> <STRONG>1,</STRONG> <STRONG>(int</STRONG> <STRONG>*)0);</STRONG>,
+ <STRONG>setupterm((char</STRONG> <STRONG>*)0,</STRONG> <STRONG>1,</STRONG> <STRONG>(int</STRONG> <STRONG>*)0);</STRONG>,
- which uses all the defaults and sends the output to <STRONG>stdout</STRONG>.
+ which uses all the defaults and sends the output to <STRONG>stdout</STRONG>.
</PRE><H3><a name="h3-The-Terminal-State">The Terminal State</a></H3><PRE>
derived from the output stream parameter of <STRONG><A HREF="curs_initscr.3x.html">newterm(3x)</A></STRONG>.
While <STRONG>putp</STRONG> and <STRONG>mvcur</STRONG> are low-level functions which do not use the high-
- level curses state, they are declared in <STRONG><curses.h></STRONG> because SystemV did
- this (see <EM>HISTORY</EM>).
+ level curses state, they are declared in <STRONG><curses.h></STRONG> because System V
+ did this (see <EM>HISTORY</EM>).
</PRE><H3><a name="h3-Terminal-Capability-Functions">Terminal Capability Functions</a></H3><PRE>
</PRE><H3><a name="h3-Terminal-Capability-Names">Terminal Capability Names</a></H3><PRE>
These null-terminated arrays contain
- <STRONG>o</STRONG> the short terminfo names ("codes"),
+ <STRONG>o</STRONG> the short <EM>terminfo</EM> names ("codes"),
- <STRONG>o</STRONG> the <STRONG>termcap</STRONG> names ("names"), and
+ <STRONG>o</STRONG> the <EM>termcap</EM> names ("names"), and
- <STRONG>o</STRONG> the long terminfo names ("fnames")
+ <STRONG>o</STRONG> the long <EM>terminfo</EM> names ("fnames")
- for each of the predefined <STRONG>terminfo</STRONG> variables:
+ for each of the predefined <EM>terminfo</EM> variables:
<STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*boolnames[]</STRONG>, <STRONG>*boolcodes[]</STRONG>, <STRONG>*boolfnames[]</STRONG>
<STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*numnames[]</STRONG>, <STRONG>*numcodes[]</STRONG>, <STRONG>*numfnames[]</STRONG>
description. As a side-effect, it sets <STRONG>cur_term</STRONG> to point to this
memory. If an application calls
- <STRONG>del_curterm(cur_term);</STRONG>
+ <STRONG>del_curterm(cur_term);</STRONG>
the memory will be freed.
In SVr4, those are found in <STRONG><curses.h></STRONG>, but except for <STRONG>setterm</STRONG>, are
likewise macros. The one function, <STRONG>setterm</STRONG>, is mentioned in the manual
page. The manual page notes that the <STRONG>setterm</STRONG> routine was replaced by
- <STRONG>setupterm</STRONG>, stating that the call:
+ <STRONG>setupterm</STRONG>, stating that the call
- <STRONG>setupterm(</STRONG><EM>term</EM><STRONG>,</STRONG> <STRONG>1,</STRONG> <STRONG>(int</STRONG> <STRONG>*)0)</STRONG>
+ <STRONG>setupterm(</STRONG><EM>term</EM><STRONG>,</STRONG> <STRONG>1,</STRONG> <STRONG>(int</STRONG> <STRONG>*)0)</STRONG>
provides the same functionality as <STRONG>setterm(</STRONG><EM>term</EM><STRONG>)</STRONG>, and is not
recommended for new programs. This implementation provides each of
</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
SVr2 introduced the terminfo feature. Its programming manual mentioned
- these low-level functions:
+ the following low-level functions.
<STRONG>Function</STRONG> <STRONG>Description</STRONG>
- ------------------------------------------------------------
- fixterm restore tty to "in curses" state
-
- gettmode establish current tty modes
- mvcur low level cursor motion
- putp utility function that uses <STRONG>tputs</STRONG> to send
- characters via <STRONG>putchar</STRONG>.
- resetterm set tty modes to "out of curses" state
- resetty reset tty flags to stored value
- saveterm save current modes as "in curses" state
- savetty store current tty flags
- setterm establish terminal with given type
- setupterm establish terminal with given type
- tparm instantiate a string expression with parameters
- tputs apply padding information to a string
- vidattr like <STRONG>vidputs</STRONG>, but outputs through <STRONG>putchar</STRONG>
- vidputs output a string to put terminal in a specified
- video attribute mode
-
- The programming manual also mentioned functions provided for termcap
- compatibility (commenting that they "may go away at a later date"):
+ ------------------------------------------------------------------------
+ <STRONG>fixterm</STRONG> restore tty to "in curses" state
+
+ <STRONG>gettmode</STRONG> establish current tty modes
+ <STRONG>mvcur</STRONG> low level cursor motion
+ <STRONG>putp</STRONG> utility function that uses <STRONG>tputs</STRONG> to send characters via
+ <STRONG>putchar</STRONG>.
+ <STRONG>resetterm</STRONG> set tty modes to "out of curses" state
+ <STRONG>resetty</STRONG> reset tty flags to stored value
+ <STRONG>saveterm</STRONG> save current modes as "in curses" state
+ <STRONG>savetty</STRONG> store current tty flags
+ <STRONG>setterm</STRONG> establish terminal with given type
+ <STRONG>setupterm</STRONG> establish terminal with given type
+ <STRONG>tparm</STRONG> instantiate a string expression with parameters
+ <STRONG>tputs</STRONG> apply padding information to a string
+ <STRONG>vidattr</STRONG> like <STRONG>vidputs</STRONG>, but outputs through <STRONG>putchar</STRONG>
+ <STRONG>vidputs</STRONG> output a string to put terminal in a specified video
+ attribute mode
+
+ 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>
- ------------------------------------------------
- tgetent look up termcap entry for given <EM>name</EM>
- tgetflag get boolean entry for given <EM>id</EM>
- tgetnum get numeric entry for given <EM>id</EM>
- tgetstr get string entry for given <EM>id</EM>
- tgoto apply parameters to given capability
- tputs apply padding to capability, calling
- a function to put characters
+ ------------------------------------------------------------------------
+ <STRONG>tgetent</STRONG> look up <EM>termcap</EM> entry for given <EM>name</EM>
+ <STRONG>tgetflag</STRONG> get boolean entry for given <EM>id</EM>
+ <STRONG>tgetnum</STRONG> get numeric entry for given <EM>id</EM>
+ <STRONG>tgetstr</STRONG> get string entry for given <EM>id</EM>
+ <STRONG>tgoto</STRONG> apply parameters to given capability
+ <STRONG>tputs</STRONG> apply padding to capability, calling a function to put
+ characters
Early terminfo programs obtained capability values from the <STRONG>TERMINAL</STRONG>
structure initialized by <STRONG>setupterm</STRONG>.
SVr3 extended terminfo by adding functions to retrieve capability
- values (like the termcap interface), and reusing tgoto and tputs:
+ values (like the termcap interface), and reusing <STRONG>tgoto</STRONG> and <STRONG>tputs</STRONG>:
<STRONG>Function</STRONG> <STRONG>Description</STRONG>
- -------------------------------------------
- tigetflag get boolean entry for given <EM>id</EM>
- tigetnum get numeric entry for given <EM>id</EM>
- tigetstr get string entry for given <EM>id</EM>
+ ------------------------------------------------------------------------
+ <STRONG>tigetflag</STRONG> get boolean entry for given <EM>id</EM>
+ <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 terminfo functions which had no
- counterpart in the termcap interface, documenting them as obsolete:
+ SVr3 also replaced several of the SVr2 <EM>terminfo</EM> functions which had no
+ counterpart in the <EM>termcap</EM> interface, documenting them as obsolete.
<STRONG>Function</STRONG> <STRONG>Replaced</STRONG> <STRONG>by</STRONG>
- -----------------------------
+ ------------------------------------------------------------------------
crmode cbreak
fixterm reset_prog_mode
- gettmode N/A
+ gettmode <EM>n/a</EM>
nocrmode nocbreak
resetterm reset_shell_mode
saveterm def_prog_mode
SVr4 added the <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> functions.
- There are other low-level functions declared in the curses header files
+ There are other low-level functions declared in the <EM>curses</EM> header files
on Unix systems, but none were documented. The functions marked
"obsolete" remained in use by the Unix <STRONG>vi(1)</STRONG> editor.
hand, <EM>writable</EM> <EM>strings</EM> are an obsolescent feature.
As an extension, this implementation can be configured to change
- the function prototypes to use the <STRONG>const</STRONG> keyword. The ncurses ABI
+ the function prototypes to use the <STRONG>const</STRONG> 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,
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_touch.3x,v 1.34 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_touch.3x,v 1.39 2023/09/23 22:49: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>curs_touch 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_touch 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_touch 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_touch 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These functions were introduced by SVr4. The Solaris curses header
+ These functions were introduced by SVr4. The Solaris <EM>curses</EM> header
file, for instance, defines both an actual function and macro for each.
- The macros give the same result as the actual functions. SVr4 curses
+ The macros give the same result as the actual functions. SVr4 <EM>curses</EM>
does not check the window parameter <EM>win</EM> to ensure that it is not <STRONG>NULL</STRONG>;
otherwise this implementation behaves the same as SVr4.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_trace.3x,v 1.35 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_trace.3x,v 1.37 2023/09/23 20:53:33 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_trace 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_trace 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_trace 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_trace 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_trace.3x.html">curs_trace(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_util.3x,v 1.77 2023/09/16 23:37:03 tom Exp @
+ * @Id: curs_util.3x,v 1.83 2023/09/23 23:14:19 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 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_util 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_util 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_util 3x 2023-09-23 ncurses 6.4 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>
<STRONG>int</STRONG> <STRONG>delay_output(int</STRONG> <EM>ms</EM><STRONG>);</STRONG>
<STRONG>int</STRONG> <STRONG>flushinp(void);</STRONG>
- /* extensions */
+ <EM>/*</EM> <EM>extensions</EM> <EM>*/</EM>
<STRONG>void</STRONG> <STRONG>nofilter(void);</STRONG>
<STRONG>void</STRONG> <STRONG>use_tioctl(bool</STRONG> <EM>f</EM><STRONG>);</STRONG>
</PRE><H3><a name="h3-use_env">use_env</a></H3><PRE>
The <STRONG>use_env</STRONG> routine, if used, should be called before <STRONG>initscr</STRONG> or
<STRONG>newterm</STRONG> are called (because those compute the screen size). It
- modifies the way <STRONG>ncurses</STRONG> treats environment variables when determining
+ modifies the way <EM>ncurses</EM> treats environment variables when determining
the screen size.
- <STRONG>o</STRONG> Normally <STRONG>ncurses</STRONG> looks first at the terminal database for the
+ <STRONG>o</STRONG> Normally <EM>ncurses</EM> looks first at the terminal database for the
screen size.
If <STRONG>use_env</STRONG> was called with <STRONG>FALSE</STRONG> for parameter, it stops here
<STRONG>o</STRONG> <STRONG>ncurses</STRONG> re-fetches the value of the environment variables so that
it is still the environment variables which set the screen size.
- The <STRONG>use_env</STRONG> and <STRONG>use_tioctl</STRONG> routines combine as summarized here:
+ The <STRONG>use_env</STRONG> and <STRONG>use_tioctl</STRONG> routines combine as follows.
- <STRONG>use_env</STRONG> <STRONG>use_tioctl</STRONG> <STRONG>Summary</STRONG>
- ----------------------------------------------------------------
- TRUE FALSE This is the default behavior. <STRONG>ncurses</STRONG>
- uses operating system calls unless
- overridden by $LINES or $COLUMNS
- environment variables.
- TRUE TRUE <STRONG>ncurses</STRONG> updates $LINES and $COLUMNS
- based on operating system calls.
- FALSE TRUE <STRONG>ncurses</STRONG> ignores $LINES and $COLUMNS,
- uses operating system calls to obtain
- size.
- FALSE FALSE <STRONG>ncurses</STRONG> relies on the terminal database
- to determine size.
+ <STRONG>use_env</STRONG> <STRONG>use_tioctl</STRONG> <STRONG>Summary</STRONG>
+ -----------------------------------------------------------------
+ <STRONG>TRUE</STRONG> <STRONG>FALSE</STRONG> This is the default behavior. <EM>ncurses</EM>
+ uses operating system calls unless
+ overridden by <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG>
+ environment variables; default.
+ <STRONG>TRUE</STRONG> <STRONG>TRUE</STRONG> <EM>ncurses</EM> updates <STRONG>LINES</STRONG> and <STRONG>COLUMNS</STRONG> based
+ on operating system calls.
+ <STRONG>FALSE</STRONG> <STRONG>TRUE</STRONG> <EM>ncurses</EM> ignores <STRONG>LINES</STRONG> and <STRONG>COLUMNS</STRONG>, using
+ operating system calls to obtain size.
</PRE><H3><a name="h3-putwin_getwin">putwin/getwin</a></H3><PRE>
The <STRONG>nofilter</STRONG> and <STRONG>use_tioctl</STRONG> routines are specific to <STRONG>ncurses</STRONG>. They
were not supported on Version 7, BSD or System V implementations. It
is recommended that any code depending on <STRONG>ncurses</STRONG> extensions be
- conditioned using NCURSES_VERSION.
+ conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H3><a name="h3-putwin_getwin-file-format">putwin/getwin file-format</a></H3><PRE>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey 1997
- * @Id: define_key.3x,v 1.27 2023/09/16 23:37:03 tom Exp @
+ * @Id: define_key.3x,v 1.34 2023/09/23 23:04:14 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>define_key 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>define_key 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">define_key 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">define_key 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG> Library calls <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- This is an extension to the curses library. It permits an application
+ This is an extension to the <EM>curses</EM> library. It permits an application
to define keycodes with their corresponding control strings, so that
- the ncurses library will interpret them just as it would the predefined
+ the <EM>ncurses</EM> library will interpret them just as it would the predefined
codes in the terminfo database.
- If the given string is null, any existing definition for the keycode is
- removed. Similarly, if the given keycode is negative or zero, any
- existing string for the given definition is removed.
+ If <EM>definition</EM> is <STRONG>NULL</STRONG>, any existing one for the keycode is removed.
+ Similarly, if the given keycode is negative or zero, any existing
+ string for the given definition is removed.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- The keycode must be greater than zero, and the string non-null,
- otherwise <STRONG>ERR</STRONG> is returned. <STRONG>ERR</STRONG> may also be returned if there is
+ Either <EM>keycode</EM> must be greater than zero, or <EM>definition</EM> must be non-
+ <STRONG>NULL</STRONG>, otherwise <STRONG>ERR</STRONG> is returned. <STRONG>ERR</STRONG> may also be returned if there is
insufficient memory to allocate the data to store the definition. If
no error is detected, <STRONG>OK</STRONG> is returned.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These routines are specific to ncurses. They were not supported on
+ These routines are specific to <EM>ncurses</EM>. They were not supported on
Version 7, BSD or System V implementations. It is recommended that any
- code depending on them be conditioned using NCURSES_VERSION.
+ code depending on them be conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>, <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>.
+ <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>, <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
- Thomas Dickey.
+ Thomas Dickey
-ncurses 6.4 2023-09-16 <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "form_" for detailed
descriptions of the entry points.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
https://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey 2003
- * @Id: key_defined.3x,v 1.20 2023/09/16 23:38:39 tom Exp @
+ * @Id: key_defined.3x,v 1.26 2023/09/23 22:49: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>key_defined 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>key_defined 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">key_defined 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">key_defined 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG> Library calls <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- This is an extension to the curses library. It permits an application
+ This is an extension to the <EM>curses</EM> library. It permits an application
to determine if a string is currently bound to any keycode.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- This routine is specific to ncurses. It was not supported on Version
+ This routine is specific to <EM>ncurses</EM>. It was not supported on Version
7, BSD or System V implementations. It is recommended that any code
- depending on them be conditioned using NCURSES_VERSION.
+ depending on them be conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>.
+ <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
- Thomas Dickey.
+ Thomas Dickey
-ncurses 6.4 2023-09-16 <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="key_defined.3x.html">key_defined(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey 1999
- * @Id: keybound.3x,v 1.21 2023/09/16 23:38:39 tom Exp @
+ * @Id: keybound.3x,v 1.27 2023/09/23 22:49: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>keybound 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>keybound 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">keybound 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">keybound 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG> Library calls <STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- This is an extension to the curses library. It permits an application
+ This is an extension to the <EM>curses</EM> library. It permits an application
to determine the string which is defined in the terminfo for specific
keycodes.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- The <EM>keycode</EM> parameter must be greater than zero, else NULL is returned.
- If it does not correspond to a defined key, then NULL is returned. The
+ The <EM>keycode</EM> parameter must be greater than zero, else <STRONG>NULL</STRONG> is returned.
+ If it does not correspond to a defined key, then <STRONG>NULL</STRONG> is returned. The
<EM>count</EM> parameter is used to allow the application to iterate through
multiple definitions, counting from zero. When successful, the
function returns a string which must be freed by the caller.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- This routine is specific to ncurses. It was not supported on Version
+ This routine is specific to <EM>ncurses</EM>. It was not supported on Version
7, BSD or System V implementations. It is recommended that any code
- depending on them be conditioned using NCURSES_VERSION.
+ depending on them be conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>, <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>.
+ <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>, <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
- Thomas Dickey.
+ Thomas Dickey
-ncurses 6.4 2023-09-16 <STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="keybound.3x.html">keybound(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey 1997
- * @Id: keyok.3x,v 1.26 2023/09/16 23:38:39 tom Exp @
+ * @Id: keyok.3x,v 1.32 2023/09/23 22:49: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>keyok 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>keyok 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">keyok 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">keyok 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG> Library calls <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- This is an extension to the curses library. It permits an application
+ This is an extension to the <EM>curses</EM> library. It permits an application
to disable specific keycodes, rather than use the <STRONG>keypad</STRONG> function to
disable all keycodes. Keys that have been disabled can be re-enabled.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- This routine is specific to ncurses. It was not supported on Version
+ This routine is specific to <EM>ncurses</EM>. It was not supported on Version
7, BSD or System V implementations. It is recommended that any code
- depending on them be conditioned using NCURSES_VERSION.
+ depending on them be conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>.
+ <STRONG><A HREF="define_key.3x.html">define_key(3x)</A></STRONG>
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
- Thomas Dickey.
+ Thomas Dickey
-ncurses 6.4 2023-09-16 <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="keyok.3x.html">keyok(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "menu_" for detailed
descriptions of the entry points.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: ncurses.3x,v 1.171 2023/09/16 23:38:39 tom Exp @
+ * @Id: ncurses.3x,v 1.174 2023/09/23 22:58:27 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 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>ncurses 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">ncurses 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">ncurses 3x 2023-09-23 ncurses 6.4 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>
method of updating character screens with reasonable optimization.
This implementation is "new curses" (ncurses) and is the approved
replacement for 4.4BSD classic curses, which has been discontinued.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
The <STRONG>ncurses</STRONG> library emulates the curses library of System V Release 4
UNIX, and XPG4 (X/Open Portability Guide) curses (also known as XSI
overlay <STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>
overwrite <STRONG><A HREF="curs_overlay.3x.html">curs_overlay(3x)</A></STRONG>
pair_content <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
- pecho_wchar <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>*
+ pecho_wchar <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
pechochar <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
pnoutrefresh <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
prefresh <STRONG><A HREF="curs_pad.3x.html">curs_pad(3x)</A></STRONG>
slk_restore <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
slk_set <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
slk_touch <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
- slk_wset <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>*
+ slk_wset <STRONG><A HREF="curs_slk.3x.html">curs_slk(3x)</A></STRONG>
standend <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
standout <STRONG><A HREF="curs_attr.3x.html">curs_attr(3x)</A></STRONG>
start_color <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
tigetnum <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
tigetstr <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
timeout <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>
- tiparm <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>*
+ tiparm <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>
tiparm_s <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>*
tiscan_s <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>*
touchline <STRONG><A HREF="curs_touch.3x.html">curs_touch(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey
- * @Id: new_pair.3x,v 1.30 2023/09/16 23:38:39 tom Exp @
+ * @Id: new_pair.3x,v 1.36 2023/09/23 22:37:46 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>new_pair 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>new_pair 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">new_pair 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">new_pair 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="new_pair.3x.html">new_pair(3x)</A></STRONG> Library calls <STRONG><A HREF="new_pair.3x.html">new_pair(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- These functions are an extension to the curses library. They permit an
+ These functions are an extension to the <EM>curses</EM> library. They permit an
application to dynamically allocate a color pair using the
foreground/background colors rather than assign a fixed color pair
number, and return an unused pair to the pool.
it. That is, the foreground and background colors are applied as a
pair.
- <STRONG>o</STRONG> Color pairs are the curses library's way of managing a color
+ <STRONG>o</STRONG> Color pairs are the <EM>curses</EM> library's way of managing a color
palette on a terminal. If the library does not keep track of the
<EM>combinations</EM> of colors which are displayed, it will be inefficient.
All of the color pairs are allocated from a table of possible color
pairs. The size of the table is determined by the terminfo <STRONG>pairs</STRONG>
capability. The table is shared with <STRONG>init_pair</STRONG>; in fact <STRONG>alloc_pair</STRONG>
- calls <STRONG>init_pair</STRONG> after updating the ncurses library's fast index to the
+ calls <STRONG>init_pair</STRONG> after updating the <EM>ncurses</EM> library's fast index to the
colors versus color pairs.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These routines are specific to ncurses. They were not supported on
+ These routines are specific to <EM>ncurses</EM>. They were not supported on
Version 7, BSD or System V implementations. It is recommended that any
- code depending on them be conditioned using NCURSES_VERSION.
+ code depending on them be conditioned using <STRONG>NCURSES_VERSION</STRONG>.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>.
+ <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
- Thomas Dickey.
+ Thomas Dickey
-ncurses 6.4 2023-09-16 <STRONG><A HREF="new_pair.3x.html">new_pair(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="new_pair.3x.html">new_pair(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: panel.3x,v 1.50 2023/09/16 23:38:39 tom Exp @
+ * @Id: panel.3x,v 1.52 2023/09/23 23:37:26 tom Exp @
* ---------
* ---------
* ---------
<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>panel 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>panel 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">panel 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">panel 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG> Library calls <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
domain implementation by Warren Tucker published in <EM>u386mon</EM> 2.20
(1990).
- According to Tucker, the SystemV panel library was first released
+ According to Tucker, the System V panel library was first released
in SVr3.2 (1988), and his implementation helped with a port to
SVr3.1 (1987).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="panel.3x.html">panel(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* authorization. *
****************************************************************************
* Author: Thomas E. Dickey 1996-on
- * @Id: resizeterm.3x,v 1.40 2023/09/16 23:38:39 tom Exp @
+ * @Id: resizeterm.3x,v 1.45 2023/09/23 22:49:53 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>resizeterm 3x 2023-09-16 ncurses 6.4 Library calls</TITLE>
+<TITLE>resizeterm 3x 2023-09-23 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">resizeterm 3x 2023-09-16 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">resizeterm 3x 2023-09-23 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG> Library calls <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- This is an extension to the curses library. It provides callers with a
- hook into the <STRONG>ncurses</STRONG> data to resize windows, primarily for use by
+ This is an extension to the <EM>curses</EM> library. It provides callers with a
+ hook into the <EM>ncurses</EM> data to resize windows, primarily for use by
programs running in an X Window terminal (e.g., xterm) when the
terminal's screen size is changed by the user:
- <STRONG>o</STRONG> Curses windows cannot extend outside the screen. If the terminal
- is shrunk, curses windows must be shrunk to fit.
+ <STRONG>o</STRONG> <EM>curses</EM> windows cannot extend outside the screen. If the terminal
+ is shrunk, <EM>curses</EM> windows must be shrunk to fit.
<STRONG>o</STRONG> If the terminal is stretched, rows and/or columns can be added to
existing windows. The added cells should match the current
attributes of the windows.
If the calling program has not set up a handler for <STRONG>SIGWINCH</STRONG> when it
- initializes <STRONG>ncurses</STRONG> (e.g., using <STRONG><A HREF="curs_initscr.3x.html">initscr(3x)</A></STRONG> or <STRONG><A HREF="curs_initscr.3x.html">newterm(3x)</A></STRONG>), then
- <STRONG>ncurses</STRONG> sets a handler for <STRONG>SIGWINCH</STRONG> which notifies the library when a
+ initializes <EM>ncurses</EM> (e.g., using <STRONG><A HREF="curs_initscr.3x.html">initscr(3x)</A></STRONG> or <STRONG><A HREF="curs_initscr.3x.html">newterm(3x)</A></STRONG>), then
+ <EM>ncurses</EM> sets a handler for <STRONG>SIGWINCH</STRONG> which notifies the library when a
window-size event has occurred. The library checks for this
notification
</PRE><H3><a name="h3-resizeterm">resizeterm</a></H3><PRE>
The function <STRONG>resizeterm</STRONG> resizes the standard and current windows (i.e.,
<STRONG>stdscr</STRONG> and <STRONG>curscr</STRONG>) to the specified dimensions, and adjusts other
- bookkeeping data used by the <STRONG>ncurses</STRONG> library that record the window
+ bookkeeping data used by the <EM>ncurses</EM> library that record the window
dimensions such as the <STRONG>LINES</STRONG> and <STRONG>COLS</STRONG> variables.
them in a context where <STRONG>malloc</STRONG> or <STRONG>realloc</STRONG> may have been interrupted,
since it uses those functions.
- If ncurses is configured to supply its own <STRONG>SIGWINCH</STRONG> handler,
+ If <EM>ncurses</EM> is configured to supply its own <STRONG>SIGWINCH</STRONG> handler,
<STRONG>o</STRONG> on receipt of a <STRONG>SIGWINCH</STRONG>, the handler sets a flag
Calling <STRONG>resizeterm</STRONG> or <STRONG>resize_term</STRONG> directly from a signal handler is
unsafe. This indirect method is used to provide a safe way to
- resize the ncurses data structures.
+ resize the <EM>ncurses</EM> data structures.
If the environment variables <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> are set, this overrides
the library's use of the window size obtained from the operating
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- It is possible to resize the screen with SVr4 curses, by
+ It is possible to resize the screen with SVr4 <EM>curses</EM>, by
- <STRONG>o</STRONG> exiting curses with <STRONG><A HREF="curs_initscr.3x.html">endwin(3x)</A></STRONG> and
+ <STRONG>o</STRONG> exiting <EM>curses</EM> with <STRONG><A HREF="curs_initscr.3x.html">endwin(3x)</A></STRONG> and
<STRONG>o</STRONG> resuming using <STRONG><A HREF="curs_refresh.3x.html">refresh(3x)</A></STRONG>.
Doing that clears the screen and is visually distracting.
- This extension of ncurses was introduced in mid-1995. It was adopted
- in NetBSD curses (2001) and PDCurses (2003).
+ This extension of <EM>ncurses</EM> was introduced in mid-1995. It was adopted
+ in NetBSD <EM>curses</EM> (2001) and PDCurses (2003).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(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_variables.3x.html">curs_variables(3x)</A></STRONG>, <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG>
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
Thomas Dickey (from an equivalent function written in 1988 for BSD
- curses).
+ <EM>curses</EM>)
-ncurses 6.4 2023-09-16 <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: scr_dump.5,v 1.31 2023/09/16 23:38:39 tom Exp @
+ * @Id: scr_dump.5,v 1.33 2023/09/23 23:37:26 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>scr_dump 5 2023-09-16 ncurses 6.4 File formats</TITLE>
+<TITLE>scr_dump 5 2023-09-23 ncurses 6.4 File formats</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">scr_dump 5 2023-09-16 ncurses 6.4 File formats</H1>
+<H1 class="no-header">scr_dump 5 2023-09-23 ncurses 6.4 File formats</H1>
<PRE>
<STRONG><A HREF="scr_dump.5.html">scr_dump(5)</A></STRONG> File formats <STRONG><A HREF="scr_dump.5.html">scr_dump(5)</A></STRONG>
into the array of line-data and adjust the <STRONG>WINDOW</STRONG> structure which
was read back into memory.
- This is similar to Unix SystemV, but does not write a "magic number" to
- identify the file format.
+ This is similar to Unix System V, but does not write a "magic number"
+ to identify the file format.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
<STRONG>or</STRONG> <STRONG>to</STRONG> <STRONG>earlier</STRONG> <STRONG>XPG</STRONG> <STRONG>releases</STRONG>, for clarity.
-</PRE><H3><a name="h3-Unix-SystemV">Unix SystemV</a></H3><PRE>
- Unix SystemV curses identified the file format by writing a "magic
+</PRE><H3><a name="h3-Unix-System-V">Unix System V</a></H3><PRE>
+ Unix System V curses identified the file format by writing a "magic
number" at the beginning of the dump. The <STRONG>WINDOW</STRONG> data and the lines of
text follow, all in binary form.
</PRE><H3><a name="h3-PDCurses">PDCurses</a></H3><PRE>
PDCurses added support for screen dumps in version 2.7 (2005). Like
- Unix SystemV and ncurses5, it writes the <STRONG>WINDOW</STRONG> structure in binary,
+ Unix System V and ncurses5, it writes the <STRONG>WINDOW</STRONG> structure in binary,
but begins the file with its three-byte identifier "PDC", followed by a
one-byte version, e.g.,
-ncurses 6.4 2023-09-16 <STRONG><A HREF="scr_dump.5.html">scr_dump(5)</A></STRONG>
+ncurses 6.4 2023-09-23 <STRONG><A HREF="scr_dump.5.html">scr_dump(5)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-PORTABILITY">PORTABILITY</a>
<ul>
<li><a href="#h3-X_Open-Curses">X/Open Curses</a></li>
-<li><a href="#h3-Unix-SystemV">Unix SystemV</a></li>
+<li><a href="#h3-Unix-System-V">Unix System V</a></li>
<li><a href="#h3-Solaris">Solaris</a></li>
<li><a href="#h3-PDCurses">PDCurses</a></li>
<li><a href="#h3-NetBSD">NetBSD</a></li>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences.
- This manual describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This manual describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="term.5.html">term(5)</A></STRONG>. <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
<STRONG>csh(1)</STRONG>, <STRONG>sh(1)</STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>tty(4)</STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
<STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230917).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20230923).
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_color.3x,v 1.77 2023/09/16 23:34:43 tom Exp $
-.TH curs_color 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_color.3x,v 1.82 2023/09/23 22:24:15 tom Exp $
+.TH curs_color 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%PAIR_NUMBER\fP \-
manipulate terminal colors with \fIcurses\fR
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint start_color(void);\fP
-.sp
+.PP
\fBbool has_colors(void);\fP
-.br
\fBbool can_change_color(void);\fP
-.sp
+.PP
\fBint init_pair(short \fIpair\fB, short \fIf\fB, short \fIb\fB);\fR
-.br
\fBint init_color(short \fIcolor\fB, short \fIr\fB, short \fIg\fB, short \fIb\fB);\fR
-.br
-/* extensions */
-.br
+\fI/* extensions */\fP
\fBint init_extended_pair(int \fIpair\fB, int \fIf\fB, int \fIb\fB);\fR
-.br
\fBint init_extended_color(int \fIcolor\fB, int \fIr\fB, int \fIg\fB, int \fIb\fB);\fR
-.sp
+.PP
\fBint color_content(short \fIcolor\fB, short *\fIr\fB, short *\fIg\fB, short *\fIb\fB);\fR
-.br
\fBint pair_content(short \fIpair\fB, short *\fIf\fB, short *\fIb\fB);\fR
-.br
-/* extensions */
-.br
+\fI/* extensions */\fP
\fBint extended_color_content(int \fIcolor\fB, int *\fIr\fB, int *\fIg\fB, int *\fIb\fB);\fR
-.br
\fBint extended_pair_content(int \fIpair\fB, int *\fIf\fB, int *\fIb\fB);\fR
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
\fBvoid reset_color_pairs(void);\fP
-.sp
+.PP
\fBint COLOR_PAIR(int \fIn\fB);\fR
-.br
\fBPAIR_NUMBER(\fIattrs\fB);\fR
+.fi
.SH DESCRIPTION
.SS Overview
-\fBcurses\fP supports color attributes on terminals with that capability.
-To use these routines \fBstart_color\fP must be called, usually right after
-\fBinitscr\fP.
+\fIcurses\fP supports color attributes on terminals with that capability.
+To use these routines \fB\%start_color\fP must be called, usually right after
+\fB\%initscr\fP.
Colors are always used in pairs (referred to as color-pairs).
A color-pair consists of a foreground color (for characters) and a background
color (for the blank field on which the characters are displayed).
-A programmer initializes a color-pair with the routine \fBinit_pair\fP.
-After it has been initialized, \fBCOLOR_PAIR\fP(\fIn\fP)
+A programmer initializes a color-pair with the routine \fB\%init_pair\fP.
+After it has been initialized, \fB\%COLOR_PAIR\fP(\fIn\fP)
can be used to convert the pair to a video attribute.
.PP
If a terminal is capable of redefining colors, the programmer can use the
-routine \fBinit_color\fP to change the definition of a color.
-The routines \fBhas_colors\fP and \fBcan_change_color\fP
+routine \fB\%init_color\fP to change the definition of a color.
+The routines \fB\%has_colors\fP and \fB\%can_change_color\fP
return \fBTRUE\fP or \fBFALSE\fP,
depending on whether the terminal has color capabilities and whether the
programmer can change the colors.
-The routine \fBcolor_content\fP allows a
+The routine \fB\%color_content\fP allows a
programmer to extract the amounts of red, green, and blue components in an
initialized color.
-The routine \fBpair_content\fP allows a programmer to find
+The routine \fB\%pair_content\fP allows a programmer to find
out how a given color-pair is currently defined.
.SS Color Rendering
-The \fBcurses\fP library combines these inputs to produce the
+The \fIcurses\fP library combines these inputs to produce the
actual foreground and background colors shown on the screen:
.bP
-per-character video attributes (e.g., via \fBwaddch\fP),
+per-character video attributes (e.g., via \fB\%waddch\fP),
.bP
-the window attribute (e.g., by \fBwattrset\fP), and
+the window attribute (e.g., by \fB\%wattrset\fP), and
.bP
-the background character (e.g., \fBwbkgdset\fP).
+the background character (e.g., \fB\%wbkgdset\fP).
.PP
Per-character and window attributes are usually set by a parameter containing
video attributes including a color pair value.
-Some functions such as \fBwattr_set\fP use a separate parameter which
+Some functions such as \fB\%wattr_set\fP use a separate parameter which
is the color pair number.
.PP
The background character is a special case: it includes a character value,
-just as if it were passed to \fBwaddch\fP.
+just as if it were passed to \fB\%waddch\fP.
.PP
-The \fBcurses\fP library does the actual work of combining these color
-pairs in an internal function called from \fBwaddch\fP:
+The \fIcurses\fP library does the actual work of combining these color
+pairs in an internal function called from \fB\%waddch\fP:
.bP
-If the parameter passed to \fBwaddch\fP is \fIblank\fP,
+If the parameter passed to \fB\%waddch\fP is \fIblank\fP,
and it uses the special color pair 0,
.RS
.bP
-\fBcurses\fP next checks the window attribute.
+\fIcurses\fP next checks the window attribute.
.bP
If the window attribute does not use color pair 0,
-\fBcurses\fP uses the color pair from the window attribute.
+\fIcurses\fP uses the color pair from the window attribute.
.bP
-Otherwise, \fBcurses\fP uses the background character.
+Otherwise, \fIcurses\fP uses the background character.
.RE
.bP
-If the parameter passed to \fBwaddch\fP is \fInot blank\fP,
+If the parameter passed to \fB\%waddch\fP is \fInot blank\fP,
or it does not use the special color pair 0,
-\fBcurses\fP prefers the color pair from the parameter,
+\fIcurses\fP prefers the color pair from the parameter,
if it is nonzero.
Otherwise, it tries the window attribute next, and finally the
background character.
.PP
-Some \fBcurses\fP functions such as \fBwprintw\fP call \fBwaddch\fP.
+Some \fIcurses\fP functions such as \fB\%wprintw\fP call \fB\%waddch\fP.
Those do not combine its parameter with a color pair.
Consequently those calls use only the window attribute or
the background character.
.SH CONSTANTS
-In \fB<curses.h>\fP the following macros are defined.
+In \fB\%<curses.h>\fP the following macros are defined.
These are the standard colors (ISO-6429).
-\fBcurses\fP also assumes that \fBCOLOR_BLACK\fP is the default
+\fIcurses\fP also assumes that \fB\%COLOR_BLACK\fP is the default
background color for all terminals.
.PP
.nf
There are no standard names for those additional colors.
.SH VARIABLES
.SS COLORS
-is initialized by \fBstart_color\fP to the maximum number of colors
+is initialized by \fB\%start_color\fP to the maximum number of colors
the terminal can support.
.SS COLOR_PAIRS
-is initialized by \fBstart_color\fP to the maximum number of color pairs
+is initialized by \fB\%start_color\fP to the maximum number of color pairs
the terminal can support.
.SH FUNCTIONS
.SS start_color
-The \fBstart_color\fP routine requires no arguments.
+The \fB\%start_color\fP routine requires no arguments.
It must be called if the programmer wants to use colors, and before any other
color manipulation routine is called.
-It is good practice to call this routine right after \fBinitscr\fP.
-\fBstart_color\fP does this:
+It is good practice to call this routine right after \fB\%initscr\fP.
+\fB\%start_color\fP does this:
.bP
-It initializes two global variables, \fBCOLORS\fP and
-\fBCOLOR_PAIRS\fP (respectively defining the maximum number of colors
+It initializes two global variables, \fB\%COLORS\fP and
+\fB\%COLOR_PAIRS\fP (respectively defining the maximum number of colors
and color-pairs the terminal can support).
.bP
-It initializes the special color pair \fB0\fP to the default foreground
+It initializes the special color pair \fB\%0\fP to the default foreground
and background colors.
No other color pairs are initialized.
.bP
It restores the colors on the terminal to the values
they had when the terminal was just turned on.
.bP
-If the terminal supports the \fBinitc\fP (\fBinitialize_color\fP) capability,
-\fBstart_color\fP
+If the terminal supports the \fBinitc\fP (\fB\%initialize_color\fP) capability,
+\fB\%start_color\fP
initializes its internal table representing the
red, green, and blue components of the color palette.
.IP
The components depend on whether the terminal uses
CGA (aka \*(``ANSI\*('') or
-HLS (i.e., the \fBhls\fP (\fBhue_lightness_saturation\fP) capability is set).
+HLS (i.e., the \fBhls\fP (\fB\%hue_lightness_saturation\fP) capability is set).
The table is initialized first for eight basic colors
(black, red, green, yellow, blue, magenta, cyan, and white),
using weights that depend upon the CGA/HLS choice.
SVr4 uses a similar scheme, but uses \fB1000\fP
for the components of the initial eight colors.
.IP
-\fBstart_color\fP does not attempt to set the terminal's color palette
+\fB\%start_color\fP does not attempt to set the terminal's color palette
to match its built-in table.
-An application may use \fBinit_color\fP to alter the internal table
+An application may use \fB\%init_color\fP to alter the internal table
along with the terminal's color.
.PP
These limits apply to color values and color pairs.
Values outside these limits are not legal, and may result in a runtime error:
.bP
-\fBCOLORS\fP corresponds to the terminal database's \fBmax_colors\fP capability,
-(see \fBterminfo\fP(\*n)).
+\fBCOLORS\fP corresponds to the terminal database's \fB\%max_colors\fP capability,
+(see \fB\%terminfo\fP(\*n)).
.bP
-color values are expected to be in the range \fB0\fP to \fBCOLORS\-1\fP,
-inclusive (including \fB0\fP and \fBCOLORS\-1\fP).
+color values are expected to be in the range \fB0\fP to \fB\%COLORS\-1\fP,
+inclusive (including \fB0\fP and \fB\%COLORS\-1\fP).
.bP
a special color value \fB\-1\fP is used in certain extended functions
-to denote the \fIdefault color\fP (see \fBuse_default_colors\fP(3X)).
+to denote the \fIdefault color\fP (see \fB\%use_default_colors\fP(3X)).
.bP
-\fBCOLOR_PAIRS\fP corresponds to
-the terminal database's \fBmax_pairs\fP capability,
-(see \fBterminfo\fP(\*n)).
+\fB\%COLOR_PAIRS\fP corresponds to
+the terminal database's \fB\%max_pairs\fP capability,
+(see \fB\%terminfo\fP(\*n)).
.bP
-legal color pair values are in the range \fB1\fP to \fBCOLOR_PAIRS\-1\fP,
+legal color pair values are in the range \fB1\fP to \fB\%COLOR_PAIRS\-1\fP,
inclusive.
.bP
color pair \fB0\fP is special; it denotes \*(``no color\*(''.
but is actually whatever the terminal implements before color is initialized.
It cannot be modified by the application.
.SS has_colors
-The \fBhas_colors\fP routine requires no arguments.
+The \fB\%has_colors\fP routine requires no arguments.
It returns \fBTRUE\fP if
the terminal can manipulate colors; otherwise, it returns \fBFALSE\fP.
This routine facilitates writing terminal-independent programs.
For example, a programmer can use it to decide
whether to use color or some other video attribute.
.SS can_change_color
-The \fBcan_change_color\fP routine requires no arguments.
+The \fB\%can_change_color\fP routine requires no arguments.
It returns \fBTRUE\fP if the terminal supports colors
and can change their definitions;
other, it returns \fBFALSE\fP.
This routine facilitates writing terminal-independent programs.
.SS init_pair
-The \fBinit_pair\fP routine changes the definition of a color-pair.
+The \fB\%init_pair\fP routine changes the definition of a color-pair.
It takes three arguments:
the number of the color-pair to be changed, the foreground
color number, and the background color number.
For portable applications:
.bP
The first argument must be a legal color pair value.
-If default colors are used (see \fBuse_default_colors\fP(3X))
+If default colors are used (see \fB\%use_default_colors\fP(3X))
the upper limit is adjusted to allow for extra pairs which use
a default color in foreground and/or background.
.bP
are changed to the new definition.
.PP
As an extension, ncurses allows you to set color pair \fB0\fP via
-the \fBassume_default_colors\fP(3X) routine, or to specify the use of
+the \fB\%assume_default_colors\fP(3X) routine, or to specify the use of
default colors (color number \fB\-1\fP) if you first invoke the
-\fBuse_default_colors\fP(3X) routine.
+\fB\%use_default_colors\fP(3X) routine.
.SS init_extended_pair
-Because \fBinit_pair\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%init_pair\fP uses signed \fBshort\fPs for its parameters,
that limits color-pairs and color-values
to 32767 on modern hardware.
-The extension \fBinit_extended_pair\fP uses \fBint\fPs
+The extension \fB\%init_extended_pair\fP uses \fBint\fPs
for the color-pair and color-value,
allowing a larger number of colors to be supported.
.SS init_color
-The \fBinit_color\fP routine changes the definition of a color.
+The \fB\%init_color\fP routine changes the definition of a color.
It takes four arguments:
the number of the color to be changed followed by three RGB values
(for the amounts of red, green, and blue components).
.bP
The first argument must be a legal color value;
default colors are not allowed here.
-(See the section \fBColors\fP for the default color index.)
+(See the section \fB\%Colors\fP for the default color index.)
.bP
Each of the last three arguments
must be a value in the range \fB0\fP through \fB1000\fP.
.PP
-When \fBinit_color\fP is used, all
+When \fB\%init_color\fP is used, all
occurrences of that color on the screen immediately change to the new
definition.
.SS init_extended_color
-Because \fBinit_color\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%init_color\fP uses signed \fBshort\fPs for its parameters,
that limits color-values and their red, green, and blue components
to 32767 on modern hardware.
-The extension \fBinit_extended_color\fP uses \fBint\fPs
+The extension \fB\%init_extended_color\fP uses \fBint\fPs
for the color value and
for setting the red, green, and blue components,
allowing a larger number of colors to be supported.
.SS color_content
-The \fBcolor_content\fP routine gives programmers a way to find the intensity
+The \fB\%color_content\fP routine gives programmers a way to find the intensity
of the red, green, and blue (RGB) components in a color.
It requires four arguments: the color number, and three addresses
of \fBshort\fRs for storing
given color.
.bP
The first argument must be a legal color value, i.e.,
-\fB0\fP through \fBCOLORS\-1\fP, inclusive.
+\fB0\fP through \fB\%COLORS\-1\fP, inclusive.
.bP
The values that are stored at the addresses pointed to by the
last three arguments are in the range
\fB0\fP (no component) through \fB1000\fP
(maximum amount of component), inclusive.
.SS extended_color_content
-Because \fBcolor_content\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%color_content\fP uses signed \fBshort\fPs for its parameters,
that limits color-values and their red, green, and blue components
to 32767 on modern hardware.
-The extension \fBextended_color_content\fP uses \fBint\fPs
+The extension \fB\%extended_color_content\fP uses \fBint\fPs
for the color value and
for returning the red, green, and blue components,
allowing a larger number of colors to be supported.
.SS pair_content
-The \fBpair_content\fP routine allows programmers to find out what colors a
+The \fB\%pair_content\fP routine allows programmers to find out what colors a
given color-pair consists of.
It requires three arguments: the color-pair
number, and two addresses of \fBshort\fRs for storing the foreground and the
background color numbers.
.bP
The first argument must be a legal color value,
-i.e., in the range \fB1\fP through \fBCOLOR_PAIRS\-1\fP, inclusive.
+i.e., in the range \fB1\fP through \fB\%COLOR_PAIRS\-1\fP, inclusive.
.bP
The values that are stored at the addresses pointed
to by the second and third arguments are in the
-range \fB0\fP through \fBCOLORS\fP, inclusive.
+range \fB0\fP through \fB\%COLORS\fP, inclusive.
.SS extended_pair_content
-Because \fBpair_content\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%pair_content\fP uses signed \fBshort\fPs for its parameters,
that limits color-pair and color-values to 32767 on modern hardware.
-The extension \fBextended_pair_content\fP uses \fBint\fPs
+The extension \fB\%extended_pair_content\fP uses \fBint\fPs
for the color pair and
for returning the foreground and background colors,
allowing a larger number of colors to be supported.
.SS reset_color_pairs
-The extension \fBreset_color_pairs\fP tells ncurses to discard all
-of the color-pair information which was set with \fBinit_pair\fP.
+The extension \fB\%reset_color_pairs\fP tells ncurses to discard all
+of the color-pair information which was set with \fB\%init_pair\fP.
It also touches the current- and standard-screens, allowing an application to
switch color palettes rapidly.
.SS PAIR_NUMBER
-\fBPAIR_NUMBER(\fIattrs\fR) extracts the color
+\fB\%PAIR_NUMBER(\fIattrs\fR) extracts the color
value from its \fIattrs\fP parameter and returns it as a color pair number.
.SS COLOR_PAIR
-Its inverse \fBCOLOR_PAIR(\fIn\fB)\fR converts a color pair number
+Its inverse \fB\%COLOR_PAIR(\fIn\fB)\fR converts a color pair number
to an attribute.
Attributes can hold color pairs in the range 0 to 255.
If you need a color pair larger than that, you must use functions
-such as \fBattr_set\fP (which pass the color pair as a separate parameter)
-rather than the legacy functions such as \fBattrset\fP.
+such as \fB\%attr_set\fP (which pass the color pair as a separate parameter)
+rather than the legacy functions such as \fB\%attrset\fP.
.SH RETURN VALUE
-The routines \fBcan_change_color\fP and \fBhas_colors\fP return \fBTRUE\fP
+The routines \fB\%can_change_color\fP and \fB\%has_colors\fP return \fBTRUE\fP
or \fBFALSE\fP.
.PP
All other routines return the integer \fBERR\fP upon failure and an \fBOK\fP
SVr4 does document some error conditions which apply in general:
.bP
This implementation will return \fBERR\fP on attempts to
-use color values outside the range \fB0\fP to \fBCOLORS\fP\-1
+use color values outside the range \fB0\fP to \fB\%COLORS\fP\-1
(except for the default colors extension),
-or use color pairs outside the range \fB0\fP to \fBCOLOR_PAIRS\-1\fP.
+or use color pairs outside the range \fB0\fP to \fB\%COLOR_PAIRS\-1\fP.
.IP
-Color values used in \fBinit_color\fP must be
+Color values used in \fB\%init_color\fP must be
in the range \fB0\fP to \fB1000\fP.
.IP
An error is returned from all functions
if the terminal has not been initialized.
.IP
-An error is returned from secondary functions such as \fBinit_pair\fP
-if \fBstart_color\fP was not called.
+An error is returned from secondary functions such as \fB\%init_pair\fP
+if \fB\%start_color\fP was not called.
.bP
SVr4 does much the same, except that
-it returns \fBERR\fP from \fBpair_content\fP if the pair was not initialized
-using \fBinit_pairs\fP
+it returns \fBERR\fP from \fB\%pair_content\fP if the pair was not initialized
+using \fB\%init_pairs\fP
and
-it returns \fBERR\fP from \fBcolor_content\fP
+it returns \fBERR\fP from \fB\%color_content\fP
if the terminal does not support changing colors.
.IP
This implementation does not return \fBERR\fP for either case.
Specific functions make additional checks:
.RS 3
.TP 5
-\fBinit_color\fP
+\fB\%init_color\fP
returns an error if the terminal does not support
-this feature, e.g., if the \fBinitialize_color\fP capability is absent
+this feature, e.g., if the \fB\%initialize_color\fP capability is absent
from the terminal description.
.TP 5
-\fBstart_color\fP
+\fB\%start_color\fP
returns an error if the color table cannot be allocated.
.RE
.SH NOTES
-In the \fBncurses\fP implementation, there is a separate color activation flag,
+In the \fIncurses\fP implementation, there is a separate color activation flag,
color palette, color pairs table,
-and associated \fBCOLORS\fP and \fBCOLOR_PAIRS\fP counts
-for each screen; the \fBstart_color\fP function only affects the current
+and associated \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP counts
+for each screen; the \fB\%start_color\fP function only affects the current
screen.
The SVr4/XSI interface is not really designed with this in mind, and
historical implementations may use a single shared color palette.
character cells that a character write operation explicitly touches.
To change
the background color used when parts of a window are blanked by erasing or
-scrolling operations, see \fBcurs_bkgd\fP(3X).
+scrolling operations, see \fB\%curs_bkgd\fP(3X).
.PP
Several caveats apply on older x86 machines
(e.g., i386, i486) with VGA-compatible graphics:
SVr4 made internal changes,
e.g., moving the storage for the color state
from \fBSP\fP (the \fBSCREEN\fP structure)
-to \fBcur_term\fP (the \fBTERMINAL\fP structure),
+to \fB\%cur_term\fP (the \fB\%TERMINAL\fP structure),
but provided the same set of library functions.
.PP
SVr4 curses limits the number of color pairs to 64,
reserving color pair zero (0) as the terminal's initial uncolored state.
This limit arises because the color pair information is a bitfield
-in the \fBchtype\fP data type (denoted by \fBA_COLOR\fP).
+in the \fB\%chtype\fP data type (denoted by \fB\%A_COLOR\fP).
.PP
Other implementations of curses had different limits:
.bP
.bP
PDCurses (1992-present) inherited the 8-color limitation from PCCurses,
but changed this to 256 in version 2.5 (2001),
-along with changing \fBchtype\fP from 16-bits to 32-bits.
+along with changing \fB\%chtype\fP from 16-bits to 32-bits.
.bP
X/Open Curses (1992-present)
-added a new structure \fBcchar_t\fP to store the character,
+added a new structure \fB\%cchar_t\fP to store the character,
attributes and color-pair values, allowing increased range of color-pairs.
Both color-pairs and color-values used a signed \fBshort\fP,
limiting values to 15 bits.
.bP
-ncurses (1992-present) uses eight bits for \fBA_COLOR\fP in \fBchtype\fP values.
+ncurses (1992-present) uses eight bits for \fB\%A_COLOR\fP in \fB\%chtype\fP values.
.IP
Version 5.3 provided a wide-character interface (2002),
but left color-pairs as part of the attributes-field.
.IP
Since version 6 (2015),
-ncurses uses a separate \fBint\fP for color-pairs in the \fBcchar_t\fP values.
+ncurses uses a separate \fBint\fP for color-pairs in the \fB\%cchar_t\fP values.
When those color-pair values fit in 8 bits,
ncurses allows color-pairs to be manipulated
-via the functions using \fBchtype\fP values.
+via the functions using \fB\%chtype\fP values.
.bP
NetBSD curses used 6 bits from
2000 (when colors were first supported) until 2004.
As of 2021, that size is unchanged.
Like ncurses before version 6,
the NetBSD color-pair information is stored in
-the attributes field of \fBcchar_t\fP, limiting the number of color-pairs
+the attributes field of \fB\%cchar_t\fP, limiting the number of color-pairs
by the size of the bitfield.
.SH PORTABILITY
.SS Extensions
or any other previous version of curses.
.SS Standards
This implementation satisfies XSI Curses's minimum maximums
-for \fBCOLORS\fP and \fBCOLOR_PAIRS\fP.
+for \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP.
.PP
-The \fBinit_pair\fP routine accepts negative values of foreground
-and background color to support the \fBuse_default_colors\fP(3X) extension,
+The \fB\%init_pair\fP routine accepts negative values of foreground
+and background color to support the \fB\%use_default_colors\fP(3X) extension,
but only if that routine has been first invoked.
.PP
-The assumption that \fBCOLOR_BLACK\fP is the default
+The assumption that \fB\%COLOR_BLACK\fP is the default
background color for all terminals can be modified using the
-\fBassume_default_colors\fP(3X) extension.
+\fB\%assume_default_colors\fP(3X) extension.
.PP
This implementation checks the pointers,
e.g., for the values returned by
-\fBcolor_content\fP and \fBpair_content\fP,
+\fB\%color_content\fP and \fB\%pair_content\fP,
and will treat those as optional parameters when null.
.PP
X/Open Curses does not specify a limit for the number of colors and
which use \fBshort\fP parameters,
allowing applications to use larger color- and pair-numbers.
.PP
-The \fBreset_color_pairs\fP function is an extension of ncurses.
+The \fB\%reset_color_pairs\fP function is an extension of ncurses.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_attr\fP(3X),
-\fBcurs_variables\fP(3X),
-\fBdefault_colors\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_attr\fP(3X),
+\fB\%curs_variables\fP(3X),
+\fB\%default_colors\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getyx.3x,v 1.31 2023/09/16 23:37:03 tom Exp $
-.TH curs_getyx 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_getyx.3x,v 1.37 2023/09/23 22:10:55 tom Exp $
+.TH curs_getyx 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%getyx\fP,
\fB\%getparyx\fP,
\fB\%getmaxyx\fP \-
get \fIcurses\fR cursor and window coordinates
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBvoid getyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
\fBvoid getparyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
\fBvoid getbegyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
\fBvoid getmaxyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
+.fi
.SH DESCRIPTION
-The \fBgetyx\fP macro places the current cursor position of the given window in
+The \fB\%getyx\fP macro places the current cursor position of the given window in
the two integer variables \fIy\fP and \fIx\fP.
.PP
-If \fIwin\fP is a subwindow, the \fBgetparyx\fP macro places the beginning
+If \fIwin\fP is a subwindow, the \fB\%getparyx\fP macro places the beginning
coordinates of the subwindow relative to the parent window into two integer
variables \fIy\fP and \fIx\fP.
Otherwise, \fB\-1\fP is placed into \fIy\fP and \fIx\fP.
.PP
-Like \fBgetyx\fP, the \fBgetbegyx\fP and \fBgetmaxyx\fP macros store
+Like \fB\%getyx\fP, the \fB\%getbegyx\fP and \fB\%getmaxyx\fP macros store
the current beginning coordinates and size of the specified window.
.SH RETURN VALUE
The return values of these macros are undefined (i.e.,
A "\fB&\fP" is not necessary before the variables \fIy\fP and \fIx\fP.
.SH PORTABILITY
The
-\fBgetyx\fP,
-\fBgetparyx\fP,
-\fBgetbegyx\fP and
-\fBgetmaxyx\fP
+\fB\%getyx\fP,
+\fB\%getparyx\fP,
+\fB\%getbegyx\fP and
+\fB\%getmaxyx\fP
macros are described in the XSI Curses standard, Issue 4.
.PP
This implementation also provides functions
-\fBgetbegx\fP,
-\fBgetbegy\fP,
-\fBgetcurx\fP,
-\fBgetcury\fP,
-\fBgetmaxx\fP,
-\fBgetmaxy\fP,
-\fBgetparx\fP and
-\fBgetpary\fP
-for compatibility with older versions of curses.
+\fB\%getbegx\fP,
+\fB\%getbegy\fP,
+\fB\%getcurx\fP,
+\fB\%getcury\fP,
+\fB\%getmaxx\fP,
+\fB\%getmaxy\fP,
+\fB\%getparx\fP and
+\fB\%getpary\fP
+for compatibility with older versions of \fIcurses\fP;
+see \fB\%curs_legacy\fP(3X).
.PP
Although X/Open Curses does not address this,
-many implementations provide members of the WINDOW structure
+many implementations provide members of the \fB\%WINDOW\fP structure
containing values corresponding to these macros.
-For best portability, do not rely on using the data in WINDOW,
-since some implementations make WINDOW opaque (do not allow
+For best portability, do not rely on using the data in \fB\%WINDOW\fP,
+since some implementations make \fB\%WINDOW\fP opaque (do not allow
direct use of its members).
.PP
Besides the problem of opaque structures,
the data stored in like-named members may not have like-values in
different implementations.
-For example, the WINDOW._maxx and WINDOW._maxy values in ncurses
+For example, the \fB\%WINDOW._maxx\fP and \fB\%WINDOW._maxy\fP values in \fIncurses\fP
have (at least since release 1.8.1) differed by one from some
other implementations.
-The difference is hidden by means of the macro \fBgetmaxyx\fP.
+The difference is hidden by means of the macro \fB\%getmaxyx\fP.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_legacy\fP(3X),
-\fBcurs_opaque\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_legacy\fP(3X),
+\fB\%curs_opaque\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inopts.3x,v 1.47 2023/09/16 23:37:03 tom Exp $
-.TH curs_inopts 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_inopts.3x,v 1.54 2023/09/23 22:24:15 tom Exp $
+.TH curs_inopts 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%typeahead\fP \-
get and set \fIcurses\fR terminal input options
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
.PP
\fBint cbreak(void);\fP
-.br
\fBint nocbreak(void);\fP
-.sp
+.PP
\fBint echo(void);\fP
-.br
\fBint noecho(void);\fP
-.sp
+.PP
\fBint intrflush(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
\fBint keypad(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
\fBint meta(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
\fBint nodelay(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
\fBint notimeout(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.sp
+.PP
\fBint nl(void);\fP
-.br
\fBint nonl(void);\fP
-.sp
+.PP
\fBint raw(void);\fP
-.br
\fBint noraw(void);\fP
-.sp
+.PP
\fBvoid qiflush(void);\fP
-.br
\fBvoid noqiflush(void);\fP
-.sp
+.PP
\fBint halfdelay(int \fItenths\fB);\fR
-.br
\fBvoid timeout(int \fIdelay\fB);\fR
-.br
\fBvoid wtimeout(WINDOW *\fIwin\fB, int \fIdelay\fB);\fR
-.sp
+.PP
\fBint typeahead(int \fIfd\fB);\fR
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
\fBint is_cbreak(void);\fP
-.br
\fBint is_echo(void);\fP
-.br
\fBint is_nl(void);\fP
-.br
\fBint is_raw(void);\fP
-.br
+.fi
.SH DESCRIPTION
-The \fBncurses\fP library provides several functions which let an application
+The \fIncurses\fP library provides several functions which let an application
change the way input from the terminal is handled.
Some are global, applying to all windows.
Others apply only to a specific window.
.SS cbreak/nocbreak
Normally, the tty driver buffers typed characters until a newline or carriage
return is typed.
-The \fBcbreak\fP routine disables line buffering and
+The \fB\%cbreak\fP routine disables line buffering and
erase/kill character-processing (interrupt and flow control characters are
unaffected), making characters typed by the user immediately available to the
program.
-The \fBnocbreak\fP routine returns the terminal to normal (cooked)
+The \fB\%nocbreak\fP routine returns the terminal to normal (cooked)
mode.
.PP
-Initially the terminal may or may not be in \fBcbreak\fP mode, as the mode is
-inherited; therefore, a program should call \fBcbreak\fP or \fBnocbreak\fP
+Initially the terminal may or may not be in \fB\%cbreak\fP mode, as the mode is
+inherited; therefore, a program should call \fB\%cbreak\fP or \fB\%nocbreak\fP
explicitly.
-Most interactive programs using \fBcurses\fP set the \fBcbreak\fP
+Most interactive programs using \fIcurses\fP set the \fB\%cbreak\fP
mode.
-Note that \fBcbreak\fP overrides \fBraw\fP.
-[See \fBcurs_getch\fP(3X) for a
-discussion of how these routines interact with \fBecho\fP and \fBnoecho\fP.]
+Note that \fB\%cbreak\fP overrides \fBraw\fP.
+[See \fB\%curs_getch\fP(3X) for a
+discussion of how these routines interact with \fBecho\fP and \fB\%noecho\fP.]
.\"
.SS echo/noecho
-The \fBecho\fP and \fBnoecho\fP routines control whether characters typed by
-the user are echoed by \fBgetch\fP(3X) as they are typed.
+The \fBecho\fP and \fB\%noecho\fP routines control whether characters typed by
+the user are echoed by \fB\%getch\fP(3X) as they are typed.
Echoing by the tty
-driver is always disabled, but initially \fBgetch\fP is in echo mode, so
+driver is always disabled, but initially \fB\%getch\fP is in echo mode, so
characters typed are echoed.
Authors of most interactive programs prefer to do
their own echoing in a controlled area of the screen, or not to echo at all, so
-they disable echoing by calling \fBnoecho\fP.
-[See \fBcurs_getch\fP(3X) for a
-discussion of how these routines interact with \fBcbreak\fP and
-\fBnocbreak\fP.]
+they disable echoing by calling \fB\%noecho\fP.
+[See \fB\%curs_getch\fP(3X) for a
+discussion of how these routines interact with \fB\%cbreak\fP and
+\fB\%nocbreak\fP.]
.\"
.SS halfdelay
-The \fBhalfdelay\fP routine is used for half-delay mode, which is similar to
-\fBcbreak\fP mode in that characters typed by the user are immediately
+The \fB\%halfdelay\fP routine is used for half-delay mode, which is similar to
+\fB\%cbreak\fP mode in that characters typed by the user are immediately
available to the program.
However, after blocking for \fItenths\fP tenths of
seconds, \fBERR\fP is returned if nothing has been typed.
The value of \fItenths\fP
must be a number between 1 and 255.
-Use \fBnocbreak\fP to leave half-delay
+Use \fB\%nocbreak\fP to leave half-delay
mode.
.\"
.SS intrflush
-If the \fBintrflush\fP option is enabled (\fIbf\fP is \fBTRUE\fP), and an
+If the \fB\%intrflush\fP option is enabled (\fIbf\fP is \fBTRUE\fP), and an
interrupt key is pressed on the keyboard (interrupt, break, quit), all output in
the tty driver queue will be flushed, giving the effect of faster response to
-the interrupt, but causing \fBcurses\fP to have the wrong idea of what is on
+the interrupt, but causing \fIcurses\fP to have the wrong idea of what is on
the screen.
Disabling the option (\fIbf\fP is \fBFALSE\fP) prevents the
flush.
The window argument is ignored.
.\"
.SS keypad
-The \fBkeypad\fP option enables the keypad of the user's terminal.
+The \fB\%keypad\fP option enables the keypad of the user's terminal.
If
enabled (\fIbf\fP is \fBTRUE\fP), the user can press a function key
-(such as an arrow key) and \fBwgetch\fP(3X) returns a single value
-representing the function key, as in \fBKEY_LEFT\fP.
+(such as an arrow key) and \fB\%wgetch\fP(3X) returns a single value
+representing the function key, as in \fB\%KEY_LEFT\fP.
If disabled
-(\fIbf\fP is \fBFALSE\fP), \fBcurses\fP does not treat function keys
+(\fIbf\fP is \fBFALSE\fP), \fIcurses\fP does not treat function keys
specially and the program has to interpret the escape sequences
itself.
If the keypad in the terminal can be turned on (made to
transmit) and off (made to work locally), turning on this option
-causes the terminal keypad to be turned on when \fBwgetch\fP(3X) is
+causes the terminal keypad to be turned on when \fB\%wgetch\fP(3X) is
called.
The default value for keypad is \fBFALSE\fP.
.\"
.SS meta
Initially, whether the terminal returns 7 or 8 significant bits on
-input depends on the control mode of the tty driver [see \fBtermios\fP(3)].
+input depends on the control mode of the tty driver [see \fB\%termios\fP(3)].
To force 8 bits to be returned, invoke \fBmeta\fP(\fIwin\fP,
\fBTRUE\fP); this is equivalent, under POSIX, to setting the CS8 flag
on the terminal.
device translates the return key into newline on input.
.\"
.SS nodelay
-The \fBnodelay\fP option causes \fBgetch\fP to be a non-blocking call.
-If no input is ready, \fBgetch\fP returns \fBERR\fP.
+The \fB\%nodelay\fP option causes \fB\%getch\fP to be a non-blocking call.
+If no input is ready, \fB\%getch\fP returns \fBERR\fP.
If disabled
-(\fIbf\fP is \fBFALSE\fP), \fBgetch\fP waits until a key is pressed.
+(\fIbf\fP is \fBFALSE\fP), \fB\%getch\fP waits until a key is pressed.
.SS notimeout
-When interpreting an escape sequence, \fBwgetch\fP(3X) sets a timer
+When interpreting an escape sequence, \fB\%wgetch\fP(3X) sets a timer
while waiting for the next character.
-If \fBnotimeout(\fIwin\fR,
-\fBTRUE\fP) is called, then \fBwgetch\fP does not set a timer.
+If \fB\%notimeout(\fIwin\fR,
+\fBTRUE\fP) is called, then \fB\%wgetch\fP does not set a timer.
The
purpose of the timeout is to differentiate between sequences received
from a function key and those typed by a user.
.\"
.SS raw/noraw
-The \fBraw\fP and \fBnoraw\fP routines place the terminal into or out of raw
+The \fBraw\fP and \fB\%noraw\fP routines place the terminal into or out of raw
mode.
-Raw mode is similar to \fBcbreak\fP mode, in that characters typed are
+Raw mode is similar to \fB\%cbreak\fP mode, in that characters typed are
immediately passed through to the user program.
The differences are that in
raw mode, the interrupt, quit, suspend, and flow control characters are all
passed through uninterpreted, instead of generating a signal.
The behavior of
the BREAK key depends on other bits in the tty driver that are not set by
-\fBcurses\fP.
+\fIcurses\fP.
.\"
.SS qiflush/noqiflush
-When the \fBnoqiflush\fP routine is used, normal flush of input and
+When the \fB\%noqiflush\fP routine is used, normal flush of input and
output queues associated with the \fBINTR\fP, \fBQUIT\fP and
-\fBSUSP\fP characters will not be done [see \fBtermios\fP(3)].
+\fBSUSP\fP characters will not be done [see \fB\%termios\fP(3)].
When
-\fBqiflush\fP is called, the queues will be flushed when these control
+\fB\%qiflush\fP is called, the queues will be flushed when these control
characters are read.
-You may want to call \fBnoqiflush\fP in a signal
+You may want to call \fB\%noqiflush\fP in a signal
handler if you want output to continue as though the interrupt
had not occurred, after the handler exits.
.\"
.SS timeout/wtimeout
-The \fBtimeout\fP and \fBwtimeout\fP routines set blocking or
+The \fB\%timeout\fP and \fB\%wtimeout\fP routines set blocking or
non-blocking read for a given window.
If \fIdelay\fP is negative,
blocking read is used (i.e., waits indefinitely for
If
\fIdelay\fP is positive, then read blocks for \fIdelay\fP
milliseconds, and returns \fBERR\fP if there is still no input.
-Hence, these routines provide the same functionality as \fBnodelay\fP,
+Hence, these routines provide the same functionality as \fB\%nodelay\fP,
plus the additional capability of being able to block for only
\fIdelay\fP milliseconds (where \fIdelay\fP is positive).
.\"
.SS typeahead
-The \fBcurses\fP library does \*(``line-breakout optimization\*(''
+The \fIcurses\fP library does \*(``line-breakout optimization\*(''
by looking for typeahead periodically while updating the screen.
If input is found, and it is coming from a tty,
the current update is postponed until
-\fBrefresh\fP(3X) or \fBdoupdate\fP is called again.
+\fB\%refresh\fP(3X) or \fB\%doupdate\fP is called again.
This allows faster response to commands typed in advance.
Normally, the input FILE
-pointer passed to \fBnewterm\fP, or \fBstdin\fP in the case that
-\fBinitscr\fP was used, will be used to do this typeahead checking.
-The \fBtypeahead\fP routine specifies that the file descriptor
+pointer passed to \fB\%newterm\fP, or \fBstdin\fP in the case that
+\fB\%initscr\fP was used, will be used to do this typeahead checking.
+The \fB\%typeahead\fP routine specifies that the file descriptor
\fIfd\fP is to be used to check for typeahead instead.
If \fIfd\fP is
\-1, then no typeahead checking is done.
Also,
.RS 3
.TP 5
-\fBhalfdelay\fP
+\fB\%halfdelay\fP
returns an error
if its parameter is outside the range 1..255.
.RE
0
if the flag is reset, or
.TP 5
--1
-if the curses library was not initialized.
+\-1
+if the \fIcurses\fP library was not initialized.
.PP
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
They were not supported on Version 7, BSD or System V implementations.
-It is recommended that any code depending on ncurses extensions
+It is recommended that any code depending on \fIncurses\fP extensions
be conditioned using NCURSES_VERSION.
.SH PORTABILITY
Except as noted in the section on extensions,
these functions are described in the XSI Curses standard, Issue 4.
.PP
-The ncurses library obeys the XPG4 standard and the historical practice of the
-AT&T curses implementations, in that the echo bit is cleared when curses
+The \fIncurses\fP library obeys the XPG4 standard and the historical practice of the
+AT&T \fIcurses\fP implementations, in that the echo bit is cleared when \fIcurses\fP
initializes the terminal state.
-BSD curses differed from this slightly; it
+BSD \fIcurses\fP differed from this slightly; it
left the echo bit on at initialization, but the BSD \fBraw\fP call turned it
off as a side-effect.
-For best portability, set \fBecho \fPor \fBnoecho\fP explicitly
+For best portability, set \fBecho \fPor \fB\%noecho\fP explicitly
just after initialization, even if your program remains in cooked mode.
.PP
The XSI Curses standard is ambiguous on the question of whether \fBraw\fP
should disable the CRLF translations controlled by \fBnl\fP and \fBnonl\fP.
-BSD curses did turn off these translations; AT&T curses (at least as late as
+BSD \fIcurses\fP did turn off these translations; AT&T \fIcurses\fP (at least as late as
SVr1) did not.
We chose to do so, on the theory that a programmer requesting
raw input wants a clean (ideally 8-bit clean) connection that the operating
system will not alter.
.PP
-When \fBkeypad\fP is first enabled,
-ncurses loads the key-definitions for the current terminal description.
+When \fB\%keypad\fP is first enabled,
+\fIncurses\fP loads the key-definitions for the current terminal description.
If the terminal description includes extended string capabilities,
e.g., from using the \fB\-x\fP option of \fB@TIC@\fP,
-then ncurses also defines keys for the capabilities whose names
+then \fIncurses\fP also defines keys for the capabilities whose names
begin with \*(``k\*(''.
The corresponding keycodes are generated and (depending on previous
loads of terminal descriptions) may differ from one execution of a
program to the next.
-The generated keycodes are recognized by the \fBkeyname\fP function
+The generated keycodes are recognized by the \fB\%keyname\fP function
(which will then return a name beginning with \*(``k\*('' denoting the
-terminfo capability name rather than \*(``K\*('', used for curses key-names).
-On the other hand, an application can use \fBdefine_key\fP to establish
+terminfo capability name rather than \*(``K\*('', used for \fIcurses\fP key-names).
+On the other hand, an application can use \fB\%define_key\fP to establish
a specific keycode for a given string.
This makes it possible for an application to check for an extended
-capability's presence with \fBtigetstr\fP,
+capability's presence with \fB\%tigetstr\fP,
and reassign the keycode to match its own needs.
.PP
-Low-level applications can use \fBtigetstr\fP to obtain the definition
+Low-level applications can use \fB\%tigetstr\fP to obtain the definition
of any particular string capability.
-Higher-level applications which use the curses \fBwgetch\fP
+Higher-level applications which use the \fIcurses\fP \fB\%wgetch\fP
and similar functions to return keycodes rely upon the order in which
the strings are loaded.
If more than one key definition has the same string value,
-then \fBwgetch\fP can return only one keycode.
-Most curses implementations (including ncurses)
+then \fB\%wgetch\fP can return only one keycode.
+Most \fIcurses\fP implementations (including \fIncurses\fP)
load key definitions in the order
defined by the array of string capability names.
The last key to be loaded determines the keycode which will be returned.
-In ncurses, you may also have extended capabilities interpreted as
+In \fIncurses\fP, you may also have extended capabilities interpreted as
key definitions.
These are loaded after the predefined keys,
and if a capability's value is the same as a previously-loaded
.SH NOTES
Note that
\fBecho\fP,
-\fBnoecho\fP,
-\fBhalfdelay\fP,
-\fBintrflush\fP,
+\fB\%noecho\fP,
+\fB\%halfdelay\fP,
+\fB\%intrflush\fP,
\fBmeta\fP,
\fBnl\fP,
\fBnonl\fP,
-\fBnodelay\fP,
-\fBnotimeout\fP,
-\fBnoqiflush\fP,
-\fBqiflush\fP,
-\fBtimeout\fP, and
-\fBwtimeout\fP may be macros.
+\fB\%nodelay\fP,
+\fB\%notimeout\fP,
+\fB\%noqiflush\fP,
+\fB\%qiflush\fP,
+\fB\%timeout\fP, and
+\fB\%wtimeout\fP may be macros.
.PP
-The \fBnoraw\fP and \fBnocbreak\fP calls follow historical practice in that
+The \fB\%noraw\fP and \fB\%nocbreak\fP calls follow historical practice in that
they attempt to restore to normal (\*(``cooked\*('') mode
from raw and cbreak modes respectively.
Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver
control states that are hard to predict or understand; it is not recommended.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_getch\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_util\fP(3X),
-\fBdefine_key\fP(3X),
-\fBtermios\fP(3)
+\fB\%curses\fP(3X),
+\fB\%curs_getch\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_util\fP(3X),
+\fB\%define_key\fP(3X),
+\fB\%termios\fP(3)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_legacy.3x,v 1.22 2023/09/16 23:37:03 tom Exp $
-.TH curs_legacy 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_legacy.3x,v 1.27 2023/09/23 22:11:47 tom Exp $
+.TH curs_legacy 3X 2023-09-23 "ncurses 6.4" "Library calls"
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
\fB\%getpary\fP \-
get \fIcurses\fR cursor and window coordinates or attributes (legacy)
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint getattrs(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
\fBint getbegx(const WINDOW *\fIwin\fB);\fR
-.br
\fBint getbegy(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
\fBint getcurx(const WINDOW *\fIwin\fB);\fR
-.br
\fBint getcury(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
\fBint getmaxx(const WINDOW *\fIwin\fB);\fR
-.br
\fBint getmaxy(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
\fBint getparx(const WINDOW *\fIwin\fB);\fR
-.br
\fBint getpary(const WINDOW *\fIwin\fB);\fR
+.fi
.SH DESCRIPTION
-These legacy functions are simpler to use than the X/Open Curses functions:
+These legacy functions are simpler to use than the X/Open \fIcurses\fP functions:
.bP
-The \fBgetattrs\fP function returns the same attribute data as \fBwattr_get\fP.
+The \fB\%getattrs\fP function returns the same attribute data as \fB\%wattr_get\fP.
.IP
-However, \fBgetattrs\fP returns an integer (actually a \fBchtype\fP),
-while \fBwattr_get\fP returns the current color pair in a separate parameter.
+However, \fB\%getattrs\fP returns an integer (actually a \fB\%chtype\fP),
+while \fB\%wattr_get\fP returns the current color pair in a separate parameter.
In the wide-character library configuration,
-color pairs may not fit into a \fBchtype\fP,
-so \fBwattr_get\fP is the only way to obtain the color information.
+color pairs may not fit into a \fB\%chtype\fP,
+so \fB\%wattr_get\fP is the only way to obtain the color information.
.IP
-Because \fBgetattrs\fP returns the attributes in a single parameter,
+Because \fB\%getattrs\fP returns the attributes in a single parameter,
it would not be possible for an application to distinguish that from
\fBERR\fP (a \fI-1\fP).
-If the window parameter is null, \fBgetattrs\fP returns \fBA_NORMAL\fP (zero).
+If the window parameter is null, \fB\%getattrs\fP returns \fB\%A_NORMAL\fP (zero).
.bP
-The \fBgetbegy\fP and \fBgetbegx\fP functions return the same
-data as \fBgetbegyx\fP.
+The \fB\%getbegy\fP and \fB\%getbegx\fP functions return the same
+data as \fB\%getbegyx\fP.
.bP
-The \fBgetcury\fP and \fBgetcurx\fP functions return the same
-data as \fBgetyx\fP.
+The \fB\%getcury\fP and \fB\%getcurx\fP functions return the same
+data as \fB\%getyx\fP.
.bP
-The \fBgetmaxy\fP and \fBgetmaxx\fP functions return the same
-data as \fBgetmaxyx\fP.
+The \fB\%getmaxy\fP and \fB\%getmaxx\fP functions return the same
+data as \fB\%getmaxyx\fP.
.bP
-The \fBgetpary\fP and \fBgetparx\fP functions return the same
-data as \fBgetparyx\fP.
+The \fB\%getpary\fP and \fB\%getparx\fP functions return the same
+data as \fB\%getparyx\fP.
.SH RETURN VALUE
Except as noted,
these functions return an integer,
.SH NOTES
All of these interfaces are provided as macros and functions.
The macros are suppressed (and only the functions provided)
-when \fBNCURSES_OPAQUE\fP is defined.
-The standard forms such as \fBgetyx\fP must be implemented as macros,
+when \fB\%NCURSES_OPAQUE\fP is defined.
+The standard forms such as \fB\%getyx\fP must be implemented as macros,
and (in this implementation) are defined in terms of the functions
described here,
-to avoid reliance on internal details of the WINDOW structure.
+to avoid reliance on internal details of the \fB\%WINDOW\fP structure.
.SH PORTABILITY
These functions were supported on Version 7, BSD or System V implementations.
None of those implementations checked the window parameter.
.PP
-The \fBgetattrs\fP function and macro are defined to return a (signed) integer
+The \fB\%getattrs\fP function and macro are defined to return a (signed) integer
for compatibility with those implementations
although an unsigned type would have been more appropriate.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_getyx\fP(3X),
-\fBcurs_opaque\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_getyx\fP(3X),
+\fB\%curs_opaque\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_memleaks.3x,v 1.21 2023/09/16 23:37:03 tom Exp $
-.TH curs_memleaks 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_memleaks.3x,v 1.25 2023/09/23 21:07:59 tom Exp $
+.TH curs_memleaks 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%exit_terminfo\fP \-
check for memory leaks in \fIcurses\fR
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.br
\fBvoid exit_curses(int \fIcode\fB);\fR
-.sp
+.PP
\fB#include <term.h>\fP
-.br
\fBvoid exit_terminfo(int \fIcode\fB);\fR
-.sp
+.PP
/* deprecated (intentionally not declared in curses.h or term.h) */
-.br
\fBvoid _nc_freeall(void);\fP
-.br
\fBvoid _nc_free_and_exit(int \fIcode\fB);\fR
-.br
\fBvoid _nc_free_tinfo(int \fIcode\fB);\fR
+.fi
.SH DESCRIPTION
These functions are used to simplify analysis of memory leaks in the ncurses
library.
.PP
Any implementation of curses must not free the memory associated with
-a screen, since (even after calling \fBendwin\fP(3X)), it must be available
-for use in the next call to \fBrefresh\fP(3X).
+a screen, since (even after calling \fB\%endwin\fP(3X)), it must be available
+for use in the next call to \fB\%refresh\fP(3X).
There are also chunks of memory held for performance reasons.
That makes it hard to analyze curses applications for memory leaks.
When using the specially configured debugging version of the ncurses library,
Some of the functions are named with a \*(``_nc_\*('' prefix
because they are not intended for use in the non-debugging library:
.TP 5
-\fB_nc_freeall\fP
+\fB\%_nc_freeall\fP
This frees (almost) all of the memory allocated by ncurses.
.TP 5
-\fB_nc_free_and_exit\fP
-This frees the memory allocated by ncurses (like \fB_nc_freeall\fP),
+\fB\%_nc_free_and_exit\fP
+This frees the memory allocated by ncurses (like \fB\%_nc_freeall\fP),
and exits the program.
-It is preferred over \fB_nc_freeall\fP since some of that memory
+It is preferred over \fB\%_nc_freeall\fP since some of that memory
may be required to keep the application running.
Simply exiting (with the given exit-code) is safer.
.TP 5
-\fB_nc_free_tinfo\fP
+\fB\%_nc_free_tinfo\fP
Use this function if only the low-level terminfo functions (and
corresponding library) are used.
-Like \fB_nc_free_and_exit\fP, it exits the program after freeing memory.
+Like \fB\%_nc_free_and_exit\fP, it exits the program after freeing memory.
.PP
The functions prefixed \*(``_nc\*('' are normally not available;
they must be configured into the library
-at build time using the \fB\-\-disable-leaks\fP option.
+at build time using the \fB\%\-\-disable-leaks\fP option.
That compiles-in code that frees memory that normally would not be freed.
.PP
-The \fBexit_curses\fP and \fBexit_terminfo\fP functions
-call \fB_nc_free_and_exit\fP and \fB_nc_free_tinfo\fP if
+The \fB\%exit_curses\fP and \fB\%exit_terminfo\fP functions
+call \fB\%_nc_free_and_exit\fP and \fB\%_nc_free_tinfo\fP if
the library is configured to support memory-leak checking.
If the library is not configured to support memory-leak checking,
they simply call \fBexit\fP.
In any implementation of X/Open Curses, an application can free part
of the memory allocated by curses:
.bP
-The portable part of \fBexit_curses\fP can be freed using \fBdelscreen\fP,
-passing the \fBSCREEN*\fP pointer returned by \fBnewterm\fP.
+The portable part of \fB\%exit_curses\fP can be freed using \fB\%delscreen\fP,
+passing the \fBSCREEN*\fP pointer returned by \fB\%newterm\fP.
.IP
In some implementations, there is a global variable \fBsp\fP
which could be used, e.g., if the screen were only initialized
-using \fBinitscr\fP.
+using \fB\%initscr\fP.
.bP
-The portable part of \fBexit_terminfo\fP can be freed using \fBdel_curterm\fP.
+The portable part of \fB\%exit_terminfo\fP can be freed using \fB\%del_curterm\fP.
.IP
-In this case, there is a global variable \fBcur_term\fP which can be
+In this case, there is a global variable \fB\%cur_term\fP which can be
used as parameter.
.SH SEE ALSO
-\fBcurs_initscr\fP(3X),
-\fBcurs_terminfo\fP(3X).
-\fBcurses\fP(3X).
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_terminfo\fP(3X),
+\fB\%curses\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_mouse.3x,v 1.71 2023/09/16 23:37:03 tom Exp $
-.TH curs_mouse 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_mouse.3x,v 1.78 2023/09/23 23:08:40 tom Exp $
+.TH curs_mouse 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%mouseinterval\fP \-
get mouse events in \fIcurses\fR
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
.PP
\fBtypedef unsigned long mmask_t;\fP
.PP
-.nf
\fBtypedef struct {\fP
\fB short id; \fI/* ID to distinguish multiple devices */\fR
\fB int x, y, z; \fI/* event coordinates */\fR
\fB mmask_t bstate; \fI/* button state bits */\fR
\fB} MEVENT;\fP
-.fi
.PP
\fBbool has_mouse(void);\fP
-.sp
+.PP
\fBint getmouse(MEVENT *\fIevent\fB);\fR
-.br
\fBint ungetmouse(MEVENT *\fIevent\fB);\fR
-.sp
+.PP
\fBmmask_t mousemask(mmask_t \fInewmask\fB, mmask_t *\fIoldmask\fB);\fR
-.sp
+.PP
\fBbool wenclose(const WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.sp
+.PP
\fBbool mouse_trafo(int* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
-.br
\fBbool wmouse_trafo(const WINDOW* \fIwin\fB,\fR
\fBint* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
-.sp
+.PP
\fBint mouseinterval(int \fIerval\fB);\fR
-.br
+.fi
.SH DESCRIPTION
These functions provide an interface to mouse events from
-\fBncurses\fP(3X).
-Mouse events are represented by \fBKEY_MOUSE\fP
-pseudo-key values in the \fBwgetch\fP(3X) input stream.
+\fB\%ncurses\fP(3X).
+Mouse events are represented by \fB\%KEY_MOUSE\fP
+pseudo-key values in the \fB\%wgetch\fP(3X) input stream.
.SS mousemask
-To make mouse events visible, use the \fBmousemask\fP function.
+To make mouse events visible, use the \fB\%mousemask\fP function.
This sets the mouse events to be reported.
By default, no mouse events are reported.
.bP
or if the terminal does not support mouse-events,
this function returns 0.
.bP
-If \fIoldmask\fP is non-NULL,
+If \fIoldmask\fP is non-\fBNULL\fP,
this function fills the indicated location with the previous value of the
current screen's mouse event mask.
.PP
Here are the mouse event type masks which may be defined:
.PP
.TS
-l l
-_ _
-l l.
-\fBName\fP \fBDescription\fP
+lB lB
+lB l .
+Name Description
+_
BUTTON1_PRESSED mouse button 1 down
BUTTON1_RELEASED mouse button 1 up
BUTTON1_CLICKED mouse button 1 clicked
.TE
.SS getmouse
Once a class of mouse events has been made visible in a window,
-calling the \fBwgetch\fP function on that window may return
-\fBKEY_MOUSE\fP as an indicator that a mouse event has been queued.
+calling the \fB\%wgetch\fP function on that window may return
+\fB\%KEY_MOUSE\fP as an indicator that a mouse event has been queued.
To read the event data and pop the event off the queue, call
-\fBgetmouse\fP.
+\fB\%getmouse\fP.
This function will return \fBOK\fP if a mouse event
is actually visible in the given window, \fBERR\fP otherwise.
-When \fBgetmouse\fP returns \fBOK\fP, the data deposited as y and
+When \fB\%getmouse\fP returns \fBOK\fP, the data deposited as y and
x in the event structure coordinates will be screen-relative character-cell
coordinates.
The returned state mask will have exactly one bit set to
indicate the event type.
The corresponding data in the queue is marked invalid.
-A subsequent call to \fBgetmouse\fP will retrieve the next older
+A subsequent call to \fB\%getmouse\fP will retrieve the next older
item from the queue.
.SS ungetmouse
-The \fBungetmouse\fP function behaves analogously to \fBungetch\fP.
+The \fB\%ungetmouse\fP function behaves analogously to \fB\%ungetch\fP.
It pushes
-a \fBKEY_MOUSE\fP event onto the input queue, and associates with that event
+a \fB\%KEY_MOUSE\fP event onto the input queue, and associates with that event
the given state data and screen-relative character-cell coordinates.
.SS wenclose
-The \fBwenclose\fP function tests whether a given pair of screen-relative
+The \fB\%wenclose\fP function tests whether a given pair of screen-relative
character-cell coordinates is enclosed by a given window, returning \fBTRUE\fP
if it is and \fBFALSE\fP otherwise.
It is useful for determining what subset of
the screen windows enclose the location of a mouse event.
.SS wmouse_trafo
-The \fBwmouse_trafo\fP function transforms a given pair of coordinates
+The \fB\%wmouse_trafo\fP function transforms a given pair of coordinates
from stdscr-relative coordinates
to coordinates relative to the given window or vice versa.
The resulting stdscr-relative coordinates are not always identical
to window-relative coordinates due to the mechanism to reserve lines on top
or bottom of the screen for other purposes
-(see the \fBripoffline\fP and \fBslk_init\fP(3X) calls, for example).
+(see the \fB\%ripoffline\fP and \fB\%slk_init\fP(3X) calls, for example).
.bP
If the parameter \fIto_screen\fP is \fBTRUE\fP, the pointers
\fIpY, pX\fP must reference the coordinates of a location
through the pointers.
If the conversion was successful, the function returns \fBTRUE\fP.
.bP
-If one of the parameters was NULL or the location is
+If one of the parameters was \fBNULL\fP or the location is
not inside the window, \fBFALSE\fP is returned.
.bP
If \fIto_screen\fP is
window \fIwin\fP encloses this point.
In this case the function returns \fBTRUE\fP.
.bP
-If one of the parameters is NULL or the point is not inside the
+If one of the parameters is \fBNULL\fP or the point is not inside the
window, \fBFALSE\fP is returned.
The referenced coordinates
are only replaced by the converted coordinates if the transformation was
successful.
.SS mouse_trafo
-The \fBmouse_trafo\fP function performs the same translation
-as \fBwmouse_trafo\fP,
+The \fB\%mouse_trafo\fP function performs the same translation
+as \fB\%wmouse_trafo\fP,
using stdscr for \fIwin\fP.
.SS mouseinterval
-The \fBmouseinterval\fP function sets the maximum time (in thousands of a
+The \fB\%mouseinterval\fP function sets the maximum time (in thousands of a
second) that can elapse between press and release events for them to
be recognized as a click.
-Use \fBmouseinterval(0)\fP to disable click resolution.
+Use \fB\%mouseinterval(0)\fP to disable click resolution.
This function returns the previous interval value.
-Use \fBmouseinterval(\-1)\fP to obtain the interval without altering it.
+Use \fB\%mouseinterval(\-1)\fP to obtain the interval without altering it.
The default is one sixth of a second.
.SS has_mouse
-The \fBhas_mouse\fP function returns \fBTRUE\fP if the mouse driver has been
+The \fB\%has_mouse\fP function returns \fBTRUE\fP if the mouse driver has been
successfully initialized.
.PP
Note that mouse events will be ignored when input is in cooked mode, and will
cause an error beep when cooked mode is being simulated in a window by a
-function such as \fBgetstr\fP that expects a linefeed for input-loop
+function such as \fB\%getstr\fP that expects a linefeed for input-loop
termination.
.SH RETURN VALUE
-\fBgetmouse\fP and \fBungetmouse\fP
+\fB\%getmouse\fP and \fB\%ungetmouse\fP
return the integer \fBERR\fP upon failure or \fBOK\fP
upon successful completion:
.RS 3
.TP 5
-\fBgetmouse\fP
+\fB\%getmouse\fP
returns an error.
.bP
If no mouse driver was initialized, or
.bP
It also returns an error if no more events remain in the queue.
.TP 5
-\fBungetmouse\fP
+\fB\%ungetmouse\fP
returns an error if the FIFO is full.
.RE
.PP
-\fBmousemask\fP
+\fB\%mousemask\fP
returns the mask of reportable events.
.PP
-\fBmouseinterval\fP
+\fB\%mouseinterval\fP
returns the previous interval value, unless
the terminal was not initialized.
In that case, it returns the maximum interval value (166).
.PP
-\fBwenclose\fP and \fBwmouse_trafo\fP
+\fB\%wenclose\fP and \fB\%wmouse_trafo\fP
are boolean functions returning \fBTRUE\fP or \fBFALSE\fP depending
on their test result.
.SH PORTABILITY
-These calls were designed for \fBncurses\fP(3X), and are not found in SVr4
-curses, 4.4BSD curses, or any other previous version of curses.
+These calls were designed for \fIncurses\fP, and are not found in SVr4
+\fIcurses\fP, 4.4BSD \fIcurses\fP, or any other previous version of \fIcurses\fP.
.PP
-SVr4 curses had support for the mouse in a variant of \fBxterm\fP(1).
+SVr4 \fIcurses\fP had support for the mouse in a variant of \fBxterm\fP(1).
It is mentioned in a few places, but with no supporting documentation:
.bP
the \*(``libcurses\*('' manual page lists functions for this feature
req_mouse_pos reqmp RQ Request mouse position report
.NE
.bP
-the interface made assumptions (as does ncurses) about the escape sequences
+the interface made assumptions (as does \fIncurses\fP) about the escape sequences
sent to and received from the terminal.
.IP
For instance
-the SVr4 curses library used the \fBget_mouse\fP capability to tell the
+the SVr4 \fIcurses\fP library used the \fB\%get_mouse\fP capability to tell the
terminal which mouse button events it should send,
passing the mouse-button bit-mask to the terminal.
Also, it could ask the terminal
-where the mouse was using the \fBreq_mouse_pos\fP capability.
+where the mouse was using the \fB\%req_mouse_pos\fP capability.
.IP
-Those features required a terminal which had been modified to work with curses.
+Those features required a terminal which had been modified to work with \fIcurses\fP.
They were not part of the X Consortium's xterm.
.PP
-When developing the xterm mouse support for ncurses in September 1995,
+When developing the xterm mouse support for \fIncurses\fP in September 1995,
Eric Raymond was uninterested in using the same interface due to its
lack of documentation.
Later, in 1998, Mark Hesseling provided support in
making it unnecessary to be concerned about compatibility with the
escape sequences.
.PP
-The feature macro \fBNCURSES_MOUSE_VERSION\fP is provided so the preprocessor
+The feature macro \fB\%NCURSES_MOUSE_VERSION\fP is provided so the preprocessor
can be used to test whether these features are present.
-If the interface is changed, the value of \fBNCURSES_MOUSE_VERSION\fP will be
+If the interface is changed, the value of \fB\%NCURSES_MOUSE_VERSION\fP will be
incremented.
-These values for \fBNCURSES_MOUSE_VERSION\fP may be
-specified when configuring ncurses:
+These values for \fB\%NCURSES_MOUSE_VERSION\fP may be
+specified when configuring \fIncurses\fP:
.RS 3
.TP 3
1
The mask uses 29 bits.
.RE
.PP
-The order of the \fBMEVENT\fP structure members is not guaranteed.
+The order of the \fB\%MEVENT\fP structure members is not guaranteed.
Additional fields may be added to the structure in the future.
.PP
-Under \fBncurses\fP(3X), these calls are implemented using either
+Under \fIncurses\fP, these calls are implemented using either
xterm's built-in mouse-tracking API or
platform-specific drivers including
.RS 3
.PP
If you are using an unsupported configuration,
mouse events will not be visible to
-\fBncurses\fP(3X) (and the \fBmousemask\fP function will always
+\fIncurses\fP (and the \fB\%mousemask\fP function will always
return \fB0\fP).
.PP
If the terminfo entry contains a \fBXM\fP string,
for use with touch screens (which may be pressure-sensitive) or with
3D-mice/trackballs/power gloves.
.PP
-The \fBALL_MOUSE_EVENTS\fP class does not include \fBREPORT_MOUSE_POSITION\fP.
+The \fB\%ALL_MOUSE_EVENTS\fP class does not include \fB\%REPORT_MOUSE_POSITION\fP.
They are distinct.
For example, in xterm,
wheel/scrolling mice send position reports as a sequence of
presses of buttons 4 or 5 without matching button-releases.
.SH BUGS
Mouse events under xterm will not in fact be ignored during cooked mode,
-if they have been enabled by \fBmousemask\fP.
+if they have been enabled by \fB\%mousemask\fP.
Instead, the xterm mouse
report sequence will appear in the string read.
.PP
Mouse events under xterm will not be detected correctly in a window with
its keypad bit off, since they are interpreted as a variety of function key.
-Your terminfo description should have \fBkmous\fP set to \*(``\\E[M\*(''
+Your terminfo description should have \fB\%kmous\fP set to \*(``\\E[M\*(''
(the beginning of the response from xterm for mouse clicks).
-Other values for \fBkmous\fP are permitted,
+Other values for \fB\%kmous\fP are permitted,
but under the same assumption,
i.e., it is the beginning of the response.
.PP
Because there are no standard terminal responses that would serve to identify
-terminals which support the xterm mouse protocol, \fBncurses\fP assumes that
-if \fBkmous\fP is defined in the terminal description,
+terminals which support the xterm mouse protocol, \fIncurses\fP assumes that
+if \fB\%kmous\fP is defined in the terminal description,
or if the terminal description's primary name or aliases
contain the string \*(``xterm\*('',
then the terminal may send mouse events.
-The \fBkmous\fP capability is checked first,
+The \fB\%kmous\fP capability is checked first,
allowing the use of newer xterm mouse protocols
such as xterm's private mode 1006.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_inopts\fP(3X),
-\fBcurs_kernel\fP(3X),
-\fBcurs_slk\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_inopts\fP(3X),
+\fB\%curs_kernel\fP(3X),
+\fB\%curs_slk\fP(3X),
+\fB\%curs_variables\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_opaque.3x,v 1.27 2023/09/16 23:37:03 tom Exp $
-.TH curs_opaque 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_opaque.3x,v 1.33 2023/09/23 22:59:48 tom Exp $
+.TH curs_opaque 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%wgetscrreg\fP \-
obtain \fIcurses\fR window properties
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBbool is_cleared(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_idcok(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_idlok(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_immedok(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_keypad(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_leaveok(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_nodelay(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_notimeout(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_pad(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_scrollok(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_subwin(const WINDOW *\fIwin\fB);\fR
-.br
\fBbool is_syncok(const WINDOW *\fIwin\fB);\fR
-.br
\fBWINDOW * wgetparent(const WINDOW *\fIwin\fB);\fR
-.br
\fBint wgetdelay(const WINDOW *\fIwin\fB);\fR
-.br
\fBint wgetscrreg(const WINDOW *\fIwin\fB, int *\fItop\fB, int *\fIbottom\fB);\fR
+.fi
.SH DESCRIPTION
This implementation provides functions which return properties
-set in the WINDOW structure, allowing it to be \*(``opaque\*('' if
-the symbol \fBNCURSES_OPAQUE\fP is defined:
+set in the \fB\%WINDOW\fP structure, allowing it to be \*(``opaque\*('' if
+the symbol \fB\%NCURSES_OPAQUE\fP is defined:
.TP 5
\fBis_cleared\fP
-returns the value set in \fBclearok\fP(3X)
+returns the value set in \fB\%clearok\fP(3X)
.TP 5
\fBis_idcok\fP
-returns the value set in \fBidcok\fP(3X)
+returns the value set in \fB\%idcok\fP(3X)
.TP 5
\fBis_idlok\fP
-returns the value set in \fBidlok\fP(3X)
+returns the value set in \fB\%idlok\fP(3X)
.TP 5
\fBis_immedok\fP
-returns the value set in \fBimmedok\fP(3X)
+returns the value set in \fB\%immedok\fP(3X)
.TP 5
\fBis_keypad\fP
-returns the value set in \fBkeypad\fP(3X)
+returns the value set in \fB\%keypad\fP(3X)
.TP 5
\fBis_leaveok\fP
-returns the value set in \fBleaveok\fP(3X)
+returns the value set in \fB\%leaveok\fP(3X)
.TP 5
\fBis_nodelay\fP
-returns the value set in \fBnodelay\fP(3X)
+returns the value set in \fB\%nodelay\fP(3X)
.TP 5
\fBis_notimeout\fP
-returns the value set in \fBnotimeout\fP(3X)
+returns the value set in \fB\%notimeout\fP(3X)
.TP 5
\fBis_pad\fP
returns \fBTRUE\fP if the window is a pad
-i.e., created by \fBnewpad\fP(3X)
+i.e., created by \fB\%newpad\fP(3X)
.TP 5
\fBis_scrollok\fP
-returns the value set in \fBscrollok\fP(3X)
+returns the value set in \fB\%scrollok\fP(3X)
.TP 5
\fBis_subwin\fP
returns \fBTRUE\fP if the window is a subwindow,
-i.e., created by \fBsubwin\fP(3X) or \fBderwin\fP(3X)
+i.e., created by \fB\%subwin\fP(3X) or \fB\%derwin\fP(3X)
.TP 5
\fBis_syncok\fP
-returns the value set in \fBsyncok\fP(3X)
+returns the value set in \fB\%syncok\fP(3X)
.TP 5
\fBwgetdelay\fP
-returns the delay timeout as set in \fBwtimeout\fP(3X).
+returns the delay timeout as set in \fB\%wtimeout\fP(3X).
.TP 5
\fBwgetparent\fP
-returns the parent WINDOW pointer for subwindows,
-or NULL for windows having no parent.
+returns the parent \fB\%WINDOW\fP pointer for subwindows,
+or \fBNULL\fP for windows having no parent.
.TP 5
\fBwgetscrreg\fP
returns the top and bottom rows for the scrolling margin
-as set in \fBwsetscrreg\fP.
+as set in \fB\%wsetscrreg\fP(3X).
.SH RETURN VALUE
These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted.
.SH NOTES
Both a macro and a function are provided for each name.
.SH PORTABILITY
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
They were not supported on Version 7, BSD or System V implementations.
-It is recommended that any code depending on ncurses extensions
-be conditioned using NCURSES_VERSION.
+It is recommended that any code depending on \fIncurses\fP extensions
+be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_inopts\fP(3X),
-\fBcurs_outopts\fP(3X),
-\fBcurs_window\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_inopts\fP(3X),
+\fB\%curs_outopts\fP(3X),
+\fB\%curs_window\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_pad.3x,v 1.38 2023/09/16 23:37:03 tom Exp $
-.TH curs_pad 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_pad.3x,v 1.43 2023/09/23 22:49:51 tom Exp $
+.TH curs_pad 3X 2023-09-23 "ncurses 6.4" "Library calls"
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
\fB\%pecho_wchar\fP \-
create and display \fIcurses\fR pads
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBWINDOW *newpad(int \fInlines\fB, int \fIncols\fB);\fR
-.br
\fBWINDOW *subpad(WINDOW *\fIorig\fB, int \fInlines\fB, int \fIncols\fB,\fR
\fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR
-.br
\fBint prefresh(WINDOW *\fIpad\fB, int \fIpminrow\fB, int \fIpmincol\fB,\fR
\fBint \fIsminrow\fB, int \fIsmincol\fB, int \fIsmaxrow\fB, int \fIsmaxcol\fB);\fR
-.br
\fBint pnoutrefresh(WINDOW *\fIpad\fB, int \fIpminrow\fB, int \fIpmincol\fB,\fR
\fBint \fIsminrow\fB, int \fIsmincol\fB, int \fIsmaxrow\fB, int \fIsmaxcol\fB);\fR
-.br
\fBint pechochar(WINDOW *\fIpad\fB, chtype \fIch\fB);\fR
-.br
\fBint pecho_wchar(WINDOW *\fIpad\fB, const cchar_t *\fIwch\fB);\fR
+.fi
.SH DESCRIPTION
.SS newpad
-The \fBnewpad\fP routine creates and returns a pointer to a new pad data
+The \fB\%newpad\fP routine creates and returns a pointer to a new pad data
structure with the given number of lines, \fInlines\fP, and columns,
\fIncols\fP.
A pad is like a window, except that it is not restricted by the
(e.g., from scrolling or echoing of input) do not occur.
.PP
It is not
-legal to call \fBwrefresh\fP with a \fIpad\fP as an argument; the routines
-\fBprefresh\fP or \fBpnoutrefresh\fP should be called instead.
+legal to call \fB\%wrefresh\fP with a \fIpad\fP as an argument; the routines
+\fB\%prefresh\fP or \fB\%pnoutrefresh\fP should be called instead.
Note that these
routines require additional parameters to specify the part of the pad to be
displayed and the location on the screen to be used for the display.
.SS subpad
-The \fBsubpad\fP routine creates and returns a pointer to a subwindow within a
+The \fB\%subpad\fP routine creates and returns a pointer to a subwindow within a
pad with the given number of lines, \fInlines\fP, and columns, \fIncols\fP.
-Unlike \fBsubwin\fP, which uses screen coordinates, the window is at position
+Unlike \fB\%subwin\fP, which uses screen coordinates, the window is at position
(\fIbegin\fR_\fIx\fB,\fR \fIbegin\fR_\fIy\fR) on the pad.
The window is
made in the middle of the window \fIorig\fP, so that changes made to one window
affect both windows.
During the use of this routine, it will often be
-necessary to call \fBtouchwin\fP or \fBtouchline\fP on \fIorig\fP before
-calling \fBprefresh\fP.
+necessary to call \fB\%touchwin\fP or \fB\%touchline\fP on \fIorig\fP before
+calling \fB\%prefresh\fP.
.SS prefresh, pnoutrefresh
-The \fBprefresh\fP and \fBpnoutrefresh\fP routines are analogous to
-\fBwrefresh\fP and \fBwnoutrefresh\fP except that they relate to pads instead
+The \fB\%prefresh\fP and \fB\%pnoutrefresh\fP routines are analogous to
+\fB\%wrefresh\fP and \fB\%wnoutrefresh\fP except that they relate to pads instead
of windows.
The additional parameters are needed to indicate what part of the
pad and screen are involved.
\fIpminrow\fP, \fIpmincol\fP, \fIsminrow\fP, or \fIsmincol\fP are treated as if
they were zero.
.SS pechochar
-The \fBpechochar\fP routine is functionally equivalent to a call to \fBaddch\fP
-followed by a call to \fBrefresh\fP(3X),
-a call to \fBwaddch\fP followed by a call
-to \fBwrefresh\fP, or a call to \fBwaddch\fP followed by a call to
-\fBprefresh\fP.
+The \fB\%pechochar\fP routine is functionally equivalent to a call to \fB\%addch\fP
+followed by a call to \fB\%refresh\fP(3X),
+a call to \fB\%waddch\fP followed by a call
+to \fB\%wrefresh\fP, or a call to \fB\%waddch\fP followed by a call to
+\fB\%prefresh\fP.
The knowledge that only a single character is being output is
taken into consideration and, for non-control characters, a considerable
performance gain might be seen by using these routines instead of their
equivalents.
-In the case of \fBpechochar\fP, the last location of the pad on
-the screen is reused for the arguments to \fBprefresh\fP.
+In the case of \fB\%pechochar\fP, the last location of the pad on
+the screen is reused for the arguments to \fB\%prefresh\fP.
.SS pecho_wchar
-The \fBpecho_wchar\fP function is the analogous wide-character
-form of \fBpechochar\fP.
+The \fB\%pecho_wchar\fP function is the analogous wide-character
+form of \fB\%pechochar\fP.
It outputs one character to a pad and immediately refreshes the pad.
-It does this by a call to \fBwadd_wch\fP followed by a call to \fBprefresh\fP.
+It does this by a call to \fB\%wadd_wch\fP followed by a call to \fB\%prefresh\fP.
.SH RETURN VALUE
Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP
(SVr4 only specifies "an integer value other than \fBERR\fP") upon successful
completion.
.PP
-Routines that return pointers return \fBNULL\fP on error, and set \fBerrno\fP
-to \fBENOMEM\fP.
+Routines that return pointers return \fBNULL\fP on error, and set \fB\%errno\fP
+to \fB\%ENOMEM\fP.
.PP
X/Open does not define any error conditions.
In this implementation
.RS 3
.TP 5
-\fBprefresh\fP and \fBpnoutrefresh\fP
+\fB\%prefresh\fP and \fB\%pnoutrefresh\fP
return an error
if the window pointer is null, or
if the window is not really a pad or
\fBpechochar\fP
returns an error
if the window is not really a pad, and the associated call
-to \fBwechochar\fP returns an error.
+to \fB\%wechochar\fP returns an error.
.TP 5
\fBpecho_wchar\fP
returns an error
if the window is not really a pad, and the associated call
-to \fBwecho_wchar\fP returns an error.
+to \fB\%wecho_wchar\fP returns an error.
.RE
.SH NOTES
-Note that \fBpechochar\fP may be a macro.
+Note that \fB\%pechochar\fP may be a macro.
.SH PORTABILITY
-BSD curses has no \fIpad\fP feature.
+BSD \fIcurses\fP has no \fIpad\fP feature.
.PP
-SVr2 curses (1986) provided the \fBnewpad\fP and related functions,
+SVr2 \fIcurses\fP (1986) provided the \fB\%newpad\fP and related functions,
documenting them in a single line each.
SVr3 (1987) provided more extensive documentation.
.PP
The XSI Curses standard, Issue 4 describes these functions,
without significant change from the SVr3 documentation.
It describes no error conditions.
-The behavior of \fBsubpad\fP if the parent window is not
+The behavior of \fB\%subpad\fP if the parent window is not
a pad is undocumented,
and is not checked by the vendor Unix implementations:
.bP
-SVr4 curses sets a flag in the \fBWINDOW\fP structure in \fBnewpad\fP
+SVr4 \fIcurses\fP sets a flag in the \fB\%WINDOW\fP structure in \fB\%newpad\fP
which tells if the window is a \fIpad\fP.
.IP
However, it uses this information only in
-\fBwaddch\fP (to decide if it should call \fBwrefresh\fP) and
-\fBwscrl\fP (to avoid scrolling a pad),
-and does not check in \fBwrefresh\fP to ensure that the pad
+\fB\%waddch\fP (to decide if it should call \fB\%wrefresh\fP) and
+\fB\%wscrl\fP (to avoid scrolling a pad),
+and does not check in \fB\%wrefresh\fP to ensure that the pad
is refreshed properly.
.bP
-Solaris X/Open Curses checks if a window is a pad in \fBwnoutrefresh\fP,
+Solaris X/Open Curses checks if a window is a pad in \fB\%wnoutrefresh\fP,
returning \fBERR\fP in that case.
.IP
However, it only sets the flag for subwindows if the parent window is a pad.
-Its \fBnewpad\fP function does not set this information.
+Its \fB\%newpad\fP function does not set this information.
Consequently, the check will never fail.
.IP
-It makes no comparable check in \fBpnoutrefresh\fP,
+It makes no comparable check in \fB\%pnoutrefresh\fP,
though interestingly enough, a comment in the source code
states that the lack of a check was an MKS extension.
.bP
-NetBSD 7 curses
-sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP,
-using this to help with the distinction between \fBwnoutrefresh\fP
-and \fBpnoutrefresh\fP.
+NetBSD 7 \fIcurses\fP
+sets a flag in the \fB\%WINDOW\fP structure for \fB\%newpad\fP and \fB\%subpad\fP,
+using this to help with the distinction between \fB\%wnoutrefresh\fP
+and \fB\%pnoutrefresh\fP.
.IP
It does not check for the case where a subwindow is created in
-a pad using \fBsubwin\fP or \fBderwin\fP.
+a pad using \fB\%subwin\fP or \fB\%derwin\fP.
.IP
-The \fBdupwin\fP function returns a regular window when duplicating a pad.
-Likewise, \fBgetwin\fP always returns a window, even if the saved
+The \fB\%dupwin\fP function returns a regular window when duplicating a pad.
+Likewise, \fB\%getwin\fP always returns a window, even if the saved
data was from a pad.
.PP
This implementation
.bP
-sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP,
+sets a flag in the \fB\%WINDOW\fP structure for \fB\%newpad\fP and \fB\%subpad\fP,
.bP
-allows a \fBsubwin\fP or \fBderwin\fP call to succeed having a pad parent by
+allows a \fB\%subwin\fP or \fB\%derwin\fP call to succeed having a pad parent by
forcing the subwindow to be a pad,
.bP
-checks in both \fBwnoutrefresh\fP and \fBpnoutrefresh\fP to ensure
+checks in both \fB\%wnoutrefresh\fP and \fB\%pnoutrefresh\fP to ensure
that pads and windows are handled distinctly, and
.bP
-ensures that \fBdupwin\fP and \fBgetwin\fP treat
+ensures that \fB\%dupwin\fP and \fB\%getwin\fP treat
pads versus windows consistently.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_touch\fP(3X),
-\fBcurs_addch\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_touch\fP(3X),
+\fB\%curs_addch\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_print.3x,v 1.25 2023/09/16 23:37:03 tom Exp $
-.TH curs_print 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_print.3x,v 1.31 2023/09/23 23:04:49 tom Exp $
+.TH curs_print 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%mcprint\fP \-
write binary data to printer using \fIterminfo\fR capabilities
.SH SYNOPSIS
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint mcprint(char *\fIdata\fB, int \fIlen\fB);\fR
.SH DESCRIPTION
This function uses the \fBmc5p\fP or \fBmc4\fP and \fBmc5\fP capabilities,
if they are present, to ship given data to a printer attached to the terminal.
.PP
-Note that the \fBmcprint\fP code has no way to do flow control with the printer
+Note that the \fB\%mcprint\fP code has no way to do flow control with the printer
or to know how much buffering it has.
Your application is responsible for
keeping the rate of writes to the printer below its continuous throughput rate
rule of thumb is to sleep for a second after shipping each 80-character line.
.
.SH RETURN VALUE
-The \fBmcprint\fP function returns \fBERR\fP if the write operation aborted
+The \fB\%mcprint\fP function returns \fBERR\fP if the write operation aborted
for some reason.
-In this case, \fBerrno\fP will contain either an error associated
+In this case, \fB\%errno\fP will contain either an error associated
with \fBwrite\fP(2) or one of the following:
.TP 5
-ENODEV
+\fBENODEV\fP
Capabilities for printer redirection do not exist.
.TP 5
-ENOMEM
+\fBENOMEM\fP
Couldn't allocate sufficient memory to buffer the printer write.
.PP
-When \fBmcprint\fP succeeds, it returns the number of characters actually
+When \fB\%mcprint\fP succeeds, it returns the number of characters actually
sent to the printer.
.SH PORTABILITY
-The \fBmcprint\fP call was designed for \fBncurses\fP(3X), and is not found
-in SVr4 curses, 4.4BSD curses, or any other previous version of curses.
+The \fB\%mcprint\fP call was designed for \fIncurses\fP, and is not found
+in SVr4 \fIcurses\fP, 4.4BSD \fIcurses\fP, or any other previous version of \fIcurses\fP.
+It is recommended that any code depending on \fIncurses\fP extensions
+be conditioned using \fB\%NCURSES_VERSION\fP.
.SH BUGS
Padding in the \fBmc5p\fP, \fBmc4\fP and \fBmc5\fP capabilities will not be
interpreted.
.SH SEE ALSO
-\fBcurses\fP(3X)
+\fB\%curses\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_slk.3x,v 1.53 2023/09/16 23:37:03 tom Exp $
-.TH curs_slk 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_slk.3x,v 1.60 2023/09/23 22:49:51 tom Exp $
+.TH curs_slk 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%extended_slk_color\fP \-
\fIcurses\fR soft label key routines
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint slk_init(int \fIfmt\fB);\fR
-.sp
+.PP
\fBint slk_set(int \fIlabnum\fB, const char *\fIlabel\fB, int \fIfmt\fB);\fR
-.br
\fBint slk_wset(int \fIlabnum\fB, const wchar_t *\fIlabel\fB, int \fIfmt\fB);\fR
-.sp
+.PP
\fBchar *slk_label(int \fIlabnum\fB);\fR
-.sp
+.PP
\fBint slk_refresh(void);\fP
-.br
\fBint slk_noutrefresh(void);\fP
-.br
\fBint slk_clear(void);\fP
-.br
\fBint slk_restore(void);\fP
-.br
\fBint slk_touch(void);\fP
-.sp
+.PP
\fBint slk_attron(const chtype \fIattrs\fB);\fR
-.br
\fBint slk_attroff(const chtype \fIattrs\fB);\fR
-.br
\fBint slk_attrset(const chtype \fIattrs\fB);\fR
-.br
\fBint slk_attr_on(attr_t \fIattrs\fB, void* \fIopts\fB);\fR
-.br
\fBint slk_attr_off(const attr_t \fIattrs\fB, void * \fIopts\fB);\fR
-.br
\fBint slk_attr_set(const attr_t \fIattrs\fB, short \fIpair\fB, void* \fIopts\fB);\fR
-.br
-/* extension */
-.br
+\fI/* extension */\fP
\fBattr_t slk_attr(void);\fP
-.sp
+.PP
\fBint slk_color(short \fIpair\fB);\fR
-.br
-/* extension */
-.br
+\fI/* extension */\fP
\fBint extended_slk_color(int \fIpair\fB);\fR
+.fi
.SH DESCRIPTION
-The slk* functions manipulate the set of soft function-key labels that exist on
+The \fBslk\fP* functions manipulate the set of soft function-key labels that exist on
many terminals.
For those terminals that do not have soft labels,
-\fBcurses\fP takes over the bottom line of \fBstdscr\fP, reducing the size of
-\fBstdscr\fP and the variable \fBLINES\fP.
-\fBcurses\fP standardizes on eight
+\fIcurses\fP takes over the bottom line of \fB\%stdscr\fP, reducing the size of
+\fB\%stdscr\fP and the variable \fBLINES\fP.
+\fIcurses\fP standardizes on eight
labels of up to eight characters each.
-In addition to this, the ncurses
+In addition to this, the \fIncurses\fP
implementation supports a mode where it simulates 12 labels of up to five
characters each.
This is useful for PC-like enduser devices.
-ncurses simulates this mode by taking over up to two lines at
+\fIncurses\fP simulates this mode by taking over up to two lines at
the bottom of the screen;
it does not try to use any hardware support for this
mode.
.SS Initialization
-The \fBslk_init\fP routine must be called before \fBinitscr\fP or \fBnewterm\fP
+The \fB\%slk_init\fP routine must be called before \fB\%initscr\fP or \fB\%newterm\fP
is called.
-If \fBinitscr\fP eventually uses a line from \fBstdscr\fP to
+If \fB\%initscr\fP eventually uses a line from \fB\%stdscr\fP to
emulate the soft labels,
then \fIfmt\fP determines how the labels are arranged on the screen:
.RS 3
identify the key numbers easily.
.RE
.SS Labels
-The \fBslk_set\fP routine
-(and the \fBslk_wset\fP routine for the wide-character library)
+The \fB\%slk_set\fP routine
+(and the \fB\%slk_wset\fP routine for the wide-character library)
has three parameters:
.RS 3
.TP 5
.I labnum
is the label number, from \fB1\fP to \fB8\fP
-(12 if \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP);
+(12 if \fIfmt\fP in \fB\%slk_init\fP is \fB2\fP or \fB3\fP);
.TP
.I label
is be the string to put on the label,
up to eight
-(five if \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP)
+(five if \fIfmt\fP in \fB\%slk_init\fP is \fB2\fP or \fB3\fP)
characters in length.
A null string or a null pointer sets up a blank label.
.TP
label.
.RE
.PP
-The \fBslk_label\fP routine returns the current label for label number
+The \fB\%slk_label\fP routine returns the current label for label number
\fIlabnum\fP, with leading and trailing blanks stripped.
.SS Screen updates
-The \fBslk_refresh\fP and \fBslk_noutrefresh\fP routines correspond to
-the \fBwrefresh\fP and \fBwnoutrefresh\fP routines.
+The \fB\%slk_refresh\fP and \fB\%slk_noutrefresh\fP routines correspond to
+the \fB\%wrefresh\fP and \fB\%wnoutrefresh\fP routines.
.PP
-The \fBslk_clear\fP routine clears the soft labels from the screen.
+The \fB\%slk_clear\fP routine clears the soft labels from the screen.
.PP
-The \fBslk_restore\fP routine restores the soft labels to the screen
-after a \fBslk_clear\fP has been performed.
+The \fB\%slk_restore\fP routine restores the soft labels to the screen
+after a \fB\%slk_clear\fP has been performed.
.PP
-The \fBslk_touch\fP routine forces all the soft labels to be output
-the next time a \fBslk_noutrefresh\fP is performed.
+The \fB\%slk_touch\fP routine forces all the soft labels to be output
+the next time a \fB\%slk_noutrefresh\fP is performed.
.SS Video attributes
The
-\fBslk_attron\fP, \fBslk_attrset\fP, \fBslk_attroff\fP and \fBslk_attr\fP
+\fB\%slk_attron\fP, \fB\%slk_attrset\fP, \fB\%slk_attroff\fP and \fB\%slk_attr\fP
routines correspond to
-\fBattron\fP, \fBattrset\fP, \fBattroff\fP and \fBattr_get\fP, respectively.
+\fB\%attron\fP, \fB\%attrset\fP, \fB\%attroff\fP and \fB\%attr_get\fP, respectively.
They have an effect only if soft labels are simulated on the bottom line of
the screen.
The default highlight for soft keys is A_STANDOUT (as in
-System V curses, which does not document this fact).
+System V \fIcurses\fP, which does not document this fact).
.SS Colors
-The \fBslk_color\fP routine corresponds to \fBcolor_set\fP.
+The \fB\%slk_color\fP routine corresponds to \fB\%color_set\fP.
It has an effect only
if soft labels are simulated on the bottom line of the screen.
.PP
-Because \fBslk_color\fP accepts only \fBshort\fP (signed 16-bit integer) values,
+Because \fB\%slk_color\fP accepts only \fBshort\fP (signed 16-bit integer) values,
this implementation provides
-\fBextended_slk_color\fP which accepts an integer value, e.g., 32-bits.
+\fB\%extended_slk_color\fP which accepts an integer value, e.g., 32-bits.
.
.SH RETURN VALUE
These routines return \fBERR\fP upon failure
\fBslk_attr_set\fP
returns an error
if the terminal or the softkeys were not initialized, or
-the color pair is outside the range 0..COLOR_PAIRS\-1.
+the color pair is outside the range 0..\fBCOLOR_PAIRS\fP\-1.
.TP 5
\fBslk_color\fP
returns an error
if the terminal or the softkeys were not initialized, or
-the color pair is outside the range 0..COLOR_PAIRS\-1.
+the color pair is outside the range 0..\fBCOLOR_PAIRS\fP\-1.
.TP 5
\fBslk_init\fP
returns an error
.RE
.SH HISTORY
SVr3 introduced these functions:
- slk_clear
- slk_init
- slk_label
- slk_noutrefresh
- slk_refresh
- slk_restore
- slk_set
- slk_touch
+ \fBslk_clear\fP
+ \fBslk_init\fP
+ \fBslk_label\fP
+ \fBslk_noutrefresh\fP
+ \fBslk_refresh\fP
+ \fBslk_restore\fP
+ \fBslk_set\fP
+ \fBslk_touch\fP
.PP
SVr4 added these functions:
- slk_attroff
- slk_attron
- slk_attrset
- slk_start
+ \fBslk_attroff\fP
+ \fBslk_attron\fP
+ \fBslk_attrset\fP
+ \fBslk_start\fP
.PP
-X/Open Curses added these:
- slk_attr_off
- slk_attr_on
- slk_attr_set
- slk_color
- slk_wset
+X/Open \fIcurses\fP added these:
+ \fBslk_attr_off\fP
+ \fBslk_attr_on\fP
+ \fBslk_attr_set\fP
+ \fBslk_color\fP
+ \fBslk_wset\fP
.SH EXTENSIONS
-X/Open Curses documents the \fIopts\fP argument as reserved for future use,
+X/Open \fIcurses\fP documents the \fIopts\fP argument as reserved for future use,
saying that it must be null.
This implementation
uses that parameter in ABI 6 for the functions which have a color-pair
parameter to support extended color pairs.
.PP
-For functions which modify the color, e.g., \fBslk_attr_set\fP,
+For functions which modify the color, e.g., \fB\%slk_attr_set\fP,
if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
and used to set the color pair instead of the \fBshort\fP pair parameter.
.SH NOTES
-Most applications would use \fBslk_noutrefresh\fP because a
-\fBwrefresh\fP is likely to follow soon.
+Most applications would use \fB\%slk_noutrefresh\fP because a
+\fB\%wrefresh\fP is likely to follow soon.
.SH PORTABILITY
-The XSI Curses standard, Issue 4, described the soft-key functions,
-with some differences from SVr4 curses:
+The XSI \fIcurses\fP standard, Issue 4, described the soft-key functions,
+with some differences from SVr4 \fIcurses\fP:
.bP
It added functions like the SVr4
-attribute-manipulation functions \fBslk_attron\fP,
-\fBslk_attroff\fP, \fBslk_attrset\fP,
-but which use \fBattr_t\fP parameters (rather than \fBchtype\fP),
+attribute-manipulation functions \fB\%slk_attron\fP,
+\fB\%slk_attroff\fP, \fB\%slk_attrset\fP,
+but which use \fBattr_t\fP parameters (rather than \fB\%chtype\fP),
along with a reserved \fIopts\fP parameter.
.IP
Two of these new functions (unlike the SVr4 functions) have no provision
-for color: \fBslk_attr_on\fP and \fBslk_attr_off\fP.
+for color: \fB\%slk_attr_on\fP and \fB\%slk_attr_off\fP.
.IP
-The third function (\fBslk_attr_set\fP) has a color-pair parameter.
+The third function (\fB\%slk_attr_set\fP) has a color-pair parameter.
.bP
It added \fBconst\fP qualifiers to parameters (unnecessarily), and
.bP
-It added \fBslk_color\fP.
+It added \fB\%slk_color\fP.
.PP
-Although \fBslk_start\fP is declared in the curses header file,
+Although \fB\%slk_start\fP is declared in the \fIcurses\fP header file,
it was not documented by SVr4 other than its presence in a list
of libtermlib.so.1 symbols.
Reading the source code (i.e., Illumos):
.bP
-\fBslk_start\fP has two parameters:
+\fB\%slk_start\fP has two parameters:
.RS
.bP
\fIng\fP (number of groups) and
.bP
Soft-key groups are an array of \fIng\fP integers.
.bP
-In SVr4, \fBslk_init\fP calls \fBslk_start\fP passing a null for \fIgp\fP.
-For this case, \fBslk_start\fP uses the number of groups \fIng\fP
-(3 for the 3-2-3 layout, 2 for the 4-4 layout) which \fBslk_init\fP provided.
+In SVr4, \fB\%slk_init\fP calls \fB\%slk_start\fP passing a null for \fIgp\fP.
+For this case, \fB\%slk_start\fP uses the number of groups \fIng\fP
+(3 for the 3-2-3 layout, 2 for the 4-4 layout) which \fB\%slk_init\fP provided.
.IP
If \fIng\fP is neither 2 or 3,
-\fBslk_start\fP checks the terminfo \fIfln\fP (label_format) capability,
+\fB\%slk_start\fP checks the terminfo \fBfln\fP (label_format) capability,
interpreting that as a comma-separated list of numbers,
e.g., \*(``3,2,3\*('' for the 3-2-3 layout.
.IP
-Finally, if there is no \fIfln\fP capability, \fBslk_start\fP returns ERR.
+Finally, if there is no \fBfln\fP capability, \fB\%slk_start\fP returns \fBERR\fP.
.bP
-If \fBslk_start\fP is given a non-null \fIgp\fP,
+If \fB\%slk_start\fP is given a non-null \fIgp\fP,
it copies the \fIng\fP elements of the group of soft-keys, up to 16.
.IP
-If there are more than 16 elements, \fBslk_start\fP returns an error.
+If there are more than 16 elements, \fB\%slk_start\fP returns an error.
.bP
-The format codes \fB2\fP and \fB3\fP for \fBslk_init\fP
-were added by ncurses in 1996.
+The format codes \fB2\fP and \fB3\fP for \fB\%slk_init\fP
+were added by \fIncurses\fP in 1996.
PDCurses 2.4 added this feature in 2001.
.PP
-The function \fBslk_attr\fP was added by ncurses in 1996.
+The function \fB\%slk_attr\fP was added by \fIncurses\fP in 1996.
.PP
-X/Open Curses does not specify a limit for the number of colors and
+X/Open \fIcurses\fP does not specify a limit for the number of colors and
color pairs which a terminal can support.
However, in its use of \fBshort\fP for the parameters,
it carries over SVr4's implementation detail for the compiled
which use \fBint\fP parameters,
allowing applications to use larger color- and pair-numbers.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_attr\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_attr\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_variables\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_terminfo.3x,v 1.99 2023/09/16 23:37:03 tom Exp $
-.TH curs_terminfo 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_terminfo.3x,v 1.108 2023/09/23 23:38:10 tom Exp $
+.TH curs_terminfo 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
.nf
\fB#include <curses.h>\fP
\fB#include <term.h>\fP
-.sp
+.PP
\fBTERMINAL *cur_term;\fP
-.sp
+.PP
\fBconst char * const boolnames[];\fP
\fBconst char * const boolcodes[];\fP
\fBconst char * const boolfnames[];\fP
\fBconst char * const strnames[];\fP
\fBconst char * const strcodes[];\fP
\fBconst char * const strfnames[];\fP
-.sp
+.PP
\fBint setupterm(const char *\fIterm\fB, int \fIfiledes\fB, int *\fIerrret\fB);\fR
-.br
\fBTERMINAL *set_curterm(TERMINAL *\fInterm\fB);\fR
-.br
\fBint del_curterm(TERMINAL *\fIoterm\fB);\fR
-.br
\fBint restartterm(const char *\fIterm\fB, int \fIfiledes\fB, int *\fIerrret\fB);\fR
-.sp
+.PP
\fBchar *tparm(const char *\fIstr\fB, ...);\fR
-.br
\fIor\fP
-.br
\fBchar *tparm(const char *\fIstr\fB, long \fIp1 ... \fBlong \fIp9\fB);\fR
-.sp
+.PP
\fBint tputs(const char *\fIstr\fB, int \fIaffcnt\fB, int (*\fIputc\fB)(int));\fR
-.br
\fBint putp(const char *\fIstr\fB);\fR
-.sp
+.PP
\fBint vidputs(chtype \fIattrs\fB, int (*\fIputc\fB)(int));\fR
-.br
\fBint vidattr(chtype \fIattrs\fB);\fR
-.br
\fBint vid_puts(attr_t \fIattrs\fB, short \fIpair\fB, void *\fIopts\fB, int (*\fIputc\fB)(int));\fR
-.br
\fBint vid_attr(attr_t \fIattrs\fB, short \fIpair\fB, void *\fIopts\fB);\fR
-.sp
+.PP
\fBint mvcur(int \fIoldrow\fB, int \fIoldcol\fB, int \fInewrow\fR, int \fInewcol\fB);\fR
-.sp
+.PP
\fBint tigetflag(const char *\fIcapname\fB);\fR
-.br
\fBint tigetnum(const char *\fIcapname\fB);\fR
-.br
\fBchar *tigetstr(const char *\fIcapname\fB);\fR
-.sp
+.PP
\fBchar *tiparm(const char *\fIstr\fB, ...);\fR
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
\fBchar *tiparm_s(int \fIexpected\fB, int \fImask\fB, const char *\fIstr\fB, ...);\fR
-.br
\fBint tiscan_s(int *\fIexpected\fB, int *\fImask\fB, const char *\fIstr\fB);\fR
-.br
.fi
.SH DESCRIPTION
These low-level routines must be called by programs that have to deal
-directly with the \fBterminfo\fP database to handle certain terminal
+directly with the \fIterminfo\fP database to handle certain terminal
capabilities, such as programming function keys.
For all other
-functionality, \fBcurses\fP routines are more suitable and their use is
+functionality, \fIcurses\fP routines are more suitable and their use is
recommended.
.PP
None of these functions use (or are aware of) multibyte character strings
.RS
.TP 5
.B 1
-means that the terminal is hardcopy, cannot be used for curses applications.
+means that the terminal is hardcopy, cannot be used for \fIcurses\fP applications.
.IP
-\fBsetupterm\fP determines if the entry is a hardcopy type by
+\fB\%setupterm\fP determines if the entry is a hardcopy type by
checking the \fBhc\fP (\fBhardcopy\fP) capability.
.TP 5
.B 0
means that the terminal could not be found,
or that it is a generic type,
-having too little information for curses applications to run.
+having too little information for \fIcurses\fP applications to run.
.IP
-\fBsetupterm\fP determines if the entry is a generic type by
-checking the \fBgn\fP (\fBgeneric_type\fP) capability.
+\fB\%setupterm\fP determines if the entry is a generic type by
+checking the \fBgn\fP (\fB\%generic_type\fP) capability.
.TP 5
.B \-1
-means that the \fBterminfo\fP database could not be found.
+means that the \fIterminfo\fP database could not be found.
.RE
.IP
If \fIerrret\fP is
-null, \fBsetupterm\fP prints an error message upon finding an error
+null, \fB\%setupterm\fP prints an error message upon finding an error
and exits.
Thus, the simplest call is:
-.sp
- \fBsetupterm((char *)0, 1, (int *)0);\fP,
-.sp
+.IP
+\fBsetupterm((char *)0, 1, (int *)0);\fP,
+.PP
which uses all the defaults and sends the output to \fBstdout\fP.
.RE
.\" ***************************************************************************
.PP
While \fBputp\fP and \fBmvcur\fP are low-level functions which
do not use the high-level curses state,
-they are declared in \fB<curses.h>\fP because SystemV did this
+they are declared in \fB\%<curses.h>\fP because System\ V did this
(see \fIHISTORY\fP).
.\" ***************************************************************************
.SS Terminal Capability Functions
.SS Terminal Capability Names
These null-terminated arrays contain
.bP
-the short terminfo names (\*(``codes\*(''),
+the short \fIterminfo\fP names (\*(``codes\*(''),
.bP
-the \fBtermcap\fP names (\*(``names\*(''), and
+the \fItermcap\fP names (\*(``names\*(''), and
.bP
-the long terminfo names (\*(``fnames\*('')
+the long \fIterminfo\fP names (\*(``fnames\*('')
+.PP
+for each of the predefined \fIterminfo\fP variables:
.PP
-for each of the predefined \fBterminfo\fP variables:
-.sp
.RS
+.nf
\fBconst char *boolnames[]\fP, \fB*boolcodes[]\fP, \fB*boolfnames[]\fP
-.br
\fBconst char *numnames[]\fP, \fB*numcodes[]\fP, \fB*numfnames[]\fP
-.br
\fBconst char *strnames[]\fP, \fB*strcodes[]\fP, \fB*strfnames[]\fP
+.fi
.RE
.\" ***************************************************************************
.SS Releasing Memory
description.
As a side-effect, it sets \fBcur_term\fP to point to this memory.
If an application calls
-.sp
- \fBdel_curterm(cur_term);\fP
-.sp
+.IP
+\fBdel_curterm(cur_term);\fP
+.PP
the memory will be freed.
.PP
The formatting functions \fBtparm\fP and \fBtiparm\fP extend the storage
but except for \fBsetterm\fP, are likewise macros.
The one function, \fBsetterm\fP, is mentioned in the manual page.
The manual page notes that the \fBsetterm\fP routine
-was replaced by \fBsetupterm\fP, stating that the call:
-.sp
- \fBsetupterm(\fIterm\fB, 1, (int *)0)\fR
-.sp
+was replaced by \fB\%setupterm\fP, stating that the call
+.IP
+\fBsetupterm(\fIterm\fB, 1, (int *)0)\fR
+.PP
provides the same functionality as \fBsetterm(\fIterm\fB)\fR,
and is not recommended for new programs.
This implementation provides each of those symbols
.\" ***************************************************************************
.SH HISTORY
SVr2 introduced the terminfo feature.
-Its programming manual mentioned these low-level functions:
+Its programming manual mentioned the following low-level functions.
.PP
.TS
-l l.
-\fBFunction\fP \fBDescription\fP
+lB lB
+lB lx.
+Function Description
_
fixterm restore tty to \*(``in curses\*('' state
gettmode establish current tty modes
.TE
.PP
The programming manual also mentioned
-functions provided for termcap compatibility
-(commenting that they \*(``may go away at a later date\*(''):
+functions provided for \fItermcap\fP compatibility
+(commenting that they \*(``may go away at a later date\*('').
.PP
.TS
-l l
-_ _
-l l.
-\fBFunction\fP \fBDescription\fP
-tgetent look up termcap entry for given \fIname\fP
+lB lB
+lB lx.
+Function Description
+_
+tgetent look up \fItermcap\fP entry for given \fIname\fP
tgetflag get boolean entry for given \fIid\fP
tgetnum get numeric entry for given \fIid\fP
tgetstr get string entry for given \fIid\fP
.PP
SVr3 extended terminfo by adding functions to retrieve capability values
(like the termcap interface),
-and reusing tgoto and tputs:
+and reusing \fBtgoto\fP and \fBtputs\fP:
.PP
.TS
-l l
-_ _
-l l.
-\fBFunction\fP \fBDescription\fP
+lB lB
+lB lx.
+Function Description
+_
tigetflag get boolean entry for given \fIid\fP
tigetnum get numeric entry for given \fIid\fP
tigetstr get string entry for given \fIid\fP
.TE
.PP
-SVr3 also replaced several of the SVr2 terminfo functions
-which had no counterpart in the termcap interface,
-documenting them as obsolete:
+SVr3 also replaced several of the SVr2 \fIterminfo\fP functions
+which had no counterpart in the \fItermcap\fP interface,
+documenting them as obsolete.
+.PP
.TS
-l l
-_ _
-l l.
-\fBFunction\fP \fBReplaced by\fP
+lB lB
+l lx.
+Function Replaced by
+_
crmode cbreak
fixterm reset_prog_mode
-gettmode N/A
+gettmode \fIn/a\fP
nocrmode nocbreak
resetterm reset_shell_mode
saveterm def_prog_mode
.PP
SVr4 added the \fBvid_attr\fP and \fBvid_puts\fP functions.
.PP
-There are other low-level functions declared in the curses header files
+There are other low-level functions declared in the \fIcurses\fP header files
on Unix systems,
but none were documented.
The functions marked \*(``obsolete\*('' remained in use
.IP
As an extension, this implementation can be configured to change the
function prototypes to use the \fBconst\fP keyword.
-The ncurses ABI 6 enables this feature by default.
+The \fIncurses\fP ABI 6 enables this feature by default.
.bP
X/Open Curses prototypes \fBtparm\fP with a fixed number of parameters,
rather than a variable argument list.
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_touch.3x,v 1.34 2023/09/16 23:37:03 tom Exp $
-.TH curs_touch 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_touch.3x,v 1.39 2023/09/23 22:49:51 tom Exp $
+.TH curs_touch 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%touchwin\fP,
\fB\%touchline\fP,
\fB\%is_wintouched\fP \-
control terminal output refresh in a \fIcurses\fR window
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint touchline(WINDOW *\fIwin\fB, int \fIstart\fB, int \fIcount\fB);\fR
-.sp
+.PP
\fBint touchwin(WINDOW *\fIwin\fB);\fR
-.br
\fBint wtouchln(WINDOW *\fIwin\fB, int \fIy\fB, int \fIn\fB, int \fIchanged\fB);\fR
-.sp
+.PP
\fBint untouchwin(WINDOW *\fIwin\fB);\fR
-.sp
+.PP
\fBbool is_linetouched(WINDOW *\fIwin\fB, int \fIline\fB);\fR
-.br
\fBbool is_wintouched(WINDOW *\fIwin\fB);\fR
+.fi
.SH DESCRIPTION
-The \fBtouchwin\fP and \fBtouchline\fP routines throw away all
+The \fB\%touchwin\fP and \fB\%touchline\fP routines throw away all
optimization information about which parts of the window have been
touched, by pretending that the entire window has been drawn on.
This
to one window affects the other window, but the records of which lines
have been changed in the other window do not reflect the change.
The
-routine \fBtouchline\fP only pretends that \fIcount\fP lines have been
+routine \fB\%touchline\fP only pretends that \fIcount\fP lines have been
changed, beginning with line \fIstart\fP.
.PP
-The \fBuntouchwin\fP routine marks all lines in the window as unchanged since
-the last call to \fBwrefresh\fP.
+The \fB\%untouchwin\fP routine marks all lines in the window as unchanged since
+the last call to \fB\%wrefresh\fP.
.PP
-The \fBwtouchln\fP routine makes \fIn\fP lines in the window, starting
+The \fB\%wtouchln\fP routine makes \fIn\fP lines in the window, starting
at line \fIy\fR, look as if they have (\fIchanged\fB=1\fR) or have
not (\fIchanged\fB=0\fR) been changed since the last call to
-\fBwrefresh\fP.
+\fB\%wrefresh\fP.
.PP
-The \fBis_linetouched\fP and \fBis_wintouched\fP routines return
+The \fB\%is_linetouched\fP and \fB\%is_wintouched\fP routines return
\fBTRUE\fP if the specified line/window was modified since the last
-call to \fBwrefresh\fP; otherwise they return \fBFALSE\fP. In
-addition, \fBis_linetouched\fP returns \fBERR\fP if \fIline\fP is not
+call to \fB\%wrefresh\fP; otherwise they return \fBFALSE\fP. In
+addition, \fB\%is_linetouched\fP returns \fBERR\fP if \fIline\fP is not
valid for the given window.
.SH RETURN VALUE
All routines return the integer \fBERR\fP upon failure and an integer value
may not be supported by the compiler.
.IP
To provide error-checking and also match the X/Open function prototype,
-the \fBERR\fP is provided by a macro named \fBis_linetouched\fP.
+the \fBERR\fP is provided by a macro named \fB\%is_linetouched\fP.
The actual function returns \fBFALSE\fP when it detects an error.
.TP 5
\fBwtouchln\fP
.RE
.SH PORTABILITY
These functions were introduced by SVr4.
-The Solaris curses header file,
+The Solaris \fIcurses\fP header file,
for instance, defines both an actual function and macro for each.
The macros give the same result as the actual functions.
-SVr4 curses does not check the window parameter \fIwin\fP to ensure
+SVr4 \fIcurses\fP does not check the window parameter \fIwin\fP to ensure
that it is not \fBNULL\fP;
otherwise this implementation behaves the same as SVr4.
.PP
The XSI Curses standard, Issue 4 describes these functions,
but defines no error conditions.
.SH NOTES
-All of these routines except \fBwtouchln\fP may be macros.
+All of these routines except \fB\%wtouchln\fP may be macros.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_variables\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_trace.3x,v 1.35 2023/09/16 23:37:03 tom Exp $
-.TH curs_trace 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_trace.3x,v 1.37 2023/09/23 20:53:33 tom Exp $
+.TH curs_trace 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%_tracemouse\fP \-
\fIcurses\fR debugging routines
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBunsigned curses_trace(const unsigned \fIparam\fB);\fR
-.sp
+.PP
\fBvoid _tracef(const char *\fIformat\fB, ...);\fR
-.sp
+.PP
\fBchar *_traceattr(attr_t \fIattr\fB);\fR
-.br
\fBchar *_traceattr2(int \fIbuffer\fB, chtype \fIch\fB);\fR
-.br
\fBchar *_tracecchar_t(const cchar_t *\fIstring\fB);\fR
-.br
\fBchar *_tracecchar_t2(int \fIbuffer\fB, const cchar_t *\fIstring\fB);\fR
-.br
\fBchar *_tracechar(int \fIch\fB);\fR
-.br
\fBchar *_tracechtype(chtype \fIch\fB);\fR
-.br
\fBchar *_tracechtype2(int \fIbuffer\fB, chtype \fIch\fB);\fR
-.sp
+.PP
\fBvoid _tracedump(const char *\fIlabel\fB, WINDOW *\fIwin\fB);\fR
-.br
\fBchar *_nc_tracebits(void);\fP
-.br
\fBchar *_tracemouse(const MEVENT *\fIevent\fB);\fR
-.sp
+.PP
/* deprecated */
-.br
\fBvoid trace(const unsigned int \fIparam\fB);\fR
+.fi
.SH DESCRIPTION
The \fIcurses trace\fP routines are used for debugging the ncurses libraries,
as well as applications which use the ncurses libraries.
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_util.3x,v 1.77 2023/09/16 23:37:03 tom Exp $
-.TH curs_util 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_util.3x,v 1.83 2023/09/23 23:14:19 tom Exp $
+.TH curs_util 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%wunctrl\fP \-
miscellaneous \fIcurses\fR utility routines
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBconst char *unctrl(chtype \fIc\fB);\fR
-.br
\fBwchar_t *wunctrl(cchar_t *\fIc\fB);\fR
-.sp
+.PP
\fBconst char *keyname(int \fIc\fB);\fR
-.br
\fBconst char *key_name(wchar_t \fIw\fB);\fR
-.sp
+.PP
\fBvoid filter(void);\fP
-.sp
+.PP
\fBvoid use_env(bool \fIf\fB);\fR
-.sp
+.PP
\fBint putwin(WINDOW *\fIwin\fB, FILE *\fIfilep\fB);\fR
-.br
\fBWINDOW *getwin(FILE *\fIfilep\fB);\fR
-.sp
+.PP
\fBint delay_output(int \fIms\fB);\fR
-.br
\fBint flushinp(void);\fP
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
\fBvoid nofilter(void);\fP
-.br
\fBvoid use_tioctl(bool \fIf\fB);\fR
+.fi
.SH DESCRIPTION
.SS unctrl
The \fBunctrl\fP routine returns a character string which is a printable
should be called before \fBinitscr\fP or
\fBnewterm\fP are called
(because those compute the screen size).
-It modifies the way \fBncurses\fP treats environment variables
+It modifies the way \fIncurses\fP treats environment variables
when determining the screen size.
.bP
-Normally \fBncurses\fP looks first at the terminal database for the screen size.
+Normally \fIncurses\fP looks first at the terminal database for the screen size.
.IP
If \fBuse_env\fP was called with \fBFALSE\fP for parameter,
it stops here unless
\fBncurses\fP re-fetches the value of the environment variables so that
it is still the environment variables which set the screen size.
.PP
-The \fBuse_env\fP and \fBuse_tioctl\fP routines combine as
-summarized here:
-.PP
+The \fB\%use_env\fP and \fB\%use_tioctl\fP routines combine as follows.
+.IP
.TS
-center tab(/);
-l l l
-_ _ _
-lw7 lw7 lw40.
-\fBuse_env\fP/\fBuse_tioctl\fP/\fBSummary\fP
-TRUE/FALSE/T{
+lB lB lB
+lB lB lx.
+use_env use_tioctl Summary
+_
+TRUE FALSE T{
This is the default behavior.
-\fBncurses\fP uses operating system calls
-unless overridden by $LINES or $COLUMNS environment variables.
-T}
-TRUE/TRUE/T{
-\fBncurses\fP updates $LINES and $COLUMNS based on operating system calls.
+\fIncurses\fP uses operating system calls
+unless overridden by \fBLINES\fP or \fB\%COLUMNS\fP environment
+variables;
+default.
T}
-FALSE/TRUE/T{
-\fBncurses\fP ignores $LINES and $COLUMNS,
-uses operating system calls to obtain size.
+TRUE TRUE T{
+\fIncurses\fP updates \fBLINES\fP and \fB\%COLUMNS\fP based on operating
+system calls.
T}
-FALSE/FALSE/T{
-\fBncurses\fP relies on the terminal database to determine size.
+FALSE TRUE T{
+\fIncurses\fP ignores \fBLINES\fP and \fB\%COLUMNS\fP,
+using operating system calls to obtain size.
T}
.TE
.SS putwin/getwin
The \fBnofilter\fP and \fBuse_tioctl\fP routines are specific to \fBncurses\fP.
They were not supported on Version 7, BSD or System V implementations.
It is recommended that any code depending on \fBncurses\fP extensions
-be conditioned using NCURSES_VERSION.
+be conditioned using \fBNCURSES_VERSION\fP.
.SS putwin/getwin file-format
The \fBputwin\fP and \fBgetwin\fP functions have several issues with
portability:
.\"
.\" Author: Thomas E. Dickey 1997
.\"
-.\" $Id: define_key.3x,v 1.27 2023/09/16 23:37:03 tom Exp $
-.TH define_key 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: define_key.3x,v 1.34 2023/09/23 23:04:14 tom Exp $
+.TH define_key 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%define_key\fP \-
define a \fIcurses\fR keycode
.SH SYNOPSIS
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint define_key(const char *\fIdefinition\fB, int \fIkeycode\fB);\fR
.SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
It permits an application to define keycodes with their corresponding control
-strings, so that the ncurses library will interpret them just as it would
+strings, so that the \fIncurses\fP library will interpret them just as it would
the predefined codes in the terminfo database.
.PP
-If the given string is null, any existing definition for the keycode is
-removed.
+If \fIdefinition\fP is \fBNULL\fP,
+any existing one for the keycode is removed.
Similarly, if the given keycode is negative or zero, any existing string
for the given definition is removed.
.SH RETURN VALUE
-The keycode must be greater than zero, and the string non-null,
+Either \fIkeycode\fP must be greater than zero,
+or \fIdefinition\fP must be non-\fBNULL\fP,
otherwise \fBERR\fP is returned.
\fBERR\fP may also be returned if there is insufficient memory to allocate the
data to store the definition.
If no error is detected, \fBOK\fP is returned.
.SH PORTABILITY
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
They were not supported on
Version 7, BSD or System V implementations.
It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
-\fBkeyok\fP(3X),
-\fBkey_defined\fP(3X).
+\fB\%keyok\fP(3X),
+\fB\%key_defined\fP(3X)
.SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
.\"
.\" Author: Thomas E. Dickey 2003
.\"
-.\" $Id: key_defined.3x,v 1.20 2023/09/16 23:38:39 tom Exp $
-.TH key_defined 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: key_defined.3x,v 1.26 2023/09/23 22:49:51 tom Exp $
+.TH key_defined 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%key_defined\fP \-
test whether a \fIcurses\fR keycode is defined
.SH SYNOPSIS
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint key_defined(const char *\fIdefinition\fB);\fR
.SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
It permits an application to determine if a string is currently bound
to any keycode.
.SH RETURN VALUE
If the string conflicts with longer strings
which are bound to keys, \-1 is returned.
.SH PORTABILITY
-This routine is specific to ncurses.
+This routine is specific to \fIncurses\fP.
It was not supported on
Version 7, BSD or System V implementations.
It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
-\fBdefine_key\fP(3X).
+\fB\%define_key\fP(3X)
.SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
.\"
.\" Author: Thomas E. Dickey 1999
.\"
-.\" $Id: keybound.3x,v 1.21 2023/09/16 23:38:39 tom Exp $
-.TH keybound 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: keybound.3x,v 1.27 2023/09/23 22:49:51 tom Exp $
+.TH keybound 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%keybound\fP \-
get definition of \fIcurses\fR keycode
.SH SYNOPSIS
\fB#include <curses.h>\fP
-.sp
+.PP
\fBchar * keybound(int \fIkeycode\fB, int \fIcount);\fR
.SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
It permits an application to determine the string which is defined
in the terminfo for specific keycodes.
.SH RETURN VALUE
-The \fIkeycode\fP parameter must be greater than zero, else NULL is returned.
-If it does not correspond to a defined key, then NULL is returned.
+The \fIkeycode\fP parameter must be greater than zero, else \fBNULL\fP is returned.
+If it does not correspond to a defined key, then \fBNULL\fP is returned.
The \fIcount\fP parameter is used to allow the application to iterate
through multiple definitions, counting from zero.
When successful,
the function returns a string which must be freed by the caller.
.SH PORTABILITY
-This routine is specific to ncurses.
+This routine is specific to \fIncurses\fP.
It was not supported on
Version 7, BSD or System V implementations.
It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
-\fBdefine_key\fP(3X),
-\fBkeyok\fP(3X).
+\fB\%define_key\fP(3X),
+\fB\%keyok\fP(3X)
.SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
.\"
.\" Author: Thomas E. Dickey 1997
.\"
-.\" $Id: keyok.3x,v 1.26 2023/09/16 23:38:39 tom Exp $
-.TH keyok 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: keyok.3x,v 1.32 2023/09/23 22:49:51 tom Exp $
+.TH keyok 3X 2023-09-23 "ncurses 6.4" "Library calls"
.SH NAME
\fB\%keyok\fP \-
enable or disable a \fIcurses\fR keycode
.SH SYNOPSIS
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint keyok(int \fIkeycode\fB, bool \fIenable\fB);\fR
.SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
It permits an application to disable specific keycodes, rather than
-use the \fBkeypad\fP function to disable all keycodes.
+use the \fB\%keypad\fP function to disable all keycodes.
Keys that have been disabled can be re-enabled.
.SH RETURN VALUE
The keycode must be greater than zero, else \fBERR\fP is returned.
and vice versa.
Otherwise, the function returns \fBOK\fP.
.SH PORTABILITY
-This routine is specific to ncurses.
+This routine is specific to \fIncurses\fP.
It was not supported on
Version 7, BSD or System V implementations.
It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
-\fBdefine_key\fP(3X).
+\fB\%define_key\fP(3X)
.SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
-# $Id: manhtml.aliases,v 1.24 2023/07/29 16:47:09 tom Exp $
+# $Id: manhtml.aliases,v 1.25 2023/09/23 23:00:59 tom Exp $
#***************************************************************************
# Copyright 2019-2022,2023 Thomas E. Dickey *
# Copyright 2013,2017 Free Software Foundation, Inc. *
wgetch(3X) curs_getch(3X)
wnoutrefresh(3X) curs_refresh(3X)
wrefresh(3X) curs_refresh(3X)
+wsetscrreg(3X) curs_outopts(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: ncurses.3x,v 1.171 2023/09/16 23:38:39 tom Exp $
-.TH ncurses 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: ncurses.3x,v 1.174 2023/09/23 22:58:27 tom Exp $
+.TH ncurses 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
overlay/\fBcurs_overlay\fP(3X)
overwrite/\fBcurs_overlay\fP(3X)
pair_content/\fBcurs_color\fP(3X)
-pecho_wchar/\fBcurs_pad\fP(3X)*
+pecho_wchar/\fBcurs_pad\fP(3X)
pechochar/\fBcurs_pad\fP(3X)
pnoutrefresh/\fBcurs_pad\fP(3X)
prefresh/\fBcurs_pad\fP(3X)
slk_restore/\fBcurs_slk\fP(3X)
slk_set/\fBcurs_slk\fP(3X)
slk_touch/\fBcurs_slk\fP(3X)
-slk_wset/\fBcurs_slk\fP(3X)*
+slk_wset/\fBcurs_slk\fP(3X)
standend/\fBcurs_attr\fP(3X)
standout/\fBcurs_attr\fP(3X)
start_color/\fBcurs_color\fP(3X)
tigetnum/\fBcurs_terminfo\fP(3X)
tigetstr/\fBcurs_terminfo\fP(3X)
timeout/\fBcurs_inopts\fP(3X)
-tiparm/\fBcurs_terminfo\fP(3X)*
+tiparm/\fBcurs_terminfo\fP(3X)
tiparm_s/\fBcurs_terminfo\fP(3X)*
tiscan_s/\fBcurs_terminfo\fP(3X)*
touchline/\fBcurs_touch\fP(3X)
.\"
.\" Author: Thomas E. Dickey
.\"
-.\" $Id: new_pair.3x,v 1.30 2023/09/16 23:38:39 tom Exp $
-.TH new_pair 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: new_pair.3x,v 1.36 2023/09/23 22:37:46 tom Exp $
+.TH new_pair 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fB\%free_pair\fP \-
dynamically allocate \fIcurses\fR color pairs
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBint alloc_pair(int \fIfg\fB, int \fIbg\fB);\fR
-.br
\fBint find_pair(int \fIfg\fB, int \fIbg\fB);\fR
-.br
\fBint free_pair(int \fIpair\fB);\fR
+.fi
.SH DESCRIPTION
-These functions are an extension to the curses library.
+These functions are an extension to the \fIcurses\fP library.
They permit an application to dynamically allocate a color pair using
the foreground/background colors rather than assign a fixed color pair number,
and return an unused pair to the pool.
of a given character cell without rewriting it.
That is, the foreground and background colors are applied as a pair.
.bP
-Color pairs are the curses library's way of managing a color palette
+Color pairs are the \fIcurses\fP library's way of managing a color palette
on a terminal.
If the library does not keep track of the \fIcombinations\fP of
colors which are displayed, it will be inefficient.
The size of the table is determined by the terminfo \fBpairs\fP capability.
The table is shared with \fBinit_pair\fP;
in fact \fBalloc_pair\fP calls \fBinit_pair\fP after
-updating the ncurses library's fast index to the colors versus color pairs.
+updating the \fIncurses\fP library's fast index to the colors versus color pairs.
.SS find_pair
The \fBfind_pair\fP function accepts parameters for
foreground and background color, and
Likewise, \fBfree_pair\fP returns \fBOK\fP unless it encounters an
error updating the fast index or if no such color pair is in use.
.SH PORTABILITY
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
They were not supported on
Version 7, BSD or System V implementations.
It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
-\fBcurs_color\fP(3X).
+\fBcurs_color\fP(3X)
.SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: panel.3x,v 1.50 2023/09/16 23:38:39 tom Exp $
-.TH panel 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: panel.3x,v 1.52 2023/09/23 23:37:26 tom Exp $
+.TH panel 3X 2023-09-23 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
was a public domain implementation by Warren Tucker
published in \fIu386mon\fP 2.20 (1990).
.IP
-According to Tucker, the SystemV panel library
+According to Tucker, the System\ V panel library
was first released in SVr3.2 (1988),
and his implementation helped with a port to SVr3.1 (1987).
.IP
.\"
.\" Author: Thomas E. Dickey 1996-on
.\"
-.\" $Id: resizeterm.3x,v 1.40 2023/09/16 23:38:39 tom Exp $
-.TH resizeterm 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: resizeterm.3x,v 1.45 2023/09/23 22:49:53 tom Exp $
+.TH resizeterm 3X 2023-09-23 "ncurses 6.4" "Library calls"
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
\fB\%resizeterm\fP \-
manage the terminal dimensions understood by \fIcurses\fR
.SH SYNOPSIS
+.nf
\fB#include <curses.h>\fP
-.sp
+.PP
\fBbool is_term_resized(int \fIlines\fB, int \fIcolumns\fB);\fR
-.br
\fBint resize_term(int \fIlines\fB, int \fIcolumns\fB);\fR
-.br
\fBint resizeterm(int \fIlines\fB, int \fIcolumns\fB);\fR
+.fi
.SH DESCRIPTION
-This is an extension to the curses library.
-It provides callers with a hook into the \fBncurses\fP data to resize windows,
+This is an extension to the \fIcurses\fP library.
+It provides callers with a hook into the \fIncurses\fP data to resize windows,
primarily for use by programs running in an X Window terminal (e.g., xterm)
when the terminal's screen size is changed by the user:
.bP
-Curses windows cannot extend outside the screen.
-If the terminal is shrunk, curses windows must be shrunk to fit.
+\fIcurses\fP windows cannot extend outside the screen.
+If the terminal is shrunk, \fIcurses\fP windows must be shrunk to fit.
.bP
If the terminal is stretched,
rows and/or columns can be added to existing windows.
The added cells should match the current attributes of the windows.
.PP
-If the calling program has not set up a handler for \fBSIGWINCH\fP
-when it initializes \fBncurses\fP
-(e.g., using \fBinitscr\fP(3X) or \fBnewterm\fP(3X)),
-then \fBncurses\fP sets a handler for \fBSIGWINCH\fP which notifies
+If the calling program has not set up a handler for \fB\%SIGWINCH\fP
+when it initializes \fIncurses\fP
+(e.g., using \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X)),
+then \fIncurses\fP sets a handler for \fB\%SIGWINCH\fP which notifies
the library when a window-size event has occurred.
The library checks for this notification
.bP
when reading input data,
.bP
when implicitly resuming program mode
-(e.g., between \fBendwin\fP(3X) and \fBwrefresh\fP(3X)),
+(e.g., between \fB\%endwin\fP(3X) and \fB\%wrefresh\fP(3X)),
and
.bP
-when explicitly resuming program mode in \fBrestartterm\fP(3X).
+when explicitly resuming program mode in \fB\%restartterm\fP(3X).
.PP
When the library has found that the terminal's window-size has
-changed, it calls \fBresizeterm\fP to update its data structures.
+changed, it calls \fB\%resizeterm\fP to update its data structures.
.PP
-An application which establishes its own \fBSIGWINCH\fP handler
-can call \fBresizeterm\fP, but in that case, the library will not
-see \fBSIGWINCH\fP, and proper layout will rely upon the application.
+An application which establishes its own \fB\%SIGWINCH\fP handler
+can call \fB\%resizeterm\fP, but in that case, the library will not
+see \fB\%SIGWINCH\fP, and proper layout will rely upon the application.
.SH FUNCTIONS
.SS resizeterm
-The function \fBresizeterm\fP resizes the standard and current windows
-(i.e., \fBstdscr\fP and \fBcurscr\fP)
+The function \fB\%resizeterm\fP resizes the standard and current windows
+(i.e., \fB\%stdscr\fP and \fB\%curscr\fP)
to the specified dimensions, and adjusts other bookkeeping data used by
-the \fBncurses\fP library that record the window dimensions
-such as the \fBLINES\fP and \fBCOLS\fP variables.
+the \fIncurses\fP library that record the window dimensions
+such as the \fB\%LINES\fP and \fB\%COLS\fP variables.
.SS resize_term
-Most of the work for \fBresizeterm\fP is
-done by the inner function \fBresize_term\fP.
-The outer function \fBresizeterm\fP adds bookkeeping
-for the \fBSIGWINCH\fP handler,
-as well as repainting the soft-key area (see \fBslk_touch\fP(3X)).
+Most of the work for \fB\%resizeterm\fP is
+done by the inner function \fB\%resize_term\fP.
+The outer function \fB\%resizeterm\fP adds bookkeeping
+for the \fB\%SIGWINCH\fP handler,
+as well as repainting the soft-key area (see \fB\%slk_touch\fP(3X)).
.PP
-The \fBresize_term\fP function attempts to resize all windows.
+The \fB\%resize_term\fP function attempts to resize all windows.
This helps with simple applications.
However:
.bP
It is not possible to automatically resize pads.
.bP
Applications which have complicated layouts should check for
-\fBKEY_RESIZE\fP returned from \fBwgetch\fP,
-and adjust their layout, e.g., using \fBwresize\fP and \fBmvwin\fP,
+\fB\%KEY_RESIZE\fP returned from \fB\%wgetch\fP,
+and adjust their layout, e.g., using \fB\%wresize\fP and \fB\%mvwin\fP,
or by recreating the windows.
.PP
-When resizing windows, \fBresize_term\fP recursively adjusts subwindows,
+When resizing windows, \fB\%resize_term\fP recursively adjusts subwindows,
keeping them within the updated parent window's limits.
If a top-level window happens to extend to the screen's limits,
-then on resizing the window, \fBresize_term\fP will keep the window
+then on resizing the window, \fB\%resize_term\fP will keep the window
extending to the corresponding limit, regardless of whether the
screen has shrunk or grown.
.SS is_term_resized
-A support function \fBis_term_resized\fP is provided so that applications
-can check if the \fBresize_term\fP function would modify the window structures.
+A support function \fB\%is_term_resized\fP is provided so that applications
+can check if the \fB\%resize_term\fP function would modify the window structures.
It returns \fBTRUE\fP if the windows would be modified,
and \fBFALSE\fP otherwise.
.SH RETURN VALUE
or if an error occurs while (re)allocating memory for the windows.
.SH NOTES
While these functions are intended to be used to support a signal handler
-(i.e., for \fBSIGWINCH\fP), care should be taken to avoid invoking them in a
-context where \fBmalloc\fP or \fBrealloc\fP may have been interrupted,
+(i.e., for \fB\%SIGWINCH\fP), care should be taken to avoid invoking them in a
+context where \fB\%malloc\fP or \fB\%realloc\fP may have been interrupted,
since it uses those functions.
.PP
-If ncurses is configured to supply its own \fBSIGWINCH\fP handler,
+If \fIncurses\fP is configured to supply its own \fB\%SIGWINCH\fP handler,
.bP
-on receipt of a \fBSIGWINCH\fP, the handler sets a flag
+on receipt of a \fB\%SIGWINCH\fP, the handler sets a flag
.bP
which is tested in
-\fBwgetch\fP(3X),
-\fBdoupdate\fP(3X) and
-\fBrestartterm\fP(3X),
+\fB\%wgetch\fP(3X),
+\fB\%doupdate\fP(3X) and
+\fB\%restartterm\fP(3X),
.bP
-in turn, calling the \fBresizeterm\fP function,
+in turn, calling the \fB\%resizeterm\fP function,
.bP
-which \fBungetch\fP's a \fBKEY_RESIZE\fP which
-will be read on the next call to \fBwgetch\fP.
+which \fB\%ungetch\fP's a \fB\%KEY_RESIZE\fP which
+will be read on the next call to \fB\%wgetch\fP.
.IP
-The \fBKEY_RESIZE\fP alerts an application that the screen size has changed,
+The \fB\%KEY_RESIZE\fP alerts an application that the screen size has changed,
and that it should repaint special features such as pads that cannot
be done automatically.
.IP
-Calling \fBresizeterm\fP or \fBresize_term\fP
+Calling \fB\%resizeterm\fP or \fB\%resize_term\fP
directly from a signal handler is unsafe.
-This indirect method is used to provide a safe way to resize the ncurses
+This indirect method is used to provide a safe way to resize the \fIncurses\fP
data structures.
.PP
-If the environment variables \fBLINES\fP or \fBCOLUMNS\fP are set,
+If the environment variables \fB\%LINES\fP or \fB\%COLUMNS\fP are set,
this overrides the library's use of the window size obtained from
the operating system.
-Thus, even if a \fBSIGWINCH\fP is received,
+Thus, even if a \fB\%SIGWINCH\fP is received,
no screen size change may be recorded.
.SH PORTABILITY
-It is possible to resize the screen with SVr4 curses,
+It is possible to resize the screen with SVr4 \fIcurses\fP,
by
.bP
-exiting curses with \fBendwin\fP(3X) and
+exiting \fIcurses\fP with \fB\%endwin\fP(3X) and
.bP
-resuming using \fBrefresh\fP(3X).
+resuming using \fB\%refresh\fP(3X).
.PP
Doing that clears the screen and is visually distracting.
.PP
-This extension of ncurses was introduced in mid-1995.
-It was adopted in NetBSD curses (2001) and PDCurses (2003).
+This extension of \fIncurses\fP was introduced in mid-1995.
+It was adopted in NetBSD \fIcurses\fP (2001) and PDCurses (2003).
.SH SEE ALSO
-\fBcurs_getch\fP(3X),
-\fBcurs_variables\fP(3X),
-\fBwresize\fP(3X).
+\fB\%curs_getch\fP(3X),
+\fB\%curs_variables\fP(3X),
+\fB\%wresize\fP(3X)
.SH AUTHOR
-Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
+Thomas Dickey (from an equivalent function written in 1988 for BSD \fIcurses\fP)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: scr_dump.5,v 1.31 2023/09/16 23:38:39 tom Exp $
-.TH scr_dump 5 2023-09-16 "ncurses 6.4" "File formats"
+.\" $Id: scr_dump.5,v 1.33 2023/09/23 23:37:26 tom Exp $
+.TH scr_dump 5 2023-09-23 "ncurses 6.4" "File formats"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
it would keep track of offsets into the array of line-data
and adjust the \fBWINDOW\fP structure which was read back into memory.
.PP
-This is similar to Unix SystemV,
+This is similar to Unix System\ V,
but does not write a \*(``magic number\*('' to identify the file format.
.SH PORTABILITY
There is no standard format for \fBputwin\fP.
In the foregoing, emphasis was added to \fBunspecified format\fP
and to \fBXPG4 or to earlier XPG releases\fP,
for clarity.
-.SS Unix SystemV
-Unix SystemV curses identified the file format by writing a
+.SS Unix System V
+Unix System\ V curses identified the file format by writing a
\*(``magic number\*('' at the beginning of the dump.
The \fBWINDOW\fP data and the lines of text follow, all in binary form.
.PP
than writing the whole window from top to bottom.
.SS PDCurses
PDCurses added support for screen dumps in version 2.7 (2005).
-Like Unix SystemV and ncurses5,
+Like Unix System\ V and ncurses5,
it writes the \fBWINDOW\fP structure in binary,
but begins the file with its three-byte identifier \*(``PDC\*('',
followed by a one-byte version,
-# $Id: magic,v 1.3 2020/02/02 23:34:34 tom Exp $
+# $Id: magic,v 1.4 2023/09/23 23:37:26 Branden.Robinson Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 2015,2018 Free Software Foundation, Inc. #
!:mime application/x-terminfo2
#
# While the compiled terminfo uses little-endian format irregardless of
-# platform, SystemV screen dumps do not. They came later, and that detail was
+# platform, System V screen dumps do not. They came later, and that detail was
# overlooked.
#
# AIX and HPUX use the SVr4 big-endian format
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2023 Thomas E. Dickey *
* Copyright 1998-2004,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#if !HAVE_VSSCANF
-MODULE_ID("$Id: vsscanf.c,v 1.21 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: vsscanf.c,v 1.22 2023/09/23 18:48:57 tom Exp $")
#if !(HAVE_VFSCANF || HAVE__DOSCAN)
#include <ctype.h>
-#define L_SQUARE '['
-#define R_SQUARE ']'
-
typedef enum {
cUnknown
,cError /* anything that isn't ANSI */
case sPercent:
if (format[n] == '%') {
state = sUnknown;
- } else if (format[n] == L_SQUARE) {
+ } else if (format[n] == L_BLOCK) {
state = sLeft;
} else {
state = sNormal;
}
break;
case sRange:
- if (format[n] == R_SQUARE) {
+ if (format[n] == R_BLOCK) {
state = sFinal;
chunk = cRange;
}
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.674 2023/09/16 16:31:14 tom Exp $
+ * $Id: curses.priv.h,v 1.676 2023/09/23 18:46:47 tom Exp $
*
* curses.priv.h
*
#define NO_TERMINAL "unknown"
#define USE_SP_RIPOFF 1
#define USE_SP_TERMTYPE 1
-#define USE_SP_WINDOWLIST 1
#else
#define NO_TERMINAL 0
#endif
: no_terminal), \
NonEmpty(term_env))
+/*
+ * Originally a terminal-driver option, the window-list is per-screen to allow
+ * freeing memory used for windows when a screen is deleted.
+ */
+#define USE_SP_WINDOWLIST 1
+
/*
* Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
* when we're throwing control codes at the screen at high volume. To see
*/
#define StringOf(ch) {ch, 0}
+#define CSI_CHR 0x9b
+#define ESC_CHR 0x1b
+
+#define L_BLOCK '['
+#define R_BLOCK ']'
#define L_BRACE '{'
#define R_BRACE '}'
#define S_QUOTE '\''
/****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 2018-2021,2023 Thomas E. Dickey *
* Copyright 2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <curses.priv.h>
-MODULE_ID("$Id: report_offsets.c,v 1.22 2021/08/19 19:51:33 tom Exp $")
+MODULE_ID("$Id: report_offsets.c,v 1.23 2023/09/23 16:47:57 tom Exp $")
#define show_size(type) \
flag = 0; \
#define show_MLEAKS(type,member) /* nothing */
#endif
-#ifdef USE_TERM_DRIVER
-#define show_NORMAL(type,member) /* nothing */
-#else
#define show_NORMAL(type,member) { flag = "n"; show_offset(type,member); }
-#endif
-
#define show_OPTION(type,member) { flag = "+"; show_offset(type,member); }
#if USE_REENTRANT
#if USE_SIZECHANGE
show_OPTION(SCREEN, _resize);
#endif
- show_DRIVER(SCREEN, _windowlist);
+#ifdef USE_SP_WINDOWLIST
+ show_NORMAL(SCREEN, _windowlist);
+#endif
show_REENTR(SCREEN, _ttytype);
show_SPFUNC(SCREEN, use_tioctl);
show_WIDECH(SCREEN, _screen_acs_fix);
show_offset(NCURSES_GLOBALS, cached_tparm);
#endif
show_DRIVER(NCURSES_GLOBALS, term_driver);
+#ifndef USE_SP_WINDOWLIST
show_NORMAL(NCURSES_GLOBALS, _nc_windowlist);
+#endif
#if USE_HOME_TERMINFO
show_OPTION(NCURSES_GLOBALS, home_terminfo);
#endif
/****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 2020-2021,2023 Thomas E. Dickey *
* Copyright 2005-2012,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <tic.h>
-MODULE_ID("$Id: trim_sgr0.c,v 1.21 2021/06/17 21:20:30 tom Exp $")
+MODULE_ID("$Id: trim_sgr0.c,v 1.22 2023/09/23 18:47:56 tom Exp $")
#undef CUR
#define CUR tp->
-#define CSI 233
-#define ESC 033 /* ^[ */
-#define L_BRACK '['
-
static char *
set_attribute_9(TERMTYPE2 *tp, int flag)
{
{
int result = 0;
if (s != 0) {
- if (UChar(s[0]) == CSI)
+ if (UChar(s[0]) == CSI_CHR)
result = 1;
- else if (s[0] == ESC && s[1] == L_BRACK)
+ else if (s[0] == ESC_CHR && s[1] == L_BLOCK)
result = 2;
}
return result;
-ncurses6 (6.4+20230918) unstable; urgency=low
+ncurses6 (6.4+20230923) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 17 Sep 2023 18:08:06 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 23 Sep 2023 05:27:19 -0400
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20230918) unstable; urgency=low
+ncurses6 (6.4+20230923) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 17 Sep 2023 18:08:06 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 23 Sep 2023 05:27:19 -0400
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20230918) unstable; urgency=low
+ncurses6 (6.4+20230923) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 17 Sep 2023 18:08:06 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 23 Sep 2023 05:27:19 -0400
ncurses6 (5.9+20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.606 2023/09/17 22:08:06 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.607 2023/09/23 09:27:19 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "4"\r
!define VERSION_YYYY "2023"\r
-!define VERSION_MMDD "0918"\r
+!define VERSION_MMDD "0923"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.4
-Release: 20230918
+Release: 20230923
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.4
-Release: 20230918
+Release: 20230923
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.4
-Release: 20230918
+Release: 20230923
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
/****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
/*
* Author: Thomas E. Dickey (1998-on)
*
- * $Id: ditto.c,v 1.58 2022/12/24 23:53:08 tom Exp $
+ * $Id: ditto.c,v 1.59 2023/09/23 17:08:43 tom Exp $
*
* The program illustrates how to set up multiple screens from a single
* program.
return TRUE;
}
+static void
+free_screen(DITTO * target)
+{
+ free(target->parents);
+ free(target->windows);
+ free(target->peeks);
+}
+
static void
open_screen(DITTO * target, char **source, int length, int which1)
{
fflush(data[j].output);
fclose(data[j].output);
delscreen(data[j].screen);
+ free_screen(&data[j]);
UnlockIt();
}
+ free(data);
ExitProgram(EXIT_SUCCESS);
}
#else