1curs_termcap(3CURSES) Curses Library Functions curs_termcap(3CURSES)
2
3
4
6 curs_termcap, tgetent, tgetflag, tgetnum, tgetstr, tgoto - curses
7 interfaces (emulated) to the termcap library
8
10 cc [ flag ... ] file ... -lcurses [ library ... ]
11 #include <curses.h>
12 #include <term.h>
13
14 int tgetent(char *bp, char *name);
15
16
17 int tgetflag(char id[2]);
18
19
20 int tgetnum(char id[2]);
21
22
23 char *tgetstr(char id[2], char **area);
24
25
26 char *tgoto(char *cap, int col, int row);
27
28
29 int tputs(char *str, int affcnt, int (*putc)(void));
30
31
33 These routines are included as a conversion aid for programs that use
34 the termcap library. Their parameters are the same and the routines are
35 emulated using the terminfo database. These routines are supported at
36 Level 2 and should not be used in new applications.
37
38
39 The tgetent() routine looks up the termcap entry for name. The emula‐
40 tion ignores the buffer pointer bp.
41
42
43 The tgetflag() routine gets the boolean entry for id.
44
45
46 The tgetnum() routine gets the numeric entry for id.
47
48
49 The tgetstr() routine returns the string entry for id. Use tputs() to
50 output the returned string.
51
52
53 The tgoto() routine instantiates the parameters into the given capabil‐
54 ity. The output from this routine is to be passed to tputs().
55
56
57 The tputs() routine is described on the curs_terminfo(3CURSES) manual
58 page.
59
61 Routines that return an integer return ERR upon failure and an integer
62 value other than ERR upon successful completion.
63
64
65 Routines that return pointers return NULL on error.
66
68 See attributes(5) for descriptions of the following attributes:
69
70
71
72
73 ┌─────────────────────────────┬─────────────────────────────┐
74 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │MT-Level │Unsafe │
77 └─────────────────────────────┴─────────────────────────────┘
78
80 curs_terminfo(3CURSES), curses(3CURSES), putc(3C), attributes(5)
81
83 The header <curses.h> automatically includes the headers <stdio.h> and
84 <unctrl.h>.
85
86
87
88SunOS 5.11 31 Dec 1996 curs_termcap(3CURSES)