From thomas@biostat.washington.edu  Mon Jan 12 17:07:12 1998
From: thomas@biostat.washington.edu (Thomas Lumley)
Date: Mon, 12 Jan 1998 09:07:12 -0800 (PST)
Subject: Default device instead of ``No graphics device is active''
In-Reply-To: <199801121638.RAA01160@sophie.ethz.ch>
Message-ID: <Pine.SUN.3.95.980112090129.4431B-100000@chekov>

On Mon, 12 Jan 1998, Martin Maechler wrote:

> in RHOME/src/ :
> 	grep DevInit */*.[ch]
> reveals only a few calls such as
> 
> 	if(!DevInit) error("No graphics device is active\n");
> 
> (in graphics/graphics.c  and  main/par.c).
> 
> Couldn't we startup a default device instead of having the error message?

yes, though I think the default device for batch processing should do
nothing or just emit warnings -- if postscript() is the default then you
might overwrite the previous contents of an output file. At least if it is
going to be postscript() it should use a unique file name. 

It should be relatively easy to define a none() device that does
absolutely nothing (a simple but inefficient one would be
postscript("/dev/null") under Unix)

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Default device instead of ``No graphics device is active''
Thomas Lumley