~UTEXAS_LASER.SAVUTEXAS_LASER.SAVMBACKUP IGLOO:[VAX90A.UTEXAS.LASER]*.* UTEXAS_LASER.SAV/SAVE/LOG/NOCRC/GROUP=0 FAUCONNET *'{ܓV5.3 _IAKA::  _$1$DUA3: V5.3 ~$*[VAX90A.UTEXAS.LASER]AAAREADME.1ST;1+,D./ 4K4-C0123KPWO5 6`V<7֓8 WM#c9GHJ KLASER is a user-written print symbiont that is tailored specifically to the7Apple LaserWriter family and other PostScript printers.GThe symbiont as distributed is configured to print normal text files inHa variety of formats on the laser printer. Support is also included forDprinting PostScript files, MacPaint files, and Zeta plot files. See4LASER.C for additional capabilities of the symbiont.2This distribution consists of the following files:File Destination PurposeK---------------------------------------------------------------------------AAAREADME.DOC This file7LASER.EXE SYS$SYSTEM:LASER.EXE The symbiont executable.?*.PS SYS$LIBRARY:LASER.TLB Library of PostScript header files.LASER.C Symbiont sources.&LASER_ERR.MSG Error message source. QUIDEF.H Source header files.SMBDEF.HLBRDEF.HLASER.OPT Link options file.>LASER.HLP SYS$HELP:HELPLIB.HLB Description of forms supported.:SYST.COM SYS$MANAGER:SYSTARTUP.COM Queue startup commands. Installation.GInstallation of the files can be accomplished with the following set of commands: $ LIBRARY/CREATE/TEXT LASER *.PS&$ COPY LASER.EXE SYS$SYSTEM:/PROT=W:RE'$ COPY LASER.TLB SYS$LIBRARY:/PROT=W:RE2$ LIBRARY /HELP SYS$HELP:HELPLIB LASER ! OptionalESelect a terminal port to attach the printer to, and edit SYST.COM toDreflect your change. SYST.COM may be invoked by your system startupDprocedures. The printer may be connected with a cable that has onlyBtransmit, receive and ground pins connected. Transmit and receiveDshould (I think) be swapped. The switch on the LaserWriter should beEswitched to the "9600" position. If you are sharing your LaserWriterEwith a Macintosh connected via AppleTalk, use the following procedurewhen switching the printer:!To switch the printer to the VAX:11. Insure that no AppleTalk jobs are in progress.;2. Disconnect the appletalk connector from the laserwriter.*3. Switch switch on LaserWriter to "9600".4. $START/QUEUE ALW!To switch the printer to the MAC:1. $STOP/QUEUE/NEXT ALW*2. Allow any jobs in progress to complete./3. Switch switch on LaserWriter to "AppleTalk".64. Connect the appletalk connector to the laserwriter.F$ CREATE SYS$SYSDEVICE:[LASER]. This area is used for LASER log filesHfor spooled files, or when the laser log cannot be created in the user'sEdirectory. The location and name of the directory may be changed by Fchanging the definition for LASER$LOG in SYST.COM. Log files are onlyEcreated when there is an error in the job, or when the job sends back6information (i.e. using the PostScript PRINT command).'To build the symbiont from the sources: $ CC LASER$ MESSAGE LASER_ERR$ LINK LASER.OPT/OPT'PostScript is a trademark of Adobe Inc.:LaserWriter and MacPaint are trademarks of Apple Computer.&*[VAX90A.UTEXAS.LASER]BITIMAGE_HEX.PS;1+,E./ 4J,-C0123KPWO5 6`[ K7`֓8*P9GHJ:%%% bitimage - puts an uncompressed hex bitmap on the page% % R. Watson % 05-Feb-1987%=% inputs: /param1 /ncopies /nc - number of copies (default 1)=% /param2 /scale - scale factor to multiply by (default 1.0)2% /param3 /xsize - x size in pixels (default 512)2% /param4 /ysize - y size in pixels (default 512)8% /param5 /pxlwid - number of bits in a pixel (1,2,4,8)%%% main program%/main{0 /iscale 1 scale div def % compute scale factor%G% get the image, fill black if run out of data. Note that readhexstringE% returns false if we don't fill the string, so the input data shouldB% be a multiple of sizeof(tmp) bytes long. Assume that it is more J% efficient to read more than 1 byte at a time. Note that line boundaries% do not matter.%4 xsize ysize pxlwid [iscale 0.0 0.0 iscale 0.0 0.0]; { currentfile tmp readhexstring not {pop <00>} if } image showpage, currentfile flushfile % avoid laser_log's} def%% executable initialization%/table [8 [/#copies 1 (.nc .ncopies .param1)] % number of copies2 [/scale 1.0 (.sf .scale .param2)] % scale factor) [/xsize 512 (.xsize .param3)] % x size) [/ysize 512 (.ysize .param4)] % y size. [/pxlwid 1 (.pxlwid .param5)] % pixel width] deftable { % apply defaults /ta exch def % save array ta 0 get % key ta 1 get % default value def % define default value} forall7currentdict /parser known {parser} if % if user inputs0/identity matrix def % make an identity matrix/tmp 8 string def01 72 mul 10 72 mul moveto currentpoint translate<currentpoint transform % see where we are in device coords:identity setmatrix % turn off transformation - switch to % device coordinate system0translate % move origin to transformed currptmain"*[VAX90A.UTEXAS.LASER]CHANGES.TXT;1+,F./ 4:-C0123KPWO5 6Ui]7֓8i-#c9GHJ LASER_V2_014 Fixed problems with fortran/print carriage control.$ Fixed problems with the page model.& Added job/file burst/trailer support. LASER_V2_02: Fixed backspace character size problem in HEADERS_STR.PS.&*[VAX90A.UTEXAS.LASER]HEADERS_STR.PS;21+,G./ 4Of-C0123KPWO5 6`]7֓8,#c9GHJ"7%% headers_str - print text with headers on LaserWriter%% R. Watson 25-Sep-1986%A% 10/03/86 RW Remove "_DUA0:[]" from filename (for spooled files)A% 10/25/87 RW Created from "headers.ps". Uses explicit operators0% XSTR, XLF, XCR to gain more page control.C% 05/12/88 S. Roseman Change XSTR to update xpos, and XCR to reset=% it to the left margin. This allows multiple XSTRs to % create 1 physical line.+% 06/14/88 RW Add xmargin to fix above mod.I% 07/15/88 RW Set backspace character size correctly allowing for squish.=% Future: squish should probably be proportional to the %% font size or deleted entirely.%<% inputs: /param1 or /#copies - number of copies (default 1)2% /param2 or /fsize = number containing font size4% /param3 or /wide = boolean true if landscape mode<% /param4 or /filename = string containing page header info%/EOF{: linecount 0 ne column 0 ne or { % if we've printed a line' /column ncolumns def % force page out newpage } if} def /XCR {$ /xpos xmargin def %%%was leftmargin} def /XLF {newline} def /XFF{3 topmargin lineh sub ypos ne { % if not top of page newpage } if} def  %% XSTR%&% prints a line of text from the stack%/XSTR{ /line exch def % get text & line length 1 ge { % show the line xpos ypos moveto squish 0 line ashow6 /xpos currentpoint pop def % save current x position } if} def  %% newline - move down 1 line.% /newline {4 /linecount linecount 1 add def % advance line count4 ypos lineh sub /ypos exch def % debit y pos on page ypos bottommargin lt 1 linecount linelimit gt or { % if bottom of page newpage newline } if} def  '%% newpage - initialize for a new page.% /newpage {& /linecount 0 def % reset line count4 /ypos topmargin lineh sub def % reset line on page + /column column 1 add def % advance column, column ncolumns lt { % if not last column4 /xmargin columnwidth column mul leftmargin add def /xpos xmargin def } { /column 0 def % reset column  title { % if title leftmargin 4 topmargin titlemargin add moveto % setup header$ currentfont % save current font0 /Helvetica-Bold findfont 12 scalefont setfont filename show pagewidth 1.5 inch sub 3 topmargin titlemargin add moveto % page number (page ) show page 10 5 string cvrs show setfont % restore font } if  showpage landscape  page % save this saveobj restore % flush vm /saveobj save def" /page exch def % restore this . /page page 1 add def % advance page number- /xmargin leftmargin def % reset left side /xpos xmargin def } ifelse} def   !%% landscape - set landscape mode% /landscape { wide { 8.5 inch 0 translate 90 rotate } if} def %% inch .%% convert to inches%/inch { 72. mul} def  %% point .%% convert to points%/point { } def  %% executable initialization.% initgraphics 8currentdict /formname known not {/formname (2UP) def} if formname (2UP) eq { /table [9 [/#copies 1 (.nc .ncopies .param1)] % number of copies1 [/fsizetmp 0 (.fsize .fs .param2)] % font size3 [/wide true (.wide .w .param3)] % landscape mode+ [/title false (.title .param4)] % title8 [/ncolumns 2 (.ncolumns .param5)] % number of columns? [/linelimit 66 (.linelimit .nlines .param6)] % lines per page8 [/hdr () (.hdr .header. param7)] % page header ] def} if formname (LETTER) eq { /table [9 [/#copies 1 (.nc .ncopies .param1)] % number of copies1 [/fsizetmp 0 (.fsize .fs .param2)] % font size4 [/wide false (.wide .w .param3)] % landscape mode+ [/title false (.title .param4)] % title8 [/ncolumns 1 (.ncolumns .param5)] % number of columns? [/linelimit 66 (.linelimit .nlines .param6)] % lines per page8 [/hdr () (.hdr .header. param7)] % page header ] def} if formname (LANDSCAPE) eq { /table [9 [/#copies 1 (.nc .ncopies .param1)] % number of copies1 [/fsizetmp 0 (.fsize .fs .param2)] % font size3 [/wide true (.wide .w .param3)] % landscape mode+ [/title false (.title .param4)] % title8 [/ncolumns 1 (.ncolumns .param5)] % number of columns? [/linelimit 66 (.linelimit .nlines .param6)] % lines per page8 [/hdr () (.hdr .header. param7)] % page header ] def} if formname (HEADERS) eq { /table [9 [/#copies 1 (.nc .ncopies .param1)] % number of copies1 [/fsizetmp 0 (.fsize .fs .param2)] % font size4 [/wide false (.wide .w .param3)] % landscape mode* [/title true (.title .param4)] % title8 [/ncolumns 1 (.ncolumns .param5)] % number of columns? [/linelimit 66 (.linelimit .nlines .param6)] % lines per page8 [/hdr () (.hdr .header. param7)] % page header ] def} if currentdict /table known not { /table [9 [/#copies 1 (.nc .ncopies .param1)] % number of copies1 [/fsizetmp 0 (.fsize .fs .param2)] % font size4 [/wide false (.wide .w .param3)] % landscape mode* [/title true (.title .param4)] % title8 [/ncolumns 1 (.ncolumns .param5)] % number of columns? [/linelimit 66 (.linelimit .nlines .param6)] % lines per page8 [/hdr () (.hdr .header. param7)] % page header ] def} if table { % apply defaults /ta exch def % save array ta 0 get % key ta 1 get % default value def % define default value} forall 7currentdict /parser known {parser} if % if user inputs L% if the user specified a string for /hdr then use it, also imply title true6hdr length 0 ne {/filename hdr def /title true def} if5currentdict /filename known not {/filename () def} ifOfilename (_DUA0:[]) anchorsearch {pop /filename exch def} {pop} ifelse %cleanup &/inp currentfile def % define files wide { /leftmargin .5 inch def /topmargin 7.96 inch def /bottommargin .3 inch def /rightmargin .25 inch def? currentdict /fsize known not {/fsize 8 point def} if % default' fsizetmp 0 ne {/fsize fsizetmp def} if /pagewidth 11 inch def /squish -0.3 def /titlemargin 3 point def} {  /leftmargin 1. inch def) /topmargin 10.39 inch def % top of page /rightmargin .25 inch def /bottommargin .5 inch def@ currentdict /fsize known not {/fsize 10 point def} if % default' fsizetmp 0 ne {/fsize fsizetmp def} if /pagewidth 8.5 inch def /squish -0.3 def /titlemargin .185 inch def} ifelse&/lineh fsize point def % line height/linecount 0 def /column 0 defF/columnwidth pagewidth leftmargin sub rightmargin sub ncolumns div def%/ibuf 200 string def % input buffer/page 1 def % page number/xpos leftmargin def/xmargin leftmargin def/ypos topmargin lineh sub def B% The following section of code makes a new font with a backspace>% character defined. The width of the backspace character is8% the negative of the width of an underscore character. &/Courier findfont % select the font%>% find the width of a character in the font coordinate system.@% add back in the scaled amount that squish will offset us so we-% end up in the right place after a backspace%1000 scalefont setfontD (_) stringwidth pop 2000 squish mul fsize div add /uwid exch def $/Courier findfont % copy the fontKdup length 1 add dict /newdict exch def % leaving room for a Metrics entry{$ exch dup /FID ne { % if not /FID3 dup /Encoding eq { % if /Encoding copy the entry exch dup length array copy  newdict 3 1 roll put } {7 exch newdict 3 1 roll put % else just use the object } ifelse } { pop pop % dump /FID } ifelse} forall ,1 dict begin % create Metrics dictionary3 /backspace uwid neg def % define backspace width! newdict /Metrics currentdict putend .newdict begin % set encoding for backspace Encoding 8 /backspace putend 5/xfont newdict definefont pop % define the new font =/xfont findfont fsize scalefont setfont % select the new font  W landscapep/saveobj save def/#*[VAX90A.UTEXAS.LASER]IMAGE_HEX.PS;1+,H. / 4J (-C0123KPWO 5 6 K7`{֓8 +P9GHJ8%%% image - puts a raster image file on the laserwriter.%.% 02/26/87 R. Watson Derived from paint_hex.ps%%% deCompress .%(% returns a bitimage string on the stack% /deCompress{" /count readbyte def % get count) count 16#80 and 0 eq { % if bit stream /count count 1 add def9 outstring 0 count getinterval % get right size string% inp exch readhexstring % get bytes$ pop % toss readhexstring status } { % else repeated string* /byte readbyte def % get byte to repeat> 16#100 count sub 1 add /count exch def% get abs val of count 0 % preset index count { dup outstring exch byte put 1 add % advance index } repeat pop % index/ outstring 0 count getinterval % return string } ifelse} def %% getByte%!% returns /byte = next input byte-% = 0 if no more bytes on input stream%/getByte{+ inp instring readhexstring { % if got one' 0 get /byte exch def % store in byte } { % else 0 pop /byte 0 def } ifelse} def8%% decodeheader - decodes the info in the header record.% /decodeheader{+ /bytesinhead 512 def % default 512 bytes { % 512 bytes default1 getlong 10 10string cvrs cvlit % key to lit dup where& { pop load exec } % if defined func9 { pop getlong pop } ifelse % if no func (key, fix file)= /bytesinhead bytesinhead 8 sub def % debit header length, bytesinhead 8 lt { % if end of header) bytesinhead { % flush remaining bytes readbyte pop } repeat exit % exit loop } if } loop} def!/0 {getlong pop} def % 0 - nop*/1 {/xsize getlong def} def % 1 - x size*/2 {/ysize getlong def} def % 2 - y size0/3 {/pxlwid getlong def} def % 3 - pixel width0/4 {/scale getlong def} def % 4 - scale factor6/5 {/invert getlong def} def % 5 - invert if nonzero+/8 {getlong 512 sub % 8 - header lengthI bytesinhead add /bytesinhead exch def} def % apply correction factor:/9 {/compressed getlong def} def % 9 - true if compressed%% getlong %5% converts 4 hex bytes from currentfile to an integer>% longwords from the vax are transmitted low order byte first.%/getlong{# /acc 0 def % preset accumulator 0 1 3 {3 readbyte exch 8 mul bitshift acc or /acc exch def } for acc} def%% readbyte %?% reads a hex byte from currentfile and returns it on the stack+% executes "readbyteeof" if EOF encountered% /readbyte{C currentfile 1string readhexstring {}{pop readbyteeof} ifelse 0 get} def%% main program%/main{) decodeheader % apply user user header7 currentdict /parser known {parser} if % if user inputs invert 0 ne {+ {1.0 exch sub} settransfer % invert image } if( /sTime usertime def % save start timeH vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestringH 10 20 string cvrs dbg exch writestring dbg ( ) writestringJ 10 20 string cvrs dbg exch writestring dbg ( \n) writestring flush1 /iscale 1 scale div def % compute scale factor ! compressed 1 eq { % if encoded4 xsize ysize pxlwid [iscale 0.0 0.0 iscale 0.0 0.0] { deCompress } image } {5 xsize ysize pxlwid [iscale 0.0 0.0 iscale 0.0 0.0]? { currentfile tmp readhexstring not {pop <00>} if } image } ifelse. usertime sTime sub 1000 div 10 20 string cvrs& dbg exch writestring dbg ( seconds ) writestringG vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestringF 10 20 string cvrs dbg exch writestring dbg ( ) writestringJ 10 20 string cvrs dbg exch writestring dbg ( \n) writestring flush showpage+ currentfile flushfile % avoid laser_log's} def%% executable initialization%+/inp (%stdin) (r) file def % define files/dbg (%stdout) (w) file def 0/1string 1 string def % scratch 1 byte string3/10string 10 string def % scratch 10 byte string1/identity matrix def % make an identity matrix7/outstring 128 string def % storage for output string(/instring 1 string def % input buffer./tmp 8 string def % for uncompressed images/table [8 [/#copies 1 (.nc .ncopies .param1)] % number of copies2 [/scale 1.0 (.sf .scale .param2)] % scale factor) [/xsize 512 (.xsize .param3)] % x size) [/ysize 512 (.ysize .param4)] % y size. [/pxlwid 1 (.pxlwid .param5)] % pixel width4 [/invert 0 (.invert .param6)] % invert image if 1? [/compressed 1 (.compressed .param7)] % default to compressed] deftable { % apply defaults /ta exch def % save array ta 0 get % key ta 1 get % default value def % define default value} forall01 72 mul 10 72 mul moveto currentpoint translate<currentpoint transform % see where we are in device coords:identity setmatrix % turn off transformation - switch to % device coordinate system0translate % move origin to transformed currpt/doit {: {main} stopped { (error stack:\n) = pstack flush quit} if} def%doitmain *[VAX90A.UTEXAS.LASER]LASER.C;269+,I.c/ 4Yca-C0123KPWOd5 6JIc7` ֓89GHJ&=/*** LASER - A Single-Threaded Asynchronous Symbiont to drive* an Apple LaserWriter.**G* Permission to use, copy, modify, and distribute this software and itsB* documentation for any purpose and without fee is hereby granted,H* provided that the above copyright notice appear in all copies and thatA* both that copyright notice and this permission notice appear inH* supporting documentation, and that the name of The University of TexasG* not be used in advertising or publicity pertaining to distribution of?* the software without specific, written prior permission. TheG* University of Texas makes no representations about the suitability ofH* this software for any purpose. It is provided "as is" without express* or implied warranty.* F* THE UNIVERSITY OF TEXAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THISC* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ANDF* FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS BE LIABLE FOR ANYF* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVERF* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OFE* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN:* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.*7* Copyright (C) 1987, The University of Texas at Austin*7* Please send modifications, suggestions, bugs, etc to:* * Rick Watson#* The University of Texas at Austin* Computation Center* Austin, TX 78712* 512/471-3241*#* arpa: watson@utadnx.cc.utexas.edu6* bitnet: watson@utadnx (ccaw001@utadnx for non-mail)** span: utspan::ccaw001 (utspan is 25.128)* uucp: ...seismo!ut-ngp!rick*:* Look for new versions in the anonymous ftp directory on %* utadnx.cc.utexas.edu (128.82.1.26).* * Revised:* Steve Roseman$* Lehigh University Computing Center* lusgr@vax1.cc.lehigh.edu*B* This user-writter symbiont is tailored specifically to the AppleD* LaserWriter and similar PostScript printers. It has the following * features:*=* 1. Page counting is done by reading the page count from the;* laserwriter at the beginning and the end of each file.=* This mechanism also "synchronizes" the user job with the=* laserwriter. If the laserwriter does not respond to the>* first request for a page count, the symbiont notifies the>* operator, and continues to poll the laserwriter. This is?* usefull if the laserwriter is being shared with MAC users.*@* 2. Parameters may be passed to postscript modules in the setupC* library via 2 mechanisms. The text from a $PRINT /NOTE= * command will be sent first.*?* The /PARAMETER switch may also be used. Each entry can be>* one of two formats. An entry without the "=" character in?* it is sent as (param) . An entry with the ?* "=" character in is is sent as () .:* The parameters are defined in an array called /param.;* Example: /PARAMETER=(1,SIZE=5,"str=(a+b)") generates:1* /param [(param1) 1 (size) 5 (str) (a+b)] defD* All alphabetics are forced to lower case. Using the /PARAMETER?* switch forces sending PARSER from LASER.TLB as part of the6* PostScript program sent to the printer. Look at >* other files in LASER.TLB for examples of using the PARSER * module.*@* 3. If the name of a setup module ends with "_HEX" the file to C* be printed is "hexified" to the laser printer. This is useful3* for sending bitimage files to the laserwriter.*B* 4. A log of responses from the laserwriter is created. This is D* usefull for debugging postscript programs. The file is createdB* as .LASER_LOG. In the case of spooled output,D* the log file is written to LASER$LOG:.LASER_LOG.4* These files are automatically deleted if empty.*F* 5. Printer error messages from the laserwriter are sent to operators2* enabled to receive PRINT messages from OPCOM.*?* 6. A "%%[ Flushing:" response from the printer will abort the* current file.*D* 7. Spooled files: Spooled files normally default to FORMS=HEADERS?* if the recommended queue initialize procedure is followed.?* By specifying special filenames, the user can override the9* forms used, and pass parameters to the setup module.4* The syntax is: "_._"6* where is the name of a form to use and@* is of the form: -[_...].:* (Note the use of "-" instead of "=" for a separator.)?* For example: $ copy zeta.plt alw:_zeta._ncopies-5_scale-2&* (The kludge of the century, huh?)*6* Outputs (in the following order) to the laserwriter:*"* 1. "/note def\r\n".F* 2. /param definition and library module PARSER if /parameter switch * presentG* 3. If the setup module is "HEADERS", the string "/filename ,* def" and "/formname def"7* 3. The first file or forms setup module if specified.E* 4. The file to be printed itself. If the setup module name ends in9* "_HEX" the file is hex-ified to the printer instead.*B* where: is the string from $PRINT /NOTE=G* is the string from $PRINT /PARAM=(""...)D* is the file specification for the file to print.** Limitations, bugs, etc:** 1. No checkpointing is done.C* 2. $PRINT/COPIES=n sends the job to the LaserWriter n times. ThisB* is not optimal, but is how the job controller handles things.A* It makes sense for most printers. Multiple copy handling is@* better handled in most of the postscript setup files. Also.* /note="/#copies n def" will usually work.'* 3. $PRINT/SPACE=n is not implemented.>* 4. BURST pages are not implemented but FLAG and TRAILER are.,* 5. Does not handle lists of setup modules.** Recommended device setup:*E* $ define/system/exec/trans=(concealed,terminal) alw : ! laser;* $ set term /perm /speed=9600 /nomodem /notype /nohang alwD* $ set term /perm /hostsync /pasthru /ttsync /eightbit /nobroad alw* $ set term /perm /noauto alw* $ set prot=o:rwlp /dev alw0* $ set device /spooled=(ALW,sys$sysdevice:) alw** Recommended queue initialize:** $ initialize/queue/start -;* /default=(noburst,nofeed,noflag,notrailer,form=headers) -'* /separate=(noburst,noflag,trailer) - -* /library=laser /base_prio=8 /form=headers -* /processor=laser /on=alw: alw*H* NOTE: change /separate=(...trailer) to (...flag) if your laser printer* stacks right side up.** Modification History: * 12-Feb-1987 R. Watson Created.B* 15-Apr-1987 R. Watson Added some record format processing (cr,* fortran).;* 16-Apr-1987 R. Watson Allow ':' as a parameter separator.D* 21-Apr-1987 R. Watson Some mods to trailer page. Send PATCH module* if v 23.0 printer.C* 24-Apr-1987 R. Watson This version submitted to Spring '87 Decus.F* 24-Aug-1987 R. Watson Handle implied vs not carriage control better.D* 15-Sep-1987 R. Watson Add support for "_STR" setup module types to$* allow RUNOFF style underlining.(* Fixup timing problems with TI 2115.A* 01-Oct-1987 R. Watson Treat PRN carriage control like implied. .* Still need to rewrite carriage control to-* really handle Fortran and Print carriage * control.D* 21-Mar-1988 R. Watson Get big buffer for I/O. Reduce frequency of* offline messages.I* 13-May-1988 S. Roseman Added support for PRN and FTN carriage control.J* 15-Jun-1988 R. Watson Fixup page model for new carriage control support.5* Add FLAG pages, also fix for DEF=FLAG=[ONE|ALL], * etc. No BURST (redundant).!* This is version LASER_V2_01.*/#include #include #include #include #include #include #include #include #include #include #include "smbdef.h"#include "lbrdef.h"#include "quidef.h"#define TRUE 1#define FALSE 0:#define MAXITEMS 60 /* max expected items from jobctl */O#define WRITELASER(p1,p2) stat = sys$qiow(0,laserchan, IO$_WRITEPBLK, 0, 0, 0,\2p1, p2, 0, 0, 0, 0); checkstat(stat,"writelaser");5void jobctl_ast(); /* job controller ast routine */@void laser_read_ast(); /* laser read completion ast routine */struct { int item_code; /* code */. unsigned short item_size; /* size of item */% char *buffer; /* address of item */} item[MAXITEMS];Dglobalvalue LASER$_MAXITEMS; /* exit statuses found in laser_err */ globalvalue LASER$_ITEMNOTFOUND;"globalvalue LASER$_STREAMNOTSTART;globalvalue LASER$_TOOMANYTABS;globalvalue LASER$_FLUSHED;!globalvalue LASER$_SETUPNOTFOUND;int ii = 0; /* item index */.int start_task = FALSE; /* start task flag */%int stop_task; /* stop task flag */.int stop_reason; /* stop task reason code */.int spooled_file; /* TRUE if spooled file */,int laser_efn; /* laser read event flag */&int startpage; /* task start page */"int endpage; /* task end page */$int jobstart; /* job start page */+int ascii; /* TRUE if ascii main file */,int hex; /* TRUE if hexified main file */-int string; /* TRUE if string main file */5int status_idle; /* TRUE if idle status received */9int patchneeded = FALSE; /* TRUE if patch module sent */0short laserchan = 0; /* laserwriter channel */4unsigned short laser_iosb[4]; /* laser read iosb */.char laser_buf[1024]; /* laser read buffer */0struct FAB main_fab; /* main file rms stuff */struct NP~UTEXAS_LASER.SAVIC [VAX90A.UTEXAS.LASER]LASER.C;269YcS|AM main_nam;struct RAB main_rab;.struct FAB log_fab; /* log file rms stuff */struct RAB log_rab;Mstruct dsc$descriptor_d library_spec = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};Jstruct dsc$descriptor_d buffer_des = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};Gstruct dsc$descriptor_d savelog = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};'int userlog = -1; /* user log file */-struct { /* operator message to printer */ char type; char target; short fill; long id; char text[255];-} msg = {OPC$_RQ_RQST, OPC$M_NM_PRINT, 0, 0};%struct dsc$descriptor_s oprmsg_dsc = ) {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, &msg};main(){ int stat; ' preset(); /* initialize symbiont */  do {2 while (!start_task) { /* wait for start_task */ stat = sys$hiber();% checkstat(stat,"wait start_task"); }! processtask(); /* do a job */ } while (TRUE);}A/** check_operator - checks for a laserwriter message that should* go to the operator.+* returns TRUE if message sent to operator.*/check_operator(){ int i;7 if (strncmp(laser_buf,"%%[ PrinterError:", 17) == 0) {< if (strlen(laser_buf) > 255) return FALSE; /* check max */A for (i = 0;i* If the filename has "[]_" in it, then this is a spooled file<* that the user wants to specify the form name for. Further,8* if the extension starts with "_", then it contains the=* user parameter list. We forge the item list to make things * look right.*/checkspooled(){E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};E struct dsc$descriptor_d dynd = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0}; char *cp, *pp, spoolfile[255]; int len, i, stat; int ourindex;1 char setup[257]; /* where to put setup name */$ long iosb[2]; /* for $getquiw */0 short setupl; /* returned length of setup */) struct { /* item list for $getquiw */ short l1; short c1; char *b1; long *r1; short l2; short c2; char *b2; long *r2; long end;( } itmlst = {0, QUI$_SEARCH_NAME, 0, 0,; sizeof(setup)-1, QUI$_FORM_SETUP_MODULES, setup, &setupl, 0}; spooled_file = FALSE; !/* get the file specification */H if (!getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, FALSE)) return; ; strncpy(spoolfile, temp.dsc$a_pointer, temp.dsc$w_length);" spoolfile[temp.dsc$w_length] = 0; /* check for []_ */ , if (!(cp = strchr(spoolfile, '['))) return; if (!(*++cp == ']')) return;- spooled_file = TRUE; /* file is spooled */ if (!(*++cp == '_')) return; 8/* find the extension and terminate the name string */  % if (!(pp = strchr(cp, '.'))) return; *pp = 0; cp++;6/* translate the form name into setup module names */8/* If it won't translate, then pass on the form name */. itmlst.l1 = strlen(cp); /* point to name */ itmlst.b1 = cp;B stat = sys$getquiw(0, QUI$_DISPLAY_FORM, 0, &itmlst, iosb, 0, 0); checkstat(stat, "getquiw");2 if ((iosb[0] & 1) != 1) /* if no translation */ strcpy(setup, cp); else setup[setupl] = 0;@/* forge the file setup module to have our setup module name */H/* Note that the forge transfers the dynamic string "dynd" to "item" */8 ourindex = findandclritem(SMBMSG$K_FILE_SETUP_MODULES);1 dynd.dsc$w_length = 0; /* get dynamic string */ dynd.dsc$a_pointer = 0; len = strlen(setup); str$copy_r(&dynd, &len, setup);C item[ourindex].item_size = dynd.dsc$w_length; /* complete forge */, item[ourindex].buffer = dynd.dsc$a_pointer;0/* forge the form name to have our form name */ / ourindex = findandclritem(SMBMSG$K_FORM_NAME);0 dynd.dsc$w_length = 0; /* get dyamic string */ dynd.dsc$a_pointer = 0;/ len = strlen(cp); /* pointer to form name */ str$copy_r(&dynd, &len, cp);C item[ourindex].item_size = dynd.dsc$w_length; /* complete forge */, item[ourindex].buffer = dynd.dsc$a_pointer; //* now check to see if there are parameters */* cp = ++pp; /* set extension address */9 if (pp = strchr(cp,';')) *pp = 0; /* terminate at ";" */  for (i = 0; i < 8; i++) {0 if (*cp != '_') return; /* check next char */ cp++; /* advance over it */= /* if there is another _, point to it, else point to the */ /* end of the string */7 if ((pp = strchr(cp,'_')) == 0) pp = cp + strlen(cp);. len = pp - cp; /* find length of string */2 if (len == 0) continue; /* if null parameter */ /* forge the item */4 ourindex = findandclritem(SMBMSG$K_PARAMETER_1+i);2 dynd.dsc$w_length = 0; /* get dynamic string */ dynd.dsc$a_pointer = 0; str$copy_r(&dynd, &len, cp);/ item[ourindex].item_size = dynd.dsc$w_length;- item[ourindex].buffer = dynd.dsc$a_pointer; cp = pp; }}  )/** findandclritem - find and clear item.*=* Finds an item in the item list. Releases the dynamic string<* for that item. If the item doesn't exist in the item list, * create it.*$* return: index to item in item list*/findandclritem(whichitem)int whichitem;{ int i;E struct dsc$descriptor_d temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};3 for (i = 0; i < ii; i++) { /* search item list */, if (whichitem == item[i].item_code) break; } ' if (i == ii) { /* if end of list */< if (++ii > MAXITEMS) exit(LASER$_MAXITEMS); /* new item */ item[i].item_code = whichitem; item[i].item_size = 0; item[i].buffer = 0; return i; /* return index */ }< temp.dsc$w_length = item[i].item_size; /* release string */% temp.dsc$a_pointer = item[i].buffer;. str$free1_dx(&temp);t item[i].buffer = 0; return i;}h5/** checkstat - check value of system service return.i*/checkstat(stat, string) int stat;t char *string;o{  if (!(stat & 1)) exit(stat); } /** closefile - close main file.*/ closefile()n{c int stat;# stat = sys$close(&main_fab, 0, 0);t /* ignore error */} '/** closeuserlog - close user log file.l*/closeuserlog(){t int stat;, if (userlog == -1) return; /* if no log */5/* If no records written, set for delete on close */e t2 if (userlog == 0) log_fab.fab$l_fop |= FAB$M_DLT; stat = sys$close(&log_fab); checkstat(stat,"close log");i w2 str$free1_dx(&savelog); /* release saved log */ userlog = -1;}A T1/** expand_cc - expand PRN carriage control byte.O*E* Entry: ccb = fab$v_prn byteI"* Exit: commands output to printer*/expand_cc(ccb)(char ccb; /* carriage control byte */{G int ic, stat; char obuf[40];E if (ccb == 0) { return;O }4 if ((ccb & 0x80) == 0) { /* output (n) LF, 1 CR */8 if ((ccb & 0x7f) == 1) { /* 1 LF, output short form */ WRITELASER("XLF XCR\r\n", 9); }S else {7 sprintf(obuf, "%d{XLF}repeat XCR\r\n",(ccb & 0x7f));i" WRITELASER(obuf, strlen(obuf)); }e } else { ; if ((ccb & 0xe0) != 0xe0) { /* output single character */s ic = ccb & 0x7f;e expand_line(&ic, obuf, 1);/ }2 }}./** expand_hex - expand buffer into hex bytes.*/expand_hex(ibuf, obuf, rsz)n4unsigned char *ibuf; /* pointer to input buffer */-char *obuf; /* pointer to output buffer */wint rsz; /* buffer size */d{c int i, c, stat;( static char hex[] = "0123456789ABCDEF"; : for (i = 0; i < rsz; i++) {) obuf[i*2] = hex[(ibuf[i] & 0xF0) >> 4];.# obuf[i*2+1] = hex[ibuf[i] & 0xF];y } WRITELASER(obuf,rsz*2)l}o AC/** expand_line - expand input buffer and output result to printer.o*g?* The ()pop sequences are an obscure hack to fix an obscure buge * with XON/XOFF. It just works.*/expand_line(ibuf, obuf, rsz)"char *ibuf; /* input buffer */ char *obuf;sint rsz; /* buffer size */{r int i, d, col, stat;i3 static int popcount = 0; /* XON kludge counter */a g* d = 0; /* preset destination index */ col = 0; /* preset column */ for (i = 0; i < rsz; i++) {% if (ibuf[i] == 9 ) { /* if tab */i9 if (string && (d == 0)) obuf[d++] = '(';/* if first */r do {e& obuf[d++] = ' '; /* fill spaces */ col++; } while (col & 7);E }t< else if ((ibuf[i] == 8) && (col > 0)) { /* if backspace */( obuf[d++] = 8; /* insert backspace */ col--;e }w0 else if (string && (ibuf[i] == '(')) { /* ( */9 if (string && (d == 0)) obuf[d++] = '(';/* if first */t obuf[d++] = '\\'; obuf[d++] = '(';< col++;  }t0 else if (string && (ibuf[i] == ')')) { /* ) */9 if (string && (d == 0)) obuf[d++] = '(';/* if first */r obuf[d++] = '\\'; obuf[d++] = ')'; col++;( }(1 else if (string && (ibuf[i] == '\\')) { /* \ */r9 if (string && (d == 0)) obuf[d++] = '(';/* if first */R obuf[d++] = '\\'; obuf[d++] = '\\'; col++;g }e2 else if (string && (ibuf[i] == 0x0d)) { /* CR */) if (d) { /* if string to terminate */  WRITELASER(obuf,d) if (++popcount == 20) {d popcount = 0;$ WRITELASER(")XSTR()pop\r\n",12) }l else { WRITELASER(")XSTR\r\n",7) }t d = 0; } WRITELASER("XCR\r\n",5) } 3 else if (string && (ibuf[i] == 0x0a)) { /* LF */) if (d) { /* if string to terminate */a WRITELASER(obuf,d) if (++popcount == 20) {E popcount = 0;$ WRITELASER(")XSTR()pop\r\n",12) }t else { WRITELASER(")XSTR\r\n",7) }e d = 0; } WRITELASER("XLF\r\n",5) } 3 else if (string && (ibuf[i] == 0x0c)) { /* FF */n) if (d) { /* if string to terminate */N WRITELASER(obuf,d) if (++popcount == 20) {s popcount = 0;$ WRITELASER(")XSTR()pop\r\n",12) } else { WRITELASER(")XSTR\r\n",7) }o d = 0; } WRITELASER("XFF\r\n",5) }a else {9 if (string && (d == 0)) obuf[d++] = '(';/* if first */h' obuf[d++] = ibuf[i]; /* move char */, col++;a }e } if (string && d) { obuf[d++] = ')'; obuf[d++] = 'X'; obuf[d++] = 'S'; obuf[d++] = 'T'; obuf[d++] = 'R'; obuf[d++] = '\r';e obuf[d++] = '\n';o } WRITELASER(obuf,d).}.1/** getitems - get item list from job controller.t*/ getitems(){p int stat;/ int context; /* read_message_item context */ ! int item_code; /* item code */ + unsigned short item_size; /* item size */w& struct dsc$descriptor_d item_buffer =) {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};m# context = 0; /* init context */ /* Save each item in a list */i H do {,@ item_buffer.dsc$a_pointer = 0; /* force d string allocation */5 stat = smb$read_message_item(&buffer_des, &context, ( &item_code, &item_buffer, &item_size);! item[ii].item_code = item_code;n! item[ii].item_size = item_size;-. item[ii].buffer = item_buffer.dsc$a_pointer;- if (++ii > MAXITEMS) exit(LASER$_MAXITEMS);s } while (stat == SS$_NORMAL);}h,/** getitemdescrip - return item descriptor.* * return: TRUE if item found)* FALSE if (item not found) && NOT FATALa$* exit if (item not found) && FATAL*/$getitemdescrip(code, descrip, fatal)+int code; /* item code to search for */>struct dsc$descriptor_s *descrip; /* pointer to descriptor */#int fatal; /* error severity */t{. int i;e for (i = 0; i < ii; i++) { 1 if (item[i].item_code == code) { /* if found */o- descrip->dsc$w_length = item[i].item_size;.+ descrip->dsc$a_pointer = item[i].buffer;  return TRUE;e }i }= if (fatal) exit(LASER$_ITEMNOTFOUND); /* item not in list */  else return FALSE; }o//** getcopies - send copy count to laserwriter.a*(<* Leave this here for now, but unfortunately, if you specify9* /copies=n to the print command, the job contoller sendsm.* the file that many times. Not what we want.*/ getcopies()/{m int stat, n; E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};) char defcopy[80];9 if (!getitemdescrip(SMBMSG$K_FILE_COPIES, &temp, FALSE))d9 if (!getitemdescrip(SMBMSG$K_JOB_COPIES, &temp, FALSE))  return; /* if no copies */)" n = * (long*) temp.dsc$a_pointer;+ if (n == 1) return; /* if only 1 copy */l, sprintf(defcopy, "/#copies %d def\r\n", n);$ WRITELASER(defcopy,strlen(defcopy))} ./** getnote - get /note= to laserwriter.*/ getnote() {W int stat;E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; E if (!getitemdescrip(SMBMSG$K_NOTE, &temp, FALSE)) return; /* none */ 1 WRITELASER(temp.dsc$a_pointer,temp.dsc$w_length)n$ WRITELASER(&0x0A0D,2) /* cr-lf */}$/** getparams - get user parameters.*/ getparams()7{c int stat; int i, j; int first=TRUE;E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; # char param[255], str[255+15], *eq; % static $DESCRIPTOR(parser,"PARSER");F8 for (i = 0; i < 8; i++) { /* loop for 8 parameters */< if (!getitemdescrip(SMBMSG$K_PARAMETER_1+i, &temp, FALSE))# continue; /* if no parameter */a< if (temp.dsc$w_length == 0) continue; /* if null string */$ if (first) { /* if first one */ first = FALSE;f! WRITELASER("/params [\r\n",11)1 }.8 strncpy(param, temp.dsc$a_pointer, temp.dsc$w_length); param[temp.dsc$w_length] = 0;e ; for (j= 0; j < strlen(param); j++) /* lowercase string */s+ if (isupper(param[j])) param[j] ^= 0x20;  B/* if there is an = separator (or - for spooled files), use it */ < if ((eq = strchr(param, '=')) || (eq = strchr(param, '-'))" || (eq = strchr(param, ':'))) {& *eq++ = 0; /* bust string in 2 */* sprintf(str, "(%s) %s\r\n", param, eq); }h4 else sprintf(str, "(param%d) %s\r\n", i+1, param); WRITELASER(str,strlen(str)) } , if (!first) { /* if some params found */ WRITELASER("] def\r\n",7)d5 writemodule(parser); /* write the parser module */$ }}B//** getsetup - get setup module to laserwriter.w*e0* return: TRUE if no problems with setup module.+* FALSE if setup module nonexistant */ getsetup(){o int stat, len; int library_index;_ long txtrfa[2]; char inbuf[255];iY struct dsc$descriptor_s inbufdes = {sizeof(inbuf), DSC$K_DTYPE_T, DSC$K_CLASS_S, inbuf};# struct dsc$descriptor_s outbufdes; D struct dsc$descriptor_s key = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};l 1 ascii = TRUE; /* assume main file is ascii */D hex = FALSE;0 string = FALSE;J/* Try for a file setup module first, then a form setup module. For now,H we only support one setup module, the first found. We should support- lists of setup modules, and all found. */_ ;? if (!getitemdescrip(SMBMSG$K_FILE_SETUP_MODULES, &key, FALSE))g@ if (!getitemdescrip(SMBMSG$K_FORM_SETUP_MODULES, &key, FALSE))" return TRUE; /* if no setup */: if (key.dsc$w_length == 0) return TRUE; /* if no setup */ G/* Get out if no library. Error because the user specified a setup. */ ' if (library_spec.dsc$a_pointer == 0) {n% stop_reason = LASER$_SETUPNOTFOUND;  return FALSE;a }</* Check to see if the setup module ends in _HEX or _STR */ if (key.dsc$w_length >= 4){H if (strncmp(&key.dsc$a_pointer[key.dsc$w_length-4],"_HEX", 4) == 0){ ascii = FALSE; hex = TRUE;i } H if (strncmp(&key.dsc$a_pointer[key.dsc$w_length-4],"_STR", 4) == 0){ ascii = FALSE; string = TRUE; }y } T I/* if this is the setup module HEADERS, assume it needs to have the fileS name defined. */9 if (strncmp(key.dsc$a_pointer, "HEADERS", 7) == 0) {D; getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, TRUE);  strcpy(inbuf, "/filename (");*8 strncat(inbuf, temp.dsc$a_pointer, temp.dsc$w_length); strcat(inbuf, ") def\r\n");C! WRITELASER(inbuf,strlen(inbuf))+/* Also send the form name if it exists */D9 if (getitemdescrip(SMBMSG$K_FORM_NAME, &temp, FALSE)) {a strcpy(inbuf, "/formname (");9 strncat(inbuf, temp.dsc$a_pointer, temp.dsc$w_length);a strcat(inbuf, ") def \r\n");y" WRITELASER(inbuf,strlen(inbuf)) }_ } /* Send the setup module */ if (!writemodule(key)) {E% stop_reason = LASER$_SETUPNOTFOUND;  return FALSE;  } return TRUE; }g%/** inititems - initialize item list.g*/ inititems()r{ int i;_3 for (i = 0; i < MAXITEMS; i++) item[i].buffer = 0; }n+/** initsymb - initialize printer symbiont.f*/ initsymb(){S int stat;A stat = smb$initialize(&SMBMSG$K_STRUCTURE_LEVEL, jobctl_ast, 0);u checkstat(stat, "initsymb");n} :/** jobctl_ast - ast routine called by the job controller.*/void jobctl_ast() { int stat;$ int request; /* jobctl request */E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};e4 stat = smb$read_message(&0, &buffer_des, &request);$ if (stat != SS$_NORMAL) exit(stat);/* Process the request */ switch (request) {e  case SMBMSG$K_START_STREAM:r getitems();t startstream(); break; case SMBMSG$K_START_TASK:r getitems();$ start_task = TRUE; stop_task = 0; stop_reason = 0; break; case SMBMSG$K_RESUME_TASK: getitems();) break; case SMBMSG$K_RESET_STREAM:) resetstream(); break; case SMBMSG$K_STOP_STREAM: stopstream();b break; case SMBMSG$K_PAUSE_TASK:  break; case SMBMSG$K_STOP_TASK: getitems();n7 getitemdescrip(SMBMSG$K_STOP_CONDITION, &temp, TRUE);,+ stop_task = * (long*) temp.dsc$a_pointer;a break; } sys$wake(0,0);n}L7/** laser_read_ast - laser read ast completion routine. */void laser_read_ast(param) int param;{  int iosb_stat;a iosb_stat = laser_iosb[0];p8 if (iosb_stat == 0) return; /* if incomplete io (?) */ if ((iosb_stat == SS$_ABORT) || (iosb_stat == SS$_CANCEL) ||( (iosb_stat == SS$_DATAOVERUN)) return;= if (iosb_stat != SS$_NORMAL) exit(iosb_stat); /* if error */)0 if (laser_iosb[1]) { /* if bytes in buffer */6 laser_buf[laser_iosb[1]] = 0; /* terminate string */) if (!check_operator()) writeuserlog();c }) postlaserread(); /* issue next read */;}i"/** openfile - open the main file.*t!* return: FALSE if open problems.;*/ openfile(){ int stat;E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};  struct dsc$descriptor_s fid =9 {28, DSC$K_DTYPE_T, DSC$K_CLASS_S, main_nam.nam$t_dvi}; ; getitemdescrip(SMBMSG$K_FILE_IDENTIFICATION, &temp, TRUE);  I( main_fab = cc$rms_fab; /* init fab */> main_fab.fab$l_nam = &main_nam; /* use NAM to open by FID */! main_fab.fab$l_fop |= FAB$M_NAM;e i( main_nam = cc$rms_nam; /* init nam */ str$copy_dx(&fid, &temp); L stat = sys$open(&main_fab);) if (!(stat & 1)) { /* if open error */t stop_reason = stat;s return FALSE; } . main_rab = cc$rms_rab; /* initialize rab */ main_rab.rab$l_fab = &main_fab; stat = sys$connect(&main_rab);R, if (!(stat & 1)) { /* if connect error */ stop_reason = stat;  return FALSE;n } return TRUE;n} %/** openuserlog - open user log file.)*e>* Create a file using the file spec of the file to be printed,8* changing the EXT to .LASER_LOG. Try the logical name <* LASER$LOG if this does not work (probably a spooled file).*m*/ openuserlog()c{ int stat, i;q struct dsc$descriptor_s temp;( char filename[256], filespec[255], *cp;* userlog = -1; /* flag not opened yet */& log_fab = cc$rms_fab; /* init fab */H/* Build log file name. If a spooled file, prepend the job name and */+/* put the file in LASER$LOG: */f  filename[0] = 0; i = 0; if (spooled_file) {2 getitemdescrip(SMBMSG$K_USER_NAME, &temp, TRUE);; strncpy(filename, temp.dsc$a_pointer, temp.dsc$w_length);$4 i = temp.dsc$w_length; /* trim trailing blanks */ do { filename[i] = 0;i# if (filename[--i] != ' ') break;/ } while (i > 0); strcat(filename, "-"); } s: getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, TRUE);: strncpy(filespec, temp.dsc$a_pointer, temp.dsc$w_length);! filespec[temp.dsc$w_length] = 0;m2 if (spooled_file) cp = strchr(filespec, ']') + 1; else cp = filespec; strcat(filename, cp); ( log_fab.fab$l_dna = filename;& log_fab.fab$b_dns = strlen(filename); if (spooled_file) {/ log_fab.fab$l_fna = "LASER$LOG:.laser_log;0";  log_fab.fab$b_fns = 22;r } else {*% log_fab.fab$l_fna = ".laser_log;0";d log_fab.fab$b_fns = 12;c } log_fab.fab$b_rfm = FAB$C_VAR;* log_fab.fab$b_rat = FAB$M_CR; log_fab.fab$w_mrs = 512;n stat = sys$create(&log_fab); 0 if (!(stat & 1)) return; /* if not possible */ _- log_rab = cc$rms_rab; /* initialize rab */o log_rab.rab$l_fab = &log_fab; stat = sys$connect(&log_rab); if (!(stat & 1)) return;p c, userlog = 0; /* flag open, no records */} 9/** postlaserread - post non blocking read for laserchan.*/postlaserread()l{e< static int term_block[2] = {0,-1}; /* end on any control */ int stat;? stat = sys$qio(laser_efn, laserchan, IO$_READPBLK+IO$M_NOECHO, laser_iosb, laser_read_ast, 0,5 laser_buf, sizeof(laser_buf), 0, term_block, 0, 0);t checkstat(stat, "read qio"); }!/** preset - preset the symbiont.t*/preset(){ int stat;9 stat = lib$get_ef(&laser_efn); /* allocate event flag */I h& setprivs(); /* set process privs */$ inititems(); /* init item list */# initsymb(); /* do jobctl init */w}h m!/** processtask - process a file.s*/ processtask()r{t int stat, np, request;D4 int svector[2] = {1, SS$_NORMAL}; /* stat vector */5 int acctrec[4] = {0,0,0,0}; /* accounting record */o% struct dsc$descriptor_s accounting =/; {sizeof(acctrec), DSC$K_DTYPE_T, DSC$K_CLASS_S, acctrec};TE struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};s 1 if (laserchan == 0) exit(LASER$_STREAMNOTSTART);r nA stat = smb$send_to_jobctl(&0, &SMBMSG$K_START_TASK, 0, 0, 0, 0);r0 checkstat(stat, "processtask: send to jobctl");$ postlaserread(); /* post read */1 syncprinter(); /* synchronize with printer */ + stop_task = 0; /* again to make sure */t stop_reason = 0;t0 checkspooled(); /* check for spooled file */+ openuserlog(); /* open user log file */. trailer(0); /* flag pages */2 if (!openfile()) goto skip; /* open main file */*/* getcopies();*/ /* send copy count */) getnote(); /* output possible note */i* getparams(); /* get user parameters */7 if (!getsetup()) goto skip; /* output setup module */ $ sendfile(); /* send main file */ skip:& closefile(); /* close main file */" trailer(1); /* send trailer */1 sendendsequence(); /* send end job sequence */sD if (userlog > 0) svector[1] = SS$_CREATED-1; /* if errors logged */( closeuserlog(); /* close user log */9 stat = sys$cancel(laserchan); /* cancel pending read */ a' start_task = FALSE; /* clear flag */r b5 np = endpage - startpage; /* compute page count */b8 if (np >0) acctrec[0] = np; /* if no obvious error */;/* If stop_task, we were stopped by the job controller. */pB/* Else, we were stopped by some other error condition */" request = SMBMSG$K_TASK_COMPLETE;* if (stop_task) { /* if task aborted */ request = SMBMSG$K_STOP_TASK;  svector[1] = stop_task;  } else if (stop_reason) { svector[1] = stop_reason;p }, releaseitems(); /* release item list */ h5 stat = smb$send_to_jobctl(&0, &request, &accounting,, 0, 0, svector);n0 checkstat(stat, "processtask: send to jobctl");}*%/** releaseitems - release item list.n*s/* release dynamic strings gotten by read_items.s*/releaseitems(){3 int i;DE struct dsc$descriptor_d temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};F >$ ii = 0; /* clear item index */! for (i = 0; i < MAXITEMS; i++) {7 if (item[i].buffer == 0) return; /* if end of list */t( temp.dsc$w_length = item[i].item_size;& temp.dsc$a_pointer = item[i].buffer; str$free1_dx(&temp); item[i].buffer = 0; }}l#/** resetstream - reset the stream.i*/ resetstream()r{b int stat;C stat = smb$send_to_jobctl(&0, &SMBMSG$K_RESET_STREAM, 0, 0, 0, 0);u0 checkstat(stat, "resetstream: send to jobctl"); * exit (SS$_NORMAL);n} //** sendendsequence - send end of job sequence.i*/sendendsequence()b{iIstatic char getend[] = {"\004statusdict begin (%%[ end page #=) print \f*pagecount pstack pop flush end \r\n\004"}; int stat;/ int daytim[2]; /* quadword time interval */l int timeoutcount = 0; int abort_sent = FALSE;8 static $DESCRIPTOR(timetowait, "0 :5:00"); /* +5 min */ endpage = 0; , sys$wake(0,0); /* eat pending wakeups */' sys$hiber(); /* (instant return) */f t; WRITELASER(getend,strlen(getend)) /* write end sequence */ t do {e) stat = sys$bintim(&timetowait, daytim);  checkstat(stat, "bintim");9 stat = sys$schdwk(0, 0, daytim, 0); /* wake up later */+ checkstat(stat, "schdwk");, if (endpage) break; /* if sync occured */ stat = sys$hiber(); , if (endpage) break; /* if sync occured */0 if (stop_task) { /* if stop_task requested */ if (!abort_sent) {  abort_sent = TRUE;' WRITELASER(&0X03,1) /* control-c */r' lib$wait(&1.0); /* wait 1 second */f( WRITELASER(&0X04,1) /* end of job */' lib$wait(&1.0); /* wait 1 second */ % WRITELASER(getend,strlen(getend))R } } 2/* Notify the operator on 10 minute intervals. */ 4 if ((++timeoutcount & 1) == 0) { /* if interval */5 strcpy(msg.text, "LaserWriter job possibly hung");L2 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); sys$sndopr(&oprmsg_dsc, 0); }o  } while (TRUE); l5 stat = sys$canwak(0,0); /* cancel wakeup requests */;} 1/** sendfile - send the main file to the printer.g*/ sendfile(){c#define IBUFSIZE (16384)6#define PREFIX_LEN (1) /* max extra prefix chars */ int stat, end;u#if 00* char ibuf[IBUFSIZE]; /* input buffer */. char obuf[IBUFSIZE*2+2]; /* output buffer */#else( char *ibuf; char *obuf;#endif char *cp; int rsz; /* record size */0 char prn_ctl[2]; /* PRN file control bytes */ fB ibuf = malloc(IBUFSIZE+PREFIX_LEN); /* extra for prefix chars */  obuf = malloc(IBUFSIZE*2 + 2);b& main_rab.rab$l_ubf = ibuf+PREFIX_LEN; main_rab.rab$w_usz = IBUFSIZE;J/* For PRN type records, set up a pointer to the carriage control byte */?/* pair, or initialize the control byte pair manually. */l& if (main_fab.fab$b_rat & FAB$M_PRN) { if (main_fab.fab$b_fsz == 2) {7 main_rab.rab$l_rhb = &prn_ctl; /* ptr to PRN ctrl */  } else {( prn_ctl[0] = 0x01; /* LF CR before */$ prn_ctl[1] = 0x8d; /* CR after */ } } do { /* send the file */e 5 stat = sys$get(&main_rab, 0, 0); /* get a record */t= if ((stat == RMS$_EOF) || (stop_task | stop_reason)) break;% if (!(stat & 1)) { /* if error */d stop_reason = stat; break;_ }r rsz = main_rab.rab$w_rsz;e /* Process record control. */ 8 cp = ibuf+PREFIX_LEN; /* Leave room for prefix chs */ if (ascii || string) {1 /* if FTN (Fortran) carriage control */O( if (main_fab.fab$b_rat & FAB$M_FTN) {9 if (rsz == 0) { /* Null record => blank line */L cp[rsz++] = ' ';& } switch(*cp) {d' case 0: /* (null) - No CC */r! cp++; /* ignore column 1 */o rsz--;f break;t* case '0': /* 0 - Double Space *// *cp = '\n'; /* 2 LF in front, CR at end */t *--cp = '\n'; rsz++;i cp[rsz++] = '\r'; break;d( case '1': /* 1 - Page Eject */ *cp = '\n'; *--cp = '\f'; rsz++;e cp[rsz++] = '\r'; break;e' case '+': /* + - overprint */O! cp++; /* ignore column 1 */e cp[rsz-1] = '\r'; break;p, case '$': /* $ - no trailing CC */+ *cp = '\r'; /* LF, CR before record */f *--cp = '\n'; rsz++;c break;o% default : /* space, etc. */y *cp = '\n'; cp[rsz++] = '\r'; } }% /* if implied carriage control */0' if (main_fab.fab$b_rat & FAB$M_CR) {a, *--cp = '\n'; /* prefix LF, suffix CR */ rsz++; cp[rsz++] = '\r';f }6 /* print carriage control. Expand and output */7 /* leading carriage control, then expand trailing */n- /* control to output after the text. */*( if (main_fab.fab$b_rat & FAB$M_PRN) { expand_cc(prn_ctl[0]); } f expand_line(cp, obuf, rsz);& if (main_fab.fab$b_rat & FAB$M_PRN) expand_cc(prn_ctl[1]); }$ + if (hex) { /* if file to be hexified */S expand_hex(cp, obuf, rsz);r }B } while (TRUE); E free(ibuf); free(obuf); W if (!ascii) { WRITELASER(&0x0A0D,2)g }2/* send abort (^C) if stop_task, else eof (^D) */ r if (string) { WRITELASER("EOF\r\n",5)7 }4 if (stop_task | stop_reason) end = 3; else end = 4; WRITELASER(&end,1)0}S!/** setprivs - set process privs. */ setprivs(){+ int stat;E static int privs[2] = {PRV$M_ALLSPOOL+PRV$M_PHY_IO+PRV$M_SYSPRV, 0};*# stat = sys$setprv(1, privs, 0, 0);t checkstat(stat, "set privs");}t/** set_typeahead.* =* Set /typeahead on the terminal device so characters will bee * buffered.s*/set_typeahead(chan){'int chan; /* laserwriter channel */f{ int mode[3];a int stat;1 stat = sys$qiow(0, chan, IO$_SENSEMODE, 0, 0, 0,m mode, 12, 0, 0, 0, 0); if (!(stat & 1)) return stat; 7 mode[1] &= ~(TT$M_NOTYPEAHD); /* clear notypeahead */ 0 stat = sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0,  mode, 12, 0, 0, 0, 0); return stat;l}f#/** startstream - start the stream.p*/ startstream()={r int stat;4 static int svector[2] = {1,0}; /* status vector */G struct dsc$descriptor_s device = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};hE struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};s s5 getitemdescrip(SMBMSG$K_DEVICE_NAME, &device, TRUE);m o8/* Copy the library file specification, if it exists */ B if (getitemdescrip(SMBMSG$K_LIBRARY_SPECIFICATION, &temp, FALSE))$ str$copy_dx(&library_spec, &temp);- svector[1] = sys$alloc(&device, 0, 0, 0, 0);  if (svector[1] == SS$_NORMAL) n5 svector[1] = sys$assign(&device, &laserchan, 0, 0);i if (svector[1] != SS$_NORMAL) {7 stat = smb$send_to_jobctl(&0, &SMBMSG$K_START_STREAM,n 0, 0, 0, svector);C1 checkstat(stat, "startstream: send to jobctl");u return;r }8 set_typea~UTEXAS_LASER.SAVIC [VAX90A.UTEXAS.LASER]LASER.C;269Ycj Rhead(laserchan); /* set terminal typeahead */ s6 stat = smb$send_to_jobctl(&0, &SMBMSG$K_START_STREAM, 0, 0, 0, 0); /* ok */T0 checkstat(stat, "startstream: send to jobctl");}E!/** stopstream - stop the stream.i*/ stopstream(){, int stat; stat = sys$dassgn(laserchan);' checkstat(stat, "stopstream: dassgn");o laserchan = 0;pB stat = smb$send_to_jobctl(&0, &SMBMSG$K_STOP_STREAM, 0, 0, 0, 0);/ checkstat(stat, "stopstream: send to jobctl");)  exit(SS$_NORMAL);}M0/** syncprinter - get synchronized with printer.*/ syncprinter() {static char getstart[] = {"\004\=version (23.0) eq { statusdict /Patch1Installed known not { \b*(%%[ patch needed ]%%\n) print } if } if \,statusdict begin (%%[ start page #=) print \*pagecount pstack pop flush end \r\n\004"}; int stat;/ int daytim[2]; /* quadword time interval */  int timeoutcount;8 static $DESCRIPTOR(timetowait, "0 ::10"); /* +10 sec */$ static $DESCRIPTOR(patch, "PATCH"); int expireindex;X static int expiretime[] = {1,1*60/10,5*60/10,10*60/10,60*60/10}; /* notify intervals */1#define NEXPIRES (sizeof(expiretime)/sizeof(int))  startpage = 0;  status_idle = FALSE;t  timeoutcount = 0; expireindex = 0;n do { ' lib$wait(&1.0); /* wait 1 second */  WRITELASER(&0x14,1) /* ^T */ ) stat = sys$bintim(&timetowait, daytim);S checkstat(stat, "bintim");9 stat = sys$schdwk(0, 0, daytim, 0); /* wake up later */, checkstat(stat, "schdwk"); stat = sys$hiber();f0 if (status_idle) break; /* if sync occured */"/* Abort whatever is happening */& WRITELASER(&0X03,1) /* control-c */' lib$wait(&1.0); /* wait 1 second */p' WRITELASER(&0X04,1) /* end of job */f' lib$wait(&1.0); /* wait 1 second */a 1/* Notify the operator on 1 minute intervals. */, 2 if (++timeoutcount == expiretime[expireindex]) {+ strcpy(msg.text, "LaserWriter offline");o2 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); sys$sndopr(&oprmsg_dsc, 0);) timeoutcount = 0; /* reset counter */t1 if (expireindex < (NEXPIRES-1)) expireindex++;i }t  } while (TRUE); 6 stat = sys$canwak(0,0); /* cancel wakeup requests */  b timeoutcount = 0; expireindex = 0;a do {M' WRITELASER(getstart,strlen(getstart))) stat = sys$bintim(&timetowait, daytim);o checkstat(stat, "bintim");9 stat = sys$schdwk(0, 0, daytim, 0); /* wake up later */a checkstat(stat, "schdwk"); stat = sys$hiber();e. if (startpage) break; /* if sync occured */1/* Notify the operator on 1 minute intervals. */  2 if (++timeoutcount == expiretime[expireindex]) {+ strcpy(msg.text, "LaserWriter offline");e2 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); sys$sndopr(&oprmsg_dsc, 0);) timeoutcount = 0; /* reset counter */$1 if (expireindex < (NEXPIRES-1)) expireindex++;a }   } while (TRUE); B5 stat = sys$canwak(0,0); /* cancel wakeup requests */S S</* This looks like a good place to send the patch module */+ if (patchneeded) { /* if patch needed */ patchneeded = FALSE;3 writemodule(patch); /* write the patch module */e WRITELASER(&4, 1)r }}S _ /** trailer - issue job trailer.*/trailer(which),int which; /* 0 if flag, 1 if trailer */{) int ctl, stat, stop;e short msglen;( char buf[1024]; /* scratch buffer */ char time[24];)2 char user[20], job[255], file[255], message[257]; char *cp; static char z = 0; $ static $DESCRIPTOR(key, "TRAILER");E struct dsc$descriptor_s temp = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};iG struct dsc$descriptor_s date={23, DSC$K_DTYPE_T, DSC$K_CLASS_S, time};i struct dsc$descriptor_s msgd = = {sizeof(message)-1, DSC$K_DTYPE_T, DSC$K_CLASS_S, message};_& static struct dsc$descriptor_s zero =* {1, DSC$K_DTYPE_T, DSC$K_CLASS_S, &z};)/* Check to see if we need a trailer. */;: getitemdescrip(SMBMSG$K_SEPARATION_CONTROL, &temp, TRUE);$ ctl = * (long*) temp.dsc$a_pointer;, /* save page count if first file of job */< if (ctl & SMBMSG$M_FIRST_FILE_OF_JOB) jobstart = startpage; s' if (which == 0) { /* if flag page */_O if ((ctl & (SMBMSG$M_FILE_FLAG | SMBMSG$M_JOB_FLAG)) == 0) /* if no flags */T return;8 if ((ctl & SMBMSG$M_FILE_FLAG) == 0) /* if job only */G if ((ctl & SMBMSG$M_FIRST_FILE_OF_JOB) == 0) /* if not first file */M return;m } else { /* trailer page */E if (((ctl & (SMBMSG$M_JOB_TRAILER | SMBMSG$M_FILE_TRAILER))== 0) &&!, ((stop_task | stop_reason) == 0)) return;7 if ((stop_task | stop_reason) == 0) /* if no error */s< if ((ctl & SMBMSG$M_FILE_TRAILER) == 0) /* if job only */F if ((ctl & SMBMSG$M_LAST_FILE_OF_JOB) == 0) /* if not last file */ return; } a//* send the trailer module from the library */n% WRITELASER(&4,1) /* leading EOF */  if(!writemodule(key)) return;1 getitemdescrip(SMBMSG$K_USER_NAME, &temp, TRUE);g6 strncpy(user, temp.dsc$a_pointer, temp.dsc$w_length); user[temp.dsc$w_length] = 0;a0 getitemdescrip(SMBMSG$K_JOB_NAME, &temp, TRUE);5 strncpy(job, temp.dsc$a_pointer, temp.dsc$w_length);e job[temp.dsc$w_length] = 0;: getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, TRUE);6 strncpy(file, temp.dsc$a_pointer, temp.dsc$w_length); file[temp.dsc$w_length] = 0;j lib$date_time(&date); time[23] = 0; sprintf(buf,f? "setuppage (%s) h-job (%s) h-user (%s) h-file (%s) h-time ",s job, user, file, time); WRITELASER(buf,strlen(buf)) e1/* only print page count on last trailer page */d wK if ((which == 1) && (ctl & SMBMSG$M_LAST_FILE_OF_JOB)) { /* if last one */l* sprintf(buf, "(%d) h-pages ", jobstart); WRITELASER(buf,strlen(buf))} } g t1 if ((which == 1) && (stop_task | stop_reason)) {;; if (stop_task) stop = stop_task; else stop = stop_reason;& msglen = 0; /* in case of error */1 stat = sys$getmsg(stop, &msglen, &msgd, 15, 0);s checkstat(stat,"$getmsg"); message[msglen] = 0;) sprintf(buf, "(%s) h-error ", message);= WRITELASER(buf,strlen(buf))d } {' if (userlog > 0) { /* if log file */_ str$append(&savelog, &zero);9 for (cp=savelog.dsc$a_pointer; *cp; cp+=strlen(cp)+1) {( sprintf(buf, "(%s) h-logline\n", cp); WRITELASER(buf,strlen(buf)) }b } F sprintf(buf, " showpage \004"); WRITELASER(buf,strlen(buf))}),/** writemodule - write module from library.*-* return: TRUE if module written, else FALSE.**/writemodule(key)struct dsc$descriptor_s key;{c int stat, len;  int library_index;p long txtrfa[2]; char inbuf[255];nY struct dsc$descriptor_s inbufdes = {sizeof(inbuf), DSC$K_DTYPE_T, DSC$K_CLASS_S, inbuf};a# struct dsc$descriptor_s outbufdes;k3 if (library_spec.dsc$a_pointer == 0) return FALSE;s H stat = lbr$ini_control(&library_index, &LBR$C_READ, &LBR$C_TYP_TXT, 0); checkstat(stat, "ini_control");? stat = lbr$open(&library_index, &library_spec, 0, 0, 0, 0, 0);o checkstat(stat, "open");p5 stat = lbr$lookup_key(&library_index, &key, txtrfa);a* if ((stat & 1) != 1) { /* if bad key */# stat = lbr$close(&library_index); # checkstat(stat, "close library");i return FALSE; } do { ? stat = lbr$get_record(&library_index, &inbufdes, &outbufdes);s if (stat == RMS$_EOF) break;  len = outbufdes.dsc$w_length;  inbuf[len++] = '\r'; inbuf[len++] = '\n'; WRITELASER(inbuf,len)t } while (1);r" stat = lbr$close(&library_index); checkstat(stat, "close");},//** writeuserlog - write line to user log file.t*/writeuserlog(){, int stat;& static struct dsc$descriptor_s temp =) {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};e1 if (userlog == -1) return; /* if no log file */ e sys$setast(0);c t userlog++; /* bump flag */ log_rab.rab$l_rbf = laser_buf;n' log_rab.rab$w_rsz = strlen(laser_buf);r stat = sys$put(&log_rab, 0, 0); k/ if (userlog <= 5) { /* save first 5 lines */ 9 temp.dsc$w_length = strlen(laser_buf) + 1; /* incl 0 */u! temp.dsc$a_pointer = laser_buf;* str$append(&savelog, &temp); } s sys$setast(1);n checkstat(stat, "write log");}dopy count */) getnote(); /* output possi"*[VAX90A.UTEXAS.LASER]LASER.EXE;177+,J.'/ 4'&-C0123 KPWO(5 6@j(F7^֓8`2.Q9GHJJ0DX0205(-&F<h!LASERV1.0-&F04-00    ? ! VAXCRTL_001@!d FORRTL_001!  LIBRTL_001y! MTHRTL_001!f SMGSHR_001!  LBRSHR_001"! SMBSRVSHR_001!  BASRTL_001wait start_task%%[ PrinterError:%%[ status: %%[ status: idle ]%%%%[ patch needed ]%%%%[ start page #=%d%%[ end page #=%d%%[ Flushing:getquiwclose logXLF XCR writelaser%d{XLF}repeat XCR writelaserwritelaserwritelaser)XSTR()pop writelaser)XSTR writelaserXCR writelaserwritelaser)XSTR()pop writelaser)XSTR writelaserXLF writelaserwritelaser)XSTR()pop writelaser)XSTR writelaserXFF writelaserwritelaser/#copies %d def writelaserwritelaserwritelaserPARSER/params [ writelaser(%s) %s (param%d) %s writelaser] def writelaser_HEX_STRHEADERS/filename () def writelaser/formname () def writelaserinitsymb-LASER$LOG:.laser_log;0.laser_log;0read qioprocesstask: send to jobctlprocesstask: send to jobctlresetstream: send to jobctl0 :5:00writelaserbintimschdwkwritelaserwritelaserwritelaserLaserWriter job possibly hungwritelaserEOF writelaserwritelaserset privsstartstream: send to jobctlstartstream: send to jobctlstopstream: dassgnstopstream: send to jobctl0 ::10PATCHwritelaserbintimschdwkwritelaserwritelaserLaserWriter offlinewritelaserbintimschdwkLaserWriter offlinewritelaserTRAILERwritelasersetuppage (%s) h-job (%s) h-user (%s) h-file (%s) h-time writelaser(%d) h-pages writelaser$getmsg(%s) h-error writelaser(%s) h-logline writelaser showpage writelaserini_controlopenclose librarywritelaserclosewrite log0123456789ABCDEFstatusdict begin (%%[ end page #=) print pagecount pstack pop flush end '@version (23.0) eq { statusdict /Patch1Installed known not { (%%[ patch needed ]%% ) print } if } if statusdict begin (%%[ start page #=) print pagecount pstack pop flush end %<h <^=(RH\ lbPPl<^TRDSߤc'UePcc'PP\c'\PLcL\c'\Pc'P\\zP ߤ"ceP"ߤ/cePl|~PߤDceP 2PߤYceP *ߤk)'|~PߤnceP!Ā&|~P ăceP Џ,PP^PXVԭ괭ސԭM|!>SP<~ݭ*&Pj{<~`̇U|~|~ZP|~ 2~ ̐PS^(n PЏ4PP^PQ Q\L\l;Q^}R߭^›P^ԭ߭hԭ߭#P PЭPPiQE)]mz?P| alBH>EP<~ݭ"|~|~'P|~ 2h~ `P$<^R5UTեP߭(kPSc|~|~e߭wPc߭߭ʏPP߭|PcP߭PzH (Under VMS >= 4.4, HEADERS is the default for spooled files)6LETTER Same as HEADERS except default title to false.ALANDSCAPE Same as LETTER except default wide to true, fsize to 8.42UP Same as LANDSCAPE except default ncolumns to 2.DPOST Send a PostScript file to the printer for execution.PAINT Print a MacPaint image.+ ncopies: Number of copies. (default: 1)9 scale: Scale factor. (default: 4, recommended: 1-4) %BITIMAGE Print an uncompressed image.* ncopies: Number of copies. (default: 1)% scale: Scale factor. (default: 1)5 xsize: Number of pixels in a row. (default: 512)2 ysize: Number of pixel columns. (default: 512)A pxlwid: Number of bits in a pixel, default 1, values: 1,2,4,8ZETA Print a zeta plot file.* ncopies: Number of copies. (default: 1)% scale: Scale factor. (default: 1)A zFont: false - selects Helvetica font for internal character+ true - (default) uses Zeta characters5 penscale: Scaling factor for pen point (default: 1)9 usepens: false - (default) ignore alternate pen select 2 Spooling-Spooled file names have the following syntax:- _FormName._ParameterListFwhere ParameterList is a list of parameters separated by "_". Keywords2are separated from their values with "-". Example:; $ copy thing.mpt alw:_paint._scale-4_ncopies-5 2 ExamplesG1. $ PRINT/QUEUE=ALW/FORM=HEADERS/PARAM=(NCOPIES=4,FSIZE=14) STUFF.TXT9 Prints 4 copies of STUFF.TXT with a font size of 14.=2. $ PRINT/QUEUE=ALW/FORM=POST/NOTE="/debug true def" USER.PSG "Prints" (executes) a user's PostScript file. The first line sent. to the printer will be "/debug true def".*3. $ FORTRAN /LIST=ALW:_LANDSCAPE TEST.FOR? Compile a program, spooling the output to the LaserWriter.(4. $ PRINT/QUEUE=ALW/FORM=POST USER.PS -< /NOTE="statusdict begin /manualfeed true def end"C Set up to feed the printer manually, by sending the PostScript1 command that enables the manual feed option. *[VAX90A.UTEXAS.LASER]LASER.OPT;1+,L./ 4+.-C0123KPWO5 6#ŏ74*֓8-Q9GHJ+laser,laser_err,sys$share:vaxcrtl.exe/share$*[VAX90A.UTEXAS.LASER]LASER_ERR.MSG;7+,M./ 43-C0123KPWO5 6Y%7Ϗ7@4֓84.Q9GHJ~UTEXAS_LASER.SAVMC$[VAX90A.UTEXAS.LASER]LASER_ERR.MSG;734 .Title LASER error messages! .Facility LASER,1/prefix=LASER$_# .Ident 'LASER Version 1.0' .Severity FATAL( MAXITEMS & ITEMNOTFOUND ) STREAMNOTSTART - TOOMANYTABS  FLUSHED 3 SETUPNOTFOUND  .End*[VAX90A.UTEXAS.LASER]LBRDEF.H;2+,N./ 4-C0123KPWO5 6ýƏ7 >֓8y5.Q9GHJ #define LBR$C_TYP_UNK 0#define LBR$C_TYP_OBJ 1#define LBR$C_TYP_MLB 2#define LBR$C_TYP_HLP 3#define LBR$C_TYP_TXT 4#define LBR$C_TYP_SHSTB 5#define LBR$C_TYP_DECMX 5#define LBR$C_TYP_RDEC 127#define LBR$C_TYP_USRLW 128#define LBR$C_TYP_USRHI 255#define LBR$C_FLUSHDATA 1#define LBR$C_FLUSHALL 0#define LBR$C_MAXRECSIZ 2048#define LBR$C_PAGESIZE 512#define LBR$C_HASHSIZE 512#define LBR$C_TEXTPAGE 508#define LBR$C_DEXTQ 50#define LBR$C_MAXCTL 16#define LBR$C_MAXHDRSIZ 128#define LBR$C_DEFENTALL 300#define LBR$C_RETRYOPEN 30#define LBR$C_RETRYWAIT 1#define LBR$C_MINREAD 2#define LBR$C_MAXREAD 50#define LBR$C_MEMXTRA 50#define LBR$C_PUTBUFSIZ 30#define LBR$C_FLSHBFSIZ 1#define LBR$C_MAXIDXRD 20#define LBR$C_MAXKEYLEN 128#define LBR$C_MAXLUHREC 32768#define LBR$C_CREATE 0#define LBR$C_READ 1#define LBR$C_UPDATE 2#define LBR$C_MAXFUNC 2#define LBR$S_LBRDEF 16#define LBR$L_IC_CTLTBL 4#define LBR$L_IC_FUNC 8#define LBR$L_IC_TYPE 12#define LBR$S_LBRDEF1 32#define LBR$L_OP_CTLTBL 4#define LBR$L_OP_FNS 8#define LBR$L_OP_CREOPT 12#define LBR$L_OP_DNS 16#define LBR$L_OP_RLFNA 20#define LBR$L_OP_RNS 24#define LBR$L_OP_RNSLEN 28#define LBR$S_LBRDEF2 8#define LBR$L_CL_CTLTBL 4#define LBR$S_LBRDEF3 12#define LBR$L_GH_CTLTBL 4#define LBR$L_GH_RETARY 8#define LBR$S_LBRDEF4 12#define LBR$L_SI_CTLTBL 4#define LBR$L_SI_IDXNUM 8#define LBR$S_LBRDEF5 16#define LBR$L_LK_CTLTBL 4#define LBR$L_LK_KEYNAM 8#define LBR$L_LK_TXTRFA 12#define LBR$S_LBRDEF6 16#define LBR$L_IK_CTLTBL 4#define LBR$L_IK_KEYNAM 8#define LBR$L_IK_TXTRFA 12#define LBR$S_LBRDEF7 20#define LBR$L_RK_CTLTBL 4#define LBR$L_RK_KEYNAM 8#define LBR$L_RK_OLDRFA 12#define LBR$L_RK_NEWRFA 16#define LBR$S_LBRDEF8 12#define LBR$L_DK_CTLTBL 4#define LBR$L_DK_KEYNAM 8#define LBR$S_LBRDEF9 12#define LBR$L_DD_CTLTBL 4#define LBR$L_DD_TXTRFA 8#define LBR$S_LBRDEF10 16#define LBR$L_GR_CTLTBL 4#define LBR$L_GR_BUFDES 8#define LBR$L_GR_BUFLEN 12#define LBR$S_LBRDEF11 16#define LBR$L_PR_CTLTBL 4#define LBR$L_PR_BUFDES 8#define LBR$L_PR_TXTRFA 12#define LBR$S_LBRDEF12 8#define LBR$L_PE_CTLTBL 4#define LBR$S_LBRDEF13 20#define LBR$L_SR_CTLTBL 4#define LBR$L_SR_IDXNUM 8#define LBR$L_SR_RFA 12#define LBR$L_SR_USRTN 16#define LBR$S_LBRDEF14 12#define LBR$L_SU_KEYDES 4#define LBR$L_SU_TXTRFA 8#define LBR$S_LBRDEF15 16#define LBR$L_GI_CTLTBL 4#define LBR$L_GI_IDXNUM 8#define LBR$L_GI_USRTN 12#define LBR$S_LBRDEF16 12#define LBR$L_GU_KEYADR 4#define LBR$L_GU_TXTRFA 8#define LBR$C_ADDMOD 1#define LBR$C_DELMOD 2#define LBR$C_REPMOD 3#define LBR$S_LBRDEF17 16#define LBR$L_AU_CTLTBL 4#define LBR$L_AU_FLAGS 8#define LBR$L_AU_KEYNAM 12#define LBR$S_LBRDEF18 12#define LBR$L_GU_CTLTBL 4#define LBR$L_GU_USRTN 8#define LBR$S_LBRDEF19 8#define LBR$L_UU_UPDESC 4#*[VAX90A.UTEXAS.LASER]PAINT_HEX.PS;1+,O. / 4M \-C0123KPWO 5 6`ئ K72G֓8`!,P9GHJH%%% paint - puts a MacPaint compressed raster file on the laser printer.%%=% inputs: /nc /ncopies /params - number of copies (default 1)2% /sf /scale /param2 - scale factor (default 4.0)%6% 02/18/87 R. Watson Added parser stuff. Speedup mods.%%% deCompress .%(% returns a bitimage string on the stack% /deCompress{& /count getByte byte def % get count /ind 0 def % preset index) count 16#80 and 0 eq { % if bit stream /count count 1 add def9 outstring 0 count getinterval % get right size string% inp exch readhexstring % get bytes$ pop % toss readhexstring status } { % else repeated string! getByte % get byte to repeat> 16#100 count sub 1 add /count exch def% get abs val of count count { outstring ind byte put& /ind ind 1 add def % advance index } repeat/ outstring 0 count getinterval % return string } ifelse} def %% getByte%!% returns /byte = next input byte-% = 0 if no more bytes on input stream%/getByte{+ inp instring readhexstring { % if got one' 0 get /byte exch def % store in byte } { % else 0 pop /byte 0 def } ifelse} def%% main program%/main{( /sTime usertime def % save start timeK%%% vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestringK%%% 10 20 string cvrs dbg exch writestring dbg ( ) writestringM%%% 10 20 string cvrs dbg exch writestring dbg ( \n) writestring%%% flush1 /iscale 1 scale div def % compute scale factor+ 512 { getByte} repeat % eat paint header@% 576 720 1 [iscale 0.0 0.0 iscale 0.0 0.0] { deCompress } imageD 576 720 true [iscale 0.0 0.0 iscale 0.0 0.0] {deCompress} imagemask1%%% usertime sTime sub 1000 div 10 20 string cvrs)%%% dbg exch writestring dbg ( seconds )%%% writestringJ%%% vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestringI%%% 10 20 string cvrs dbg exch writestring dbg ( ) writestringM%%% 10 20 string cvrs dbg exch writestring dbg ( \n) writestring%%% flush showpage, currentfile flushfile % avoid laser_log's} def%% executable initialization%*/inp (%stdin) (r) file def % define files/dbg (%stdout) (w) file def/table [8 [/#copies 1 (.nc .ncopies .param1)] % number of copies2 [/scale 4.0 (.sf .scale .param2)] % scale factor] deftable { % apply defaults /ta exch def % save array ta 0 get % key ta 1 get % default value def % define default value} forall7currentdict /parser known {parser} if % if user inputs0/identity matrix def % make an identity matrix6/outstring 128 string def % storage for output string'/instring 1 string def % input buffer01 72 mul 10 72 mul moveto currentpoint translate<currentpoint transform % see where we are in device coords:identity setmatrix % turn off transformation - switch to % device coordinate system0translate % move origin to transformed currpt/doit {: {main} stopped { (error stack:\n) = pstack flush quit} if} def%doitmain *[VAX90A.UTEXAS.LASER]PARSER.PS;1+,P./ 4B-C0123KPWO5 6ԑ K7 Q֓8-P9GHJ%% Parser takes 2 arguments as input:>% /params is an array of pairs of keyword strings and values:9% [ (param1) value1 (param2) value2 ... (paramn) valuen]?% /table is an array of key/default value/keyword list arrays:(% [ [/key1 default1 (.key1 .whatever1)](% [/key2 default2 (.key2 .whatever2)] % ... ]B% Parser first defines /key1 to default1, /key2 to default2, etc.B% Then, for each param keyword in /params, it searches the arraysA% in /table for a matching keyword. If found, it sets /key? to % the value from /params. /parser {5% process each keyword value pair in the params array! /pindex 0 def % preset index params length 2 idiv {5 params pindex get length 1 add % build keyword str string /ks exch def3 ks 1 params pindex get putinterval % (.) ks 0 46 put /ok false def % preset flag table { % for each array! /ta exch def % get the array ta 2 get % get token string% ks search { % search for keyword% pop pop pop % flush search stuff ta 0 get % get key, params pindex 1 add get % get new value def % set new value& /ok true def % flag keyword found exit % -forall } { pop % flush failed search } ifelse } forall % try next array$ ok not { % if keyword not found) ks = (is not a known parameter) = quit } if2 /pindex pindex 2 add def % advance to next pair } repeat} def*[VAX90A.UTEXAS.LASER]PATCH.PS;1+,Q./ 4Gh-C0123KPWO5 6W~ K7[֓8.P9GHJ G% The program below may be downloaded to a LaserWriter to correct three.% bugs in the LaserWriter's serial I/O driver:%-% - occasional failure to send a needed XON6% - erroneously reading past end-of-file (control-D)7% - dropped characters during large volumes of output%%!90000000000 % the exitserver passwordversion (23.0) neE {(Patch not installed -- wrong printer type or version) = stop} if!statusdict /Patch1Installed known? {(Patch already installed -- not installed again) = stop} ifserverdict begin exitserver$statusdict /Patch1Installed true putcurrentfile eexec@ce1b9f428ac69e75cc47a554265ae625851e0154ac649ad44c1c34e4c60a0493@a80212a3bd61248f8859cb1252a7320775a6d4ec524bcbf5771aceb8f61ea2fb@48fcb3df8da0f105be40f697239ef0976f92c1d41e915a7389200a3e896cd955@d197ff27f22a617c85bce7ed59ef1a6062d01d0fdee5b4e7d298997638497cc6@a2d56a0eacc195795949f515bbbda9cfe899e43ad257da93f3144797b00dbb81@8a41b4fa56a0295c25e693864084cbb5d63834f1d94a46816d4a2cbe005cc57c@38491a6a34cfbdef303ed8731dbbe84dc6f8e1e790f3d89360d063639c8411fd@89ad7c53d1b9732bd0942bc36257208d24792ea7c66790b6104c3a2b794a1460@c476ffdb5552f428f457b47319cccb0c9980036402eaca80c0b5e0ccb5f579df@09cc6f382b536aa64da7152356c377a5b708a378e855a7ec3eccd848d5508dbf@5c7bd28c2899e9cfd7f4ff3d7ddc08006cce42b2d8c59ef64af8ec74a2f9d23f@e8d4d03ba1e2686138fffc2af9c662c994ec8065a32144ba9ac5002623b39012@521eb49cd829c3506af2895bf275367eb4d31908b14f3b1e0abfaca2f98eb9d8@8d84ac8271ef44def53d8207ce9653d598fe8046120f223bfca0b5c74a54f70b@eb5a0bc09d8e79742048b875864a3b489eb91c09b701f506e994271a6640f78a@d131f1eef3c96e546f7273fb3533799a6470be2ed3b8f2e211bf9f9f209edbd2@36c19d4b0b3f28ab16c39faa17070699543c212c76081961c949ebd32ada3c93@ccdc56c2c940a2061bc11794a0159cc37255aa8c8e7e08d78f204161f1eccb7d@ad3313b737e921b7df1fe794e9a7fc2226702ee555ceb8e803a20ebeaa440a40@9e1f1a72412586e3071292b10e938e7f386b8e6516758633bab57223e071b1de@8c4b73cafababc0af7bc902e8763a2817861591d7ee98f85bc28ad0ea4d13660@d3256aa293df1959b7b57b13edee653cfdda2fafe0698898dc5e371ca4c5b72b@b92750d0eea5e74955712b06958663f424a46cf75a797590f0d2a36842fe07e3@db459215dab6e461a4c3fbb40ee2499af3fe4b13790de87e11afde6aadd12e77@d84d8076146d797269c9188d8fb725898aee284e62c472e0e7b585ef3fed434c@000b0bb70ad6806e840cfe872ec3f28782dd08b70d29c2da2187e2dc0f13dfc0@89f75344e3dad78a1c9b909fc72bdd92421afdc8b80850ff0d43605edfd9be56@d81cb17250ce7208354548f6ccc62366e8196d4adeb2d24fd5ce47bb6295fa72@c361197cafacbd51efd36dfa59c6f8e6cab8915a8043d609eb64726de86080d2@4118cc69e01eab0f4ef1f364c815f306d5f43420cf7c9316e5ee69c7183dd8d2*805a9dfe6abb33c46d3a212d5c6b6fd68418eef971*[VAX90A.UTEXAS.LASER]PS.PS;1+,R./ 4,.-C0123KPWO5 6d K7h֓8`/P9GHJ,% this is so that spooling to _ps will work.*[VAX90A.UTEXAS.LASER]QUIDEF.H;2+,S./ 4+,-C0123KPWO5 6 cGΏ7@q֓8ਕ9.Q9GHJ&#define QUI$_CANCEL_OPERATION 1%#define QUI$_DISPLAY_CHARACTERISTIC 2#define QUI$_DISPLAY_FILE 3#define QUI$_DISPLAY_FORM 4#define QUI$_DISPLAY_JOB 5#define QUI$_DISPLAY_QUEUE 6#define QUI$_TRANSLATE_QUEUE 7#define QUI$_RESERVED_FUNC_1 8#define QUI$_RESERVED_FUNC_2 9#define QUI$_ACCOUNT_NAME 1#define QUI$_AFTER_TIME 2"#define QUI$_ASSIGNED_QUEUE_NAME 3#define QUI$_BASE_PRIORITY 4"#define QUI$_CHARACTERISTIC_NAME 5$#define QUI$_CHARACTERISTIC_NUMBER 6#define QUI$_CHARACTERISTICS 7#define QUI$_CHECKPOINT_DATA 8#define QUI$_CLI 9 #define QUI$_COMPLETED_BLOCKS 10 #define QUI$_CONDITION_VECTOR 11#define QUI$_CPU_DEFAULT 12#define QUI$_CPU_LIMIT 13#define QUI$_DEVICE_NAME 14#define QUI$_ENTRY_NUMBER 15#define QUI$_FILE_COPIES 16!#define QUI$_FILE_COPIES_CHKPT 17 #define QUI$_FILE_COPIES_DONE 18#define QUI$_FILE_FLAGS 19"#define QUI$_FILE_SETUP_MODULES 20"#define QUI$_FILE_SPECIFICATION 21#define QUI$_FILE_STATUS 22#define QUI$_FIRST_PAGE 23 #define QUI$_FORM_DESCRIPTION 24#define QUI$_FORM_FLAGS 25#define QUI$_FORM_LENGTH 26"#define QUI$_FORM_MARGIN_BOTTOM 27 #define QUI$_FORM_MARGIN_LEFT 28!#define QUI$_FORM_MARGIN_RIGHT 29#define QUI$_FORM_MARGIN_TOP 30#define QUI$_FORM_NAME 31#define QUI$_FORM_NUMBER 32"#define QUI$_FORM_SETUP_MODULES 33#define QUI$_FORM_STOCK 34#define QUI$_FORM_WIDTH 35#define QUI$_GENERIC_TARGET 36"#define QUI$_INTERVENING_BLOCKS 37 #define QUI$_INTERVENING_JOBS 38#define QUI$_JOB_COPIES 39 #define QUI$_JOB_COPIES_CHKPT 40#define QUI$_JOB_COPIES_DONE 41#define QUI$_JOB_FLAGS 42#define QUI$_JOB_LIMIT 43#define QUI$_JOB_NAME 44!#define QUI$_JOB_RESET_MODULES 45#define QUI$_JOB_SIZE 46 #define QUI$_JOB_SIZE_MAXIMUM 47 #define QUI$_JOB_SIZE_MINIMUM 48#define QUI$_JOB_STATUS 49#define QUI$_LAST_PAGE 50%#define QUI$_LIBRARY_SPECIFICATION 51#define QUI$_LOG_QUEUE 52!#define QUI$_LOG_SPECIFICATION 53#define QUI$_NOTE 54 #define QUI$_OPERATOR_REQUEST 55#define QUI$_OWNER_UIC 56"#define QUI$_PAGE_SETUP_MODULES 57#define QUI$_PARAMETER_1 58#define QUI$_PARAMETER_2 59#define QUI$_PARAMETER_3 60#define QUI$_PARAMETER_4 61#define QUI$_PARAMETER_5 62#define QUI$_PARAMETER_6 63#define QUI$_PARAMETER_7 64#define QUI$_PARAMETER_8 65#define QUI$_PRIORITY 66#define QUI$_PROCESSOR 67#define QUI$_PROTECTION 68#define QUI$_QUEUE_FLAGS 69#define QUI$_QUEUE_NAME 70#define QUI$_QUEUE_STATUS 71#define QUI$_REFUSAL_REASON 72 #define QUI$_REQUEUE_PRIORITY 73"#define QUI$_REQUEUE_QUEUE_NAME 74#define QUI$_SCSNODE_NAME 75#define QUI$_SEARCH_FLAGS 76#define QUI$_SEARCH_NAME 77#define QUI$_SEARCH_NUMBER 78#define QUI$_SUBMISSION_TIME 79#define QUI$_UIC 80#define QUI$_USERNAME 81#define QUI$_WSDEFAULT 82#define QUI$_WSEXTENT 83#define QUI$_WSQUOTA 84"#define QUI$_RESERVED_BOOLEAN_1 85"#define QUI$_RESERVED_BOOLEAN_2 86 #define QUI$_RESERVED_INPUT_1 87 #define QUI$_RESERVED_INPUT_2 88!#define QUI$_DEFAULT_FORM_NAME 89##define QUI$_DEFAULT_FORM_NUMBER 90"#define QUI$_DEFAULT_FORM_STOCK 91#define QUI$_JOB_PID 92!#define QUI$_RESERVED_OUTPUT_5 93!#define QUI$_RESERVED_OUTPUT_6 94#define QUI$M_FILE_BURST 1#define QUI$M_FILE_BURST_EXP 2#define QUI$M_FILE_DELETE 4!#define QUI$M_FILE_DOUBLE_SPACE 8#define QUI$M_FILE_FLAG 16#define QUI$M_FILE_FLAG_EXP 32#define QUI$M_FILE_TRAILER 64"#define QUI$M_FILE_TRAILER_EXP 128"#define QUI$M_FILE_PAGE_HEADER 256#define QUI$M_FILE_PAGINATE 512#define QUI$M_FILE_PASSALL 1024$#define QUI$M_FILE_PAGINATE_EXP 2048#define QUI$V_FILE_BURST 0#define QUI$V_FILE_BURST_EXP 1#define QUI$V_FILE_DELETE 2!#define QUI$V_FILE_DOUBLE_SPACE 3#define QUI$V_FILE_FLAG 4#define QUI$V_FILE_FLAG_EXP 5#define QUI$V_FILE_TRAILER 6 #define QUI$V_FILE_TRAILER_EXP 7 #define QUI$V_FILE_PAGE_HEADER 8#define QUI$V_FILE_PAGINATE 9#define QUI$V_FILE_PASSALL 10"#define QUI$V_FILE_PAGINATE_EXP 11!#define QUI$M_FILE_CHECKPOINTED 1#define QUI$M_FILE_EXECUTING 2!#define QUI$V_FILE_CHECKPOINTED 0#define QUI$V_FILE_EXECUTING 1#define QUI$M_FORM_SHEET_FEED 1#define QUI$M_FORM_TRUNCATE 2#define QUI$M_FORM_WRAP 4#define QUI$V_FORM_SHEET_FEED 0#define QUI$V_FORM_TRUNCATE 1#define QUI$V_FORM_WRAP 2#define QUI$M_JOB_CPU_LIMIT 1#define QUI$M_JOB_FILE_BURST 2"#define QUI$M_JOB_FILE_BURST_ONE 4"#define QUI$M_JOB_FILE_BURST_EXP 8#define QUI$M_JOB_FILE_FLAG 16"#define QUI$M_JOB_FILE_FLAG_ONE 32"#define QUI$M_JOB_FILE_FLAG_EXP 64"#define QUI$M_JOB_FILE_TRAILER 128&#define QUI$M_JOB_FILE_TRAILER_ONE 256&#define QUI$M_JOB_FILE_TRAILER_EXP 512!#define QUI$M_JOB_LOG_DELETE 1024#define QUI$M_JOB_LOG_NULL 2048 #define QUI$M_JOB_LOG_SPOOL 4096 #define QUI$M_JOB_LOWERCASE 8192#define QUI$M_JOB_NOTIFY 16384#define QUI$M_JOB_RESTART 32768!#define QUI$M_JOB_WSDEFAULT 65536!#define QUI$M_JOB_WSEXTENT 131072 #define QUI$M_JOB_WSQUOTA 262144&#define QUI$M_JOB_FILE_PAGINATE 524288+#define QUI$M_JOB_FILE_PAGINATE_EXP 1048576#define QUI$V_JOB_CPU_LIMIT 0#define QUI$V_JOB_FILE_BURST 1"#define QUI$V_JOB_FILE_BURST_ONE 2"#define QUI$V_JOB_FILE_BURST_EXP 3#define QUI$V_JOB_FILE_FLAG 4!#define QUI$V_JOB_FILE_FLAG_ONE 5!#define QUI$V_JOB_FILE_FLAG_EXP 6 #define QUI$V_JOB_FILE_TRAILER 7$#define QUI$V_JOB_FILE_TRAILER_ONE 8$#define QUI$V_JOB_FILE_TRAILER_EXP 9#define QUI$V_JOB_LOG_DELETE 10#define QUI$V_JOB_LOG_NULL 11#define QUI$V_JOB_LOG_SPOOL 12#define QUI$V_JOB_LOWERCASE 13#define QUI$V_JOB_NOTIFY 14#define QUI$V_JOB_RESTART 15#define QUI$V_JOB_WSDEFAULT 16#define QUI$V_JOB_WSEXTENT 17#define QUI$V_JOB_WSQUOTA 18"#define QUI$V_JOB_FILE_PAGINATE 19&#define QUI$V_JOB_FILE_PAGINATE_EXP 20#define QUI$M_JOB_ABORTING 1#define QUI$M_JOB_EXECUTING 2#define QUI$M_JOB_HOLDING 4 #define QUI$M_JOB_INACCESSIBLE 8#define QUI$M_JOB_REFUSED 16#define QUI$M_JOB_REQUEUE 32#define QUI$M_JOB_RESTARTING 64#define QUI$M_JOB_RETAINED 128#define QUI$M_JOB_STARTING 256#define QUI$M_JOB_TIMED 512#define QUI$V_JOB_ABORTING 0#define QUI$V_JOB_EXECUTING 1#define QUI$V_JOB_HOLDING 2 #define QUI$V_JOB_INACCESSIBLE 3#define QUI$V_JOB_REFUSED 4#define QUI$V_JOB_REQUEUE 5#define QUI$V_JOB_RESTARTING 6#define QUI$V_JOB_RETAINED 7#define QUI$V_JOB_STARTING 8#define QUI$V_JOB_TIMED 9#define QUI$M_QUEUE_BATCH 1!#define QUI$M_QUEUE_CPU_DEFAULT 2#define QUI$M_QUEUE_CPU_LIMIT 4 #define QUI$M_QUEUE_FILE_BURST 8%#define QUI$M_QUEUE_FILE_BURST_ONE 16 #define QUI$M_QUEUE_FILE_FLAG 32$#define QUI$M_QUEUE_FILE_FLAG_ONE 64$#define QUI$M_QUEUE_FILE_TRAILER 128(#define QUI$M_QUEUE_FILE_TRAILER_ONE 256#define QUI$M_QUEUE_GENERIC 512*#define QUI$M_QUEUE_GENERIC_SELECTION 1024"#define QUI$M_QUEUE_JOB_BURST 2048!#define QUI$M_QUEUE_JOB_FLAG 4096'#define QUI$M_QUEUE_JOB_SIZE_SCHED 8192%#define QUI$M_QUEUE_JOB_TRAILER 16384$#define QUI$M_QUEUE_RETAIN_ALL 32768&#define QUI$M_QUEUE_RETAIN_ERROR 65536#define QUI$M_QUEUE_SWAP 131072##define QUI$M_QUEUE_TERMINAL 262144$#define QUI$M_QUEUE_WSDEFAULT 524288$#define QUI$M_QUEUE_WSEXTENT 1048576##define QUI$M_QUEUE_WSQUOTA 2097152)#define QUI$M_QUEUE_FILE_PAGINATE 4194304+#define QUI$M_QUEUE_RECORD_BLOCKING 8388608#define QUI$V_QUEUE_BATCH 0!#define QUI$V_QUEUE_CPU_DEFAULT 1#define QUI$V_QUEUE_CPU_LIMIT 2 #define QUI$V_QUEUE_FILE_BURST 3$#define QUI$V_QUEUE_FILE_BURST_ONE 4#define QUI$V_QUEUE_FILE_FLAG 5##define QUI$V_QUEUE_FILE_FLAG_ONE 6"#define QUI$V_QUEUE_FILE_TRAILER 7&#define QUI$V_QUEUE_FILE_TRAILER_ONE 8#define QUI$V_QUEUE_GENERIC 9(#define QUI$V_QUEUE_GENERIC_SELECTION 10 #define QUI$V_QUEUE_JOB_BURST 11#define QUI$V_QUEUE_JOB_FLAG 12%#define QUI$V_QUEUE_JOB_SIZE_SCHED 13"#define QUI$V_QUEUE_JOB_TRAILER 14!#define QUI$V_QUEUE_RETAIN_ALL 15##define QUI$V_QUEUE_RETAIN_ERROR 16#define QUI$V_QUEUE_SWAP 17#define QUI$V_QUEUE_TERMINAL 18 #define QUI$V_QUEUE_WSDEFAULT 19#define QUI$V_QUEUE_WSEXTENT 20#define QUI$V_QUEUE_WSQUOTA 21$#define QUI$V_QUEUE_FILE_PAGINATE 22&#define QUI$V_QUEUE_RECORD_BLOCKING 23#define QUI$M_QUEUE_ALIGNING 1#define QUI$M_QUEUE_IDLE 2#define QUI$M_QUEUE_LOWERCASE 4 &#define QUI$M_QUEUE_OPERATOR_REQUEST 8#define QUI$M_QUEUE_PAUSED 16Y#define QUI$M_QUEUE_PAUSING 32#define QUI$M_QUEUE_REMOTE 64E!#define QUI$M_QUEUE_RESETTING 1288 #define QUI$M_QUEUE_RESUMING 256#define QUI$M_QUEUE_SERVER 512 #define QUI$M_QUEUE_STALLED 1024!#define QUI$M_QUEUE_STARTING 2048 #define QUI$M_QUEUE_STOPPED 4096!#define QUI$M_QUEUE_STOPPING 8192$%#define QUI$M_QUEUE_UNAVAILABLE 16384C#define QUI$V_QUEUE_ALIGNING 0#define QUI$V_QUEUE_IDLE 1#define QUI$V_QUEUE_LOWERCASE 2B&#define QUI$V_QUEUE_OPERATOR_REQUEST 3#define QUI$V_QUEUE_PAUSED 4#define QUI$V_QUEUE_PAUSING 5#define QUI$V_QUEUE_REMOTE 6#define QUI$V_QUEUE_RESETTING 7f#define QUI$V_QUEUE_RESUMING 8#define QUI$V_QUEUE_SERVER 9#define QUI$V_QUEUE_STALLED 10#define QUI$V_QUEUE_STARTING 11f#define QUI$V_QUEUE_STOPPED 12#define QUI$V_QUEUE_STOPPING 131"#define QUI$V_QUEUE_UNAVAILABLE 14#define QUI$M_SEARCH_ALL_JOBS 1U#define QUI$M_SEARCH_WILDCARD 2U#define QUI$M_SEARCH_BATCH 4#define QUI$M_SEARCH_SYMBIONT 8R #define QUI$M_SEARCH_THIS_JOB 16#define QUI$V_SEARCH_ALL_JOBS 0F#define QUI$V_SEARCH_WILDCARD 1$#define QUI$V_SEARCH_BATCH 2#define QUI$V_SEARCH_SYMBIONT 3F#define QUI$V_SEARCH_THIS_JOB 4_TUP_MODULES 33#define QUI$_FORM_STOCK 34#define QUI$_FORM_WIDTH 35#define QUI$_GENERIC_TARGET 36"#define QUI$_INTERVENING_BLOCKS 37 #define QUI$_INTERVENING_JOBS 38#define QUI$_JOB_COPIES 39 #define *[VAX90A.UTEXAS.LASER]SMBDEF.H;3+,T. / 4@ -C0123KPWO 5 6Jŏ7|֓89.Q9GHJ@/*** smbdef.h -- created from smbdef.mar 12-feb-1987 VMS v 4.4. */"#define SMBMSG$K_STRUCTURE_LEVEL 1$#define SMBMSG$K_STRUCTURE_LEVEL_1 1#define SMBMSG$K_PAUSE_TASK 1#define SMBMSG$K_RESET_STREAM 2#define SMBMSG$K_RESUME_TASK 3#define SMBMSG$K_START_STREAM 4#define SMBMSG$K_START_TASK 5#define SMBMSG$K_STOP_STREAM 6#define SMBMSG$K_STOP_TASK 7 #define SMBMSG$K_TASK_COMPLETE 8#define SMBMSG$K_TASK_STATUS 9$#define SMBMSG$K_MAX_REQUEST_CODE 10!#define SMBMSG$S_REQUEST_HEADER 4#define SMBMSG$W_REQUEST_CODE 0"#define SMBMSG$B_STRUCTURE_LEVEL 2#define SMBMSG$B_STREAM_INDEX 3"#define SMBMSG$K_ACCOUNTING_DATA 1#define SMBMSG$K_ACCOUNT_NAME 2#define SMBMSG$K_AFTER_TIME 3"#define SMBMSG$K_ALIGNMENT_PAGES 4 #define SMBMSG$K_BOTTOM_MARGIN 5"#define SMBMSG$K_CHARACTERISTICS 6"#define SMBMSG$K_CHECKPOINT_DATA 7##define SMBMSG$K_CONDITION_VECTOR 8#define SMBMSG$K_DEVICE_NAME 9!#define SMBMSG$K_DEVICE_STATUS 10 #define SMBMSG$K_ENTRY_NUMBER 11"#define SMBMSG$K_EXECUTOR_QUEUE 12#define SMBMSG$K_FILE_COPIES 13#define SMBMSG$K_FILE_COUNT 14&#define SMBMSG$K_FILE_SETUP_MODULES 15#define SMBMSG$K_FIRST_PAGE 16#define SMBMSG$K_FORM_LENGTH 17#define SMBMSG$K_FORM_NAME 18&#define SMBMSG$K_FORM_SETUP_MODULES 19#define SMBMSG$K_FORM_WIDTH 20'#define SMBMSG$K_FILE_IDENTIFICATION 21&#define SMBMSG$K_FILE_SPECIFICATION 22#define SMBMSG$K_JOB_COPIES 23#define SMBMSG$K_JOB_COUNT 24#define SMBMSG$K_JOB_NAME 25%#define SMBMSG$K_JOB_RESET_MODULES 26#define SMBMSG$K_LAST_PAGE 27#define SMBMSG$K_LEFT_MARGIN 28)#define SMBMSG$K_LIBRARY_SPECIFICATION 29##define SMBMSG$K_MAXIMUM_STREAMS 30"#define SMBMSG$K_MESSAGE_VECTOR 31#define SMBMSG$K_NOTE 32&#define SMBMSG$K_PAGE_SETUP_MODULES 33#define SMBMSG$K_PARAMETER_1 34#define SMBMSG$K_PARAMETER_2 35#define SMBMSG$K_PARAMETER_3 36#define SMBMSG$K_PARAMETER_4 37#define SMBMSG$K_PARAMETER_5 38#define SMBMSG$K_PARAMETER_6 39#define SMBMSG$K_PARAMETER_7 40#define SMBMSG$K_PARAMETER_8 41!#define SMBMSG$K_PRINT_CONTROL 42#define SMBMSG$K_PRIORITY 43#define SMBMSG$K_QUEUE 44!#define SMBMSG$K_REFUSE_REASON 45!#define SMBMSG$K_RELATIVE_PAGE 46##define SMBMSG$K_REQUEST_CONTROL 47$#define SMBMSG$K_REQUEST_RESPONSE 48 #define SMBMSG$K_RIGHT_MARGIN 49!#define SMBMSG$K_SEARCH_STRING 50&#define SMBMSG$K_SEPARATION_CONTROL 51"#define SMBMSG$K_STOP_CONDITION 52#define SMBMSG$K_TIME_QUEUED 53#define SMBMSG$K_TOP_MARGIN 54#define SMBMSG$K_UIC 55#define SMBMSG$K_USER_NAME 56!#define SMBMSG$K_MAX_ITEM_CODE 57#define SMBMSG$S_ITEM_HEADER 4#define SMBMSG$W_ITEM_SIZE 0#define SMBMSG$W_ITEM_CODE 2##define SMBMSG$S_ACCOUNTING_DATA 16 #define SMBMSG$L_PAGES_PRINTED 0#define SMBMSG$l_qio_puts 4#define SMBMSG$l_rms_gets 8#define SMBMSG$L_CPU_TIME 12##define SMBMSG$S_CHECKPOINT_DATA 24#define SMBMSG$B_FILLER 0##define SMBMSG$B_CHECKPOINT_LEVEL 1#define SMBMSG$W_OFFSET 2#define SMBMSG$L_CARCON 4#define SMBMSG$L_PAGE 8!#define SMBMSG$L_RECORD_NUMBER 12#define SMBMSG$S_USER_KEY 8#define SMBMSG$Q_USER_KEY 16#define SMBMSG$M_LOWERCASE 1#define SMBMSG$M_PAUSE_TASK 2#define SMBMSG$M_REMOTE 4#define SMBMSG$M_SERVER 8#define SMBMSG$M_STALLED 16#define SMBMSG$M_STOP_STREAM 32#define SMBMSG$M_TERMINAL 64 #define SMBMSG$M_UNAVAILABLE 128 #define SMBMSG$S_DEVICE_STATUS 4#define SMBMSG$L_DEVICE_FLAGS 0#define SMBMSG$V_LOWERCASE 0#define SMBMSG$V_PAUSE_TASK 1#define SMBMSG$V_REMOTE 2#define SMBMSG$V_SERVER 3#define SMBMSG$V_STALLED 4#define SMBMSG$V_STOP_STREAM 5#define SMBMSG$V_TERMINAL 6#define SMBMSG$V_UNAVAILABLE 7#define SMBMSG$M_DOUBLE_SPACE 1#define SMBMSG$M_PAGE_HEADER 2#define SMBMSG$M_PAGINATE 4#define SMBMSG$M_PASSALL 8#define SMBMSG$M_SEQUENCED 16#define SMBMSG$M_SHEET_FEED 32#define SMBMSG$M_TRUNCATE 64#define SMBMSG$M_WRAP 128$#define SMBMSG$M_RECORD_BLOCKING 256 #define SMBMSG$S_PRINT_CONTROL 4#define SMBMSG$L_PRINT_FLAGS 0#define SMBMSG$V_DOUBLE_SPACE 0#define SMBMSG$V_PAGE_HEADER 1#define SMBMSG$V_PAGINATE 2#define SMBMSG$V_PASSALL 3#define SMBMSG$V_SEQUENCED 4#define SMBMSG$V_SHEET_FEED 5#define SMBMSG$V_TRUNCATE 6#define SMBMSG$V_WRAP 7"#define SMBMSG$V_RECORD_BLOCKING 8!#define SMBMSG$M_ALIGNMENT_MASK 1!#define SMBMSG$M_PAUSE_COMPLETE 2#define SMBMSG$M_RESTARTING 4#define SMBMSG$M_TOP_OF_FILE 8#define SMBMSG$S_REQUEST 4 #define SMBMSG$L_REQUEST_FLAGS 0!#define SMBMSG$V_ALIGNMENT_MASK 0!#define SMBMSG$V_PAUSE_COMPLETE 1#define SMBMSG$V_RESTARTING 2#define SMBMSG$V_TOP_OF_FILE 3#define SMBMSG$M_FILE_BURST 1#define SMBMSG$M_FILE_FLAG 2#define SMBMSG$M_FILE_TRAILER 4%#define SMBMSG$M_FILE_TRAILER_ABORT 8#define SMBMSG$M_JOB_FLAG 16#define SMBMSG$M_JOB_BURST 32#define SMBMSG$M_JOB_RESET 64$#define SMBMSG$M_JOB_RESET_ABORT 128 #define SMBMSG$M_JOB_TRAILER 256&#define SMBMSG$M_JOB_TRAILER_ABORT 512'#define SMBMSG$M_FIRST_FILE_OF_JOB 1024&#define SMBMSG$M_LAST_FILE_OF_JOB 2048%#define SMBMSG$S_SEPARATION_CONTROL 4##define SMBMSG$L_SEPARATION_FLAGS 0#define SMBMSG$V_FILE_BURST 0#define SMBMSG$V_FILE_FLAG 1#define SMBMSG$V_FILE_TRAILER 2%#define SMBMSG$V_FILE_TRAILER_ABORT 3#define SMBMSG$V_JOB_FLAG 4#define SMBMSG$V_JOB_BURST 5#define SMBMSG$V_JOB_RESET 6"#define SMBMSG$V_JOB_RESET_ABORT 7#define SMBMSG$V_JOB_TRAILER 8$#define SMBMSG$V_JOB_TRAILER_ABORT 9%#define SMBMSG$V_FIRST_FILE_OF_JOB 10$#define SMBMSG$V_LAST_FILE_OF_JOB 11*[VAX90A.UTEXAS.LASER]SYST.COM;6+,U./ 4B-C0123KPWO5 6J/Mp7I֓8I9Q9GHJ$!A$! LASER configuration and startup file. Change T??? to whatever($! port you connect your LaserWriter to.$!A$ define/system/exec/trans=(concealed,terminal) alw T???: ! laser9$ set term /perm /speed=9600 /nomodem /notype /nohang alwB$ set term /perm /hostsync /pasthru /ttsync /eightbit /nobroad alw!$ set term /perm /noauto /dma alw$ set prot=o:rwlp /dev alw.$ set device /spooled=(ALW,sys$sysdevice:) alw$!$$ define /form POST 2 /stock=default0$ define /form ZETA 3 /stock=default /setup=zeta9$ define /form LETTER 4 /stock=default /setup=headers_str<$ define /form LANDSCAPE 6 /stock=default /setup=headers_str:$ define /form HEADERS 7 /stock=default /setup=headers_str<$ define /form BITIMAGE 9 /stock=default /setup=bitimage_hex7$ define /form PAINT 10 /stock=default /setup=paint_hex7$ define /form 2UP 11 /stock=default /setup=headers_str$!/$ define/system LASER$LOG sys$sysdevice:[laser]$!3$ delete /before="today-1-00:00:00" LASER$LOG:*.*.*$!@$! Note that /default=form=headers is VMS v4.4 and later only.$!$ initialize/queue/start -: /default=(noburst,nofeed,noflag,notrailer,form=headers) -& /separate=(noburst,noflag,trailer) - , /library=laser /base_prio=8 /form=headers - /processor=laser /on=alw: alw!*[VAX90A.UTEXAS.LASER]TRAILER.PS;1+,V./ 4E-C0123KPWO5 6B K7p֓8~o0P9GHJ@~UTEXAS_LASER.SAVVC![VAX90A.UTEXAS.LASER]TRAILER.PS;1EY %!PS-Adobe-1.0/inch {72 mul} def /setuppage { initgraphics 0 11 inch translate -90 rotate /x 1 inch def /y 7 inch def= .5 inch .5 inch moveto 10 inch 0 rlineto 0 7.5 inch rlineto% -10 inch 0 rlineto closepath stroke} def /h-user {. /Helvetica findfont .4 inch scalefont setfont x y moveto (User: ) show show /y y .75 inch sub def} def/h-job {. /Helvetica findfont .4 inch scalefont setfont x y movetoB statusdict /printername known { % if we know about printer namesD 50 string statusdict /printername get exec /p-printername exch def7 statusdict /product known { % if we know our product3 statusdict /product get exec /p-product exch def p-product showA p-printername p-product ne { % if not same name as by default (: ) show p-printername show } if } { p-printername show } ifelse } { (LASER) show } ifelse /y y .75 inch sub def x y moveto (Job: ) show show /y y .75 inch sub def} def /h-file {. /Helvetica findfont .4 inch scalefont setfont x y moveto (File: ) show= dup stringwidth pop 8 inch exch div % get space/length9 dup 1 lt { .4 inch mul % if less space than length@ /Helvetica findfont exch scalefont setfont } % resize the font( { pop } ifelse % else leave font alone show /y y .75 inch sub def} def /h-time {. /Helvetica findfont .4 inch scalefont setfont x y moveto (Date: ) show show /y y .75 inch sub def} def /h-error {. /Helvetica findfont .4 inch scalefont setfont x y moveto (Error: ) show7 dup stringwidth pop 8 inch exch div % get space/length3 dup 1 lt { .4 inch mul % if less space than length@ /Helvetica findfont exch scalefont setfont } % resize the font( { pop } ifelse % else leave font alone show /y y .75 inch sub def} def /h-pages {. /Helvetica findfont .4 inch scalefont setfont x y moveto (Pages: ) showE cvi statusdict /pagecount get exec exch sub 1 add 10 string cvs show /y y .75 inch sub def} def /h-logline {) /Helvetica findfont 12 scalefont setfont x y moveto show /y y 12 sub def} def*[VAX90A.UTEXAS.LASER]ZETA.PS;1+,W.E/ 4oEE-C0123KPWOF5 6YB K7֓8S2P9GHJp%!.%%% PostScript program to plot Zeta plot files%% R. Watson 31-Jan-85%<% inputs: /param1 or /#copies - number of copies (default 1)3% /param2 or /scalefact - scale factor (default 1)3% /param3 or /zFont - use Zeta font (default true)=% /param4 or /penscale - scaling to apply to pen (default 1)8% /param5 or /usepens - use pen color if nz (default 0)%% Not supported yet:%% 1. Shaded characters% 2. Aspect characters%(% 09/13/85 add pre-processed definitions% zFont defaults to true% scalefact defaults to 1<% 05/30/86 Ignore level one "6" commands (whatever they are)2% 06/20/86 J.Knox Fix problems with circle command*% 02/15/87 R.Watson add default parametersB% 02/20/87 R.Watson add default table, remove debug print, remove % input timeout avoidance.>% 03/06/87 M. Kaczmarczik/J. Taylor add scaling factor for pen6% 04/01/87 R. Watson Opcode 6 is alternate pen select.9% Added parameter usepens to select pen color/shading. "% Default changed to no shading.%-/lTime usertime def % save load start time%% initialization.%/init{:%%% dbg 1 string dup 0 7 put writestring flush % ring bell newpath* /aspect 256 def % preset default aspect0 0 0 moveto % preset starting location on page! /pen false def % preset pen up' /sTime usertime def % save start time} def% read a zeta byte /getz {  {% inp read not {eofError} if % if EOF; dup 32 gt {exit} {pop} ifelse % exit loop if not <= space } loop( dup /zn exch def % define zeta number/ zb 0 3 -1 roll put % put char code in string} def%% check for 9 more Z's% /checkZeta {+ 9 { getz zb (Z) ne {notZerror} if } repeat} def%% main program%/main{ { gsave init waitBytes % wait for a job/ not {grestore exit} if % if waitBytes false checkZeta levelOne grestore } loop} def3%% waitBytes - waits until there is a "Z" on stdin.%&% return true if Z found, false if EOF /waitBytes{ {E%%% % uncomment these lines to wait forever for plots with no timeout%%% inp bytesavailable 0 ne {+ inp read not { false exit } if % if EOF# 16#5A eq {true exit} if % if Z %%% } if } loop} def&% levelOne - process level 1 commands /levelOne{ { getz %get a byte zb (Z) eq { % Z stroke8%%% debug usertime sTime sub 1000 div 10 20 string cvrs1%%% debug dbg exch writestring dbg ( seconds\n)%%% debug writestring flush,%%% debug lTime 1000 div 10 20 string cvrs 3%%% debug dbg exch writestring dbg ( load time\n)%%% debug writestring flush showpage exit } if {  zb (0) eq { % 0 - nop exit } if zb (1) eq { % 1 - pen up /pen false def exit } if zb (2) eq { % 2 - pen down /pen true def exit } if' zb (3) eq { % 3 - character vector cVector exit } if' zb (4) eq { % 4 - center char vect ccVector exit } if% zb (5) eq { % 5 - numeric vector nVector exit } if! zb (6) eq { % 6 - pen select 1 crb % get pen' usepens 0 ne{ % if shading enabled pencolor exch get setgray } { pop } ifelse exit } if zb (7) eq { % 7 - level 2 levelTwo exit } if vector exit } loop } loop %do this one forever } def% level two commands /levelTwo{ getz % get level 2 type { zb (1) eq { % 1 - pen 1 /pen false def emit pencolor 0 get setgray exit } if zb (2) eq { % 2 - pen 2 /pen false def emit pencolor 1 get setgray exit } if zb (3) eq { % 3 - pen 3 /pen false def emit pencolor 2 get setgray exit } if zb (4) eq { % 4 - pen 4 /pen false def emit pencolor 3 get setgray exit } if# zb (7) eq { % 7 - enter level 3 levelThree exit } if zb (B) eq { % B - enter dash emit& dashes 0. setdash % enter dash mode exit } if zb (C) eq { % C - exit dash emit [] 0. setdash exit } if! zb (D) eq { % D - define dash emit % close current path$ getz getxy % get dash definition- /d1 ix def /d2 iy def % save first 2 parts getz getxy0 /dashes [d1 d2 ix d2] def % define dash array& dashes 0. setdash % enter dash mode exit } if" zb (E) eq { % E - define slant getz getxy % eat slant exit } if# zb (F) eq { % F - define aspect getz getxy % eat aspect /aspect ix def exit } if zb (G) eq { % G - circle/arc doCircle exit } if" zb (H) eq { % H - terminal msg termMsg exit } if zb (I) eq { % I - shade getz getxy exit } if% process rest of level 2 exit } loop} def% process line vector/vector{ getxy % get crb x y? pen {ix iy rlineto} {ix iy rmoveto emit} ifelse %do the vector} def% process character vector/cVector{ getz % get vector control getxy % decode vector 2 crb % get length) dup string /cstr exch def % build string /cind 0 def % preset index { 2 crb ) dup 0 lt {pop 0} if % DEBUG if negative* dup 127 gt {pop 0} if % DEBUG if too big. zFont {sym exch get} % map zeta to zeta code3 {zta exch get} ifelse % get ascii char code+ cstr cind 3 -1 roll put % put into string+ cind 1 add /cind exch def % advance index } repeat % length times- /sn cstr length def % get string char count6 ix dup mul iy dup mul add sqrt /iz exch def % calc iz iz sn dofont % scale font( cstr stringwidth % get string lengths /sy exch def /sx exch def) iy ix atan rotate % rotate co-ordinatesC iz sx sub sn div 0 cstr ashow % do string rel to new co-ord (dy=0) emit% iy ix atan neg rotate % rotate back /pen false def % pick up pen} def$% process centered character vector /ccVector{ getz % get vector control getxy % decode vector+ /cstr 1 string def % define 1 char string 1 crb abs. zFont {sym exch get} % map zeta to zeta code3 {zta exch get} ifelse % get ascii char code5 cstr 0 3 -1 roll put % insert character into string- /sn cstr length def % get string char count6 ix dup mul iy dup mul add sqrt /iz exch def % calc iz iz sn dofont % scale font( cstr stringwidth % get string lengths /sy exch def /sx exch def$ currentpoint % save current point) iy ix atan rotate % rotate co-ordinatesA cw -6 mul 22 div ch -6 mul 22 div rmoveto % backup 1/2 char size1 cstr show % do string rel to new co-ord (dy=0) emit% iy ix atan neg rotate % rotate back" moveto % restore current point /pen false def % pick up pen} def3% dofont -- set up font/dofont{2 /nc exch def % define number of chars in string* /zc exch def % define length of string & zFont {/ZetaFont findfont} % get font# {/Helvetica findfont} ifelse) /cw zc nc div def % get character width; cw 256. mul aspect div /ch exch def % get character height& [cw 0 0 ch 0 0] makefont % scale font setfont % set font} def% process numeric vector/nVector{ getz % get vector control getxy % decode vector 1 crb % get length) dup string /cstr exch def % build string /cind 0 def % preset index {8 zFont {1 crb ztf exch get} % convert to zeta font code9 {1 crb ztn exch get} ifelse % get ascii char code+ cstr cind 3 -1 roll put % put into string+ cind 1 add /cind exch def % advance index } repeat % length times- /sn cstr length def % get string char count6 ix dup mul iy dup mul add sqrt /iz exch def % calc iz iz sn dofont % scale font( cstr stringwidth % get string lengths /sy exch def /sx exch def) iy ix atan rotate % rotate co-ordinatesC iz sx sub sn div 0 cstr ashow % do string rel to new co-ord (dy=0) emit% iy ix atan neg rotate % rotate back /pen false def % pick up pent} defl % doCircle /doCircleJ{8! getz % get circle/arc controle {" zb (0) eq zb (I) eq or {% if arc! zb (0) eq % save arc directiond getz % get vector controlt getxy % get vector 1 /x1 ix defa /y1 iy def  getz % get vector 2  getxy /x2 ix defo /y2 iy defe3 currentpoint /y exch def /x exch def %get cur pt:2% x1 y1 rmoveto % start arc at end of 1st vector. x1 dup mul % r = sqrt((x1-x)**2+(y1-y)**2) y1 dup mult add sqrt /r exch defd* y1 x1 atan /theta1 exch def %get angles y2 x2 atan /theta2 exch def% x x1 sub y y1 sub r theta1 theta2 c; 6 -1 roll { arc } { arcn } ifelse % use saved arc state2: x x1 sub x2 add y y1 sub y2 add moveto % return to base exitu } if % else we have a circlea getxy % get vector3 currentpoint /y exch def /x exch def % get cur pt 0 ix iy rmoveto % start circle at end of vector% ix dup mul % r = sqrt(ix**2+iy**2) iy dup mul add sqrt /r exch def! x y r 0. 360. arc % draw circles x y moveto % return to base exit } loop} def 3% crb - get crb numbera/crb{t /sum 0 defp*% repeat sum = (sum shift 5) + zn5 dup { sum 5 bitshift getzv add /sum exch def} repeatn1% check for negative - if so then or in -1's maskE 5 mul 1 sub -1 exch bitshift dup sum and 0 ne {sum or /sum exch def}r {pop} ifelse sum % return sum} defs;% getzv - convert NEXT zb to zeta binary numbere/getzv{b getz 7 zn 16#41 lt {zn 16#30 sub} {zn 16#41 sub 8 add} ifelse} defc#% getxy - ix,iy set to crb valueg/getxy{ 3 zn 16#41 sub 1 add dup /ny exch def %ny = zn-'A'+1m) 5 div cvi dup /nx exch def %nx = ny / 5a3 5 mul ny exch sub cvi /ny exch def %ny = ny - 5*nxf% get x and y displacementc$ nx crb /ix exch def %ix = crb(nx)$ ny crb /iy exch def %iy = crb(ny)} defe% emit - draw the current path/emitZ{u$ currentpoint % save where we are stroke % draw current pathi& moveto % position to where we are} def &% debugi - write debug integer/debugii{%B 16 10 string cvrs dbg exch writestring dbg (\n) writestring flush} def)% debugs - write debug string/debugs{/ dbg exch writestring dbg ( ) writestring flush%} defs% executable initialization5(%stdin) (r) file /inp exch def % define input filee5(%stdout) (w) file /dbg exch def % define debug file&/zb 1 string def % zeta byte string@/pencolor [0. .35 .50 .70 0. .35 .50 .7] def % pen color shading/16#3f 16#3f 16#3f 16#2b 16#3f 16#3f 16#3f 16#3f /16#5a 16#3f 16#3f 16#2a 16#3f 16#3f 16#3f 16#3f/16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f /16#20 16#41 16#42 16#43 16#44 16#45 16#46 16#47c/16#48 16#49 16#3f 16#2e 16#3c 16#28 16#2b 16#7cz/16#26 16#4a 16#4b 16#4c 16#4d 16#4e 16#4f 16#50 /16#51 16#52 16#21 16#24 16#2a 16#29 16#3b 16#3f /16#2d 16#2f 16#53 16#54 16#55 16#56 16#57 16#58/16#59 16#5a 16#3f 16#2c 16#25 16#5f 16#3e 16#3f{/16#30 16#31 16#32 16#33 16#34 16#35 16#36 16#37/16#38 16#39 16#3a 16#23 16#40 16#27 16#3d 16#22 /16#61 16#62 16#63 16#64 16#65 16#66 16#67 16#68a/16#69 16#6a 16#6b 16#6c 16#1d 16#6e 16#6f 16#70t/17#71 16#72 16#73 16#74 16#75 16#76 16#77 16#78 /16#79 16#7a 16#3f 16#3f 16#1f 16#3f 16#3f 16#3f016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 016#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f N16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 256 array astore /zta exch def/16#30 16#31 16#32 16#33 16#34 16#35 16#36 16#37e516#38 16#39 16#2d 16#2e 12 array astore /ztn exch defsL/ztf [44 45 46 47 48 49 50 51 52 53 55 64] def % zeta numeric vector to font'[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15e=16 17 73 114 120 17 113 84 110 16 109 87 117 125 118 119 127 t4126 91 92 93 94 95 96 97 98 99 100 101 102 16 16 88 883 115 116 89 66 67 79 103 85 105 106 121 82 122 123 62 118 19 20 21 22 23 24 25 26 108 64 75 58 54 86 72 127 28 29 30 31 32 33 34 35 71 60 56 59 80 111 55 157 36 37 38 39 40 41 42 43 107 63 74 16 76 78 44 145 46 47 48 49 50 51 52 53 68 70 77 69 61 65 128 g@129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 ?145 146 147 148 149 150 151 152 153 154 90 104 155 156 157 158 ?159 81 124 160 161 162 163 164 165 166 167 112 168 169 170 171 t@172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 @188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 7204 205 206 207 208 209 210 211 212 213 ] /sym exch deft/ZetaFontDict 8 dict def/$workingdict 100 dict defZetaFontDict begin /FontType 3 def( /FontMatrix [.04545 0 0 .04545 0 0] def /FontBBox [0 0 22 22] def /Encoding 256 array defE 3 string 0 1 255 {dup 10 3 index cvrs cvn Encoding 3 1 roll put} for popr /CharArrays 214 dict dup beginnD/0 [ 16#10606 16#2060C 16#20C0C 16#20C00 16#20000 16#2000C 16#2060C  16#20606 ] defeD/1 [ 16#10606 16#2060C 16#2030C 16#20009 16#20003 16#20300 16#20900 7 16#20C03 16#20C09 16#2090C 16#2060C 16#20606 ] def 7/2 [ 16#1060C 16#20002 16#20C02 16#2060C 16#20606 ] defhD/3 [ 16#10006 16#20606 16#2060C 16#20606 16#20C06 16#20606 16#20600  16#20606 ] defg@/4 [ 16#1000C 16#20C00 16#20606 16#20C0C 16#20000 16#20606 ] defI/5 [ 16#10606 16#2060C 16#20006 16#20600 16#20C06 16#2060C 16#20606 ] def I/6 [ 16#10600 16#2060C 16#20006 16#20C06 16#2060C 16#20606 16#20606 ] def 7/7 [ 16#10C00 16#2000C 16#20C0C 16#20000 16#20606 ] defsI/8 [ 16#1000C 16#20C0C 16#20000 16#20C00 16#10906 16#20306 16#20606 ] def{@/9 [ 16#10600 16#20606 16#2000C 16#20606 16#20C0C 16#20606 ] defE/10 [ 16#10909 16#20903 16#20C00 16#20903 16#20303 16#20000 16#20303 gA 16#20309 16#2000C 16#20309 16#20909 16#20C0C 16#20606 ] defzE/11 [ 16#10006 16#20C06 16#20606 16#2060C 16#20600 16#20606 16#2000C s8 16#20C00 16#20606 16#20C0C 16#20000 16#20606 ] defA/12 [ 16#10606 16#2000C 16#20C0C 16#20000 16#20C00 16#20606 ] def &/13 [ 16#10600 16#2060C 16#20606 ] defE/14 [ 16#1060C 16#20003 16#20C03 16#2060C 16#20609 16#20009 16#20600 & 16#20C09 16#20609 16#20606 ] def&/15 [ 16#1070A 16#20F0A 16#11500 ] def&/16 [ 16#10400 16#20408 16#11500 ] def/17 [ 16#11500 ] defE/18 [ 16#10000 16#20010 16#20415 16#20B15 16#20F10 16#20F00 16#10008 e 16#20F08 16#11500 ] defE/19 [ 16#10000 16#20015 16#20B15 16#20F12 16#20F0E 16#20B0B 16#2000B A 16#10B0B 16#20F08 16#20F03 16#20B00 16#20000 16#11500 ] deffE/20 [ 16#10F03 16#20B00 16#20400 16#20003 16#20012 16#20415 16#20B15 a 16#20F12 16#11500 ] def]J/21 [ 16#20015 16#20C15 16#20F12 16#20F03 16#20C00 16#20000 16#11500 ] defE/22 [ 16#10F15 16#20015 16#2000B 16#20A0B 16#2000B 16#20000 16#20F00  16#11500 ] defJ/23 [ 16#10F15 16#20015 16#2000B 16#20B0B 16#2000B 16#20000 16#11500 ] defE/24 [ 16#10F0F 16#20F12 16#20C15 16#20315 16#20012 16#20003 16#20300 nA 16#20C00 16#20F03 16#20F09 16#20C09 16#21109 16#11500 ] defA/25 [ 16#20015 16#2000B 16#20F0B 16#20F15 16#20F00 16#11500 ] defcE/26 [ 16#10400 16#20700 16#20715 16#20415 16#20A15 16#20715 16#20700 d 16#20A00 16#11500 ] defiJ/27 [ 16#10006 16#20003 16#20300 16#20C00 16#20F03 16#20F15 16#11500 ] defA/28 [ 16#20015 16#20008 16#20F15 16#2070E 16#20F00 16#11500 ] def //29 [ 16#10015 16#20000 16#20F00 16#11500 ] defe8/30 [ 16#20015 16#2070B 16#20E15 16#20E00 16#11500 ] def//31 [ 16#20015 16#20F00 16#20F15 16#11500 ] def E/32 [ 16#10300 16#20003 16#20012 16#20315 16#20C15 16#20F12 16#20C0F 8 16#20F12 16#20F03 16#20C00 16#20300 16#11500 ] defJ/33 [ 16#20015 16#20C15 16#20F12 16#20F0E 16#20C0B 16#2000B 16#11500 ] defE/34 [ 16#10808 16#20E02 16#20C00 16#20300 16#20003 16#20012 16#20315 A 16#20C15 16#20F12 16#20F03 16#20E02 16#20F00 16#11500 ] def E/35 [ 16#20015 16#20C15 16#20F12 16#20F0E 16#20C0B 16#2000B 16#2080B  16#20F00 16#11500 ] defdE/36 [ 16#10006 16#20003 16#20300 16#20C00 16#20F03 16#20F08 16#20C0B uJ 16#2030B 16#2000E 16#20012 16#20315 16#20C15 16#20F12 16#11500 ] def8/37 [ 16#10700 16#20715 16#20015 16#20E15 16#11500 ] defJ/38 [ 16#10015 16#20003 16#20300 16#20C00 16#20F03 16#20F15 16#11500 ] def//39 [ 16#10015 16#20700 16#20E15 16#11500 ] def6A/40 [ 16#10015 16#20000 16#2070A 16#20E00 16#20E15 16#11500 ] def0//41 [ 16#20F15 16#10015 16#20F00 16#11500 ] def0J/42 [ 16#10700 16#2070B 16#20015 16#2070B 16#20E15 16#2070B 16#11500 ] defE/43 [ 16#10015 16#20F15 16#2070A 16#2040A 16#20A0A 16#2070A 16#20000 d 16#20F00 16#11500 ] defaE/44 [ 16#10F03 16#20B00 16#20400 16#20003 16#20012 16#20415 16#20B15 & 16#20F12 16#20F03 16#11500 ] defJ/45 [ 16#10800 16#20815 16#20512 16#10500 16#20B00 16#20800 16#11500 ] defE/46 [ 16#10F00 16#20000 16#20003 16#20F10 16#20F12 16#20C15 16#20315 a& 16#20012 16#20010 16#11500 ] defE/47 [ 16#10012 16#20315 16#20C15 16#20F12 16#20F0E 16#20C0B 16#2030B sJ 16#20C0B 16#20F08 16#20F03 16#20C00 16#20300 16#20003 16#11500 ] def8/48 [ 16#10C00 16#20C15 16#20006 16#20F06 16#11500 ] defE/49 [ 16#10005 16#20003 16#20300 16#20C00 16#20F03 16#20F08 16#20C0B / 16#2000B 16#20015 16#20F15 16#11500 ] defeE/50 [ 16#10008 16#2030B 16#20C0B 16#20F08 16#20F03 16#20C00 16#20300 A 16#20003 16#20012 16#20315 16#20C15 16#20F12 16#11500 ] defcA/51 [ 16#10012 16#20015 16#20F15 16#20F12 16#20700 16#11500 ] defbE/52 [ 16#10C00 16#20300 16#20003 16#20008 16#2030B 16#20C0B 16#20F0E mE 16#20F12 16#20C15 16#20315 16#20012 16#2000E 16#2030B 16#20C0B z/ 16#20F08 16#20F03 16#20C00 16#11500 ] def4E/53 [ 16#10003 16#20300 16#20C00 16#20F03 16#20F12 16#20C15 16#20315 A 16#20012 16#2000D 16#2030A 16#20C0A 16#20F0D 16#11500 ] defnA/54 [ 16#10700 16#2070E 16#20707 16#20007 16#20E07 16#11500 ] def &/55 [ 16#10007 16#20E07 16#11500 ] defE/56 [ 16#20E0E 16#20707 16#2070E 16#20700 16#20707 16#2000E 16#20E00 / 16#20707 16#20007 16#20E07 16#11500 ] defn/57 [ 16#20F15 16#11500 ] defh8/58 [ 16#10800 16#20504 16#20511 16#20815 16#11500 ] def8/59 [ 16#10700 16#20A04 16#20A11 16#20715 16#11500 ] defE/60 [ 16#10005 16#20302 16#20C02 16#20F05 16#20F09 16#20C0C 16#2030C tJ 16#2000F 16#20313 16#20C13 16#20F0F 16#10815 16#20800 16#11500 ] def8/61 [ 16#10003 16#20F03 16#10F0A 16#2000A 16#11500 ] def/62 [ 16#11500 ] defJ/63 [ 16#10700 16#20903 16#20905 16#20705 16#20703 16#20903 16#11500 ] defA/64 [ 16#10700 16#20702 16#20902 16#20900 16#20700 16#11500 ] defiE/65 [ 16#10310 16#20015 16#20315 16#20310 16#10910 16#20615 16#20915  16#20910 16#11500 ] defi8/66 [ 16#10B00 16#20400 16#20415 16#20B15 16#11500 ] def8/67 [ 16#10400 16#20B00 16#20B15 16#20415 16#11500 ] defE/68 [ 16#10703 16#20705 16#20905 16#20903 16#20703 16#1070A 16#2070C 6/ 16#2090C 16#2090A 16#2070A 16#11500 ] def68/69 [ 16#10910 16#20615 16#20915 16#20910 16#11500 ] defE/70 [ 16#10300 16#2030F 16#2030C 16#2000C 16#20F0C 16#20C0C 16#20C0F 68 16#20C00 16#20C03 16#20F03 16#20003 16#11500 ] defJ/71 [ 16#10803 16#20600 16#20A00 16#20803 16#10806 16#20815 16#11500 ] defE/72 [ 16#10F06 16#20703 16#20403 16#20006 16#20009 16#20A12 16#20615 & 16#20312 16#20F00 16#11500 ] def&/73 [ 16#2070F 16#20E00 16#11500 ] defE/74 [ 16#10012 16#20014 16#20214 16#20212 16#20012 16#10F15 16#20000 6A 16#10D00 16#20D02 16#20F02 16#20F00 16#20D00 16#11500 ] def6//75 [ 16#10F0E 16#20007 16#20F00 16#11500 ] def6&/76 [ 16#20F07 16#2000E 16#11500 ] defE/77 [ 16#10F0C 16#20C0F 16#2080F 16#2050C 16#20508 16#20805 16#20C05 6e 16#20F08 16#20F12 16#20C15 16#20315 16#20012 16#20003 16#20300 16#20C00 16#20F03 16#11500 ] def E/78 [ 16#1000F 16#20012 16#20315 16#20C15 16#20F12 16#20F0E 16#20C0B 6J 16#2070B 16#20706 16#10703 16#20900 16#20500 16#20703 16#11500 ] def&/79 [ 16#10015 16#20F00 16#11500 ] defE/80 [ 16#10700 16#20903 16#20905 16#20705 16#20703 16#20903 16#1090A 38 16#2090C 16#2070C 16#2070A 16#2090A 16#11500 ] def8/81 [ 16#1000F 16#20600 16#20C0F 16#2000F 16#11500 ] def//82 [ 16#20F0F 16#1000F 16#20F00 16#11500 ] def E/83 [ 16#1070D 16#2070F 16#2090F 16#2090D 16#2070D 16#1000A 16#20F0A 3A 16#10905 16#20705 16#20707 16#20907 16#20905 16#11500 ] def6E/84 [ 16#10002 16#20E02 16#10E0B 16#2000B 16#2070B 16#20712 16#20704 h 16#11500 ] defA/85 [ 16#10003 16#20406 16#20800 16#20815 16#20F15 16#11500 ] defy&/86 [ 16#10600 16#20612 16#11500 ] defE/87 [ 16#10003 16#20200 16#20500 16#20703 16#20712 16#20915 16#20C15  16#20E12 16#11500 ] def1A/88 [ 16#10F15 16#20015 16#2070B 16#20000 16#20F00 16#11500 ] def//89 [ 16#2050C 16#20A00 16#20000 16#11500 ] def8E/90 [ 16#10300 16#20603 16#2060C 16#2090F 16#20C0F 16#20F0C 16#20F09 2/ 16#20C06 16#20906 16#20609 16#11500 ] def9E/91 [ 16#2030F 16#20306 16#20603 16#20903 16#20C06 16#20C0F 16#20C06 1 16#20F03 16#11500 ] def7J/92 [ 16#10400 16#2040F 16#2000F 16#20F0F 16#20C0F 16#20C00 16#11500 ] defE/93 [ 16#10700 16#20702 16#20302 16#20005 16#2000A 16#2030D 16#20B0D 5A 16#20E0A 16#20E05 16#20B02 16#20702 16#2070F 16#11500 ] def1E/94 [ 16#10007 16#20207 16#2020B 16#2050E 16#20A0E 16#20D0B 16#20D03 8A 16#20A00 16#20500 16#20203 16#20207 16#20F07 16#11500 ] def E/95 [ 16#10011 16#20311 16#20307 16#20704 16#20B07 16#20B11 16#20E11 e& 16#10715 16#20700 16#11500 ] defJ/96 [ 16#10303 16#20F0C 16#1030C 16#2060C 16#20C03 16#20F03 16#11500 ] defE/97 [ 16#1030C 16#20303 16#20600 16#20903 16#2090C 16#10903 16#20C00 y& 16#20F03 16#20F0C 16#11500 ] defJ/98 [ 16#1000F 16#2030D 16#20707 16#20000 16#20707 16#20F03 16#11500 ] defE/99 [ 16#10F0F 16#20C0F 16#2090C 16#2070F 16#2020F 16#2000C 16#20007 0S 16#20204 16#20704 16#20907 16#2090C 16#20907 16#20C04 16#20F04 16#11500 ] def1F/100 [ 16#10C0F 16#2070F 16#2040C 16#20709 16#20C09 16#20F07 16#20F02 B 16#20C00 16#20700 16#20402 16#20407 16#20709 16#11500 ] defF/101 [ 16#10309 16#20F09 16#10F0F 16#2090F 16#2060C 16#20606 16#20903  16#20F03 16#11500 ] defF/102 [ 16#10309 16#2060F 16#2090C 16#20606 16#1090C 16#20C0F 16#20F0C  16#20C00 16#11500 ] defF/103 [ 16#10700 16#20712 16#20315 16#20012 16#20315 16#20712 16#20B15 0 16#20E12 16#20B15 16#20712 16#11500 ] defF/104 [ 16#10906 16#20C06 16#20F09 16#20F0C 16#20C0F 16#2090F 16#2060C ' 16#20609 16#20906 16#11500 ] def K/105 [ 16#10615 16#20600 16#10312 16#20912 16#10306 16#20906 16#11500 ] def6F/106 [ 16#10615 16#20600 16#10312 16#20912 16#1030C 16#2090C 16#10306  16#20906 16#11500 ] defF/107 [ 16#10303 16#20603 16#20906 16#20C03 16#20F03 16#21206 16#21209 F 16#20F0C 16#20C0C 16#20909 16#2060C 16#2030C 16#20009 16#20006 0 16#20303 16#10909 16#20906 16#11500 ] defF/108 [ 16#10612 16#20600 16#10C0C 16#2090F 16#2030F 16#2000C 16#20006 0 16#20303 16#20903 16#20C06 16#11500 ] def'/109 [ 16#10015 16#21215 16#11500 ] deff'/110 [ 16#10009 16#20F09 16#11500 ] def0/111 [ 16#10009 16#20C09 16#20C03 16#11500 ] defB/112 [ 16#10309 16#20900 16#20F09 16#20912 16#20309 16#11500 ] defK/113 [ 16#10303 16#2090F 16#1000C 16#20C0C 16#10006 16#20C06 16#11500 ] defBK/114 [ 16#10003 16#20F03 16#10F08 16#20008 16#1000D 16#20F0D 16#11500 ] def#B/115 [ 16#10001 16#20F01 16#10F05 16#2000A 16#20F0F 16#11500 ] defB/116 [ 16#1000F 16#20F0A 16#20005 16#10001 16#20F01 16#11500 ] defK/117 [ 16#10003 16#20B03 16#20E07 16#20E0B 16#20B0F 16#2000F 16#11500 ] def2K/118 [ 16#10006 16#20209 16#20509 16#20A03 16#20D03 16#20F06 16#11500 ] def6F/119 [ 16#10006 16#20209 16#20509 16#20A03 16#20D03 16#20F06 16#1000A B 16#2020D 16#2050D 16#20A07 16#20D07 16#20F0A 16#11500 ] defB/120 [ 16#10008 16#20F08 16#20B0C 16#20B04 16#20F08 16#11500 ] defB/121 [ 16#10008 16#2040C 16#20404 16#20008 16#20F08 16#11500 ] defB/122 [ 16#10800 16#20815 16#20411 16#20C11 16#20815 16#11500 ] defB/123 [ 16#10800 16#20404 16#20C04 16#20800 16#20815 16#11500 ] def/124 [ 16#11500 ] def10/125 [ 16#1000F 16#20700 16#20E0F 16#11500 ] defF/126 [ 16#10F00 16#20C00 16#20903 16#20907 16#2060A 16#2090D 16#20912 ' 16#20C15 16#20F15 16#11500 ] def F/127 [ 16#20300 16#20603 16#20607 16#2090A 16#2060D 16#20612 16#20315  16#20015 16#11500 ] defF/128 [ 16#10309 16#20609 16#20906 16#20903 16#20600 16#20000 16#20003 0 16#20306 16#20906 16#20900 16#11500 ] defF/129 [ 16#10015 16#20003 16#20300 16#20600 16#20903 16#20906 16#20609 0 16#20309 16#20006 16#20000 16#11500 ] defF/130 [ 16#10906 16#20609 16#20309 16#20006 16#20003 16#20300 16#20600  16#20903 16#11500 ] defF/131 [ 16#10915 16#20903 16#20600 16#20300 16#20003 16#20006 16#20309 0 16#20609 16#20906 16#20900 16#11500 ] defF/132 [ 16#10006 16#20906 16#20609 16#20309 16#20006 16#20003 16#20300 ' 16#20600 16#20903 16#11500 ] def1K/133 [ 16#10009 16#20609 16#10300 16#2030F 16#20612 16#2090F 16#11500 ] def0F/134 [ 16#10303 16#20003 16#20300 16#20900 16#2090C 16#2060F 16#2030F 0 16#2000C 16#20306 16#20906 16#11500 ] defF/135 [ 16#10015 16#20000 16#20006 16#20309 16#20609 16#20906 16#20900  16#11500 ] def09/136 [ 16#1060F 16#2060C 16#10609 16#20600 16#11500 ] defK/137 [ 16#10612 16#2060F 16#1060C 16#20603 16#20300 16#20003 16#11500 ] def4F/138 [ 16#10015 16#20006 16#20306 16#20609 16#10000 16#20006 16#20306  16#20600 16#11500 ] def'/139 [ 16#10615 16#20600 16#11500 ] def#K/140 [ 16#10000 16#20009 16#20303 16#20603 16#20909 16#20900 16#11500 ] def2F/141 [ 16#10009 16#20000 16#20006 16#20309 16#20609 16#20906 16#20900  16#11500 ] def5F/142 [ 16#10006 16#20309 16#20609 16#20906 16#20903 16#20600 16#20300 ' 16#20003 16#20006 16#11500 ] def3F/143 [ 16#10000 16#20009 16#2030C 16#2060C 16#20909 16#20606 16#20306 ' 16#20009 16#2000C 16#11500 ] def#F/144 [ 16#10900 16#20909 16#2060C 16#2030C 16#20009 16#20306 16#20606 ' 16#20909 16#2090C 16#11500 ] def2K/145 [ 16#10009 16#20000 16#20006 16#20309 16#20609 16#20906 16#11500 ] def0K/146 [ 16#10303 16#20600 16#20903 16#20306 16#20609 16#20906 16#11500 ] def59/147 [ 16#10615 16#20600 16#10309 16#20909 16#11500 ] def7F/148 [ 16#10009 16#20003 16#20300 16#20600 16#20903 16#20909 16#20900  16#11500 ] def 9/149 [ 16#10009 16#20300 16#20600 16#20909 16#11500 ] def]K/150 [ 16#10009 16#20000 16#20306 16#20606 16#20900 16#20909 16#11500 ] def59/151 [ 16#10009 16#20900 16#10000 16#20909 16#11500 ] def F/152 [ 16#1000C 16#20009 16#20306 16#20606 16#20909 16#2090C 16#20903 0 16#20600 16#20300 16#20003 16#11500 ] def9/153 [ 16#10009 16#20909 16#20000 16#20900 16#11500 ] def2K/154 [ 16#1030F 16#2060F 16#2090C 16#20906 16#20C03 16#20F03 16#11500 ] def99/155 [ 16#10606 16#20615 16#10015 16#20C15 16#11500 ] def19/156 [ 16#10006 16#20309 16#20906 16#20C09 16#11500 ] def2F/157 [ 16#10012 16#20312 16#20315 16#20015 16#20012 16#10912 16#20C12 0 16#20C15 16#20915 16#20912 16#11500 ] def9/158 [ 16#10306 16#2030C 16#10309 16#20F09 16#11500 ] def69/159 [ 16#10309 16#20F09 16#10F06 16#20F0C 16#11500 ] defAF/160 [ 16#10303 16#20903 16#20C06 16#20C0C 16#2090F 16#2030F 16#2000C ' 16#20006 16#20303 16#11500 ] def09/161 [ 16#10000 16#20C00 16#10600 16#20615 16#11500 ] def60/162 [ 16#10015 16#20000 16#20900 16#11500 ] def0/163 [ 16#10000 16#20015 16#20915 16#11500 ] defK/164 [ 16#10F0F 16#2060F 16#2030C 16#20309 16#20606 16#20F06 16#11500 ] defK/165 [ 16#10600 16#2060C 16#2090F 16#20C0F 16#20F0C 16#20F00 16#11500 ] defdK/166 [ 16#1060F 16#20603 16#20900 16#20C00 16#20F03 16#20F0F 16#11500 ] def B/167 [ 16#10000 16#20F00 16#20F15 16#20015 16#20000 16#11500 ] def'/168 [ 16#10000 16#20C00 16#11500 ] def F/169 [ 16#10300 16#20C00 16#10312 16#20C12 16#10612 16#20600 16#10900  16#20912 16#11500 ] def'/170 [ 16#10015 16#20915 16#11500 ] def2'/171 [ 16#1030~UTEXAS_LASER.SAVWC[VAX90A.UTEXAS.LASER]ZETA.PS;1oE09C 16#2090C 16#11500 ] def1'/172 [ 16#1000F 16#20C03 16#11500 ] def6F/173 [ 16#10303 16#20903 16#20C06 16#20C0C 16#2090F 16#2030F 16#2000C K 16#20006 16#20303 16#10603 16#2060F 16#10009 16#20C09 16#11500 ] def1F/174 [ 16#10003 16#2060F 16#20C03 16#10006 16#20309 16#20906 16#20C09  16#11500 ] def9F/175 [ 16#1000F 16#20603 16#20C0F 16#10006 16#20309 16#20906 16#20C09  16#11500 ] defFF/176 [ 16#10600 16#20612 16#10003 16#20C03 16#20C03 16#2060F 16#20003  16#11500 ] def0K/177 [ 16#10600 16#20612 16#1000F 16#20C0F 16#20603 16#2000F 16#11500 ] def6K/178 [ 16#10000 16#20C00 16#10003 16#20C03 16#2060F 16#20003 16#11500 ] def#F/179 [ 16#1000F 16#20603 16#20C0F 16#2000F 16#10006 16#20309 16#20906  16#20C09 16#11500 ] defF/180 [ 16#10003 16#10003 16#20010 16#20415 16#20B15 16#20F10 16#20F03 B 16#10009 16#20F09 16#11503 16#10000 16#20F00 16#11500 ] defF/181 [ 16#10003 16#10003 16#20015 16#20B15 16#20F12 16#20F0F 16#20B0C F 16#2000C 16#10B0C 16#20F09 16#20F05 16#20B03 16#20003 16#11503 ' 16#10000 16#20F00 16#11500 ] def F/182 [ 16#10003 16#10F05 16#20B03 16#20403 16#20005 16#20012 16#20415 B 16#20B15 16#20F12 16#11503 16#10000 16#20F00 16#11500 ] defF/183 [ 16#10003 16#20015 16#20C15 16#20F12 16#20F05 16#20C03 16#20003 0 16#11503 16#10000 16#20F00 16#11500 ] defF/184 [ 16#10003 16#10F15 16#20015 16#2000C 16#20A0C 16#2000C 16#20003 9 16#20F03 16#11503 16#10000 16#20F00 16#11500 ] def F/185 [ 16#10003 16#10F15 16#20015 16#2000C 16#20B0C 16#2000C 16#20003 0 16#11503 16#10000 16#20F00 16#11500 ] defF/186 [ 16#10003 16#10F0F 16#20F12 16#20C15 16#20315 16#20012 16#20005 f 16#20303 16#20C03 16#20F05 16#20F0A 16#20C0A 16#2110A 16#11503 16#10000 16#20F00 16#11500 ] defF/187 [ 16#10003 16#20015 16#2000C 16#20F0C 16#20F15 16#20F03 16#11503 ' 16#10000 16#20F00 16#11500 ] def F/188 [ 16#10003 16#10403 16#20703 16#20715 16#20415 16#20A15 16#20715 B 16#20703 16#20A03 16#11503 16#10000 16#20F00 16#11500 ] defF/189 [ 16#10003 16#10008 16#20005 16#20303 16#20C03 16#20F05 16#20F15 0 16#11503 16#10000 16#20F00 16#11500 ] defF/190 [ 16#10003 16#20015 16#20009 16#20F15 16#2070F 16#20F03 16#11503 ' 16#10000 16#20F00 16#11500 ] def6F/191 [ 16#10003 16#10015 16#20003 16#20F03 16#11503 16#10000 16#20F00  16#11500 ] def#F/192 [ 16#10003 16#20015 16#2070C 16#20E15 16#20E03 16#11503 16#10000  16#20F00 16#11500 ] defF/193 [ 16#10003 16#20015 16#20F03 16#20F15 16#11503 16#10000 16#20F00  16#11500 ] def2F/194 [ 16#10003 16#10303 16#20005 16#20012 16#20315 16#20C15 16#20F12 ] 16#20C0F 16#20F12 16#20F05 16#20C03 16#20303 16#11503 16#10000 16#20F00 16#11500 ] def1F/195 [ 16#10003 16#20015 16#20C15 16#20F12 16#20F0F 16#20C0C 16#2000C 0 16#11503 16#10000 16#20F00 16#11500 ] defF/196 [ 16#10003 16#10809 16#20E04 16#20C03 16#20303 16#20005 16#20012 f 16#20315 16#20C15 16#20F12 16#20F05 16#20E04 16#20F03 16#11503 16#10000 16#20F00 16#11500 ] defF/197 [ 16#10003 16#20015 16#20C15 16#20F12 16#20F0F 16#20C0C 16#2000C B 16#2080C 16#20F03 16#11503 16#10000 16#20F00 16#11500 ] defF/198 [ 16#10003 16#10008 16#20005 16#20303 16#20C03 16#20F05 16#20F09 o 16#20C0C 16#2030C 16#2000F 16#20012 16#20315 16#20C15 16#20F12 16#11503 16#10000 16#20F00 16#11500 ] def0F/199 [ 16#10003 16#10703 16#20715 16#20015 16#20E15 16#11503 16#10000  16#20F00 16#11500 ] defF/200 [ 16#10003 16#10015 16#20005 16#20303 16#20C03 16#20F05 16#20F15 0 16#11503 16#10000 16#20F00 16#11500 ] defF/201 [ 16#10003 16#10015 16#20703 16#20E15 16#11503 16#10000 16#20F00  16#11500 ] def#F/202 [ 16#10003 16#10015 16#20003 16#2070B 16#20E03 16#20E15 16#11503 ' 16#10000 16#20F00 16#11500 ] def2F/203 [ 16#10003 16#20F15 16#10015 16#20F03 16#11503 16#10000 16#20F00  16#11500 ] defeF/204 [ 16#10003 16#10703 16#2070C 16#20015 16#2070C 16#20E15 16#2070C 0 16#11503 16#10000 16#20F00 16#11500 ] defF/205 [ 16#10003 16#10015 16#20F15 16#2070B 16#2040B 16#20A0B 16#2070B B 16#20003 16#20F03 16#11503 16#10000 16#20F00 16#11500 ] defF/206 [ 16#10000 16#20F00 16#20F15 16#20015 16#20000 16#10615 16#2060F ' 16#2090F 16#20915 16#11500 ] def#F/207 [ 16#10600 16#20609 16#2060C 16#2090F 16#20C0F 16#20F0C 16#20F09 B 16#20C06 16#20906 16#20609 16#10F09 16#20F00 16#11500 ] defF/208 [ 16#10000 16#20F00 16#20F15 16#20015 16#20000 16#10009 16#20F09 o 16#1090C 16#2090F 16#2060F 16#2060C 16#2090C 16#10903 16#20906 16#20606 16#20603 16#20903 16#11500 ] def]F/209 [ 16#10000 16#20C00 16#10600 16#20615 16#1030F 16#2090F 16#20C0C K 16#20C06 16#20903 16#20303 16#20006 16#2000C 16#2030F 16#11500 ] def0F/210 [ 16#10015 16#20C15 16#10615 16#20600 16#1030F 16#2090F 16#20C0C K 16#20C06 16#20903 16#20303 16#20006 16#2000C 16#2030F 16#11500 ] def09/211 [ 16#1030C 16#2090C 16#10000 16#20C15 16#11500 ] def[9/212 [ 16#1030C 16#2090C 16#10015 16#20C00 16#11500 ] def0F/213 [ 16#10303 16#20903 16#20C06 16#20C0C 16#2090F 16#2030F 16#2000C 9 16#20006 16#20303 16#1000F 16#20C03 16#11500 ] def2 end def /BuildChar1 { $workingdict begin /charcode exch def /fontdict exch def fontdict /CharArrays get fontdict /Encoding get) charcode get get % get the CharArray# gsave2 0 setgray newpath 44 0 % width vector 0 0 % lower left0% 22 22 setcachedevice % upper right 0 0 moveto { % process CharArray" dup -16 bitshift % extract move+ 1 index -8 bitshift 16#ff and %extract x3! 2 index 16#ff and % extract y3( 2 index 1 eq {moveto} {lineto} ifelse pop pop % compressed, move1 } forall stroke grestore end1 } defend9%/ZetaFont ZetaFontDict definefont pop0/table [8 [/#copies 1 (.nc .ncopies .param1)] % number of copies6 [/scalefact 1.0 (.sf .scale .param2)] % scale factor- [/zFont true (.zfont .param3)] % zeta font 3 [/penscale 1.0 (.penscale .param4)] % pen scaling02 [/usepens 0 (.usepens .param5)] % use pen colors] def0table { % apply defaults1 /ta exch def % save array2 ta 0 get % key ta 1 get % default value def % define default value} forall7currentdict /parser known {parser} if % if user inputs#G72. 400. div scalefact mul dup scale % set 400 points/inch scale factor1@currentlinewidth penscale mul setlinewidth % re-scale line width2/lTime usertime lTime sub def % save ztp load time%main2/doit {0> {main} stopped { (error stack:\n) print pstack flush quit} if} def9doitC 16#2060C 16#20909 16#20606 16#20306 ' 16#20009 16b