			SIMPLE-MINDED SPOOLING SYSTEM

The program sources in this directory are useful for quickly
implementing an output device spooler for some random device; 
we use this for a band printer, a printer-plotter, and a pen plotter.
The general scheme is:

1) User somehow creates an output file he wants spooled to the device
   (may be on standard output of a program).
2) User invokes spooler with the file name as argument, or input may be
   piped in via the spooler's standard input.
3) Spooler links file in (or copies file to) a directory allocated for
   spooled output for the device, then wakes the despooling daemon.
   Spooler optionally removes original file upon successful spooling.
4) Despooling daemon takes each file in the spool directory and tells a
   device slave to output it, then removes it when done.
5) Device slave takes file and device arguments and transfers the file.

When compiling these sources, specify device specifics via -D values:
% cc -DDIR=\"directory\" -DDAEMON=\"despooler\" -DUID=uid \
	-DBANNER=\"bannerer\" spool.c -o spooler
% cc -DDIR=\"directory\" -DDEV=\"device\" -DXFR=\"slave\" -DUID=uid \
	-DBANNER daemon.c -o despooler
`directory' is the spool directory (default /usr/lpd).
`despooler' is the despooling daemon's name (default /etc/lpd).
`uid' is the UID of the owner of the device and directory (default 1).
`bannerer' is the banner program's name (no banner if omitted); although
	/usr/bin/banner is the usual program, plot devices will probably
	need a special version since ASCII text is inappropriate.  The
	banner is stored as a separate file from the output data.
`spooler' is the spooling program's name (default /lib/lpr).
`device' is the output device name (default /dev/lp).
`slave' is the name of the program that transfers files to the device
	(default /bin/cp); invoked as "slave filename device".

The shell script mk_bps can serve as a template for making spoolers.
