.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_util.3x,v 1.67 2023/03/11 20:28:02 tom Exp $
-.TH curs_util 3X 2023-03-11 "ncurses 6.4" "Library calls"
+.\" $Id: curs_util.3x,v 1.70 2023/07/01 14:31:54 tom Exp $
+.TH curs_util 3X 2023-07-01 "ncurses 6.4" "Library calls"
.ie \n(.g .ds `` \(lq
.el .ds `` ``
.ie \n(.g .ds '' \(rq
\fBint delay_output(int \fIms\fB);\fR
.br
\fBint flushinp(void);\fP
-.br
.SH DESCRIPTION
.SS unctrl
-.PP
The \fBunctrl\fP routine returns a character string which is a printable
representation of the character \fIc\fP, ignoring attributes.
Control characters are displayed in the \fB^\fIX\fR notation.
The corresponding \fBwunctrl\fP returns a printable representation of
a wide character.
.SS keyname/key_name
-.PP
The \fBkeyname\fP routine returns a character string
corresponding to the key \fIc\fP:
.bP
The two functions do not return the same set of strings;
the latter returns null where the former would display a meta character.
.SS filter/nofilter
-.PP
The \fBfilter\fP routine, if used, must be called before \fBinitscr\fP or
\fBnewterm\fP are called.
Calling \fBfilter\fP causes these changes in initialization:
The limitation arises because the \fBfilter\fP routine modifies the
in-memory copy of the terminal information.
.SS use_env
-.PP
The \fBuse_env\fP routine, if used,
should be called before \fBinitscr\fP or
\fBnewterm\fP are called
\fBNcurses\fP also updates the screen size in response to \fBSIGWINCH\fP,
unless overridden by the \fBLINES\fP or \fBCOLUMNS\fP environment variables,
.SS use_tioctl
-.PP
The \fBuse_tioctl\fP routine, if used,
should be called before \fBinitscr\fP or \fBnewterm\fP are called
(because those compute the screen size).
T}
.TE
.SS putwin/getwin
-.PP
The \fBputwin\fP routine writes all data associated
with window (or pad) \fIwin\fP into
the file to which \fIfilep\fP points.
created in the application using \fBinit_pair\fP,
they will not be colored when the window is refreshed.
.SS delay_output
-.PP
The \fBdelay_output\fP routine inserts an \fIms\fP millisecond pause
in output.
This routine should not be used extensively because
If no padding character is specified,
this uses \fBnapms\fP to perform the delay.
.SS flushinp
-.PP
The \fBflushinp\fP routine throws away any typeahead that has been typed by the
user and has not yet been read by the program.
.SH RETURN VALUE
.RE
.SH PORTABILITY
.SS filter
-.PP
The SVr4 documentation describes the action of \fBfilter\fP only in the vaguest
terms.
The description here is adapted from the XSI Curses standard (which
erroneously fails to describe the disabling of \fBcuu\fP).
.SS keyname
-.PP
The \fBkeyname\fP function may return the names of user-defined
string capabilities which are defined in the terminfo entry via the \fB\-x\fP
option of \fB@TIC@\fP.
The \fBuse_extended_names\fP(3X) function controls whether this data is
loaded when the terminal description is read by the library.
.SS nofilter/use_tioctl
-.PP
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.
.SS putwin/getwin file-format
-.PP
The \fBputwin\fP and \fBgetwin\fP functions have several issues with
portability:
.bP
This implementation reduces the problem on writes by flushing the output.
However, reading from a file written using mixed schemes may not be successful.
.SS unctrl/wunctrl
-.PP
The XSI Curses standard, Issue 4 describes these functions.
It states that \fBunctrl\fP and \fBwunctrl\fP will return a null pointer if
unsuccessful, but does not define any error conditions.
matching the behavior of SVr4 curses.
Other implementations may not do that.
.SS use_env/use_tioctl
-.PP
If \fBncurses\fP is configured to provide the sp-functions extension,
the state of \fBuse_env\fP and \fBuse_tioctl\fP may be updated before
creating each \fIscreen\fP rather than once only