

tgetent()         Terminal-Independent Operation        tgetent()




Read termcap entry

iinntt ttggeetteenntt(_b_p, _n_a_m_e)
cchhaarr *_b_p, *_n_a_m_e;

tgetent is one  of a set of functions that  help COHERENT to per-
form terminal-independent operations.  It extracts the entry from
file  /etc/termcap for  the terminal  name and  writes it  into a
buffer at  address bp.  bp should be a  character buffer of 1,024
bytes and  must be retained  through all subsequent  calls to the
other functions.   It returns -1 if  it cannot open /etc/termcap,
zero if the  terminal name given does not have  an entry, and one
upon a successful search.

tgetent  first looks  in the  environment to  see if  the termcap
variable had  already been  set.  If  it finds that  the variable
termcap has been set, that the value does _n_o_t begin with a slash,
and that  the terminal type  name in the tteerrmmccaapp  variable is the
same as that in  the environment variable TERM, then ttggeetteenntt uses
the  termcap string  instead  of reading  the file  /etc/termcap.
However, if  the termcap string does begin with  a slash, then it
is used  as the  pathname of  a terminal capabilities  file other
than /etc/termcap.  This  can speed entry into programs that call
tgetent, and can be used to help debug new terminal descriptions.

***** Files *****

/eettcc/tteerrmmccaapp -- Terminal capabilities data base
/uussrr/lliibb/lliibbtteerrmm.aa -- Function library

***** See Also *****

termcap, terminal-independent operation























COHERENT Lexicon                                           Page 1


