w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 58f19ad7fbf078b3c50538b3e8130f3f31efe2ab
parent be6c16f46c613ad71ac6758b4e2ae330f933a3f2
Author: ukai <ukai>
Date:   Mon, 19 Nov 2001 08:17:13 +0000

add cygwin as xterm-style mouse terminal

Diffstat:
MChangeLog | 5+++++
Mterms.c | 18+++++++++++++++---
2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-19 Fumitoshi UKAI <ukai@debian.or.jp> + + * terms.c (xterm_mouse_term set_tty): add cygwin as xterm-style + mouse terminal + 2001-11-19 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> * main.c (GetWord): [w3m-dev 02436] fix segmentation fault in main.c diff --git a/terms.c b/terms.c @@ -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;