home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / SPECTR30.LZH / USCRIPT / STARTUP.PS < prev   
Text File  |  1986-04-24  |  5KB  |  153 lines

  1. %!PS-Adobe-2.0
  2. %%Title: STARTUP.PS
  3. %%Creator: Douglas N. Wheeler
  4. %%CreationDate: 15 August 1990
  5. %%Pages: 0
  6. %%EndComments
  7. %
  8. % The most complete STARTUP.PS for printing Macintosh generated
  9. % PostScript files with UltraScript.
  10.  
  11. %-----------------------------------------------------------------------------
  12. % Uncomment (remove the %s) this section to enable printing of errors
  13.  
  14. %errordict
  15. %/handleerror
  16. %    {
  17. %        $error begin
  18. %        /prt
  19. %            {
  20. %                dup type
  21. %                /stringtype ne
  22. %                {=string cvs} if
  23. %                show
  24. %            } def
  25. %        newerror
  26. %            {
  27. %                /newerror false store
  28. %                grestoreall
  29. %                initgraphics
  30. %                30 30 moveto
  31. %                /Times-Italic findfont 14 scalefont setfont
  32. %                (POSTSCRIPT ERROR: ) prt
  33. %                errorname prt
  34. %                ( ) prt
  35. %                (OFFENDING COMMAND: ) prt
  36. %                /command load prt
  37. %                (ioerror) errorname ne
  38. %                {showpage} if
  39. %            } if
  40. %        end
  41. %    } put
  42.  
  43. %-----------------------------------------------------------------------------
  44.  
  45. statusdict begin
  46. /setrealdevice null def                    % ignore
  47. /execjob null def                        % ignore
  48.  
  49. % persistent
  50. /pagecount {0} def                        % # of pages printed (we just return 0)
  51. /pagestackorder {true} def                % pages are collated in correct order
  52. /setprintername {pop} def                % ignore printer name change
  53. /printername {( LaserWriter )} def        % say we're named LaserWriter
  54. /setsccbatch {pop pop pop} def            % ignore
  55. /sccbatch {pop 9600 0} def                % 9600 baud, 0 parity
  56. /setsccinteractive {pop pop pop} def    % ignore
  57. /sccinteractive {pop 9600 0} def        % 9600 baud, 0 parity
  58. /setdostartpage {pop} def                % ignore
  59. /dostartpage {false} def                % we don't do startup pages
  60. /setmargins {pop pop} def                % ignore
  61. /margins {0 0} def                        % margins of 0 0
  62. /setpagetype {pop} def                    % ignore
  63. /pagetype {0} def                        % default pagetype = letter
  64. /setdefaulttimeouts {pop pop pop} def    % ignore
  65. /defaulttimeouts {0 60 30} def            % return job, manual, and wait timeouts
  66. /setpassword {pop pop true} def            % ignore, return success
  67. /checkpassword {pop true} def            % ignore, return success
  68. % /setidlefonts                            % (leave for now)
  69. % /idlefonts                            % (leave for now)
  70. /seteescratch {pop pop} def                % ignore write to EEPROM
  71. /eescratch {pop 0} def                    % can't read from EEPROM, return 0
  72.  
  73. % non-persistent
  74. /setjobtimeout {pop} def                % ignore
  75. /jobtimeout {0} def                        % return 0 (never)
  76. /manualfeedtimeout {60} def                % return 60 seconds
  77. /waittimeout {30} def                    % return 30 seconds
  78. % /manualfeed {false} def                % using paper tray
  79. /prefeed {false} def                    % not supported
  80. % /jobname null def                        % current job - who knows?
  81. /printererror {pop pop} def                % ignore
  82. % /product {( LaserWriter )} def        % say we're a LaserWriter
  83. % /revision {0} def                        % return revison # of 0
  84.  
  85. statusdict /product ( LaserWriter ) put
  86.  
  87. %-----------------------------------------------------------------------------
  88.  
  89. systemdict begin
  90.  
  91. /oldscd
  92.     /setcachedevice load def            % set oldscd to setcachedevice
  93.  
  94. /setcachedevice
  95.     {
  96.         0 0 moveto                        % make UltraScript happy
  97.         oldscd                            % call old routine
  98.     } bind def
  99.     
  100.  
  101. /oldmoveto
  102.     /moveto load def                    % set oldmoveto to moveto
  103.  
  104. /moveto                                    % replace moveto with our own
  105.     {
  106.         exch                            % check x value first
  107.         dup 7864 gt {pop 5000} if        % if too high, lower it
  108.         dup -7864 lt {pop -5000} if        % if too low, raise it
  109.         exch                            % check y value next
  110.         dup 8656 gt {pop 5000} if        % if too high, lower it
  111.         dup -7072 lt {pop -5000} if        % if too low, raise it
  112.         oldmoveto                        % call old moveto routine
  113.     } bind def
  114. end
  115.  
  116. /oldlineto
  117.     /lineto load def                    % set oldlineto to lineto
  118.  
  119. /lineto                                 % replace lineto with our own
  120.     {
  121.         exch                            % check x value first
  122.         dup 7864 gt {pop 5000} if       % if too high, lower it
  123.         dup -7864 lt {pop -5000} if     % if too low, raise it
  124.         exch                            % check y value next
  125.         dup 8656 gt {pop 5000} if       % if too high, lower it
  126.         dup -7072 lt {pop -5000} if     % if too low, raise it
  127.         oldlineto                       % call old lineto routine
  128.     } bind def
  129. end
  130.  
  131. % This is still under construction...
  132. /oldread
  133.     /read load def                        % set oldread to read
  134.  
  135. /read
  136.     {
  137.         oldread
  138.         dup true eq
  139.             {
  140.                 pop
  141.                 dup 10 eq {pop currentfile oldread pop} if
  142.                 true
  143.             } if
  144.     } bind def
  145.  
  146. %-----------------------------------------------------------------------------
  147.  
  148. (___________________________________________________________) print flush
  149. ( ) print flush
  150. (STARTUP.PS - by Douglas N. Wheeler @ Gadgets by Small, Inc.) print flush
  151. (___________________________________________________________) print flush
  152. ( ) print flush
  153.