$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.1-004 3-AUG-1989 $! On 8-MAR-1992 15:02:45.49 By user HUBER $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $!+ THIS PACKAGE DISTRIBUTED IN 13 PARTS, TO KEEP EACH PART $! BELOW 30 BLOCKS $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. AAAREADME.DOC;2 $! 2. ACLDEF.H;1 $! 3. BITIMAGE_HEX.PS;1 $! 4. CHANGES.TXT;1 $! 5. CHPDEF.H;1 $! 6. CONFIG_LTA1332.COM;1 $! 7. HEADERS_STR.PS;1 $! 8. IMAGE_HEX.PS;1 $! 9. LASER.C;1 $! 10. LASER.HLP;1 $! 11. LASER.OPT;1 $! 12. LASER_ERR.MSG;1 $! 13. LBRDEF.H;1 $! 14. PAINT_HEX.PS;1 $! 15. PARSER.PS;1 $! 16. PATCH.PS;1 $! 17. PS.PS;1 $! 18. QUIDEF.H;1 $! 19. README.HUBER;1 $! 20. SMBDEF.H;1 $! 21. START_LASER_ON_LTA1332.COM;9 $! 22. SYST.COM;1 $! 23. TRAILER.PS;1 $! 24. ZETA.PS;1 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ if f$getsyi("version") .ges. "V4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete/nolog 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete/nolog 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name"); buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff)) ;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:= ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x= "V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF; IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE; ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD); EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3)))); ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o); ENDPROCEDURE;Unpacker;EXIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create/nolog 'f' X This files have been copied via anonymous FTP from X utadnx.cc.utexas.edu , file laser_v2_03a.bck X---------------------------------------------------------------------------- V- XLASER is a user-written print symbiont that is tailored specifically to the XApple LaserWriter family and other PostScript printers. X XThe symbiont as distributed is configured to print normal text files in Xa variety of formats on the laser printer. Support is also included for Xprinting PostScript files, MacPaint files, and Zeta plot files. See XLASER.C for additional capabilities of the symbiont. X XThis distribution consists of the following files: X XFile`009`009Destination`009`009Purpose X--------------------------------------------------------------------------- XAAAREADME.DOC`009`009`009`009This file XLASER.EXE`009SYS$SYSTEM:LASER.EXE`009The symbiont executable. X*.PS`009`009SYS$LIBRARY:LASER.TLB`009Library of PostScript header files. XLASER.C`009`009`009`009`009Symbiont sources. XLASER_ERR.MSG`009`009`009`009Error message source. XQUIDEF.H`009`009`009`009Source header files. XSMBDEF.H XLBRDEF.H XLASER.OPT`009`009`009`009Link options file. XLASER.HLP`009SYS$HELP:HELPLIB.HLB`009Description of forms supported. XSYST.COM`009SYS$MANAGER:SYSTARTUP.COM Queue startup commands. X XInstallation. X XInstallation of the files can be accomplished with the following set of Xcommands: X X$ LIBRARY/CREATE/TEXT LASER *.PS X$ COPY LASER.EXE SYS$SYSTEM:/PROT=W:RE X$ COPY LASER.TLB SYS$LIBRARY:/PROT=W:RE X$ LIBRARY /HELP SYS$HELP:HELPLIB LASER`009`009! Optional X XSelect a terminal port to attach the printer to, and edit SYST.COM to Xreflect your change. SYST.COM may be invoked by your system startup Xprocedures. The printer may be connected with a cable that has only Xtransmit, receive and ground pins connected. Transmit and receive Xshould (I think) be swapped. The switch on the LaserWriter should be Xswitched to the "9600" position. If you are sharing your LaserWriter Xwith a Macintosh connected via AppleTalk, use the following procedure Xwhen switching the printer: X XTo switch the printer to the VAX: X1. Insure that no AppleTalk jobs are in progress. X2. Disconnect the appletalk connector from the laserwriter. X3. Switch switch on LaserWriter to "9600". X4. $START/QUEUE ALW X XTo switch the printer to the MAC: X1. $STOP/QUEUE/NEXT ALW X2. Allow any jobs in progress to complete. X3. Switch switch on LaserWriter to "AppleTalk". X4. Connect the appletalk connector to the laserwriter. X X$ CREATE SYS$SYSDEVICE:`091LASER`093. This area is used for LASER log files Xfor spooled files, or when the laser log cannot be created in the user's Xdirectory. The location and name of the directory may be changed by`032 Xchanging the definition for LASER$LOG in SYST.COM. Log files are only Xcreated when there is an error in the job, or when the job sends back Xinformation (i.e. using the PostScript PRINT command). X XTo build the symbiont from the sources: X X$ CC LASER X$ MESSAGE LASER_ERR X$ LINK LASER.OPT/OPT X XPostScript is a trademark of Adobe Inc. XLaserWriter and MacPaint are trademarks of Apple Computer. $ CALL UNPACK AAAREADME.DOC;2 2015773068 $ create/nolog 'f' X#define ACL$K_LENGTH`00912 X#define ACL$C_LENGTH`00912 X#define ACL$C_FILE`0091 X#define ACL$C_DEVICE`0092 X#define ACL$C_JOBCTL_QUEUE`0093 X#define ACL$C_COMMON_EF_CLUSTER`0094 X#define ACL$C_LOGICAL_NAME_TABLE`0095 X#define ACL$C_PROCESS`0096 X#define ACL$C_GROUP_GLOBAL_SECTION`0097 X#define ACL$C_SYSTEM_GLOBAL_SECTION`0098 X#define ACL$C_ADDACLENT`0091 X#define ACL$C_DELACLENT`0092 X#define ACL$C_MODACLENT`0093 X#define ACL$C_FNDACLENT`0094 X#define ACL$C_FNDACETYP`0095 X#define ACL$C_DELETEACL`0096 X#define ACL$C_READACL`0097 X#define ACL$C_ACLLENGTH`0098 X#define ACL$C_READACE`0099 X#define ACL$C_RLOCK_ACL`00910 X#define ACL$C_WLOCK_ACL`00911 X#define ACL$C_UNLOCK_ACL`00912 X#define ACL$S_ADDACLENT`009255 X#define ACL$S_DELACLENT`009255 X#define ACL$S_MODACLENT`009255 X#define ACL$S_FNDACLENT`009255 X#define ACL$S_FNDACETYP`009255 X#define ACL$S_DELETEACL`009255 X#define ACL$S_READACL`009512 X#define ACL$S_ACLLENGTH`0094 X#define ACL$S_READACE`009255 X#define ACL$S_RLOCK_ACL`0094 X#define ACL$S_WLOCK_ACL`0094 X#define ACL$S_UNLOCK_ACL`0094 X#define ACL$S_ACLDEF`00916 X#define ACL$L_FLINK`0090 X#define ACL$L_BLINK`0094 X#define ACL$W_SIZE`0098 X#define ACL$B_TYPE`00910 X#define ACL$L_LIST`00912 $ CALL UNPACK ACLDEF.H;1 218372232 $ create/nolog 'f' X%%%`009bitimage - puts an uncompressed hex bitmap on the page X% X%`009R. Watson X%`00905-Feb-1987 X% X%`009inputs:`009/param1 /ncopies /nc - number of copies (default 1) X%`009`009/param2 /scale - scale factor to multiply by (default 1.0) X%`009`009/param3 /xsize - x size in pixels (default 512) X%`009`009/param4 /ysize - y size in pixels (default 512) X%`009`009/param5 /pxlwid - number of bits in a pixel (1,2,4,8) X% X X%%`009main program X% X/main X`123 X`009/iscale 1 scale div def`009`009% compute scale factor X% X% get the image, fill black if run out of data. Note that readhexstring X% returns false if we don't fill the string, so the input data should X% be a multiple of sizeof(tmp) bytes long. Assume that it is more`032 X% efficient to read more than 1 byte at a time. Note that line boundaries X% do not matter. X% X`009xsize ysize pxlwid `091iscale 0.0 0.0 iscale 0.0 0.0`093 X`009`009`123 currentfile tmp readhexstring not `123pop <00>`125 if `125 imag Ve X X`009showpage X`009currentfile flushfile`009`009`009% avoid laser_log's X`125 def X X X%%`009executable initialization X% X/table `091 X `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X `091/scale 1.0 (.sf .scale .param2)`093`009`009% scale factor X `091/xsize 512 (.xsize .param3)`093`009`009`009% x size X `091/ysize 512 (.ysize .param4)`093`009`009`009% y size X `091/pxlwid 1 (.pxlwid .param5)`093`009`009`009% pixel width X`093 def X Xtable `123`009`009`009`009`009`009% apply defaults X`009/ta exch def`009`009`009`009% save array X`009ta 0 get`009`009`009`009% key X`009ta 1 get`009`009`009`009% default value X`009def`009`009`009`009`009% define default value X`125 forall X Xcurrentdict /parser known `123parser`125 if`009`009% if user inputs X X/identity matrix def`009`009`009% make an identity matrix X/tmp 8 string def X1 72 mul 10 72 mul moveto currentpoint translate Xcurrentpoint transform`009`009`009% see where we are in device coords Xidentity setmatrix`009`009`009% turn off transformation - switch to X`009`009`009`009`009% device coordinate system Xtranslate`009`009`009`009% move origin to transformed currpt X Xmain $ CALL UNPACK BITIMAGE_HEX.PS;1 1514953140 $ create/nolog 'f' XLASER_V2_01 X`009Fixed problems with fortran/print carriage control. X`009Fixed problems with the page model. X`009Added job/file burst/trailer support. XLASER_V2_02 X`009Fixed backspace character size problem in HEADERS_STR.PS. XLASER_V2_03 X Added LAT support. Various fixes. SWEDISH mode. $ CALL UNPACK CHANGES.TXT;1 301991561 $ create/nolog 'f' X#define CHP$_END`0090 X#define CHP$_ACCESS`0091 X#define CHP$_FLAGS`0092 X#define CHP$_PRIV`0093 X#define CHP$_ACMODE`0094 X#define CHP$_ACCLASS`0095 X#define CHP$_RIGHTS`0096 X#define CHP$_ADDRIGHTS`0097 X#define CHP$_MODE`0098 X#define CHP$_MODES`0099 X#define CHP$_MINCLASS`00910 X#define CHP$_MAXCLASS`00911 X#define CHP$_OWNER`00912 X#define CHP$_PROT`00913 X#define CHP$_ACL`00914 X#define CHP$_AUDITNAME`00915 X#define CHP$_ALARMNAME`00916 X#define CHP$_MATCHEDACE`00917 X#define CHP$_PRIVUSED`00918 X#define CHP$_MAX_CODE`00919 X#define CHP$M_SYSPRV`0091 X#define CHP$M_BYPASS`0092 X#define CHP$M_UPGRADE`0094 X#define CHP$M_DOWNGRADE`0098 X#define CHP$M_GRPPRV`00916 X#define CHP$M_READALL`00932 X#define CHP$V_SYSPRV`0090 X#define CHP$V_BYPASS`0091 X#define CHP$V_UPGRADE`0092 X#define CHP$V_DOWNGRADE`0093 X#define CHP$V_GRPPRV`0094 X#define CHP$V_READALL`0095 X#define CHP$M_READ`0091 X#define CHP$M_WRITE`0092 X#define CHP$M_USEREADALL`0094 X#define CHP$V_READ`0090 X#define CHP$V_WRITE`0091 X#define CHP$V_USEREADALL`0092 $ CALL UNPACK CHPDEF.H;1 1247036365 $ create/nolog 'f' X$!++ X$!NAME X$!`009`009 CONFIG_LTA1332.COM X$!ABSTRACT X$!`009Configure the port LTA1332 to be use with a PostScript X$!`009printer and the PostScript Print Symbiont. X$! X$!CREATION X$!`0091-JUL-1991 : SYSTEM `032 X$! X$!MODIFICATION X$! X$!-- X$ LATCP := $ LATCP X$ LATCP := $ LATCP X$ LATCP CREATE PORT LTA1332 X$ LATCP SET PORT LTA1332 /NODE=TSL133 /SERVICE=H1$PRINT/QUEUED X$ SET TERMINAL /PERMANENT/DEVICE=LN03 LTA1332 X$ SET TERMINAL /PERMANENT LTA1332 - X`009`009 /NOECHO /TYPE_AHEAD - X`009`009 /HOSTSYNC /TTSYNC - X`009`009 /LOWERCASE /NOWRAP - X`009`009 /NOBROADCAST /FULLDUP - X`009`009 /NOAUTOBAUD /NOFALLBACK - X`009`009 /INTERACTIVE /PASTHRU - X`009`009 /SPEED = 9600 - X`009`009 /WIDTH=256 X$! X$! End of CONFIG_LTA1332.COM $ CALL UNPACK CONFIG_LTA1332.COM;1 981205206 $ create/nolog 'f' X%%`009headers_str - print text with headers on LaserWriter X% X%`009R. Watson 25-Sep-1986 X% X%`00910/03/86 RW Remove "_DUA0:`091`093" from filename (for spooled files) X%`00910/25/87 RW Created from "headers.ps". Uses explicit operators X%`009`009 XSTR, XLF, XCR to gain more page control. X%`00905/12/88 S. Roseman Change XSTR to update xpos, and XCR to reset X%`009`009 it to the left margin. This allows multiple XSTRs to`032 X%`009`009 create 1 physical line. X%`00906/14/88 RW Add xmargin to fix above mod. X%`00907/15/88 RW Set backspace character size correctly allowing for squish. X%`009`009 Future: squish should probably be proportional to the`032 X%`009`009 font size or deleted entirely. X%`00911/09/89 RW Add SWEDISH form, mapping for characters `123`125`124`091`0 V93\ X% 01/30/91 RW Contributed fix. Don't assume spooled files are X%`009`009 on DUA0. X% X%`009inputs:`009/param1 or /#copies - number of copies (default 1) X%`009`009/param2 or /fsize = number containing font size X%`009`009/param3 or /wide = boolean true if landscape mode X%`009`009/param4 or /filename = string containing page header info X% X/EOF X`123 X`009linecount 0 ne column 0 ne or `123`009% if we've printed a line X`009`009/column ncolumns def`009% force page out X`009`009newpage X`009`125 if X`125 def X`032 X/XCR`032 X`123 X`009/xpos xmargin def`009%%%was leftmargin X`125 def X`032 X/XLF `123newline`125 def X`032 X/XFF X`123 X`009topmargin lineh sub ypos ne `123`009% if not top of page X`009`009newpage X`009`125 if X`125 def X`032 X`032 X%%`009 XSTR X% X%`009prints a line of text from the stack X% X/XSTR X`123 X`009/line exch def`009`009`009`009% get text X`032 X`009line length 1 ge `123`009`009`009% show the line X`009`009xpos ypos moveto X`009`009squish 0 line ashow X`009`009/xpos currentpoint pop def`009% save current x position X`009`125 if X`125 def X`032 X`032 X%%`009newline - move down 1 line. X% X/newline `123 X`009/linecount linecount 1 add def`009% advance line count X`009ypos lineh sub /ypos exch def`009% debit y pos on page X`009ypos bottommargin lt`032 X`009 linecount linelimit gt or `123`009% if bottom of page X`009`009newpage +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+ X`009`009newline X`009`125 if X`125 def X`032 X`032 X%%`009newpage - initialize for a new page. X% X/newpage `123 X`009/linecount 0 def`009`009`009% reset line count X`009/ypos topmargin lineh sub def`009`009% reset line on page X`032 X`009/column column 1 add def`009`009% advance column X`009column ncolumns lt `123`009`009`009% if not last column X`009`009/xmargin columnwidth column mul leftmargin add def X`009`009/xpos xmargin def X`009`125 `123 X`009`009/column 0 def`009`009`009% reset column X`032 X`009`009title `123`009`009`009`009`009% if title X`009`009`009leftmargin`032 X`009`009`009 topmargin titlemargin add moveto % setup header X`009`009`009currentfont`009`009`009% save current font X`009`009`009/Helvetica-Bold findfont 12 scalefont setfont X`009`009`009filename show X`009`009`009pagewidth 1.5 inch sub`032 X`009`009`009 topmargin titlemargin add moveto % page number X`009`009`009(page ) show X`009`009`009page 10 5 string cvrs show X`009`009`009setfont`009`009`009`009% restore font X`009`009`125 if`009`009 X`032 X`009`009showpage X`009`009landscape X`032 X`009`009page`009`009`009`009`009% save this X`009`009saveobj restore `009`009`009% flush vm X`009`009/saveobj save def X`009`009/page exch def`009`009`009`009% restore this X`032 X`009`009/page page 1 add def`009`009`009% advance page number X`009`009/xmargin leftmargin def`009`009`009% reset left side X`009`009/xpos xmargin def X`009`125 ifelse X`125 def`009 X`032 X`032 X%%`009landscape - set landscape mode X% X/landscape `123 X`009wide `123 X`009`0098.5 inch 0 translate 90 rotate X`009`125 if X`125 def X`032 X%%`009 inch . X% X%`009convert to inches X% X/inch `123 72. mul`125 def X`032 X`032 X%%`009 point . X% X%`009convert to points X% X/point `123 `125 def X`032 X`032 X%%`009executable initialization. X% Xinitgraphics X`032 Xcurrentdict /formname known not `123/formname (2UP) def`125 if X`032 Xformname (2UP) eq `123 X`009/table `091 X`009 `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X`009 `091/fsizetmp 0 (.fsize .fs .param2)`093`009`009% font size X`009 `091/wide true (.wide .w .param3)`093`009`009% landscape mode X`009 `091/title false (.title .param4)`093 `009`009% title X`009 `091/ncolumns 2 (.ncolumns .param5)`093`009`009% number of columns X`009 `091/linelimit 66 (.linelimit .nlines .param6)`093`009% lines per page X `091/hdr () (.hdr .header. param7)`093`009`009% page header X`009 `091/swedish false (.swedish)`093`009`009`009% set swedish mode X`009`093 def X`125 if X`032 Xformname (LETTER) eq `123 X`009/table `091 X`009 `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X`009 `091/fsizetmp 0 (.fsize .fs .param2)`093`009`009% font size X`009 `091/wide false (.wide .w .param3)`093`009`009% landscape mode X`009 `091/title false (.title .param4)`093 `009`009% title X`009 `091/ncolumns 1 (.ncolumns .param5)`093`009`009% number of columns X`009 `091/linelimit 66 (.linelimit .nlines .param6)`093`009% lines per page X `091/hdr () (.hdr .header. param7)`093`009`009% page header X`009 `091/swedish false (.swedish)`093`009`009`009% set swedish mode X`009`093 def X`125 if X`032 Xformname (SWEDISH) eq `123 X`009/table `091 X`009 `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X`009 `091/fsizetmp 0 (.fsize .fs .param2)`093`009`009% font size X`009 `091/wide false (.wide .w .param3)`093`009`009% landscape mode X`009 `091/title false (.title .param4)`093 `009`009% title X`009 `091/ncolumns 1 (.ncolumns .param5)`093`009`009% number of columns X`009 `091/linelimit 66 (.linelimit .nlines .param6)`093`009% lines per page X `091/hdr () (.hdr .header. param7)`093`009`009% page header X`009 `091/swedish true (.swedish)`093`009`009`009% set swedish mode X`009`093 def X`125 if X`032 Xformname (LANDSCAPE) eq `123 X`009/table `091 X`009 `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X`009 `091/fsizetmp 0 (.fsize .fs .param2)`093`009`009% font size X`009 `091/wide true (.wide .w .param3)`093`009`009% landscape mode X`009 `091/title false (.title .param4)`093 `009`009% title X`009 `091/ncolumns 1 (.ncolumns .param5)`093`009`009% number of columns X`009 `091/linelimit 66 (.linelimit .nlines .param6)`093`009% lines per page X `091/hdr () (.hdr .header. param7)`093`009`009% page header X`009 `091/swedish false (.swedish)`093`009`009`009% set swedish mode X`009`093 def X`125 if X`032 Xformname (HEADERS) eq `123 X`009/table `091 X`009 `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X`009 `091/fsizetmp 0 (.fsize .fs .param2)`093`009`009% font size X`009 `091/wide false (.wide .w .param3)`093`009`009% landscape mode X`009 `091/title true (.title .param4)`093 `009`009% title X`009 `091/ncolumns 1 (.ncolumns .param5)`093`009`009% number of columns X`009 `091/linelimit 66 (.linelimit .nlines .param6)`093`009% lines per page X `091/hdr () (.hdr .header. param7)`093`009`009% page header X`009 `091/swedish false (.swedish)`093`009`009`009% set swedish mode X`009`093 def X`125 if X`032 Xcurrentdict /table known not `123 X`009/table `091 X`009 `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X`009 `091/fsizetmp 0 (.fsize .fs .param2)`093`009`009% font size X`009 `091/wide false (.wide .w .param3)`093`009`009% landscape mode X`009 `091/title true (.title .param4)`093 `009`009% title X`009 `091/ncolumns 1 (.ncolumns .param5)`093`009`009% number of columns X`009 `091/linelimit 66 (.linelimit .nlines .param6)`093`009% lines per page X `091/hdr () (.hdr .header. param7)`093`009`009% page header X`009 `091/swedish false (.swedish)`093`009`009`009% set swedish mode X`009`093 def X`125 if X`032 Xtable `123`009`009`009`009`009`009% apply defaults X`009/ta exch def`009`009`009`009% save array X`009ta 0 get`009`009`009`009% key X`009ta 1 get`009`009`009`009% default value X`009def`009`009`009`009`009% define default value X`125 forall X`032 Xcurrentdict /parser known `123parser`125 if`009`009% if user inputs X`032 X% if the user specified a string for /hdr then use it, also imply title true Xhdr length 0 ne `123/filename hdr def /title true def`125 if X Xcurrentdict /filename known not `123/filename () def`125 if X%filename (_DUA0:`091`093) anchorsearch `123pop /filename exch def`125 `123p Vop`125 ifelse %cleanup Xfilename (`091`093) search `123pop pop /filename exch def`125 `123pop`125 if Velse`032 X`032 X/inp currentfile def`009`009`009`009% define files X`032 Xwide `123 X`009/leftmargin .5 inch def X`009/topmargin 7.96 inch def X`009/bottommargin .3 inch def X`009/rightmargin .25 inch def X`009currentdict /fsize known not `123/fsize 8 point def`125 if % default X`009fsizetmp 0 ne `123/fsize fsizetmp def`125 if X`009/pagewidth 11 inch def X`009/squish -0.3 def X`009/titlemargin 3 point def X`125 `123`009 X`009/leftmargin 1. inch def X`009/topmargin 10.39 inch def`009`009% top of page X`009/rightmargin .25 inch def X`009/bottommargin .5 inch def X`009currentdict /fsize known not `123/fsize 10 point def`125 if % default X`009fsizetmp 0 ne `123/fsize fsizetmp def`125 if X`009/pagewidth 8.5 inch def X`009/squish -0.3 def X`009/titlemargin .185 inch def X`125 ifelse X/lineh fsize point def`009`009`009% line height X/linecount 0 def X/column 0 def X/columnwidth pagewidth leftmargin sub rightmargin sub ncolumns div def X/ibuf 200 string def`009`009`009% input buffer X/page 1 def`009`009`009`009% page number X/xpos leftmargin def X/xmargin leftmargin def X/ypos topmargin lineh sub def X`032 X% The following section of code makes a new font with a backspace X% character defined. The width of the backspace character is X% the negative of the width of an underscore character. X`032 X/Courier findfont`009`009`009`009% select the font X% X% find the width of a character in the font coordinate system. X% add back in the scaled amount that squish will offset us so we X% end up in the right place after a backspace X% X1000 scalefont setfont X (_) stringwidth pop`0092000 squish mul fsize div add /uwid exch def X`032 X/Courier findfont`009`009`009`009% copy the font Xdup length 1 add dict /newdict exch def`009% leaving room for a Metrics ent Vry X`123 X`009exch dup /FID ne `123`009`009`009% if not /FID X`009`009dup /Encoding eq `123`009`009% if /Encoding copy the entry X`009`009`009exch dup length array copy`032 X`009`009`009newdict 3 1 roll put X`009`009`125 `123 X`009`009`009exch newdict 3 1 roll put % else just use the object X`009`009`125 ifelse X`009`125 `123 X`009pop pop`009`009`009`009`009% dump /FID X`009`125 ifelse X`125 forall X`032 X1 dict begin`009`009`009`009`009% create Metrics dictionary X`009/backspace uwid neg def`009`009`009% define backspace width X`009newdict /Metrics currentdict put Xend X`032 Xnewdict begin`009`009`009`009`009% set encoding for backspace X`009Encoding 8 /backspace put X`009swedish `123 X`009`009Encoding 16#7b /aring put`009% `123 X`009`009Encoding 16#7d /adieresis put`009% `125 X`009`009Encoding 16#7c /odieresis put`009% `124 X`009`009Encoding 16#5b /Aring put`009% `091 X`009`009Encoding 16#5d /Adieresis put`009% `093 X`009`009Encoding 16#5c /Odieresis put`009% \ X`009`125 if Xend X`032 X/xfont newdict definefont pop`009`009`009% define the new font X`032 X/xfont findfont fsize scalefont setfont`009% select the new font X`032 Xlandscape X/saveobj save def $ CALL UNPACK HEADERS_STR.PS;1 1600626311 $ create/nolog 'f' X%%%`009image - puts a raster image file on the laserwriter. X% X%`00902/26/87 R. Watson Derived from paint_hex.ps X% X X%%`009deCompress . X% X%`009returns a bitimage string on the stack X% X/deCompress X`123 X`009/count readbyte def`009`009`009% get count X`009count 16#80 and 0 eq `123`009`009`009% if bit stream X`009`009/count count 1 add def X`009`009outstring 0 count getinterval % get right size string X`009`009inp exch readhexstring`009`009% get bytes X`009`009pop`009`009`009`009% toss readhexstring status X`009`125 X`009`123`009`009`009`009`009% else repeated string X`009`009/byte readbyte def`009`009% get byte to repeat X`009`00916#100 count sub 1 add /count exch def% get abs val of count X`009`0090`009`009`009`009% preset index X`009`009count `123 X`009`009`009dup outstring exch byte put X`009`009`0091 add`009`009`009% advance index X`009`009`125 repeat X`009`009pop`009`009`009`009% index X`009`009outstring 0 count getinterval`009% return string X`009`125 ifelse X`125 def X X X%%`009getByte X% X%`009returns /byte = next input byte X%`009`009 = 0 if no more bytes on input stream X% X/getByte X`123 X`009inp instring readhexstring `123`009`009% if got one X`009`0090 get /byte exch def`009`009% store in byte X`009`125 X`009`123`009`009`009`009`009% else 0 X`009`009pop /byte 0 def X`009`125 ifelse X`125 def X X X%%`009decodeheader - decodes the info in the header record. X% X/decodeheader X`123 X`009/bytesinhead 512 def`009`009`009% default 512 bytes X`009`123`009`009`009`009`009% 512 bytes default X`009 getlong 10 10string cvrs cvlit `009% key to lit X`009 dup where X`009`009`123 pop load exec `125`009`009% if defined func X`009`009`123 pop getlong pop `125 ifelse`009% if no func (key, fix file) X`009 /bytesinhead bytesinhead 8 sub def`009% debit header length X`009 bytesinhead 8 lt `123`009`009`009% if end of header X`009`009bytesinhead `123`009`009`009% flush remaining bytes X`009`009`009readbyte pop X`009`009`125 repeat X`009`009exit`009`009`009`009% exit loop X`009 `125 if X`009`125 loop X`125 def X X/0 `123getlong pop`125 def`009`009`009`009% 0 - nop X/1 `123/xsize getlong def`125 def`009`009`009% 1 - x size X/2 `123/ysize getlong def`125 def`009`009`009% 2 - y size X/3 `123/pxlwid getlong def`125 def`009`009`009% 3 - pixel width X/4 `123/scale getlong def`125 def`009`009`009% 4 - scale factor X/5 `123/invert getlong def`125 def`009`009`009% 5 - invert if nonzero X/8 `123getlong 512 sub `009`009`009`009% 8 - header length X bytesinhead add /bytesinhead exch def`125 def % apply correction factor X/9 `123/compressed getlong def`125 def`009`009% 9 - true if compressed X X%%`009getlong X% X%`009converts 4 hex bytes from currentfile to an integer X%`009longwords from the vax are transmitted low order byte first. X% X/getlong X`123 X`009/acc 0 def`009`009`009`009% preset accumulator X`0090 1 3 `123 X`009`009readbyte exch 8 mul bitshift acc or /acc exch def X`009`125 for X`009acc X`125 def X X X%%`009readbyte X% X%`009reads a hex byte from currentfile and returns it on the stack X%`009executes "readbyteeof" if EOF encountered X% X/readbyte X`123 X`009currentfile 1string readhexstring `123`125`123pop readbyteeof`125 ifelse V 0 get X`125 def X X X X%%`009main program X% X/main X`123 X`009decodeheader`009`009`009`009% apply user user header X`009currentdict /parser known `123parser`125 if`009% if user inputs X X`009invert 0 ne `123 X`009`009`1231.0 exch sub`125 settransfer`009% invert image X`009`125 if X X`009/sTime usertime def`009`009`009% save start time X vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestring X 10 20 string cvrs dbg exch writestring dbg ( ) writestring X 10 20 string cvrs dbg exch writestring dbg ( \n) writestring X flush X`009/iscale 1 scale div def`009`009`009% compute scale factor X`009 X`009compressed 1 eq `123`009`009`009% if encoded X`009`009xsize ysize pxlwid `091iscale 0.0 0.0 iscale 0.0 0.0`093 X`009`009`009`009`009`009`009`123 deCompress `125 image X`009`125 `123 X`009`009xsize ysize pxlwid `091iscale 0.0 0.0 iscale 0.0 0.0`093 X`009`009 `123 currentfile tmp readhexstring not `123pop <00>`125 if `125 V image X`009`125 ifelse X X`009usertime sTime sub 1000 div 10 20 string cvrs X`009 dbg exch writestring dbg ( seconds ) X`009 writestring X X vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestring X 10 20 string cvrs dbg exch writestring dbg ( ) writestring X 10 20 string cvrs dbg exch writestring dbg ( \n) writestring X flush X X`009showpage X`009currentfile flushfile`009`009% avoid laser_log's X`125 def X X X%%`009executable initialization X% X/inp (%stdin) (r) file def`009`009`009% define files X/dbg (%stdout) (w) file def`009 X/1string 1 string def`009`009`009`009% scratch 1 byte string X/10string 10 string def`009`009`009`009% scratch 10 byte string +-+-+-+-+-+-+-+- END OF PART 2 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+ X/identity matrix def`009`009`009`009% make an identity matrix X/outstring 128 string def`009`009`009% storage for output string X/instring 1 string def`009`009`009`009% input buffer X/tmp 8 string def`009`009`009`009% for uncompressed images X X/table `091 X `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X `091/scale 1.0 (.sf .scale .param2)`093`009`009% scale factor X `091/xsize 512 (.xsize .param3)`093`009`009`009% x size X `091/ysize 512 (.ysize .param4)`093`009`009`009% y size X `091/pxlwid 1 (.pxlwid .param5)`093`009`009`009% pixel width X `091/invert 0 (.invert .param6)`093`009`009`009% invert image if 1 X `091/compressed 1 (.compressed .param7)`093`009`009% default to compressed X`093 def X Xtable `123`009`009`009`009`009`009% apply defaults X`009/ta exch def`009`009`009`009% save array X`009ta 0 get`009`009`009`009% key X`009ta 1 get`009`009`009`009% default value X`009def`009`009`009`009`009% define default value X`125 forall X X1 72 mul 10 72 mul moveto currentpoint translate Xcurrentpoint transform`009`009`009% see where we are in device coords Xidentity setmatrix`009`009`009% turn off transformation - switch to X`009`009`009`009`009% device coordinate system Xtranslate`009`009`009`009% move origin to transformed currpt X X/doit `123 X`009`123main`125 stopped `123 (error stack:\n) = pstack flush quit`125 if X`125 def X%doit Xmain $ CALL UNPACK IMAGE_HEX.PS;1 1701784921 $ create/nolog 'f' X/***`009LASER - A Single-Threaded Asynchronous Symbiont to drive X*`009`009an Apple LaserWriter. X* X* Copyright 1987-1990, The University of Texas at Austin X* X* Permission to use, copy, modify, and distribute this software and its X* documentation for any purpose and without fee is hereby granted, X* provided that the above copyright notice appear in all copies and that X* both that copyright notice and this permission notice appear in X* supporting documentation, and that the name of The University of Texas X* not be used in advertising or publicity pertaining to distribution of X* the software without specific, written prior permission. The X* University of Texas makes no representations about the suitability of X* this software for any purpose. It is provided "as is" without express X* or implied warranty. X*`032 X* THE UNIVERSITY OF TEXAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS X* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND X* FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS BE LIABLE FOR ANY X* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER X* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF X* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN X* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. X* X* Author:`032 X* Rick Watson`032 X* The University of Texas Computation Center, 512/471-3241 X* internet: watson@utadnx.cc.utexas.edu bitnet: watson@utadnx X* uucp: ...!cs.utexas.edu!ut-emx!rick span: utspan::utadnx::watson X* X*`009Look for new versions in the anonymous ftp directory on`032 X*`009utadnx.cc.utexas.edu (128.82.1.26). X* X*`009Revised: X*`009Steve Roseman X*`009Lehigh University Computing Center X*`009lusgr@vax1.cc.lehigh.edu X* X*`009This user-writter symbiont is tailored specifically to the Apple X*`009LaserWriter and similar PostScript printers. It has the following X*`009features: X* X*`0091. Page counting is done by reading the page count from the X*`009 laserwriter at the beginning and the end of each file. X*`009 This mechanism also "synchronizes" the user job with the X*`009 laserwriter. If the laserwriter does not respond to the X*`009 first request for a page count, the symbiont notifies the X*`009 operator, and continues to poll the laserwriter. This is X*`009 usefull if the laserwriter is being shared with MAC users. X* X*`0092. Parameters may be passed to postscript modules in the setup X*`009 library via 2 mechanisms. The text from a $PRINT /NOTE= X*`009 command will be sent first. X* X*`009 The /PARAMETER switch may also be used. Each entry can be X*`009 one of two formats. An entry without the "=" character in X* `009 it is sent as (param) . An entry with the`032 X*`009 "=" character in is is sent as () . X*`009 The parameters are defined in an array called /param. X*`009 Example: /PARAMETER=(1,SIZE=5,"str=(a+b)") generates: X*`009 /param `091(param1) 1 (size) 5 (str) (a+b)`093 def X*`009 All alphabetics are forced to lower case. Using the /PARAMETER X*`009 switch forces sending PARSER from LASER.TLB as part of the X*`009 PostScript program sent to the printer. Look at`032 X*`009 other files in LASER.TLB for examples of using the PARSER X*`009 module. X* X*`0093. If the name of a setup module ends with "_HEX" the file to`032 X*`009 be printed is "hexified" to the laser printer. This is useful X*`009 for sending bitimage files to the laserwriter. X* X*`0094. A log of responses from the laserwriter is created. This is`032 X*`009 usefull for debugging postscript programs. The file is created X*`009 as .LASER_LOG. In the case of spooled output, X*`009 the log file is written to LASER$LOG:.LASER_LOG. X*`009 These files are automatically deleted if empty. X* X*`0095. Printer error messages from the laserwriter are sent to operators X*`009 enabled to receive PRINT messages from OPCOM. X* X*`0096. A "%%`091 Flushing:" response from the printer will abort the X*`009 current file. X* X*`0097. Spooled files: Spooled files normally default to FORMS=HEADERS X*`009 if the recommended queue initialize procedure is followed. X*`009 By specifying special filenames, the user can override the X*`009 forms used, and pass parameters to the setup module. X*`009 The syntax is: "_._" X*`009 where is the name of a form to use and X*`009 is of the form: -`091_...`093. X*`009 (Note the use of "-" instead of "=" for a separator.) X*`009 For example: $ copy zeta.plt alw:_zeta._ncopies-5_scale-2 X*`009 (The kludge of the century, huh?) X* X*`009Outputs (in the following order) to the laserwriter: X* X*`0091. "/note def\r\n". X*`0092. /param definition and library module PARSER if /parameter switch`032 X*`009 present X*`0093. If the setup module is "HEADERS", the string "/filename X*`009 def" and "/formname def" X*`0093. The first file or forms setup module if specified. X*`0094. The file to be printed itself. If the setup module name ends in X*`009 "_HEX" the file is hex-ified to the printer instead. X* X*`009where: is the string from $PRINT /NOTE= X*`009 is the string from $PRINT /PARAM=(""...) X*`009 is the file specification for the file to print. X* X*`009Limitations, bugs, etc: X* X*`0091. No checkpointing is done. X*`0092. $PRINT/COPIES=n sends the job to the LaserWriter n times. This X*`009 is not optimal, but is how the job controller handles things. X*`009 It makes sense for most printers. Multiple copy handling is X*`009 better handled in most of the postscript setup files. Also X*`009 /note="/#copies n def" will usually work. X*`0093. $PRINT/SPACE=n is not implemented. X*`0094. BURST pages are not implemented but FLAG and TRAILER are. X*`0095. Does not handle lists of setup modules. X* X*`009Recommended device setup: X* X*`009$ define/system/exec/trans=(concealed,terminal) alw : ! laser X*`009$ set term /perm /speed=9600 /nomodem /notype /nohang alw X*`009$ set term /perm /hostsync /pasthru /ttsync /eightbit /nobroad alw X*`009$ set term /perm /noauto alw X*`009$ set prot=o:rwlp /dev alw X*`009$ set device /spooled=(ALW,sys$sys'device:) alw X* X*`009Recommended queue initialize: X* X*`009$ initialize/queue/start - X*`009/default=(noburst,nofeed,noflag,notrailer,form=headers) - X*`009/separate=(noburst,noflag,trailer) -`032 X*`009/library=laser /base_prio=8 /form=headers - X*`009/processor=laser /on=alw: alw X* X* NOTE: change /separate=(...trailer) to (...flag) if your laser printer X* stacks right side up. X* X*`009Modification History: X*`00912-Feb-1987 R. Watson`009Created. X*`00915-Apr-1987 R. Watson Added some record format processing (cr, X*`009`009`009`009fortran). X*`00916-Apr-1987 R. Watson`009Allow ':' as a parameter separator. X*`00921-Apr-1987 R. Watson`009Some mods to trailer page. Send PATCH module X*`009`009`009`009if v 23.0 printer. X*`00924-Apr-1987 R. Watson`009This version submitted to Spring '87 Decus. X*`00924-Aug-1987 R. Watson`009Handle implied vs not carriage control better. X*`00915-Sep-1987 R. Watson`009Add support for "_STR" setup module types to X*`009`009`009`009allow RUNOFF style underlining. X*`009`009`009`009Fixup timing problems with TI 2115. X*`00901-Oct-1987 R. Watson`009Treat PRN carriage control like implied.`032 X*`009`009`009`009Still need to rewrite carriage control to X*`009`009`009`009really handle Fortran and Print carriage X*`009`009`009`009control. X*`00921-Mar-1988 R. Watson`009Get big buffer for I/O. Reduce frequency of X*`009`009`009`009offline messages. X*`00913-May-1988 S. Roseman Added support for PRN and FTN carriage control. X*`00915-Jun-1988 R. Watson`009Fixup page model for new carriage control supp Vort. X*`009`009`009`009Add FLAG pages, also fix for DEF=FLAG=`091ONE`124ALL`093, X*`009`009`009`009etc. No BURST (redundant). X*`009`009`009`009This is version LASER_V2_01. X*`00915-Jul-1988 R. Watson Fixes to HEADERS -> LASER_V2_02. X*`00907-Apr-1989 R. Watson remove "%d `123XLF`125 repeat" that causes invl Validrestore X*`009`009`009`009(for not well-understood reasons) found by Bill X*`009`009`009`009Alford. X*`00910-Nov-1989 R. Watson`009SWEDISH mod to headers_str.ps. X*`009`009`009`009Don't send spooled filename to headers module. X*`00904-Apr-1990 R. Watson`009For LAT and other spooler sharing: X*`009`009`009`009 Only assign printer for duration of job. X*`009`009`009`009 Wait if already allocated. X*`009`009`009`009Ignore /note = "Remote LPD request" from`032 X*`009`009`009`009Multinet. X*`00930-Apr-1990 Jason Berri Use check_access for proper validation X*`009`009`009`009of user access to print files. X*`00907-Jun-1990 R. Watson Interim release 2.02A so people can X*`009`009`009`009test LAT mods. This version is NOT well X*`009`009`009`009tested. X*`00927-Nov-1990 R. Watson Remove the check_access code. According X*`009`009`009`009to Ken Adelman, we don't need to do it. X*`009`009`009`009it is done when the job is submitted. X*`00905-Dec-1990 R. Watson`009Release 2.03 X*`00930-Jan-1991 R. Watson Change to headers_str.ps. Don't assume`032 X*`009`009`009`009that spooled files are on dua0. X* X*/ X X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#ifdef notdef X#include "acldef.h" X#include "chpdef.h" X#endif X#include "smbdef.h" X#include "lbrdef.h" X#include "quidef.h" X X#define TRUE`0091 X#define FALSE`0090 X X#define MAXITEMS 60`009`009`009/* max expected items from jobctl */ X X#define WRITELASER(p1,p2) stat = sys$qiow(0,laserchan, IO$_WRITEPBLK, 0, 0, V 0,\ Xp1, p2, 0, 0, 0, 0); checkstat(stat,"writelaser"); X Xvoid jobctl_ast();`009`009`009/* job controller ast routine */ Xvoid laser_read_ast();`009`009`009/* laser read completion ast routine */ X Xstruct `123 X`009int`009item_code;`009`009/* code */ X`009unsigned short `009item_size;`009/* size of item */ X`009char`009*buffer;`009`009/* address of item */ X`125 item`091MAXITEMS`093; X Xglobalvalue LASER$_MAXITEMS;`009`009/* exit statuses found in laser_err */ Xglobalvalue LASER$_ITEMNOTFOUND; Xglobalvalue LASER$_STREAMNOTSTART; Xglobalvalue LASER$_TOOMANYTABS; Xglobalvalue LASER$_FLUSHED; Xglobalvalue LASER$_SETUPNOTFOUND; Xglobalvalue LASER$_NOMEMORY; X Xint`009ii = 0;`009`009`009`009/* item index */ Xint`009start_task = FALSE;`009`009/* start task flag */ Xint`009stop_task;`009`009`009/* stop task flag */ Xint`009stop_reason;`009`009`009/* stop task reason code */ Xint`009spooled_file;`009`009`009/* TRUE if spooled file */ Xint`009laser_efn;`009`009`009/* laser read event flag */ Xint`009startpage;`009`009`009/* task start page */ Xint`009endpage;`009`009`009/* task end page */ Xint`009jobstart;`009`009`009/* job start page */ Xint`009ascii;`009`009`009`009/* TRUE if ascii main file */ Xint`009hex;`009`009`009`009/* TRUE if hexified main file */ Xint`009string;`009`009`009`009/* TRUE if string main file */ Xint`009status_idle;`009`009`009/* TRUE if idle status received */ Xint`009patchneeded = FALSE;`009`009/* TRUE if patch module sent */ Xshort`009laserchan = 0;`009`009`009/* laserwriter channel */ Xunsigned short laser_iosb`0914`093;`009`009/* laser read iosb */ Xchar`009laser_buf`0911024`093;`009`009/* laser read buffer */ Xstruct`009FAB main_fab;`009`009`009/* main file rms stuff */ Xstruct`009NAM main_nam; Xstruct`009RAB main_rab; Xstruct`009FAB log_fab;`009`009`009/* log file rms stuff */ Xstruct`009RAB log_rab; Xstruct dsc$descriptor_d library_spec = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, V 0`125; Xstruct`009dsc$descriptor_d buffer_des = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, V 0`125; Xstruct`009dsc$descriptor_d savelog = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0` V125; Xint`009userlog = -1;`009`009`009/* user log file */ Xstruct dsc$descriptor_s device = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`125; X Xstruct `123`009`009`009`009/* operator message to printer */ X char type; X char target; X short fill; X long id; X char text`091255`093; X`125 msg = `123OPC$_RQ_RQST, OPC$M_NM_PRINT, 0, 0`125; X Xstruct dsc$descriptor_s oprmsg_dsc =`032 X`009`1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, &msg`125; X X Xmain() X`123 X int stat; X`009 X preset();`009`009`009`009/* initialize symbiont */ X`009 X do `123 X X`009while (!start_task) `123`009`009/* wait for start_task */ X`009 stat = sys$hiber(); X`009 checkstat(stat,"wait start_task"); X`009`125 X X`009processtask();`009`009`009/* do a job */ X `125 while (TRUE); X`125 X X X/**`009check_operator - checks for a laserwriter message that should X*`009`009`009 go to the operator. X*`009returns TRUE if message sent to operator. X*/ Xcheck_operator() X`123 X int i, j; X +-+-+-+-+-+-+-+- END OF PART 3 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+ X if (strncmp(laser_buf,"%%`091 PrinterError:", 17) == 0) `123 X X`009if (strlen(laser_buf) > 255) return FALSE; /* check max */ X X`009sprintf(msg.text, "%s: ", device.dsc$a_pointer); X`009j = strlen(msg.text); X`009for (i = 0; i < strlen(laser_buf); i++)`032 X`009 msg.text`091i+j`093 = laser_buf`091i`093; X`009oprmsg_dsc.dsc$w_length = strlen(laser_buf) + 8; X X`009sys$sndopr(&oprmsg_dsc, 0); X`009return TRUE; X `125 X`009 X if (strncmp(laser_buf, "%%`091 status: ", 12) == 0) `123 X`009if (strncmp(laser_buf, "%%`091 status: idle `093%%", 20) == 0) `123 X`009 status_idle = TRUE; X`009 sys$wake(0,0); X`009`125 X`009return TRUE; X `125 X X if (strncmp(laser_buf, "%%`091 patch needed `093%%", 20) == 0) `123 X`009patchneeded = TRUE; X`009return TRUE; X `125 X X if (strncmp(laser_buf, "%%`091 start page #=", 17) == 0) `123 X`009sscanf(&laser_buf`09117`093, "%d", &startpage); X`009if (startpage == 0) `009`009/* if bogus printer */ X`009 startpage = 1;`009`009 X`009sys$wake(0,0);`009`009`009/* wakeup sync waiting */ X`009return TRUE; X `125 X`009 X if (strncmp(laser_buf, "%%`091 end page #=", 17) == 0) `123 X`009sscanf(&laser_buf`09117`093, "%d", &endpage); X`009if (endpage == 0)`009`009/* if bogus printer */ X`009 endpage = 1; X`009sys$wake(0,0);`009`009`009/* wakeup sync waiting */ X`009return TRUE; X `125 X X /* Abort the job if we see "%%`091 Flushing:"`009`009 */ X /* Don't override an already existing stop_reason condition */ X X if (strncmp(laser_buf, "%%`091 Flushing:", 13) == 0) `123 X`009if (stop_reason == 0) stop_reason = LASER$_FLUSHED; X`009return FALSE;`009`009`009/* write in log */ X `125 X`009 X return FALSE; X`125 X X X/**`009checkspooled - check for a spooled file. X* X*`009If the filename has "`091`093_" in it, then this is a spooled file X*`009that the user wants to specify the form name for. Further, X*`009if the extension starts with "_", then it contains the X*`009user parameter list. We forge the item list to make things X*`009look right. X*/ Xcheckspooled() X`123 X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X struct dsc$descriptor_d dynd = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0`12 V5; X char *cp, *pp, spoolfile`091255`093; X int len, i, stat; X int ourindex; X char setup`091257`093;`009`009`009/* where to put setup name */ X long iosb`0912`093;`009`009`009/* for $getquiw */ X short setupl;`009`009`009/* returned length of setup */ X struct `123`009`009`009`009/* item list for $getquiw */ X`009short`009l1; X`009short`009c1; X`009char`009*b1; X`009long`009*r1; X`009short`009l2; X`009short`009c2; X`009char`009*b2; X`009long`009*r2; X`009long`009end; X `125 itmlst = `1230, QUI$_SEARCH_NAME, 0, 0, X`009`009 sizeof(setup)-1, QUI$_FORM_SETUP_MODULES, setup, &setupl, X`009`009 0`125; X X spooled_file = FALSE; X`009 X /* get the file specification */ X X if (!getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, FALSE)) return; X`009 X strncpy(spoolfile, temp.dsc$a_pointer, temp.dsc$w_length); X spoolfile`091temp.dsc$w_length`093 = 0; X`009`009 X /* check for "`091`093", then "_" */ X`009 X if (!(cp = strchr(spoolfile, '`091'))) return; X if (!(*++cp == '`093')) return; X spooled_file = TRUE;`009`009/* file is spooled */ X if (!(*++cp == '_')) return; X`009 X /* find the extension and terminate the name string */`009 X`009 X if (!(pp = strchr(cp, '.'))) return; X *pp = 0; X cp++; X X /* translate the form name into setup module names */ X /* If it won't translate, then pass on the form name */ X X itmlst.l1 = strlen(cp);`009`009/* point to name */ X itmlst.b1 = cp; X stat = sys$getquiw(0, QUI$_DISPLAY_FORM, 0, &itmlst, iosb, 0, 0); X checkstat(stat, "getquiw"); X if ((iosb`0910`093 & 1) != 1) `009`009/* if no translation */ X`009strcpy(setup, cp); X else X`009setup`091setupl`093 = 0; X X /* forge the file setup module to have our setup module name */ X /* Note that the forge transfers the dynamic string "dynd" to "item" */ X X ourindex = findandclritem(SMBMSG$K_FILE_SETUP_MODULES); X dynd.dsc$w_length = 0;`009`009/* get dynamic string */ X dynd.dsc$a_pointer = 0; X len = strlen(setup); X str$copy_r(&dynd, &len, setup); X item`091ourindex`093.item_size = dynd.dsc$w_length; /* complete forge */ X item`091ourindex`093.buffer = dynd.dsc$a_pointer; X X /* forge the form name to have our form name */ X`009 X ourindex = findandclritem(SMBMSG$K_FORM_NAME); X dynd.dsc$w_length = 0;`009`009/* get dyamic string */ X dynd.dsc$a_pointer = 0; X len = strlen(cp);`009`009`009/* pointer to form name */ X str$copy_r(&dynd, &len, cp); X item`091ourindex`093.item_size = dynd.dsc$w_length; /* complete forge */ X item`091ourindex`093.buffer = dynd.dsc$a_pointer; X`009 X /* now check to see if there are parameters */ X X cp = ++pp;`009`009`009`009/* set extension address */ X if (pp = strchr(cp,';')) *pp = 0;`009/* terminate at ";" */ X`009 X for (i = 0; i < 8; i++) `123 X`009if (*cp != '_') return;`009`009/* check next char */ X`009cp++;`009`009`009`009/* advance over it */ X X`009/* if there is another _, point to it, else point to the */ X`009/* end of the string `009`009`009`009`009 */ X`009if ((pp = strchr(cp,'_')) == 0) pp = cp + strlen(cp); X X`009len = pp - cp;`009`009`009/* find length of string */ X`009if (len == 0) continue;`009`009/* if null parameter */ X X`009/* forge the item */ X`009ourindex = findandclritem(SMBMSG$K_PARAMETER_1+i); X`009dynd.dsc$w_length = 0;`009`009/* get dynamic string */ X`009dynd.dsc$a_pointer = 0; X`009str$copy_r(&dynd, &len, cp); X`009item`091ourindex`093.item_size = dynd.dsc$w_length; X`009item`091ourindex`093.buffer = dynd.dsc$a_pointer; X`009`009 X`009cp = pp; X `125 X`125 X`009`009 X`009 X/**`009findandclritem - find and clear item. X* X*`009Finds an item in the item list. Releases the dynamic string X*`009for that item. If the item doesn't exist in the item list, X*`009create it. X* X*`009return:`009index to item in item list X*/ Xfindandclritem(whichitem) Xint whichitem; X`123 X int i; X struct dsc$descriptor_d temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0`12 V5; X X for (i = 0; i < ii; i++) `123`009`009/* search item list */ X`009if (whichitem == item`091i`093.item_code) break; X `125 X`009 X if (i == ii) `123`009`009`009/* if end of list */ X`009if (++ii > MAXITEMS) exit(LASER$_MAXITEMS); /* new item */ X`009item`091i`093.item_code = whichitem; X`009item`091i`093.item_size = 0; X`009item`091i`093.buffer = 0; X`009return i;`009`009`009/* return index */ X `125 X X temp.dsc$w_length = item`091i`093.item_size; /* release string */ X temp.dsc$a_pointer = item`091i`093.buffer; X str$free1_dx(&temp); X item`091i`093.buffer = 0; X return i; X`125 X X X/**`009checkstat - check value of system service return. X*/ Xcheckstat(stat, string) Xint stat; Xchar *string; X`123`009 X if (!(stat & 1)) exit(stat); X`125 X X X/**`009closefile - close main file. X*/ Xclosefile() X`123 X int stat; X X stat = sys$close(&main_fab, 0, 0); X /* ignore error */ X`125 X X X/**`009closeuserlog - close user log file. X*/ Xcloseuserlog() X`123 X int stat; X X if (userlog == -1) return;`009`009/* if no log */ X X /* If no records written, set for delete on close */ X`009 X if (userlog == 0) log_fab.fab$l_fop `124= FAB$M_DLT; X X stat = sys$close(&log_fab); X checkstat(stat,"close log"); X`009 X str$free1_dx(&savelog);`009`009/* release saved log */ X X userlog = -1; X`125 X`009 X X/**`009expand_cc - expand PRN carriage control byte. X* X*`009Entry:`009ccb = fab$v_prn byte X*`009Exit:`009commands output to printer X*/ Xexpand_cc(ccb) Xchar ccb;`009`009`009`009/* carriage control byte */ X`123 X int ic, stat, i; X char obuf`09140`093; X X if (ccb == 0) `123 X`009return; X `125 X X if ((ccb & 0x80) == 0) `123`009`009/* output (n) LF, 1 CR */ X`009for (i = 0; i < ccb; i++) WRITELASER("XLF\r\n", 5); X`009WRITELASER("XCR\r\n", 5);`009`009 X `125 X else `123 X`009if ((ccb & 0xe0) != 0xe0) `123`009/* output single character */ X`009 ic = ccb & 0x7f; X`009 expand_line(&ic, obuf, 1); X`009`125 X `125 X`125 X X X/**`009expand_hex - expand buffer into hex bytes. X*/ Xexpand_hex(ibuf, obuf, rsz) Xunsigned char *ibuf;`009`009`009/* pointer to input buffer */ Xchar *obuf;`009`009`009`009/* pointer to output buffer */ Xint rsz;`009`009`009`009/* buffer size */ X`123 X int i, c, stat; X static char hex`091`093 = "0123456789ABCDEF"; X`009 X for (i = 0; i < rsz; i++) `123 X`009obuf`091i*2`093 = hex`091(ibuf`091i`093 & 0xF0) >> 4`093; X`009obuf`091i*2+1`093 = hex`091ibuf`091i`093 & 0xF`093; X `125 X WRITELASER(obuf,rsz*2); X`125 X X`009 X/**`009expand_line - expand input buffer and output result to printer. X* X*`009The ()pop sequences are an obscure hack to fix an obscure bug X*`009with XON/XOFF. It just works. X*/ Xexpand_line(ibuf, obuf, rsz) Xchar *ibuf;`009`009`009`009`009/* input buffer */ Xchar *obuf; Xint rsz;`009`009`009`009`009/* buffer size */ X`123 X int i, d, col, stat; X static int popcount = 0;`009`009/* XON kludge counter */ X`009 X d = 0;`009`009`009`009/* preset destination index */ X col = 0;`009`009`009`009/* preset column */ X X for (i = 0; i < rsz; i++) `123 X`009ibuf`091i`093 &= 0x7f; X`009if (ibuf`091i`093 == 9 ) `009`009`123 /* if tab */ X`009 if (string && (d == 0)) obuf`091d++`093 = '('; /* if first */ X`009 do `123 X`009`009obuf`091d++`093 = ' ';`009/* fill spaces */ X`009`009col++; X`009 `125 while (col & 7); X`009`125 X`009else if ((ibuf`091i`093 == 8) && (col > 0)) `123`009/* if backspace */ X`009 obuf`091d++`093 = 8;`009`009/* insert backspace */ X`009 col--; X`009`125 X`009else if (string && (ibuf`091i`093 == '(')) `123 /* ( */ X`009 if (string && (d == 0)) obuf`091d++`093 = '('; /* if first */ X`009 obuf`091d++`093 = '\\'; X`009 obuf`091d++`093 = '('; X`009 col++; X`009`125 X`009else if (string && (ibuf`091i`093 == ')')) `123 /* ) */ X`009 if (string && (d == 0)) obuf`091d++`093 = '('; /* if first */ X`009 obuf`091d++`093 = '\\'; X`009 obuf`091d++`093 = ')'; X`009 col++; X`009`125 X`009else if (string && (ibuf`091i`093 == '\\')) `123`009/* \ */ X`009 if (string && (d == 0)) obuf`091d++`093 = '('; /* if first */ X`009 obuf`091d++`093 = '\\'; X`009 obuf`091d++`093 = '\\'; X`009 col++; X`009`125 X`009else if (string && (ibuf`091i`093 == 0x0d)) `123 /* CR */ X`009 if (d) `123`009`009`009/* if string to terminate */ X`009`009WRITELASER(obuf,d); X`009`009if (++popcount == 20) `123 X`009`009 popcount = 0; X`009`009 WRITELASER(")XSTR()pop\r\n",12); X`009`009`125 X`009`009else `123 X`009`009 WRITELASER(")XSTR\r\n",7); X`009`009`125 X`009`009d = 0; X`009 `125 X`009 WRITELASER("XCR\r\n",5); X`009`125 X`009else if (string && (ibuf`091i`093 == 0x0a)) `123 /* LF */ X`009 if (d) `123`009`009`009/* if string to terminate */ X`009`009WRITELASER(obuf,d); X`009`009if (++popcount == 20) `123 X`009`009 popcount = 0; X`009`009 WRITELASER(")XSTR()pop\r\n",12); X`009`009`125 X`009`009else `123 X`009`009 WRITELASER(")XSTR\r\n",7); X`009`009`125 X`009`009d = 0; X`009 `125 X`009 WRITELASER("XLF\r\n",5); X`009`125 X`009else if (string && (ibuf`091i`093 == 0x0c)) `123 /* FF */ X`009 if (d) `123`009`009`009/* if string to terminate */ X`009`009WRITELASER(obuf,d); X`009`009if (++popcount == 20) `123 X`009`009 popcount = 0; X`009`009 WRITELASER(")XSTR()pop\r\n",12); X`009`009`125 X`009`009else `123 X`009`009 WRITELASER(")XSTR\r\n",7); X`009`009`125 X`009`009d = 0; X`009 `125 X`009 WRITELASER("XFF\r\n",5); X`009`125 X`009else `123 X`009 if (string && (d == 0)) obuf`091d++`093 = '('; /* if first */ X`009 obuf`091d++`093 = ibuf`091i`093;`009/* move char */ X`009 col++; X`009`125 X `125 X if (string && d) `123 X`009obuf`091d++`093 = ')'; X`009obuf`091d++`093 = 'X'; X`009obuf`091d++`093 = 'S'; X`009obuf`091d++`093 = 'T'; X`009obuf`091d++`093 = 'R'; X`009obuf`091d++`093 = '\r'; X`009obuf`091d++`093 = '\n'; X `125 X WRITELASER(obuf,d); X`125 X X X/**`009getitems - get item list from job controller. X*/ Xgetitems() X`123 X int stat; X int`009context;`009`009`009/* read_message_item context */ X int`009item_code;`009`009`009/* item code */ X unsigned short item_size;`009`009/* item size */ X struct dsc$descriptor_d item_buffer = X`009`1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0`125; X X context = 0;`009`009`009/* init context */ X X /* Save each item in a list */ X`009 X do `123 X`009item_buffer.dsc$a_pointer = 0;`009/* force d string allocation */ X X`009stat = smb$read_message_item(&buffer_des, &context, X`009`009`009`009 &item_code, &item_buffer, &item_size); X X`009item`091ii`093.item_code = item_code; X`009item`091ii`093.item_size = item_size; X`009item`091ii`093.buffer = item_buffer.dsc$a_pointer; X`009if (++ii > MAXITEMS) exit(LASER$_MAXITEMS); X `125 while (stat == SS$_NORMAL); X`125 X X X/**`009getitemdescrip - return item descriptor. X* X*`009return:`009TRUE if item found X*`009`009FALSE if (item not found) && NOT FATAL X*`009`009exit if (item not found) && FATAL X*/ Xgetitemdescrip(code, descrip, fatal) Xint code;`009`009`009`009`009/* item code to search for */ Xstruct dsc$descriptor_s *descrip;`009`009/* pointer to descriptor */ Xint fatal;`009`009`009`009`009/* error severity */ X`123 X int`009i; X X for (i = 0; i < ii; i++) `123 X`009if (item`091i`093.item_code == code) `123 /* if found */ X`009 descrip->dsc$w_length = item`091i`093.item_size; X`009 descrip->dsc$a_pointer = item`091i`093.buffer; X`009 return TRUE; X`009`125 X `125 X if (fatal) exit(LASER$_ITEMNOTFOUND); /* item not in list */ X else return FALSE; X`125 X X X/**`009getcopies - send copy count to laserwriter. X* X*`009Leave this here for now, but unfortunately, if you specify X*`009/copies=n to the print command, the job contoller sends X*`009the file that many times. Not what we want. X*/ Xgetcopies() X`123 X int stat, n; +-+-+-+-+-+-+-+- END OF PART 4 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+ X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X char defcopy`09180`093; X X if (!getitemdescrip(SMBMSG$K_FILE_COPIES, &temp, FALSE)) X`009if (!getitemdescrip(SMBMSG$K_JOB_COPIES, &temp, FALSE)) X`009 return;`009`009`009/* if no copies */ X X n = * (long*) temp.dsc$a_pointer; X if (n == 1) return;`009`009`009/* if only 1 copy */ X sprintf(defcopy, "/#copies %d def\r\n", n); X X WRITELASER(defcopy,strlen(defcopy)); X`125 X X X/**`009getnote - get /note= to laserwriter. X*/ Xgetnote() X`123 X int stat; X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X`009 X if (!getitemdescrip(SMBMSG$K_NOTE, &temp, FALSE)) return; /* none */ X`009 X /* X * KLUDGE ALERT: Multinet LPD puts a /note on its jobs. X * Don't send it to the printer. X */ X if (strncmp(temp.dsc$a_pointer, "Remote LPD request", 18)==0) X`009return; X X WRITELASER(temp.dsc$a_pointer,temp.dsc$w_length); X WRITELASER(&0x0A0D,2);`009`009/* cr-lf */ X`125 X X X/**`009getparams - get user parameters. X*/ Xgetparams() X`123 X int stat; X int i, j; X int first=TRUE; X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X char param`091255`093, str`091255+15`093, *eq; X static $DESCRIPTOR(parser,"PARSER"); X X for (i = 0; i < 8; i++) `123`009`009/* loop for 8 parameters */ X`009if (!getitemdescrip(SMBMSG$K_PARAMETER_1+i, &temp, FALSE)) X`009 continue;`009`009`009/* if no parameter */ X X`009if (temp.dsc$w_length == 0) continue; /* if null string */ X X`009if (first) `123`009`009`009/* if first one */ X`009 first = FALSE; X`009 WRITELASER("/params `091\r\n",11); X`009`125 X X`009strncpy(param, temp.dsc$a_pointer, temp.dsc$w_length); X`009param`091temp.dsc$w_length`093 = 0; X`009`009 X`009for (j= 0; j < strlen(param); j++) /* lowercase string */ X`009 if (isupper(param`091j`093)) param`091j`093 `094= 0x20; X`009`009 X`009/* if there is an = separator (or - for spooled files), use it */ X`009`009 X`009if ((eq = strchr(param, '=')) `124`124 (eq = strchr(param, '-')) X`009 `124`124 (eq = strchr(param, ':'))) `123 X`009 *eq++ = 0;`009`009`009/* bust string in 2 */ X`009 sprintf(str, "(%s) %s\r\n", param, eq); X`009`125 X`009else sprintf(str, "(param%d) %s\r\n", i+1, param); X X`009WRITELASER(str,strlen(str)); X `125 X`009 X if (!first) `123`009`009`009/* if some params found */ X`009WRITELASER("`093 def\r\n",7); X`009writemodule(parser);`009/* write the parser module */ X `125 X`125 X X X/**`009getsetup - get setup module to laserwriter. X* X*`009return:`009TRUE if no problems with setup module. X*`009 FALSE if setup module nonexistant X*/ Xgetsetup() X`123 X int stat, len; X int library_index; X long txtrfa`0912`093; X char inbuf`091255`093; X struct dsc$descriptor_s inbufdes =`032 X`009`123sizeof(inbuf), DSC$K_DTYPE_T, DSC$K_CLASS_S, inbuf`125; X struct dsc$descriptor_s outbufdes; X struct dsc$descriptor_s key = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`125 V; X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X`009`009 X ascii = TRUE;`009`009`009/* assume main file is ascii */ X hex = FALSE; X string = FALSE; X X /* Try for a file setup module first, then a form setup module. For no Vw, X`009we only support one setup module, the first found. We should support X`009lists of setup modules, and all found. */ X`009 X if (!getitemdescrip(SMBMSG$K_FILE_SETUP_MODULES, &key, FALSE)) X`009if (!getitemdescrip(SMBMSG$K_FORM_SETUP_MODULES, &key, FALSE)) X`009 return TRUE;`009`009/* if no setup */ X X if (key.dsc$w_length == 0) return TRUE; /* if no setup */ X`009 X /* Get out if no library. Error because the user specified a setup. */ X X if (library_spec.dsc$a_pointer == 0) `123 X`009stop_reason = LASER$_SETUPNOTFOUND; X`009return FALSE; X `125 X X /* Check to see if the setup module ends in _HEX or _STR */ X X if (key.dsc$w_length >= 4)`123 X`009if (strncmp(&key.dsc$a_pointer`091key.dsc$w_length-4`093,"_HEX", 4) == 0 V)`123 X`009 ascii = FALSE; X`009 hex = TRUE; X`009`125 X`009 `032 X`009if (strncmp(&key.dsc$a_pointer`091key.dsc$w_length-4`093,"_STR", 4) == 0 V)`123 X`009 ascii = FALSE; X`009 string = TRUE; X`009`125 X `125 `032 X `032 X /* if this is the setup module HEADERS, assume it needs to have the fil Ve X`009name defined. */ X X if (strncmp(key.dsc$a_pointer, "HEADERS", 7) == 0) `123 X`009if (!spooled_file) `123 X`009 getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, TRUE); X`009 strcpy(inbuf, "/filename ("); X`009 strncat(inbuf, temp.dsc$a_pointer, temp.dsc$w_length); X`009 strcat(inbuf, ") def\r\n"); X`009 WRITELASER(inbuf,strlen(inbuf)); X`009`125 X X`009/* Also send the form name if it exists */ X X`009if (getitemdescrip(SMBMSG$K_FORM_NAME, &temp, FALSE)) `123 X`009 strcpy(inbuf, "/formname ("); X`009 strncat(inbuf, temp.dsc$a_pointer, temp.dsc$w_length); X`009 strcat(inbuf, ") def \r\n"); X`009 WRITELASER(inbuf,strlen(inbuf)); X`009`125 X `125 X`009 X /* Send the setup module */ X X if (!writemodule(key)) `123 X`009stop_reason = LASER$_SETUPNOTFOUND; X`009return FALSE; X `125 X`009 X return TRUE; X`125 X X X/**`009inititems - initialize item list. X*/ Xinititems() X`123 X int`009i; X X for (i = 0; i < MAXITEMS; i++) item`091i`093.buffer = 0; X`125 X X X/**`009initsymb - initialize printer symbiont. X*/ Xinitsymb() X`123 X int stat; X X stat = smb$initialize(&SMBMSG$K_STRUCTURE_LEVEL, jobctl_ast, 0); X checkstat(stat, "initsymb"); X`125 X X X/**`009jobctl_ast - ast routine called by the job controller. X*/ Xvoid jobctl_ast() X`123`009 X int`009stat; X int`009request;`009`009`009/* jobctl request */ X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X X stat = smb$read_message(&0, &buffer_des, &request); X if (stat != SS$_NORMAL) exit(stat); X X /* Process the request */ X X switch (request) `123 X`009`009 X case SMBMSG$K_START_STREAM: X`009getitems(); X`009startstream(); X`009break; X X case SMBMSG$K_START_TASK: X`009getitems(); X`009start_task = TRUE; X`009stop_task = 0; X`009stop_reason = 0; X`009break; X X case SMBMSG$K_RESUME_TASK: X`009getitems(); X`009break; X X case SMBMSG$K_RESET_STREAM: X`009resetstream(); X`009break; X X case SMBMSG$K_STOP_STREAM: X`009stopstream(); X`009break; X X case SMBMSG$K_PAUSE_TASK: X`009break; X X case SMBMSG$K_STOP_TASK: X`009getitems(); X`009getitemdescrip(SMBMSG$K_STOP_CONDITION, &temp, TRUE); X`009stop_task = * (long*) temp.dsc$a_pointer; X`009break; X `125 X sys$wake(0,0); X`125 X X X/**`009laser_read_ast - laser read ast completion routine. X*/ Xvoid laser_read_ast(param) Xint param; X`123 X int iosb_stat; X X iosb_stat = laser_iosb`0910`093; X if (iosb_stat == 0) return;`009`009/* if incomplete io (?) */ X if ((iosb_stat == SS$_ABORT) `124`124 X`009(iosb_stat == SS$_CANCEL) `124`124 X`009(iosb_stat == SS$_DATAOVERUN)) return; X if (iosb_stat != SS$_NORMAL) exit(iosb_stat); /* if error */ X X if (laser_iosb`0911`093) `123`009`009/* if bytes in buffer */ X`009laser_buf`091laser_iosb`0911`093`093 = 0;`009/* terminate string */ X`009if (!check_operator()) `009writeuserlog(); X `125 X X postlaserread();`009`009`009/* issue next read */ X`125 X X X/**`009openfile - open the main file. X* X*`009return:`009FALSE if open problems. X*/ Xopenfile() X`123 X int stat; X#ifdef notdef X int objtype; X#endif X X#ifdef notdef X struct `123 X`009short code; X`009short buflen; X`009long bufaddr; X`009long retlenadr; X `125 itmlst = `123CHP$_END, 0, 0, 0`125; X#endif X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X#ifdef notdef X struct dsc$descriptor_s temp2 = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`1 V25; X struct dsc$descriptor_s temp3 = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`1 V25; X#endif X struct dsc$descriptor_s fid = X`009`12328, DSC$K_DTYPE_T, DSC$K_CLASS_S, main_nam.nam$t_dvi`125; X X getitemdescrip(SMBMSG$K_FILE_IDENTIFICATION, &temp, TRUE); X X#ifdef notdef X getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp2, TRUE); X getitemdescrip(SMBMSG$K_USER_NAME, &temp3, TRUE); X objtype = ACL$C_FILE; X stat = sys$check_access(&objtype, &temp2, &temp3, &itmlst); X if (!(stat & 1)) `123`009`009`009/* if access error */ X`009stop_reason = stat; X`009return FALSE; X `125 X#endif X `032 X main_fab = cc$rms_fab;`009`009/* init fab */ X main_fab.fab$l_nam = &main_nam;`009/* use NAM to open by FID */ X main_fab.fab$l_fop `124= FAB$M_NAM; X`009 X main_nam = cc$rms_nam;`009`009/* init nam */ X str$copy_dx(&fid, &temp); X`009 X stat = sys$open(&main_fab); X if (!(stat & 1)) `123`009`009`009/* if open error */ X`009stop_reason = stat; X`009return FALSE; X `125 X`009 X main_rab = cc$rms_rab;`009`009/* initialize rab */ X main_rab.rab$l_fab = &main_fab; X X stat = sys$connect(&main_rab); X if (!(stat & 1)) `123`009`009`009/* if connect error */ X`009stop_reason = stat; X`009return FALSE; X `125 X return TRUE; X`125 X X X/**`009openuserlog - open user log file. X* X*`009Create a file using the file spec of the file to be printed, X*`009changing the EXT to .LASER_LOG. Try the logical name`032 X*`009LASER$LOG if this does not work (probably a spooled file). X* X*/ Xopenuserlog() X`123 X int stat, i; X struct dsc$descriptor_s temp; X char filename`091256`093, filespec`091255`093, *cp; X X userlog = -1;`009`009`009/* flag not opened yet */ X X log_fab = cc$rms_fab;`009`009/* init fab */ X X /* Build log file name. If a spooled file, prepend the job name and */ X /* put the file in LASER$LOG:`009`009`009`009 */ X`009 X filename`0910`093 = 0; i = 0; X if (spooled_file) `123 X`009getitemdescrip(SMBMSG$K_USER_NAME, &temp, TRUE); X`009strncpy(filename, temp.dsc$a_pointer, temp.dsc$w_length); X`009i = temp.dsc$w_length;`009`009/* trim trailing blanks */ X`009do `123 X`009 filename`091i`093 = 0; X`009 if (filename`091--i`093 != ' ') break; X`009`125 while (i > 0); X`009strcat(filename, "-"); X `125 X X getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, TRUE); X strncpy(filespec, temp.dsc$a_pointer, temp.dsc$w_length); X filespec`091temp.dsc$w_length`093 = 0; X if (spooled_file)`032 X`009cp = strchr(filespec, '`093') + 1; X else`032 X`009cp = filespec; X strcat(filename, cp); X`009 X log_fab.fab$l_dna = filename; X log_fab.fab$b_dns = strlen(filename); X if (spooled_file) `123 X`009log_fab.fab$l_fna = "LASER$LOG:.laser_log;0"; X`009log_fab.fab$b_fns = 22; X `125 X else `123 X`009log_fab.fab$l_fna = ".laser_log;0"; X`009log_fab.fab$b_fns = 12; X `125 X log_fab.fab$b_rfm = FAB$C_VAR; X log_fab.fab$b_rat = FAB$M_CR; X log_fab.fab$w_mrs = 512; X X stat = sys$create(&log_fab); X if (!(stat & 1)) return;`009`009/* if not possible */ X`009 X log_rab = cc$rms_rab;`009`009/* initialize rab */ X log_rab.rab$l_fab = &log_fab; X X stat = sys$connect(&log_rab); X if (!(stat & 1)) return; X`009 X userlog = 0;`009`009`009/* flag open, no records */ X`125 X X X/**`009postlaserread - post non blocking read for laserchan. X*/ Xpostlaserread() X`123 X static int term_block`0912`093 = `1230,-1`125;`009/* end on any control V */ X int stat; X X stat = sys$qio(laser_efn, laserchan, IO$_READPBLK+IO$M_NOECHO, X`009`009 laser_iosb, laser_read_ast, 0, X`009`009 laser_buf, sizeof(laser_buf), 0, term_block, 0, 0); X checkstat(stat, "read qio"); X`125 X X X/**`009preset - preset the symbiont. X*/ Xpreset() X`123 X int stat; X X stat = lib$get_ef(&laser_efn);`009/* allocate event flag */ X`009 X setprivs();`009`009`009`009/* set process privs */ X inititems();`009`009`009/* init item list */ X initsymb();`009`009`009`009/* do jobctl init */ X`125 X`009 X/**`009processtask - process a file. X*/ Xprocesstask() X`123 X int stat, np, request; X int svector`0912`093 = `1231, SS$_NORMAL`125;`009/* stat vector */ X int acctrec`0914`093 = `1230,0,0,0`125;`009`009/* accounting record */ X long ctl; X struct dsc$descriptor_s accounting = X`009`123sizeof(acctrec), DSC$K_DTYPE_T, DSC$K_CLASS_S, acctrec`125; X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X static int assigned = FALSE; X`009 X#if 0 X if (laserchan == 0)`032 X`009exit(LASER$_STREAMNOTSTART); X#endif X`009 X if (!assigned) `123 X`009int n = 0; X X`009/* X`009 * Assign the printer. If already allocated, wait for it. X`009 * Warn the operator if we have to wait too long. X`009 * This should probably exponentially delay longer. X`009 * We wait since we may be sharing the printer with X`009 * other symbionts. X`009 */ X`009stat = sys$assign(&device, &laserchan, 0, 0); X`009while (stat == SS$_DEVALLOC) `123 X`009 if (++n == 4*10) `123`009`009/* if 10 minutes */ X`009`009n = 0; X`009`009sprintf(msg.text, "Still waiting to assign printer: %s",`032 X`009`009`009device.dsc$a_pointer); X`009`009oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); X`009`009sys$sndopr(&oprmsg_dsc, 0); X`009 `125 X X`009 lib$wait(&15.0);`009`009/* 15 secs */ X X`009 stat = sys$assign(&device, &laserchan, 0, 0); X`009`125 X`009if (stat != SS$_NORMAL) `123 X`009 sprintf(msg.text, "Assign printer failed, stat=0x%x dev=%s", X`009`009 stat, device.dsc$a_pointer); X`009 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); X`009 sys$sndopr(&oprmsg_dsc, 0); X`009 exit(stat); X`009`125`009 X X`009set_typeahead(laserchan);`009/* set terminal typeahead */ X`009assigned = TRUE; X `125 X X stat = smb$send_to_jobctl(&0, &SMBMSG$K_START_TASK, 0, 0, 0, 0); X checkstat(stat, "processtask: send to jobctl"); X X getitemdescrip(SMBMSG$K_SEPARATION_CONTROL, &temp, TRUE); X ctl = * (long*) temp.dsc$a_pointer; X X postlaserread();`009`009`009/* post read */ X syncprinter();`009`009`009/* synchronize with printer */ +-+-+-+-+-+-+-+- END OF PART 5 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+ X stop_task = 0;`009`009`009/* again to make sure */ X stop_reason = 0; X checkspooled();`009`009`009/* check for spooled file */ X openuserlog();`009`009`009/* open user log file */ X trailer(0);`009`009`009`009/* flag pages */ X if (!openfile()) goto skip;`009`009/* open main file */ X /*`009getcopies();*/`009`009`009`009/* send copy count */ X getnote();`009`009`009`009/* output possible note */ X getparams();`009`009`009/* get user parameters */ X if (!getsetup()) goto skip;`009`009/* output setup module */ X sendfile();`009`009`009`009/* send main file */ X skip: X closefile();`009`009`009/* close main file */ X trailer(1);`009`009`009`009/* send trailer */ X sendendsequence();`009`009`009/* send end job sequence */ X if (userlog > 0) svector`0911`093 = SS$_CREATED-1; /* if errors logged * V/ X closeuserlog();`009`009`009/* close user log */ X stat = sys$cancel(laserchan);`009/* cancel pending read */ X X if (assigned && X`009((ctl & SMBMSG$M_LAST_FILE_OF_JOB) `124`124 stop_task `124`124 stop_reas Von)) `123 X`009assigned = FALSE; X`009stat = sys$dassgn(laserchan); X `125 X`009 X start_task = FALSE;`009`009`009/* clear flag */ X`009 X np = endpage - startpage;`009`009/* compute page count */ X if (np >0) acctrec`0910`093 = np;`009`009/* if no obvious error */ X X /* If stop_task, we were stopped by the job controller.`009*/ X /* Else, we were stopped by some other error condition`009 */ X X request = SMBMSG$K_TASK_COMPLETE; X if (stop_task) `123`009`009`009/* if task aborted */ X`009request = SMBMSG$K_STOP_TASK; X`009svector`0911`093 = stop_task; X `125 X else if (stop_reason) `123 X`009svector`0911`093 = stop_reason; X `125 X X releaseitems();`009`009`009/* release item list */ X`009 X stat = smb$send_to_jobctl(&0, &request, &accounting, X`009`009`009 0, 0, svector); X checkstat(stat, "processtask: send to jobctl"); X`125 X X X/**`009releaseitems - release item list. X* X*`009release dynamic strings gotten by read_items. X*/ Xreleaseitems() X`123 X int`009i; X struct dsc$descriptor_d temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0`12 V5; X`009 X ii = 0;`009`009`009`009/* clear item index */ X X for (i = 0; i < MAXITEMS; i++) `123 X`009if (item`091i`093.buffer == 0) return; /* if end of list */ X`009temp.dsc$w_length = item`091i`093.item_size; X`009temp.dsc$a_pointer = item`091i`093.buffer; X`009str$free1_dx(&temp); X`009item`091i`093.buffer = 0; X `125 X`125 X X X/**`009resetstream - reset the stream. X*/ Xresetstream() X`123 X int stat; X X stat = smb$send_to_jobctl(&0, &SMBMSG$K_RESET_STREAM, 0, 0, 0, 0); X checkstat(stat, "resetstream: send to jobctl"); X`009 X exit (SS$_NORMAL); X`125 X X X/**`009sendendsequence - send end of job sequence. X*/ Xsendendsequence() X`123 Xstatic char getend`091`093 = `123"\004statusdict begin (%%`091 end page #= V) print \ Xpagecount pstack pop flush end \r\n\004"`125; X X int stat; X int daytim`0912`093;`009`009`009/* quadword time interval */ X int timeoutcount = 0; X int abort_sent = FALSE; X static $DESCRIPTOR(timetowait, "0 :5:00"); /* +5 min */ X`009 X endpage = 0; X X sys$wake(0,0);`009`009`009/* eat pending wakeups */ X sys$hiber();`009`009`009/* (instant return) */ X`009 X WRITELASER(getend,strlen(getend));`009/* write end sequence */ X`009 X do `123 X X`009stat = sys$bintim(&timetowait, daytim); X`009checkstat(stat, "bintim"); X`009stat = sys$schdwk(0, 0, daytim, 0); /* wake up later */ X`009checkstat(stat, "schdwk"); X X`009if (endpage) break;`009`009/* if sync occured */ X`009stat = sys$hiber(); X`009if (endpage) break;`009`009/* if sync occured */ X`009if (stop_task) `123`009`009/* if stop_task requested */ X`009 if (!abort_sent) `123 X`009`009abort_sent = TRUE; X`009`009WRITELASER(&0X03,1);`009/* control-c */ X`009`009lib$wait(&1.0);`009`009/* wait 1 second */ X`009`009WRITELASER(&0X04,1);`009/* end of job */ X`009`009lib$wait(&1.0);`009`009/* wait 1 second */ X`009`009WRITELASER(getend,strlen(getend)); X`009 `125 X`009`125 X`009/* Notify the operator on 10 minute intervals. */ X`009`009 X`009if ((++timeoutcount & 1) == 0) `123 /* if interval */ X`009 sprintf(msg.text, "LaserWriter %s: job possibly hung",`032 X`009`009 device.dsc$a_pointer); X`009 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); X`009 sys$sndopr(&oprmsg_dsc, 0); X`009`125 X`009`009 X `125 while (TRUE); X`009 X stat = sys$canwak(0,0);`009`009/* cancel wakeup requests */ X`125 X X X/**`009sendfile - send the main file to the printer. X*/ Xsendfile() X`123 X#define IBUFSIZE (16384) X#define PREFIX_LEN (1)`009`009`009/* max extra prefix chars */ X int stat, end; X#if 0 X char ibuf`091IBUFSIZE`093;`009`009/* input buffer */ X char obuf`091IBUFSIZE*2+2`093;`009`009/* output buffer */ X#else X char *ibuf; X char *obuf; X#endif X char *cp; X int rsz;`009`009`009`009/* record size */ X char prn_ctl`0912`093;`009`009`009/* PRN file control bytes */ X`009 X ibuf = malloc(IBUFSIZE+PREFIX_LEN);`009/* extra for prefix chars */`032 X obuf = malloc(IBUFSIZE*2 + 2); X if (!ibuf `124`124 !obuf) X`009exit(LASER$_NOMEMORY); X X main_rab.rab$l_ubf = ibuf+PREFIX_LEN; X main_rab.rab$w_usz = IBUFSIZE; X X /*`009For PRN type records, set up a pointer to the carriage control byt Ve */ X /*`009pair, or initialize the control byte pair manually.`009`009 */ X X if (main_fab.fab$b_rat & FAB$M_PRN) `123 X`009if (main_fab.fab$b_fsz == 2) `123 X`009 main_rab.rab$l_rhb = &prn_ctl; /* ptr to PRN ctrl */ X`009`125 X`009else `123 X`009 prn_ctl`0910`093 = 0x01;`009`009/* LF CR before */ X`009 prn_ctl`0911`093 = 0x8d;`009`009/* CR after */ X`009`125 X `125 X X do `123`009`009`009`009/* send the file */ X`009stat = sys$get(&main_rab, 0, 0); /* get a record */ X`009if ((stat == RMS$_EOF) `124`124 (stop_task `124 stop_reason)) break; X`009if (!(stat & 1)) `123`009`009/* if error */ X`009 stop_reason = stat; X`009 break; X`009`125 X X`009rsz = main_rab.rab$w_rsz; X`009`009 X`009/* Process record control. */ X`009`009 X`009cp = ibuf+PREFIX_LEN;`009`009/* Leave room for prefix chs */ X X`009if (ascii `124`124 string) `123 X`009 /* if FTN (Fortran) carriage control */ X`009 if (main_fab.fab$b_rat & FAB$M_FTN) `123 X`009`009if (rsz == 0) `123`009`009/* Null record => blank line */ X`009`009 cp`091rsz++`093 = ' '; X`009`009`125 X`009`009switch(*cp) `123 X`009`009case 0:`009`009`009/* (null) - No CC */ X`009`009 cp++;`009`009/* ignore column 1 */ X`009`009 rsz--; X`009`009 break; X`009`009case '0':`009`009/* 0 - Double Space */ X`009`009 *cp = '\n';`009`009/* 2 LF in front, CR at end */ X`009`009 *--cp = '\n'; `032 X`009`009 rsz++; X`009`009 cp`091rsz++`093 = '\r'; X`009`009 break; X`009`009case '1':`009`009/* 1 - Page Eject */ X`009`009 *cp = '\n'; X`009`009 *--cp = '\f'; X`009`009 rsz++; X`009`009 cp`091rsz++`093 = '\r'; X`009`009 break; X`009`009case '+':`009`009/* + - overprint */ X`009`009 cp++;`009`009/* ignore column 1 */ X`009`009 cp`091rsz-1`093 = '\r'; X`009`009 break; X`009`009case '$':`009`009/* $ - no trailing CC */ X`009`009 *cp = '\r';`009`009/* LF, CR before record */ X`009`009 *--cp = '\n'; `032 X`009`009 rsz++; X`009`009 break; X`009`009 default :`009`009/* space, etc. */ X`009`009 *cp = '\n'; X`009`009 cp`091rsz++`093 = '\r'; X`009`009`125 X X`009 `125 X X`009 /* if implied carriage control */ X`009 if (main_fab.fab$b_rat & FAB$M_CR) `123 X`009`009*--cp = '\n';`009`009/* prefix LF, suffix CR */ X`009`009rsz++; X`009`009cp`091rsz++`093 = '\r'; X`009 `125 X X`009 /* print carriage control. Expand and output`009 */ X`009 /* leading carriage control, then expand trailing */ X`009 /* control to output after the text.`009`009 */ X`009 if (main_fab.fab$b_rat & FAB$M_PRN) `123 X`009`009expand_cc(prn_ctl`0910`093); X`009 `125 X`009`009`009 X`009 expand_line(cp, obuf, rsz); X X`009 if (main_fab.fab$b_rat & FAB$M_PRN) X`009`009expand_cc(prn_ctl`0911`093); X`009`125 X`009`009 X`009if (hex) `123`009`009`009/* if file to be hexified */ X`009 expand_hex(cp, obuf, rsz); X`009`125 X X `125 while (TRUE); X`009 X free(ibuf); X free(obuf);`009 X X if (!ascii) `123 X`009WRITELASER(&0x0A0D,2); X `125 X X /* send abort (`094C) if stop_task, else eof (`094D) */ X`009 X if (string) `123 X`009WRITELASER("EOF\r\n",5); X `125 X X if (stop_task `124 stop_reason)`032 X`009end = 3;`032 X else`032 X`009end = 4; X WRITELASER(&end,1); X`125 X X X/**`009setprivs - set process privs. X*/ Xsetprivs() X`123 X int stat; X static int privs`0912`093 = `123PRV$M_ALLSPOOL+PRV$M_PHY_IO+PRV$M_BYPASS V, 0`125; X X stat = sys$setprv(1, privs, 0, 0); X checkstat(stat, "set privs"); X`125 X X X/**`009set_typeahead. X* X*`009Set /typeahead on the terminal device so characters will be X*`009buffered. X*/ Xset_typeahead(chan) Xint chan;`009`009`009`009`009/* laserwriter channel */ X`123 X int mode`0913`093; X int stat; X X stat = sys$qiow(0, chan, IO$_SENSEMODE, 0, 0, 0, X`009`009 mode, 12, 0, 0, 0, 0); X if (!(stat & 1)) return stat; X`009 X mode`0911`093 &= `126(TT$M_NOTYPEAHD);`009/* clear notypeahead */ X stat = sys$qiow(0, chan, IO$_SETMODE, 0, 0, 0,`009 X`009`009 mode, 12, 0, 0, 0, 0); X X return stat; X`125 X X X/**`009startstream - start the stream. X*/ Xstartstream() X`123 X int`009stat; X static int svector`0912`093 = `1231,0`125;`009/* status vector */ X static char *devname = 0; X X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X`009 X /* save device name for later */ X getitemdescrip(SMBMSG$K_DEVICE_NAME, &device, TRUE); X if (devname) X`009free(devname); X devname = malloc((int) device.dsc$w_length + 1); X if (!devname) X`009exit(LASER$_NOMEMORY); X strncpy(devname, device.dsc$a_pointer, (int) device.dsc$w_length); X devname`091device.dsc$w_length`093 = 0; X device.dsc$a_pointer = devname; X`009 X /* Copy the library file specification, if it exists */ X`009 X if (getitemdescrip(SMBMSG$K_LIBRARY_SPECIFICATION, &temp, FALSE)) X`009str$copy_dx(&library_spec, &temp); X X#if 0 X svector`0911`093 = sys$alloc(&device, 0, 0, 0, 0); X if (svector`0911`093 == SS$_NORMAL)`032 X`009svector`0911`093 = sys$assign(&device, &laserchan, 0, 0); X if (svector`0911`093 != SS$_NORMAL) `123 X`009stat = smb$send_to_jobctl(&0, &SMBMSG$K_START_STREAM, X`009`009`009`009 0, 0, 0, svector); X`009checkstat(stat, "startstream: send to jobctl"); X`009return; X `125 X X set_typeahead(laserchan);`009`009/* set terminal typeahead */ X#endif X`009 X stat = smb$send_to_jobctl(&0, &SMBMSG$K_START_STREAM, X`009`009`009 0, 0, 0, 0); /* ok */ X checkstat(stat, "startstream: send to jobctl"); X`125 X X X/**`009stopstream - stop the stream. X*/ Xstopstream() X`123 X int stat; X X stat = sys$dassgn(laserchan); X checkstat(stat, "stopstream: dassgn"); X laserchan = 0; X X stat = smb$send_to_jobctl(&0, &SMBMSG$K_STOP_STREAM, 0, 0, 0, 0); X checkstat(stat, "stopstream: send to jobctl"); X`009 X exit(SS$_NORMAL); X`125 X X Xstatic char getstart`091`093 = `123"\004\ Xversion (23.0) eq `123 statusdict /Patch1Installed known not `123 \ X(%%`091 patch needed `093%%\n) print `125 if `125 if \ Xstatusdict begin (%%`091 start page #=) print \ Xpagecount pstack pop flush end \r\n\004"`125; X X/**`009syncprinter - get synchronized with printer. X*/ Xsyncprinter() X`123 X int stat; X int daytim`0912`093;`009`009`009/* quadword time interval */ X int timeoutcount; X static $DESCRIPTOR(timetowait, "0 ::10"); /* +10 sec */ X static $DESCRIPTOR(patch, "PATCH"); X int expireindex; X static int expiretime`091`093 =`032 X`009`1231,1*60/10,5*60/10,10*60/10,60*60/10`125; /* notify intervals */ X#define NEXPIRES (sizeof(expiretime)/sizeof(int)) X startpage = 0; X X status_idle = FALSE; X`009 X timeoutcount = 0; X expireindex = 0; X do `123 X`009lib$wait(&1.0);`009`009`009/* wait 1 second */ X`009WRITELASER(&0x14,1);`009`009/* `094T */ X X`009stat = sys$bintim(&timetowait, daytim); X`009checkstat(stat, "bintim"); X`009stat = sys$schdwk(0, 0, daytim, 0); /* wake up later */ X`009checkstat(stat, "schdwk"); X X`009stat = sys$hiber(); X`009if (status_idle) break;`009`009/* if sync occured */ X X`009/* Abort whatever is happening */ X X`009WRITELASER(&0X03,1);`009`009/* control-c */ X`009lib$wait(&1.0);`009`009`009/* wait 1 second */ X`009WRITELASER(&0X04,1);`009`009/* end of job */ X`009lib$wait(&1.0);`009`009`009/* wait 1 second */ X`009`009 X`009/* Notify the operator on 1 minute intervals. */ X`009`009 X`009if (++timeoutcount == expiretime`091expireindex`093) `123 X`009 sprintf(msg.text, "LaserWriter %s offline", device.dsc$a_pointer); X`009 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); X`009 sys$sndopr(&oprmsg_dsc, 0); X`009 timeoutcount = 0;`009`009/* reset counter */ X`009 if (expireindex < (NEXPIRES-1)) expireindex++; X`009`125 X`009`009 X `125 while (TRUE); X`009 X stat = sys$canwak(0,0);`009`009/* cancel wakeup requests */`009 X`009 X timeoutcount = 0; X expireindex = 0; X do `123 X`009WRITELASER(getstart,strlen(getstart)); X X`009stat = sys$bintim(&timetowait, daytim); X`009checkstat(stat, "bintim"); X`009stat = sys$schdwk(0, 0, daytim, 0); /* wake up later */ X`009checkstat(stat, "schdwk"); X X`009stat = sys$hiber(); X`009if (startpage) break;`009`009/* if sync occured */ X X`009/* Notify the operator on 1 minute intervals. */ X`009`009 X`009if (++timeoutcount == expiretime`091expireindex`093) `123 X`009 sprintf(msg.text, "LaserWriter %s offline", device.dsc$a_pointer); X`009 oprmsg_dsc.dsc$w_length = 8 + strlen(msg.text); X`009 sys$sndopr(&oprmsg_dsc, 0); X`009 timeoutcount = 0;`009`009/* reset counter */ X`009 if (expireindex < (NEXPIRES-1)) expireindex++; X`009`125 X`009`009 X `125 while (TRUE); X`009 X stat = sys$canwak(0,0);`009`009/* cancel wakeup requests */ X`009 +-+-+-+-+-+-+-+- END OF PART 6 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 7 -+-+-+-+-+-+-+-+ X /* This looks like a good place to send the patch module */ X X if (patchneeded) `123`009`009`009/* if patch needed */ X`009patchneeded = FALSE; X`009writemodule(patch);`009`009/* write the patch module */ X`009WRITELASER(&4, 1); X `125 X`125 X`009 X X/**`009trailer - issue job trailer. X*/ Xtrailer(which) Xint which;`009`009`009`009`009/* 0 if flag, 1 if trailer */ X`123 X int ctl, stat, stop; X short msglen; X char buf`0911024`093;`009`009`009/* scratch buffer */ X char time`09124`093; X char user`09120`093, job`091255`093, file`091255`093, message`091257`093 V; X char *cp; X static char z = 0; X static $DESCRIPTOR(key, "TRAILER"); X struct dsc$descriptor_s temp = `1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`12 V5; X struct dsc$descriptor_s date=`12323, DSC$K_DTYPE_T, DSC$K_CLASS_S, time` V125; X struct dsc$descriptor_s msgd = X`009`123sizeof(message)-1, DSC$K_DTYPE_T, DSC$K_CLASS_S, message`125; X static struct dsc$descriptor_s zero = X`009`1231, DSC$K_DTYPE_T, DSC$K_CLASS_S, &z`125; X X /* Check to see if we need a trailer. */ X X getitemdescrip(SMBMSG$K_SEPARATION_CONTROL, &temp, TRUE); X ctl = * (long*) temp.dsc$a_pointer; X X /* save page count if first file of job */ X if (ctl & SMBMSG$M_FIRST_FILE_OF_JOB) jobstart = startpage; X`009 X if (which == 0) `123`009`009`009/* if flag page */ X`009if ((ctl & (SMBMSG$M_FILE_FLAG `124 SMBMSG$M_JOB_FLAG)) == 0) /* if no V flags */ X`009 return; X X`009if ((ctl & SMBMSG$M_FILE_FLAG) == 0) /* if job only */ X`009 if ((ctl & SMBMSG$M_FIRST_FILE_OF_JOB) == 0) /* if not first file */ X`009`009return; X `125 X else `123`009`009`009`009/* trailer page */ X`009if (((ctl & (SMBMSG$M_JOB_TRAILER `124 SMBMSG$M_FILE_TRAILER))== 0) && X`009 ((stop_task `124 stop_reason) == 0)) return; X X`009if ((stop_task `124 stop_reason) == 0) /* if no error */ X`009 if ((ctl & SMBMSG$M_FILE_TRAILER) == 0) /* if job only */ X`009`009if ((ctl & SMBMSG$M_LAST_FILE_OF_JOB) == 0) /* if not last file */ X`009`009 return; X `125 X`009 X /* send the trailer module from the library */ X X WRITELASER(&4,1);`009`009`009/* leading EOF */ X if(!writemodule(key)) return; X X getitemdescrip(SMBMSG$K_USER_NAME, &temp, TRUE); X strncpy(user, temp.dsc$a_pointer, temp.dsc$w_length); X user`091temp.dsc$w_length`093 = 0; X X getitemdescrip(SMBMSG$K_JOB_NAME, &temp, TRUE); X strncpy(job, temp.dsc$a_pointer, temp.dsc$w_length); X job`091temp.dsc$w_length`093 = 0; X X getitemdescrip(SMBMSG$K_FILE_SPECIFICATION, &temp, TRUE); X strncpy(file, temp.dsc$a_pointer, temp.dsc$w_length); X file`091temp.dsc$w_length`093 = 0; X X lib$date_time(&date); X time`09123`093 = 0; X X sprintf(buf, X`009 "setuppage (%s) h-job (%s) h-user (%s) h-file (%s) h-time ", X`009 job, user, file, time); X WRITELASER(buf,strlen(buf)); X`009 X /* only print page count on last trailer page */ X`009 X if ((which == 1) && (ctl & SMBMSG$M_LAST_FILE_OF_JOB)) `123 /* if last o Vne */ X`009sprintf(buf, "(%d) h-pages ", jobstart); X`009WRITELASER(buf,strlen(buf)); X `125 X`009 X`009 X if ((which == 1) && (stop_task `124 stop_reason)) `123 X`009if (stop_task) stop = stop_task; else stop = stop_reason; X`009msglen = 0;`009`009`009/* in case of error */ X`009stat = sys$getmsg(stop, &msglen, &msgd, 15, 0); X`009checkstat(stat,"$getmsg"); X`009message`091msglen`093 = 0; X`009sprintf(buf, "(%s) h-error ", message); X`009WRITELASER(buf,strlen(buf)); X `125 X`009 X if (userlog > 0) `123`009`009`009/* if log file */ X`009str$append(&savelog, &zero); X`009for (cp=savelog.dsc$a_pointer; *cp; cp+=strlen(cp)+1) `123 X`009 sprintf(buf, "(%s) h-logline\n", cp); X`009 WRITELASER(buf,strlen(buf)); X`009`125 X `125 X`009 X sprintf(buf, " showpage \004"); X WRITELASER(buf,strlen(buf)); X`125 X X X/**`009writemodule - write module from library. X* X*`009return:`009TRUE if module written, else FALSE. X*/ Xwritemodule(key) Xstruct dsc$descriptor_s key; X`123 X int stat, len; X int library_index; X long txtrfa`0912`093; X char inbuf`091255`093; X struct dsc$descriptor_s inbufdes =`032 X`009`123sizeof(inbuf), DSC$K_DTYPE_T, DSC$K_CLASS_S, inbuf`125; X struct dsc$descriptor_s outbufdes; X X if (library_spec.dsc$a_pointer == 0) return FALSE; X`009 X stat = lbr$ini_control(&library_index, &LBR$C_READ, &LBR$C_TYP_TXT, 0); X checkstat(stat, "ini_control"); X X stat = lbr$open(&library_index, &library_spec, 0, 0, 0, 0, 0); X checkstat(stat, "open"); X X stat = lbr$lookup_key(&library_index, &key, txtrfa); X if ((stat & 1) != 1) `123`009`009/* if bad key */ X`009stat = lbr$close(&library_index); X`009checkstat(stat, "close library"); X`009return FALSE; X `125 X X do `123 X`009stat = lbr$get_record(&library_index, &inbufdes, &outbufdes); X`009if (stat == RMS$_EOF) break; X`009`009 X`009len = outbufdes.dsc$w_length; X`009inbuf`091len++`093 = '\r'; X`009inbuf`091len++`093 = '\n'; X X`009WRITELASER(inbuf,len); X`009`009 X `125 while (1); X X stat = lbr$close(&library_index); X checkstat(stat, "close"); X`125 X X X/**`009writeuserlog - write line to user log file. X*/ Xwriteuserlog() X`123 X int stat; X static struct dsc$descriptor_s temp = X`009`1230, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0`125; X X if (userlog == -1) return;`009`009/* if no log file */ X`009 X sys$setast(0); X`009 X userlog++;`009`009`009`009/* bump flag */ X X log_rab.rab$l_rbf = laser_buf; X log_rab.rab$w_rsz = strlen(laser_buf); X X stat = sys$put(&log_rab, 0, 0); X`009 X if (userlog <= 5) `123`009`009`009/* save first 5 lines */ X`009temp.dsc$w_length = strlen(laser_buf) + 1; /* incl 0 */ X`009temp.dsc$a_pointer = laser_buf; X`009str$append(&savelog, &temp); X `125 X`009 X sys$setast(1); X X checkstat(stat, "write log"); X`125 $ CALL UNPACK LASER.C;1 1344964789 $ create/nolog 'f' X1 LaserWriter X2 Forms XThe following forms are defined for use with the LaserWriter. Parameters Xare passed as follows on the print command: X X /param=(parameter=value,...) X XForm`009`009Parameters X XHEADERS`009`009Print file with filename and page number headers. X`009`009ncopies: Number of copies. (default: 1) X`009`009fsize:`009 Font size in points. (default: 10) X`009`009wide:`009 If true set landscape mode. (default: false) X`009`009title:`009 If false suppress the page headers. (default: true) X`009`009ncolumns: Number of columns. (default: 1) X`009`009linelimit: Max number of lines per page. (default 66)`009 X X`009`009(Under VMS >= 4.4, HEADERS is the default for spooled files) X XLETTER`009`009Same as HEADERS except default title to false. X XLANDSCAPE`009Same as LETTER except default wide to true, fsize to 8. X X2UP`009`009Same as LANDSCAPE except default ncolumns to 2. X XPOST Send a PostScript file to the printer for execution. X XPAINT`009`009Print a MacPaint image. X`009`009ncopies: Number of copies. (default: 1) X`009`009scale:`009 Scale factor. (default: 4, recommended: 1-4)`009 X XBITIMAGE`009Print an uncompressed image. X`009`009ncopies: Number of copies. (default: 1) X`009`009scale:`009 Scale factor. (default: 1) X`009`009xsize: Number of pixels in a row. (default: 512) X`009`009ysize:`009 Number of pixel columns. (default: 512) X`009`009pxlwid:`009 Number of bits in a pixel, default 1, values: 1,2,4,8 X XZETA`009`009Print a zeta plot file. X`009`009ncopies: Number of copies. (default: 1) X`009`009scale:`009 Scale factor. (default: 1) X`009`009zFont: false - selects Helvetica font for internal character X`009`009`009 true - (default) uses Zeta characters X`009`009penscale: Scaling factor for pen point (default: 1) X`009`009usepens: false - (default) ignore alternate pen select X2 Spooling XSpooled file names have the following syntax: X X _FormName._ParameterList X Xwhere ParameterList is a list of parameters separated by "_". Keywords Xare separated from their values with "-". Example: X X $ copy thing.mpt alw:_paint._scale-4_ncopies-5 X X2 Examples X X1. $ PRINT/QUEUE=ALW/FORM=HEADERS/PARAM=(NCOPIES=4,FSIZE=14) STUFF.TXT X Prints 4 copies of STUFF.TXT with a font size of 14. X X2. $ PRINT/QUEUE=ALW/FORM=POST/NOTE="/debug true def" USER.PS X "Prints" (executes) a user's PostScript file. The first line sent X to the printer will be "/debug true def". X X3. $ FORTRAN /LIST=ALW:_LANDSCAPE TEST.FOR X Compile a program, spooling the output to the LaserWriter. X X4. $ PRINT/QUEUE=ALW/FORM=POST USER.PS - X /NOTE="statusdict begin /manualfeed true def end" X Set up to feed the printer manually, by sending the PostScript X command that enables the manual feed option. $ CALL UNPACK LASER.HLP;1 1467837403 $ create/nolog 'f' Xlaser,laser_err,sys$share:vaxcrtl.exe/share $ CALL UNPACK LASER.OPT;1 606016596 $ create/nolog 'f' X`009.Title`009`009LASER error messages X`009.Facility`009LASER,1/prefix=LASER$_ X .Ident`009`009'LASER Version 2.02' X X`009.Severity`009FATAL X`009MAXITEMS`009 X`009ITEMNOTFOUND`009 X`009STREAMNOTSTART`009 X`009TOOMANYTABS`009 X`009FLUSHED`009`009 X`009SETUPNOTFOUND`009 X`009NOMEMORY`009 X X`009.End $ CALL UNPACK LASER_ERR.MSG;1 506812448 $ create/nolog 'f' X#define`009LBR$C_TYP_UNK`0090 X#define`009LBR$C_TYP_OBJ`0091 X#define`009LBR$C_TYP_MLB`0092 X#define`009LBR$C_TYP_HLP`0093 X#define`009LBR$C_TYP_TXT`0094 X#define`009LBR$C_TYP_SHSTB`0095 X#define`009LBR$C_TYP_DECMX`0095 X#define`009LBR$C_TYP_RDEC`009127 X#define`009LBR$C_TYP_USRLW`009128 X#define`009LBR$C_TYP_USRHI`009255 X#define`009LBR$C_FLUSHDATA`0091 X#define`009LBR$C_FLUSHALL`0090 X#define`009LBR$C_MAXRECSIZ`0092048 X#define`009LBR$C_PAGESIZE`009512 X#define`009LBR$C_HASHSIZE`009512 X#define`009LBR$C_TEXTPAGE`009508 X#define`009LBR$C_DEXTQ`00950 X#define`009LBR$C_MAXCTL`00916 X#define`009LBR$C_MAXHDRSIZ`009128 X#define`009LBR$C_DEFENTALL`009300 X#define`009LBR$C_RETRYOPEN`00930 X#define`009LBR$C_RETRYWAIT`0091 X#define`009LBR$C_MINREAD`0092 X#define`009LBR$C_MAXREAD`00950 X#define`009LBR$C_MEMXTRA`00950 X#define`009LBR$C_PUTBUFSIZ`00930 X#define`009LBR$C_FLSHBFSIZ`0091 X#define`009LBR$C_MAXIDXRD`00920 X#define`009LBR$C_MAXKEYLEN`009128 X#define`009LBR$C_MAXLUHREC`00932768 X#define`009LBR$C_CREATE`0090 X#define`009LBR$C_READ`0091 X#define`009LBR$C_UPDATE`0092 X#define`009LBR$C_MAXFUNC`0092 X#define`009LBR$S_LBRDEF`00916 X#define`009LBR$L_IC_CTLTBL`0094 X#define`009LBR$L_IC_FUNC`0098 X#define`009LBR$L_IC_TYPE`00912 X#define`009LBR$S_LBRDEF1`00932 X#define`009LBR$L_OP_CTLTBL`0094 X#define`009LBR$L_OP_FNS`0098 X#define`009LBR$L_OP_CREOPT`00912 X#define`009LBR$L_OP_DNS`00916 X#define`009LBR$L_OP_RLFNA`00920 X#define`009LBR$L_OP_RNS`00924 X#define`009LBR$L_OP_RNSLEN`00928 X#define`009LBR$S_LBRDEF2`0098 X#define`009LBR$L_CL_CTLTBL`0094 X#define`009LBR$S_LBRDEF3`00912 X#define`009LBR$L_GH_CTLTBL`0094 X#define`009LBR$L_GH_RETARY`0098 X#define`009LBR$S_LBRDEF4`00912 X#define`009LBR$L_SI_CTLTBL`0094 X#define`009LBR$L_SI_IDXNUM`0098 X#define`009LBR$S_LBRDEF5`00916 X#define`009LBR$L_LK_CTLTBL`0094 X#define`009LBR$L_LK_KEYNAM`0098 X#define`009LBR$L_LK_TXTRFA`00912 X#define`009LBR$S_LBRDEF6`00916 X#define`009LBR$L_IK_CTLTBL`0094 X#define`009LBR$L_IK_KEYNAM`0098 X#define`009LBR$L_IK_TXTRFA`00912 X#define`009LBR$S_LBRDEF7`00920 X#define`009LBR$L_RK_CTLTBL`0094 X#define`009LBR$L_RK_KEYNAM`0098 X#define`009LBR$L_RK_OLDRFA`00912 X#define`009LBR$L_RK_NEWRFA`00916 X#define`009LBR$S_LBRDEF8`00912 X#define`009LBR$L_DK_CTLTBL`0094 X#define`009LBR$L_DK_KEYNAM`0098 X#define`009LBR$S_LBRDEF9`00912 X#define`009LBR$L_DD_CTLTBL`0094 X#define`009LBR$L_DD_TXTRFA`0098 X#define`009LBR$S_LBRDEF10`00916 X#define`009LBR$L_GR_CTLTBL`0094 X#define`009LBR$L_GR_BUFDES`0098 X#define`009LBR$L_GR_BUFLEN`00912 X#define`009LBR$S_LBRDEF11`00916 X#define`009LBR$L_PR_CTLTBL`0094 X#define`009LBR$L_PR_BUFDES`0098 X#define`009LBR$L_PR_TXTRFA`00912 X#define`009LBR$S_LBRDEF12`0098 X#define`009LBR$L_PE_CTLTBL`0094 X#define`009LBR$S_LBRDEF13`00920 X#define`009LBR$L_SR_CTLTBL`0094 X#define`009LBR$L_SR_IDXNUM`0098 X#define`009LBR$L_SR_RFA`00912 X#define`009LBR$L_SR_USRTN`00916 X#define`009LBR$S_LBRDEF14`00912 X#define`009LBR$L_SU_KEYDES`0094 X#define`009LBR$L_SU_TXTRFA`0098 X#define`009LBR$S_LBRDEF15`00916 X#define`009LBR$L_GI_CTLTBL`0094 X#define`009LBR$L_GI_IDXNUM`0098 X#define`009LBR$L_GI_USRTN`00912 X#define`009LBR$S_LBRDEF16`00912 X#define`009LBR$L_GU_KEYADR`0094 X#define`009LBR$L_GU_TXTRFA`0098 X#define`009LBR$C_ADDMOD`0091 X#define`009LBR$C_DELMOD`0092 X#define`009LBR$C_REPMOD`0093 X#define`009LBR$S_LBRDEF17`00916 X#define`009LBR$L_AU_CTLTBL`0094 X#define`009LBR$L_AU_FLAGS`0098 X#define`009LBR$L_AU_KEYNAM`00912 X#define`009LBR$S_LBRDEF18`00912 X#define`009LBR$L_GU_CTLTBL`0094 X#define`009LBR$L_GU_USRTN`0098 X#define`009LBR$S_LBRDEF19`0098 X#define`009LBR$L_UU_UPDESC`0094 $ CALL UNPACK LBRDEF.H;1 796729746 $ create/nolog 'f' X%%%`009paint - puts a MacPaint compressed raster file on the laser printer. X% X% X%`009inputs:`009/nc /ncopies /params - number of copies (default 1) X%`009`009/sf /scale /param2 - scale factor (default 4.0) X% X%`00902/18/87 R. Watson Added parser stuff. Speedup mods. X% X X%%`009deCompress . X% X%`009returns a bitimage string on the stack X% X/deCompress X`123 X`009/count getByte byte def`009`009`009% get count X`009/ind 0 def`009`009`009`009% preset index X`009count 16#80 and 0 eq `123`009`009`009% if bit stream X`009`009/count count 1 add def X`009`009outstring 0 count getinterval % get right size string X`009`009inp exch readhexstring`009`009% get bytes X`009`009pop`009`009`009`009% toss readhexstring status X`009`125 X`009`123`009`009`009`009`009% else repeated string X`009`009getByte`009`009`009`009% get byte to repeat X`009`00916#100 count sub 1 add /count exch def% get abs val of count X`009`009count `123 X`009`009`009outstring ind byte put X`009`009`009/ind ind 1 add def`009`009% advance index X`009`009`125 repeat X`009`009outstring 0 count getinterval`009% return string X`009`125 ifelse X`125 def X X X%%`009getByte X% +-+-+-+-+-+-+-+- END OF PART 7 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 8 -+-+-+-+-+-+-+-+ X%`009returns /byte = next input byte X%`009`009 = 0 if no more bytes on input stream X% X/getByte X`123 X`009inp instring readhexstring `123`009`009% if got one X`009`0090 get /byte exch def`009`009% store in byte X`009`125 X`009`123`009`009`009`009`009% else 0 X`009`009pop /byte 0 def X`009`125 ifelse X`125 def X X X%%`009main program X% X/main X`123 X`009/sTime usertime def`009`009`009% save start time X%%% vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestring X%%% 10 20 string cvrs dbg exch writestring dbg ( ) writestring X%%% 10 20 string cvrs dbg exch writestring dbg ( \n) writestrin Vg X%%% flush X`009/iscale 1 scale div def`009`009`009% compute scale factor X`009512 `123 getByte`125 repeat`009`009`009% eat paint header X%`009576 720 1 `091iscale 0.0 0.0 iscale 0.0 0.0`093 `123 deCompress `125 im Vage X`009576 720 true `091iscale 0.0 0.0 iscale 0.0 0.0`093 `123deCompress`125 im Vagemask X%%%`009usertime sTime sub 1000 div 10 20 string cvrs X%%%`009 dbg exch writestring dbg ( seconds ) X%%%`009 writestring X%%% vmstatus 10 20 string cvrs dbg exch writestring dbg ( ) writestring X%%% 10 20 string cvrs dbg exch writestring dbg ( ) writestring X%%% 10 20 string cvrs dbg exch writestring dbg ( \n) writestrin Vg X%%% flush X`009showpage X`009currentfile flushfile`009`009`009% avoid laser_log's X`125 def X X X%%`009executable initialization X% X/inp (%stdin) (r) file def`009`009% define files X/dbg (%stdout) (w) file def X X/table `091 X `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X `091/scale 4.0 (.sf .scale .param2)`093`009`009% scale factor X`093 def X Xtable `123`009`009`009`009`009`009% apply defaults X`009/ta exch def`009`009`009`009% save array X`009ta 0 get`009`009`009`009% key X`009ta 1 get`009`009`009`009% default value X`009def`009`009`009`009`009% define default value X`125 forall X Xcurrentdict /parser known `123parser`125 if`009`009% if user inputs X X/identity matrix def`009`009`009% make an identity matrix X/outstring 128 string def`009`009% storage for output string X/instring 1 string def`009`009`009% input buffer X1 72 mul 10 72 mul moveto currentpoint translate Xcurrentpoint transform`009`009`009% see where we are in device coords Xidentity setmatrix`009`009`009% turn off transformation - switch to X`009`009`009`009`009% device coordinate system Xtranslate`009`009`009`009% move origin to transformed currpt X X/doit `123 X`009`123main`125 stopped `123 (error stack:\n) = pstack flush quit`125 if X`125 def X%doit Xmain $ CALL UNPACK PAINT_HEX.PS;1 1244988067 $ create/nolog 'f' X% Parser takes 2 arguments as input: X% /params is an array of pairs of keyword strings and values: X% `091 (param1) value1 (param2) value2 ... (paramn) valuen`093 X% /table is an array of key/default value/keyword list arrays: X% `091 `091/key1 default1 (.key1 .whatever1)`093 X% `091/key2 default2 (.key2 .whatever2)`093 X% ... `093 X% Parser first defines /key1 to default1, /key2 to default2, etc. X% Then, for each param keyword in /params, it searches the arrays X% in /table for a matching keyword. If found, it sets /key? to`032 X% the value from /params. X X/parser `123 X X% process each keyword value pair in the params array X X`009/pindex 0 def`009`009`009`009`009% preset index X`009`009params length 2 idiv `123 X`009`009params pindex get length 1 add`009`009% build keyword str X`009`009`009string /ks exch def X`009`009ks 1 params pindex get putinterval`009% (.) X`009`009ks 0 46 put X`009`009/ok false def`009`009`009`009% preset flag X`009`009table `123`009`009`009`009`009% for each array X`009`009`009/ta exch def`009`009`009% get the array X`009`009`009`009ta 2 get`009`009% get token string X`009`009`009`009ks search `123`009`009% search for keyword X`009`009`009`009`009pop pop pop`009% flush search stuff X`009`009`009`009`009ta 0 get `009% get key X`009`009`009`009`009params pindex 1 add get % get new value X`009`009`009`009`009def`009`009% set new value X`009`009`009`009`009/ok true def`009% flag keyword found X`009`009`009`009`009exit`009`009% -forall X`009`009`009`009`125 `123 X`009`009`009`009`009pop`009`009% flush failed search X`009`009`009`009`125 ifelse X`009`009`125 forall`009`009`009`009% try next array X`009`009ok not `123`009`009`009`009% if keyword not found X`009`009`009ks = (is not a known parameter) = quit X`009`009`125 if X`009`009/pindex pindex 2 add def`009`009% advance to next pair X`009`125 repeat X`125 def $ CALL UNPACK PARSER.PS;1 1566019224 $ create/nolog 'f' X% The program below may be downloaded to a LaserWriter to correct three X% bugs in the LaserWriter's serial I/O driver: X% X% - occasional failure to send a needed XON X% - erroneously reading past end-of-file (control-D) X% - dropped characters during large volumes of output X% X%! X0000000000 % the exitserver password X Xversion (23.0) ne X `123(Patch not installed -- wrong printer type or version) = stop`125 if Xstatusdict /Patch1Installed known X `123(Patch already installed -- not installed again) = stop`125 if Xserverdict begin exitserver Xstatusdict /Patch1Installed true put Xcurrentfile eexec Xce1b9f428ac69e75cc47a554265ae625851e0154ac649ad44c1c34e4c60a0493 Xa80212a3bd61248f8859cb1252a7320775a6d4ec524bcbf5771aceb8f61ea2fb X48fcb3df8da0f105be40f697239ef0976f92c1d41e915a7389200a3e896cd955 Xd197ff27f22a617c85bce7ed59ef1a6062d01d0fdee5b4e7d298997638497cc6 Xa2d56a0eacc195795949f515bbbda9cfe899e43ad257da93f3144797b00dbb81 X8a41b4fa56a0295c25e693864084cbb5d63834f1d94a46816d4a2cbe005cc57c X38491a6a34cfbdef303ed8731dbbe84dc6f8e1e790f3d89360d063639c8411fd X89ad7c53d1b9732bd0942bc36257208d24792ea7c66790b6104c3a2b794a1460 Xc476ffdb5552f428f457b47319cccb0c9980036402eaca80c0b5e0ccb5f579df X09cc6f382b536aa64da7152356c377a5b708a378e855a7ec3eccd848d5508dbf X5c7bd28c2899e9cfd7f4ff3d7ddc08006cce42b2d8c59ef64af8ec74a2f9d23f Xe8d4d03ba1e2686138fffc2af9c662c994ec8065a32144ba9ac5002623b39012 X521eb49cd829c3506af2895bf275367eb4d31908b14f3b1e0abfaca2f98eb9d8 X8d84ac8271ef44def53d8207ce9653d598fe8046120f223bfca0b5c74a54f70b Xeb5a0bc09d8e79742048b875864a3b489eb91c09b701f506e994271a6640f78a Xd131f1eef3c96e546f7273fb3533799a6470be2ed3b8f2e211bf9f9f209edbd2 X36c19d4b0b3f28ab16c39faa17070699543c212c76081961c949ebd32ada3c93 Xccdc56c2c940a2061bc11794a0159cc37255aa8c8e7e08d78f204161f1eccb7d Xad3313b737e921b7df1fe794e9a7fc2226702ee555ceb8e803a20ebeaa440a40 X9e1f1a72412586e3071292b10e938e7f386b8e6516758633bab57223e071b1de X8c4b73cafababc0af7bc902e8763a2817861591d7ee98f85bc28ad0ea4d13660 Xd3256aa293df1959b7b57b13edee653cfdda2fafe0698898dc5e371ca4c5b72b Xb92750d0eea5e74955712b06958663f424a46cf75a797590f0d2a36842fe07e3 Xdb459215dab6e461a4c3fbb40ee2499af3fe4b13790de87e11afde6aadd12e77 Xd84d8076146d797269c9188d8fb725898aee284e62c472e0e7b585ef3fed434c X000b0bb70ad6806e840cfe872ec3f28782dd08b70d29c2da2187e2dc0f13dfc0 X89f75344e3dad78a1c9b909fc72bdd92421afdc8b80850ff0d43605edfd9be56 Xd81cb17250ce7208354548f6ccc62366e8196d4adeb2d24fd5ce47bb6295fa72 Xc361197cafacbd51efd36dfa59c6f8e6cab8915a8043d609eb64726de86080d2 X4118cc69e01eab0f4ef1f364c815f306d5f43420cf7c9316e5ee69c7183dd8d2 X805a9dfe6abb33c46d3a212d5c6b6fd68418eef971 $ CALL UNPACK PATCH.PS;1 141829840 $ create/nolog 'f' X% this is so that spooling to _ps will work. $ CALL UNPACK PS.PS;1 571683189 $ create/nolog 'f' X#define`009QUI$_CANCEL_OPERATION`0091 X#define`009QUI$_DISPLAY_CHARACTERISTIC`0092 X#define`009QUI$_DISPLAY_FILE`0093 X#define`009QUI$_DISPLAY_FORM`0094 X#define`009QUI$_DISPLAY_JOB`0095 X#define`009QUI$_DISPLAY_QUEUE`0096 X#define`009QUI$_TRANSLATE_QUEUE`0097 X#define`009QUI$_RESERVED_FUNC_1`0098 X#define`009QUI$_RESERVED_FUNC_2`0099 X#define`009QUI$_ACCOUNT_NAME`0091 X#define`009QUI$_AFTER_TIME`0092 X#define`009QUI$_ASSIGNED_QUEUE_NAME`0093 X#define`009QUI$_BASE_PRIORITY`0094 X#define`009QUI$_CHARACTERISTIC_NAME`0095 X#define`009QUI$_CHARACTERISTIC_NUMBER`0096 X#define`009QUI$_CHARACTERISTICS`0097 X#define`009QUI$_CHECKPOINT_DATA`0098 X#define`009QUI$_CLI`0099 X#define`009QUI$_COMPLETED_BLOCKS`00910 X#define`009QUI$_CONDITION_VECTOR`00911 X#define`009QUI$_CPU_DEFAULT`00912 X#define`009QUI$_CPU_LIMIT`00913 X#define`009QUI$_DEVICE_NAME`00914 X#define`009QUI$_ENTRY_NUMBER`00915 X#define`009QUI$_FILE_COPIES`00916 X#define`009QUI$_FILE_COPIES_CHKPT`00917 X#define`009QUI$_FILE_COPIES_DONE`00918 X#define`009QUI$_FILE_FLAGS`00919 X#define`009QUI$_FILE_SETUP_MODULES`00920 X#define`009QUI$_FILE_SPECIFICATION`00921 X#define`009QUI$_FILE_STATUS`00922 X#define`009QUI$_FIRST_PAGE`00923 X#define`009QUI$_FORM_DESCRIPTION`00924 X#define`009QUI$_FORM_FLAGS`00925 X#define`009QUI$_FORM_LENGTH`00926 X#define`009QUI$_FORM_MARGIN_BOTTOM`00927 X#define`009QUI$_FORM_MARGIN_LEFT`00928 X#define`009QUI$_FORM_MARGIN_RIGHT`00929 X#define`009QUI$_FORM_MARGIN_TOP`00930 X#define`009QUI$_FORM_NAME`00931 X#define`009QUI$_FORM_NUMBER`00932 X#define`009QUI$_FORM_SETUP_MODULES`00933 X#define`009QUI$_FORM_STOCK`00934 X#define`009QUI$_FORM_WIDTH`00935 X#define`009QUI$_GENERIC_TARGET`00936 X#define`009QUI$_INTERVENING_BLOCKS`00937 X#define`009QUI$_INTERVENING_JOBS`00938 X#define`009QUI$_JOB_COPIES`00939 X#define`009QUI$_JOB_COPIES_CHKPT`00940 X#define`009QUI$_JOB_COPIES_DONE`00941 X#define`009QUI$_JOB_FLAGS`00942 X#define`009QUI$_JOB_LIMIT`00943 X#define`009QUI$_JOB_NAME`00944 X#define`009QUI$_JOB_RESET_MODULES`00945 X#define`009QUI$_JOB_SIZE`00946 X#define`009QUI$_JOB_SIZE_MAXIMUM`00947 X#define`009QUI$_JOB_SIZE_MINIMUM`00948 X#define`009QUI$_JOB_STATUS`00949 X#define`009QUI$_LAST_PAGE`00950 X#define`009QUI$_LIBRARY_SPECIFICATION`00951 X#define`009QUI$_LOG_QUEUE`00952 X#define`009QUI$_LOG_SPECIFICATION`00953 X#define`009QUI$_NOTE`00954 X#define`009QUI$_OPERATOR_REQUEST`00955 X#define`009QUI$_OWNER_UIC`00956 X#define`009QUI$_PAGE_SETUP_MODULES`00957 X#define`009QUI$_PARAMETER_1`00958 X#define`009QUI$_PARAMETER_2`00959 X#define`009QUI$_PARAMETER_3`00960 X#define`009QUI$_PARAMETER_4`00961 X#define`009QUI$_PARAMETER_5`00962 X#define`009QUI$_PARAMETER_6`00963 X#define`009QUI$_PARAMETER_7`00964 X#define`009QUI$_PARAMETER_8`00965 X#define`009QUI$_PRIORITY`00966 X#define`009QUI$_PROCESSOR`00967 X#define`009QUI$_PROTECTION`00968 X#define`009QUI$_QUEUE_FLAGS`00969 X#define`009QUI$_QUEUE_NAME`00970 X#define`009QUI$_QUEUE_STATUS`00971 X#define`009QUI$_REFUSAL_REASON`00972 X#define`009QUI$_REQUEUE_PRIORITY`00973 X#define`009QUI$_REQUEUE_QUEUE_NAME`00974 X#define`009QUI$_SCSNODE_NAME`00975 X#define`009QUI$_SEARCH_FLAGS`00976 X#define`009QUI$_SEARCH_NAME`00977 X#define`009QUI$_SEARCH_NUMBER`00978 X#define`009QUI$_SUBMISSION_TIME`00979 X#define`009QUI$_UIC`00980 X#define`009QUI$_USERNAME`00981 X#define`009QUI$_WSDEFAULT`00982 X#define`009QUI$_WSEXTENT`00983 X#define`009QUI$_WSQUOTA`00984 X#define`009QUI$_RESERVED_BOOLEAN_1`00985 X#define`009QUI$_RESERVED_BOOLEAN_2`00986 X#define`009QUI$_RESERVED_INPUT_1`00987 X#define`009QUI$_RESERVED_INPUT_2`00988 X#define`009QUI$_DEFAULT_FORM_NAME`00989 X#define`009QUI$_DEFAULT_FORM_NUMBER`00990 X#define`009QUI$_DEFAULT_FORM_STOCK`00991 X#define`009QUI$_JOB_PID`00992 X#define`009QUI$_RESERVED_OUTPUT_5`00993 X#define`009QUI$_RESERVED_OUTPUT_6`00994 X#define`009QUI$M_FILE_BURST`0091 X#define`009QUI$M_FILE_BURST_EXP`0092 X#define`009QUI$M_FILE_DELETE`0094 X#define`009QUI$M_FILE_DOUBLE_SPACE`0098 X#define`009QUI$M_FILE_FLAG`00916 X#define`009QUI$M_FILE_FLAG_EXP`00932 X#define`009QUI$M_FILE_TRAILER`00964 X#define`009QUI$M_FILE_TRAILER_EXP`009128 X#define`009QUI$M_FILE_PAGE_HEADER`009256 X#define`009QUI$M_FILE_PAGINATE`009512 X#define`009QUI$M_FILE_PASSALL`0091024 X#define`009QUI$M_FILE_PAGINATE_EXP`0092048 X#define`009QUI$V_FILE_BURST`0090 X#define`009QUI$V_FILE_BURST_EXP`0091 X#define`009QUI$V_FILE_DELETE`0092 X#define`009QUI$V_FILE_DOUBLE_SPACE`0093 X#define`009QUI$V_FILE_FLAG`0094 X#define`009QUI$V_FILE_FLAG_EXP`0095 X#define`009QUI$V_FILE_TRAILER`0096 X#define`009QUI$V_FILE_TRAILER_EXP`0097 X#define`009QUI$V_FILE_PAGE_HEADER`0098 X#define`009QUI$V_FILE_PAGINATE`0099 X#define`009QUI$V_FILE_PASSALL`00910 X#define`009QUI$V_FILE_PAGINATE_EXP`00911 X#define`009QUI$M_FILE_CHECKPOINTED`0091 X#define`009QUI$M_FILE_EXECUTING`0092 X#define`009QUI$V_FILE_CHECKPOINTED`0090 X#define`009QUI$V_FILE_EXECUTING`0091 X#define`009QUI$M_FORM_SHEET_FEED`0091 X#define`009QUI$M_FORM_TRUNCATE`0092 X#define`009QUI$M_FORM_WRAP`0094 X#define`009QUI$V_FORM_SHEET_FEED`0090 X#define`009QUI$V_FORM_TRUNCATE`0091 X#define`009QUI$V_FORM_WRAP`0092 X#define`009QUI$M_JOB_CPU_LIMIT`0091 X#define`009QUI$M_JOB_FILE_BURST`0092 X#define`009QUI$M_JOB_FILE_BURST_ONE`0094 X#define`009QUI$M_JOB_FILE_BURST_EXP`0098 X#define`009QUI$M_JOB_FILE_FLAG`00916 X#define`009QUI$M_JOB_FILE_FLAG_ONE`00932 X#define`009QUI$M_JOB_FILE_FLAG_EXP`00964 X#define`009QUI$M_JOB_FILE_TRAILER`009128 X#define`009QUI$M_JOB_FILE_TRAILER_ONE`009256 X#define`009QUI$M_JOB_FILE_TRAILER_EXP`009512 X#define`009QUI$M_JOB_LOG_DELETE`0091024 X#define`009QUI$M_JOB_LOG_NULL`0092048 X#define`009QUI$M_JOB_LOG_SPOOL`0094096 X#define`009QUI$M_JOB_LOWERCASE`0098192 X#define`009QUI$M_JOB_NOTIFY`00916384 X#define`009QUI$M_JOB_RESTART`00932768 X#define`009QUI$M_JOB_WSDEFAULT`00965536 X#define`009QUI$M_JOB_WSEXTENT`009131072 X#define`009QUI$M_JOB_WSQUOTA`009262144 X#define`009QUI$M_JOB_FILE_PAGINATE`009524288 X#define`009QUI$M_JOB_FILE_PAGINATE_EXP`0091048576 X#define`009QUI$V_JOB_CPU_LIMIT`0090 X#define`009QUI$V_JOB_FILE_BURST`0091 X#define`009QUI$V_JOB_FILE_BURST_ONE`0092 X#define`009QUI$V_JOB_FILE_BURST_EXP`0093 X#define`009QUI$V_JOB_FILE_FLAG`0094 X#define`009QUI$V_JOB_FILE_FLAG_ONE`0095 X#define`009QUI$V_JOB_FILE_FLAG_EXP`0096 X#define`009QUI$V_JOB_FILE_TRAILER`0097 X#define`009QUI$V_JOB_FILE_TRAILER_ONE`0098 X#define`009QUI$V_JOB_FILE_TRAILER_EXP`0099 X#define`009QUI$V_JOB_LOG_DELETE`00910 X#define`009QUI$V_JOB_LOG_NULL`00911 X#define`009QUI$V_JOB_LOG_SPOOL`00912 X#define`009QUI$V_JOB_LOWERCASE`00913 X#define`009QUI$V_JOB_NOTIFY`00914 X#define`009QUI$V_JOB_RESTART`00915 X#define`009QUI$V_JOB_WSDEFAULT`00916 X#define`009QUI$V_JOB_WSEXTENT`00917 X#define`009QUI$V_JOB_WSQUOTA`00918 X#define`009QUI$V_JOB_FILE_PAGINATE`00919 X#define`009QUI$V_JOB_FILE_PAGINATE_EXP`00920 X#define`009QUI$M_JOB_ABORTING`0091 X#define`009QUI$M_JOB_EXECUTING`0092 X#define`009QUI$M_JOB_HOLDING`0094 X#define`009QUI$M_JOB_INACCESSIBLE`0098 X#define`009QUI$M_JOB_REFUSED`00916 X#define`009QUI$M_JOB_REQUEUE`00932 X#define`009QUI$M_JOB_RESTARTING`00964 +-+-+-+-+-+-+-+- END OF PART 8 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 9 -+-+-+-+-+-+-+-+ X#define`009QUI$M_JOB_RETAINED`009128 X#define`009QUI$M_JOB_STARTING`009256 X#define`009QUI$M_JOB_TIMED`009512 X#define`009QUI$V_JOB_ABORTING`0090 X#define`009QUI$V_JOB_EXECUTING`0091 X#define`009QUI$V_JOB_HOLDING`0092 X#define`009QUI$V_JOB_INACCESSIBLE`0093 X#define`009QUI$V_JOB_REFUSED`0094 X#define`009QUI$V_JOB_REQUEUE`0095 X#define`009QUI$V_JOB_RESTARTING`0096 X#define`009QUI$V_JOB_RETAINED`0097 X#define`009QUI$V_JOB_STARTING`0098 X#define`009QUI$V_JOB_TIMED`0099 X#define`009QUI$M_QUEUE_BATCH`0091 X#define`009QUI$M_QUEUE_CPU_DEFAULT`0092 X#define`009QUI$M_QUEUE_CPU_LIMIT`0094 X#define`009QUI$M_QUEUE_FILE_BURST`0098 X#define`009QUI$M_QUEUE_FILE_BURST_ONE`00916 X#define`009QUI$M_QUEUE_FILE_FLAG`00932 X#define`009QUI$M_QUEUE_FILE_FLAG_ONE`00964 X#define`009QUI$M_QUEUE_FILE_TRAILER`009128 X#define`009QUI$M_QUEUE_FILE_TRAILER_ONE`009256 X#define`009QUI$M_QUEUE_GENERIC`009512 X#define`009QUI$M_QUEUE_GENERIC_SELECTION`0091024 X#define`009QUI$M_QUEUE_JOB_BURST`0092048 X#define`009QUI$M_QUEUE_JOB_FLAG`0094096 X#define`009QUI$M_QUEUE_JOB_SIZE_SCHED`0098192 X#define`009QUI$M_QUEUE_JOB_TRAILER`00916384 X#define`009QUI$M_QUEUE_RETAIN_ALL`00932768 X#define`009QUI$M_QUEUE_RETAIN_ERROR`00965536 X#define`009QUI$M_QUEUE_SWAP`009131072 X#define`009QUI$M_QUEUE_TERMINAL`009262144 X#define`009QUI$M_QUEUE_WSDEFAULT`009524288 X#define`009QUI$M_QUEUE_WSEXTENT`0091048576 X#define`009QUI$M_QUEUE_WSQUOTA`0092097152 X#define`009QUI$M_QUEUE_FILE_PAGINATE`0094194304 X#define`009QUI$M_QUEUE_RECORD_BLOCKING`0098388608 X#define`009QUI$V_QUEUE_BATCH`0090 X#define`009QUI$V_QUEUE_CPU_DEFAULT`0091 X#define`009QUI$V_QUEUE_CPU_LIMIT`0092 X#define`009QUI$V_QUEUE_FILE_BURST`0093 X#define`009QUI$V_QUEUE_FILE_BURST_ONE`0094 X#define`009QUI$V_QUEUE_FILE_FLAG`0095 X#define`009QUI$V_QUEUE_FILE_FLAG_ONE`0096 X#define`009QUI$V_QUEUE_FILE_TRAILER`0097 X#define`009QUI$V_QUEUE_FILE_TRAILER_ONE`0098 X#define`009QUI$V_QUEUE_GENERIC`0099 X#define`009QUI$V_QUEUE_GENERIC_SELECTION`00910 X#define`009QUI$V_QUEUE_JOB_BURST`00911 X#define`009QUI$V_QUEUE_JOB_FLAG`00912 X#define`009QUI$V_QUEUE_JOB_SIZE_SCHED`00913 X#define`009QUI$V_QUEUE_JOB_TRAILER`00914 X#define`009QUI$V_QUEUE_RETAIN_ALL`00915 X#define`009QUI$V_QUEUE_RETAIN_ERROR`00916 X#define`009QUI$V_QUEUE_SWAP`00917 X#define`009QUI$V_QUEUE_TERMINAL`00918 X#define`009QUI$V_QUEUE_WSDEFAULT`00919 X#define`009QUI$V_QUEUE_WSEXTENT`00920 X#define`009QUI$V_QUEUE_WSQUOTA`00921 X#define`009QUI$V_QUEUE_FILE_PAGINATE`00922 X#define`009QUI$V_QUEUE_RECORD_BLOCKING`00923 X#define`009QUI$M_QUEUE_ALIGNING`0091 X#define`009QUI$M_QUEUE_IDLE`0092 X#define`009QUI$M_QUEUE_LOWERCASE`0094 X#define`009QUI$M_QUEUE_OPERATOR_REQUEST`0098 X#define`009QUI$M_QUEUE_PAUSED`00916 X#define`009QUI$M_QUEUE_PAUSING`00932 X#define`009QUI$M_QUEUE_REMOTE`00964 X#define`009QUI$M_QUEUE_RESETTING`009128 X#define`009QUI$M_QUEUE_RESUMING`009256 X#define`009QUI$M_QUEUE_SERVER`009512 X#define`009QUI$M_QUEUE_STALLED`0091024 X#define`009QUI$M_QUEUE_STARTING`0092048 X#define`009QUI$M_QUEUE_STOPPED`0094096 X#define`009QUI$M_QUEUE_STOPPING`0098192 X#define`009QUI$M_QUEUE_UNAVAILABLE`00916384 X#define`009QUI$V_QUEUE_ALIGNING`0090 X#define`009QUI$V_QUEUE_IDLE`0091 X#define`009QUI$V_QUEUE_LOWERCASE`0092 X#define`009QUI$V_QUEUE_OPERATOR_REQUEST`0093 X#define`009QUI$V_QUEUE_PAUSED`0094 X#define`009QUI$V_QUEUE_PAUSING`0095 X#define`009QUI$V_QUEUE_REMOTE`0096 X#define`009QUI$V_QUEUE_RESETTING`0097 X#define`009QUI$V_QUEUE_RESUMING`0098 X#define`009QUI$V_QUEUE_SERVER`0099 X#define`009QUI$V_QUEUE_STALLED`00910 X#define`009QUI$V_QUEUE_STARTING`00911 X#define`009QUI$V_QUEUE_STOPPED`00912 X#define`009QUI$V_QUEUE_STOPPING`00913 X#define`009QUI$V_QUEUE_UNAVAILABLE`00914 X#define`009QUI$M_SEARCH_ALL_JOBS`0091 X#define`009QUI$M_SEARCH_WILDCARD`0092 X#define`009QUI$M_SEARCH_BATCH`0094 X#define`009QUI$M_SEARCH_SYMBIONT`0098 X#define`009QUI$M_SEARCH_THIS_JOB`00916 X#define`009QUI$V_SEARCH_ALL_JOBS`0090 X#define`009QUI$V_SEARCH_WILDCARD`0091 X#define`009QUI$V_SEARCH_BATCH`0092 X#define`009QUI$V_SEARCH_SYMBIONT`0093 X#define`009QUI$V_SEARCH_THIS_JOB`0094 $ CALL UNPACK QUIDEF.H;1 1244640602 $ create/nolog 'f' XAddendum Huber/MPI Muenchen: X XZu den urspruenglichen files habe ich noch unsere eigenen queue-startup`032 Xcommand-files (config_lta1332.com,start_laser_on_lta1332.com) addiert. X $ CALL UNPACK README.HUBER;1 710804644 $ create/nolog 'f' X/***`009smbdef.h -- created from smbdef.mar 12-feb-1987 VMS v 4.4.`032 X*/ X#define`009SMBMSG$K_STRUCTURE_LEVEL`0091 X#define`009SMBMSG$K_STRUCTURE_LEVEL_1`0091 X#define`009SMBMSG$K_PAUSE_TASK`0091 X#define`009SMBMSG$K_RESET_STREAM`0092 X#define`009SMBMSG$K_RESUME_TASK`0093 X#define`009SMBMSG$K_START_STREAM`0094 X#define`009SMBMSG$K_START_TASK`0095 X#define`009SMBMSG$K_STOP_STREAM`0096 X#define`009SMBMSG$K_STOP_TASK`0097 X#define`009SMBMSG$K_TASK_COMPLETE`0098 X#define`009SMBMSG$K_TASK_STATUS`0099 X#define`009SMBMSG$K_MAX_REQUEST_CODE`00910 X#define`009SMBMSG$S_REQUEST_HEADER`0094 X#define`009SMBMSG$W_REQUEST_CODE`0090 X#define`009SMBMSG$B_STRUCTURE_LEVEL`0092 X#define`009SMBMSG$B_STREAM_INDEX`0093 X#define`009SMBMSG$K_ACCOUNTING_DATA`0091 X#define`009SMBMSG$K_ACCOUNT_NAME`0092 X#define`009SMBMSG$K_AFTER_TIME`0093 X#define`009SMBMSG$K_ALIGNMENT_PAGES`0094 X#define`009SMBMSG$K_BOTTOM_MARGIN`0095 X#define`009SMBMSG$K_CHARACTERISTICS`0096 X#define`009SMBMSG$K_CHECKPOINT_DATA`0097 X#define`009SMBMSG$K_CONDITION_VECTOR`0098 X#define`009SMBMSG$K_DEVICE_NAME`0099 X#define`009SMBMSG$K_DEVICE_STATUS`00910 X#define`009SMBMSG$K_ENTRY_NUMBER`00911 X#define`009SMBMSG$K_EXECUTOR_QUEUE`00912 X#define`009SMBMSG$K_FILE_COPIES`00913 X#define`009SMBMSG$K_FILE_COUNT`00914 X#define`009SMBMSG$K_FILE_SETUP_MODULES`00915 X#define`009SMBMSG$K_FIRST_PAGE`00916 X#define`009SMBMSG$K_FORM_LENGTH`00917 X#define`009SMBMSG$K_FORM_NAME`00918 X#define`009SMBMSG$K_FORM_SETUP_MODULES`00919 X#define`009SMBMSG$K_FORM_WIDTH`00920 X#define`009SMBMSG$K_FILE_IDENTIFICATION`00921 X#define`009SMBMSG$K_FILE_SPECIFICATION`00922 X#define`009SMBMSG$K_JOB_COPIES`00923 X#define`009SMBMSG$K_JOB_COUNT`00924 X#define`009SMBMSG$K_JOB_NAME`00925 X#define`009SMBMSG$K_JOB_RESET_MODULES`00926 X#define`009SMBMSG$K_LAST_PAGE`00927 X#define`009SMBMSG$K_LEFT_MARGIN`00928 X#define`009SMBMSG$K_LIBRARY_SPECIFICATION`00929 X#define`009SMBMSG$K_MAXIMUM_STREAMS`00930 X#define`009SMBMSG$K_MESSAGE_VECTOR`00931 X#define`009SMBMSG$K_NOTE`00932 X#define`009SMBMSG$K_PAGE_SETUP_MODULES`00933 X#define`009SMBMSG$K_PARAMETER_1`00934 X#define`009SMBMSG$K_PARAMETER_2`00935 X#define`009SMBMSG$K_PARAMETER_3`00936 X#define`009SMBMSG$K_PARAMETER_4`00937 X#define`009SMBMSG$K_PARAMETER_5`00938 X#define`009SMBMSG$K_PARAMETER_6`00939 X#define`009SMBMSG$K_PARAMETER_7`00940 X#define`009SMBMSG$K_PARAMETER_8`00941 X#define`009SMBMSG$K_PRINT_CONTROL`00942 X#define`009SMBMSG$K_PRIORITY`00943 X#define`009SMBMSG$K_QUEUE`00944 X#define`009SMBMSG$K_REFUSE_REASON`00945 X#define`009SMBMSG$K_RELATIVE_PAGE`00946 X#define`009SMBMSG$K_REQUEST_CONTROL`00947 X#define`009SMBMSG$K_REQUEST_RESPONSE`00948 X#define`009SMBMSG$K_RIGHT_MARGIN`00949 X#define`009SMBMSG$K_SEARCH_STRING`00950 X#define`009SMBMSG$K_SEPARATION_CONTROL`00951 X#define`009SMBMSG$K_STOP_CONDITION`00952 X#define`009SMBMSG$K_TIME_QUEUED`00953 X#define`009SMBMSG$K_TOP_MARGIN`00954 X#define`009SMBMSG$K_UIC`00955 X#define`009SMBMSG$K_USER_NAME`00956 X#define`009SMBMSG$K_MAX_ITEM_CODE`00957 X#define`009SMBMSG$S_ITEM_HEADER`0094 X#define`009SMBMSG$W_ITEM_SIZE`0090 X#define`009SMBMSG$W_ITEM_CODE`0092 X#define`009SMBMSG$S_ACCOUNTING_DATA`00916 X#define`009SMBMSG$L_PAGES_PRINTED`0090 X#define`009SMBMSG$l_qio_puts`0094 X#define`009SMBMSG$l_rms_gets`0098 X#define`009SMBMSG$L_CPU_TIME`00912 X#define`009SMBMSG$S_CHECKPOINT_DATA`00924 X#define`009SMBMSG$B_FILLER`0090 X#define`009SMBMSG$B_CHECKPOINT_LEVEL`0091 X#define`009SMBMSG$W_OFFSET`0092 X#define`009SMBMSG$L_CARCON`0094 X#define`009SMBMSG$L_PAGE`0098 X#define`009SMBMSG$L_RECORD_NUMBER`00912 X#define`009SMBMSG$S_USER_KEY`0098 X#define`009SMBMSG$Q_USER_KEY`00916 X#define`009SMBMSG$M_LOWERCASE`0091 X#define`009SMBMSG$M_PAUSE_TASK`0092 X#define`009SMBMSG$M_REMOTE`0094 X#define`009SMBMSG$M_SERVER`0098 X#define`009SMBMSG$M_STALLED`00916 X#define`009SMBMSG$M_STOP_STREAM`00932 X#define`009SMBMSG$M_TERMINAL`00964 X#define`009SMBMSG$M_UNAVAILABLE`009128 X#define`009SMBMSG$S_DEVICE_STATUS`0094 X#define`009SMBMSG$L_DEVICE_FLAGS`0090 X#define`009SMBMSG$V_LOWERCASE`0090 X#define`009SMBMSG$V_PAUSE_TASK`0091 X#define`009SMBMSG$V_REMOTE`0092 X#define`009SMBMSG$V_SERVER`0093 X#define`009SMBMSG$V_STALLED`0094 X#define`009SMBMSG$V_STOP_STREAM`0095 X#define`009SMBMSG$V_TERMINAL`0096 X#define`009SMBMSG$V_UNAVAILABLE`0097 X#define`009SMBMSG$M_DOUBLE_SPACE`0091 X#define`009SMBMSG$M_PAGE_HEADER`0092 X#define`009SMBMSG$M_PAGINATE`0094 X#define`009SMBMSG$M_PASSALL`0098 X#define`009SMBMSG$M_SEQUENCED`00916 X#define`009SMBMSG$M_SHEET_FEED`00932 X#define`009SMBMSG$M_TRUNCATE`00964 X#define`009SMBMSG$M_WRAP`009128 X#define`009SMBMSG$M_RECORD_BLOCKING`009256 X#define`009SMBMSG$S_PRINT_CONTROL`0094 X#define`009SMBMSG$L_PRINT_FLAGS`0090 X#define`009SMBMSG$V_DOUBLE_SPACE`0090 X#define`009SMBMSG$V_PAGE_HEADER`0091 X#define`009SMBMSG$V_PAGINATE`0092 X#define`009SMBMSG$V_PASSALL`0093 X#define`009SMBMSG$V_SEQUENCED`0094 X#define`009SMBMSG$V_SHEET_FEED`0095 X#define`009SMBMSG$V_TRUNCATE`0096 X#define`009SMBMSG$V_WRAP`0097 X#define`009SMBMSG$V_RECORD_BLOCKING`0098 X#define`009SMBMSG$M_ALIGNMENT_MASK`0091 X#define`009SMBMSG$M_PAUSE_COMPLETE`0092 X#define`009SMBMSG$M_RESTARTING`0094 X#define`009SMBMSG$M_TOP_OF_FILE`0098 X#define`009SMBMSG$S_REQUEST`0094 X#define`009SMBMSG$L_REQUEST_FLAGS`0090 X#define`009SMBMSG$V_ALIGNMENT_MASK`0090 X#define`009SMBMSG$V_PAUSE_COMPLETE`0091 X#define`009SMBMSG$V_RESTARTING`0092 X#define`009SMBMSG$V_TOP_OF_FILE`0093 X#define`009SMBMSG$M_FILE_BURST`0091 X#define`009SMBMSG$M_FILE_FLAG`0092 X#define`009SMBMSG$M_FILE_TRAILER`0094 X#define`009SMBMSG$M_FILE_TRAILER_ABORT`0098 X#define`009SMBMSG$M_JOB_FLAG`00916 X#define`009SMBMSG$M_JOB_BURST`00932 X#define`009SMBMSG$M_JOB_RESET`00964 X#define`009SMBMSG$M_JOB_RESET_ABORT`009128 X#define`009SMBMSG$M_JOB_TRAILER`009256 X#define`009SMBMSG$M_JOB_TRAILER_ABORT`009512 X#define`009SMBMSG$M_FIRST_FILE_OF_JOB`0091024 X#define`009SMBMSG$M_LAST_FILE_OF_JOB`0092048 X#define`009SMBMSG$S_SEPARATION_CONTROL`0094 X#define`009SMBMSG$L_SEPARATION_FLAGS`0090 X#define`009SMBMSG$V_FILE_BURST`0090 X#define`009SMBMSG$V_FILE_FLAG`0091 X#define`009SMBMSG$V_FILE_TRAILER`0092 X#define`009SMBMSG$V_FILE_TRAILER_ABORT`0093 X#define`009SMBMSG$V_JOB_FLAG`0094 X#define`009SMBMSG$V_JOB_BURST`0095 X#define`009SMBMSG$V_JOB_RESET`0096 X#define`009SMBMSG$V_JOB_RESET_ABORT`0097 X#define`009SMBMSG$V_JOB_TRAILER`0098 X#define`009SMBMSG$V_JOB_TRAILER_ABORT`0099 X#define`009SMBMSG$V_FIRST_FILE_OF_JOB`00910 X#define`009SMBMSG$V_LAST_FILE_OF_JOB`00911 $ CALL UNPACK SMBDEF.H;1 139502730 $ create/nolog 'f' X$!+ X$!`009 L W I I $ S T A R T U P . C O M X$! X$! Start up procedure for the APPLE ScriptPrinter print queues. X$! created by Yaozhi Pan, MPI 13. Feb. 1990 X$! changed by J.Huber to support printer in h1 lab 133 (LTA1332:) X$! (This procedure should be executed by your system startup file) X$! X$!+ X$! Since this installation is being done on a member of a`032 X$! VAXcluster, the LWII$STARTUP command procedure has to X$! be executed by each member of a cluster and should be added X$! to the VAXcluster member's system startup command file. X$!- X$!+ X$! Start the Queue Manager if it has not already been started X$!- X$ set symbol/scope=(nolocal,noglobal) X$ old_control = f$environment("control") X$ set control_y X$ on control_y then goto control_y_exit X$ on warning then goto error_exit X$ set noon X$ assign/user_mode nl: sys$error X$ assign/user_mode nl: sys$output X$ show queue/form/nooutput X$ if .not. $status then GOTO no_jbc X$ type sys$input: X`032 X`009The Job controller is active. You should be sure that the queues X`009being started by this startup command file are stopped and deleted. X`009If this is a clustered system, make sure that all queues on all X`009cluster nodes are stopped too by running the command file X`009@mpi$root:`091h1laser`093LWII$SHUTDOWN.COM. X`032 X$ goto jbc X$ no_jbc: X$ start/queue/manager X$ jbc: X$ set on X$!+ X$! define the default form for LWII ScriptPrinter X$!- X$ define = "define" X$`009define /form POSTSCRIPT 201 /stock=default /setup=ps X$`009define /form POST 202 /stock=default /setup=ps X$`009define /form ZETA 203 /stock=default /setup=zeta X$`009define /form LETTER 204 /stock=default /setup=headers_str X$`009define /form LANDSCAPE 206 /stock=default /setup=headers_str X$`009define /form HEADERS 207 /stock=default /setup=headers_str X$`009define /form BITIMAGE 209 /stock=default /setup=bitimage_hex X$`009define /form PAINT 210 /stock=default /setup=paint_hex X$`009define /form 2UP 211 /stock=default /setup=headers_str X$! X$! Determine the cluster node we are running on X$! X$ boot_node = f$getsyi("nodename") X$! X$! Set the cluster node name this queue device is connected to. X$! X$ installed_node = "MPIVAX" X$! X$! Do the device commands only if the device is on the node we are running o Vn X$! X$ if f$getsyi("cluster_member") .and. - X (installed_node .nes. boot_node) then $ goto not_on_UXMPIM_1 X$!+ X$!create a port on TSL133 and use name lta1332: X$!- X$ if (f$getdvi("LTA1332","exists") .NES. "TRUE") then - X $@mpi$root:`091h1laser`093config_lta1332.com X$!+ X$! Make sure the device exists and is available X$!- X$ if (f$getdvi("LTA1332","exists") .NES. "TRUE") then - X`009exit 2312 X$ if (f$getdvi("LTA1332","all") .EQS. "TRUE") then - X`009exit 2112 X$!+ X$! If device is already set spooled, set device/nospooled`032 X$!- X$ if (f$getdvi("LTA1332","spl") .EQS. "TRUE") then - X set device/nospool LTA1332 X$!+ X$! Set device characteristics`032 X$!- X$ type sys$input: X`032 X`009Setting terminal characteristics for execution queue`032 X`009device LTA1332. If the startup procedure stalls here for X`009more than 10 seconds, LTA1332 is allocated to another X`009symbiont or process. CTRL/Y out, fix problem, and execute X`009@mpi$root:`091h1laser`093START_laser_on_LTA1332.COM again. X`032 X$ set terminal - X /altypahd - X /noautobaud - X /nobroadcast - X /device_type=LN03 - X /nodisconnect - X /noecho - X /hostsync - +-+-+-+-+-+-+-+- END OF PART 9 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 10 -+-+-+-+-+-+-+-+ X /lowercase - X /pasthru - X /permanent - X /ttsync - X /notypeahd - X /nowrap - X`009/eightbit/nomodem/nohang - X - X LTA1332 X$ set protection=o:RWLP/device LTA1332: X$ type sys$input: X`032 X`009LTA1332 terminal characteristics set successfully. X`032 X$!+ X$! Set the device /`091no`093spooled`032 X$!- X$ if (f$extract(0,1,"spooled=(H1$PRINT,SYS$DISK)") .nes. "N") .and. - X (f$getdvi("LTA1332","spl") .EQS. "FALSE") then - X set device/spooled=(H1$PRINT,SYS$DISK) LTA1332 X$ if (f$extract(0,1,"spooled=(H1$PRINT,SYS$DISK)") .EQS. "N") .and. - X (f$getdvi("LTA1332","spl") .EQS. "TRUE") then - X set device/spooled=(H1$PRINT,SYS$DISK) LTA1332 X$! X$ not_on_UXMPIM_1: X$! X$!+ X$! Initialize and start execution queue X$!- X$ start_queue = "nostart" X$! If this system is not a cluster or the device is on the boot X$! node, start the queue. X$! X$ if (.not. f$getsyi("cluster_member")) .or. - X (installed_node .EQS. boot_node) then $ start_queue = "start" X$! X$`009define/system LASER$LOG MPI$ROOT:`091h1laser`093 X$! X$`009purge /before="today-1-00:00:00" LASER$LOG:*.* X$! X$! Note that /default=form=headers is VMS v4.4 and later only. X$! X$`009initialize/queue- X`009/'start_queue' - X`009/on=MPIVAX::LTA1332: - X`009/default=(noburst,nofeed,noflag,notrailer,form=headers) - X`009/library=laser /base_prio=8 /form=headers - X`009/schedule=nosize - X`009/separate=(noburst,noflag,notrailer) -`032 X`009/processor=laser- X - X H1$PRINT X$! Make sure you turn on the LaserWriter BEFORE starting the queue, X$! otherwise pending jobs will just disappear. X$!_______________________ X$!+ end of LWII$startup X$exit $ CALL UNPACK START_LASER_ON_LTA1332.COM;9 409975692 $ create/nolog 'f' X$! X$!`009LASER configuration and startup file. Change T??? to whatever X$!`009port you connect your LaserWriter to. X$! X$`009define/system/exec/trans=(concealed,terminal) alw T???: ! laser X$`009set term /perm /speed=9600 /nomodem /notype /nohang alw X$`009set term /perm /hostsync /pasthru /ttsync /eightbit /nobroad alw X$`009set term /perm /noauto /dma alw X$`009set prot=o:rwlp /dev alw X$`009set device /spooled=(ALW,sys$sysdevice:) alw X$! X$`009define /form POST 2 /stock=default X$`009define /form ZETA 3 /stock=default /setup=zeta X$`009define /form LETTER 4 /stock=default /setup=headers_str X$`009define /form LANDSCAPE 6 /stock=default /setup=headers_str X$`009define /form HEADERS 7 /stock=default /setup=headers_str X$`009define /form BITIMAGE 9 /stock=default /setup=bitimage_hex X$`009define /form PAINT 10 /stock=default /setup=paint_hex X$`009define /form 2UP 11 /stock=default /setup=headers_str X$! X$`009define/system LASER$LOG sys$sysdevice:`091laser`093 X$! X$`009delete /before="today-1-00:00:00" LASER$LOG:*.*.* X$! X$! Note that /default=form=headers is VMS v4.4 and later only. X$! X$`009initialize/queue/start - X`009/default=(noburst,nofeed,noflag,notrailer,form=headers) - X`009/separate=(noburst,noflag,trailer) -`032 X`009/library=laser /base_prio=8 /form=headers - X`009/processor=laser /on=alw: alw $ CALL UNPACK SYST.COM;1 1096062400 $ create/nolog 'f' X%!PS-Adobe-1.0 X`004 X/inch `12372 mul`125 def X X/setuppage `123 X`009initgraphics X`0090 11 inch translate -90 rotate X `009/x 1 inch def X `009/y 7 inch def X`009.5 inch .5 inch moveto 10 inch 0 rlineto 0 7.5 inch rlineto X`009 -10 inch 0 rlineto closepath stroke X`125 def`009 X X/h-user `123 X`009/Helvetica findfont .4 inch scalefont setfont X`009x y moveto X`009(User: ) show show X`009/y y .75 inch sub def X`125 def X X/h-job `123 X`009/Helvetica findfont .4 inch scalefont setfont X`009x y moveto X X`009statusdict /printername known `123`009`009% if we know about printer nam Ves X`009`00950 string statusdict /printername get exec /p-printername exch def X X`009`009statusdict /product known `123`009`009% if we know our product X`009`009`009statusdict /product get exec /p-product exch def X`009`009`009p-product show X`009`009`009p-printername p-product ne `123`009`009% if not same name as by V default X`009`009`009`009(: ) show X`009`009`009`009p-printername show X`009`009`009`125 if X`009`009`125 `123 X`009`009`009p-printername show X`009`009`125 ifelse X`009`125 `123 X`009`009(LASER) show X`009`125 ifelse X X`009/y y .75 inch sub def X`009x y moveto X`009(Job: ) show show X`009/y y .75 inch sub def X`125 def X X/h-file `123 X`009/Helvetica findfont .4 inch scalefont setfont X`009x y moveto X (File: ) show X dup stringwidth pop 8 inch exch div % get space/length X dup 1 lt `123 .4 inch mul % if less space than length X`009`009/Helvetica findfont exch scalefont setfont `125 % resize the font X`009`009`123 pop `125 ifelse % else leave font alone X`009 show X`009/y y .75 inch sub def X`125 def X X/h-time `123 X`009/Helvetica findfont .4 inch scalefont setfont X`009x y moveto X`009(Date: ) show show X`009/y y .75 inch sub def X`125 def X X/h-error `123 X`009/Helvetica findfont .4 inch scalefont setfont X`009x y moveto X`009(Error: ) show X`009dup stringwidth pop 8 inch exch div % get space/length X`009dup 1 lt `123 .4 inch mul % if less space than length X`009`009/Helvetica findfont exch scalefont setfont `125 % resize the font X`009`009`123 pop `125 ifelse % else leave font alone X`009 show X`009/y y .75 inch sub def X`125 def X X/h-pages `123 X`009/Helvetica findfont .4 inch scalefont setfont X`009x y moveto X`009(Pages: ) show X`009cvi statusdict /pagecount get exec exch sub 1 add 10 string cvs show X`009/y y .75 inch sub def X`125 def X X/h-logline `123 X`009/Helvetica findfont 12 scalefont setfont X`009x y moveto X`009show X`009/y y 12 sub def X`125 def $ CALL UNPACK TRAILER.PS;1 1365116560 $ create/nolog 'f' X%! X%%%`009PostScript program to plot Zeta plot files X% X%`009R. Watson 31-Jan-85 X% X%`009inputs:`009/param1 or /#copies - number of copies (default 1) X%`009`009/param2 or /scalefact - scale factor (default 1) X%`009`009/param3 or /zFont - use Zeta font (default true) X%`009`009/param4 or /penscale - scaling to apply to pen (default 1) X%`009`009/param5 or /usepens - use pen color if nz (default 0) X% X%`009Not supported yet: X% X%`0091. Shaded characters X%`0092. Aspect characters X% X%`00909/13/85 add pre-processed definitions X%`009`009zFont defaults to true X%`009`009scalefact defaults to 1 X%`00905/30/86 Ignore level one "6" commands (whatever they are) X%`00906/20/86 J.Knox Fix problems with circle command X%`00902/15/87 R.Watson add default parameters X%`00902/20/87 R.Watson add default table, remove debug print, remove`032 X%`009`009 input timeout avoidance. X%`00903/06/87 M. Kaczmarczik/J. Taylor add scaling factor for pen X%`00904/01/87 R. Watson Opcode 6 is alternate pen select. X%`009`009 Added parameter usepens to select pen color/shading.`032 X%`009`009 Default changed to no shading. X% X X/lTime usertime def`009`009`009`009% save load start time X X%%`009initialization. X% X/init X`123 X%%%`009dbg 1 string dup 0 7 put writestring flush % ring bell X`009newpath X`009/aspect 256 def`009`009`009% preset default aspect X`0090 0 moveto`009`009`009% preset starting location on page X`009/pen false def`009`009`009% preset pen up X`009/sTime usertime def`009`009% save start time X`125 def X X X% read a zeta byte X X/getz `123`009`009`009`009`009`009 X`009`123 X`009`009inp read not `123eofError`125 if`009% if EOF X`009`009dup 32 gt `123exit`125 `123pop`125 ifelse`009% exit loop if not <= s Vpace X`009`125 loop X`009dup /zn exch def`009`009`009% define zeta number X`009zb 0 3 -1 roll put`009`009`009% put char code in string X`125 def X X X%% check for 9 more Z's X% X/checkZeta `123 X`0099 `123 getz zb (Z) ne `123notZerror`125 if `125 repeat X`125 def X X X%% main program X% X/main X`123 X`009`123 X`009`009gsave X`009`009init X`009`009waitBytes`009`009`009`009% wait for a job X`009`009not `123grestore exit`125 if`009`009`009% if waitBytes false X`009`009checkZeta X`009`009levelOne X`009`009grestore X`009`125 loop X`125 def X X X%%`009waitBytes - waits until there is a "Z" on stdin. X% X%`009return true if Z found, false if EOF X/waitBytes X`123 X`009`123 X%%% % uncomment these lines to wait forever for plots with no timeout X%%% `009`009inp bytesavailable 0 ne `123 X`009`009`009inp read not `123 false exit `125 if`009`009% if EOF X`009`009`00916#5A eq `123true exit`125 if`009`009`009% if Z X%%%`009`009`125 if X`009`125 loop X`125 def X X X% levelOne - process level 1 commands X X/levelOne X`123 X`009`123 X`009`009getz `009`009`009`009`009%get a byte X X`009`009zb (Z) eq `123`009`009`009`009% Z X`009`009`009stroke X%%% debug`009`009usertime sTime sub 1000 div 10 20 string cvrs X%%% debug`009`009 dbg exch writestring dbg ( seconds\n) X%%% debug`009`009 writestring flush X%%% debug`009`009lTime 1000 div 10 20 string cvrs`032 X%%% debug`009`009 dbg exch writestring dbg ( load time\n) X%%% debug`009`009 writestring flush X`009`009`009showpage X`009`009`009exit X`009`009`125 if X X`009`009`123`009 X`009`009`009zb (0) eq `123`009`009`009% 0 - nop X`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (1) eq `123`009`009`009% 1 - pen up X`009`009`009`009/pen false def X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (2) eq `123`009`009`009% 2 - pen down X`009`009`009`009/pen true def X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (3) eq `123`009`009`009% 3 - character vector X`009`009`009`009cVector X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (4) eq `123`009`009`009% 4 - center char vect X`009`009`009`009ccVector X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (5) eq `123`009`009`009% 5 - numeric vector X`009`009`009`009nVector X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (6) eq `123`009`009`009% 6 - pen select X`009`009`009`0091 crb`009`009`009% get pen X`009`009`009`009usepens 0 ne`123`009`009% if shading enabled X`009`009`009`009`009pencolor exch get setgray X`009`009`009`009`125 `123 X`009`009`009`009`009pop X`009`009`009`009`125 ifelse X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009zb (7) eq `123`009`009`009% 7 - level 2 X`009`009`009`009levelTwo X`009`009`009`009exit X`009`009`009`125 if X X`009`009`009vector X`009`009`009exit X`009`009`125 loop X X`009`125 loop %do this one forever`009`009 X`125 def X X X% level two commands X X/levelTwo X`123 X`009getz `009`009`009`009`009% get level 2 type X X`009`123 X`009`009zb (1) eq `123`009`009`009% 1 - pen 1 X`009`009`009/pen false def X`009`009`009emit X`009`009`009pencolor 0 get setgray X`009`009`009exit X`009`009`125 if X X`009`009zb (2) eq `123`009`009`009% 2 - pen 2 X`009`009`009/pen false def X`009`009`009emit X`009`009`009pencolor 1 get setgray X`009`009`009exit X`009`009`125 if X X`009`009zb (3) eq `123`009`009`009% 3 - pen 3 X`009`009`009/pen false def X`009`009`009emit X`009`009`009pencolor 2 get setgray X`009`009`009exit X`009`009`125 if X X`009`009zb (4) eq `123`009`009`009% 4 - pen 4 X`009`009`009/pen false def X`009`009`009emit X`009`009`009pencolor 3 get setgray X`009`009`009exit X`009`009`125 if X X`009`009zb (7) eq `123`009`009`009% 7 - enter level 3 X`009`009`009levelThree X`009`009`009exit X`009`009`125 if X X`009`009zb (B) eq `123`009`009`009% B - enter dash X`009`009`009emit X`009`009`009dashes 0. setdash`009% enter dash mode X`009`009`009exit X`009`009`125 if X X`009`009zb (C) eq `123`009`009`009% C - exit dash X`009`009`009emit X`009`009`009`091`093 0. setdash X`009`009`009exit X`009`009`125 if X X`009`009zb (D) eq `123`009`009`009% D - define dash X`009`009`009emit`009`009`009% close current path X`009`009`009getz getxy`009`009% get dash definition X`009`009`009/d1 ix def /d2 iy def`009% save first 2 parts X`009`009`009getz getxy X`009`009`009/dashes `091d1 d2 ix d2`093 def % define dash array X`009`009`009dashes 0. setdash`009% enter dash mode X`009`009`009exit X`009`009`125 if X X`009`009zb (E) eq `123`009`009`009% E - define slant X`009`009`009getz getxy`009`009% eat slant X`009`009`009exit X`009`009`125 if X X`009`009zb (F) eq `123`009`009`009% F - define aspect X`009`009`009getz getxy`009`009% eat aspect X`009`009`009/aspect ix def X`009`009`009exit X`009`009`125 if X X`009`009zb (G) eq `123`009`009`009% G - circle/arc X`009`009`009doCircle X`009`009`009exit X`009`009`125 if X X`009`009zb (H) eq `123`009`009`009% H - terminal msg X`009`009`009termMsg X`009`009`009exit X`009`009`125 if X X`009`009zb (I) eq `123`009`009`009% I - shade X`009`009`009getz getxy X`009`009`009exit X`009`009`125 if X X X% process rest of level 2 X`009`009exit X X X X`009`125 loop X`125 def X X X% process line vector X X/vector X`123 X`009getxy`009`009`009`009`009% get crb x y X`009pen `123ix iy rlineto`125 `123ix iy rmoveto emit`125 ifelse %do the vect Vor X`125 def X X X% process character vector X X/cVector X`123 X`009getz`009`009`009`009% get vector control X`009getxy`009`009`009`009% decode vector X`0092 crb`009`009`009`009% get length X`009dup string /cstr exch def`009% build string X`009/cind 0 def`009`009`009% preset index X`009`123 X`009`0092 crb`032 X`009`009dup 0 lt `123pop 0`125 if`009% DEBUG if negative X`009`009dup 127 gt `123pop 0`125 if`009% DEBUG if too big X`009`009zFont `123sym exch get`125`009% map zeta to zeta code X`009`009 `123zta exch get`125 ifelse % get ascii char code X`009`009cstr cind 3 -1 roll put`009% put into string X`009`009cind 1 add /cind exch def`009% advance index X`009`125 repeat`009`009`009% length times X X`009/sn cstr length def`009`009% get string char count X`009ix dup mul iy dup mul add sqrt /iz exch def % calc iz X`009iz sn dofont`009`009`009% scale font X`009cstr stringwidth `009`009% get string lengths X`009/sy exch def /sx exch def X`009iy ix atan rotate`009`009% rotate co-ordinates X`009iz sx sub sn div 0 cstr ashow`009% do string rel to new co-ord (dy=0) X`009emit X`009iy ix atan neg rotate`009`009% rotate back X`009/pen false def`009`009`009% pick up pen X`125 def X X X% process centered character vector X X/ccVector X`123 X`009getz`009`009`009`009% get vector control X`009getxy`009`009`009`009% decode vector +-+-+-+-+-+-+-+- END OF PART 10 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 11 -+-+-+-+-+-+-+-+ X`009/cstr 1 string def`009`009% define 1 char string X`0091 crb abs X`009zFont `123sym exch get`125`009`009% map zeta to zeta code X`009 `123zta exch get`125 ifelse `009% get ascii char code X`009cstr 0 3 -1 roll put`009`009% insert character into string X X`009/sn cstr length def`009`009% get string char count X`009ix dup mul iy dup mul add sqrt /iz exch def % calc iz X`009iz sn dofont`009`009`009% scale font X`009cstr stringwidth `009`009% get string lengths X`009/sy exch def /sx exch def X`009currentpoint`009`009`009% save current point X`009iy ix atan rotate`009`009% rotate co-ordinates X`009cw -6 mul 22 div ch -6 mul 22 div rmoveto % backup 1/2 char size X`009cstr show`009`009`009% do string rel to new co-ord (dy=0) X`009emit X`009iy ix atan neg rotate`009`009% rotate back X`009moveto`009`009`009`009% restore current point X`009/pen false def`009`009`009% pick up pen X`125 def X X X% dofont -- set up font X X/dofont X`123 X`009/nc exch def`009`009`009% define number of chars in string X`009/zc exch def`009`009`009% define length of string`032 X`009zFont `123/ZetaFont findfont`125`009% get font X`009 `123/Helvetica findfont`125 ifelse X`009/cw zc nc div def`009`009% get character width X`009cw 256. mul aspect div /ch exch def % get character height X`009`091cw 0 0 ch 0 0`093 makefont`009% scale font X`009setfont`009`009`009`009% set font X`125 def X X X% process numeric vector X X/nVector X`123 X`009getz`009`009`009`009% get vector control X`009getxy`009`009`009`009% decode vector X`0091 crb`009`009`009`009% get length X`009dup string /cstr exch def`009% build string X`009/cind 0 def`009`009`009% preset index X`009`123 X`009`009zFont `1231 crb ztf exch get`125`009% convert to zeta font code X`009`009 `1231 crb ztn exch get`125 ifelse % get ascii char code X`009`009cstr cind 3 -1 roll put`009% put into string X`009`009cind 1 add /cind exch def % advance index X`009`125 repeat`009`009`009% length times X X`009/sn cstr length def`009`009% get string char count X`009ix dup mul iy dup mul add sqrt /iz exch def % calc iz X`009iz sn dofont`009`009`009% scale font X`009cstr stringwidth `009`009% get string lengths X`009/sy exch def /sx exch def X`009iy ix atan rotate`009`009% rotate co-ordinates X`009iz sx sub sn div 0 cstr ashow`009% do string rel to new co-ord (dy=0) X`009emit X`009iy ix atan neg rotate`009`009% rotate back X`009/pen false def`009`009`009% pick up pen X`125 def X X X% doCircle X X/doCircle X`123 X`009getz`009`009`009`009% get circle/arc control X`009`123 X`009`009zb (0) eq zb (I) eq or `123% if arc X`009`009`009zb (0) eq`009% save arc direction X`009`009`009getz`009`009% get vector control X`009`009`009getxy`009`009% get vector 1 X`009`009`009/x1 ix def X`009`009`009/y1 iy def X`009`009`009getz`009`009% get vector 2 X`009`009`009getxy X`009`009`009/x2 ix def X`009`009`009/y2 iy def X`009`009`009currentpoint /y exch def /x exch def`009%get cur pt X%`009`009`009x1 y1 rmoveto`009% start arc at end of 1st vector X`009`009`009x1 dup mul `009% r = sqrt((x1-x)**2+(y1-y)**2) X`009`009`009y1 dup mul X`009`009`009add sqrt /r exch def X`009`009`009y1 x1 atan /theta1 exch def %get angles X`009`009`009y2 x2 atan /theta2 exch def X`009`009`009x x1 sub y y1 sub r theta1 theta2`032 X`009`009 `0096 -1 roll `123 arc `125 `123 arcn `125 ifelse % use saved arc s Vtate X`009`009`009x x1 sub x2 add y y1 sub y2 add moveto`009% return to base X`009`009`009exit X`009`009`125 if X X`009`009% else we have a circle X`009`009getxy`009`009`009% get vector X`009`009currentpoint /y exch def /x exch def % get cur pt X`009`009ix iy rmoveto`009`009% start circle at end of vector X`009`009ix dup mul`009`009% r = sqrt(ix**2+iy**2) X`009`009iy dup mul X`009`009add sqrt /r exch def X`009`009x y r 0. 360. arc`009% draw circle X`009`009x y moveto`009`009% return to base X`009`009exit X`009`125 loop X`125 def X X X% crb - get crb number X X/crb X`123 X`009/sum 0 def X X% repeat sum = (sum shift 5) + zn X`009dup `123 sum 5 bitshift getzv add /sum exch def`125 repeat X X% check for negative - if so then or in -1's mask X`0095 mul 1 sub -1 exch bitshift dup sum and 0 ne `123sum or /sum exch def`1 V25 X`009`009`009`123pop`125 ifelse X`009sum`009`009`009`009% return sum X`125 def X X X% getzv - convert NEXT zb to zeta binary number X X/getzv X`123 X`009getz X`009zn 16#41 lt `123zn 16#30 sub`125 `123zn 16#41 sub 8 add`125 ifelse X`125 def X X X% getxy - ix,iy set to crb value X X/getxy X`123 X`009zn 16#41 sub 1 add dup /ny exch def`009%ny = zn-'A'+1 X`0095 div cvi dup /nx exch def`009`009%nx = ny / 5 X`0095 mul ny exch sub cvi /ny exch def`009%ny = ny - 5*nx X X% get x and y displacement X`009nx crb /ix exch def`009`009`009%ix = crb(nx) X`009ny crb /iy exch def`009`009`009%iy = crb(ny) X`125 def X X X% emit - draw the current path X X/emit X`123 X`009currentpoint`009`009`009`009% save where we are X`009stroke`009`009`009`009`009% draw current path X`009moveto`009`009`009`009`009% position to where we are X`125 def X X X% debugi - write debug integer X X/debugi X`123 X`00916 10 string cvrs dbg exch writestring dbg (\n) writestring flush X`125 def X X X% debugs - write debug string X X/debugs X`123 X`009dbg exch writestring dbg ( ) writestring flush X`125 def X X X% executable initialization X X(%stdin) (r) file /inp exch def`009`009`009% define input file X(%stdout) (w) file /dbg exch def`009`009% define debug file X/zb 1 string def`009`009`009`009% zeta byte string X X/pencolor `0910. .35 .50 .70 0. .35 .50 .7`093 def`009% pen color shading X X16#3f 16#3f 16#3f 16#2b 16#3f 16#3f 16#3f 16#3f X16#5a 16#3f 16#3f 16#2a 16#3f 16#3f 16#3f 16#3f X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#20 16#41 16#42 16#43 16#44 16#45 16#46 16#47 X16#48 16#49 16#3f 16#2e 16#3c 16#28 16#2b 16#7c X16#26 16#4a 16#4b 16#4c 16#4d 16#4e 16#4f 16#50 X16#51 16#52 16#21 16#24 16#2a 16#29 16#3b 16#3f X16#2d 16#2f 16#53 16#54 16#55 16#56 16#57 16#58 X16#59 16#5a 16#3f 16#2c 16#25 16#5f 16#3e 16#3f X16#30 16#31 16#32 16#33 16#34 16#35 16#36 16#37 X16#38 16#39 16#3a 16#23 16#40 16#27 16#3d 16#22 X16#61 16#62 16#63 16#64 16#65 16#66 16#67 16#68 X16#69 16#6a 16#6b 16#6c 16#1d 16#6e 16#6f 16#70 X17#71 16#72 16#73 16#74 16#75 16#76 16#77 16#78 X16#79 16#7a 16#3f 16#3f 16#1f 16#3f 16#3f 16#3f X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f`032 X16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 16#3f 256 array astore /zta exch d Vef X X16#30 16#31 16#32 16#33 16#34 16#35 16#36 16#37 X16#38 16#39 16#2d 16#2e 12 array astore /ztn exch def X X/ztf `09144 45 46 47 48 49 50 51 52 53 55 64`093 def % zeta numeric vector t Vo font X X`091 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 X16 17 73 114 120 17 113 84 110 16 109 87 117 125 118 119 127`032 X126 91 92 93 94 95 96 97 98 99 100 101 102 16 16 88`032 X83 115 116 89 66 67 79 103 85 105 106 121 82 122 123 62`032 X18 19 20 21 22 23 24 25 26 108 64 75 58 54 86 72`032 X27 28 29 30 31 32 33 34 35 71 60 56 59 80 111 55`032 X57 36 37 38 39 40 41 42 43 107 63 74 16 76 78 44`032 X45 46 47 48 49 50 51 52 53 68 70 77 69 61 65 128`032 X129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144`032 X145 146 147 148 149 150 151 152 153 154 90 104 155 156 157 158`032 X159 81 124 160 161 162 163 164 165 166 167 112 168 169 170 171`032 X172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187`032 X188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203`032 X204 205 206 207 208 209 210 211 212 213 `093 /sym exch def X X/ZetaFontDict 8 dict def X/$workingdict 100 dict def XZetaFontDict begin X`009/FontType 3 def X`009/FontMatrix `091.04545 0 0 .04545 0 0`093 def X`009/FontBBox `0910 0 22 22`093 def X`009/Encoding 256 array def X`0093 string 0 1 255 `123dup 10 3 index cvrs cvn Encoding 3 1 roll put`125 f Vor X`009 pop X X`009/CharArrays 214 dict dup begin X/0 `091 16#10606 16#2060C 16#20C0C 16#20C00 16#20000 16#2000C 16#2060C`032 X 16#20606 `093 def X/1 `091 16#10606 16#2060C 16#2030C 16#20009 16#20003 16#20300 16#20900`032 X 16#20C03 16#20C09 16#2090C 16#2060C 16#20606 `093 def X/2 `091 16#1060C 16#20002 16#20C02 16#2060C 16#20606 `093 def X/3 `091 16#10006 16#20606 16#2060C 16#20606 16#20C06 16#20606 16#20600`032 X 16#20606 `093 def X/4 `091 16#1000C 16#20C00 16#20606 16#20C0C 16#20000 16#20606 `093 def X/5 `091 16#10606 16#2060C 16#20006 16#20600 16#20C06 16#2060C 16#20606 `093 V def X/6 `091 16#10600 16#2060C 16#20006 16#20C06 16#2060C 16#20606 16#20606 `093 V def X/7 `091 16#10C00 16#2000C 16#20C0C 16#20000 16#20606 `093 def X/8 `091 16#1000C 16#20C0C 16#20000 16#20C00 16#10906 16#20306 16#20606 `093 V def X/9 `091 16#10600 16#20606 16#2000C 16#20606 16#20C0C 16#20606 `093 def X/10 `091 16#10909 16#20903 16#20C00 16#20903 16#20303 16#20000 16#20303`032 X 16#20309 16#2000C 16#20309 16#20909 16#20C0C 16#20606 `093 def X/11 `091 16#10006 16#20C06 16#20606 16#2060C 16#20600 16#20606 16#2000C`032 X 16#20C00 16#20606 16#20C0C 16#20000 16#20606 `093 def X/12 `091 16#10606 16#2000C 16#20C0C 16#20000 16#20C00 16#20606 `093 def X/13 `091 16#10600 16#2060C 16#20606 `093 def X/14 `091 16#1060C 16#20003 16#20C03 16#2060C 16#20609 16#20009 16#20600`032 X 16#20C09 16#20609 16#20606 `093 def X/15 `091 16#1070A 16#20F0A 16#11500 `093 def X/16 `091 16#10400 16#20408 16#11500 `093 def X/17 `091 16#11500 `093 def X/18 `091 16#10000 16#20010 16#20415 16#20B15 16#20F10 16#20F00 16#10008`032 X 16#20F08 16#11500 `093 def X/19 `091 16#10000 16#20015 16#20B15 16#20F12 16#20F0E 16#20B0B 16#2000B`032 X 16#10B0B 16#20F08 16#20F03 16#20B00 16#20000 16#11500 `093 def X/20 `091 16#10F03 16#20B00 16#20400 16#20003 16#20012 16#20415 16#20B15`032 X 16#20F12 16#11500 `093 def X/21 `091 16#20015 16#20C15 16#20F12 16#20F03 16#20C00 16#20000 16#11500 `093 V def X/22 `091 16#10F15 16#20015 16#2000B 16#20A0B 16#2000B 16#20000 16#20F00`032 X 16#11500 `093 def X/23 `091 16#10F15 16#20015 16#2000B 16#20B0B 16#2000B 16#20000 16#11500 `093 V def X/24 `091 16#10F0F 16#20F12 16#20C15 16#20315 16#20012 16#20003 16#20300`032 X 16#20C00 16#20F03 16#20F09 16#20C09 16#21109 16#11500 `093 def X/25 `091 16#20015 16#2000B 16#20F0B 16#20F15 16#20F00 16#11500 `093 def X/26 `091 16#10400 16#20700 16#20715 16#20415 16#20A15 16#20715 16#20700`032 X 16#20A00 16#11500 `093 def X/27 `091 16#10006 16#20003 16#20300 16#20C00 16#20F03 16#20F15 16#11500 `093 V def X/28 `091 16#20015 16#20008 16#20F15 16#2070E 16#20F00 16#11500 `093 def X/29 `091 16#10015 16#20000 16#20F00 16#11500 `093 def X/30 `091 16#20015 16#2070B 16#20E15 16#20E00 16#11500 `093 def X/31 `091 16#20015 16#20F00 16#20F15 16#11500 `093 def X/32 `091 16#10300 16#20003 16#20012 16#20315 16#20C15 16#20F12 16#20C0F`032 X 16#20F12 16#20F03 16#20C00 16#20300 16#11500 `093 def X/33 `091 16#20015 16#20C15 16#20F12 16#20F0E 16#20C0B 16#2000B 16#11500 `093 V def X/34 `091 16#10808 16#20E02 16#20C00 16#20300 16#20003 16#20012 16#20315`032 X 16#20C15 16#20F12 16#20F03 16#20E02 16#20F00 16#11500 `093 def X/35 `091 16#20015 16#20C15 16#20F12 16#20F0E 16#20C0B 16#2000B 16#2080B`032 X 16#20F00 16#11500 `093 def X/36 `091 16#10006 16#20003 16#20300 16#20C00 16#20F03 16#20F08 16#20C0B`032 X 16#2030B 16#2000E 16#20012 16#20315 16#20C15 16#20F12 16#11500 `093 de Vf X/37 `091 16#10700 16#20715 16#20015 16#20E15 16#11500 `093 def X/38 `091 16#10015 16#20003 16#20300 16#20C00 16#20F03 16#20F15 16#11500 `093 V def X/39 `091 16#10015 16#20700 16#20E15 16#11500 `093 def X/40 `091 16#10015 16#20000 16#2070A 16#20E00 16#20E15 16#11500 `093 def X/41 `091 16#20F15 16#10015 16#20F00 16#11500 `093 def X/42 `091 16#10700 16#2070B 16#20015 16#2070B 16#20E15 16#2070B 16#11500 `093 V def X/43 `091 16#10015 16#20F15 16#2070A 16#2040A 16#20A0A 16#2070A 16#20000`032 X 16#20F00 16#11500 `093 def X/44 `091 16#10F03 16#20B00 16#20400 16#20003 16#20012 16#20415 16#20B15`032 X 16#20F12 16#20F03 16#11500 `093 def X/45 `091 16#10800 16#20815 16#20512 16#10500 16#20B00 16#20800 16#11500 `093 V def X/46 `091 16#10F00 16#20000 16#20003 16#20F10 16#20F12 16#20C15 16#20315`032 X 16#20012 16#20010 16#11500 `093 def X/47 `091 16#10012 16#20315 16#20C15 16#20F12 16#20F0E 16#20C0B 16#2030B`032 X 16#20C0B 16#20F08 16#20F03 16#20C00 16#20300 16#20003 16#11500 `093 de Vf X/48 `091 16#10C00 16#20C15 16#20006 16#20F06 16#11500 `093 def X/49 `091 16#10005 16#20003 16#20300 16#20C00 16#20F03 16#20F08 16#20C0B`032 X 16#2000B 16#20015 16#20F15 16#11500 `093 def X/50 `091 16#10008 16#2030B 16#20C0B 16#20F08 16#20F03 16#20C00 16#20300`032 X 16#20003 16#20012 16#20315 16#20C15 16#20F12 16#11500 `093 def X/51 `091 16#10012 16#20015 16#20F15 16#20F12 16#20700 16#11500 `093 def X/52 `091 16#10C00 16#20300 16#20003 16#20008 16#2030B 16#20C0B 16#20F0E`032 X 16#20F12 16#20C15 16#20315 16#20012 16#2000E 16#2030B 16#20C0B`032 X 16#20F08 16#20F03 16#20C00 16#11500 `093 def X/53 `091 16#10003 16#20300 16#20C00 16#20F03 16#20F12 16#20C15 16#20315`032 X 16#20012 16#2000D 16#2030A 16#20C0A 16#20F0D 16#11500 `093 def X/54 `091 16#10700 16#2070E 16#20707 16#20007 16#20E07 16#11500 `093 def X/55 `091 16#10007 16#20E07 16#11500 `093 def X/56 `091 16#20E0E 16#20707 16#2070E 16#20700 16#20707 16#2000E 16#20E00`032 X 16#20707 16#20007 16#20E07 16#11500 `093 def X/57 `091 16#20F15 16#11500 `093 def X/58 `091 16#10800 16#20504 16#20511 16#20815 16#11500 `093 def X/59 `091 16#10700 16#20A04 16#20A11 16#20715 16#11500 `093 def X/60 `091 16#10005 16#20302 16#20C02 16#20F05 16#20F09 16#20C0C 16#2030C`032 X 16#2000F 16#20313 16#20C13 16#20F0F 16#10815 16#20800 16#11500 `093 de Vf +-+-+-+-+-+-+-+- END OF PART 11 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 12 -+-+-+-+-+-+-+-+ X/61 `091 16#10003 16#20F03 16#10F0A 16#2000A 16#11500 `093 def X/62 `091 16#11500 `093 def X/63 `091 16#10700 16#20903 16#20905 16#20705 16#20703 16#20903 16#11500 `093 V def X/64 `091 16#10700 16#20702 16#20902 16#20900 16#20700 16#11500 `093 def X/65 `091 16#10310 16#20015 16#20315 16#20310 16#10910 16#20615 16#20915`032 X 16#20910 16#11500 `093 def X/66 `091 16#10B00 16#20400 16#20415 16#20B15 16#11500 `093 def X/67 `091 16#10400 16#20B00 16#20B15 16#20415 16#11500 `093 def X/68 `091 16#10703 16#20705 16#20905 16#20903 16#20703 16#1070A 16#2070C`032 X 16#2090C 16#2090A 16#2070A 16#11500 `093 def X/69 `091 16#10910 16#20615 16#20915 16#20910 16#11500 `093 def X/70 `091 16#10300 16#2030F 16#2030C 16#2000C 16#20F0C 16#20C0C 16#20C0F`032 X 16#20C00 16#20C03 16#20F03 16#20003 16#11500 `093 def X/71 `091 16#10803 16#20600 16#20A00 16#20803 16#10806 16#20815 16#11500 `093 V def X/72 `091 16#10F06 16#20703 16#20403 16#20006 16#20009 16#20A12 16#20615`032 X 16#20312 16#20F00 16#11500 `093 def X/73 `091 16#2070F 16#20E00 16#11500 `093 def X/74 `091 16#10012 16#20014 16#20214 16#20212 16#20012 16#10F15 16#20000`032 X 16#10D00 16#20D02 16#20F02 16#20F00 16#20D00 16#11500 `093 def X/75 `091 16#10F0E 16#20007 16#20F00 16#11500 `093 def X/76 `091 16#20F07 16#2000E 16#11500 `093 def X/77 `091 16#10F0C 16#20C0F 16#2080F 16#2050C 16#20508 16#20805 16#20C05`032 X 16#20F08 16#20F12 16#20C15 16#20315 16#20012 16#20003 16#20300 16#20C0 V0 16#20F03 16#11500 `093 def X/78 `091 16#1000F 16#20012 16#20315 16#20C15 16#20F12 16#20F0E 16#20C0B`032 X 16#2070B 16#20706 16#10703 16#20900 16#20500 16#20703 16#11500 `093 de Vf X/79 `091 16#10015 16#20F00 16#11500 `093 def X/80 `091 16#10700 16#20903 16#20905 16#20705 16#20703 16#20903 16#1090A`032 X 16#2090C 16#2070C 16#2070A 16#2090A 16#11500 `093 def X/81 `091 16#1000F 16#20600 16#20C0F 16#2000F 16#11500 `093 def X/82 `091 16#20F0F 16#1000F 16#20F00 16#11500 `093 def X/83 `091 16#1070D 16#2070F 16#2090F 16#2090D 16#2070D 16#1000A 16#20F0A`032 X 16#10905 16#20705 16#20707 16#20907 16#20905 16#11500 `093 def X/84 `091 16#10002 16#20E02 16#10E0B 16#2000B 16#2070B 16#20712 16#20704`032 X 16#11500 `093 def X/85 `091 16#10003 16#20406 16#20800 16#20815 16#20F15 16#11500 `093 def X/86 `091 16#10600 16#20612 16#11500 `093 def X/87 `091 16#10003 16#20200 16#20500 16#20703 16#20712 16#20915 16#20C15`032 X 16#20E12 16#11500 `093 def X/88 `091 16#10F15 16#20015 16#2070B 16#20000 16#20F00 16#11500 `093 def X/89 `091 16#2050C 16#20A00 16#20000 16#11500 `093 def X/90 `091 16#10300 16#20603 16#2060C 16#2090F 16#20C0F 16#20F0C 16#20F09`032 X 16#20C06 16#20906 16#20609 16#11500 `093 def X/91 `091 16#2030F 16#20306 16#20603 16#20903 16#20C06 16#20C0F 16#20C06`032 X 16#20F03 16#11500 `093 def X/92 `091 16#10400 16#2040F 16#2000F 16#20F0F 16#20C0F 16#20C00 16#11500 `093 V def X/93 `091 16#10700 16#20702 16#20302 16#20005 16#2000A 16#2030D 16#20B0D`032 X 16#20E0A 16#20E05 16#20B02 16#20702 16#2070F 16#11500 `093 def X/94 `091 16#10007 16#20207 16#2020B 16#2050E 16#20A0E 16#20D0B 16#20D03`032 X 16#20A00 16#20500 16#20203 16#20207 16#20F07 16#11500 `093 def X/95 `091 16#10011 16#20311 16#20307 16#20704 16#20B07 16#20B11 16#20E11`032 X 16#10715 16#20700 16#11500 `093 def X/96 `091 16#10303 16#20F0C 16#1030C 16#2060C 16#20C03 16#20F03 16#11500 `093 V def X/97 `091 16#1030C 16#20303 16#20600 16#20903 16#2090C 16#10903 16#20C00`032 X 16#20F03 16#20F0C 16#11500 `093 def X/98 `091 16#1000F 16#2030D 16#20707 16#20000 16#20707 16#20F03 16#11500 `093 V def X/99 `091 16#10F0F 16#20C0F 16#2090C 16#2070F 16#2020F 16#2000C 16#20007`032 X 16#20204 16#20704 16#20907 16#2090C 16#20907 16#20C04 16#20F04 16#1150 V0 `093 def X/100 `091 16#10C0F 16#2070F 16#2040C 16#20709 16#20C09 16#20F07 16#20F02`032 X 16#20C00 16#20700 16#20402 16#20407 16#20709 16#11500 `093 def X/101 `091 16#10309 16#20F09 16#10F0F 16#2090F 16#2060C 16#20606 16#20903`032 X 16#20F03 16#11500 `093 def X/102 `091 16#10309 16#2060F 16#2090C 16#20606 16#1090C 16#20C0F 16#20F0C`032 X 16#20C00 16#11500 `093 def X/103 `091 16#10700 16#20712 16#20315 16#20012 16#20315 16#20712 16#20B15`032 X 16#20E12 16#20B15 16#20712 16#11500 `093 def X/104 `091 16#10906 16#20C06 16#20F09 16#20F0C 16#20C0F 16#2090F 16#2060C`032 X 16#20609 16#20906 16#11500 `093 def X/105 `091 16#10615 16#20600 16#10312 16#20912 16#10306 16#20906 16#11500 `09 V3 def X/106 `091 16#10615 16#20600 16#10312 16#20912 16#1030C 16#2090C 16#10306`032 X 16#20906 16#11500 `093 def X/107 `091 16#10303 16#20603 16#20906 16#20C03 16#20F03 16#21206 16#21209`032 X 16#20F0C 16#20C0C 16#20909 16#2060C 16#2030C 16#20009 16#20006`032 X 16#20303 16#10909 16#20906 16#11500 `093 def X/108 `091 16#10612 16#20600 16#10C0C 16#2090F 16#2030F 16#2000C 16#20006`032 X 16#20303 16#20903 16#20C06 16#11500 `093 def X/109 `091 16#10015 16#21215 16#11500 `093 def X/110 `091 16#10009 16#20F09 16#11500 `093 def X/111 `091 16#10009 16#20C09 16#20C03 16#11500 `093 def X/112 `091 16#10309 16#20900 16#20F09 16#20912 16#20309 16#11500 `093 def X/113 `091 16#10303 16#2090F 16#1000C 16#20C0C 16#10006 16#20C06 16#11500 `09 V3 def X/114 `091 16#10003 16#20F03 16#10F08 16#20008 16#1000D 16#20F0D 16#11500 `09 V3 def X/115 `091 16#10001 16#20F01 16#10F05 16#2000A 16#20F0F 16#11500 `093 def X/116 `091 16#1000F 16#20F0A 16#20005 16#10001 16#20F01 16#11500 `093 def X/117 `091 16#10003 16#20B03 16#20E07 16#20E0B 16#20B0F 16#2000F 16#11500 `09 V3 def X/118 `091 16#10006 16#20209 16#20509 16#20A03 16#20D03 16#20F06 16#11500 `09 V3 def X/119 `091 16#10006 16#20209 16#20509 16#20A03 16#20D03 16#20F06 16#1000A`032 X 16#2020D 16#2050D 16#20A07 16#20D07 16#20F0A 16#11500 `093 def X/120 `091 16#10008 16#20F08 16#20B0C 16#20B04 16#20F08 16#11500 `093 def X/121 `091 16#10008 16#2040C 16#20404 16#20008 16#20F08 16#11500 `093 def X/122 `091 16#10800 16#20815 16#20411 16#20C11 16#20815 16#11500 `093 def X/123 `091 16#10800 16#20404 16#20C04 16#20800 16#20815 16#11500 `093 def X/124 `091 16#11500 `093 def X/125 `091 16#1000F 16#20700 16#20E0F 16#11500 `093 def X/126 `091 16#10F00 16#20C00 16#20903 16#20907 16#2060A 16#2090D 16#20912`032 X 16#20C15 16#20F15 16#11500 `093 def X/127 `091 16#20300 16#20603 16#20607 16#2090A 16#2060D 16#20612 16#20315`032 X 16#20015 16#11500 `093 def X/128 `091 16#10309 16#20609 16#20906 16#20903 16#20600 16#20000 16#20003`032 X 16#20306 16#20906 16#20900 16#11500 `093 def X/129 `091 16#10015 16#20003 16#20300 16#20600 16#20903 16#20906 16#20609`032 X 16#20309 16#20006 16#20000 16#11500 `093 def X/130 `091 16#10906 16#20609 16#20309 16#20006 16#20003 16#20300 16#20600`032 X 16#20903 16#11500 `093 def X/131 `091 16#10915 16#20903 16#20600 16#20300 16#20003 16#20006 16#20309`032 X 16#20609 16#20906 16#20900 16#11500 `093 def X/132 `091 16#10006 16#20906 16#20609 16#20309 16#20006 16#20003 16#20300`032 X 16#20600 16#20903 16#11500 `093 def X/133 `091 16#10009 16#20609 16#10300 16#2030F 16#20612 16#2090F 16#11500 `09 V3 def X/134 `091 16#10303 16#20003 16#20300 16#20900 16#2090C 16#2060F 16#2030F`032 X 16#2000C 16#20306 16#20906 16#11500 `093 def X/135 `091 16#10015 16#20000 16#20006 16#20309 16#20609 16#20906 16#20900`032 X 16#11500 `093 def X/136 `091 16#1060F 16#2060C 16#10609 16#20600 16#11500 `093 def X/137 `091 16#10612 16#2060F 16#1060C 16#20603 16#20300 16#20003 16#11500 `09 V3 def X/138 `091 16#10015 16#20006 16#20306 16#20609 16#10000 16#20006 16#20306`032 X 16#20600 16#11500 `093 def X/139 `091 16#10615 16#20600 16#11500 `093 def X/140 `091 16#10000 16#20009 16#20303 16#20603 16#20909 16#20900 16#11500 `09 V3 def X/141 `091 16#10009 16#20000 16#20006 16#20309 16#20609 16#20906 16#20900`032 X 16#11500 `093 def X/142 `091 16#10006 16#20309 16#20609 16#20906 16#20903 16#20600 16#20300`032 X 16#20003 16#20006 16#11500 `093 def X/143 `091 16#10000 16#20009 16#2030C 16#2060C 16#20909 16#20606 16#20306`032 X 16#20009 16#2000C 16#11500 `093 def X/144 `091 16#10900 16#20909 16#2060C 16#2030C 16#20009 16#20306 16#20606`032 X 16#20909 16#2090C 16#11500 `093 def X/145 `091 16#10009 16#20000 16#20006 16#20309 16#20609 16#20906 16#11500 `09 V3 def X/146 `091 16#10303 16#20600 16#20903 16#20306 16#20609 16#20906 16#11500 `09 V3 def X/147 `091 16#10615 16#20600 16#10309 16#20909 16#11500 `093 def X/148 `091 16#10009 16#20003 16#20300 16#20600 16#20903 16#20909 16#20900`032 X 16#11500 `093 def X/149 `091 16#10009 16#20300 16#20600 16#20909 16#11500 `093 def X/150 `091 16#10009 16#20000 16#20306 16#20606 16#20900 16#20909 16#11500 `09 V3 def X/151 `091 16#10009 16#20900 16#10000 16#20909 16#11500 `093 def X/152 `091 16#1000C 16#20009 16#20306 16#20606 16#20909 16#2090C 16#20903`032 X 16#20600 16#20300 16#20003 16#11500 `093 def X/153 `091 16#10009 16#20909 16#20000 16#20900 16#11500 `093 def X/154 `091 16#1030F 16#2060F 16#2090C 16#20906 16#20C03 16#20F03 16#11500 `09 V3 def X/155 `091 16#10606 16#20615 16#10015 16#20C15 16#11500 `093 def X/156 `091 16#10006 16#20309 16#20906 16#20C09 16#11500 `093 def X/157 `091 16#10012 16#20312 16#20315 16#20015 16#20012 16#10912 16#20C12`032 X 16#20C15 16#20915 16#20912 16#11500 `093 def X/158 `091 16#10306 16#2030C 16#10309 16#20F09 16#11500 `093 def X/159 `091 16#10309 16#20F09 16#10F06 16#20F0C 16#11500 `093 def X/160 `091 16#10303 16#20903 16#20C06 16#20C0C 16#2090F 16#2030F 16#2000C`032 X 16#20006 16#20303 16#11500 `093 def X/161 `091 16#10000 16#20C00 16#10600 16#20615 16#11500 `093 def X/162 `091 16#10015 16#20000 16#20900 16#11500 `093 def X/163 `091 16#10000 16#20015 16#20915 16#11500 `093 def X/164 `091 16#10F0F 16#2060F 16#2030C 16#20309 16#20606 16#20F06 16#11500 `09 V3 def X/165 `091 16#10600 16#2060C 16#2090F 16#20C0F 16#20F0C 16#20F00 16#11500 `09 V3 def X/166 `091 16#1060F 16#20603 16#20900 16#20C00 16#20F03 16#20F0F 16#11500 `09 V3 def X/167 `091 16#10000 16#20F00 16#20F15 16#20015 16#20000 16#11500 `093 def X/168 `091 16#10000 16#20C00 16#11500 `093 def X/169 `091 16#10300 16#20C00 16#10312 16#20C12 16#10612 16#20600 16#10900`032 X 16#20912 16#11500 `093 def X/170 `091 16#10015 16#20915 16#11500 `093 def X/171 `091 16#1030C 16#2090C 16#11500 `093 def X/172 `091 16#1000F 16#20C03 16#11500 `093 def X/173 `091 16#10303 16#20903 16#20C06 16#20C0C 16#2090F 16#2030F 16#2000C`032 X 16#20006 16#20303 16#10603 16#2060F 16#10009 16#20C09 16#11500 `093 d Vef X/174 `091 16#10003 16#2060F 16#20C03 16#10006 16#20309 16#20906 16#20C09`032 X 16#11500 `093 def X/175 `091 16#1000F 16#20603 16#20C0F 16#10006 16#20309 16#20906 16#20C09`032 X 16#11500 `093 def X/176 `091 16#10600 16#20612 16#10003 16#20C03 16#20C03 16#2060F 16#20003`032 X 16#11500 `093 def X/177 `091 16#10600 16#20612 16#1000F 16#20C0F 16#20603 16#2000F 16#11500 `09 V3 def X/178 `091 16#10000 16#20C00 16#10003 16#20C03 16#2060F 16#20003 16#11500 `09 V3 def X/179 `091 16#1000F 16#20603 16#20C0F 16#2000F 16#10006 16#20309 16#20906`032 X 16#20C09 16#11500 `093 def X/180 `091 16#10003 16#10003 16#20010 16#20415 16#20B15 16#20F10 16#20F03`032 X 16#10009 16#20F09 16#11503 16#10000 16#20F00 16#11500 `093 def X/181 `091 16#10003 16#10003 16#20015 16#20B15 16#20F12 16#20F0F 16#20B0C`032 X 16#2000C 16#10B0C 16#20F09 16#20F05 16#20B03 16#20003 16#11503`032 X 16#10000 16#20F00 16#11500 `093 def X/182 `091 16#10003 16#10F05 16#20B03 16#20403 16#20005 16#20012 16#20415`032 X 16#20B15 16#20F12 16#11503 16#10000 16#20F00 16#11500 `093 def X/183 `091 16#10003 16#20015 16#20C15 16#20F12 16#20F05 16#20C03 16#20003`032 X 16#11503 16#10000 16#20F00 16#11500 `093 def X/184 `091 16#10003 16#10F15 16#20015 16#2000C 16#20A0C 16#2000C 16#20003`032 X 16#20F03 16#11503 16#10000 16#20F00 16#11500 `093 def X/185 `091 16#10003 16#10F15 16#20015 16#2000C 16#20B0C 16#2000C 16#20003`032 X 16#11503 16#10000 16#20F00 16#11500 `093 def X/186 `091 16#10003 16#10F0F 16#20F12 16#20C15 16#20315 16#20012 16#20005`032 X 16#20303 16#20C03 16#20F05 16#20F0A 16#20C0A 16#2110A 16#11503 16#100 V00 16#20F00 16#11500 `093 def X/187 `091 16#10003 16#20015 16#2000C 16#20F0C 16#20F15 16#20F03 16#11503`032 X 16#10000 16#20F00 16#11500 `093 def X/188 `091 16#10003 16#10403 16#20703 16#20715 16#20415 16#20A15 16#20715`032 X 16#20703 16#20A03 16#11503 16#10000 16#20F00 16#11500 `093 def X/189 `091 16#10003 16#10008 16#20005 16#20303 16#20C03 16#20F05 16#20F15`032 X 16#11503 16#10000 16#20F00 16#11500 `093 def X/190 `091 16#10003 16#20015 16#20009 16#20F15 16#2070F 16#20F03 16#11503`032 X 16#10000 16#20F00 16#11500 `093 def X/191 `091 16#10003 16#10015 16#20003 16#20F03 16#11503 16#10000 16#20F00`032 X 16#11500 `093 def X/192 `091 16#10003 16#20015 16#2070C 16#20E15 16#20E03 16#11503 16#10000`032 X 16#20F00 16#11500 `093 def X/193 `091 16#10003 16#20015 16#20F03 16#20F15 16#11503 16#10000 16#20F00`032 X 16#11500 `093 def X/194 `091 16#10003 16#10303 16#20005 16#20012 16#20315 16#20C15 16#20F12`032 X 16#20C0F 16#20F12 16#20F05 16#20C03 16#20303 16#11503 16#10000 16#20F V00 16#11500 `093 def X/195 `091 16#10003 16#20015 16#20C15 16#20F12 16#20F0F 16#20C0C 16#2000C`032 X 16#11503 16#10000 16#20F00 16#11500 `093 def X/196 `091 16#10003 16#10809 16#20E04 16#20C03 16#20303 16#20005 16#20012`032 X 16#20315 16#20C15 16#20F12 16#20F05 16#20E04 16#20F03 16#11503 16#100 V00 16#20F00 16#11500 `093 def X/197 `091 16#10003 16#20015 16#20C15 16#20F12 16#20F0F 16#20C0C 16#2000C`032 X 16#2080C 16#20F03 16#11503 16#10000 16#20F00 16#11500 `093 def X/198 `091 16#10003 16#10008 16#20005 16#20303 16#20C03 16#20F05 16#20F09`032 X 16#20C0C 16#2030C 16#2000F 16#20012 16#20315 16#20C15 16#20F12 16#115 V03 16#10000 16#20F00 16#11500 `093 def X/199 `091 16#10003 16#10703 16#20715 16#20015 16#20E15 16#11503 16#10000`032 X 16#20F00 16#11500 `093 def X/200 `091 16#10003 16#10015 16#20005 16#20303 16#20C03 16#20F05 16#20F15`032 X 16#11503 16#10000 16#20F00 16#11500 `093 def X/201 `091 16#10003 16#10015 16#20703 16#20E15 16#11503 16#10000 16#20F00`032 X 16#11500 `093 def X/202 `091 16#10003 16#10015 16#20003 16#2070B 16#20E03 16#20E15 16#11503`032 X 16#10000 16#20F00 16#11500 `093 def X/203 `091 16#10003 16#20F15 16#10015 16#20F03 16#11503 16#10000 16#20F00`032 X 16#11500 `093 def X/204 `091 16#10003 16#10703 16#2070C 16#20015 16#2070C 16#20E15 16#2070C`032 X 16#11503 16#10000 16#20F00 16#11500 `093 def X/205 `091 16#10003 16#10015 16#20F15 16#2070B 16#2040B 16#20A0B 16#2070B`032 +-+-+-+-+-+-+-+- END OF PART 12 +-+-+-+-+-+-+-+- -+-+-+-+-+-+-+-+ START OF PART 13 -+-+-+-+-+-+-+-+ X 16#20003 16#20F03 16#11503 16#10000 16#20F00 16#11500 `093 def X/206 `091 16#10000 16#20F00 16#20F15 16#20015 16#20000 16#10615 16#2060F`032 X 16#2090F 16#20915 16#11500 `093 def X/207 `091 16#10600 16#20609 16#2060C 16#2090F 16#20C0F 16#20F0C 16#20F09`032 X 16#20C06 16#20906 16#20609 16#10F09 16#20F00 16#11500 `093 def X/208 `091 16#10000 16#20F00 16#20F15 16#20015 16#20000 16#10009 16#20F09`032 X 16#1090C 16#2090F 16#2060F 16#2060C 16#2090C 16#10903 16#20906 16#206 V06 16#20603 16#20903 16#11500 `093 def X/209 `091 16#10000 16#20C00 16#10600 16#20615 16#1030F 16#2090F 16#20C0C`032 X 16#20C06 16#20903 16#20303 16#20006 16#2000C 16#2030F 16#11500 `093 d Vef X/210 `091 16#10015 16#20C15 16#10615 16#20600 16#1030F 16#2090F 16#20C0C`032 X 16#20C06 16#20903 16#20303 16#20006 16#2000C 16#2030F 16#11500 `093 d Vef X/211 `091 16#1030C 16#2090C 16#10000 16#20C15 16#11500 `093 def X/212 `091 16#1030C 16#2090C 16#10015 16#20C00 16#11500 `093 def X/213 `091 16#10303 16#20903 16#20C06 16#20C0C 16#2090F 16#2030F 16#2000C`032 X 16#20006 16#20303 16#1000F 16#20C03 16#11500 `093 def X`009end def X`009/BuildChar X`009`123 X`009`009$workingdict begin X`009`009/charcode exch def X`009`009/fontdict exch def X`009`009fontdict /CharArrays get X`009`009 fontdict /Encoding get X`009`009 charcode get get`009`009% get the CharArray X`009`009gsave X`009`0090 setgray newpath X`009`00944 0`009`009`009`009% width vector X`009`0090 0`009`009`009`009% lower left X`009`00922 22 setcachedevice`009`009% upper right X`009`0090 0 moveto X`009`009`123`009`009`009`009% process CharArray X`009`009`009dup -16 bitshift`009% extract move X`009`009`0091 index -8 bitshift 16#ff and %extract x X`009`009`0092 index 16#ff and `009% extract y X`009`009`0092 index 1 eq `123moveto`125 `123lineto`125 ifelse X`009`009`009pop pop`009`009`009% compressed, move X`009`009`125 forall X`009`009stroke X`009`009grestore X`009`009end X`009`125 def Xend X X/ZetaFont ZetaFontDict definefont pop X X/table `091 X `091/#copies 1 (.nc .ncopies .param1)`093`009`009% number of copies X `091/scalefact 1.0 (.sf .scale .param2)`093`009`009% scale factor X `091/zFont true (.zfont .param3)`093`009`009`009% zeta font X `091/penscale 1.0 (.penscale .param4)`093`009`009% pen scaling X `091/usepens 0 (.usepens .param5)`093`009`009% use pen colors X`093 def X Xtable `123`009`009`009`009`009`009% apply defaults X`009/ta exch def`009`009`009`009% save array X`009ta 0 get`009`009`009`009% key X`009ta 1 get`009`009`009`009% default value X`009def`009`009`009`009`009% define default value X`125 forall X Xcurrentdict /parser known `123parser`125 if`009`009% if user inputs X X72. 400. div scalefact mul dup scale`009% set 400 points/inch scale factor Xcurrentlinewidth penscale mul setlinewidth`009% re-scale line width X/lTime usertime lTime sub def`009% save ztp load time X%main X/doit `123 X`009`123main`125 stopped `123 (error stack:\n) print pstack flush quit`125 i Vf X`125 def Xdoit $ CALL UNPACK ZETA.PS;1 41910390 $ v=f$verify(v) $ EXIT