1term_variables(3X)                                          term_variables(3X)
2
3
4

NAME

6       SP, acs_map, boolcodes, boolfnames, boolnames, cur_term, numcodes,
7       numfnames, numnames, strcodes, strfnames, strnames, ttytype - curses
8       terminfo global variables
9

SYNOPSIS

11       #include <curses.h>
12       #include <term.h>
13
14       chtype acs_map[];
15
16       SCREEN * SP;
17
18       TERMINAL * cur_term;
19
20       char ttytype[];
21
22       NCURSES_CONST char * const boolcodes[];
23       NCURSES_CONST char * const boolfnames[];
24       NCURSES_CONST char * const boolnames[];
25
26       NCURSES_CONST char * const numcodes[];
27       NCURSES_CONST char * const numfnames[];
28       NCURSES_CONST char * const numnames[];
29
30       NCURSES_CONST char * const strcodes[];
31       NCURSES_CONST char * const strfnames[];
32       NCURSES_CONST char * const strnames[];
33

DESCRIPTION

35       This  page  summarizes  variables provided by the curses library's low-
36       level terminfo interface.  A more complete description is given in  the
37       curs_terminfo(3X) manual page.
38
39       Depending  on  the  configuration,  these  may  be actual variables, or
40       macros (see curs_threads(3X)) which provide read-only access  to  curs‐
41       es's state.  In either case, applications should treat them as read-on‐
42       ly to avoid confusing the library.
43
44   Alternate Character Set Mapping
45       After initializing the curses or terminfo interfaces, the acs_map array
46       holds  information  used to translate cells with the A_ALTCHARSET video
47       attribute into line-drawing characters.
48
49       The encoding of the information in this array has changed periodically.
50       Application  developers  need  only know that it is used for the “ACS_”
51       constants in <curses.h>.
52
53       The comparable data for the wide-character library is a  private  vari‐
54       able.
55
56   Current Terminal Data
57       After initializing the curses or terminfo interfaces, the cur_term con‐
58       tains data describing the current terminal.  This variable is also  set
59       as a side-effect of set_term(3X) and delscreen(3X).
60
61       It  is possible to save a value of cur_term for subsequent use as a pa‐
62       rameter to set_term, for switching between screens.  Alternatively, one
63       can  save  the  return  value from newterm or setupterm(3X) to reuse in
64       set_term.
65
66   Terminfo Names
67       The tic(1) and infocmp(1) programs use lookup tables for the  long  and
68       short  names  of  terminfo  capabilities,  as well as the corresponding
69       names for termcap capabilities.  These are available to other  applica‐
70       tions,  although the hash-tables used by the terminfo and termcap func‐
71       tions are not available.
72
73       The long terminfo capability names use a  “l”  (ell)  in  their  names:
74       boolfnames, numfnames, and strfnames.
75
76       These  are  the  short names for terminfo capabilities: boolnames, num‐
77       names, and strnames.
78
79       These are the corresponding names used for termcap descriptions:  bool‐
80       codes, numcodes, and strcodes.
81
82   Terminal Type
83       A terminal description begins with one or more terminal names separated
84       by “|” (vertical bars).  On initialization of the  curses  or  terminfo
85       interfaces,  setupterm(3X)  copies the terminal names to the array tty‐
86       type.
87
88   Terminfo Names
89       In addition to the variables, <term.h> also defines a symbol  for  each
90       terminfo  capability  long name.  These are in terms of the symbol CUR,
91       which is defined
92
93       #define CUR ((TERMTYPE *)(cur_term))->
94
95       These symbols provide a faster method of accessing  terminfo  capabili‐
96       ties than using tigetstr(3X), etc.
97
98       The  actual definition of CUR depends upon the implementation, but each
99       terminfo library provides these long names defined to  point  into  the
100       current terminal description loaded into memory.
101

NOTES

103       The  low-level  terminfo  interface is initialized using setupterm(3X).
104       The upper-level curses interface uses the low-level terminfo interface,
105       internally.
106

PORTABILITY

108       X/Open Curses does not describe any of these except for cur_term.  (The
109       inclusion of cur_term appears to be an oversight, since other  compara‐
110       ble low-level information is omitted by X/Open).
111
112       Other  implementations may have comparable variables.  Some implementa‐
113       tions provide the variables in their libraries, but omit them from  the
114       header files.
115
116       All  implementations  which provide terminfo interfaces add definitions
117       as described in the Terminfo Names section.  Most, but  not  all,  base
118       the definition upon the cur_term variable.
119

SEE ALSO

121       curses(3X), curs_terminfo(3X), curs_threads(3X), terminfo(5).
122
123
124
125                                                            term_variables(3X)
Impressum