(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP") (FILECREATED " 2-Aug-89 13:02:26" {DSK}PS>PS-SEND.;9 5519 changes to%: (VARS PS-SENDCOMS) (PROPS (PS-SEND MAKEFILE-ENVIRONMENT)) previous date%: "27-Jan-89 12:09:04" {DSK}PS>PS-SEND.;8) (* " Copyright (c) 1988, 1989 by Beckman Instruments, Inc. All rights reserved. ") (PRETTYCOMPRINT PS-SENDCOMS) (RPAQQ PS-SENDCOMS ((FNS POSTSCRIPT.SEND SUN.PS.SEND) [P (* ;; " %"load the unixcomm software if you are on a sun.") (IF (EQ (MACHINETYPE) 'MAIKO) THEN (FILESLOAD 'UNIXCOMM] (PROP (FILETYPE MAKEFILE-ENVIRONMENT) PS-SEND))) (DEFINEQ (POSTSCRIPT.SEND [LAMBDA (HOST FILE PRINTOPTIONS) (* ; "Edited 27-Jan-89 10:53 by Matt Heffron") (if (EQ (MACHINETYPE) 'MAIKO) then (* ;; "Sun code compliments of Will Snow @ Envos.") (* ;; "we're on a SUN, let's print this file as directly as possible.") (SUN.PS.SEND HOST FILE PRINTOPTIONS) else [OR HOST (SETQ HOST (CAR (MKLIST DEFAULTPRINTINGHOST] (if (LISTP HOST) then (SETQ HOST (CADR HOST))) (LET* ([INFILE (OPENSTREAM FILE 'INPUT NIL '((TYPE TEXT) (SEQUENTIAL T] (SPOOLDIRECTORY (GETPROP HOST 'SPOOLDIRECTORY)) (SPOOLFILE (GETPROP HOST 'SPOOLFILE)) (SPOOLOPTIONS (GETPROP HOST 'SPOOLOPTIONS)) (OUTFILE (if SPOOLFILE then (OPENSTREAM SPOOLFILE 'OUTPUT NIL (APPEND '((TYPE TEXT) (SEQUENTIAL T)) SPOOLOPTIONS)) elseif SPOOLDIRECTORY then (OPENSTREAM (CONCAT SPOOLDIRECTORY (GENSYM USERNAME) ".PS") 'OUTPUT NIL (APPEND '((TYPE TEXT) (SEQUENTIAL T)) SPOOLOPTIONS)) else (CL:ERROR "~&Don't know how to send to: ~S" HOST))) (PRETTYDEST (if (OR SPOOLFILE SPOOLDIRECTORY) then (CONCAT (FULLNAME OUTFILE) " (" HOST ")") else HOST))) (if OUTFILE then (printout PROMPTWINDOW "[Sending " FILE " to " PRETTYDEST "...]" T) (LET [(POSTSCRIPTSTRING (LISTGET PRINTOPTIONS 'POSTSCRIPT.CONTROL.STRING] (PRIN1 (GET HOST 'HOST.CONTROL.STRING "") OUTFILE) (if POSTSCRIPTSTRING then (PRIN1 (CL:READ-LINE INFILE) OUTFILE) (TERPRI OUTFILE) (PRIN1 POSTSCRIPTSTRING OUTFILE))) (COPYBYTES INFILE OUTFILE) (CLOSEF INFILE) (PRIN1 (GET HOST 'HOST.CONTROL.AFTER.STRING "") OUTFILE) (CLOSEF OUTFILE) (printout PROMPTWINDOW "[Finished sending " FILE " to " PRETTYDEST ".]" T ) else (printout PROMPTWINDOW "[Unable to send " FILE " to " PRETTYDEST ".]" T]) (SUN.PS.SEND [LAMBDA (HOST FILE PRINTOPTIONS) (* ; "Edited 30-Dec-88 18:59 by demo") (* ;; "print a postscript file when you're on a sun. The printoptions get dropped for now.") [IF (NULL HOST) THEN (SETQ HOST (OR DEFAULTPRINTINGHOST (UNIX-GETENV "PRINTER"] (IF (LISTP HOST) THEN (SETQ HOST (CAR HOST))) (CL:UNLESS (STRINGP HOST) (L-CASE (MKSTRING HOST))) (* ;; "now we have a %"real%" host name for the printer") (CL:WITH-OPEN-STREAM [INSTREAM (OPENSTREAM FILE 'INPUT NIL '((TYPE TEXT) (SEQUENTIAL T] (CL:WITH-OPEN-STREAM (OUTSTREAM (CREATE-PROCESS-STREAM (CONCAT "/usr/ucb/lpr -P" HOST))) (PRINTOUT PROMPTWINDOW "[Sending " FILE " to " HOST "...]" T) (COPYBYTES INSTREAM OUTSTREAM) (PRINTOUT PROMPTWINDOW "[Finished sending " FILE " to " HOST ".]" T]) ) (* ;; " %"load the unixcomm software if you are on a sun.") (IF (EQ (MACHINETYPE) 'MAIKO) THEN (FILESLOAD 'UNIXCOMM)) (PUTPROPS PS-SEND FILETYPE :TCOMPL) (PUTPROPS PS-SEND MAKEFILE-ENVIRONMENT (:PACKAGE "INTERLISP" :READTABLE "INTERLISP")) (PUTPROPS PS-SEND COPYRIGHT ("Beckman Instruments, Inc" 1988 1989)) (DECLARE%: DONTCOPY (FILEMAP (NIL (894 5146 (POSTSCRIPT.SEND 904 . 4146) (SUN.PS.SEND 4148 . 5144))))) STOP