[comp.windows.news] Down Load File

peterson@SW.MCC.COM (James Peterson) (12/23/87)

I have a file of PostScript commands that I need to down load to
the NeWS server.  Under the assumption that NFS is providing the
same file system to both client and server, I would like to just
tell the server the name of the file and tell it to load the file,
like:

	(/usr/lib/NeWS/appl.ps) loadfile

But I can find no NeWS or Postscript command for this function.

Do I have to read the file in my client application and send the
bytes down to the NeWS server one at a time?

rcp@SW.MCC.COM (Rob Pettengill) (12/24/87)

In article <8712222218.AA05038@cleo> peterson%sw.MCC.COM@MCC.COM (James Peterson) writes:
;
;
;I have a file of PostScript commands that I need to down load to
;the NeWS server.  Under the assumption that NFS is providing the
;same file system to both client and server, I would like to just
;tell the server the name of the file and tell it to load the file,
;like:
;
;	(/usr/lib/NeWS/appl.ps) loadfile
;
;But I can find no NeWS or Postscript command for this function.
;
;Do I have to read the file in my client application and send the
;bytes down to the NeWS server one at a time?

Jim,
You are very close.
init.ps uses
(user.ps) LoadFile pop
to load the user init file.  I assume that Postscript is case
sensitive.

;rob
--
  Robert C. Pettengill, MCC Software Technology Program
  P. O. Box 200195, Austin, Texas  78720
  ARPA:  rcp@mcc.com            PHONE:  (512) 338-3533
  UUCP:  {ihnp4,seismo,harvard,gatech,pyramid}!ut-sally!im4u!milano!rcp

aronson@thuban.steinmetz (marc aronson) (12/24/87)

To load a bunch of postscript commands, send the following to the
NeWS server:

		(filename) run

filename is a filename with a full path.  I do it all the time.  In fact,
one of my cdef functions looks something like this:

	cdef cps_init
	  systemdict /my_package known not
	    {
	      (/usr/sungod/aronson/src/newsutils/mypackage.ps) run
	    } if
	  my_package begin
	  100 dict begin

This file contains a bunch of NeWS utilities that many of my applications
use.  These common utilities are loaded only once to each NeWS server.  They
are loaded the first time an application requiring the utilities is executed.
I don't add trash to the system dictionary, because they are all collected
into a private dictionary.  I add one key to the system dictionary that
points to my stuff.

Marc Aronson

aronson@ge-crd.arpa -- steinmetz!sungod!aronson

greg@parallax.UUCP (Greg Cockroft) (12/25/87)

	I have a file of PostScript commands that I need to down load to
	the NeWS server.  Under the assumption that NFS is providing the
	same file system to both client and server, I would like to just
	tell the server the name of the file and tell it to load the file,
	like:
	
		(/usr/lib/NeWS/appl.ps) loadfile
	
	But I can find no NeWS or Postscript command for this function.

Try
psh
executive
/verbose? true store
(/usr/lib/NeWS/app1.ps) LoadFile pop

Source for LoadFile is in init.ps

	-greg.

msc@ramoth.SGI.COM (Mark Callow) (01/09/88)

Re:  Question on loading a file into the server.

Use 'psh <filename>' or 'psview <filename>'

depending whether the file in question is a program for NeWS (use psh)
or raw PostScript like you'd send to a printer (use psview).  The
distinction isn't as clear cut as I've made it appear.  The above is
just a guideline.
--
From the TARDIS of Mark Callow
msc@sgi.sgi.com, ...{ames,decwrl,sun}!sgi!msc
"There is much virtue in a window.  It is to a human being as a frame is to
a painting, as a proscenium to a play.  It strongly defines its content."