home *** CD-ROM | disk | FTP | other *** search
- /*
- * It is the intent of the author that this software may be
- * distributed and used freely, without restriction. If you
- * make improvements or enhancements, I would appreciate a
- * copy.
-
- * The author makes no warranty, express or implied, as to
- * the functioning or suitability of the software for any
- * purpose, and the fact of distribution implies no such
- * warranty. The author assumes no responsibility for
- * himself or others in connection with this software of any
- * use of it (i.e., you may use it freely, but don't blame
- * me if something goes wrong).
-
- * Duane H. Hesser, Teltone Corporation
- * ....uw-beaver!tikal!sysad
- * ....uw-beaver!tikal!dhh
- */
-
- "lplot" is a plot(3) filter for Printronix P300 (or
- equivalent) printers. "quickplot" is a plot(3) filter for
- any ascii terminal. "Quickplot" can be used to display
- simple low-resolution plots, but is probably more useful for
- previewing plot streams before plotting on a real plottting
- device.
-
- "lplot" accepts the arguments which the 4.2BSD printer
- spooler sends to plot filters (hostname, user, and pixel
- sizes), and thus may be used in /etc/printcap on 4.2BSD
- systems as the "g" filter for a printer. (These arguments
- are optional.) Please see the supplied manual pages for
- further information about behavior and available options.
-
- These programs have been compiled sucessfully under BSD 4.2
- on a Pyramid, and BSD 4.2 and 4.1 on Vax 750's. There
- should be little to prevent their compilation on any Unix
- system which has the plot(3) library. (ummm... you will also
- need some form of bzero() and bcopy()).
-
- CAVEATS: "quickplot" needs the termcap library; it would not
- be difficult to do without it. "lplot" requires about
- 104kbytes for the output array (no raster file is used), so
- machines with limited data space will need to restrict the
- plotting area (cut down the array size), or modify the
- point() and output() routines to use some sort of virtual
- array with disk buffering. BEWARE your line printer driver.
- Some drivers like to do a bit of processing on the data sent
- to them, assuming that you want backspaces and carriage
- returns handled specially, for example. The driver must
- pass lplot output untainted by its own pre-conceptions.
-
- "lplot" assumes that the paper in the printer is positioned
- at line 1, rather than at the fold, so that printing (or
- plotting) begins at the first line on the page. This means
- that it assumes 780 dots vertically, rather than 792. If
- this doesn't suit your situation (and you find top-of-form
- creeping), change YDOTS in "defs.h". Horizontal dot density
- is 60 dots per inch, vertical dot density is 72 dots per
- inch, and array space is provided to permit plotting on a
- full page of 132 column by 11 inch printer paper. Although
- the space() routine maps its arguments into an 8 inch
- plotting area in the lower left corner of the page, plotting
- is permitted outside that range. (Note: "quickplot"
- truncates data outside the mapped area, which is taken to be
- the full terminal screen.)
-
- MAKEFILES:
- There are 3 makefiles: one for "lplot" one for "quickplot"
- and one to control the other two. The latter is "Makefile".
- If you type "make" by itself, the following list of targets
- will be printed:
-
- Use:
- make all to update lplot and quickplot
- make new to make both from scratch
- make clean to remove .o files
- make bclean to remove binaries and .o files
- make lplot to make only lplot
- make quickplot to make only quickplot
- make install to update and install both
- make install_l to update and install lplot
- make install_q to update and install quickplot
-
- You should edit "Makefile" to set BIN (the directory where
- the binaries are to be installed), and MAN (where the manual
- pages are to be copied). As delivered, BIN=/usr/public/bin,
- MAN=/usr/man/manp.
-
- You should also check the DEFINES. Then type "make new" to
- make both binaries (or "make install" if your want to do the
- whole thing in one swell foop). The DEFINES should be
- changed in Makefile.lplot and Makefile.quickplot as
- appropriate. "make install" will install the binaries, and
- make a link to "lplot" called "rlplot". "rlplot" activates
- the 'rotate' option, which causes the plot to be rotated 90
- degress ccw. We use this in /etc/printcap for one of our
- printers in which we use 8 1/2 x 11 paper, with appropriate
- pixel sizes, to cause the long dimension of the paper to
- appear "horizontal" to the plot. If you don't have the 4.2
- spooler, don't use narrow paper, or just plain don't need
- rotated plots, you may wish to delete this from the
- makefile.
-
- Note: the rather strange makefile setup is intended to keep
- track of which binary is being created. Loading "lplot"
- with object files created with QUICKPLOT defined is
- ineffective. Use separate directories if you prefer.
-
- DEFINES:
- define BIGENDIAN if you are compiling for a machine with
- mad-hatter byte-order (3,2,1,0,7,6,5,4...) like Pyramids and
- 68000's. Leave it out for Vaxes.
-
- define DEBUG to compile in some debugging code. This is set
- in the delivered makefiles, and compiles in a '-d' flag
- which permits 3 levels of debugging output (controlled by
- the 1,2,4 bits in the single- digit following argument).
- '-d 1' outputs the decoded and scaled plot stream commands,
- and can be useful for debugging plot streams; the remaining
- bits are useful only for program debug.
-
- define QUICKPLOT to compile "quickplot"; leave it out to
- compile "lplot". These are set up already in the
- appropriate makefiles.
-
- All other defines are in "defs.h", and should not need to be
- changed unless you have a printer with different dot density
- or perhaps a different graphics code, etc.
-
- ONE LAST THING
- The sources in this distribution are created with 4 space
- tabstops. They contain comment-commands for later versions
- of "vi" to set tabstops appropriately; if this doesn't work
- for you, set tabstops manually to 4, use "expand -4", or run
- them thru a sed script or "indent".
-