summaryrefslogtreecommitdiffstats
path: root/ncurses-5.2/doc/html/man/curs_termcap.3x.html
blob: a301dd18f7537026caf8a882d77fec9224e13fd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<HTML>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->

</PRE>
<H2>NAME</H2><PRE>
       <B>tgetent</B>, <B>tgetflag</B>, <B>tgetnum</B>, <B>tgetstr</B>, <B>tgoto</B>, <B>tputs</B> - direct
       <B>curses</B> interface to the terminfo capability database


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>#include</B> <B>&lt;curses.h&gt;</B>
       <B>#include</B> <B>&lt;term.h&gt;</B>
       <B>int</B> <B>tgetent(const</B> <B>char</B> <B>*bp,</B> <B>char</B> <B>*name);</B>
       <B>int</B> <B>tgetflag(const</B> <B>char</B> <B>*id);</B>
       <B>int</B> <B>tgetnum(const</B> <B>char</B> <B>*id);</B>
       <B>char</B> <B>*tgetstr(const</B> <B>char</B> <B>*id,</B> <B>char</B> <B>**area);</B>
       <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>
       <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>


</PRE>
<H2>DESCRIPTION</H2><PRE>
       These routines are included as a conversion aid  for  pro-
       grams  that use the <I>termcap</I> library.  Their parameters are
       the same and the routines are emulated using the  <I>terminfo</I>
       database.   Thus, they can only be used to query the capa-
       bilities of entries for which a terminfo  entry  has  been
       compiled.

       The  <B>tgetent</B> routine loads the entry for <I>name</I>.  It returns
       1 on success, 0 if there is no such entry, and -1  if  the
       terminfo  database  could  not  be  found.   The emulation
       ignores the buffer pointer <I>bp</I>.

       The <B>tgetflag</B> routine gets the boolean  entry  for  <I>id</I>,  or
       zero if it is not available.

       The  <B>tgetnum</B>  routine gets the numeric entry for <I>id</I>, or -1
       if it is not available.

       The <B>tgetstr</B> routine returns the string entry  for  <I>id</I>,  or
       zero  if  it  is  not  available.  Use <B>tputs</B> to output the
       returned string.  The return value will also be copied  to
       the  buffer pointed to by <I>area</I>, and the <I>area</I> value will be
       updated to point past the null ending this value.

       The <B>tgoto</B> routine instantiates  the  parameters  into  the
       given  capability.   The output from this routine is to be
       passed to <B>tputs</B>.

       The <B>tputs</B> routine is described  on  the  <B><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></B>
       manual page.  It can retrieve capabilities by either term-
       cap or terminfo name.



</PRE>
<H2>RETURN VALUE</H2><PRE>
       Except where explicitly noted,  routines  that  return  an
       integer  return  <B>ERR</B> upon failure and <B>OK</B> (SVr4 only speci-
       fies "an integer value other than  <B>ERR</B>")  upon  successful
       completion.

       Routines that return pointers return <B>NULL</B> on error.


</PRE>
<H2>BUGS</H2><PRE>
       If you call <B>tgetstr</B> to fetch <B>ca</B> or any other parameterized
       string, be aware that it  will  be  returned  in  terminfo
       notation,  not  the older and not-quite-compatible termcap
       notation.  This won't cause problems if all you do with it
       is  call <B>tgoto</B> or <B>tparm</B>, which both expand terminfo-style.

       Because terminfo conventions for representing  padding  in
       string  capabilities  differ  from termcap's, <B>tputs("50");</B>
       will put out a literal "50" rather than  busy-waiting  for
       50 milliseconds.  Cope with it.


</PRE>
<H2>PORTABILITY</H2><PRE>
       The  XSI  Curses  standard,  Issue 4 describes these func-
       tions.  However, they are marked TO BE WITHDRAWN  and  may
       be removed in future versions.

       Neither  the  XSI  Curses  standard nor the SVr4 man pages
       documented the return values of <B>tgetent</B> correctly,  though
       all three were in fact returned ever since SVr1.


</PRE>
<H2>SEE ALSO</H2><PRE>
       <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>.





























</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>