* 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.88 2023/10/14 22:26:23 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-10-14 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-10-14 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>
</PRE><H3><a name="h3-delay_output">delay_output</a></H3><PRE>
The <STRONG>delay_output</STRONG> routine inserts an <EM>ms</EM> millisecond pause in output.
- This routine should not be used extensively because padding characters
- are used rather than a CPU pause. If no padding character is
- specified, this uses <STRONG>napms</STRONG> to perform the delay.
+ Employ this function judiciously when terminal output uses padding,
+ because <EM>ncurses</EM> transmits null characters (consuming CPU and I/O
+ resources) instead of sleeping and requesting resumption from the
+ operating system. Padding is used unless:
+
+ <STRONG>o</STRONG> the terminal description has <STRONG>npc</STRONG> (<STRONG>no_pad_char</STRONG>) capability, or
+
+ <STRONG>o</STRONG> the environment variable <STRONG>NCURSES_NO_PADDING</STRONG> is set.
+
+ If padding is not in use, <EM>ncurses</EM> uses <STRONG>napms</STRONG> to perform the delay. If
+ the value of <EM>ms</EM> exceeds 30,000 (thirty seconds), it is capped at that
+ value.
</PRE><H3><a name="h3-flushinp">flushinp</a></H3><PRE>
- The <STRONG>flushinp</STRONG> routine throws away any typeahead that has been typed by
+ The <STRONG>flushinp</STRONG> routine throws away any typeahead that has been typed by
the user and has not yet been read by the program.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- Except for <STRONG>flushinp</STRONG>, routines that return an integer return <STRONG>ERR</STRONG> upon
- failure and <STRONG>OK</STRONG> (SVr4 specifies only "an integer value other than <STRONG>ERR</STRONG>")
+ Except for <STRONG>flushinp</STRONG>, routines that return an integer return <STRONG>ERR</STRONG> upon
+ failure and <STRONG>OK</STRONG> (SVr4 specifies only "an integer value other than <STRONG>ERR</STRONG>")
upon successful completion.
Routines that return pointers return <STRONG>NULL</STRONG> on error.
returns an error if the terminal was not initialized.
<STRONG>putwin</STRONG>
- returns an error if the associated <STRONG>fwrite</STRONG> calls return an
+ returns an error if the associated <STRONG>fwrite</STRONG> calls return an
error.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
</PRE><H3><a name="h3-filter">filter</a></H3><PRE>
- The SVr4 documentation describes the action of <STRONG>filter</STRONG> only in the
- vaguest terms. The description here is adapted from the XSI Curses
+ The SVr4 documentation describes the action of <STRONG>filter</STRONG> only in the
+ vaguest terms. The description here is adapted from the XSI Curses
standard (which erroneously fails to describe the disabling of <STRONG>cuu</STRONG>).
+</PRE><H3><a name="h3-delay_output-padding">delay_output padding</a></H3><PRE>
+ The limitation to 30 seconds and the use of <STRONG>napms</STRONG> differ from other
+ implementations.
+
+ <STRONG>o</STRONG> SVr4 curses does not delay if no padding character is available.
+
+ <STRONG>o</STRONG> NetBSD curses uses <STRONG>napms</STRONG> when no padding character is available,
+ but does not take timing into account when using the padding
+ character.
+
+ Neither limits the delay.
+
+
</PRE><H3><a name="h3-keyname">keyname</a></H3><PRE>
The <STRONG>keyname</STRONG> function may return the names of user-defined string
capabilities which are defined in the terminfo entry via the <STRONG>-x</STRONG> option
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>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG>, <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>,
<STRONG><A HREF="curs_scr_dump.3x.html">curs_scr_dump(3x)</A></STRONG>, <STRONG><A HREF="curs_sp_funcs.3x.html">curs_sp_funcs(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
- <STRONG><A HREF="legacy_coding.3x.html">legacy_coding(3x)</A></STRONG>.
+ <STRONG><A HREF="legacy_coding.3x.html">legacy_coding(3x)</A></STRONG>
-ncurses 6.4 2023-09-16 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
+ncurses 6.4 2023-10-14 <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-PORTABILITY">PORTABILITY</a>
<ul>
<li><a href="#h3-filter">filter</a></li>
+<li><a href="#h3-delay_output-padding">delay_output padding</a></li>
<li><a href="#h3-keyname">keyname</a></li>
<li><a href="#h3-nofilter_use_tioctl">nofilter/use_tioctl</a></li>
<li><a href="#h3-putwin_getwin-file-format">putwin/getwin file-format</a></li>