------------------------------------
nroff (TOS, Minix) v1.10 7/22/90 wjr
------------------------------------

This is an improved release of a version of nroff for both TOS and Unix
(Minix and BSD). It was written under TOS and 4BSD unix but has been
released with Minix 1.5.5 as well. Unfortunately I have no access to Minix
so I do not know if this particular version will work correctly under Minix.
It does run under both SunOS and Convex, both BSD, so i feel pretty confident
that it should run under Minix. You will need to change the makefile
regardless. I use Alcyon and my own cc(1).

Besides small bug fixes, these are some new features since v0.99 (BETA):

	- added .if command which makes it possible to make a reasonable
	  ms package

	- fixed the bug where line filling on lines containing standout
	  would not fill properly

	- added a -ms package which is not half bad

	- enhanced the -man package

Much of this works. The things that (still) don't are all the hard things:
diversions, traps, conditionals, etc. See the man pages for what is not
supported (yet). Font switching, underlining, etc. are limited to reverse
video on the screen (TOS).

There are decent man and ms packages included (tmac.an and tmac.s) which are
not perfect but then they are not half bad either. To make them better, nroff
needs diversions and traps, something that I will eventually do. They should
handle most common man tasks, though. They get installed in /usr/lib/tmac
under Minix and c:\lib\tmac under atari TOS, unless you change the location
in nroff.h. For testing, you can

	% setenv TMACDIR .
	% nroff -man file

to use tmac.an (say) in the cwd.

For porting info, look in config.h, nroff.h and the makefile. The termcap
library is used to get standout capabilites for doing bold and italics to
the screen (Minix and Unix). The TOS version has these hardwired to the
vt52 escapes. Minix and BSD have termcap(3) and S5R3 has terminfo, which I
believe also includes the tgetent/tgetnum/tgetflag/tgetstr functions for
compatibility. Note that the Sun /etc/termcap includes padding in some of
the definitions which I strip out. See main.c.

If you want to try and use nroff for printer output, the termcap library
(Minix and Unix only) looks for TERMCAP in your environment (a file) so
that you could do:

	% env TERMCAP=printer_termcap_file nroff -man file

and substitute your own file with "so" (standout) for your printer. This
assumes your system has env, but you get the idea.

The program is small enough to work under Minix. It does not have a large
stack, but does store all macros and strings in a common namespace. Look
in nroff.h for the size.

If you do hack away, I would appreciate you sending me the changes so I can
keep this centralized.

The future holds increased capabilites, though I find it pretty useful
as it is. Most man things are possible and you can do reports and resumes
and such without much problem. See the example files included as well as
the manpage sources (nroff.man, man.man, ms.man) and the macro libraries
(tmac.an and tmac.s) for more help. Most people do not write macro libraries
but rather use the predefined macros (-man and -ms) which are supported
pretty well at this point.

Things to do include:

	- support for "block" if's, i.e.

		.if condition \{\
		...
		...
		... \}

	- support for .ie/.el (if/else)

	- traps, diversions

	- vertical motions

	- two-character user number registers

	- tabs, leaders, and fields

	- hyphenation

	- environment switching

If anyone has a few spare minutes, maybe you could add these? Just kidding!


Enjoy...


-Bill Rosenkranz
rosenkra%c1yankee@convex.com
