From c605b61d209e2896c3db7c8eccbe87c87b3fba81 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sun, 30 Nov 2014 06:28:12 +0900 Subject: Update 170_w3mman2html-utf8.patch to fix Perl warnings (closes: #771004) --- debian/patches/170_w3mman2html-utf8.patch | 40 ++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/patches/170_w3mman2html-utf8.patch b/debian/patches/170_w3mman2html-utf8.patch index 53e93e6..94c5f09 100644 --- a/debian/patches/170_w3mman2html-utf8.patch +++ b/debian/patches/170_w3mman2html-utf8.patch @@ -1,11 +1,21 @@ -Subject: Correct underline processing and more UTF-8 support for w3mman2html.cgi +Subject: More UTF-8 support and fixes for w3mman2html.cgi +Author: Piotr P. Karwasz, Justin B Rye Origin: https://bugs.launchpad.net/ubuntu/+source/w3m/+bug/680202 -Author: Piotr P. Karwasz +Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771004 -diff -ru w3m-0.5.2.orig/scripts/w3mman/w3mman2html.cgi.in w3m-0.5.2/scripts/w3mman/w3mman2html.cgi.in ---- w3m-0.5.2.orig/scripts/w3mman/w3mman2html.cgi.in 2010-11-22 14:00:11.000000000 +0100 -+++ w3m-0.5.2/scripts/w3mman/w3mman2html.cgi.in 2010-11-22 14:02:48.000000000 +0100 -@@ -126,12 +126,14 @@ +diff --git a/scripts/w3mman/w3mman2html.cgi.in b/scripts/w3mman/w3mman2html.cgi.in +index f430307..2cd00f9 100644 +--- a/scripts/w3mman/w3mman2html.cgi.in ++++ b/scripts/w3mman/w3mman2html.cgi.in +@@ -34,7 +34,6 @@ Content-Type: text/html + EOF + $keyword =~ s:([^-\w\200-\377.,])::g; + open(F, "$MAN -k $keyword 2> /dev/null |"); +- @line = (); + while() { + chop; + $_ = &html_quote($_); +@@ -126,12 +125,14 @@ while() { s/\&/\&/g; s/\/\>/g; @@ -23,3 +33,21 @@ diff -ru w3m-0.5.2.orig/scripts/w3mman/w3mman2html.cgi.in w3m-0.5.2/scripts/w3mm s@((\)?(\&\w+\;|.)(\)?)\010_@$1@g; s@.\010(.)@$1@g; +@@ -156,7 +157,7 @@ EOF + } + + s@(http|ftp)://[\w.\-/~]+[\w/]@$&@g; +- s@(\W)(mailto:)?(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@$1$2$3@g; ++ s@\b(mailto:|)(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@$1$2@g; + s@(\W)(\~?/[\w.][\w.\-/~]*)@$1 . &file_ref($2)@ge; + s@(include(<\/?[bu]\>|\s)*\<)([\w.\-/]+)@$1 . &include_ref($3)@ge; + if ($prev && m@^\s*(\<[bu]\>)*(\w[\w.\-]*)(\)*(\([\dm]\w*\))@) { +@@ -220,7 +221,7 @@ sub is_command { + local($p); + + (! -d && -x) || return 0; +- if (! defined(%PATH)) { ++ if (! %PATH) { + for $p (split(":", $ENV{'PATH'})) { + $p =~ s@/+$@@; + $PATH{$p} = 1; -- cgit v1.2.3