;+ ; NAME: ; PSPLOT ; PURPOSE: ; print a PostScript plot file ; CALLING SEQUENCE: ; PSPLOT [,VERSION][DELETE=DELETE][,FILENAME=FILENAME] ; [,queue=queue][,color=color] ; INPUTS: ; none ; OPTIONAL INPUT PARAMETERS: ; version = An integer version number will cause the plotting of that ; particular IDL.PS file. ; KEYWORD PARAMETERS: ; DELETE - delete the plot file after printing ; FILENAME - Other than the default, IDL.PS ; QUEUE - Default queue is NET$PRINT ; COLOR - send to color printer ; SIDE EFFECTS: ; The plot file is queued on the Talaris T1590-T printstation with ; /SETUP = PSI, unless color is specified ; RESTRICTIONS: ; There must be a file IDL.PS on the default directory. ; PROCEDURE: ; A command line is spawned. ; MODIFICATION HISTORY: ; D.M. fecit, 25 July, 1985. ; Modified for system print queue, 8 December, 1987. ; Modified for IDL V2 and PostScript, 2 May, 1990. ; Modified for optional filenames, 9 Nov., 1991 by RAS ; DMZ (ARC) July'92 -- Made UNIX compatible, and introduced /DELETE keyword ;- PRO PSPLOT,version,delete=delete,filename=file, queue=queue,color=color if !version.os eq 'vms' then vms=1 else vms=0 if n_elements(file) eq 0 then file='idl.ps' if vms and (n_elements(version) ne 0) then file=file+';'+strtrim(string(version,'(i2)'),2) ;-- file present? f=findfile(file,count=count) if count eq 0 then begin message,'cannot locate '+file,/cont & return endif else file=f(0) ;-- file open? if !d.unit ne 0 then begin status=fstat(!d.unit) if strpos(strlowcase(file),strlowcase(status(0).name)) ge 0 then device,/close endif ;-- delete after print if vms and keyword_set(delete) then pdelete=' /delete' else pdelete='' ;-- different keywords for different cases pqueue='' if n_elements(queue) eq 0 then begin if keyword_set(color) then begin if vms then begin printcom='print' & pqueue=' /queue=solar$color' & qualifier='' endif else begin printcom='lpr' & pqueue='' & qualifier=' -Pcolorprint' endelse endif else begin if vms then begin printcom='print' & pqueue=' /queue=net$print' & qualifier=' /setup=psi' endif else begin printcom='lpr' & pqueue='' & qualifier='' endelse endelse endif else begin printcom='print' & pqueue=' /queue= '+queue & qualifier=' /setup=psi' endelse ;-- spawn print com_line=printcom+' '+ qualifier+' '+file+pqueue+pdelete message,com_line,/contin & spawn,com_line ;-- spawn delete if keyword_set(delete) and (not vms) then begin delcom='rm -f'+file message,delcom,/info spawn,delcom endif return & end