


curs_terminfo(3X)MISCELLANEOUS LIBRARY FUNCTIONScurs_terminfo(3X)



NNNNAAAAMMMMEEEE
     _cccc_uuuu_rrrr_ssss______tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo:	 _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm,	_ssss_eeee_tttt_tttt_eeee_rrrr_mmmm,     _ssss_eeee_tttt______cccc_uuuu_rrrr_tttt_eeee_rrrr_mmmm,
     _dddd_eeee_llll______cccc_uuuu_rrrr_tttt_eeee_rrrr_mmmm,   _rrrr_eeee_ssss_tttt_aaaa_rrrr_tttt_tttt_eeee_rrrr_mmmm,  _tttt_pppp_aaaa_rrrr_mmmm,  _tttt_pppp_uuuu_tttt_ssss,  _pppp_uuuu_tttt_pppp,	 _vvvv_iiii_dddd_pppp_uuuu_tttt_ssss,
     _vvvv_iiii_dddd_aaaa_tttt_tttt_rrrr,  _mmmm_vvvv_cccc_uuuu_rrrr,  _tttt_iiii_gggg_eeee_tttt_ffff_llll_aaaa_gggg,  _tttt_iiii_gggg_eeee_tttt_nnnn_uuuu_mmmm,  _tttt_iiii_gggg_eeee_tttt_ssss_tttt_rrrr	-  _cccc_uuuu_rrrr_ssss_eeee_ssss
     interfaces	to terminfo database

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>>
     _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_eeee_rrrr_mmmm_...._hhhh_>>>>

     _iiii_nnnn_tttt _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm_((((_cccc_hhhh_aaaa_rrrr	_****_tttt_eeee_rrrr_mmmm_,,,, _iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _iiii_nnnn_tttt _****_eeee_rrrr_rrrr_rrrr_eeee_tttt_))))_;;;;

     _iiii_nnnn_tttt _ssss_eeee_tttt_tttt_eeee_rrrr_mmmm_((((_cccc_hhhh_aaaa_rrrr _****_tttt_eeee_rrrr_mmmm_))))_;;;;
     _iiii_nnnn_tttt _ssss_eeee_tttt______cccc_uuuu_rrrr_tttt_eeee_rrrr_mmmm_((((_TTTT_EEEE_RRRR_MMMM_IIII_NNNN_AAAA_LLLL _****_nnnn_tttt_eeee_rrrr_mmmm_))))_;;;;

     _iiii_nnnn_tttt _dddd_eeee_llll______cccc_uuuu_rrrr_tttt_eeee_rrrr_mmmm_((((_TTTT_EEEE_RRRR_MMMM_IIII_NNNN_AAAA_LLLL _****_oooo_tttt_eeee_rrrr_mmmm_))))_;;;;
     _iiii_nnnn_tttt _rrrr_eeee_ssss_tttt_aaaa_rrrr_tttt_tttt_eeee_rrrr_mmmm_((((_cccc_hhhh_aaaa_rrrr _****_tttt_eeee_rrrr_mmmm_,,,, _iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _iiii_nnnn_tttt _****_eeee_rrrr_rrrr_rrrr_eeee_tttt_))))_;;;;

     _cccc_hhhh_aaaa_rrrr _****_tttt_pppp_aaaa_rrrr_mmmm_((((_cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_1111_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_2222_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_3333_,,,,
	  _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_4444_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt	_pppp_5555_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_6666_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_7777_,,,,
	  _llll_oooo_nnnn_gggg _iiii_nnnn_tttt _pppp_8888_,,,, _llll_oooo_nnnn_gggg _iiii_nnnn_tttt	_pppp_9999_))))_;;;;
     _iiii_nnnn_tttt _tttt_pppp_uuuu_tttt_ssss_((((_cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_,,,, _iiii_nnnn_tttt _aaaa_ffff_ffff_cccc_nnnn_tttt_,,,, _iiii_nnnn_tttt _((((_****_pppp_uuuu_tttt_cccc_))))_((((_cccc_hhhh_aaaa_rrrr_))))_))))_;;;;

     _iiii_nnnn_tttt _pppp_uuuu_tttt_pppp_((((_cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_))))_;;;;
     _iiii_nnnn_tttt _vvvv_iiii_dddd_pppp_uuuu_tttt_ssss_((((_cccc_hhhh_tttt_yyyy_pppp_eeee	_aaaa_tttt_tttt_rrrr_ssss_,,,, _iiii_nnnn_tttt _((((_****_pppp_uuuu_tttt_cccc_))))_((((_cccc_hhhh_aaaa_rrrr_))))_))))_;;;;

     _iiii_nnnn_tttt _vvvv_iiii_dddd_aaaa_tttt_tttt_rrrr_((((_cccc_hhhh_tttt_yyyy_pppp_eeee	_aaaa_tttt_tttt_rrrr_ssss_))))_;;;;
     _iiii_nnnn_tttt _mmmm_vvvv_cccc_uuuu_rrrr_((((_iiii_nnnn_tttt _oooo_llll_dddd_rrrr_oooo_wwww_,,,, _iiii_nnnn_tttt _oooo_llll_dddd_cccc_oooo_llll_,,,, _iiii_nnnn_tttt _nnnn_eeee_wwww_rrrr_oooo_wwww_,,,, _iiii_nnnn_tttt _nnnn_eeee_wwww_cccc_oooo_llll_))))_;;;;

     _iiii_nnnn_tttt _tttt_iiii_gggg_eeee_tttt_ffff_llll_aaaa_gggg_((((_cccc_hhhh_aaaa_rrrr	_****_cccc_aaaa_pppp_nnnn_aaaa_mmmm_eeee_))))_;;;;
     _iiii_nnnn_tttt _tttt_iiii_gggg_eeee_tttt_nnnn_uuuu_mmmm_((((_cccc_hhhh_aaaa_rrrr _****_cccc_aaaa_pppp_nnnn_aaaa_mmmm_eeee_))))_;;;;

     _iiii_nnnn_tttt _tttt_iiii_gggg_eeee_tttt_ssss_tttt_rrrr_((((_cccc_hhhh_aaaa_rrrr _****_cccc_aaaa_pppp_nnnn_aaaa_mmmm_eeee_))))_;;;;

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     These low-level routines must be  called  by  programs  that
     have  to  deal directly with the _t_e_r_m_i_n_f_o database	to handle
     certain terminal capabilities, such as programming	 function
     keys.  For	all other functionality, _cccc_uuuu_rrrr_ssss_eeee_ssss	routines are more
     suitable and their	use is recommended.  Initially,	_ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm
     should  be	 called.   Note	 that  _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm is automatically
     called by _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr and _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm.   This  defines  the  set  of
     terminal-dependent	 variables  [listed in _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4)].  The
     _t_e_r_m_i_n_f_o variables	_llll_iiii_nnnn_eeee_ssss  and  _cccc_oooo_llll_uuuu_mmmm_nnnn_ssss  are  initialized  by
     _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm	as  follows:   If _uuuu_ssss_eeee______eeee_nnnn_vvvv_((((_FFFF_AAAA_LLLL_SSSS_EEEE_)))) has been called,
     values for	_llll_iiii_nnnn_eeee_ssss and _cccc_oooo_llll_uuuu_mmmm_nnnn_ssss specified in _t_e_r_m_i_n_f_o	are used.
     Otherwise,	 if  the  environment variables	_LLLL_IIII_NNNN_EEEE_SSSS and _CCCC_OOOO_LLLL_UUUU_MMMM_NNNN_SSSS
     exist, their values are used.  If	these  environment  vari-
     ables  do	not exist and the program is running in	a window,
     the current window	size is	used.  Otherwise, if the environ-
     ment  variables  do  not  exist,  the  values  for	_llll_iiii_nnnn_eeee_ssss and
     _cccc_oooo_llll_uuuu_mmmm_nnnn_ssss specified in the _t_e_r_m_i_n_f_o database	 are  used.   The
     header  files _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>> and _<<<<_tttt_eeee_rrrr_mmmm_...._hhhh_>>>> should be included (in



			  Last change:				1





curs_terminfo(3X)MISCELLANEOUS LIBRARY FUNCTIONScurs_terminfo(3X)



     this order)  to  get  the	definitions  for  these	 strings,
     numbers,  and flags.  Parameterized strings should	be passed
     through _tttt_pppp_aaaa_rrrr_mmmm to instantiate  them.   All	_t_e_r_m_i_n_f_o  strings
     [including	the output of _tttt_pppp_aaaa_rrrr_mmmm] should be printed with _tttt_pppp_uuuu_tttt_ssss
     or	_pppp_uuuu_tttt_pppp.  Call the	_rrrr_eeee_ssss_eeee_tttt______ssss_hhhh_eeee_llll_llll______mmmm_oooo_dddd_eeee to restore the	tty modes
     before  exiting  [see  curs_kernel(3X)].  Programs	which use
     cursor addressing should output _eeee_nnnn_tttt_eeee_rrrr______cccc_aaaa______mmmm_oooo_dddd_eeee  upon  startup
     and  should  output  _eeee_xxxx_iiii_tttt______cccc_aaaa______mmmm_oooo_dddd_eeee	before exiting.	 Programs
     desiring shell escapes should call	_rrrr_eeee_ssss_eeee_tttt______ssss_hhhh_eeee_llll_llll______mmmm_oooo_dddd_eeee and out-
     put  _eeee_xxxx_iiii_tttt______cccc_aaaa______mmmm_oooo_dddd_eeee before the shell	is called and should out-
     put _eeee_nnnn_tttt_eeee_rrrr______cccc_aaaa______mmmm_oooo_dddd_eeee and call	_rrrr_eeee_ssss_eeee_tttt______pppp_rrrr_oooo_gggg______mmmm_oooo_dddd_eeee	 after	returning
     from the shell.

     The _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm routine reads in the	_t_e_r_m_i_n_f_o  database,  ini-
     tializing	the  _t_e_r_m_i_n_f_o structures, but does not set up the
     output virtualization structures used by _cccc_uuuu_rrrr_ssss_eeee_ssss.  The termi-
     nal  type is the character	string _t_e_r_m; if	_t_e_r_m is	null, the
     environment variable _TTTT_EEEE_RRRR_MMMM is used.	 All output  is	 to  file
     descriptor	 _ffff_iiii_llll_dddd_eeee_ssss	 which	is  initialized	 for  output.  If
     _e_r_r_r_e_t is not null, then _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm	returns	 _OOOO_KKKK  or	 _EEEE_RRRR_RRRR  and
     stores  a	status value in	the integer pointed to by _e_r_r_r_e_t.
     A status of _1111 in _e_r_r_r_e_t is	normal,	_0000 means	that the terminal
     could  not	be found, and _----_1111 means that the	_t_e_r_m_i_n_f_o database
     could not be found.  If _e_r_r_r_e_t is null, _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm prints  an
     error  message  upon  finding an error and	exits.	Thus, the
     simplest call is:
	  _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm_((((_((((_cccc_hhhh_aaaa_rrrr _****_))))_0000_,,,, _1111_,,,, _((((_iiii_nnnn_tttt _****_))))_0000_))))_;;;;,
     which uses	all the	defaults and sends the output to  _ssss_tttt_dddd_oooo_uuuu_tttt.
     The  _ssss_eeee_tttt_tttt_eeee_rrrr_mmmm  routine  is	being replaced by _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm.  The
     call:
	  _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm_((((_t_e_r_m_,,,, _1111_,,,, _((((_iiii_nnnn_tttt _****_))))_0000_))))
     provides  the  same  functionality	 as  _ssss_eeee_tttt_tttt_eeee_rrrr_mmmm_((((_t_e_r_m_)))).   The
     _ssss_eeee_tttt_tttt_eeee_rrrr_mmmm  routine  is  included here for compatibility and is
     supported at Level	2.   The  _ssss_eeee_tttt______cccc_uuuu_rrrr_tttt_eeee_rrrr_mmmm  routine	sets  the
     variable  _cccc_uuuu_rrrr______tttt_eeee_rrrr_mmmm	 to  _n_t_e_r_m, and	makes all of the _t_e_r_m_i_n_f_o
     boolean, numeric, and string variables use	the  values  from
     _n_t_e_r_m.   The  _dddd_eeee_llll______cccc_uuuu_rrrr_tttt_eeee_rrrr_mmmm routine frees the space pointed to
     by	_o_t_e_r_m and makes	it available for further use.	If  _o_t_e_r_m
     is	 the  same as _cccc_uuuu_rrrr______tttt_eeee_rrrr_mmmm,	references to any of the _t_e_r_m_i_n_f_o
     boolean, numeric, and string variables thereafter may  refer
     to	invalid	memory locations until another _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm has been
     called.  The _rrrr_eeee_ssss_tttt_aaaa_rrrr_tttt_tttt_eeee_rrrr_mmmm routine is similar to _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm and
     _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr,  except that it is called	after restoring	memory to
     a previous	state.	It assumes that	the windows and	the input
     and  output  options  are the same	as when	memory was saved,
     but the terminal type and baud rate may be	 different.   The
     _tttt_pppp_aaaa_rrrr_mmmm  routine  instantiates  the string _s_t_r with parameters
     _p_i.  A pointer is returned	to the result  of  _s_t_r	with  the
     parameters	 applied.   The	 _tttt_pppp_uuuu_tttt_ssss	routine	 applies  padding
     information to the	string _s_t_r and outputs it.  The	_s_t_r  must
     be	 a  terminfo  string  variable	or  the	return value from
     _tttt_pppp_aaaa_rrrr_mmmm, _tttt_gggg_eeee_tttt_ssss_tttt_rrrr, or	_tttt_gggg_oooo_tttt_oooo.	_a_f_f_c_n_t is  the	number	of  lines



			  Last change:				2






curs_terminfo(3X)MISCELLANEOUS LIBRARY FUNCTIONScurs_terminfo(3X)



     affected,	or  1  if not applicable.  _p_u_t_c	is a _pppp_uuuu_tttt_cccc_hhhh_aaaa_rrrr-like
     routine to	which the characters are passed, one at	a time.

     The _pppp_uuuu_tttt_pppp routine calls _tttt_pppp_uuuu_tttt_ssss_((((_s_t_r_,,,, _1111_,,,,  _pppp_uuuu_tttt_cccc_hhhh_aaaa_rrrr_)))).   Note  that
     the  output of _pppp_uuuu_tttt_pppp always	goes to	_ssss_tttt_dddd_oooo_uuuu_tttt,	not to the _f_i_l_d_e_s
     specified in _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm.  The _vvvv_iiii_dddd_pppp_uuuu_tttt_ssss  routine  displays  the
     string  on	 the  terminal in the video attribute mode _a_t_t_r_s,
     which  is	any  combination  of  the  attributes  listed  in
     _cccc_uuuu_rrrr_ssss_eeee_ssss(3X).   The	characters are passed to the _pppp_uuuu_tttt_cccc_hhhh_aaaa_rrrr-like
     routine _p_u_t_c.  The	_vvvv_iiii_dddd_aaaa_tttt_tttt_rrrr	routine	is like	the _vvvv_iiii_dddd_pppp_uuuu_tttt_ssss  rou-
     tine,  except  that  it  outputs through _pppp_uuuu_tttt_cccc_hhhh_aaaa_rrrr.	The _mmmm_vvvv_cccc_uuuu_rrrr
     routine provides low-level	cursor	motion.	  The  _tttt_iiii_gggg_eeee_tttt_ffff_llll_aaaa_gggg,
     _tttt_iiii_gggg_eeee_tttt_nnnn_uuuu_mmmm and _tttt_iiii_gggg_eeee_tttt_ssss_tttt_rrrr routines return the value of	the capa-
     bility corresponding to the _t_e_r_m_i_n_f_o _c_a_p_n_a_m_e passed to them,
     such  as  _xxxx_eeee_nnnn_llll.  With the _tttt_iiii_gggg_eeee_tttt_ffff_llll_aaaa_gggg routine, the value _----_1111 is
     returned if _c_a_p_n_a_m_e is not	a boolean capability.	With  the
     _tttt_iiii_gggg_eeee_tttt_nnnn_uuuu_mmmm routine, the value _----_2222 is returned	if _c_a_p_n_a_m_e is not
     a numeric capability.  With the _tttt_iiii_gggg_eeee_tttt_ssss_tttt_rrrr routine, the  value
     _((((_cccc_hhhh_aaaa_rrrr  _****_))))_----_1111  is returned if _c_a_p_n_a_m_e is not	a string capabil-
     ity.  The _c_a_p_n_a_m_e for each	capability is given in the  table
     column  entitled _c_a_p_n_a_m_e code in the capabilities section of
     _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4).  _cccc_hhhh_aaaa_rrrr	_****_bbbb_oooo_oooo_llll_nnnn_aaaa_mmmm_eeee_ssss, _****_bbbb_oooo_oooo_llll_cccc_oooo_dddd_eeee_ssss,	_****_bbbb_oooo_oooo_llll_ffff_nnnn_aaaa_mmmm_eeee_ssss  _cccc_hhhh_aaaa_rrrr
     _****_nnnn_uuuu_mmmm_nnnn_aaaa_mmmm_eeee_ssss,	 _****_nnnn_uuuu_mmmm_cccc_oooo_dddd_eeee_ssss, _****_nnnn_uuuu_mmmm_ffff_nnnn_aaaa_mmmm_eeee_ssss _cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_nnnn_aaaa_mmmm_eeee_ssss, _****_ssss_tttt_rrrr_cccc_oooo_dddd_eeee_ssss,
     _****_ssss_tttt_rrrr_ffff_nnnn_aaaa_mmmm_eeee_ssss	These null-terminated  arrays  contain	the  _c_a_p_-
     _n_a_m_e_s,  the _t_e_r_m_c_a_p codes,	and the	full C names, for each of
     the _t_e_r_m_i_n_f_o variables.

RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
     All routines return the integer  _EEEE_RRRR_RRRR  upon	 failure  and  an
     integer  value  other  than  _EEEE_RRRR_RRRR upon successful completion,
     unless otherwise noted in	the  preceding	routine	 descrip-
     tions.   Routines that return pointers always return _NNNN_UUUU_LLLL_LLLL on
     error.

NNNNOOOOTTTTEEEESSSS
     The header	file _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>>	automatically includes the header
     files _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>> and _<<<<_uuuu_nnnn_cccc_tttt_rrrr_llll_...._hhhh_>>>>.

     The _ssss_eeee_tttt_uuuu_pppp_tttt_eeee_rrrr_mmmm routine should be used in place of _ssss_eeee_tttt_tttt_eeee_rrrr_mmmm.

     Note that _vvvv_iiii_dddd_aaaa_tttt_tttt_rrrr and _vvvv_iiii_dddd_pppp_uuuu_tttt_ssss may be macros.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     _cccc_uuuu_rrrr_ssss_eeee_ssss(3X), _cccc_uuuu_rrrr_ssss______iiii_nnnn_iiii_tttt_ssss_cccc_rrrr(3X), _cccc_uuuu_rrrr_ssss______kkkk_eeee_rrrr_nnnn_eeee_llll(3X),
     _cccc_uuuu_rrrr_ssss______tttt_eeee_rrrr_mmmm_cccc_aaaa_pppp(3X), _pppp_uuuu_tttt_cccc(3S), _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4).










			  Last change:				3



