Copyright 2019,2020 Thomas E. Dickey *
Copyright 2010-2015,2017 Free Software Foundation, Inc. *
*
Permission is hereby granted, free of charge, to any person obtaining a *
copy of this software and associated documentation files (the *
"Software"), to deal in the Software without restriction, including *
without limitation the rights to use, copy, modify, merge, publish, *
distribute, distribute with modifications, sublicense, and/or sell *
copies of the Software, and to permit persons to whom the Software is *
furnished to do so, subject to the following conditions: *
*
The above copyright notice and this permission notice shall be included *
in all copies or substantial portions of the Software. *
*
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
*
Except as contained in this notice, the name(s) of the above copyright *
holders shall not be used in advertising or otherwise to promote the *
sale, use or other dealings in this Software without prior written *
authorization. *
***************************************************************************
$Id: term_variables.3x,v 1.12 2020/02/02 23:34:34 tom Exp $
#include <curses.h>#include <term.h>
chtype acs_map[]; SCREEN * SP; TERMINAL * cur_term; char ttytype[]; NCURSES_CONST char * const boolcodes[];
NCURSES_CONST char * const boolfnames[];
NCURSES_CONST char * const boolnames[]; NCURSES_CONST char * const numcodes[];
NCURSES_CONST char * const numfnames[];
NCURSES_CONST char * const numnames[]; NCURSES_CONST char * const strcodes[];
NCURSES_CONST char * const strfnames[];
NCURSES_CONST char * const strnames[];
Depending on the configuration, these may be actual variables, or macros (see curs_threads(3X)) which provide read-only access to curses's state. In either case, applications should treat them as read-only to avoid confusing the library.
The encoding of the information in this array has changed periodically. Application developers need only know that it is used for the \*(``ACS_\*('' constants in <curses.h>.
The comparable data for the wide-character library is a private variable.
It is possible to save a value of cur_term for subsequent use as a parameter to set_term, for switching between screens. Alternatively, one can save the return value from newterm or setupterm(3X) to reuse in set_term.
The long terminfo capability names use a \*(``l\*('' (ell) in their names: boolfnames, numfnames, and strfnames.
These are the short names for terminfo capabilities: boolnames, numnames, and strnames.
These are the corresponding names used for termcap descriptions:
boolcodes,
numcodes, and
strcodes.
In addition to the variables, <term.h> also defines a symbol for each terminfo capability long name. These are in terms of the symbol CUR, which is defined
#define CUR ((TERMTYPE *)(cur_term))->
These symbols provide a faster method of accessing terminfo capabilities than using tigetstr(3X), etc.
The actual definition of CUR depends upon the implementation,
but each terminfo library provides these long names defined to point
into the current terminal description loaded into memory.
Other implementations may have comparable variables. Some implementations provide the variables in their libraries, but omit them from the header files.
All implementations which provide terminfo interfaces add definitions as described in the Terminfo Names section. Most, but not all, base the definition upon the cur_term variable.