Subject: Down Load File

From: James Peterson <[email-masked]>
Date: Tue, 22 Dec 87 20:33:13 EST

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?

---

From: Rob Pettengill <[email-masked]>
Date: Wed, 23 Dec 87 11:07:07 EST

In article <8712222218.AA05038@cleo> [email-masked] (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:  [email-masked]            PHONE:  (512) 338-3533
  UUCP:  {ihnp4,seismo,harvard,gatech,pyramid}!ut-sally!im4u!milano!rcp

---

From: [email-masked] (Brent Browning)
Date: Wed, 23 Dec 87 17:13:27 EST

>to load the user init file.  I assume that Postscript is case
   Yes, PostScript is case sensitive.  LoadFile is defined near the top
of init.ps.  It just puts a little bit of a fancier front end on top
of the PostScript primitive "run".  If verbose? is set to true it prints
out messages, etc...

>From the red book:

"run" is essentially a convenience operator for the sequence

(r) file cvx exec

   "file" creates a file object for the file (read-only), "cvx" makes
the resulting object executable, and "exec" pushes that operand on
the execution stack, executing it immediately.

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| Brent Browning                 Internet: [email-masked] |
| Dept. of Computer Science      UUCP: ...!{hao,nbires}!boulder!brentb |
| University of Colorado                                               |
| Boulder, Colorado 80309-0430   Phone: (303) 492-6096                 |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|

---

From: [email-masked] (marc aronson)
Date: Thu, 24 Dec 87 04:16:25 EST

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

[email-masked] -- steinmetz!sungod!aronson

---

From: [email-masked] (Greg Cockroft)
Date: Thu, 24 Dec 87 23:51:16 EST

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

Source for LoadFile is in init.ps

	-greg.