From owner-freebsd-questions Thu Oct 19 13:50:22 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta01-svc.ntlworld.com (mta01-svc.ntlworld.com [62.253.162.41]) by hub.freebsd.org (Postfix) with ESMTP id 67EB237B4F9 for ; Thu, 19 Oct 2000 13:50:18 -0700 (PDT) Received: from parish ([62.253.89.30]) by mta01-svc.ntlworld.com (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP id <20001019205016.GAQO16640.mta01-svc.ntlworld.com@parish>; Thu, 19 Oct 2000 21:50:16 +0100 Received: (from mark@localhost) by parish (8.11.0/8.11.0) id e9JKnhb01892; Thu, 19 Oct 2000 21:49:43 +0100 (BST) (envelope-from mark) Date: Thu, 19 Oct 2000 21:49:37 +0100 From: Mark Ovens To: "Andresen,Jason R." Cc: bigotfo@bigfoot.com, questions@freebsd.org Subject: Re: man2html misses lines and man man2html fails Message-ID: <20001019214937.D255@parish> References: <39EF4DAB.BABA081A@mitre.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <39EF4DAB.BABA081A@mitre.org>; from jandrese@mitre.org on Thu, Oct 19, 2000 at 03:38:19PM -0400 Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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