pdcurses/terminfo.c

branch
protocol5
changeset 106
7b156b764d11
parent 97
2d43f05b284c
equal deleted inserted replaced
104:a76af67a3a4b 106:7b156b764d11
1 /* Public Domain Curses */
2
3 #include <curspriv.h>
4
5 RCSID("$Id: terminfo.c,v 1.37 2008/07/21 12:29:20 wmcbrine Exp $")
6
7 /*man-start**************************************************************
8
9 Name: terminfo
10
11 Synopsis:
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,
17 int (*putfunc)(int));
18
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,
34 long, long, long);
35 int tputs(const char *, int, int (*)(int));
36
37 Description:
38 mvcur() lets you move the physical cursor without updating any
39 window cursor positions. It returns OK or ERR.
40
41 The rest of these functions are currently implemented as stubs,
42 returning the appropriate errors and doing nothing else.
43
44 Portability X/Open BSD SYS V
45 mvcur Y Y Y
46
47 **man-end****************************************************************/
48
49 #include <term.h>
50
51 TERMINAL *cur_term = NULL;
52
53 int mvcur(int oldrow, int oldcol, int newrow, int newcol)
54 {
55 PDC_LOG(("mvcur() - called: oldrow %d oldcol %d newrow %d newcol %d\n",
56 oldrow, oldcol, newrow, newcol));
57
58 if ((newrow >= LINES) || (newcol >= COLS) || (newrow < 0) || (newcol < 0))
59 return ERR;
60
61 PDC_gotoyx(newrow, newcol);
62 SP->cursrow = newrow;
63 SP->curscol = newcol;
64
65 return OK;
66 }
67
68 int vidattr(chtype attr)
69 {
70 PDC_LOG(("vidattr() - called: attr %d\n", attr));
71
72 return ERR;
73 }
74
75 int vid_attr(attr_t attr, short color_pair, void *opt)
76 {
77 PDC_LOG(("vid_attr() - called\n"));
78
79 return ERR;
80 }
81
82 int vidputs(chtype attr, int (*putfunc)(int))
83 {
84 PDC_LOG(("vidputs() - called: attr %d\n", attr));
85
86 return ERR;
87 }
88
89 int vid_puts(attr_t attr, short color_pair, void *opt, int (*putfunc)(int))
90 {
91 PDC_LOG(("vid_puts() - called\n"));
92
93 return ERR;
94 }
95
96 int del_curterm(TERMINAL *oterm)
97 {
98 PDC_LOG(("del_curterm() - called\n"));
99
100 return ERR;
101 }
102
103 int putp(const char *str)
104 {
105 PDC_LOG(("putp() - called: str %s\n", str));
106
107 return ERR;
108 }
109
110 int restartterm(const char *term, int filedes, int *errret)
111 {
112 PDC_LOG(("restartterm() - called\n"));
113
114 if (errret)
115 *errret = -1;
116
117 return ERR;
118 }
119
120 TERMINAL *set_curterm(TERMINAL *nterm)
121 {
122 PDC_LOG(("set_curterm() - called\n"));
123
124 return (TERMINAL *)NULL;
125 }
126
127 int setterm(const char *term)
128 {
129 PDC_LOG(("setterm() - called\n"));
130
131 return ERR;
132 }
133
134 int setupterm(const char *term, int filedes, int *errret)
135 {
136 PDC_LOG(("setupterm() - called\n"));
137
138 if (errret)
139 *errret = -1;
140 else
141 fprintf(stderr, "There is no terminfo database\n");
142
143 return ERR;
144 }
145
146 int tgetent(char *bp, const char *name)
147 {
148 PDC_LOG(("tgetent() - called: name %s\n", name));
149
150 return ERR;
151 }
152
153 int tgetflag(const char *id)
154 {
155 PDC_LOG(("tgetflag() - called: id %s\n", id));
156
157 return ERR;
158 }
159
160 int tgetnum(const char *id)
161 {
162 PDC_LOG(("tgetnum() - called: id %s\n", id));
163
164 return ERR;
165 }
166
167 char *tgetstr(const char *id, char **area)
168 {
169 PDC_LOG(("tgetstr() - called: id %s\n", id));
170
171 return (char *)NULL;
172 }
173
174 char *tgoto(const char *cap, int col, int row)
175 {
176 PDC_LOG(("tgoto() - called\n"));
177
178 return (char *)NULL;
179 }
180
181 int tigetflag(const char *capname)
182 {
183 PDC_LOG(("tigetflag() - called: capname %s\n", capname));
184
185 return -1;
186 }
187
188 int tigetnum(const char *capname)
189 {
190 PDC_LOG(("tigetnum() - called: capname %s\n", capname));
191
192 return -2;
193 }
194
195 char *tigetstr(const char *capname)
196 {
197 PDC_LOG(("tigetstr() - called: capname %s\n", capname));
198
199 return (char *)(-1);
200 }
201
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)
204 {
205 PDC_LOG(("tparm() - called: cap %s\n", cap));
206
207 return (char *)NULL;
208 }
209
210 int tputs(const char *str, int affcnt, int (*putfunc)(int))
211 {
212 PDC_LOG(("tputs() - called\n"));
213
214 return ERR;
215 }

mercurial