Subject: Re: catman -w core dumping

From: [email-masked] (Casper H.S. Dik)
Date: 13 Oct 1993 10:35:26 GMT

[email-masked] (Herb HASLER) writes:

>When I try to build an index of our systems local man pages I get the 
>following message:

># catman -w
>Output line too long.
>Output line too long.
>Segmentation Fault - core dumped
>#

>It would appear that it is choking on one of the man pages (or perhaps there
>are too many pages).   If anyone has seen this problem before and/or has
>a simple way to fix it, drop me some email.

catman/man and friend are sort of broken in Solaris 2.0 - 2.2.
(Looking at the source code of man/catman I'm not surprised)

The particular problem you're seeing is because catman requires very specific
formatting of manual pages. (In particular, it likes the nroff source files
to look like ``.SH NAME\n<text>\n.SH xxxxx''

getNAME, the program that gets the synopsis out of all the man files,
copies everything between .SH NAME and the following .SH directive
and concatenates this to one line. It also wants the exact naem of the manual
page to appear in the synopsis line.

For some manual pages this amounts to several kilobytes, because of
bad structuring. Such long lines are then fed in the makewhatis script
to sed and awk. The message ``Output line too long'' is printed by sed.
``Segmentation Fault - core dumped'' is printed by the shell. It's
awk that crashed. You can edit the whatis script and substitute nawk for
awk. This still won't fix the problem. Only editing manual pages
really helps.

For kicks, try /usr/lib/getNAME /usr/openwin/man/man3/classtree.3.
Piped through wc it gives: 1     757    4039

Casper