Subject: links-gui eat whitespace at end of pasted URL patch
To: None <tech-pkg@netbsd.org>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-pkg
Date: 12/01/2004 16:09:03
--yNb1oOkm5a9FJOVX
Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+"
Content-Disposition: inline
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi,
the enclosed patch will eat up surrounding whitespace in pasted
URLs ... should this become official?
-is
--=20
seal your e-mail: http://www.gnupg.org/
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ac
Content-Transfer-Encoding: quoted-printable
$NetBSD$
--- session.c.orig Mon Nov 29 22:45:13 2004
+++ session.c Mon Nov 29 22:45:15 2004
@@ -1948,6 +1948,17 @@
/* this doesn't send referer */
void goto_url(struct session *ses, unsigned char *url)
{
+ unsigned char *p;
+
+ while (*url && isspace(*url)) {
+ url++;
+ }
+ p =3D url;
+ while (*p && !isspace(*p)) {
+ p++;
+ }
+ *p =3D 0;
+=09
goto_url_f(ses, NULL, url, NULL, NULL, -1, 0, 1, 0);
}
=20
--8t9RHnE3ZwKMSgU+--
--yNb1oOkm5a9FJOVX
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFBrd6PN4tiz3B8hB0RAheCAKCi59ZDngTLs8FjE0FR9hoOUZVu1QCgmpHe
lL8a4U1VYPS/gczMdHudRMI=
=Zw8P
-----END PGP SIGNATURE-----
--yNb1oOkm5a9FJOVX--