Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 1999 01:36:33 +0900 (JST)
From:      nobutaka@nobutaka.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/15556: Additional patches for www/w3m
Message-ID:  <199912181636.BAA05626@narcissus.pel.sys.hiroshima-u.ac.jp>

next in thread | raw e-mail | index | archive | help

>Number:         15556
>Category:       ports
>Synopsis:       Additional patches for www/w3m
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 18 20:20:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     MANTANI Nobutaka
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Hiroshima University
>Environment:
>Description:

Here are additional patches (patch-al, patch-am) for www/w3m port.

w3m doesn't check whether it is running on xterm or not.
Therefore w3m puts xterm escape sequences when it is running on console.
patch-al fixes this problem.

And patch-am adds support for Home/End/PgUp/PgDn keys on console.

>How-To-Repeat:
>Fix:

diff -urN w3m.old/patches/patch-al w3m/patches/patch-al
--- w3m.old/patches/patch-al	Thu Jan  1 09:00:00 1970
+++ w3m/patches/patch-al	Sat Dec 18 16:55:26 1999
@@ -0,0 +1,55 @@
+--- terms.c.orig	Sat Dec 18 16:46:16 1999
++++ terms.c	Sat Dec 18 16:53:51 1999
+@@ -14,8 +14,8 @@
+ #include <string.h>
+ #ifdef USE_GPM
+ #include <gpm.h>
+-static int is_xterm = 0;
+ #endif
++static int is_xterm = 0;
+ 
+ #ifdef AIX
+ #include <sys/select.h>
+@@ -1471,16 +1471,23 @@
+     gpm_handler = gpm_process_mouse;
+   }
+ #endif
++  char *term;
++
++  if (mouseActive) return;
++  term = getenv("TERM");
++  if (!strncmp(term,"kterm",5) || !strncmp(term,"xterm",5)) {
++    is_xterm = 1;
++  }
+   mouseActive = 1;
+ }
+ 
+ void mouse_end()
+ {
+   if (mouseActive == 0) return;
+-#ifdef USE_GPM
+   if (is_xterm) {
+     XTERM_OFF;
+   }
++#ifdef USE_GPM
+   else
+     Gpm_Close();
+ #endif
+@@ -1491,17 +1498,13 @@
+ {
+   if (!mouseActive)
+     mouse_init();
+-#ifdef USE_GPM
+   if (is_xterm)
+-#endif
+     XTERM_ON;
+ }
+ 
+ void mouse_inactive()
+ {
+-#ifdef USE_GPM
+   if (is_xterm)
+-#endif
+     XTERM_OFF;
+ }
+   
diff -urN w3m.old/patches/patch-am w3m/patches/patch-am
--- w3m.old/patches/patch-am	Thu Jan  1 09:00:00 1970
+++ w3m/patches/patch-am	Sun Dec 19 00:40:32 1999
@@ -0,0 +1,14 @@
+--- keybind.c.orig	Mon Dec  6 15:18:33 1999
++++ keybind.c	Mon Dec  6 15:24:31 1999
+@@ -90,9 +90,9 @@
+ /* 8      9       :       ;       <       =       >       ?        */
+   nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
+ /* @      A       B       C       D       E       F       G        */
+-  nulcmd, movU,   movD,   movR,   movL,   nulcmd, nulcmd, nulcmd,
++  nulcmd, movU,   movD,   movR,   movL,   nulcmd, goLineL,pgFore,
+ /* H      I       J       K       L       M       N       O        */
+-  nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, mouse,  nulcmd, nulcmd,
++  goLineF,pgBack, nulcmd, nulcmd, nulcmd, mouse,  nulcmd, nulcmd,
+ /* P      Q       R       S       T       U       V       W        */
+   nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
+ /* X      Y       Z       [       \       ]       ^       _        */

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912181636.BAA05626>