diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-19 08:17:13 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-19 08:17:13 +0000 |
commit | d26961f7c1b993180a39467c93f7dcff4b68511f (patch) | |
tree | 9441f37a1b755fdc2d9409d2d60231f58923d502 /terms.c | |
parent | [w3m-dev 02436] fix segmentation fault in main.c (diff) | |
download | w3m-d26961f7c1b993180a39467c93f7dcff4b68511f.tar.gz w3m-d26961f7c1b993180a39467c93f7dcff4b68511f.zip |
add cygwin as xterm-style mouse terminal
Diffstat (limited to '')
-rw-r--r-- | terms.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: terms.c,v 1.6 2001/11/16 22:02:00 ukai Exp $ */ +/* $Id: terms.c,v 1.7 2001/11/19 08:17:13 ukai Exp $ */ /* * An original curses library for EUC-kanji by Akinori ITO, December 1989 * revised by Akinori ITO, January 1995 @@ -219,6 +219,13 @@ writestr(char *s) #define MOVE(line,column) writestr(tgoto(T_cm,column,line)); +#ifdef MOUSE +static char *xterm_mouse_term[] = { + "xterm", "kterm", "rxvt", "cygwin", + NULL +}; +#endif + int set_tty(void) { @@ -244,9 +251,14 @@ set_tty(void) TerminalGet(tty, &d_ioval); #ifdef MOUSE term = getenv("TERM"); - if (!strncmp(term, "kterm", 5) || !strncmp(term, "xterm", 5) || - !strncmp(term, "rxvt", 4)) { - is_xterm = 1; + { + char **p; + for (p = xterm_mouse_term; *p != NULL; p++) { + if (!strncmp(term, *p, strlen(*p))) { + is_xterm = 1; + break; + } + } } #endif return 0; |