Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2000 21:49:37 +0100
From:      Mark Ovens <marko@freebsd.org>
To:        "Andresen,Jason R." <jandrese@mitre.org>
Cc:        bigotfo@bigfoot.com, questions@freebsd.org
Subject:   Re: man2html misses lines and man man2html fails
Message-ID:  <20001019214937.D255@parish>
In-Reply-To: <39EF4DAB.BABA081A@mitre.org>; from jandrese@mitre.org on Thu, Oct 19, 2000 at 03:38:19PM -0400
References:  <ai1uuskv6t3hfa9bfopmblagpgqn5c3q8d@4ax.com> <39EF4DAB.BABA081A@mitre.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
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.

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);

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.


> -- 
>    _  _    _  ___  ____  ___   ______________________________________
>   / \/ \  | ||_ _||  _ \|___| | Jason Andresen -- jandrese@mitre.org
>  / /\/\ \ | | | | | |/ /|_|_  | Views expressed may not reflect those 
> /_/    \_\|_| |_| |_|\_\|___| | of the Mitre Corporation.
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
		4.4 - The number of the Beastie
________________________________________________________________
51.44°N  FreeBSD - The Power To Serve http://www.freebsd.org
2.057°W  My Webpage http://ukug.uk.freebsd.org/~mark
mailto:marko@freebsd.org                http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001019214937.D255>