FreeBSD Bugzilla – Attachment 46548 Details for
Bug 71438
Update ports: misc/gman add dependency & fix netbrowse option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch-gman.pl
patch-gman.pl (text/plain), 1.86 KB, created by
Serge Gagnon
on 2004-09-06 22:30:23 UTC
(
hide
)
Description:
patch-gman.pl
Filename:
MIME Type:
Creator:
Serge Gagnon
Created:
2004-09-06 22:30:23 UTC
Size:
1.86 KB
patch
obsolete
>--- gman.pl.orig Mon Sep 6 16:55:42 2004 >+++ gman.pl Mon Sep 6 16:55:45 2004 >@@ -1,10 +1,10 @@ > #!/usr/bin/perl -w >-use strict; > > if (@ARGV != 2) { > print <<_EOF_; > Content-type: text/html > >+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> > <html><head><title>gman.pl: invalid use</title></head> > <body> > <h1>gman.pl cannot be used without arguments.</h1> >@@ -14,35 +14,43 @@ > } > > my $section = $ARGV[0]; # should also have some sanity check >+my $cut = "/usr/bin/cut -f 1 -d \" \" "; > my $name = $ARGV[1]; >-my $man2html = "/usr/lib/cgi-bin/man2html"; >-my $path = `man -w $section $name`; chomp $path; $path =~ s/\s*$//; >+my $man = "/usr/bin/man"; >+my $man2html = "/usr/local/bin/man2html -nodepage "; >+my $path = `$man -w $section $name |$cut`; chomp $path; $path =~ s/\s*$//; > > unless (-s "$path") { > warn "not -s $path\n"; > $name = lc $name; >- $path = `man -w $section $name`; chomp $path; $path =~ s/\s*$//; >+ $path = `$man -w $section $name |$cut`; chomp $path; $path =~ s/\s*$//; > } > unless (-s "$path") { > warn "not -s $path\n"; > print <<end_of_line; > Content-type: text/html > >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> >-<HTML><HEAD> >-<TITLE>404 Not Found</TITLE> >-</HEAD><BODY> >+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> >+<html><head> >+<title>404 Not Found</title> >+</head><body> > <H1>Not Found</H1> > The requested man page $name($section) was not found on this server. >-</BODY></HTML> >+</body></html> > end_of_line >- die; >+; > } > >-my $page = `$man2html $path`; >+my $page = `$man $section $name |$man2html`; > > # $page =~ s/^Content-type: text\/html\n\n// if (not run as cgi...); > >-$page =~ s/(This document was created by\n<a HREF=\".*\">man2html<\/a>)(,\nusing the manual pages.<br>)/$1 for <a href=\"\/cgi-bin\/gman.pl?1+gman\">gman<\/a>$2/io; >+print <<eof; >+Content-type: text/html >+ >+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN"> >+eof >+; > > print $page; >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 71438
:
46547
| 46548 |
46549
|
46550
|
46551
|
46552
|
46553
|
46554
|
46555