- The <B>unctrl</B> macro expands to a character string which is a
- printable representation of the character <I>c</I>. Control
- characters are displayed in the <B>^</B><I>X</I> notation. Printing
- characters are displayed as is.
-
- The <B>keyname</B> routine returns a character string correspond-
- ing to the key <I>c</I>.
-
- The <B>filter</B> routine, if used, must be called before <B>initscr</B>
- or <B>newterm</B> are called. The effect is that, during those
- calls, <B>LINES</B> is set to 1; the capabilities <B>clear</B>, <B>cup</B>,
- <B>cud</B>, <B>cud1</B>, <B>cuu1</B>, <B>cuu</B>, <B>vpa</B> are disabled; and the <B>home</B>
- string is set to the value of <B>cr</B>.
-
- The <B>use_env</B> routine, if used, is called before <B>initscr</B> or
- <B>newterm</B> are called. When called with <B>FALSE</B> as an argu-
- ment, the values of <B>lines</B> and <B>columns</B> specified in the
- <I>terminfo</I> database will be used, even if environment vari-
- ables <B>LINES</B> and <B>COLUMNS</B> (used by default) are set, or if
- <B>curses</B> is running in a window (in which case default
- behavior would be to use the window size if <B>LINES</B> and
- <B>COLUMNS</B> are not set).
-
- The <B>putwin</B> routine writes all data associated with window
- <I>win</I> into the file to which <I>filep</I> points. This information
- can be later retrieved using the <B>getwin</B> function.
-
- The <B>getwin</B> routine reads window related data stored in the
- file by <B>putwin</B>. The routine then creates and initializes
+ The <STRONG>unctrl</STRONG> routine returns a character string which is a
+ printable representation of the character <EM>c</EM>, ignoring at-
+ tributes. Control characters are displayed in the <STRONG>^</STRONG><EM>X</EM> no-
+ tation. Printing characters are displayed as is. The
+ corresponding <STRONG>wunctrl</STRONG> returns a printable representation
+ of a wide character.
+
+ The <STRONG>keyname</STRONG> routine returns a character string correspond-
+ ing to the key <EM>c</EM>:
+
+ <STRONG>o</STRONG> Printable characters are displayed as themselves,
+ e.g., a one-character string containing the key.
+
+ <STRONG>o</STRONG> Control characters are displayed in the <STRONG>^</STRONG><EM>X</EM> nota-
+ tion.
+
+ <STRONG>o</STRONG> DEL (character 127) is displayed as <STRONG>^?</STRONG>.
+
+ <STRONG>o</STRONG> Values above 128 are either meta characters (if the
+ screen has not been initialized, or if <STRONG>meta</STRONG> has
+ been called with a TRUE parameter), shown in the
+ <STRONG>M-</STRONG><EM>X</EM> notation, or are displayed as themselves. In
+ the latter case, the values may not be printable;
+ this follows the X/Open specification.
+
+ <STRONG>o</STRONG> Values above 256 may be the names of the names of
+ function keys.
+
+ <STRONG>o</STRONG> Otherwise (if there is no corresponding name) the
+ function returns null, to denote an error. X/Open
+ also lists an "UNKNOWN KEY" return value, which
+ some implementations return rather than null.
+
+ The corresponding <STRONG>key_name</STRONG> returns a character string cor-
+ responding to the wide-character value <EM>w</EM>. The two func-
+ tions do not return the same set of strings; the latter
+ returns null where the former would display a meta charac-
+ ter.
+
+ The <STRONG>filter</STRONG> routine, if used, must be called before <STRONG>initscr</STRONG>
+ or <STRONG>newterm</STRONG> are called. The effect is that, during those
+ calls, <STRONG>LINES</STRONG> is set to 1; the capabilities <STRONG>clear</STRONG>, <STRONG>cup</STRONG>,
+ <STRONG>cud</STRONG>, <STRONG>cud1</STRONG>, <STRONG>cuu1</STRONG>, <STRONG>cuu</STRONG>, <STRONG>vpa</STRONG> are disabled; and the <STRONG>home</STRONG>
+ string is set to the value of <STRONG>cr</STRONG>.
+
+ The <STRONG>nofilter</STRONG> routine cancels the effect of a preceding
+ <STRONG>filter</STRONG> call. That allows the caller to initialize a
+ screen on a different device, using a different value of
+ <STRONG>$TERM</STRONG>. The limitation arises because the <STRONG>filter</STRONG> routine
+ modifies the in-memory copy of the terminal information.
+
+ 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 environ-
+ ment variables when determining the screen size.
+
+ <STRONG>o</STRONG> Normally ncurses 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 unless If <STRONG>use_tioctl</STRONG> was also called with
+ <STRONG>TRUE</STRONG> for parameter.
+
+ <STRONG>o</STRONG> Then it asks for the screen size via operating system
+ calls. If successful, it overrides the values from
+ the terminal database.
+
+ <STRONG>o</STRONG> Finally (unless <STRONG>use_env</STRONG> was called with <STRONG>FALSE</STRONG> parame-
+ ter), ncurses examines the <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> environ-
+ ment variables, using a value in those to override the
+ results from the operating system or terminal data-
+ base.
+
+ Ncurses also updates the screen size in response to
+ SIGWINCH, unless overridden by the <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG>
+ environment variables,
+
+ The <STRONG>use_tioctl</STRONG> routine, if used, should be called before
+ <STRONG>initscr</STRONG> or <STRONG>newterm</STRONG> are called (because those compute the
+ screen size). After <STRONG>use_tioctl</STRONG> is called with <STRONG>TRUE</STRONG> as an
+ argument, ncurses modifies the last step in its computa-
+ tion of screen size as follows:
+
+ <STRONG>o</STRONG> checks if the <STRONG>LINES</STRONG> and <STRONG>COLUMNS</STRONG> environment variables
+ are set to a number greater than zero.
+
+ <STRONG>o</STRONG> for each, ncurses updates the corresponding environ-
+ ment variable with the value that it has obtained via
+ operating system call or from the terminal database.
+
+ <STRONG>o</STRONG> ncurses re-fetches the value of the environment vari-
+ ables 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:
+
+ <EM>use</EM><STRONG>_</STRONG><EM>env</EM> <EM>use</EM><STRONG>_</STRONG><EM>tioctl</EM> <EM>Summary</EM>
+ ----------------------------------------------------------------
+ TRUE FALSE This is the default behavior. ncurses
+ uses operating system calls unless over-
+ ridden by $LINES or $COLUMNS environment
+ variables.
+ TRUE TRUE ncurses updates $LINES and $COLUMNS
+ based on operating system calls.
+
+ FALSE TRUE ncurses ignores $LINES and $COLUMNS, us-
+ es operating system calls to obtain
+ size.
+ FALSE FALSE ncurses relies on the terminal database
+ to determine size.
+
+ The <STRONG>putwin</STRONG> routine writes all data associated with window
+ <EM>win</EM> into the file to which <EM>filep</EM> points. This information
+ can be later retrieved using the <STRONG>getwin</STRONG> function.
+
+ The <STRONG>getwin</STRONG> routine reads window related data stored in the
+ file by <STRONG>putwin</STRONG>. The routine then creates and initializes