fix autolinking manual pages with textual suffixes (RHBZ#1077297)

epel8
T.C. Hollingsworth 11 years ago
parent 777f615459
commit 31278a57fb

@ -1,16 +0,0 @@
Add support for Perl modules (closes: #363384).
Patch by Nicolas François.
diff -ruN -x config.guess -x config.sub man-1.6e-old/man2html/man2html.c man-1.6e/man2html/man2html.c
--- man-1.6e-old/man2html/man2html.c 2007-01-31 01:21:06.000000000 +0100
+++ man-1.6e/man2html/man2html.c 2007-01-31 01:21:07.000000000 +0100
@@ -173,7 +173,8 @@
/* section is n or l or starts with a digit */
&& strchr("123456789nl", f[1])
&& (g-f == 2 || (g-f == 3 && isdigit(f[1]) && isalpha(f[2]))
- || (f[2] == 'X' && isdigit(f[1])))
+ || (f[2] == 'X' && isdigit(f[1]))
+ || (strncmp(f+1,"3pm",g-f-1) == 0))
) {
/* this might be a link */
h=f-1;

@ -0,0 +1,17 @@
diff -up man-1.6f/man2html/man2html.c.pom man-1.6f/man2html/man2html.c
--- man-1.6f/man2html/man2html.c.pom 2009-10-12 09:56:00.000000000 +0200
+++ man-1.6f/man2html/man2html.c 2009-10-12 09:59:35.000000000 +0200
@@ -171,7 +171,12 @@ add_links(char *c)
/* section is n or l or starts with a digit */
&& strchr("123456789nl", f[1])
&& (g-f == 2 || (g-f == 3 && isdigit(f[1]) && isalpha(f[2]))
- || (f[2] == 'X' && isdigit(f[1])))
+ || (g-f == 4 && isdigit(f[1]) && isalpha(f[2]) &&
+ isalpha(f[3]))
+ || (g-f == 5 && isdigit(f[1]) && isalpha(f[2]) &&
+ isalpha(f[3]) && isalpha(f[4]))
+ || (g-f == 6 && isdigit(f[1]) && isalpha(f[2]) &&
+ isalpha(f[3]) && isalpha(f[4]) && isalpha(f[5])))
) {
/* this might be a link */
h=f-1;

@ -3,7 +3,7 @@
Name: man2html
Version: 1.6
Release: 12.%{posttag}%{?dist}
Release: 13.%{posttag}%{?dist}
Summary: Convert man pages to HTML - CGI scripts
# man2html.c and debian/sources/man2html.cgi.c are Copyright Only
@ -45,9 +45,6 @@ Patch1019: man2html-noindex-segfault.patch
# *roff parser fix: convert \N'123' to &#123
Patch1020: man2html-escape-N.patch
# support Perl manpages (1p/3p/etc.)
Patch1021: man2html-perl.patch
# fix typo in Italian man page
Patch1022: man2html-it-typo.patch
@ -109,6 +106,10 @@ Patch8: man2html-hman-section.patch
# fix the paths in localized manpages
Patch9: man2html-localized-manpage-paths.patch
# permit autolinking manual pages with textual suffixes (e.g. "3p" for perl)
# (resolves RHBZ#1077297)
Patch10: man2html-suffixes.patch
BuildRequires: recode
Requires: %{name}-core%{?_isa} = %{version}-%{release}
@ -197,6 +198,9 @@ rm -f %{_localstatedir}/cache/man2html/* || :
%changelog
* Tue Mar 18 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.6-13.g
- fix autolinking manual pages with textual suffixes (RHBZ#1077297)
* Sat Aug 03 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.6-12.g
- Fix stray trailing slash in files list

Loading…
Cancel
Save