Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403.adf » Disk1Mar94 » !AWMar94/Goodies/Edit+Up/!Edit+/Edit+

!AWMar94/Goodies/Edit+Up/!Edit+/Edit+

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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403.adf » Disk1Mar94
Filename: !AWMar94/Goodies/Edit+Up/!Edit+/Edit+
Read OK:
File size: 633E bytes
Load address: 0000
Exec address: 0000
File contents
    1REM --> Edit+
    2
    3REMLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOG
    4REMVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVAL
    5REM This program and all documentation LEN David Holden 1993
    6REMLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOGLOG
    7REMVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVAL
    8
    9version$="Edit Plus Ver 0.40"
   10cprt$="� David Holden 1993"
   11purpose$="Extras for Edit"
   12
   13ON ERROR PROCreport_error(TRUE)
   14
   15PROCinitialise
   16filename$=FNcheck_env:IF filename$<>"" PROCinit_load
   17
   18REPEAT
   19SYS "Wimp_Poll",mask%,blk% TO reason%
   20CASE reason% OF
   21 WHEN 1:IF !blk%=view_w% B%=3:CALLcode%  :REM rdv
   22 WHEN 2:SYS"Wimp_OpenWindow",,blk%
   23 WHEN 3:SYS"Wimp_CloseWindow",,blk%:IF !blk%=layout_w% PROCget_page_layout
   24 WHEN 6:PROCclick
   25 WHEN 7:PROCdrag_term(save_w%)
   26 WHEN 8:SYS"Wimp_ProcessKey",blk%!24
   27 WHEN 9:PROCselect
   28 WHEN 17,18:CASE blk%!16 OF
   29     WHEN 0:PROCdie
   30     WHEN 2:I%=blk%+44:WHILE?I%>31:I%+=1:ENDWHILE:?I%=13:PROCsave($(blk%+44))
   31     WHEN 3:PROCload_file
   32     WHEN 5:IF blk%!40=&28A PROCload_file
   33            ENDCASE
   34ENDCASE
   35IF mask%=0 mask%=FNprint
   36UNTIL FALSE
   37
   38DEFPROCselect
   39SYS"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
   40CASE menu_h% OF
   41WHEN main_m%:
   42 IF blk%!4=-1 THEN
   43   CASE !blk% OF
   44     WHEN 2:!blk%=styles_w%:SYS "Wimp_GetWindowState",,blk%
   45            blk%!28=-1:SYS "Wimp_OpenWindow",,blk%
   46     WHEN 3:PROCstart_print(FALSE)
   47     WHEN 4:!blk%=layout_w%:SYS "Wimp_GetWindowState",,blk%
   48            blk%!28=-1:SYS "Wimp_OpenWindow",,blk%
   49     WHEN 5:IF file%=0 I%=FNalert(1,"No file!") ELSE PROCpreview
   50     WHEN 6:CASE file% OF
   51             WHEN 0:
   52             WHEN 1:IF FNalert(3,"Are you sure, file not printed?")=1 PROCclear_file
   53             WHEN 2:IF FNalert(3,"Are you sure, file still being printed?")=1 PROCclear_file
   54             WHEN 3:PROCclear_file
   55            ENDCASE
   56     WHEN 8:PROCdie
   57   ENDCASE
   58 ELSE
   59  CASE !blk% OF
   60   WHEN 0:PROCimmed_code(blk%!4)
   61   WHEN 1:CASE blk%!4 OF
   62           WHEN 0:SYS "OS_Byte",138,0,15
   63           WHEN 1:SYS "OS_Byte",138,0,18
   64           WHEN 2:SYS "OS_Byte",138,0,20
   65           WHEN 3:SYS "OS_Byte",138,0,6
   66           WHEN 4:SYS "OS_Byte",138,0,16
   67           WHEN 5:SYS "OS_Byte",138,0,12
   68          ENDCASE
   69  ENDCASE
   70 ENDIF
   71WHEN view_m%:
   72  IF blk%!4=-1 THEN
   73   CASE !blk% OF
   74    WHEN 0:IF po% B%=5:IF USRcode% I%=FNalert(1,"No visible page break")
   75    WHEN 1:IF po% B%=4:IF USRcode% I%=FNalert(1,"No visible page break")
   76    WHEN 2:I%=remove_m%+4:A%=0:J%=1
   77           REPEAT
   78            I%+=24:IF !I%AND1 A%=A% OR J%
   79            J%=J%<<1
   80           UNTIL !I% AND &80
   81            IF FNalert(3,"Are you sure you want to remove these codes?")=1 B%=6:end%=USRcode%:!blk%=view_w%:B%=3:CALLcode%  :REM rdv
   82    WHEN 3:B%=1:CALLcode%:!blk%=view_w%:B%=3:CALLcode%  :REM rdv
   83   ENDCASE
   84  ELSE
   85   IF !blk%=2 I%=remove_m%+28+(24*blk%!4):!I%=!I%EOR1
   86  ENDIF
   87 ENDIF
   88ENDCASE
   89IF mb%=1 SYS"Wimp_CreateMenu",,menu_h%,mx%,mh%
   90ENDPROC
   91
   92DEFPROCclick
   93SYS"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
   94CASE blk%!12 OF
   95 WHEN -2:IF blk%!16=icon% THEN
   96          CASE mb% OF
   97           WHEN 2:mx%=blk%!&C0-140:mh%=504:menu_h%=main_m%
   98                  SYS"Wimp_CreateMenu",,menu_h%,mx%,mh%
   99           WHEN 4:!blk%=status_w%:SYS "Wimp_GetWindowState",,blk%
  100                  blk%!28=-1:SYS "Wimp_OpenWindow",,blk%
  101                  IF eop_paused% THEN
  102                   !blk%=newpage_w%:SYS "Wimp_GetWindowState",,blk%
  103                   blk%!28=-1:SYS "Wimp_OpenWindow",,blk%
  104                  ENDIF
  105          ENDCASE
  106         ENDIF
  107 WHEN layout_w%:
  108     CASE blk%!16 OF
  109      WHEN 23,24,27,28,31,32:PROClayout_arrow(blk%!16)
  110      WHEN 25,26,29,30,33,34,35,36,37,38:PROClayout_arrow(blk%!16)
  111      WHEN 22:PROCsave_layout
  112      WHEN 42:SYS"OS_File",13,app_dir$+".layout" TO F%
  113              IF F%=1 PROCload_layout(app_dir$+".layout")ELSE I%=FNalert(1,"No valid layout file")
  114     ENDCASE
  115 WHEN styles_w%:SYS "Wimp_ProcessKey",style_table%?(blk%!16)
  116 WHEN newpage_w%
  117      CASE blk%!16 OF
  118       WHEN 2:eop_paused%=FALSE:!blk%=newpage_w%:SYS"Wimp_CloseWindow",,blk%
  119       WHEN 3:IF FNalert(3,"Are you sure you want to stop printing?")=2 file%=1:!blk%=newpage_w%:SYS"Wimp_CloseWindow",,blk%:mask%=%110000110001
  120      ENDCASE
  121         ELSE
  122 WHEN view_w%:IF mb%=2 THEN
  123               IF hdl% THEN
  124                VDU 7
  125               ELSE
  126                mx%=blk%!&C0-100:mh%=blk%!&C4+56:menu_h%=view_m%
  127                SYS"Wimp_CreateMenu",,menu_h%,mx%,mh%
  128               ENDIF
  129              ENDIF
  130 WHEN saveT_w%,saveP_w%:IF blk%!16=0 AND blk%!8=4 save_w%=blk%!12:PROCdrag_file(blk%!12)
  131
  132ENDCASE
  133ENDPROC
  134
  135DEFPROCimmed_code(num%)
  136IF file%=2 I%=FNalert(1,"Printing file, can't send codes"):ENDPROC
  137IF NOT FNprinter_on ENDPROC
  138I%=immed_codes%
  139WHILE num%:I%+=?I%:num%-=1:ENDWHILE
  140FOR J%=1 TO (?I%)-1:SYS"OS_PrintChar",I%?J%:NEXT
  141ENDPROC
  142
  143DEFPROCget_page_layout
  144pl%=FNget_layout_value(3)
  145lm%=FNget_layout_value(4):code%!16=lm%
  146ts%=FNget_layout_value(5)
  147hl%=FNget_layout_value(6)
  148bs%=FNget_layout_value(7)
  149fl%=FNget_layout_value(8)
  150sp%=FNget_layout_value(9)
  151mll%=FNget_layout_value(10):code%!20=mll%
  152ff%=FNget_layout_toggle(11)
  153po%=FNget_layout_toggle(12)
  154pp%=FNget_layout_toggle(13)
  155!blk%=layout_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%
  156p%=blk%!28:A%=FNget_codes(pre_print%)
  157!blk%=layout_w%:blk%!4=2:SYS "Wimp_GetIconState",,blk%
  158p%=blk%!28:A%=FNget_codes(post_print%)
  159SYS"OS_Byte",182,0,255 TO ,I%:ignore%=I%AND&7F
  160IF po% THEN
  161 sp%-=1:bl%=pl%-bs%
  162 IF hl%>ts% OR hl%<0 hl%=0
  163 IF fl%>pl% OR fl%<bl% fl%=0
  164 code%!12=bl%-ts%
  165ELSE
  166 bl%=&10000:hl%=0:ts%=0:code%!12=&10000
  167ENDIF
  168ENDPROC
  169
  170DEFPROCsend_code(i%)
  171IF ?i%<2 ENDPROC
  172FOR J%=1 TO (?i%)-1:SYS"OS_PrintChar",i%?J%:NEXT
  173ENDPROC
  174
  175DEFPROCpreview
  176PROCget_page_layout
  177B%=2:I%=(USRcode%)
  178!blk%=0:blk%!4=-(I%*32)-1:blk%!8=(mll%+lm%+2)*16:blk%!12=0
  179SYS"Wimp_SetExtent",view_w%,blk%
  180!blk%=view_w%:SYS"Wimp_GetWindowState",,blk%
  181IF new% blk%!20=0:blk%!24=0:new%=FALSE
  182blk%!28=-1:SYS"Wimp_OpenWindow",,blk%
  183ENDPROC
  184
  185DEFPROCstart_print(hdl%)
  186IF file%=2 IF FNalert(3,"Already printing, do you want to quit?")=2 ENDPROC
  187IF file%=0 I%=FNalert(1,"No file loaded"):ENDPROC
  188PROCget_page_layout
  189line%=0:ptr%=buffer%:eop_paused%=FALSE
  190header_flg%=0:header_ptr%=0:footer_flg%=0:footer_ptr%=0
  191IF po% THEN
  192 I%=buffer%:L%=0
  193 REPEAT
  194  IF ?I%=20 header_ptr%=I%+1
  195  I%+=1:IF ?I%=13 OR ?I%=10 L%+=1
  196 UNTIL L%>10 OR header_ptr%>0 OR I%>end%
  197ENDIF
  198IF hdl% THEN
  199 pp%=FALSE:free%=&1000000
  200 file%=4:I%=FNprint
  201ELSE
  202 IF NOT FNprinter_on ENDPROC
  203 B%=0:IF USRcode% >mll% IF FNalert(3,"Lines longer than the maximum defined found, do you want to continue or cancel?")=2 ENDPROC
  204 B%=2:CALLcode%
  205 PROCsend_code(pre_print%)
  206 PROCupdate_status(4,"Printing")
  207 file%=2:mask%=FNprint
  208ENDIF
  209ENDPROC
  210
  211DEFFNprint
  212LOCAL c%
  213IF hdl%=FALSE SYS"OS_Byte",128,252 TO ,L%,H%:free%=L%+(H%<<8)
  214IF free%<&200 OR eop_paused%:=0
  215REPEAT
  216IF line%=0 PROCprint_newpage
  217 c%=?ptr%:ptr%+=1
  218 CASE c% OF
  219  WHEN 6 :footer_ptr%=ptr%:PROCfind_sol
  220  WHEN 10,13:PROCprint_eol
  221  WHEN 11,12:PROCprint_eop
  222  WHEN 15:I%=ptr%:C%=0
  223          WHILE (?I%>13 OR ?I%<10) AND ?I%<>18
  224           IF ?I%>31 AND style_table%?(?I%)=0 C%+=1
  225           IF ?I%=16 C%+=2
  226           I%+=1
  227          ENDWHILE
  228          J%=((mll%-C%)DIV2)-len%
  229          IF hdl% THEN
  230           WHILE J%>0:SYS"OS_BPut",32,hdl%:len%+=1:J%-=1:ENDWHILE
  231          ELSE
  232           WHILE J%>0:SYS"OS_PrintChar",32:free%-=1:len%+=1:J%-=1:ENDWHILE
  233          ENDIF
  234  WHEN 16:SYS "OS_ConvertCardinal1",sp%,blk%+&100,32 TO I%,J%
  235          IF hdl% THEN
  236           WHILE I%<J%:SYS"OS_BPut",?I%,hdl%:I%+=1:len%+=1:ENDWHILE
  237          ELSE
  238           WHILE I%<J%:SYS"OS_PrintChar",?I%:I%+=1:free%-=1:len%+=1:ENDWHILE
  239          ENDIF
  240  WHEN 18:I%=ptr%:C%=len%
  241          WHILE ?I%>13 OR ?I%<10
  242           IF ?I%>31 AND style_table%?(?I%)=0 C%+=1
  243           IF ?I%=16 C%+=2
  244           I%+=1
  245          ENDWHILE
  246          J%=mll%-C%
  247          IF hdl% THEN
  248           WHILE J%>0:SYS"OS_BPut",32,hdl%:len%+=1:J%-=1:ENDWHILE
  249          ELSE
  250           WHILE J%>0:SYS"OS_PrintChar",32:free%-=1:len%+=1:J%-=1:ENDWHILE
  251          ENDIF
  252  WHEN 20:header_ptr%=ptr%:PROCfind_sol
  253 OTHERWISE
  254   IF code_index%?c% >0 THEN
  255    IF hdl%=FALSE THEN
  256     J%=code_index%?c%:I%=codes%
  257     WHILE J%>1:I%+=?I%:J%-=1:ENDWHILE
  258     FOR J%=1 TO (?I%)-1:SYS"OS_PrintChar",I%?J%:free%-=1:NEXT
  259     IF trans_index%?c% len%+=1
  260    ELSE
  261     IF trans_index%?c% SYS"OS_BPut",c%,hdl%:len%+=1
  262    ENDIF
  263   ELSE
  264    len%+=1:IF hdl% SYS"OS_BPut",c%,hdl% ELSE SYS"OS_PrintChar",c%:free%-=1
  265   ENDIF
  266 ENDCASE
  267UNTIL free%<20 OR ptr%>=end% OR eop_paused%
  268
  269IF ptr%>=end% THEN
  270 IF hdl% THEN
  271  IF po% IF file%<>3 PROCprint_eop:file%=3:I%=FNprint:=%110000110001
  272  SYS"OS_Find",0,hdl%:SYS"OS_File",18,splsv$,&FFF
  273  SYS"Hourglass_Off":hdl%=FALSE
  274 ELSE
  275  PROCsend_code(post_print%)
  276  IF po% IF file%<>3 PROCprint_eop:file%=3:=0
  277  file%=3:PROCstatus_value(3,0):PROCupdate_status(4,"Waiting")
  278 ENDIF
  279=%110000110001
  280ELSE
  281 IF eop_paused% PROCupdate_status(4,"!Paper")
  282 PROCstatus_value(3,end%-ptr%)
  283ENDIF
  284=0
  285
  286DEFPROCprint_eop
  287IF NOT po% PROCprint_eol:ENDPROC
  288IF fl% THEN
  289 WHILE line%<fl%:PROCprint_newline:ENDWHILE
  290 PROCprint_sol
  291ELSE
  292 PROCprint_page_bottom
  293ENDIF
  294ENDPROC
  295
  296DEFPROCprint_newline
  297IF hdl% THEN
  298 SYS"OS_BPut",10,hdl%
  299ELSE
  300 SYS"OS_PrintChar",13:free%-=1
  301 IF ignore% <>10 SYS"OS_PrintChar",10:free%-=1
  302ENDIF
  303line%+=1
  304ENDPROC
  305
  306DEFPROCprint_eol
  307PROCprint_newline
  308IF header_flg% THEN
  309 ptr%=header_flg%:header_flg%=0
  310 WHILE line%<ts%:PROCprint_newline:ENDWHILE
  311 PROCprint_sol
  312ELSE
  313 IF footer_flg% THEN
  314  ptr%=footer_flg%:footer_flg%=0:PROCprint_page_bottom
  315 ELSE
  316  PROCprint_sol
  317 ENDIF
  318ENDIF
  319ENDPROC
  320
  321DEFPROCprint_page_bottom
  322IF ff% THEN
  323 IF hdl% SYS"OS_BPut",12,hdl% ELSE SYS"OS_PrintChar",12:free%-=1
  324ELSE
  325 WHILE line%<=pl%:PROCprint_newline:ENDWHILE
  326ENDIF
  327IF pp% THEN
  328 PROCupdate_status(4,"!Paper")
  329 !blk%=newpage_w%:SYS "Wimp_GetWindowState",,blk%
  330 blk%!28=-1:SYS "Wimp_OpenWindow",,blk%
  331 VDU 7:eop_paused%=TRUE
  332ENDIF
  333line%=0
  334ENDPROC
  335
  336DEFPROCprint_sol
  337IF po% THEN
  338 CASE line% OF
  339  WHEN 0  :PROCprint_newpage
  340  WHEN hl%:IF header_ptr% header_flg%=ptr%:ptr%=header_ptr%
  341  WHEN fl%:IF footer_ptr% footer_flg%=ptr%:ptr%=footer_ptr%
  342  WHEN bl%:IF fl%>0 AND footer_ptr%>0 THEN
  343            WHILE line%<fl%:PROCprint_newline:ENDWHILE
  344            footer_flg%=ptr%:ptr%=footer_ptr%
  345           ELSE
  346            PROCprint_page_bottom:ENDPROC
  347           ENDIF
  348  WHEN pl%:PROCprint_newpage
  349 ENDCASE
  350ENDIF
  351I%=lm%:len%=0
  352IF ?ptr%<14 IF ?ptr%>9 ENDPROC
  353IF hdl% THEN
  354 WHILE I%:SYS"OS_BPut",32,hdl%:I%-=1:ENDWHILE
  355ELSE
  356 WHILE I%:SYS"OS_PrintChar",32:I%-=1:ENDWHILE
  357ENDIF
  358ENDPROC
  359
  360DEFPROCprint_newpage
  361line%=1:sp%+=1:len%=0
  362IF po%=FALSE PROCprint_sol:ENDPROC
  363IF file%=3 ENDPROC
  364IF hl% >0 THEN
  365 WHILE line%<hl%:PROCprint_newline:ENDWHILE
  366ELSE
  367 WHILE line%<=ts%:PROCprint_newline:ENDWHILE
  368ENDIF
  369PROCprint_sol
  370ENDPROC
  371
  372DEFPROCfind_sol
  373WHILE (?ptr%>13 OR ?ptr%<10) AND ptr%<end%:ptr%+=1:ENDWHILE
  374ptr%+=1
  375ENDPROC
  376 
  377DEFPROClayout_toggle(num%)
  378!blk%=layout_w%:blk%!4=num%:SYS "Wimp_GetIconState",,blk%
  379blk%!8=1<<21:blk%!12=0:SYS "Wimp_SetIconState",,blk%
  380ENDPROC
  381
  382DEFFNget_layout_toggle(num%)
  383!blk%=layout_w%:blk%!4=num%:SYS "Wimp_GetIconState",,blk%
  384IF (blk%!24AND1<<21) :=TRUE:ELSE:=FALSE
  385
  386DEFFNget_layout_value(num%)
  387!blk%=layout_w%:blk%!4=num%
  388SYS "Wimp_GetIconState",,blk%
  389=VAL($(blk%!28))
  390
  391DEFPROCset_layout_value(num%,val%)
  392!blk%=layout_w%:blk%!4=num%
  393SYS "Wimp_GetIconState",,blk%
  394$(blk%!28)=STR$(val%)
  395blk%!8=0:blk%!12=0
  396SYS "Wimp_SetIconState",,blk%
  397ENDPROC
  398
  399DEFPROClayout_arrow(num%)
  400LOCAL val%
  401I%=num%MOD2:IF I%=0 I%=-1
  402num%=((num%+1)DIV2)-9
  403PROCset_layout_value(num%,FNget_layout_value(num%)+I%)
  404ENDPROC
  405
  406================================================================
  407
  408DEFPROCdrag_file(w%)
  409!blk%=w%:SYS"Wimp_GetWindowState",,blk%
  410X%=blk%!4-blk%!20:Y%=blk%!16-blk%!24
  411blk%!4=0:SYS"Wimp_GetIconState",,blk%
  412!blk%=w%:blk%!4=5:blk%!8=blk%!8+X%:blk%!12=blk%!12+Y%
  413blk%!16=blk%!16+X%:blk%!20=blk%!20+Y%:blk%!24=0:blk%!28=0
  414blk%!32=&7FFFFFFF:blk%!36=&7FFFFFFF
  415SYS"Wimp_DragBox",,blk%
  416ENDPROC
  417
  418DEFPROCdrag_term(w%)
  419blk%!&80=w%:blk%!&84=1:SYS"Wimp_GetIconState",,blk%+&80
  420I%=(blk%!&9C):WHILE INSTR($(I%),"."):I%+=1:ENDWHILE:leaf$=$(I%)
  421SYS"Wimp_GetPointerInfo",,blk%
  422blk%!20=blk%!12:blk%!24=blk%!16:blk%!28=!blk%:blk%!32=blk%!4
  423blk%!36=end%-buffer%:blk%!40=&FFD:blk%!16=1:$(blk%+44)=leaf$
  424!blk%=(LEN(leaf$)+49)ANDNOT3:blk%!12=0
  425SYS"Wimp_SendMessage",17,blk%,blk%!20,blk%!24
  426ENDPROC
  427
  428DEFPROCsave(name$)
  429 PROCget_page_layout
  430IF save_w%=saveT_w% THEN
  431 splsv$=name$
  432 SYS "XOS_Find",&83,name$ TO err%;F%
  433 IF F%AND1 PROCx_error:ENDPROC
  434 SYS"Hourglass_On"
  435 PROCstart_print(err%)
  436ELSE
  437 p%=buffer%-110
  438 PROCinsert_param("PL",FNget_layout_value(3))
  439 PROCinsert_param("TS",FNget_layout_value(5))
  440 PROCinsert_param("BS",FNget_layout_value(7))
  441 PROCinsert_param("HL",FNget_layout_value(6))
  442 PROCinsert_param("FL",FNget_layout_value(8))
  443 PROCinsert_param("LM",FNget_layout_value(4))
  444 PROCinsert_param("LL",FNget_layout_value(10))
  445 PROCinsert_param("SP",FNget_layout_value(9))
  446 IF FNget_layout_toggle(11) PROCinsert_param("FF",-&300) ELSE PROCinsert_param("FF",-&200)
  447 IF FNget_layout_toggle(12) PROCinsert_param("PG",-&300) ELSE PROCinsert_param("PG",-&200)
  448 IF FNget_layout_toggle(13) PROCinsert_param("PP",-&300) ELSE PROCinsert_param("PP",-&200)
  449 SYS "XOS_File",10,name$,&28A,,buffer%-110,end% TO err%;F%
  450 IF F%AND1 PROCx_error:ENDPROC
  451ENDIF
  452ENDPROC
  453
  454DEFPROCinsert_param(par$,par%)
  455$p%=".."+par$+"     "
  456CASE par% OF
  457 WHEN -&200:$(p%+5)="OFF"
  458 WHEN -&300:$(p%+5)="ON"
  459OTHERWISE
  460 $(p%+5)=STR$(par%)
  461ENDCASE
  462I%=p%:REPEAT:I%+=1:UNTIL?I%<32:?I%=32
  463p%+=10:p%?-1=10
  464ENDPROC
  465
  466DEFPROCsetcaret(w%,i%)
  467!blk%=w%:blk%!4=i%:SYS"Wimp_GetIconState",,blk%
  468SYS"Wimp_SetCaretPosition",w%,i%,,,-1,LEN$(blk%!28)
  469ENDPROC
  470
  471========================================================================
  472
  473DEFPROCmain_menu
  474LOCAL tick,line,write,last:tick=1:line=2:write=4:last=&80
  475code_m%=FNnew_menu (menubuff%,"Send Code",200)
  476m%=FNmenu_item ("Form Feed",0,0)
  477m%=FNmenu_item ("Reset",last,0)
  478FOR I%=1TO30:m%=FNmenu_item("",last,0):NEXT
  479effect_m%=FNnew_menu (m%,"Effect Menu",180)
  480m%=FNmenu_item ("Centre",0,0)
  481m%=FNmenu_item ("Right align",0,0)
  482m%=FNmenu_item ("Make Header",0,0)
  483m%=FNmenu_item ("Make Footer",0,0)
  484m%=FNmenu_item ("Page number",0,0)
  485m%=FNmenu_item ("New page",last,0)
  486main_m%=FNnew_menu (m%,"Edit Plus",180)
  487m%=FNmenu_item ("Immed Code",0,code_m%)
  488m%=FNmenu_item ("Effect",0,effect_m%)
  489m%=FNmenu_item ("Styles",line,0)
  490m%=FNmenu_item ("Print",0,0)
  491m%=FNmenu_item ("Page layout",0,0)
  492m%=FNmenu_item ("Preview",0,0)
  493m%=FNmenu_item ("Clear text",line,0)
  494m%=FNmenu_item ("Info",0,info_w%)
  495m%=FNmenu_item ("Quit",last,0)
  496remove_m%=FNnew_menu (m%,"Remove Code",200)
  497m%=FNmenu_item ("Style codes",0,0)
  498m%=FNmenu_item ("Cntr/R.align",0,0)
  499m%=FNmenu_item ("Page breaks",0,0)
  500m%=FNmenu_item ("Headers",0,0)
  501m%=FNmenu_item ("Footers",last,0)
  502view_m%=FNnew_menu (m%,"Edit Plus",200)
  503m%=FNmenu_item ("Page Brk �",0,0)
  504m%=FNmenu_item ("Page Brk �",line,0)
  505m%=FNmenu_item ("Remove codes",0,remove_m%)
  506m%=FNmenu_item ("Repaginate",line,0)
  507m%=FNmenu_item ("Save Text",0,saveT_w%)
  508m%=FNmenu_item ("Save Edit+",&80,saveP_w%)
  509ENDPROC
  510
  511======================================================================
  512
  513DEFFNnew_menu (a%,menutitle$,menuwidth%)
  514$a%=menutitle$:a%!12=&70207:a%!16=menuwidth%:a%!20=40:a%!24=0
  515m%=a%+28
  516=a%
  517
  518DEFFNmenu_item (itemname$,menuflags%,submenu%)
  519m%!0=menuflags%:m%!4=submenu%:m%!8=&7000001:$(m%+12)=itemname$
  520=m%+24
  521
  522DEFFNindirect (indir$,flags%,indir%)
  523m%!0=flags%:m%!4=0:m%!8=&7000101:m%!12=indir%:m%!16=-1:m%!20=127
  524IF indir$ <>"?" $indir%=indir$
  525=m%+24
  526
  527DEFPROCtick_item(m%,i%)
  528I%=m%+4
  529REPEAT:I%+=24:!I%=!I%AND NOT 1:UNTIL !I%AND&80
  530IF NOT i% I%=m%+28+(i%*24):!I%=!I%OR1
  531ENDPROC
  532
  533DEFFNwkspc(sz%)
  534SYS"Wimp_SlotSize",memsz%+sz%,-1 TO e%
  535IF e%<(memsz%+sz%):=FALSE:ELSE:=TRUE
  536
  537DEFFNiconbar (sprite$,pos%)
  538!blk%=pos%:blk%!4=-8:blk%!8=0:blk%!12=56
  539blk%!16=96:blk%!20=&2002:$(blk%+24)="!"+sprite$
  540SYS "Wimp_CreateIcon",,blk% TO I%
  541=I%
  542
  543DEFPROCreport_error (fatal%)
  544SYS"Hourglass_Smash"
  545!blk%=ERR:$(blk%+4)=REPORT$+" at line "+STR$(ERL)+CHR$0
  546SYS "Wimp_ReportError",blk%,1,title%
  547IF NOT fatal% ENDPROC
  548DEFPROCdie
  549ONERROROFF:SYS "Wimp_CloseDown",hand%,&4B534154
  550END
  551
  552DEFFNalert(flg%,a$)
  553blk%!&80=0:$(blk%+&84)=a$+CHR$0
  554SYS"Wimp_ReportError",blk%+&80,16ORflg%,title% TO ,flg%
  555=flg%
  556
  557DEFPROCx_error
  558SYS"Wimp_ReportError",err%,17,title%
  559ENDPROC
  560
  561DEFPROCtemplates (indirsz%)
  562DIM indir% indirsz%:E%=indir%+indirsz%
  563SYS "Wimp_OpenTemplate",,app_dir$+".Templates"
  564SYS "Wimp_LoadTemplate",,buffer%,indir%,E%,-1,"info",0 TO ,,R%
  565SYS "Wimp_CreateWindow",,buffer% TO info_w%
  566SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"layout",0 TO ,,R%
  567SYS "Wimp_CreateWindow",,buffer% TO layout_w%
  568SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"status",0 TO ,,R%
  569SYS "Wimp_CreateWindow",,buffer% TO status_w%
  570SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"newpage",0 TO ,,R%
  571SYS "Wimp_CreateWindow",,buffer% TO newpage_w%
  572SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"styles",0 TO ,,R%
  573SYS "Wimp_CreateWindow",,buffer% TO styles_w%
  574SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"view",0 TO ,,R%
  575SYS "Wimp_CreateWindow",,buffer% TO view_w%
  576SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"saveP",0 TO ,,R%
  577SYS "Wimp_CreateWindow",,buffer% TO saveP_w%
  578SYS "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"saveT",0 TO ,,R%
  579SYS "Wimp_CreateWindow",,buffer% TO saveT_w%
  580SYS "Wimp_CloseTemplate"
  581!blk%=layout_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%:$(blk%!28)=""
  582!blk%=layout_w%:blk%!4=2:SYS "Wimp_GetIconState",,blk%:$(blk%!28)=""
  583!blk%=info_w%:blk%!4=0:SYS "Wimp_GetIconState",,blk%:$(blk%!28)=version$
  584!blk%=info_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%:$(blk%!28)=cprt$
  585!blk%=info_w%:blk%!4=2:SYS "Wimp_GetIconState",,blk%:$(blk%!28)=purpose$
  586ENDPROC
  587
  588DEFPROCdefault_codes
  589LOCAL DATA
  590I%=immed_codes%
  591REPEAT:READ J%:?I%=J%:I%+=1:UNTIL J%=255
  592I%=0
  593REPEAT
  594 READ J%
  595 IF J%<>163 style_table%?I%=J%
  596 I%+=1
  597 code_index%?J%=I%
  598UNTIL J%=0
  599trans_index?163=1
  600I%=codes%
  601REPEAT:READ J%:?I%=J%:I%+=1:UNTIL J%=255
  602FOR I%=0TO5:READ a$:PROCstyle_icon(a$,I%):NEXT
  603PROCset_style_ext(-220)
  604DATA 2,12, 3,27,64, 0,255
  605DATA 201,200,218,217,205,204,163,0
  606DATA 4,27,45,1, 4,27,45,0, 3,27,71, 3,27,72, 3,27,52, 3,27,53
  607DATA 8,27,82,3,35,27,82,0, 0,255
  608DATA "Start U/line","End U/line","Start Bold","End Bold","Start Italic","End Italic"
  609ENDPROC
  610
  611DEFPROCinitialise
  612SYS "Wimp_Initialise",200,&4B534154,"Edit Plus" TO ,hand%
  613DIM blk% &200, title% 32
  614$title%="Edit Plus":icon_pos%=-1
  615layout_id$="Edit Plus v1 Page Layout"
  616DIM menubuff% &680, code% &800, pre_print% 48, post_print% 48
  617DIM style_table% 48, code_index% &100, codes% &400, trans_index% &100
  618DIM immed_codes% &200
  619LOCALERROR:ONERRORLOCAL PROCreport_error(TRUE)
  620file%=FALSE:eop_paused%=FALSE:fh%=FALSE
  621FORI%=0TO252STEP4:code_index%!I%=0:trans_index%!I%=0:NEXT
  622FORI%=0TO44STEP4:style_table%!I%=0:NEXT
  623SYS "OS_ReadVarVal","Obey$Dir",blk%,256,0,3 TO ,,I%
  624blk%?I%=13:app_dir$=$blk%
  625memsz%=HIMEM-&8000:buffer%=HIMEM+&80
  626SYS"Hourglass_On"
  627IF FNwkspc(&2000)=FALSE I%=FNalert(1,"Not enough RAM to run Edit+"):PROCdie
  628PROCtemplates (&300):PROCmain_menu
  629SYS"OS_File",13,app_dir$+".DataC" TO F%
  630IF F%=1 SYS "OS_File",16,app_dir$+".DataC",code% ELSE I%=FNalert(1,"File DataC not present, unable to continue"):PROCdie
  631SYS"OS_File",13,app_dir$+".config" TO F%
  632IF F%=1 PROCconfigure ELSE PROCdefault_codes:IF FNalert(3,"Config file not found. Continue using Default configuration?")=2 PROCdie
  633SYS"OS_File",13,app_dir$+".layout" TO F%
  634IF F%=1 PROCload_layout(app_dir$+".layout")
  635icon%=FNiconbar("edit+",icon_pos%)
  636code%!4=buffer%:code%!24=blk%:code%!28=trans_index%
  637code%!32=code_index%:code%!48=view_w%
  638PROCclear_file:SYS"Hourglass_Off"
  639ENDPROC
  640
  641DEFPROCclear_file
  642PROCupdate_status(1,"")
  643PROCupdate_status(2,"0")
  644PROCupdate_status(3,"0")
  645PROCupdate_status(4,"No File")
  646blk%!&100=view_w%:SYS"Wimp_CloseWindow",,blk%+&100
  647filename$="":mask%=%110000110001:new%=TRUE
  648IF file%=2 SYS "OS_Byte",21,3:SYS"OS_PrintChar",13
  649file%=FALSE:page_ok%=FALSE:hdl%=FALSE:I%=FNwkspc(0)
  650ENDPROC
  651
  652DEFFNprinter_on
  653SYS"OS_Byte",128,252 TO ,L%,H%:F%=L%+(H%<<8)
  654FOR I%=0TO4:SYS"OS_PrintChar",0:NEXT
  655TIME=0:REPEAT:UNTIL TIME>20
  656SYS"OS_Byte",128,252 TO ,L%,H%
  657IF L%+(H%<<8) >=F%:=TRUE
  658IF FNalert(3,"Printer not ready")=2:=FALSE
  659=FNprinter_on
  660
  661DEFPROCsave_layout
  662LOCALERROR:ONERRORLOCAL:CLOSE#H%:PROCreport_error(FALSE):ENDPROC
  663H%=OPENOUT(app_dir$+".layout")
  664FOR I%=1TOLEN(layout_id$):BPUT#H%,ASC(MID$(layout_id$,I%,1)):NEXT
  665BPUT#H%,13
  666FOR I%=1TO10
  667 !blk%=layout_w%:blk%!4=I%:SYS "Wimp_GetIconState",,blk%
  668 J%=blk%!28:REPEAT:BPUT#H%,?J%:J%+=1:UNTIL J%?-1 <32
  669NEXT
  670FOR I%=11TO13
  671 !blk%=layout_w%:blk%!4=I%:SYS "Wimp_GetIconState",,blk%
  672 FOR J%=24TO27:BPUT#H%,blk%?J%:NEXT
  673NEXT
  674CLOSE#H%
  675ENDPROC
  676
  677DEFPROCupdate_status(num%,s$)
  678blk%!&100=status_w%:blk%!&104=num%
  679SYS "Wimp_GetIconState",,blk%+&100
  680$(blk%!&11C)=s$:blk%!&108=0:blk%!&10C=0
  681SYS "Wimp_SetIconState",,blk%+&100
  682ENDPROC
  683
  684DEFPROCstatus_value(num%,val%)
  685IF val%<0 val%=0
  686PROCupdate_status(num%,LEFT$(STR$(val%)+"        ",8))
  687ENDPROC
  688
  689DEFPROCload_layout(f$)
  690H%=OPENIN(f$):$blk%=GET$#H%
  691IF $blk%<>layout_id$ CLOSE#H%:I%=FNalert(1,"Bad page layout file"):ENDPROC
  692FOR I%=1TO10
  693 $(blk%+&50)=GET$#H%:!blk%=layout_w%: blk%!4=I%:SYS "Wimp_GetIconState",,blk%
  694 $(blk%!28)=$(blk%+&50):blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
  695NEXT
  696FOR I%=11TO13
  697 !blk%=layout_w%:blk%!4=I%:SYS "Wimp_GetIconState",,blk%
  698 FOR J%=64TO67:blk%?J%=BGET#H%:NEXT
  699 blk%!8=(blk%!24)EOR(blk%!64):blk%!12=0:SYS "Wimp_SetIconState",,blk%
  700NEXT
  701CLOSE#H%
  702ENDPROC
  703
  704DEFPROCconfigure
  705LOCAL icn%,m2%,tc%,tt%,ic%,sc%,wid%
  706H%=OPENIN(app_dir$+".config")
  707M%=0:line%=0:W%=40:icn%=0:m2%=code_m%+28:wid%=252
  708tc%=codes%:tn%=0:sn%=0:ic%=immed_codes%
  709LOCALERROR:ONERRORLOCAL:CLOSE#H%:I%=FNalert(1,REPORT$+" at line "+STR$(line%)+" in Config file"):PROCdie
  710REPEAT
  711 $blk%=GET$#H%:p%=blk%:line%+=1
  712 WHILE ?p%=32:p%+=1:ENDWHILE
  713 CASE TRUE OF
  714  WHEN ?p%<32:line%+=1  :  REM blank line
  715  WHEN ?p%=92:    REM backslash so ignore line
  716  WHEN LEFT$($p%,5)="STYLE":M%=1
  717  WHEN LEFT$($p%,5)="IMMED":M%=2
  718  WHEN LEFT$($p%,5)="TRANS":M%=3
  719  WHEN LEFT$($p%,5)="ICONL":icon_pos%=-2
  720 OTHERWISE
  721  CASE M% OF
  722   WHEN 0:
  723   WHEN 1:WHILE ?p%<33:p%+=1:ENDWHILE
  724          IF ?p%=62 THEN
  725           X%=250:Y%=0:p%+=1:wid%=496
  726           WHILE ?p%<33:p%+=1:ENDWHILE
  727          ELSE
  728           X%=0:Y%=44
  729           ENDIF
  730          PROCstyle_icon(LEFT$($p%,12),icn%,X%,Y%)
  731          icn%+=1:p%+=12
  732          C%=FNtrans_code
  733          style_table%?sn%=C%:sn%+=1
  734          tn%+=1:code_index%?C%=tn%
  735          tc%=FNget_codes(tc%)
  736   WHEN 2:m%=m2%:m2%=FNmenu_item(LEFT$($p%,12),0,0)
  737          p%+=12:ic%=FNget_codes(ic%)
  738   WHEN 3:C%=FNtrans_code:tn%+=1
  739          code_index%?C%=tn%:trans_index%?C%=1
  740          tc%=FNget_codes(tc%)
  741  ENDCASE
  742 ENDCASE
  743UNTIL EOF#H%
  744IF m2%>code_m%+28 m2%!-24=&80
  745CLOSE#H%
  746IF W%<40 PROCset_style_ext(W%-48)
  747ENDIF
  748ENDPROC
  749
  750DEFPROCstyle_icon(str$,num%,x%,y%)
  751W%-=y%
  752blk%!&100=styles_w%:blk%!&104=16+x%:blk%!&10C=232+x%
  753blk%!&110=W%:blk%!&108=blk%!&110-44
  754blk%!&114=(49OR9<<12OR1<<16OR7<<24):$(blk%+&118)=str$
  755SYS "Wimp_CreateIcon",,blk%+&100
  756ENDPROC
  757
  758DEFPROCset_style_ext(h%)
  759blk%!&100=0:blk%!&104=h%:blk%!&108=wid%:blk%!&10C=0
  760SYS"Wimp_SetExtent",styles_w%,blk%+&100
  761ENDPROC
  762
  763DEFFNget_codes(codes%)
  764LOCAL count%:count%=1
  765REPEAT
  766 codes%?count%=FNtrans_code
  767 IF codes%?count%<>-1 count%+=1
  768UNTIL ?p%<32 OR ?p%=ASC"\"
  769?codes%=count%
  770=codes%+count%
  771
  772DEFFNtrans_code
  773WHILE ?p%=32 OR ?p%=ASC",":p%+=1:ENDWHILE
  774CASE ?p% OF
  775 WHEN ASC"e":I%=27
  776 WHEN 34,39:p%+=1:I%=?p%
  777 WHEN 48:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  778 WHEN 65:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  779 WHEN 66:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  780 WHEN 67:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  781 WHEN 68:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  782 WHEN 69:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  783 WHEN 70:SYS"OS_ReadUnsigned",16,p% TO ,,I%
  784 WHEN 10,13,0:I%=-1:p%-=1
  785OTHERWISE
  786 SYS "OS_ReadUnsigned",0,p% TO ,,I%
  787ENDCASE
  788REPEAT:p%+=1:UNTIL ?p%<33 OR ?p%=ASC","
  789=I%
  790
  791DEFFNcheck_env
  792SYS "OS_GetEnv" TO I%
  793FOR J%=0TO1
  794 REPEAT:I%+=1:UNTIL ?I%=34 OR ?I%<32:IF ?I%<32:=""
  795NEXT
  796REPEAT:I%+=1:UNTIL ?I%<>32:IF ?I%<32:=""
  797J%=I%:REPEAT:J%+=1:UNTIL ?J%<32:?J%=13
  798=$I%
  799
  800DEFPROCload_file
  801IF file% IF FNalert(3,"Are you sure, file still loaded?")=2 ENDPROC
  802LOCALERROR:ONERRORLOCAL:PROCreport_error(FALSE):PROCclear_file:ENDPROC
  803blk%!12=blk%!8:blk%!16=4:f_type%=blk%!40
  804I%=blk%+44:filename$="":WHILE ?I%:filename$+=CHR$(?I%):I%+=1:ENDWHILE
  805SYS "Wimp_SendMessage",17,blk%,blk%!4
  806IF f_type%<>&FFF AND f_type%<>&28A IF FNalert(3,"This is not a Text file, are you sure you want to print it?")=2 ENDPROC
  807DEFPROCinit_load
  808SYS"OS_File",17,filename$ TO I%,,,,len%
  809IF I%=0 I%=FNalert(1,"File not found"):ENDPROC
  810IF I%=2 I%=FNalert(1,"Can't print a directory!"):ENDPROC
  811IF FNwkspc(len%)=FALSE I%=FNalert(1,"Not enough memory to load file"):ENDPROC
  812SYS"OS_File",16,filename$,buffer% TO ,,,,len%
  813!blk%=view_w%:SYS"Wimp_CloseWindow",,blk%
  814file%=1:end%=buffer%+len%
  815p%=buffer%
  816WHILE (!p%AND&FFFF)=&2E2E
  817 CASE (!p% >>16) OF
  818  WHEN &4C50:PROCget_dot(3)
  819  WHEN &5354:PROCget_dot(5)
  820  WHEN &5342:PROCget_dot(7)
  821  WHEN &4C54:PROCget_dot(6)
  822  WHEN &4C46:PROCget_dot(8)
  823  WHEN &4D4C:PROCget_dot(4)
  824  WHEN &4C4C:PROCget_dot(10)
  825  WHEN &5053:PROCget_dot(9)
  826  WHEN &4646:PROCget_onoff(11)
  827  WHEN &5050:PROCget_onoff(13)
  828  WHEN &4750:PROCget_onoff(12)
  829 ENDCASE
  830 REPEAT:p%+=1:UNTIL p%?-1=10 OR p%?-1=13
  831ENDWHILE
  832IF p%>buffer% I%=p%-buffer%:end%-=I%:FOR J%=buffer% TO end%:?J%=J%?I%:NEXT
  833code%!8=end%
  834I%=LEN(filename$)
  835REPEAT:I%-=1:UNTIL INSTR(filename$,".",I%) <>0
  836leaf$=RIGHT$(filename$,LEN(filename$)-I%)
  837!blk%=saveT_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%
  838$(blk%!28)=leaf$:blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
  839!blk%=saveP_w%:blk%!4=1:SYS "Wimp_GetIconState",,blk%
  840$(blk%!28)=leaf$:blk%!8=0:blk%!12=0:SYS "Wimp_SetIconState",,blk%
  841PROCupdate_status(1,filename$):PROCupdate_status(4,"Waiting")
  842PROCstatus_value(2,len%):PROCstatus_value(3,len%)
  843!blk%=status_w%:SYS "Wimp_GetWindowState",,blk%
  844blk%!28=-1:SYS "Wimp_OpenWindow",,blk%:new%=TRUE
  845ENDPROC
  846
  847DEFPROCget_onoff(i%)
  848p%+=4:WHILE ?p%=32:p%+=1:ENDWHILE
  849IF (!p%AND&FFFF)=&4E4F IF FNget_layout_toggle(i%)=FALSE PROClayout_toggle(i%)
  850IF (!p%AND&FFFF)=&464F IF FNget_layout_toggle(i%) PROClayout_toggle(i%)
  851ENDPROC
  852
  853DEFPROCget_dot(i%)
  854p%+=4:WHILE ?p%=32:p%+=1:ENDWHILE
  855IF ?p%=13 OR ?p%=10:ENDPROC
  856IF (?p%<48 OR ?p%>57) AND ?p%<>45:ENDPROC
  857SYS"OS_EvaluateExpression",p%,buffer%-&50,&40 TO ,A%,J%:IF A% ENDPROC
  858PROCset_layout_value(i%,J%)
  859ENDPROC
� --> Edit+

<�����������������������������������������������������
<�����������������������������������������������������
<� This program and all documentation � David Holden 1993
<�����������������������������������������������������
<�����������������������������������������������������

	!version$="Edit Plus Ver 0.40"

cprt$="� David Holden 1993"
purpose$="Extras for Edit"


� � �report_error(�)

�initialise
3filename$=�check_env:� filename$<>"" �init_load

�
'ș "Wimp_Poll",mask%,blk% � reason%
Ȏ reason% �
, � 1:� !blk%=view_w% B%=3:�code%  :� rdv
" � 2:ș"Wimp_OpenWindow",,blk%
F � 3:ș"Wimp_CloseWindow",,blk%:� !blk%=layout_w% �get_page_layout
 � 6:�click
 � 7:�drag_term(save_w%)
$ � 8:ș"Wimp_ProcessKey",blk%!24
 � 9:�select
 � 17,18:Ȏ blk%!16 �
     � 0:�die
A     � 2:I%=blk%+44:ȕ?I%>31:I%+=1:�:?I%=13:�save($(blk%+44))
     � 3:�load_file
 &     � 5:� blk%!40=&28A �load_file
!            �
"�
#� mask%=0 mask%=�print
$� �
%
&��select
'2ș"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
(Ȏ menu_h% �
)� main_m%:
* � blk%!4=-1 �
+   Ȏ !blk% �
,;     � 2:!blk%=styles_w%:ș "Wimp_GetWindowState",,blk%
-5            blk%!28=-1:ș "Wimp_OpenWindow",,blk%
.     � 3:�start_print(�)
/;     � 4:!blk%=layout_w%:ș "Wimp_GetWindowState",,blk%
05            blk%!28=-1:ș "Wimp_OpenWindow",,blk%
19     � 5:� file%=0 I%=�alert(1,"No file!") � �preview
2     � 6:Ȏ file% �
3             � 0:
4P             � 1:� �alert(3,"Are you sure, file not printed?")=1 �clear_file
5X             � 2:� �alert(3,"Are you sure, file still being printed?")=1 �clear_file
6              � 3:�clear_file
7            �
8     � 8:�die
9   �
: �
;  Ȏ !blk% �
<   � 0:�immed_code(blk%!4)
=   � 1:Ȏ blk%!4 �
>(           � 0:ș "OS_Byte",138,0,15
?(           � 1:ș "OS_Byte",138,0,18
@(           � 2:ș "OS_Byte",138,0,20
A'           � 3:ș "OS_Byte",138,0,6
B(           � 4:ș "OS_Byte",138,0,16
C(           � 5:ș "OS_Byte",138,0,12
D          �
E  �
F �
G� view_m%:
H  � blk%!4=-1 �
I   Ȏ !blk% �
JD    � 0:� po% B%=5:� �code% I%=�alert(1,"No visible page break")
KD    � 1:� po% B%=4:� �code% I%=�alert(1,"No visible page break")
L$    � 2:I%=remove_m%+4:A%=0:J%=1
M           �
N)            I%+=24:� !I%�1 A%=A% � J%
O            J%=J%<<1
P           � !I% � &80
Q            � �alert(3,"Are you sure you want to remove these codes?")=1 B%=6:end%=�code%:!blk%=view_w%:B%=3:�code%  :� rdv
R9    � 3:B%=1:�code%:!blk%=view_w%:B%=3:�code%  :� rdv
S   �
T  �
U6   � !blk%=2 I%=remove_m%+28+(24*blk%!4):!I%=!I%�1
V  �
W �
X�
Y0� mb%=1 ș"Wimp_CreateMenu",,menu_h%,mx%,mh%
Z�
[
\��click
]2ș"Wimp_GetPointerInfo",,blk%+&C0:mb%=blk%!&C8
^Ȏ blk%!12 �
_ � -2:� blk%!16=icon% �
`          Ȏ mb% �
a;           � 2:mx%=blk%!&C0-140:mh%=504:menu_h%=main_m%
b:                  ș"Wimp_CreateMenu",,menu_h%,mx%,mh%
cA           � 4:!blk%=status_w%:ș "Wimp_GetWindowState",,blk%
d;                  blk%!28=-1:ș "Wimp_OpenWindow",,blk%
e%                  � eop_paused% �
fF                   !blk%=newpage_w%:ș "Wimp_GetWindowState",,blk%
g<                   blk%!28=-1:ș "Wimp_OpenWindow",,blk%
h                  �
i          �
j         �
k � layout_w%:
l     Ȏ blk%!16 �
m4      � 23,24,27,28,31,32:�layout_arrow(blk%!16)
n@      � 25,26,29,30,33,34,35,36,37,38:�layout_arrow(blk%!16)
o      � 22:�save_layout
p5      � 42:ș"OS_File",13,app_dir$+".layout" � F%
q^              � F%=1 �load_layout(app_dir$+".layout")� I%=�alert(1,"No valid layout file")
r
     �
s< � styles_w%:ș "Wimp_ProcessKey",style_table%?(blk%!16)
t � newpage_w%
u      Ȏ blk%!16 �
vH       � 2:eop_paused%=�:!blk%=newpage_w%:ș"Wimp_CloseWindow",,blk%
w�       � 3:� �alert(3,"Are you sure you want to stop printing?")=2 file%=1:!blk%=newpage_w%:ș"Wimp_CloseWindow",,blk%:mask%=%110000110001
x      �
y         �
z � view_w%:� mb%=2 �
{               � hdl% �
|                � 7
}               �
~D                mx%=blk%!&C0-100:mh%=blk%!&C4+56:menu_h%=view_m%
8                ș"Wimp_CreateMenu",,menu_h%,mx%,mh%
�               �
�              �
�S � saveT_w%,saveP_w%:� blk%!16=0 � blk%!8=4 save_w%=blk%!12:�drag_file(blk%!12)
�
��
��
�
���immed_code(num%)
�>� file%=2 I%=�alert(1,"Printing file, can't send codes"):�
�� � �printer_on �
�I%=immed_codes%
�ȕ num%:I%+=?I%:num%-=1:�
�-� J%=1 � (?I%)-1:ș"OS_PrintChar",I%?J%:�
��
�
���get_page_layout
�pl%=�get_layout_value(3)
�)lm%=�get_layout_value(4):code%!16=lm%
�ts%=�get_layout_value(5)
�hl%=�get_layout_value(6)
�bs%=�get_layout_value(7)
�fl%=�get_layout_value(8)
�sp%=�get_layout_value(9)
�,mll%=�get_layout_value(10):code%!20=mll%
�ff%=�get_layout_toggle(11)
�po%=�get_layout_toggle(12)
�pp%=�get_layout_toggle(13)
�9!blk%=layout_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%
�(p%=blk%!28:A%=�get_codes(pre_print%)
�9!blk%=layout_w%:blk%!4=2:ș "Wimp_GetIconState",,blk%
�)p%=blk%!28:A%=�get_codes(post_print%)
�.ș"OS_Byte",182,0,255 � ,I%:ignore%=I%�&7F
�� po% �
� sp%-=1:bl%=pl%-bs%
� � hl%>ts% � hl%<0 hl%=0
� � fl%>pl% � fl%<bl% fl%=0
� code%!12=bl%-ts%
��
�+ bl%=&10000:hl%=0:ts%=0:code%!12=&10000
��
��
�
���send_code(i%)
�
� ?i%<2 �
�-� J%=1 � (?i%)-1:ș"OS_PrintChar",i%?J%:�
��
�
�
��preview
��get_page_layout
�B%=2:I%=(�code%)
�>!blk%=0:blk%!4=-(I%*32)-1:blk%!8=(mll%+lm%+2)*16:blk%!12=0
�#ș"Wimp_SetExtent",view_w%,blk%
�/!blk%=view_w%:ș"Wimp_GetWindowState",,blk%
�%� new% blk%!20=0:blk%!24=0:new%=�
�(blk%!28=-1:ș"Wimp_OpenWindow",,blk%
��
�
���start_print(hdl%)
�F� file%=2 � �alert(3,"Already printing, do you want to quit?")=2 �
�-� file%=0 I%=�alert(1,"No file loaded"):�
��get_page_layout
�&line%=0:ptr%=buffer%:eop_paused%=�
�;header_flg%=0:header_ptr%=0:footer_flg%=0:footer_ptr%=0
�� po% �
� I%=buffer%:L%=0
� �
�  � ?I%=20 header_ptr%=I%+1
�#  I%+=1:� ?I%=13 � ?I%=10 L%+=1
�& � L%>10 � header_ptr%>0 � I%>end%
��
�� hdl% �
� pp%=�:free%=&1000000
� file%=4:I%=�print
��
� � � �printer_on �
�z B%=0:� �code% >mll% � �alert(3,"Lines longer than the maximum defined found, do you want to continue or cancel?")=2 �
� B%=2:�code%
� �send_code(pre_print%)
�! �update_status(4,"Printing")
� file%=2:mask%=�print
��
��
�
�ݤprint
�� c%
�:� hdl%=� ș"OS_Byte",128,252 � ,L%,H%:free%=L%+(H%<<8)
�!� free%<&200 � eop_paused%:=0
��
�� line%=0 �print_newpage
� c%=?ptr%:ptr%+=1
� Ȏ c% �
�%  � 6 :footer_ptr%=ptr%:�find_sol
�  � 10,13:�print_eol
�  � 11,12:�print_eop
�  � 15:I%=ptr%:C%=0
�,          ȕ (?I%>13 � ?I%<10) � ?I%<>18
�4           � ?I%>31 � style_table%?(?I%)=0 C%+=1
�           � ?I%=16 C%+=2
�           I%+=1
�          �
�#          J%=((mll%-C%)�2)-len%
�          � hdl% �
�:           ȕ J%>0:ș"OS_BPut",32,hdl%:len%+=1:J%-=1:�
�          �
�C           ȕ J%>0:ș"OS_PrintChar",32:free%-=1:len%+=1:J%-=1:�
�          �
�<  � 16:ș "OS_ConvertCardinal1",sp%,blk%+&100,32 � I%,J%
�          � hdl% �
�<           ȕ I%<J%:ș"OS_BPut",?I%,hdl%:I%+=1:len%+=1:�
�          �
�E           ȕ I%<J%:ș"OS_PrintChar",?I%:I%+=1:free%-=1:len%+=1:�
�          �
�  � 18:I%=ptr%:C%=len%
�           ȕ ?I%>13 � ?I%<10
�4           � ?I%>31 � style_table%?(?I%)=0 C%+=1
�           � ?I%=16 C%+=2
�           I%+=1
�          �
�          J%=mll%-C%
�          � hdl% �
�:           ȕ J%>0:ș"OS_BPut",32,hdl%:len%+=1:J%-=1:�
�          �
�C           ȕ J%>0:ș"OS_PrintChar",32:free%-=1:len%+=1:J%-=1:�
�          �
�%  � 20:header_ptr%=ptr%:�find_sol
� 
�   � code_index%?c% >0 �
�    � hdl%=� �
$     J%=code_index%?c%:I%=codes%
      ȕ J%>1:I%+=?I%:J%-=1:�
;     � J%=1 � (?I%)-1:ș"OS_PrintChar",I%?J%:free%-=1:�
"     � trans_index%?c% len%+=1
	    �
6     � trans_index%?c% ș"OS_BPut",c%,hdl%:len%+=1
	    �
   �
I    len%+=1:� hdl% ș"OS_BPut",c%,hdl% � ș"OS_PrintChar",c%:free%-=1
	   �

 �
)� free%<20 � ptr%>=end% � eop_paused%


� ptr%>=end% �

 � hdl% �
B  � po% � file%<>3 �print_eop:file%=3:I%=�print:=%110000110001
3  ș"OS_Find",0,hdl%:ș"OS_File",18,splsv$,&FFF
  ș"Hourglass_Off":hdl%=�
 �
  �send_code(post_print%)
,  � po% � file%<>3 �print_eop:file%=3:=0
<  file%=3:�status_value(3,0):�update_status(4,"Waiting")
 �
=%110000110001
�
- � eop_paused% �update_status(4,"!Paper")
 �status_value(3,end%-ptr%)
�
=0

��print_eop
� � po% �print_eol:�
 � fl% �
!" ȕ line%<fl%:�print_newline:�
" �print_sol
#�
$ �print_page_bottom
%�
&�
'
(��print_newline
)� hdl% �
* ș"OS_BPut",10,hdl%
+�
,! ș"OS_PrintChar",13:free%-=1
-0 � ignore% <>10 ș"OS_PrintChar",10:free%-=1
.�
/line%+=1
0�
1
2��print_eol
3�print_newline
4� header_flg% �
5# ptr%=header_flg%:header_flg%=0
6" ȕ line%<ts%:�print_newline:�
7 �print_sol
8�
9 � footer_flg% �
:7  ptr%=footer_flg%:footer_flg%=0:�print_page_bottom
; �
<  �print_sol
= �
>�
?�
@
A��print_page_bottom
B� ff% �
C> � hdl% ș"OS_BPut",12,hdl% � ș"OS_PrintChar",12:free%-=1
D�
E# ȕ line%<=pl%:�print_newline:�
F�
G� pp% �
H �update_status(4,"!Paper")
I4 !blk%=newpage_w%:ș "Wimp_GetWindowState",,blk%
J* blk%!28=-1:ș "Wimp_OpenWindow",,blk%
K � 7:eop_paused%=�
L�
Mline%=0
N�
O
P��print_sol
Q� po% �
R Ȏ line% �
S  � 0  :�print_newpage
T;  � hl%:� header_ptr% header_flg%=ptr%:ptr%=header_ptr%
U;  � fl%:� footer_ptr% footer_flg%=ptr%:ptr%=footer_ptr%
V%  � bl%:� fl%>0 � footer_ptr%>0 �
W-            ȕ line%<fl%:�print_newline:�
X1            footer_flg%=ptr%:ptr%=footer_ptr%
Y           �
Z$            �print_page_bottom:�
[           �
\  � pl%:�print_newpage
] �
^�
_I%=lm%:len%=0
`� ?ptr%<14 � ?ptr%>9 �
a� hdl% �
b& ȕ I%:ș"OS_BPut",32,hdl%:I%-=1:�
c�
d& ȕ I%:ș"OS_PrintChar",32:I%-=1:�
e�
f�
g
h��print_newpage
iline%=1:sp%+=1:len%=0
j� po%=� �print_sol:�
k� file%=3 �
l� hl% >0 �
m" ȕ line%<hl%:�print_newline:�
n�
o# ȕ line%<=ts%:�print_newline:�
p�
q�print_sol
r�
s
t��find_sol
u2ȕ (?ptr%>13 � ?ptr%<10) � ptr%<end%:ptr%+=1:�
vptr%+=1
w�
x 
y��layout_toggle(num%)
z<!blk%=layout_w%:blk%!4=num%:ș "Wimp_GetIconState",,blk%
{7blk%!8=1<<21:blk%!12=0:ș "Wimp_SetIconState",,blk%
|�
}
~ݤget_layout_toggle(num%)
<!blk%=layout_w%:blk%!4=num%:ș "Wimp_GetIconState",,blk%
�� (blk%!24�1<<21) :=�:�:=�
�
�ݤget_layout_value(num%)
�!blk%=layout_w%:blk%!4=num%
� ș "Wimp_GetIconState",,blk%
�=�($(blk%!28))
�
�!��set_layout_value(num%,val%)
�!blk%=layout_w%:blk%!4=num%
� ș "Wimp_GetIconState",,blk%
�$(blk%!28)=�(val%)
�blk%!8=0:blk%!12=0
� ș "Wimp_SetIconState",,blk%
��
�
���layout_arrow(num%)
�
� val%
�I%=num%�2:� I%=0 I%=-1
�num%=((num%+1)�2)-9
�6�set_layout_value(num%,�get_layout_value(num%)+I%)
��
�
�D================================================================
�
���drag_file(w%)
�*!blk%=w%:ș"Wimp_GetWindowState",,blk%
�(X%=blk%!4-blk%!20:Y%=blk%!16-blk%!24
�(blk%!4=0:ș"Wimp_GetIconState",,blk%
�9!blk%=w%:blk%!4=5:blk%!8=blk%!8+X%:blk%!12=blk%!12+Y%
�=blk%!16=blk%!16+X%:blk%!20=blk%!20+Y%:blk%!24=0:blk%!28=0
�'blk%!32=&7FFFFFFF:blk%!36=&7FFFFFFF
�ș"Wimp_DragBox",,blk%
��
�
���drag_term(w%)
�:blk%!&80=w%:blk%!&84=1:ș"Wimp_GetIconState",,blk%+&80
�4I%=(blk%!&9C):ȕ �$(I%),"."):I%+=1:�:leaf$=$(I%)
�!ș"Wimp_GetPointerInfo",,blk%
�@blk%!20=blk%!12:blk%!24=blk%!16:blk%!28=!blk%:blk%!32=blk%!4
�@blk%!36=end%-buffer%:blk%!40=&FFD:blk%!16=1:$(blk%+44)=leaf$
�$!blk%=(�(leaf$)+49)��3:blk%!12=0
�0ș"Wimp_SendMessage",17,blk%,blk%!20,blk%!24
��
�
���save(name$)
� �get_page_layout
�� save_w%=saveT_w% �
� splsv$=name$
�& ș "XOS_Find",&83,name$ � err%;F%
� � F%�1 �x_error:�
� ș"Hourglass_On"
� �start_print(err%)
��
� p%=buffer%-110
�- �insert_param("PL",�get_layout_value(3))
�- �insert_param("TS",�get_layout_value(5))
�- �insert_param("BS",�get_layout_value(7))
�- �insert_param("HL",�get_layout_value(6))
�- �insert_param("FL",�get_layout_value(8))
�- �insert_param("LM",�get_layout_value(4))
�. �insert_param("LL",�get_layout_value(10))
�- �insert_param("SP",�get_layout_value(9))
�S � �get_layout_toggle(11) �insert_param("FF",-&300) � �insert_param("FF",-&200)
�S � �get_layout_toggle(12) �insert_param("PG",-&300) � �insert_param("PG",-&200)
�S � �get_layout_toggle(13) �insert_param("PP",-&300) � �insert_param("PP",-&200)
�< ș "XOS_File",10,name$,&28A,,buffer%-110,end% � err%;F%
� � F%�1 �x_error:�
��
��
�
���insert_param(par$,par%)
�$p%=".."+par$+"     "
�
Ȏ par% �
� � -&200:$(p%+5)="OFF"
� � -&300:$(p%+5)="ON"
�
� $(p%+5)=�(par%)
��
� I%=p%:�:I%+=1:�?I%<32:?I%=32
�p%+=10:p%?-1=10
��
�
���setcaret(w%,i%)
�2!blk%=w%:blk%!4=i%:ș"Wimp_GetIconState",,blk%
�4ș"Wimp_SetCaretPosition",w%,i%,,,-1,�$(blk%!28)
��
�
�L========================================================================
�
���main_menu
�9� tick,line,write,last:tick=1:line=2:write=4:last=&80
�1code_m%=�new_menu (menubuff%,"Send Code",200)
�#m%=�menu_item ("Form Feed",0,0)
�"m%=�menu_item ("Reset",last,0)
�(� I%=1�30:m%=�menu_item("",last,0):�
�.effect_m%=�new_menu (m%,"Effect Menu",180)
� m%=�menu_item ("Centre",0,0)
�%m%=�menu_item ("Right align",0,0)
�%m%=�menu_item ("Make Header",0,0)
�%m%=�menu_item ("Make Footer",0,0)
�%m%=�menu_item ("Page number",0,0)
�%m%=�menu_item ("New page",last,0)
�*main_m%=�new_menu (m%,"Edit Plus",180)
�*m%=�menu_item ("Immed Code",0,code_m%)
�(m%=�menu_item ("Effect",0,effect_m%)
�#m%=�menu_item ("Styles",line,0)
�m%=�menu_item ("Print",0,0)
�%m%=�menu_item ("Page layout",0,0)
�!m%=�menu_item ("Preview",0,0)
�'m%=�menu_item ("Clear text",line,0)
�$m%=�menu_item ("Info",0,info_w%)
�!m%=�menu_item ("Quit",last,0)
�.remove_m%=�new_menu (m%,"Remove Code",200)
�%m%=�menu_item ("Style codes",0,0)
�&m%=�menu_item ("Cntr/R.align",0,0)
�%m%=�menu_item ("Page breaks",0,0)
�!m%=�menu_item ("Headers",0,0)
�$m%=�menu_item ("Footers",last,0)
�*view_m%=�new_menu (m%,"Edit Plus",200)
�$m%=�menu_item ("Page Brk �",0,0)
�'m%=�menu_item ("Page Brk �",line,0)
�.m%=�menu_item ("Remove codes",0,remove_m%)
�'m%=�menu_item ("Repaginate",line,0)
�*m%=�menu_item ("Save Text",0,saveT_w%)
�-m%=�menu_item ("Save Edit+",&80,saveP_w%)
��
�
�J======================================================================

)ݤnew_menu (a%,menutitle$,menuwidth%)
A$a%=menutitle$:a%!12=&70207:a%!16=menuwidth%:a%!20=40:a%!24=0
m%=a%+28
=a%

/ݤmenu_item (itemname$,menuflags%,submenu%)
Bm%!0=menuflags%:m%!4=submenu%:m%!8=&7000001:$(m%+12)=itemname$

=m%+24
	

%ݤindirect (indir$,flags%,indir%)
Dm%!0=flags%:m%!4=0:m%!8=&7000101:m%!12=indir%:m%!16=-1:m%!20=127
!� indir$ <>"?" $indir%=indir$

=m%+24

��tick_item(m%,i%)
I%=m%+4
#�:I%+=24:!I%=!I%� � 1:� !I%�&80
%� � i% I%=m%+28+(i%*24):!I%=!I%�1
�

ݤwkspc(sz%)
(ș"Wimp_SlotSize",memsz%+sz%,-1 � e%
� e%<(memsz%+sz%):=�:�:=�

ݤiconbar (sprite$,pos%)
,!blk%=pos%:blk%!4=-8:blk%!8=0:blk%!12=56
3blk%!16=96:blk%!20=&2002:$(blk%+24)="!"+sprite$
#ș "Wimp_CreateIcon",,blk% � I%
=I%

��report_error (fatal%)
 ș"Hourglass_Smash"
!,!blk%=�:$(blk%+4)=�$+" at line "+�(�)+�0
"'ș "Wimp_ReportError",blk%,1,title%
#� � fatal% �
$	��die
%+:ș "Wimp_CloseDown",hand%,&4B534154
&�
'
(ݤalert(flg%,a$)
) blk%!&80=0:$(blk%+&84)=a$+�0
*8ș"Wimp_ReportError",blk%+&80,16�flg%,title% � ,flg%
+	=flg%
,
-
��x_error
.'ș"Wimp_ReportError",err%,17,title%
/�
0
1��templates (indirsz%)
2(� indir% indirsz%:E%=indir%+indirsz%
31ș "Wimp_OpenTemplate",,app_dir$+".Templates"
4@ș "Wimp_LoadTemplate",,buffer%,indir%,E%,-1,"info",0 � ,,R%
5-ș "Wimp_CreateWindow",,buffer% � info_w%
6>ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"layout",0 � ,,R%
7/ș "Wimp_CreateWindow",,buffer% � layout_w%
8>ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"status",0 � ,,R%
9/ș "Wimp_CreateWindow",,buffer% � status_w%
:?ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"newpage",0 � ,,R%
;0ș "Wimp_CreateWindow",,buffer% � newpage_w%
<>ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"styles",0 � ,,R%
=/ș "Wimp_CreateWindow",,buffer% � styles_w%
><ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"view",0 � ,,R%
?-ș "Wimp_CreateWindow",,buffer% � view_w%
@=ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"saveP",0 � ,,R%
A.ș "Wimp_CreateWindow",,buffer% � saveP_w%
B=ș "Wimp_LoadTemplate",,buffer%,R%,E%,-1,"saveT",0 � ,,R%
C.ș "Wimp_CreateWindow",,buffer% � saveT_w%
Dș "Wimp_CloseTemplate"
EG!blk%=layout_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%:$(blk%!28)=""
FG!blk%=layout_w%:blk%!4=2:ș "Wimp_GetIconState",,blk%:$(blk%!28)=""
GK!blk%=info_w%:blk%!4=0:ș "Wimp_GetIconState",,blk%:$(blk%!28)=version$
HH!blk%=info_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%:$(blk%!28)=cprt$
IK!blk%=info_w%:blk%!4=2:ș "Wimp_GetIconState",,blk%:$(blk%!28)=purpose$
J�
K
L��default_codes
M� �
NI%=immed_codes%
O �:� J%:?I%=J%:I%+=1:� J%=255
PI%=0
Q�
R	 � J%
S! � J%<>163 style_table%?I%=J%
T
 I%+=1
U code_index%?J%=I%
V
� J%=0
Wtrans_index?163=1
X
I%=codes%
Y �:� J%:?I%=J%:I%+=1:� J%=255
Z&� I%=0�5:� a$:�style_icon(a$,I%):�
[�set_style_ext(-220)
\� 2,12, 3,27,64, 0,255
]#� 201,200,218,217,205,204,163,0
^>� 4,27,45,1, 4,27,45,0, 3,27,71, 3,27,72, 3,27,52, 3,27,53
_!� 8,27,82,3,35,27,82,0, 0,255
`U� "Start U/line","End U/line","Start Bold","End Bold","Start Italic","End Italic"
a�
b
c��initialise
d;ș "Wimp_Initialise",200,&4B534154,"Edit Plus" � ,hand%
e� blk% &200, title% 32
f$$title%="Edit Plus":icon_pos%=-1
g)layout_id$="Edit Plus v1 Page Layout"
h?� menubuff% &680, code% &800, pre_print% 48, post_print% 48
iG� style_table% 48, code_index% &100, codes% &400, trans_index% &100
j� immed_codes% &200
k�:�� �report_error(�)
lfile%=�:eop_paused%=�:fh%=�
m4�I%=0�252�4:code_index%!I%=0:trans_index%!I%=0:�
n"�I%=0�44�4:style_table%!I%=0:�
o5ș "OS_ReadVarVal","Obey$Dir",blk%,256,0,3 � ,,I%
pblk%?I%=13:app_dir$=$blk%
q memsz%=�-&8000:buffer%=�+&80
rș"Hourglass_On"
sE� �wkspc(&2000)=� I%=�alert(1,"Not enough RAM to run Edit+"):�die
t �templates (&300):�main_menu
u)ș"OS_File",13,app_dir$+".DataC" � F%
vs� F%=1 ș "OS_File",16,app_dir$+".DataC",code% � I%=�alert(1,"File DataC not present, unable to continue"):�die
w*ș"OS_File",13,app_dir$+".config" � F%
xx� F%=1 �configure � �default_codes:� �alert(3,"Config file not found. Continue using Default configuration?")=2 �die
y*ș"OS_File",13,app_dir$+".layout" � F%
z+� F%=1 �load_layout(app_dir$+".layout")
{%icon%=�iconbar("edit+",icon_pos%)
|7code%!4=buffer%:code%!24=blk%:code%!28=trans_index%
})code%!32=code_index%:code%!48=view_w%
~!�clear_file:ș"Hourglass_Off"
�
�
���clear_file
��update_status(1,"")
��update_status(2,"0")
��update_status(3,"0")
��update_status(4,"No File")
�5blk%!&100=view_w%:ș"Wimp_CloseWindow",,blk%+&100
�+filename$="":mask%=%110000110001:new%=�
�3� file%=2 ș "OS_Byte",21,3:ș"OS_PrintChar",13
�*file%=�:page_ok%=�:hdl%=�:I%=�wkspc(0)
��
�
�ݤprinter_on
�.ș"OS_Byte",128,252 � ,L%,H%:F%=L%+(H%<<8)
�!� I%=0�4:ș"OS_PrintChar",0:�
��=0:�:� �>20
� ș"OS_Byte",128,252 � ,L%,H%
�� L%+(H%<<8) >=F%:=�
�(� �alert(3,"Printer not ready")=2:=�
�=�printer_on
�
���save_layout
�"�:��:�#H%:�report_error(�):�
�H%=�(app_dir$+".layout")
�4� I%=1��(layout_id$):�#H%,�(�layout_id$,I%,1)):�
��#H%,13
�
� I%=1�10
�; !blk%=layout_w%:blk%!4=I%:ș "Wimp_GetIconState",,blk%
�, J%=blk%!28:�:�#H%,?J%:J%+=1:� J%?-1 <32
��
�� I%=11�13
�; !blk%=layout_w%:blk%!4=I%:ș "Wimp_GetIconState",,blk%
� � J%=24�27:�#H%,blk%?J%:�
��
��#H%
��
�
���update_status(num%,s$)
�&blk%!&100=status_w%:blk%!&104=num%
�%ș "Wimp_GetIconState",,blk%+&100
�+$(blk%!&11C)=s$:blk%!&108=0:blk%!&10C=0
�%ș "Wimp_SetIconState",,blk%+&100
��
�
���status_value(num%,val%)
�� val%<0 val%=0
�/�update_status(num%,��(val%)+"        ",8))
��
�
���load_layout(f$)
�H%=�(f$):$blk%=�#H%
�B� $blk%<>layout_id$ �#H%:I%=�alert(1,"Bad page layout file"):�
�
� I%=1�10
�M $(blk%+&50)=�#H%:!blk%=layout_w%: blk%!4=I%:ș "Wimp_GetIconState",,blk%
�K $(blk%!28)=$(blk%+&50):blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%
��
�� I%=11�13
�; !blk%=layout_w%:blk%!4=I%:ș "Wimp_GetIconState",,blk%
� � J%=64�67:blk%?J%=�#H%:�
�F blk%!8=(blk%!24)�(blk%!64):blk%!12=0:ș "Wimp_SetIconState",,blk%
��
��#H%
��
�
���configure
�#� icn%,m2%,tc%,tt%,ic%,sc%,wid%
�H%=�(app_dir$+".config")
�5M%=0:line%=0:W%=40:icn%=0:m2%=code_m%+28:wid%=252
�+tc%=codes%:tn%=0:sn%=0:ic%=immed_codes%
�K�:��:�#H%:I%=�alert(1,�$+" at line "+�(line%)+" in Config file"):�die
��
�  $blk%=�#H%:p%=blk%:line%+=1
� ȕ ?p%=32:p%+=1:�
� Ȏ � �
�(  � ?p%<32:line%+=1  :  � blank line
�-  � ?p%=92:    � backslash so ignore line
�  � �$p%,5)="STYLE":M%=1
�  � �$p%,5)="IMMED":M%=2
�  � �$p%,5)="TRANS":M%=3
�$  � �$p%,5)="ICONL":icon_pos%=-2
� 
�
  Ȏ M% �
�   � 0:
�   � 1:ȕ ?p%<33:p%+=1:�
�          � ?p%=62 �
�)           X%=250:Y%=0:p%+=1:wid%=496
�            ȕ ?p%<33:p%+=1:�
�          �
�           X%=0:Y%=44
�           �
�.          �style_icon(�$p%,12),icn%,X%,Y%)
�          icn%+=1:p%+=12
�          C%=�trans_code
�(          style_table%?sn%=C%:sn%+=1
�'          tn%+=1:code_index%?C%=tn%
�!          tc%=�get_codes(tc%)
�.   � 2:m%=m2%:m2%=�menu_item(�$p%,12),0,0)
�(          p%+=12:ic%=�get_codes(ic%)
�    � 3:C%=�trans_code:tn%+=1
�2          code_index%?C%=tn%:trans_index%?C%=1
�!          tc%=�get_codes(tc%)
�  �
� �
�
� �#H%
� � m2%>code_m%+28 m2%!-24=&80
��#H%
�!� W%<40 �set_style_ext(W%-48)
��
��
�
�!��style_icon(str$,num%,x%,y%)
�
W%-=y%
�8blk%!&100=styles_w%:blk%!&104=16+x%:blk%!&10C=232+x%
�'blk%!&110=W%:blk%!&108=blk%!&110-44
�6blk%!&114=(49�9<<12�1<<16�7<<24):$(blk%+&118)=str$
�#ș "Wimp_CreateIcon",,blk%+&100
��
�
���set_style_ext(h%)
�7blk%!&100=0:blk%!&104=h%:blk%!&108=wid%:blk%!&10C=0
�*ș"Wimp_SetExtent",styles_w%,blk%+&100
��
�
�ݤget_codes(codes%)
�� count%:count%=1
��
� codes%?count%=�trans_code
�" � codes%?count%<>-1 count%+=1
� ?p%<32 � ?p%=�"\"
?codes%=count%
=codes%+count%

ݤtrans_code
 ȕ ?p%=32 � ?p%=�",":p%+=1:�
Ȏ ?p% �
 � �"e":I%=27
 � 34,39:p%+=1:I%=?p%
	* � 48:ș"OS_ReadUnsigned",16,p% � ,,I%

* � 65:ș"OS_ReadUnsigned",16,p% � ,,I%
* � 66:ș"OS_ReadUnsigned",16,p% � ,,I%
* � 67:ș"OS_ReadUnsigned",16,p% � ,,I%

* � 68:ș"OS_ReadUnsigned",16,p% � ,,I%
* � 69:ș"OS_ReadUnsigned",16,p% � ,,I%
* � 70:ș"OS_ReadUnsigned",16,p% � ,,I%
 � 10,13,0:I%=-1:p%-=1

% ș "OS_ReadUnsigned",0,p% � ,,I%
�
�:p%+=1:� ?p%<33 � ?p%=�","
=I%

ݤcheck_env
ș "OS_GetEnv" � I%
� J%=0�1
+ �:I%+=1:� ?I%=34 � ?I%<32:� ?I%<32:=""
�
"�:I%+=1:� ?I%<>32:� ?I%<32:=""
!J%=I%:�:J%+=1:� ?J%<32:?J%=13
=$I%

 ��load_file
!>� file% � �alert(3,"Are you sure, file still loaded?")=2 �
")�:��:�report_error(�):�clear_file:�
#,blk%!12=blk%!8:blk%!16=4:f_type%=blk%!40
$<I%=blk%+44:filename$="":ȕ ?I%:filename$+=�(?I%):I%+=1:�
%(ș "Wimp_SendMessage",17,blk%,blk%!4
&q� f_type%<>&FFF � f_type%<>&28A � �alert(3,"This is not a Text file, are you sure you want to print it?")=2 �
'��init_load
()ș"OS_File",17,filename$ � I%,,,,len%
)*� I%=0 I%=�alert(1,"File not found"):�
*4� I%=2 I%=�alert(1,"Can't print a directory!"):�
+D� �wkspc(len%)=� I%=�alert(1,"Not enough memory to load file"):�
,/ș"OS_File",16,filename$,buffer% � ,,,,len%
-,!blk%=view_w%:ș"Wimp_CloseWindow",,blk%
.file%=1:end%=buffer%+len%
/p%=buffer%
0ȕ (!p%�&FFFF)=&2E2E
1 Ȏ (!p% >>16) �
2  � &4C50:�get_dot(3)
3  � &5354:�get_dot(5)
4  � &5342:�get_dot(7)
5  � &4C54:�get_dot(6)
6  � &4C46:�get_dot(8)
7  � &4D4C:�get_dot(4)
8  � &4C4C:�get_dot(10)
9  � &5053:�get_dot(9)
:  � &4646:�get_onoff(11)
;  � &5050:�get_onoff(13)
<  � &4750:�get_onoff(12)
= �
>" �:p%+=1:� p%?-1=10 � p%?-1=13
?�
@G� p%>buffer% I%=p%-buffer%:end%-=I%:� J%=buffer% � end%:?J%=J%?I%:�
Acode%!8=end%
BI%=�(filename$)
C$�:I%-=1:� �filename$,".",I%) <>0
D%leaf$=�filename$,�(filename$)-I%)
E8!blk%=saveT_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%
FD$(blk%!28)=leaf$:blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%
G8!blk%=saveP_w%:blk%!4=1:ș "Wimp_GetIconState",,blk%
HD$(blk%!28)=leaf$:blk%!8=0:blk%!12=0:ș "Wimp_SetIconState",,blk%
I;�update_status(1,filename$):�update_status(4,"Waiting")
J/�status_value(2,len%):�status_value(3,len%)
K2!blk%=status_w%:ș "Wimp_GetWindowState",,blk%
L0blk%!28=-1:ș "Wimp_OpenWindow",,blk%:new%=�
M�
N
O��get_onoff(i%)
Pp%+=4:ȕ ?p%=32:p%+=1:�
QE� (!p%�&FFFF)=&4E4F � �get_layout_toggle(i%)=� �layout_toggle(i%)
RC� (!p%�&FFFF)=&464F � �get_layout_toggle(i%) �layout_toggle(i%)
S�
T
U��get_dot(i%)
Vp%+=4:ȕ ?p%=32:p%+=1:�
W� ?p%=13 � ?p%=10:�
X#� (?p%<48 � ?p%>57) � ?p%<>45:�
Y@ș"OS_EvaluateExpression",p%,buffer%-&50,&40 � ,A%,J%:� A% �
Z�set_layout_value(i%,J%)
[�
�
00000000  0d 00 01 0f f4 20 2d 2d  3e 20 45 64 69 74 2b 0d  |..... --> Edit+.|
00000010  00 02 04 0d 00 03 3c f4  ab ab ab ab ab ab ab ab  |......<.........|
00000020  ab ab ab ab ab ab ab ab  ab ab ab ab ab ab ab ab  |................|
*
00000040  ab ab ab ab ab ab ab ab  ab ab ab ab ab ab ab 0d  |................|
00000050  00 04 3c f4 bb bb bb bb  bb bb bb bb bb bb bb bb  |..<.............|
00000060  bb bb bb bb bb bb bb bb  bb bb bb bb bb bb bb bb  |................|
*
00000080  bb bb bb bb bb bb bb bb  bb bb bb 0d 00 05 3c f4  |..............<.|
00000090  20 54 68 69 73 20 70 72  6f 67 72 61 6d 20 61 6e  | This program an|
000000a0  64 20 61 6c 6c 20 64 6f  63 75 6d 65 6e 74 61 74  |d all documentat|
000000b0  69 6f 6e 20 a9 20 44 61  76 69 64 20 48 6f 6c 64  |ion . David Hold|
000000c0  65 6e 20 31 39 39 33 0d  00 06 3c f4 ab ab ab ab  |en 1993...<.....|
000000d0  ab ab ab ab ab ab ab ab  ab ab ab ab ab ab ab ab  |................|
*
00000100  ab ab ab 0d 00 07 3c f4  bb bb bb bb bb bb bb bb  |......<.........|
00000110  bb bb bb bb bb bb bb bb  bb bb bb bb bb bb bb bb  |................|
*
00000130  bb bb bb bb bb bb bb bb  bb bb bb bb bb bb bb 0d  |................|
00000140  00 08 04 0d 00 09 21 76  65 72 73 69 6f 6e 24 3d  |......!version$=|
00000150  22 45 64 69 74 20 50 6c  75 73 20 56 65 72 20 30  |"Edit Plus Ver 0|
00000160  2e 34 30 22 0d 00 0a 1f  63 70 72 74 24 3d 22 a9  |.40"....cprt$=".|
00000170  20 44 61 76 69 64 20 48  6f 6c 64 65 6e 20 31 39  | David Holden 19|
00000180  39 33 22 0d 00 0b 1e 70  75 72 70 6f 73 65 24 3d  |93"....purpose$=|
00000190  22 45 78 74 72 61 73 20  66 6f 72 20 45 64 69 74  |"Extras for Edit|
000001a0  22 0d 00 0c 04 0d 00 0d  18 ee 20 85 20 f2 72 65  |"......... . .re|
000001b0  70 6f 72 74 5f 65 72 72  6f 72 28 b9 29 0d 00 0e  |port_error(.)...|
000001c0  04 0d 00 0f 0f f2 69 6e  69 74 69 61 6c 69 73 65  |......initialise|
000001d0  0d 00 10 33 66 69 6c 65  6e 61 6d 65 24 3d a4 63  |...3filename$=.c|
000001e0  68 65 63 6b 5f 65 6e 76  3a e7 20 66 69 6c 65 6e  |heck_env:. filen|
000001f0  61 6d 65 24 3c 3e 22 22  20 f2 69 6e 69 74 5f 6c  |ame$<>"" .init_l|
00000200  6f 61 64 0d 00 11 04 0d  00 12 05 f5 0d 00 13 27  |oad............'|
00000210  c8 99 20 22 57 69 6d 70  5f 50 6f 6c 6c 22 2c 6d  |.. "Wimp_Poll",m|
00000220  61 73 6b 25 2c 62 6c 6b  25 20 b8 20 72 65 61 73  |ask%,blk% . reas|
00000230  6f 6e 25 0d 00 14 10 c8  8e 20 72 65 61 73 6f 6e  |on%...... reason|
00000240  25 20 ca 0d 00 15 2c 20  c9 20 31 3a e7 20 21 62  |% ...., . 1:. !b|
00000250  6c 6b 25 3d 76 69 65 77  5f 77 25 20 42 25 3d 33  |lk%=view_w% B%=3|
00000260  3a d6 63 6f 64 65 25 20  20 3a f4 20 72 64 76 0d  |:.code%  :. rdv.|
00000270  00 16 22 20 c9 20 32 3a  c8 99 22 57 69 6d 70 5f  |.." . 2:.."Wimp_|
00000280  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 62 6c 6b  |OpenWindow",,blk|
00000290  25 0d 00 17 46 20 c9 20  33 3a c8 99 22 57 69 6d  |%...F . 3:.."Wim|
000002a0  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
000002b0  62 6c 6b 25 3a e7 20 21  62 6c 6b 25 3d 6c 61 79  |blk%:. !blk%=lay|
000002c0  6f 75 74 5f 77 25 20 f2  67 65 74 5f 70 61 67 65  |out_w% .get_page|
000002d0  5f 6c 61 79 6f 75 74 0d  00 18 0f 20 c9 20 36 3a  |_layout.... . 6:|
000002e0  f2 63 6c 69 63 6b 0d 00  19 1c 20 c9 20 37 3a f2  |.click.... . 7:.|
000002f0  64 72 61 67 5f 74 65 72  6d 28 73 61 76 65 5f 77  |drag_term(save_w|
00000300  25 29 0d 00 1a 24 20 c9  20 38 3a c8 99 22 57 69  |%)...$ . 8:.."Wi|
00000310  6d 70 5f 50 72 6f 63 65  73 73 4b 65 79 22 2c 62  |mp_ProcessKey",b|
00000320  6c 6b 25 21 32 34 0d 00  1b 10 20 c9 20 39 3a f2  |lk%!24.... . 9:.|
00000330  73 65 6c 65 63 74 0d 00  1c 19 20 c9 20 31 37 2c  |select.... . 17,|
00000340  31 38 3a c8 8e 20 62 6c  6b 25 21 31 36 20 ca 0d  |18:.. blk%!16 ..|
00000350  00 1d 11 20 20 20 20 20  c9 20 30 3a f2 64 69 65  |...     . 0:.die|
00000360  0d 00 1e 41 20 20 20 20  20 c9 20 32 3a 49 25 3d  |...A     . 2:I%=|
00000370  62 6c 6b 25 2b 34 34 3a  c8 95 3f 49 25 3e 33 31  |blk%+44:..?I%>31|
00000380  3a 49 25 2b 3d 31 3a ce  3a 3f 49 25 3d 31 33 3a  |:I%+=1:.:?I%=13:|
00000390  f2 73 61 76 65 28 24 28  62 6c 6b 25 2b 34 34 29  |.save($(blk%+44)|
000003a0  29 0d 00 1f 17 20 20 20  20 20 c9 20 33 3a f2 6c  |)....     . 3:.l|
000003b0  6f 61 64 5f 66 69 6c 65  0d 00 20 26 20 20 20 20  |oad_file.. &    |
000003c0  20 c9 20 35 3a e7 20 62  6c 6b 25 21 34 30 3d 26  | . 5:. blk%!40=&|
000003d0  32 38 41 20 f2 6c 6f 61  64 5f 66 69 6c 65 0d 00  |28A .load_file..|
000003e0  21 11 20 20 20 20 20 20  20 20 20 20 20 20 cb 0d  |!.            ..|
000003f0  00 22 05 cb 0d 00 23 1a  e7 20 6d 61 73 6b 25 3d  |."....#.. mask%=|
00000400  30 20 6d 61 73 6b 25 3d  a4 70 72 69 6e 74 0d 00  |0 mask%=.print..|
00000410  24 07 fd 20 a3 0d 00 25  04 0d 00 26 0c dd f2 73  |$.. ...%...&...s|
00000420  65 6c 65 63 74 0d 00 27  32 c8 99 22 57 69 6d 70  |elect..'2.."Wimp|
00000430  5f 47 65 74 50 6f 69 6e  74 65 72 49 6e 66 6f 22  |_GetPointerInfo"|
00000440  2c 2c 62 6c 6b 25 2b 26  43 30 3a 6d 62 25 3d 62  |,,blk%+&C0:mb%=b|
00000450  6c 6b 25 21 26 43 38 0d  00 28 10 c8 8e 20 6d 65  |lk%!&C8..(... me|
00000460  6e 75 5f 68 25 20 ca 0d  00 29 0e c9 20 6d 61 69  |nu_h% ...).. mai|
00000470  6e 5f 6d 25 3a 0d 00 2a  12 20 e7 20 62 6c 6b 25  |n_m%:..*. . blk%|
00000480  21 34 3d 2d 31 20 8c 0d  00 2b 11 20 20 20 c8 8e  |!4=-1 ...+.   ..|
00000490  20 21 62 6c 6b 25 20 ca  0d 00 2c 3b 20 20 20 20  | !blk% ...,;    |
000004a0  20 c9 20 32 3a 21 62 6c  6b 25 3d 73 74 79 6c 65  | . 2:!blk%=style|
000004b0  73 5f 77 25 3a c8 99 20  22 57 69 6d 70 5f 47 65  |s_w%:.. "Wimp_Ge|
000004c0  74 57 69 6e 64 6f 77 53  74 61 74 65 22 2c 2c 62  |tWindowState",,b|
000004d0  6c 6b 25 0d 00 2d 35 20  20 20 20 20 20 20 20 20  |lk%..-5         |
000004e0  20 20 20 62 6c 6b 25 21  32 38 3d 2d 31 3a c8 99  |   blk%!28=-1:..|
000004f0  20 22 57 69 6d 70 5f 4f  70 65 6e 57 69 6e 64 6f  | "Wimp_OpenWindo|
00000500  77 22 2c 2c 62 6c 6b 25  0d 00 2e 1c 20 20 20 20  |w",,blk%....    |
00000510  20 c9 20 33 3a f2 73 74  61 72 74 5f 70 72 69 6e  | . 3:.start_prin|
00000520  74 28 a3 29 0d 00 2f 3b  20 20 20 20 20 c9 20 34  |t(.)../;     . 4|
00000530  3a 21 62 6c 6b 25 3d 6c  61 79 6f 75 74 5f 77 25  |:!blk%=layout_w%|
00000540  3a c8 99 20 22 57 69 6d  70 5f 47 65 74 57 69 6e  |:.. "Wimp_GetWin|
00000550  64 6f 77 53 74 61 74 65  22 2c 2c 62 6c 6b 25 0d  |dowState",,blk%.|
00000560  00 30 35 20 20 20 20 20  20 20 20 20 20 20 20 62  |.05            b|
00000570  6c 6b 25 21 32 38 3d 2d  31 3a c8 99 20 22 57 69  |lk%!28=-1:.. "Wi|
00000580  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00000590  62 6c 6b 25 0d 00 31 39  20 20 20 20 20 c9 20 35  |blk%..19     . 5|
000005a0  3a e7 20 66 69 6c 65 25  3d 30 20 49 25 3d a4 61  |:. file%=0 I%=.a|
000005b0  6c 65 72 74 28 31 2c 22  4e 6f 20 66 69 6c 65 21  |lert(1,"No file!|
000005c0  22 29 20 8b 20 f2 70 72  65 76 69 65 77 0d 00 32  |") . .preview..2|
000005d0  17 20 20 20 20 20 c9 20  36 3a c8 8e 20 66 69 6c  |.     . 6:.. fil|
000005e0  65 25 20 ca 0d 00 33 15  20 20 20 20 20 20 20 20  |e% ...3.        |
000005f0  20 20 20 20 20 c9 20 30  3a 0d 00 34 50 20 20 20  |     . 0:..4P   |
00000600  20 20 20 20 20 20 20 20  20 20 c9 20 31 3a e7 20  |          . 1:. |
00000610  a4 61 6c 65 72 74 28 33  2c 22 41 72 65 20 79 6f  |.alert(3,"Are yo|
00000620  75 20 73 75 72 65 2c 20  66 69 6c 65 20 6e 6f 74  |u sure, file not|
00000630  20 70 72 69 6e 74 65 64  3f 22 29 3d 31 20 f2 63  | printed?")=1 .c|
00000640  6c 65 61 72 5f 66 69 6c  65 0d 00 35 58 20 20 20  |lear_file..5X   |
00000650  20 20 20 20 20 20 20 20  20 20 c9 20 32 3a e7 20  |          . 2:. |
00000660  a4 61 6c 65 72 74 28 33  2c 22 41 72 65 20 79 6f  |.alert(3,"Are yo|
00000670  75 20 73 75 72 65 2c 20  66 69 6c 65 20 73 74 69  |u sure, file sti|
00000680  6c 6c 20 62 65 69 6e 67  20 70 72 69 6e 74 65 64  |ll being printed|
00000690  3f 22 29 3d 31 20 f2 63  6c 65 61 72 5f 66 69 6c  |?")=1 .clear_fil|
000006a0  65 0d 00 36 20 20 20 20  20 20 20 20 20 20 20 20  |e..6            |
000006b0  20 20 c9 20 33 3a f2 63  6c 65 61 72 5f 66 69 6c  |  . 3:.clear_fil|
000006c0  65 0d 00 37 11 20 20 20  20 20 20 20 20 20 20 20  |e..7.           |
000006d0  20 cb 0d 00 38 11 20 20  20 20 20 c9 20 38 3a f2  | ...8.     . 8:.|
000006e0  64 69 65 0d 00 39 08 20  20 20 cb 0d 00 3a 06 20  |die..9.   ...:. |
000006f0  cc 0d 00 3b 10 20 20 c8  8e 20 21 62 6c 6b 25 20  |...;.  .. !blk% |
00000700  ca 0d 00 3c 1e 20 20 20  c9 20 30 3a f2 69 6d 6d  |...<.   . 0:.imm|
00000710  65 64 5f 63 6f 64 65 28  62 6c 6b 25 21 34 29 0d  |ed_code(blk%!4).|
00000720  00 3d 16 20 20 20 c9 20  31 3a c8 8e 20 62 6c 6b  |.=.   . 1:.. blk|
00000730  25 21 34 20 ca 0d 00 3e  28 20 20 20 20 20 20 20  |%!4 ...>(       |
00000740  20 20 20 20 c9 20 30 3a  c8 99 20 22 4f 53 5f 42  |    . 0:.. "OS_B|
00000750  79 74 65 22 2c 31 33 38  2c 30 2c 31 35 0d 00 3f  |yte",138,0,15..?|
00000760  28 20 20 20 20 20 20 20  20 20 20 20 c9 20 31 3a  |(           . 1:|
00000770  c8 99 20 22 4f 53 5f 42  79 74 65 22 2c 31 33 38  |.. "OS_Byte",138|
00000780  2c 30 2c 31 38 0d 00 40  28 20 20 20 20 20 20 20  |,0,18..@(       |
00000790  20 20 20 20 c9 20 32 3a  c8 99 20 22 4f 53 5f 42  |    . 2:.. "OS_B|
000007a0  79 74 65 22 2c 31 33 38  2c 30 2c 32 30 0d 00 41  |yte",138,0,20..A|
000007b0  27 20 20 20 20 20 20 20  20 20 20 20 c9 20 33 3a  |'           . 3:|
000007c0  c8 99 20 22 4f 53 5f 42  79 74 65 22 2c 31 33 38  |.. "OS_Byte",138|
000007d0  2c 30 2c 36 0d 00 42 28  20 20 20 20 20 20 20 20  |,0,6..B(        |
000007e0  20 20 20 c9 20 34 3a c8  99 20 22 4f 53 5f 42 79  |   . 4:.. "OS_By|
000007f0  74 65 22 2c 31 33 38 2c  30 2c 31 36 0d 00 43 28  |te",138,0,16..C(|
00000800  20 20 20 20 20 20 20 20  20 20 20 c9 20 35 3a c8  |           . 5:.|
00000810  99 20 22 4f 53 5f 42 79  74 65 22 2c 31 33 38 2c  |. "OS_Byte",138,|
00000820  30 2c 31 32 0d 00 44 0f  20 20 20 20 20 20 20 20  |0,12..D.        |
00000830  20 20 cb 0d 00 45 07 20  20 cb 0d 00 46 06 20 cd  |  ...E.  ...F. .|
00000840  0d 00 47 0e c9 20 76 69  65 77 5f 6d 25 3a 0d 00  |..G.. view_m%:..|
00000850  48 13 20 20 e7 20 62 6c  6b 25 21 34 3d 2d 31 20  |H.  . blk%!4=-1 |
00000860  8c 0d 00 49 11 20 20 20  c8 8e 20 21 62 6c 6b 25  |...I.   .. !blk%|
00000870  20 ca 0d 00 4a 44 20 20  20 20 c9 20 30 3a e7 20  | ...JD    . 0:. |
00000880  70 6f 25 20 42 25 3d 35  3a e7 20 ba 63 6f 64 65  |po% B%=5:. .code|
00000890  25 20 49 25 3d a4 61 6c  65 72 74 28 31 2c 22 4e  |% I%=.alert(1,"N|
000008a0  6f 20 76 69 73 69 62 6c  65 20 70 61 67 65 20 62  |o visible page b|
000008b0  72 65 61 6b 22 29 0d 00  4b 44 20 20 20 20 c9 20  |reak")..KD    . |
000008c0  31 3a e7 20 70 6f 25 20  42 25 3d 34 3a e7 20 ba  |1:. po% B%=4:. .|
000008d0  63 6f 64 65 25 20 49 25  3d a4 61 6c 65 72 74 28  |code% I%=.alert(|
000008e0  31 2c 22 4e 6f 20 76 69  73 69 62 6c 65 20 70 61  |1,"No visible pa|
000008f0  67 65 20 62 72 65 61 6b  22 29 0d 00 4c 24 20 20  |ge break")..L$  |
00000900  20 20 c9 20 32 3a 49 25  3d 72 65 6d 6f 76 65 5f  |  . 2:I%=remove_|
00000910  6d 25 2b 34 3a 41 25 3d  30 3a 4a 25 3d 31 0d 00  |m%+4:A%=0:J%=1..|
00000920  4d 10 20 20 20 20 20 20  20 20 20 20 20 f5 0d 00  |M.           ...|
00000930  4e 29 20 20 20 20 20 20  20 20 20 20 20 20 49 25  |N)            I%|
00000940  2b 3d 32 34 3a e7 20 21  49 25 80 31 20 41 25 3d  |+=24:. !I%.1 A%=|
00000950  41 25 20 84 20 4a 25 0d  00 4f 18 20 20 20 20 20  |A% . J%..O.     |
00000960  20 20 20 20 20 20 20 4a  25 3d 4a 25 3c 3c 31 0d  |       J%=J%<<1.|
00000970  00 50 1a 20 20 20 20 20  20 20 20 20 20 20 fd 20  |.P.           . |
00000980  21 49 25 20 80 20 26 38  30 0d 00 51 7f 20 20 20  |!I% . &80..Q.   |
00000990  20 20 20 20 20 20 20 20  20 e7 20 a4 61 6c 65 72  |         . .aler|
000009a0  74 28 33 2c 22 41 72 65  20 79 6f 75 20 73 75 72  |t(3,"Are you sur|
000009b0  65 20 79 6f 75 20 77 61  6e 74 20 74 6f 20 72 65  |e you want to re|
000009c0  6d 6f 76 65 20 74 68 65  73 65 20 63 6f 64 65 73  |move these codes|
000009d0  3f 22 29 3d 31 20 42 25  3d 36 3a 65 6e 64 25 3d  |?")=1 B%=6:end%=|
000009e0  ba 63 6f 64 65 25 3a 21  62 6c 6b 25 3d 76 69 65  |.code%:!blk%=vie|
000009f0  77 5f 77 25 3a 42 25 3d  33 3a d6 63 6f 64 65 25  |w_w%:B%=3:.code%|
00000a00  20 20 3a f4 20 72 64 76  0d 00 52 39 20 20 20 20  |  :. rdv..R9    |
00000a10  c9 20 33 3a 42 25 3d 31  3a d6 63 6f 64 65 25 3a  |. 3:B%=1:.code%:|
00000a20  21 62 6c 6b 25 3d 76 69  65 77 5f 77 25 3a 42 25  |!blk%=view_w%:B%|
00000a30  3d 33 3a d6 63 6f 64 65  25 20 20 3a f4 20 72 64  |=3:.code%  :. rd|
00000a40  76 0d 00 53 08 20 20 20  cb 0d 00 54 07 20 20 cc  |v..S.   ...T.  .|
00000a50  0d 00 55 36 20 20 20 e7  20 21 62 6c 6b 25 3d 32  |..U6   . !blk%=2|
00000a60  20 49 25 3d 72 65 6d 6f  76 65 5f 6d 25 2b 32 38  | I%=remove_m%+28|
00000a70  2b 28 32 34 2a 62 6c 6b  25 21 34 29 3a 21 49 25  |+(24*blk%!4):!I%|
00000a80  3d 21 49 25 82 31 0d 00  56 07 20 20 cd 0d 00 57  |=!I%.1..V.  ...W|
00000a90  06 20 cd 0d 00 58 05 cb  0d 00 59 30 e7 20 6d 62  |. ...X....Y0. mb|
00000aa0  25 3d 31 20 c8 99 22 57  69 6d 70 5f 43 72 65 61  |%=1 .."Wimp_Crea|
00000ab0  74 65 4d 65 6e 75 22 2c  2c 6d 65 6e 75 5f 68 25  |teMenu",,menu_h%|
00000ac0  2c 6d 78 25 2c 6d 68 25  0d 00 5a 05 e1 0d 00 5b  |,mx%,mh%..Z....[|
00000ad0  04 0d 00 5c 0b dd f2 63  6c 69 63 6b 0d 00 5d 32  |...\...click..]2|
00000ae0  c8 99 22 57 69 6d 70 5f  47 65 74 50 6f 69 6e 74  |.."Wimp_GetPoint|
00000af0  65 72 49 6e 66 6f 22 2c  2c 62 6c 6b 25 2b 26 43  |erInfo",,blk%+&C|
00000b00  30 3a 6d 62 25 3d 62 6c  6b 25 21 26 43 38 0d 00  |0:mb%=blk%!&C8..|
00000b10  5e 10 c8 8e 20 62 6c 6b  25 21 31 32 20 ca 0d 00  |^... blk%!12 ...|
00000b20  5f 1b 20 c9 20 2d 32 3a  e7 20 62 6c 6b 25 21 31  |_. . -2:. blk%!1|
00000b30  36 3d 69 63 6f 6e 25 20  8c 0d 00 60 16 20 20 20  |6=icon% ...`.   |
00000b40  20 20 20 20 20 20 20 c8  8e 20 6d 62 25 20 ca 0d  |       .. mb% ..|
00000b50  00 61 3b 20 20 20 20 20  20 20 20 20 20 20 c9 20  |.a;           . |
00000b60  32 3a 6d 78 25 3d 62 6c  6b 25 21 26 43 30 2d 31  |2:mx%=blk%!&C0-1|
00000b70  34 30 3a 6d 68 25 3d 35  30 34 3a 6d 65 6e 75 5f  |40:mh%=504:menu_|
00000b80  68 25 3d 6d 61 69 6e 5f  6d 25 0d 00 62 3a 20 20  |h%=main_m%..b:  |
00000b90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ba0  c8 99 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |.."Wimp_CreateMe|
00000bb0  6e 75 22 2c 2c 6d 65 6e  75 5f 68 25 2c 6d 78 25  |nu",,menu_h%,mx%|
00000bc0  2c 6d 68 25 0d 00 63 41  20 20 20 20 20 20 20 20  |,mh%..cA        |
00000bd0  20 20 20 c9 20 34 3a 21  62 6c 6b 25 3d 73 74 61  |   . 4:!blk%=sta|
00000be0  74 75 73 5f 77 25 3a c8  99 20 22 57 69 6d 70 5f  |tus_w%:.. "Wimp_|
00000bf0  47 65 74 57 69 6e 64 6f  77 53 74 61 74 65 22 2c  |GetWindowState",|
00000c00  2c 62 6c 6b 25 0d 00 64  3b 20 20 20 20 20 20 20  |,blk%..d;       |
00000c10  20 20 20 20 20 20 20 20  20 20 20 62 6c 6b 25 21  |           blk%!|
00000c20  32 38 3d 2d 31 3a c8 99  20 22 57 69 6d 70 5f 4f  |28=-1:.. "Wimp_O|
00000c30  70 65 6e 57 69 6e 64 6f  77 22 2c 2c 62 6c 6b 25  |penWindow",,blk%|
00000c40  0d 00 65 25 20 20 20 20  20 20 20 20 20 20 20 20  |..e%            |
00000c50  20 20 20 20 20 20 e7 20  65 6f 70 5f 70 61 75 73  |      . eop_paus|
00000c60  65 64 25 20 8c 0d 00 66  46 20 20 20 20 20 20 20  |ed% ...fF       |
00000c70  20 20 20 20 20 20 20 20  20 20 20 20 21 62 6c 6b  |            !blk|
00000c80  25 3d 6e 65 77 70 61 67  65 5f 77 25 3a c8 99 20  |%=newpage_w%:.. |
00000c90  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
00000ca0  74 61 74 65 22 2c 2c 62  6c 6b 25 0d 00 67 3c 20  |tate",,blk%..g< |
00000cb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000cc0  20 20 62 6c 6b 25 21 32  38 3d 2d 31 3a c8 99 20  |  blk%!28=-1:.. |
00000cd0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00000ce0  22 2c 2c 62 6c 6b 25 0d  00 68 17 20 20 20 20 20  |",,blk%..h.     |
00000cf0  20 20 20 20 20 20 20 20  20 20 20 20 20 cd 0d 00  |             ...|
00000d00  69 0f 20 20 20 20 20 20  20 20 20 20 cb 0d 00 6a  |i.          ...j|
00000d10  0e 20 20 20 20 20 20 20  20 20 cd 0d 00 6b 11 20  |.         ...k. |
00000d20  c9 20 6c 61 79 6f 75 74  5f 77 25 3a 0d 00 6c 15  |. layout_w%:..l.|
00000d30  20 20 20 20 20 c8 8e 20  62 6c 6b 25 21 31 36 20  |     .. blk%!16 |
00000d40  ca 0d 00 6d 34 20 20 20  20 20 20 c9 20 32 33 2c  |...m4      . 23,|
00000d50  32 34 2c 32 37 2c 32 38  2c 33 31 2c 33 32 3a f2  |24,27,28,31,32:.|
00000d60  6c 61 79 6f 75 74 5f 61  72 72 6f 77 28 62 6c 6b  |layout_arrow(blk|
00000d70  25 21 31 36 29 0d 00 6e  40 20 20 20 20 20 20 c9  |%!16)..n@      .|
00000d80  20 32 35 2c 32 36 2c 32  39 2c 33 30 2c 33 33 2c  | 25,26,29,30,33,|
00000d90  33 34 2c 33 35 2c 33 36  2c 33 37 2c 33 38 3a f2  |34,35,36,37,38:.|
00000da0  6c 61 79 6f 75 74 5f 61  72 72 6f 77 28 62 6c 6b  |layout_arrow(blk|
00000db0  25 21 31 36 29 0d 00 6f  1b 20 20 20 20 20 20 c9  |%!16)..o.      .|
00000dc0  20 32 32 3a f2 73 61 76  65 5f 6c 61 79 6f 75 74  | 22:.save_layout|
00000dd0  0d 00 70 35 20 20 20 20  20 20 c9 20 34 32 3a c8  |..p5      . 42:.|
00000de0  99 22 4f 53 5f 46 69 6c  65 22 2c 31 33 2c 61 70  |."OS_File",13,ap|
00000df0  70 5f 64 69 72 24 2b 22  2e 6c 61 79 6f 75 74 22  |p_dir$+".layout"|
00000e00  20 b8 20 46 25 0d 00 71  5e 20 20 20 20 20 20 20  | . F%..q^       |
00000e10  20 20 20 20 20 20 20 e7  20 46 25 3d 31 20 f2 6c  |       . F%=1 .l|
00000e20  6f 61 64 5f 6c 61 79 6f  75 74 28 61 70 70 5f 64  |oad_layout(app_d|
00000e30  69 72 24 2b 22 2e 6c 61  79 6f 75 74 22 29 8b 20  |ir$+".layout"). |
00000e40  49 25 3d a4 61 6c 65 72  74 28 31 2c 22 4e 6f 20  |I%=.alert(1,"No |
00000e50  76 61 6c 69 64 20 6c 61  79 6f 75 74 20 66 69 6c  |valid layout fil|
00000e60  65 22 29 0d 00 72 0a 20  20 20 20 20 cb 0d 00 73  |e")..r.     ...s|
00000e70  3c 20 c9 20 73 74 79 6c  65 73 5f 77 25 3a c8 99  |< . styles_w%:..|
00000e80  20 22 57 69 6d 70 5f 50  72 6f 63 65 73 73 4b 65  | "Wimp_ProcessKe|
00000e90  79 22 2c 73 74 79 6c 65  5f 74 61 62 6c 65 25 3f  |y",style_table%?|
00000ea0  28 62 6c 6b 25 21 31 36  29 0d 00 74 11 20 c9 20  |(blk%!16)..t. . |
00000eb0  6e 65 77 70 61 67 65 5f  77 25 0d 00 75 16 20 20  |newpage_w%..u.  |
00000ec0  20 20 20 20 c8 8e 20 62  6c 6b 25 21 31 36 20 ca  |    .. blk%!16 .|
00000ed0  0d 00 76 48 20 20 20 20  20 20 20 c9 20 32 3a 65  |..vH       . 2:e|
00000ee0  6f 70 5f 70 61 75 73 65  64 25 3d a3 3a 21 62 6c  |op_paused%=.:!bl|
00000ef0  6b 25 3d 6e 65 77 70 61  67 65 5f 77 25 3a c8 99  |k%=newpage_w%:..|
00000f00  22 57 69 6d 70 5f 43 6c  6f 73 65 57 69 6e 64 6f  |"Wimp_CloseWindo|
00000f10  77 22 2c 2c 62 6c 6b 25  0d 00 77 8e 20 20 20 20  |w",,blk%..w.    |
00000f20  20 20 20 c9 20 33 3a e7  20 a4 61 6c 65 72 74 28  |   . 3:. .alert(|
00000f30  33 2c 22 41 72 65 20 79  6f 75 20 73 75 72 65 20  |3,"Are you sure |
00000f40  79 6f 75 20 77 61 6e 74  20 74 6f 20 73 74 6f 70  |you want to stop|
00000f50  20 70 72 69 6e 74 69 6e  67 3f 22 29 3d 32 20 66  | printing?")=2 f|
00000f60  69 6c 65 25 3d 31 3a 21  62 6c 6b 25 3d 6e 65 77  |ile%=1:!blk%=new|
00000f70  70 61 67 65 5f 77 25 3a  c8 99 22 57 69 6d 70 5f  |page_w%:.."Wimp_|
00000f80  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6c  |CloseWindow",,bl|
00000f90  6b 25 3a 6d 61 73 6b 25  3d 25 31 31 30 30 30 30  |k%:mask%=%110000|
00000fa0  31 31 30 30 30 31 0d 00  78 0b 20 20 20 20 20 20  |110001..x.      |
00000fb0  cb 0d 00 79 0e 20 20 20  20 20 20 20 20 20 cc 0d  |...y.         ..|
00000fc0  00 7a 18 20 c9 20 76 69  65 77 5f 77 25 3a e7 20  |.z. . view_w%:. |
00000fd0  6d 62 25 3d 32 20 8c 0d  00 7b 1b 20 20 20 20 20  |mb%=2 ...{.     |
00000fe0  20 20 20 20 20 20 20 20  20 20 e7 20 68 64 6c 25  |          . hdl%|
00000ff0  20 8c 0d 00 7c 17 20 20  20 20 20 20 20 20 20 20  | ...|.          |
00001000  20 20 20 20 20 20 ef 20  37 0d 00 7d 14 20 20 20  |      . 7..}.   |
00001010  20 20 20 20 20 20 20 20  20 20 20 20 cc 0d 00 7e  |            ...~|
00001020  44 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |D               |
00001030  20 6d 78 25 3d 62 6c 6b  25 21 26 43 30 2d 31 30  | mx%=blk%!&C0-10|
00001040  30 3a 6d 68 25 3d 62 6c  6b 25 21 26 43 34 2b 35  |0:mh%=blk%!&C4+5|
00001050  36 3a 6d 65 6e 75 5f 68  25 3d 76 69 65 77 5f 6d  |6:menu_h%=view_m|
00001060  25 0d 00 7f 38 20 20 20  20 20 20 20 20 20 20 20  |%...8           |
00001070  20 20 20 20 20 c8 99 22  57 69 6d 70 5f 43 72 65  |     .."Wimp_Cre|
00001080  61 74 65 4d 65 6e 75 22  2c 2c 6d 65 6e 75 5f 68  |ateMenu",,menu_h|
00001090  25 2c 6d 78 25 2c 6d 68  25 0d 00 80 14 20 20 20  |%,mx%,mh%....   |
000010a0  20 20 20 20 20 20 20 20  20 20 20 20 cd 0d 00 81  |            ....|
000010b0  13 20 20 20 20 20 20 20  20 20 20 20 20 20 20 cd  |.              .|
000010c0  0d 00 82 53 20 c9 20 73  61 76 65 54 5f 77 25 2c  |...S . saveT_w%,|
000010d0  73 61 76 65 50 5f 77 25  3a e7 20 62 6c 6b 25 21  |saveP_w%:. blk%!|
000010e0  31 36 3d 30 20 80 20 62  6c 6b 25 21 38 3d 34 20  |16=0 . blk%!8=4 |
000010f0  73 61 76 65 5f 77 25 3d  62 6c 6b 25 21 31 32 3a  |save_w%=blk%!12:|
00001100  f2 64 72 61 67 5f 66 69  6c 65 28 62 6c 6b 25 21  |.drag_file(blk%!|
00001110  31 32 29 0d 00 83 04 0d  00 84 05 cb 0d 00 85 05  |12).............|
00001120  e1 0d 00 86 04 0d 00 87  16 dd f2 69 6d 6d 65 64  |...........immed|
00001130  5f 63 6f 64 65 28 6e 75  6d 25 29 0d 00 88 3e e7  |_code(num%)...>.|
00001140  20 66 69 6c 65 25 3d 32  20 49 25 3d a4 61 6c 65  | file%=2 I%=.ale|
00001150  72 74 28 31 2c 22 50 72  69 6e 74 69 6e 67 20 66  |rt(1,"Printing f|
00001160  69 6c 65 2c 20 63 61 6e  27 74 20 73 65 6e 64 20  |ile, can't send |
00001170  63 6f 64 65 73 22 29 3a  e1 0d 00 89 15 e7 20 ac  |codes"):...... .|
00001180  20 a4 70 72 69 6e 74 65  72 5f 6f 6e 20 e1 0d 00  | .printer_on ...|
00001190  8a 13 49 25 3d 69 6d 6d  65 64 5f 63 6f 64 65 73  |..I%=immed_codes|
000011a0  25 0d 00 8b 1d c8 95 20  6e 75 6d 25 3a 49 25 2b  |%...... num%:I%+|
000011b0  3d 3f 49 25 3a 6e 75 6d  25 2d 3d 31 3a ce 0d 00  |=?I%:num%-=1:...|
000011c0  8c 2d e3 20 4a 25 3d 31  20 b8 20 28 3f 49 25 29  |.-. J%=1 . (?I%)|
000011d0  2d 31 3a c8 99 22 4f 53  5f 50 72 69 6e 74 43 68  |-1:.."OS_PrintCh|
000011e0  61 72 22 2c 49 25 3f 4a  25 3a ed 0d 00 8d 05 e1  |ar",I%?J%:......|
000011f0  0d 00 8e 04 0d 00 8f 15  dd f2 67 65 74 5f 70 61  |..........get_pa|
00001200  67 65 5f 6c 61 79 6f 75  74 0d 00 90 1c 70 6c 25  |ge_layout....pl%|
00001210  3d a4 67 65 74 5f 6c 61  79 6f 75 74 5f 76 61 6c  |=.get_layout_val|
00001220  75 65 28 33 29 0d 00 91  29 6c 6d 25 3d a4 67 65  |ue(3)...)lm%=.ge|
00001230  74 5f 6c 61 79 6f 75 74  5f 76 61 6c 75 65 28 34  |t_layout_value(4|
00001240  29 3a 63 6f 64 65 25 21  31 36 3d 6c 6d 25 0d 00  |):code%!16=lm%..|
00001250  92 1c 74 73 25 3d a4 67  65 74 5f 6c 61 79 6f 75  |..ts%=.get_layou|
00001260  74 5f 76 61 6c 75 65 28  35 29 0d 00 93 1c 68 6c  |t_value(5)....hl|
00001270  25 3d a4 67 65 74 5f 6c  61 79 6f 75 74 5f 76 61  |%=.get_layout_va|
00001280  6c 75 65 28 36 29 0d 00  94 1c 62 73 25 3d a4 67  |lue(6)....bs%=.g|
00001290  65 74 5f 6c 61 79 6f 75  74 5f 76 61 6c 75 65 28  |et_layout_value(|
000012a0  37 29 0d 00 95 1c 66 6c  25 3d a4 67 65 74 5f 6c  |7)....fl%=.get_l|
000012b0  61 79 6f 75 74 5f 76 61  6c 75 65 28 38 29 0d 00  |ayout_value(8)..|
000012c0  96 1c 73 70 25 3d a4 67  65 74 5f 6c 61 79 6f 75  |..sp%=.get_layou|
000012d0  74 5f 76 61 6c 75 65 28  39 29 0d 00 97 2c 6d 6c  |t_value(9)...,ml|
000012e0  6c 25 3d a4 67 65 74 5f  6c 61 79 6f 75 74 5f 76  |l%=.get_layout_v|
000012f0  61 6c 75 65 28 31 30 29  3a 63 6f 64 65 25 21 32  |alue(10):code%!2|
00001300  30 3d 6d 6c 6c 25 0d 00  98 1e 66 66 25 3d a4 67  |0=mll%....ff%=.g|
00001310  65 74 5f 6c 61 79 6f 75  74 5f 74 6f 67 67 6c 65  |et_layout_toggle|
00001320  28 31 31 29 0d 00 99 1e  70 6f 25 3d a4 67 65 74  |(11)....po%=.get|
00001330  5f 6c 61 79 6f 75 74 5f  74 6f 67 67 6c 65 28 31  |_layout_toggle(1|
00001340  32 29 0d 00 9a 1e 70 70  25 3d a4 67 65 74 5f 6c  |2)....pp%=.get_l|
00001350  61 79 6f 75 74 5f 74 6f  67 67 6c 65 28 31 33 29  |ayout_toggle(13)|
00001360  0d 00 9b 39 21 62 6c 6b  25 3d 6c 61 79 6f 75 74  |...9!blk%=layout|
00001370  5f 77 25 3a 62 6c 6b 25  21 34 3d 31 3a c8 99 20  |_w%:blk%!4=1:.. |
00001380  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00001390  74 65 22 2c 2c 62 6c 6b  25 0d 00 9c 28 70 25 3d  |te",,blk%...(p%=|
000013a0  62 6c 6b 25 21 32 38 3a  41 25 3d a4 67 65 74 5f  |blk%!28:A%=.get_|
000013b0  63 6f 64 65 73 28 70 72  65 5f 70 72 69 6e 74 25  |codes(pre_print%|
000013c0  29 0d 00 9d 39 21 62 6c  6b 25 3d 6c 61 79 6f 75  |)...9!blk%=layou|
000013d0  74 5f 77 25 3a 62 6c 6b  25 21 34 3d 32 3a c8 99  |t_w%:blk%!4=2:..|
000013e0  20 22 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  | "Wimp_GetIconSt|
000013f0  61 74 65 22 2c 2c 62 6c  6b 25 0d 00 9e 29 70 25  |ate",,blk%...)p%|
00001400  3d 62 6c 6b 25 21 32 38  3a 41 25 3d a4 67 65 74  |=blk%!28:A%=.get|
00001410  5f 63 6f 64 65 73 28 70  6f 73 74 5f 70 72 69 6e  |_codes(post_prin|
00001420  74 25 29 0d 00 9f 2e c8  99 22 4f 53 5f 42 79 74  |t%)......"OS_Byt|
00001430  65 22 2c 31 38 32 2c 30  2c 32 35 35 20 b8 20 2c  |e",182,0,255 . ,|
00001440  49 25 3a 69 67 6e 6f 72  65 25 3d 49 25 80 26 37  |I%:ignore%=I%.&7|
00001450  46 0d 00 a0 0b e7 20 70  6f 25 20 8c 0d 00 a1 17  |F..... po% .....|
00001460  20 73 70 25 2d 3d 31 3a  62 6c 25 3d 70 6c 25 2d  | sp%-=1:bl%=pl%-|
00001470  62 73 25 0d 00 a2 1c 20  e7 20 68 6c 25 3e 74 73  |bs%.... . hl%>ts|
00001480  25 20 84 20 68 6c 25 3c  30 20 68 6c 25 3d 30 0d  |% . hl%<0 hl%=0.|
00001490  00 a3 1e 20 e7 20 66 6c  25 3e 70 6c 25 20 84 20  |... . fl%>pl% . |
000014a0  66 6c 25 3c 62 6c 25 20  66 6c 25 3d 30 0d 00 a4  |fl%<bl% fl%=0...|
000014b0  15 20 63 6f 64 65 25 21  31 32 3d 62 6c 25 2d 74  |. code%!12=bl%-t|
000014c0  73 25 0d 00 a5 05 cc 0d  00 a6 2b 20 62 6c 25 3d  |s%........+ bl%=|
000014d0  26 31 30 30 30 30 3a 68  6c 25 3d 30 3a 74 73 25  |&10000:hl%=0:ts%|
000014e0  3d 30 3a 63 6f 64 65 25  21 31 32 3d 26 31 30 30  |=0:code%!12=&100|
000014f0  30 30 0d 00 a7 05 cd 0d  00 a8 05 e1 0d 00 a9 04  |00..............|
00001500  0d 00 aa 13 dd f2 73 65  6e 64 5f 63 6f 64 65 28  |......send_code(|
00001510  69 25 29 0d 00 ab 0d e7  20 3f 69 25 3c 32 20 e1  |i%)..... ?i%<2 .|
00001520  0d 00 ac 2d e3 20 4a 25  3d 31 20 b8 20 28 3f 69  |...-. J%=1 . (?i|
00001530  25 29 2d 31 3a c8 99 22  4f 53 5f 50 72 69 6e 74  |%)-1:.."OS_Print|
00001540  43 68 61 72 22 2c 69 25  3f 4a 25 3a ed 0d 00 ad  |Char",i%?J%:....|
00001550  05 e1 0d 00 ae 04 0d 00  af 0d dd f2 70 72 65 76  |............prev|
00001560  69 65 77 0d 00 b0 14 f2  67 65 74 5f 70 61 67 65  |iew.....get_page|
00001570  5f 6c 61 79 6f 75 74 0d  00 b1 14 42 25 3d 32 3a  |_layout....B%=2:|
00001580  49 25 3d 28 ba 63 6f 64  65 25 29 0d 00 b2 3e 21  |I%=(.code%)...>!|
00001590  62 6c 6b 25 3d 30 3a 62  6c 6b 25 21 34 3d 2d 28  |blk%=0:blk%!4=-(|
000015a0  49 25 2a 33 32 29 2d 31  3a 62 6c 6b 25 21 38 3d  |I%*32)-1:blk%!8=|
000015b0  28 6d 6c 6c 25 2b 6c 6d  25 2b 32 29 2a 31 36 3a  |(mll%+lm%+2)*16:|
000015c0  62 6c 6b 25 21 31 32 3d  30 0d 00 b3 23 c8 99 22  |blk%!12=0...#.."|
000015d0  57 69 6d 70 5f 53 65 74  45 78 74 65 6e 74 22 2c  |Wimp_SetExtent",|
000015e0  76 69 65 77 5f 77 25 2c  62 6c 6b 25 0d 00 b4 2f  |view_w%,blk%.../|
000015f0  21 62 6c 6b 25 3d 76 69  65 77 5f 77 25 3a c8 99  |!blk%=view_w%:..|
00001600  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
00001610  74 61 74 65 22 2c 2c 62  6c 6b 25 0d 00 b5 25 e7  |tate",,blk%...%.|
00001620  20 6e 65 77 25 20 62 6c  6b 25 21 32 30 3d 30 3a  | new% blk%!20=0:|
00001630  62 6c 6b 25 21 32 34 3d  30 3a 6e 65 77 25 3d a3  |blk%!24=0:new%=.|
00001640  0d 00 b6 28 62 6c 6b 25  21 32 38 3d 2d 31 3a c8  |...(blk%!28=-1:.|
00001650  99 22 57 69 6d 70 5f 4f  70 65 6e 57 69 6e 64 6f  |."Wimp_OpenWindo|
00001660  77 22 2c 2c 62 6c 6b 25  0d 00 b7 05 e1 0d 00 b8  |w",,blk%........|
00001670  04 0d 00 b9 17 dd f2 73  74 61 72 74 5f 70 72 69  |.......start_pri|
00001680  6e 74 28 68 64 6c 25 29  0d 00 ba 46 e7 20 66 69  |nt(hdl%)...F. fi|
00001690  6c 65 25 3d 32 20 e7 20  a4 61 6c 65 72 74 28 33  |le%=2 . .alert(3|
000016a0  2c 22 41 6c 72 65 61 64  79 20 70 72 69 6e 74 69  |,"Already printi|
000016b0  6e 67 2c 20 64 6f 20 79  6f 75 20 77 61 6e 74 20  |ng, do you want |
000016c0  74 6f 20 71 75 69 74 3f  22 29 3d 32 20 e1 0d 00  |to quit?")=2 ...|
000016d0  bb 2d e7 20 66 69 6c 65  25 3d 30 20 49 25 3d a4  |.-. file%=0 I%=.|
000016e0  61 6c 65 72 74 28 31 2c  22 4e 6f 20 66 69 6c 65  |alert(1,"No file|
000016f0  20 6c 6f 61 64 65 64 22  29 3a e1 0d 00 bc 14 f2  | loaded"):......|
00001700  67 65 74 5f 70 61 67 65  5f 6c 61 79 6f 75 74 0d  |get_page_layout.|
00001710  00 bd 26 6c 69 6e 65 25  3d 30 3a 70 74 72 25 3d  |..&line%=0:ptr%=|
00001720  62 75 66 66 65 72 25 3a  65 6f 70 5f 70 61 75 73  |buffer%:eop_paus|
00001730  65 64 25 3d a3 0d 00 be  3b 68 65 61 64 65 72 5f  |ed%=....;header_|
00001740  66 6c 67 25 3d 30 3a 68  65 61 64 65 72 5f 70 74  |flg%=0:header_pt|
00001750  72 25 3d 30 3a 66 6f 6f  74 65 72 5f 66 6c 67 25  |r%=0:footer_flg%|
00001760  3d 30 3a 66 6f 6f 74 65  72 5f 70 74 72 25 3d 30  |=0:footer_ptr%=0|
00001770  0d 00 bf 0b e7 20 70 6f  25 20 8c 0d 00 c0 14 20  |..... po% ..... |
00001780  49 25 3d 62 75 66 66 65  72 25 3a 4c 25 3d 30 0d  |I%=buffer%:L%=0.|
00001790  00 c1 06 20 f5 0d 00 c2  1f 20 20 e7 20 3f 49 25  |... .....  . ?I%|
000017a0  3d 32 30 20 68 65 61 64  65 72 5f 70 74 72 25 3d  |=20 header_ptr%=|
000017b0  49 25 2b 31 0d 00 c3 23  20 20 49 25 2b 3d 31 3a  |I%+1...#  I%+=1:|
000017c0  e7 20 3f 49 25 3d 31 33  20 84 20 3f 49 25 3d 31  |. ?I%=13 . ?I%=1|
000017d0  30 20 4c 25 2b 3d 31 0d  00 c4 26 20 fd 20 4c 25  |0 L%+=1...& . L%|
000017e0  3e 31 30 20 84 20 68 65  61 64 65 72 5f 70 74 72  |>10 . header_ptr|
000017f0  25 3e 30 20 84 20 49 25  3e 65 6e 64 25 0d 00 c5  |%>0 . I%>end%...|
00001800  05 cd 0d 00 c6 0c e7 20  68 64 6c 25 20 8c 0d 00  |....... hdl% ...|
00001810  c7 19 20 70 70 25 3d a3  3a 66 72 65 65 25 3d 26  |.. pp%=.:free%=&|
00001820  31 30 30 30 30 30 30 0d  00 c8 16 20 66 69 6c 65  |1000000.... file|
00001830  25 3d 34 3a 49 25 3d a4  70 72 69 6e 74 0d 00 c9  |%=4:I%=.print...|
00001840  05 cc 0d 00 ca 16 20 e7  20 ac 20 a4 70 72 69 6e  |...... . . .prin|
00001850  74 65 72 5f 6f 6e 20 e1  0d 00 cb 7a 20 42 25 3d  |ter_on ....z B%=|
00001860  30 3a e7 20 ba 63 6f 64  65 25 20 3e 6d 6c 6c 25  |0:. .code% >mll%|
00001870  20 e7 20 a4 61 6c 65 72  74 28 33 2c 22 4c 69 6e  | . .alert(3,"Lin|
00001880  65 73 20 6c 6f 6e 67 65  72 20 74 68 61 6e 20 74  |es longer than t|
00001890  68 65 20 6d 61 78 69 6d  75 6d 20 64 65 66 69 6e  |he maximum defin|
000018a0  65 64 20 66 6f 75 6e 64  2c 20 64 6f 20 79 6f 75  |ed found, do you|
000018b0  20 77 61 6e 74 20 74 6f  20 63 6f 6e 74 69 6e 75  | want to continu|
000018c0  65 20 6f 72 20 63 61 6e  63 65 6c 3f 22 29 3d 32  |e or cancel?")=2|
000018d0  20 e1 0d 00 cc 10 20 42  25 3d 32 3a d6 63 6f 64  | ..... B%=2:.cod|
000018e0  65 25 0d 00 cd 1b 20 f2  73 65 6e 64 5f 63 6f 64  |e%.... .send_cod|
000018f0  65 28 70 72 65 5f 70 72  69 6e 74 25 29 0d 00 ce  |e(pre_print%)...|
00001900  21 20 f2 75 70 64 61 74  65 5f 73 74 61 74 75 73  |! .update_status|
00001910  28 34 2c 22 50 72 69 6e  74 69 6e 67 22 29 0d 00  |(4,"Printing")..|
00001920  cf 19 20 66 69 6c 65 25  3d 32 3a 6d 61 73 6b 25  |.. file%=2:mask%|
00001930  3d a4 70 72 69 6e 74 0d  00 d0 05 cd 0d 00 d1 05  |=.print.........|
00001940  e1 0d 00 d2 04 0d 00 d3  0b dd a4 70 72 69 6e 74  |...........print|
00001950  0d 00 d4 08 ea 20 63 25  0d 00 d5 3a e7 20 68 64  |..... c%...:. hd|
00001960  6c 25 3d a3 20 c8 99 22  4f 53 5f 42 79 74 65 22  |l%=. .."OS_Byte"|
00001970  2c 31 32 38 2c 32 35 32  20 b8 20 2c 4c 25 2c 48  |,128,252 . ,L%,H|
00001980  25 3a 66 72 65 65 25 3d  4c 25 2b 28 48 25 3c 3c  |%:free%=L%+(H%<<|
00001990  38 29 0d 00 d6 21 e7 20  66 72 65 65 25 3c 26 32  |8)...!. free%<&2|
000019a0  30 30 20 84 20 65 6f 70  5f 70 61 75 73 65 64 25  |00 . eop_paused%|
000019b0  3a 3d 30 0d 00 d7 05 f5  0d 00 d8 1c e7 20 6c 69  |:=0.......... li|
000019c0  6e 65 25 3d 30 20 f2 70  72 69 6e 74 5f 6e 65 77  |ne%=0 .print_new|
000019d0  70 61 67 65 0d 00 d9 15  20 63 25 3d 3f 70 74 72  |page.... c%=?ptr|
000019e0  25 3a 70 74 72 25 2b 3d  31 0d 00 da 0c 20 c8 8e  |%:ptr%+=1.... ..|
000019f0  20 63 25 20 ca 0d 00 db  25 20 20 c9 20 36 20 3a  | c% ....%  . 6 :|
00001a00  66 6f 6f 74 65 72 5f 70  74 72 25 3d 70 74 72 25  |footer_ptr%=ptr%|
00001a10  3a f2 66 69 6e 64 5f 73  6f 6c 0d 00 dc 18 20 20  |:.find_sol....  |
00001a20  c9 20 31 30 2c 31 33 3a  f2 70 72 69 6e 74 5f 65  |. 10,13:.print_e|
00001a30  6f 6c 0d 00 dd 18 20 20  c9 20 31 31 2c 31 32 3a  |ol....  . 11,12:|
00001a40  f2 70 72 69 6e 74 5f 65  6f 70 0d 00 de 17 20 20  |.print_eop....  |
00001a50  c9 20 31 35 3a 49 25 3d  70 74 72 25 3a 43 25 3d  |. 15:I%=ptr%:C%=|
00001a60  30 0d 00 df 2c 20 20 20  20 20 20 20 20 20 20 c8  |0...,          .|
00001a70  95 20 28 3f 49 25 3e 31  33 20 84 20 3f 49 25 3c  |. (?I%>13 . ?I%<|
00001a80  31 30 29 20 80 20 3f 49  25 3c 3e 31 38 0d 00 e0  |10) . ?I%<>18...|
00001a90  34 20 20 20 20 20 20 20  20 20 20 20 e7 20 3f 49  |4           . ?I|
00001aa0  25 3e 33 31 20 80 20 73  74 79 6c 65 5f 74 61 62  |%>31 . style_tab|
00001ab0  6c 65 25 3f 28 3f 49 25  29 3d 30 20 43 25 2b 3d  |le%?(?I%)=0 C%+=|
00001ac0  31 0d 00 e1 1d 20 20 20  20 20 20 20 20 20 20 20  |1....           |
00001ad0  e7 20 3f 49 25 3d 31 36  20 43 25 2b 3d 32 0d 00  |. ?I%=16 C%+=2..|
00001ae0  e2 14 20 20 20 20 20 20  20 20 20 20 20 49 25 2b  |..           I%+|
00001af0  3d 31 0d 00 e3 0f 20 20  20 20 20 20 20 20 20 20  |=1....          |
00001b00  ce 0d 00 e4 23 20 20 20  20 20 20 20 20 20 20 4a  |....#          J|
00001b10  25 3d 28 28 6d 6c 6c 25  2d 43 25 29 81 32 29 2d  |%=((mll%-C%).2)-|
00001b20  6c 65 6e 25 0d 00 e5 16  20 20 20 20 20 20 20 20  |len%....        |
00001b30  20 20 e7 20 68 64 6c 25  20 8c 0d 00 e6 3a 20 20  |  . hdl% ....:  |
00001b40  20 20 20 20 20 20 20 20  20 c8 95 20 4a 25 3e 30  |         .. J%>0|
00001b50  3a c8 99 22 4f 53 5f 42  50 75 74 22 2c 33 32 2c  |:.."OS_BPut",32,|
00001b60  68 64 6c 25 3a 6c 65 6e  25 2b 3d 31 3a 4a 25 2d  |hdl%:len%+=1:J%-|
00001b70  3d 31 3a ce 0d 00 e7 0f  20 20 20 20 20 20 20 20  |=1:.....        |
00001b80  20 20 cc 0d 00 e8 43 20  20 20 20 20 20 20 20 20  |  ....C         |
00001b90  20 20 c8 95 20 4a 25 3e  30 3a c8 99 22 4f 53 5f  |  .. J%>0:.."OS_|
00001ba0  50 72 69 6e 74 43 68 61  72 22 2c 33 32 3a 66 72  |PrintChar",32:fr|
00001bb0  65 65 25 2d 3d 31 3a 6c  65 6e 25 2b 3d 31 3a 4a  |ee%-=1:len%+=1:J|
00001bc0  25 2d 3d 31 3a ce 0d 00  e9 0f 20 20 20 20 20 20  |%-=1:.....      |
00001bd0  20 20 20 20 cd 0d 00 ea  3c 20 20 c9 20 31 36 3a  |    ....<  . 16:|
00001be0  c8 99 20 22 4f 53 5f 43  6f 6e 76 65 72 74 43 61  |.. "OS_ConvertCa|
00001bf0  72 64 69 6e 61 6c 31 22  2c 73 70 25 2c 62 6c 6b  |rdinal1",sp%,blk|
00001c00  25 2b 26 31 30 30 2c 33  32 20 b8 20 49 25 2c 4a  |%+&100,32 . I%,J|
00001c10  25 0d 00 eb 16 20 20 20  20 20 20 20 20 20 20 e7  |%....          .|
00001c20  20 68 64 6c 25 20 8c 0d  00 ec 3c 20 20 20 20 20  | hdl% ....<     |
00001c30  20 20 20 20 20 20 c8 95  20 49 25 3c 4a 25 3a c8  |      .. I%<J%:.|
00001c40  99 22 4f 53 5f 42 50 75  74 22 2c 3f 49 25 2c 68  |."OS_BPut",?I%,h|
00001c50  64 6c 25 3a 49 25 2b 3d  31 3a 6c 65 6e 25 2b 3d  |dl%:I%+=1:len%+=|
00001c60  31 3a ce 0d 00 ed 0f 20  20 20 20 20 20 20 20 20  |1:.....         |
00001c70  20 cc 0d 00 ee 45 20 20  20 20 20 20 20 20 20 20  | ....E          |
00001c80  20 c8 95 20 49 25 3c 4a  25 3a c8 99 22 4f 53 5f  | .. I%<J%:.."OS_|
00001c90  50 72 69 6e 74 43 68 61  72 22 2c 3f 49 25 3a 49  |PrintChar",?I%:I|
00001ca0  25 2b 3d 31 3a 66 72 65  65 25 2d 3d 31 3a 6c 65  |%+=1:free%-=1:le|
00001cb0  6e 25 2b 3d 31 3a ce 0d  00 ef 0f 20 20 20 20 20  |n%+=1:.....     |
00001cc0  20 20 20 20 20 cd 0d 00  f0 1a 20 20 c9 20 31 38  |     .....  . 18|
00001cd0  3a 49 25 3d 70 74 72 25  3a 43 25 3d 6c 65 6e 25  |:I%=ptr%:C%=len%|
00001ce0  0d 00 f1 20 20 20 20 20  20 20 20 20 20 20 c8 95  |...           ..|
00001cf0  20 3f 49 25 3e 31 33 20  84 20 3f 49 25 3c 31 30  | ?I%>13 . ?I%<10|
00001d00  0d 00 f2 34 20 20 20 20  20 20 20 20 20 20 20 e7  |...4           .|
00001d10  20 3f 49 25 3e 33 31 20  80 20 73 74 79 6c 65 5f  | ?I%>31 . style_|
00001d20  74 61 62 6c 65 25 3f 28  3f 49 25 29 3d 30 20 43  |table%?(?I%)=0 C|
00001d30  25 2b 3d 31 0d 00 f3 1d  20 20 20 20 20 20 20 20  |%+=1....        |
00001d40  20 20 20 e7 20 3f 49 25  3d 31 36 20 43 25 2b 3d  |   . ?I%=16 C%+=|
00001d50  32 0d 00 f4 14 20 20 20  20 20 20 20 20 20 20 20  |2....           |
00001d60  49 25 2b 3d 31 0d 00 f5  0f 20 20 20 20 20 20 20  |I%+=1....       |
00001d70  20 20 20 ce 0d 00 f6 18  20 20 20 20 20 20 20 20  |   .....        |
00001d80  20 20 4a 25 3d 6d 6c 6c  25 2d 43 25 0d 00 f7 16  |  J%=mll%-C%....|
00001d90  20 20 20 20 20 20 20 20  20 20 e7 20 68 64 6c 25  |          . hdl%|
00001da0  20 8c 0d 00 f8 3a 20 20  20 20 20 20 20 20 20 20  | ....:          |
00001db0  20 c8 95 20 4a 25 3e 30  3a c8 99 22 4f 53 5f 42  | .. J%>0:.."OS_B|
00001dc0  50 75 74 22 2c 33 32 2c  68 64 6c 25 3a 6c 65 6e  |Put",32,hdl%:len|
00001dd0  25 2b 3d 31 3a 4a 25 2d  3d 31 3a ce 0d 00 f9 0f  |%+=1:J%-=1:.....|
00001de0  20 20 20 20 20 20 20 20  20 20 cc 0d 00 fa 43 20  |          ....C |
00001df0  20 20 20 20 20 20 20 20  20 20 c8 95 20 4a 25 3e  |          .. J%>|
00001e00  30 3a c8 99 22 4f 53 5f  50 72 69 6e 74 43 68 61  |0:.."OS_PrintCha|
00001e10  72 22 2c 33 32 3a 66 72  65 65 25 2d 3d 31 3a 6c  |r",32:free%-=1:l|
00001e20  65 6e 25 2b 3d 31 3a 4a  25 2d 3d 31 3a ce 0d 00  |en%+=1:J%-=1:...|
00001e30  fb 0f 20 20 20 20 20 20  20 20 20 20 cd 0d 00 fc  |..          ....|
00001e40  25 20 20 c9 20 32 30 3a  68 65 61 64 65 72 5f 70  |%  . 20:header_p|
00001e50  74 72 25 3d 70 74 72 25  3a f2 66 69 6e 64 5f 73  |tr%=ptr%:.find_s|
00001e60  6f 6c 0d 00 fd 06 20 7f  0d 00 fe 1c 20 20 20 e7  |ol.... .....   .|
00001e70  20 63 6f 64 65 5f 69 6e  64 65 78 25 3f 63 25 20  | code_index%?c% |
00001e80  3e 30 20 8c 0d 00 ff 12  20 20 20 20 e7 20 68 64  |>0 .....    . hd|
00001e90  6c 25 3d a3 20 8c 0d 01  00 24 20 20 20 20 20 4a  |l%=. ....$     J|
00001ea0  25 3d 63 6f 64 65 5f 69  6e 64 65 78 25 3f 63 25  |%=code_index%?c%|
00001eb0  3a 49 25 3d 63 6f 64 65  73 25 0d 01 01 20 20 20  |:I%=codes%...   |
00001ec0  20 20 20 c8 95 20 4a 25  3e 31 3a 49 25 2b 3d 3f  |   .. J%>1:I%+=?|
00001ed0  49 25 3a 4a 25 2d 3d 31  3a ce 0d 01 02 3b 20 20  |I%:J%-=1:....;  |
00001ee0  20 20 20 e3 20 4a 25 3d  31 20 b8 20 28 3f 49 25  |   . J%=1 . (?I%|
00001ef0  29 2d 31 3a c8 99 22 4f  53 5f 50 72 69 6e 74 43  |)-1:.."OS_PrintC|
00001f00  68 61 72 22 2c 49 25 3f  4a 25 3a 66 72 65 65 25  |har",I%?J%:free%|
00001f10  2d 3d 31 3a ed 0d 01 03  22 20 20 20 20 20 e7 20  |-=1:...."     . |
00001f20  74 72 61 6e 73 5f 69 6e  64 65 78 25 3f 63 25 20  |trans_index%?c% |
00001f30  6c 65 6e 25 2b 3d 31 0d  01 04 09 20 20 20 20 cc  |len%+=1....    .|
00001f40  0d 01 05 36 20 20 20 20  20 e7 20 74 72 61 6e 73  |...6     . trans|
00001f50  5f 69 6e 64 65 78 25 3f  63 25 20 c8 99 22 4f 53  |_index%?c% .."OS|
00001f60  5f 42 50 75 74 22 2c 63  25 2c 68 64 6c 25 3a 6c  |_BPut",c%,hdl%:l|
00001f70  65 6e 25 2b 3d 31 0d 01  06 09 20 20 20 20 cd 0d  |en%+=1....    ..|
00001f80  01 07 08 20 20 20 cc 0d  01 08 49 20 20 20 20 6c  |...   ....I    l|
00001f90  65 6e 25 2b 3d 31 3a e7  20 68 64 6c 25 20 c8 99  |en%+=1:. hdl% ..|
00001fa0  22 4f 53 5f 42 50 75 74  22 2c 63 25 2c 68 64 6c  |"OS_BPut",c%,hdl|
00001fb0  25 20 8b 20 c8 99 22 4f  53 5f 50 72 69 6e 74 43  |% . .."OS_PrintC|
00001fc0  68 61 72 22 2c 63 25 3a  66 72 65 65 25 2d 3d 31  |har",c%:free%-=1|
00001fd0  0d 01 09 08 20 20 20 cd  0d 01 0a 06 20 cb 0d 01  |....   ..... ...|
00001fe0  0b 29 fd 20 66 72 65 65  25 3c 32 30 20 84 20 70  |.). free%<20 . p|
00001ff0  74 72 25 3e 3d 65 6e 64  25 20 84 20 65 6f 70 5f  |tr%>=end% . eop_|
00002000  70 61 75 73 65 64 25 0d  01 0c 04 0d 01 0d 12 e7  |paused%.........|
00002010  20 70 74 72 25 3e 3d 65  6e 64 25 20 8c 0d 01 0e  | ptr%>=end% ....|
00002020  0d 20 e7 20 68 64 6c 25  20 8c 0d 01 0f 42 20 20  |. . hdl% ....B  |
00002030  e7 20 70 6f 25 20 e7 20  66 69 6c 65 25 3c 3e 33  |. po% . file%<>3|
00002040  20 f2 70 72 69 6e 74 5f  65 6f 70 3a 66 69 6c 65  | .print_eop:file|
00002050  25 3d 33 3a 49 25 3d a4  70 72 69 6e 74 3a 3d 25  |%=3:I%=.print:=%|
00002060  31 31 30 30 30 30 31 31  30 30 30 31 0d 01 10 33  |110000110001...3|
00002070  20 20 c8 99 22 4f 53 5f  46 69 6e 64 22 2c 30 2c  |  .."OS_Find",0,|
00002080  68 64 6c 25 3a c8 99 22  4f 53 5f 46 69 6c 65 22  |hdl%:.."OS_File"|
00002090  2c 31 38 2c 73 70 6c 73  76 24 2c 26 46 46 46 0d  |,18,splsv$,&FFF.|
000020a0  01 11 1e 20 20 c8 99 22  48 6f 75 72 67 6c 61 73  |...  .."Hourglas|
000020b0  73 5f 4f 66 66 22 3a 68  64 6c 25 3d a3 0d 01 12  |s_Off":hdl%=....|
000020c0  06 20 cc 0d 01 13 1d 20  20 f2 73 65 6e 64 5f 63  |. .....  .send_c|
000020d0  6f 64 65 28 70 6f 73 74  5f 70 72 69 6e 74 25 29  |ode(post_print%)|
000020e0  0d 01 14 2c 20 20 e7 20  70 6f 25 20 e7 20 66 69  |...,  . po% . fi|
000020f0  6c 65 25 3c 3e 33 20 f2  70 72 69 6e 74 5f 65 6f  |le%<>3 .print_eo|
00002100  70 3a 66 69 6c 65 25 3d  33 3a 3d 30 0d 01 15 3c  |p:file%=3:=0...<|
00002110  20 20 66 69 6c 65 25 3d  33 3a f2 73 74 61 74 75  |  file%=3:.statu|
00002120  73 5f 76 61 6c 75 65 28  33 2c 30 29 3a f2 75 70  |s_value(3,0):.up|
00002130  64 61 74 65 5f 73 74 61  74 75 73 28 34 2c 22 57  |date_status(4,"W|
00002140  61 69 74 69 6e 67 22 29  0d 01 16 06 20 cd 0d 01  |aiting").... ...|
00002150  17 12 3d 25 31 31 30 30  30 30 31 31 30 30 30 31  |..=%110000110001|
00002160  0d 01 18 05 cc 0d 01 19  2d 20 e7 20 65 6f 70 5f  |........- . eop_|
00002170  70 61 75 73 65 64 25 20  f2 75 70 64 61 74 65 5f  |paused% .update_|
00002180  73 74 61 74 75 73 28 34  2c 22 21 50 61 70 65 72  |status(4,"!Paper|
00002190  22 29 0d 01 1a 1f 20 f2  73 74 61 74 75 73 5f 76  |").... .status_v|
000021a0  61 6c 75 65 28 33 2c 65  6e 64 25 2d 70 74 72 25  |alue(3,end%-ptr%|
000021b0  29 0d 01 1b 05 cd 0d 01  1c 06 3d 30 0d 01 1d 04  |).........=0....|
000021c0  0d 01 1e 0f dd f2 70 72  69 6e 74 5f 65 6f 70 0d  |......print_eop.|
000021d0  01 1f 18 e7 20 ac 20 70  6f 25 20 f2 70 72 69 6e  |.... . po% .prin|
000021e0  74 5f 65 6f 6c 3a e1 0d  01 20 0b e7 20 66 6c 25  |t_eol:... .. fl%|
000021f0  20 8c 0d 01 21 22 20 c8  95 20 6c 69 6e 65 25 3c  | ...!" .. line%<|
00002200  66 6c 25 3a f2 70 72 69  6e 74 5f 6e 65 77 6c 69  |fl%:.print_newli|
00002210  6e 65 3a ce 0d 01 22 0f  20 f2 70 72 69 6e 74 5f  |ne:...". .print_|
00002220  73 6f 6c 0d 01 23 05 cc  0d 01 24 17 20 f2 70 72  |sol..#....$. .pr|
00002230  69 6e 74 5f 70 61 67 65  5f 62 6f 74 74 6f 6d 0d  |int_page_bottom.|
00002240  01 25 05 cd 0d 01 26 05  e1 0d 01 27 04 0d 01 28  |.%....&....'...(|
00002250  13 dd f2 70 72 69 6e 74  5f 6e 65 77 6c 69 6e 65  |...print_newline|
00002260  0d 01 29 0c e7 20 68 64  6c 25 20 8c 0d 01 2a 18  |..).. hdl% ...*.|
00002270  20 c8 99 22 4f 53 5f 42  50 75 74 22 2c 31 30 2c  | .."OS_BPut",10,|
00002280  68 64 6c 25 0d 01 2b 05  cc 0d 01 2c 21 20 c8 99  |hdl%..+....,! ..|
00002290  22 4f 53 5f 50 72 69 6e  74 43 68 61 72 22 2c 31  |"OS_PrintChar",1|
000022a0  33 3a 66 72 65 65 25 2d  3d 31 0d 01 2d 30 20 e7  |3:free%-=1..-0 .|
000022b0  20 69 67 6e 6f 72 65 25  20 3c 3e 31 30 20 c8 99  | ignore% <>10 ..|
000022c0  22 4f 53 5f 50 72 69 6e  74 43 68 61 72 22 2c 31  |"OS_PrintChar",1|
000022d0  30 3a 66 72 65 65 25 2d  3d 31 0d 01 2e 05 cd 0d  |0:free%-=1......|
000022e0  01 2f 0c 6c 69 6e 65 25  2b 3d 31 0d 01 30 05 e1  |./.line%+=1..0..|
000022f0  0d 01 31 04 0d 01 32 0f  dd f2 70 72 69 6e 74 5f  |..1...2...print_|
00002300  65 6f 6c 0d 01 33 12 f2  70 72 69 6e 74 5f 6e 65  |eol..3..print_ne|
00002310  77 6c 69 6e 65 0d 01 34  13 e7 20 68 65 61 64 65  |wline..4.. heade|
00002320  72 5f 66 6c 67 25 20 8c  0d 01 35 23 20 70 74 72  |r_flg% ...5# ptr|
00002330  25 3d 68 65 61 64 65 72  5f 66 6c 67 25 3a 68 65  |%=header_flg%:he|
00002340  61 64 65 72 5f 66 6c 67  25 3d 30 0d 01 36 22 20  |ader_flg%=0..6" |
00002350  c8 95 20 6c 69 6e 65 25  3c 74 73 25 3a f2 70 72  |.. line%<ts%:.pr|
00002360  69 6e 74 5f 6e 65 77 6c  69 6e 65 3a ce 0d 01 37  |int_newline:...7|
00002370  0f 20 f2 70 72 69 6e 74  5f 73 6f 6c 0d 01 38 05  |. .print_sol..8.|
00002380  cc 0d 01 39 14 20 e7 20  66 6f 6f 74 65 72 5f 66  |...9. . footer_f|
00002390  6c 67 25 20 8c 0d 01 3a  37 20 20 70 74 72 25 3d  |lg% ...:7  ptr%=|
000023a0  66 6f 6f 74 65 72 5f 66  6c 67 25 3a 66 6f 6f 74  |footer_flg%:foot|
000023b0  65 72 5f 66 6c 67 25 3d  30 3a f2 70 72 69 6e 74  |er_flg%=0:.print|
000023c0  5f 70 61 67 65 5f 62 6f  74 74 6f 6d 0d 01 3b 06  |_page_bottom..;.|
000023d0  20 cc 0d 01 3c 10 20 20  f2 70 72 69 6e 74 5f 73  | ...<.  .print_s|
000023e0  6f 6c 0d 01 3d 06 20 cd  0d 01 3e 05 cd 0d 01 3f  |ol..=. ...>....?|
000023f0  05 e1 0d 01 40 04 0d 01  41 17 dd f2 70 72 69 6e  |....@...A...prin|
00002400  74 5f 70 61 67 65 5f 62  6f 74 74 6f 6d 0d 01 42  |t_page_bottom..B|
00002410  0b e7 20 66 66 25 20 8c  0d 01 43 3e 20 e7 20 68  |.. ff% ...C> . h|
00002420  64 6c 25 20 c8 99 22 4f  53 5f 42 50 75 74 22 2c  |dl% .."OS_BPut",|
00002430  31 32 2c 68 64 6c 25 20  8b 20 c8 99 22 4f 53 5f  |12,hdl% . .."OS_|
00002440  50 72 69 6e 74 43 68 61  72 22 2c 31 32 3a 66 72  |PrintChar",12:fr|
00002450  65 65 25 2d 3d 31 0d 01  44 05 cc 0d 01 45 23 20  |ee%-=1..D....E# |
00002460  c8 95 20 6c 69 6e 65 25  3c 3d 70 6c 25 3a f2 70  |.. line%<=pl%:.p|
00002470  72 69 6e 74 5f 6e 65 77  6c 69 6e 65 3a ce 0d 01  |rint_newline:...|
00002480  46 05 cd 0d 01 47 0b e7  20 70 70 25 20 8c 0d 01  |F....G.. pp% ...|
00002490  48 1f 20 f2 75 70 64 61  74 65 5f 73 74 61 74 75  |H. .update_statu|
000024a0  73 28 34 2c 22 21 50 61  70 65 72 22 29 0d 01 49  |s(4,"!Paper")..I|
000024b0  34 20 21 62 6c 6b 25 3d  6e 65 77 70 61 67 65 5f  |4 !blk%=newpage_|
000024c0  77 25 3a c8 99 20 22 57  69 6d 70 5f 47 65 74 57  |w%:.. "Wimp_GetW|
000024d0  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 62 6c 6b  |indowState",,blk|
000024e0  25 0d 01 4a 2a 20 62 6c  6b 25 21 32 38 3d 2d 31  |%..J* blk%!28=-1|
000024f0  3a c8 99 20 22 57 69 6d  70 5f 4f 70 65 6e 57 69  |:.. "Wimp_OpenWi|
00002500  6e 64 6f 77 22 2c 2c 62  6c 6b 25 0d 01 4b 16 20  |ndow",,blk%..K. |
00002510  ef 20 37 3a 65 6f 70 5f  70 61 75 73 65 64 25 3d  |. 7:eop_paused%=|
00002520  b9 0d 01 4c 05 cd 0d 01  4d 0b 6c 69 6e 65 25 3d  |...L....M.line%=|
00002530  30 0d 01 4e 05 e1 0d 01  4f 04 0d 01 50 0f dd f2  |0..N....O...P...|
00002540  70 72 69 6e 74 5f 73 6f  6c 0d 01 51 0b e7 20 70  |print_sol..Q.. p|
00002550  6f 25 20 8c 0d 01 52 0f  20 c8 8e 20 6c 69 6e 65  |o% ...R. .. line|
00002560  25 20 ca 0d 01 53 1a 20  20 c9 20 30 20 20 3a f2  |% ...S.  . 0  :.|
00002570  70 72 69 6e 74 5f 6e 65  77 70 61 67 65 0d 01 54  |print_newpage..T|
00002580  3b 20 20 c9 20 68 6c 25  3a e7 20 68 65 61 64 65  |;  . hl%:. heade|
00002590  72 5f 70 74 72 25 20 68  65 61 64 65 72 5f 66 6c  |r_ptr% header_fl|
000025a0  67 25 3d 70 74 72 25 3a  70 74 72 25 3d 68 65 61  |g%=ptr%:ptr%=hea|
000025b0  64 65 72 5f 70 74 72 25  0d 01 55 3b 20 20 c9 20  |der_ptr%..U;  . |
000025c0  66 6c 25 3a e7 20 66 6f  6f 74 65 72 5f 70 74 72  |fl%:. footer_ptr|
000025d0  25 20 66 6f 6f 74 65 72  5f 66 6c 67 25 3d 70 74  |% footer_flg%=pt|
000025e0  72 25 3a 70 74 72 25 3d  66 6f 6f 74 65 72 5f 70  |r%:ptr%=footer_p|
000025f0  74 72 25 0d 01 56 25 20  20 c9 20 62 6c 25 3a e7  |tr%..V%  . bl%:.|
00002600  20 66 6c 25 3e 30 20 80  20 66 6f 6f 74 65 72 5f  | fl%>0 . footer_|
00002610  70 74 72 25 3e 30 20 8c  0d 01 57 2d 20 20 20 20  |ptr%>0 ...W-    |
00002620  20 20 20 20 20 20 20 20  c8 95 20 6c 69 6e 65 25  |        .. line%|
00002630  3c 66 6c 25 3a f2 70 72  69 6e 74 5f 6e 65 77 6c  |<fl%:.print_newl|
00002640  69 6e 65 3a ce 0d 01 58  31 20 20 20 20 20 20 20  |ine:...X1       |
00002650  20 20 20 20 20 66 6f 6f  74 65 72 5f 66 6c 67 25  |     footer_flg%|
00002660  3d 70 74 72 25 3a 70 74  72 25 3d 66 6f 6f 74 65  |=ptr%:ptr%=foote|
00002670  72 5f 70 74 72 25 0d 01  59 10 20 20 20 20 20 20  |r_ptr%..Y.      |
00002680  20 20 20 20 20 cc 0d 01  5a 24 20 20 20 20 20 20  |     ...Z$      |
00002690  20 20 20 20 20 20 f2 70  72 69 6e 74 5f 70 61 67  |      .print_pag|
000026a0  65 5f 62 6f 74 74 6f 6d  3a e1 0d 01 5b 10 20 20  |e_bottom:...[.  |
000026b0  20 20 20 20 20 20 20 20  20 cd 0d 01 5c 1a 20 20  |         ...\.  |
000026c0  c9 20 70 6c 25 3a f2 70  72 69 6e 74 5f 6e 65 77  |. pl%:.print_new|
000026d0  70 61 67 65 0d 01 5d 06  20 cb 0d 01 5e 05 cd 0d  |page..]. ...^...|
000026e0  01 5f 11 49 25 3d 6c 6d  25 3a 6c 65 6e 25 3d 30  |._.I%=lm%:len%=0|
000026f0  0d 01 60 1a e7 20 3f 70  74 72 25 3c 31 34 20 e7  |..`.. ?ptr%<14 .|
00002700  20 3f 70 74 72 25 3e 39  20 e1 0d 01 61 0c e7 20  | ?ptr%>9 ...a.. |
00002710  68 64 6c 25 20 8c 0d 01  62 26 20 c8 95 20 49 25  |hdl% ...b& .. I%|
00002720  3a c8 99 22 4f 53 5f 42  50 75 74 22 2c 33 32 2c  |:.."OS_BPut",32,|
00002730  68 64 6c 25 3a 49 25 2d  3d 31 3a ce 0d 01 63 05  |hdl%:I%-=1:...c.|
00002740  cc 0d 01 64 26 20 c8 95  20 49 25 3a c8 99 22 4f  |...d& .. I%:.."O|
00002750  53 5f 50 72 69 6e 74 43  68 61 72 22 2c 33 32 3a  |S_PrintChar",32:|
00002760  49 25 2d 3d 31 3a ce 0d  01 65 05 cd 0d 01 66 05  |I%-=1:...e....f.|
00002770  e1 0d 01 67 04 0d 01 68  13 dd f2 70 72 69 6e 74  |...g...h...print|
00002780  5f 6e 65 77 70 61 67 65  0d 01 69 19 6c 69 6e 65  |_newpage..i.line|
00002790  25 3d 31 3a 73 70 25 2b  3d 31 3a 6c 65 6e 25 3d  |%=1:sp%+=1:len%=|
000027a0  30 0d 01 6a 18 e7 20 70  6f 25 3d a3 20 f2 70 72  |0..j.. po%=. .pr|
000027b0  69 6e 74 5f 73 6f 6c 3a  e1 0d 01 6b 0f e7 20 66  |int_sol:...k.. f|
000027c0  69 6c 65 25 3d 33 20 e1  0d 01 6c 0e e7 20 68 6c  |ile%=3 ...l.. hl|
000027d0  25 20 3e 30 20 8c 0d 01  6d 22 20 c8 95 20 6c 69  |% >0 ...m" .. li|
000027e0  6e 65 25 3c 68 6c 25 3a  f2 70 72 69 6e 74 5f 6e  |ne%<hl%:.print_n|
000027f0  65 77 6c 69 6e 65 3a ce  0d 01 6e 05 cc 0d 01 6f  |ewline:...n....o|
00002800  23 20 c8 95 20 6c 69 6e  65 25 3c 3d 74 73 25 3a  |# .. line%<=ts%:|
00002810  f2 70 72 69 6e 74 5f 6e  65 77 6c 69 6e 65 3a ce  |.print_newline:.|
00002820  0d 01 70 05 cd 0d 01 71  0e f2 70 72 69 6e 74 5f  |..p....q..print_|
00002830  73 6f 6c 0d 01 72 05 e1  0d 01 73 04 0d 01 74 0e  |sol..r....s...t.|
00002840  dd f2 66 69 6e 64 5f 73  6f 6c 0d 01 75 32 c8 95  |..find_sol..u2..|
00002850  20 28 3f 70 74 72 25 3e  31 33 20 84 20 3f 70 74  | (?ptr%>13 . ?pt|
00002860  72 25 3c 31 30 29 20 80  20 70 74 72 25 3c 65 6e  |r%<10) . ptr%<en|
00002870  64 25 3a 70 74 72 25 2b  3d 31 3a ce 0d 01 76 0b  |d%:ptr%+=1:...v.|
00002880  70 74 72 25 2b 3d 31 0d  01 77 05 e1 0d 01 78 05  |ptr%+=1..w....x.|
00002890  20 0d 01 79 19 dd f2 6c  61 79 6f 75 74 5f 74 6f  | ..y...layout_to|
000028a0  67 67 6c 65 28 6e 75 6d  25 29 0d 01 7a 3c 21 62  |ggle(num%)..z<!b|
000028b0  6c 6b 25 3d 6c 61 79 6f  75 74 5f 77 25 3a 62 6c  |lk%=layout_w%:bl|
000028c0  6b 25 21 34 3d 6e 75 6d  25 3a c8 99 20 22 57 69  |k%!4=num%:.. "Wi|
000028d0  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000028e0  2c 2c 62 6c 6b 25 0d 01  7b 37 62 6c 6b 25 21 38  |,,blk%..{7blk%!8|
000028f0  3d 31 3c 3c 32 31 3a 62  6c 6b 25 21 31 32 3d 30  |=1<<21:blk%!12=0|
00002900  3a c8 99 20 22 57 69 6d  70 5f 53 65 74 49 63 6f  |:.. "Wimp_SetIco|
00002910  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 01 7c  |nState",,blk%..||
00002920  05 e1 0d 01 7d 04 0d 01  7e 1d dd a4 67 65 74 5f  |....}...~...get_|
00002930  6c 61 79 6f 75 74 5f 74  6f 67 67 6c 65 28 6e 75  |layout_toggle(nu|
00002940  6d 25 29 0d 01 7f 3c 21  62 6c 6b 25 3d 6c 61 79  |m%)...<!blk%=lay|
00002950  6f 75 74 5f 77 25 3a 62  6c 6b 25 21 34 3d 6e 75  |out_w%:blk%!4=nu|
00002960  6d 25 3a c8 99 20 22 57  69 6d 70 5f 47 65 74 49  |m%:.. "Wimp_GetI|
00002970  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6b 25 0d  |conState",,blk%.|
00002980  01 80 1e e7 20 28 62 6c  6b 25 21 32 34 80 31 3c  |.... (blk%!24.1<|
00002990  3c 32 31 29 20 3a 3d b9  3a 8b 3a 3d a3 0d 01 81  |<21) :=.:.:=....|
000029a0  04 0d 01 82 1c dd a4 67  65 74 5f 6c 61 79 6f 75  |.......get_layou|
000029b0  74 5f 76 61 6c 75 65 28  6e 75 6d 25 29 0d 01 83  |t_value(num%)...|
000029c0  1f 21 62 6c 6b 25 3d 6c  61 79 6f 75 74 5f 77 25  |.!blk%=layout_w%|
000029d0  3a 62 6c 6b 25 21 34 3d  6e 75 6d 25 0d 01 84 20  |:blk%!4=num%... |
000029e0  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
000029f0  53 74 61 74 65 22 2c 2c  62 6c 6b 25 0d 01 85 12  |State",,blk%....|
00002a00  3d bb 28 24 28 62 6c 6b  25 21 32 38 29 29 0d 01  |=.($(blk%!28))..|
00002a10  86 04 0d 01 87 21 dd f2  73 65 74 5f 6c 61 79 6f  |.....!..set_layo|
00002a20  75 74 5f 76 61 6c 75 65  28 6e 75 6d 25 2c 76 61  |ut_value(num%,va|
00002a30  6c 25 29 0d 01 88 1f 21  62 6c 6b 25 3d 6c 61 79  |l%)....!blk%=lay|
00002a40  6f 75 74 5f 77 25 3a 62  6c 6b 25 21 34 3d 6e 75  |out_w%:blk%!4=nu|
00002a50  6d 25 0d 01 89 20 c8 99  20 22 57 69 6d 70 5f 47  |m%... .. "Wimp_G|
00002a60  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
00002a70  6b 25 0d 01 8a 16 24 28  62 6c 6b 25 21 32 38 29  |k%....$(blk%!28)|
00002a80  3d c3 28 76 61 6c 25 29  0d 01 8b 16 62 6c 6b 25  |=.(val%)....blk%|
00002a90  21 38 3d 30 3a 62 6c 6b  25 21 31 32 3d 30 0d 01  |!8=0:blk%!12=0..|
00002aa0  8c 20 c8 99 20 22 57 69  6d 70 5f 53 65 74 49 63  |. .. "Wimp_SetIc|
00002ab0  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 01  |onState",,blk%..|
00002ac0  8d 05 e1 0d 01 8e 04 0d  01 8f 18 dd f2 6c 61 79  |.............lay|
00002ad0  6f 75 74 5f 61 72 72 6f  77 28 6e 75 6d 25 29 0d  |out_arrow(num%).|
00002ae0  01 90 0a ea 20 76 61 6c  25 0d 01 91 1a 49 25 3d  |.... val%....I%=|
00002af0  6e 75 6d 25 83 32 3a e7  20 49 25 3d 30 20 49 25  |num%.2:. I%=0 I%|
00002b00  3d 2d 31 0d 01 92 17 6e  75 6d 25 3d 28 28 6e 75  |=-1....num%=((nu|
00002b10  6d 25 2b 31 29 81 32 29  2d 39 0d 01 93 36 f2 73  |m%+1).2)-9...6.s|
00002b20  65 74 5f 6c 61 79 6f 75  74 5f 76 61 6c 75 65 28  |et_layout_value(|
00002b30  6e 75 6d 25 2c a4 67 65  74 5f 6c 61 79 6f 75 74  |num%,.get_layout|
00002b40  5f 76 61 6c 75 65 28 6e  75 6d 25 29 2b 49 25 29  |_value(num%)+I%)|
00002b50  0d 01 94 05 e1 0d 01 95  04 0d 01 96 44 3d 3d 3d  |............D===|
00002b60  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00002b90  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 0d 01 97  |=============...|
00002ba0  04 0d 01 98 13 dd f2 64  72 61 67 5f 66 69 6c 65  |.......drag_file|
00002bb0  28 77 25 29 0d 01 99 2a  21 62 6c 6b 25 3d 77 25  |(w%)...*!blk%=w%|
00002bc0  3a c8 99 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |:.."Wimp_GetWind|
00002bd0  6f 77 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 01  |owState",,blk%..|
00002be0  9a 28 58 25 3d 62 6c 6b  25 21 34 2d 62 6c 6b 25  |.(X%=blk%!4-blk%|
00002bf0  21 32 30 3a 59 25 3d 62  6c 6b 25 21 31 36 2d 62  |!20:Y%=blk%!16-b|
00002c00  6c 6b 25 21 32 34 0d 01  9b 28 62 6c 6b 25 21 34  |lk%!24...(blk%!4|
00002c10  3d 30 3a c8 99 22 57 69  6d 70 5f 47 65 74 49 63  |=0:.."Wimp_GetIc|
00002c20  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 0d 01  |onState",,blk%..|
00002c30  9c 39 21 62 6c 6b 25 3d  77 25 3a 62 6c 6b 25 21  |.9!blk%=w%:blk%!|
00002c40  34 3d 35 3a 62 6c 6b 25  21 38 3d 62 6c 6b 25 21  |4=5:blk%!8=blk%!|
00002c50  38 2b 58 25 3a 62 6c 6b  25 21 31 32 3d 62 6c 6b  |8+X%:blk%!12=blk|
00002c60  25 21 31 32 2b 59 25 0d  01 9d 3d 62 6c 6b 25 21  |%!12+Y%...=blk%!|
00002c70  31 36 3d 62 6c 6b 25 21  31 36 2b 58 25 3a 62 6c  |16=blk%!16+X%:bl|
00002c80  6b 25 21 32 30 3d 62 6c  6b 25 21 32 30 2b 59 25  |k%!20=blk%!20+Y%|
00002c90  3a 62 6c 6b 25 21 32 34  3d 30 3a 62 6c 6b 25 21  |:blk%!24=0:blk%!|
00002ca0  32 38 3d 30 0d 01 9e 27  62 6c 6b 25 21 33 32 3d  |28=0...'blk%!32=|
00002cb0  26 37 46 46 46 46 46 46  46 3a 62 6c 6b 25 21 33  |&7FFFFFFF:blk%!3|
00002cc0  36 3d 26 37 46 46 46 46  46 46 46 0d 01 9f 1a c8  |6=&7FFFFFFF.....|
00002cd0  99 22 57 69 6d 70 5f 44  72 61 67 42 6f 78 22 2c  |."Wimp_DragBox",|
00002ce0  2c 62 6c 6b 25 0d 01 a0  05 e1 0d 01 a1 04 0d 01  |,blk%...........|
00002cf0  a2 13 dd f2 64 72 61 67  5f 74 65 72 6d 28 77 25  |....drag_term(w%|
00002d00  29 0d 01 a3 3a 62 6c 6b  25 21 26 38 30 3d 77 25  |)...:blk%!&80=w%|
00002d10  3a 62 6c 6b 25 21 26 38  34 3d 31 3a c8 99 22 57  |:blk%!&84=1:.."W|
00002d20  69 6d 70 5f 47 65 74 49  63 6f 6e 53 74 61 74 65  |imp_GetIconState|
00002d30  22 2c 2c 62 6c 6b 25 2b  26 38 30 0d 01 a4 34 49  |",,blk%+&80...4I|
00002d40  25 3d 28 62 6c 6b 25 21  26 39 43 29 3a c8 95 20  |%=(blk%!&9C):.. |
00002d50  a7 24 28 49 25 29 2c 22  2e 22 29 3a 49 25 2b 3d  |.$(I%),"."):I%+=|
00002d60  31 3a ce 3a 6c 65 61 66  24 3d 24 28 49 25 29 0d  |1:.:leaf$=$(I%).|
00002d70  01 a5 21 c8 99 22 57 69  6d 70 5f 47 65 74 50 6f  |..!.."Wimp_GetPo|
00002d80  69 6e 74 65 72 49 6e 66  6f 22 2c 2c 62 6c 6b 25  |interInfo",,blk%|
00002d90  0d 01 a6 40 62 6c 6b 25  21 32 30 3d 62 6c 6b 25  |...@blk%!20=blk%|
00002da0  21 31 32 3a 62 6c 6b 25  21 32 34 3d 62 6c 6b 25  |!12:blk%!24=blk%|
00002db0  21 31 36 3a 62 6c 6b 25  21 32 38 3d 21 62 6c 6b  |!16:blk%!28=!blk|
00002dc0  25 3a 62 6c 6b 25 21 33  32 3d 62 6c 6b 25 21 34  |%:blk%!32=blk%!4|
00002dd0  0d 01 a7 40 62 6c 6b 25  21 33 36 3d 65 6e 64 25  |...@blk%!36=end%|
00002de0  2d 62 75 66 66 65 72 25  3a 62 6c 6b 25 21 34 30  |-buffer%:blk%!40|
00002df0  3d 26 46 46 44 3a 62 6c  6b 25 21 31 36 3d 31 3a  |=&FFD:blk%!16=1:|
00002e00  24 28 62 6c 6b 25 2b 34  34 29 3d 6c 65 61 66 24  |$(blk%+44)=leaf$|
00002e10  0d 01 a8 24 21 62 6c 6b  25 3d 28 a9 28 6c 65 61  |...$!blk%=(.(lea|
00002e20  66 24 29 2b 34 39 29 80  ac 33 3a 62 6c 6b 25 21  |f$)+49)..3:blk%!|
00002e30  31 32 3d 30 0d 01 a9 30  c8 99 22 57 69 6d 70 5f  |12=0...0.."Wimp_|
00002e40  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
00002e50  62 6c 6b 25 2c 62 6c 6b  25 21 32 30 2c 62 6c 6b  |blk%,blk%!20,blk|
00002e60  25 21 32 34 0d 01 aa 05  e1 0d 01 ab 04 0d 01 ac  |%!24............|
00002e70  11 dd f2 73 61 76 65 28  6e 61 6d 65 24 29 0d 01  |...save(name$)..|
00002e80  ad 15 20 f2 67 65 74 5f  70 61 67 65 5f 6c 61 79  |.. .get_page_lay|
00002e90  6f 75 74 0d 01 ae 18 e7  20 73 61 76 65 5f 77 25  |out..... save_w%|
00002ea0  3d 73 61 76 65 54 5f 77  25 20 8c 0d 01 af 11 20  |=saveT_w% ..... |
00002eb0  73 70 6c 73 76 24 3d 6e  61 6d 65 24 0d 01 b0 26  |splsv$=name$...&|
00002ec0  20 c8 99 20 22 58 4f 53  5f 46 69 6e 64 22 2c 26  | .. "XOS_Find",&|
00002ed0  38 33 2c 6e 61 6d 65 24  20 b8 20 65 72 72 25 3b  |83,name$ . err%;|
00002ee0  46 25 0d 01 b1 16 20 e7  20 46 25 80 31 20 f2 78  |F%.... . F%.1 .x|
00002ef0  5f 65 72 72 6f 72 3a e1  0d 01 b2 15 20 c8 99 22  |_error:..... .."|
00002f00  48 6f 75 72 67 6c 61 73  73 5f 4f 6e 22 0d 01 b3  |Hourglass_On"...|
00002f10  17 20 f2 73 74 61 72 74  5f 70 72 69 6e 74 28 65  |. .start_print(e|
00002f20  72 72 25 29 0d 01 b4 05  cc 0d 01 b5 13 20 70 25  |rr%)......... p%|
00002f30  3d 62 75 66 66 65 72 25  2d 31 31 30 0d 01 b6 2d  |=buffer%-110...-|
00002f40  20 f2 69 6e 73 65 72 74  5f 70 61 72 61 6d 28 22  | .insert_param("|
00002f50  50 4c 22 2c a4 67 65 74  5f 6c 61 79 6f 75 74 5f  |PL",.get_layout_|
00002f60  76 61 6c 75 65 28 33 29  29 0d 01 b7 2d 20 f2 69  |value(3))...- .i|
00002f70  6e 73 65 72 74 5f 70 61  72 61 6d 28 22 54 53 22  |nsert_param("TS"|
00002f80  2c a4 67 65 74 5f 6c 61  79 6f 75 74 5f 76 61 6c  |,.get_layout_val|
00002f90  75 65 28 35 29 29 0d 01  b8 2d 20 f2 69 6e 73 65  |ue(5))...- .inse|
00002fa0  72 74 5f 70 61 72 61 6d  28 22 42 53 22 2c a4 67  |rt_param("BS",.g|
00002fb0  65 74 5f 6c 61 79 6f 75  74 5f 76 61 6c 75 65 28  |et_layout_value(|
00002fc0  37 29 29 0d 01 b9 2d 20  f2 69 6e 73 65 72 74 5f  |7))...- .insert_|
00002fd0  70 61 72 61 6d 28 22 48  4c 22 2c a4 67 65 74 5f  |param("HL",.get_|
00002fe0  6c 61 79 6f 75 74 5f 76  61 6c 75 65 28 36 29 29  |layout_value(6))|
00002ff0  0d 01 ba 2d 20 f2 69 6e  73 65 72 74 5f 70 61 72  |...- .insert_par|
00003000  61 6d 28 22 46 4c 22 2c  a4 67 65 74 5f 6c 61 79  |am("FL",.get_lay|
00003010  6f 75 74 5f 76 61 6c 75  65 28 38 29 29 0d 01 bb  |out_value(8))...|
00003020  2d 20 f2 69 6e 73 65 72  74 5f 70 61 72 61 6d 28  |- .insert_param(|
00003030  22 4c 4d 22 2c a4 67 65  74 5f 6c 61 79 6f 75 74  |"LM",.get_layout|
00003040  5f 76 61 6c 75 65 28 34  29 29 0d 01 bc 2e 20 f2  |_value(4)).... .|
00003050  69 6e 73 65 72 74 5f 70  61 72 61 6d 28 22 4c 4c  |insert_param("LL|
00003060  22 2c a4 67 65 74 5f 6c  61 79 6f 75 74 5f 76 61  |",.get_layout_va|
00003070  6c 75 65 28 31 30 29 29  0d 01 bd 2d 20 f2 69 6e  |lue(10))...- .in|
00003080  73 65 72 74 5f 70 61 72  61 6d 28 22 53 50 22 2c  |sert_param("SP",|
00003090  a4 67 65 74 5f 6c 61 79  6f 75 74 5f 76 61 6c 75  |.get_layout_valu|
000030a0  65 28 39 29 29 0d 01 be  53 20 e7 20 a4 67 65 74  |e(9))...S . .get|
000030b0  5f 6c 61 79 6f 75 74 5f  74 6f 67 67 6c 65 28 31  |_layout_toggle(1|
000030c0  31 29 20 f2 69 6e 73 65  72 74 5f 70 61 72 61 6d  |1) .insert_param|
000030d0  28 22 46 46 22 2c 2d 26  33 30 30 29 20 8b 20 f2  |("FF",-&300) . .|
000030e0  69 6e 73 65 72 74 5f 70  61 72 61 6d 28 22 46 46  |insert_param("FF|
000030f0  22 2c 2d 26 32 30 30 29  0d 01 bf 53 20 e7 20 a4  |",-&200)...S . .|
00003100  67 65 74 5f 6c 61 79 6f  75 74 5f 74 6f 67 67 6c  |get_layout_toggl|
00003110  65 28 31 32 29 20 f2 69  6e 73 65 72 74 5f 70 61  |e(12) .insert_pa|
00003120  72 61 6d 28 22 50 47 22  2c 2d 26 33 30 30 29 20  |ram("PG",-&300) |
00003130  8b 20 f2 69 6e 73 65 72  74 5f 70 61 72 61 6d 28  |. .insert_param(|
00003140  22 50 47 22 2c 2d 26 32  30 30 29 0d 01 c0 53 20  |"PG",-&200)...S |
00003150  e7 20 a4 67 65 74 5f 6c  61 79 6f 75 74 5f 74 6f  |. .get_layout_to|
00003160  67 67 6c 65 28 31 33 29  20 f2 69 6e 73 65 72 74  |ggle(13) .insert|
00003170  5f 70 61 72 61 6d 28 22  50 50 22 2c 2d 26 33 30  |_param("PP",-&30|
00003180  30 29 20 8b 20 f2 69 6e  73 65 72 74 5f 70 61 72  |0) . .insert_par|
00003190  61 6d 28 22 50 50 22 2c  2d 26 32 30 30 29 0d 01  |am("PP",-&200)..|
000031a0  c1 3c 20 c8 99 20 22 58  4f 53 5f 46 69 6c 65 22  |.< .. "XOS_File"|
000031b0  2c 31 30 2c 6e 61 6d 65  24 2c 26 32 38 41 2c 2c  |,10,name$,&28A,,|
000031c0  62 75 66 66 65 72 25 2d  31 31 30 2c 65 6e 64 25  |buffer%-110,end%|
000031d0  20 b8 20 65 72 72 25 3b  46 25 0d 01 c2 16 20 e7  | . err%;F%.... .|
000031e0  20 46 25 80 31 20 f2 78  5f 65 72 72 6f 72 3a e1  | F%.1 .x_error:.|
000031f0  0d 01 c3 05 cd 0d 01 c4  05 e1 0d 01 c5 04 0d 01  |................|
00003200  c6 1d dd f2 69 6e 73 65  72 74 5f 70 61 72 61 6d  |....insert_param|
00003210  28 70 61 72 24 2c 70 61  72 25 29 0d 01 c7 19 24  |(par$,par%)....$|
00003220  70 25 3d 22 2e 2e 22 2b  70 61 72 24 2b 22 20 20  |p%=".."+par$+"  |
00003230  20 20 20 22 0d 01 c8 0d  c8 8e 20 70 61 72 25 20  |   "...... par% |
00003240  ca 0d 01 c9 1a 20 c9 20  2d 26 32 30 30 3a 24 28  |..... . -&200:$(|
00003250  70 25 2b 35 29 3d 22 4f  46 46 22 0d 01 ca 19 20  |p%+5)="OFF".... |
00003260  c9 20 2d 26 33 30 30 3a  24 28 70 25 2b 35 29 3d  |. -&300:$(p%+5)=|
00003270  22 4f 4e 22 0d 01 cb 05  7f 0d 01 cc 14 20 24 28  |"ON"......... $(|
00003280  70 25 2b 35 29 3d c3 28  70 61 72 25 29 0d 01 cd  |p%+5)=.(par%)...|
00003290  05 cb 0d 01 ce 20 49 25  3d 70 25 3a f5 3a 49 25  |..... I%=p%:.:I%|
000032a0  2b 3d 31 3a fd 3f 49 25  3c 33 32 3a 3f 49 25 3d  |+=1:.?I%<32:?I%=|
000032b0  33 32 0d 01 cf 13 70 25  2b 3d 31 30 3a 70 25 3f  |32....p%+=10:p%?|
000032c0  2d 31 3d 31 30 0d 01 d0  05 e1 0d 01 d1 04 0d 01  |-1=10...........|
000032d0  d2 15 dd f2 73 65 74 63  61 72 65 74 28 77 25 2c  |....setcaret(w%,|
000032e0  69 25 29 0d 01 d3 32 21  62 6c 6b 25 3d 77 25 3a  |i%)...2!blk%=w%:|
000032f0  62 6c 6b 25 21 34 3d 69  25 3a c8 99 22 57 69 6d  |blk%!4=i%:.."Wim|
00003300  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00003310  2c 62 6c 6b 25 0d 01 d4  34 c8 99 22 57 69 6d 70  |,blk%...4.."Wimp|
00003320  5f 53 65 74 43 61 72 65  74 50 6f 73 69 74 69 6f  |_SetCaretPositio|
00003330  6e 22 2c 77 25 2c 69 25  2c 2c 2c 2d 31 2c a9 24  |n",w%,i%,,,-1,.$|
00003340  28 62 6c 6b 25 21 32 38  29 0d 01 d5 05 e1 0d 01  |(blk%!28).......|
00003350  d6 04 0d 01 d7 4c 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |.....L==========|
00003360  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00003390  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 0d 01  |==============..|
000033a0  d8 04 0d 01 d9 0f dd f2  6d 61 69 6e 5f 6d 65 6e  |........main_men|
000033b0  75 0d 01 da 39 ea 20 74  69 63 6b 2c 6c 69 6e 65  |u...9. tick,line|
000033c0  2c 77 72 69 74 65 2c 6c  61 73 74 3a 74 69 63 6b  |,write,last:tick|
000033d0  3d 31 3a 6c 69 6e 65 3d  32 3a 77 72 69 74 65 3d  |=1:line=2:write=|
000033e0  34 3a 6c 61 73 74 3d 26  38 30 0d 01 db 31 63 6f  |4:last=&80...1co|
000033f0  64 65 5f 6d 25 3d a4 6e  65 77 5f 6d 65 6e 75 20  |de_m%=.new_menu |
00003400  28 6d 65 6e 75 62 75 66  66 25 2c 22 53 65 6e 64  |(menubuff%,"Send|
00003410  20 43 6f 64 65 22 2c 32  30 30 29 0d 01 dc 23 6d  | Code",200)...#m|
00003420  25 3d a4 6d 65 6e 75 5f  69 74 65 6d 20 28 22 46  |%=.menu_item ("F|
00003430  6f 72 6d 20 46 65 65 64  22 2c 30 2c 30 29 0d 01  |orm Feed",0,0)..|
00003440  dd 22 6d 25 3d a4 6d 65  6e 75 5f 69 74 65 6d 20  |."m%=.menu_item |
00003450  28 22 52 65 73 65 74 22  2c 6c 61 73 74 2c 30 29  |("Reset",last,0)|
00003460  0d 01 de 28 e3 20 49 25  3d 31 b8 33 30 3a 6d 25  |...(. I%=1.30:m%|
00003470  3d a4 6d 65 6e 75 5f 69  74 65 6d 28 22 22 2c 6c  |=.menu_item("",l|
00003480  61 73 74 2c 30 29 3a ed  0d 01 df 2e 65 66 66 65  |ast,0):.....effe|
00003490  63 74 5f 6d 25 3d a4 6e  65 77 5f 6d 65 6e 75 20  |ct_m%=.new_menu |
000034a0  28 6d 25 2c 22 45 66 66  65 63 74 20 4d 65 6e 75  |(m%,"Effect Menu|
000034b0  22 2c 31 38 30 29 0d 01  e0 20 6d 25 3d a4 6d 65  |",180)... m%=.me|
000034c0  6e 75 5f 69 74 65 6d 20  28 22 43 65 6e 74 72 65  |nu_item ("Centre|
000034d0  22 2c 30 2c 30 29 0d 01  e1 25 6d 25 3d a4 6d 65  |",0,0)...%m%=.me|
000034e0  6e 75 5f 69 74 65 6d 20  28 22 52 69 67 68 74 20  |nu_item ("Right |
000034f0  61 6c 69 67 6e 22 2c 30  2c 30 29 0d 01 e2 25 6d  |align",0,0)...%m|
00003500  25 3d a4 6d 65 6e 75 5f  69 74 65 6d 20 28 22 4d  |%=.menu_item ("M|
00003510  61 6b 65 20 48 65 61 64  65 72 22 2c 30 2c 30 29  |ake Header",0,0)|
00003520  0d 01 e3 25 6d 25 3d a4  6d 65 6e 75 5f 69 74 65  |...%m%=.menu_ite|
00003530  6d 20 28 22 4d 61 6b 65  20 46 6f 6f 74 65 72 22  |m ("Make Footer"|
00003540  2c 30 2c 30 29 0d 01 e4  25 6d 25 3d a4 6d 65 6e  |,0,0)...%m%=.men|
00003550  75 5f 69 74 65 6d 20 28  22 50 61 67 65 20 6e 75  |u_item ("Page nu|
00003560  6d 62 65 72 22 2c 30 2c  30 29 0d 01 e5 25 6d 25  |mber",0,0)...%m%|
00003570  3d a4 6d 65 6e 75 5f 69  74 65 6d 20 28 22 4e 65  |=.menu_item ("Ne|
00003580  77 20 70 61 67 65 22 2c  6c 61 73 74 2c 30 29 0d  |w page",last,0).|
00003590  01 e6 2a 6d 61 69 6e 5f  6d 25 3d a4 6e 65 77 5f  |..*main_m%=.new_|
000035a0  6d 65 6e 75 20 28 6d 25  2c 22 45 64 69 74 20 50  |menu (m%,"Edit P|
000035b0  6c 75 73 22 2c 31 38 30  29 0d 01 e7 2a 6d 25 3d  |lus",180)...*m%=|
000035c0  a4 6d 65 6e 75 5f 69 74  65 6d 20 28 22 49 6d 6d  |.menu_item ("Imm|
000035d0  65 64 20 43 6f 64 65 22  2c 30 2c 63 6f 64 65 5f  |ed Code",0,code_|
000035e0  6d 25 29 0d 01 e8 28 6d  25 3d a4 6d 65 6e 75 5f  |m%)...(m%=.menu_|
000035f0  69 74 65 6d 20 28 22 45  66 66 65 63 74 22 2c 30  |item ("Effect",0|
00003600  2c 65 66 66 65 63 74 5f  6d 25 29 0d 01 e9 23 6d  |,effect_m%)...#m|
00003610  25 3d a4 6d 65 6e 75 5f  69 74 65 6d 20 28 22 53  |%=.menu_item ("S|
00003620  74 79 6c 65 73 22 2c 6c  69 6e 65 2c 30 29 0d 01  |tyles",line,0)..|
00003630  ea 1f 6d 25 3d a4 6d 65  6e 75 5f 69 74 65 6d 20  |..m%=.menu_item |
00003640  28 22 50 72 69 6e 74 22  2c 30 2c 30 29 0d 01 eb  |("Print",0,0)...|
00003650  25 6d 25 3d a4 6d 65 6e  75 5f 69 74 65 6d 20 28  |%m%=.menu_item (|
00003660  22 50 61 67 65 20 6c 61  79 6f 75 74 22 2c 30 2c  |"Page layout",0,|
00003670  30 29 0d 01 ec 21 6d 25  3d a4 6d 65 6e 75 5f 69  |0)...!m%=.menu_i|
00003680  74 65 6d 20 28 22 50 72  65 76 69 65 77 22 2c 30  |tem ("Preview",0|
00003690  2c 30 29 0d 01 ed 27 6d  25 3d a4 6d 65 6e 75 5f  |,0)...'m%=.menu_|
000036a0  69 74 65 6d 20 28 22 43  6c 65 61 72 20 74 65 78  |item ("Clear tex|
000036b0  74 22 2c 6c 69 6e 65 2c  30 29 0d 01 ee 24 6d 25  |t",line,0)...$m%|
000036c0  3d a4 6d 65 6e 75 5f 69  74 65 6d 20 28 22 49 6e  |=.menu_item ("In|
000036d0  66 6f 22 2c 30 2c 69 6e  66 6f 5f 77 25 29 0d 01  |fo",0,info_w%)..|
000036e0  ef 21 6d 25 3d a4 6d 65  6e 75 5f 69 74 65 6d 20  |.!m%=.menu_item |
000036f0  28 22 51 75 69 74 22 2c  6c 61 73 74 2c 30 29 0d  |("Quit",last,0).|
00003700  01 f0 2e 72 65 6d 6f 76  65 5f 6d 25 3d a4 6e 65  |...remove_m%=.ne|
00003710  77 5f 6d 65 6e 75 20 28  6d 25 2c 22 52 65 6d 6f  |w_menu (m%,"Remo|
00003720  76 65 20 43 6f 64 65 22  2c 32 30 30 29 0d 01 f1  |ve Code",200)...|
00003730  25 6d 25 3d a4 6d 65 6e  75 5f 69 74 65 6d 20 28  |%m%=.menu_item (|
00003740  22 53 74 79 6c 65 20 63  6f 64 65 73 22 2c 30 2c  |"Style codes",0,|
00003750  30 29 0d 01 f2 26 6d 25  3d a4 6d 65 6e 75 5f 69  |0)...&m%=.menu_i|
00003760  74 65 6d 20 28 22 43 6e  74 72 2f 52 2e 61 6c 69  |tem ("Cntr/R.ali|
00003770  67 6e 22 2c 30 2c 30 29  0d 01 f3 25 6d 25 3d a4  |gn",0,0)...%m%=.|
00003780  6d 65 6e 75 5f 69 74 65  6d 20 28 22 50 61 67 65  |menu_item ("Page|
00003790  20 62 72 65 61 6b 73 22  2c 30 2c 30 29 0d 01 f4  | breaks",0,0)...|
000037a0  21 6d 25 3d a4 6d 65 6e  75 5f 69 74 65 6d 20 28  |!m%=.menu_item (|
000037b0  22 48 65 61 64 65 72 73  22 2c 30 2c 30 29 0d 01  |"Headers",0,0)..|
000037c0  f5 24 6d 25 3d a4 6d 65  6e 75 5f 69 74 65 6d 20  |.$m%=.menu_item |
000037d0  28 22 46 6f 6f 74 65 72  73 22 2c 6c 61 73 74 2c  |("Footers",last,|
000037e0  30 29 0d 01 f6 2a 76 69  65 77 5f 6d 25 3d a4 6e  |0)...*view_m%=.n|
000037f0  65 77 5f 6d 65 6e 75 20  28 6d 25 2c 22 45 64 69  |ew_menu (m%,"Edi|
00003800  74 20 50 6c 75 73 22 2c  32 30 30 29 0d 01 f7 24  |t Plus",200)...$|
00003810  6d 25 3d a4 6d 65 6e 75  5f 69 74 65 6d 20 28 22  |m%=.menu_item ("|
00003820  50 61 67 65 20 42 72 6b  20 8b 22 2c 30 2c 30 29  |Page Brk .",0,0)|
00003830  0d 01 f8 27 6d 25 3d a4  6d 65 6e 75 5f 69 74 65  |...'m%=.menu_ite|
00003840  6d 20 28 22 50 61 67 65  20 42 72 6b 20 8a 22 2c  |m ("Page Brk .",|
00003850  6c 69 6e 65 2c 30 29 0d  01 f9 2e 6d 25 3d a4 6d  |line,0)....m%=.m|
00003860  65 6e 75 5f 69 74 65 6d  20 28 22 52 65 6d 6f 76  |enu_item ("Remov|
00003870  65 20 63 6f 64 65 73 22  2c 30 2c 72 65 6d 6f 76  |e codes",0,remov|
00003880  65 5f 6d 25 29 0d 01 fa  27 6d 25 3d a4 6d 65 6e  |e_m%)...'m%=.men|
00003890  75 5f 69 74 65 6d 20 28  22 52 65 70 61 67 69 6e  |u_item ("Repagin|
000038a0  61 74 65 22 2c 6c 69 6e  65 2c 30 29 0d 01 fb 2a  |ate",line,0)...*|
000038b0  6d 25 3d a4 6d 65 6e 75  5f 69 74 65 6d 20 28 22  |m%=.menu_item ("|
000038c0  53 61 76 65 20 54 65 78  74 22 2c 30 2c 73 61 76  |Save Text",0,sav|
000038d0  65 54 5f 77 25 29 0d 01  fc 2d 6d 25 3d a4 6d 65  |eT_w%)...-m%=.me|
000038e0  6e 75 5f 69 74 65 6d 20  28 22 53 61 76 65 20 45  |nu_item ("Save E|
000038f0  64 69 74 2b 22 2c 26 38  30 2c 73 61 76 65 50 5f  |dit+",&80,saveP_|
00003900  77 25 29 0d 01 fd 05 e1  0d 01 fe 04 0d 01 ff 4a  |w%)............J|
00003910  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00003950  3d 3d 3d 3d 3d 3d 0d 02  00 04 0d 02 01 29 dd a4  |======.......)..|
00003960  6e 65 77 5f 6d 65 6e 75  20 28 61 25 2c 6d 65 6e  |new_menu (a%,men|
00003970  75 74 69 74 6c 65 24 2c  6d 65 6e 75 77 69 64 74  |utitle$,menuwidt|
00003980  68 25 29 0d 02 02 41 24  61 25 3d 6d 65 6e 75 74  |h%)...A$a%=menut|
00003990  69 74 6c 65 24 3a 61 25  21 31 32 3d 26 37 30 32  |itle$:a%!12=&702|
000039a0  30 37 3a 61 25 21 31 36  3d 6d 65 6e 75 77 69 64  |07:a%!16=menuwid|
000039b0  74 68 25 3a 61 25 21 32  30 3d 34 30 3a 61 25 21  |th%:a%!20=40:a%!|
000039c0  32 34 3d 30 0d 02 03 0c  6d 25 3d 61 25 2b 32 38  |24=0....m%=a%+28|
000039d0  0d 02 04 07 3d 61 25 0d  02 05 04 0d 02 06 2f dd  |....=a%......./.|
000039e0  a4 6d 65 6e 75 5f 69 74  65 6d 20 28 69 74 65 6d  |.menu_item (item|
000039f0  6e 61 6d 65 24 2c 6d 65  6e 75 66 6c 61 67 73 25  |name$,menuflags%|
00003a00  2c 73 75 62 6d 65 6e 75  25 29 0d 02 07 42 6d 25  |,submenu%)...Bm%|
00003a10  21 30 3d 6d 65 6e 75 66  6c 61 67 73 25 3a 6d 25  |!0=menuflags%:m%|
00003a20  21 34 3d 73 75 62 6d 65  6e 75 25 3a 6d 25 21 38  |!4=submenu%:m%!8|
00003a30  3d 26 37 30 30 30 30 30  31 3a 24 28 6d 25 2b 31  |=&7000001:$(m%+1|
00003a40  32 29 3d 69 74 65 6d 6e  61 6d 65 24 0d 02 08 0a  |2)=itemname$....|
00003a50  3d 6d 25 2b 32 34 0d 02  09 04 0d 02 0a 25 dd a4  |=m%+24.......%..|
00003a60  69 6e 64 69 72 65 63 74  20 28 69 6e 64 69 72 24  |indirect (indir$|
00003a70  2c 66 6c 61 67 73 25 2c  69 6e 64 69 72 25 29 0d  |,flags%,indir%).|
00003a80  02 0b 44 6d 25 21 30 3d  66 6c 61 67 73 25 3a 6d  |..Dm%!0=flags%:m|
00003a90  25 21 34 3d 30 3a 6d 25  21 38 3d 26 37 30 30 30  |%!4=0:m%!8=&7000|
00003aa0  31 30 31 3a 6d 25 21 31  32 3d 69 6e 64 69 72 25  |101:m%!12=indir%|
00003ab0  3a 6d 25 21 31 36 3d 2d  31 3a 6d 25 21 32 30 3d  |:m%!16=-1:m%!20=|
00003ac0  31 32 37 0d 02 0c 21 e7  20 69 6e 64 69 72 24 20  |127...!. indir$ |
00003ad0  3c 3e 22 3f 22 20 24 69  6e 64 69 72 25 3d 69 6e  |<>"?" $indir%=in|
00003ae0  64 69 72 24 0d 02 0d 0a  3d 6d 25 2b 32 34 0d 02  |dir$....=m%+24..|
00003af0  0e 04 0d 02 0f 16 dd f2  74 69 63 6b 5f 69 74 65  |........tick_ite|
00003b00  6d 28 6d 25 2c 69 25 29  0d 02 10 0b 49 25 3d 6d  |m(m%,i%)....I%=m|
00003b10  25 2b 34 0d 02 11 23 f5  3a 49 25 2b 3d 32 34 3a  |%+4...#.:I%+=24:|
00003b20  21 49 25 3d 21 49 25 80  20 ac 20 31 3a fd 20 21  |!I%=!I%. . 1:. !|
00003b30  49 25 80 26 38 30 0d 02  12 25 e7 20 ac 20 69 25  |I%.&80...%. . i%|
00003b40  20 49 25 3d 6d 25 2b 32  38 2b 28 69 25 2a 32 34  | I%=m%+28+(i%*24|
00003b50  29 3a 21 49 25 3d 21 49  25 84 31 0d 02 13 05 e1  |):!I%=!I%.1.....|
00003b60  0d 02 14 04 0d 02 15 10  dd a4 77 6b 73 70 63 28  |..........wkspc(|
00003b70  73 7a 25 29 0d 02 16 28  c8 99 22 57 69 6d 70 5f  |sz%)...(.."Wimp_|
00003b80  53 6c 6f 74 53 69 7a 65  22 2c 6d 65 6d 73 7a 25  |SlotSize",memsz%|
00003b90  2b 73 7a 25 2c 2d 31 20  b8 20 65 25 0d 02 17 1d  |+sz%,-1 . e%....|
00003ba0  e7 20 65 25 3c 28 6d 65  6d 73 7a 25 2b 73 7a 25  |. e%<(memsz%+sz%|
00003bb0  29 3a 3d a3 3a 8b 3a 3d  b9 0d 02 18 04 0d 02 19  |):=.:.:=........|
00003bc0  1c dd a4 69 63 6f 6e 62  61 72 20 28 73 70 72 69  |...iconbar (spri|
00003bd0  74 65 24 2c 70 6f 73 25  29 0d 02 1a 2c 21 62 6c  |te$,pos%)...,!bl|
00003be0  6b 25 3d 70 6f 73 25 3a  62 6c 6b 25 21 34 3d 2d  |k%=pos%:blk%!4=-|
00003bf0  38 3a 62 6c 6b 25 21 38  3d 30 3a 62 6c 6b 25 21  |8:blk%!8=0:blk%!|
00003c00  31 32 3d 35 36 0d 02 1b  33 62 6c 6b 25 21 31 36  |12=56...3blk%!16|
00003c10  3d 39 36 3a 62 6c 6b 25  21 32 30 3d 26 32 30 30  |=96:blk%!20=&200|
00003c20  32 3a 24 28 62 6c 6b 25  2b 32 34 29 3d 22 21 22  |2:$(blk%+24)="!"|
00003c30  2b 73 70 72 69 74 65 24  0d 02 1c 23 c8 99 20 22  |+sprite$...#.. "|
00003c40  57 69 6d 70 5f 43 72 65  61 74 65 49 63 6f 6e 22  |Wimp_CreateIcon"|
00003c50  2c 2c 62 6c 6b 25 20 b8  20 49 25 0d 02 1d 07 3d  |,,blk% . I%....=|
00003c60  49 25 0d 02 1e 04 0d 02  1f 1b dd f2 72 65 70 6f  |I%..........repo|
00003c70  72 74 5f 65 72 72 6f 72  20 28 66 61 74 61 6c 25  |rt_error (fatal%|
00003c80  29 0d 02 20 17 c8 99 22  48 6f 75 72 67 6c 61 73  |).. ..."Hourglas|
00003c90  73 5f 53 6d 61 73 68 22  0d 02 21 2c 21 62 6c 6b  |s_Smash"..!,!blk|
00003ca0  25 3d 9f 3a 24 28 62 6c  6b 25 2b 34 29 3d f6 24  |%=.:$(blk%+4)=.$|
00003cb0  2b 22 20 61 74 20 6c 69  6e 65 20 22 2b c3 28 9e  |+" at line "+.(.|
00003cc0  29 2b bd 30 0d 02 22 27  c8 99 20 22 57 69 6d 70  |)+.0.."'.. "Wimp|
00003cd0  5f 52 65 70 6f 72 74 45  72 72 6f 72 22 2c 62 6c  |_ReportError",bl|
00003ce0  6b 25 2c 31 2c 74 69 74  6c 65 25 0d 02 23 10 e7  |k%,1,title%..#..|
00003cf0  20 ac 20 66 61 74 61 6c  25 20 e1 0d 02 24 09 dd  | . fatal% ...$..|
00003d00  f2 64 69 65 0d 02 25 2b  ee 85 87 3a c8 99 20 22  |.die..%+...:.. "|
00003d10  57 69 6d 70 5f 43 6c 6f  73 65 44 6f 77 6e 22 2c  |Wimp_CloseDown",|
00003d20  68 61 6e 64 25 2c 26 34  42 35 33 34 31 35 34 0d  |hand%,&4B534154.|
00003d30  02 26 05 e0 0d 02 27 04  0d 02 28 14 dd a4 61 6c  |.&....'...(...al|
00003d40  65 72 74 28 66 6c 67 25  2c 61 24 29 0d 02 29 20  |ert(flg%,a$)..) |
00003d50  62 6c 6b 25 21 26 38 30  3d 30 3a 24 28 62 6c 6b  |blk%!&80=0:$(blk|
00003d60  25 2b 26 38 34 29 3d 61  24 2b bd 30 0d 02 2a 38  |%+&84)=a$+.0..*8|
00003d70  c8 99 22 57 69 6d 70 5f  52 65 70 6f 72 74 45 72  |.."Wimp_ReportEr|
00003d80  72 6f 72 22 2c 62 6c 6b  25 2b 26 38 30 2c 31 36  |ror",blk%+&80,16|
00003d90  84 66 6c 67 25 2c 74 69  74 6c 65 25 20 b8 20 2c  |.flg%,title% . ,|
00003da0  66 6c 67 25 0d 02 2b 09  3d 66 6c 67 25 0d 02 2c  |flg%..+.=flg%..,|
00003db0  04 0d 02 2d 0d dd f2 78  5f 65 72 72 6f 72 0d 02  |...-...x_error..|
00003dc0  2e 27 c8 99 22 57 69 6d  70 5f 52 65 70 6f 72 74  |.'.."Wimp_Report|
00003dd0  45 72 72 6f 72 22 2c 65  72 72 25 2c 31 37 2c 74  |Error",err%,17,t|
00003de0  69 74 6c 65 25 0d 02 2f  05 e1 0d 02 30 04 0d 02  |itle%../....0...|
00003df0  31 1a dd f2 74 65 6d 70  6c 61 74 65 73 20 28 69  |1...templates (i|
00003e00  6e 64 69 72 73 7a 25 29  0d 02 32 28 de 20 69 6e  |ndirsz%)..2(. in|
00003e10  64 69 72 25 20 69 6e 64  69 72 73 7a 25 3a 45 25  |dir% indirsz%:E%|
00003e20  3d 69 6e 64 69 72 25 2b  69 6e 64 69 72 73 7a 25  |=indir%+indirsz%|
00003e30  0d 02 33 31 c8 99 20 22  57 69 6d 70 5f 4f 70 65  |..31.. "Wimp_Ope|
00003e40  6e 54 65 6d 70 6c 61 74  65 22 2c 2c 61 70 70 5f  |nTemplate",,app_|
00003e50  64 69 72 24 2b 22 2e 54  65 6d 70 6c 61 74 65 73  |dir$+".Templates|
00003e60  22 0d 02 34 40 c8 99 20  22 57 69 6d 70 5f 4c 6f  |"..4@.. "Wimp_Lo|
00003e70  61 64 54 65 6d 70 6c 61  74 65 22 2c 2c 62 75 66  |adTemplate",,buf|
00003e80  66 65 72 25 2c 69 6e 64  69 72 25 2c 45 25 2c 2d  |fer%,indir%,E%,-|
00003e90  31 2c 22 69 6e 66 6f 22  2c 30 20 b8 20 2c 2c 52  |1,"info",0 . ,,R|
00003ea0  25 0d 02 35 2d c8 99 20  22 57 69 6d 70 5f 43 72  |%..5-.. "Wimp_Cr|
00003eb0  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 62 75 66  |eateWindow",,buf|
00003ec0  66 65 72 25 20 b8 20 69  6e 66 6f 5f 77 25 0d 02  |fer% . info_w%..|
00003ed0  36 3e c8 99 20 22 57 69  6d 70 5f 4c 6f 61 64 54  |6>.. "Wimp_LoadT|
00003ee0  65 6d 70 6c 61 74 65 22  2c 2c 62 75 66 66 65 72  |emplate",,buffer|
00003ef0  25 2c 52 25 2c 45 25 2c  2d 31 2c 22 6c 61 79 6f  |%,R%,E%,-1,"layo|
00003f00  75 74 22 2c 30 20 b8 20  2c 2c 52 25 0d 02 37 2f  |ut",0 . ,,R%..7/|
00003f10  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 57  |.. "Wimp_CreateW|
00003f20  69 6e 64 6f 77 22 2c 2c  62 75 66 66 65 72 25 20  |indow",,buffer% |
00003f30  b8 20 6c 61 79 6f 75 74  5f 77 25 0d 02 38 3e c8  |. layout_w%..8>.|
00003f40  99 20 22 57 69 6d 70 5f  4c 6f 61 64 54 65 6d 70  |. "Wimp_LoadTemp|
00003f50  6c 61 74 65 22 2c 2c 62  75 66 66 65 72 25 2c 52  |late",,buffer%,R|
00003f60  25 2c 45 25 2c 2d 31 2c  22 73 74 61 74 75 73 22  |%,E%,-1,"status"|
00003f70  2c 30 20 b8 20 2c 2c 52  25 0d 02 39 2f c8 99 20  |,0 . ,,R%..9/.. |
00003f80  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
00003f90  6f 77 22 2c 2c 62 75 66  66 65 72 25 20 b8 20 73  |ow",,buffer% . s|
00003fa0  74 61 74 75 73 5f 77 25  0d 02 3a 3f c8 99 20 22  |tatus_w%..:?.. "|
00003fb0  57 69 6d 70 5f 4c 6f 61  64 54 65 6d 70 6c 61 74  |Wimp_LoadTemplat|
00003fc0  65 22 2c 2c 62 75 66 66  65 72 25 2c 52 25 2c 45  |e",,buffer%,R%,E|
00003fd0  25 2c 2d 31 2c 22 6e 65  77 70 61 67 65 22 2c 30  |%,-1,"newpage",0|
00003fe0  20 b8 20 2c 2c 52 25 0d  02 3b 30 c8 99 20 22 57  | . ,,R%..;0.. "W|
00003ff0  69 6d 70 5f 43 72 65 61  74 65 57 69 6e 64 6f 77  |imp_CreateWindow|
00004000  22 2c 2c 62 75 66 66 65  72 25 20 b8 20 6e 65 77  |",,buffer% . new|
00004010  70 61 67 65 5f 77 25 0d  02 3c 3e c8 99 20 22 57  |page_w%..<>.. "W|
00004020  69 6d 70 5f 4c 6f 61 64  54 65 6d 70 6c 61 74 65  |imp_LoadTemplate|
00004030  22 2c 2c 62 75 66 66 65  72 25 2c 52 25 2c 45 25  |",,buffer%,R%,E%|
00004040  2c 2d 31 2c 22 73 74 79  6c 65 73 22 2c 30 20 b8  |,-1,"styles",0 .|
00004050  20 2c 2c 52 25 0d 02 3d  2f c8 99 20 22 57 69 6d  | ,,R%..=/.. "Wim|
00004060  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
00004070  2c 62 75 66 66 65 72 25  20 b8 20 73 74 79 6c 65  |,buffer% . style|
00004080  73 5f 77 25 0d 02 3e 3c  c8 99 20 22 57 69 6d 70  |s_w%..><.. "Wimp|
00004090  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
000040a0  62 75 66 66 65 72 25 2c  52 25 2c 45 25 2c 2d 31  |buffer%,R%,E%,-1|
000040b0  2c 22 76 69 65 77 22 2c  30 20 b8 20 2c 2c 52 25  |,"view",0 . ,,R%|
000040c0  0d 02 3f 2d c8 99 20 22  57 69 6d 70 5f 43 72 65  |..?-.. "Wimp_Cre|
000040d0  61 74 65 57 69 6e 64 6f  77 22 2c 2c 62 75 66 66  |ateWindow",,buff|
000040e0  65 72 25 20 b8 20 76 69  65 77 5f 77 25 0d 02 40  |er% . view_w%..@|
000040f0  3d c8 99 20 22 57 69 6d  70 5f 4c 6f 61 64 54 65  |=.. "Wimp_LoadTe|
00004100  6d 70 6c 61 74 65 22 2c  2c 62 75 66 66 65 72 25  |mplate",,buffer%|
00004110  2c 52 25 2c 45 25 2c 2d  31 2c 22 73 61 76 65 50  |,R%,E%,-1,"saveP|
00004120  22 2c 30 20 b8 20 2c 2c  52 25 0d 02 41 2e c8 99  |",0 . ,,R%..A...|
00004130  20 22 57 69 6d 70 5f 43  72 65 61 74 65 57 69 6e  | "Wimp_CreateWin|
00004140  64 6f 77 22 2c 2c 62 75  66 66 65 72 25 20 b8 20  |dow",,buffer% . |
00004150  73 61 76 65 50 5f 77 25  0d 02 42 3d c8 99 20 22  |saveP_w%..B=.. "|
00004160  57 69 6d 70 5f 4c 6f 61  64 54 65 6d 70 6c 61 74  |Wimp_LoadTemplat|
00004170  65 22 2c 2c 62 75 66 66  65 72 25 2c 52 25 2c 45  |e",,buffer%,R%,E|
00004180  25 2c 2d 31 2c 22 73 61  76 65 54 22 2c 30 20 b8  |%,-1,"saveT",0 .|
00004190  20 2c 2c 52 25 0d 02 43  2e c8 99 20 22 57 69 6d  | ,,R%..C... "Wim|
000041a0  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
000041b0  2c 62 75 66 66 65 72 25  20 b8 20 73 61 76 65 54  |,buffer% . saveT|
000041c0  5f 77 25 0d 02 44 1b c8  99 20 22 57 69 6d 70 5f  |_w%..D... "Wimp_|
000041d0  43 6c 6f 73 65 54 65 6d  70 6c 61 74 65 22 0d 02  |CloseTemplate"..|
000041e0  45 47 21 62 6c 6b 25 3d  6c 61 79 6f 75 74 5f 77  |EG!blk%=layout_w|
000041f0  25 3a 62 6c 6b 25 21 34  3d 31 3a c8 99 20 22 57  |%:blk%!4=1:.. "W|
00004200  69 6d 70 5f 47 65 74 49  63 6f 6e 53 74 61 74 65  |imp_GetIconState|
00004210  22 2c 2c 62 6c 6b 25 3a  24 28 62 6c 6b 25 21 32  |",,blk%:$(blk%!2|
00004220  38 29 3d 22 22 0d 02 46  47 21 62 6c 6b 25 3d 6c  |8)=""..FG!blk%=l|
00004230  61 79 6f 75 74 5f 77 25  3a 62 6c 6b 25 21 34 3d  |ayout_w%:blk%!4=|
00004240  32 3a c8 99 20 22 57 69  6d 70 5f 47 65 74 49 63  |2:.. "Wimp_GetIc|
00004250  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 3a 24  |onState",,blk%:$|
00004260  28 62 6c 6b 25 21 32 38  29 3d 22 22 0d 02 47 4b  |(blk%!28)=""..GK|
00004270  21 62 6c 6b 25 3d 69 6e  66 6f 5f 77 25 3a 62 6c  |!blk%=info_w%:bl|
00004280  6b 25 21 34 3d 30 3a c8  99 20 22 57 69 6d 70 5f  |k%!4=0:.. "Wimp_|
00004290  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 62  |GetIconState",,b|
000042a0  6c 6b 25 3a 24 28 62 6c  6b 25 21 32 38 29 3d 76  |lk%:$(blk%!28)=v|
000042b0  65 72 73 69 6f 6e 24 0d  02 48 48 21 62 6c 6b 25  |ersion$..HH!blk%|
000042c0  3d 69 6e 66 6f 5f 77 25  3a 62 6c 6b 25 21 34 3d  |=info_w%:blk%!4=|
000042d0  31 3a c8 99 20 22 57 69  6d 70 5f 47 65 74 49 63  |1:.. "Wimp_GetIc|
000042e0  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6b 25 3a 24  |onState",,blk%:$|
000042f0  28 62 6c 6b 25 21 32 38  29 3d 63 70 72 74 24 0d  |(blk%!28)=cprt$.|
00004300  02 49 4b 21 62 6c 6b 25  3d 69 6e 66 6f 5f 77 25  |.IK!blk%=info_w%|
00004310  3a 62 6c 6b 25 21 34 3d  32 3a c8 99 20 22 57 69  |:blk%!4=2:.. "Wi|
00004320  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00004330  2c 2c 62 6c 6b 25 3a 24  28 62 6c 6b 25 21 32 38  |,,blk%:$(blk%!28|
00004340  29 3d 70 75 72 70 6f 73  65 24 0d 02 4a 05 e1 0d  |)=purpose$..J...|
00004350  02 4b 04 0d 02 4c 13 dd  f2 64 65 66 61 75 6c 74  |.K...L...default|
00004360  5f 63 6f 64 65 73 0d 02  4d 07 ea 20 dc 0d 02 4e  |_codes..M.. ...N|
00004370  13 49 25 3d 69 6d 6d 65  64 5f 63 6f 64 65 73 25  |.I%=immed_codes%|
00004380  0d 02 4f 20 f5 3a f3 20  4a 25 3a 3f 49 25 3d 4a  |..O .:. J%:?I%=J|
00004390  25 3a 49 25 2b 3d 31 3a  fd 20 4a 25 3d 32 35 35  |%:I%+=1:. J%=255|
000043a0  0d 02 50 08 49 25 3d 30  0d 02 51 05 f5 0d 02 52  |..P.I%=0..Q....R|
000043b0  09 20 f3 20 4a 25 0d 02  53 21 20 e7 20 4a 25 3c  |. . J%..S! . J%<|
000043c0  3e 31 36 33 20 73 74 79  6c 65 5f 74 61 62 6c 65  |>163 style_table|
000043d0  25 3f 49 25 3d 4a 25 0d  02 54 0a 20 49 25 2b 3d  |%?I%=J%..T. I%+=|
000043e0  31 0d 02 55 16 20 63 6f  64 65 5f 69 6e 64 65 78  |1..U. code_index|
000043f0  25 3f 4a 25 3d 49 25 0d  02 56 0a fd 20 4a 25 3d  |%?J%=I%..V.. J%=|
00004400  30 0d 02 57 15 74 72 61  6e 73 5f 69 6e 64 65 78  |0..W.trans_index|
00004410  3f 31 36 33 3d 31 0d 02  58 0d 49 25 3d 63 6f 64  |?163=1..X.I%=cod|
00004420  65 73 25 0d 02 59 20 f5  3a f3 20 4a 25 3a 3f 49  |es%..Y .:. J%:?I|
00004430  25 3d 4a 25 3a 49 25 2b  3d 31 3a fd 20 4a 25 3d  |%=J%:I%+=1:. J%=|
00004440  32 35 35 0d 02 5a 26 e3  20 49 25 3d 30 b8 35 3a  |255..Z&. I%=0.5:|
00004450  f3 20 61 24 3a f2 73 74  79 6c 65 5f 69 63 6f 6e  |. a$:.style_icon|
00004460  28 61 24 2c 49 25 29 3a  ed 0d 02 5b 18 f2 73 65  |(a$,I%):...[..se|
00004470  74 5f 73 74 79 6c 65 5f  65 78 74 28 2d 32 32 30  |t_style_ext(-220|
00004480  29 0d 02 5c 1a dc 20 32  2c 31 32 2c 20 33 2c 32  |)..\.. 2,12, 3,2|
00004490  37 2c 36 34 2c 20 30 2c  32 35 35 0d 02 5d 23 dc  |7,64, 0,255..]#.|
000044a0  20 32 30 31 2c 32 30 30  2c 32 31 38 2c 32 31 37  | 201,200,218,217|
000044b0  2c 32 30 35 2c 32 30 34  2c 31 36 33 2c 30 0d 02  |,205,204,163,0..|
000044c0  5e 3e dc 20 34 2c 32 37  2c 34 35 2c 31 2c 20 34  |^>. 4,27,45,1, 4|
000044d0  2c 32 37 2c 34 35 2c 30  2c 20 33 2c 32 37 2c 37  |,27,45,0, 3,27,7|
000044e0  31 2c 20 33 2c 32 37 2c  37 32 2c 20 33 2c 32 37  |1, 3,27,72, 3,27|
000044f0  2c 35 32 2c 20 33 2c 32  37 2c 35 33 0d 02 5f 21  |,52, 3,27,53.._!|
00004500  dc 20 38 2c 32 37 2c 38  32 2c 33 2c 33 35 2c 32  |. 8,27,82,3,35,2|
00004510  37 2c 38 32 2c 30 2c 20  30 2c 32 35 35 0d 02 60  |7,82,0, 0,255..`|
00004520  55 dc 20 22 53 74 61 72  74 20 55 2f 6c 69 6e 65  |U. "Start U/line|
00004530  22 2c 22 45 6e 64 20 55  2f 6c 69 6e 65 22 2c 22  |","End U/line","|
00004540  53 74 61 72 74 20 42 6f  6c 64 22 2c 22 45 6e 64  |Start Bold","End|
00004550  20 42 6f 6c 64 22 2c 22  53 74 61 72 74 20 49 74  | Bold","Start It|
00004560  61 6c 69 63 22 2c 22 45  6e 64 20 49 74 61 6c 69  |alic","End Itali|
00004570  63 22 0d 02 61 05 e1 0d  02 62 04 0d 02 63 10 dd  |c"..a....b...c..|
00004580  f2 69 6e 69 74 69 61 6c  69 73 65 0d 02 64 3b c8  |.initialise..d;.|
00004590  99 20 22 57 69 6d 70 5f  49 6e 69 74 69 61 6c 69  |. "Wimp_Initiali|
000045a0  73 65 22 2c 32 30 30 2c  26 34 42 35 33 34 31 35  |se",200,&4B53415|
000045b0  34 2c 22 45 64 69 74 20  50 6c 75 73 22 20 b8 20  |4,"Edit Plus" . |
000045c0  2c 68 61 6e 64 25 0d 02  65 1a de 20 62 6c 6b 25  |,hand%..e.. blk%|
000045d0  20 26 32 30 30 2c 20 74  69 74 6c 65 25 20 33 32  | &200, title% 32|
000045e0  0d 02 66 24 24 74 69 74  6c 65 25 3d 22 45 64 69  |..f$$title%="Edi|
000045f0  74 20 50 6c 75 73 22 3a  69 63 6f 6e 5f 70 6f 73  |t Plus":icon_pos|
00004600  25 3d 2d 31 0d 02 67 29  6c 61 79 6f 75 74 5f 69  |%=-1..g)layout_i|
00004610  64 24 3d 22 45 64 69 74  20 50 6c 75 73 20 76 31  |d$="Edit Plus v1|
00004620  20 50 61 67 65 20 4c 61  79 6f 75 74 22 0d 02 68  | Page Layout"..h|
00004630  3f de 20 6d 65 6e 75 62  75 66 66 25 20 26 36 38  |?. menubuff% &68|
00004640  30 2c 20 63 6f 64 65 25  20 26 38 30 30 2c 20 70  |0, code% &800, p|
00004650  72 65 5f 70 72 69 6e 74  25 20 34 38 2c 20 70 6f  |re_print% 48, po|
00004660  73 74 5f 70 72 69 6e 74  25 20 34 38 0d 02 69 47  |st_print% 48..iG|
00004670  de 20 73 74 79 6c 65 5f  74 61 62 6c 65 25 20 34  |. style_table% 4|
00004680  38 2c 20 63 6f 64 65 5f  69 6e 64 65 78 25 20 26  |8, code_index% &|
00004690  31 30 30 2c 20 63 6f 64  65 73 25 20 26 34 30 30  |100, codes% &400|
000046a0  2c 20 74 72 61 6e 73 5f  69 6e 64 65 78 25 20 26  |, trans_index% &|
000046b0  31 30 30 0d 02 6a 17 de  20 69 6d 6d 65 64 5f 63  |100..j.. immed_c|
000046c0  6f 64 65 73 25 20 26 32  30 30 0d 02 6b 1b ea 85  |odes% &200..k...|
000046d0  3a ee 85 ea 20 f2 72 65  70 6f 72 74 5f 65 72 72  |:... .report_err|
000046e0  6f 72 28 b9 29 0d 02 6c  1f 66 69 6c 65 25 3d a3  |or(.)..l.file%=.|
000046f0  3a 65 6f 70 5f 70 61 75  73 65 64 25 3d a3 3a 66  |:eop_paused%=.:f|
00004700  68 25 3d a3 0d 02 6d 34  e3 49 25 3d 30 b8 32 35  |h%=...m4.I%=0.25|
00004710  32 88 34 3a 63 6f 64 65  5f 69 6e 64 65 78 25 21  |2.4:code_index%!|
00004720  49 25 3d 30 3a 74 72 61  6e 73 5f 69 6e 64 65 78  |I%=0:trans_index|
00004730  25 21 49 25 3d 30 3a ed  0d 02 6e 22 e3 49 25 3d  |%!I%=0:...n".I%=|
00004740  30 b8 34 34 88 34 3a 73  74 79 6c 65 5f 74 61 62  |0.44.4:style_tab|
00004750  6c 65 25 21 49 25 3d 30  3a ed 0d 02 6f 35 c8 99  |le%!I%=0:...o5..|
00004760  20 22 4f 53 5f 52 65 61  64 56 61 72 56 61 6c 22  | "OS_ReadVarVal"|
00004770  2c 22 4f 62 65 79 24 44  69 72 22 2c 62 6c 6b 25  |,"Obey$Dir",blk%|
00004780  2c 32 35 36 2c 30 2c 33  20 b8 20 2c 2c 49 25 0d  |,256,0,3 . ,,I%.|
00004790  02 70 1d 62 6c 6b 25 3f  49 25 3d 31 33 3a 61 70  |.p.blk%?I%=13:ap|
000047a0  70 5f 64 69 72 24 3d 24  62 6c 6b 25 0d 02 71 20  |p_dir$=$blk%..q |
000047b0  6d 65 6d 73 7a 25 3d 93  2d 26 38 30 30 30 3a 62  |memsz%=.-&8000:b|
000047c0  75 66 66 65 72 25 3d 93  2b 26 38 30 0d 02 72 14  |uffer%=.+&80..r.|
000047d0  c8 99 22 48 6f 75 72 67  6c 61 73 73 5f 4f 6e 22  |.."Hourglass_On"|
000047e0  0d 02 73 45 e7 20 a4 77  6b 73 70 63 28 26 32 30  |..sE. .wkspc(&20|
000047f0  30 30 29 3d a3 20 49 25  3d a4 61 6c 65 72 74 28  |00)=. I%=.alert(|
00004800  31 2c 22 4e 6f 74 20 65  6e 6f 75 67 68 20 52 41  |1,"Not enough RA|
00004810  4d 20 74 6f 20 72 75 6e  20 45 64 69 74 2b 22 29  |M to run Edit+")|
00004820  3a f2 64 69 65 0d 02 74  20 f2 74 65 6d 70 6c 61  |:.die..t .templa|
00004830  74 65 73 20 28 26 33 30  30 29 3a f2 6d 61 69 6e  |tes (&300):.main|
00004840  5f 6d 65 6e 75 0d 02 75  29 c8 99 22 4f 53 5f 46  |_menu..u).."OS_F|
00004850  69 6c 65 22 2c 31 33 2c  61 70 70 5f 64 69 72 24  |ile",13,app_dir$|
00004860  2b 22 2e 44 61 74 61 43  22 20 b8 20 46 25 0d 02  |+".DataC" . F%..|
00004870  76 73 e7 20 46 25 3d 31  20 c8 99 20 22 4f 53 5f  |vs. F%=1 .. "OS_|
00004880  46 69 6c 65 22 2c 31 36  2c 61 70 70 5f 64 69 72  |File",16,app_dir|
00004890  24 2b 22 2e 44 61 74 61  43 22 2c 63 6f 64 65 25  |$+".DataC",code%|
000048a0  20 8b 20 49 25 3d a4 61  6c 65 72 74 28 31 2c 22  | . I%=.alert(1,"|
000048b0  46 69 6c 65 20 44 61 74  61 43 20 6e 6f 74 20 70  |File DataC not p|
000048c0  72 65 73 65 6e 74 2c 20  75 6e 61 62 6c 65 20 74  |resent, unable t|
000048d0  6f 20 63 6f 6e 74 69 6e  75 65 22 29 3a f2 64 69  |o continue"):.di|
000048e0  65 0d 02 77 2a c8 99 22  4f 53 5f 46 69 6c 65 22  |e..w*.."OS_File"|
000048f0  2c 31 33 2c 61 70 70 5f  64 69 72 24 2b 22 2e 63  |,13,app_dir$+".c|
00004900  6f 6e 66 69 67 22 20 b8  20 46 25 0d 02 78 78 e7  |onfig" . F%..xx.|
00004910  20 46 25 3d 31 20 f2 63  6f 6e 66 69 67 75 72 65  | F%=1 .configure|
00004920  20 8b 20 f2 64 65 66 61  75 6c 74 5f 63 6f 64 65  | . .default_code|
00004930  73 3a e7 20 a4 61 6c 65  72 74 28 33 2c 22 43 6f  |s:. .alert(3,"Co|
00004940  6e 66 69 67 20 66 69 6c  65 20 6e 6f 74 20 66 6f  |nfig file not fo|
00004950  75 6e 64 2e 20 43 6f 6e  74 69 6e 75 65 20 75 73  |und. Continue us|
00004960  69 6e 67 20 44 65 66 61  75 6c 74 20 63 6f 6e 66  |ing Default conf|
00004970  69 67 75 72 61 74 69 6f  6e 3f 22 29 3d 32 20 f2  |iguration?")=2 .|
00004980  64 69 65 0d 02 79 2a c8  99 22 4f 53 5f 46 69 6c  |die..y*.."OS_Fil|
00004990  65 22 2c 31 33 2c 61 70  70 5f 64 69 72 24 2b 22  |e",13,app_dir$+"|
000049a0  2e 6c 61 79 6f 75 74 22  20 b8 20 46 25 0d 02 7a  |.layout" . F%..z|
000049b0  2b e7 20 46 25 3d 31 20  f2 6c 6f 61 64 5f 6c 61  |+. F%=1 .load_la|
000049c0  79 6f 75 74 28 61 70 70  5f 64 69 72 24 2b 22 2e  |yout(app_dir$+".|
000049d0  6c 61 79 6f 75 74 22 29  0d 02 7b 25 69 63 6f 6e  |layout")..{%icon|
000049e0  25 3d a4 69 63 6f 6e 62  61 72 28 22 65 64 69 74  |%=.iconbar("edit|
000049f0  2b 22 2c 69 63 6f 6e 5f  70 6f 73 25 29 0d 02 7c  |+",icon_pos%)..||
00004a00  37 63 6f 64 65 25 21 34  3d 62 75 66 66 65 72 25  |7code%!4=buffer%|
00004a10  3a 63 6f 64 65 25 21 32  34 3d 62 6c 6b 25 3a 63  |:code%!24=blk%:c|
00004a20  6f 64 65 25 21 32 38 3d  74 72 61 6e 73 5f 69 6e  |ode%!28=trans_in|
00004a30  64 65 78 25 0d 02 7d 29  63 6f 64 65 25 21 33 32  |dex%..})code%!32|
00004a40  3d 63 6f 64 65 5f 69 6e  64 65 78 25 3a 63 6f 64  |=code_index%:cod|
00004a50  65 25 21 34 38 3d 76 69  65 77 5f 77 25 0d 02 7e  |e%!48=view_w%..~|
00004a60  21 f2 63 6c 65 61 72 5f  66 69 6c 65 3a c8 99 22  |!.clear_file:.."|
00004a70  48 6f 75 72 67 6c 61 73  73 5f 4f 66 66 22 0d 02  |Hourglass_Off"..|
00004a80  7f 05 e1 0d 02 80 04 0d  02 81 10 dd f2 63 6c 65  |.............cle|
00004a90  61 72 5f 66 69 6c 65 0d  02 82 18 f2 75 70 64 61  |ar_file.....upda|
00004aa0  74 65 5f 73 74 61 74 75  73 28 31 2c 22 22 29 0d  |te_status(1,"").|
00004ab0  02 83 19 f2 75 70 64 61  74 65 5f 73 74 61 74 75  |....update_statu|
00004ac0  73 28 32 2c 22 30 22 29  0d 02 84 19 f2 75 70 64  |s(2,"0").....upd|
00004ad0  61 74 65 5f 73 74 61 74  75 73 28 33 2c 22 30 22  |ate_status(3,"0"|
00004ae0  29 0d 02 85 1f f2 75 70  64 61 74 65 5f 73 74 61  |).....update_sta|
00004af0  74 75 73 28 34 2c 22 4e  6f 20 46 69 6c 65 22 29  |tus(4,"No File")|
00004b00  0d 02 86 35 62 6c 6b 25  21 26 31 30 30 3d 76 69  |...5blk%!&100=vi|
00004b10  65 77 5f 77 25 3a c8 99  22 57 69 6d 70 5f 43 6c  |ew_w%:.."Wimp_Cl|
00004b20  6f 73 65 57 69 6e 64 6f  77 22 2c 2c 62 6c 6b 25  |oseWindow",,blk%|
00004b30  2b 26 31 30 30 0d 02 87  2b 66 69 6c 65 6e 61 6d  |+&100...+filenam|
00004b40  65 24 3d 22 22 3a 6d 61  73 6b 25 3d 25 31 31 30  |e$="":mask%=%110|
00004b50  30 30 30 31 31 30 30 30  31 3a 6e 65 77 25 3d b9  |000110001:new%=.|
00004b60  0d 02 88 33 e7 20 66 69  6c 65 25 3d 32 20 c8 99  |...3. file%=2 ..|
00004b70  20 22 4f 53 5f 42 79 74  65 22 2c 32 31 2c 33 3a  | "OS_Byte",21,3:|
00004b80  c8 99 22 4f 53 5f 50 72  69 6e 74 43 68 61 72 22  |.."OS_PrintChar"|
00004b90  2c 31 33 0d 02 89 2a 66  69 6c 65 25 3d a3 3a 70  |,13...*file%=.:p|
00004ba0  61 67 65 5f 6f 6b 25 3d  a3 3a 68 64 6c 25 3d a3  |age_ok%=.:hdl%=.|
00004bb0  3a 49 25 3d a4 77 6b 73  70 63 28 30 29 0d 02 8a  |:I%=.wkspc(0)...|
00004bc0  05 e1 0d 02 8b 04 0d 02  8c 10 dd a4 70 72 69 6e  |............prin|
00004bd0  74 65 72 5f 6f 6e 0d 02  8d 2e c8 99 22 4f 53 5f  |ter_on......"OS_|
00004be0  42 79 74 65 22 2c 31 32  38 2c 32 35 32 20 b8 20  |Byte",128,252 . |
00004bf0  2c 4c 25 2c 48 25 3a 46  25 3d 4c 25 2b 28 48 25  |,L%,H%:F%=L%+(H%|
00004c00  3c 3c 38 29 0d 02 8e 21  e3 20 49 25 3d 30 b8 34  |<<8)...!. I%=0.4|
00004c10  3a c8 99 22 4f 53 5f 50  72 69 6e 74 43 68 61 72  |:.."OS_PrintChar|
00004c20  22 2c 30 3a ed 0d 02 8f  10 d1 3d 30 3a f5 3a fd  |",0:......=0:.:.|
00004c30  20 91 3e 32 30 0d 02 90  20 c8 99 22 4f 53 5f 42  | .>20... .."OS_B|
00004c40  79 74 65 22 2c 31 32 38  2c 32 35 32 20 b8 20 2c  |yte",128,252 . ,|
00004c50  4c 25 2c 48 25 0d 02 91  18 e7 20 4c 25 2b 28 48  |L%,H%..... L%+(H|
00004c60  25 3c 3c 38 29 20 3e 3d  46 25 3a 3d b9 0d 02 92  |%<<8) >=F%:=....|
00004c70  28 e7 20 a4 61 6c 65 72  74 28 33 2c 22 50 72 69  |(. .alert(3,"Pri|
00004c80  6e 74 65 72 20 6e 6f 74  20 72 65 61 64 79 22 29  |nter not ready")|
00004c90  3d 32 3a 3d a3 0d 02 93  10 3d a4 70 72 69 6e 74  |=2:=.....=.print|
00004ca0  65 72 5f 6f 6e 0d 02 94  04 0d 02 95 11 dd f2 73  |er_on..........s|
00004cb0  61 76 65 5f 6c 61 79 6f  75 74 0d 02 96 22 ea 85  |ave_layout..."..|
00004cc0  3a ee 85 ea 3a d9 23 48  25 3a f2 72 65 70 6f 72  |:...:.#H%:.repor|
00004cd0  74 5f 65 72 72 6f 72 28  a3 29 3a e1 0d 02 97 1c  |t_error(.):.....|
00004ce0  48 25 3d ae 28 61 70 70  5f 64 69 72 24 2b 22 2e  |H%=.(app_dir$+".|
00004cf0  6c 61 79 6f 75 74 22 29  0d 02 98 34 e3 20 49 25  |layout")...4. I%|
00004d00  3d 31 b8 a9 28 6c 61 79  6f 75 74 5f 69 64 24 29  |=1..(layout_id$)|
00004d10  3a d5 23 48 25 2c 97 28  c1 6c 61 79 6f 75 74 5f  |:.#H%,.(.layout_|
00004d20  69 64 24 2c 49 25 2c 31  29 29 3a ed 0d 02 99 0b  |id$,I%,1)):.....|
00004d30  d5 23 48 25 2c 31 33 0d  02 9a 0d e3 20 49 25 3d  |.#H%,13..... I%=|
00004d40  31 b8 31 30 0d 02 9b 3b  20 21 62 6c 6b 25 3d 6c  |1.10...; !blk%=l|
00004d50  61 79 6f 75 74 5f 77 25  3a 62 6c 6b 25 21 34 3d  |ayout_w%:blk%!4=|
00004d60  49 25 3a c8 99 20 22 57  69 6d 70 5f 47 65 74 49  |I%:.. "Wimp_GetI|
00004d70  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6b 25 0d  |conState",,blk%.|
00004d80  02 9c 2c 20 4a 25 3d 62  6c 6b 25 21 32 38 3a f5  |.., J%=blk%!28:.|
00004d90  3a d5 23 48 25 2c 3f 4a  25 3a 4a 25 2b 3d 31 3a  |:.#H%,?J%:J%+=1:|
00004da0  fd 20 4a 25 3f 2d 31 20  3c 33 32 0d 02 9d 05 ed  |. J%?-1 <32.....|
00004db0  0d 02 9e 0e e3 20 49 25  3d 31 31 b8 31 33 0d 02  |..... I%=11.13..|
00004dc0  9f 3b 20 21 62 6c 6b 25  3d 6c 61 79 6f 75 74 5f  |.; !blk%=layout_|
00004dd0  77 25 3a 62 6c 6b 25 21  34 3d 49 25 3a c8 99 20  |w%:blk%!4=I%:.. |
00004de0  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00004df0  74 65 22 2c 2c 62 6c 6b  25 0d 02 a0 1e 20 e3 20  |te",,blk%.... . |
00004e00  4a 25 3d 32 34 b8 32 37  3a d5 23 48 25 2c 62 6c  |J%=24.27:.#H%,bl|
00004e10  6b 25 3f 4a 25 3a ed 0d  02 a1 05 ed 0d 02 a2 08  |k%?J%:..........|
00004e20  d9 23 48 25 0d 02 a3 05  e1 0d 02 a4 04 0d 02 a5  |.#H%............|
00004e30  1c dd f2 75 70 64 61 74  65 5f 73 74 61 74 75 73  |...update_status|
00004e40  28 6e 75 6d 25 2c 73 24  29 0d 02 a6 26 62 6c 6b  |(num%,s$)...&blk|
00004e50  25 21 26 31 30 30 3d 73  74 61 74 75 73 5f 77 25  |%!&100=status_w%|
00004e60  3a 62 6c 6b 25 21 26 31  30 34 3d 6e 75 6d 25 0d  |:blk%!&104=num%.|
00004e70  02 a7 25 c8 99 20 22 57  69 6d 70 5f 47 65 74 49  |..%.. "Wimp_GetI|
00004e80  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6b 25 2b  |conState",,blk%+|
00004e90  26 31 30 30 0d 02 a8 2b  24 28 62 6c 6b 25 21 26  |&100...+$(blk%!&|
00004ea0  31 31 43 29 3d 73 24 3a  62 6c 6b 25 21 26 31 30  |11C)=s$:blk%!&10|
00004eb0  38 3d 30 3a 62 6c 6b 25  21 26 31 30 43 3d 30 0d  |8=0:blk%!&10C=0.|
00004ec0  02 a9 25 c8 99 20 22 57  69 6d 70 5f 53 65 74 49  |..%.. "Wimp_SetI|
00004ed0  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6b 25 2b  |conState",,blk%+|
00004ee0  26 31 30 30 0d 02 aa 05  e1 0d 02 ab 04 0d 02 ac  |&100............|
00004ef0  1d dd f2 73 74 61 74 75  73 5f 76 61 6c 75 65 28  |...status_value(|
00004f00  6e 75 6d 25 2c 76 61 6c  25 29 0d 02 ad 13 e7 20  |num%,val%)..... |
00004f10  76 61 6c 25 3c 30 20 76  61 6c 25 3d 30 0d 02 ae  |val%<0 val%=0...|
00004f20  2f f2 75 70 64 61 74 65  5f 73 74 61 74 75 73 28  |/.update_status(|
00004f30  6e 75 6d 25 2c c0 c3 28  76 61 6c 25 29 2b 22 20  |num%,..(val%)+" |
00004f40  20 20 20 20 20 20 20 22  2c 38 29 29 0d 02 af 05  |       ",8))....|
00004f50  e1 0d 02 b0 04 0d 02 b1  15 dd f2 6c 6f 61 64 5f  |...........load_|
00004f60  6c 61 79 6f 75 74 28 66  24 29 0d 02 b2 17 48 25  |layout(f$)....H%|
00004f70  3d 8e 28 66 24 29 3a 24  62 6c 6b 25 3d be 23 48  |=.(f$):$blk%=.#H|
00004f80  25 0d 02 b3 42 e7 20 24  62 6c 6b 25 3c 3e 6c 61  |%...B. $blk%<>la|
00004f90  79 6f 75 74 5f 69 64 24  20 d9 23 48 25 3a 49 25  |yout_id$ .#H%:I%|
00004fa0  3d a4 61 6c 65 72 74 28  31 2c 22 42 61 64 20 70  |=.alert(1,"Bad p|
00004fb0  61 67 65 20 6c 61 79 6f  75 74 20 66 69 6c 65 22  |age layout file"|
00004fc0  29 3a e1 0d 02 b4 0d e3  20 49 25 3d 31 b8 31 30  |):...... I%=1.10|
00004fd0  0d 02 b5 4d 20 24 28 62  6c 6b 25 2b 26 35 30 29  |...M $(blk%+&50)|
00004fe0  3d be 23 48 25 3a 21 62  6c 6b 25 3d 6c 61 79 6f  |=.#H%:!blk%=layo|
00004ff0  75 74 5f 77 25 3a 20 62  6c 6b 25 21 34 3d 49 25  |ut_w%: blk%!4=I%|
00005000  3a c8 99 20 22 57 69 6d  70 5f 47 65 74 49 63 6f  |:.. "Wimp_GetIco|
00005010  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 02 b6  |nState",,blk%...|
00005020  4b 20 24 28 62 6c 6b 25  21 32 38 29 3d 24 28 62  |K $(blk%!28)=$(b|
00005030  6c 6b 25 2b 26 35 30 29  3a 62 6c 6b 25 21 38 3d  |lk%+&50):blk%!8=|
00005040  30 3a 62 6c 6b 25 21 31  32 3d 30 3a c8 99 20 22  |0:blk%!12=0:.. "|
00005050  57 69 6d 70 5f 53 65 74  49 63 6f 6e 53 74 61 74  |Wimp_SetIconStat|
00005060  65 22 2c 2c 62 6c 6b 25  0d 02 b7 05 ed 0d 02 b8  |e",,blk%........|
00005070  0e e3 20 49 25 3d 31 31  b8 31 33 0d 02 b9 3b 20  |.. I%=11.13...; |
00005080  21 62 6c 6b 25 3d 6c 61  79 6f 75 74 5f 77 25 3a  |!blk%=layout_w%:|
00005090  62 6c 6b 25 21 34 3d 49  25 3a c8 99 20 22 57 69  |blk%!4=I%:.. "Wi|
000050a0  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000050b0  2c 2c 62 6c 6b 25 0d 02  ba 1e 20 e3 20 4a 25 3d  |,,blk%.... . J%=|
000050c0  36 34 b8 36 37 3a 62 6c  6b 25 3f 4a 25 3d 9a 23  |64.67:blk%?J%=.#|
000050d0  48 25 3a ed 0d 02 bb 46  20 62 6c 6b 25 21 38 3d  |H%:....F blk%!8=|
000050e0  28 62 6c 6b 25 21 32 34  29 82 28 62 6c 6b 25 21  |(blk%!24).(blk%!|
000050f0  36 34 29 3a 62 6c 6b 25  21 31 32 3d 30 3a c8 99  |64):blk%!12=0:..|
00005100  20 22 57 69 6d 70 5f 53  65 74 49 63 6f 6e 53 74  | "Wimp_SetIconSt|
00005110  61 74 65 22 2c 2c 62 6c  6b 25 0d 02 bc 05 ed 0d  |ate",,blk%......|
00005120  02 bd 08 d9 23 48 25 0d  02 be 05 e1 0d 02 bf 04  |....#H%.........|
00005130  0d 02 c0 0f dd f2 63 6f  6e 66 69 67 75 72 65 0d  |......configure.|
00005140  02 c1 23 ea 20 69 63 6e  25 2c 6d 32 25 2c 74 63  |..#. icn%,m2%,tc|
00005150  25 2c 74 74 25 2c 69 63  25 2c 73 63 25 2c 77 69  |%,tt%,ic%,sc%,wi|
00005160  64 25 0d 02 c2 1c 48 25  3d 8e 28 61 70 70 5f 64  |d%....H%=.(app_d|
00005170  69 72 24 2b 22 2e 63 6f  6e 66 69 67 22 29 0d 02  |ir$+".config")..|
00005180  c3 35 4d 25 3d 30 3a 6c  69 6e 65 25 3d 30 3a 57  |.5M%=0:line%=0:W|
00005190  25 3d 34 30 3a 69 63 6e  25 3d 30 3a 6d 32 25 3d  |%=40:icn%=0:m2%=|
000051a0  63 6f 64 65 5f 6d 25 2b  32 38 3a 77 69 64 25 3d  |code_m%+28:wid%=|
000051b0  32 35 32 0d 02 c4 2b 74  63 25 3d 63 6f 64 65 73  |252...+tc%=codes|
000051c0  25 3a 74 6e 25 3d 30 3a  73 6e 25 3d 30 3a 69 63  |%:tn%=0:sn%=0:ic|
000051d0  25 3d 69 6d 6d 65 64 5f  63 6f 64 65 73 25 0d 02  |%=immed_codes%..|
000051e0  c5 4b ea 85 3a ee 85 ea  3a d9 23 48 25 3a 49 25  |.K..:...:.#H%:I%|
000051f0  3d a4 61 6c 65 72 74 28  31 2c f6 24 2b 22 20 61  |=.alert(1,.$+" a|
00005200  74 20 6c 69 6e 65 20 22  2b c3 28 6c 69 6e 65 25  |t line "+.(line%|
00005210  29 2b 22 20 69 6e 20 43  6f 6e 66 69 67 20 66 69  |)+" in Config fi|
00005220  6c 65 22 29 3a f2 64 69  65 0d 02 c6 05 f5 0d 02  |le"):.die.......|
00005230  c7 20 20 24 62 6c 6b 25  3d be 23 48 25 3a 70 25  |.  $blk%=.#H%:p%|
00005240  3d 62 6c 6b 25 3a 6c 69  6e 65 25 2b 3d 31 0d 02  |=blk%:line%+=1..|
00005250  c8 16 20 c8 95 20 3f 70  25 3d 33 32 3a 70 25 2b  |.. .. ?p%=32:p%+|
00005260  3d 31 3a ce 0d 02 c9 0b  20 c8 8e 20 b9 20 ca 0d  |=1:..... .. . ..|
00005270  02 ca 28 20 20 c9 20 3f  70 25 3c 33 32 3a 6c 69  |..(  . ?p%<32:li|
00005280  6e 65 25 2b 3d 31 20 20  3a 20 20 f4 20 62 6c 61  |ne%+=1  :  . bla|
00005290  6e 6b 20 6c 69 6e 65 0d  02 cb 2d 20 20 c9 20 3f  |nk line...-  . ?|
000052a0  70 25 3d 39 32 3a 20 20  20 20 f4 20 62 61 63 6b  |p%=92:    . back|
000052b0  73 6c 61 73 68 20 73 6f  20 69 67 6e 6f 72 65 20  |slash so ignore |
000052c0  6c 69 6e 65 0d 02 cc 1c  20 20 c9 20 c0 24 70 25  |line....  . .$p%|
000052d0  2c 35 29 3d 22 53 54 59  4c 45 22 3a 4d 25 3d 31  |,5)="STYLE":M%=1|
000052e0  0d 02 cd 1c 20 20 c9 20  c0 24 70 25 2c 35 29 3d  |....  . .$p%,5)=|
000052f0  22 49 4d 4d 45 44 22 3a  4d 25 3d 32 0d 02 ce 1c  |"IMMED":M%=2....|
00005300  20 20 c9 20 c0 24 70 25  2c 35 29 3d 22 54 52 41  |  . .$p%,5)="TRA|
00005310  4e 53 22 3a 4d 25 3d 33  0d 02 cf 24 20 20 c9 20  |NS":M%=3...$  . |
00005320  c0 24 70 25 2c 35 29 3d  22 49 43 4f 4e 4c 22 3a  |.$p%,5)="ICONL":|
00005330  69 63 6f 6e 5f 70 6f 73  25 3d 2d 32 0d 02 d0 06  |icon_pos%=-2....|
00005340  20 7f 0d 02 d1 0d 20 20  c8 8e 20 4d 25 20 ca 0d  | .....  .. M% ..|
00005350  02 d2 0b 20 20 20 c9 20  30 3a 0d 02 d3 1c 20 20  |...   . 0:....  |
00005360  20 c9 20 31 3a c8 95 20  3f 70 25 3c 33 33 3a 70  | . 1:.. ?p%<33:p|
00005370  25 2b 3d 31 3a ce 0d 02  d4 18 20 20 20 20 20 20  |%+=1:.....      |
00005380  20 20 20 20 e7 20 3f 70  25 3d 36 32 20 8c 0d 02  |    . ?p%=62 ...|
00005390  d5 29 20 20 20 20 20 20  20 20 20 20 20 58 25 3d  |.)           X%=|
000053a0  32 35 30 3a 59 25 3d 30  3a 70 25 2b 3d 31 3a 77  |250:Y%=0:p%+=1:w|
000053b0  69 64 25 3d 34 39 36 0d  02 d6 20 20 20 20 20 20  |id%=496...      |
000053c0  20 20 20 20 20 20 c8 95  20 3f 70 25 3c 33 33 3a  |      .. ?p%<33:|
000053d0  70 25 2b 3d 31 3a ce 0d  02 d7 0f 20 20 20 20 20  |p%+=1:.....     |
000053e0  20 20 20 20 20 cc 0d 02  d8 19 20 20 20 20 20 20  |     .....      |
000053f0  20 20 20 20 20 58 25 3d  30 3a 59 25 3d 34 34 0d  |     X%=0:Y%=44.|
00005400  02 d9 10 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |...           ..|
00005410  02 da 2e 20 20 20 20 20  20 20 20 20 20 f2 73 74  |...          .st|
00005420  79 6c 65 5f 69 63 6f 6e  28 c0 24 70 25 2c 31 32  |yle_icon(.$p%,12|
00005430  29 2c 69 63 6e 25 2c 58  25 2c 59 25 29 0d 02 db  |),icn%,X%,Y%)...|
00005440  1c 20 20 20 20 20 20 20  20 20 20 69 63 6e 25 2b  |.          icn%+|
00005450  3d 31 3a 70 25 2b 3d 31  32 0d 02 dc 1c 20 20 20  |=1:p%+=12....   |
00005460  20 20 20 20 20 20 20 43  25 3d a4 74 72 61 6e 73  |       C%=.trans|
00005470  5f 63 6f 64 65 0d 02 dd  28 20 20 20 20 20 20 20  |_code...(       |
00005480  20 20 20 73 74 79 6c 65  5f 74 61 62 6c 65 25 3f  |   style_table%?|
00005490  73 6e 25 3d 43 25 3a 73  6e 25 2b 3d 31 0d 02 de  |sn%=C%:sn%+=1...|
000054a0  27 20 20 20 20 20 20 20  20 20 20 74 6e 25 2b 3d  |'          tn%+=|
000054b0  31 3a 63 6f 64 65 5f 69  6e 64 65 78 25 3f 43 25  |1:code_index%?C%|
000054c0  3d 74 6e 25 0d 02 df 21  20 20 20 20 20 20 20 20  |=tn%...!        |
000054d0  20 20 74 63 25 3d a4 67  65 74 5f 63 6f 64 65 73  |  tc%=.get_codes|
000054e0  28 74 63 25 29 0d 02 e0  2e 20 20 20 c9 20 32 3a  |(tc%)....   . 2:|
000054f0  6d 25 3d 6d 32 25 3a 6d  32 25 3d a4 6d 65 6e 75  |m%=m2%:m2%=.menu|
00005500  5f 69 74 65 6d 28 c0 24  70 25 2c 31 32 29 2c 30  |_item(.$p%,12),0|
00005510  2c 30 29 0d 02 e1 28 20  20 20 20 20 20 20 20 20  |,0)...(         |
00005520  20 70 25 2b 3d 31 32 3a  69 63 25 3d a4 67 65 74  | p%+=12:ic%=.get|
00005530  5f 63 6f 64 65 73 28 69  63 25 29 0d 02 e2 20 20  |_codes(ic%)...  |
00005540  20 20 c9 20 33 3a 43 25  3d a4 74 72 61 6e 73 5f  |  . 3:C%=.trans_|
00005550  63 6f 64 65 3a 74 6e 25  2b 3d 31 0d 02 e3 32 20  |code:tn%+=1...2 |
00005560  20 20 20 20 20 20 20 20  20 63 6f 64 65 5f 69 6e  |         code_in|
00005570  64 65 78 25 3f 43 25 3d  74 6e 25 3a 74 72 61 6e  |dex%?C%=tn%:tran|
00005580  73 5f 69 6e 64 65 78 25  3f 43 25 3d 31 0d 02 e4  |s_index%?C%=1...|
00005590  21 20 20 20 20 20 20 20  20 20 20 74 63 25 3d a4  |!          tc%=.|
000055a0  67 65 74 5f 63 6f 64 65  73 28 74 63 25 29 0d 02  |get_codes(tc%)..|
000055b0  e5 07 20 20 cb 0d 02 e6  06 20 cb 0d 02 e7 0a fd  |..  ..... ......|
000055c0  20 c5 23 48 25 0d 02 e8  20 e7 20 6d 32 25 3e 63  | .#H%... . m2%>c|
000055d0  6f 64 65 5f 6d 25 2b 32  38 20 6d 32 25 21 2d 32  |ode_m%+28 m2%!-2|
000055e0  34 3d 26 38 30 0d 02 e9  08 d9 23 48 25 0d 02 ea  |4=&80.....#H%...|
000055f0  21 e7 20 57 25 3c 34 30  20 f2 73 65 74 5f 73 74  |!. W%<40 .set_st|
00005600  79 6c 65 5f 65 78 74 28  57 25 2d 34 38 29 0d 02  |yle_ext(W%-48)..|
00005610  eb 05 cd 0d 02 ec 05 e1  0d 02 ed 04 0d 02 ee 21  |...............!|
00005620  dd f2 73 74 79 6c 65 5f  69 63 6f 6e 28 73 74 72  |..style_icon(str|
00005630  24 2c 6e 75 6d 25 2c 78  25 2c 79 25 29 0d 02 ef  |$,num%,x%,y%)...|
00005640  0a 57 25 2d 3d 79 25 0d  02 f0 38 62 6c 6b 25 21  |.W%-=y%...8blk%!|
00005650  26 31 30 30 3d 73 74 79  6c 65 73 5f 77 25 3a 62  |&100=styles_w%:b|
00005660  6c 6b 25 21 26 31 30 34  3d 31 36 2b 78 25 3a 62  |lk%!&104=16+x%:b|
00005670  6c 6b 25 21 26 31 30 43  3d 32 33 32 2b 78 25 0d  |lk%!&10C=232+x%.|
00005680  02 f1 27 62 6c 6b 25 21  26 31 31 30 3d 57 25 3a  |..'blk%!&110=W%:|
00005690  62 6c 6b 25 21 26 31 30  38 3d 62 6c 6b 25 21 26  |blk%!&108=blk%!&|
000056a0  31 31 30 2d 34 34 0d 02  f2 36 62 6c 6b 25 21 26  |110-44...6blk%!&|
000056b0  31 31 34 3d 28 34 39 84  39 3c 3c 31 32 84 31 3c  |114=(49.9<<12.1<|
000056c0  3c 31 36 84 37 3c 3c 32  34 29 3a 24 28 62 6c 6b  |<16.7<<24):$(blk|
000056d0  25 2b 26 31 31 38 29 3d  73 74 72 24 0d 02 f3 23  |%+&118)=str$...#|
000056e0  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 49  |.. "Wimp_CreateI|
000056f0  63 6f 6e 22 2c 2c 62 6c  6b 25 2b 26 31 30 30 0d  |con",,blk%+&100.|
00005700  02 f4 05 e1 0d 02 f5 04  0d 02 f6 17 dd f2 73 65  |..............se|
00005710  74 5f 73 74 79 6c 65 5f  65 78 74 28 68 25 29 0d  |t_style_ext(h%).|
00005720  02 f7 37 62 6c 6b 25 21  26 31 30 30 3d 30 3a 62  |..7blk%!&100=0:b|
00005730  6c 6b 25 21 26 31 30 34  3d 68 25 3a 62 6c 6b 25  |lk%!&104=h%:blk%|
00005740  21 26 31 30 38 3d 77 69  64 25 3a 62 6c 6b 25 21  |!&108=wid%:blk%!|
00005750  26 31 30 43 3d 30 0d 02  f8 2a c8 99 22 57 69 6d  |&10C=0...*.."Wim|
00005760  70 5f 53 65 74 45 78 74  65 6e 74 22 2c 73 74 79  |p_SetExtent",sty|
00005770  6c 65 73 5f 77 25 2c 62  6c 6b 25 2b 26 31 30 30  |les_w%,blk%+&100|
00005780  0d 02 f9 05 e1 0d 02 fa  04 0d 02 fb 17 dd a4 67  |...............g|
00005790  65 74 5f 63 6f 64 65 73  28 63 6f 64 65 73 25 29  |et_codes(codes%)|
000057a0  0d 02 fc 15 ea 20 63 6f  75 6e 74 25 3a 63 6f 75  |..... count%:cou|
000057b0  6e 74 25 3d 31 0d 02 fd  05 f5 0d 02 fe 1e 20 63  |nt%=1......... c|
000057c0  6f 64 65 73 25 3f 63 6f  75 6e 74 25 3d a4 74 72  |odes%?count%=.tr|
000057d0  61 6e 73 5f 63 6f 64 65  0d 02 ff 22 20 e7 20 63  |ans_code..." . c|
000057e0  6f 64 65 73 25 3f 63 6f  75 6e 74 25 3c 3e 2d 31  |odes%?count%<>-1|
000057f0  20 63 6f 75 6e 74 25 2b  3d 31 0d 03 00 17 fd 20  | count%+=1..... |
00005800  3f 70 25 3c 33 32 20 84  20 3f 70 25 3d 97 22 5c  |?p%<32 . ?p%=."\|
00005810  22 0d 03 01 12 3f 63 6f  64 65 73 25 3d 63 6f 75  |"....?codes%=cou|
00005820  6e 74 25 0d 03 02 12 3d  63 6f 64 65 73 25 2b 63  |nt%....=codes%+c|
00005830  6f 75 6e 74 25 0d 03 03  04 0d 03 04 10 dd a4 74  |ount%..........t|
00005840  72 61 6e 73 5f 63 6f 64  65 0d 03 05 20 c8 95 20  |rans_code... .. |
00005850  3f 70 25 3d 33 32 20 84  20 3f 70 25 3d 97 22 2c  |?p%=32 . ?p%=.",|
00005860  22 3a 70 25 2b 3d 31 3a  ce 0d 03 06 0c c8 8e 20  |":p%+=1:....... |
00005870  3f 70 25 20 ca 0d 03 07  11 20 c9 20 97 22 65 22  |?p% ..... . ."e"|
00005880  3a 49 25 3d 32 37 0d 03  08 19 20 c9 20 33 34 2c  |:I%=27.... . 34,|
00005890  33 39 3a 70 25 2b 3d 31  3a 49 25 3d 3f 70 25 0d  |39:p%+=1:I%=?p%.|
000058a0  03 09 2a 20 c9 20 34 38  3a c8 99 22 4f 53 5f 52  |..* . 48:.."OS_R|
000058b0  65 61 64 55 6e 73 69 67  6e 65 64 22 2c 31 36 2c  |eadUnsigned",16,|
000058c0  70 25 20 b8 20 2c 2c 49  25 0d 03 0a 2a 20 c9 20  |p% . ,,I%...* . |
000058d0  36 35 3a c8 99 22 4f 53  5f 52 65 61 64 55 6e 73  |65:.."OS_ReadUns|
000058e0  69 67 6e 65 64 22 2c 31  36 2c 70 25 20 b8 20 2c  |igned",16,p% . ,|
000058f0  2c 49 25 0d 03 0b 2a 20  c9 20 36 36 3a c8 99 22  |,I%...* . 66:.."|
00005900  4f 53 5f 52 65 61 64 55  6e 73 69 67 6e 65 64 22  |OS_ReadUnsigned"|
00005910  2c 31 36 2c 70 25 20 b8  20 2c 2c 49 25 0d 03 0c  |,16,p% . ,,I%...|
00005920  2a 20 c9 20 36 37 3a c8  99 22 4f 53 5f 52 65 61  |* . 67:.."OS_Rea|
00005930  64 55 6e 73 69 67 6e 65  64 22 2c 31 36 2c 70 25  |dUnsigned",16,p%|
00005940  20 b8 20 2c 2c 49 25 0d  03 0d 2a 20 c9 20 36 38  | . ,,I%...* . 68|
00005950  3a c8 99 22 4f 53 5f 52  65 61 64 55 6e 73 69 67  |:.."OS_ReadUnsig|
00005960  6e 65 64 22 2c 31 36 2c  70 25 20 b8 20 2c 2c 49  |ned",16,p% . ,,I|
00005970  25 0d 03 0e 2a 20 c9 20  36 39 3a c8 99 22 4f 53  |%...* . 69:.."OS|
00005980  5f 52 65 61 64 55 6e 73  69 67 6e 65 64 22 2c 31  |_ReadUnsigned",1|
00005990  36 2c 70 25 20 b8 20 2c  2c 49 25 0d 03 0f 2a 20  |6,p% . ,,I%...* |
000059a0  c9 20 37 30 3a c8 99 22  4f 53 5f 52 65 61 64 55  |. 70:.."OS_ReadU|
000059b0  6e 73 69 67 6e 65 64 22  2c 31 36 2c 70 25 20 b8  |nsigned",16,p% .|
000059c0  20 2c 2c 49 25 0d 03 10  1a 20 c9 20 31 30 2c 31  | ,,I%.... . 10,1|
000059d0  33 2c 30 3a 49 25 3d 2d  31 3a 70 25 2d 3d 31 0d  |3,0:I%=-1:p%-=1.|
000059e0  03 11 05 7f 0d 03 12 25  20 c8 99 20 22 4f 53 5f  |.......% .. "OS_|
000059f0  52 65 61 64 55 6e 73 69  67 6e 65 64 22 2c 30 2c  |ReadUnsigned",0,|
00005a00  70 25 20 b8 20 2c 2c 49  25 0d 03 13 05 cb 0d 03  |p% . ,,I%.......|
00005a10  14 1f f5 3a 70 25 2b 3d  31 3a fd 20 3f 70 25 3c  |...:p%+=1:. ?p%<|
00005a20  33 33 20 84 20 3f 70 25  3d 97 22 2c 22 0d 03 15  |33 . ?p%=.","...|
00005a30  07 3d 49 25 0d 03 16 04  0d 03 17 0f dd a4 63 68  |.=I%..........ch|
00005a40  65 63 6b 5f 65 6e 76 0d  03 18 17 c8 99 20 22 4f  |eck_env...... "O|
00005a50  53 5f 47 65 74 45 6e 76  22 20 b8 20 49 25 0d 03  |S_GetEnv" . I%..|
00005a60  19 0c e3 20 4a 25 3d 30  b8 31 0d 03 1a 2b 20 f5  |... J%=0.1...+ .|
00005a70  3a 49 25 2b 3d 31 3a fd  20 3f 49 25 3d 33 34 20  |:I%+=1:. ?I%=34 |
00005a80  84 20 3f 49 25 3c 33 32  3a e7 20 3f 49 25 3c 33  |. ?I%<32:. ?I%<3|
00005a90  32 3a 3d 22 22 0d 03 1b  05 ed 0d 03 1c 22 f5 3a  |2:=""........".:|
00005aa0  49 25 2b 3d 31 3a fd 20  3f 49 25 3c 3e 33 32 3a  |I%+=1:. ?I%<>32:|
00005ab0  e7 20 3f 49 25 3c 33 32  3a 3d 22 22 0d 03 1d 21  |. ?I%<32:=""...!|
00005ac0  4a 25 3d 49 25 3a f5 3a  4a 25 2b 3d 31 3a fd 20  |J%=I%:.:J%+=1:. |
00005ad0  3f 4a 25 3c 33 32 3a 3f  4a 25 3d 31 33 0d 03 1e  |?J%<32:?J%=13...|
00005ae0  08 3d 24 49 25 0d 03 1f  04 0d 03 20 0f dd f2 6c  |.=$I%...... ...l|
00005af0  6f 61 64 5f 66 69 6c 65  0d 03 21 3e e7 20 66 69  |oad_file..!>. fi|
00005b00  6c 65 25 20 e7 20 a4 61  6c 65 72 74 28 33 2c 22  |le% . .alert(3,"|
00005b10  41 72 65 20 79 6f 75 20  73 75 72 65 2c 20 66 69  |Are you sure, fi|
00005b20  6c 65 20 73 74 69 6c 6c  20 6c 6f 61 64 65 64 3f  |le still loaded?|
00005b30  22 29 3d 32 20 e1 0d 03  22 29 ea 85 3a ee 85 ea  |")=2 ...")..:...|
00005b40  3a f2 72 65 70 6f 72 74  5f 65 72 72 6f 72 28 a3  |:.report_error(.|
00005b50  29 3a f2 63 6c 65 61 72  5f 66 69 6c 65 3a e1 0d  |):.clear_file:..|
00005b60  03 23 2c 62 6c 6b 25 21  31 32 3d 62 6c 6b 25 21  |.#,blk%!12=blk%!|
00005b70  38 3a 62 6c 6b 25 21 31  36 3d 34 3a 66 5f 74 79  |8:blk%!16=4:f_ty|
00005b80  70 65 25 3d 62 6c 6b 25  21 34 30 0d 03 24 3c 49  |pe%=blk%!40..$<I|
00005b90  25 3d 62 6c 6b 25 2b 34  34 3a 66 69 6c 65 6e 61  |%=blk%+44:filena|
00005ba0  6d 65 24 3d 22 22 3a c8  95 20 3f 49 25 3a 66 69  |me$="":.. ?I%:fi|
00005bb0  6c 65 6e 61 6d 65 24 2b  3d bd 28 3f 49 25 29 3a  |lename$+=.(?I%):|
00005bc0  49 25 2b 3d 31 3a ce 0d  03 25 28 c8 99 20 22 57  |I%+=1:...%(.. "W|
00005bd0  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
00005be0  2c 31 37 2c 62 6c 6b 25  2c 62 6c 6b 25 21 34 0d  |,17,blk%,blk%!4.|
00005bf0  03 26 71 e7 20 66 5f 74  79 70 65 25 3c 3e 26 46  |.&q. f_type%<>&F|
00005c00  46 46 20 80 20 66 5f 74  79 70 65 25 3c 3e 26 32  |FF . f_type%<>&2|
00005c10  38 41 20 e7 20 a4 61 6c  65 72 74 28 33 2c 22 54  |8A . .alert(3,"T|
00005c20  68 69 73 20 69 73 20 6e  6f 74 20 61 20 54 65 78  |his is not a Tex|
00005c30  74 20 66 69 6c 65 2c 20  61 72 65 20 79 6f 75 20  |t file, are you |
00005c40  73 75 72 65 20 79 6f 75  20 77 61 6e 74 20 74 6f  |sure you want to|
00005c50  20 70 72 69 6e 74 20 69  74 3f 22 29 3d 32 20 e1  | print it?")=2 .|
00005c60  0d 03 27 0f dd f2 69 6e  69 74 5f 6c 6f 61 64 0d  |..'...init_load.|
00005c70  03 28 29 c8 99 22 4f 53  5f 46 69 6c 65 22 2c 31  |.().."OS_File",1|
00005c80  37 2c 66 69 6c 65 6e 61  6d 65 24 20 b8 20 49 25  |7,filename$ . I%|
00005c90  2c 2c 2c 2c 6c 65 6e 25  0d 03 29 2a e7 20 49 25  |,,,,len%..)*. I%|
00005ca0  3d 30 20 49 25 3d a4 61  6c 65 72 74 28 31 2c 22  |=0 I%=.alert(1,"|
00005cb0  46 69 6c 65 20 6e 6f 74  20 66 6f 75 6e 64 22 29  |File not found")|
00005cc0  3a e1 0d 03 2a 34 e7 20  49 25 3d 32 20 49 25 3d  |:...*4. I%=2 I%=|
00005cd0  a4 61 6c 65 72 74 28 31  2c 22 43 61 6e 27 74 20  |.alert(1,"Can't |
00005ce0  70 72 69 6e 74 20 61 20  64 69 72 65 63 74 6f 72  |print a director|
00005cf0  79 21 22 29 3a e1 0d 03  2b 44 e7 20 a4 77 6b 73  |y!"):...+D. .wks|
00005d00  70 63 28 6c 65 6e 25 29  3d a3 20 49 25 3d a4 61  |pc(len%)=. I%=.a|
00005d10  6c 65 72 74 28 31 2c 22  4e 6f 74 20 65 6e 6f 75  |lert(1,"Not enou|
00005d20  67 68 20 6d 65 6d 6f 72  79 20 74 6f 20 6c 6f 61  |gh memory to loa|
00005d30  64 20 66 69 6c 65 22 29  3a e1 0d 03 2c 2f c8 99  |d file"):...,/..|
00005d40  22 4f 53 5f 46 69 6c 65  22 2c 31 36 2c 66 69 6c  |"OS_File",16,fil|
00005d50  65 6e 61 6d 65 24 2c 62  75 66 66 65 72 25 20 b8  |ename$,buffer% .|
00005d60  20 2c 2c 2c 2c 6c 65 6e  25 0d 03 2d 2c 21 62 6c  | ,,,,len%..-,!bl|
00005d70  6b 25 3d 76 69 65 77 5f  77 25 3a c8 99 22 57 69  |k%=view_w%:.."Wi|
00005d80  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
00005d90  2c 62 6c 6b 25 0d 03 2e  1d 66 69 6c 65 25 3d 31  |,blk%....file%=1|
00005da0  3a 65 6e 64 25 3d 62 75  66 66 65 72 25 2b 6c 65  |:end%=buffer%+le|
00005db0  6e 25 0d 03 2f 0e 70 25  3d 62 75 66 66 65 72 25  |n%../.p%=buffer%|
00005dc0  0d 03 30 18 c8 95 20 28  21 70 25 80 26 46 46 46  |..0... (!p%.&FFF|
00005dd0  46 29 3d 26 32 45 32 45  0d 03 31 14 20 c8 8e 20  |F)=&2E2E..1. .. |
00005de0  28 21 70 25 20 3e 3e 31  36 29 20 ca 0d 03 32 19  |(!p% >>16) ...2.|
00005df0  20 20 c9 20 26 34 43 35  30 3a f2 67 65 74 5f 64  |  . &4C50:.get_d|
00005e00  6f 74 28 33 29 0d 03 33  19 20 20 c9 20 26 35 33  |ot(3)..3.  . &53|
00005e10  35 34 3a f2 67 65 74 5f  64 6f 74 28 35 29 0d 03  |54:.get_dot(5)..|
00005e20  34 19 20 20 c9 20 26 35  33 34 32 3a f2 67 65 74  |4.  . &5342:.get|
00005e30  5f 64 6f 74 28 37 29 0d  03 35 19 20 20 c9 20 26  |_dot(7)..5.  . &|
00005e40  34 43 35 34 3a f2 67 65  74 5f 64 6f 74 28 36 29  |4C54:.get_dot(6)|
00005e50  0d 03 36 19 20 20 c9 20  26 34 43 34 36 3a f2 67  |..6.  . &4C46:.g|
00005e60  65 74 5f 64 6f 74 28 38  29 0d 03 37 19 20 20 c9  |et_dot(8)..7.  .|
00005e70  20 26 34 44 34 43 3a f2  67 65 74 5f 64 6f 74 28  | &4D4C:.get_dot(|
00005e80  34 29 0d 03 38 1a 20 20  c9 20 26 34 43 34 43 3a  |4)..8.  . &4C4C:|
00005e90  f2 67 65 74 5f 64 6f 74  28 31 30 29 0d 03 39 19  |.get_dot(10)..9.|
00005ea0  20 20 c9 20 26 35 30 35  33 3a f2 67 65 74 5f 64  |  . &5053:.get_d|
00005eb0  6f 74 28 39 29 0d 03 3a  1c 20 20 c9 20 26 34 36  |ot(9)..:.  . &46|
00005ec0  34 36 3a f2 67 65 74 5f  6f 6e 6f 66 66 28 31 31  |46:.get_onoff(11|
00005ed0  29 0d 03 3b 1c 20 20 c9  20 26 35 30 35 30 3a f2  |)..;.  . &5050:.|
00005ee0  67 65 74 5f 6f 6e 6f 66  66 28 31 33 29 0d 03 3c  |get_onoff(13)..<|
00005ef0  1c 20 20 c9 20 26 34 37  35 30 3a f2 67 65 74 5f  |.  . &4750:.get_|
00005f00  6f 6e 6f 66 66 28 31 32  29 0d 03 3d 06 20 cb 0d  |onoff(12)..=. ..|
00005f10  03 3e 22 20 f5 3a 70 25  2b 3d 31 3a fd 20 70 25  |.>" .:p%+=1:. p%|
00005f20  3f 2d 31 3d 31 30 20 84  20 70 25 3f 2d 31 3d 31  |?-1=10 . p%?-1=1|
00005f30  33 0d 03 3f 05 ce 0d 03  40 47 e7 20 70 25 3e 62  |3..?....@G. p%>b|
00005f40  75 66 66 65 72 25 20 49  25 3d 70 25 2d 62 75 66  |uffer% I%=p%-buf|
00005f50  66 65 72 25 3a 65 6e 64  25 2d 3d 49 25 3a e3 20  |fer%:end%-=I%:. |
00005f60  4a 25 3d 62 75 66 66 65  72 25 20 b8 20 65 6e 64  |J%=buffer% . end|
00005f70  25 3a 3f 4a 25 3d 4a 25  3f 49 25 3a ed 0d 03 41  |%:?J%=J%?I%:...A|
00005f80  10 63 6f 64 65 25 21 38  3d 65 6e 64 25 0d 03 42  |.code%!8=end%..B|
00005f90  13 49 25 3d a9 28 66 69  6c 65 6e 61 6d 65 24 29  |.I%=.(filename$)|
00005fa0  0d 03 43 24 f5 3a 49 25  2d 3d 31 3a fd 20 a7 66  |..C$.:I%-=1:. .f|
00005fb0  69 6c 65 6e 61 6d 65 24  2c 22 2e 22 2c 49 25 29  |ilename$,".",I%)|
00005fc0  20 3c 3e 30 0d 03 44 25  6c 65 61 66 24 3d c2 66  | <>0..D%leaf$=.f|
00005fd0  69 6c 65 6e 61 6d 65 24  2c a9 28 66 69 6c 65 6e  |ilename$,.(filen|
00005fe0  61 6d 65 24 29 2d 49 25  29 0d 03 45 38 21 62 6c  |ame$)-I%)..E8!bl|
00005ff0  6b 25 3d 73 61 76 65 54  5f 77 25 3a 62 6c 6b 25  |k%=saveT_w%:blk%|
00006000  21 34 3d 31 3a c8 99 20  22 57 69 6d 70 5f 47 65  |!4=1:.. "Wimp_Ge|
00006010  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
00006020  25 0d 03 46 44 24 28 62  6c 6b 25 21 32 38 29 3d  |%..FD$(blk%!28)=|
00006030  6c 65 61 66 24 3a 62 6c  6b 25 21 38 3d 30 3a 62  |leaf$:blk%!8=0:b|
00006040  6c 6b 25 21 31 32 3d 30  3a c8 99 20 22 57 69 6d  |lk%!12=0:.. "Wim|
00006050  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00006060  2c 62 6c 6b 25 0d 03 47  38 21 62 6c 6b 25 3d 73  |,blk%..G8!blk%=s|
00006070  61 76 65 50 5f 77 25 3a  62 6c 6b 25 21 34 3d 31  |aveP_w%:blk%!4=1|
00006080  3a c8 99 20 22 57 69 6d  70 5f 47 65 74 49 63 6f  |:.. "Wimp_GetIco|
00006090  6e 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 03 48  |nState",,blk%..H|
000060a0  44 24 28 62 6c 6b 25 21  32 38 29 3d 6c 65 61 66  |D$(blk%!28)=leaf|
000060b0  24 3a 62 6c 6b 25 21 38  3d 30 3a 62 6c 6b 25 21  |$:blk%!8=0:blk%!|
000060c0  31 32 3d 30 3a c8 99 20  22 57 69 6d 70 5f 53 65  |12=0:.. "Wimp_Se|
000060d0  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6b  |tIconState",,blk|
000060e0  25 0d 03 49 3b f2 75 70  64 61 74 65 5f 73 74 61  |%..I;.update_sta|
000060f0  74 75 73 28 31 2c 66 69  6c 65 6e 61 6d 65 24 29  |tus(1,filename$)|
00006100  3a f2 75 70 64 61 74 65  5f 73 74 61 74 75 73 28  |:.update_status(|
00006110  34 2c 22 57 61 69 74 69  6e 67 22 29 0d 03 4a 2f  |4,"Waiting")..J/|
00006120  f2 73 74 61 74 75 73 5f  76 61 6c 75 65 28 32 2c  |.status_value(2,|
00006130  6c 65 6e 25 29 3a f2 73  74 61 74 75 73 5f 76 61  |len%):.status_va|
00006140  6c 75 65 28 33 2c 6c 65  6e 25 29 0d 03 4b 32 21  |lue(3,len%)..K2!|
00006150  62 6c 6b 25 3d 73 74 61  74 75 73 5f 77 25 3a c8  |blk%=status_w%:.|
00006160  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
00006170  77 53 74 61 74 65 22 2c  2c 62 6c 6b 25 0d 03 4c  |wState",,blk%..L|
00006180  30 62 6c 6b 25 21 32 38  3d 2d 31 3a c8 99 20 22  |0blk%!28=-1:.. "|
00006190  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
000061a0  2c 2c 62 6c 6b 25 3a 6e  65 77 25 3d b9 0d 03 4d  |,,blk%:new%=...M|
000061b0  05 e1 0d 03 4e 04 0d 03  4f 13 dd f2 67 65 74 5f  |....N...O...get_|
000061c0  6f 6e 6f 66 66 28 69 25  29 0d 03 50 1b 70 25 2b  |onoff(i%)..P.p%+|
000061d0  3d 34 3a c8 95 20 3f 70  25 3d 33 32 3a 70 25 2b  |=4:.. ?p%=32:p%+|
000061e0  3d 31 3a ce 0d 03 51 45  e7 20 28 21 70 25 80 26  |=1:...QE. (!p%.&|
000061f0  46 46 46 46 29 3d 26 34  45 34 46 20 e7 20 a4 67  |FFFF)=&4E4F . .g|
00006200  65 74 5f 6c 61 79 6f 75  74 5f 74 6f 67 67 6c 65  |et_layout_toggle|
00006210  28 69 25 29 3d a3 20 f2  6c 61 79 6f 75 74 5f 74  |(i%)=. .layout_t|
00006220  6f 67 67 6c 65 28 69 25  29 0d 03 52 43 e7 20 28  |oggle(i%)..RC. (|
00006230  21 70 25 80 26 46 46 46  46 29 3d 26 34 36 34 46  |!p%.&FFFF)=&464F|
00006240  20 e7 20 a4 67 65 74 5f  6c 61 79 6f 75 74 5f 74  | . .get_layout_t|
00006250  6f 67 67 6c 65 28 69 25  29 20 f2 6c 61 79 6f 75  |oggle(i%) .layou|
00006260  74 5f 74 6f 67 67 6c 65  28 69 25 29 0d 03 53 05  |t_toggle(i%)..S.|
00006270  e1 0d 03 54 04 0d 03 55  11 dd f2 67 65 74 5f 64  |...T...U...get_d|
00006280  6f 74 28 69 25 29 0d 03  56 1b 70 25 2b 3d 34 3a  |ot(i%)..V.p%+=4:|
00006290  c8 95 20 3f 70 25 3d 33  32 3a 70 25 2b 3d 31 3a  |.. ?p%=32:p%+=1:|
000062a0  ce 0d 03 57 17 e7 20 3f  70 25 3d 31 33 20 84 20  |...W.. ?p%=13 . |
000062b0  3f 70 25 3d 31 30 3a e1  0d 03 58 23 e7 20 28 3f  |?p%=10:...X#. (?|
000062c0  70 25 3c 34 38 20 84 20  3f 70 25 3e 35 37 29 20  |p%<48 . ?p%>57) |
000062d0  80 20 3f 70 25 3c 3e 34  35 3a e1 0d 03 59 40 c8  |. ?p%<>45:...Y@.|
000062e0  99 22 4f 53 5f 45 76 61  6c 75 61 74 65 45 78 70  |."OS_EvaluateExp|
000062f0  72 65 73 73 69 6f 6e 22  2c 70 25 2c 62 75 66 66  |ression",p%,buff|
00006300  65 72 25 2d 26 35 30 2c  26 34 30 20 b8 20 2c 41  |er%-&50,&40 . ,A|
00006310  25 2c 4a 25 3a e7 20 41  25 20 e1 0d 03 5a 1c f2  |%,J%:. A% ...Z..|
00006320  73 65 74 5f 6c 61 79 6f  75 74 5f 76 61 6c 75 65  |set_layout_value|
00006330  28 69 25 2c 4a 25 29 0d  03 5b 05 e1 0d ff        |(i%,J%)..[....|
0000633e