
Here's a program that reads ASCII text files and produces PostScript output
suitable for printing on an Apple LaserWriter.
The program has been in use here for several months on both Vaxen and SUNs
running 4.2.

Disclaimer section {

There are some 4.2 dependencies in the code, but (hopefully) not too many.
The code is not bulletproof and I've taken some shortcuts such as emitting
PostScript from various places.
Also, since I didn't want to fool around with PostScript anymore than was
necessary, lwf produces more output than is necessary.
If more of the processing were done on the LaserWriter then the volume
could be reduced significantly.
Still, I wanted to keep it simple and I've found lwf to run without problem.

}

There are five files:

	README		This file
	lwf.c		LaserWriter filter to convert ASCII text to PostScript
	range.c		Routine to check if a number is in a given range
	ranget.c	A program to test out range.c
	lwf.1		Manual page for lwf

To compile:
	cc -o lwf lwf.c range.c
	cc -o ranget ranget.c range.c

I used the ranget program for debugging the inrange and checkrange
functions; you may want to use it to see how ranges work.

I hope you find lwf to be useful.
If you come across any bugs please let me know.

P.S.
I've modified dvi2ps to use range.c so that more general page ranges may
be specified.  The changes to dvi2ps are rather small and I don't think
you'll have any trouble making them.

-----
Barry Brachman
Dept. of Computer Science
Univ. of British Columbia
Vancouver, B.C. V6T 1W5

.. {ihnp4!alberta, uw-beaver}!ubc-vision!ubc-cs!brachman
brachman@cs.ubc.cdn
brachman%ubc.csnet@csnet-relay.arpa
brachman@ubc.csnet
