Home » Personal collection » Acorn hard disk » apps » Printers » RiscOs2/!PrinterDM/Library
RiscOs2/!PrinterDM/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 hard disk » apps » Printers |
Filename: | RiscOs2/!PrinterDM/Library |
Read OK: | ✔ |
File size: | 234C bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There are 3 duplicate copies of this file in the archive:
- Personal collection » Acorn ADFS disks » Archimedes » Dominic_2.ADF » PrinterDMs/!PrinterDM/Library
- Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Dominic_2.adf » PrinterDMs/!PrinterDM/Library
- Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Dominic_2B.adf » PrinterDMs/!PrinterDM/Library
- Personal collection » Acorn hard disk » apps » Printers » RiscOs2/!PrinterDM/Library
File contents
10REM >Library V.0.80 for dot matrix printer driver 20REM Purpose: printer-specific parts of the printer application 30REM Authors: A.Thompson, NReeves 40REM ******************************************************* 50REM initialise the dot matrix printer driver specific parts 60REM ******************************************************* 70: 80DEFPROCPrinter_initialise 90LOCAL P% 100PrinterClass$="PrinterDM" 110FullPrinterClass$="dot matrix" 120OutputType%=&FF4 130REM define printer class dependent fields in printer data area 140 dump_depth_field% = FNp_field(1) 150 interlace_field% = FNp_field(3) 160 line_prologue_field% = FNp_field(20) 170 line_epilogue_field% = FNp_field(20) 180line_interlace_field% = FNp_field(20) 190 job_epilogue_field% = FNp_field(20) 200 job_prologue_field% = FNp_field(20) 210 printer_data_size% = FNp_field(0) 220REM define class dependent icons in main window 230main_line%=2 240printer_data_list% = 0:P%=0 250PROCPrinter_read_config_file 260REM now convert to circular list 270P%!list_pointer_field%=printer_data_list% 280ENDPROC 290: 300REM ***************** 310REM set initial state 320REM ***************** 330DEFPROCPrinter_set_initial_state 340LOCAL D% 350REM set default state 360D%=printer_data_list% 370WHILE D%!list_pointer_field%<>printer_data_list% AND D%!printer_number_field%<>printer_config% 380 D%=D%!list_pointer_field% 390ENDWHILE 400IF D%!printer_number_field%=printer_config% THEN printer_data_list%=D% 410PROCPrinter_set_description 420PROCPrinter_set_module_data 430ENDPROC 440: 450REM ******** 460REM shutdown 470REM ******** 480DEFPROCPrinter_terminate 490*if "<Printer$Scrap>" = "<PDriver$Dir>.DM!Scrap" then unset Printer$Scrap 500*if "<Printer$Temp>" = "<PDriver$Dir>.DM!Temp" then unset Printer$Temp 510ENDPROC 520: 530REM ************************************** 540REM the printer-specific template loading 550REM ************************************** 560DEFPROCPrinter_load_templates 570PROCset_icon_state(main%, main_line%, line_new% << 21, 1<<21) 580ENDPROC 590: 600REM *********************************** 610REM the printer-specific event handler 620REM *********************************** 630DEFFNPrinter_process_event(action%, E%) 640LOCAL res% 650res%=FALSE 660CASE action% OF 670 WHEN 17,18: 680 CASE E%!16 OF 690 WHEN &502: 700 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 710 ENDCASE 720 WHEN 6 730 IF E%!12=main% AND NOT print_on% THEN 740 CASE TRUE OF 750 WHEN (E%!8 AND %101)<>0: 760 CASE E%!16 OF 770 WHEN main_description%: 780 IF E%!8 AND 1 THEN 790 res% = printer_data_list% 800 REPEAT printer_data_list% = printer_data_list%!list_pointer_field% 810 UNTIL printer_data_list%!list_pointer_field% = res% 820 ELSE 830 printer_data_list% = printer_data_list%!list_pointer_field% 840 ENDIF 850 PROCPrinter_set_description 860 PROCPrinter_set_module_data 870 printer_new% = printer_data_list%!printer_number_field% 880 res%=TRUE 890 WHEN main_line% 900 !q%=main% 910 q%!4=main_line% 920 SYS "Wimp_GetIconState",,q% 930 line_new% = (q%!24 >> 21) AND 1 940 ENDCASE 950 ENDCASE 960 ENDIF 970ENDCASE 980=res% 990: 1000REM ***************************************************************** 1010REM read the configuration file with all the individual printer info 1020REM ***************************************************************** 1030DEFPROCPrinter_read_config_file 1040LOCAL H%,ptr% 1050DIM defaults% printer_data_size% 1060FOR H%=0 TO printer_data_size%-4 STEP 4:defaults%!H%=0:NEXT 1070printer_data% = defaults% 1080H%=OPENIN"<PDriver$dir>.PrData" 1090IF H%=0 ERROR 100,"Can't read printer data file" 1100REPEAT 1110 ptr% = PTR#H% 1120 PROCPrinter_process_line(H%) 1130UNTIL EOF#H% 1140CLOSE#H% 1150ENDPROC 1160: 1170REM ********************************************* 1180REM process one line from the configuration file 1190REM ********************************************* 1200DEFPROCPrinter_process_line(H%) 1210LOCAL I%,J%,tag$ 1220$buf%=GET$#H% 1230I%=0 1240WHILE FNtagchar(buf%?I%): I% += 1:ENDWHILE 1250IF buf%?I% = ASC":" THEN 1260 REM got a tag 1270 tag$=FNlowercase(LEFT$($buf%,I%)) 1280 I% += 1 1290 WHILE buf%?I%=ASC" ": I% += 1:ENDWHILE 1300 CASE tag$ OF 1310 WHEN "printer_name" 1320 REM build a name 1330 DIM description% LEN$buf% -I% +1 1340 $description% = RIGHT$($buf%,LEN$buf%-I%) 1350 REM now add a block to our list of printer data blocks 1360 DIM printer_data% printer_data_size% 1370 FOR I%=0 TO printer_data_size%-4 STEP 4 1380 printer_data%!I% = defaults%!I% 1390 NEXT 1400 printer_data%!description_field% = description% 1410 IF P%=0 THEN 1420 printer_data_list% = printer_data% 1430 ELSE 1440 P%!list_pointer_field% = printer_data% 1450 ENDIF 1460 P% = printer_data% 1470 WHEN "pxres","pyres","features","pxres_halftone","pyres_halftone","printer_number","page_width","page_height","page_bottom","page_top","page_left","page_right" 1480 REM note that all tags are the same as their respective field names 1490 printer_data%!EVAL(tag$+"_field%") = FNread_integer_expression(RIGHT$($buf%,LEN$buf%-I%)) 1500 WHEN "dump_depth","interlace" 1510 printer_data%?EVAL(tag$+"_field%") = FNread_integer_expression(RIGHT$($buf%,LEN$buf%-I%)) 1520 WHEN "line_prologue","line_epilogue","line_interlace","job_prologue","job_epilogue" 1530 WHILE buf%?I%=ASC" ":I%+=1:ENDWHILE 1540 J% = EVAL(tag$+"_field%") 1550 SYS "OS_GSTrans",buf%+I%,printer_data%+1+J%,20 TO ,,I% 1560 printer_data%?J% = I% 1570 WHEN "server" 1580 J% = I% 1590 WHILE buf%?J%>=ASC" " AND buf%?J%<>ASC";" 1600 J% += 1 1610 ENDWHILE 1620 REM from I% to J% is the string 1630 server_ptr% = ptr% + I% 1640 server_config$ = MID$($buf%, I%+1, J%-I%) 1650 WHEN "printer" 1660 printer_config% = FNread 1670 printer_new% = printer_config% 1680 printer_ptr% = ptr% + I% 1690 WHEN "location" 1700 location_config% = FNread 1710 location_ptr% = ptr% + I% 1720 WHEN "baud" 1730 baud_config% = FNread 1740 baud_ptr% = ptr% + I% 1750 WHEN "data" 1760 data_config% = FNread 1770 data_ptr% = ptr% + I% 1780 WHEN "xon" 1790 XON_config% = FNread 1800 XON_new% = XON_config% 1810 XON_ptr% = ptr% + I% 1820 WHEN "line" 1830 line_config% = FNread 1840 line_new% = line_config% 1850 line_ptr% = ptr% + I% 1860 ENDCASE 1870ENDIF 1880ENDPROC 1890: 1900DEFFNread=FNread_integer_expression(RIGHT$($buf%,LEN$buf%-I%)) 1910: 1920REM *************************************** 1930REM convert a string to an integer 1940REM *************************************** 1950DEFFNread_integer_expression(S$) 1960LOCAL R%, T%, E$, P% 1970E$="" 1980REM get rid of any comment 1990WHILE LEFT$(S$,1) <> ";" AND LENS$ <> 0 2000 E$ += LEFT$(S$,1) 2010 S$ = RIGHT$(S$,LENS$-1) 2020ENDWHILE 2030SYS"XOS_EvaluateExpression",E$,buf%,256 TO ,T%,R%;P% 2040IF T% <> 0 OR (P% AND 1) ERROR 100, "Integer value needed for "+tag$ 2050=R% 2060: 2070REM *************************************** 2080REM allow only alphanumerics in tag fields 2090REM *************************************** 2100DEFFNtagchar(C%) 2110IF (C% >= ASC"A" AND C% <= ASC"Z") THEN =TRUE 2120IF (C% >= ASC"a" AND C% <= ASC"z") THEN =TRUE 2130= (C% >= ASC"0" AND C% <= ASC"9") OR C% = ASC"_" 2140: 2150REM ********************************************************************* 2160REM set the printer driver module's state to reflect the current settings 2170REM ********************************************************************* 2180DEFPROCPrinter_set_module_data 2190LOCAL A%,B%,C%,D%,E%,F% 2200A%=defaults%!pxres_field% 2210B%=defaults%!pyres_field% 2220C%=defaults%!features_field% 2230D%=defaults%!pxres_halftone_field% 2240E%=defaults%!pyres_halftone_field% 2250F%=defaults%!printer_number_field% 2260SYS "PDriver_SetInfo",,A%,B%,C%,,D%,E%,F% 2270msg%!0=20 2280msg%!12=0 2290msg%!16=Message_SetPrinter% 2300SYS "Wimp_SendMessage", 18, msg%, 0 2310A%=defaults%!page_width_field% 2320B%=defaults%!page_height_field% 2330C%=defaults%!page_left_field% 2340D%=defaults%!page_bottom_field% 2350E%=defaults%!page_right_field% 2360F%=defaults%!page_top_field% 2370SYS "PDriver_SetPageSize",,A%,B%,C%,D%,E%,F% 2380SYS "PDriver_SetPrinter",defaults%+dump_depth_field% 2390ENDPROC 2400: 2410REM *************************************** 2420REM set the description field in our window 2430REM *************************************** 2440DEFPROCPrinter_set_description 2450LOCAL S%, S$ 2460FOR S% = 0 TO printer_data_size%-4 STEP 4 2470defaults%!S% = printer_data_list%!S% 2480NEXT 2490PROCPrinter_set_icon(main_description%,$(defaults%!description_field%)) 2500SYS "XOS_CLI","SET Printer$"+" """+$(defaults%!description_field%)+"""" 2510ENDPROC 2520: 2530DEFPROCPrinter_set_numeric_icon(I%,F%,S%, RETURN S$) 2540S$ = STR$(defaults%!F%/S%) 2550PROCPrinter_set_icon(I%,S$) 2560ENDPROC 2570: 2580DEFPROCPrinter_set_icon(I%,S$) 2590LOCAL S% 2600S%=FNiconaddr(main%,I%) 2610$S% = S$ 2620PROCzero_terminate(S%) 2630PROCset_icon_state(main%,I%,0,0): REM force redraw 2640ENDPROC 2650: 2660DEF PROCPrinter_AmendConfig 2670IF line_config% <> line_new% THEN 2680 PTR#out_file%=line_ptr% 2690 BPUT#out_file%,STR$line_new%; 2700 line_config% = line_new% 2710ENDIF 2720ENDPROC 2730: 2740DEF PROCPrinter_Ignore 2750ENDPROC 2760: 2770DEF PROCPrinter_XonXoff(flag%) 2780IF flag% THEN 2790 *fx 2,2 2800ELSE 2810 *fx 2,0 2820ENDIF 2830ENDPROC 2840: 2850DEF PROCPrinter_Header 2860`ext%=EXT#in_file% 2870`last%=-1 2880ENDPROC 2890: 2900DEF PROCPrinter_Footer 2910ENDPROC 2920: 2930DEF FNPrinter_Send(len%) 2940PROCEscOn 2950LOCAL L%,I%,C% 2960L%=`ext% - PTR#in_file% 2970IF len%>=L% len%=L% 2980IF line_new% THEN 2990 I%=len% 3000 WHILE I%>0 3010 C%=BGET#in_file% 3020 IF C%=10 BPUT#out_file%,13:I%-=1 3030 BPUT#out_file%,C% 3040 IF C%=13 BPUT#out_file%,10:I%-=1 3050 I%-=1 3060 `last%=C% 3070 ENDWHILE 3080ELSE 3090 SYS "OS_GBPB", 4, in_file%, buf%, len% 3100 SYS "OS_GBPB", 2, out_file%, buf%, len% 3110ENDIF 3120PROCEscOff 3130=(len%>=L%)
3� >Library V.0.80 for dot matrix printer driver @� Purpose: printer-specific parts of the printer application "� Authors: A.Thompson, NReeves (=� ******************************************************* 2=� initialise the dot matrix printer driver specific parts <=� ******************************************************* F: P��Printer_initialise Z� P% dPrinterClass$="PrinterDM" n"FullPrinterClass$="dot matrix" xOutputType%=&FF4 �@� define printer class dependent fields in printer data area �' dump_depth_field% = �p_field(1) �' interlace_field% = �p_field(3) �( line_prologue_field% = �p_field(20) �( line_epilogue_field% = �p_field(20) �(line_interlace_field% = �p_field(20) �( job_epilogue_field% = �p_field(20) �( job_prologue_field% = �p_field(20) �' printer_data_size% = �p_field(0) �1� define class dependent icons in main window �main_line%=2 �printer_data_list% = 0:P%=0 ��Printer_read_config_file "� now convert to circular list -P%!list_pointer_field%=printer_data_list% � ": ,� ***************** 6� set initial state @� ***************** J��Printer_set_initial_state T� D% ^� set default state hD%=printer_data_list% r]ȕ 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 �� �: �� ******** �� shutdown �� ******** ���Printer_terminate �M*if "<Printer$Scrap>" = "<PDriver$Dir>.DM!Scrap" then unset Printer$Scrap �J*if "<Printer$Temp>" = "<PDriver$Dir>.DM!Temp" then unset Printer$Temp �� : ,� ************************************** +� the printer-specific template loading &,� ************************************** 0��Printer_load_templates :>�set_icon_state(main%, main_line%, line_new% << 21, 1<<21) D� N: X)� *********************************** b(� the printer-specific event handler l)� *********************************** v(ݤPrinter_process_event(action%, E%) � � res% � res%=� �Ȏ action% � � � 17,18: � Ȏ E%!16 � � � &502: �� � 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% � � print_on% � � Ȏ � � � � (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% 4 � >G printer_data_list% = printer_data_list%!list_pointer_field% H � R# �Printer_set_description \# �Printer_set_module_data fB printer_new% = printer_data_list%!printer_number_field% p res%=� z � main_line% � !q%=main% � q%!4=main_line% �% ș "Wimp_GetIconState",,q% �( line_new% = (q%!24 >> 21) � 1 � � � � � � �� � =res% �: �G� ***************************************************************** �F� read the configuration file with all the individual printer info �G� ***************************************************************** ��Printer_read_config_file � H%,ptr% "� defaults% printer_data_size% $6� H%=0 � printer_data_size%-4 � 4:defaults%!H%=0:� .printer_data% = defaults% 8H%=�"<PDriver$dir>.PrData" B/� H%=0 � 100,"Can't read printer data file" L� V ptr% = �#H% ` �Printer_process_line(H%) j � �#H% t�#H% ~� �: �3� ********************************************* �2� process one line from the configuration file �3� ********************************************* ���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$ � � "printer_name" ( � build a name 2# � description% �$buf% -I% +1 <( $description% = �$buf%,�$buf%-I%) F; � now add a block to our list of printer data blocks P) � printer_data% printer_data_size% Z( � I%=0 � printer_data_size%-4 � 4 d( printer_data%!I% = defaults%!I% n � x6 printer_data%!description_field% = description% � � P%=0 � �* printer_data_list% = printer_data% � � �. P%!list_pointer_field% = printer_data% � � � P% = printer_data% �� � "pxres","pyres","features","pxres_halftone","pyres_halftone","printer_number","page_width","page_height","page_bottom","page_top","page_left","page_right" �H � note that all tags are the same as their respective field names �T printer_data%!�(tag$+"_field%") = �read_integer_expression(�$buf%,�$buf%-I%)) � � "dump_depth","interlace" �T printer_data%?�(tag$+"_field%") = �read_integer_expression(�$buf%,�$buf%-I%)) �V � "line_prologue","line_epilogue","line_interlace","job_prologue","job_epilogue" � ȕ buf%?I%=�" ":I%+=1:� J% = �(tag$+"_field%") ; ș "OS_GSTrans",buf%+I%,printer_data%+1+J%,20 � ,,I% printer_data%?J% = I% " � "server" , J% = I% 6' ȕ buf%?J%>=�" " � buf%?J%<>�";" @ J% += 1 J � T$ � from I% to J% is the string ^ server_ptr% = ptr% + I% h, server_config$ = �$buf%, I%+1, J%-I%) r � "printer" | printer_config% = �read �% printer_new% = printer_config% � 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% � "line" & line_config% = �read 0 line_new% = line_config% : line_ptr% = ptr% + I% D � N� X� b: l6ݤread=�read_integer_expression(�$buf%,�$buf%-I%)) v: �-� *************************************** �$� convert a string to an integer �-� *************************************** �!ݤread_integer_expression(S$) �� R%, T%, E$, P% � E$="" �� 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% : -� *************************************** ,� allow only alphanumerics in tag fields *-� *************************************** 4ݤtagchar(C%) >$� (C% >= �"A" � C% <= �"Z") � =� H$� (C% >= �"a" � C% <= �"z") � =� R,= (C% >= �"0" � C% <= �"9") � C% = �"_" \: fK� ********************************************************************* pK� set the printer driver module's state to reflect the current settings zK� ********************************************************************* ���Printer_set_module_data �� A%,B%,C%,D%,E%,F% �A%=defaults%!pxres_field% �B%=defaults%!pyres_field% � C%=defaults%!features_field% �&D%=defaults%!pxres_halftone_field% �&E%=defaults%!pyres_halftone_field% �&F%=defaults%!printer_number_field% �,ș "PDriver_SetInfo",,A%,B%,C%,,D%,E%,F% � msg%!0=20 � msg%!12=0 �msg%!16=Message_SetPrinter% �&ș "Wimp_SendMessage", 18, msg%, 0 "A%=defaults%!page_width_field% #B%=defaults%!page_height_field% !C%=defaults%!page_left_field% $#D%=defaults%!page_bottom_field% ."E%=defaults%!page_right_field% 8 F%=defaults%!page_top_field% B/ș "PDriver_SetPageSize",,A%,B%,C%,D%,E%,F% L7ș "PDriver_SetPrinter",defaults%+dump_depth_field% V� `: j-� *************************************** t-� set the description field in our window ~-� *************************************** ���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%)) �Jș "XOS_CLI","SET Printer$"+" """+$(defaults%!description_field%)+"""" �� �: �.��Printer_set_numeric_icon(I%,F%,S%, � S$) �S$ = �(defaults%!F%/S%) ��Printer_set_icon(I%,S$) � : ��Printer_set_icon(I%,S$) � S% (S%=�iconaddr(main%,I%) 2$S% = S$ <�zero_terminate(S%) F1�set_icon_state(main%,I%,0,0): � force redraw P� Z: d� �Printer_AmendConfig n!� line_config% <> line_new% � x �#out_file%=line_ptr% � �#out_file%,�line_new%; � line_config% = line_new% �� �� �: �� �Printer_Ignore �� �: �� �Printer_XonXoff(flag%) � � flag% � � *fx 2,2 �� � *fx 2,0 � � : "� �Printer_Header ,`ext%=�#in_file% 6 `last%=-1 @� J: T� �Printer_Footer ^� h: r� �Printer_Send(len%) | �EscOn �� L%,I%,C% �L%=`ext% - �#in_file% �� len%>=L% len%=L% �� line_new% � � I%=len% � ȕ I%>0 � C%=�#in_file% �" � C%=10 �#out_file%,13:I%-=1 � �#out_file%,C% �" � C%=13 �#out_file%,10:I%-=1 � I%-=1 � `last%=C% � � � * ș "OS_GBPB", 4, in_file%, buf%, len% + ș "OS_GBPB", 2, out_file%, buf%, len% &� 0�EscOff :=(len%>=L%) �
00000000 0d 00 0a 33 f4 20 3e 4c 69 62 72 61 72 79 20 56 |...3. >Library V| 00000010 2e 30 2e 38 30 20 66 6f 72 20 64 6f 74 20 6d 61 |.0.80 for dot ma| 00000020 74 72 69 78 20 70 72 69 6e 74 65 72 20 64 72 69 |trix printer dri| 00000030 76 65 72 0d 00 14 40 f4 20 50 75 72 70 6f 73 65 |ver...@. Purpose| 00000040 3a 20 70 72 69 6e 74 65 72 2d 73 70 65 63 69 66 |: printer-specif| 00000050 69 63 20 70 61 72 74 73 20 6f 66 20 74 68 65 20 |ic parts of the | 00000060 70 72 69 6e 74 65 72 20 61 70 70 6c 69 63 61 74 |printer applicat| 00000070 69 6f 6e 0d 00 1e 22 f4 20 41 75 74 68 6f 72 73 |ion...". Authors| 00000080 3a 20 41 2e 54 68 6f 6d 70 73 6f 6e 2c 20 4e 52 |: A.Thompson, NR| 00000090 65 65 76 65 73 0d 00 28 3d f4 20 2a 2a 2a 2a 2a |eeves..(=. *****| 000000a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000000d0 2a 2a 0d 00 32 3d f4 20 69 6e 69 74 69 61 6c 69 |**..2=. initiali| 000000e0 73 65 20 74 68 65 20 64 6f 74 20 6d 61 74 72 69 |se the dot matri| 000000f0 78 20 70 72 69 6e 74 65 72 20 64 72 69 76 65 72 |x printer driver| 00000100 20 73 70 65 63 69 66 69 63 20 70 61 72 74 73 0d | specific parts.| 00000110 00 3c 3d f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |.<=. ***********| 00000120 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000140 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 00 46 05 |************..F.| 00000150 3a 0d 00 50 18 dd f2 50 72 69 6e 74 65 72 5f 69 |:..P...Printer_i| 00000160 6e 69 74 69 61 6c 69 73 65 0d 00 5a 08 ea 20 50 |nitialise..Z.. P| 00000170 25 0d 00 64 1d 50 72 69 6e 74 65 72 43 6c 61 73 |%..d.PrinterClas| 00000180 73 24 3d 22 50 72 69 6e 74 65 72 44 4d 22 0d 00 |s$="PrinterDM"..| 00000190 6e 22 46 75 6c 6c 50 72 69 6e 74 65 72 43 6c 61 |n"FullPrinterCla| 000001a0 73 73 24 3d 22 64 6f 74 20 6d 61 74 72 69 78 22 |ss$="dot matrix"| 000001b0 0d 00 78 14 4f 75 74 70 75 74 54 79 70 65 25 3d |..x.OutputType%=| 000001c0 26 46 46 34 0d 00 82 40 f4 20 64 65 66 69 6e 65 |&FF4...@. define| 000001d0 20 70 72 69 6e 74 65 72 20 63 6c 61 73 73 20 64 | printer class d| 000001e0 65 70 65 6e 64 65 6e 74 20 66 69 65 6c 64 73 20 |ependent fields | 000001f0 69 6e 20 70 72 69 6e 74 65 72 20 64 61 74 61 20 |in printer data | 00000200 61 72 65 61 0d 00 8c 27 20 20 20 20 64 75 6d 70 |area...' dump| 00000210 5f 64 65 70 74 68 5f 66 69 65 6c 64 25 20 3d 20 |_depth_field% = | 00000220 a4 70 5f 66 69 65 6c 64 28 31 29 0d 00 96 27 20 |.p_field(1)...' | 00000230 20 20 20 20 69 6e 74 65 72 6c 61 63 65 5f 66 69 | interlace_fi| 00000240 65 6c 64 25 20 3d 20 a4 70 5f 66 69 65 6c 64 28 |eld% = .p_field(| 00000250 33 29 0d 00 a0 28 20 6c 69 6e 65 5f 70 72 6f 6c |3)...( line_prol| 00000260 6f 67 75 65 5f 66 69 65 6c 64 25 20 3d 20 a4 70 |ogue_field% = .p| 00000270 5f 66 69 65 6c 64 28 32 30 29 0d 00 aa 28 20 6c |_field(20)...( l| 00000280 69 6e 65 5f 65 70 69 6c 6f 67 75 65 5f 66 69 65 |ine_epilogue_fie| 00000290 6c 64 25 20 3d 20 a4 70 5f 66 69 65 6c 64 28 32 |ld% = .p_field(2| 000002a0 30 29 0d 00 b4 28 6c 69 6e 65 5f 69 6e 74 65 72 |0)...(line_inter| 000002b0 6c 61 63 65 5f 66 69 65 6c 64 25 20 3d 20 a4 70 |lace_field% = .p| 000002c0 5f 66 69 65 6c 64 28 32 30 29 0d 00 be 28 20 20 |_field(20)...( | 000002d0 6a 6f 62 5f 65 70 69 6c 6f 67 75 65 5f 66 69 65 |job_epilogue_fie| 000002e0 6c 64 25 20 3d 20 a4 70 5f 66 69 65 6c 64 28 32 |ld% = .p_field(2| 000002f0 30 29 0d 00 c8 28 20 20 6a 6f 62 5f 70 72 6f 6c |0)...( job_prol| 00000300 6f 67 75 65 5f 66 69 65 6c 64 25 20 3d 20 a4 70 |ogue_field% = .p| 00000310 5f 66 69 65 6c 64 28 32 30 29 0d 00 d2 27 20 20 |_field(20)...' | 00000320 20 70 72 69 6e 74 65 72 5f 64 61 74 61 5f 73 69 | printer_data_si| 00000330 7a 65 25 20 3d 20 a4 70 5f 66 69 65 6c 64 28 30 |ze% = .p_field(0| 00000340 29 0d 00 dc 31 f4 20 64 65 66 69 6e 65 20 63 6c |)...1. define cl| 00000350 61 73 73 20 64 65 70 65 6e 64 65 6e 74 20 69 63 |ass dependent ic| 00000360 6f 6e 73 20 69 6e 20 6d 61 69 6e 20 77 69 6e 64 |ons in main wind| 00000370 6f 77 0d 00 e6 10 6d 61 69 6e 5f 6c 69 6e 65 25 |ow....main_line%| 00000380 3d 32 0d 00 f0 1f 70 72 69 6e 74 65 72 5f 64 61 |=2....printer_da| 00000390 74 61 5f 6c 69 73 74 25 20 3d 20 30 3a 50 25 3d |ta_list% = 0:P%=| 000003a0 30 0d 00 fa 1d f2 50 72 69 6e 74 65 72 5f 72 65 |0.....Printer_re| 000003b0 61 64 5f 63 6f 6e 66 69 67 5f 66 69 6c 65 0d 01 |ad_config_file..| 000003c0 04 22 f4 20 6e 6f 77 20 63 6f 6e 76 65 72 74 20 |.". now convert | 000003d0 74 6f 20 63 69 72 63 75 6c 61 72 20 6c 69 73 74 |to circular list| 000003e0 0d 01 0e 2d 50 25 21 6c 69 73 74 5f 70 6f 69 6e |...-P%!list_poin| 000003f0 74 65 72 5f 66 69 65 6c 64 25 3d 70 72 69 6e 74 |ter_field%=print| 00000400 65 72 5f 64 61 74 61 5f 6c 69 73 74 25 0d 01 18 |er_data_list%...| 00000410 05 e1 0d 01 22 05 3a 0d 01 2c 17 f4 20 2a 2a 2a |....".:..,.. ***| 00000420 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 01 |**************..| 00000430 36 17 f4 20 73 65 74 20 69 6e 69 74 69 61 6c 20 |6.. set initial | 00000440 73 74 61 74 65 0d 01 40 17 f4 20 2a 2a 2a 2a 2a |state..@.. *****| 00000450 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 01 4a 1f |************..J.| 00000460 dd f2 50 72 69 6e 74 65 72 5f 73 65 74 5f 69 6e |..Printer_set_in| 00000470 69 74 69 61 6c 5f 73 74 61 74 65 0d 01 54 08 ea |itial_state..T..| 00000480 20 44 25 0d 01 5e 17 f4 20 73 65 74 20 64 65 66 | D%..^.. set def| 00000490 61 75 6c 74 20 73 74 61 74 65 0d 01 68 19 44 25 |ault state..h.D%| 000004a0 3d 70 72 69 6e 74 65 72 5f 64 61 74 61 5f 6c 69 |=printer_data_li| 000004b0 73 74 25 0d 01 72 5d c8 95 20 44 25 21 6c 69 73 |st%..r].. D%!lis| 000004c0 74 5f 70 6f 69 6e 74 65 72 5f 66 69 65 6c 64 25 |t_pointer_field%| 000004d0 3c 3e 70 72 69 6e 74 65 72 5f 64 61 74 61 5f 6c |<>printer_data_l| 000004e0 69 73 74 25 20 80 20 44 25 21 70 72 69 6e 74 65 |ist% . D%!printe| 000004f0 72 5f 6e 75 6d 62 65 72 5f 66 69 65 6c 64 25 3c |r_number_field%<| 00000500 3e 70 72 69 6e 74 65 72 5f 63 6f 6e 66 69 67 25 |>printer_config%| 00000510 0d 01 7c 1e 20 44 25 3d 44 25 21 6c 69 73 74 5f |..|. D%=D%!list_| 00000520 70 6f 69 6e 74 65 72 5f 66 69 65 6c 64 25 0d 01 |pointer_field%..| 00000530 86 05 ce 0d 01 90 46 e7 20 44 25 21 70 72 69 6e |......F. D%!prin| 00000540 74 65 72 5f 6e 75 6d 62 65 72 5f 66 69 65 6c 64 |ter_number_field| 00000550 25 3d 70 72 69 6e 74 65 72 5f 63 6f 6e 66 69 67 |%=printer_config| 00000560 25 20 8c 20 70 72 69 6e 74 65 72 5f 64 61 74 61 |% . printer_data| 00000570 5f 6c 69 73 74 25 3d 44 25 0d 01 9a 1c f2 50 72 |_list%=D%.....Pr| 00000580 69 6e 74 65 72 5f 73 65 74 5f 64 65 73 63 72 69 |inter_set_descri| 00000590 70 74 69 6f 6e 0d 01 a4 1c f2 50 72 69 6e 74 65 |ption.....Printe| 000005a0 72 5f 73 65 74 5f 6d 6f 64 75 6c 65 5f 64 61 74 |r_set_module_dat| 000005b0 61 0d 01 ae 05 e1 0d 01 b8 05 3a 0d 01 c2 0e f4 |a.........:.....| 000005c0 20 2a 2a 2a 2a 2a 2a 2a 2a 0d 01 cc 0e f4 20 73 | ********..... s| 000005d0 68 75 74 64 6f 77 6e 0d 01 d6 0e f4 20 2a 2a 2a |hutdown..... ***| 000005e0 2a 2a 2a 2a 2a 0d 01 e0 17 dd f2 50 72 69 6e 74 |*****......Print| 000005f0 65 72 5f 74 65 72 6d 69 6e 61 74 65 0d 01 ea 4d |er_terminate...M| 00000600 2a 69 66 20 22 3c 50 72 69 6e 74 65 72 24 53 63 |*if "<Printer$Sc| 00000610 72 61 70 3e 22 20 3d 20 22 3c 50 44 72 69 76 65 |rap>" = "<PDrive| 00000620 72 24 44 69 72 3e 2e 44 4d 21 53 63 72 61 70 22 |r$Dir>.DM!Scrap"| 00000630 20 74 68 65 6e 20 75 6e 73 65 74 20 50 72 69 6e | then unset Prin| 00000640 74 65 72 24 53 63 72 61 70 0d 01 f4 4a 2a 69 66 |ter$Scrap...J*if| 00000650 20 22 3c 50 72 69 6e 74 65 72 24 54 65 6d 70 3e | "<Printer$Temp>| 00000660 22 20 3d 20 22 3c 50 44 72 69 76 65 72 24 44 69 |" = "<PDriver$Di| 00000670 72 3e 2e 44 4d 21 54 65 6d 70 22 20 74 68 65 6e |r>.DM!Temp" then| 00000680 20 75 6e 73 65 74 20 50 72 69 6e 74 65 72 24 54 | unset Printer$T| 00000690 65 6d 70 0d 01 fe 05 e1 0d 02 08 05 3a 0d 02 12 |emp.........:...| 000006a0 2c f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |,. *************| 000006b0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000006c0 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 02 1c 2b f4 20 74 |*********...+. t| 000006d0 68 65 20 70 72 69 6e 74 65 72 2d 73 70 65 63 69 |he printer-speci| 000006e0 66 69 63 20 74 65 6d 70 6c 61 74 65 20 6c 6f 61 |fic template loa| 000006f0 64 69 6e 67 0d 02 26 2c f4 20 2a 2a 2a 2a 2a 2a |ding..&,. ******| 00000700 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000720 0d 02 30 1c dd f2 50 72 69 6e 74 65 72 5f 6c 6f |..0...Printer_lo| 00000730 61 64 5f 74 65 6d 70 6c 61 74 65 73 0d 02 3a 3e |ad_templates..:>| 00000740 f2 73 65 74 5f 69 63 6f 6e 5f 73 74 61 74 65 28 |.set_icon_state(| 00000750 6d 61 69 6e 25 2c 20 6d 61 69 6e 5f 6c 69 6e 65 |main%, main_line| 00000760 25 2c 20 6c 69 6e 65 5f 6e 65 77 25 20 3c 3c 20 |%, line_new% << | 00000770 32 31 2c 20 31 3c 3c 32 31 29 0d 02 44 05 e1 0d |21, 1<<21)..D...| 00000780 02 4e 05 3a 0d 02 58 29 f4 20 2a 2a 2a 2a 2a 2a |.N.:..X). ******| 00000790 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000007a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 02 62 |*************..b| 000007b0 28 f4 20 74 68 65 20 70 72 69 6e 74 65 72 2d 73 |(. the printer-s| 000007c0 70 65 63 69 66 69 63 20 65 76 65 6e 74 20 68 61 |pecific event ha| 000007d0 6e 64 6c 65 72 0d 02 6c 29 f4 20 2a 2a 2a 2a 2a |ndler..l). *****| 000007e0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000007f0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 02 |**************..| 00000800 76 28 dd a4 50 72 69 6e 74 65 72 5f 70 72 6f 63 |v(..Printer_proc| 00000810 65 73 73 5f 65 76 65 6e 74 28 61 63 74 69 6f 6e |ess_event(action| 00000820 25 2c 20 45 25 29 0d 02 80 0a ea 20 72 65 73 25 |%, E%)..... res%| 00000830 0d 02 8a 0a 72 65 73 25 3d a3 0d 02 94 10 c8 8e |....res%=.......| 00000840 20 61 63 74 69 6f 6e 25 20 ca 0d 02 9e 0d 20 c9 | action% ..... .| 00000850 20 31 37 2c 31 38 3a 0d 02 a8 10 20 20 c8 8e 20 | 17,18:.... .. | 00000860 45 25 21 31 36 20 ca 0d 02 b2 0e 20 20 20 c9 20 |E%!16 ..... . | 00000870 26 35 30 32 3a 0d 02 bc 86 20 20 20 20 e7 20 45 |&502:.... . E| 00000880 25 21 33 32 20 3d 20 6d 61 69 6e 25 20 80 20 45 |%!32 = main% . E| 00000890 25 21 33 36 20 3e 3d 20 2d 31 20 8c 20 f2 68 65 |%!36 >= -1 . .he| 000008a0 6c 70 72 65 70 6c 79 28 22 50 72 69 6e 74 65 72 |lpreply("Printer| 000008b0 20 73 65 74 75 70 2e 7c 4d 43 6c 69 63 6b 20 53 | setup.|MClick S| 000008c0 45 4c 45 43 54 20 6f 72 20 41 44 4a 55 53 54 20 |ELECT or ADJUST | 000008d0 74 6f 20 61 6c 74 65 72 20 74 68 65 20 73 65 74 |to alter the set| 000008e0 74 69 6e 67 73 2e 22 2c 45 25 21 38 2c 45 25 21 |tings.",E%!8,E%!| 000008f0 34 29 3a 72 65 73 25 20 3d 20 b9 0d 02 c6 07 20 |4):res% = ..... | 00000900 20 cb 0d 02 d0 08 20 c9 20 36 0d 02 da 23 20 20 | ..... . 6...# | 00000910 e7 20 45 25 21 31 32 3d 6d 61 69 6e 25 20 80 20 |. E%!12=main% . | 00000920 ac 20 70 72 69 6e 74 5f 6f 6e 25 20 8c 0d 02 e4 |. print_on% ....| 00000930 0d 20 20 20 c8 8e 20 b9 20 ca 0d 02 ee 1b 20 20 |. .. . ..... | 00000940 20 20 c9 20 28 45 25 21 38 20 80 20 25 31 30 31 | . (E%!8 . %101| 00000950 29 3c 3e 30 3a 0d 02 f8 13 20 20 20 20 20 c8 8e |)<>0:.... ..| 00000960 20 45 25 21 31 36 20 ca 0d 03 02 1e 20 20 20 20 | E%!16 ..... | 00000970 20 20 c9 20 6d 61 69 6e 5f 64 65 73 63 72 69 70 | . main_descrip| 00000980 74 69 6f 6e 25 3a 0d 03 0c 17 20 20 20 20 20 20 |tion%:.... | 00000990 20 e7 20 45 25 21 38 20 80 20 31 20 8c 0d 03 16 | . E%!8 . 1 ....| 000009a0 25 20 20 20 20 20 20 20 20 72 65 73 25 20 3d 20 |% res% = | 000009b0 70 72 69 6e 74 65 72 5f 64 61 74 61 5f 6c 69 73 |printer_data_lis| 000009c0 74 25 0d 03 20 49 20 20 20 20 20 20 20 20 f5 20 |t%.. I . | 000009d0 70 72 69 6e 74 65 72 5f 64 61 74 61 5f 6c 69 73 |printer_data_lis| 000009e0 74 25 20 3d 20 70 72 69 6e 74 65 72 5f 64 61 74 |t% = printer_dat| 000009f0 61 5f 6c 69 73 74 25 21 6c 69 73 74 5f 70 6f 69 |a_list%!list_poi| 00000a00 6e 74 65 72 5f 66 69 65 6c 64 25 0d 03 2a 3b 20 |nter_field%..*; | 00000a10 20 20 20 20 20 20 20 fd 20 70 72 69 6e 74 65 72 | . printer| 00000a20 5f 64 61 74 61 5f 6c 69 73 74 25 21 6c 69 73 74 |_data_list%!list| 00000a30 5f 70 6f 69 6e 74 65 72 5f 66 69 65 6c 64 25 20 |_pointer_field% | 00000a40 3d 20 72 65 73 25 0d 03 34 0c 20 20 20 20 20 20 |= res%..4. | 00000a50 20 cc 0d 03 3e 47 20 20 20 20 20 20 20 20 70 72 | ...>G pr| 00000a60 69 6e 74 65 72 5f 64 61 74 61 5f 6c 69 73 74 25 |inter_data_list%| 00000a70 20 3d 20 70 72 69 6e 74 65 72 5f 64 61 74 61 5f | = printer_data_| 00000a80 6c 69 73 74 25 21 6c 69 73 74 5f 70 6f 69 6e 74 |list%!list_point| 00000a90 65 72 5f 66 69 65 6c 64 25 0d 03 48 0c 20 20 20 |er_field%..H. | 00000aa0 20 20 20 20 cd 0d 03 52 23 20 20 20 20 20 20 20 | ...R# | 00000ab0 f2 50 72 69 6e 74 65 72 5f 73 65 74 5f 64 65 73 |.Printer_set_des| 00000ac0 63 72 69 70 74 69 6f 6e 0d 03 5c 23 20 20 20 20 |cription..\# | 00000ad0 20 20 20 f2 50 72 69 6e 74 65 72 5f 73 65 74 5f | .Printer_set_| 00000ae0 6d 6f 64 75 6c 65 5f 64 61 74 61 0d 03 66 42 20 |module_data..fB | 00000af0 20 20 20 20 20 20 70 72 69 6e 74 65 72 5f 6e 65 | printer_ne| 00000b00 77 25 20 3d 20 70 72 69 6e 74 65 72 5f 64 61 74 |w% = printer_dat| 00000b10 61 5f 6c 69 73 74 25 21 70 72 69 6e 74 65 72 5f |a_list%!printer_| 00000b20 6e 75 6d 62 65 72 5f 66 69 65 6c 64 25 0d 03 70 |number_field%..p| 00000b30 11 20 20 20 20 20 20 20 72 65 73 25 3d b9 0d 03 |. res%=...| 00000b40 7a 16 20 20 20 20 20 20 c9 20 6d 61 69 6e 5f 6c |z. . main_l| 00000b50 69 6e 65 25 0d 03 84 14 20 20 20 20 20 20 20 21 |ine%.... !| 00000b60 71 25 3d 6d 61 69 6e 25 0d 03 8e 1a 20 20 20 20 |q%=main%.... | 00000b70 20 20 20 71 25 21 34 3d 6d 61 69 6e 5f 6c 69 6e | q%!4=main_lin| 00000b80 65 25 0d 03 98 25 20 20 20 20 20 20 20 c8 99 20 |e%...% .. | 00000b90 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 |"Wimp_GetIconSta| 00000ba0 74 65 22 2c 2c 71 25 0d 03 a2 28 20 20 20 20 20 |te",,q%...( | 00000bb0 20 20 6c 69 6e 65 5f 6e 65 77 25 20 3d 20 28 71 | line_new% = (q| 00000bc0 25 21 32 34 20 3e 3e 20 32 31 29 20 80 20 31 0d |%!24 >> 21) . 1.| 00000bd0 03 ac 0a 20 20 20 20 20 cb 0d 03 b6 08 20 20 20 |... ..... | 00000be0 cb 0d 03 c0 07 20 20 cd 0d 03 ca 05 cb 0d 03 d4 |..... .........| 00000bf0 09 3d 72 65 73 25 0d 03 de 05 3a 0d 03 e8 47 f4 |.=res%....:...G.| 00000c00 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | ***************| 00000c10 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000c40 2a 2a 0d 03 f2 46 f4 20 72 65 61 64 20 74 68 65 |**...F. read the| 00000c50 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 66 | configuration f| 00000c60 69 6c 65 20 77 69 74 68 20 61 6c 6c 20 74 68 65 |ile with all the| 00000c70 20 69 6e 64 69 76 69 64 75 61 6c 20 70 72 69 6e | individual prin| 00000c80 74 65 72 20 69 6e 66 6f 0d 03 fc 47 f4 20 2a 2a |ter info...G. **| 00000c90 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000cc0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d |***************.| 00000cd0 04 06 1e dd f2 50 72 69 6e 74 65 72 5f 72 65 61 |.....Printer_rea| 00000ce0 64 5f 63 6f 6e 66 69 67 5f 66 69 6c 65 0d 04 10 |d_config_file...| 00000cf0 0d ea 20 48 25 2c 70 74 72 25 0d 04 1a 22 de 20 |.. H%,ptr%...". | 00000d00 64 65 66 61 75 6c 74 73 25 20 70 72 69 6e 74 65 |defaults% printe| 00000d10 72 5f 64 61 74 61 5f 73 69 7a 65 25 0d 04 24 36 |r_data_size%..$6| 00000d20 e3 20 48 25 3d 30 20 b8 20 70 72 69 6e 74 65 72 |. H%=0 . printer| 00000d30 5f 64 61 74 61 5f 73 69 7a 65 25 2d 34 20 88 20 |_data_size%-4 . | 00000d40 34 3a 64 65 66 61 75 6c 74 73 25 21 48 25 3d 30 |4:defaults%!H%=0| 00000d50 3a ed 0d 04 2e 1d 70 72 69 6e 74 65 72 5f 64 61 |:.....printer_da| 00000d60 74 61 25 20 3d 20 64 65 66 61 75 6c 74 73 25 0d |ta% = defaults%.| 00000d70 04 38 1e 48 25 3d 8e 22 3c 50 44 72 69 76 65 72 |.8.H%=."<PDriver| 00000d80 24 64 69 72 3e 2e 50 72 44 61 74 61 22 0d 04 42 |$dir>.PrData"..B| 00000d90 2f e7 20 48 25 3d 30 20 85 20 31 30 30 2c 22 43 |/. H%=0 . 100,"C| 00000da0 61 6e 27 74 20 72 65 61 64 20 70 72 69 6e 74 65 |an't read printe| 00000db0 72 20 64 61 74 61 20 66 69 6c 65 22 0d 04 4c 05 |r data file"..L.| 00000dc0 f5 0d 04 56 10 20 70 74 72 25 20 3d 20 8f 23 48 |...V. ptr% = .#H| 00000dd0 25 0d 04 60 1e 20 f2 50 72 69 6e 74 65 72 5f 70 |%..`. .Printer_p| 00000de0 72 6f 63 65 73 73 5f 6c 69 6e 65 28 48 25 29 0d |rocess_line(H%).| 00000df0 04 6a 0a fd 20 c5 23 48 25 0d 04 74 08 d9 23 48 |.j.. .#H%..t..#H| 00000e00 25 0d 04 7e 05 e1 0d 04 88 05 3a 0d 04 92 33 f4 |%..~......:...3.| 00000e10 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | ***************| 00000e20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000e30 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 04 |**************..| 00000e40 9c 32 f4 20 70 72 6f 63 65 73 73 20 6f 6e 65 20 |.2. process one | 00000e50 6c 69 6e 65 20 66 72 6f 6d 20 74 68 65 20 63 6f |line from the co| 00000e60 6e 66 69 67 75 72 61 74 69 6f 6e 20 66 69 6c 65 |nfiguration file| 00000e70 0d 04 a6 33 f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |...3. **********| 00000e80 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000ea0 2a 2a 2a 0d 04 b0 1e dd f2 50 72 69 6e 74 65 72 |***......Printer| 00000eb0 5f 70 72 6f 63 65 73 73 5f 6c 69 6e 65 28 48 25 |_process_line(H%| 00000ec0 29 0d 04 ba 10 ea 20 49 25 2c 4a 25 2c 74 61 67 |)..... I%,J%,tag| 00000ed0 24 0d 04 c4 0e 24 62 75 66 25 3d be 23 48 25 0d |$....$buf%=.#H%.| 00000ee0 04 ce 08 49 25 3d 30 0d 04 d8 23 c8 95 20 a4 74 |...I%=0...#.. .t| 00000ef0 61 67 63 68 61 72 28 62 75 66 25 3f 49 25 29 3a |agchar(buf%?I%):| 00000f00 20 49 25 20 2b 3d 20 31 3a ce 0d 04 e2 16 e7 20 | I% += 1:...... | 00000f10 62 75 66 25 3f 49 25 20 3d 20 97 22 3a 22 20 8c |buf%?I% = .":" .| 00000f20 0d 04 ec 10 20 f4 20 67 6f 74 20 61 20 74 61 67 |.... . got a tag| 00000f30 0d 04 f6 20 20 74 61 67 24 3d a4 6c 6f 77 65 72 |... tag$=.lower| 00000f40 63 61 73 65 28 c0 24 62 75 66 25 2c 49 25 29 29 |case(.$buf%,I%))| 00000f50 0d 05 00 0c 20 49 25 20 2b 3d 20 31 0d 05 0a 1f |.... I% += 1....| 00000f60 20 c8 95 20 62 75 66 25 3f 49 25 3d 97 22 20 22 | .. buf%?I%=." "| 00000f70 3a 20 49 25 20 2b 3d 20 31 3a ce 0d 05 14 0e 20 |: I% += 1:..... | 00000f80 c8 8e 20 74 61 67 24 20 ca 0d 05 1e 16 20 20 c9 |.. tag$ ..... .| 00000f90 20 22 70 72 69 6e 74 65 72 5f 6e 61 6d 65 22 0d | "printer_name".| 00000fa0 05 28 15 20 20 20 f4 20 62 75 69 6c 64 20 61 20 |.(. . build a | 00000fb0 6e 61 6d 65 0d 05 32 23 20 20 20 de 20 64 65 73 |name..2# . des| 00000fc0 63 72 69 70 74 69 6f 6e 25 20 a9 24 62 75 66 25 |cription% .$buf%| 00000fd0 20 2d 49 25 20 2b 31 0d 05 3c 28 20 20 20 24 64 | -I% +1..<( $d| 00000fe0 65 73 63 72 69 70 74 69 6f 6e 25 20 3d 20 c2 24 |escription% = .$| 00000ff0 62 75 66 25 2c a9 24 62 75 66 25 2d 49 25 29 0d |buf%,.$buf%-I%).| 00001000 05 46 3b 20 20 20 f4 20 6e 6f 77 20 61 64 64 20 |.F; . now add | 00001010 61 20 62 6c 6f 63 6b 20 74 6f 20 6f 75 72 20 6c |a block to our l| 00001020 69 73 74 20 6f 66 20 70 72 69 6e 74 65 72 20 64 |ist of printer d| 00001030 61 74 61 20 62 6c 6f 63 6b 73 0d 05 50 29 20 20 |ata blocks..P) | 00001040 20 de 20 70 72 69 6e 74 65 72 5f 64 61 74 61 25 | . printer_data%| 00001050 20 70 72 69 6e 74 65 72 5f 64 61 74 61 5f 73 69 | printer_data_si| 00001060 7a 65 25 0d 05 5a 28 20 20 20 e3 20 49 25 3d 30 |ze%..Z( . I%=0| 00001070 20 b8 20 70 72 69 6e 74 65 72 5f 64 61 74 61 5f | . printer_data_| 00001080 73 69 7a 65 25 2d 34 20 88 20 34 0d 05 64 28 20 |size%-4 . 4..d( | 00001090 20 20 20 20 70 72 69 6e 74 65 72 5f 64 61 74 61 | printer_data| 000010a0 25 21 49 25 20 3d 20 64 65 66 61 75 6c 74 73 25 |%!I% = defaults%| 000010b0 21 49 25 0d 05 6e 08 20 20 20 ed 0d 05 78 36 20 |!I%..n. ...x6 | 000010c0 20 20 70 72 69 6e 74 65 72 5f 64 61 74 61 25 21 | printer_data%!| 000010d0 64 65 73 63 72 69 70 74 69 6f 6e 5f 66 69 65 6c |description_fiel| 000010e0 64 25 20 3d 20 64 65 73 63 72 69 70 74 69 6f 6e |d% = description| 000010f0 25 0d 05 82 0f 20 20 20 e7 20 50 25 3d 30 20 8c |%.... . P%=0 .| 00001100 0d 05 8c 2a 20 20 20 20 70 72 69 6e 74 65 72 5f |...* printer_| 00001110 64 61 74 61 5f 6c 69 73 74 25 20 3d 20 70 72 69 |data_list% = pri| 00001120 6e 74 65 72 5f 64 61 74 61 25 0d 05 96 08 20 20 |nter_data%.... | 00001130 20 cc 0d 05 a0 2e 20 20 20 20 50 25 21 6c 69 73 | ..... P%!lis| 00001140 74 5f 70 6f 69 6e 74 65 72 5f 66 69 65 6c 64 25 |t_pointer_field%| 00001150 20 3d 20 70 72 69 6e 74 65 72 5f 64 61 74 61 25 | = printer_data%| 00001160 0d 05 aa 08 20 20 20 cd 0d 05 b4 19 20 20 20 50 |.... ..... P| 00001170 25 20 3d 20 70 72 69 6e 74 65 72 5f 64 61 74 61 |% = printer_data| 00001180 25 0d 05 be a2 20 20 c9 20 22 70 78 72 65 73 22 |%.... . "pxres"| 00001190 2c 22 70 79 72 65 73 22 2c 22 66 65 61 74 75 72 |,"pyres","featur| 000011a0 65 73 22 2c 22 70 78 72 65 73 5f 68 61 6c 66 74 |es","pxres_halft| 000011b0 6f 6e 65 22 2c 22 70 79 72 65 73 5f 68 61 6c 66 |one","pyres_half| 000011c0 74 6f 6e 65 22 2c 22 70 72 69 6e 74 65 72 5f 6e |tone","printer_n| 000011d0 75 6d 62 65 72 22 2c 22 70 61 67 65 5f 77 69 64 |umber","page_wid| 000011e0 74 68 22 2c 22 70 61 67 65 5f 68 65 69 67 68 74 |th","page_height| 000011f0 22 2c 22 70 61 67 65 5f 62 6f 74 74 6f 6d 22 2c |","page_bottom",| 00001200 22 70 61 67 65 5f 74 6f 70 22 2c 22 70 61 67 65 |"page_top","page| 00001210 5f 6c 65 66 74 22 2c 22 70 61 67 65 5f 72 69 67 |_left","page_rig| 00001220 68 74 22 0d 05 c8 48 20 20 20 f4 20 6e 6f 74 65 |ht"...H . note| 00001230 20 74 68 61 74 20 61 6c 6c 20 74 61 67 73 20 61 | that all tags a| 00001240 72 65 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 |re the same as t| 00001250 68 65 69 72 20 72 65 73 70 65 63 74 69 76 65 20 |heir respective | 00001260 66 69 65 6c 64 20 6e 61 6d 65 73 0d 05 d2 54 20 |field names...T | 00001270 20 20 70 72 69 6e 74 65 72 5f 64 61 74 61 25 21 | printer_data%!| 00001280 a0 28 74 61 67 24 2b 22 5f 66 69 65 6c 64 25 22 |.(tag$+"_field%"| 00001290 29 20 3d 20 a4 72 65 61 64 5f 69 6e 74 65 67 65 |) = .read_intege| 000012a0 72 5f 65 78 70 72 65 73 73 69 6f 6e 28 c2 24 62 |r_expression(.$b| 000012b0 75 66 25 2c a9 24 62 75 66 25 2d 49 25 29 29 0d |uf%,.$buf%-I%)).| 000012c0 05 dc 20 20 20 c9 20 22 64 75 6d 70 5f 64 65 70 |.. . "dump_dep| 000012d0 74 68 22 2c 22 69 6e 74 65 72 6c 61 63 65 22 0d |th","interlace".| 000012e0 05 e6 54 20 20 20 70 72 69 6e 74 65 72 5f 64 61 |..T printer_da| 000012f0 74 61 25 3f a0 28 74 61 67 24 2b 22 5f 66 69 65 |ta%?.(tag$+"_fie| 00001300 6c 64 25 22 29 20 3d 20 a4 72 65 61 64 5f 69 6e |ld%") = .read_in| 00001310 74 65 67 65 72 5f 65 78 70 72 65 73 73 69 6f 6e |teger_expression| 00001320 28 c2 24 62 75 66 25 2c a9 24 62 75 66 25 2d 49 |(.$buf%,.$buf%-I| 00001330 25 29 29 0d 05 f0 56 20 20 c9 20 22 6c 69 6e 65 |%))...V . "line| 00001340 5f 70 72 6f 6c 6f 67 75 65 22 2c 22 6c 69 6e 65 |_prologue","line| 00001350 5f 65 70 69 6c 6f 67 75 65 22 2c 22 6c 69 6e 65 |_epilogue","line| 00001360 5f 69 6e 74 65 72 6c 61 63 65 22 2c 22 6a 6f 62 |_interlace","job| 00001370 5f 70 72 6f 6c 6f 67 75 65 22 2c 22 6a 6f 62 5f |_prologue","job_| 00001380 65 70 69 6c 6f 67 75 65 22 0d 05 fa 1e 20 20 20 |epilogue".... | 00001390 c8 95 20 62 75 66 25 3f 49 25 3d 97 22 20 22 3a |.. buf%?I%=." ":| 000013a0 49 25 2b 3d 31 3a ce 0d 06 04 1d 20 20 20 4a 25 |I%+=1:..... J%| 000013b0 20 3d 20 a0 28 74 61 67 24 2b 22 5f 66 69 65 6c | = .(tag$+"_fiel| 000013c0 64 25 22 29 0d 06 0e 3b 20 20 20 c8 99 20 22 4f |d%")...; .. "O| 000013d0 53 5f 47 53 54 72 61 6e 73 22 2c 62 75 66 25 2b |S_GSTrans",buf%+| 000013e0 49 25 2c 70 72 69 6e 74 65 72 5f 64 61 74 61 25 |I%,printer_data%| 000013f0 2b 31 2b 4a 25 2c 32 30 20 b8 20 2c 2c 49 25 0d |+1+J%,20 . ,,I%.| 00001400 06 18 1c 20 20 20 70 72 69 6e 74 65 72 5f 64 61 |... printer_da| 00001410 74 61 25 3f 4a 25 20 3d 20 49 25 0d 06 22 10 20 |ta%?J% = I%..". | 00001420 20 c9 20 22 73 65 72 76 65 72 22 0d 06 2c 0e 20 | . "server"..,. | 00001430 20 20 4a 25 20 3d 20 49 25 0d 06 36 27 20 20 20 | J% = I%..6' | 00001440 c8 95 20 62 75 66 25 3f 4a 25 3e 3d 97 22 20 22 |.. buf%?J%>=." "| 00001450 20 80 20 62 75 66 25 3f 4a 25 3c 3e 97 22 3b 22 | . buf%?J%<>.";"| 00001460 0d 06 40 0f 20 20 20 20 4a 25 20 2b 3d 20 31 0d |..@. J% += 1.| 00001470 06 4a 08 20 20 20 ce 0d 06 54 24 20 20 20 f4 20 |.J. ...T$ . | 00001480 66 72 6f 6d 20 49 25 20 74 6f 20 4a 25 20 69 73 |from I% to J% is| 00001490 20 74 68 65 20 73 74 72 69 6e 67 0d 06 5e 1e 20 | the string..^. | 000014a0 20 20 73 65 72 76 65 72 5f 70 74 72 25 20 3d 20 | server_ptr% = | 000014b0 70 74 72 25 20 2b 20 49 25 0d 06 68 2c 20 20 20 |ptr% + I%..h, | 000014c0 73 65 72 76 65 72 5f 63 6f 6e 66 69 67 24 20 3d |server_config$ =| 000014d0 20 c1 24 62 75 66 25 2c 20 49 25 2b 31 2c 20 4a | .$buf%, I%+1, J| 000014e0 25 2d 49 25 29 0d 06 72 11 20 20 c9 20 22 70 72 |%-I%)..r. . "pr| 000014f0 69 6e 74 65 72 22 0d 06 7c 1e 20 20 20 70 72 69 |inter"..|. pri| 00001500 6e 74 65 72 5f 63 6f 6e 66 69 67 25 20 3d 20 a4 |nter_config% = .| 00001510 72 65 61 64 0d 06 86 25 20 20 20 70 72 69 6e 74 |read...% print| 00001520 65 72 5f 6e 65 77 25 20 3d 20 70 72 69 6e 74 65 |er_new% = printe| 00001530 72 5f 63 6f 6e 66 69 67 25 0d 06 90 1f 20 20 20 |r_config%.... | 00001540 70 72 69 6e 74 65 72 5f 70 74 72 25 20 3d 20 70 |printer_ptr% = p| 00001550 74 72 25 20 2b 20 49 25 0d 06 9a 12 20 20 c9 20 |tr% + I%.... . | 00001560 22 6c 6f 63 61 74 69 6f 6e 22 0d 06 a4 1f 20 20 |"location".... | 00001570 20 6c 6f 63 61 74 69 6f 6e 5f 63 6f 6e 66 69 67 | location_config| 00001580 25 20 3d 20 a4 72 65 61 64 0d 06 ae 20 20 20 20 |% = .read... | 00001590 6c 6f 63 61 74 69 6f 6e 5f 70 74 72 25 20 3d 20 |location_ptr% = | 000015a0 70 74 72 25 20 2b 20 49 25 0d 06 b8 0e 20 20 c9 |ptr% + I%.... .| 000015b0 20 22 62 61 75 64 22 0d 06 c2 1b 20 20 20 62 61 | "baud".... ba| 000015c0 75 64 5f 63 6f 6e 66 69 67 25 20 3d 20 a4 72 65 |ud_config% = .re| 000015d0 61 64 0d 06 cc 1c 20 20 20 62 61 75 64 5f 70 74 |ad.... baud_pt| 000015e0 72 25 20 3d 20 70 74 72 25 20 2b 20 49 25 0d 06 |r% = ptr% + I%..| 000015f0 d6 0e 20 20 c9 20 22 64 61 74 61 22 0d 06 e0 1b |.. . "data"....| 00001600 20 20 20 64 61 74 61 5f 63 6f 6e 66 69 67 25 20 | data_config% | 00001610 3d 20 a4 72 65 61 64 0d 06 ea 1c 20 20 20 64 61 |= .read.... da| 00001620 74 61 5f 70 74 72 25 20 3d 20 70 74 72 25 20 2b |ta_ptr% = ptr% +| 00001630 20 49 25 0d 06 f4 0d 20 20 c9 20 22 78 6f 6e 22 | I%.... . "xon"| 00001640 0d 06 fe 1a 20 20 20 58 4f 4e 5f 63 6f 6e 66 69 |.... XON_confi| 00001650 67 25 20 3d 20 a4 72 65 61 64 0d 07 08 1d 20 20 |g% = .read.... | 00001660 20 58 4f 4e 5f 6e 65 77 25 20 3d 20 58 4f 4e 5f | XON_new% = XON_| 00001670 63 6f 6e 66 69 67 25 0d 07 12 1b 20 20 20 58 4f |config%.... XO| 00001680 4e 5f 70 74 72 25 20 3d 20 70 74 72 25 20 2b 20 |N_ptr% = ptr% + | 00001690 49 25 0d 07 1c 0e 20 20 c9 20 22 6c 69 6e 65 22 |I%.... . "line"| 000016a0 0d 07 26 1b 20 20 20 6c 69 6e 65 5f 63 6f 6e 66 |..&. line_conf| 000016b0 69 67 25 20 3d 20 a4 72 65 61 64 0d 07 30 1f 20 |ig% = .read..0. | 000016c0 20 20 6c 69 6e 65 5f 6e 65 77 25 20 3d 20 6c 69 | line_new% = li| 000016d0 6e 65 5f 63 6f 6e 66 69 67 25 0d 07 3a 1c 20 20 |ne_config%..:. | 000016e0 20 6c 69 6e 65 5f 70 74 72 25 20 3d 20 70 74 72 | line_ptr% = ptr| 000016f0 25 20 2b 20 49 25 0d 07 44 06 20 cb 0d 07 4e 05 |% + I%..D. ...N.| 00001700 cd 0d 07 58 05 e1 0d 07 62 05 3a 0d 07 6c 36 dd |...X....b.:..l6.| 00001710 a4 72 65 61 64 3d a4 72 65 61 64 5f 69 6e 74 65 |.read=.read_inte| 00001720 67 65 72 5f 65 78 70 72 65 73 73 69 6f 6e 28 c2 |ger_expression(.| 00001730 24 62 75 66 25 2c a9 24 62 75 66 25 2d 49 25 29 |$buf%,.$buf%-I%)| 00001740 29 0d 07 76 05 3a 0d 07 80 2d f4 20 2a 2a 2a 2a |)..v.:...-. ****| 00001750 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00001770 2a 2a 2a 0d 07 8a 24 f4 20 63 6f 6e 76 65 72 74 |***...$. convert| 00001780 20 61 20 73 74 72 69 6e 67 20 74 6f 20 61 6e 20 | a string to an | 00001790 69 6e 74 65 67 65 72 0d 07 94 2d f4 20 2a 2a 2a |integer...-. ***| 000017a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000017c0 2a 2a 2a 2a 0d 07 9e 21 dd a4 72 65 61 64 5f 69 |****...!..read_i| 000017d0 6e 74 65 67 65 72 5f 65 78 70 72 65 73 73 69 6f |nteger_expressio| 000017e0 6e 28 53 24 29 0d 07 a8 14 ea 20 52 25 2c 20 54 |n(S$)..... R%, T| 000017f0 25 2c 20 45 24 2c 20 50 25 0d 07 b2 09 45 24 3d |%, E$, P%....E$=| 00001800 22 22 0d 07 bc 1c f4 20 67 65 74 20 72 69 64 20 |""..... get rid | 00001810 6f 66 20 61 6e 79 20 63 6f 6d 6d 65 6e 74 0d 07 |of any comment..| 00001820 c6 1f c8 95 20 c0 53 24 2c 31 29 20 3c 3e 20 22 |.... .S$,1) <> "| 00001830 3b 22 20 80 20 a9 53 24 20 3c 3e 20 30 0d 07 d0 |;" . .S$ <> 0...| 00001840 11 20 45 24 20 2b 3d 20 c0 53 24 2c 31 29 0d 07 |. E$ += .S$,1)..| 00001850 da 14 20 53 24 20 3d 20 c2 53 24 2c a9 53 24 2d |.. S$ = .S$,.S$-| 00001860 31 29 0d 07 e4 05 ce 0d 07 ee 36 c8 99 22 58 4f |1)........6.."XO| 00001870 53 5f 45 76 61 6c 75 61 74 65 45 78 70 72 65 73 |S_EvaluateExpres| 00001880 73 69 6f 6e 22 2c 45 24 2c 62 75 66 25 2c 32 35 |sion",E$,buf%,25| 00001890 36 20 b8 20 2c 54 25 2c 52 25 3b 50 25 0d 07 f8 |6 . ,T%,R%;P%...| 000018a0 40 e7 20 54 25 20 3c 3e 20 30 20 84 20 28 50 25 |@. T% <> 0 . (P%| 000018b0 20 80 20 31 29 20 85 20 31 30 30 2c 20 22 49 6e | . 1) . 100, "In| 000018c0 74 65 67 65 72 20 76 61 6c 75 65 20 6e 65 65 64 |teger value need| 000018d0 65 64 20 66 6f 72 20 22 2b 74 61 67 24 0d 08 02 |ed for "+tag$...| 000018e0 07 3d 52 25 0d 08 0c 05 3a 0d 08 16 2d f4 20 2a |.=R%....:...-. *| 000018f0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00001910 2a 2a 2a 2a 2a 2a 0d 08 20 2c f4 20 61 6c 6c 6f |******.. ,. allo| 00001920 77 20 6f 6e 6c 79 20 61 6c 70 68 61 6e 75 6d 65 |w only alphanume| 00001930 72 69 63 73 20 69 6e 20 74 61 67 20 66 69 65 6c |rics in tag fiel| 00001940 64 73 0d 08 2a 2d f4 20 2a 2a 2a 2a 2a 2a 2a 2a |ds..*-. ********| 00001950 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00001960 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d |***************.| 00001970 08 34 11 dd a4 74 61 67 63 68 61 72 28 43 25 29 |.4...tagchar(C%)| 00001980 0d 08 3e 24 e7 20 28 43 25 20 3e 3d 20 97 22 41 |..>$. (C% >= ."A| 00001990 22 20 80 20 43 25 20 3c 3d 20 97 22 5a 22 29 20 |" . C% <= ."Z") | 000019a0 8c 20 3d b9 0d 08 48 24 e7 20 28 43 25 20 3e 3d |. =...H$. (C% >=| 000019b0 20 97 22 61 22 20 80 20 43 25 20 3c 3d 20 97 22 | ."a" . C% <= ."| 000019c0 7a 22 29 20 8c 20 3d b9 0d 08 52 2c 3d 20 20 28 |z") . =...R,= (| 000019d0 43 25 20 3e 3d 20 97 22 30 22 20 80 20 43 25 20 |C% >= ."0" . C% | 000019e0 3c 3d 20 97 22 39 22 29 20 84 20 43 25 20 3d 20 |<= ."9") . C% = | 000019f0 97 22 5f 22 0d 08 5c 05 3a 0d 08 66 4b f4 20 2a |."_"..\.:..fK. *| 00001a00 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00001a40 2a 2a 2a 2a 0d 08 70 4b f4 20 73 65 74 20 74 68 |****..pK. set th| 00001a50 65 20 70 72 69 6e 74 65 72 20 64 72 69 76 65 72 |e printer driver| 00001a60 20 6d 6f 64 75 6c 65 27 73 20 73 74 61 74 65 20 | module's state | 00001a70 74 6f 20 72 65 66 6c 65 63 74 20 74 68 65 20 63 |to reflect the c| 00001a80 75 72 72 65 6e 74 20 73 65 74 74 69 6e 67 73 0d |urrent settings.| 00001a90 08 7a 4b f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |.zK. ***********| 00001aa0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00001ad0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 08 84 1d dd f2 |**********......| 00001ae0 50 72 69 6e 74 65 72 5f 73 65 74 5f 6d 6f 64 75 |Printer_set_modu| 00001af0 6c 65 5f 64 61 74 61 0d 08 8e 17 ea 20 41 25 2c |le_data..... A%,| 00001b00 42 25 2c 43 25 2c 44 25 2c 45 25 2c 46 25 0d 08 |B%,C%,D%,E%,F%..| 00001b10 98 1d 41 25 3d 64 65 66 61 75 6c 74 73 25 21 70 |..A%=defaults%!p| 00001b20 78 72 65 73 5f 66 69 65 6c 64 25 0d 08 a2 1d 42 |xres_field%....B| 00001b30 25 3d 64 65 66 61 75 6c 74 73 25 21 70 79 72 65 |%=defaults%!pyre| 00001b40 73 5f 66 69 65 6c 64 25 0d 08 ac 20 43 25 3d 64 |s_field%... C%=d| 00001b50 65 66 61 75 6c 74 73 25 21 66 65 61 74 75 72 65 |efaults%!feature| 00001b60 73 5f 66 69 65 6c 64 25 0d 08 b6 26 44 25 3d 64 |s_field%...&D%=d| 00001b70 65 66 61 75 6c 74 73 25 21 70 78 72 65 73 5f 68 |efaults%!pxres_h| 00001b80 61 6c 66 74 6f 6e 65 5f 66 69 65 6c 64 25 0d 08 |alftone_field%..| 00001b90 c0 26 45 25 3d 64 65 66 61 75 6c 74 73 25 21 70 |.&E%=defaults%!p| 00001ba0 79 72 65 73 5f 68 61 6c 66 74 6f 6e 65 5f 66 69 |yres_halftone_fi| 00001bb0 65 6c 64 25 0d 08 ca 26 46 25 3d 64 65 66 61 75 |eld%...&F%=defau| 00001bc0 6c 74 73 25 21 70 72 69 6e 74 65 72 5f 6e 75 6d |lts%!printer_num| 00001bd0 62 65 72 5f 66 69 65 6c 64 25 0d 08 d4 2c c8 99 |ber_field%...,..| 00001be0 20 22 50 44 72 69 76 65 72 5f 53 65 74 49 6e 66 | "PDriver_SetInf| 00001bf0 6f 22 2c 2c 41 25 2c 42 25 2c 43 25 2c 2c 44 25 |o",,A%,B%,C%,,D%| 00001c00 2c 45 25 2c 46 25 0d 08 de 0d 6d 73 67 25 21 30 |,E%,F%....msg%!0| 00001c10 3d 32 30 0d 08 e8 0d 6d 73 67 25 21 31 32 3d 30 |=20....msg%!12=0| 00001c20 0d 08 f2 1f 6d 73 67 25 21 31 36 3d 4d 65 73 73 |....msg%!16=Mess| 00001c30 61 67 65 5f 53 65 74 50 72 69 6e 74 65 72 25 0d |age_SetPrinter%.| 00001c40 08 fc 26 c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 |..&.. "Wimp_Send| 00001c50 4d 65 73 73 61 67 65 22 2c 20 31 38 2c 20 6d 73 |Message", 18, ms| 00001c60 67 25 2c 20 30 0d 09 06 22 41 25 3d 64 65 66 61 |g%, 0..."A%=defa| 00001c70 75 6c 74 73 25 21 70 61 67 65 5f 77 69 64 74 68 |ults%!page_width| 00001c80 5f 66 69 65 6c 64 25 0d 09 10 23 42 25 3d 64 65 |_field%...#B%=de| 00001c90 66 61 75 6c 74 73 25 21 70 61 67 65 5f 68 65 69 |faults%!page_hei| 00001ca0 67 68 74 5f 66 69 65 6c 64 25 0d 09 1a 21 43 25 |ght_field%...!C%| 00001cb0 3d 64 65 66 61 75 6c 74 73 25 21 70 61 67 65 5f |=defaults%!page_| 00001cc0 6c 65 66 74 5f 66 69 65 6c 64 25 0d 09 24 23 44 |left_field%..$#D| 00001cd0 25 3d 64 65 66 61 75 6c 74 73 25 21 70 61 67 65 |%=defaults%!page| 00001ce0 5f 62 6f 74 74 6f 6d 5f 66 69 65 6c 64 25 0d 09 |_bottom_field%..| 00001cf0 2e 22 45 25 3d 64 65 66 61 75 6c 74 73 25 21 70 |."E%=defaults%!p| 00001d00 61 67 65 5f 72 69 67 68 74 5f 66 69 65 6c 64 25 |age_right_field%| 00001d10 0d 09 38 20 46 25 3d 64 65 66 61 75 6c 74 73 25 |..8 F%=defaults%| 00001d20 21 70 61 67 65 5f 74 6f 70 5f 66 69 65 6c 64 25 |!page_top_field%| 00001d30 0d 09 42 2f c8 99 20 22 50 44 72 69 76 65 72 5f |..B/.. "PDriver_| 00001d40 53 65 74 50 61 67 65 53 69 7a 65 22 2c 2c 41 25 |SetPageSize",,A%| 00001d50 2c 42 25 2c 43 25 2c 44 25 2c 45 25 2c 46 25 0d |,B%,C%,D%,E%,F%.| 00001d60 09 4c 37 c8 99 20 22 50 44 72 69 76 65 72 5f 53 |.L7.. "PDriver_S| 00001d70 65 74 50 72 69 6e 74 65 72 22 2c 64 65 66 61 75 |etPrinter",defau| 00001d80 6c 74 73 25 2b 64 75 6d 70 5f 64 65 70 74 68 5f |lts%+dump_depth_| 00001d90 66 69 65 6c 64 25 0d 09 56 05 e1 0d 09 60 05 3a |field%..V....`.:| 00001da0 0d 09 6a 2d f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |..j-. **********| 00001db0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00001dc0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 09 74 |*************..t| 00001dd0 2d f4 20 73 65 74 20 74 68 65 20 64 65 73 63 72 |-. set the descr| 00001de0 69 70 74 69 6f 6e 20 66 69 65 6c 64 20 69 6e 20 |iption field in | 00001df0 6f 75 72 20 77 69 6e 64 6f 77 0d 09 7e 2d f4 20 |our window..~-. | 00001e00 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00001e20 2a 2a 2a 2a 2a 2a 2a 0d 09 88 1d dd f2 50 72 69 |*******......Pri| 00001e30 6e 74 65 72 5f 73 65 74 5f 64 65 73 63 72 69 70 |nter_set_descrip| 00001e40 74 69 6f 6e 0d 09 92 0c ea 20 53 25 2c 20 53 24 |tion..... S%, S$| 00001e50 0d 09 9c 27 e3 20 53 25 20 3d 20 30 20 b8 20 70 |...'. S% = 0 . p| 00001e60 72 69 6e 74 65 72 5f 64 61 74 61 5f 73 69 7a 65 |rinter_data_size| 00001e70 25 2d 34 20 88 20 34 0d 09 a6 28 64 65 66 61 75 |%-4 . 4...(defau| 00001e80 6c 74 73 25 21 53 25 20 3d 20 70 72 69 6e 74 65 |lts%!S% = printe| 00001e90 72 5f 64 61 74 61 5f 6c 69 73 74 25 21 53 25 0d |r_data_list%!S%.| 00001ea0 09 b0 05 ed 0d 09 ba 48 f2 50 72 69 6e 74 65 72 |.......H.Printer| 00001eb0 5f 73 65 74 5f 69 63 6f 6e 28 6d 61 69 6e 5f 64 |_set_icon(main_d| 00001ec0 65 73 63 72 69 70 74 69 6f 6e 25 2c 24 28 64 65 |escription%,$(de| 00001ed0 66 61 75 6c 74 73 25 21 64 65 73 63 72 69 70 74 |faults%!descript| 00001ee0 69 6f 6e 5f 66 69 65 6c 64 25 29 29 0d 09 c4 4a |ion_field%))...J| 00001ef0 c8 99 20 22 58 4f 53 5f 43 4c 49 22 2c 22 53 45 |.. "XOS_CLI","SE| 00001f00 54 20 50 72 69 6e 74 65 72 24 22 2b 22 20 22 22 |T Printer$"+" ""| 00001f10 22 2b 24 28 64 65 66 61 75 6c 74 73 25 21 64 65 |"+$(defaults%!de| 00001f20 73 63 72 69 70 74 69 6f 6e 5f 66 69 65 6c 64 25 |scription_field%| 00001f30 29 2b 22 22 22 22 0d 09 ce 05 e1 0d 09 d8 05 3a |)+"""".........:| 00001f40 0d 09 e2 2e dd f2 50 72 69 6e 74 65 72 5f 73 65 |......Printer_se| 00001f50 74 5f 6e 75 6d 65 72 69 63 5f 69 63 6f 6e 28 49 |t_numeric_icon(I| 00001f60 25 2c 46 25 2c 53 25 2c 20 f8 20 53 24 29 0d 09 |%,F%,S%, . S$)..| 00001f70 ec 1b 53 24 20 3d 20 c3 28 64 65 66 61 75 6c 74 |..S$ = .(default| 00001f80 73 25 21 46 25 2f 53 25 29 0d 09 f6 1c f2 50 72 |s%!F%/S%).....Pr| 00001f90 69 6e 74 65 72 5f 73 65 74 5f 69 63 6f 6e 28 49 |inter_set_icon(I| 00001fa0 25 2c 53 24 29 0d 0a 00 05 e1 0d 0a 0a 05 3a 0d |%,S$).........:.| 00001fb0 0a 14 1d dd f2 50 72 69 6e 74 65 72 5f 73 65 74 |.....Printer_set| 00001fc0 5f 69 63 6f 6e 28 49 25 2c 53 24 29 0d 0a 1e 08 |_icon(I%,S$)....| 00001fd0 ea 20 53 25 0d 0a 28 1a 53 25 3d a4 69 63 6f 6e |. S%..(.S%=.icon| 00001fe0 61 64 64 72 28 6d 61 69 6e 25 2c 49 25 29 0d 0a |addr(main%,I%)..| 00001ff0 32 0c 24 53 25 20 3d 20 53 24 0d 0a 3c 17 f2 7a |2.$S% = S$..<..z| 00002000 65 72 6f 5f 74 65 72 6d 69 6e 61 74 65 28 53 25 |ero_terminate(S%| 00002010 29 0d 0a 46 31 f2 73 65 74 5f 69 63 6f 6e 5f 73 |)..F1.set_icon_s| 00002020 74 61 74 65 28 6d 61 69 6e 25 2c 49 25 2c 30 2c |tate(main%,I%,0,| 00002030 30 29 3a 20 f4 20 66 6f 72 63 65 20 72 65 64 72 |0): . force redr| 00002040 61 77 0d 0a 50 05 e1 0d 0a 5a 05 3a 0d 0a 64 1a |aw..P....Z.:..d.| 00002050 dd 20 f2 50 72 69 6e 74 65 72 5f 41 6d 65 6e 64 |. .Printer_Amend| 00002060 43 6f 6e 66 69 67 0d 0a 6e 21 e7 20 6c 69 6e 65 |Config..n!. line| 00002070 5f 63 6f 6e 66 69 67 25 20 3c 3e 20 6c 69 6e 65 |_config% <> line| 00002080 5f 6e 65 77 25 20 8c 0d 0a 78 1a 20 cf 23 6f 75 |_new% ...x. .#ou| 00002090 74 5f 66 69 6c 65 25 3d 6c 69 6e 65 5f 70 74 72 |t_file%=line_ptr| 000020a0 25 0d 0a 82 1c 20 d5 23 6f 75 74 5f 66 69 6c 65 |%.... .#out_file| 000020b0 25 2c c3 6c 69 6e 65 5f 6e 65 77 25 3b 0d 0a 8c |%,.line_new%;...| 000020c0 1d 20 6c 69 6e 65 5f 63 6f 6e 66 69 67 25 20 3d |. line_config% =| 000020d0 20 6c 69 6e 65 5f 6e 65 77 25 0d 0a 96 05 cd 0d | line_new%......| 000020e0 0a a0 05 e1 0d 0a aa 05 3a 0d 0a b4 15 dd 20 f2 |........:..... .| 000020f0 50 72 69 6e 74 65 72 5f 49 67 6e 6f 72 65 0d 0a |Printer_Ignore..| 00002100 be 05 e1 0d 0a c8 05 3a 0d 0a d2 1d dd 20 f2 50 |.......:..... .P| 00002110 72 69 6e 74 65 72 5f 58 6f 6e 58 6f 66 66 28 66 |rinter_XonXoff(f| 00002120 6c 61 67 25 29 0d 0a dc 0d e7 20 66 6c 61 67 25 |lag%)..... flag%| 00002130 20 8c 0d 0a e6 0c 20 2a 66 78 20 32 2c 32 0d 0a | ..... *fx 2,2..| 00002140 f0 05 cc 0d 0a fa 0c 20 2a 66 78 20 32 2c 30 0d |....... *fx 2,0.| 00002150 0b 04 05 cd 0d 0b 0e 05 e1 0d 0b 18 05 3a 0d 0b |.............:..| 00002160 22 15 dd 20 f2 50 72 69 6e 74 65 72 5f 48 65 61 |".. .Printer_Hea| 00002170 64 65 72 0d 0b 2c 14 60 65 78 74 25 3d a2 23 69 |der..,.`ext%=.#i| 00002180 6e 5f 66 69 6c 65 25 0d 0b 36 0d 60 6c 61 73 74 |n_file%..6.`last| 00002190 25 3d 2d 31 0d 0b 40 05 e1 0d 0b 4a 05 3a 0d 0b |%=-1..@....J.:..| 000021a0 54 15 dd 20 f2 50 72 69 6e 74 65 72 5f 46 6f 6f |T.. .Printer_Foo| 000021b0 74 65 72 0d 0b 5e 05 e1 0d 0b 68 05 3a 0d 0b 72 |ter..^....h.:..r| 000021c0 19 dd 20 a4 50 72 69 6e 74 65 72 5f 53 65 6e 64 |.. .Printer_Send| 000021d0 28 6c 65 6e 25 29 0d 0b 7c 0a f2 45 73 63 4f 6e |(len%)..|..EscOn| 000021e0 0d 0b 86 0e ea 20 4c 25 2c 49 25 2c 43 25 0d 0b |..... L%,I%,C%..| 000021f0 90 19 4c 25 3d 60 65 78 74 25 20 2d 20 8f 23 69 |..L%=`ext% - .#i| 00002200 6e 5f 66 69 6c 65 25 0d 0b 9a 16 e7 20 6c 65 6e |n_file%..... len| 00002210 25 3e 3d 4c 25 20 6c 65 6e 25 3d 4c 25 0d 0b a4 |%>=L% len%=L%...| 00002220 11 e7 20 6c 69 6e 65 5f 6e 65 77 25 20 8c 0d 0b |.. line_new% ...| 00002230 ae 0c 20 49 25 3d 6c 65 6e 25 0d 0b b8 0c 20 c8 |.. I%=len%.... .| 00002240 95 20 49 25 3e 30 0d 0b c2 13 20 20 43 25 3d 9a |. I%>0.... C%=.| 00002250 23 69 6e 5f 66 69 6c 65 25 0d 0b cc 22 20 20 e7 |#in_file%..." .| 00002260 20 43 25 3d 31 30 20 d5 23 6f 75 74 5f 66 69 6c | C%=10 .#out_fil| 00002270 65 25 2c 31 33 3a 49 25 2d 3d 31 0d 0b d6 14 20 |e%,13:I%-=1.... | 00002280 20 d5 23 6f 75 74 5f 66 69 6c 65 25 2c 43 25 0d | .#out_file%,C%.| 00002290 0b e0 22 20 20 e7 20 43 25 3d 31 33 20 d5 23 6f |.." . C%=13 .#o| 000022a0 75 74 5f 66 69 6c 65 25 2c 31 30 3a 49 25 2d 3d |ut_file%,10:I%-=| 000022b0 31 0d 0b ea 0b 20 20 49 25 2d 3d 31 0d 0b f4 0f |1.... I%-=1....| 000022c0 20 20 60 6c 61 73 74 25 3d 43 25 0d 0b fe 06 20 | `last%=C%.... | 000022d0 ce 0d 0c 08 05 cc 0d 0c 12 2a 20 c8 99 20 22 4f |.........* .. "O| 000022e0 53 5f 47 42 50 42 22 2c 20 34 2c 20 69 6e 5f 66 |S_GBPB", 4, in_f| 000022f0 69 6c 65 25 2c 20 62 75 66 25 2c 20 6c 65 6e 25 |ile%, buf%, len%| 00002300 0d 0c 1c 2b 20 c8 99 20 22 4f 53 5f 47 42 50 42 |...+ .. "OS_GBPB| 00002310 22 2c 20 32 2c 20 6f 75 74 5f 66 69 6c 65 25 2c |", 2, out_file%,| 00002320 20 62 75 66 25 2c 20 6c 65 6e 25 0d 0c 26 05 cd | buf%, len%..&..| 00002330 0d 0c 30 0b f2 45 73 63 4f 66 66 0d 0c 3a 0f 3d |..0..EscOff..:.=| 00002340 28 6c 65 6e 25 3e 3d 4c 25 29 0d ff |(len%>=L%)..| 0000234c