-
-</PRE><H3><a name="h3-HOME">HOME</a></H3><PRE>
- Tells <STRONG>ncurses</STRONG> where your home directory is. That is where it may read
- and write auxiliary terminal descriptions:
-
- $HOME/.termcap
- $HOME/.terminfo
-
-
-</PRE><H3><a name="h3-LINES">LINES</a></H3><PRE>
- Like COLUMNS, specify the height of the screen in characters. See COL-
- UMNS for a detailed description.
-
-
-</PRE><H3><a name="h3-MOUSE_BUTTONS_123">MOUSE_BUTTONS_123</a></H3><PRE>
- This applies only to the OS/2 EMX port. It specifies the order of but-
- tons on the mouse. OS/2 numbers a 3-button mouse inconsistently from
- other platforms:
-
- 1 = left
- 2 = right
- 3 = middle.
-
- This variable lets you customize the mouse. The variable must be three
- numeric digits 1-3 in any order, e.g., 123 or 321. If it is not speci-
- fied, <STRONG>ncurses</STRONG> uses 132.
-
-
-</PRE><H3><a name="h3-NCURSES_ASSUMED_COLORS">NCURSES_ASSUMED_COLORS</a></H3><PRE>
- Override the compiled-in assumption that the terminal's default colors
- are white-on-black (see <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>). You may set the fore-
- ground and background color values with this environment variable by
- proving a 2-element list: foreground,background. For example, to tell
- ncurses to not assume anything about the colors, set this to "-1,-1".
- To make it green-on-black, set it to "2,0". Any positive value from
- zero to the terminfo <STRONG>max_colors</STRONG> value is allowed.
-
-
-</PRE><H3><a name="h3-NCURSES_CONSOLE2">NCURSES_CONSOLE2</a></H3><PRE>
- This applies only to the MinGW port of ncurses.
-
- The <STRONG>Console2</STRONG> program's handling of the Microsoft Console API call <STRONG>Cre-</STRONG>
- <STRONG>ateConsoleScreenBuffer</STRONG> is defective. Applications which use this will
- hang. However, it is possible to simulate the action of this call by
- mapping coordinates, explicitly saving and restoring the original
- screen contents. Setting the environment variable <STRONG>NCGDB</STRONG> has the same
- effect.
-
-
-</PRE><H3><a name="h3-NCURSES_GPM_TERMS">NCURSES_GPM_TERMS</a></H3><PRE>
- This applies only to ncurses configured to use the GPM interface.
-
- If present, the environment variable is a list of one or more terminal
- names against which the <STRONG>TERM</STRONG> environment variable is matched. Setting
- it to an empty value disables the GPM interface; using the built-in
- support for xterm, etc.
-
- If the environment variable is absent, ncurses will attempt to open GPM
- if <STRONG>TERM</STRONG> contains "linux".
-
-
-</PRE><H3><a name="h3-NCURSES_NO_HARD_TABS">NCURSES_NO_HARD_TABS</a></H3><PRE>
- <STRONG>Ncurses</STRONG> may use tabs as part of the cursor movement optimization. In
- some cases, your terminal driver may not handle these properly. Set
- this environment variable to disable the feature. You can also adjust
- your <STRONG>stty</STRONG> settings to avoid the problem.
-
-
-</PRE><H3><a name="h3-NCURSES_NO_MAGIC_COOKIE">NCURSES_NO_MAGIC_COOKIE</a></H3><PRE>
- Some terminals use a magic-cookie feature which requires special han-
- dling to make highlighting and other video attributes display properly.
- You can suppress the highlighting entirely for these terminals by set-
- ting this environment variable.
-
-
-</PRE><H3><a name="h3-NCURSES_NO_PADDING">NCURSES_NO_PADDING</a></H3><PRE>
- Most of the terminal descriptions in the terminfo database are written
- for real "hardware" terminals. Many people use terminal emulators
- which run in a windowing environment and use curses-based applications.
- Terminal emulators can duplicate all of the important aspects of a
- hardware terminal, but they do not have the same limitations. The
- chief limitation of a hardware terminal from the standpoint of your
- application is the management of dataflow, i.e., timing. Unless a
- hardware terminal is interfaced into a terminal concentrator (which
- does flow control), it (or your application) must manage dataflow, pre-
- venting overruns. The cheapest solution (no hardware cost) is for your
- program to do this by pausing after operations that the terminal does
- slowly, such as clearing the display.
-
- As a result, many terminal descriptions (including the vt100) have
- delay times embedded. You may wish to use these descriptions, but not
- want to pay the performance penalty.
-
- Set the NCURSES_NO_PADDING environment variable to disable all but
- mandatory padding. Mandatory padding is used as a part of special con-
- trol sequences such as <EM>flash</EM>.
-
-
-</PRE><H3><a name="h3-NCURSES_NO_SETBUF">NCURSES_NO_SETBUF</a></H3><PRE>
- This setting is obsolete. Before changes
-
- <STRONG>o</STRONG> started with 5.9 patch 20120825 and
-
- <STRONG>o</STRONG> continued though 5.9 patch 20130126
-
- <STRONG>ncurses</STRONG> enabled buffered output during terminal initialization. This
- was done (as in SVr4 curses) for performance reasons. For testing pur-
- poses, both of <STRONG>ncurses</STRONG> and certain applications, this feature was made
- optional. Setting the NCURSES_NO_SETBUF variable disabled output
- buffering, leaving the output in the original (usually line buffered)
- mode.
-
- In the current implementation, ncurses performs its own buffering and
- does not require this workaround. It does not modify the buffering of
- the standard output.
-
- The reason for the change was to make the behavior for interrupts and
- other signals more robust. One drawback is that certain nonconven-
- tional programs would mix ordinary stdio calls with ncurses calls and
- (usually) work. This is no longer possible since ncurses is not using
- the buffered standard output but its own output (to the same file
- descriptor). As a special case, the low-level calls such as <STRONG>putp</STRONG> still
- use the standard output. But high-level curses calls do not.
-
-
-</PRE><H3><a name="h3-NCURSES_NO_UTF8_ACS">NCURSES_NO_UTF8_ACS</a></H3><PRE>
- During initialization, the <STRONG>ncurses</STRONG> library checks for special cases
- where VT100 line-drawing (and the corresponding alternate character set
- capabilities) described in the terminfo are known to be missing.
- Specifically, when running in a UTF-8 locale, the Linux console emula-
- tor and the GNU screen program ignore these. Ncurses checks the <STRONG>TERM</STRONG>
- environment variable for these. For other special cases, you should
- set this environment variable. Doing this tells ncurses to use Unicode
- values which correspond to the VT100 line-drawing glyphs. That works
- for the special cases cited, and is likely to work for terminal emula-
- tors.
-
- When setting this variable, you should set it to a nonzero value. Set-
- ting it to zero (or to a nonnumber) disables the special check for
- "linux" and "screen".
-
- As an alternative to the environment variable, ncurses checks for an
- extended terminfo capability <STRONG>U8</STRONG>. This is a numeric capability which
- can be compiled using <STRONG>tic</STRONG> <STRONG>-x</STRONG>. For example
+ Because this name is also used in development environments to represent
+ the C compiler's name, <EM>ncurses</EM> ignores its value if it is not one
+ character in length.
+
+
+</PRE><H3><a name="h3-COLUMNS"><EM>COLUMNS</EM></a></H3><PRE>
+ This variable specifies the width of the screen in characters.
+ Applications running in a windowing environment usually are able to
+ obtain the width of the window in which they are executing. If <EM>COLUMNS</EM>
+ is not defined and the terminal's screen size is not available from the
+ terminal driver, <EM>ncurses</EM> uses the size specified by the <STRONG>columns</STRONG> (<STRONG>cols</STRONG>)
+ capability of the terminal type's entry in the <EM>terminfo</EM> database, if
+ any.
+
+ It is important that your application use the correct screen size.
+ Automatic detection thereof is not always possible because an
+ application may be running on a host that does not honor NAWS
+ (Negotiations About Window Size) or as a different user ID than the
+ owner of the terminal device file. Setting <EM>COLUMNS</EM> and/or <EM>LINES</EM>
+ overrides the library's use of the screen size obtained from the
+ operating system.
+
+ The <EM>COLUMNS</EM> and <EM>LINES</EM> variables may be specified independently. This
+ property is useful to circumvent misfeatures of legacy terminal type
+ descriptions; <STRONG>xterm(1)</STRONG> descriptions specifying 65 lines were once
+ notorious. For best results, avoid specifying <STRONG>cols</STRONG> and <STRONG>lines</STRONG>
+ capability codes in <EM>terminfo</EM> descriptions of terminal emulators.
+
+ <STRONG><A HREF="curs_util.3x.html">use_env(3x)</A></STRONG> can disable use of the process environment in determining
+ the screen size. <STRONG><A HREF="curs_util.3x.html">use_tioctl(3x)</A></STRONG> can update <EM>COLUMNS</EM> and <EM>LINES</EM> to match
+ the screen size obtained from system calls or the terminal database.
+
+
+</PRE><H3><a name="h3-ESCDELAY"><EM>ESCDELAY</EM></a></H3><PRE>
+ For <EM>curses</EM> to distinguish the ESC character resulting from a user's
+ press of the "Escape" key on the input device from one beginning an
+ <EM>escape</EM> <EM>sequence</EM> (as commonly produced by function keys), it waits after
+ receiving the escape character to see if further characters are
+ available on the input stream within a short interval. A global
+ variable <STRONG>ESCDELAY</STRONG> stores this interval in milliseconds. The default
+ value of 1000 (one second) is adequate for most uses. This environment
+ variable overrides it.
+
+ The most common instance where you may wish to change this value is to
+ work with a remote host over a slow communication channel. If the host
+ running a <EM>curses</EM> application does not receive the characters of an
+ escape sequence in a timely manner, the library can interpret them as
+ multiple key stroke events.
+
+ <STRONG>xterm(1)</STRONG> mouse events are a form of escape sequence; therefore, if your
+ application makes heavy use of multiple-clicking, you may wish to
+ lengthen the default value because the delay applies to the composite
+ multi-click event as well as the individual clicks.
+
+ Portable applications should not rely upon the presence of <STRONG>ESCDELAY</STRONG> in
+ either form, but setting the environment variable rather than the
+ global variable does not create problems when compiling an application.
+
+ If <STRONG><A HREF="curs_inopts.3x.html">keypad(3x)</A></STRONG> is disabled for the <EM>curses</EM> window receiving input, a
+ program must disambiguate escape sequences itself.
+
+
+</PRE><H3><a name="h3-HOME"><EM>HOME</EM></a></H3><PRE>
+ <EM>ncurses</EM> may read and write auxiliary terminal descriptions in <EM>.termcap</EM>
+ and <EM>.terminfo</EM> files in the user's home directory.
+
+
+</PRE><H3><a name="h3-LINES"><EM>LINES</EM></a></H3><PRE>
+ This counterpart to <EM>COLUMNS</EM> specifies the height of the screen in
+ characters. The corresponding <EM>terminfo</EM> capability and code is <STRONG>lines</STRONG>.
+ See the description of the <EM>COLUMNS</EM> variable above.
+
+
+</PRE><H3><a name="h3-MOUSE_BUTTONS_123"><EM>MOUSE_BUTTONS_123</EM></a></H3><PRE>
+ (OS/2 EMX port only) OS/2 numbers a three-button mouse inconsistently
+ with other platforms, such that 1 is the left button, 2 the right, and
+ 3 the middle. This variable customizes the mouse button numbering.
+ Its value must be three digits 1-3 in any order. By default, <EM>ncurses</EM>
+ assumes a numbering of "132".
+
+
+</PRE><H3><a name="h3-NCURSES_ASSUMED_COLORS"><EM>NCURSES_ASSUMED_COLORS</EM></a></H3><PRE>
+ If set, this variable overrides the <EM>ncurses</EM> library's compiled-in
+ assumption that the terminal's default colors are white on black; see
+ <STRONG><A HREF="default_colors.3x.html">default_colors(3x)</A></STRONG>. Set the foreground and background color values
+ with this environment variable by assigning it two integer values
+ separated by a comma, indicating foregound and background color
+ numbers, respectively.
+
+ For example, to tell <EM>ncurses</EM> not to assume anything about the colors,
+ use a value of "-1,-1". To make the default color scheme green on
+ black, use "2,0". <EM>ncurses</EM> accepts integral values from -1 up to the
+ value of the <EM>terminfo</EM> <STRONG>max_colors</STRONG> (<STRONG>colors</STRONG>) capability.
+
+
+</PRE><H3><a name="h3-NCURSES_CONSOLE2"><EM>NCURSES_CONSOLE2</EM></a></H3><PRE>
+ (MinGW port only) The <EM>Console2</EM> program defectively handles the
+ Microsoft Console API call <EM>CreateConsoleScreenBuffer</EM>. Applications
+ that use it will hang. However, it is possible to simulate the action
+ of this call by mapping coordinates, explicitly saving and restoring
+ the original screen contents. Setting the environment variable <EM>NCGDB</EM>
+ has the same effect.
+
+
+</PRE><H3><a name="h3-NCURSES_GPM_TERMS"><EM>NCURSES_GPM_TERMS</EM></a></H3><PRE>
+ (Linux only) When <EM>ncurses</EM> is configured to use the GPM interface, this
+ variable may list one or more terminal names against which the <EM>TERM</EM>
+ variable (see below) is matched. An empty value disables the GPM
+ interface, using <EM>ncurses</EM>'s built-in support for <STRONG>xterm(1)</STRONG> mouse
+ protocols instead. If the variable is absent, <EM>ncurses</EM> attempts to open
+ GPM if <EM>TERM</EM> contains "linux".
+
+
+</PRE><H3><a name="h3-NCURSES_NO_HARD_TABS"><EM>NCURSES_NO_HARD_TABS</EM></a></H3><PRE>
+ <EM>ncurses</EM> may use tab characters in cursor movement optimization. In
+ some cases, your terminal driver may not handle them properly. Set
+ this environment variable to any value to disable the feature. You can
+ also adjust your <STRONG>stty(1)</STRONG> settings to avoid the problem.
+
+
+</PRE><H3><a name="h3-NCURSES_NO_MAGIC_COOKIE"><EM>NCURSES_NO_MAGIC_COOKIE</EM></a></H3><PRE>
+ Many terminals store video attributes as a property of a character
+ cell, as <EM>curses</EM> does. Historically, some recorded changes in video
+ attributes as data that logically <EM>occupies</EM> character cells on the
+ display, switching attributes on or off, similarly to tags in a markup
+ language; these are termed "magic cookies", and must be subsequently
+ overprinted. If the <EM>terminfo</EM> entry for your terminal type does not
+ adequately describe its handling of magic cookies, set this variable to
+ any value to instruct <EM>ncurses</EM> to disable attributes entirely.
+
+
+</PRE><H3><a name="h3-NCURSES_NO_PADDING"><EM>NCURSES_NO_PADDING</EM></a></H3><PRE>
+ Most terminal type descriptions in the <EM>terminfo</EM> database detail
+ hardware devices. Many people use <EM>curses</EM>-based applications in
+ terminal emulator programs that run in a windowing environment. These
+ programs can duplicate all of the important features of a hardware
+ terminal, but often lack their limitations. Chief among these absent
+ drawbacks is the problem of data flow management; that is, limiting the
+ speed of communication to what the hardware could handle. Unless a
+ hardware terminal is interfaced into a terminal concentrator (which
+ does flow control), an application must manage flow control itself to
+ prevent overruns and data loss.
+
+ A solution that comes at no hardware cost is for an application to
+ pause after directing a terminal to execute an operation that it
+ performs slowly, such as clearing the display. Many terminal type
+ descriptions, including that for the VT100, embed delay specifications
+ in capabilities. You may wish to use these terminal descriptions
+ without paying the performance penalty. Set <EM>NCURSES</EM><STRONG>_</STRONG><EM>NO</EM><STRONG>_</STRONG><EM>PADDING</EM> to any
+ value to disable all but mandatory padding. Mandatory padding is used
+ by such terminal capabilities as <STRONG>flash_screen</STRONG> (<STRONG>flash</STRONG>).
+
+
+</PRE><H3><a name="h3-NCURSES_NO_SETBUF"><EM>NCURSES_NO_SETBUF</EM></a></H3><PRE>
+ (Obsolete) Prior to internal changes developed in <EM>ncurses</EM> 5.9 (patches
+ 20120825 through 20130126), the library used <STRONG>setbuf(3)</STRONG> to enable fully
+ buffered output when initializing the terminal. This was done, as in
+ SVr4 <EM>curses</EM>, to increase performance. For testing purposes, both of
+ <EM>ncurses</EM> and of certain applications, this feature was made optional.
+ Setting this variable disabled output buffering, leaving the output
+ stream in the original (usually line-buffered) mode.
+
+ Nowadays, <EM>ncurses</EM> performs its own buffering and does not require this
+ workaround; it does not modify the buffering of the standard output
+ stream. This approach makes signal handling, as for interrupts, more
+ robust. A drawback is that certain unconventional programs mixed
+ <STRONG>stdio(3)</STRONG> calls with <EM>ncurses</EM> calls and (usually) got the behavior they
+ expected. This is no longer the case; <EM>ncurses</EM> does not write to the
+ standard output file descriptor through a <EM>stdio</EM>-buffered stream.
+
+ As a special case, low-level API calls such as <STRONG><A HREF="curs_terminfo.3x.html">putp(3x)</A></STRONG> still use the
+ standard output stream. High-level <EM>curses</EM> calls such as <STRONG><A HREF="curs_printw.3x.html">printw(3x)</A></STRONG> do
+ not.
+
+
+</PRE><H3><a name="h3-NCURSES_NO_UTF8_ACS"><EM>NCURSES_NO_UTF8_ACS</EM></a></H3><PRE>
+ At initialization, <EM>ncurses</EM> inspects the <EM>TERM</EM> environment variable for
+ special cases where VT100 forms-drawing characters (and the
+ corresponding alternate character set <EM>terminfo</EM> capabilities) are known
+ to be unsupported by terminal types that otherwise claim VT100
+ compatibility. Specifically, when running in a UTF-8 locale, the Linux
+ virtual console device and the GNU <STRONG>screen(1)</STRONG> program ignore them. Set
+ this variable to a nonzero value to instruct <EM>ncurses</EM> that the
+ terminal's ACS support is broken; the library then outputs Unicode code
+ points that correspond to the forms-drawing characters. Set it to zero
+ (or a non-integer) to disable the special check for terminal type names
+ matching "linux" or "screen", directing <EM>ncurses</EM> to assume that the ACS
+ feature works if the terminal type description advertises it.
+
+ As an alternative to use of this variable, <EM>ncurses</EM> checks for an
+ extended <EM>terminfo</EM> numeric capability <STRONG>U8</STRONG> that can be compiled using "<STRONG>tic</STRONG>
+ <STRONG>-x</STRONG>". Examples follow.