.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_util.3x,v 1.95 2024/01/05 21:46:58 tom Exp $
-.TH curs_util 3X 2024-01-05 "ncurses 6.4" "Library calls"
+.\" $Id: curs_util.3x,v 1.101 2024/04/20 21:20:07 tom Exp $
+.TH curs_util 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.nf
\fB#include <curses.h>
.PP
-\fBconst char *unctrl(chtype \fIc\fP);
-\fBwchar_t *wunctrl(cchar_t *\fIc\fP);
+\fBconst char *unctrl(chtype \fIch\fP);
+\fBwchar_t *wunctrl(cchar_t *\fIwch\fP);
.PP
\fBconst char *keyname(int \fIc\fP);
-\fBconst char *key_name(wchar_t \fIw\fP);
+\fBconst char *key_name(wchar_t \fIwc\fP);
.PP
\fBvoid filter(void);
.PP
.SH DESCRIPTION
.SS unctrl
The \fBunctrl\fP routine returns a character string which is a printable
-representation of the character \fIc\fP:
+representation of the character \fIch\fP:
.bP
Printable characters are displayed as themselves,
e.g., a one-character string containing the key.
this follows the X/Open specification.
.PP
The corresponding \fBwunctrl\fP returns a printable representation of
-a complex character \fIc\fP.
+a complex character \fIwch\fP.
.PP
In both \fBunctrl\fP and \fBwunctrl\fP the attributes and color associated
with the character parameter are ignored.
.PP
Routines that return pointers return \fBNULL\fP on error.
.PP
-X/Open does not define any error conditions.
+X/Open Curses does not specify any error conditions.
In this implementation
.RS 3
.TP 5
.SS filter
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
+The description here is adapted from X/Open Curses (which
erroneously fails to describe the disabling of \fBcuu\fP).
.SS "delay_output padding"
The limitation to 30 seconds
and were later (in 1988) incorporated into SVr4.
Oddly, there are no such functions in the 4.3BSD curses sources.
.bP
-Most implementations simply dump the binary \fI\%WINDOW\fP structure to the file.
+Most implementations simply dump the binary \fI\%WINDOW\fP structure
+to the file.
These include SVr4 curses, NetBSD and PDCurses,
as well as older \fI\%ncurses\fP versions.
This implementation
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"
-The XSI Curses standard, Issue 4 describes these functions.
+X/Open Curses, 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.
This implementation checks for three cases: