		       NeWS Device Driver for S

			    Douglas Bates
		       Department of Statistics
		  University of Wisconsin - Madison

			  December 10, 1988

Background:
    This device driver was created as a class project by the students
of Statistics 992, "Dynamic Graphics for Statistics", in the fall
semester 1988.  Major contributions were made by Ed Kademan (initial
implementation and communication between C and PostScript routines),
Ananda Sen (refinement of PostScript routines), Chong Gu (menu
implementation), and Dave Reboussin (debugging and enhancement of the
display list code).  It provides a New S device driver for the NeWS
(Network Extensible Window System) window system developed by Sun
Microsystems. This window system incorporates an extended PostScript
language and the device driver contains both PostScript code (in
ok_news.cps) and C driver routines (in ok_news.c).  The driver
includes menu and graphical input facilities.

Display List Code:
    One feature we adopted from Ross Ihaka's X11 driver is keeping a
display list for each plot so the plot can be completely redrawn if
the window is "damaged" or rescaled.  In most NeWS implementations the
window (actually the ClientCanvas of the window) will be retained as a
bitmap so it can be rapidly redrawn if it is exposed or deiconified.
However, retained canvases can require a lot of memory on color
systems so retention is not guaranteed.  Furthermore, the retained
bitmap will not be rescaled if the size of the window is changed.
Thus we had Dave Reboussin modify Ross Ihaka's display
list code and incorporate it into this driver.

    This code is now packaged as a separate file named
"disp_list.h".  As a header file it is a bit unusual since it
defines several routines.  They are included as a header file rather
than compiled separately so they can be declared as static and not
clutter up the global name list.  Routines there like "lines", "text",
are the name listed in the device structure.  They, in turn, call
"USRlines", "USRtext", ... which are specific to the device.  The name
DNAME should be defined to the name of the device.

    The purpose splitting this off as a separate "header" file is so
that drivers for other window systems can also use the display list
code. It should be useful for an X11 driver or a Display PostScript
driver or for other window systems.

Installation:
    This archive contains a set of additions for the Makefile in
$SHOME/src/qpe.  The macro CFLAGS should be also modified as
indicated.  You must have the cps translator available and define the
environment variable NEWSHOME appropriately to compile this driver.
If the NEWSHOME directory is not found, a driver stub is created instead.
The S function in the file news.S should be installed in
$SHOME/s/.Functions and news.d installed as
$SHOME/s/.Functions/.Help/news
