Lines 46-51
Link Here
|
46 |
#include <sys/kd.h> /* KDGETMODE */ |
46 |
#include <sys/kd.h> /* KDGETMODE */ |
47 |
#include <termios.h> /* winsize */ |
47 |
#include <termios.h> /* winsize */ |
48 |
|
48 |
|
|
|
49 |
#ifdef HAVE_TERM_H |
50 |
#include <curses.h> |
51 |
#include <term.h> |
52 |
#undef buttons |
53 |
#endif /* HAVE_TERM_H */ |
54 |
|
49 |
#include "headers/gpmInt.h" |
55 |
#include "headers/gpmInt.h" |
50 |
#include "headers/message.h" |
56 |
#include "headers/message.h" |
51 |
|
57 |
|
Lines 203-216
int Gpm_Open(Gpm_Connect *conn, int flag
Link Here
|
203 |
|
209 |
|
204 |
gpm_report(GPM_PR_DEBUG,"VC: %d",flag); |
210 |
gpm_report(GPM_PR_DEBUG,"VC: %d",flag); |
205 |
|
211 |
|
|
|
212 |
if ((term=(char*)getenv("TERM")) && strncmp(term,"linux",5)) { |
206 |
/*....................................... First of all, check xterm */ |
213 |
/*....................................... First of all, check xterm */ |
|
|
214 |
#ifdef HAVE_TERM_H |
215 |
TERMINAL *old_term = cur_term; |
216 |
char *mousecap; |
217 |
|
218 |
if (setupterm((char *) 0, 1, 0) == OK) |
219 |
{ |
220 |
if ((mousecap=tigetstr("kmous")) && mousecap != (char *)-1 && mousecap && mousecap[0]) |
221 |
{ |
222 |
#else /* ! HAVE_TERM_H */ |
223 |
if (!strncmp(term,"xterm",5)) |
224 |
{ |
225 |
#endif /* HAVE_TERM_H */ |
207 |
|
226 |
|
208 |
if ((term=(char *)getenv("TERM")) && !strncmp(term,"xterm",5)) { |
227 |
if(gpm_tried) return gpm_fd; /* no stack */ |
209 |
if(gpm_tried) return gpm_fd; /* no stack */ |
228 |
gpm_fd=-2; |
210 |
gpm_fd=-2; |
229 |
GPM_XTERM_ON; |
211 |
GPM_XTERM_ON; |
230 |
gpm_flag=1; |
212 |
gpm_flag=1; |
231 |
return gpm_fd; |
213 |
return gpm_fd; |
232 |
|
|
|
233 |
#ifdef HAVE_TERM_H |
234 |
} |
235 |
if (cur_term != old_term) /* in 5.4 release curses made optimization */ |
236 |
{ |
237 |
del_curterm(cur_term); |
238 |
set_curterm(old_term); |
239 |
} |
240 |
} |
241 |
#else |
242 |
} |
243 |
#endif /* HAVE_TERM_H */ |
244 |
gpm_flag=0; |
245 |
return -1; |
214 |
} |
246 |
} |
215 |
/*....................................... No xterm, go on */ |
247 |
/*....................................... No xterm, go on */ |
216 |
|
248 |
|