2 ****************************************************************************
3 * Copyright 2019,2020 Thomas E. Dickey *
4 * Copyright 2010-2015,2017 Free Software Foundation, Inc. *
6 * Permission is hereby granted, free of charge, to any person obtaining a *
7 * copy of this software and associated documentation files (the *
8 * "Software"), to deal in the Software without restriction, including *
9 * without limitation the rights to use, copy, modify, merge, publish, *
10 * distribute, distribute with modifications, sublicense, and/or sell *
11 * copies of the Software, and to permit persons to whom the Software is *
12 * furnished to do so, subject to the following conditions: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
25 * Except as contained in this notice, the name(s) of the above copyright *
26 * holders shall not be used in advertising or otherwise to promote the *
27 * sale, use or other dealings in this Software without prior written *
29 ****************************************************************************
30 * @Id: term_variables.3x,v 1.12 2020/02/02 23:34:34 tom Exp @
32 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
35 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
36 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
37 <TITLE>term_variables 3X</TITLE>
38 <link rel="author" href="mailto:bug-ncurses@gnu.org">
39 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
42 <H1 class="no-header">term_variables 3X</H1>
44 <B><A HREF="term_variables.3X.html">term_variables(3X)</A></B> <B><A HREF="term_variables.3X.html">term_variables(3X)</A></B>
49 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
50 <B>SP</B>, <B>acs_map</B>, <B>boolcodes</B>, <B>boolfnames</B>, <B>boolnames</B>, <B>cur_term</B>, <B>numcodes</B>,
51 <B>numfnames</B>, <B>numnames</B>, <B>strcodes</B>, <B>strfnames</B>, <B>strnames</B>, <B>ttytype</B> - <B>curses</B>
52 terminfo global variables
55 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
56 <B>#include</B> <B><curses.h></B>
57 <B>#include</B> <B><term.h></B>
59 <B>chtype</B> <B>acs_map[];</B>
61 <B>SCREEN</B> <B>*</B> <B>SP;</B>
63 <B>TERMINAL</B> <B>*</B> <B>cur_term;</B>
65 <B>char</B> <B>ttytype[];</B>
67 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>boolcodes[];</B>
68 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>boolfnames[];</B>
69 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>boolnames[];</B>
71 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>numcodes[];</B>
72 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>numfnames[];</B>
73 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>numnames[];</B>
75 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>strcodes[];</B>
76 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>strfnames[];</B>
77 <B>NCURSES_CONST</B> <B>char</B> <B>*</B> <B>const</B> <B>strnames[];</B>
80 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
81 This page summarizes variables provided by the <B>curses</B> library's low-
82 level terminfo interface. A more complete description is given in the
83 <B><A HREF="curs_terminfo.3X.html">curs_terminfo(3X)</A></B> manual page.
85 Depending on the configuration, these may be actual variables, or
86 macros (see <B><A HREF="curs_threads.3X.html">curs_threads(3X)</A></B>) which provide read-only access to <I>curs-</I>
87 <I>es</I>'s state. In either case, applications should treat them as read-on-
88 ly to avoid confusing the library.
91 </PRE><H3><a name="h3-Alternate-Character-Set-Mapping">Alternate Character Set Mapping</a></H3><PRE>
92 After initializing the curses or terminfo interfaces, the <B>acs_map</B> array
93 holds information used to translate cells with the <B>A_ALTCHARSET</B> video
94 attribute into line-drawing characters.
96 The encoding of the information in this array has changed periodically.
97 Application developers need only know that it is used for the "ACS_"
98 constants in <curses.h>.
100 The comparable data for the wide-character library is a private vari-
104 </PRE><H3><a name="h3-Current-Terminal-Data">Current Terminal Data</a></H3><PRE>
105 After initializing the curses or terminfo interfaces, the <B>cur_term</B> con-
106 tains data describing the current terminal. This variable is also set
107 as a side-effect of <B><A HREF="curs_initscr.3X.html">set_term(3X)</A></B> and <B><A HREF="curs_initscr.3X.html">delscreen(3X)</A></B>.
109 It is possible to save a value of <B>cur_term</B> for subsequent use as a pa-
110 rameter to <B>set_term</B>, for switching between screens. Alternatively, one
111 can save the return value from <B>newterm</B> or <B><A HREF="curs_terminfo.3X.html">setupterm(3X)</A></B> to reuse in
115 </PRE><H3><a name="h3-Terminfo-Names">Terminfo Names</a></H3><PRE>
116 The <B><A HREF="tic.1M.html">tic(1)</A></B> and <B><A HREF="infocmp.1M.html">infocmp(1)</A></B> programs use lookup tables for the long and
117 short names of terminfo capabilities, as well as the corresponding
118 names for termcap capabilities. These are available to other applica-
119 tions, although the hash-tables used by the terminfo and termcap func-
120 tions are not available.
122 The long terminfo capability names use a "l" (ell) in their names:
123 <B>boolfnames</B>, <B>numfnames</B>, and <B>strfnames</B>.
125 These are the short names for terminfo capabilities: <B>boolnames</B>, <B>num-</B>
126 <B>names</B>, and <B>strnames</B>.
128 These are the corresponding names used for termcap descriptions: <B>bool-</B>
129 <B>codes</B>, <B>numcodes</B>, and <B>strcodes</B>.
132 </PRE><H3><a name="h3-Terminal-Type">Terminal Type</a></H3><PRE>
133 A terminal description begins with one or more terminal names separated
134 by "|" (vertical bars). On initialization of the curses or terminfo
135 interfaces, <B><A HREF="curs_terminfo.3X.html">setupterm(3X)</A></B> copies the terminal names to the array <B>tty-</B>
139 </PRE><H3><a name="h3-Terminfo-Names">Terminfo Names</a></H3><PRE>
140 In addition to the variables, <B><term.h></B> also defines a symbol for each
141 terminfo capability <I>long</I> <I>name</I>. These are in terms of the symbol <B>CUR</B>,
144 #define CUR ((TERMTYPE *)(cur_term))->
146 These symbols provide a faster method of accessing terminfo capabili-
147 ties than using <B><A HREF="curs_terminfo.3X.html">tigetstr(3X)</A></B>, etc.
149 The actual definition of <B>CUR</B> depends upon the implementation, but each
150 terminfo library provides these long names defined to point into the
151 current terminal description loaded into memory.
154 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
155 The low-level terminfo interface is initialized using <B><A HREF="curs_terminfo.3X.html">setupterm(3X)</A></B>.
156 The upper-level curses interface uses the low-level terminfo interface,
160 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
161 X/Open Curses does not describe any of these except for <B>cur_term</B>. (The
162 inclusion of <B>cur_term</B> appears to be an oversight, since other compara-
163 ble low-level information is omitted by X/Open).
165 Other implementations may have comparable variables. Some implementa-
166 tions provide the variables in their libraries, but omit them from the
169 All implementations which provide terminfo interfaces add definitions
170 as described in the <B>Terminfo</B> <B>Names</B> section. Most, but not all, base
171 the definition upon the <B>cur_term</B> variable.
174 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
175 <B><A HREF="curses.3X.html">curses(3X)</A></B>, <B><A HREF="curs_terminfo.3X.html">curs_terminfo(3X)</A></B>, <B><A HREF="curs_threads.3X.html">curs_threads(3X)</A></B>, <B><A HREF="terminfo.5.html">terminfo(5)</A></B>.
179 <B><A HREF="term_variables.3X.html">term_variables(3X)</A></B>
183 <li><a href="#h2-NAME">NAME</a></li>
184 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
185 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
187 <li><a href="#h3-Alternate-Character-Set-Mapping">Alternate Character Set Mapping</a></li>
188 <li><a href="#h3-Current-Terminal-Data">Current Terminal Data</a></li>
189 <li><a href="#h3-Terminfo-Names">Terminfo Names</a></li>
190 <li><a href="#h3-Terminal-Type">Terminal Type</a></li>
191 <li><a href="#h3-Terminfo-Names">Terminfo Names</a></li>
194 <li><a href="#h2-NOTES">NOTES</a></li>
195 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
196 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>