4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>tgetent</B>, <B>tgetflag</B>, <B>tgetnum</B>, <B>tgetstr</B>, <B>tgoto</B>, <B>tputs</B> - direct
9 <B>curses</B> interface to the terminfo capability database
13 <H2>SYNOPSIS</H2><PRE>
14 <B>#include</B> <B><curses.h></B>
15 <B>#include</B> <B><term.h></B>
16 <B>int</B> <B>tgetent(const</B> <B>char</B> <B>*bp,</B> <B>char</B> <B>*name);</B>
17 <B>int</B> <B>tgetflag(const</B> <B>char</B> <B>*id);</B>
18 <B>int</B> <B>tgetnum(const</B> <B>char</B> <B>*id);</B>
19 <B>char</B> <B>*tgetstr(const</B> <B>char</B> <B>*id,</B> <B>char</B> <B>**area);</B>
20 <B>char</B> <B>*tgoto(const</B> <B>char</B> <B>*cap,</B> <B>int</B> <B>col,</B> <B>int</B> <B>row);</B>
21 <B>int</B> <B>tputs(const</B> <B>char</B> <B>*str,</B> <B>int</B> <B>affcnt,</B> <B>int</B> <B>(*putc)(int));</B>
25 <H2>DESCRIPTION</H2><PRE>
26 These routines are included as a conversion aid for pro-
27 grams that use the <I>termcap</I> library. Their parameters are
28 the same and the routines are emulated using the <I>terminfo</I>
29 database. Thus, they can only be used to query the capa-
30 bilities of entries for which a terminfo entry has been
33 The <B>tgetent</B> routine loads the entry for <I>name</I>. It returns
34 1 on success, 0 if there is no such entry, and -1 if the
35 terminfo database could not be found. The emulation
36 ignores the buffer pointer <I>bp</I>.
38 The <B>tgetflag</B> routine gets the boolean entry for <I>id</I>, or
39 zero if it is not available.
41 The <B>tgetnum</B> routine gets the numeric entry for <I>id</I>, or -1
42 if it is not available.
44 The <B>tgetstr</B> routine returns the string entry for <I>id</I>, or
45 zero if it is not available. Use <B>tputs</B> to output the
46 returned string. The return value will also be copied to
47 the buffer pointed to by <I>area</I>, and the <I>area</I> value will be
48 updated to point past the null ending this value.
50 The <B>tgoto</B> routine instantiates the parameters into the
51 given capability. The output from this routine is to be
52 passed to <B>tputs</B>.
54 The <B>tputs</B> routine is described on the <B><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></B>
55 manual page. It can retrieve capabilities by either term-
61 <H2>RETURN VALUE</H2><PRE>
62 Except where explicitly noted, routines that return an
63 integer return <B>ERR</B> upon failure and <B>OK</B> (SVr4 only speci-
64 fies "an integer value other than <B>ERR</B>") upon successful
67 Routines that return pointers return <B>NULL</B> on error.
72 If you call <B>tgetstr</B> to fetch <B>ca</B> or any other parameterized
73 string, be aware that it will be returned in terminfo
74 notation, not the older and not-quite-compatible termcap
75 notation. This won't cause problems if all you do with it
76 is call <B>tgoto</B> or <B>tparm</B>, which both expand terminfo-style.
78 Because terminfo conventions for representing padding in
79 string capabilities differ from termcap's, <B>tputs("50");</B>
80 will put out a literal "50" rather than busy-waiting for
81 50 milliseconds. Cope with it.
85 <H2>PORTABILITY</H2><PRE>
86 The XSI Curses standard, Issue 4 describes these func-
87 tions. However, they are marked TO BE WITHDRAWN and may
88 be removed in future versions.
90 Neither the XSI Curses standard nor the SVr4 man pages
91 documented the return values of <B>tgetent</B> correctly, though
92 all three were in fact returned ever since SVr1.
96 <H2>SEE ALSO</H2><PRE>
97 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="terminfo.5.html">terminfo(5)</A></B>, <B><A HREF="putc.3S.html">putc(3S)</A></B>.
130 Man(1) output converted with
131 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>