logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SP, acs_map, boolcodes, boolfnames, boolnames, cur_term, numcodes, numfnames, numnames, strcodes,

Description

       This page summarizes variables provided by the curses library's lower-level terminfo interface.  Locate a
       more complete description in the terminfo(3NCURSES) manual page.

       Depending on  ncurses's  build-time  configuration,  these  may  be  actual  variables,  or  macros  (see
       threads(3NCURSES))  that provide read-only access to curses's state.  In either case, applications should
       treat them as read-only to avoid confusing the library.

   AlternateCharacterSetMapping
       After initializing the curses or terminfo  interfaces,  the  acs_map  array  holds  information  used  to
       translate cells with the A_ALTCHARSET video attribute into line-drawing characters.

       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 are not exposed as symbols in the API.

   CurrentTerminalData
       After  initializing  the  curses  or  terminfo  interfaces, cur_term contains data describing the current
       terminal.  It is also updated as a side-effect of set_term(3NSES) and delscreen(3NCURSES).

       It is possible to save a value of cur_term for subsequent use  as  a  parameter  to  set_term(3NSES)  for
       switching  between  screens.   Alternatively,  one  can  save  the return value from newterm(3NCURSES) or
       setupterm(3NCURSES) to reuse in set_term(3NSES).

   terminfoLookupTables
       The tic(1) and infocmp(1)  programs  use  lookup  tables  for  the  long  and  short  names  of  terminfo
       capabilities,  as well as the corresponding names for termcap capabilities.  These are available to other
       applications, though the hash tables used by the terminfo and termcap functions are not.

       terminfo stores capability names in arrays with an “f” (eff) in their names: boolfnames,  numfnames,  and
       strfnames.   It  stores  the briefer capability codes in arrays without the “f”: boolnames, numnames, and
       strnames.  The corresponding termcap capability codes are stored in boolcodes,  numcodes,  and  strcodes.
       terminfo(5) catalogs these.

   TerminalType
       A  terminal  description  begins  with  one  or more terminal names separated by “|” (vertical bars).  On
       initialization of the curses or terminfo interfaces, setupterm(3NCURSES) copies the terminal name to  the
       array ttytype.

   terminfoNames
       In  addition to the variables, term.h also defines a symbol for each terminfo capability 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,  for  example,
       tigetstr(3NCURSES).

       The definition of CUR is implementation-dependent, but each terminfo library defines these names to point
       into  the  in-memory  description  of  the  current  terminal.   For example, in ncurses, the expressions
       tigetstr("key_dc") and “CURStrings[59]” are equivalent.

   terminfoandcursessetupterm(3NCURSES) initializes the lower-level terminfo interface.  The  higher-level  curses  interface
       uses  the  terminfo  interface internally; the symbol SP bridges the cursesSCREEN type with the terminfoTERMINAL type.

Name

SP,  acs_map,  boolcodes,  boolfnames,  boolnames,  cur_term,  numcodes,  numfnames,  numnames, strcodes,
       strfnames, strnames, ttytype - terminfo global variables

Portability

       X/Open Curses does not describe any of these symbols except for cur_term.   (The  inclusion  of  cur_term
       appears to be an oversight, since other comparable low-level information is omitted by X/Open.)

       Other implementations may have comparable variables.  Some implementations provide the variables in their
       libraries, but omit them from the header files.

       All implementations that provide terminfo interfaces add definitions as described in the “terminfo Names”
       section above.  Most, but not all, base the definition upon the cur_term variable.

See Also

ncurses(3NCURSES), terminfo(3NCURSES), threads(3NCURSES), terminfo(5)

ncurses 6.5                                        2024-12-28                       terminfo_variables(3NCURSES)

Synopsis

#include<curses.h>#include<term.h>chtypeacs_map[];SCREEN*SP;TERMINAL*cur_term;charttytype[];NCURSES_CONSTchar*constboolcodes[];NCURSES_CONSTchar*constboolfnames[];NCURSES_CONSTchar*constboolnames[];NCURSES_CONSTchar*constnumcodes[];NCURSES_CONSTchar*constnumfnames[];NCURSES_CONSTchar*constnumnames[];NCURSES_CONSTchar*conststrcodes[];NCURSES_CONSTchar*conststrfnames[];NCURSES_CONSTchar*conststrnames[];

See Also