Subject: links patch (drop trailing whitespace from interactive input)
To: None <tech-pkg@netbsd.org>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-pkg
Date: 04/19/2006 09:05:23
--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

it has always annoyed me that cut and paste to the "g" command (go to URL)
of links often fails because trailing whitespace is considered as part of
the URL - and not found on the net. The patch below fixes this. May I 
commit this until this bug is fixed in the distribution?

Regards,
	-is 
-- 
seal your e-mail: http://www.gnupg.org/

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="links.patch"

Index: links-gui/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/links-gui/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- links-gui/Makefile	11 Dec 2005 18:56:30 -0000	1.37
+++ links-gui/Makefile	19 Apr 2006 07:00:52 -0000
@@ -2,6 +2,7 @@
 #
 
 PKGNAME=	links-gui-2.1.0.20
+PKGREVISION=	1
 
 COMMENT=	Lynx-like text and graphics WWW browser
 
Index: links/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/links/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- links/Makefile	11 Dec 2005 18:56:30 -0000	1.38
+++ links/Makefile	19 Apr 2006 07:00:52 -0000
@@ -2,6 +2,7 @@
 #
 
 PKGNAME=	links-2.1.0.20
+PKGREVISION=	1
 COMMENT=	Lynx-like text WWW browser
 
 CONFLICTS+=	links-gui-[0-9]* elinks-0.3*
Index: links/patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/www/links/patches/patch-aa,v
retrieving revision 1.1
diff -u -r1.1 patch-aa
--- links/patches/patch-aa	4 Sep 2002 20:47:45 -0000	1.1
+++ links/patches/patch-aa	19 Apr 2006 07:00:52 -0000
@@ -20,3 +20,17 @@
  		else add_chr_to_str(&u, &l, (unhx(url[1]) << 4) + unhx(url[2])), url += 2;
  	}
  	return u;
+@@ -2047,6 +2047,13 @@ void goto_url_f(struct session *ses, voi
+ /* this doesn't send referer */
+ void goto_url(struct session *ses, unsigned char *url)
+ {
++	char *p;
++	p = url + strlen(url);
++	do {
++		--p;
++	} while (isspace(*p));
++	*++p = 0;
++
+ 	goto_url_f(ses, NULL, url, NULL, NULL, -1, 0, 1, 0);
+ }
+ 

--AhhlLboLdkugWU4S--