groff alternative?
Alex Zbyslaw
xfb52 at dial.pipex.com
Fri Apr 29 15:51:45 PDT 2005
Peter Jeremy wrote:
>On Fri, 2005-Apr-29 00:55:41 +0100, Alex Zbyslaw wrote:
>
>
>>Since no-one had a sensible answer, why not try a version of original
>>nroff from say 4.3BSD. Hunting around, I found this:
>>http://www.tuhs.org/. Hopefully the most used macros will have stayed
>>the same.
>>
>>
>
>Actually, they haven't. The FreeBSD man pages are written using mdoc(7),
>not man(7). The current version of mdoc(7) in FreeBSD needs long names -
>which are supported by ditroff and groff but not the older nroff.
>
>
Ever a sucker for punishment, I downloaded 4.3bsd nroff and pretty much
it seems to work*. This is on 4.11. The tmac.an macros load tmac.doc.
There may be some new macros defined since the days of 4.3 but I doubt
anything critical has changed.
Peter, did you mean that the macro definition file uses long
definitions? If so, I don't think that matters since I proposed using
the original tman.an/tmac.doc macros which would obviously be
compatible. Just that new man pages might use a macro which wasn't
defined in those old definitions files.
A tar.gz is a massive 124K (source only) so, Emanuel, if you want to try
it I can mail it to you. (It was you asked the original question,
wasn't it?)
* I have formatted a massive 3 random manual pages, and got one bad
definition, but the page viewed fine.
If anyone cares to repeat the feat, I used the 4.3BSD-Reno src. I
needed src.tar.gz and usr.tar.gz form which I extracted usr.bin/roff,
libdata/term/tablpr, libdata/term and share/tmac. I put the whole thing
under /usr/local/43bsd, fixed a couple pathname.h files and wrote the
stupidest shell script because Makefiles created umpteen problems. When
it all compiles in 5 seconds, makefiles are somewhat moot :-). In
usr.bin/roff/nroff
cc -c -DNROFF -DVMUNIX -I../common_source *.c
cd ../common_source
cc -c -DNROFF -DVMUNIX -I. *.c
cd ../nroff
cc -o nroff *.o ../common_source/*.o -lcompat
And fixed the hardwired pathnames in tmac.an.
The list of 4BSD archive sites is at
http://www.tuhs.org/archive_sites.html and I used the York/UK one.
--Alex
PS I have redirected back to questions where this thread started.
Doesn't seem that relevant to current.
More information about the freebsd-questions
mailing list