1tgetent(3XCURSES)       X/Open Curses Library Functions      tgetent(3XCURSES)
2
3
4

NAME

6       tgetent,  tgetflag, tgetnum, tgetstr, tgoto - emulate the termcap data‐
7       base
8

SYNOPSIS

10       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
11        -R  /usr/xpg4/lib  -lcurses  [ library... ]
12
13       c89 [ flag... ] file... -lcurses [ library... ]
14
15       #include <term.h>
16
17       int tgetent(char *bp, const char *name);
18
19
20       int tgetflag(char id[2]);
21
22
23       int tgetnum(char id[2]);
24
25
26       char *tgetstr(char id[2], char **area);
27
28
29       char *tgoto(char *cap, int col, int row);
30
31

PARAMETERS

33       bp      Is a pointer to a buffer. This parameter is ignored.
34
35
36       name    Is the termcap entry to look up.
37
38
39       cap     Is the pointer to a termcap capability.
40
41
42       area    Is a pointer to the area where  tgetstr()  stores  the  decoded
43               string.
44
45
46       col     Is the column placement of the new cursor.
47
48
49       row     Is the row placement of the new cursor.
50
51

DESCRIPTION

53       The  tgetent() function looks up the termcap entry for name. The emula‐
54       tion ignores the buffer pointer bp.
55
56
57       The tgetflag() function gets the Boolean entry for id.
58
59
60       The tgetnum() function gets the numeric entry for id.
61
62
63       The tgetstr() function gets the string entry for id. If area is  not  a
64       null pointer and does not point to a null pointer, tgetstr() copies the
65       string entry into the buffer pointed to by *area and advances the vari‐
66       able  pointed to by area to the first byte after the copy of the string
67       entry.
68
69
70       The tgoto() function instantiates the parameters col and row  into  the
71       capability cap and returns a pointer to the resulting string.
72
73
74       All  of  the information available in the terminfo database need not be
75       available through these functions.
76

RETURN VALUES

78       Upon successful completion, those functions that return integers return
79       OK. Otherwise, they return ERR.
80
81
82       Those  functions  that  return  pointers  return a null pointer when an
83       error occurs.
84

ERRORS

86       No errors are defined.
87

USAGE

89       These functions are included as a conversion aid for programs that  use
90       the termcap library. Their arguments are the same and the functions are
91       emulated using the terminfo database.
92
93
94       These functions are only guaranteed to operate  reliably  on  character
95       sets  in which each character fits into a single byte, whose attributes
96       can be expressed using only constants with the A_ prefix.
97
98
99       Any terminal capabilities from the terminfo  database  that  cannot  be
100       retrieved  using  these  functions can be retrieved using the functions
101       described on the tigetflag(3XCURSES) manual page.
102
103
104       Portable applications must use tputs(3XCURSES) to  output  the  strings
105       returned by tgetstr() and tgoto().
106

ATTRIBUTES

108       See attributes(5) for descriptions of the following attributes:
109
110
111
112
113       ┌─────────────────────────────┬─────────────────────────────┐
114       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
115       ├─────────────────────────────┼─────────────────────────────┤
116       │Interface Stability          │Standard                     │
117       ├─────────────────────────────┼─────────────────────────────┤
118       │MT-Level                     │Unsafe                       │
119       └─────────────────────────────┴─────────────────────────────┘
120

SEE ALSO

122       libcurses(3XCURSES),    putp(3XCURSES),   setupterm(3XCURSES),   tiget‐
123       flag(3XCURSES), attributes(5), standards(5)
124
125
126
127SunOS 5.11                        5 Jun 2002                 tgetent(3XCURSES)
Impressum