1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-27 10:03:20 +00:00
freebsd-ports/www/w3m/files/patch-au
MANTANI Nobutaka c9518d632a - Update to 0.2.1-inu-1.5 and www/w3m-img port to 0.2.1-inu-1.5-img-1.12.
- Enable mouse operation when terminal type is `rxvt'.
  (Submitted by: necter)
- Correct pkg-descr.
  (Submitted by: Thomas E. Dickey)

Reviewed by: knu
2001-11-07 16:52:35 +00:00

24 lines
598 B
Plaintext

--- terms.c.orig Mon Nov 5 02:59:40 2001
+++ terms.c Mon Nov 5 02:59:17 2001
@@ -244,8 +244,18 @@
TerminalGet(tty, &d_ioval);
#ifdef MOUSE
term = getenv("TERM");
- if (!strncmp(term, "kterm", 5) || !strncmp(term, "xterm", 5)) {
- is_xterm = 1;
+ {
+ static struct { const char *prefix; int len; } xtermlike[] = {
+ { "kterm", 5 }, { "xterm", 5 }, { "rxvt", 4 }
+ };
+ int i;
+
+ for (i = 0; i < sizeof(xtermlike)/sizeof(xtermlike[0]); i++) {
+ if (!strncmp(term, xtermlike[i].prefix, xtermlike[i].len)) {
+ is_xterm = 1;
+ break;
+ }
+ }
}
#endif
return 0;