Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Oct 2000 13:38:25 +0100
From:      John Murphy <bigotfo@bigfoot.com>
To:        questions@freebsd.org
Subject:   Re: man2html misses lines and man man2html fails
Message-ID:  <vcuuusk6c197r11e7n6oo12cen7rbgti6l@4ax.com>

next in thread | raw e-mail | index | archive | help
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:
>>=20
>>=20
>> John Murphy wrote:
>> >=20
>> > 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.
>> >=20
>> > Unfortunately #man man2html fails with:
>> > zcat: /usr/local/man/cat1/man2html.1.gz: not in gzip format
>> >=20
>> > #cd /usr/local/man/cat1
>> > #file man2html.1.gz
>> > man2html.1.gz: data
>> >=20
>> > Any clues appreciated
>> > John.
>>=20
>> Try looking at the first few lines of the file.  That should give
>> you a clue what type of file it is. =20
>>=20
>
>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 =3D \*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	=3D ("-topm", "0", "-botm", "0");
=46ixed it thanks Mark.

It's good to have this working.  Hyperlinked man pages are cool...
John.


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?vcuuusk6c197r11e7n6oo12cen7rbgti6l>