1 /* Public Domain Curses */
5 RCSID("$Id: terminfo.c,v 1.37 2008/07/21 12:29:20 wmcbrine Exp $")
7 /*man-start**************************************************************
12 int mvcur(int oldrow, int oldcol, int newrow, int newcol);
13 int vidattr(chtype attr);
14 int vid_attr(attr_t attr, short color_pair, void *opt);
15 int vidputs(chtype attr, int (*putfunc)(int));
16 int vid_puts(attr_t attr, short color_pair, void *opt,
19 int del_curterm(TERMINAL *);
20 int putp(const char *);
21 int restartterm(const char *, int, int *);
22 TERMINAL *set_curterm(TERMINAL *);
23 int setterm(const char *term);
24 int setupterm(const char *, int, int *);
25 int tgetent(char *, const char *);
26 int tgetflag(const char *);
27 int tgetnum(const char *);
28 char *tgetstr(const char *, char **);
29 char *tgoto(const char *, int, int);
30 int tigetflag(const char *);
31 int tigetnum(const char *);
32 char *tigetstr(const char *);
33 char *tparm(const char *,long, long, long, long, long, long,
35 int tputs(const char *, int, int (*)(int));
38 mvcur() lets you move the physical cursor without updating any
39 window cursor positions. It returns OK or ERR.
41 The rest of these functions are currently implemented as stubs,
42 returning the appropriate errors and doing nothing else.
44 Portability X/Open BSD SYS V
47 **man-end****************************************************************/
51 TERMINAL
*cur_term
= NULL
;
53 int mvcur(int oldrow
, int oldcol
, int newrow
, int newcol
)
55 PDC_LOG(("mvcur() - called: oldrow %d oldcol %d newrow %d newcol %d\n",
56 oldrow
, oldcol
, newrow
, newcol
));
58 if ((newrow
>= LINES
) || (newcol
>= COLS
) || (newrow
< 0) || (newcol
< 0))
61 PDC_gotoyx(newrow
, newcol
);
68 int vidattr(chtype attr
)
70 PDC_LOG(("vidattr() - called: attr %d\n", attr
));
75 int vid_attr(attr_t attr
, short color_pair
, void *opt
)
77 PDC_LOG(("vid_attr() - called\n"));
82 int vidputs(chtype attr
, int (*putfunc
)(int))
84 PDC_LOG(("vidputs() - called: attr %d\n", attr
));
89 int vid_puts(attr_t attr
, short color_pair
, void *opt
, int (*putfunc
)(int))
91 PDC_LOG(("vid_puts() - called\n"));
96 int del_curterm(TERMINAL
*oterm
)
98 PDC_LOG(("del_curterm() - called\n"));
103 int putp(const char *str
)
105 PDC_LOG(("putp() - called: str %s\n", str
));
110 int restartterm(const char *term
, int filedes
, int *errret
)
112 PDC_LOG(("restartterm() - called\n"));
120 TERMINAL
*set_curterm(TERMINAL
*nterm
)
122 PDC_LOG(("set_curterm() - called\n"));
124 return (TERMINAL
*)NULL
;
127 int setterm(const char *term
)
129 PDC_LOG(("setterm() - called\n"));
134 int setupterm(const char *term
, int filedes
, int *errret
)
136 PDC_LOG(("setupterm() - called\n"));
141 fprintf(stderr
, "There is no terminfo database\n");
146 int tgetent(char *bp
, const char *name
)
148 PDC_LOG(("tgetent() - called: name %s\n", name
));
153 int tgetflag(const char *id
)
155 PDC_LOG(("tgetflag() - called: id %s\n", id
));
160 int tgetnum(const char *id
)
162 PDC_LOG(("tgetnum() - called: id %s\n", id
));
167 char *tgetstr(const char *id
, char **area
)
169 PDC_LOG(("tgetstr() - called: id %s\n", id
));
174 char *tgoto(const char *cap
, int col
, int row
)
176 PDC_LOG(("tgoto() - called\n"));
181 int tigetflag(const char *capname
)
183 PDC_LOG(("tigetflag() - called: capname %s\n", capname
));
188 int tigetnum(const char *capname
)
190 PDC_LOG(("tigetnum() - called: capname %s\n", capname
));
195 char *tigetstr(const char *capname
)
197 PDC_LOG(("tigetstr() - called: capname %s\n", capname
));
202 char *tparm(const char *cap
, long p1
, long p2
, long p3
, long p4
,
203 long p5
, long p6
, long p7
, long p8
, long p9
)
205 PDC_LOG(("tparm() - called: cap %s\n", cap
));
210 int tputs(const char *str
, int affcnt
, int (*putfunc
)(int))
212 PDC_LOG(("tputs() - called\n"));