mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-27 10:03:20 +00:00
c9518d632a
- Enable mouse operation when terminal type is `rxvt'. (Submitted by: necter) - Correct pkg-descr. (Submitted by: Thomas E. Dickey) Reviewed by: knu
24 lines
598 B
Plaintext
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;
|