]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/man/curs_termcap.3x.html
ncurses 5.0
[ncurses.git] / Ada95 / html / man / curs_termcap.3x.html
1 <HTML>
2 <BODY>
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><curses.h></STRONG>
11        <STRONG>#include</STRONG> <STRONG><term.h></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>,  or
35        zero if it is not available.
36
37        The  <STRONG>tgetnum</STRONG>  routine gets the numeric entry for <EM>id</EM>, or -1
38        if it is not available.
39
40        The <STRONG>tgetstr</STRONG> routine returns the string entry  for  <EM>id</EM>,  or
41        zero  if  it  is  not  available.  Use <STRONG>tputs</STRONG> to output the
42        returned string.
43
44        The <STRONG>tgoto</STRONG> routine instantiates  the  parameters  into  the
45        given  capability.   The output from this routine is to be
46        passed to <STRONG>tputs</STRONG>.
47
48        The <STRONG>tputs</STRONG> routine is described  on  the  <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3X)</A></STRONG>
49        manual page.  It can retrieve capabilities by either term-
50        cap or terminfo name.
51
52
53
54 </PRE>
55 <H2>RETURN VALUE</H2><PRE>
56        Except where explicitly noted,  routines  that  return  an
57        integer  return  <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4 only speci-
58        fies "an integer value other than  <STRONG>ERR</STRONG>")  upon  successful
59        completion.
60
61        Routines that return pointers return <STRONG>NULL</STRONG> on error.
62        If you call <STRONG>tgetstr</STRONG> to fetch <STRONG>ca</STRONG> or any other parameterized
63        string, be aware that it  will  be  returned  in  terminfo
64        notation,  not  the older and not-quite-compatible termcap
65        notation.  This won't cause problems if all you do with it
66        is  call <STRONG>tgoto</STRONG> or <STRONG>tparm</STRONG>, which both expand terminfo-style.
67
68        Because terminfo conventions for representing  padding  in
69        string  capabilities  differ  from termcap's, <STRONG>tputs("50");</STRONG>
70        will put out a literal "50" rather than  busy-waiting  for
71        50 milliseconds.  Cope with it.
72
73
74 </PRE>
75 <H2>PORTABILITY</H2><PRE>
76        The  XSI  Curses  standard,  Issue 4 describes these func-
77        tions.  However, they are marked TO BE WITHDRAWN  and  may
78        be removed in future versions.
79
80        Neither  the  XSI  Curses  standard nor the SVr4 man pages
81        documented the return values of <STRONG>tgetent</STRONG> correctly,  though
82        all three were in fact returned ever since SVr1.
83
84
85 </PRE>
86 <H2>SEE ALSO</H2><PRE>
87        <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>.
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 </PRE>
119 </BODY>
120 </HTML>