-</PRE>
-<H2>DESCRIPTION</H2><PRE>
- 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
- a new window using that data. It returns a pointer to the
- new window.
-
- 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.
-
- 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.