| From | Sent On | Attachments |
|---|---|---|
| John Murphy | Oct 19, 2000 12:20 pm | |
| Andresen,Jason R. | Oct 19, 2000 12:37 pm | |
| Mark Ovens | Oct 19, 2000 1:49 pm | |
| John Murphy | Oct 20, 2000 5:38 am |
| Subject: | Re: man2html misses lines and man man2html fails | |
|---|---|---|
| From: | John Murphy (bigo...@bigfoot.com) | |
| Date: | Oct 20, 2000 5:38:03 am | |
| List: | org.freebsd.freebsd-questions | |
Mark Ovens wrote:
Date: Thu, 19 Oct 2000 21:49:37 +0100 On Thu, Oct 19, 2000 at 03:38:19PM -0400, Andresen,Jason R. wrote:
John Murphy wrote:
Using FreeBSD-4.1 and man2html via man.cgi I find that when it converts man pages (eg: tcpdump) that have page numbering, it misses the last line of text above the page break, and the first line of text below the page break.
Unfortunately #man man2html fails with: zcat: /usr/local/man/cat1/man2html.1.gz: not in gzip format
#cd /usr/local/man/cat1 #file man2html.1.gz man2html.1.gz: data
Any clues appreciated John.
Try looking at the first few lines of the file. That should give you a clue what type of file it is.
It will have "Formatting page, please wait..." at the start. The man2html
Slight variation, I get two lines: <standard input>:23: a tab character is not allowed before an argument <standard input>:33: a tab character is not allowed before an argument followed by ^_ and other characters from the ascii art set :)
port has just been fixed. What was happening was that STDERR was being closed before man.cgi called man(1). If the catpage didn't exist you get the "Formatting....." message but, since STDERR is closed, it goes to STDOUT and so ends up at the start of the catpage, before the output from gzip. Then when man(1) tries to view the page gzip(1) can't understand the file.
I remember you mentioned the possibility when you told me where man.cgi is.
If you can't update the port just move the line ``close(STDERR)'' in man.cgi thus:
# Convert output from man to html #-------------------------------- From here>>># close(STDERR); open(MANPRG, "-|") or exec($ManPrg, @manargs); $Man2Html::InFH = \*MANPRG; # set input filehandle require $ManConvPrg or error("Problem executing man->HTML converter"); To here>>> close(STDERR);
Easy enough, and thanks for the explanation. man man2html works after removing the two lines (with ee no less), and still works after dragging it through man.cgi & man2html.
The problem with missing lines can be cured by setting ``-topm'' and ``-botm'' to 0, either in man.cgi itself (the ``@ConvArgs'' line) or as an option when man.cgi is run. I haven't figured out exactly why this occurs, but it seems to be due to FreeBSD manpages being in 2 formats; -mdoc and -man.
@ConvArgs = ("-topm", "0", "-botm", "0"); Fixed it thanks Mark.
It's good to have this working. Hyperlinked man pages are cool... John.
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message





