PRO CLOSE_PS ;+ ; NAME: ; CLOSE_PS ; PURPOSE: ; Closes a PostScript output file (opened by OPEN_PS). It then reopens ; the file for Update, and appends a D to the file for compatability ; with the QMS PostSCript printer ; CATEGORY: ; Utility ; CALLING SEQUENCE: ; CLOSE_PS ; INPUTS: ; None ; OPTIONAL INPUT PARAMETERS: ; None ; KEYWORD PARAMETERS: ; ; OUTPUTS: ; None ; OPTIONAL OUTPUT PARAMETERS: ; None ; COMMON BLOCKS: ; PS_STUFF,pfont,dname,ps_filename ; SIDE EFFECTS: ; Closes the file PS_FILENAME ; Appends a D to that file ; RESTRICTIONS: ; None known ; PROCEDURE: ; ; MODIFICATION HISTORY: ; T.J.Hughes, HIA/NRCC , November 30, 1990 ;- common ps_stuff,pfont,dname,ps_filename ; +-------------------------------------------------------------------+ ; |Close PS_FILENAME so that all the graphics buffers are cleared. | ; |EMPTY didn't seem to do it, and we can't use FLUSH,UNIT because | ; |we don't know what unit has been used. | ; +-------------------------------------------------------------------+ device,/close ctrl_d=string(4b) ; +-------------------------------------------------------------------+ ; |Open the same file again, for updating, and append a D to | ; |it | ; +-------------------------------------------------------------------+ get_lun,unit openu,unit,ps_filename,/append printf,unit,ctrl_d close,unit free_lun,unit ; +-------------------------------------------------------------------+ ; |Reset the output graphics type to what it was before OPEN_PS was | ; |called, and reset !P.FONT similarly | ; +-------------------------------------------------------------------+ set_plot,dname !p.font=pfont return END