]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/curs_termcap.3x.html
ncurses 4.2
[ncurses.git] / Ada95 / html / curs_termcap.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
4        <STRONG>tgetent</STRONG>, <STRONG>tgetflag</STRONG>, <STRONG>tgetnum</STRONG>, <STRONG>tgetstr</STRONG>, <STRONG>tgoto</STRONG>, <STRONG>tputs</STRONG> - direct
5        <STRONG>curses</STRONG> interface to the terminfo capability database
6
7
8 </PRE>
9 <H2>SYNOPSIS</H2><PRE>
10        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
11        <STRONG>#include</STRONG> <STRONG>&lt;term.h&gt;</STRONG>
12        <STRONG>int</STRONG> <STRONG>tgetent(const</STRONG> <STRONG>char</STRONG> <STRONG>*bp,</STRONG> <STRONG>char</STRONG> <STRONG>*name);</STRONG>
13        <STRONG>int</STRONG> <STRONG>tgetflag(const</STRONG> <STRONG>char</STRONG> <STRONG>*id);</STRONG>
14        <STRONG>int</STRONG> <STRONG>tgetnum(const</STRONG> <STRONG>char</STRONG> <STRONG>*id);</STRONG>
15        <STRONG>char</STRONG> <STRONG>*tgetstr(const</STRONG> <STRONG>char</STRONG> <STRONG>*id,</STRONG> <STRONG>char</STRONG> <STRONG>**area);</STRONG>
16        <STRONG>char</STRONG> <STRONG>*tgoto(const</STRONG> <STRONG>char</STRONG> <STRONG>*cap,</STRONG> <STRONG>int</STRONG> <STRONG>col,</STRONG> <STRONG>int</STRONG> <STRONG>row);</STRONG>
17        <STRONG>int</STRONG> <STRONG>tputs(const</STRONG> <STRONG>char</STRONG> <STRONG>*str,</STRONG> <STRONG>int</STRONG> <STRONG>affcnt,</STRONG> <STRONG>int</STRONG> <STRONG>(*putc)(int));</STRONG>
18
19
20 </PRE>
21 <H2>DESCRIPTION</H2><PRE>
22        These routines are included as a conversion aid  for  pro-
23        grams  that use the <EM>termcap</EM> library.  Their parameters are
24        the same and the routines are emulated using the  <EM>terminfo</EM>
25        database.   Thus, they can only be used to query the capa-
26        bilities of entries for which a terminfo  entry  has  been
27        compiled.
28
29        The  <STRONG>tgetent</STRONG> routine loads the entry for <EM>name</EM>.  It returns
30        1 on success, 0 if there is no such entry, and -1  if  the
31        terminfo  database  could  not  be  found.   The emulation
32        ignores the buffer pointer <EM>bp</EM>.
33
34        The <STRONG>tgetflag</STRONG> routine gets the boolean entry for <EM>id</EM>.
35
36        The <STRONG>tgetnum</STRONG> routine gets the numeric entry for <EM>id</EM>.
37
38        The <STRONG>tgetstr</STRONG> routine returns the string entry for <EM>id</EM>.   Use
39        <STRONG>tputs</STRONG> to output the returned string.
40
41        The  <STRONG>tgoto</STRONG>  routine  instantiates  the parameters into the
42        given capability.  The output from this routine is  to  be
43        passed to <STRONG>tputs</STRONG>.
44
45        The  <STRONG>tputs</STRONG>  routine  is described on the <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3X)</A></STRONG>
46        manual page.  It can retrieve capabilities by either term-
47        cap or terminfo name.
48
49
50
51 </PRE>
52 <H2>RETURN VALUE</H2><PRE>
53        Except  where  explicitly  noted,  routines that return an
54        integer return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4  only  speci-
55        fies  "an  integer  value other than <STRONG>ERR</STRONG>") upon successful
56        completion.
57
58        Routines that return pointers return <STRONG>NULL</STRONG> on error.
59
60
61 </PRE>
62 <H2>BUGS</H2><PRE>
63        If you call <STRONG>tgetstr</STRONG> to fetch <STRONG>ca</STRONG> or any other parameterized
64        notation.  This won't cause problems if all you do with it
65        is call <STRONG>tgoto</STRONG> or <STRONG>tparm</STRONG>, which both expand  terminfo-style.
66
67        Because  terminfo  conventions for representing padding in
68        string capabilities differ  from  termcap's,  <STRONG>tputs("50");</STRONG>
69        will  put  out a literal "50" rather than busy-waiting for
70        50 milliseconds.  Cope with it.
71
72
73 </PRE>
74 <H2>PORTABILITY</H2><PRE>
75        The XSI Curses standard, Issue  4  describes  these  func-
76        tions.   However,  they are marked TO BE WITHDRAWN and may
77        be removed in future versions.
78
79        Neither the XSI Curses standard nor  the  SVr4  man  pages
80        documented  the return values of <STRONG>tgetent</STRONG> correctly, though
81        all three were in fact returned ever since SVr1.
82
83
84 </PRE>
85 <H2>SEE ALSO</H2><PRE>
86        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="putc.3s.html">putc(3S)</A></STRONG>.
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 </PRE>
121 </BODY>
122 </HTML>