Re: Problem in prepare.pl (PDF book script) when handling Unix V10 manual pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Deri!

On Mon, Feb 17, 2025 at 06:52:46PM +0000, Deri wrote:
> On Thursday, 13 February 2025 16:08:39 GMT Alejandro Colomar wrote:
> > Hi Deri,
> > 
> > I tried generating a PDF book from the Unix v10 manual pages, and found
> > some issues with the Perl script.  I don't understand Perl, as you know,
> > so I don't know what to do.
> > 
> > I've attached a tarball with the manual pages that I'm trying to handle.
> > They're slightly modified V10 files, in order to make them slightly more
> > conventional (e.g., the =.1 page is now called eq.1, and the manx/ dir
> > and other dirs than didn't have a digit in their names are now divided
> > into dirs that have one digit after the name (e.g., man1x/, ...)).
> > 
> > The command I'm trying to run is:
> > 
> > 	$ make -R build-pdf-book MANDIR=~/Downloads/unix/man/
> > 
> > (Of course, replace that path with wherever you untar the tarball.)
> > 
> > The error I see is a forever loop (or so it seems) with the following
> > error line:
> > 
> > 	Use of uninitialized value $v in exists at
> > /srv/alx/src/linux/man-pages/man-pages/contrib/share/mk/build/pdf/book/prep
> > are.pl line 67.
> > 
> > Would you mind having a look at it?
> > In case it matters:
> > 
> > 	alx@devuan:~$ groff --version
> > 	GNU groff version 1.23.0.2695-49927
> > 	Copyright (C) 1989-2023 Free Software Foundation, Inc.
> > 	This is free software, distributed under the terms of the GNU General
> > Public License, version 3, or any later version, at your option.  There is
> > NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> > PURPOSE.
> > 
> > 	programs in constructed pipeline:
> > 
> > 	GNU grops (groff) version 1.23.0.2695-49927
> > 	GNU troff (groff) version 1.23.0.2695-49927
> > 
> > 
> > Have a lovely day!
> > Alex
> 
> Hi Alex,
> 
> This was caused by nonsense "aliases", see man1w/splitrules.1, and man1b/pins.
> 1g, which looks like an alias, but is not. This has now been fixed by being 
> more tolerant of weird entries which look like aliases.
> 
> There are a lot of pages which should have aliases added.
> 
> I found some other issues which I have fixed:-
> 
> When an alias points to another alias the code was meant to keep looking until 
> the real page is found. This affects the recent 6.11 (an example is 
> fchown32(2) which has no associated page number in the overview panel, it now 
> works properly.
> 
> Since the v10 pages are intended to run on a version of troff with a two 
> character name limit (I think). Code such as ".ne4" cause a problem for groff, 
> which needs ".ne 4" to work (otherwise groff looks for a macro called "ne4" 
> and fails. Many of these issues are now corrected.
> 
> A strange issue is that if a page contained a "$" character it sent eqn into 
> the stratosphere (thinking was dealing with an inline equation), I killed it 
> when eqn chewed up over 24gb of memory. I have no idea why, and it is not 
> triggered by a single page containing a "$", so it must be triggered by 
> something in an earlier man page which triggers it, but changing some "$" to 
> "\[Do]" fixed the problem.
> 
> One page redefined the ".P" man macro, which then affects all following man 
> pages.
> 
> One page introduced a string register called "mc" which then masks the groff 
> command ".mc" with very strange results .
> 
> Font L is used in many entries, no clue what font this is, but I convert to 
> font CB. Please change to taste (see lines 130 onwards).
> 
> Several pages use lower case macro names, i.e. ".th" rather than ".TH".
> 
> I have "fixed" a lot of the problems but there are still many warnings when 
> running groff. I have attached two parthes, one for the V10 man pages, and one 
> for prepare.pl. You should be able to produce a "useful" book after applying 
> these.

Thanks for all of that work!!

> 
> If you wish to see the fruits of my labour as a pdf, it is here:-
> 
> http://chuzzlewit.co.uk/UnixV10.pdf

It looks quite good!  I need to update the front page, and it's done, I
guess.  :-)


Have a lovely night!
Alex

> Cheers 
> 
> Deri

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux