Home » Personal collection » Acorn ADFS disks » Archimedes » RiscOs_Apps_1.ADF » !PrinterPS/Library

!PrinterPS/Library

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Archimedes » RiscOs_Apps_1.ADF
Filename: !PrinterPS/Library
Read OK:
File size: 513A bytes
Load address: FFFFFB41
Exec address: C759E721
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM > Library V.1.12 for PostScript printer driver
   20REM Purpose: printer-specific parts of the printer application
   30REM Authors: AThompson, NReeves, DSeal
   40:
   50DEF PROCPrinter_initialise
   60LOCAL P%
   70IF VersionNumber$ <> "1.12" THEN PROCmoan("Inconsistent !RunImage and Library in application")
   80PrinterClass$="PrinterPS"
   90FullPrinterClass$="PostScript"
  100OutputType%=&FF5
  110PrData_expected% = 1
  120MaxLine% = 72
  130REM define printer class dependent fields in printer data area
  140     prologue2_field% = FNp_field(4)
  150   manual_feed_field% = FNp_field(4)
  160     auto_feed_field% = FNp_field(4)
  170   printer_data_size% = FNp_field(0)
  180REM define class dependent icons in main window
  190main_feed% = 2
  200main_auto% = 3
  210main_manual% = 4
  220main_portrait% = 6
  230main_landscape% = 7
  240main_title% = 8
  250printer_data_list% = 0:P%=0
  260PROCPrinter_read_config_file
  270REM now convert to circular list
  280P%!list_pointer_field%=printer_data_list%
  290DIM buf2% bufsz%, tline% bufsz%
  300oline_size% = 256: REM Space for full string + LF that may get added
  310DIM oline% oline_size%
  320my_file%=0
  330ENDPROC
  340:
  350DEF PROCPrinter_set_initial_state
  360LOCAL D%
  370REM set default state
  380D%=printer_data_list%
  390WHILE D%!list_pointer_field%<>printer_data_list% AND D%!printer_number_field%<>printer_config%
  400 D%=D%!list_pointer_field%
  410ENDWHILE
  420IF D%!printer_number_field%=printer_config% THEN printer_data_list%=D%
  430PROCPrinter_set_description
  440PROCPrinter_set_module_data
  450ENDPROC
  460:
  470DEF PROCPrinter_terminate
  480ENDPROC: REM no tidying up necessary
  490:
  500DEF PROCPrinter_load_templates
  510PROCset_icon_state(main%, main_portrait%, (1-format_new%) << 21, 1<<21)
  520PROCset_icon_state(main%, main_landscape%, format_new% << 21, 1<<21)
  530PROCset_icon_state(main%, main_title%, title_new% << 21, 1<<21)
  540ENDPROC
  550:
  560DEF FNPrinter_process_event(action%, E%)
  570LOCAL res%
  580res%=FALSE
  590CASE action% OF
  600 WHEN 17,18:
  610  CASE E%!16 OF
  620   WHEN &502:
  630    IF E%!32 = main% AND E%!36 >= -1 THEN PROChelpreply("Printer setup.|MClick SELECT or ADJUST to alter the settings.",E%!8,E%!4):res% = TRUE
  640  ENDCASE
  650 WHEN 6
  660  IF E%!12=main% THEN
  670   CASE TRUE OF
  680    WHEN (E%!8 AND %101)<>0:
  690     CASE E%!16 OF
  700      WHEN main_description%:
  710       IF E%!8 AND 1 THEN
  720        res% = printer_data_list%
  730        REPEAT printer_data_list% = printer_data_list%!list_pointer_field%
  740        UNTIL printer_data_list%!list_pointer_field% = res%
  750       ELSE
  760        printer_data_list% = printer_data_list%!list_pointer_field%
  770       ENDIF
  780       PROCPrinter_set_description
  790       PROCPrinter_set_module_data
  800       printer_new% = printer_data_list%!printer_number_field%
  810       res%=TRUE
  820      WHEN main_auto%
  830       feed_new%=0
  840       PROCPrinter_set_feed
  850      WHEN main_manual%
  860       feed_new%=1
  870       PROCPrinter_set_feed
  880      WHEN main_portrait%
  890       PROCset_icon_state(main%, main_portrait%, 1<<21, 1<<21)
  900       format_new%=0
  910       cols_new%=1
  920      WHEN main_landscape%
  930       PROCset_icon_state(main%, main_landscape%, 1<<21, 1<<21)
  940       format_new%=1
  950       cols_new%=2
  960      WHEN main_title%
  970       !q%=main%
  980       q%!4=main_title%
  990       SYS "Wimp_GetIconState",,q%
 1000       title_new% = (q%!24 >> 21) AND 1
 1010     ENDCASE
 1020   ENDCASE
 1030  ENDIF
 1040ENDCASE
 1050=res%
 1060:
 1070DEF PROCPrinter_read_config_file
 1080LOCAL H%,ptr%
 1090DIM defaults% printer_data_size%
 1100printer_data% = defaults%
 1110H%=OPENIN"<PDriver$Dir>.PrData"
 1120IF H%=0 ERROR 100,"Can't read printer data file"
 1130LOCAL ERROR
 1140ON ERROR LOCAL: RESTORE ERROR: CLOSE#H%: ERROR ERR,REPORT$
 1150REPEAT
 1160 ptr% = PTR#H%
 1170 PROCPrinter_process_line(H%)
 1180UNTIL EOF#H%
 1190CLOSE#H%
 1200ENDPROC
 1210:
 1220DEF PROCPrinter_process_line(H%)
 1230LOCAL I%,J%,tag$
 1240$buf%=GET$#H%
 1250I%=0
 1260WHILE FNtagchar(buf%?I%): I% += 1:ENDWHILE
 1270IF buf%?I% = ASC":" THEN
 1280 REM got a tag
 1290 tag$=FNlowercase(LEFT$($buf%,I%))
 1300 I% += 1
 1310 WHILE buf%?I%=ASC" ": I% += 1:ENDWHILE
 1320 CASE tag$ OF
 1330  WHEN "version"
 1340   PrData_version% = FNread
 1350  WHEN "printer_name"
 1360   REM build a name
 1370   DIM description% LEN$buf% -I% +1
 1380   $description% = RIGHT$($buf%,LEN$buf%-I%)
 1390   REM now add a block to our list of printer data blocks
 1400   DIM printer_data% printer_data_size%
 1410   FOR I%=0 TO printer_data_size%-4 STEP 4
 1420    printer_data%!I% = defaults%!I%
 1430   NEXT
 1440   printer_data%!description_field% = description%
 1450   IF P%=0 THEN
 1460    printer_data_list% = printer_data%
 1470   ELSE
 1480    P%!list_pointer_field% = printer_data%
 1490   ENDIF
 1500   P% = printer_data%
 1510  WHEN "pxres","pyres","features","pxres_halftone","pyres_halftone","printer_number"
 1520   REM note that all tags are the same as their respective field names
 1530     printer_data%!EVAL(tag$+"_field%") = FNread
 1540  WHEN "page_width","page_height","page_bottom","page_top","page_left","page_right"
 1550     page_desc%(page_number%,EVAL(tag$+"_field%")) = FNread
 1560     page_ptrs%(page_number%,EVAL(tag$+"_field%")) = ptr%+I%
 1570  WHEN "page_number"
 1580     page_number% = FNread
 1590  WHEN "prologue2","manual_feed","auto_feed","server","page_name","file","page_selection"
 1600   REM read a string
 1610   J% = I%
 1620   WHILE buf%?J%>=ASC" " AND buf%?J%<>ASC";"
 1630    J% += 1
 1640   ENDWHILE
 1650   REM from I% to J% is the string
 1660   CASE tag$ OF
 1670   WHEN "server"
 1680    server_ptr% = ptr% + I%
 1690    server_config$ = MID$($buf%, I%+1, J%-I%)
 1700   WHEN "file"
 1710    file_ptr% = ptr% + I%
 1720    file_config$ = MID$($buf%, I%+1, J%-I%)
 1730    $file_name%=file_config$
 1740    SYS "XOS_CLI","set PrinterType$5 "+file_config$
 1750   WHEN "page_name"
 1760    page_names$(page_number%)=MID$($buf%, I%+1, J%-I%)
 1770    page_ptrs%(page_number%,page_name_field%) = ptr%+I%
 1780   WHEN "page_selection"
 1790    page_selection$(page_number%)=MID$($buf%, I%+1, J%-I%)
 1800   OTHERWISE
 1810    DIM description% J%-I%+1
 1820    $description% = MID$($buf%, I%+1, J%-I%)
 1830    printer_data%!EVAL(tag$+"_field%") = description%
 1840   ENDCASE
 1850  WHEN "start_page_number"
 1860   page_number_config% = FNread
 1870   page_number_ptr% = ptr% + I%
 1880  WHEN "printer"
 1890   printer_config% = FNread
 1900   printer_new% = printer_config%
 1910   printer_ptr% = ptr% + I%
 1920  WHEN "location"
 1930   location_config% = FNread
 1940   location_ptr% = ptr% + I%
 1950  WHEN "baud"
 1960   baud_config% = FNread
 1970   baud_ptr% = ptr% + I%
 1980  WHEN "data"
 1990   data_config% = FNread
 2000   data_ptr% = ptr% + I%
 2010  WHEN "xon"
 2020   XON_config% = FNread
 2030   XON_new% = XON_config%
 2040   XON_ptr% = ptr% + I%
 2050  WHEN "feed"
 2060   feed_config% = FNread
 2070   feed_new% = feed_config%
 2080   feed_ptr% = ptr% + I%
 2090  WHEN "format"
 2100   format_config% = FNread
 2110   format_new% = format_config%
 2120   format_ptr% = ptr% + I%
 2130  WHEN "title"
 2140   title_config% = FNread
 2150   title_new% = title_config%
 2160   title_ptr% = ptr% + I%
 2170  WHEN "columns"
 2180   cols_config% = FNread
 2190   cols_new% = cols_config%
 2200   cols_ptr% = ptr% + I%
 2210  WHEN "line_numbers"
 2220   lnum_config% = FNread
 2230   lnum_new% = lnum_config%
 2240   lnum_ptr% = ptr% + I%
 2250  WHEN "line_term"
 2260   lterm_config% = FNread
 2270   lterm_new% = lterm_config%
 2280   lterm_ptr% = ptr% + I%
 2290  WHEN "print_ccs"
 2300   ccs_config% = FNread
 2310   ccs_new% = ccs_config%
 2320   ccs_ptr% = ptr% + I%
 2330 ENDCASE
 2340ENDIF
 2350ENDPROC
 2360:
 2370DEF FNread=FNread_integer_expression(RIGHT$($buf%,LEN$buf%-I%))
 2380:
 2390DEF FNread_integer_expression(S$)
 2400LOCAL R%, T%, E$, P%
 2410E$=""
 2420REM get rid of any comment
 2430WHILE LEFT$(S$,1) <> ";" AND LENS$ <> 0
 2440 E$ += LEFT$(S$,1)
 2450 S$ = RIGHT$(S$,LENS$-1)
 2460ENDWHILE
 2470SYS"XOS_EvaluateExpression",E$,buf%,256 TO ,T%,R%;P%
 2480IF T% <> 0 OR (P% AND 1) ERROR 100, "Integer value needed for "+tag$
 2490=R%
 2500:
 2510DEF FNtagchar(C%)
 2520IF (C% >= ASC"A" AND C% <= ASC"Z") THEN =TRUE
 2530IF (C% >= ASC"a" AND C% <= ASC"z") THEN =TRUE
 2540=  (C% >= ASC"0" AND C% <= ASC"9") OR C% = ASC"_"
 2550:
 2560DEF PROCPrinter_set_module_data
 2570LOCAL A%,B%,C%,D%,E%,F%
 2580A%=defaults%!pxres_field%
 2590B%=defaults%!pyres_field%
 2600C%=defaults%!features_field%
 2610D%=defaults%!pxres_halftone_field%
 2620E%=defaults%!pyres_halftone_field%
 2630F%=defaults%!printer_number_field%
 2640SYS "PDriver_SetInfo",,A%,B%,C%,,D%,E%,F%
 2650msg%!0=20
 2660msg%!12=0
 2670msg%!16=Message_SetPrinter%
 2680SYS "Wimp_SendMessage", 17, msg%, 0
 2690OSCLI("Set PDriver$PSprologue PSprolog")
 2700OSCLI("Set PDriver$PSprologue2 """+$(defaults%!prologue2_field%)+"""")
 2710PROCPrinter_set_feed
 2720ENDPROC
 2730:
 2740DEF PROCPrinter_change_page_size
 2750PROCPrinter_set_PSextra
 2760ENDPROC
 2770:
 2780DEF PROCPrinter_set_PSextra
 2790LOCAL value$
 2800IF feed_new%=1 THEN
 2810 value$ = $(defaults%!manual_feed_field%)
 2820ELSE
 2830 value$ = $(defaults%!auto_feed_field%)
 2840ENDIF
 2850IF page_selection$(page_number%) <> "" THEN
 2860 value$ += "|J" + page_selection$(page_number%)
 2870ENDIF
 2880SYS"OS_SetVarVal","PDriver$PSextra",value$,LEN(value$)
 2890ENDPROC
 2900:
 2910DEF PROCPrinter_set_feed
 2920PROCset_icon_state(main%, main_auto%, (1-feed_new%) << 21, 1<<21)
 2930PROCset_icon_state(main%, main_manual%, feed_new% << 21, 1<<21)
 2940PROCPrinter_set_PSextra
 2950ENDPROC
 2960:
 2970DEF PROCPrinter_set_description
 2980LOCAL S%, S$
 2990FOR S% = 0 TO printer_data_size%-4 STEP 4
 3000defaults%!S% = printer_data_list%!S%
 3010NEXT
 3020PROCPrinter_set_icon(main_description%,$(defaults%!description_field%))
 3030S% = 1<<23 OR 1<<7
 3040IF LEN($(printer_data_list%!manual_feed_field%)) = 0 AND LEN($(printer_data_list%!auto_feed_field%))=0 THEN
 3050 PROCset_icon_state(main%,main_feed%,S%,S%)
 3060 PROCset_icon_state(main%,main_auto%,S%,S%)
 3070 PROCset_icon_state(main%,main_manual%,S%,S%)
 3080ELSE
 3090 PROCset_icon_state(main%,main_feed%,0,S%)
 3100 PROCset_icon_state(main%,main_auto%,0,S%)
 3110 PROCset_icon_state(main%,main_manual%,0,S%)
 3120ENDIF
 3130SYS "XOS_CLI","SET Printer$"+" """+$(defaults%!description_field%)+""""
 3140ENDPROC
 3150:
 3160DEF PROCPrinter_set_icon(I%,S$)
 3170LOCAL S%
 3180S%=FNiconaddr(main%,I%)
 3190$S% = S$
 3200PROCzero_terminate(S%)
 3210PROCset_icon_state(main%,I%,0,0): REM force redraw
 3220ENDPROC
 3230:
 3240DEF PROCPrinter_AmendConfig
 3250IF feed_config% <> feed_new% THEN
 3260 PTR#out_file%=feed_ptr%
 3270 BPUT#out_file%,STR$feed_new%;
 3280 feed_config% = feed_new%
 3290ENDIF
 3300IF format_config% <> format_new% THEN
 3310 PTR#out_file%=format_ptr%
 3320 BPUT#out_file%,STR$format_new%;
 3330 format_config% = format_new%
 3340ENDIF
 3350IF title_config% <> title_new% THEN
 3360 PTR#out_file%=title_ptr%
 3370 BPUT#out_file%,STR$title_new%;
 3380 title_config% = title_new%
 3390ENDIF
 3400IF cols_config% <> cols_new% THEN
 3410 PTR#out_file%=cols_ptr%
 3420 BPUT#out_file%,STR$cols_new%;
 3430 cols_config% = cols_new%
 3440ENDIF
 3450IF lnum_config% <> lnum_new% THEN
 3460 PTR#out_file%=lnum_ptr%
 3470 BPUT#out_file%,STR$lnum_new%;
 3480 lnum_config% = lnum_new%
 3490ENDIF
 3500IF lterm_config% <> lterm_new% THEN
 3510 PTR#out_file%=lterm_ptr%
 3520 BPUT#out_file%,STR$lterm_new%;
 3530 lterm_config% = lterm_new%
 3540ENDIF
 3550IF ccs_config% <> ccs_new% THEN
 3560 PTR#out_file%=ccs_ptr%
 3570 BPUT#out_file%,STR$ccs_new%;
 3580 ccs_config% = ccs_new%
 3590ENDIF
 3600ENDPROC
 3610:
 3620DEF PROCPrinter_Ignore
 3630*RMEnsure SerialRXIgnore 0 RMLOAD <PDriver$Dir>.Ignore
 3640ENDPROC
 3650:
 3660DEF PROCPrinter_XonXoff(flag%)
 3670IF flag% THEN
 3680 *SerialRXOff
 3690 *fx 2,2
 3700ELSE
 3710 *fx 2,0
 3720 *SerialRXOn
 3730ENDIF
 3740ENDPROC
 3750:
 3760DEF PROCPrinter_Location(loc%)
 3770REM Called whenever the current printer location is set
 3780CASE loc% OF
 3790 WHEN 1,2:
 3800  ctrlD% = TRUE
 3810  SYS "PDriver_SetPrinter",1
 3820 WHEN 4,5:
 3830  ctrlD% = FALSE
 3840  SYS "PDriver_SetPrinter",0
 3850ENDCASE
 3860ENDPROC
 3870:
 3880DEF PROCPrinter_CloseFiles
 3890IF my_file%<>0 THEN CLOSE#my_file%: my_file%=0
 3900ENDPROC
 3910:
 3920DEF PROCPrinter_Header
 3930IF Ftype%=OutputType% THEN
 3940 `ext%=EXT#in_file%
 3950ELSE
 3960 REM Calculate page format. Units are mostly decipoints.
 3970 LOCAL pl%,pr%,pb%,pt%,margin%
 3980 format_print% = format_new%
 3990 title_print% = title_new%
 4000 cols_print% = cols_new%
 4010 lnum_print% = lnum_new%
 4020 lterm_print% = lterm_new%
 4030 ccs_print% = ccs_new%
 4040 margin% = 50
 4050 pl% = page_desc%(page_number%,page_left_field%)   DIV 100 + 1 + margin%
 4060 pr% = page_desc%(page_number%,page_right_field%)  DIV 100 - margin%
 4070 pb% = page_desc%(page_number%,page_bottom_field%) DIV 100 + 1 + margin%
 4080 pt% = page_desc%(page_number%,page_top_field%)    DIV 100 - margin%
 4090 `bbox$ = STR$(pl% DIV 10)+" "+STR$(pb% DIV 10)+" "+STR$((pr%+9) DIV 10)+" "+STR$((pt%+9) DIV 10)
 4100 CASE format_print% OF
 4110  WHEN 0: REM Portrait
 4120   IF title_print% THEN pt%-=150
 4130   `pw% = pr%-pl%
 4140   `ph% = pt%-pb%
 4150   `fsize% = 100
 4160   `transform$ = STR$pl%+" "+STR$pt%+" 0"
 4170  WHEN 1: REM Landscape
 4180   IF title_print% THEN pl%+=150
 4190   `pw% = pt%-pb%
 4200   `ph% = pr%-pl%
 4210   `fsize% = 70
 4220   `transform$ = STR$pb%+" "+STR$(-pl%)+" 90"
 4230 ENDCASE
 4240 `w% = 0.6 * `fsize%: REM Courier character width is 60% of size
 4250 `h% = 1.1 * `fsize%: REM Allow 10% leading
 4260 `pw% = `pw% DIV `w%: REM Size of page in characters
 4270 `ph% = `ph% DIV `h%
 4280 `cw% = (`pw%+2) DIV cols_print% - 2: REM Width of column in characters
 4290 IF `cw%<10 THEN PROCmoan("Columns too narrow: reduce number of columns and try again")
 4300 ?error_blk%=3: SYS "OS_Word",14,error_blk%
 4310 SYS "OS_ConvertStandardDateAndTime",error_blk%,error_blk%+5,250
 4320 IF filenam$="<Printer$Scrap>" OR filenam$="<Printer$Temp>" THEN
 4330  `name$=save_name$
 4340 ELSE
 4350  `name$=filenam$
 4360 ENDIF
 4370 `time$ = FNrtoz(error_blk%+5)
 4380 `st% = 0: `s2% = 0: REM Stage of production of the output
 4390 `page% = 0
 4400 `output% = oline%: $`output% = "": `lf% = FALSE: REM No output pending
 4410 IF bufsz%<256 THEN bufsz%=256: DIM buf% bufsz%, buf2% bufsz%
 4420ENDIF
 4430ENDPROC
 4440:
 4450DEF FNPrinter_Send(len%)
 4460PROCEscOn
 4470LOCAL L%,done%
 4480IF len%>255 THEN len%=255: REM For safety with BASIC strings
 4490IF Ftype%=OutputType% THEN
 4500 L% = `ext% - PTR#in_file%
 4510 done% = (len%>=L%)
 4520 IF done% THEN
 4530  SYS "OS_GBPB", 4, in_file%, buf%, L%
 4540  SYS "OS_GBPB", 2, out_file%, buf%, L%
 4550 ELSE
 4560  SYS "OS_GBPB", 4, in_file%, buf%, len%
 4570  SYS "OS_GBPB", 2, out_file%, buf%, len%
 4580 ENDIF
 4590ELSE
 4600 done%=FALSE
 4610 L%=LEN($`output%)
 4620 IF `lf% AND L%<255 THEN `output%?L%=10: L%+=1: `output%?L%=13: `lf%=FALSE
 4630 WHILE NOT done% AND L%=0
 4640  done%=FNOLine: L%=LEN($`output%): IF L%>0 THEN `lf%=TRUE
 4650 ENDWHILE
 4660 IF NOT done% THEN
 4670  IF L%<len% THEN
 4680   IF `lf% THEN `output%?L%=10: L%+=1: `output%?L%=13: `lf%=FALSE
 4690  ELSE
 4700   L%=len%
 4710  ENDIF
 4720  SYS "OS_GBPB", 2, out_file%, `output%, L% TO ,,`output%
 4730 ENDIF
 4740ENDIF
 4750PROCEscOff
 4760=done%
 4770:
 4780DEF PROCPrinter_Footer
 4790IF ctrlD% THEN
 4800 PROCEscOn
 4810 BPUT#out_file%,4
 4820 PROCEscOff
 4830ENDIF
 4840ENDPROC
 4850:
 4860DEF FNOLine
 4870REM Produce the next line of PostScript output
 4880LOCAL done%
 4890done% = FALSE
 4900$oline% = ""
 4910CASE `st% OF
 4920 WHEN 0:
 4930  PROCheaderline
 4940 WHEN 1:
 4950  IF `s2%=0 THEN
 4960   my_file% = OPENIN"<PDriver$Dir>.PSencoding"
 4970   IF my_file%=0 THEN PROCmoan("Can't open the PSencoding file")
 4980   `s2%=1
 4990  ENDIF
 5000  PROCencodingline
 5010 WHEN 2:
 5020  IF `s2%=0 THEN
 5030   my_file% = OPENIN"<PDriver$Dir>.PStprolog"
 5040   IF my_file%=0 THEN PROCmoan("Can't open the PStprolog file")
 5050   `s2%=1
 5060  ENDIF
 5070  PROCprologline
 5080 WHEN 3:
 5090  PROCsetupline
 5100 WHEN 4:
 5110  PROCstartreading
 5120 WHEN 5:
 5130  PROCstartpage
 5140 WHEN 6:
 5150  PROCtextline
 5160 WHEN 7:
 5170  PROCendpage
 5180 WHEN 8:
 5190  PROCtrailerline
 5200 OTHERWISE:
 5210  done% = TRUE
 5220ENDCASE
 5230`output% = oline%
 5240=done%
 5250:
 5260DEF PROCheaderline
 5270LOCAL temp%,done%
 5280done%=FALSE
 5290CASE `s2% OF
 5300 WHEN 0:
 5310  $oline% = "%!PS-Adobe-2.1"
 5320 WHEN 1:
 5330  $oline% = "%%Creator: !PrinterPS application "+VersionNumber$
 5340 WHEN 2:
 5350  $oline% = "%%CreationDate: "+`time$
 5360 WHEN 3:
 5370  $oline% = "%%Title: "+`name$
 5380 WHEN 4:
 5390  SYS "XOS_ReadVarVal","PDriver$For",,-1,0 TO ,,temp%
 5400  IF temp%<0 THEN $buf%="%%For: <PDriver$For>": PROCexpandbuf
 5410 WHEN 5:
 5420  SYS "XOS_ReadVarVal","PDriver$Address",,-1,0 TO ,,temp%
 5430  IF temp%<0 THEN $buf%="%%Routing: <PDriver$Address>": PROCexpandbuf
 5440 WHEN 6:
 5450  $oline% = "%%Pages: (atend)"
 5460 WHEN 7:
 5470  $oline% = "%%BoundingBox: "+`bbox$
 5480 WHEN 8:
 5490  $oline% = "%%DocumentFonts: Courier Courier-Bold"
 5500 WHEN 9:
 5510  $oline% = "%%EndComments"
 5520 WHEN 10:
 5530  $oline% = "/PDdict 50 dict def"
 5540 WHEN 11:
 5550  $oline% = "PDdict begin"
 5560 OTHERWISE:
 5570  done%=TRUE
 5580ENDCASE
 5590IF done% THEN `st%+=1: `s2%=0: ELSE `s2%+=1
 5600ENDPROC
 5610:
 5620DEF PROCencodingline
 5630LOCAL done%
 5640done%=EOF#my_file%
 5650IF NOT done% THEN
 5660 $buf%=GET$#my_file%
 5670 done% = (buf%?0=37 AND buf%?1=47)
 5680 IF NOT done% THEN PROCreducebuf
 5690ENDIF
 5700IF done% THEN CLOSE#my_file%: my_file%=0: `st%+=1: `s2%=0
 5710ENDPROC
 5720:
 5730DEF PROCprologline
 5740LOCAL done%
 5750done%=EOF#my_file%
 5760IF done% THEN
 5770 CLOSE#my_file%: my_file%=0: `st%+=1: `s2%=0
 5780ELSE
 5790 $buf%=GET$#my_file%
 5800 PROCreducebuf
 5810ENDIF
 5820ENDPROC
 5830:
 5840DEF PROCsetupline
 5850LOCAL temp%, done%
 5860done%=FALSE
 5870CASE `s2% OF
 5880 WHEN 0:
 5890  $oline% = "%%EndProlog"
 5900 WHEN 1:
 5910  SYS "XOS_ReadVarVal","PDriver$PSextra",,-1,0 TO ,,temp%
 5920  IF temp%>=0 THEN `s2%+=2: ELSE $oline% = "%%BeginSetup"
 5930 WHEN 2:
 5940  $buf%="<PDriver$PSextra>": PROCexpandbuf
 5950 WHEN 3:
 5960  $oline% = "%%EndSetup"
 5970 OTHERWISE:
 5980  done%=TRUE
 5990ENDCASE
 6000IF done% THEN `st%+=1: `s2%=0: ELSE `s2%+=1
 6010ENDPROC
 6020:
 6030DEF PROCstartreading
 6040`eof%=FALSE: `nl%=TRUE: `line%=0
 6050IF EOF#in_file% THEN `c%=-1: ELSE `c%=BGET#in_file%
 6060PROCILine
 6070IF `eof% THEN `st%+=4: ELSE `st%+=1
 6080`s2%=0
 6090ENDPROC
 6100:
 6110DEF PROCstartpage
 6120LOCAL done%
 6130nomore%=FALSE
 6140done%=FALSE
 6150CASE `s2% OF
 6160 WHEN 0:
 6170  $oline%="%%Page: "
 6180  IF cols_print%>1 THEN $oline% += STR$(cols_print%*`page%+1) + "-"
 6190  `page% += 1
 6200  $oline% += STR$(cols_print%*`page%)+" "+STR$`page%
 6210 WHEN 1:
 6220  $oline% = "%%PageBoundingBox: "+`bbox$
 6230 WHEN 2:
 6240  $oline% = `transform$+" "+STR$`fsize%+" "+STR$`w%+" "+STR$`h%+" StartPage"
 6250 WHEN 3:
 6260  IF title_print% THEN
 6270   $tline%="Page "+STR$`page%+"   File "+`name$+"   Date "+`time$
 6280   `sout%=0
 6290  ELSE
 6300   `s2%+=1: REM Skip title output
 6310  ENDIF
 6320  `font%=-1: REM Current PostScript font is unknown or unusual
 6330  `col%=0: `y%=1
 6340 WHEN 4:
 6350  IF FNstringoutput(tline%) THEN
 6360   IF LEN($oline%)+7>MaxLine% THEN $oline% += CHR$10
 6370   $oline% += "-.5 0 T"
 6380  ELSE
 6390   `s2%-=1
 6400  ENDIF
 6410 OTHERWISE:
 6420  done%=TRUE
 6430ENDCASE
 6440IF done% THEN `st%+=1:`s2%=0: ELSE `s2%+=1
 6450ENDPROC
 6460:
 6470DEF PROCtextline
 6480LOCAL temp$
 6490CASE `s2% OF
 6500 WHEN 0:
 6510  `i%=LEN($buf%)-1
 6520  WHILE buf%?`i%=32 AND `i%>=0: `i%-=1: ENDWHILE
 6530  buf%?(`i%+1)=13
 6540  `i%=buf%
 6550  IF $`i% <> "" THEN `s2%+=1: ELSE `s2%+=4
 6560 WHEN 1:
 6570  WHILE ?`i%=32: `i%+=1: ENDWHILE
 6580  `j%=INSTR($`i%,"            ")
 6590  IF `j%>0 THEN `i%?(`j%-1)=13
 6600  `sout%=0
 6610  `s2%+=1
 6620 WHEN 2:
 6630  IF FNstringoutput(`i%) THEN
 6640   temp$=STR$`y%+" "+STR$(`i%-buf%+`col%*(`cw%+2))
 6650   IF `font%=0 THEN temp$+=" S": ELSE temp$+=" N": `font%=0
 6660   IF LEN($oline%)+LEN(temp$)>MaxLine% THEN $oline% += CHR$10
 6670   $oline% += temp$
 6680   `s2%+=1
 6690  ENDIF
 6700 WHEN 3:
 6710  IF `j%>0 THEN `i%+=`j%+11: `s2%-=2: ELSE `s2%+=1
 6720 WHEN 4:
 6730  `i%=LEN($buf2%)-1
 6740  WHILE buf2%?`i%=32 AND `i%>=0: `i%-=1: ENDWHILE
 6750  buf2%?(`i%+1)=13
 6760  `i%=buf2%
 6770  IF $`i% <> "" THEN `s2%+=1: ELSE `s2%+=4
 6780 WHEN 5:
 6790  WHILE ?`i%=32: `i%+=1: ENDWHILE
 6800  `j%=INSTR($`i%,"            ")
 6810  IF `j%>0 THEN `i%?(`j%-1)=13
 6820  `sout%=0
 6830  `s2%+=1
 6840 WHEN 6:
 6850  IF FNstringoutput(`i%) THEN
 6860   temp$=STR$`y%+" "+STR$(`i%-buf2%+`col%*(`cw%+2))
 6870   IF `font%=1 THEN temp$+=" S": ELSE temp$+=" B": `font%=1
 6880   IF LEN($oline%)+LEN(temp$)>MaxLine% THEN $oline% += CHR$10
 6890   $oline% += temp$
 6900   `s2%+=1
 6910  ENDIF
 6920 WHEN 7:
 6930  IF `j%>0 THEN `i%+=`j%+11: `s2%-=2: ELSE `s2%+=1
 6940 WHEN 8:
 6950  `s2%=`st%
 6960  `y%+=1
 6970  IF `nc% OR `y%>`ph% THEN `y%=1: `col%+=1: IF `col%>=cols_print% THEN `s2%+=1
 6980  PROCILine
 6990  IF `eof% THEN `st%+=1: ELSE `st%=`s2%
 7000  `s2%=0
 7010 ENDCASE
 7020ENDPROC
 7030:
 7040DEF PROCendpage
 7050LOCAL done%
 7060done%=FALSE
 7070CASE `s2% OF
 7080 WHEN 0:
 7090  $oline% = "EndPage"
 7100 OTHERWISE:
 7110  done%=TRUE
 7120ENDCASE
 7130IF `eof% THEN `st%+=1:`s2%=0: ELSE IF done% THEN `st%-=2:`s2%=0: ELSE `s2%+=1
 7140ENDPROC
 7150:
 7160DEF PROCtrailerline
 7170LOCAL done%
 7180done%=FALSE
 7190CASE `s2% OF
 7200 WHEN 0:
 7210  $oline% = "%%Trailer"
 7220 WHEN 1:
 7230  $oline% = "end"
 7240 WHEN 2:
 7250  $oline% = "%%Pages: "+STR$`page%
 7260 OTHERWISE:
 7270  done%=TRUE
 7280ENDCASE
 7290IF done% THEN `st%+=1: `s2%=0: ELSE `s2%+=1
 7300ENDPROC
 7310:
 7320DEF PROCexpandbuf
 7330LOCAL len%,F%
 7340SYS "XOS_GSTrans",buf%,oline%,oline_size%-2 TO ,,len%;F%
 7350IF F% AND %11 THEN
 7360 $oline% = ""
 7370ELSE
 7380 oline%?len% = 13
 7390ENDIF
 7400ENDPROC
 7410:
 7420DEF PROCreducebuf
 7430LOCAL I%,J%,K%
 7440I%=0: J%=LEN($buf%)
 7450IF buf%?0<>37 OR (buf%?1<>37 AND buf%?1<>33) THEN
 7460 K%=INSTR($buf%, "%")
 7470 IF K%<>0 THEN J%=K%-1
 7480 WHILE buf%?I%=32 AND I%<J%: I%+=1: ENDWHILE
 7490 WHILE buf%?(J%-1)=32 AND J%>I%: J%-=1: ENDWHILE
 7500ENDIF
 7510$oline% = MID$($buf%,I%+1,J%-I%)
 7520ENDPROC
 7530:
 7540DEF PROCILine
 7550LOCAL I%
 7560I%=0
 7570IF `nl% THEN
 7580 IF `c%=-1 THEN
 7590  `eof%=TRUE
 7600 ELSE
 7610  `line%+=1
 7620  IF lnum_print% THEN
 7630   $(buf%+I%)="      ": $(buf2%+I%)=RIGHT$("    "+STR$(`line%),5)+" ": I%+=6
 7640  ENDIF
 7650 ENDIF
 7660ELSE
 7670 IF lnum_print% THEN $(buf%+I%)="      ": $(buf2%+I%)="      ": I%+=6
 7680 $(buf%+I%)=`old$: $(buf2%+I%)=`old2$: I%+=LEN(`old$)
 7690ENDIF
 7700IF NOT `eof% THEN
 7710 `nc%=FALSE
 7720 `nl%=(`c%=-1 OR `c%=10 OR `c%=12 OR (`c%=13 AND lterm_print%<>0))
 7730 WHILE I%<=`cw% AND NOT `nl%
 7740  IF `c%>31 AND `c%<>127 THEN
 7750   buf%?I%=`c%: buf2%?I%=32: I%+=1
 7760  ELSE
 7770   IF ccs_print% THEN
 7780    $(buf%+I%)="    ": $(buf2%+I%)="["+RIGHT$("0"+STR$~`c%,2)+"]": I%+=4
 7790   ENDIF
 7800  ENDIF
 7810  IF EOF#in_file% THEN `c%=-1: ELSE `c%=BGET#in_file%
 7820  `nl%=(`c%=-1 OR `c%=10 OR `c%=12 OR (`c%=13 AND lterm_print%<>0))
 7830 ENDWHILE
 7840 buf%?I%=13: buf2%?I%=13
 7850 IF I%<=`cw% THEN
 7860  I%=`c%
 7870  IF EOF#in_file% THEN `c%=-1: ELSE `c%=BGET#in_file%
 7880  IF I%=12 THEN `nc%=TRUE
 7890  IF I%=10 OR I%=13 THEN
 7900   IF lterm_print% AND I%+`c%=23 THEN
 7910    IF EOF#in_file% THEN `c%=-1: ELSE `c%=BGET#in_file%
 7920   ENDIF
 7930   IF `c%=12 THEN
 7940    `nc%=TRUE
 7950    IF EOF#in_file% THEN `c%=-1: ELSE `c%=BGET#in_file%
 7960   ENDIF
 7970  ENDIF
 7980 ELSE
 7990  `old$=MID$($buf%,`cw%+1): `old2$=MID$($buf2%,`cw%+1)
 8000  IF lnum_print% THEN
 8010   buf%?`cw%=13: buf2%?`cw%=13
 8020  ELSE
 8030   $(buf%+`cw%)=" ": $(buf2%+`cw%)="|"
 8040  ENDIF
 8050  `nl%=FALSE
 8060 ENDIF
 8070ENDIF
 8080ENDPROC
 8090:
 8100DEF FNstringoutput(str%)
 8110LOCAL out%,C%,done%
 8120out%=0
 8130IF `sout%=0 THEN oline%?out%=40: out%+=1
 8140C%=str%?`sout%
 8150WHILE C%>31 AND out%<MaxLine%-4
 8160 `sout%+=1
 8170 IF C%>126 THEN
 8180  oline%?out%=92: out%+=1
 8190  oline%?out%=((C%>>6)AND7)+48: out%+=1
 8200  oline%?out%=((C%>>3)AND7)+48: out%+=1
 8210  oline%?out%=(C%AND7)+48: out%+=1
 8220 ELSE
 8230  IF C%=92 OR C%=40 OR C%=41 THEN oline%?out%=92: out%+=1
 8240  oline%?out%=C%: out%+=1
 8250 ENDIF
 8260 C%=str%?`sout%
 8270ENDWHILE
 8280done%=(C%<32)
 8290IF done% THEN oline%?out%=41: ELSE oline%?out%=92
 8300oline%?(out%+1)=13
 8310=done%
 8320>*FX 229,1

4� > Library V.1.12 for PostScript printer driver
@� Purpose: printer-specific parts of the printer application
(� Authors: AThompson, NReeves, DSeal
(:
2� �Printer_initialise
<� P%
F[� VersionNumber$ <> "1.12" � �moan("Inconsistent !RunImage and Library in application")
PPrinterClass$="PrinterPS"
Z"FullPrinterClass$="PostScript"
dOutputType%=&FF5
nPrData_expected% = 1
xMaxLine% = 72
�@� define printer class dependent fields in printer data area
�'     prologue2_field% = �p_field(4)
�'   manual_feed_field% = �p_field(4)
�'     auto_feed_field% = �p_field(4)
�'   printer_data_size% = �p_field(0)
�1� define class dependent icons in main window
�main_feed% = 2
�main_auto% = 3
�main_manual% = 4
�main_portrait% = 6
�main_landscape% = 7
�main_title% = 8
�printer_data_list% = 0:P%=0
�Printer_read_config_file
"� now convert to circular list
-P%!list_pointer_field%=printer_data_list%
"!� buf2% bufsz%, tline% bufsz%
,Foline_size% = 256: � Space for full string + LF that may get added
6� oline% oline_size%
@my_file%=0
J�
T:
^ � �Printer_set_initial_state
h� D%
r� set default state
|D%=printer_data_list%
�]ȕ D%!list_pointer_field%<>printer_data_list% � D%!printer_number_field%<>printer_config%
� D%=D%!list_pointer_field%
��
�F� D%!printer_number_field%=printer_config% � printer_data_list%=D%
��Printer_set_description
��Printer_set_module_data
��
�:
�� �Printer_terminate
� �: � no tidying up necessary
�:
�� �Printer_load_templates
�H�set_icon_state(main%, main_portrait%, (1-format_new%) << 21, 1<<21)
E�set_icon_state(main%, main_landscape%, format_new% << 21, 1<<21)
@�set_icon_state(main%, main_title%, title_new% << 21, 1<<21)
�
&:
0)� �Printer_process_event(action%, E%)
:
� res%
D
res%=�
NȎ action% �
X
 � 17,18:
b  Ȏ E%!16 �
l   � &502:
v�    � E%!32 = main% � E%!36 >= -1 � �helpreply("Printer setup.|MClick SELECT or ADJUST to alter the settings.",E%!8,E%!4):res% = �
�  �
� � 6
�  � E%!12=main% �
�
   Ȏ � �
�    � (E%!8 � %101)<>0:
�     Ȏ E%!16 �
�      � main_description%:
�       � E%!8 � 1 �
�%        res% = printer_data_list%
�I        � printer_data_list% = printer_data_list%!list_pointer_field%
�;        � printer_data_list%!list_pointer_field% = res%
�       �
�G        printer_data_list% = printer_data_list%!list_pointer_field%
       �
#       �Printer_set_description
#       �Printer_set_module_data
 B       printer_new% = printer_data_list%!printer_number_field%
*       res%=�
4      � main_auto%
>       feed_new%=0
H       �Printer_set_feed
R      � main_manual%
\       feed_new%=1
f       �Printer_set_feed
p      � main_portrait%
z?       �set_icon_state(main%, main_portrait%, 1<<21, 1<<21)
�       format_new%=0
�       cols_new%=1
�      � main_landscape%
�@       �set_icon_state(main%, main_landscape%, 1<<21, 1<<21)
�       format_new%=1
�       cols_new%=2
�      � main_title%
�       !q%=main%
�       q%!4=main_title%
�%       ș "Wimp_GetIconState",,q%
�)       title_new% = (q%!24 >> 21) � 1
�
     �
�   �
  �
�
	=res%
$:
.� �Printer_read_config_file
8
� H%,ptr%
B"� defaults% printer_data_size%
Lprinter_data% = defaults%
VH%=�"<PDriver$Dir>.PrData"
`/� H%=0 � 100,"Can't read printer data file"
j� �
t� � �: � �: �#H%: � �,�$
~�
� ptr% = �#H%
� �Printer_process_line(H%)
�
� �#H%
��#H%
��
�:
�� �Printer_process_line(H%)
�� I%,J%,tag$
�$buf%=�#H%
�I%=0
�#ȕ �tagchar(buf%?I%): I% += 1:�
�� buf%?I% = �":" �
 � got a tag

  tag$=�lowercase(�$buf%,I%))
 I% += 1
 ȕ buf%?I%=�" ": I% += 1:�
( Ȏ tag$ �
2  � "version"
<   PrData_version% = �read
F  � "printer_name"
P   � build a name
Z#   � description% �$buf% -I% +1
d(   $description% = �$buf%,�$buf%-I%)
n;   � now add a block to our list of printer data blocks
x)   � printer_data% printer_data_size%
�(   � I%=0 � printer_data_size%-4 � 4
�'    printer_data%!I% = defaults%!I%
�   �
�6   printer_data%!description_field% = description%
�   � P%=0 �
�*    printer_data_list% = printer_data%
�   �
�.    P%!list_pointer_field% = printer_data%
�   �
�   P% = printer_data%
�U  � "pxres","pyres","features","pxres_halftone","pyres_halftone","printer_number"
�H   � note that all tags are the same as their respective field names
�0     printer_data%!�(tag$+"_field%") = �read
T  � "page_width","page_height","page_bottom","page_top","page_left","page_right"
;     page_desc%(page_number%,�(tag$+"_field%")) = �read
=     page_ptrs%(page_number%,�(tag$+"_field%")) = ptr%+I%
"  � "page_number"
,     page_number% = �read
6Z  � "prologue2","manual_feed","auto_feed","server","page_name","file","page_selection"
@   � read a string
J   J% = I%
T'   ȕ buf%?J%>=�" " � buf%?J%<>�";"
^    J% += 1
h   �
r$   � from I% to J% is the string
|   Ȏ tag$ �
�   � "server"
�    server_ptr% = ptr% + I%
�-    server_config$ = �$buf%, I%+1, J%-I%)
�   � "file"
�    file_ptr% = ptr% + I%
�+    file_config$ = �$buf%, I%+1, J%-I%)
�     $file_name%=file_config$
�6    ș "XOS_CLI","set PrinterType$5 "+file_config$
�   � "page_name"
�6    page_names$(page_number%)=�$buf%, I%+1, J%-I%)
�;    page_ptrs%(page_number%,page_name_field%) = ptr%+I%
�   � "page_selection"
�:    page_selection$(page_number%)=�$buf%, I%+1, J%-I%)
   
    � description% J%-I%+1
,    $description% = �$buf%, I%+1, J%-I%)
&6    printer_data%!�(tag$+"_field%") = description%
0   �
:  � "start_page_number"
D"   page_number_config% = �read
N#   page_number_ptr% = ptr% + I%
X  � "printer"
b   printer_config% = �read
l%   printer_new% = printer_config%
v   printer_ptr% = ptr% + I%
�  � "location"
�   location_config% = �read
�    location_ptr% = ptr% + I%
�  � "baud"
�   baud_config% = �read
�   baud_ptr% = ptr% + I%
�  � "data"
�   data_config% = �read
�   data_ptr% = ptr% + I%
�
  � "xon"
�   XON_config% = �read
�   XON_new% = XON_config%
�   XON_ptr% = ptr% + I%
  � "feed"
   feed_config% = �read
   feed_new% = feed_config%
    feed_ptr% = ptr% + I%
*  � "format"
4   format_config% = �read
>#   format_new% = format_config%
H   format_ptr% = ptr% + I%
R  � "title"
\   title_config% = �read
f!   title_new% = title_config%
p   title_ptr% = ptr% + I%
z  � "columns"
�   cols_config% = �read
�   cols_new% = cols_config%
�   cols_ptr% = ptr% + I%
�  � "line_numbers"
�   lnum_config% = �read
�   lnum_new% = lnum_config%
�   lnum_ptr% = ptr% + I%
�  � "line_term"
�   lterm_config% = �read
�!   lterm_new% = lterm_config%
�   lterm_ptr% = ptr% + I%
�  � "print_ccs"
�   ccs_config% = �read
	   ccs_new% = ccs_config%
	   ccs_ptr% = ptr% + I%
	 �
	$�
	.�
	8:
	B7� �read=�read_integer_expression(�$buf%,�$buf%-I%))
	L:
	V"� �read_integer_expression(S$)
	`� R%, T%, E$, P%
	j	E$=""
	t� get rid of any comment
	~ȕ �S$,1) <> ";" � �S$ <> 0
	� E$ += �S$,1)
	� S$ = �S$,�S$-1)
	��
	�6ș"XOS_EvaluateExpression",E$,buf%,256 � ,T%,R%;P%
	�@� T% <> 0 � (P% � 1) � 100, "Integer value needed for "+tag$
	�=R%
	�:
	�� �tagchar(C%)
	�$� (C% >= �"A" � C% <= �"Z") � =�
	�$� (C% >= �"a" � C% <= �"z") � =�
	�,=  (C% >= �"0" � C% <= �"9") � C% = �"_"
	�:
� �Printer_set_module_data

� A%,B%,C%,D%,E%,F%
A%=defaults%!pxres_field%
B%=defaults%!pyres_field%
( C%=defaults%!features_field%
2&D%=defaults%!pxres_halftone_field%
<&E%=defaults%!pyres_halftone_field%
F&F%=defaults%!printer_number_field%
P,ș "PDriver_SetInfo",,A%,B%,C%,,D%,E%,F%
Z
msg%!0=20
d
msg%!12=0
nmsg%!16=Message_SetPrinter%
x&ș "Wimp_SendMessage", 17, msg%, 0
�(�("Set PDriver$PSprologue PSprolog")
�F�("Set PDriver$PSprologue2 """+$(defaults%!prologue2_field%)+"""")
��Printer_set_feed
��
�:
�� �Printer_change_page_size
��Printer_set_PSextra
��
�:
�� �Printer_set_PSextra
�� value$
�� feed_new%=1 �
�- value$ = $(defaults%!manual_feed_field%)
�
+ value$ = $(defaults%!auto_feed_field%)
�
"+� page_selection$(page_number%) <> "" �
,3 value$ += "|J" + page_selection$(page_number%)
6�
@7ș"OS_SetVarVal","PDriver$PSextra",value$,�(value$)
J�
T:
^� �Printer_set_feed
hB�set_icon_state(main%, main_auto%, (1-feed_new%) << 21, 1<<21)
r@�set_icon_state(main%, main_manual%, feed_new% << 21, 1<<21)
|�Printer_set_PSextra
��
�:
�� �Printer_set_description
�� S%, S$
�'� S% = 0 � printer_data_size%-4 � 4
�(defaults%!S% = printer_data_list%!S%
��
�H�Printer_set_icon(main_description%,$(defaults%!description_field%))
�S% = 1<<23 � 1<<7
�e� �($(printer_data_list%!manual_feed_field%)) = 0 � �($(printer_data_list%!auto_feed_field%))=0 �
�, �set_icon_state(main%,main_feed%,S%,S%)
�, �set_icon_state(main%,main_auto%,S%,S%)
�. �set_icon_state(main%,main_manual%,S%,S%)
�
+ �set_icon_state(main%,main_feed%,0,S%)
+ �set_icon_state(main%,main_auto%,0,S%)
&- �set_icon_state(main%,main_manual%,0,S%)
0�
:Jș "XOS_CLI","SET Printer$"+" """+$(defaults%!description_field%)+""""
D�
N:
X� �Printer_set_icon(I%,S$)
b� S%
lS%=�iconaddr(main%,I%)
v$S% = S$
��zero_terminate(S%)
�1�set_icon_state(main%,I%,0,0): � force redraw
��
�:
�� �Printer_AmendConfig
�!� feed_config% <> feed_new% �
� �#out_file%=feed_ptr%
� �#out_file%,�feed_new%;
� feed_config% = feed_new%
��
�%� format_config% <> format_new% �
� �#out_file%=format_ptr%
� �#out_file%,�format_new%;

! format_config% = format_new%

�

#� title_config% <> title_new% �

  �#out_file%=title_ptr%

* �#out_file%,�title_new%;

4 title_config% = title_new%

>�

H!� cols_config% <> cols_new% �

R �#out_file%=cols_ptr%

\ �#out_file%,�cols_new%;

f cols_config% = cols_new%

p�

z!� lnum_config% <> lnum_new% �

� �#out_file%=lnum_ptr%

� �#out_file%,�lnum_new%;

� lnum_config% = lnum_new%

��

�#� lterm_config% <> lterm_new% �

� �#out_file%=lterm_ptr%

� �#out_file%,�lterm_new%;

� lterm_config% = lterm_new%

��

�� ccs_config% <> ccs_new% �

� �#out_file%=ccs_ptr%

� �#out_file%,�ccs_new%;

� ccs_config% = ccs_new%
�
�
:
$� �Printer_Ignore
.:*RMEnsure SerialRXIgnore 0 RMLOAD <PDriver$Dir>.Ignore
8�
B:
L� �Printer_XonXoff(flag%)
V
� flag% �
` *SerialRXOff
j *fx 2,2
t�
~ *fx 2,0
� *SerialRXOn
��
��
�:
�� �Printer_Location(loc%)
�9� Called whenever the current printer location is set
�
Ȏ loc% �
� � 1,2:
�  ctrlD% = �
�  ș "PDriver_SetPrinter",1
� � 4,5:
�  ctrlD% = �
  ș "PDriver_SetPrinter",0

�
�
:
(� �Printer_CloseFiles
2*� my_file%<>0 � �#my_file%: my_file%=0
<�
F:
P� �Printer_Header
Z� Ftype%=OutputType% �
d `ext%=�#in_file%
n�
x: � Calculate page format. Units are mostly decipoints.
� � pl%,pr%,pb%,pt%,margin%
�  format_print% = format_new%
� title_print% = title_new%
� cols_print% = cols_new%
� lnum_print% = lnum_new%
� lterm_print% = lterm_new%
� ccs_print% = ccs_new%
� margin% = 50
�J pl% = page_desc%(page_number%,page_left_field%)   � 100 + 1 + margin%
�F pr% = page_desc%(page_number%,page_right_field%)  � 100 - margin%
�J pb% = page_desc%(page_number%,page_bottom_field%) � 100 + 1 + margin%
�F pt% = page_desc%(page_number%,page_top_field%)    � 100 - margin%
�Q `bbox$ = �(pl% � 10)+" "+�(pb% � 10)+" "+�((pr%+9) � 10)+" "+�((pt%+9) � 10)
 Ȏ format_print% �
  � 0: � Portrait
    � title_print% � pt%-=150
"   `pw% = pr%-pl%
,   `ph% = pt%-pb%
6   `fsize% = 100
@'   `transform$ = �pl%+" "+�pt%+" 0"
J  � 1: � Landscape
T    � title_print% � pl%+=150
^   `pw% = pt%-pb%
h   `ph% = pr%-pl%
r   `fsize% = 70
|+   `transform$ = �pb%+" "+�(-pl%)+" 90"
� �
�B `w% = 0.6 * `fsize%: � Courier character width is 60% of size
�- `h% = 1.1 * `fsize%: � Allow 10% leading
�4 `pw% = `pw% � `w%: � Size of page in characters
� `ph% = `ph% � `h%
�G `cw% = (`pw%+2) � cols_print% - 2: � Width of column in characters
�T � `cw%<10 � �moan("Columns too narrow: reduce number of columns and try again")
�. ?error_blk%=3: ș "OS_Word",14,error_blk%
�C ș "OS_ConvertStandardDateAndTime",error_blk%,error_blk%+5,250
�? � filenam$="<Printer$Scrap>" � filenam$="<Printer$Temp>" �
�  `name$=save_name$
� �
�  `name$=filenam$
 �
! `time$ = �rtoz(error_blk%+5)
< `st% = 0: `s2% = 0: � Stage of production of the output
& `page% = 0
0E `output% = oline%: $`output% = "": `lf% = �: � No output pending
:; � bufsz%<256 � bufsz%=256: � buf% bufsz%, buf2% bufsz%
D�
N�
X:
b� �Printer_Send(len%)
l
�EscOn
v� L%,done%
�:� len%>255 � len%=255: � For safety with BASIC strings
�� Ftype%=OutputType% �
� L% = `ext% - �#in_file%
� done% = (len%>=L%)
� � done% �
�)  ș "OS_GBPB", 4, in_file%, buf%, L%
�*  ș "OS_GBPB", 2, out_file%, buf%, L%
� �
�+  ș "OS_GBPB", 4, in_file%, buf%, len%
�,  ș "OS_GBPB", 2, out_file%, buf%, len%
� �
��
� done%=�
 L%=�($`output%)
D � `lf% � L%<255 � `output%?L%=10: L%+=1: `output%?L%=13: `lf%=�
 ȕ � done% � L%=0
 4  done%=�OLine: L%=�($`output%): � L%>0 � `lf%=�
* �
4 � � done% �
>  � L%<len% �
H=   � `lf% � `output%?L%=10: L%+=1: `output%?L%=13: `lf%=�
R  �
\   L%=len%
f  �
p;  ș "OS_GBPB", 2, out_file%, `output%, L% � ,,`output%
z �
��
��EscOff
�
=done%
�:
�� �Printer_Footer
�� ctrlD% �
� �EscOn
� �#out_file%,4
� �EscOff
��
��
�:
�� �OLine
0� Produce the next line of PostScript output
� done%

done% = �
$$oline% = ""
.
Ȏ `st% �
8	 � 0:
B  �headerline
L	 � 1:
V  � `s2%=0 �
`-   my_file% = �"<PDriver$Dir>.PSencoding"
j=   � my_file%=0 � �moan("Can't open the PSencoding file")
t
   `s2%=1
~  �
�  �encodingline
�	 � 2:
�  � `s2%=0 �
�,   my_file% = �"<PDriver$Dir>.PStprolog"
�<   � my_file%=0 � �moan("Can't open the PStprolog file")
�
   `s2%=1
�  �
�  �prologline
�	 � 3:
�  �setupline
�	 � 4:
�  �startreading
	 � 5:

  �startpage
	 � 6:
  �textline
(	 � 7:
2  �endpage
<	 � 8:
F  �trailerline
P :
Z  done% = �
d�
n`output% = oline%
x
=done%
�:
�� �headerline
�� temp%,done%
�done%=�
�
Ȏ `s2% �
�	 � 0:
�   $oline% = "%!PS-Adobe-2.1"
�	 � 1:
�C  $oline% = "%%Creator: !PrinterPS application "+VersionNumber$
�	 � 2:
�)  $oline% = "%%CreationDate: "+`time$
�	 � 3:
�"  $oline% = "%%Title: "+`name$
	 � 4:
7  ș "XOS_ReadVarVal","PDriver$For",,-1,0 � ,,temp%
:  � temp%<0 � $buf%="%%For: <PDriver$For>": �expandbuf
"	 � 5:
,;  ș "XOS_ReadVarVal","PDriver$Address",,-1,0 � ,,temp%
6B  � temp%<0 � $buf%="%%Routing: <PDriver$Address>": �expandbuf
@	 � 6:
J"  $oline% = "%%Pages: (atend)"
T	 � 7:
^(  $oline% = "%%BoundingBox: "+`bbox$
h	 � 8:
r7  $oline% = "%%DocumentFonts: Courier Courier-Bold"
|	 � 9:
�  $oline% = "%%EndComments"
�
 � 10:
�%  $oline% = "/PDdict 50 dict def"
�
 � 11:
�  $oline% = "PDdict begin"
� :
�
  done%=�
��
�(� done% � `st%+=1: `s2%=0: � `s2%+=1
��
�:
�� �encodingline
�� done%
done%=�#my_file%
� � done% �
 $buf%=�#my_file%
&$ done% = (buf%?0=37 � buf%?1=47)
0 � � done% � �reducebuf
:�
D5� done% � �#my_file%: my_file%=0: `st%+=1: `s2%=0
N�
X:
b� �prologline
l� done%
vdone%=�#my_file%
�
� done% �
�, �#my_file%: my_file%=0: `st%+=1: `s2%=0
��
� $buf%=�#my_file%
� �reducebuf
��
��
�:
�� �setupline
�� temp%, done%
�done%=�
�
Ȏ `s2% �
�	 � 0:
  $oline% = "%%EndProlog"
	 � 1:
;  ș "XOS_ReadVarVal","PDriver$PSextra",,-1,0 � ,,temp%
 6  � temp%>=0 � `s2%+=2: � $oline% = "%%BeginSetup"
*	 � 2:
4+  $buf%="<PDriver$PSextra>": �expandbuf
>	 � 3:
H  $oline% = "%%EndSetup"
R :
\
  done%=�
f�
p(� done% � `st%+=1: `s2%=0: � `s2%+=1
z�
�:
�� �startreading
�`eof%=�: `nl%=�: `line%=0
�+� �#in_file% � `c%=-1: � `c%=�#in_file%
�
�ILine
� � `eof% � `st%+=4: � `st%+=1
�
`s2%=0
��
�:
�� �startpage
�� done%
�
nomore%=�
�done%=�

Ȏ `s2% �
	 � 0:
  $oline%="%%Page: "
$@  � cols_print%>1 � $oline% += �(cols_print%*`page%+1) + "-"
.  `page% += 1
82  $oline% += �(cols_print%*`page%)+" "+�`page%
B	 � 1:
L,  $oline% = "%%PageBoundingBox: "+`bbox$
V	 � 2:
`G  $oline% = `transform$+" "+�`fsize%+" "+�`w%+" "+�`h%+" StartPage"
j	 � 3:
t  � title_print% �
~B   $tline%="Page "+�`page%+"   File "+`name$+"   Date "+`time$
�   `sout%=0
�  �
�#   `s2%+=1: � Skip title output
�  �
�@  `font%=-1: � Current PostScript font is unknown or unusual
�  `col%=0: `y%=1
�	 � 4:
�  � �stringoutput(tline%) �
�/   � �($oline%)+7>MaxLine% � $oline% += �10
�   $oline% += "-.5 0 T"
�  �
�   `s2%-=1
  �

 :

  done%=�
�
('� done% � `st%+=1:`s2%=0: � `s2%+=1
2�
<:
F� �textline
P� temp$
Z
Ȏ `s2% �
d	 � 0:
n  `i%=�($buf%)-1
x(  ȕ buf%?`i%=32 � `i%>=0: `i%-=1: �
�  buf%?(`i%+1)=13
�  `i%=buf%
�'  � $`i% <> "" � `s2%+=1: � `s2%+=4
�	 � 1:
�  ȕ ?`i%=32: `i%+=1: �
�  `j%=�$`i%,"            ")
�  � `j%>0 � `i%?(`j%-1)=13
�  `sout%=0
�
  `s2%+=1
�	 � 2:
�  � �stringoutput(`i%) �
�0   temp$=�`y%+" "+�(`i%-buf%+`col%*(`cw%+2))
�8   � `font%=0 � temp$+=" S": � temp$+=" N": `font%=0
6   � �($oline%)+�(temp$)>MaxLine% � $oline% += �10
   $oline% += temp$
   `s2%+=1
"  �
,	 � 3:
6/  � `j%>0 � `i%+=`j%+11: `s2%-=2: � `s2%+=1
@	 � 4:
J  `i%=�($buf2%)-1
T)  ȕ buf2%?`i%=32 � `i%>=0: `i%-=1: �
^  buf2%?(`i%+1)=13
h  `i%=buf2%
r'  � $`i% <> "" � `s2%+=1: � `s2%+=4
|	 � 5:
�  ȕ ?`i%=32: `i%+=1: �
�  `j%=�$`i%,"            ")
�  � `j%>0 � `i%?(`j%-1)=13
�  `sout%=0
�
  `s2%+=1
�	 � 6:
�  � �stringoutput(`i%) �
�1   temp$=�`y%+" "+�(`i%-buf2%+`col%*(`cw%+2))
�8   � `font%=1 � temp$+=" S": � temp$+=" B": `font%=1
�6   � �($oline%)+�(temp$)>MaxLine% � $oline% += �10
�   $oline% += temp$
�   `s2%+=1
�  �
	 � 7:
/  � `j%>0 � `i%+=`j%+11: `s2%-=2: � `s2%+=1
	 � 8:
&  `s2%=`st%
0  `y%+=1
:I  � `nc% � `y%>`ph% � `y%=1: `col%+=1: � `col%>=cols_print% � `s2%+=1
D  �ILine
N$  � `eof% � `st%+=1: � `st%=`s2%
X  `s2%=0
b �
l�
v:
�� �endpage
�� done%
�done%=�
�
Ȏ `s2% �
�	 � 0:
�  $oline% = "EndPage"
� :
�
  done%=�
��
�C� `eof% � `st%+=1:`s2%=0: � � done% � `st%-=2:`s2%=0: � `s2%+=1
��
�:
�� �trailerline
� done%
done%=�

Ȏ `s2% �
 	 � 0:
*  $oline% = "%%Trailer"
4	 � 1:
>  $oline% = "end"
H	 � 2:
R#  $oline% = "%%Pages: "+�`page%
\ :
f
  done%=�
p�
z(� done% � `st%+=1: `s2%=0: � `s2%+=1
��
�:
�� �expandbuf
�
� len%,F%
�:ș "XOS_GSTrans",buf%,oline%,oline_size%-2 � ,,len%;F%
�� F% � %11 �
� $oline% = ""
��
� oline%?len% = 13
��
��
�:
�� �reducebuf
� I%,J%,K%
I%=0: J%=�($buf%)
.� buf%?0<>37 � (buf%?1<>37 � buf%?1<>33) �
$ K%=�$buf%, "%")
. � K%<>0 � J%=K%-1
8$ ȕ buf%?I%=32 � I%<J%: I%+=1: �
B( ȕ buf%?(J%-1)=32 � J%>I%: J%-=1: �
L�
V $oline% = �$buf%,I%+1,J%-I%)
`�
j:
t� �ILine
~� I%
�I%=0
�� `nl% �
� � `c%=-1 �
�
  `eof%=�
� �
�  `line%+=1
�  � lnum_print% �
�G   $(buf%+I%)="      ": $(buf2%+I%)=�"    "+�(`line%),5)+" ": I%+=6
�  �
� �
��
�E � lnum_print% � $(buf%+I%)="      ": $(buf2%+I%)="      ": I%+=6
7 $(buf%+I%)=`old$: $(buf2%+I%)=`old2$: I%+=�(`old$)

�
� � `eof% �
 `nc%=�
(A `nl%=(`c%=-1 � `c%=10 � `c%=12 � (`c%=13 � lterm_print%<>0))
2 ȕ I%<=`cw% � � `nl%
<  � `c%>31 � `c%<>127 �
F&   buf%?I%=`c%: buf2%?I%=32: I%+=1
P  �
Z   � ccs_print% �
dC    $(buf%+I%)="    ": $(buf2%+I%)="["+�"0"+�~`c%,2)+"]": I%+=4
n   �
x  �
�-  � �#in_file% � `c%=-1: � `c%=�#in_file%
�B  `nl%=(`c%=-1 � `c%=10 � `c%=12 � (`c%=13 � lterm_print%<>0))
� �
� buf%?I%=13: buf2%?I%=13
� � I%<=`cw% �
�  I%=`c%
�-  � �#in_file% � `c%=-1: � `c%=�#in_file%
�  � I%=12 � `nc%=�
�  � I%=10 � I%=13 �
�#   � lterm_print% � I%+`c%=23 �
�/    � �#in_file% � `c%=-1: � `c%=�#in_file%
�   �
�   � `c%=12 �
    `nc%=�
/    � �#in_file% � `c%=-1: � `c%=�#in_file%
   �
"  �
, �
62  `old$=�$buf%,`cw%+1): `old2$=�$buf2%,`cw%+1)
@  � lnum_print% �
J"   buf%?`cw%=13: buf2%?`cw%=13
T  �
^*   $(buf%+`cw%)=" ": $(buf2%+`cw%)="|"
h  �
r  `nl%=�
| �
��
��
�:
�� �stringoutput(str%)
�� out%,C%,done%
�
out%=0
�(� `sout%=0 � oline%?out%=40: out%+=1
�C%=str%?`sout%
�ȕ C%>31 � out%<MaxLine%-4
� `sout%+=1
� � C%>126 �
�  oline%?out%=92: out%+=1
�)  oline%?out%=((C%>>6)�7)+48: out%+=1
 )  oline%?out%=((C%>>3)�7)+48: out%+=1
 $  oline%?out%=(C%�7)+48: out%+=1
  �
 &7  � C%=92 � C%=40 � C%=41 � oline%?out%=92: out%+=1
 0  oline%?out%=C%: out%+=1
 : �
 D C%=str%?`sout%
 N�
 Xdone%=(C%<32)
 b.� done% � oline%?out%=41: � oline%?out%=92
 loline%?(out%+1)=13
 v
=done%
 �>*FX 229,1
�
00000000  0d 00 0a 34 f4 20 3e 20  4c 69 62 72 61 72 79 20  |...4. > Library |
00000010  56 2e 31 2e 31 32 20 66  6f 72 20 50 6f 73 74 53  |V.1.12 for PostS|
00000020  63 72 69 70 74 20 70 72  69 6e 74 65 72 20 64 72  |cript printer dr|
00000030  69 76 65 72 0d 00 14 40  f4 20 50 75 72 70 6f 73  |iver...@. Purpos|
00000040  65 3a 20 70 72 69 6e 74  65 72 2d 73 70 65 63 69  |e: printer-speci|
00000050  66 69 63 20 70 61 72 74  73 20 6f 66 20 74 68 65  |fic parts of the|
00000060  20 70 72 69 6e 74 65 72  20 61 70 70 6c 69 63 61  | printer applica|
00000070  74 69 6f 6e 0d 00 1e 28  f4 20 41 75 74 68 6f 72  |tion...(. Author|
00000080  73 3a 20 41 54 68 6f 6d  70 73 6f 6e 2c 20 4e 52  |s: AThompson, NR|
00000090  65 65 76 65 73 2c 20 44  53 65 61 6c 0d 00 28 05  |eeves, DSeal..(.|
000000a0  3a 0d 00 32 19 dd 20 f2  50 72 69 6e 74 65 72 5f  |:..2.. .Printer_|
000000b0  69 6e 69 74 69 61 6c 69  73 65 0d 00 3c 08 ea 20  |initialise..<.. |
000000c0  50 25 0d 00 46 5b e7 20  56 65 72 73 69 6f 6e 4e  |P%..F[. VersionN|
000000d0  75 6d 62 65 72 24 20 3c  3e 20 22 31 2e 31 32 22  |umber$ <> "1.12"|
000000e0  20 8c 20 f2 6d 6f 61 6e  28 22 49 6e 63 6f 6e 73  | . .moan("Incons|
000000f0  69 73 74 65 6e 74 20 21  52 75 6e 49 6d 61 67 65  |istent !RunImage|
00000100  20 61 6e 64 20 4c 69 62  72 61 72 79 20 69 6e 20  | and Library in |
00000110  61 70 70 6c 69 63 61 74  69 6f 6e 22 29 0d 00 50  |application")..P|
00000120  1d 50 72 69 6e 74 65 72  43 6c 61 73 73 24 3d 22  |.PrinterClass$="|
00000130  50 72 69 6e 74 65 72 50  53 22 0d 00 5a 22 46 75  |PrinterPS"..Z"Fu|
00000140  6c 6c 50 72 69 6e 74 65  72 43 6c 61 73 73 24 3d  |llPrinterClass$=|
00000150  22 50 6f 73 74 53 63 72  69 70 74 22 0d 00 64 14  |"PostScript"..d.|
00000160  4f 75 74 70 75 74 54 79  70 65 25 3d 26 46 46 35  |OutputType%=&FF5|
00000170  0d 00 6e 18 50 72 44 61  74 61 5f 65 78 70 65 63  |..n.PrData_expec|
00000180  74 65 64 25 20 3d 20 31  0d 00 78 11 4d 61 78 4c  |ted% = 1..x.MaxL|
00000190  69 6e 65 25 20 3d 20 37  32 0d 00 82 40 f4 20 64  |ine% = 72...@. d|
000001a0  65 66 69 6e 65 20 70 72  69 6e 74 65 72 20 63 6c  |efine printer cl|
000001b0  61 73 73 20 64 65 70 65  6e 64 65 6e 74 20 66 69  |ass dependent fi|
000001c0  65 6c 64 73 20 69 6e 20  70 72 69 6e 74 65 72 20  |elds in printer |
000001d0  64 61 74 61 20 61 72 65  61 0d 00 8c 27 20 20 20  |data area...'   |
000001e0  20 20 70 72 6f 6c 6f 67  75 65 32 5f 66 69 65 6c  |  prologue2_fiel|
000001f0  64 25 20 3d 20 a4 70 5f  66 69 65 6c 64 28 34 29  |d% = .p_field(4)|
00000200  0d 00 96 27 20 20 20 6d  61 6e 75 61 6c 5f 66 65  |...'   manual_fe|
00000210  65 64 5f 66 69 65 6c 64  25 20 3d 20 a4 70 5f 66  |ed_field% = .p_f|
00000220  69 65 6c 64 28 34 29 0d  00 a0 27 20 20 20 20 20  |ield(4)...'     |
00000230  61 75 74 6f 5f 66 65 65  64 5f 66 69 65 6c 64 25  |auto_feed_field%|
00000240  20 3d 20 a4 70 5f 66 69  65 6c 64 28 34 29 0d 00  | = .p_field(4)..|
00000250  aa 27 20 20 20 70 72 69  6e 74 65 72 5f 64 61 74  |.'   printer_dat|
00000260  61 5f 73 69 7a 65 25 20  3d 20 a4 70 5f 66 69 65  |a_size% = .p_fie|
00000270  6c 64 28 30 29 0d 00 b4  31 f4 20 64 65 66 69 6e  |ld(0)...1. defin|
00000280  65 20 63 6c 61 73 73 20  64 65 70 65 6e 64 65 6e  |e class dependen|
00000290  74 20 69 63 6f 6e 73 20  69 6e 20 6d 61 69 6e 20  |t icons in main |
000002a0  77 69 6e 64 6f 77 0d 00  be 12 6d 61 69 6e 5f 66  |window....main_f|
000002b0  65 65 64 25 20 3d 20 32  0d 00 c8 12 6d 61 69 6e  |eed% = 2....main|
000002c0  5f 61 75 74 6f 25 20 3d  20 33 0d 00 d2 14 6d 61  |_auto% = 3....ma|
000002d0  69 6e 5f 6d 61 6e 75 61  6c 25 20 3d 20 34 0d 00  |in_manual% = 4..|
000002e0  dc 16 6d 61 69 6e 5f 70  6f 72 74 72 61 69 74 25  |..main_portrait%|
000002f0  20 3d 20 36 0d 00 e6 17  6d 61 69 6e 5f 6c 61 6e  | = 6....main_lan|
00000300  64 73 63 61 70 65 25 20  3d 20 37 0d 00 f0 13 6d  |dscape% = 7....m|
00000310  61 69 6e 5f 74 69 74 6c  65 25 20 3d 20 38 0d 00  |ain_title% = 8..|
00000320  fa 1f 70 72 69 6e 74 65  72 5f 64 61 74 61 5f 6c  |..printer_data_l|
00000330  69 73 74 25 20 3d 20 30  3a 50 25 3d 30 0d 01 04  |ist% = 0:P%=0...|
00000340  1d f2 50 72 69 6e 74 65  72 5f 72 65 61 64 5f 63  |..Printer_read_c|
00000350  6f 6e 66 69 67 5f 66 69  6c 65 0d 01 0e 22 f4 20  |onfig_file...". |
00000360  6e 6f 77 20 63 6f 6e 76  65 72 74 20 74 6f 20 63  |now convert to c|
00000370  69 72 63 75 6c 61 72 20  6c 69 73 74 0d 01 18 2d  |ircular list...-|
00000380  50 25 21 6c 69 73 74 5f  70 6f 69 6e 74 65 72 5f  |P%!list_pointer_|
00000390  66 69 65 6c 64 25 3d 70  72 69 6e 74 65 72 5f 64  |field%=printer_d|
000003a0  61 74 61 5f 6c 69 73 74  25 0d 01 22 21 de 20 62  |ata_list%.."!. b|
000003b0  75 66 32 25 20 62 75 66  73 7a 25 2c 20 74 6c 69  |uf2% bufsz%, tli|
000003c0  6e 65 25 20 62 75 66 73  7a 25 0d 01 2c 46 6f 6c  |ne% bufsz%..,Fol|
000003d0  69 6e 65 5f 73 69 7a 65  25 20 3d 20 32 35 36 3a  |ine_size% = 256:|
000003e0  20 f4 20 53 70 61 63 65  20 66 6f 72 20 66 75 6c  | . Space for ful|
000003f0  6c 20 73 74 72 69 6e 67  20 2b 20 4c 46 20 74 68  |l string + LF th|
00000400  61 74 20 6d 61 79 20 67  65 74 20 61 64 64 65 64  |at may get added|
00000410  0d 01 36 18 de 20 6f 6c  69 6e 65 25 20 6f 6c 69  |..6.. oline% oli|
00000420  6e 65 5f 73 69 7a 65 25  0d 01 40 0e 6d 79 5f 66  |ne_size%..@.my_f|
00000430  69 6c 65 25 3d 30 0d 01  4a 05 e1 0d 01 54 05 3a  |ile%=0..J....T.:|
00000440  0d 01 5e 20 dd 20 f2 50  72 69 6e 74 65 72 5f 73  |..^ . .Printer_s|
00000450  65 74 5f 69 6e 69 74 69  61 6c 5f 73 74 61 74 65  |et_initial_state|
00000460  0d 01 68 08 ea 20 44 25  0d 01 72 17 f4 20 73 65  |..h.. D%..r.. se|
00000470  74 20 64 65 66 61 75 6c  74 20 73 74 61 74 65 0d  |t default state.|
00000480  01 7c 19 44 25 3d 70 72  69 6e 74 65 72 5f 64 61  |.|.D%=printer_da|
00000490  74 61 5f 6c 69 73 74 25  0d 01 86 5d c8 95 20 44  |ta_list%...].. D|
000004a0  25 21 6c 69 73 74 5f 70  6f 69 6e 74 65 72 5f 66  |%!list_pointer_f|
000004b0  69 65 6c 64 25 3c 3e 70  72 69 6e 74 65 72 5f 64  |ield%<>printer_d|
000004c0  61 74 61 5f 6c 69 73 74  25 20 80 20 44 25 21 70  |ata_list% . D%!p|
000004d0  72 69 6e 74 65 72 5f 6e  75 6d 62 65 72 5f 66 69  |rinter_number_fi|
000004e0  65 6c 64 25 3c 3e 70 72  69 6e 74 65 72 5f 63 6f  |eld%<>printer_co|
000004f0  6e 66 69 67 25 0d 01 90  1e 20 44 25 3d 44 25 21  |nfig%.... D%=D%!|
00000500  6c 69 73 74 5f 70 6f 69  6e 74 65 72 5f 66 69 65  |list_pointer_fie|
00000510  6c 64 25 0d 01 9a 05 ce  0d 01 a4 46 e7 20 44 25  |ld%........F. D%|
00000520  21 70 72 69 6e 74 65 72  5f 6e 75 6d 62 65 72 5f  |!printer_number_|
00000530  66 69 65 6c 64 25 3d 70  72 69 6e 74 65 72 5f 63  |field%=printer_c|
00000540  6f 6e 66 69 67 25 20 8c  20 70 72 69 6e 74 65 72  |onfig% . printer|
00000550  5f 64 61 74 61 5f 6c 69  73 74 25 3d 44 25 0d 01  |_data_list%=D%..|
00000560  ae 1c f2 50 72 69 6e 74  65 72 5f 73 65 74 5f 64  |...Printer_set_d|
00000570  65 73 63 72 69 70 74 69  6f 6e 0d 01 b8 1c f2 50  |escription.....P|
00000580  72 69 6e 74 65 72 5f 73  65 74 5f 6d 6f 64 75 6c  |rinter_set_modul|
00000590  65 5f 64 61 74 61 0d 01  c2 05 e1 0d 01 cc 05 3a  |e_data.........:|
000005a0  0d 01 d6 18 dd 20 f2 50  72 69 6e 74 65 72 5f 74  |..... .Printer_t|
000005b0  65 72 6d 69 6e 61 74 65  0d 01 e0 20 e1 3a 20 f4  |erminate... .: .|
000005c0  20 6e 6f 20 74 69 64 79  69 6e 67 20 75 70 20 6e  | no tidying up n|
000005d0  65 63 65 73 73 61 72 79  0d 01 ea 05 3a 0d 01 f4  |ecessary....:...|
000005e0  1d dd 20 f2 50 72 69 6e  74 65 72 5f 6c 6f 61 64  |.. .Printer_load|
000005f0  5f 74 65 6d 70 6c 61 74  65 73 0d 01 fe 48 f2 73  |_templates...H.s|
00000600  65 74 5f 69 63 6f 6e 5f  73 74 61 74 65 28 6d 61  |et_icon_state(ma|
00000610  69 6e 25 2c 20 6d 61 69  6e 5f 70 6f 72 74 72 61  |in%, main_portra|
00000620  69 74 25 2c 20 28 31 2d  66 6f 72 6d 61 74 5f 6e  |it%, (1-format_n|
00000630  65 77 25 29 20 3c 3c 20  32 31 2c 20 31 3c 3c 32  |ew%) << 21, 1<<2|
00000640  31 29 0d 02 08 45 f2 73  65 74 5f 69 63 6f 6e 5f  |1)...E.set_icon_|
00000650  73 74 61 74 65 28 6d 61  69 6e 25 2c 20 6d 61 69  |state(main%, mai|
00000660  6e 5f 6c 61 6e 64 73 63  61 70 65 25 2c 20 66 6f  |n_landscape%, fo|
00000670  72 6d 61 74 5f 6e 65 77  25 20 3c 3c 20 32 31 2c  |rmat_new% << 21,|
00000680  20 31 3c 3c 32 31 29 0d  02 12 40 f2 73 65 74 5f  | 1<<21)...@.set_|
00000690  69 63 6f 6e 5f 73 74 61  74 65 28 6d 61 69 6e 25  |icon_state(main%|
000006a0  2c 20 6d 61 69 6e 5f 74  69 74 6c 65 25 2c 20 74  |, main_title%, t|
000006b0  69 74 6c 65 5f 6e 65 77  25 20 3c 3c 20 32 31 2c  |itle_new% << 21,|
000006c0  20 31 3c 3c 32 31 29 0d  02 1c 05 e1 0d 02 26 05  | 1<<21).......&.|
000006d0  3a 0d 02 30 29 dd 20 a4  50 72 69 6e 74 65 72 5f  |:..0). .Printer_|
000006e0  70 72 6f 63 65 73 73 5f  65 76 65 6e 74 28 61 63  |process_event(ac|
000006f0  74 69 6f 6e 25 2c 20 45  25 29 0d 02 3a 0a ea 20  |tion%, E%)..:.. |
00000700  72 65 73 25 0d 02 44 0a  72 65 73 25 3d a3 0d 02  |res%..D.res%=...|
00000710  4e 10 c8 8e 20 61 63 74  69 6f 6e 25 20 ca 0d 02  |N... action% ...|
00000720  58 0d 20 c9 20 31 37 2c  31 38 3a 0d 02 62 10 20  |X. . 17,18:..b. |
00000730  20 c8 8e 20 45 25 21 31  36 20 ca 0d 02 6c 0e 20  | .. E%!16 ...l. |
00000740  20 20 c9 20 26 35 30 32  3a 0d 02 76 86 20 20 20  |  . &502:..v.   |
00000750  20 e7 20 45 25 21 33 32  20 3d 20 6d 61 69 6e 25  | . E%!32 = main%|
00000760  20 80 20 45 25 21 33 36  20 3e 3d 20 2d 31 20 8c  | . E%!36 >= -1 .|
00000770  20 f2 68 65 6c 70 72 65  70 6c 79 28 22 50 72 69  | .helpreply("Pri|
00000780  6e 74 65 72 20 73 65 74  75 70 2e 7c 4d 43 6c 69  |nter setup.|MCli|
00000790  63 6b 20 53 45 4c 45 43  54 20 6f 72 20 41 44 4a  |ck SELECT or ADJ|
000007a0  55 53 54 20 74 6f 20 61  6c 74 65 72 20 74 68 65  |UST to alter the|
000007b0  20 73 65 74 74 69 6e 67  73 2e 22 2c 45 25 21 38  | settings.",E%!8|
000007c0  2c 45 25 21 34 29 3a 72  65 73 25 20 3d 20 b9 0d  |,E%!4):res% = ..|
000007d0  02 80 07 20 20 cb 0d 02  8a 08 20 c9 20 36 0d 02  |...  ..... . 6..|
000007e0  94 15 20 20 e7 20 45 25  21 31 32 3d 6d 61 69 6e  |..  . E%!12=main|
000007f0  25 20 8c 0d 02 9e 0d 20  20 20 c8 8e 20 b9 20 ca  |% .....   .. . .|
00000800  0d 02 a8 1b 20 20 20 20  c9 20 28 45 25 21 38 20  |....    . (E%!8 |
00000810  80 20 25 31 30 31 29 3c  3e 30 3a 0d 02 b2 13 20  |. %101)<>0:.... |
00000820  20 20 20 20 c8 8e 20 45  25 21 31 36 20 ca 0d 02  |    .. E%!16 ...|
00000830  bc 1e 20 20 20 20 20 20  c9 20 6d 61 69 6e 5f 64  |..      . main_d|
00000840  65 73 63 72 69 70 74 69  6f 6e 25 3a 0d 02 c6 17  |escription%:....|
00000850  20 20 20 20 20 20 20 e7  20 45 25 21 38 20 80 20  |       . E%!8 . |
00000860  31 20 8c 0d 02 d0 25 20  20 20 20 20 20 20 20 72  |1 ....%        r|
00000870  65 73 25 20 3d 20 70 72  69 6e 74 65 72 5f 64 61  |es% = printer_da|
00000880  74 61 5f 6c 69 73 74 25  0d 02 da 49 20 20 20 20  |ta_list%...I    |
00000890  20 20 20 20 f5 20 70 72  69 6e 74 65 72 5f 64 61  |    . printer_da|
000008a0  74 61 5f 6c 69 73 74 25  20 3d 20 70 72 69 6e 74  |ta_list% = print|
000008b0  65 72 5f 64 61 74 61 5f  6c 69 73 74 25 21 6c 69  |er_data_list%!li|
000008c0  73 74 5f 70 6f 69 6e 74  65 72 5f 66 69 65 6c 64  |st_pointer_field|
000008d0  25 0d 02 e4 3b 20 20 20  20 20 20 20 20 fd 20 70  |%...;        . p|
000008e0  72 69 6e 74 65 72 5f 64  61 74 61 5f 6c 69 73 74  |rinter_data_list|
000008f0  25 21 6c 69 73 74 5f 70  6f 69 6e 74 65 72 5f 66  |%!list_pointer_f|
00000900  69 65 6c 64 25 20 3d 20  72 65 73 25 0d 02 ee 0c  |ield% = res%....|
00000910  20 20 20 20 20 20 20 cc  0d 02 f8 47 20 20 20 20  |       ....G    |
00000920  20 20 20 20 70 72 69 6e  74 65 72 5f 64 61 74 61  |    printer_data|
00000930  5f 6c 69 73 74 25 20 3d  20 70 72 69 6e 74 65 72  |_list% = printer|
00000940  5f 64 61 74 61 5f 6c 69  73 74 25 21 6c 69 73 74  |_data_list%!list|
00000950  5f 70 6f 69 6e 74 65 72  5f 66 69 65 6c 64 25 0d  |_pointer_field%.|
00000960  03 02 0c 20 20 20 20 20  20 20 cd 0d 03 0c 23 20  |...       ....# |
00000970  20 20 20 20 20 20 f2 50  72 69 6e 74 65 72 5f 73  |      .Printer_s|
00000980  65 74 5f 64 65 73 63 72  69 70 74 69 6f 6e 0d 03  |et_description..|
00000990  16 23 20 20 20 20 20 20  20 f2 50 72 69 6e 74 65  |.#       .Printe|
000009a0  72 5f 73 65 74 5f 6d 6f  64 75 6c 65 5f 64 61 74  |r_set_module_dat|
000009b0  61 0d 03 20 42 20 20 20  20 20 20 20 70 72 69 6e  |a.. B       prin|
000009c0  74 65 72 5f 6e 65 77 25  20 3d 20 70 72 69 6e 74  |ter_new% = print|
000009d0  65 72 5f 64 61 74 61 5f  6c 69 73 74 25 21 70 72  |er_data_list%!pr|
000009e0  69 6e 74 65 72 5f 6e 75  6d 62 65 72 5f 66 69 65  |inter_number_fie|
000009f0  6c 64 25 0d 03 2a 11 20  20 20 20 20 20 20 72 65  |ld%..*.       re|
00000a00  73 25 3d b9 0d 03 34 16  20 20 20 20 20 20 c9 20  |s%=...4.      . |
00000a10  6d 61 69 6e 5f 61 75 74  6f 25 0d 03 3e 16 20 20  |main_auto%..>.  |
00000a20  20 20 20 20 20 66 65 65  64 5f 6e 65 77 25 3d 30  |     feed_new%=0|
00000a30  0d 03 48 1c 20 20 20 20  20 20 20 f2 50 72 69 6e  |..H.       .Prin|
00000a40  74 65 72 5f 73 65 74 5f  66 65 65 64 0d 03 52 18  |ter_set_feed..R.|
00000a50  20 20 20 20 20 20 c9 20  6d 61 69 6e 5f 6d 61 6e  |      . main_man|
00000a60  75 61 6c 25 0d 03 5c 16  20 20 20 20 20 20 20 66  |ual%..\.       f|
00000a70  65 65 64 5f 6e 65 77 25  3d 31 0d 03 66 1c 20 20  |eed_new%=1..f.  |
00000a80  20 20 20 20 20 f2 50 72  69 6e 74 65 72 5f 73 65  |     .Printer_se|
00000a90  74 5f 66 65 65 64 0d 03  70 1a 20 20 20 20 20 20  |t_feed..p.      |
00000aa0  c9 20 6d 61 69 6e 5f 70  6f 72 74 72 61 69 74 25  |. main_portrait%|
00000ab0  0d 03 7a 3f 20 20 20 20  20 20 20 f2 73 65 74 5f  |..z?       .set_|
00000ac0  69 63 6f 6e 5f 73 74 61  74 65 28 6d 61 69 6e 25  |icon_state(main%|
00000ad0  2c 20 6d 61 69 6e 5f 70  6f 72 74 72 61 69 74 25  |, main_portrait%|
00000ae0  2c 20 31 3c 3c 32 31 2c  20 31 3c 3c 32 31 29 0d  |, 1<<21, 1<<21).|
00000af0  03 84 18 20 20 20 20 20  20 20 66 6f 72 6d 61 74  |...       format|
00000b00  5f 6e 65 77 25 3d 30 0d  03 8e 16 20 20 20 20 20  |_new%=0....     |
00000b10  20 20 63 6f 6c 73 5f 6e  65 77 25 3d 31 0d 03 98  |  cols_new%=1...|
00000b20  1b 20 20 20 20 20 20 c9  20 6d 61 69 6e 5f 6c 61  |.      . main_la|
00000b30  6e 64 73 63 61 70 65 25  0d 03 a2 40 20 20 20 20  |ndscape%...@    |
00000b40  20 20 20 f2 73 65 74 5f  69 63 6f 6e 5f 73 74 61  |   .set_icon_sta|
00000b50  74 65 28 6d 61 69 6e 25  2c 20 6d 61 69 6e 5f 6c  |te(main%, main_l|
00000b60  61 6e 64 73 63 61 70 65  25 2c 20 31 3c 3c 32 31  |andscape%, 1<<21|
00000b70  2c 20 31 3c 3c 32 31 29  0d 03 ac 18 20 20 20 20  |, 1<<21)....    |
00000b80  20 20 20 66 6f 72 6d 61  74 5f 6e 65 77 25 3d 31  |   format_new%=1|
00000b90  0d 03 b6 16 20 20 20 20  20 20 20 63 6f 6c 73 5f  |....       cols_|
00000ba0  6e 65 77 25 3d 32 0d 03  c0 17 20 20 20 20 20 20  |new%=2....      |
00000bb0  c9 20 6d 61 69 6e 5f 74  69 74 6c 65 25 0d 03 ca  |. main_title%...|
00000bc0  14 20 20 20 20 20 20 20  21 71 25 3d 6d 61 69 6e  |.       !q%=main|
00000bd0  25 0d 03 d4 1b 20 20 20  20 20 20 20 71 25 21 34  |%....       q%!4|
00000be0  3d 6d 61 69 6e 5f 74 69  74 6c 65 25 0d 03 de 25  |=main_title%...%|
00000bf0  20 20 20 20 20 20 20 c8  99 20 22 57 69 6d 70 5f  |       .. "Wimp_|
00000c00  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 71  |GetIconState",,q|
00000c10  25 0d 03 e8 29 20 20 20  20 20 20 20 74 69 74 6c  |%...)       titl|
00000c20  65 5f 6e 65 77 25 20 3d  20 28 71 25 21 32 34 20  |e_new% = (q%!24 |
00000c30  3e 3e 20 32 31 29 20 80  20 31 0d 03 f2 0a 20 20  |>> 21) . 1....  |
00000c40  20 20 20 cb 0d 03 fc 08  20 20 20 cb 0d 04 06 07  |   .....   .....|
00000c50  20 20 cd 0d 04 10 05 cb  0d 04 1a 09 3d 72 65 73  |  ..........=res|
00000c60  25 0d 04 24 05 3a 0d 04  2e 1f dd 20 f2 50 72 69  |%..$.:..... .Pri|
00000c70  6e 74 65 72 5f 72 65 61  64 5f 63 6f 6e 66 69 67  |nter_read_config|
00000c80  5f 66 69 6c 65 0d 04 38  0d ea 20 48 25 2c 70 74  |_file..8.. H%,pt|
00000c90  72 25 0d 04 42 22 de 20  64 65 66 61 75 6c 74 73  |r%..B". defaults|
00000ca0  25 20 70 72 69 6e 74 65  72 5f 64 61 74 61 5f 73  |% printer_data_s|
00000cb0  69 7a 65 25 0d 04 4c 1d  70 72 69 6e 74 65 72 5f  |ize%..L.printer_|
00000cc0  64 61 74 61 25 20 3d 20  64 65 66 61 75 6c 74 73  |data% = defaults|
00000cd0  25 0d 04 56 1e 48 25 3d  8e 22 3c 50 44 72 69 76  |%..V.H%=."<PDriv|
00000ce0  65 72 24 44 69 72 3e 2e  50 72 44 61 74 61 22 0d  |er$Dir>.PrData".|
00000cf0  04 60 2f e7 20 48 25 3d  30 20 85 20 31 30 30 2c  |.`/. H%=0 . 100,|
00000d00  22 43 61 6e 27 74 20 72  65 61 64 20 70 72 69 6e  |"Can't read prin|
00000d10  74 65 72 20 64 61 74 61  20 66 69 6c 65 22 0d 04  |ter data file"..|
00000d20  6a 07 ea 20 85 0d 04 74  1c ee 20 85 20 ea 3a 20  |j.. ...t.. . .: |
00000d30  f7 20 85 3a 20 d9 23 48  25 3a 20 85 20 9f 2c f6  |. .: .#H%: . .,.|
00000d40  24 0d 04 7e 05 f5 0d 04  88 10 20 70 74 72 25 20  |$..~...... ptr% |
00000d50  3d 20 8f 23 48 25 0d 04  92 1e 20 f2 50 72 69 6e  |= .#H%.... .Prin|
00000d60  74 65 72 5f 70 72 6f 63  65 73 73 5f 6c 69 6e 65  |ter_process_line|
00000d70  28 48 25 29 0d 04 9c 0a  fd 20 c5 23 48 25 0d 04  |(H%)..... .#H%..|
00000d80  a6 08 d9 23 48 25 0d 04  b0 05 e1 0d 04 ba 05 3a  |...#H%.........:|
00000d90  0d 04 c4 1f dd 20 f2 50  72 69 6e 74 65 72 5f 70  |..... .Printer_p|
00000da0  72 6f 63 65 73 73 5f 6c  69 6e 65 28 48 25 29 0d  |rocess_line(H%).|
00000db0  04 ce 10 ea 20 49 25 2c  4a 25 2c 74 61 67 24 0d  |.... I%,J%,tag$.|
00000dc0  04 d8 0e 24 62 75 66 25  3d be 23 48 25 0d 04 e2  |...$buf%=.#H%...|
00000dd0  08 49 25 3d 30 0d 04 ec  23 c8 95 20 a4 74 61 67  |.I%=0...#.. .tag|
00000de0  63 68 61 72 28 62 75 66  25 3f 49 25 29 3a 20 49  |char(buf%?I%): I|
00000df0  25 20 2b 3d 20 31 3a ce  0d 04 f6 16 e7 20 62 75  |% += 1:...... bu|
00000e00  66 25 3f 49 25 20 3d 20  97 22 3a 22 20 8c 0d 05  |f%?I% = .":" ...|
00000e10  00 10 20 f4 20 67 6f 74  20 61 20 74 61 67 0d 05  |.. . got a tag..|
00000e20  0a 20 20 74 61 67 24 3d  a4 6c 6f 77 65 72 63 61  |.  tag$=.lowerca|
00000e30  73 65 28 c0 24 62 75 66  25 2c 49 25 29 29 0d 05  |se(.$buf%,I%))..|
00000e40  14 0c 20 49 25 20 2b 3d  20 31 0d 05 1e 1f 20 c8  |.. I% += 1.... .|
00000e50  95 20 62 75 66 25 3f 49  25 3d 97 22 20 22 3a 20  |. buf%?I%=." ": |
00000e60  49 25 20 2b 3d 20 31 3a  ce 0d 05 28 0e 20 c8 8e  |I% += 1:...(. ..|
00000e70  20 74 61 67 24 20 ca 0d  05 32 11 20 20 c9 20 22  | tag$ ...2.  . "|
00000e80  76 65 72 73 69 6f 6e 22  0d 05 3c 1e 20 20 20 50  |version"..<.   P|
00000e90  72 44 61 74 61 5f 76 65  72 73 69 6f 6e 25 20 3d  |rData_version% =|
00000ea0  20 a4 72 65 61 64 0d 05  46 16 20 20 c9 20 22 70  | .read..F.  . "p|
00000eb0  72 69 6e 74 65 72 5f 6e  61 6d 65 22 0d 05 50 15  |rinter_name"..P.|
00000ec0  20 20 20 f4 20 62 75 69  6c 64 20 61 20 6e 61 6d  |   . build a nam|
00000ed0  65 0d 05 5a 23 20 20 20  de 20 64 65 73 63 72 69  |e..Z#   . descri|
00000ee0  70 74 69 6f 6e 25 20 a9  24 62 75 66 25 20 2d 49  |ption% .$buf% -I|
00000ef0  25 20 2b 31 0d 05 64 28  20 20 20 24 64 65 73 63  |% +1..d(   $desc|
00000f00  72 69 70 74 69 6f 6e 25  20 3d 20 c2 24 62 75 66  |ription% = .$buf|
00000f10  25 2c a9 24 62 75 66 25  2d 49 25 29 0d 05 6e 3b  |%,.$buf%-I%)..n;|
00000f20  20 20 20 f4 20 6e 6f 77  20 61 64 64 20 61 20 62  |   . now add a b|
00000f30  6c 6f 63 6b 20 74 6f 20  6f 75 72 20 6c 69 73 74  |lock to our list|
00000f40  20 6f 66 20 70 72 69 6e  74 65 72 20 64 61 74 61  | of printer data|
00000f50  20 62 6c 6f 63 6b 73 0d  05 78 29 20 20 20 de 20  | blocks..x)   . |
00000f60  70 72 69 6e 74 65 72 5f  64 61 74 61 25 20 70 72  |printer_data% pr|
00000f70  69 6e 74 65 72 5f 64 61  74 61 5f 73 69 7a 65 25  |inter_data_size%|
00000f80  0d 05 82 28 20 20 20 e3  20 49 25 3d 30 20 b8 20  |...(   . I%=0 . |
00000f90  70 72 69 6e 74 65 72 5f  64 61 74 61 5f 73 69 7a  |printer_data_siz|
00000fa0  65 25 2d 34 20 88 20 34  0d 05 8c 27 20 20 20 20  |e%-4 . 4...'    |
00000fb0  70 72 69 6e 74 65 72 5f  64 61 74 61 25 21 49 25  |printer_data%!I%|
00000fc0  20 3d 20 64 65 66 61 75  6c 74 73 25 21 49 25 0d  | = defaults%!I%.|
00000fd0  05 96 08 20 20 20 ed 0d  05 a0 36 20 20 20 70 72  |...   ....6   pr|
00000fe0  69 6e 74 65 72 5f 64 61  74 61 25 21 64 65 73 63  |inter_data%!desc|
00000ff0  72 69 70 74 69 6f 6e 5f  66 69 65 6c 64 25 20 3d  |ription_field% =|
00001000  20 64 65 73 63 72 69 70  74 69 6f 6e 25 0d 05 aa  | description%...|
00001010  0f 20 20 20 e7 20 50 25  3d 30 20 8c 0d 05 b4 2a  |.   . P%=0 ....*|
00001020  20 20 20 20 70 72 69 6e  74 65 72 5f 64 61 74 61  |    printer_data|
00001030  5f 6c 69 73 74 25 20 3d  20 70 72 69 6e 74 65 72  |_list% = printer|
00001040  5f 64 61 74 61 25 0d 05  be 08 20 20 20 cc 0d 05  |_data%....   ...|
00001050  c8 2e 20 20 20 20 50 25  21 6c 69 73 74 5f 70 6f  |..    P%!list_po|
00001060  69 6e 74 65 72 5f 66 69  65 6c 64 25 20 3d 20 70  |inter_field% = p|
00001070  72 69 6e 74 65 72 5f 64  61 74 61 25 0d 05 d2 08  |rinter_data%....|
00001080  20 20 20 cd 0d 05 dc 19  20 20 20 50 25 20 3d 20  |   .....   P% = |
00001090  70 72 69 6e 74 65 72 5f  64 61 74 61 25 0d 05 e6  |printer_data%...|
000010a0  55 20 20 c9 20 22 70 78  72 65 73 22 2c 22 70 79  |U  . "pxres","py|
000010b0  72 65 73 22 2c 22 66 65  61 74 75 72 65 73 22 2c  |res","features",|
000010c0  22 70 78 72 65 73 5f 68  61 6c 66 74 6f 6e 65 22  |"pxres_halftone"|
000010d0  2c 22 70 79 72 65 73 5f  68 61 6c 66 74 6f 6e 65  |,"pyres_halftone|
000010e0  22 2c 22 70 72 69 6e 74  65 72 5f 6e 75 6d 62 65  |","printer_numbe|
000010f0  72 22 0d 05 f0 48 20 20  20 f4 20 6e 6f 74 65 20  |r"...H   . note |
00001100  74 68 61 74 20 61 6c 6c  20 74 61 67 73 20 61 72  |that all tags ar|
00001110  65 20 74 68 65 20 73 61  6d 65 20 61 73 20 74 68  |e the same as th|
00001120  65 69 72 20 72 65 73 70  65 63 74 69 76 65 20 66  |eir respective f|
00001130  69 65 6c 64 20 6e 61 6d  65 73 0d 05 fa 30 20 20  |ield names...0  |
00001140  20 20 20 70 72 69 6e 74  65 72 5f 64 61 74 61 25  |   printer_data%|
00001150  21 a0 28 74 61 67 24 2b  22 5f 66 69 65 6c 64 25  |!.(tag$+"_field%|
00001160  22 29 20 3d 20 a4 72 65  61 64 0d 06 04 54 20 20  |") = .read...T  |
00001170  c9 20 22 70 61 67 65 5f  77 69 64 74 68 22 2c 22  |. "page_width","|
00001180  70 61 67 65 5f 68 65 69  67 68 74 22 2c 22 70 61  |page_height","pa|
00001190  67 65 5f 62 6f 74 74 6f  6d 22 2c 22 70 61 67 65  |ge_bottom","page|
000011a0  5f 74 6f 70 22 2c 22 70  61 67 65 5f 6c 65 66 74  |_top","page_left|
000011b0  22 2c 22 70 61 67 65 5f  72 69 67 68 74 22 0d 06  |","page_right"..|
000011c0  0e 3b 20 20 20 20 20 70  61 67 65 5f 64 65 73 63  |.;     page_desc|
000011d0  25 28 70 61 67 65 5f 6e  75 6d 62 65 72 25 2c a0  |%(page_number%,.|
000011e0  28 74 61 67 24 2b 22 5f  66 69 65 6c 64 25 22 29  |(tag$+"_field%")|
000011f0  29 20 3d 20 a4 72 65 61  64 0d 06 18 3d 20 20 20  |) = .read...=   |
00001200  20 20 70 61 67 65 5f 70  74 72 73 25 28 70 61 67  |  page_ptrs%(pag|
00001210  65 5f 6e 75 6d 62 65 72  25 2c a0 28 74 61 67 24  |e_number%,.(tag$|
00001220  2b 22 5f 66 69 65 6c 64  25 22 29 29 20 3d 20 70  |+"_field%")) = p|
00001230  74 72 25 2b 49 25 0d 06  22 15 20 20 c9 20 22 70  |tr%+I%..".  . "p|
00001240  61 67 65 5f 6e 75 6d 62  65 72 22 0d 06 2c 1d 20  |age_number"..,. |
00001250  20 20 20 20 70 61 67 65  5f 6e 75 6d 62 65 72 25  |    page_number%|
00001260  20 3d 20 a4 72 65 61 64  0d 06 36 5a 20 20 c9 20  | = .read..6Z  . |
00001270  22 70 72 6f 6c 6f 67 75  65 32 22 2c 22 6d 61 6e  |"prologue2","man|
00001280  75 61 6c 5f 66 65 65 64  22 2c 22 61 75 74 6f 5f  |ual_feed","auto_|
00001290  66 65 65 64 22 2c 22 73  65 72 76 65 72 22 2c 22  |feed","server","|
000012a0  70 61 67 65 5f 6e 61 6d  65 22 2c 22 66 69 6c 65  |page_name","file|
000012b0  22 2c 22 70 61 67 65 5f  73 65 6c 65 63 74 69 6f  |","page_selectio|
000012c0  6e 22 0d 06 40 16 20 20  20 f4 20 72 65 61 64 20  |n"..@.   . read |
000012d0  61 20 73 74 72 69 6e 67  0d 06 4a 0e 20 20 20 4a  |a string..J.   J|
000012e0  25 20 3d 20 49 25 0d 06  54 27 20 20 20 c8 95 20  |% = I%..T'   .. |
000012f0  62 75 66 25 3f 4a 25 3e  3d 97 22 20 22 20 80 20  |buf%?J%>=." " . |
00001300  62 75 66 25 3f 4a 25 3c  3e 97 22 3b 22 0d 06 5e  |buf%?J%<>.";"..^|
00001310  0f 20 20 20 20 4a 25 20  2b 3d 20 31 0d 06 68 08  |.    J% += 1..h.|
00001320  20 20 20 ce 0d 06 72 24  20 20 20 f4 20 66 72 6f  |   ...r$   . fro|
00001330  6d 20 49 25 20 74 6f 20  4a 25 20 69 73 20 74 68  |m I% to J% is th|
00001340  65 20 73 74 72 69 6e 67  0d 06 7c 10 20 20 20 c8  |e string..|.   .|
00001350  8e 20 74 61 67 24 20 ca  0d 06 86 11 20 20 20 c9  |. tag$ .....   .|
00001360  20 22 73 65 72 76 65 72  22 0d 06 90 1f 20 20 20  | "server"....   |
00001370  20 73 65 72 76 65 72 5f  70 74 72 25 20 3d 20 70  | server_ptr% = p|
00001380  74 72 25 20 2b 20 49 25  0d 06 9a 2d 20 20 20 20  |tr% + I%...-    |
00001390  73 65 72 76 65 72 5f 63  6f 6e 66 69 67 24 20 3d  |server_config$ =|
000013a0  20 c1 24 62 75 66 25 2c  20 49 25 2b 31 2c 20 4a  | .$buf%, I%+1, J|
000013b0  25 2d 49 25 29 0d 06 a4  0f 20 20 20 c9 20 22 66  |%-I%)....   . "f|
000013c0  69 6c 65 22 0d 06 ae 1d  20 20 20 20 66 69 6c 65  |ile"....    file|
000013d0  5f 70 74 72 25 20 3d 20  70 74 72 25 20 2b 20 49  |_ptr% = ptr% + I|
000013e0  25 0d 06 b8 2b 20 20 20  20 66 69 6c 65 5f 63 6f  |%...+    file_co|
000013f0  6e 66 69 67 24 20 3d 20  c1 24 62 75 66 25 2c 20  |nfig$ = .$buf%, |
00001400  49 25 2b 31 2c 20 4a 25  2d 49 25 29 0d 06 c2 20  |I%+1, J%-I%)... |
00001410  20 20 20 20 24 66 69 6c  65 5f 6e 61 6d 65 25 3d  |    $file_name%=|
00001420  66 69 6c 65 5f 63 6f 6e  66 69 67 24 0d 06 cc 36  |file_config$...6|
00001430  20 20 20 20 c8 99 20 22  58 4f 53 5f 43 4c 49 22  |    .. "XOS_CLI"|
00001440  2c 22 73 65 74 20 50 72  69 6e 74 65 72 54 79 70  |,"set PrinterTyp|
00001450  65 24 35 20 22 2b 66 69  6c 65 5f 63 6f 6e 66 69  |e$5 "+file_confi|
00001460  67 24 0d 06 d6 14 20 20  20 c9 20 22 70 61 67 65  |g$....   . "page|
00001470  5f 6e 61 6d 65 22 0d 06  e0 36 20 20 20 20 70 61  |_name"...6    pa|
00001480  67 65 5f 6e 61 6d 65 73  24 28 70 61 67 65 5f 6e  |ge_names$(page_n|
00001490  75 6d 62 65 72 25 29 3d  c1 24 62 75 66 25 2c 20  |umber%)=.$buf%, |
000014a0  49 25 2b 31 2c 20 4a 25  2d 49 25 29 0d 06 ea 3b  |I%+1, J%-I%)...;|
000014b0  20 20 20 20 70 61 67 65  5f 70 74 72 73 25 28 70  |    page_ptrs%(p|
000014c0  61 67 65 5f 6e 75 6d 62  65 72 25 2c 70 61 67 65  |age_number%,page|
000014d0  5f 6e 61 6d 65 5f 66 69  65 6c 64 25 29 20 3d 20  |_name_field%) = |
000014e0  70 74 72 25 2b 49 25 0d  06 f4 19 20 20 20 c9 20  |ptr%+I%....   . |
000014f0  22 70 61 67 65 5f 73 65  6c 65 63 74 69 6f 6e 22  |"page_selection"|
00001500  0d 06 fe 3a 20 20 20 20  70 61 67 65 5f 73 65 6c  |...:    page_sel|
00001510  65 63 74 69 6f 6e 24 28  70 61 67 65 5f 6e 75 6d  |ection$(page_num|
00001520  62 65 72 25 29 3d c1 24  62 75 66 25 2c 20 49 25  |ber%)=.$buf%, I%|
00001530  2b 31 2c 20 4a 25 2d 49  25 29 0d 07 08 08 20 20  |+1, J%-I%)....  |
00001540  20 7f 0d 07 12 1e 20 20  20 20 de 20 64 65 73 63  | .....    . desc|
00001550  72 69 70 74 69 6f 6e 25  20 4a 25 2d 49 25 2b 31  |ription% J%-I%+1|
00001560  0d 07 1c 2c 20 20 20 20  24 64 65 73 63 72 69 70  |...,    $descrip|
00001570  74 69 6f 6e 25 20 3d 20  c1 24 62 75 66 25 2c 20  |tion% = .$buf%, |
00001580  49 25 2b 31 2c 20 4a 25  2d 49 25 29 0d 07 26 36  |I%+1, J%-I%)..&6|
00001590  20 20 20 20 70 72 69 6e  74 65 72 5f 64 61 74 61  |    printer_data|
000015a0  25 21 a0 28 74 61 67 24  2b 22 5f 66 69 65 6c 64  |%!.(tag$+"_field|
000015b0  25 22 29 20 3d 20 64 65  73 63 72 69 70 74 69 6f  |%") = descriptio|
000015c0  6e 25 0d 07 30 08 20 20  20 cb 0d 07 3a 1b 20 20  |n%..0.   ...:.  |
000015d0  c9 20 22 73 74 61 72 74  5f 70 61 67 65 5f 6e 75  |. "start_page_nu|
000015e0  6d 62 65 72 22 0d 07 44  22 20 20 20 70 61 67 65  |mber"..D"   page|
000015f0  5f 6e 75 6d 62 65 72 5f  63 6f 6e 66 69 67 25 20  |_number_config% |
00001600  3d 20 a4 72 65 61 64 0d  07 4e 23 20 20 20 70 61  |= .read..N#   pa|
00001610  67 65 5f 6e 75 6d 62 65  72 5f 70 74 72 25 20 3d  |ge_number_ptr% =|
00001620  20 70 74 72 25 20 2b 20  49 25 0d 07 58 11 20 20  | ptr% + I%..X.  |
00001630  c9 20 22 70 72 69 6e 74  65 72 22 0d 07 62 1e 20  |. "printer"..b. |
00001640  20 20 70 72 69 6e 74 65  72 5f 63 6f 6e 66 69 67  |  printer_config|
00001650  25 20 3d 20 a4 72 65 61  64 0d 07 6c 25 20 20 20  |% = .read..l%   |
00001660  70 72 69 6e 74 65 72 5f  6e 65 77 25 20 3d 20 70  |printer_new% = p|
00001670  72 69 6e 74 65 72 5f 63  6f 6e 66 69 67 25 0d 07  |rinter_config%..|
00001680  76 1f 20 20 20 70 72 69  6e 74 65 72 5f 70 74 72  |v.   printer_ptr|
00001690  25 20 3d 20 70 74 72 25  20 2b 20 49 25 0d 07 80  |% = ptr% + I%...|
000016a0  12 20 20 c9 20 22 6c 6f  63 61 74 69 6f 6e 22 0d  |.  . "location".|
000016b0  07 8a 1f 20 20 20 6c 6f  63 61 74 69 6f 6e 5f 63  |...   location_c|
000016c0  6f 6e 66 69 67 25 20 3d  20 a4 72 65 61 64 0d 07  |onfig% = .read..|
000016d0  94 20 20 20 20 6c 6f 63  61 74 69 6f 6e 5f 70 74  |.    location_pt|
000016e0  72 25 20 3d 20 70 74 72  25 20 2b 20 49 25 0d 07  |r% = ptr% + I%..|
000016f0  9e 0e 20 20 c9 20 22 62  61 75 64 22 0d 07 a8 1b  |..  . "baud"....|
00001700  20 20 20 62 61 75 64 5f  63 6f 6e 66 69 67 25 20  |   baud_config% |
00001710  3d 20 a4 72 65 61 64 0d  07 b2 1c 20 20 20 62 61  |= .read....   ba|
00001720  75 64 5f 70 74 72 25 20  3d 20 70 74 72 25 20 2b  |ud_ptr% = ptr% +|
00001730  20 49 25 0d 07 bc 0e 20  20 c9 20 22 64 61 74 61  | I%....  . "data|
00001740  22 0d 07 c6 1b 20 20 20  64 61 74 61 5f 63 6f 6e  |"....   data_con|
00001750  66 69 67 25 20 3d 20 a4  72 65 61 64 0d 07 d0 1c  |fig% = .read....|
00001760  20 20 20 64 61 74 61 5f  70 74 72 25 20 3d 20 70  |   data_ptr% = p|
00001770  74 72 25 20 2b 20 49 25  0d 07 da 0d 20 20 c9 20  |tr% + I%....  . |
00001780  22 78 6f 6e 22 0d 07 e4  1a 20 20 20 58 4f 4e 5f  |"xon"....   XON_|
00001790  63 6f 6e 66 69 67 25 20  3d 20 a4 72 65 61 64 0d  |config% = .read.|
000017a0  07 ee 1d 20 20 20 58 4f  4e 5f 6e 65 77 25 20 3d  |...   XON_new% =|
000017b0  20 58 4f 4e 5f 63 6f 6e  66 69 67 25 0d 07 f8 1b  | XON_config%....|
000017c0  20 20 20 58 4f 4e 5f 70  74 72 25 20 3d 20 70 74  |   XON_ptr% = pt|
000017d0  72 25 20 2b 20 49 25 0d  08 02 0e 20 20 c9 20 22  |r% + I%....  . "|
000017e0  66 65 65 64 22 0d 08 0c  1b 20 20 20 66 65 65 64  |feed"....   feed|
000017f0  5f 63 6f 6e 66 69 67 25  20 3d 20 a4 72 65 61 64  |_config% = .read|
00001800  0d 08 16 1f 20 20 20 66  65 65 64 5f 6e 65 77 25  |....   feed_new%|
00001810  20 3d 20 66 65 65 64 5f  63 6f 6e 66 69 67 25 0d  | = feed_config%.|
00001820  08 20 1c 20 20 20 66 65  65 64 5f 70 74 72 25 20  |. .   feed_ptr% |
00001830  3d 20 70 74 72 25 20 2b  20 49 25 0d 08 2a 10 20  |= ptr% + I%..*. |
00001840  20 c9 20 22 66 6f 72 6d  61 74 22 0d 08 34 1d 20  | . "format"..4. |
00001850  20 20 66 6f 72 6d 61 74  5f 63 6f 6e 66 69 67 25  |  format_config%|
00001860  20 3d 20 a4 72 65 61 64  0d 08 3e 23 20 20 20 66  | = .read..>#   f|
00001870  6f 72 6d 61 74 5f 6e 65  77 25 20 3d 20 66 6f 72  |ormat_new% = for|
00001880  6d 61 74 5f 63 6f 6e 66  69 67 25 0d 08 48 1e 20  |mat_config%..H. |
00001890  20 20 66 6f 72 6d 61 74  5f 70 74 72 25 20 3d 20  |  format_ptr% = |
000018a0  70 74 72 25 20 2b 20 49  25 0d 08 52 0f 20 20 c9  |ptr% + I%..R.  .|
000018b0  20 22 74 69 74 6c 65 22  0d 08 5c 1c 20 20 20 74  | "title"..\.   t|
000018c0  69 74 6c 65 5f 63 6f 6e  66 69 67 25 20 3d 20 a4  |itle_config% = .|
000018d0  72 65 61 64 0d 08 66 21  20 20 20 74 69 74 6c 65  |read..f!   title|
000018e0  5f 6e 65 77 25 20 3d 20  74 69 74 6c 65 5f 63 6f  |_new% = title_co|
000018f0  6e 66 69 67 25 0d 08 70  1d 20 20 20 74 69 74 6c  |nfig%..p.   titl|
00001900  65 5f 70 74 72 25 20 3d  20 70 74 72 25 20 2b 20  |e_ptr% = ptr% + |
00001910  49 25 0d 08 7a 11 20 20  c9 20 22 63 6f 6c 75 6d  |I%..z.  . "colum|
00001920  6e 73 22 0d 08 84 1b 20  20 20 63 6f 6c 73 5f 63  |ns"....   cols_c|
00001930  6f 6e 66 69 67 25 20 3d  20 a4 72 65 61 64 0d 08  |onfig% = .read..|
00001940  8e 1f 20 20 20 63 6f 6c  73 5f 6e 65 77 25 20 3d  |..   cols_new% =|
00001950  20 63 6f 6c 73 5f 63 6f  6e 66 69 67 25 0d 08 98  | cols_config%...|
00001960  1c 20 20 20 63 6f 6c 73  5f 70 74 72 25 20 3d 20  |.   cols_ptr% = |
00001970  70 74 72 25 20 2b 20 49  25 0d 08 a2 16 20 20 c9  |ptr% + I%....  .|
00001980  20 22 6c 69 6e 65 5f 6e  75 6d 62 65 72 73 22 0d  | "line_numbers".|
00001990  08 ac 1b 20 20 20 6c 6e  75 6d 5f 63 6f 6e 66 69  |...   lnum_confi|
000019a0  67 25 20 3d 20 a4 72 65  61 64 0d 08 b6 1f 20 20  |g% = .read....  |
000019b0  20 6c 6e 75 6d 5f 6e 65  77 25 20 3d 20 6c 6e 75  | lnum_new% = lnu|
000019c0  6d 5f 63 6f 6e 66 69 67  25 0d 08 c0 1c 20 20 20  |m_config%....   |
000019d0  6c 6e 75 6d 5f 70 74 72  25 20 3d 20 70 74 72 25  |lnum_ptr% = ptr%|
000019e0  20 2b 20 49 25 0d 08 ca  13 20 20 c9 20 22 6c 69  | + I%....  . "li|
000019f0  6e 65 5f 74 65 72 6d 22  0d 08 d4 1c 20 20 20 6c  |ne_term"....   l|
00001a00  74 65 72 6d 5f 63 6f 6e  66 69 67 25 20 3d 20 a4  |term_config% = .|
00001a10  72 65 61 64 0d 08 de 21  20 20 20 6c 74 65 72 6d  |read...!   lterm|
00001a20  5f 6e 65 77 25 20 3d 20  6c 74 65 72 6d 5f 63 6f  |_new% = lterm_co|
00001a30  6e 66 69 67 25 0d 08 e8  1d 20 20 20 6c 74 65 72  |nfig%....   lter|
00001a40  6d 5f 70 74 72 25 20 3d  20 70 74 72 25 20 2b 20  |m_ptr% = ptr% + |
00001a50  49 25 0d 08 f2 13 20 20  c9 20 22 70 72 69 6e 74  |I%....  . "print|
00001a60  5f 63 63 73 22 0d 08 fc  1a 20 20 20 63 63 73 5f  |_ccs"....   ccs_|
00001a70  63 6f 6e 66 69 67 25 20  3d 20 a4 72 65 61 64 0d  |config% = .read.|
00001a80  09 06 1d 20 20 20 63 63  73 5f 6e 65 77 25 20 3d  |...   ccs_new% =|
00001a90  20 63 63 73 5f 63 6f 6e  66 69 67 25 0d 09 10 1b  | ccs_config%....|
00001aa0  20 20 20 63 63 73 5f 70  74 72 25 20 3d 20 70 74  |   ccs_ptr% = pt|
00001ab0  72 25 20 2b 20 49 25 0d  09 1a 06 20 cb 0d 09 24  |r% + I%.... ...$|
00001ac0  05 cd 0d 09 2e 05 e1 0d  09 38 05 3a 0d 09 42 37  |.........8.:..B7|
00001ad0  dd 20 a4 72 65 61 64 3d  a4 72 65 61 64 5f 69 6e  |. .read=.read_in|
00001ae0  74 65 67 65 72 5f 65 78  70 72 65 73 73 69 6f 6e  |teger_expression|
00001af0  28 c2 24 62 75 66 25 2c  a9 24 62 75 66 25 2d 49  |(.$buf%,.$buf%-I|
00001b00  25 29 29 0d 09 4c 05 3a  0d 09 56 22 dd 20 a4 72  |%))..L.:..V". .r|
00001b10  65 61 64 5f 69 6e 74 65  67 65 72 5f 65 78 70 72  |ead_integer_expr|
00001b20  65 73 73 69 6f 6e 28 53  24 29 0d 09 60 14 ea 20  |ession(S$)..`.. |
00001b30  52 25 2c 20 54 25 2c 20  45 24 2c 20 50 25 0d 09  |R%, T%, E$, P%..|
00001b40  6a 09 45 24 3d 22 22 0d  09 74 1c f4 20 67 65 74  |j.E$=""..t.. get|
00001b50  20 72 69 64 20 6f 66 20  61 6e 79 20 63 6f 6d 6d  | rid of any comm|
00001b60  65 6e 74 0d 09 7e 1f c8  95 20 c0 53 24 2c 31 29  |ent..~... .S$,1)|
00001b70  20 3c 3e 20 22 3b 22 20  80 20 a9 53 24 20 3c 3e  | <> ";" . .S$ <>|
00001b80  20 30 0d 09 88 11 20 45  24 20 2b 3d 20 c0 53 24  | 0.... E$ += .S$|
00001b90  2c 31 29 0d 09 92 14 20  53 24 20 3d 20 c2 53 24  |,1).... S$ = .S$|
00001ba0  2c a9 53 24 2d 31 29 0d  09 9c 05 ce 0d 09 a6 36  |,.S$-1)........6|
00001bb0  c8 99 22 58 4f 53 5f 45  76 61 6c 75 61 74 65 45  |.."XOS_EvaluateE|
00001bc0  78 70 72 65 73 73 69 6f  6e 22 2c 45 24 2c 62 75  |xpression",E$,bu|
00001bd0  66 25 2c 32 35 36 20 b8  20 2c 54 25 2c 52 25 3b  |f%,256 . ,T%,R%;|
00001be0  50 25 0d 09 b0 40 e7 20  54 25 20 3c 3e 20 30 20  |P%...@. T% <> 0 |
00001bf0  84 20 28 50 25 20 80 20  31 29 20 85 20 31 30 30  |. (P% . 1) . 100|
00001c00  2c 20 22 49 6e 74 65 67  65 72 20 76 61 6c 75 65  |, "Integer value|
00001c10  20 6e 65 65 64 65 64 20  66 6f 72 20 22 2b 74 61  | needed for "+ta|
00001c20  67 24 0d 09 ba 07 3d 52  25 0d 09 c4 05 3a 0d 09  |g$....=R%....:..|
00001c30  ce 12 dd 20 a4 74 61 67  63 68 61 72 28 43 25 29  |... .tagchar(C%)|
00001c40  0d 09 d8 24 e7 20 28 43  25 20 3e 3d 20 97 22 41  |...$. (C% >= ."A|
00001c50  22 20 80 20 43 25 20 3c  3d 20 97 22 5a 22 29 20  |" . C% <= ."Z") |
00001c60  8c 20 3d b9 0d 09 e2 24  e7 20 28 43 25 20 3e 3d  |. =....$. (C% >=|
00001c70  20 97 22 61 22 20 80 20  43 25 20 3c 3d 20 97 22  | ."a" . C% <= ."|
00001c80  7a 22 29 20 8c 20 3d b9  0d 09 ec 2c 3d 20 20 28  |z") . =....,=  (|
00001c90  43 25 20 3e 3d 20 97 22  30 22 20 80 20 43 25 20  |C% >= ."0" . C% |
00001ca0  3c 3d 20 97 22 39 22 29  20 84 20 43 25 20 3d 20  |<= ."9") . C% = |
00001cb0  97 22 5f 22 0d 09 f6 05  3a 0d 0a 00 1e dd 20 f2  |."_"....:..... .|
00001cc0  50 72 69 6e 74 65 72 5f  73 65 74 5f 6d 6f 64 75  |Printer_set_modu|
00001cd0  6c 65 5f 64 61 74 61 0d  0a 0a 17 ea 20 41 25 2c  |le_data..... A%,|
00001ce0  42 25 2c 43 25 2c 44 25  2c 45 25 2c 46 25 0d 0a  |B%,C%,D%,E%,F%..|
00001cf0  14 1d 41 25 3d 64 65 66  61 75 6c 74 73 25 21 70  |..A%=defaults%!p|
00001d00  78 72 65 73 5f 66 69 65  6c 64 25 0d 0a 1e 1d 42  |xres_field%....B|
00001d10  25 3d 64 65 66 61 75 6c  74 73 25 21 70 79 72 65  |%=defaults%!pyre|
00001d20  73 5f 66 69 65 6c 64 25  0d 0a 28 20 43 25 3d 64  |s_field%..( C%=d|
00001d30  65 66 61 75 6c 74 73 25  21 66 65 61 74 75 72 65  |efaults%!feature|
00001d40  73 5f 66 69 65 6c 64 25  0d 0a 32 26 44 25 3d 64  |s_field%..2&D%=d|
00001d50  65 66 61 75 6c 74 73 25  21 70 78 72 65 73 5f 68  |efaults%!pxres_h|
00001d60  61 6c 66 74 6f 6e 65 5f  66 69 65 6c 64 25 0d 0a  |alftone_field%..|
00001d70  3c 26 45 25 3d 64 65 66  61 75 6c 74 73 25 21 70  |<&E%=defaults%!p|
00001d80  79 72 65 73 5f 68 61 6c  66 74 6f 6e 65 5f 66 69  |yres_halftone_fi|
00001d90  65 6c 64 25 0d 0a 46 26  46 25 3d 64 65 66 61 75  |eld%..F&F%=defau|
00001da0  6c 74 73 25 21 70 72 69  6e 74 65 72 5f 6e 75 6d  |lts%!printer_num|
00001db0  62 65 72 5f 66 69 65 6c  64 25 0d 0a 50 2c c8 99  |ber_field%..P,..|
00001dc0  20 22 50 44 72 69 76 65  72 5f 53 65 74 49 6e 66  | "PDriver_SetInf|
00001dd0  6f 22 2c 2c 41 25 2c 42  25 2c 43 25 2c 2c 44 25  |o",,A%,B%,C%,,D%|
00001de0  2c 45 25 2c 46 25 0d 0a  5a 0d 6d 73 67 25 21 30  |,E%,F%..Z.msg%!0|
00001df0  3d 32 30 0d 0a 64 0d 6d  73 67 25 21 31 32 3d 30  |=20..d.msg%!12=0|
00001e00  0d 0a 6e 1f 6d 73 67 25  21 31 36 3d 4d 65 73 73  |..n.msg%!16=Mess|
00001e10  61 67 65 5f 53 65 74 50  72 69 6e 74 65 72 25 0d  |age_SetPrinter%.|
00001e20  0a 78 26 c8 99 20 22 57  69 6d 70 5f 53 65 6e 64  |.x&.. "Wimp_Send|
00001e30  4d 65 73 73 61 67 65 22  2c 20 31 37 2c 20 6d 73  |Message", 17, ms|
00001e40  67 25 2c 20 30 0d 0a 82  28 ff 28 22 53 65 74 20  |g%, 0...(.("Set |
00001e50  50 44 72 69 76 65 72 24  50 53 70 72 6f 6c 6f 67  |PDriver$PSprolog|
00001e60  75 65 20 50 53 70 72 6f  6c 6f 67 22 29 0d 0a 8c  |ue PSprolog")...|
00001e70  46 ff 28 22 53 65 74 20  50 44 72 69 76 65 72 24  |F.("Set PDriver$|
00001e80  50 53 70 72 6f 6c 6f 67  75 65 32 20 22 22 22 2b  |PSprologue2 """+|
00001e90  24 28 64 65 66 61 75 6c  74 73 25 21 70 72 6f 6c  |$(defaults%!prol|
00001ea0  6f 67 75 65 32 5f 66 69  65 6c 64 25 29 2b 22 22  |ogue2_field%)+""|
00001eb0  22 22 29 0d 0a 96 15 f2  50 72 69 6e 74 65 72 5f  |"").....Printer_|
00001ec0  73 65 74 5f 66 65 65 64  0d 0a a0 05 e1 0d 0a aa  |set_feed........|
00001ed0  05 3a 0d 0a b4 1f dd 20  f2 50 72 69 6e 74 65 72  |.:..... .Printer|
00001ee0  5f 63 68 61 6e 67 65 5f  70 61 67 65 5f 73 69 7a  |_change_page_siz|
00001ef0  65 0d 0a be 18 f2 50 72  69 6e 74 65 72 5f 73 65  |e.....Printer_se|
00001f00  74 5f 50 53 65 78 74 72  61 0d 0a c8 05 e1 0d 0a  |t_PSextra.......|
00001f10  d2 05 3a 0d 0a dc 1a dd  20 f2 50 72 69 6e 74 65  |..:..... .Printe|
00001f20  72 5f 73 65 74 5f 50 53  65 78 74 72 61 0d 0a e6  |r_set_PSextra...|
00001f30  0c ea 20 76 61 6c 75 65  24 0d 0a f0 13 e7 20 66  |.. value$..... f|
00001f40  65 65 64 5f 6e 65 77 25  3d 31 20 8c 0d 0a fa 2d  |eed_new%=1 ....-|
00001f50  20 76 61 6c 75 65 24 20  3d 20 24 28 64 65 66 61  | value$ = $(defa|
00001f60  75 6c 74 73 25 21 6d 61  6e 75 61 6c 5f 66 65 65  |ults%!manual_fee|
00001f70  64 5f 66 69 65 6c 64 25  29 0d 0b 04 05 cc 0d 0b  |d_field%).......|
00001f80  0e 2b 20 76 61 6c 75 65  24 20 3d 20 24 28 64 65  |.+ value$ = $(de|
00001f90  66 61 75 6c 74 73 25 21  61 75 74 6f 5f 66 65 65  |faults%!auto_fee|
00001fa0  64 5f 66 69 65 6c 64 25  29 0d 0b 18 05 cd 0d 0b  |d_field%).......|
00001fb0  22 2b e7 20 70 61 67 65  5f 73 65 6c 65 63 74 69  |"+. page_selecti|
00001fc0  6f 6e 24 28 70 61 67 65  5f 6e 75 6d 62 65 72 25  |on$(page_number%|
00001fd0  29 20 3c 3e 20 22 22 20  8c 0d 0b 2c 33 20 76 61  |) <> "" ...,3 va|
00001fe0  6c 75 65 24 20 2b 3d 20  22 7c 4a 22 20 2b 20 70  |lue$ += "|J" + p|
00001ff0  61 67 65 5f 73 65 6c 65  63 74 69 6f 6e 24 28 70  |age_selection$(p|
00002000  61 67 65 5f 6e 75 6d 62  65 72 25 29 0d 0b 36 05  |age_number%)..6.|
00002010  cd 0d 0b 40 37 c8 99 22  4f 53 5f 53 65 74 56 61  |...@7.."OS_SetVa|
00002020  72 56 61 6c 22 2c 22 50  44 72 69 76 65 72 24 50  |rVal","PDriver$P|
00002030  53 65 78 74 72 61 22 2c  76 61 6c 75 65 24 2c a9  |Sextra",value$,.|
00002040  28 76 61 6c 75 65 24 29  0d 0b 4a 05 e1 0d 0b 54  |(value$)..J....T|
00002050  05 3a 0d 0b 5e 17 dd 20  f2 50 72 69 6e 74 65 72  |.:..^.. .Printer|
00002060  5f 73 65 74 5f 66 65 65  64 0d 0b 68 42 f2 73 65  |_set_feed..hB.se|
00002070  74 5f 69 63 6f 6e 5f 73  74 61 74 65 28 6d 61 69  |t_icon_state(mai|
00002080  6e 25 2c 20 6d 61 69 6e  5f 61 75 74 6f 25 2c 20  |n%, main_auto%, |
00002090  28 31 2d 66 65 65 64 5f  6e 65 77 25 29 20 3c 3c  |(1-feed_new%) <<|
000020a0  20 32 31 2c 20 31 3c 3c  32 31 29 0d 0b 72 40 f2  | 21, 1<<21)..r@.|
000020b0  73 65 74 5f 69 63 6f 6e  5f 73 74 61 74 65 28 6d  |set_icon_state(m|
000020c0  61 69 6e 25 2c 20 6d 61  69 6e 5f 6d 61 6e 75 61  |ain%, main_manua|
000020d0  6c 25 2c 20 66 65 65 64  5f 6e 65 77 25 20 3c 3c  |l%, feed_new% <<|
000020e0  20 32 31 2c 20 31 3c 3c  32 31 29 0d 0b 7c 18 f2  | 21, 1<<21)..|..|
000020f0  50 72 69 6e 74 65 72 5f  73 65 74 5f 50 53 65 78  |Printer_set_PSex|
00002100  74 72 61 0d 0b 86 05 e1  0d 0b 90 05 3a 0d 0b 9a  |tra.........:...|
00002110  1e dd 20 f2 50 72 69 6e  74 65 72 5f 73 65 74 5f  |.. .Printer_set_|
00002120  64 65 73 63 72 69 70 74  69 6f 6e 0d 0b a4 0c ea  |description.....|
00002130  20 53 25 2c 20 53 24 0d  0b ae 27 e3 20 53 25 20  | S%, S$...'. S% |
00002140  3d 20 30 20 b8 20 70 72  69 6e 74 65 72 5f 64 61  |= 0 . printer_da|
00002150  74 61 5f 73 69 7a 65 25  2d 34 20 88 20 34 0d 0b  |ta_size%-4 . 4..|
00002160  b8 28 64 65 66 61 75 6c  74 73 25 21 53 25 20 3d  |.(defaults%!S% =|
00002170  20 70 72 69 6e 74 65 72  5f 64 61 74 61 5f 6c 69  | printer_data_li|
00002180  73 74 25 21 53 25 0d 0b  c2 05 ed 0d 0b cc 48 f2  |st%!S%........H.|
00002190  50 72 69 6e 74 65 72 5f  73 65 74 5f 69 63 6f 6e  |Printer_set_icon|
000021a0  28 6d 61 69 6e 5f 64 65  73 63 72 69 70 74 69 6f  |(main_descriptio|
000021b0  6e 25 2c 24 28 64 65 66  61 75 6c 74 73 25 21 64  |n%,$(defaults%!d|
000021c0  65 73 63 72 69 70 74 69  6f 6e 5f 66 69 65 6c 64  |escription_field|
000021d0  25 29 29 0d 0b d6 15 53  25 20 3d 20 31 3c 3c 32  |%))....S% = 1<<2|
000021e0  33 20 84 20 31 3c 3c 37  0d 0b e0 65 e7 20 a9 28  |3 . 1<<7...e. .(|
000021f0  24 28 70 72 69 6e 74 65  72 5f 64 61 74 61 5f 6c  |$(printer_data_l|
00002200  69 73 74 25 21 6d 61 6e  75 61 6c 5f 66 65 65 64  |ist%!manual_feed|
00002210  5f 66 69 65 6c 64 25 29  29 20 3d 20 30 20 80 20  |_field%)) = 0 . |
00002220  a9 28 24 28 70 72 69 6e  74 65 72 5f 64 61 74 61  |.($(printer_data|
00002230  5f 6c 69 73 74 25 21 61  75 74 6f 5f 66 65 65 64  |_list%!auto_feed|
00002240  5f 66 69 65 6c 64 25 29  29 3d 30 20 8c 0d 0b ea  |_field%))=0 ....|
00002250  2c 20 f2 73 65 74 5f 69  63 6f 6e 5f 73 74 61 74  |, .set_icon_stat|
00002260  65 28 6d 61 69 6e 25 2c  6d 61 69 6e 5f 66 65 65  |e(main%,main_fee|
00002270  64 25 2c 53 25 2c 53 25  29 0d 0b f4 2c 20 f2 73  |d%,S%,S%)..., .s|
00002280  65 74 5f 69 63 6f 6e 5f  73 74 61 74 65 28 6d 61  |et_icon_state(ma|
00002290  69 6e 25 2c 6d 61 69 6e  5f 61 75 74 6f 25 2c 53  |in%,main_auto%,S|
000022a0  25 2c 53 25 29 0d 0b fe  2e 20 f2 73 65 74 5f 69  |%,S%).... .set_i|
000022b0  63 6f 6e 5f 73 74 61 74  65 28 6d 61 69 6e 25 2c  |con_state(main%,|
000022c0  6d 61 69 6e 5f 6d 61 6e  75 61 6c 25 2c 53 25 2c  |main_manual%,S%,|
000022d0  53 25 29 0d 0c 08 05 cc  0d 0c 12 2b 20 f2 73 65  |S%)........+ .se|
000022e0  74 5f 69 63 6f 6e 5f 73  74 61 74 65 28 6d 61 69  |t_icon_state(mai|
000022f0  6e 25 2c 6d 61 69 6e 5f  66 65 65 64 25 2c 30 2c  |n%,main_feed%,0,|
00002300  53 25 29 0d 0c 1c 2b 20  f2 73 65 74 5f 69 63 6f  |S%)...+ .set_ico|
00002310  6e 5f 73 74 61 74 65 28  6d 61 69 6e 25 2c 6d 61  |n_state(main%,ma|
00002320  69 6e 5f 61 75 74 6f 25  2c 30 2c 53 25 29 0d 0c  |in_auto%,0,S%)..|
00002330  26 2d 20 f2 73 65 74 5f  69 63 6f 6e 5f 73 74 61  |&- .set_icon_sta|
00002340  74 65 28 6d 61 69 6e 25  2c 6d 61 69 6e 5f 6d 61  |te(main%,main_ma|
00002350  6e 75 61 6c 25 2c 30 2c  53 25 29 0d 0c 30 05 cd  |nual%,0,S%)..0..|
00002360  0d 0c 3a 4a c8 99 20 22  58 4f 53 5f 43 4c 49 22  |..:J.. "XOS_CLI"|
00002370  2c 22 53 45 54 20 50 72  69 6e 74 65 72 24 22 2b  |,"SET Printer$"+|
00002380  22 20 22 22 22 2b 24 28  64 65 66 61 75 6c 74 73  |" """+$(defaults|
00002390  25 21 64 65 73 63 72 69  70 74 69 6f 6e 5f 66 69  |%!description_fi|
000023a0  65 6c 64 25 29 2b 22 22  22 22 0d 0c 44 05 e1 0d  |eld%)+""""..D...|
000023b0  0c 4e 05 3a 0d 0c 58 1e  dd 20 f2 50 72 69 6e 74  |.N.:..X.. .Print|
000023c0  65 72 5f 73 65 74 5f 69  63 6f 6e 28 49 25 2c 53  |er_set_icon(I%,S|
000023d0  24 29 0d 0c 62 08 ea 20  53 25 0d 0c 6c 1a 53 25  |$)..b.. S%..l.S%|
000023e0  3d a4 69 63 6f 6e 61 64  64 72 28 6d 61 69 6e 25  |=.iconaddr(main%|
000023f0  2c 49 25 29 0d 0c 76 0c  24 53 25 20 3d 20 53 24  |,I%)..v.$S% = S$|
00002400  0d 0c 80 17 f2 7a 65 72  6f 5f 74 65 72 6d 69 6e  |.....zero_termin|
00002410  61 74 65 28 53 25 29 0d  0c 8a 31 f2 73 65 74 5f  |ate(S%)...1.set_|
00002420  69 63 6f 6e 5f 73 74 61  74 65 28 6d 61 69 6e 25  |icon_state(main%|
00002430  2c 49 25 2c 30 2c 30 29  3a 20 f4 20 66 6f 72 63  |,I%,0,0): . forc|
00002440  65 20 72 65 64 72 61 77  0d 0c 94 05 e1 0d 0c 9e  |e redraw........|
00002450  05 3a 0d 0c a8 1a dd 20  f2 50 72 69 6e 74 65 72  |.:..... .Printer|
00002460  5f 41 6d 65 6e 64 43 6f  6e 66 69 67 0d 0c b2 21  |_AmendConfig...!|
00002470  e7 20 66 65 65 64 5f 63  6f 6e 66 69 67 25 20 3c  |. feed_config% <|
00002480  3e 20 66 65 65 64 5f 6e  65 77 25 20 8c 0d 0c bc  |> feed_new% ....|
00002490  1a 20 cf 23 6f 75 74 5f  66 69 6c 65 25 3d 66 65  |. .#out_file%=fe|
000024a0  65 64 5f 70 74 72 25 0d  0c c6 1c 20 d5 23 6f 75  |ed_ptr%.... .#ou|
000024b0  74 5f 66 69 6c 65 25 2c  c3 66 65 65 64 5f 6e 65  |t_file%,.feed_ne|
000024c0  77 25 3b 0d 0c d0 1d 20  66 65 65 64 5f 63 6f 6e  |w%;.... feed_con|
000024d0  66 69 67 25 20 3d 20 66  65 65 64 5f 6e 65 77 25  |fig% = feed_new%|
000024e0  0d 0c da 05 cd 0d 0c e4  25 e7 20 66 6f 72 6d 61  |........%. forma|
000024f0  74 5f 63 6f 6e 66 69 67  25 20 3c 3e 20 66 6f 72  |t_config% <> for|
00002500  6d 61 74 5f 6e 65 77 25  20 8c 0d 0c ee 1c 20 cf  |mat_new% ..... .|
00002510  23 6f 75 74 5f 66 69 6c  65 25 3d 66 6f 72 6d 61  |#out_file%=forma|
00002520  74 5f 70 74 72 25 0d 0c  f8 1e 20 d5 23 6f 75 74  |t_ptr%.... .#out|
00002530  5f 66 69 6c 65 25 2c c3  66 6f 72 6d 61 74 5f 6e  |_file%,.format_n|
00002540  65 77 25 3b 0d 0d 02 21  20 66 6f 72 6d 61 74 5f  |ew%;...! format_|
00002550  63 6f 6e 66 69 67 25 20  3d 20 66 6f 72 6d 61 74  |config% = format|
00002560  5f 6e 65 77 25 0d 0d 0c  05 cd 0d 0d 16 23 e7 20  |_new%........#. |
00002570  74 69 74 6c 65 5f 63 6f  6e 66 69 67 25 20 3c 3e  |title_config% <>|
00002580  20 74 69 74 6c 65 5f 6e  65 77 25 20 8c 0d 0d 20  | title_new% ... |
00002590  1b 20 cf 23 6f 75 74 5f  66 69 6c 65 25 3d 74 69  |. .#out_file%=ti|
000025a0  74 6c 65 5f 70 74 72 25  0d 0d 2a 1d 20 d5 23 6f  |tle_ptr%..*. .#o|
000025b0  75 74 5f 66 69 6c 65 25  2c c3 74 69 74 6c 65 5f  |ut_file%,.title_|
000025c0  6e 65 77 25 3b 0d 0d 34  1f 20 74 69 74 6c 65 5f  |new%;..4. title_|
000025d0  63 6f 6e 66 69 67 25 20  3d 20 74 69 74 6c 65 5f  |config% = title_|
000025e0  6e 65 77 25 0d 0d 3e 05  cd 0d 0d 48 21 e7 20 63  |new%..>....H!. c|
000025f0  6f 6c 73 5f 63 6f 6e 66  69 67 25 20 3c 3e 20 63  |ols_config% <> c|
00002600  6f 6c 73 5f 6e 65 77 25  20 8c 0d 0d 52 1a 20 cf  |ols_new% ...R. .|
00002610  23 6f 75 74 5f 66 69 6c  65 25 3d 63 6f 6c 73 5f  |#out_file%=cols_|
00002620  70 74 72 25 0d 0d 5c 1c  20 d5 23 6f 75 74 5f 66  |ptr%..\. .#out_f|
00002630  69 6c 65 25 2c c3 63 6f  6c 73 5f 6e 65 77 25 3b  |ile%,.cols_new%;|
00002640  0d 0d 66 1d 20 63 6f 6c  73 5f 63 6f 6e 66 69 67  |..f. cols_config|
00002650  25 20 3d 20 63 6f 6c 73  5f 6e 65 77 25 0d 0d 70  |% = cols_new%..p|
00002660  05 cd 0d 0d 7a 21 e7 20  6c 6e 75 6d 5f 63 6f 6e  |....z!. lnum_con|
00002670  66 69 67 25 20 3c 3e 20  6c 6e 75 6d 5f 6e 65 77  |fig% <> lnum_new|
00002680  25 20 8c 0d 0d 84 1a 20  cf 23 6f 75 74 5f 66 69  |% ..... .#out_fi|
00002690  6c 65 25 3d 6c 6e 75 6d  5f 70 74 72 25 0d 0d 8e  |le%=lnum_ptr%...|
000026a0  1c 20 d5 23 6f 75 74 5f  66 69 6c 65 25 2c c3 6c  |. .#out_file%,.l|
000026b0  6e 75 6d 5f 6e 65 77 25  3b 0d 0d 98 1d 20 6c 6e  |num_new%;.... ln|
000026c0  75 6d 5f 63 6f 6e 66 69  67 25 20 3d 20 6c 6e 75  |um_config% = lnu|
000026d0  6d 5f 6e 65 77 25 0d 0d  a2 05 cd 0d 0d ac 23 e7  |m_new%........#.|
000026e0  20 6c 74 65 72 6d 5f 63  6f 6e 66 69 67 25 20 3c  | lterm_config% <|
000026f0  3e 20 6c 74 65 72 6d 5f  6e 65 77 25 20 8c 0d 0d  |> lterm_new% ...|
00002700  b6 1b 20 cf 23 6f 75 74  5f 66 69 6c 65 25 3d 6c  |.. .#out_file%=l|
00002710  74 65 72 6d 5f 70 74 72  25 0d 0d c0 1d 20 d5 23  |term_ptr%.... .#|
00002720  6f 75 74 5f 66 69 6c 65  25 2c c3 6c 74 65 72 6d  |out_file%,.lterm|
00002730  5f 6e 65 77 25 3b 0d 0d  ca 1f 20 6c 74 65 72 6d  |_new%;.... lterm|
00002740  5f 63 6f 6e 66 69 67 25  20 3d 20 6c 74 65 72 6d  |_config% = lterm|
00002750  5f 6e 65 77 25 0d 0d d4  05 cd 0d 0d de 1f e7 20  |_new%.......... |
00002760  63 63 73 5f 63 6f 6e 66  69 67 25 20 3c 3e 20 63  |ccs_config% <> c|
00002770  63 73 5f 6e 65 77 25 20  8c 0d 0d e8 19 20 cf 23  |cs_new% ..... .#|
00002780  6f 75 74 5f 66 69 6c 65  25 3d 63 63 73 5f 70 74  |out_file%=ccs_pt|
00002790  72 25 0d 0d f2 1b 20 d5  23 6f 75 74 5f 66 69 6c  |r%.... .#out_fil|
000027a0  65 25 2c c3 63 63 73 5f  6e 65 77 25 3b 0d 0d fc  |e%,.ccs_new%;...|
000027b0  1b 20 63 63 73 5f 63 6f  6e 66 69 67 25 20 3d 20  |. ccs_config% = |
000027c0  63 63 73 5f 6e 65 77 25  0d 0e 06 05 cd 0d 0e 10  |ccs_new%........|
000027d0  05 e1 0d 0e 1a 05 3a 0d  0e 24 15 dd 20 f2 50 72  |......:..$.. .Pr|
000027e0  69 6e 74 65 72 5f 49 67  6e 6f 72 65 0d 0e 2e 3a  |inter_Ignore...:|
000027f0  2a 52 4d 45 6e 73 75 72  65 20 53 65 72 69 61 6c  |*RMEnsure Serial|
00002800  52 58 49 67 6e 6f 72 65  20 30 20 52 4d 4c 4f 41  |RXIgnore 0 RMLOA|
00002810  44 20 3c 50 44 72 69 76  65 72 24 44 69 72 3e 2e  |D <PDriver$Dir>.|
00002820  49 67 6e 6f 72 65 0d 0e  38 05 e1 0d 0e 42 05 3a  |Ignore..8....B.:|
00002830  0d 0e 4c 1d dd 20 f2 50  72 69 6e 74 65 72 5f 58  |..L.. .Printer_X|
00002840  6f 6e 58 6f 66 66 28 66  6c 61 67 25 29 0d 0e 56  |onXoff(flag%)..V|
00002850  0d e7 20 66 6c 61 67 25  20 8c 0d 0e 60 11 20 2a  |.. flag% ...`. *|
00002860  53 65 72 69 61 6c 52 58  4f 66 66 0d 0e 6a 0c 20  |SerialRXOff..j. |
00002870  2a 66 78 20 32 2c 32 0d  0e 74 05 cc 0d 0e 7e 0c  |*fx 2,2..t....~.|
00002880  20 2a 66 78 20 32 2c 30  0d 0e 88 10 20 2a 53 65  | *fx 2,0.... *Se|
00002890  72 69 61 6c 52 58 4f 6e  0d 0e 92 05 cd 0d 0e 9c  |rialRXOn........|
000028a0  05 e1 0d 0e a6 05 3a 0d  0e b0 1d dd 20 f2 50 72  |......:..... .Pr|
000028b0  69 6e 74 65 72 5f 4c 6f  63 61 74 69 6f 6e 28 6c  |inter_Location(l|
000028c0  6f 63 25 29 0d 0e ba 39  f4 20 43 61 6c 6c 65 64  |oc%)...9. Called|
000028d0  20 77 68 65 6e 65 76 65  72 20 74 68 65 20 63 75  | whenever the cu|
000028e0  72 72 65 6e 74 20 70 72  69 6e 74 65 72 20 6c 6f  |rrent printer lo|
000028f0  63 61 74 69 6f 6e 20 69  73 20 73 65 74 0d 0e c4  |cation is set...|
00002900  0d c8 8e 20 6c 6f 63 25  20 ca 0d 0e ce 0b 20 c9  |... loc% ..... .|
00002910  20 31 2c 32 3a 0d 0e d8  10 20 20 63 74 72 6c 44  | 1,2:....  ctrlD|
00002920  25 20 3d 20 b9 0d 0e e2  1f 20 20 c8 99 20 22 50  |% = .....  .. "P|
00002930  44 72 69 76 65 72 5f 53  65 74 50 72 69 6e 74 65  |Driver_SetPrinte|
00002940  72 22 2c 31 0d 0e ec 0b  20 c9 20 34 2c 35 3a 0d  |r",1.... . 4,5:.|
00002950  0e f6 10 20 20 63 74 72  6c 44 25 20 3d 20 a3 0d  |...  ctrlD% = ..|
00002960  0f 00 1f 20 20 c8 99 20  22 50 44 72 69 76 65 72  |...  .. "PDriver|
00002970  5f 53 65 74 50 72 69 6e  74 65 72 22 2c 30 0d 0f  |_SetPrinter",0..|
00002980  0a 05 cb 0d 0f 14 05 e1  0d 0f 1e 05 3a 0d 0f 28  |............:..(|
00002990  19 dd 20 f2 50 72 69 6e  74 65 72 5f 43 6c 6f 73  |.. .Printer_Clos|
000029a0  65 46 69 6c 65 73 0d 0f  32 2a e7 20 6d 79 5f 66  |eFiles..2*. my_f|
000029b0  69 6c 65 25 3c 3e 30 20  8c 20 d9 23 6d 79 5f 66  |ile%<>0 . .#my_f|
000029c0  69 6c 65 25 3a 20 6d 79  5f 66 69 6c 65 25 3d 30  |ile%: my_file%=0|
000029d0  0d 0f 3c 05 e1 0d 0f 46  05 3a 0d 0f 50 15 dd 20  |..<....F.:..P.. |
000029e0  f2 50 72 69 6e 74 65 72  5f 48 65 61 64 65 72 0d  |.Printer_Header.|
000029f0  0f 5a 1a e7 20 46 74 79  70 65 25 3d 4f 75 74 70  |.Z.. Ftype%=Outp|
00002a00  75 74 54 79 70 65 25 20  8c 0d 0f 64 15 20 60 65  |utType% ...d. `e|
00002a10  78 74 25 3d a2 23 69 6e  5f 66 69 6c 65 25 0d 0f  |xt%=.#in_file%..|
00002a20  6e 05 cc 0d 0f 78 3a 20  f4 20 43 61 6c 63 75 6c  |n....x: . Calcul|
00002a30  61 74 65 20 70 61 67 65  20 66 6f 72 6d 61 74 2e  |ate page format.|
00002a40  20 55 6e 69 74 73 20 61  72 65 20 6d 6f 73 74 6c  | Units are mostl|
00002a50  79 20 64 65 63 69 70 6f  69 6e 74 73 2e 0d 0f 82  |y decipoints....|
00002a60  1e 20 ea 20 70 6c 25 2c  70 72 25 2c 70 62 25 2c  |. . pl%,pr%,pb%,|
00002a70  70 74 25 2c 6d 61 72 67  69 6e 25 0d 0f 8c 20 20  |pt%,margin%...  |
00002a80  66 6f 72 6d 61 74 5f 70  72 69 6e 74 25 20 3d 20  |format_print% = |
00002a90  66 6f 72 6d 61 74 5f 6e  65 77 25 0d 0f 96 1e 20  |format_new%.... |
00002aa0  74 69 74 6c 65 5f 70 72  69 6e 74 25 20 3d 20 74  |title_print% = t|
00002ab0  69 74 6c 65 5f 6e 65 77  25 0d 0f a0 1c 20 63 6f  |itle_new%.... co|
00002ac0  6c 73 5f 70 72 69 6e 74  25 20 3d 20 63 6f 6c 73  |ls_print% = cols|
00002ad0  5f 6e 65 77 25 0d 0f aa  1c 20 6c 6e 75 6d 5f 70  |_new%.... lnum_p|
00002ae0  72 69 6e 74 25 20 3d 20  6c 6e 75 6d 5f 6e 65 77  |rint% = lnum_new|
00002af0  25 0d 0f b4 1e 20 6c 74  65 72 6d 5f 70 72 69 6e  |%.... lterm_prin|
00002b00  74 25 20 3d 20 6c 74 65  72 6d 5f 6e 65 77 25 0d  |t% = lterm_new%.|
00002b10  0f be 1a 20 63 63 73 5f  70 72 69 6e 74 25 20 3d  |... ccs_print% =|
00002b20  20 63 63 73 5f 6e 65 77  25 0d 0f c8 11 20 6d 61  | ccs_new%.... ma|
00002b30  72 67 69 6e 25 20 3d 20  35 30 0d 0f d2 4a 20 70  |rgin% = 50...J p|
00002b40  6c 25 20 3d 20 70 61 67  65 5f 64 65 73 63 25 28  |l% = page_desc%(|
00002b50  70 61 67 65 5f 6e 75 6d  62 65 72 25 2c 70 61 67  |page_number%,pag|
00002b60  65 5f 6c 65 66 74 5f 66  69 65 6c 64 25 29 20 20  |e_left_field%)  |
00002b70  20 81 20 31 30 30 20 2b  20 31 20 2b 20 6d 61 72  | . 100 + 1 + mar|
00002b80  67 69 6e 25 0d 0f dc 46  20 70 72 25 20 3d 20 70  |gin%...F pr% = p|
00002b90  61 67 65 5f 64 65 73 63  25 28 70 61 67 65 5f 6e  |age_desc%(page_n|
00002ba0  75 6d 62 65 72 25 2c 70  61 67 65 5f 72 69 67 68  |umber%,page_righ|
00002bb0  74 5f 66 69 65 6c 64 25  29 20 20 81 20 31 30 30  |t_field%)  . 100|
00002bc0  20 2d 20 6d 61 72 67 69  6e 25 0d 0f e6 4a 20 70  | - margin%...J p|
00002bd0  62 25 20 3d 20 70 61 67  65 5f 64 65 73 63 25 28  |b% = page_desc%(|
00002be0  70 61 67 65 5f 6e 75 6d  62 65 72 25 2c 70 61 67  |page_number%,pag|
00002bf0  65 5f 62 6f 74 74 6f 6d  5f 66 69 65 6c 64 25 29  |e_bottom_field%)|
00002c00  20 81 20 31 30 30 20 2b  20 31 20 2b 20 6d 61 72  | . 100 + 1 + mar|
00002c10  67 69 6e 25 0d 0f f0 46  20 70 74 25 20 3d 20 70  |gin%...F pt% = p|
00002c20  61 67 65 5f 64 65 73 63  25 28 70 61 67 65 5f 6e  |age_desc%(page_n|
00002c30  75 6d 62 65 72 25 2c 70  61 67 65 5f 74 6f 70 5f  |umber%,page_top_|
00002c40  66 69 65 6c 64 25 29 20  20 20 20 81 20 31 30 30  |field%)    . 100|
00002c50  20 2d 20 6d 61 72 67 69  6e 25 0d 0f fa 51 20 60  | - margin%...Q `|
00002c60  62 62 6f 78 24 20 3d 20  c3 28 70 6c 25 20 81 20  |bbox$ = .(pl% . |
00002c70  31 30 29 2b 22 20 22 2b  c3 28 70 62 25 20 81 20  |10)+" "+.(pb% . |
00002c80  31 30 29 2b 22 20 22 2b  c3 28 28 70 72 25 2b 39  |10)+" "+.((pr%+9|
00002c90  29 20 81 20 31 30 29 2b  22 20 22 2b c3 28 28 70  |) . 10)+" "+.((p|
00002ca0  74 25 2b 39 29 20 81 20  31 30 29 0d 10 04 17 20  |t%+9) . 10).... |
00002cb0  c8 8e 20 66 6f 72 6d 61  74 5f 70 72 69 6e 74 25  |.. format_print%|
00002cc0  20 ca 0d 10 0e 15 20 20  c9 20 30 3a 20 f4 20 50  | .....  . 0: . P|
00002cd0  6f 72 74 72 61 69 74 0d  10 18 20 20 20 20 e7 20  |ortrait...    . |
00002ce0  74 69 74 6c 65 5f 70 72  69 6e 74 25 20 8c 20 70  |title_print% . p|
00002cf0  74 25 2d 3d 31 35 30 0d  10 22 15 20 20 20 60 70  |t%-=150..".   `p|
00002d00  77 25 20 3d 20 70 72 25  2d 70 6c 25 0d 10 2c 15  |w% = pr%-pl%..,.|
00002d10  20 20 20 60 70 68 25 20  3d 20 70 74 25 2d 70 62  |   `ph% = pt%-pb|
00002d20  25 0d 10 36 14 20 20 20  60 66 73 69 7a 65 25 20  |%..6.   `fsize% |
00002d30  3d 20 31 30 30 0d 10 40  27 20 20 20 60 74 72 61  |= 100..@'   `tra|
00002d40  6e 73 66 6f 72 6d 24 20  3d 20 c3 70 6c 25 2b 22  |nsform$ = .pl%+"|
00002d50  20 22 2b c3 70 74 25 2b  22 20 30 22 0d 10 4a 16  | "+.pt%+" 0"..J.|
00002d60  20 20 c9 20 31 3a 20 f4  20 4c 61 6e 64 73 63 61  |  . 1: . Landsca|
00002d70  70 65 0d 10 54 20 20 20  20 e7 20 74 69 74 6c 65  |pe..T    . title|
00002d80  5f 70 72 69 6e 74 25 20  8c 20 70 6c 25 2b 3d 31  |_print% . pl%+=1|
00002d90  35 30 0d 10 5e 15 20 20  20 60 70 77 25 20 3d 20  |50..^.   `pw% = |
00002da0  70 74 25 2d 70 62 25 0d  10 68 15 20 20 20 60 70  |pt%-pb%..h.   `p|
00002db0  68 25 20 3d 20 70 72 25  2d 70 6c 25 0d 10 72 13  |h% = pr%-pl%..r.|
00002dc0  20 20 20 60 66 73 69 7a  65 25 20 3d 20 37 30 0d  |   `fsize% = 70.|
00002dd0  10 7c 2b 20 20 20 60 74  72 61 6e 73 66 6f 72 6d  |.|+   `transform|
00002de0  24 20 3d 20 c3 70 62 25  2b 22 20 22 2b c3 28 2d  |$ = .pb%+" "+.(-|
00002df0  70 6c 25 29 2b 22 20 39  30 22 0d 10 86 06 20 cb  |pl%)+" 90".... .|
00002e00  0d 10 90 42 20 60 77 25  20 3d 20 30 2e 36 20 2a  |...B `w% = 0.6 *|
00002e10  20 60 66 73 69 7a 65 25  3a 20 f4 20 43 6f 75 72  | `fsize%: . Cour|
00002e20  69 65 72 20 63 68 61 72  61 63 74 65 72 20 77 69  |ier character wi|
00002e30  64 74 68 20 69 73 20 36  30 25 20 6f 66 20 73 69  |dth is 60% of si|
00002e40  7a 65 0d 10 9a 2d 20 60  68 25 20 3d 20 31 2e 31  |ze...- `h% = 1.1|
00002e50  20 2a 20 60 66 73 69 7a  65 25 3a 20 f4 20 41 6c  | * `fsize%: . Al|
00002e60  6c 6f 77 20 31 30 25 20  6c 65 61 64 69 6e 67 0d  |low 10% leading.|
00002e70  10 a4 34 20 60 70 77 25  20 3d 20 60 70 77 25 20  |..4 `pw% = `pw% |
00002e80  81 20 60 77 25 3a 20 f4  20 53 69 7a 65 20 6f 66  |. `w%: . Size of|
00002e90  20 70 61 67 65 20 69 6e  20 63 68 61 72 61 63 74  | page in charact|
00002ea0  65 72 73 0d 10 ae 16 20  60 70 68 25 20 3d 20 60  |ers.... `ph% = `|
00002eb0  70 68 25 20 81 20 60 68  25 0d 10 b8 47 20 60 63  |ph% . `h%...G `c|
00002ec0  77 25 20 3d 20 28 60 70  77 25 2b 32 29 20 81 20  |w% = (`pw%+2) . |
00002ed0  63 6f 6c 73 5f 70 72 69  6e 74 25 20 2d 20 32 3a  |cols_print% - 2:|
00002ee0  20 f4 20 57 69 64 74 68  20 6f 66 20 63 6f 6c 75  | . Width of colu|
00002ef0  6d 6e 20 69 6e 20 63 68  61 72 61 63 74 65 72 73  |mn in characters|
00002f00  0d 10 c2 54 20 e7 20 60  63 77 25 3c 31 30 20 8c  |...T . `cw%<10 .|
00002f10  20 f2 6d 6f 61 6e 28 22  43 6f 6c 75 6d 6e 73 20  | .moan("Columns |
00002f20  74 6f 6f 20 6e 61 72 72  6f 77 3a 20 72 65 64 75  |too narrow: redu|
00002f30  63 65 20 6e 75 6d 62 65  72 20 6f 66 20 63 6f 6c  |ce number of col|
00002f40  75 6d 6e 73 20 61 6e 64  20 74 72 79 20 61 67 61  |umns and try aga|
00002f50  69 6e 22 29 0d 10 cc 2e  20 3f 65 72 72 6f 72 5f  |in").... ?error_|
00002f60  62 6c 6b 25 3d 33 3a 20  c8 99 20 22 4f 53 5f 57  |blk%=3: .. "OS_W|
00002f70  6f 72 64 22 2c 31 34 2c  65 72 72 6f 72 5f 62 6c  |ord",14,error_bl|
00002f80  6b 25 0d 10 d6 43 20 c8  99 20 22 4f 53 5f 43 6f  |k%...C .. "OS_Co|
00002f90  6e 76 65 72 74 53 74 61  6e 64 61 72 64 44 61 74  |nvertStandardDat|
00002fa0  65 41 6e 64 54 69 6d 65  22 2c 65 72 72 6f 72 5f  |eAndTime",error_|
00002fb0  62 6c 6b 25 2c 65 72 72  6f 72 5f 62 6c 6b 25 2b  |blk%,error_blk%+|
00002fc0  35 2c 32 35 30 0d 10 e0  3f 20 e7 20 66 69 6c 65  |5,250...? . file|
00002fd0  6e 61 6d 24 3d 22 3c 50  72 69 6e 74 65 72 24 53  |nam$="<Printer$S|
00002fe0  63 72 61 70 3e 22 20 84  20 66 69 6c 65 6e 61 6d  |crap>" . filenam|
00002ff0  24 3d 22 3c 50 72 69 6e  74 65 72 24 54 65 6d 70  |$="<Printer$Temp|
00003000  3e 22 20 8c 0d 10 ea 17  20 20 60 6e 61 6d 65 24  |>" .....  `name$|
00003010  3d 73 61 76 65 5f 6e 61  6d 65 24 0d 10 f4 06 20  |=save_name$.... |
00003020  cc 0d 10 fe 15 20 20 60  6e 61 6d 65 24 3d 66 69  |.....  `name$=fi|
00003030  6c 65 6e 61 6d 24 0d 11  08 06 20 cd 0d 11 12 21  |lenam$.... ....!|
00003040  20 60 74 69 6d 65 24 20  3d 20 a4 72 74 6f 7a 28  | `time$ = .rtoz(|
00003050  65 72 72 6f 72 5f 62 6c  6b 25 2b 35 29 0d 11 1c  |error_blk%+5)...|
00003060  3c 20 60 73 74 25 20 3d  20 30 3a 20 60 73 32 25  |< `st% = 0: `s2%|
00003070  20 3d 20 30 3a 20 f4 20  53 74 61 67 65 20 6f 66  | = 0: . Stage of|
00003080  20 70 72 6f 64 75 63 74  69 6f 6e 20 6f 66 20 74  | production of t|
00003090  68 65 20 6f 75 74 70 75  74 0d 11 26 0f 20 60 70  |he output..&. `p|
000030a0  61 67 65 25 20 3d 20 30  0d 11 30 45 20 60 6f 75  |age% = 0..0E `ou|
000030b0  74 70 75 74 25 20 3d 20  6f 6c 69 6e 65 25 3a 20  |tput% = oline%: |
000030c0  24 60 6f 75 74 70 75 74  25 20 3d 20 22 22 3a 20  |$`output% = "": |
000030d0  60 6c 66 25 20 3d 20 a3  3a 20 f4 20 4e 6f 20 6f  |`lf% = .: . No o|
000030e0  75 74 70 75 74 20 70 65  6e 64 69 6e 67 0d 11 3a  |utput pending..:|
000030f0  3b 20 e7 20 62 75 66 73  7a 25 3c 32 35 36 20 8c  |; . bufsz%<256 .|
00003100  20 62 75 66 73 7a 25 3d  32 35 36 3a 20 de 20 62  | bufsz%=256: . b|
00003110  75 66 25 20 62 75 66 73  7a 25 2c 20 62 75 66 32  |uf% bufsz%, buf2|
00003120  25 20 62 75 66 73 7a 25  0d 11 44 05 cd 0d 11 4e  |% bufsz%..D....N|
00003130  05 e1 0d 11 58 05 3a 0d  11 62 19 dd 20 a4 50 72  |....X.:..b.. .Pr|
00003140  69 6e 74 65 72 5f 53 65  6e 64 28 6c 65 6e 25 29  |inter_Send(len%)|
00003150  0d 11 6c 0a f2 45 73 63  4f 6e 0d 11 76 0e ea 20  |..l..EscOn..v.. |
00003160  4c 25 2c 64 6f 6e 65 25  0d 11 80 3a e7 20 6c 65  |L%,done%...:. le|
00003170  6e 25 3e 32 35 35 20 8c  20 6c 65 6e 25 3d 32 35  |n%>255 . len%=25|
00003180  35 3a 20 f4 20 46 6f 72  20 73 61 66 65 74 79 20  |5: . For safety |
00003190  77 69 74 68 20 42 41 53  49 43 20 73 74 72 69 6e  |with BASIC strin|
000031a0  67 73 0d 11 8a 1a e7 20  46 74 79 70 65 25 3d 4f  |gs..... Ftype%=O|
000031b0  75 74 70 75 74 54 79 70  65 25 20 8c 0d 11 94 1c  |utputType% .....|
000031c0  20 4c 25 20 3d 20 60 65  78 74 25 20 2d 20 8f 23  | L% = `ext% - .#|
000031d0  69 6e 5f 66 69 6c 65 25  0d 11 9e 17 20 64 6f 6e  |in_file%.... don|
000031e0  65 25 20 3d 20 28 6c 65  6e 25 3e 3d 4c 25 29 0d  |e% = (len%>=L%).|
000031f0  11 a8 0e 20 e7 20 64 6f  6e 65 25 20 8c 0d 11 b2  |... . done% ....|
00003200  29 20 20 c8 99 20 22 4f  53 5f 47 42 50 42 22 2c  |)  .. "OS_GBPB",|
00003210  20 34 2c 20 69 6e 5f 66  69 6c 65 25 2c 20 62 75  | 4, in_file%, bu|
00003220  66 25 2c 20 4c 25 0d 11  bc 2a 20 20 c8 99 20 22  |f%, L%...*  .. "|
00003230  4f 53 5f 47 42 50 42 22  2c 20 32 2c 20 6f 75 74  |OS_GBPB", 2, out|
00003240  5f 66 69 6c 65 25 2c 20  62 75 66 25 2c 20 4c 25  |_file%, buf%, L%|
00003250  0d 11 c6 06 20 cc 0d 11  d0 2b 20 20 c8 99 20 22  |.... ....+  .. "|
00003260  4f 53 5f 47 42 50 42 22  2c 20 34 2c 20 69 6e 5f  |OS_GBPB", 4, in_|
00003270  66 69 6c 65 25 2c 20 62  75 66 25 2c 20 6c 65 6e  |file%, buf%, len|
00003280  25 0d 11 da 2c 20 20 c8  99 20 22 4f 53 5f 47 42  |%...,  .. "OS_GB|
00003290  50 42 22 2c 20 32 2c 20  6f 75 74 5f 66 69 6c 65  |PB", 2, out_file|
000032a0  25 2c 20 62 75 66 25 2c  20 6c 65 6e 25 0d 11 e4  |%, buf%, len%...|
000032b0  06 20 cd 0d 11 ee 05 cc  0d 11 f8 0c 20 64 6f 6e  |. .......... don|
000032c0  65 25 3d a3 0d 12 02 14  20 4c 25 3d a9 28 24 60  |e%=..... L%=.($`|
000032d0  6f 75 74 70 75 74 25 29  0d 12 0c 44 20 e7 20 60  |output%)...D . `|
000032e0  6c 66 25 20 80 20 4c 25  3c 32 35 35 20 8c 20 60  |lf% . L%<255 . `|
000032f0  6f 75 74 70 75 74 25 3f  4c 25 3d 31 30 3a 20 4c  |output%?L%=10: L|
00003300  25 2b 3d 31 3a 20 60 6f  75 74 70 75 74 25 3f 4c  |%+=1: `output%?L|
00003310  25 3d 31 33 3a 20 60 6c  66 25 3d a3 0d 12 16 16  |%=13: `lf%=.....|
00003320  20 c8 95 20 ac 20 64 6f  6e 65 25 20 80 20 4c 25  | .. . done% . L%|
00003330  3d 30 0d 12 20 34 20 20  64 6f 6e 65 25 3d a4 4f  |=0.. 4  done%=.O|
00003340  4c 69 6e 65 3a 20 4c 25  3d a9 28 24 60 6f 75 74  |Line: L%=.($`out|
00003350  70 75 74 25 29 3a 20 e7  20 4c 25 3e 30 20 8c 20  |put%): . L%>0 . |
00003360  60 6c 66 25 3d b9 0d 12  2a 06 20 ce 0d 12 34 10  |`lf%=...*. ...4.|
00003370  20 e7 20 ac 20 64 6f 6e  65 25 20 8c 0d 12 3e 11  | . . done% ...>.|
00003380  20 20 e7 20 4c 25 3c 6c  65 6e 25 20 8c 0d 12 48  |  . L%<len% ...H|
00003390  3d 20 20 20 e7 20 60 6c  66 25 20 8c 20 60 6f 75  |=   . `lf% . `ou|
000033a0  74 70 75 74 25 3f 4c 25  3d 31 30 3a 20 4c 25 2b  |tput%?L%=10: L%+|
000033b0  3d 31 3a 20 60 6f 75 74  70 75 74 25 3f 4c 25 3d  |=1: `output%?L%=|
000033c0  31 33 3a 20 60 6c 66 25  3d a3 0d 12 52 07 20 20  |13: `lf%=...R.  |
000033d0  cc 0d 12 5c 0e 20 20 20  4c 25 3d 6c 65 6e 25 0d  |...\.   L%=len%.|
000033e0  12 66 07 20 20 cd 0d 12  70 3b 20 20 c8 99 20 22  |.f.  ...p;  .. "|
000033f0  4f 53 5f 47 42 50 42 22  2c 20 32 2c 20 6f 75 74  |OS_GBPB", 2, out|
00003400  5f 66 69 6c 65 25 2c 20  60 6f 75 74 70 75 74 25  |_file%, `output%|
00003410  2c 20 4c 25 20 b8 20 2c  2c 60 6f 75 74 70 75 74  |, L% . ,,`output|
00003420  25 0d 12 7a 06 20 cd 0d  12 84 05 cd 0d 12 8e 0b  |%..z. ..........|
00003430  f2 45 73 63 4f 66 66 0d  12 98 0a 3d 64 6f 6e 65  |.EscOff....=done|
00003440  25 0d 12 a2 05 3a 0d 12  ac 15 dd 20 f2 50 72 69  |%....:..... .Pri|
00003450  6e 74 65 72 5f 46 6f 6f  74 65 72 0d 12 b6 0e e7  |nter_Footer.....|
00003460  20 63 74 72 6c 44 25 20  8c 0d 12 c0 0b 20 f2 45  | ctrlD% ..... .E|
00003470  73 63 4f 6e 0d 12 ca 12  20 d5 23 6f 75 74 5f 66  |scOn.... .#out_f|
00003480  69 6c 65 25 2c 34 0d 12  d4 0c 20 f2 45 73 63 4f  |ile%,4.... .EscO|
00003490  66 66 0d 12 de 05 cd 0d  12 e8 05 e1 0d 12 f2 05  |ff..............|
000034a0  3a 0d 12 fc 0c dd 20 a4  4f 4c 69 6e 65 0d 13 06  |:..... .OLine...|
000034b0  30 f4 20 50 72 6f 64 75  63 65 20 74 68 65 20 6e  |0. Produce the n|
000034c0  65 78 74 20 6c 69 6e 65  20 6f 66 20 50 6f 73 74  |ext line of Post|
000034d0  53 63 72 69 70 74 20 6f  75 74 70 75 74 0d 13 10  |Script output...|
000034e0  0b ea 20 64 6f 6e 65 25  0d 13 1a 0d 64 6f 6e 65  |.. done%....done|
000034f0  25 20 3d 20 a3 0d 13 24  10 24 6f 6c 69 6e 65 25  |% = ...$.$oline%|
00003500  20 3d 20 22 22 0d 13 2e  0d c8 8e 20 60 73 74 25  | = ""...... `st%|
00003510  20 ca 0d 13 38 09 20 c9  20 30 3a 0d 13 42 11 20  | ...8. . 0:..B. |
00003520  20 f2 68 65 61 64 65 72  6c 69 6e 65 0d 13 4c 09  | .headerline..L.|
00003530  20 c9 20 31 3a 0d 13 56  10 20 20 e7 20 60 73 32  | . 1:..V.  . `s2|
00003540  25 3d 30 20 8c 0d 13 60  2d 20 20 20 6d 79 5f 66  |%=0 ...`-   my_f|
00003550  69 6c 65 25 20 3d 20 8e  22 3c 50 44 72 69 76 65  |ile% = ."<PDrive|
00003560  72 24 44 69 72 3e 2e 50  53 65 6e 63 6f 64 69 6e  |r$Dir>.PSencodin|
00003570  67 22 0d 13 6a 3d 20 20  20 e7 20 6d 79 5f 66 69  |g"..j=   . my_fi|
00003580  6c 65 25 3d 30 20 8c 20  f2 6d 6f 61 6e 28 22 43  |le%=0 . .moan("C|
00003590  61 6e 27 74 20 6f 70 65  6e 20 74 68 65 20 50 53  |an't open the PS|
000035a0  65 6e 63 6f 64 69 6e 67  20 66 69 6c 65 22 29 0d  |encoding file").|
000035b0  13 74 0d 20 20 20 60 73  32 25 3d 31 0d 13 7e 07  |.t.   `s2%=1..~.|
000035c0  20 20 cd 0d 13 88 13 20  20 f2 65 6e 63 6f 64 69  |  .....  .encodi|
000035d0  6e 67 6c 69 6e 65 0d 13  92 09 20 c9 20 32 3a 0d  |ngline.... . 2:.|
000035e0  13 9c 10 20 20 e7 20 60  73 32 25 3d 30 20 8c 0d  |...  . `s2%=0 ..|
000035f0  13 a6 2c 20 20 20 6d 79  5f 66 69 6c 65 25 20 3d  |..,   my_file% =|
00003600  20 8e 22 3c 50 44 72 69  76 65 72 24 44 69 72 3e  | ."<PDriver$Dir>|
00003610  2e 50 53 74 70 72 6f 6c  6f 67 22 0d 13 b0 3c 20  |.PStprolog"...< |
00003620  20 20 e7 20 6d 79 5f 66  69 6c 65 25 3d 30 20 8c  |  . my_file%=0 .|
00003630  20 f2 6d 6f 61 6e 28 22  43 61 6e 27 74 20 6f 70  | .moan("Can't op|
00003640  65 6e 20 74 68 65 20 50  53 74 70 72 6f 6c 6f 67  |en the PStprolog|
00003650  20 66 69 6c 65 22 29 0d  13 ba 0d 20 20 20 60 73  | file")....   `s|
00003660  32 25 3d 31 0d 13 c4 07  20 20 cd 0d 13 ce 11 20  |2%=1....  ..... |
00003670  20 f2 70 72 6f 6c 6f 67  6c 69 6e 65 0d 13 d8 09  | .prologline....|
00003680  20 c9 20 33 3a 0d 13 e2  10 20 20 f2 73 65 74 75  | . 3:....  .setu|
00003690  70 6c 69 6e 65 0d 13 ec  09 20 c9 20 34 3a 0d 13  |pline.... . 4:..|
000036a0  f6 13 20 20 f2 73 74 61  72 74 72 65 61 64 69 6e  |..  .startreadin|
000036b0  67 0d 14 00 09 20 c9 20  35 3a 0d 14 0a 10 20 20  |g.... . 5:....  |
000036c0  f2 73 74 61 72 74 70 61  67 65 0d 14 14 09 20 c9  |.startpage.... .|
000036d0  20 36 3a 0d 14 1e 0f 20  20 f2 74 65 78 74 6c 69  | 6:....  .textli|
000036e0  6e 65 0d 14 28 09 20 c9  20 37 3a 0d 14 32 0e 20  |ne..(. . 7:..2. |
000036f0  20 f2 65 6e 64 70 61 67  65 0d 14 3c 09 20 c9 20  | .endpage..<. . |
00003700  38 3a 0d 14 46 12 20 20  f2 74 72 61 69 6c 65 72  |8:..F.  .trailer|
00003710  6c 69 6e 65 0d 14 50 07  20 7f 3a 0d 14 5a 0f 20  |line..P. .:..Z. |
00003720  20 64 6f 6e 65 25 20 3d  20 b9 0d 14 64 05 cb 0d  | done% = ...d...|
00003730  14 6e 15 60 6f 75 74 70  75 74 25 20 3d 20 6f 6c  |.n.`output% = ol|
00003740  69 6e 65 25 0d 14 78 0a  3d 64 6f 6e 65 25 0d 14  |ine%..x.=done%..|
00003750  82 05 3a 0d 14 8c 11 dd  20 f2 68 65 61 64 65 72  |..:..... .header|
00003760  6c 69 6e 65 0d 14 96 11  ea 20 74 65 6d 70 25 2c  |line..... temp%,|
00003770  64 6f 6e 65 25 0d 14 a0  0b 64 6f 6e 65 25 3d a3  |done%....done%=.|
00003780  0d 14 aa 0d c8 8e 20 60  73 32 25 20 ca 0d 14 b4  |...... `s2% ....|
00003790  09 20 c9 20 30 3a 0d 14  be 20 20 20 24 6f 6c 69  |. . 0:...   $oli|
000037a0  6e 65 25 20 3d 20 22 25  21 50 53 2d 41 64 6f 62  |ne% = "%!PS-Adob|
000037b0  65 2d 32 2e 31 22 0d 14  c8 09 20 c9 20 31 3a 0d  |e-2.1".... . 1:.|
000037c0  14 d2 43 20 20 24 6f 6c  69 6e 65 25 20 3d 20 22  |..C  $oline% = "|
000037d0  25 25 43 72 65 61 74 6f  72 3a 20 21 50 72 69 6e  |%%Creator: !Prin|
000037e0  74 65 72 50 53 20 61 70  70 6c 69 63 61 74 69 6f  |terPS applicatio|
000037f0  6e 20 22 2b 56 65 72 73  69 6f 6e 4e 75 6d 62 65  |n "+VersionNumbe|
00003800  72 24 0d 14 dc 09 20 c9  20 32 3a 0d 14 e6 29 20  |r$.... . 2:...) |
00003810  20 24 6f 6c 69 6e 65 25  20 3d 20 22 25 25 43 72  | $oline% = "%%Cr|
00003820  65 61 74 69 6f 6e 44 61  74 65 3a 20 22 2b 60 74  |eationDate: "+`t|
00003830  69 6d 65 24 0d 14 f0 09  20 c9 20 33 3a 0d 14 fa  |ime$.... . 3:...|
00003840  22 20 20 24 6f 6c 69 6e  65 25 20 3d 20 22 25 25  |"  $oline% = "%%|
00003850  54 69 74 6c 65 3a 20 22  2b 60 6e 61 6d 65 24 0d  |Title: "+`name$.|
00003860  15 04 09 20 c9 20 34 3a  0d 15 0e 37 20 20 c8 99  |... . 4:...7  ..|
00003870  20 22 58 4f 53 5f 52 65  61 64 56 61 72 56 61 6c  | "XOS_ReadVarVal|
00003880  22 2c 22 50 44 72 69 76  65 72 24 46 6f 72 22 2c  |","PDriver$For",|
00003890  2c 2d 31 2c 30 20 b8 20  2c 2c 74 65 6d 70 25 0d  |,-1,0 . ,,temp%.|
000038a0  15 18 3a 20 20 e7 20 74  65 6d 70 25 3c 30 20 8c  |..:  . temp%<0 .|
000038b0  20 24 62 75 66 25 3d 22  25 25 46 6f 72 3a 20 3c  | $buf%="%%For: <|
000038c0  50 44 72 69 76 65 72 24  46 6f 72 3e 22 3a 20 f2  |PDriver$For>": .|
000038d0  65 78 70 61 6e 64 62 75  66 0d 15 22 09 20 c9 20  |expandbuf..". . |
000038e0  35 3a 0d 15 2c 3b 20 20  c8 99 20 22 58 4f 53 5f  |5:..,;  .. "XOS_|
000038f0  52 65 61 64 56 61 72 56  61 6c 22 2c 22 50 44 72  |ReadVarVal","PDr|
00003900  69 76 65 72 24 41 64 64  72 65 73 73 22 2c 2c 2d  |iver$Address",,-|
00003910  31 2c 30 20 b8 20 2c 2c  74 65 6d 70 25 0d 15 36  |1,0 . ,,temp%..6|
00003920  42 20 20 e7 20 74 65 6d  70 25 3c 30 20 8c 20 24  |B  . temp%<0 . $|
00003930  62 75 66 25 3d 22 25 25  52 6f 75 74 69 6e 67 3a  |buf%="%%Routing:|
00003940  20 3c 50 44 72 69 76 65  72 24 41 64 64 72 65 73  | <PDriver$Addres|
00003950  73 3e 22 3a 20 f2 65 78  70 61 6e 64 62 75 66 0d  |s>": .expandbuf.|
00003960  15 40 09 20 c9 20 36 3a  0d 15 4a 22 20 20 24 6f  |.@. . 6:..J"  $o|
00003970  6c 69 6e 65 25 20 3d 20  22 25 25 50 61 67 65 73  |line% = "%%Pages|
00003980  3a 20 28 61 74 65 6e 64  29 22 0d 15 54 09 20 c9  |: (atend)"..T. .|
00003990  20 37 3a 0d 15 5e 28 20  20 24 6f 6c 69 6e 65 25  | 7:..^(  $oline%|
000039a0  20 3d 20 22 25 25 42 6f  75 6e 64 69 6e 67 42 6f  | = "%%BoundingBo|
000039b0  78 3a 20 22 2b 60 62 62  6f 78 24 0d 15 68 09 20  |x: "+`bbox$..h. |
000039c0  c9 20 38 3a 0d 15 72 37  20 20 24 6f 6c 69 6e 65  |. 8:..r7  $oline|
000039d0  25 20 3d 20 22 25 25 44  6f 63 75 6d 65 6e 74 46  |% = "%%DocumentF|
000039e0  6f 6e 74 73 3a 20 43 6f  75 72 69 65 72 20 43 6f  |onts: Courier Co|
000039f0  75 72 69 65 72 2d 42 6f  6c 64 22 0d 15 7c 09 20  |urier-Bold"..|. |
00003a00  c9 20 39 3a 0d 15 86 1f  20 20 24 6f 6c 69 6e 65  |. 9:....  $oline|
00003a10  25 20 3d 20 22 25 25 45  6e 64 43 6f 6d 6d 65 6e  |% = "%%EndCommen|
00003a20  74 73 22 0d 15 90 0a 20  c9 20 31 30 3a 0d 15 9a  |ts".... . 10:...|
00003a30  25 20 20 24 6f 6c 69 6e  65 25 20 3d 20 22 2f 50  |%  $oline% = "/P|
00003a40  44 64 69 63 74 20 35 30  20 64 69 63 74 20 64 65  |Ddict 50 dict de|
00003a50  66 22 0d 15 a4 0a 20 c9  20 31 31 3a 0d 15 ae 1e  |f".... . 11:....|
00003a60  20 20 24 6f 6c 69 6e 65  25 20 3d 20 22 50 44 64  |  $oline% = "PDd|
00003a70  69 63 74 20 62 65 67 69  6e 22 0d 15 b8 07 20 7f  |ict begin".... .|
00003a80  3a 0d 15 c2 0d 20 20 64  6f 6e 65 25 3d b9 0d 15  |:....  done%=...|
00003a90  cc 05 cb 0d 15 d6 28 e7  20 64 6f 6e 65 25 20 8c  |......(. done% .|
00003aa0  20 60 73 74 25 2b 3d 31  3a 20 60 73 32 25 3d 30  | `st%+=1: `s2%=0|
00003ab0  3a 20 8b 20 60 73 32 25  2b 3d 31 0d 15 e0 05 e1  |: . `s2%+=1.....|
00003ac0  0d 15 ea 05 3a 0d 15 f4  13 dd 20 f2 65 6e 63 6f  |....:..... .enco|
00003ad0  64 69 6e 67 6c 69 6e 65  0d 15 fe 0b ea 20 64 6f  |dingline..... do|
00003ae0  6e 65 25 0d 16 08 14 64  6f 6e 65 25 3d c5 23 6d  |ne%....done%=.#m|
00003af0  79 5f 66 69 6c 65 25 0d  16 12 0f e7 20 ac 20 64  |y_file%..... . d|
00003b00  6f 6e 65 25 20 8c 0d 16  1c 15 20 24 62 75 66 25  |one% ..... $buf%|
00003b10  3d be 23 6d 79 5f 66 69  6c 65 25 0d 16 26 24 20  |=.#my_file%..&$ |
00003b20  64 6f 6e 65 25 20 3d 20  28 62 75 66 25 3f 30 3d  |done% = (buf%?0=|
00003b30  33 37 20 80 20 62 75 66  25 3f 31 3d 34 37 29 0d  |37 . buf%?1=47).|
00003b40  16 30 1b 20 e7 20 ac 20  64 6f 6e 65 25 20 8c 20  |.0. . . done% . |
00003b50  f2 72 65 64 75 63 65 62  75 66 0d 16 3a 05 cd 0d  |.reducebuf..:...|
00003b60  16 44 35 e7 20 64 6f 6e  65 25 20 8c 20 d9 23 6d  |.D5. done% . .#m|
00003b70  79 5f 66 69 6c 65 25 3a  20 6d 79 5f 66 69 6c 65  |y_file%: my_file|
00003b80  25 3d 30 3a 20 60 73 74  25 2b 3d 31 3a 20 60 73  |%=0: `st%+=1: `s|
00003b90  32 25 3d 30 0d 16 4e 05  e1 0d 16 58 05 3a 0d 16  |2%=0..N....X.:..|
00003ba0  62 11 dd 20 f2 70 72 6f  6c 6f 67 6c 69 6e 65 0d  |b.. .prologline.|
00003bb0  16 6c 0b ea 20 64 6f 6e  65 25 0d 16 76 14 64 6f  |.l.. done%..v.do|
00003bc0  6e 65 25 3d c5 23 6d 79  5f 66 69 6c 65 25 0d 16  |ne%=.#my_file%..|
00003bd0  80 0d e7 20 64 6f 6e 65  25 20 8c 0d 16 8a 2c 20  |... done% ...., |
00003be0  d9 23 6d 79 5f 66 69 6c  65 25 3a 20 6d 79 5f 66  |.#my_file%: my_f|
00003bf0  69 6c 65 25 3d 30 3a 20  60 73 74 25 2b 3d 31 3a  |ile%=0: `st%+=1:|
00003c00  20 60 73 32 25 3d 30 0d  16 94 05 cc 0d 16 9e 15  | `s2%=0.........|
00003c10  20 24 62 75 66 25 3d be  23 6d 79 5f 66 69 6c 65  | $buf%=.#my_file|
00003c20  25 0d 16 a8 0f 20 f2 72  65 64 75 63 65 62 75 66  |%.... .reducebuf|
00003c30  0d 16 b2 05 cd 0d 16 bc  05 e1 0d 16 c6 05 3a 0d  |..............:.|
00003c40  16 d0 10 dd 20 f2 73 65  74 75 70 6c 69 6e 65 0d  |.... .setupline.|
00003c50  16 da 12 ea 20 74 65 6d  70 25 2c 20 64 6f 6e 65  |.... temp%, done|
00003c60  25 0d 16 e4 0b 64 6f 6e  65 25 3d a3 0d 16 ee 0d  |%....done%=.....|
00003c70  c8 8e 20 60 73 32 25 20  ca 0d 16 f8 09 20 c9 20  |.. `s2% ..... . |
00003c80  30 3a 0d 17 02 1d 20 20  24 6f 6c 69 6e 65 25 20  |0:....  $oline% |
00003c90  3d 20 22 25 25 45 6e 64  50 72 6f 6c 6f 67 22 0d  |= "%%EndProlog".|
00003ca0  17 0c 09 20 c9 20 31 3a  0d 17 16 3b 20 20 c8 99  |... . 1:...;  ..|
00003cb0  20 22 58 4f 53 5f 52 65  61 64 56 61 72 56 61 6c  | "XOS_ReadVarVal|
00003cc0  22 2c 22 50 44 72 69 76  65 72 24 50 53 65 78 74  |","PDriver$PSext|
00003cd0  72 61 22 2c 2c 2d 31 2c  30 20 b8 20 2c 2c 74 65  |ra",,-1,0 . ,,te|
00003ce0  6d 70 25 0d 17 20 36 20  20 e7 20 74 65 6d 70 25  |mp%.. 6  . temp%|
00003cf0  3e 3d 30 20 8c 20 60 73  32 25 2b 3d 32 3a 20 8b  |>=0 . `s2%+=2: .|
00003d00  20 24 6f 6c 69 6e 65 25  20 3d 20 22 25 25 42 65  | $oline% = "%%Be|
00003d10  67 69 6e 53 65 74 75 70  22 0d 17 2a 09 20 c9 20  |ginSetup"..*. . |
00003d20  32 3a 0d 17 34 2b 20 20  24 62 75 66 25 3d 22 3c  |2:..4+  $buf%="<|
00003d30  50 44 72 69 76 65 72 24  50 53 65 78 74 72 61 3e  |PDriver$PSextra>|
00003d40  22 3a 20 f2 65 78 70 61  6e 64 62 75 66 0d 17 3e  |": .expandbuf..>|
00003d50  09 20 c9 20 33 3a 0d 17  48 1c 20 20 24 6f 6c 69  |. . 3:..H.  $oli|
00003d60  6e 65 25 20 3d 20 22 25  25 45 6e 64 53 65 74 75  |ne% = "%%EndSetu|
00003d70  70 22 0d 17 52 07 20 7f  3a 0d 17 5c 0d 20 20 64  |p"..R. .:..\.  d|
00003d80  6f 6e 65 25 3d b9 0d 17  66 05 cb 0d 17 70 28 e7  |one%=...f....p(.|
00003d90  20 64 6f 6e 65 25 20 8c  20 60 73 74 25 2b 3d 31  | done% . `st%+=1|
00003da0  3a 20 60 73 32 25 3d 30  3a 20 8b 20 60 73 32 25  |: `s2%=0: . `s2%|
00003db0  2b 3d 31 0d 17 7a 05 e1  0d 17 84 05 3a 0d 17 8e  |+=1..z......:...|
00003dc0  13 dd 20 f2 73 74 61 72  74 72 65 61 64 69 6e 67  |.. .startreading|
00003dd0  0d 17 98 1d 60 65 6f 66  25 3d a3 3a 20 60 6e 6c  |....`eof%=.: `nl|
00003de0  25 3d b9 3a 20 60 6c 69  6e 65 25 3d 30 0d 17 a2  |%=.: `line%=0...|
00003df0  2b e7 20 c5 23 69 6e 5f  66 69 6c 65 25 20 8c 20  |+. .#in_file% . |
00003e00  60 63 25 3d 2d 31 3a 20  8b 20 60 63 25 3d 9a 23  |`c%=-1: . `c%=.#|
00003e10  69 6e 5f 66 69 6c 65 25  0d 17 ac 0a f2 49 4c 69  |in_file%.....ILi|
00003e20  6e 65 0d 17 b6 20 e7 20  60 65 6f 66 25 20 8c 20  |ne... . `eof% . |
00003e30  60 73 74 25 2b 3d 34 3a  20 8b 20 60 73 74 25 2b  |`st%+=4: . `st%+|
00003e40  3d 31 0d 17 c0 0a 60 73  32 25 3d 30 0d 17 ca 05  |=1....`s2%=0....|
00003e50  e1 0d 17 d4 05 3a 0d 17  de 10 dd 20 f2 73 74 61  |.....:..... .sta|
00003e60  72 74 70 61 67 65 0d 17  e8 0b ea 20 64 6f 6e 65  |rtpage..... done|
00003e70  25 0d 17 f2 0d 6e 6f 6d  6f 72 65 25 3d a3 0d 17  |%....nomore%=...|
00003e80  fc 0b 64 6f 6e 65 25 3d  a3 0d 18 06 0d c8 8e 20  |..done%=....... |
00003e90  60 73 32 25 20 ca 0d 18  10 09 20 c9 20 30 3a 0d  |`s2% ..... . 0:.|
00003ea0  18 1a 18 20 20 24 6f 6c  69 6e 65 25 3d 22 25 25  |...  $oline%="%%|
00003eb0  50 61 67 65 3a 20 22 0d  18 24 40 20 20 e7 20 63  |Page: "..$@  . c|
00003ec0  6f 6c 73 5f 70 72 69 6e  74 25 3e 31 20 8c 20 24  |ols_print%>1 . $|
00003ed0  6f 6c 69 6e 65 25 20 2b  3d 20 c3 28 63 6f 6c 73  |oline% += .(cols|
00003ee0  5f 70 72 69 6e 74 25 2a  60 70 61 67 65 25 2b 31  |_print%*`page%+1|
00003ef0  29 20 2b 20 22 2d 22 0d  18 2e 11 20 20 60 70 61  |) + "-"....  `pa|
00003f00  67 65 25 20 2b 3d 20 31  0d 18 38 32 20 20 24 6f  |ge% += 1..82  $o|
00003f10  6c 69 6e 65 25 20 2b 3d  20 c3 28 63 6f 6c 73 5f  |line% += .(cols_|
00003f20  70 72 69 6e 74 25 2a 60  70 61 67 65 25 29 2b 22  |print%*`page%)+"|
00003f30  20 22 2b c3 60 70 61 67  65 25 0d 18 42 09 20 c9  | "+.`page%..B. .|
00003f40  20 31 3a 0d 18 4c 2c 20  20 24 6f 6c 69 6e 65 25  | 1:..L,  $oline%|
00003f50  20 3d 20 22 25 25 50 61  67 65 42 6f 75 6e 64 69  | = "%%PageBoundi|
00003f60  6e 67 42 6f 78 3a 20 22  2b 60 62 62 6f 78 24 0d  |ngBox: "+`bbox$.|
00003f70  18 56 09 20 c9 20 32 3a  0d 18 60 47 20 20 24 6f  |.V. . 2:..`G  $o|
00003f80  6c 69 6e 65 25 20 3d 20  60 74 72 61 6e 73 66 6f  |line% = `transfo|
00003f90  72 6d 24 2b 22 20 22 2b  c3 60 66 73 69 7a 65 25  |rm$+" "+.`fsize%|
00003fa0  2b 22 20 22 2b c3 60 77  25 2b 22 20 22 2b c3 60  |+" "+.`w%+" "+.`|
00003fb0  68 25 2b 22 20 53 74 61  72 74 50 61 67 65 22 0d  |h%+" StartPage".|
00003fc0  18 6a 09 20 c9 20 33 3a  0d 18 74 16 20 20 e7 20  |.j. . 3:..t.  . |
00003fd0  74 69 74 6c 65 5f 70 72  69 6e 74 25 20 8c 0d 18  |title_print% ...|
00003fe0  7e 42 20 20 20 24 74 6c  69 6e 65 25 3d 22 50 61  |~B   $tline%="Pa|
00003ff0  67 65 20 22 2b c3 60 70  61 67 65 25 2b 22 20 20  |ge "+.`page%+"  |
00004000  20 46 69 6c 65 20 22 2b  60 6e 61 6d 65 24 2b 22  | File "+`name$+"|
00004010  20 20 20 44 61 74 65 20  22 2b 60 74 69 6d 65 24  |   Date "+`time$|
00004020  0d 18 88 0f 20 20 20 60  73 6f 75 74 25 3d 30 0d  |....   `sout%=0.|
00004030  18 92 07 20 20 cc 0d 18  9c 23 20 20 20 60 73 32  |...  ....#   `s2|
00004040  25 2b 3d 31 3a 20 f4 20  53 6b 69 70 20 74 69 74  |%+=1: . Skip tit|
00004050  6c 65 20 6f 75 74 70 75  74 0d 18 a6 07 20 20 cd  |le output....  .|
00004060  0d 18 b0 40 20 20 60 66  6f 6e 74 25 3d 2d 31 3a  |...@  `font%=-1:|
00004070  20 f4 20 43 75 72 72 65  6e 74 20 50 6f 73 74 53  | . Current PostS|
00004080  63 72 69 70 74 20 66 6f  6e 74 20 69 73 20 75 6e  |cript font is un|
00004090  6b 6e 6f 77 6e 20 6f 72  20 75 6e 75 73 75 61 6c  |known or unusual|
000040a0  0d 18 ba 14 20 20 60 63  6f 6c 25 3d 30 3a 20 60  |....  `col%=0: `|
000040b0  79 25 3d 31 0d 18 c4 09  20 c9 20 34 3a 0d 18 ce  |y%=1.... . 4:...|
000040c0  1f 20 20 e7 20 a4 73 74  72 69 6e 67 6f 75 74 70  |.  . .stringoutp|
000040d0  75 74 28 74 6c 69 6e 65  25 29 20 8c 0d 18 d8 2f  |ut(tline%) ..../|
000040e0  20 20 20 e7 20 a9 28 24  6f 6c 69 6e 65 25 29 2b  |   . .($oline%)+|
000040f0  37 3e 4d 61 78 4c 69 6e  65 25 20 8c 20 24 6f 6c  |7>MaxLine% . $ol|
00004100  69 6e 65 25 20 2b 3d 20  bd 31 30 0d 18 e2 1b 20  |ine% += .10.... |
00004110  20 20 24 6f 6c 69 6e 65  25 20 2b 3d 20 22 2d 2e  |  $oline% += "-.|
00004120  35 20 30 20 54 22 0d 18  ec 07 20 20 cc 0d 18 f6  |5 0 T"....  ....|
00004130  0e 20 20 20 60 73 32 25  2d 3d 31 0d 19 00 07 20  |.   `s2%-=1.... |
00004140  20 cd 0d 19 0a 07 20 7f  3a 0d 19 14 0d 20 20 64  | ..... .:....  d|
00004150  6f 6e 65 25 3d b9 0d 19  1e 05 cb 0d 19 28 27 e7  |one%=........('.|
00004160  20 64 6f 6e 65 25 20 8c  20 60 73 74 25 2b 3d 31  | done% . `st%+=1|
00004170  3a 60 73 32 25 3d 30 3a  20 8b 20 60 73 32 25 2b  |:`s2%=0: . `s2%+|
00004180  3d 31 0d 19 32 05 e1 0d  19 3c 05 3a 0d 19 46 0f  |=1..2....<.:..F.|
00004190  dd 20 f2 74 65 78 74 6c  69 6e 65 0d 19 50 0b ea  |. .textline..P..|
000041a0  20 74 65 6d 70 24 0d 19  5a 0d c8 8e 20 60 73 32  | temp$..Z... `s2|
000041b0  25 20 ca 0d 19 64 09 20  c9 20 30 3a 0d 19 6e 14  |% ...d. . 0:..n.|
000041c0  20 20 60 69 25 3d a9 28  24 62 75 66 25 29 2d 31  |  `i%=.($buf%)-1|
000041d0  0d 19 78 28 20 20 c8 95  20 62 75 66 25 3f 60 69  |..x(  .. buf%?`i|
000041e0  25 3d 33 32 20 80 20 60  69 25 3e 3d 30 3a 20 60  |%=32 . `i%>=0: `|
000041f0  69 25 2d 3d 31 3a 20 ce  0d 19 82 15 20 20 62 75  |i%-=1: .....  bu|
00004200  66 25 3f 28 60 69 25 2b  31 29 3d 31 33 0d 19 8c  |f%?(`i%+1)=13...|
00004210  0e 20 20 60 69 25 3d 62  75 66 25 0d 19 96 27 20  |.  `i%=buf%...' |
00004220  20 e7 20 24 60 69 25 20  3c 3e 20 22 22 20 8c 20  | . $`i% <> "" . |
00004230  60 73 32 25 2b 3d 31 3a  20 8b 20 60 73 32 25 2b  |`s2%+=1: . `s2%+|
00004240  3d 34 0d 19 a0 09 20 c9  20 31 3a 0d 19 aa 1b 20  |=4.... . 1:.... |
00004250  20 c8 95 20 3f 60 69 25  3d 33 32 3a 20 60 69 25  | .. ?`i%=32: `i%|
00004260  2b 3d 31 3a 20 ce 0d 19  b4 1f 20 20 60 6a 25 3d  |+=1: .....  `j%=|
00004270  a7 24 60 69 25 2c 22 20  20 20 20 20 20 20 20 20  |.$`i%,"         |
00004280  20 20 20 22 29 0d 19 be  1e 20 20 e7 20 60 6a 25  |   ")....  . `j%|
00004290  3e 30 20 8c 20 60 69 25  3f 28 60 6a 25 2d 31 29  |>0 . `i%?(`j%-1)|
000042a0  3d 31 33 0d 19 c8 0e 20  20 60 73 6f 75 74 25 3d  |=13....  `sout%=|
000042b0  30 0d 19 d2 0d 20 20 60  73 32 25 2b 3d 31 0d 19  |0....  `s2%+=1..|
000042c0  dc 09 20 c9 20 32 3a 0d  19 e6 1c 20 20 e7 20 a4  |.. . 2:....  . .|
000042d0  73 74 72 69 6e 67 6f 75  74 70 75 74 28 60 69 25  |stringoutput(`i%|
000042e0  29 20 8c 0d 19 f0 30 20  20 20 74 65 6d 70 24 3d  |) ....0   temp$=|
000042f0  c3 60 79 25 2b 22 20 22  2b c3 28 60 69 25 2d 62  |.`y%+" "+.(`i%-b|
00004300  75 66 25 2b 60 63 6f 6c  25 2a 28 60 63 77 25 2b  |uf%+`col%*(`cw%+|
00004310  32 29 29 0d 19 fa 38 20  20 20 e7 20 60 66 6f 6e  |2))...8   . `fon|
00004320  74 25 3d 30 20 8c 20 74  65 6d 70 24 2b 3d 22 20  |t%=0 . temp$+=" |
00004330  53 22 3a 20 8b 20 74 65  6d 70 24 2b 3d 22 20 4e  |S": . temp$+=" N|
00004340  22 3a 20 60 66 6f 6e 74  25 3d 30 0d 1a 04 36 20  |": `font%=0...6 |
00004350  20 20 e7 20 a9 28 24 6f  6c 69 6e 65 25 29 2b a9  |  . .($oline%)+.|
00004360  28 74 65 6d 70 24 29 3e  4d 61 78 4c 69 6e 65 25  |(temp$)>MaxLine%|
00004370  20 8c 20 24 6f 6c 69 6e  65 25 20 2b 3d 20 bd 31  | . $oline% += .1|
00004380  30 0d 1a 0e 17 20 20 20  24 6f 6c 69 6e 65 25 20  |0....   $oline% |
00004390  2b 3d 20 74 65 6d 70 24  0d 1a 18 0e 20 20 20 60  |+= temp$....   `|
000043a0  73 32 25 2b 3d 31 0d 1a  22 07 20 20 cd 0d 1a 2c  |s2%+=1..".  ...,|
000043b0  09 20 c9 20 33 3a 0d 1a  36 2f 20 20 e7 20 60 6a  |. . 3:..6/  . `j|
000043c0  25 3e 30 20 8c 20 60 69  25 2b 3d 60 6a 25 2b 31  |%>0 . `i%+=`j%+1|
000043d0  31 3a 20 60 73 32 25 2d  3d 32 3a 20 8b 20 60 73  |1: `s2%-=2: . `s|
000043e0  32 25 2b 3d 31 0d 1a 40  09 20 c9 20 34 3a 0d 1a  |2%+=1..@. . 4:..|
000043f0  4a 15 20 20 60 69 25 3d  a9 28 24 62 75 66 32 25  |J.  `i%=.($buf2%|
00004400  29 2d 31 0d 1a 54 29 20  20 c8 95 20 62 75 66 32  |)-1..T)  .. buf2|
00004410  25 3f 60 69 25 3d 33 32  20 80 20 60 69 25 3e 3d  |%?`i%=32 . `i%>=|
00004420  30 3a 20 60 69 25 2d 3d  31 3a 20 ce 0d 1a 5e 16  |0: `i%-=1: ...^.|
00004430  20 20 62 75 66 32 25 3f  28 60 69 25 2b 31 29 3d  |  buf2%?(`i%+1)=|
00004440  31 33 0d 1a 68 0f 20 20  60 69 25 3d 62 75 66 32  |13..h.  `i%=buf2|
00004450  25 0d 1a 72 27 20 20 e7  20 24 60 69 25 20 3c 3e  |%..r'  . $`i% <>|
00004460  20 22 22 20 8c 20 60 73  32 25 2b 3d 31 3a 20 8b  | "" . `s2%+=1: .|
00004470  20 60 73 32 25 2b 3d 34  0d 1a 7c 09 20 c9 20 35  | `s2%+=4..|. . 5|
00004480  3a 0d 1a 86 1b 20 20 c8  95 20 3f 60 69 25 3d 33  |:....  .. ?`i%=3|
00004490  32 3a 20 60 69 25 2b 3d  31 3a 20 ce 0d 1a 90 1f  |2: `i%+=1: .....|
000044a0  20 20 60 6a 25 3d a7 24  60 69 25 2c 22 20 20 20  |  `j%=.$`i%,"   |
000044b0  20 20 20 20 20 20 20 20  20 22 29 0d 1a 9a 1e 20  |         ").... |
000044c0  20 e7 20 60 6a 25 3e 30  20 8c 20 60 69 25 3f 28  | . `j%>0 . `i%?(|
000044d0  60 6a 25 2d 31 29 3d 31  33 0d 1a a4 0e 20 20 60  |`j%-1)=13....  `|
000044e0  73 6f 75 74 25 3d 30 0d  1a ae 0d 20 20 60 73 32  |sout%=0....  `s2|
000044f0  25 2b 3d 31 0d 1a b8 09  20 c9 20 36 3a 0d 1a c2  |%+=1.... . 6:...|
00004500  1c 20 20 e7 20 a4 73 74  72 69 6e 67 6f 75 74 70  |.  . .stringoutp|
00004510  75 74 28 60 69 25 29 20  8c 0d 1a cc 31 20 20 20  |ut(`i%) ....1   |
00004520  74 65 6d 70 24 3d c3 60  79 25 2b 22 20 22 2b c3  |temp$=.`y%+" "+.|
00004530  28 60 69 25 2d 62 75 66  32 25 2b 60 63 6f 6c 25  |(`i%-buf2%+`col%|
00004540  2a 28 60 63 77 25 2b 32  29 29 0d 1a d6 38 20 20  |*(`cw%+2))...8  |
00004550  20 e7 20 60 66 6f 6e 74  25 3d 31 20 8c 20 74 65  | . `font%=1 . te|
00004560  6d 70 24 2b 3d 22 20 53  22 3a 20 8b 20 74 65 6d  |mp$+=" S": . tem|
00004570  70 24 2b 3d 22 20 42 22  3a 20 60 66 6f 6e 74 25  |p$+=" B": `font%|
00004580  3d 31 0d 1a e0 36 20 20  20 e7 20 a9 28 24 6f 6c  |=1...6   . .($ol|
00004590  69 6e 65 25 29 2b a9 28  74 65 6d 70 24 29 3e 4d  |ine%)+.(temp$)>M|
000045a0  61 78 4c 69 6e 65 25 20  8c 20 24 6f 6c 69 6e 65  |axLine% . $oline|
000045b0  25 20 2b 3d 20 bd 31 30  0d 1a ea 17 20 20 20 24  |% += .10....   $|
000045c0  6f 6c 69 6e 65 25 20 2b  3d 20 74 65 6d 70 24 0d  |oline% += temp$.|
000045d0  1a f4 0e 20 20 20 60 73  32 25 2b 3d 31 0d 1a fe  |...   `s2%+=1...|
000045e0  07 20 20 cd 0d 1b 08 09  20 c9 20 37 3a 0d 1b 12  |.  ..... . 7:...|
000045f0  2f 20 20 e7 20 60 6a 25  3e 30 20 8c 20 60 69 25  |/  . `j%>0 . `i%|
00004600  2b 3d 60 6a 25 2b 31 31  3a 20 60 73 32 25 2d 3d  |+=`j%+11: `s2%-=|
00004610  32 3a 20 8b 20 60 73 32  25 2b 3d 31 0d 1b 1c 09  |2: . `s2%+=1....|
00004620  20 c9 20 38 3a 0d 1b 26  0f 20 20 60 73 32 25 3d  | . 8:..&.  `s2%=|
00004630  60 73 74 25 0d 1b 30 0c  20 20 60 79 25 2b 3d 31  |`st%..0.  `y%+=1|
00004640  0d 1b 3a 49 20 20 e7 20  60 6e 63 25 20 84 20 60  |..:I  . `nc% . `|
00004650  79 25 3e 60 70 68 25 20  8c 20 60 79 25 3d 31 3a  |y%>`ph% . `y%=1:|
00004660  20 60 63 6f 6c 25 2b 3d  31 3a 20 e7 20 60 63 6f  | `col%+=1: . `co|
00004670  6c 25 3e 3d 63 6f 6c 73  5f 70 72 69 6e 74 25 20  |l%>=cols_print% |
00004680  8c 20 60 73 32 25 2b 3d  31 0d 1b 44 0c 20 20 f2  |. `s2%+=1..D.  .|
00004690  49 4c 69 6e 65 0d 1b 4e  24 20 20 e7 20 60 65 6f  |ILine..N$  . `eo|
000046a0  66 25 20 8c 20 60 73 74  25 2b 3d 31 3a 20 8b 20  |f% . `st%+=1: . |
000046b0  60 73 74 25 3d 60 73 32  25 0d 1b 58 0c 20 20 60  |`st%=`s2%..X.  `|
000046c0  73 32 25 3d 30 0d 1b 62  06 20 cb 0d 1b 6c 05 e1  |s2%=0..b. ...l..|
000046d0  0d 1b 76 05 3a 0d 1b 80  0e dd 20 f2 65 6e 64 70  |..v.:..... .endp|
000046e0  61 67 65 0d 1b 8a 0b ea  20 64 6f 6e 65 25 0d 1b  |age..... done%..|
000046f0  94 0b 64 6f 6e 65 25 3d  a3 0d 1b 9e 0d c8 8e 20  |..done%=....... |
00004700  60 73 32 25 20 ca 0d 1b  a8 09 20 c9 20 30 3a 0d  |`s2% ..... . 0:.|
00004710  1b b2 19 20 20 24 6f 6c  69 6e 65 25 20 3d 20 22  |...  $oline% = "|
00004720  45 6e 64 50 61 67 65 22  0d 1b bc 07 20 7f 3a 0d  |EndPage".... .:.|
00004730  1b c6 0d 20 20 64 6f 6e  65 25 3d b9 0d 1b d0 05  |...  done%=.....|
00004740  cb 0d 1b da 43 e7 20 60  65 6f 66 25 20 8c 20 60  |....C. `eof% . `|
00004750  73 74 25 2b 3d 31 3a 60  73 32 25 3d 30 3a 20 8b  |st%+=1:`s2%=0: .|
00004760  20 e7 20 64 6f 6e 65 25  20 8c 20 60 73 74 25 2d  | . done% . `st%-|
00004770  3d 32 3a 60 73 32 25 3d  30 3a 20 8b 20 60 73 32  |=2:`s2%=0: . `s2|
00004780  25 2b 3d 31 0d 1b e4 05  e1 0d 1b ee 05 3a 0d 1b  |%+=1.........:..|
00004790  f8 12 dd 20 f2 74 72 61  69 6c 65 72 6c 69 6e 65  |... .trailerline|
000047a0  0d 1c 02 0b ea 20 64 6f  6e 65 25 0d 1c 0c 0b 64  |..... done%....d|
000047b0  6f 6e 65 25 3d a3 0d 1c  16 0d c8 8e 20 60 73 32  |one%=....... `s2|
000047c0  25 20 ca 0d 1c 20 09 20  c9 20 30 3a 0d 1c 2a 1b  |% ... . . 0:..*.|
000047d0  20 20 24 6f 6c 69 6e 65  25 20 3d 20 22 25 25 54  |  $oline% = "%%T|
000047e0  72 61 69 6c 65 72 22 0d  1c 34 09 20 c9 20 31 3a  |railer"..4. . 1:|
000047f0  0d 1c 3e 15 20 20 24 6f  6c 69 6e 65 25 20 3d 20  |..>.  $oline% = |
00004800  22 65 6e 64 22 0d 1c 48  09 20 c9 20 32 3a 0d 1c  |"end"..H. . 2:..|
00004810  52 23 20 20 24 6f 6c 69  6e 65 25 20 3d 20 22 25  |R#  $oline% = "%|
00004820  25 50 61 67 65 73 3a 20  22 2b c3 60 70 61 67 65  |%Pages: "+.`page|
00004830  25 0d 1c 5c 07 20 7f 3a  0d 1c 66 0d 20 20 64 6f  |%..\. .:..f.  do|
00004840  6e 65 25 3d b9 0d 1c 70  05 cb 0d 1c 7a 28 e7 20  |ne%=...p....z(. |
00004850  64 6f 6e 65 25 20 8c 20  60 73 74 25 2b 3d 31 3a  |done% . `st%+=1:|
00004860  20 60 73 32 25 3d 30 3a  20 8b 20 60 73 32 25 2b  | `s2%=0: . `s2%+|
00004870  3d 31 0d 1c 84 05 e1 0d  1c 8e 05 3a 0d 1c 98 10  |=1.........:....|
00004880  dd 20 f2 65 78 70 61 6e  64 62 75 66 0d 1c a2 0d  |. .expandbuf....|
00004890  ea 20 6c 65 6e 25 2c 46  25 0d 1c ac 3a c8 99 20  |. len%,F%...:.. |
000048a0  22 58 4f 53 5f 47 53 54  72 61 6e 73 22 2c 62 75  |"XOS_GSTrans",bu|
000048b0  66 25 2c 6f 6c 69 6e 65  25 2c 6f 6c 69 6e 65 5f  |f%,oline%,oline_|
000048c0  73 69 7a 65 25 2d 32 20  b8 20 2c 2c 6c 65 6e 25  |size%-2 . ,,len%|
000048d0  3b 46 25 0d 1c b6 10 e7  20 46 25 20 80 20 25 31  |;F%..... F% . %1|
000048e0  31 20 8c 0d 1c c0 11 20  24 6f 6c 69 6e 65 25 20  |1 ..... $oline% |
000048f0  3d 20 22 22 0d 1c ca 05  cc 0d 1c d4 15 20 6f 6c  |= ""......... ol|
00004900  69 6e 65 25 3f 6c 65 6e  25 20 3d 20 31 33 0d 1c  |ine%?len% = 13..|
00004910  de 05 cd 0d 1c e8 05 e1  0d 1c f2 05 3a 0d 1c fc  |............:...|
00004920  10 dd 20 f2 72 65 64 75  63 65 62 75 66 0d 1d 06  |.. .reducebuf...|
00004930  0e ea 20 49 25 2c 4a 25  2c 4b 25 0d 1d 10 15 49  |.. I%,J%,K%....I|
00004940  25 3d 30 3a 20 4a 25 3d  a9 28 24 62 75 66 25 29  |%=0: J%=.($buf%)|
00004950  0d 1d 1a 2e e7 20 62 75  66 25 3f 30 3c 3e 33 37  |..... buf%?0<>37|
00004960  20 84 20 28 62 75 66 25  3f 31 3c 3e 33 37 20 80  | . (buf%?1<>37 .|
00004970  20 62 75 66 25 3f 31 3c  3e 33 33 29 20 8c 0d 1d  | buf%?1<>33) ...|
00004980  24 14 20 4b 25 3d a7 24  62 75 66 25 2c 20 22 25  |$. K%=.$buf%, "%|
00004990  22 29 0d 1d 2e 16 20 e7  20 4b 25 3c 3e 30 20 8c  |").... . K%<>0 .|
000049a0  20 4a 25 3d 4b 25 2d 31  0d 1d 38 24 20 c8 95 20  | J%=K%-1..8$ .. |
000049b0  62 75 66 25 3f 49 25 3d  33 32 20 80 20 49 25 3c  |buf%?I%=32 . I%<|
000049c0  4a 25 3a 20 49 25 2b 3d  31 3a 20 ce 0d 1d 42 28  |J%: I%+=1: ...B(|
000049d0  20 c8 95 20 62 75 66 25  3f 28 4a 25 2d 31 29 3d  | .. buf%?(J%-1)=|
000049e0  33 32 20 80 20 4a 25 3e  49 25 3a 20 4a 25 2d 3d  |32 . J%>I%: J%-=|
000049f0  31 3a 20 ce 0d 1d 4c 05  cd 0d 1d 56 20 24 6f 6c  |1: ...L....V $ol|
00004a00  69 6e 65 25 20 3d 20 c1  24 62 75 66 25 2c 49 25  |ine% = .$buf%,I%|
00004a10  2b 31 2c 4a 25 2d 49 25  29 0d 1d 60 05 e1 0d 1d  |+1,J%-I%)..`....|
00004a20  6a 05 3a 0d 1d 74 0c dd  20 f2 49 4c 69 6e 65 0d  |j.:..t.. .ILine.|
00004a30  1d 7e 08 ea 20 49 25 0d  1d 88 08 49 25 3d 30 0d  |.~.. I%....I%=0.|
00004a40  1d 92 0c e7 20 60 6e 6c  25 20 8c 0d 1d 9c 0f 20  |.... `nl% ..... |
00004a50  e7 20 60 63 25 3d 2d 31  20 8c 0d 1d a6 0d 20 20  |. `c%=-1 .....  |
00004a60  60 65 6f 66 25 3d b9 0d  1d b0 06 20 cc 0d 1d ba  |`eof%=..... ....|
00004a70  0f 20 20 60 6c 69 6e 65  25 2b 3d 31 0d 1d c4 15  |.  `line%+=1....|
00004a80  20 20 e7 20 6c 6e 75 6d  5f 70 72 69 6e 74 25 20  |  . lnum_print% |
00004a90  8c 0d 1d ce 47 20 20 20  24 28 62 75 66 25 2b 49  |....G   $(buf%+I|
00004aa0  25 29 3d 22 20 20 20 20  20 20 22 3a 20 24 28 62  |%)="      ": $(b|
00004ab0  75 66 32 25 2b 49 25 29  3d c2 22 20 20 20 20 22  |uf2%+I%)=."    "|
00004ac0  2b c3 28 60 6c 69 6e 65  25 29 2c 35 29 2b 22 20  |+.(`line%),5)+" |
00004ad0  22 3a 20 49 25 2b 3d 36  0d 1d d8 07 20 20 cd 0d  |": I%+=6....  ..|
00004ae0  1d e2 06 20 cd 0d 1d ec  05 cc 0d 1d f6 45 20 e7  |... .........E .|
00004af0  20 6c 6e 75 6d 5f 70 72  69 6e 74 25 20 8c 20 24  | lnum_print% . $|
00004b00  28 62 75 66 25 2b 49 25  29 3d 22 20 20 20 20 20  |(buf%+I%)="     |
00004b10  20 22 3a 20 24 28 62 75  66 32 25 2b 49 25 29 3d  | ": $(buf2%+I%)=|
00004b20  22 20 20 20 20 20 20 22  3a 20 49 25 2b 3d 36 0d  |"      ": I%+=6.|
00004b30  1e 00 37 20 24 28 62 75  66 25 2b 49 25 29 3d 60  |..7 $(buf%+I%)=`|
00004b40  6f 6c 64 24 3a 20 24 28  62 75 66 32 25 2b 49 25  |old$: $(buf2%+I%|
00004b50  29 3d 60 6f 6c 64 32 24  3a 20 49 25 2b 3d a9 28  |)=`old2$: I%+=.(|
00004b60  60 6f 6c 64 24 29 0d 1e  0a 05 cd 0d 1e 14 0f e7  |`old$)..........|
00004b70  20 ac 20 60 65 6f 66 25  20 8c 0d 1e 1e 0b 20 60  | . `eof% ..... `|
00004b80  6e 63 25 3d a3 0d 1e 28  41 20 60 6e 6c 25 3d 28  |nc%=...(A `nl%=(|
00004b90  60 63 25 3d 2d 31 20 84  20 60 63 25 3d 31 30 20  |`c%=-1 . `c%=10 |
00004ba0  84 20 60 63 25 3d 31 32  20 84 20 28 60 63 25 3d  |. `c%=12 . (`c%=|
00004bb0  31 33 20 80 20 6c 74 65  72 6d 5f 70 72 69 6e 74  |13 . lterm_print|
00004bc0  25 3c 3e 30 29 29 0d 1e  32 19 20 c8 95 20 49 25  |%<>0))..2. .. I%|
00004bd0  3c 3d 60 63 77 25 20 80  20 ac 20 60 6e 6c 25 0d  |<=`cw% . . `nl%.|
00004be0  1e 3c 1b 20 20 e7 20 60  63 25 3e 33 31 20 80 20  |.<.  . `c%>31 . |
00004bf0  60 63 25 3c 3e 31 32 37  20 8c 0d 1e 46 26 20 20  |`c%<>127 ...F&  |
00004c00  20 62 75 66 25 3f 49 25  3d 60 63 25 3a 20 62 75  | buf%?I%=`c%: bu|
00004c10  66 32 25 3f 49 25 3d 33  32 3a 20 49 25 2b 3d 31  |f2%?I%=32: I%+=1|
00004c20  0d 1e 50 07 20 20 cc 0d  1e 5a 15 20 20 20 e7 20  |..P.  ...Z.   . |
00004c30  63 63 73 5f 70 72 69 6e  74 25 20 8c 0d 1e 64 43  |ccs_print% ...dC|
00004c40  20 20 20 20 24 28 62 75  66 25 2b 49 25 29 3d 22  |    $(buf%+I%)="|
00004c50  20 20 20 20 22 3a 20 24  28 62 75 66 32 25 2b 49  |    ": $(buf2%+I|
00004c60  25 29 3d 22 5b 22 2b c2  22 30 22 2b c3 7e 60 63  |%)="["+."0"+.~`c|
00004c70  25 2c 32 29 2b 22 5d 22  3a 20 49 25 2b 3d 34 0d  |%,2)+"]": I%+=4.|
00004c80  1e 6e 08 20 20 20 cd 0d  1e 78 07 20 20 cd 0d 1e  |.n.   ...x.  ...|
00004c90  82 2d 20 20 e7 20 c5 23  69 6e 5f 66 69 6c 65 25  |.-  . .#in_file%|
00004ca0  20 8c 20 60 63 25 3d 2d  31 3a 20 8b 20 60 63 25  | . `c%=-1: . `c%|
00004cb0  3d 9a 23 69 6e 5f 66 69  6c 65 25 0d 1e 8c 42 20  |=.#in_file%...B |
00004cc0  20 60 6e 6c 25 3d 28 60  63 25 3d 2d 31 20 84 20  | `nl%=(`c%=-1 . |
00004cd0  60 63 25 3d 31 30 20 84  20 60 63 25 3d 31 32 20  |`c%=10 . `c%=12 |
00004ce0  84 20 28 60 63 25 3d 31  33 20 80 20 6c 74 65 72  |. (`c%=13 . lter|
00004cf0  6d 5f 70 72 69 6e 74 25  3c 3e 30 29 29 0d 1e 96  |m_print%<>0))...|
00004d00  06 20 ce 0d 1e a0 1c 20  62 75 66 25 3f 49 25 3d  |. ..... buf%?I%=|
00004d10  31 33 3a 20 62 75 66 32  25 3f 49 25 3d 31 33 0d  |13: buf2%?I%=13.|
00004d20  1e aa 11 20 e7 20 49 25  3c 3d 60 63 77 25 20 8c  |... . I%<=`cw% .|
00004d30  0d 1e b4 0c 20 20 49 25  3d 60 63 25 0d 1e be 2d  |....  I%=`c%...-|
00004d40  20 20 e7 20 c5 23 69 6e  5f 66 69 6c 65 25 20 8c  |  . .#in_file% .|
00004d50  20 60 63 25 3d 2d 31 3a  20 8b 20 60 63 25 3d 9a  | `c%=-1: . `c%=.|
00004d60  23 69 6e 5f 66 69 6c 65  25 0d 1e c8 16 20 20 e7  |#in_file%....  .|
00004d70  20 49 25 3d 31 32 20 8c  20 60 6e 63 25 3d b9 0d  | I%=12 . `nc%=..|
00004d80  1e d2 17 20 20 e7 20 49  25 3d 31 30 20 84 20 49  |...  . I%=10 . I|
00004d90  25 3d 31 33 20 8c 0d 1e  dc 23 20 20 20 e7 20 6c  |%=13 ....#   . l|
00004da0  74 65 72 6d 5f 70 72 69  6e 74 25 20 80 20 49 25  |term_print% . I%|
00004db0  2b 60 63 25 3d 32 33 20  8c 0d 1e e6 2f 20 20 20  |+`c%=23 ..../   |
00004dc0  20 e7 20 c5 23 69 6e 5f  66 69 6c 65 25 20 8c 20  | . .#in_file% . |
00004dd0  60 63 25 3d 2d 31 3a 20  8b 20 60 63 25 3d 9a 23  |`c%=-1: . `c%=.#|
00004de0  69 6e 5f 66 69 6c 65 25  0d 1e f0 08 20 20 20 cd  |in_file%....   .|
00004df0  0d 1e fa 11 20 20 20 e7  20 60 63 25 3d 31 32 20  |....   . `c%=12 |
00004e00  8c 0d 1f 04 0e 20 20 20  20 60 6e 63 25 3d b9 0d  |.....    `nc%=..|
00004e10  1f 0e 2f 20 20 20 20 e7  20 c5 23 69 6e 5f 66 69  |../    . .#in_fi|
00004e20  6c 65 25 20 8c 20 60 63  25 3d 2d 31 3a 20 8b 20  |le% . `c%=-1: . |
00004e30  60 63 25 3d 9a 23 69 6e  5f 66 69 6c 65 25 0d 1f  |`c%=.#in_file%..|
00004e40  18 08 20 20 20 cd 0d 1f  22 07 20 20 cd 0d 1f 2c  |..   ...".  ...,|
00004e50  06 20 cc 0d 1f 36 32 20  20 60 6f 6c 64 24 3d c1  |. ...62  `old$=.|
00004e60  24 62 75 66 25 2c 60 63  77 25 2b 31 29 3a 20 60  |$buf%,`cw%+1): `|
00004e70  6f 6c 64 32 24 3d c1 24  62 75 66 32 25 2c 60 63  |old2$=.$buf2%,`c|
00004e80  77 25 2b 31 29 0d 1f 40  15 20 20 e7 20 6c 6e 75  |w%+1)..@.  . lnu|
00004e90  6d 5f 70 72 69 6e 74 25  20 8c 0d 1f 4a 22 20 20  |m_print% ...J"  |
00004ea0  20 62 75 66 25 3f 60 63  77 25 3d 31 33 3a 20 62  | buf%?`cw%=13: b|
00004eb0  75 66 32 25 3f 60 63 77  25 3d 31 33 0d 1f 54 07  |uf2%?`cw%=13..T.|
00004ec0  20 20 cc 0d 1f 5e 2a 20  20 20 24 28 62 75 66 25  |  ...^*   $(buf%|
00004ed0  2b 60 63 77 25 29 3d 22  20 22 3a 20 24 28 62 75  |+`cw%)=" ": $(bu|
00004ee0  66 32 25 2b 60 63 77 25  29 3d 22 7c 22 0d 1f 68  |f2%+`cw%)="|"..h|
00004ef0  07 20 20 cd 0d 1f 72 0c  20 20 60 6e 6c 25 3d a3  |.  ...r.  `nl%=.|
00004f00  0d 1f 7c 06 20 cd 0d 1f  86 05 cd 0d 1f 90 05 e1  |..|. ...........|
00004f10  0d 1f 9a 05 3a 0d 1f a4  19 dd 20 a4 73 74 72 69  |....:..... .stri|
00004f20  6e 67 6f 75 74 70 75 74  28 73 74 72 25 29 0d 1f  |ngoutput(str%)..|
00004f30  ae 13 ea 20 6f 75 74 25  2c 43 25 2c 64 6f 6e 65  |... out%,C%,done|
00004f40  25 0d 1f b8 0a 6f 75 74  25 3d 30 0d 1f c2 28 e7  |%....out%=0...(.|
00004f50  20 60 73 6f 75 74 25 3d  30 20 8c 20 6f 6c 69 6e  | `sout%=0 . olin|
00004f60  65 25 3f 6f 75 74 25 3d  34 30 3a 20 6f 75 74 25  |e%?out%=40: out%|
00004f70  2b 3d 31 0d 1f cc 12 43  25 3d 73 74 72 25 3f 60  |+=1....C%=str%?`|
00004f80  73 6f 75 74 25 0d 1f d6  1e c8 95 20 43 25 3e 33  |sout%...... C%>3|
00004f90  31 20 80 20 6f 75 74 25  3c 4d 61 78 4c 69 6e 65  |1 . out%<MaxLine|
00004fa0  25 2d 34 0d 1f e0 0e 20  60 73 6f 75 74 25 2b 3d  |%-4.... `sout%+=|
00004fb0  31 0d 1f ea 0f 20 e7 20  43 25 3e 31 32 36 20 8c  |1.... . C%>126 .|
00004fc0  0d 1f f4 1d 20 20 6f 6c  69 6e 65 25 3f 6f 75 74  |....  oline%?out|
00004fd0  25 3d 39 32 3a 20 6f 75  74 25 2b 3d 31 0d 1f fe  |%=92: out%+=1...|
00004fe0  29 20 20 6f 6c 69 6e 65  25 3f 6f 75 74 25 3d 28  |)  oline%?out%=(|
00004ff0  28 43 25 3e 3e 36 29 80  37 29 2b 34 38 3a 20 6f  |(C%>>6).7)+48: o|
00005000  75 74 25 2b 3d 31 0d 20  08 29 20 20 6f 6c 69 6e  |ut%+=1. .)  olin|
00005010  65 25 3f 6f 75 74 25 3d  28 28 43 25 3e 3e 33 29  |e%?out%=((C%>>3)|
00005020  80 37 29 2b 34 38 3a 20  6f 75 74 25 2b 3d 31 0d  |.7)+48: out%+=1.|
00005030  20 12 24 20 20 6f 6c 69  6e 65 25 3f 6f 75 74 25  | .$  oline%?out%|
00005040  3d 28 43 25 80 37 29 2b  34 38 3a 20 6f 75 74 25  |=(C%.7)+48: out%|
00005050  2b 3d 31 0d 20 1c 06 20  cc 0d 20 26 37 20 20 e7  |+=1. .. .. &7  .|
00005060  20 43 25 3d 39 32 20 84  20 43 25 3d 34 30 20 84  | C%=92 . C%=40 .|
00005070  20 43 25 3d 34 31 20 8c  20 6f 6c 69 6e 65 25 3f  | C%=41 . oline%?|
00005080  6f 75 74 25 3d 39 32 3a  20 6f 75 74 25 2b 3d 31  |out%=92: out%+=1|
00005090  0d 20 30 1d 20 20 6f 6c  69 6e 65 25 3f 6f 75 74  |. 0.  oline%?out|
000050a0  25 3d 43 25 3a 20 6f 75  74 25 2b 3d 31 0d 20 3a  |%=C%: out%+=1. :|
000050b0  06 20 cd 0d 20 44 13 20  43 25 3d 73 74 72 25 3f  |. .. D. C%=str%?|
000050c0  60 73 6f 75 74 25 0d 20  4e 05 ce 0d 20 58 11 64  |`sout%. N... X.d|
000050d0  6f 6e 65 25 3d 28 43 25  3c 33 32 29 0d 20 62 2e  |one%=(C%<32). b.|
000050e0  e7 20 64 6f 6e 65 25 20  8c 20 6f 6c 69 6e 65 25  |. done% . oline%|
000050f0  3f 6f 75 74 25 3d 34 31  3a 20 8b 20 6f 6c 69 6e  |?out%=41: . olin|
00005100  65 25 3f 6f 75 74 25 3d  39 32 0d 20 6c 16 6f 6c  |e%?out%=92. l.ol|
00005110  69 6e 65 25 3f 28 6f 75  74 25 2b 31 29 3d 31 33  |ine%?(out%+1)=13|
00005120  0d 20 76 0a 3d 64 6f 6e  65 25 0d 20 80 0e 3e 2a  |. v.=done%. ..>*|
00005130  46 58 20 32 32 39 2c 31  0d ff                    |FX 229,1..|
0000513a
!PrinterPS/Library.m0
!PrinterPS/Library.m1
!PrinterPS/Library.m2
!PrinterPS/Library.m4
!PrinterPS/Library.m5