OSDN Git Service

Fixed bug #24860 that links to other pages are broken.
authorAkihiro MOTOKI <amotoki@users.sourceforge.jp>
Tue, 17 May 2011 02:55:05 +0000 (11:55 +0900)
committerAkihiro MOTOKI <amotoki@users.sourceforge.jp>
Tue, 17 May 2011 02:55:05 +0000 (11:55 +0900)
In April 12, I replaced man2html to a version which support a copyright mark,
Since new version of man2html changes the output URL of /cgi-bin/,
mkmanweb.perl could not handle these URLs to generate JM internal links.
This commit fixes this problem.

bin/mkmanweb.perl

index 30e84ed..9f75636 100755 (executable)
@@ -178,13 +178,14 @@ foreach my $fkey (sort keys %roff_hash){
        s/\a//g;
 
        s|</HEAD><BODY>|$START|ge;
-       s|<A HREF=\"/cgi-bin/man/man2html\">Return to Main Contents</A>|$NAVI|ge;
-       s|<A HREF=\"/cgi-bin/man/man2html\">man2html</A>|$MAN2HTMLPAGE|ge;
+       s|<A HREF=\"(http://localhost)?/cgi-bin/man/man2html\">Return to Main Contents</A>|$NAVI|ge;
+       s|<A HREF=\"(http://localhost)?/cgi-bin/man/man2html\">man2html</A>|$MAN2HTMLPAGE|ge;
 
        # 別ページへのリンクアンカーの処理.
        #
-       while (m|<A HREF=\"/cgi-bin/man/man2html\?([1-9])[a-zA-Z]?\+([^\"]+)|){
-           my $lpage = "$2,$1";
+       while (m|<A HREF=\"(http://localhost)?/cgi-bin/man/man2html\?([1-9])[a-zA-Z]?\+([^\"]+)|){
+           my $lpage = "$3,$2";
+            s|http://localhost/cgi-bin/|/cgi-bin/|;
 
            if ($#{$page_name{$lpage}} == -1){
                s|<A HREF=\"/cgi-bin/man/man2html[^>]+>([^<]+)</A>|$1|;