Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199604.adf » Features » DiskTree+/!DiskTree/!RunImage

DiskTree+/!DiskTree/!RunImage

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_AcornUser_199604.adf » Features
Filename: DiskTree+/!DiskTree/!RunImage
Read OK:
File size: A0C6 bytes
Load address: 0000
Exec address: 0000
File contents
   10ON ERROR PROCmess(REPORT$+" : at line "+STR$ERL):END
   20REM *>$.!DiskTree.!RunImage
   30REM *Main Program for !DiskTree - Directory Tree Creator
   40REM *Version 1.08 (1 Feb '96)
   50REM *Authur LEN J. Robbins
   60maxno=150
   70DIM block &1000, menu% 2048, curbuf% 7*1024, icond 2048, mblock 256
   80DIM longdata (maxno*13)+24, longmen (maxno*24)+48
   90DIM tree(maxno),lastdir(256),buffer 63,tblk 1024
  100DIM tsize(maxno),tcount(maxno),tlen(maxno),troot$(maxno),arc$(maxno)
  110endbuf%=curbuf%+&6000
  120end%=-1:toolson=TRUE:quiting=FALSE:totallen=0:found=FALSE:upto=-1:uptot=-1:oldst=-1
  130saved=FALSE:prequitwait=FALSE:prequit=FALSE:sel=-1:tt=tblk:arclisted=FALSE
  140in=FALSE:started=0:ct=-1:arcct=-1:width=-1:itemno=-1:rc=-1:s1=-1:s2=-1:ss=-1
  150task=&4B534154
  160SYS "Wimp_Initialise",200,task,"!DiskTree" TO version%,mytask%
  170SYS "Wimp_ClaimInterface",mytask%
  180reinter=&81683
  190PROCtemplate
  200SYS"XOS_ReadVarVal","DTree$Drag",block,256,0,0 TO ,,len:block?len=13:drag$=$block
  210IF drag$="TRUE" THEN dragspr=TRUE ELSE dragspr=FALSE
  220env$=""
  230SYS "OS_GetEnv" TO env$
  240IF INSTR(env$,"-quit") THEN
  250I%=INSTR(env$,"""")
  260I%=INSTR(env$,"""",I%+1)
  270REPEAT
  280I%+=1
  290UNTIL MID$(env$,I%,1)<>" "
  300env$=MID$(env$,I%)
  310ENDIF
  320initic=FNicon
  330SYS"Wimp_SlotSize",-1,-1 TO orig
  340max=HIMEM-END:max=INT(max/1024)*1024
  350max-=&4000
  360end%=FALSE:drag%=0:drive%=0
  370SYS"Wimp_SlotSize",-1,-1 TO current
  380HIMEM=HIMEM-max:hsizeb=max:heap%=HIMEM
  390IF hsizeb<1024 THEN END
  400SYS"OS_Heap",0,heap%,,hsizeb
  410origheap=hsizeb:origappsize=current
  420ON ERROR PROCerror(REPORT$+" : at line "+STR$ERL)
  430PROCinfo(bar%,0,"None")
  440PROCadjustwin(500,-500)
  450PROCseticstate(save%,4,1<<22,1<<22)
  460PROCseticstate(find%,4,1<<22,1<<22)
  470IF env$<>"" PROCload(env$)
  480REPEAT
  490SYS"Wimp_Poll",0,block TO eventcode
  500SYS "Wimp_PollPointer",eventcode,,version%
  510CASE eventcode OF
  520WHEN 0:IF NOT saved AND prequit SYS"Wimp_ProcessKey",&1FC
  530WHEN 1:PROCredraw(block!0)
  540WHEN 2:PROCrequest2
  550WHEN 3:PROCrequest3
  560WHEN 6:PROCclick(block)
  570WHEN 7:PROCout
  580WHEN 8:PROCprocess
  590WHEN 9:PROCselect
  600WHEN 10:PROCscroll
  610WHEN 17,18:PROCmessagein
  620ENDCASE
  630UNTIL end%
  640PROCend
  650END
  660
  670DEFPROCend
  680SYSreinter,mytask%
  690SYS"Wimp_CloseDown",task,mytask%
  700END
  710ENDPROC
  720
  730DEFPROCrequest2
  740win=!block
  750IF win=main% THEN
  760!icond=toolbox%
  770SYS "Wimp_GetWindowState",,icond
  780tool28=icond!28
  790!icond=main%
  800SYS "Wimp_GetWindowState",,icond
  810check=0
  820IF icond!4<>block!4 THEN check=1
  830IF icond!8<>block!8 THEN check=1
  840IF icond!12<>block!12 THEN check=1
  850IF icond!16<>block!16 THEN check=1
  860IF icond!20<>block!20 THEN check=1
  870IF icond!24<>block!24 THEN check=1
  880IF block!28=-2 THEN check=1
  890IF tool28<>-1 THEN check=1
  900IF check=1 THEN SYS "Wimp_OpenWindow",,block:PROCpane
  910ELSE
  920SYS "Wimp_OpenWindow",,block
  930ENDIF
  940ENDPROC
  950
  960DEFPROCrequest3
  970CASE !block OF
  980WHEN main%:
  990SYS "Wimp_CloseWindow",,block
 1000!block=toolbox%:SYS "Wimp_CloseWindow",,block:!block=bar%:SYS"Wimp_CloseWindow",,block
 1010!block=tinfo%:SYS "Wimp_CloseWindow",,block:!block=iinfo%:SYS "Wimp_CloseWindow",,block
 1020!block=found%:SYS "Wimp_CloseWindow",,block:!block=find%:SYS "Wimp_CloseWindow",,block
 1030!block=notfnd%:SYS "Wimp_CloseWindow",,block
 1040WHEN saved%:IFprequit THEN prequit=FALSE
 1050WHEN toolbox%:toolson=FALSE:SYS "Wimp_CloseWindow",,block
 1060OTHERWISE :SYS "Wimp_CloseWindow",,block
 1070ENDCASE
 1080ENDPROC
 1090
 1100DEFFNicon
 1110!icond=-1
 1120icond!4=0
 1130icond!8=0:icond!12=68:icond!16=68
 1140icond!20=%11010+((2^12)*3):icond?23=112
 1150$(icond+24)="!DiskTree"+CHR$13
 1160SYS "Wimp_CreateIcon",,icond TO icon
 1170=icon
 1180
 1190DEFFNinf(handle,icon)
 1200PROCgee(handle,icon)
 1210=icond!28
 1220
 1230DEFFNbit(a$)
 1240WHILE INSTR(a$,":")>0
 1250a$=MID$(a$,INSTR(a$,":")+1)
 1260ENDWHILE
 1270WHILE INSTR(a$,".")>0
 1280a$=MID$(a$,INSTR(a$,".")+1)
 1290ENDWHILE
 1300=a$
 1310
 1320DEFFNwool(wool%)
 1330LOCAL cot$
 1340 WHILE ?wool%>=32
 1350cot$+=CHR$(?wool%)
 1360wool%+=1
 1370ENDWHILE
 1380=cot$
 1390
 1400DEFFNgetleaf(leaf$)
 1410WHILE INSTR(leaf$,".")
 1420leaf$=MID$(leaf$,INSTR(leaf$,".")+1)
 1430ENDWHILE:=leaf$
 1440
 1450DEFFNgetdiskname(path$)
 1460REPEAT
 1470path$=RIGHT$(path$,LEN(path$)-1)
 1480UNTIL LEFT$(path$,1)=":"
 1490=RIGHT$(path$,LEN(path$)-1)
 1500
 1510DEFFNcheckit(hnd%,ic%)
 1520!icond=hnd%:icond!4=ic%
 1530SYS"Wimp_GetIconState",,icond
 1540flags%=icond!24
 1550=flags%AND&F0000
 1560
 1570DEFFNask(fn$)
 1580!icond=0:$(icond+4)=fn$+CHR$0
 1590SYS"Wimp_ReportError",icond,&13,"!DiskTree" TO ,but
 1600=but
 1610
 1620DEFFNfulls(string$,len)
 1630IF LEN(string$)<len THEN
 1640REPEAT
 1650string$=string$+CHR$0
 1660UNTIL LEN(string$)=len
 1670ENDIF
 1680=string$
 1690
 1700DEFFNlongs(string$,len)
 1710IF LEN(string$)<len THEN
 1720REPEAT
 1730string$="0"+string$
 1740UNTIL LEN(string$)=len
 1750ENDIF
 1760=string$
 1770
 1780DEFFNcheckflag(handle,icon,flag)
 1790bit=FALSE
 1800!icond=handle:icond!4=icon
 1810SYS"Wimp_GetIconState",,icond
 1820IF (icond!24AND(1<<flag))>0 bit=TRUE
 1830=bit
 1840
 1850DEFFNcaps(up$)
 1860FOR L=1 TO LEN(up$)
 1870MID$(up$,L,1)=CHR$(ASC(MID$(up$,L,1)) AND &DF)
 1880NEXT
 1890=up$
 1900
 1910DEFPROCtemplate
 1920SYS"Wimp_OpenTemplate",,"<DTree$Dir>.Templates"
 1930indir=curbuf%
 1940info%=FNtemplate("ProgInfo")
 1950save%=FNtemplate("save")
 1960saved%=FNtemplate("savetext")
 1970main%=FNtemplate("tree")
 1980toolbox%=FNtemplate("tools")
 1990query%=FNtemplate("query")
 2000quit%=FNtemplate("quitbox")
 2010bar%=FNtemplate("bar")
 2020new%=FNtemplate("new")
 2030find%=FNtemplate("Find")
 2040found%=FNtemplate("found")
 2050notfnd%=FNtemplate("notfnd")
 2060iinfo%=FNtemplate("info")
 2070finfo%=FNtemplate("finfo")
 2080tinfo%=FNtemplate("tinfo")
 2090SYS "Wimp_CloseTemplate"
 2100stex=FNinfo(save%,1)
 2110stexd=FNinfo(saved%,1)
 2120ENDPROC
 2130
 2140DEFFNtemplate(a$)
 2150SYS"Wimp_LoadTemplate",,block,indir,endbuf%,-1,a$,0 TO ,,indir,,,,c%
 2160IF c%=0 THEN PROCmess("Template "+a$+" not found."):END
 2170block!64=1
 2180SYS"Wimp_CreateWindow",,block TO handle
 2190=handle
 2200
 2210DEFFNinfo(handle,icon)
 2220PROCgee(handle,icon)
 2230=icond!28
 2240
 2250DEFPROCinfo(handle,icon,text$)
 2260!block=handle:block!4=icon:SYS"Wimp_GetIconState",,block
 2270$(block!28)=text$:block!36=LEN(text$)+1
 2280block!8=0:block!12=0
 2290SYS"Wimp_SetIconState",,block
 2300ENDPROC
 2310
 2320DEFPROCgee(handle,icon)
 2330!icond=handle:icond!4=icon
 2340SYS"Wimp_GetIconState",,icond
 2350ENDPROC
 2360
 2370DEFPROCseticstate(handle%,ic%,clear,eor):REM as in PRM (CE)
 2380!block=handle%:block!4=ic%:block!8=eor:block!12=clear
 2390SYS"Wimp_SetIconState",,block
 2400ENDPROC
 2410
 2420DEFPROCcmenus
 2430tmopt=-1
 2440menuopen=-44
 2450menuptr=menu%
 2460MOUSE x,y,b
 2470trees%=FNmenu("Trees",174,"No Trees")
 2480IF ct>-1 THEN PROCtreemens
 2490IF toolson THEN toolon$="{�}Tools":ELSE toolon$="Tools"
 2500SaveMenu%=FNmenu("Save",5*16,"{b|save%}Text,{b|saved%}Data")
 2510misc%=FNmenu("Misc",5*16,"{b|info%}Info,{b|finfo%}File")
 2520iconmenu%=FNmenu("!DiskTree",9*16,"{b|misc%}Misc,Tree,New Tree,{b|SaveMenu%}Save,Quit")
 2530mainmenu%=FNmenu("!DiskTree",10*16,"{b|misc%}Misc,{b|trees%}Trees,{b|tinfo%}Tree Info,{b|find%}Find,"+toolon$+",New Tree,{b|SaveMenu%}Save,Quit")
 2540rmen=block!12:ricon=block!16
 2550IF block!12=-2 THEN openmenu%=iconmenu%:a=x-75:b=(5+2)*48:REM No. of items+2*48
 2560IF block!12=main% THEN a=x:b=y:openmenu%=mainmenu%
 2570IF block!12=toolbox% AND block!16=0 THEN tmopt=0:openmenu%=trees%:a=x:b=y
 2580IF block!12=toolbox% AND block!16=1 THEN tmopt=1:openmenu%=trees%:a=x:b=y
 2590IF block!12=toolbox% AND block!16=2 THEN tmopt=2:openmenu%=trees%:a=x:b=y
 2600PROCseticstate(save%,3,1<<21,0<<21):PROCseticstate(save%,4,1<<21,0<<21)
 2610PROCseticstate(saved%,3,1<<21,0<<21)
 2620PROCinfo(save%,1,"TextFile")
 2630ENDIF
 2640PROCopenmenu(a,b)
 2650ENDPROC
 2660
 2670DEFPROCtreemens
 2680IF block!12<>toolbox% THEN ENDPROC
 2690CASE block!16 OF
 2700WHEN 0,2:
 2710 j=0
 2720 IF block!16=2 THEN $(longdata+(j*13))="�Clear All": j+=1
 2730 FOR m=0 TO ct
 2740 tick$=""
 2750 IF m=st THEN tick$="�"
 2760 nextit$=FNgetleaf(troot$(m))
 2770 IF nextit$="$" THEN nextit$=FNgetdiskname(LEFT$(troot$(m),LEN(troot$(m))-2))
 2780 $(longdata+(j*13))=tick$+nextit$
 2790 j+=1
 2800 NEXT m
 2810 trees%=FNlongmenu("Trees",11*16,j-1,longdata)
 2820WHEN 1:
 2830 IF NOT arclisted THEN PROCmakearclist:arclisted=TRUE
 2840 IF arcct=-1 THEN
 2850  treemen$="No Archives"
 2860  trees%=FNmenu("Trees",11*16,treemen$)
 2870 ELSE
 2880  FOR m=0 TO arcct
 2890  arcy$=arc$(m)
 2900  name$=LEFT$(arcy$,INSTR(arcy$,",")-1)
 2910  $(longdata+(m*13))=name$
 2920  NEXT
 2930  trees%=FNlongmenu("Trees",11*16,arcct,longdata)
 2940 ENDIF
 2950ENDCASE
 2960ENDPROC
 2970
 2980DEFPROCopenmenu(x,y)
 2990SYS"Wimp_CreateMenu",,openmenu%,x,y
 3000ENDPROC
 3010
 3020DEFFNmenu(tit$,wid,menu$)
 3030menu$+=","
 3040oldmenu=menuptr
 3050$menuptr=tit$
 3060menuptr?12=7
 3070menuptr?13=2
 3080menuptr?14=7
 3090menuptr?15=0
 3100menuptr!16=wid
 3110menuptr!20=48
 3120menuptr!24=0
 3130menuptr+=28
 3140REPEAT
 3150PROCthing(menu$)
 3160menu$=MID$(menu$,INSTR(menu$,",")+1)
 3170menuptr+=24
 3180UNTIL menu$=""
 3190menuptr!-24=(menuptr!-24) OR %10000000
 3200=oldmenu
 3210
 3220DEFFNlongmenu(tit$,wid,number,longdata)
 3230$longmen=tit$
 3240longmen?12=7
 3250longmen?13=2
 3260longmen?14=7
 3270longmen?15=0
 3280longmen!16=wid
 3290longmen!20=48
 3300longmen!24=0
 3310FOR i=0 TO number
 3320ptr=(24*i)+28
 3330longmen!(ptr)=0
 3340longmen!(ptr+4)=-1
 3350longmen!(ptr+8)=&07000001
 3360data$=$(longdata+(i*13))
 3370IF LEFT$(data$,1)="�" THEN longmen!(ptr)=longmen!(ptr) OR %10:data$=RIGHT$(data$,LEN(data$)-1)
 3380IF LEFT$(data$,1)="�" THEN longmen!(ptr)=longmen!(ptr) OR %1:data$=RIGHT$(data$,LEN(data$)-1)
 3390$(longmen+(ptr+12))=data$
 3400NEXT
 3410longmen!(ptr)=longmen!(ptr) OR %10000000
 3420=longmen
 3430
 3440DEFPROCthing(m$)
 3450m$=LEFT$(m$,INSTR(m$,",")-1)
 3460i$="":j$=""
 3470IF INSTR(m$,"{")>0 THEN
 3480i$=LEFT$(m$,INSTR(m$,"}")-1)
 3490m$=MID$(m$,INSTR(m$,"}")+1)
 3500j$=LEFT$(i$,INSTR(i$,"|")-1)
 3510i$=MID$(i$,INSTR(i$,"|")+1)
 3520ENDIF
 3530ijack=&07000021
 3540mjack=0
 3550submenu=-1
 3560IF INSTR(j$,"b")>0 THEN submenu=EVAL(i$)
 3570IF INSTR(j$,"_")>0 THEN mjack=mjack OR 2
 3580IF INSTR(j$,"�")>0 THEN mjack=mjack OR 1
 3590IF INSTR(j$,"u")>0 THEN mjack=mjack OR 2:submenu=EVAL(i$)
 3600!menuptr=mjack
 3610menuptr!4=submenu
 3620menuptr!8=ijack
 3630$(menuptr+12)=m$
 3640ENDIF
 3650ENDPROC
 3660
 3670DEFPROCclick(block)
 3680keepb%=block!12
 3690IF FNcheckit(block!12,block!16)=983040 THEN
 3700PROCslabin(keepb%):PROCslabout(keepb%)
 3710ENDIF
 3720IF quiting THEN quitin=FALSE:PROCclose(quit%)
 3730IF block!12=-2 AND block!8=2 PROCcmenus:ENDPROC
 3740IF block!12=-2 AND block!8=4 PROCopenwin(main%):PROCpane
 3750IF block!12=-2 AND block!8=1 PROCopenwin(new%):PROCinfo(new%,1,"")
 3760IF block!12=main% AND block!8=2 PROCcmenus:ENDPROC
 3770IF block!12=save% AND block!16=2 winsave%=block!12:filetype$="file_FFF":PROCdefsave
 3780IF block!12=saved% AND block!16=2 winsave%=block!12:filetype$="file_00D":PROCdefsave
 3790IF block!12=save% AND block!16=0 winsave%=block!12:PROCsave($FNinfo(winsave%,1))
 3800IF block!12=saved% AND block!16=0 winsave%=block!12:PROCsave($FNinfo(winsave%,1))
 3810IF block!12=save% AND block!16=3 THEN PROCradiosave
 3820IF block!12=save% AND block!16=4 THEN PROCradiosave
 3830IF block!12=new% AND block!16=2 winsave%=block!12:filetype$="new":PROCdefsave
 3840IF block!12=new% AND block!16=4 THEN PROCgo
 3850IF block!12=new% AND block!16=5 THEN PROCdrive0
 3860IF block!12=main% AND block!8=4 THEN PROCselectitem
 3870IF block!12=main% AND block!8=1 THEN PROCselection
 3880IF block!12=found% AND block!16=7 THEN found=FALSE:PROCclose(found%)
 3890IF block!12=found% AND block!16=6 THEN PROCfind
 3900IF block!12=notfnd% AND block!16=3 THEN PROCclose(notfnd%)
 3910IF block!12=toolbox% AND block!16=0 THEN PROCcmenus
 3920IF block!12=toolbox% AND block!16=1 THEN PROCcmenus
 3930IF block!12=toolbox% AND block!16=2 THEN PROCcmenus
 3940IF block!12=toolbox% AND block!16=3 AND itemno<>-1 THEN PROCopenwin(iinfo%)
 3950IF block!12=toolbox% AND block!16=4 THEN PROCopenwin(new%):PROCinfo(new%,1,"")
 3960IF block!12=toolbox% AND block!16=5 THEN PROClast
 3970IF block!12=toolbox% AND block!16=6 THEN PROCnext
 3980IF block!12=toolbox% AND block!16=7 THEN PROCopenwin(find%)
 3990IF block!12=find% AND block!16=16 THEN PROCclose(find%)
 4000IF block!12=find% AND block!16=15 THEN PROCfind
 4010IF block!12=bar% AND block!16=0 THEN PROCopenwin(tinfo%)
 4020IF block!12=query% AND block!16=0 THEN PROCclose(query%):PROCendq
 4030IF prequit THEN
 4040IF block!12=quit% AND block!16=0 THEN END:SYS"Wimp_ProcessKey",&1FC:SYSreinter,mytask%:SYS"Wimp_CloseDown",task,mytask%:END:
 4050IF block!12=quit% AND block!16=2 THEN PROCclose(quit%):prequit=FALSE
 4060IF block!12=quit% AND block!16=3 THEN PROCclose(quit%):PROCopenwin(saved%):prequitwait=TRUE
 4070IF prequit AND NOT prequitwait prequit=FALSE
 4080ELSE
 4090IF block!12=quit% AND block!16=0 THEN SYSreinter,mytask%:SYS"Wimp_CloseDown",task,mytask%:END
 4100IF block!12=quit% AND block!16=2 THEN PROCclose(quit%)
 4110IF block!12=quit% AND block!16=3 THEN PROCclose(quit%):PROCopenwin(saved%):quiting=TRUE
 4120ENDIF
 4130ENDPROC
 4140
 4150DEFPROCprocess
 4160IF !block=save% AND block!24=13 THEN winsave%=!block:PROCsave($FNinfo(winsave%,1))
 4170IF !block=saved% AND block!24=13 THEN winsave%=!block:PROCsave($FNinfo(winsave%,1))
 4180SYS"Wimp_ProcessKey",block!24
 4190ENDPROC
 4200
 4210DEFPROCselect
 4220noway=0
 4230SYS"Wimp_DecodeMenu",,openmenu%,block,icond
 4240CASE openmenu% OF
 4250WHEN mainmenu%,iconmenu%:
 4260IF $icond="Quit" THEN PROCareyousure:quiting%=TRUE
 4270IF $icond="Tools" AND toolson THEN toolson=FALSE:PROCtoolbox(-1):noway=-1
 4280IF $icond="Tools" AND NOT toolson AND noway=0 THEN toolson=TRUE:PROCtoolbox(1)
 4290IF $icond="Tree" THEN PROCopenwin(main%):PROCpane
 4300IF $icond="New Tree" THEN PROCopenwin(new%):PROCinfo(new%,1,"")
 4310IF $icond="Trees.No Tree" THEN SYS"Wimp_CreateMenu",,-1:ENDPROC
 4320IF LEFT$($icond,5)="Trees" THEN PROCopentree(block!4)
 4330WHEN trees%
 4340IF $icond="Clear All" THEN PROCclearall:SYS"Wimp_CreateMenu",,-1:ENDPROC
 4350IF $icond="No Trees" THEN SYS"Wimp_CreateMenu",,-1:ENDPROC
 4360IF tmopt=0 THEN PROCopentree(!block)
 4370IF tmopt=1 THEN PROCopenarc(!block)
 4380IF tmopt=2 THEN PROCdelete((!block)-1)
 4390ENDCASE
 4400SYS"Wimp_GetPointerInfo",,block
 4410IF block!8=1 THEN
 4420IF menuopen=-44 THEN rc=1:block!16=ricon:block!12=rmen:PROCcmenus
 4430SYS"Wimp_CreateMenu",,openmenu%
 4440ELSE
 4450SYS"Wimp_CreateMenu",,-1
 4460ENDIF
 4470ENDPROC
 4480
 4490DEFPROCradiosave
 4500done=0
 4510IF block!16=3 THEN
 4520PROCseticstate(save%,4,1<<21,0<<21)
 4530PROCinfo(save%,1,"TextFile")
 4540ENDIF
 4550IF block!16=4 THEN
 4560PROCseticstate(save%,3,1<<21,0<<21)
 4570PROCinfo(save%,1,"Selection")
 4580ENDIF
 4590ENDPROC
 4600
 4610DEFPROCmess(mess$)
 4620!icond=0:$(icond+4)=mess$+CHR$0
 4630SYS"Wimp_ReportError",icond,1,"!DiskTree"
 4640ENDPROC
 4650
 4660DEFPROCout
 4670PROCdragspr(1)
 4680IF winsave%=new% THEN stext=stex:ft=&FFF
 4690IF winsave%=save% THEN stext=stex:ft=&FFF
 4700IF winsave%=saved% THEN stext=stexd:ft=&00D
 4710IF drive%=1 THEN
 4720SYS "Wimp_GetPointerInfo",,block
 4730ToX=block!0:ToY=block!4:Window=block!12:Icon=block!16
 4740mblock!0=256:mblock!12=0:mblock!16=1:REM DataSave
 4750mblock!20=Window:mblock!24=Icon:mblock!28=ToX:mblock!32=ToY
 4760mblock!36=-1:REM No idea what the size is going to be
 4770mblock!40=ft:
 4780$stext=$FNinfo(winsave%,1)
 4790$stext=FNgetleaf($stext)
 4800FOR I=0 TO 255:IF I?stext<32 THEN I?stext=13
 4810NEXT
 4820$(mblock+44)=FNbit($stext)+CHR$0
 4830IF winsave%=new% THEN $(mblock+44)="Directory"
 4840SYS "Wimp_SendMessage",17,mblock,Window,Icon:REM DataSave
 4850drag%=0
 4860ENDIF
 4870ENDPROC
 4880
 4890DEFPROCdefsave
 4900PROCMode
 4910!block=winsave%
 4920SYS "Wimp_GetWindowState",,block
 4930ysize%=block!16-block!8
 4940x%=block!4:y%=block!8:block!4=2
 4950SYS"Wimp_GetIconState",,block
 4960block!8+=x%:block!12+=y%+ysize%
 4970block!16+=x%:block!20+=y%+ysize%
 4980block!24=0:block!28=0:block!32=xmax:block!36=ymax
 4990!block=0:block!4=5:drag%=TRUE:drive%=1
 5000IF dragspr THEN
 5010SYS "DragASprite_Start",%10000101,1,filetype$,block+8
 5020PROCdragspr(-1)
 5030ELSE
 5040SYS"Wimp_DragBox",,block
 5050ENDIF
 5060ENDPROC
 5070
 5080DEFPROCMode
 5090!block=130:block!4=131:block!8=-1:SYS"OS_ReadVduVariables",block,block+128
 5100SYS"OS_ReadModeVariable",MODE,4 TO ,,Xeig%
 5110SYS"OS_ReadModeVariable",MODE,5 TO ,,Yeig%
 5120xmax=((block!128)+1)*2^Xeig%:ymax=((block!132)+1)*2^Yeig%
 5130ENDPROC
 5140
 5150DEFPROCsave(save$)
 5160IF ct=-1 THEN PROCmess("No directory tree data to save!"):ENDPROC
 5170IF INSTR(save$,".")<1 AND INSTR(save$,":")<1 AND save$<>"<Wimp$Scrap>" THEN PROCmess("To save, drag the file icon to a directory viewer."):ENDPROC
 5180LOCAL ERROR
 5190ON ERROR LOCAL IF ERR=71622:PROCquery("Disc Full"):SYS&0D,0,fh%:SYS&406C1:RESTORE ERROR:ENDPROC:ELSE RESTORE ERROR:PROCerror(REPORT$+" : at line "+STR$ERL):SYS&0D,0,fh%:SYS&406C1:ENDPROC
 5200IF winsave%=saved% THEN
 5210SYS"Hourglass_On"
 5220byte=0
 5230SYS"OS_Find",&80,save$ TO fh%
 5240endt=tblk
 5250$endt="DiskTree Data File v�"
 5260endt+=LEN("DiskTree Data File v�")
 5270SYS"OS_GBPB",2,fh%,tblk,endt-tblk
 5280IF FNcheckflag(saved%,3,21) THEN stt=st:ett=st:ELSE stt=0:ett=ct
 5290endt=tblk
 5300CT$=FNfulls(STR$(ett-stt),3)
 5310$endt=CT$
 5320endt+=3
 5330SYS"OS_GBPB",2,fh%,tblk,endt-tblk
 5340total1%=0:total2%=0
 5350FOR k=stt TO ett:total1%+=tcount(k):NEXT k
 5360FOR k=stt TO ett
 5370total2%+=1
 5380SYS"Hourglass_Percentage",total2%/total1%*100
 5390ts$=FNfulls(STR$(tsize(k)),7)
 5400tl$=FNfulls(STR$(tlen(k)),7)
 5410tc$=FNfulls(STR$(tcount(k)),7)
 5420rootl$=FNfulls(STR$(LEN(troot$(k))),3)
 5430endt=tblk
 5440$endt=ts$+tl$+tc$+rootl$
 5450endt+=24
 5460SYS"OS_GBPB",2,fh%,tblk,24
 5470endt=tblk
 5480$endt=troot$(k)
 5490endt+=LEN(troot$(k))
 5500SYS"OS_GBPB",2,fh%,tblk,LEN(troot$(k))
 5510SYS"OS_GBPB",2,fh%,tree(k),tsize(k)
 5520NEXT k
 5530SYS&0D,0,fh%
 5540SYS"OS_File",18,save$,&00D
 5550IF save$<>"<Wimp$Scrap>" AND NOT FNcheckflag(saved%,3,21) THEN
 5560!block=main%
 5570SYS"Wimp_GetWindowInfo",,block
 5580saved=FALSE
 5590$(block!76)=save$:SYS"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
 5600PROCinfo(saved%,1,save$)
 5610PROCinfo(finfo%,3,"No")
 5620ENDIF
 5630SYS"Hourglass_Smash"
 5640IF quiting SYSreinter,mytask%:SYS"Wimp_CloseDown",task,mytask%:END
 5650ENDIF
 5660IF winsave%=save% THEN
 5670SYS"Hourglass_On"
 5680SYS"OS_Find",&80,save$ TO fh%
 5690IF FNcheckflag(save%,3,21) THEN stt=st:ett=st:ELSE stt=0:ett=ct
 5700total1%=0:total2%=0
 5710FOR I=stt TO ett:total1%+=tcount(I):NEXT I
 5720FOR I=stt TO ett
 5730total2%+=1
 5740SYS"Hourglass_Percentage",total2%/total1%*100
 5750endt=tblk
 5760$endt="            "+troot$(I)+CHR$10+CHR$10
 5770endt+=LEN("            "+troot$(I))+2
 5780SYS"OS_GBPB",2,fh%,tblk,endt-tblk
 5790IF FNcheckflag(save%,4,21) AND s1>-1 THEN stt=tt:ett=tt:stptr=s1:endptr=s2:ELSE stptr=0:endptr=tcount(I)-1
 5800 FOR J=stptr TO endptr
 5810 n=J*24
 5820 t$=""
 5830  FOR h=0 TO 2
 5840  i=n+h
 5850  t$+=CHR$(tree(I)?i)
 5860  NEXT h
 5870 endt=tblk
 5880  FOR h=1 TO VAL(t$)
 5890  $endt=" "
 5900  endt+=1
 5910  NEXT h
 5920 t$=""
 5930  FOR h=3 TO 12
 5940  i=n+h
 5950  IF tree(I)?i<>0 THEN t$+=CHR$(tree(I)?i)
 5960  NEXT h
 5970 $endt=t$+CHR$10
 5980 endt+=LEN(t$)+1
 5990 SYS"OS_GBPB",2,fh%,tblk,endt-tblk
 6000 NEXT J
 6010endt=tblk
 6020$endt=CHR$10+CHR$10
 6030endt+=2
 6040SYS"OS_GBPB",2,fh%,tblk,endt-tblk
 6050NEXT I
 6060SYS&0D,0,fh%
 6070SYS"OS_File",18,save$,&FFF
 6080CASE save$ OF
 6090WHEN "<Wimp$Scrap>"
 6100OTHERWISE
 6110!block=main%
 6120SYS"Wimp_GetWindowInfo",,block
 6130saved=FALSE
 6140$(block!76)=save$:SYS"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
 6150PROCinfo(finfo%,3,"No")
 6160ENDCASE
 6170SYS"Hourglass_Smash"
 6180IF quiting SYSreinter,mytask%:SYS"Wimp_CloseDown",task,mytask%:END
 6190ENDIF
 6200RESTORE ERROR
 6210ENDPROC
 6220
 6230DEFFNgetbs(fh%,len)
 6240string$=""
 6250FOR I=1 TO len
 6260SYS"OS_BGet",,fh% TO byte
 6270string$+=CHR$(byte)
 6280NEXT
 6290=string$
 6300
 6310DEFPROCmessagein
 6320sendm=&400E7
 6330ref=block!8:task=block!4
 6340CASE block!16 OF
 6350WHEN 0:PROCend
 6360WHEN 2:
 6370save$=FNwool(block+44)
 6380PROCdragspr(1)
 6390IF winsave%=new% THEN PROCdragnew(save$)
 6400IF drive%=1 AND winsave%<>new% THEN
 6410PROCsave(save$)
 6420mblock!0=256
 6430mblock!12=ref
 6440mblock!16=3
 6450mblock!36=-1
 6460$(mblock+44)=save$
 6470SYS &400E7,18,mblock,task:REM DataLoad
 6480ENDIF
 6490WHEN 3:
 6500IF block!40=&00d THEN
 6510load$=FNwool(block+44):PROCload(load$)
 6520ENDPROC
 6530ENDIF
 6540IF block!40<>&00D THEN
 6550load$=FNwool(block+44):PROCnewtree(load$)
 6560ENDIF
 6570WHEN 5:
 6580IF block!40=&00D THEN
 6590block!12=block!8:block!16=4
 6600SYS sendm,18,block,block!4:REM DataLoadAck
 6610PROCload(FNwool(block+44))
 6620ENDIF
 6630WHEN 8:IF NOT prequit block!12=ref:SYSsendm,19,block:prequit=TRUE:PROCareyousure
 6640ENDCASE
 6650ENDPROC
 6660
 6670DEFPROCload(load$)
 6680in=TRUE
 6690IF ct=-1 THEN PROCinfo(finfo%,0,load$)
 6700SYS"OS_Find",&40,load$ TO load%
 6710Len=LEN("DiskTree Data File v�")
 6720title$=FNgetbs(load%,Len)
 6730IF title$<>"DiskTree Data File v�" THEN PROCquery("This is not a true DiskTree Data file!"):SYS&0D,0,load%:ENDPROC
 6740LOCAL ERROR
 6750ON ERROR LOCAL IF ERR=388 PROCquery("Out Of Memory "+STR$ERL):SYS&0D,0,load%:RESTORE ERROR:ENDPROC:ELSE RESTORE ERROR:PROCerror(REPORT$+" : at line "+STR$ERL):SYS&0D,0,load%:ENDPROC
 6760nof=VAL(FNgetbs(load%,3))
 6770FOR m=0 TO nof
 6780TLen=VAL(FNgetbs(load%,7))
 6790TLen%=INT(TLen/8)*8
 6800SYS"OS_Heap",1,heap% TO ,,largest,tfree
 6810IF TLen%+1024>largest THEN
 6820SYS"Wimp_SlotSize",-1,-1 TO current
 6830SYS"Wimp_SlotSize",current+(TLen%-largest)+1024,-1
 6840SYS"Wimp_SlotSize",-1,-1 TO new
 6850change=new-current
 6860SYS"OS_Heap",5,heap%,,change
 6870hsizeb+=change
 6880ENDIF
 6890ct+=1
 6900tsize(ct)=TLen
 6910tlen(ct)=VAL(FNgetbs(load%,7))
 6920tcount(ct)=VAL(FNgetbs(load%,7))
 6930rootl=VAL(FNgetbs(load%,3))
 6940troot$(ct)=FNgetbs(load%,rootl)
 6950SYS"OS_Heap",2,heap%,,TLen TO ,,tree(ct)
 6960SYS"OS_Heap",1,heap% TO ,,,tfree
 6970SYS"OS_GBPB",4,load%,tree(ct),TLen
 6980NEXT m
 6990SYS&0D,0,load%
 7000!icond=main%
 7010SYS"Wimp_GetWindowInfo",,icond
 7020saved=FALSE:$icond!76=load$:SYS"Wimp_ForceRedraw",-1,icond!4,icond!16,icond!12,icond!16+36
 7030SYS"Wimp_CloseWindow",,icond
 7040$FNinfo(saved%,1)=load$
 7050st=ct
 7060PROCnewview:PROCopenwin(main%):PROCpane
 7070PROCinfo(finfo%,1,STR$(ct+1))
 7080PROCinfo(finfo%,2,STR$(hsizeb-tfree))
 7090arclisted=FALSE
 7100RESTORE ERROR
 7110ENDPROC
 7120
 7130DEFPROCopenwin(handle%)
 7140IF handle%=main% AND ct=-1 THEN PROCquery("No directory trees in memory!"):ENDPROC
 7150!block=handle%
 7160SYS"Wimp_GetWindowInfo",,block
 7170open=block!32 AND (1<<16)
 7180front=block!32 AND (1<<17)
 7190IF handle%=main% AND width>-1 THEN block!12=block!4+width:block!8=block!16-depth:width=-1
 7200IF open=0 THEN
 7210SYS"Wimp_OpenWindow",,block
 7220ENDIF
 7230IF front=0 THEN
 7240block!28=-1:SYS"Wimp_OpenWindow",,block
 7250ENDIF
 7260ENDPROC
 7270
 7280DEF PROCslabin(handle)
 7290!icond=handle
 7300SYS "Wimp_GetPointerInfo",,icond
 7310SYS "Wimp_BorderIcon",,icond
 7320ENDPROC
 7330
 7340DEF PROCslabout(handle)
 7350!icond=handle
 7360SYS "Wimp_GetPointerInfo",,icond
 7370icond!8=0
 7380SYS "Wimp_BorderIcon",,icond
 7390ENDPROC
 7400
 7410DEFPROCredraw(handle)
 7420setex=FALSE
 7430!block=handle
 7440LOCALmore%
 7450SYS "Wimp_RedrawWindow",,block TO more%
 7460WHILE more%
 7470 CASE handle OF
 7480 WHEN main%
 7490 PROCapplication_redraw
 7500 OTHERWISE
 7510 SYS"Wimp_BorderWindow",,block
 7520 ENDCASE
 7530 SYS "Wimp_GetRectangle",,block TO more%
 7540 ENDWHILE
 7550ENDPROC
 7560
 7570DEFPROCapplication_redraw
 7580workx%=block!4-block!20
 7590worky%=block!16-block!24
 7600max=block!32-worky%
 7610min=block!40-worky%
 7620max=(max+46)DIV36*-1
 7630min=(min+46)DIV36*-1
 7640IF max>tcount(st)-1 THEN max=tcount(st)-1
 7650IF ct=-1 THEN ENDPROC
 7660tx=workx%:ty=worky%-46-(min*36)
 7670g=&400E6
 7680n=min*24
 7690FOR I=min TO max
 7700 SYSg,7
 7710 t$=""
 7720   FOR h=0 TO 2
 7730   i=n+h
 7740   t$+=CHR$(tree(st)?i)
 7750   NEXT h
 7760 len=VAL(t$)-1
 7770 IF len=-1 THEN len=0
 7780 t$=""
 7790   FOR h=3 TO 12
 7800   i=n+h
 7810   t$+=CHR$(tree(st)?i)
 7820   NEXT h
 7830 IF itemno=I THEN SYSg,9:RECTANGLE FILL workx%+0,worky%-0-(I*36+46),tlen(st)*16,-30:SYSg,7
 7840 IF I>=s1 AND I<=s2-1 THEN SYSg,7:RECTANGLE FILL workx%+0,worky%-0-(I*36+46),tlen(st)*16,-34:SYSg,0
 7850 IF I=s2 THEN SYSg,7:RECTANGLE FILL workx%+0,worky%-0-(I*36+46),tlen(st)*16,-30:SYSg,0
 7860 IF tree(st)?(i+1)=138 THEN SYSg,8
 7870 MOVE tx,ty
 7880 PRINT TAB(len)t$
 7890 ty-=36
 7900 n+=24
 7910NEXT I
 7920tyy=worky%-ty-40
 7930ENDPROC
 7940
 7950DEFPROCpane
 7960IF ct=-1 THEN ENDPROC
 7970bar1=block!4:bar2=block!8:bar3=block!12:bar4=block!16
 7980bar5=block!52:bar6=block!20
 7990IF toolson THEN PROCall:ELSE PROCbaronly
 8000!block=found%:SYS"Wimp_GetWindowInfo",,block
 8010open=block!32 AND (1<<16)
 8020IF open THEN PROCopenwin(found%)
 8030ENDPROC
 8040
 8050DEFPROCbaronly
 8060front=block!28
 8070!icond=bar%:SYS"Wimp_GetWindowInfo",,icond
 8080icond!4=bar1:icond!8=bar2:icond!12=bar3:icond!16=bar4
 8090icond!20=bar6
 8100icond!28=front:SYS"Wimp_OpenWindow",,icond
 8110block!28=bar%:SYS"Wimp_OpenWindow",,block
 8120ENDPROC
 8130
 8140DEFPROCall
 8150front=block!28
 8160x1=block!4-94:x2=x1+248:y1=block!8:y2=block!16
 8170size=x2-x1
 8180!icond=toolbox%:SYS"Wimp_GetWindowInfo",,icond
 8190IF x1<0 THEN x1=0:x2=size
 8200icond!4=x1:icond!8=y2-570:icond!12=x2:icond!16=y2
 8210icond!28=front:SYS"Wimp_OpenWindow",,icond
 8220ENDIF
 8230!icond=bar%:SYS"Wimp_GetWindowInfo",,icond
 8240icond!4=bar1:icond!8=bar2:icond!12=bar3:icond!16=bar4
 8250icond!20=bar6
 8260icond!28=toolbox%:SYS"Wimp_OpenWindow",,icond
 8270block!28=bar%:SYS"Wimp_OpenWindow",,block
 8280ENDPROC
 8290
 8300DEFPROCadjustwin(newxmax,newymin)
 8310!icond=bar%:SYS"Wimp_GetWindowInfo",,icond
 8320icond!52=newxmax
 8330SYS"Wimp_SetExtent",bar%,icond+44
 8340!icond=main%:SYS"Wimp_GetWindowInfo",,icond
 8350icond!48=newymin:icond!52=newxmax
 8360SYS"Wimp_SetExtent",main%,icond+44
 8370!icond=bar%:icond!4=0:SYS"Wimp_GetIconState",,icond
 8380SYS"Wimp_DeleteIcon",,icond
 8390icond=icond+4:icond!12=newxmax+2:!icond=bar%
 8400SYS"Wimp_CreateIcon",0,icond TO ic%
 8410ENDPROC
 8420
 8430DEFPROCtoolbox(flag)
 8440IF flag=-1 THEN !block=toolbox%:SYS"Wimp_CloseWindow",,block
 8450IF flag=1 THEN
 8460!block=main%
 8470SYS"Wimp_GetWindowState",,block
 8480open=block!32 AND (1<<16)
 8490IF open<>0 THEN !icond=main%:PROCpane
 8500ENDIF
 8510ENDPROC
 8520
 8530DEFPROCerror(err$)
 8540!icond=0:$(icond+4)=err$+"."+" Press OK to continue or Cancel to quit"+CHR$0
 8550SYS"Wimp_ReportError",icond,3,"!DiskTree" TO ,but
 8560IF but=2 THEN SYSreinter,mytask%:SYS"Wimp_CloseDown",task,mytask%:END
 8570ENDPROC
 8580
 8590DEFPROCareyousure
 8600IF saved THEN
 8610PROCopenwin(quit%)
 8620VDU 7
 8630PROCinfo(quit%,1,"Your file has been modified.")
 8640!block=130:block!4=131:block!8=-1:SYS"OS_ReadVduVariables",block,block+128
 8650SYS"OS_ReadModeVariable",MODE,4 TO ,,x
 8660SYS"OS_ReadModeVariable",MODE,5 TO ,,y
 8670MOUSE RECTANGLE 0,0,(((block!128)+1)*2^x)-1,((block!132)+1)*2^y
 8680ENDIF
 8690IF NOT saved SYSreinter,mytask%:SYS"Wimp_CloseDown",task,mytask%:END
 8700ENDPROC
 8710
 8720DEFPROCquery(qu$)
 8730PROCopenwin(query%)
 8740VDU 7
 8750!block=query%
 8760SYS"Wimp_GetWindowInfo",,block
 8770workx%=block!12-block!4
 8780worky%=block!16-block!8
 8790MOUSE RECTANGLE block!4,block!8,workx%,worky%
 8800PROCinfo(query%,1,qu$)
 8810ENDPROC
 8820
 8830DEFPROCendq
 8840PROCclose(query%)
 8850!block=130:block!4=131:block!8=-1:SYS"OS_ReadVduVariables",block,block+128
 8860SYS"OS_ReadModeVariable",MODE,4 TO ,,x
 8870SYS"OS_ReadModeVariable",MODE,5 TO ,,y
 8880MOUSE RECTANGLE 0,0,(((block!128)+1)*2^x)-1,((block!132)+1)*2^y
 8890ENDPROC
 8900
 8910DEFPROCclose(!block)
 8920SYS"Wimp_CloseWindow",,block
 8930ENDPROC
 8940
 8950DEFPROCdragspr(flag)
 8960IF dragspr THEN
 8970CASE flag OF
 8980WHEN 1:
 8990!block=winsave%:block!4=2:SYS "Wimp_GetIconState",,block
 9000block!8=0:block!12=0:$(block!32)=dindir$
 9010SYS "Wimp_SetIconState",,block
 9020SYS "DragASprite_Stop"
 9030WHEN -1:
 9040!block=winsave%:block!4=2:SYS "Wimp_GetIconState",,block
 9050dindir$=$(block!32)
 9060block!8=0:block!12=0:$(block!32)=CHR$13
 9070SYS "Wimp_SetIconState",,block
 9080ENDCASE
 9090ENDIF
 9100ENDPROC
 9110
 9120DEFPROCnewtree(file$)
 9130IF block!40=4096 OR block!40=8192 THEN
 9140path$=file$+"."
 9150PROCinfo(new%,1,path$)
 9160PROCopenwin(new%)
 9170ENDPROC
 9180ENDIF
 9190path$=FNgetleaf(file$)
 9200path$=LEFT$(file$,LEN(file$)-LEN(path$))
 9210PROCinfo(new%,1,path$)
 9220ENDPROC
 9230
 9240DEFPROCdragnew(path$)
 9250block!40=4096:path$=LEFT$(path$,LEN(path$)-10)
 9260PROCnewtree(path$)
 9270ENDPROC
 9280
 9290DEFPROCdrive0
 9300SYS"OS_FSControl",37,"ADFS::0.$",tblk,0,0,1024 TO ,,,,,tlen
 9310PROCinfo(new%,1,LEFT$($tblk,1024-tlen)+".")
 9320ENDPROC
 9330
 9340DEFPROCgo
 9350IF ct=maxno THEN PROCmess("There is no me free trees available in this file"):ENDPROC
 9360arcx=0:prearcx=-1:arcs=FALSE:apps=FALSE
 9370arcs=NOT FNcheckflag(new%,0,21)
 9380apps=NOT FNcheckflag(new%,3,21)
 9390root$=$FNinfo(new%,1)
 9400IF root$="" THEN PROCmess("You have not entered a path to catalogue"):ENDPROC
 9410root$=LEFT$(root$,LEN(root$)-1)
 9420SYS"OS_File",20,root$ TO type
 9430IF type<>2 THEN PROCmess("The path to catalogue has not been found"):ENDPROC
 9440CASE arcs OF
 9450WHEN TRUE:
 9460$tblk="ArcFS"
 9470SYS"XOS_Module",18,tblk TO r0
 9480IF r0<>18 THEN
 9490IF FNask("ArcFS not present. Only able to create trees of archives if ArcFS is present. Continue without archives?")=1 THEN arcs=FALSE:ELSE PROCclose(new%):ENDPROC
 9500ENDIF
 9510ENDCASE
 9520SYS"XOS_File",13,root$ TO type
 9530IF type<2 AND type>3  THEN PROCquery("Path to create tree from is not a directory/does not exist."):ENDPROC
 9540endlisty=0:nlen=0:stop=FALSE
 9550botLED=%10:totsize=0
 9560count=0
 9570ct+=1
 9580SYS"Hourglass_On"
 9590SYS"OS_Heap",1,heap% TO ,,membuf,tfree
 9600membuf=membuf-1024
 9610IF membuf<1024 THEN
 9620SYS"Wimp_SlotSize",-1,-1 TO current
 9630SYS"Wimp_SlotSize",current+(8*1024),-1
 9640SYS"Wimp_SlotSize",-1,-1 TO new
 9650change=new-current
 9660SYS"OS_Heap",5,heap%,,change
 9670hsizeb+=change
 9680membuf+=change
 9690ENDIF
 9700SYS"OS_Heap",2,heap%,,membuf TO ,,tree(ct)
 9710object=0
 9720endtext%=tree(ct)
 9730dir$=""
 9740x=0
 9750lastdir(0)=0
 9760start=TIME
 9770REPEAT
 9780object=lastdir(x)
 9790PROCgotree
 9800IF stop THEN ENDPROC
 9810IF endlisty=1 THEN ENDPROC
 9820REPEAT
 9830dir$=LEFT$(dir$,(LENdir$)-1)
 9840UNTIL MID$(dir$,LENdir$)="."
 9850dir$=LEFT$(dir$,(LENdir$)-1)
 9860UNTIL FALSE
 9870ENDPROC
 9880
 9890DEFPROCgotree
 9900REPEAT
 9910SYS"OS_GBPB",10,root$+dir$,buffer,1,object,63 TO ,,,reader,last
 9920IF last<>-1 THEN
 9930file$=""
 9940buff=20
 9950REPEAT
 9960file$+=CHR$buffer?buff
 9970buff+=1
 9980UNTILbuffer?buff=0
 9990IF LEFT$(file$,1)=CHR$0 file$=RIGHT$(file$,LENfile$-1)
10000length=buffer!8
10010type=buffer!16
10020SYS"OS_File",20,root$+dir$+"."+file$ TO type,,,,,,filetype
10030IF filetype=4096 OR filetype=8192 AND length=-1 THEN length=2048
10040IF type=2 ext$="�" ELSE ext$=CHR$0
10050IF filetype=4096 AND type=3 THEN filet$="DDC":filetype=&DDC
10060IF arcs AND filetype=&DDC ext$="�"
10070nlent=LEN(dir$+file$)-x+1+arcx
10080IF nlent>nlen THEN nlen=nlent
10090predicted=endtext%-tree(ct)
10100IF predicted>membuf-1024 THEN PROCmem
10110IF stop THEN ENDPROC
10120fi$=FNfulls(file$,10)
10130di$=FNfulls(STR$((LENdir$)-x+arcx+1),3)
10140leng$=FNfulls(STR$length,7)
10150filet$=STR$~filetype
10160IF filetype=4096 THEN filet$="DIR"
10170IF filetype=8192 THEN filet$="APP"
10180IF LEN(filet$)<3 THEN REPEAT:filet$="0"+filet$:UNTIL LEN(filet$)=3
10190$endtext%=di$+fi$+ext$+leng$+filet$
10200endtext%+=24
10210totsize+=length
10220object+=1
10230count+=1
10240IF botLED=%01 THEN botLED=%10 ELSE botLED=%01
10250SYS"Hourglass_LEDs",%11,botLED
10260IF arcs AND filetype=&DDC THEN
10270prearcroot$=root$:prearcdir$=dir$:prearclast=object:lastdir(x)=object:prearcx=x:x+=1
10280OSCLI("OpenArchive "+root$+dir$+"."+file$)
10290root$="ArcFS#"+file$+":$":arcname$=file$:object=0:arcx=LEN(dir$+file$)+1:dir$=""
10300arcct+=1:arc$(arcct)=file$+","+STR$count+","+STR$ct
10310ENDIF
10320IF filetype=4096 dir$=dir$+"."+file$:lastdir(x)=object:x+=1:object=0
10330IF filetype=8192 AND apps dir$=dir$+"."+file$:lastdir(x)=object:x+=1:object=0
10340ENDIF
10350UNTIL reader=0
10360x-=1
10370IF x=-1 AND prearcx=-1 PROCendoflist
10380IF x=prearcx AND prearcx>-1 THEN x=prearcx:root$=prearcroot$:dir$=prearcdir$:object=prearclast:lastdir(x)=object:prearcx=-1:arcx=0:OSCLI("CloseArchive "+arcname$):PROCgotree
10390IF endlisty=1 THEN ENDPROC
10400ENDPROC
10410
10420DEFPROCendoflist
10430finish=TIME-start
10440$endtext%=CHR$17+STR$totsize+CHR$18+STR$finish+CHR$255
10450endtext%+=LEN(STR$totsize+STR$finish)+3
10460tsize(ct)=endtext%-tree(ct)
10470tcount(ct)=count:tlen(ct)=nlen:st=ct:troot$(ct)=root$
10480SYS"OS_Heap",6,heap%,tree(ct) TO ,,,curb
10490SYS"OS_Heap",4,heap%,tree(ct),(tsize(ct)-curb)+8 TO ,,tree(ct)
10500SYS"Hourglass_Smash"
10510endlisty=1
10520!block=new%:SYS"Wimp_CloseWindow",,block
10530!block=tinfo%:SYS"Wimp_CloseWindow",,block
10540!block=finfo%:SYS"Wimp_CloseWindow",,block
10550!block=iinfo%:SYS"Wimp_CloseWindow",,block
10560PROCinfo(finfo%,1,STR$(ct+1))
10570PROCinfo(finfo%,2,STR$(hsizeb-tfree))
10580IF $FNinfo(finfo%,0)="None" THEN PROCinfo(finfo%,0,"<Untitled>")
10590IF saved=FALSE THEN
10600saved=TRUE
10610!icond=main%
10620SYS"Wimp_GetWindowInfo",,icond
10630$(icond!76)=$(icond!76)+" *"
10640SYS"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
10650PROCinfo(finfo%,3,"Yes")
10660ENDIF
10670!block=main%:SYS"Wimp_CloseWindow",,block
10680PROCnewview:PROCopenwin(main%):PROCpane
10690ENDPROC
10700
10710DEFPROCmem
10720SYS"OS_Heap",6,heap%,tree(ct) TO ,,,ohs
10730SYS"OS_ReadMemMapInfo" TO page
10740SYS"Wimp_SlotSize",-1,-1 TO current
10750SYS"Wimp_SlotSize",current+page,-1
10760SYS"Wimp_SlotSize",-1,-1 TO new
10770change=new-current
10780IF change=0 THEN PROCquery("Out Of Memory. Free more memory and try again."):ct-=1:SYS&1D,3,heap%,tree(ct):stop=TRUE:SYS"Hourglass_Smash":ENDPROC
10790SYS"OS_Heap",5,heap%,,change
10800SYS"OS_Heap",4,heap%,tree(ct),change TO ,,tree(ct)
10810SYS"OS_Heap",6,heap%,tree(ct) TO ,,,nhs
10820hsizeb+=change
10830membuf+=nhs-ohs
10840ENDPROC
10850
10860DEFPROCmakearclist
10870FOR j=0 TO maxno: arc$(j)="": NEXT
10880aind=0
10890FOR j=0 TO ct
10900 FOR count=0 TO tcount(j)
10910 index=count*24
10920 type$=""
10930  FOR h=21 TO 23
10940  type$+=CHR$(tree(j)?(index+h))
10950  NEXT
10960 IF type$="DDC" THEN
10970  t$=""
10980  FOR h=3 TO 12
10990  val=tree(j)?(index+h)
11000  IF val<>0 THEN t$+=CHR$val
11010  NEXT
11020  IF aind<maxno THEN arc$(aind)=t$+","+STR$(count+1)+","+STR$(j):aind+=1
11030  ENDIF
11040 NEXT count
11050NEXT j
11060arcct=aind-1
11070ENDPROC
11080
11090DEFPROClast
11100IF st=0 THEN ENDPROC
11110st-=1
11120!block=main%:SYS"Wimp_CloseWindow",,block
11130PROCnewview
11140PROCopenwin(main%)
11150PROCclose(find%)
11160PROCclose(iinfo%)
11170PROCclose(tinfo%)
11180PROCclose(notfnd%)
11190PROCclose(found%)
11200PROCpane
11210ENDPROC
11220
11230DEFPROCnext
11240IF st=ct THEN ENDPROC
11250st+=1
11260!block=main%:SYS"Wimp_CloseWindow",,block
11270PROCnewview
11280PROCopenwin(main%)
11290PROCclose(find%)
11300PROCclose(iinfo%)
11310PROCclose(tinfo%)
11320PROCclose(notfnd%)
11330PROCclose(found%)
11340PROCpane
11350ENDPROC
11360
11370DEFPROCnewview
11380IF ct=-1 THEN ENDPROC
11390PROCinfo(bar%,0,troot$(st))
11400tptr=tcount(st)*24+1
11410sizeb$=""
11420REPEAT
11430sizeb$=sizeb$+CHR$(tree(st)?tptr)
11440tptr+=1
11450UNTIL tree(st)?tptr=18
11460tptr+=1
11470finishs$=""
11480REPEAT
11490finishs$=finishs$+CHR$(tree(st)?tptr)
11500tptr+=1
11510UNTIL tree(st)?tptr=255
11520PROCinfo(tinfo%,0,troot$(st))
11530PROCinfo(tinfo%,1,STR$tcount(st))
11540PROCinfo(tinfo%,2,STR$tsize(st))
11550PROCinfo(tinfo%,3,sizeb$)
11560PROCinfo(tinfo%,7,finishs$)
11570xalt=tlen(st)*16:yalt=0-(tcount(st)*36+40)
11580PROCadjustwin(xalt,yalt)
11590itemno=-1
11600PROCseticstate(find%,4,1<<22,1<<22)
11610depth=568
11620IF tcount(st)*36+40<depth THEN depth=tcount(st)*36+40
11630width=tlen(st)*16
11640IF width>500 THEN width=500
11650ENDPROC
11660
11670DEFPROCselectitem
11680olditemno=itemno
11690ycoord=block!4
11700!block=main%:SYS"Wimp_GetWindowInfo",,block
11710workx%=block!4-block!20
11720worky%=block!16-block!24
11730ycoord=0-(block!16-ycoord)
11740ycoord=ycoord+block!24
11750itemno=INT((ycoord-40)/36)*-1-3
11760itemst=st
11770IF olditemno=itemno THEN ENDPROC
11780ycoord=0-(itemno*36+44)
11790SYS"Wimp_ForceRedraw",main%,1,ycoord-32,tlen(st)*16,ycoord
11800ycoord=0-(olditemno*36+44)
11810SYS"Wimp_ForceRedraw",main%,1,ycoord-32,tlen(st)*16,ycoord
11820PROCputinfo(itemno)
11830PROCseticstate(find%,4,1<<22,0<<22)
11840ENDPROC
11850
11860DEFPROCputinfo(itemno)
11870n=itemno*24
11880t$=""
11890FOR h=3 TO 12:i=n+h:t$+=CHR$(tree(st)?i):NEXT h
11900PROCinfo(iinfo%,0,troot$(st)+"..."+t$)
11910t$=""
11920FOR h=14 TO 20:i=n+h:t$+=CHR$(tree(st)?i):NEXT h
11930PROCinfo(iinfo%,4,t$)
11940t$=""
11950FOR h=21 TO 23:i=n+h:t$+=CHR$(tree(st)?i):NEXT h
11960te$="&"+t$+"     ("+t$+")"
11970tblk=tt
11980SYS"XOS_FSControl",18,,FNhextodec(t$) TO r0,,r2%,r3%
11990IF r0=18 THEN
12000tblk!0=r2%:tblk!4=r3%:tblk?8=13:type$=$tblk
12010te$=type$+" ("+t$+")"
12020ENDIF
12030st$="sfile_"+t$
12040IF t$="APP" THEN te$="Application   ":st$="sapp"
12050IF t$="DIR" THEN te$="Directory     ":st$="sdir"
12060PROCindir(iinfo%,1,"","b0;"+st$)
12070PROCinfo(iinfo%,3,te$)
12080ENDPROC
12090
12100DEFPROCselection
12110olds1=s1:olds2=s2:olditem=ss
12120ycoord=block!4
12130!block=main%:SYS"Wimp_GetWindowInfo",,block
12140workx%=block!4-block!20
12150worky%=block!16-block!24
12160ycoord=0-(block!16-ycoord)
12170ycoord=ycoord+block!24
12180ss=INT((ycoord-40)/36)*-1-3
12190PROCseticstate(save%,4,1<<22,1<<22):PROCseticstate(save%,4,1<<21,0<<21)
12200IF olditem=ss THEN
12210s1=-1:s2=-1
12220ycoord=0-(olds1*36+44)
12230SYS"Wimp_ForceRedraw",main%,1,ycoord-(olds2*36),tlen(st)*16,ycoord
12240ENDPROC
12250ENDIF
12260gap=s2-s1:gap=gap/2
12270IF s1=-1 THEN s1=ss
12280IF ss>s1+gap THEN s2=ss
12290IF ss<s1 THEN s1=ss
12300IF ss<s1+gap THEN s1=ss
12310IF ss=s1+gap THEN s2=ss
12320IF s1>s2 AND s2>-1 THEN sc=s2:s1=s2:s2=sc
12330IF s1>-1 AND s2>-1 THEN PROCseticstate(save%,4,1<<22,0<<22)
12340ycoord=0-(olds1*36+44)
12350SYS"Wimp_ForceRedraw",main%,1,ycoord-(olds2*36),tlen(st)*16,ycoord
12360ycoord=0-(s1*36+44)
12370SYS"Wimp_ForceRedraw",main%,1,ycoord-(s2*36),tlen(st)*16,ycoord
12380ENDPROC
12390
12400DEFPROCindir(handle,icon,text$,indir$)
12410!block=handle:block!4=icon:SYS"Wimp_GetIconState",,block
12420$(block!28)=text$:$(block!32)=indir$:block!36=LEN(indir$)+1
12430block!8=0:block!12=0
12440SYS"Wimp_SetIconState",,block
12450ENDPROC
12460
12470DEFPROCscroll
12480pagesize=INT((block!16-block!8-40)/36)
12490IF block!32=1 THEN block!20=block!20+(tlen(st)*16)/10
12500IF block!32=-1 THEN block!20=block!20-(tlen(st)*16)/10
12510IF block!36=1 THEN topno=INT(block!24/36):block!24=topno*36+36
12520IF block!36=-1 THEN ycoord=0-(block!16-block!8)+block!24:botno=INT((ycoord-40)/36)*-1-3:botno=botno*36+36+40:block!24-=ycoord+botno
12530IF block!32=2 THEN block!20=block!20+(tlen(st)*16)/5
12540IF block!32=-2 THEN block!20=block!20-(tlen(st)*16)/5
12550IF block!36=2 THEN topno=INT(block!24/36)*-1:block!24=0-(topno-pagesize)*36
12560IF block!36=-2 THEN ycoord=(0-(block!16-block!8))+block!24:botno=INT((ycoord-40)/36)*-1-3:botno=(botno+pagesize-1)*36+36+40:block!24-=ycoord+botno
12570SYS"Wimp_OpenWindow",,block
12580ENDPROC
12590
12600DEFPROCdelete(no)
12610done=-1
12620IF no=ct THEN
12630SYS"OS_Heap",3,heap%,tree(ct)
12640SYS"OS_Heap",1,heap% TO ,,largest,tfree
12650SYS"OS_Heap",5,heap%,,0-(largest-1024)
12660hsizeb=hsizeb-(largest-1024)
12670ct-=1
12680done=1
12690ENDIF
12700IF no<>ct AND done=-1 THEN
12710FOR j=no TO ct
12720SYS"OS_Heap",3,heap%,tree(j)
12730NEXT
12740FOR j=no TO ct-1
12750SYS"OS_Heap",2,heap%,,tsize(j+1) TO ,,tree(j)
12760 FOR I=0 TO tsize(j+1) STEP 4
12770 tree(j)!I=tree(j+1)!I
12780 NEXT I
12790tsize(j)=tsize(j+1):tcount(j)=tcount(j+1)
12800tlen(j)=tlen(j+1):troot$(j)=troot$(j+1)
12810NEXT j
12820ct-=1
12830SYS"OS_Heap",1,heap% TO ,,largest,tfree
12840SYS"OS_Heap",5,heap%,,0-(largest-1024)
12850hsizeb=hsizeb-(largest-1024)
12860ENDIF
12870SYS"OS_ReadMemMapInfo" TO page
12880SYS"Wimp_SlotSize",-1,-1 TO current
12890IF largest>page THEN
12900amount=INT((largest-1024)/page)*page
12910IF current-amount<=origappsize THEN amount=current-origappsize
12920SYS"Wimp_SlotSize",current-amount,-1
12930ENDIF
12940IF ct=-1 THEN PROCclearall:ENDPROC
12950IF st>=no THEN st-=1
12960IF st=-1 THEN st=0
12970PROCinfo(finfo%,1,STR$(ct+1))
12980PROCinfo(finfo%,2,STR$(hsizeb-tfree))
12990IF saved=FALSE THEN
13000PROCinfo(finfo%,3,"Yes")
13010saved=TRUE
13020!icond=main%
13030SYS"Wimp_GetWindowInfo",,icond
13040$(icond!76)=$(icond!76)+" *"
13050SYS"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
13060ENDIF
13070!block=main%:SYS"Wimp_CloseWindow",,block
13080arclisted=FALSE
13090PROCnewview:PROCopenwin(main%):PROCpane
13100ENDPROC
13110
13120DEFPROCclearall
13130IF ct>-1 THEN
13140FOR I=0 TO ct
13150SYS"OS_Heap",3,heap%,tree(I)
13160NEXT
13170SYS"OS_Heap",1,heap% TO ,,largest,tfree
13180SYS"OS_Heap",5,heap%,,0-(largest-1024)
13190SYS"Wimp_SlotSize",orig,-1
13200ENDIF
13210SYS"OS_Heap",1,heap% TO ,,largest,tfree
13220hsizeb=largest
13230ct=-1
13240!block=main%:SYS"Wimp_GetWindowInfo",,block
13250$(block!76)="<Untitled>"
13260SYS"Wimp_CloseWindow",,block
13270PROCinfo(finfo%,0,"None")
13280PROCinfo(finfo%,1,"0")
13290PROCinfo(finfo%,2,"0")
13300PROCinfo(finfo%,3,"No")
13310saved=FALSE
13320!block=new%:SYS"Wimp_CloseWindow",,block
13330!block=tinfo%:SYS"Wimp_CloseWindow",,block
13340!block=finfo%:SYS"Wimp_CloseWindow",,block
13350!block=iinfo%:SYS"Wimp_CloseWindow",,block
13360!block=bar%:SYS"Wimp_CloseWindow",,block
13370!block=toolbox%:SYS"Wimp_CloseWindow",,block
13380st=0
13390arclisted=FALSE
13400ENDPROC
13410
13420DEFPROCopentree(no)
13430st=no
13440PROCnewview
13450!block=main%:SYS"Wimp_CloseWindow",,block
13460PROCopenwin(main%):PROCpane
13470ENDPROC
13480
13490DEFPROCopenarc(no)
13500use$=arc$(no)
13510str$=LEFT$(use$,INSTR(use$,","))
13520numb$=RIGHT$(use$,LEN(use$)-INSTR(use$,","))
13530oct$=LEFT$(numb$,INSTR(numb$,",")-1)
13540x$=RIGHT$(numb$,LENnumb$-LENoct$-1)
13550origt=st
13560st=VAL(x$)
13570PROCgoto(VAL(oct$)-1)
13580ENDPROC
13590
13600DEFPROCgoto(ino)
13610PROCinfo(bar%,0,troot$(st))
13620tptr=tcount(st)*24+1
13630sizeb$=""
13640REPEAT
13650  sizeb$=sizeb$+CHR$(tree(st)?tptr)
13660  tptr+=1
13670UNTIL tree(st)?tptr=18
13680tptr+=1
13690finishs$=""
13700REPEAT
13710  finishs$=finishs$+CHR$(tree(st)?tptr)
13720  tptr+=1
13730UNTIL tree(st)?tptr=255
13740PROCinfo(tinfo%,0,troot$(st))
13750PROCinfo(tinfo%,1,STR$tcount(st))
13760PROCinfo(tinfo%,2,STR$tsize(st))
13770PROCinfo(tinfo%,3,sizeb$)
13780PROCinfo(tinfo%,7,finishs$)
13790IF uptot>-1 AND uptot<>origt THEN PROCnewview
13800!block=main%:SYS"Wimp_CloseWindow",,block
13810PROCopenwin(main%):PROCpane
13820!block=main%:SYS"Wimp_GetWindowInfo",,block
13830workx%=block!4-block!20
13840worky%=block!16-block!24
13850ycoord=0-(itemno*36+44)
13860itemno=ino
13870block!24=0-((itemno-2)*36+44)
13880SYS"Wimp_OpenWindow",,block
13890SYS"Wimp_ForceRedraw",main%,1,ycoord-32,tlen(st)*16,ycoord
13900ENDPROC
13910
13920DEFPROCfind
13930PROCclose(find%)
13940PROCclose(found%)
13950IF FNcheckflag(find%,1,21) THEN opt=1
13960IF FNcheckflag(find%,6,21) THEN opt=2
13970IF FNcheckflag(find%,9,21) THEN opt=3
13980from=0
13990IF FNcheckflag(find%,17,21) THEN sttree=st:endtree=st ELSE sttree=0:endtree=ct
14000IF FNcheckflag(find%,4,21) AND from>-1 THEN from=itemno:sttree=itemst
14010origt=st
14020IF NOT found THEN
14030nonefnd=-1
14040totalcnt=0
14050FOR n=sttree TO endtree
14060totalcnt=+tcount(n)
14070NEXT n
14080nowon=0
14090ENDIF
14100CASE opt OF
14110WHEN 1:
14120search$=$FNinfo(find%,2)
14130tex$=search$:tex2$="Name :-"
14140search$=FNfulls(search$,10)
14150case=FNcheckflag(find%,3,21)
14160IF NOT case THEN search$=FNcaps(search$)
14170IF found AND FNcheckflag(find%,18,21) THEN sttree=uptot
14180FOR ontree=sttree TO endtree
14190IF found THEN from=upto+1:found=FALSE
14200st=ontree
14210n=from*24
14220SYS"Hourglass_On"
14230FOR I=from TO tcount(st)
14240 nowon+=1
14250 t$=""
14260 FOR h=3 TO 12
14270 i=n+h
14280 t$+=CHR$(tree(st)?i)
14290 NEXT h
14300 IF NOT case THEN t$=FNcaps(t$)
14310 IF t$=search$ THEN SYS"Hourglass_Smash":nonefnd=1:upto=I:uptot=ontree:PROCgoto(I):PROCfound(I,st):ENDPROC
14320 n+=24
14330 SYS"Hourglass_Percentage",nowon/totalcnt*100
14340NEXT I
14350from=0:upto=0
14360NEXT ontree
14370SYS"Hourglass_Smash"
14380ENDIF
14390WHEN 2:
14400Search$=$FNinfo(find%,7)
14410IF LEFT$(Search$,1)="&" THEN
14420search$=Search$
14430search$=RIGHT$(search$,LEN(search$)-1)
14440IF LENsearch$>3 THEN search$=LEFT$(search$,3)
14450IF LENsearch$<3 THEN search$=FNlongs(search$,3)
14460tex$="&"+search$:tex2$="Type :-"
14470ENDIF
14480IF LEFT$(Search$,1)<>"&" THEN
14490search$=Search$
14500SYS"XOS_FSControl",31,search$ TO r0,,filetype
14510IF r0<>31 THEN PROCmess("File type not recognised; Try entering file type number"):ENDPROC
14520search$=STR$~filetype
14530IF LENsearch$<3 THEN search$=FNlongs(search$,3)
14540tex$="&"+search$:tex2$="Type :-"
14550ENDIF
14560IF found AND FNcheckflag(find%,18,21) THEN sttree=uptot
14570 FOR ontree=sttree TO endtree
14580 IF found THEN from=upto+1:found=FALSE
14590 st=ontree
14600 n=from*24
14610 SYS"Hourglass_On"
14620 FOR I=from TO tcount(st)
14630  nowon+=1
14640  t$=""
14650  FOR h=21 TO 23
14660  i=n+h
14670  t$+=CHR$(tree(st)?i)
14680  NEXT h
14690  IF t$=search$ THEN SYS"Hourglass_Smash":nonefnd=1:upto=I:uptot=ontree:PROCgoto(I):PROCfound(I,st):ENDPROC
14700  n+=24
14710  SYS"Hourglass_Percentage",nowon/totalcnt*100
14720 NEXT I
14730from=0:upto=0
14740NEXT ontree
14750SYS"Hourglass_Smash"
14760ENDIF
14770WHEN 3:
14780search$=$FNinfo(find%,11)
14790search2$=$FNinfo(find%,12)
14800search=VAL(search$)*1000
14810search2=VAL(search2$)*1000
14820tex$=STR$((search+search2)/2):tex2$="Size :-"
14830search$=FNfulls(search$,10)
14840IF found AND FNcheckflag(find%,18,21) THEN sttree=uptot
14850FOR ontree=sttree TO endtree
14860IF found THEN from=upto+1:found=FALSE
14870st=ontree
14880n=from*24
14890SYS"Hourglass_On"
14900FOR I=from TO tcount(st)
14910 nowon+=1
14920 t$=""
14930 FOR h=14 TO 20
14940 i=n+h
14950 t$+=CHR$(tree(st)?i)
14960 NEXT h
14970 t=VAL(t$)
14980 IF t>search AND t<search2 THEN SYS"Hourglass_Smash":nonefnd=1:upto=I:uptot=ontree:PROCgoto(I):PROCfound(I,st):ENDPROC
14990 n+=24
15000 SYS"Hourglass_Percentage",nowon/totalcnt*100
15010NEXT I
15020from=0:upto=0
15030NEXT ontree
15040SYS"Hourglass_Smash"
15050ENDIF
15060ENDCASE
15070st=origt
15080PROCinfo(notfnd%,1,tex$)
15090PROCinfo(notfnd%,2,tex2$)
15100PROCopenwin(notfnd%)
15110found=FALSE
15120ENDPROC
15130
15140DEFPROCfound(item,trno)
15150n=item*24
15160t$=""
15170FOR h=3 TO 12:i=n+h:t$+=CHR$(tree(st)?i):NEXT h
15180PROCinfo(found%,3,t$)
15190t$=""
15200FOR h=14 TO 20:i=n+h:t$+=CHR$(tree(st)?i):NEXT h:size$=t$
15210t$=""
15220FOR h=21 TO 23:i=n+h:t$+=CHR$(tree(st)?i):NEXT h
15230te$="&"+t$+"     ("+t$+")"
15240tblk=tt
15250SYS"XOS_ReadVarVal","File$Type_"+t$,tblk,512 TO ,,br
15260IF br<>0 THEN
15270type$=""
15280FOR s=0 TO br-1
15290type$+=CHR$tblk?s
15300NEXT s
15310IF LEN(type$)<8 THEN
15320REPEAT
15330type$=type$+" "
15340UNTIL LEN(type$)=8
15350ENDIF
15360te$=type$+" ("+t$+")"
15370ENDIF
15380st$="sfile_"+t$
15390IF t$="APP" THEN te$="Application   ":st$="sapp"
15400IF t$="DIR" THEN te$="Directory     ":st$="sdir"
15410PROCindir(found%,1,"","b0;"+st$)
15420IF opt=1 OR opt=2 PROCinfo(found%,2,"Type"):PROCinfo(found%,4,te$):REMte$
15430IF opt=3 PROCinfo(found%,2,"Size"):PROCinfo(found%,4,size$)
15440PROCopenwin(found%)
15450found=TRUE
15460PROCputinfo(item)
15470ENDPROC
15480
15490DEFFNhextodec(string$)
15500total=0
15510strlen=LENstring$
15520FOR I=strlen-1 TO 0 STEP -1
15530  next$=LEFT$(string$,1)
15540  val=-1
15550  IF next$="0" THEN val=0
15560  IF next$="1" THEN val=1
15570  IF next$="2" THEN val=2
15580  IF next$="3" THEN val=3
15590  IF next$="4" THEN val=4
15600  IF next$="5" THEN val=5
15610  IF next$="6" THEN val=6
15620  IF next$="7" THEN val=7
15630  IF next$="8" THEN val=8
15640  IF next$="9" THEN val=9
15650  IF next$="A" OR next$="a" THEN val=10
15660  IF next$="B" OR next$="b" THEN val=11
15670  IF next$="C" OR next$="c" THEN val=12
15680  IF next$="D" OR next$="d" THEN val=13
15690  IF next$="E" OR next$="e" THEN val=14
15700  IF next$="F" OR next$="f" THEN val=15
15710  IF val=-1 THEN val=0
15720  total+=val*16^I
15730  string$=RIGHT$(string$,LEN(string$)-1)
15740NEXT
15750=total

$� � �mess(�$+" : at line "+Þ):�
� *>$.!DiskTree.!RunImage
:� *Main Program for !DiskTree - Directory Tree Creator
(� *Version 1.08 (1 Feb '96)
2� *Authur � J. Robbins
<
maxno=150
FE� block &1000, menu% 2048, curbuf% 7*1024, icond 2048, mblock 256
P3� longdata (maxno*13)+24, longmen (maxno*24)+48
Z2� tree(maxno),lastdir(256),buffer 63,tblk 1024
dF� tsize(maxno),tcount(maxno),tlen(maxno),troot$(maxno),arc$(maxno)
nendbuf%=curbuf%+&6000
xLend%=-1:toolson=�:quiting=�:totallen=0:found=�:upto=-1:uptot=-1:oldst=-1
�>saved=�:prequitwait=�:prequit=�:sel=-1:tt=tblk:arclisted=�
�Lin=�:started=0:ct=-1:arcct=-1:width=-1:itemno=-1:rc=-1:s1=-1:s2=-1:ss=-1
�task=&4B534154
�@ș "Wimp_Initialise",200,task,"!DiskTree" � version%,mytask%
�$ș "Wimp_ClaimInterface",mytask%
�reinter=&81683
�
�template
�Sș"XOS_ReadVarVal","DTree$Drag",block,256,0,0 � ,,len:block?len=13:drag$=$block
�*� drag$="TRUE" � dragspr=� � dragspr=�
�env$=""
�ș "OS_GetEnv" � env$
�� �env$,"-quit") �
�I%=�env$,"""")
I%=�env$,"""",I%+1)
�
	I%+=1
"� �env$,I%,1)<>" "
,env$=�env$,I%)
6�
@initic=�icon
J"ș"Wimp_SlotSize",-1,-1 � orig
T max=�-�:max=�(max/1024)*1024
^max-=&4000
hend%=�:drag%=0:drive%=0
r%ș"Wimp_SlotSize",-1,-1 � current
|�=�-max:hsizeb=max:heap%=�
�� hsizeb<1024 � �
�ș"OS_Heap",0,heap%,,hsizeb
�'origheap=hsizeb:origappsize=current
�#� � �error(�$+" : at line "+Þ)
��info(bar%,0,"None")
��adjustwin(500,-500)
�$�seticstate(save%,4,1<<22,1<<22)
�$�seticstate(find%,4,1<<22,1<<22)
�� env$<>"" �load(env$)
��
�%ș"Wimp_Poll",0,block � eventcode
�-ș "Wimp_PollPointer",eventcode,,version%
�Ȏ eventcode �
4� 0:� � saved � prequit ș"Wimp_ProcessKey",&1FC
� 1:�redraw(block!0)
� 2:�request2
&� 3:�request3
0� 6:�click(block)
:� 7:�out
D� 8:�process
N� 9:�select
X� 10:�scroll
b� 17,18:�messagein
l�
v
� end%
��end
��
�
�	��end
�șreinter,mytask%
�#ș"Wimp_CloseDown",task,mytask%
��
��
�
���request2
�win=!block
�� win=main% �
�!icond=toolbox%
#ș "Wimp_GetWindowState",,icond
tool28=icond!28
!icond=main%
 #ș "Wimp_GetWindowState",,icond
*check=0
4 � icond!4<>block!4 � check=1
> � icond!8<>block!8 � check=1
H"� icond!12<>block!12 � check=1
R"� icond!16<>block!16 � check=1
\"� icond!20<>block!20 � check=1
f"� icond!24<>block!24 � check=1
p� block!28=-2 � check=1
z� tool28<>-1 � check=1
�1� check=1 � ș "Wimp_OpenWindow",,block:�pane
��
�ș "Wimp_OpenWindow",,block
��
��
�
���request3
�Ȏ !block �
�� main%:
� ș "Wimp_CloseWindow",,block
�X!block=toolbox%:ș "Wimp_CloseWindow",,block:!block=bar%:ș"Wimp_CloseWindow",,block
�Y!block=tinfo%:ș "Wimp_CloseWindow",,block:!block=iinfo%:ș "Wimp_CloseWindow",,block
�X!block=found%:ș "Wimp_CloseWindow",,block:!block=find%:ș "Wimp_CloseWindow",,block
/!block=notfnd%:ș "Wimp_CloseWindow",,block
!� saved%:�prequit � prequit=�
5� toolbox%:toolson=�:ș "Wimp_CloseWindow",,block
$# :ș "Wimp_CloseWindow",,block
.�
8�
B
L
ݤicon
V
!icond=-1
`
icond!4=0
j%icond!8=0:icond!12=68:icond!16=68
t+icond!20=%11010+((2^12)*3):icond?23=112
~$(icond+24)="!DiskTree"+�13
�&ș "Wimp_CreateIcon",,icond � icon
�	=icon
�
�ݤinf(handle,icon)
��gee(handle,icon)
�
=icond!28
�
�
ݤbit(a$)
�ȕ �a$,":")>0
�a$=�a$,�a$,":")+1)
��
�ȕ �a$,".")>0
a$=�a$,�a$,".")+1)

�
=a$

(ݤwool(wool%)
2
� cot$
< ȕ ?wool%>=32
Fcot$+=�(?wool%)
Pwool%+=1
Z�
d	=cot$
n
xݤgetleaf(leaf$)
�ȕ �leaf$,".")
�leaf$=�leaf$,�leaf$,".")+1)
��:=leaf$
�
�ݤgetdiskname(path$)
��
�path$=�path$,�(path$)-1)
�� �path$,1)=":"
�=�path$,�(path$)-1)
�
�ݤcheckit(hnd%,ic%)
�!icond=hnd%:icond!4=ic%
� ș"Wimp_GetIconState",,icond
flags%=icond!24
=flags%�&F0000

"ݤask(fn$)
,!icond=0:$(icond+4)=fn$+�0
65ș"Wimp_ReportError",icond,&13,"!DiskTree" � ,but
@=but
J
Tݤfulls(string$,len)
^� �(string$)<len �
h�
rstring$=string$+�0
|� �(string$)=len
��
�=string$
�
�ݤlongs(string$,len)
�� �(string$)<len �
��
�string$="0"+string$
�� �(string$)=len
��
�=string$
�
�!ݤcheckflag(handle,icon,flag)
�	bit=�
!icond=handle:icond!4=icon
 ș"Wimp_GetIconState",,icond
"� (icond!24�(1<<flag))>0 bit=�
&=bit
0
:ݤcaps(up$)
D� L=1 � �(up$)
N#�up$,L,1)=�(�(�up$,L,1)) � &DF)
X�
b=up$
l
v��template
�2ș"Wimp_OpenTemplate",,"<DTree$Dir>.Templates"
�indir=curbuf%
�info%=�template("ProgInfo")
�save%=�template("save")
� saved%=�template("savetext")
�main%=�template("tree")
�toolbox%=�template("tools")
�query%=�template("query")
�quit%=�template("quitbox")
�bar%=�template("bar")
�new%=�template("new")
�find%=�template("Find")
�found%=�template("found")
notfnd%=�template("notfnd")
iinfo%=�template("info")
finfo%=�template("finfo")
 tinfo%=�template("tinfo")
*ș "Wimp_CloseTemplate"
4stex=�info(save%,1)
>stexd=�info(saved%,1)
H�
R
\ݤtemplate(a$)
fFș"Wimp_LoadTemplate",,block,indir,endbuf%,-1,a$,0 � ,,indir,,,,c%
p2� c%=0 � �mess("Template "+a$+" not found."):�
zblock!64=1
�)ș"Wimp_CreateWindow",,block � handle
�=handle
�
�ݤinfo(handle,icon)
��gee(handle,icon)
�
=icond!28
�
���info(handle,icon,text$)
�;!block=handle:block!4=icon:ș"Wimp_GetIconState",,block
�)$(block!28)=text$:block!36=�(text$)+1
�block!8=0:block!12=0
� ș"Wimp_SetIconState",,block
��
	
	��gee(handle,icon)
	!icond=handle:icond!4=icon
	$ ș"Wimp_GetIconState",,icond
	.�
	8
	B8��seticstate(handle%,ic%,clear,eor):� as in PRM (CE)
	L9!block=handle%:block!4=ic%:block!8=eor:block!12=clear
	V ș"Wimp_SetIconState",,block
	`�
	j
	t��cmenus
	~tmopt=-1
	�menuopen=-44
	�menuptr=menu%
	�ȗ x,y,b
	�(trees%=�menu("Trees",174,"No Trees")
	�� ct>-1 � �treemens
	�4� toolson � toolon$="{�}Tools":� toolon$="Tools"
	�?SaveMenu%=�menu("Save",5*16,"{b|save%}Text,{b|saved%}Data")
	�;misc%=�menu("Misc",5*16,"{b|info%}Info,{b|finfo%}File")
	�Ziconmenu%=�menu("!DiskTree",9*16,"{b|misc%}Misc,Tree,New Tree,{b|SaveMenu%}Save,Quit")
	�mainmenu%=�menu("!DiskTree",10*16,"{b|misc%}Misc,{b|trees%}Trees,{b|tinfo%}Tree Info,{b|find%}Find,"+toolon$+",New Tree,{b|SaveMenu%}Save,Quit")
	� rmen=block!12:ricon=block!16
	�M� block!12=-2 � openmenu%=iconmenu%:a=x-75:b=(5+2)*48:� No. of items+2*48
2� block!12=main% � a=x:b=y:openmenu%=mainmenu%

G� block!12=toolbox% � block!16=0 � tmopt=0:openmenu%=trees%:a=x:b=y
G� block!12=toolbox% � block!16=1 � tmopt=1:openmenu%=trees%:a=x:b=y
G� block!12=toolbox% � block!16=2 � tmopt=2:openmenu%=trees%:a=x:b=y
(E�seticstate(save%,3,1<<21,0<<21):�seticstate(save%,4,1<<21,0<<21)
2%�seticstate(saved%,3,1<<21,0<<21)
<�info(save%,1,"TextFile")
F�
P�openmenu(a,b)
Z�
d
n��treemens
x� block!12<>toolbox% � �
�Ȏ block!16 �
�
� 0,2:
� j=0
�9 � block!16=2 � $(longdata+(j*13))="�Clear All": j+=1
� � m=0 � ct
�
 tick$=""
� � m=st � tick$="�"
�  nextit$=�getleaf(troot$(m))
�E � nextit$="$" � nextit$=�getdiskname(�troot$(m),�(troot$(m))-2))
�% $(longdata+(j*13))=tick$+nextit$
�	 j+=1
� � m
�1 trees%=�longmenu("Trees",11*16,j-1,longdata)
� 1:
- � � arclisted � �makearclist:arclisted=�
 � arcct=-1 �
"  treemen$="No Archives"
,*  trees%=�menu("Trees",11*16,treemen$)
6 �
@  � m=0 � arcct
J  arcy$=arc$(m)
T!  name$=�arcy$,�arcy$,",")-1)
^  $(longdata+(m*13))=name$
h  �
r4  trees%=�longmenu("Trees",11*16,arcct,longdata)
| �
��
��
�
���openmenu(x,y)
�&ș"Wimp_CreateMenu",,openmenu%,x,y
��
�
�ݤmenu(tit$,wid,menu$)
�menu$+=","
�oldmenu=menuptr
�$menuptr=tit$
�menuptr?12=7
�menuptr?13=2
menuptr?14=7
menuptr?15=0
menuptr!16=wid
&menuptr!20=48
0menuptr!24=0
:menuptr+=28
D�
N�thing(menu$)
Xmenu$=�menu$,�menu$,",")+1)
bmenuptr+=24
l� menu$=""
v)menuptr!-24=(menuptr!-24) � %10000000
�=oldmenu
�
�(ݤlongmenu(tit$,wid,number,longdata)
�$longmen=tit$
�longmen?12=7
�longmen?13=2
�longmen?14=7
�longmen?15=0
�longmen!16=wid
�longmen!20=48
�longmen!24=0
�� i=0 � number
�ptr=(24*i)+28

longmen!(ptr)=0

longmen!(ptr+4)=-1

longmen!(ptr+8)=&07000001

 data$=$(longdata+(i*13))

*P� �data$,1)="�" � longmen!(ptr)=longmen!(ptr) � %10:data$=�data$,�(data$)-1)

4O� �data$,1)="�" � longmen!(ptr)=longmen!(ptr) � %1:data$=�data$,�(data$)-1)

>$(longmen+(ptr+12))=data$

H�

R+longmen!(ptr)=longmen!(ptr) � %10000000

\=longmen

f

p��thing(m$)

zm$=�m$,�m$,",")-1)

�i$="":j$=""

�� �m$,"{")>0 �

�i$=�m$,�m$,"}")-1)

�m$=�m$,�m$,"}")+1)

�j$=�i$,�i$,"|")-1)

�i$=�i$,�i$,"|")+1)

��

�ijack=&07000021

�mjack=0

�submenu=-1

� � �j$,"b")>0 � submenu=�(i$)

�"� �j$,"_")>0 � mjack=mjack � 2

�"� �j$,"�")>0 � mjack=mjack � 1
0� �j$,"u")>0 � mjack=mjack � 2:submenu=�(i$)
!menuptr=mjack
menuptr!4=submenu
$menuptr!8=ijack
.$(menuptr+12)=m$
8�
B�
L
V��click(block)
`keepb%=block!12
j*� �checkit(block!12,block!16)=983040 �
t$�slabin(keepb%):�slabout(keepb%)
~�
�&� quiting � quitin=�:�close(quit%)
�'� block!12=-2 � block!8=2 �cmenus:�
�3� block!12=-2 � block!8=4 �openwin(main%):�pane
�=� block!12=-2 � block!8=1 �openwin(new%):�info(new%,1,"")
�*� block!12=main% � block!8=2 �cmenus:�
�Q� block!12=save% � block!16=2 winsave%=block!12:filetype$="file_FFF":�defsave
�R� block!12=saved% � block!16=2 winsave%=block!12:filetype$="file_00D":�defsave
�M� block!12=save% � block!16=0 winsave%=block!12:�save($�info(winsave%,1))
�N� block!12=saved% � block!16=0 winsave%=block!12:�save($�info(winsave%,1))
�.� block!12=save% � block!16=3 � �radiosave
�.� block!12=save% � block!16=4 � �radiosave
�K� block!12=new% � block!16=2 winsave%=block!12:filetype$="new":�defsave
&� block!12=new% � block!16=4 � �go

*� block!12=new% � block!16=5 � �drive0
.� block!12=main% � block!8=4 � �selectitem
-� block!12=main% � block!8=1 � �selection
(;� block!12=found% � block!16=7 � found=�:�close(found%)
2*� block!12=found% � block!16=6 � �find
<5� block!12=notfnd% � block!16=3 � �close(notfnd%)
F.� block!12=toolbox% � block!16=0 � �cmenus
P.� block!12=toolbox% � block!16=1 � �cmenus
Z.� block!12=toolbox% � block!16=2 � �cmenus
dD� block!12=toolbox% � block!16=3 � itemno<>-1 � �openwin(iinfo%)
nF� block!12=toolbox% � block!16=4 � �openwin(new%):�info(new%,1,"")
x,� block!12=toolbox% � block!16=5 � �last
�,� block!12=toolbox% � block!16=6 � �next
�6� block!12=toolbox% � block!16=7 � �openwin(find%)
�2� block!12=find% � block!16=16 � �close(find%)
�*� block!12=find% � block!16=15 � �find
�3� block!12=bar% � block!16=0 � �openwin(tinfo%)
�9� block!12=query% � block!16=0 � �close(query%):�endq
�� prequit �
�s� block!12=quit% � block!16=0 � �:ș"Wimp_ProcessKey",&1FC:șreinter,mytask%:ș"Wimp_CloseDown",task,mytask%:�:
�;� block!12=quit% � block!16=2 � �close(quit%):prequit=�
�P� block!12=quit% � block!16=3 � �close(quit%):�openwin(saved%):prequitwait=�
�'� prequit � � prequitwait prequit=�
��
�W� block!12=quit% � block!16=0 � șreinter,mytask%:ș"Wimp_CloseDown",task,mytask%:�
1� block!12=quit% � block!16=2 � �close(quit%)
L� block!12=quit% � block!16=3 � �close(quit%):�openwin(saved%):quiting=�
�
"�
,
6
��process
@L� !block=save% � block!24=13 � winsave%=!block:�save($�info(winsave%,1))
JM� !block=saved% � block!24=13 � winsave%=!block:�save($�info(winsave%,1))
T ș"Wimp_ProcessKey",block!24
^�
h
r��select
|noway=0
�.ș"Wimp_DecodeMenu",,openmenu%,block,icond
�Ȏ openmenu% �
�� mainmenu%,iconmenu%:
�,� $icond="Quit" � �areyousure:quiting%=�
�@� $icond="Tools" � toolson � toolson=�:�toolbox(-1):noway=-1
�B� $icond="Tools" � � toolson � noway=0 � toolson=�:�toolbox(1)
�+� $icond="Tree" � �openwin(main%):�pane
�9� $icond="New Tree" � �openwin(new%):�info(new%,1,"")
�8� $icond="Trees.No Tree" � ș"Wimp_CreateMenu",,-1:�
�-� �$icond,5)="Trees" � �opentree(block!4)
�� trees%
�>� $icond="Clear All" � �clearall:ș"Wimp_CreateMenu",,-1:�
�3� $icond="No Trees" � ș"Wimp_CreateMenu",,-1:�
!� tmopt=0 � �opentree(!block)
 � tmopt=1 � �openarc(!block)
#� tmopt=2 � �delete((!block)-1)
&�
0"ș"Wimp_GetPointerInfo",,block
:� block!8=1 �
D>� menuopen=-44 � rc=1:block!16=ricon:block!12=rmen:�cmenus
N"ș"Wimp_CreateMenu",,openmenu%
X�
bș"Wimp_CreateMenu",,-1
l�
v�
�
���radiosave
�
done=0
�� block!16=3 �
�$�seticstate(save%,4,1<<21,0<<21)
��info(save%,1,"TextFile")
��
�� block!16=4 �
�$�seticstate(save%,3,1<<21,0<<21)
��info(save%,1,"Selection")
��
��
�
��mess(mess$)
 !icond=0:$(icond+4)=mess$+�0
,ș"Wimp_ReportError",icond,1,"!DiskTree"
 �
*
4	��out
>�dragspr(1)
H(� winsave%=new% � stext=stex:ft=&FFF
R)� winsave%=save% � stext=stex:ft=&FFF
\+� winsave%=saved% � stext=stexd:ft=&00D
f� drive%=1 �
p#ș "Wimp_GetPointerInfo",,block
z9ToX=block!0:ToY=block!4:Window=block!12:Icon=block!16
�3mblock!0=256:mblock!12=0:mblock!16=1:� DataSave
�?mblock!20=Window:mblock!24=Icon:mblock!28=ToX:mblock!32=ToY
�7mblock!36=-1:� No idea what the size is going to be
�mblock!40=ft:
�$stext=$�info(winsave%,1)
�$stext=�getleaf($stext)
�)� I=0 � 255:� I?stext<32 � I?stext=13
��
� $(mblock+44)=�bit($stext)+�0
�.� winsave%=new% � $(mblock+44)="Directory"
�:ș "Wimp_SendMessage",17,mblock,Window,Icon:� DataSave
�drag%=0
��
�


��defsave
$	�Mode
.!block=winsave%
8#ș "Wimp_GetWindowState",,block
Bysize%=block!16-block!8
L#x%=block!4:y%=block!8:block!4=2
V ș"Wimp_GetIconState",,block
`#block!8+=x%:block!12+=y%+ysize%
j$block!16+=x%:block!20+=y%+ysize%
t5block!24=0:block!28=0:block!32=xmax:block!36=ymax
~'!block=0:block!4=5:drag%=�:drive%=1
�� dragspr �
�8ș "DragASprite_Start",%10000101,1,filetype$,block+8
��dragspr(-1)
��
�ș"Wimp_DragBox",,block
��
��
�
�
��Mode
�M!block=130:block!4=131:block!8=-1:ș"OS_ReadVduVariables",block,block+128
�)ș"OS_ReadModeVariable",�,4 � ,,Xeig%
�)ș"OS_ReadModeVariable",�,5 � ,,Yeig%
=xmax=((block!128)+1)*2^Xeig%:ymax=((block!132)+1)*2^Yeig%

�

��save(save$)
(8� ct=-1 � �mess("No directory tree data to save!"):�
2{� �save$,".")<1 � �save$,":")<1 � save$<>"<Wimp$Scrap>" � �mess("To save, drag the file icon to a directory viewer."):�
<� �
F{� � � � �=71622:�query("Disc Full"):ș&0D,0,fh%:ș&406C1:� �:�:� � �:�error(�$+" : at line "+Þ):ș&0D,0,fh%:ș&406C1:�
P� winsave%=saved% �
Zș"Hourglass_On"
d
byte=0
nș"OS_Find",&80,save$ � fh%
x
endt=tblk
�!$endt="DiskTree Data File v�"
�$endt+=�("DiskTree Data File v�")
�$ș"OS_GBPB",2,fh%,tblk,endt-tblk
�<� �checkflag(saved%,3,21) � stt=st:ett=st:� stt=0:ett=ct
�
endt=tblk
�CT$=�fulls(�(ett-stt),3)
�
$endt=CT$
�endt+=3
�$ș"OS_GBPB",2,fh%,tblk,endt-tblk
�total1%=0:total2%=0
�(� k=stt � ett:total1%+=tcount(k):� k
�� k=stt � ett
�total2%+=1
0ș"Hourglass_Percentage",total2%/total1%*100
ts$=�fulls(�(tsize(k)),7)
tl$=�fulls(�(tlen(k)),7)
"tc$=�fulls(�(tcount(k)),7)
,$rootl$=�fulls(�(�(troot$(k))),3)
6
endt=tblk
@$endt=ts$+tl$+tc$+rootl$
Jendt+=24
Tș"OS_GBPB",2,fh%,tblk,24
^
endt=tblk
h$endt=troot$(k)
rendt+=�(troot$(k))
|'ș"OS_GBPB",2,fh%,tblk,�(troot$(k))
�&ș"OS_GBPB",2,fh%,tree(k),tsize(k)
�� k
�ș&0D,0,fh%
�ș"OS_File",18,save$,&00D
�9� save$<>"<Wimp$Scrap>" � � �checkflag(saved%,3,21) �
�!block=main%
�!ș"Wimp_GetWindowInfo",,block
�saved=�
�X$(block!76)=save$:ș"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
��info(saved%,1,save$)
��info(finfo%,3,"No")
��
�ș"Hourglass_Smash"
A� quiting șreinter,mytask%:ș"Wimp_CloseDown",task,mytask%:�
�
� winsave%=save% �
&ș"Hourglass_On"
0ș"OS_Find",&80,save$ � fh%
:;� �checkflag(save%,3,21) � stt=st:ett=st:� stt=0:ett=ct
Dtotal1%=0:total2%=0
N(� I=stt � ett:total1%+=tcount(I):� I
X� I=stt � ett
btotal2%+=1
l0ș"Hourglass_Percentage",total2%/total1%*100
v
endt=tblk
�*$endt="            "+troot$(I)+�10+�10
�'endt+=�("            "+troot$(I))+2
�$ș"OS_GBPB",2,fh%,tblk,endt-tblk
�d� �checkflag(save%,4,21) � s1>-1 � stt=tt:ett=tt:stptr=s1:endptr=s2:� stptr=0:endptr=tcount(I)-1
� � J=stptr � endptr
� n=J*24
�
 t$=""
�  � h=0 � 2
�  i=n+h
�  t$+=�(tree(I)?i)
�	  � h
� endt=tblk
�  � h=1 � �(t$)
  $endt=" "

  endt+=1
	  � h
 
 t$=""
*  � h=3 � 12
4  i=n+h
>'  � tree(I)?i<>0 � t$+=�(tree(I)?i)
H	  � h
R $endt=t$+�10
\ endt+=�(t$)+1
f% ș"OS_GBPB",2,fh%,tblk,endt-tblk
p � J
z
endt=tblk
�$endt=�10+�10
�endt+=2
�$ș"OS_GBPB",2,fh%,tblk,endt-tblk
�� I
�ș&0D,0,fh%
�ș"OS_File",18,save$,&FFF
�Ȏ save$ �
�� "<Wimp$Scrap>"
�
�!block=main%
�!ș"Wimp_GetWindowInfo",,block
�saved=�
�X$(block!76)=save$:ș"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
�info(finfo%,3,"No")
�
ș"Hourglass_Smash"
$A� quiting șreinter,mytask%:ș"Wimp_CloseDown",task,mytask%:�
.�
8� �
B�
L
Vݤgetbs(fh%,len)
`string$=""
j� I=1 � len
tș"OS_BGet",,fh% � byte
~string$+=�(byte)
��
�=string$
�
���messagein
�sendm=&400E7
�ref=block!8:task=block!4
�Ȏ block!16 �
�� 0:�end
�� 2:
�save$=�wool(block+44)
��dragspr(1)
�%� winsave%=new% � �dragnew(save$)
!� drive%=1 � winsave%<>new% �

�save(save$)
mblock!0=256
mblock!12=ref
(mblock!16=3
2mblock!36=-1
<$(mblock+44)=save$
F'ș &400E7,18,mblock,task:� DataLoad
P�
Z� 3:
d� block!40=&00d �
n&load$=�wool(block+44):�load(load$)
x�
��
�� block!40<>&00D �
�)load$=�wool(block+44):�newtree(load$)
��
�� 5:
�� block!40=&00D �
�block!12=block!8:block!16=4
�+ș sendm,18,block,block!4:� DataLoadAck
��load(�wool(block+44))
��
�G� 8:� � prequit block!12=ref:șsendm,19,block:prequit=�:�areyousure
��
��

��load(load$)
in=�
"#� ct=-1 � �info(finfo%,0,load$)
,!ș"OS_Find",&40,load$ � load%
6"Len=�("DiskTree Data File v�")
@title$=�getbs(load%,Len)
Jh� title$<>"DiskTree Data File v�" � �query("This is not a true DiskTree Data file!"):ș&0D,0,load%:�
T� �
^s� � � � �=388 �query("Out Of Memory "+Þ):ș&0D,0,load%:� �:�:� � �:�error(�$+" : at line "+Þ):ș&0D,0,load%:�
hnof=�(�getbs(load%,3))
r� m=0 � nof
|TLen=�(�getbs(load%,7))
�TLen%=�(TLen/8)*8
�)ș"OS_Heap",1,heap% � ,,largest,tfree
�� TLen%+1024>largest �
�%ș"Wimp_SlotSize",-1,-1 � current
�5ș"Wimp_SlotSize",current+(TLen%-largest)+1024,-1
�!ș"Wimp_SlotSize",-1,-1 � new
�change=new-current
�ș"OS_Heap",5,heap%,,change
�hsizeb+=change
��
�	ct+=1
�tsize(ct)=TLen
�tlen(ct)=�(�getbs(load%,7))
!tcount(ct)=�(�getbs(load%,7))
rootl=�(�getbs(load%,3))
"troot$(ct)=�getbs(load%,rootl)
&*ș"OS_Heap",2,heap%,,TLen � ,,tree(ct)
0"ș"OS_Heap",1,heap% � ,,,tfree
:%ș"OS_GBPB",4,load%,tree(ct),TLen
D� m
Nș&0D,0,load%
X!icond=main%
b!ș"Wimp_GetWindowInfo",,icond
lYsaved=�:$icond!76=load$:ș"Wimp_ForceRedraw",-1,icond!4,icond!16,icond!12,icond!16+36
vș"Wimp_CloseWindow",,icond
�$�info(saved%,1)=load$
�	st=ct
�"�newview:�openwin(main%):�pane
��info(finfo%,1,�(ct+1))
�#�info(finfo%,2,�(hsizeb-tfree))
�arclisted=�
�� �
��
�
���openwin(handle%)
�G� handle%=main% � ct=-1 � �query("No directory trees in memory!"):�
�!block=handle%
�!ș"Wimp_GetWindowInfo",,block
open=block!32 � (1<<16)
front=block!32 � (1<<17)
W� handle%=main% � width>-1 � block!12=block!4+width:block!8=block!16-depth:width=-1
 � open=0 �
*ș"Wimp_OpenWindow",,block
4�
>� front=0 �
H*block!28=-1:ș"Wimp_OpenWindow",,block
R�
\�
f
p� �slabin(handle)
z!icond=handle
�#ș "Wimp_GetPointerInfo",,icond
�ș "Wimp_BorderIcon",,icond
��
�
�� �slabout(handle)
�!icond=handle
�#ș "Wimp_GetPointerInfo",,icond
�
icond!8=0
�ș "Wimp_BorderIcon",,icond
��
�
���redraw(handle)
�setex=�
!block=handle

�more%
)ș "Wimp_RedrawWindow",,block � more%
$ȕ more%
. Ȏ handle �
8 � main%
B �application_redraw
L 
V! ș"Wimp_BorderWindow",,block
` �
j* ș "Wimp_GetRectangle",,block � more%
t �
~�
�
���application_redraw
�workx%=block!4-block!20
�worky%=block!16-block!24
�max=block!32-worky%
�min=block!40-worky%
�max=(max+46)�36*-1
�min=(min+46)�36*-1
�)� max>tcount(st)-1 � max=tcount(st)-1
�� ct=-1 � �
�#tx=workx%:ty=worky%-46-(min*36)
�g=&400E6
n=min*24

� I=min � max

 șg,7

 t$=""
(   � h=0 � 2
2   i=n+h
<   t$+=�(tree(st)?i)
F
   � h
P len=�(t$)-1
Z � len=-1 � len=0
d
 t$=""
n   � h=3 � 12
x   i=n+h
�   t$+=�(tree(st)?i)
�
   � h
�O � itemno=I � șg,9:ȓ Ȑ workx%+0,worky%-0-(I*36+46),tlen(st)*16,-30:șg,7
�V � I>=s1 � I<=s2-1 � șg,7:ȓ Ȑ workx%+0,worky%-0-(I*36+46),tlen(st)*16,-34:șg,0
�K � I=s2 � șg,7:ȓ Ȑ workx%+0,worky%-0-(I*36+46),tlen(st)*16,-30:șg,0
�! � tree(st)?(i+1)=138 � șg,8
� � tx,ty
� � �len)t$
� ty-=36
�
 n+=24
�� I
�tyy=worky%-ty-40
��


��pane
� ct=-1 � �
"9bar1=block!4:bar2=block!8:bar3=block!12:bar4=block!16
,bar5=block!52:bar6=block!20
6� toolson � �all:� �baronly
@/!block=found%:ș"Wimp_GetWindowInfo",,block
Jopen=block!32 � (1<<16)
T� open � �openwin(found%)
^�
h
r
��baronly
|front=block!28
�-!icond=bar%:ș"Wimp_GetWindowInfo",,icond
�9icond!4=bar1:icond!8=bar2:icond!12=bar3:icond!16=bar4
�icond!20=bar6
�-icond!28=front:ș"Wimp_OpenWindow",,icond
�,block!28=bar%:ș"Wimp_OpenWindow",,block
��
�
�	��all
�front=block!28
�2x1=block!4-94:x2=x1+248:y1=block!8:y2=block!16
�size=x2-x1
�1!icond=toolbox%:ș"Wimp_GetWindowInfo",,icond
�� x1<0 � x1=0:x2=size
 5icond!4=x1:icond!8=y2-570:icond!12=x2:icond!16=y2
 -icond!28=front:ș"Wimp_OpenWindow",,icond
 �
 &-!icond=bar%:ș"Wimp_GetWindowInfo",,icond
 09icond!4=bar1:icond!8=bar2:icond!12=bar3:icond!16=bar4
 :icond!20=bar6
 D0icond!28=toolbox%:ș"Wimp_OpenWindow",,icond
 N,block!28=bar%:ș"Wimp_OpenWindow",,block
 X�
 b
 l ��adjustwin(newxmax,newymin)
 v-!icond=bar%:ș"Wimp_GetWindowInfo",,icond
 �icond!52=newxmax
 �$ș"Wimp_SetExtent",bar%,icond+44
 �.!icond=main%:ș"Wimp_GetWindowInfo",,icond
 �%icond!48=newymin:icond!52=newxmax
 �%ș"Wimp_SetExtent",main%,icond+44
 �6!icond=bar%:icond!4=0:ș"Wimp_GetIconState",,icond
 �ș"Wimp_DeleteIcon",,icond
 �0icond=icond+4:icond!12=newxmax+2:!icond=bar%
 �%ș"Wimp_CreateIcon",0,icond � ic%
 ��
 �
 ���toolbox(flag)
 �;� flag=-1 � !block=toolbox%:ș"Wimp_CloseWindow",,block
!� flag=1 �
!!block=main%
!"ș"Wimp_GetWindowState",,block
! open=block!32 � (1<<16)
!*"� open<>0 � !icond=main%:�pane
!4�
!>�
!H
!R��error(err$)
!\M!icond=0:$(icond+4)=err$+"."+" Press OK to continue or Cancel to quit"+�0
!f3ș"Wimp_ReportError",icond,3,"!DiskTree" � ,but
!pA� but=2 � șreinter,mytask%:ș"Wimp_CloseDown",task,mytask%:�
!z�
!�
!���areyousure
!�
� saved �
!��openwin(quit%)
!�� 7
!�1�info(quit%,1,"Your file has been modified.")
!�M!block=130:block!4=131:block!8=-1:ș"OS_ReadVduVariables",block,block+128
!�%ș"OS_ReadModeVariable",�,4 � ,,x
!�%ș"OS_ReadModeVariable",�,5 � ,,y
!�9ȗ ȓ 0,0,(((block!128)+1)*2^x)-1,((block!132)+1)*2^y
!��
!�A� � saved șreinter,mytask%:ș"Wimp_CloseDown",task,mytask%:�
!��
"
"��query(qu$)
"�openwin(query%)
"$� 7
".!block=query%
"8!ș"Wimp_GetWindowInfo",,block
"Bworkx%=block!12-block!4
"Lworky%=block!16-block!8
"V'ȗ ȓ block!4,block!8,workx%,worky%
"`�info(query%,1,qu$)
"j�
"t
"~
��endq
"��close(query%)
"�M!block=130:block!4=131:block!8=-1:ș"OS_ReadVduVariables",block,block+128
"�%ș"OS_ReadModeVariable",�,4 � ,,x
"�%ș"OS_ReadModeVariable",�,5 � ,,y
"�9ȗ ȓ 0,0,(((block!128)+1)*2^x)-1,((block!132)+1)*2^y
"��
"�
"���close(!block)
"�ș"Wimp_CloseWindow",,block
"��
"�
"���dragspr(flag)
#� dragspr �
#

Ȏ flag �
#� 1:
#;!block=winsave%:block!4=2:ș "Wimp_GetIconState",,block
#(,block!8=0:block!12=0:$(block!32)=dindir$
#2!ș "Wimp_SetIconState",,block
#<ș "DragASprite_Stop"
#F	� -1:
#P;!block=winsave%:block!4=2:ș "Wimp_GetIconState",,block
#Zdindir$=$(block!32)
#d(block!8=0:block!12=0:$(block!32)=�13
#n!ș "Wimp_SetIconState",,block
#x�
#��
#��
#�
#���newtree(file$)
#�%� block!40=4096 � block!40=8192 �
#�path$=file$+"."
#��info(new%,1,path$)
#��openwin(new%)
#��
#��
#�path$=�getleaf(file$)
#�#path$=�file$,�(file$)-�(path$))
#��info(new%,1,path$)
$�
$
$��dragnew(path$)
$"+block!40=4096:path$=�path$,�(path$)-10)
$,�newtree(path$)
$6�
$@
$J��drive0
$T=ș"OS_FSControl",37,"ADFS::0.$",tblk,0,0,1024 � ,,,,,tlen
$^'�info(new%,1,�$tblk,1024-tlen)+".")
$h�
$r
$|��go
$�L� ct=maxno � �mess("There is no me free trees available in this file"):�
$�#arcx=0:prearcx=-1:arcs=�:apps=�
$� arcs=� �checkflag(new%,0,21)
$� apps=� �checkflag(new%,3,21)
$�root$=$�info(new%,1)
$�D� root$="" � �mess("You have not entered a path to catalogue"):�
$�root$=�root$,�(root$)-1)
$�ș"OS_File",20,root$ � type
$�C� type<>2 � �mess("The path to catalogue has not been found"):�
$�
Ȏ arcs �
$�� �:
$�$tblk="ArcFS"
$�ș"XOS_Module",18,tblk � r0
%� r0<>18 �
%�� �ask("ArcFS not present. Only able to create trees of archives if ArcFS is present. Continue without archives?")=1 � arcs=�:� �close(new%):�
%�
%&�
%0 ș"XOS_File",13,root$ � type
%:`� type<2 � type>3  � �query("Path to create tree from is not a directory/does not exist."):�
%Dendlisty=0:nlen=0:stop=�
%NbotLED=%10:totsize=0
%Xcount=0
%b	ct+=1
%lș"Hourglass_On"
%v(ș"OS_Heap",1,heap% � ,,membuf,tfree
%�membuf=membuf-1024
%�� membuf<1024 �
%�%ș"Wimp_SlotSize",-1,-1 � current
%�)ș"Wimp_SlotSize",current+(8*1024),-1
%�!ș"Wimp_SlotSize",-1,-1 � new
%�change=new-current
%�ș"OS_Heap",5,heap%,,change
%�hsizeb+=change
%�membuf+=change
%��
%�,ș"OS_Heap",2,heap%,,membuf � ,,tree(ct)
%�object=0
%�endtext%=tree(ct)
&dir$=""
&x=0
&lastdir(0)=0
& start=�
&*�
&4object=lastdir(x)
&>�gotree
&H� stop � �
&R� endlisty=1 � �
&\�
&fdir$=�dir$,(�dir$)-1)
&p� �dir$,�dir$)="."
&zdir$=�dir$,(�dir$)-1)
&�� �
&��
&�
&���gotree
&��
&�Aș"OS_GBPB",10,root$+dir$,buffer,1,object,63 � ,,,reader,last
&�� last<>-1 �
&�file$=""
&�buff=20
&��
&�file$+=�buffer?buff
&�buff+=1
&��buffer?buff=0
')� �file$,1)=�0 file$=�file$,�file$-1)
'length=buffer!8
'type=buffer!16
'$<ș"OS_File",20,root$+dir$+"."+file$ � type,,,,,,filetype
'.=� filetype=4096 � filetype=8192 � length=-1 � length=2048
'8� type=2 ext$="�" � ext$=�0
'B9� filetype=4096 � type=3 � filet$="DDC":filetype=&DDC
'L#� arcs � filetype=&DDC ext$="�"
'V nlent=�(dir$+file$)-x+1+arcx
'`� nlent>nlen � nlen=nlent
'jpredicted=endtext%-tree(ct)
't"� predicted>membuf-1024 � �mem
'~� stop � �
'�fi$=�fulls(file$,10)
'�%di$=�fulls(�((�dir$)-x+arcx+1),3)
'�leng$=�fulls(�length,7)
'�filet$=�~filetype
'�"� filetype=4096 � filet$="DIR"
'�"� filetype=8192 � filet$="APP"
'�5� �(filet$)<3 � �:filet$="0"+filet$:� �(filet$)=3
'�'$endtext%=di$+fi$+ext$+leng$+filet$
'�endtext%+=24
'�totsize+=length
'�
object+=1
'�count+=1
(*� botLED=%01 � botLED=%10 � botLED=%01
(
!ș"Hourglass_LEDs",%11,botLED
(� arcs � filetype=&DDC �
(Xprearcroot$=root$:prearcdir$=dir$:prearclast=object:lastdir(x)=object:prearcx=x:x+=1
((*�("OpenArchive "+root$+dir$+"."+file$)
(2Rroot$="ArcFS#"+file$+":$":arcname$=file$:object=0:arcx=�(dir$+file$)+1:dir$=""
(<1arcct+=1:arc$(arcct)=file$+","+�count+","+�ct
(F�
(PG� filetype=4096 dir$=dir$+"."+file$:lastdir(x)=object:x+=1:object=0
(ZN� filetype=8192 � apps dir$=dir$+"."+file$:lastdir(x)=object:x+=1:object=0
(d�
(n� reader=0
(xx-=1
(�"� x=-1 � prearcx=-1 �endoflist
(��� x=prearcx � prearcx>-1 � x=prearcx:root$=prearcroot$:dir$=prearcdir$:object=prearclast:lastdir(x)=object:prearcx=-1:arcx=0:�("CloseArchive "+arcname$):�gotree
(�� endlisty=1 � �
(��
(�
(���endoflist
(�finish=�-start
(�+$endtext%=�17+�totsize+�18+�finish+�255
(�#endtext%+=�(�totsize+�finish)+3
(�tsize(ct)=endtext%-tree(ct)
(�9tcount(ct)=count:tlen(ct)=nlen:st=ct:troot$(ct)=root$
(�*ș"OS_Heap",6,heap%,tree(ct) � ,,,curb
(�@ș"OS_Heap",4,heap%,tree(ct),(tsize(ct)-curb)+8 � ,,tree(ct)
)ș"Hourglass_Smash"
)endlisty=1
)+!block=new%:ș"Wimp_CloseWindow",,block
)"-!block=tinfo%:ș"Wimp_CloseWindow",,block
),-!block=finfo%:ș"Wimp_CloseWindow",,block
)6-!block=iinfo%:ș"Wimp_CloseWindow",,block
)@�info(finfo%,1,�(ct+1))
)J#�info(finfo%,2,�(hsizeb-tfree))
)T<� $�info(finfo%,0)="None" � �info(finfo%,0,"<Untitled>")
)^� saved=� �
)hsaved=�
)r!icond=main%
)|!ș"Wimp_GetWindowInfo",,icond
)� $(icond!76)=$(icond!76)+" *"
)�Fș"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
)��info(finfo%,3,"Yes")
)��
)�,!block=main%:ș"Wimp_CloseWindow",,block
)�"�newview:�openwin(main%):�pane
)��
)�
)�	��mem
)�)ș"OS_Heap",6,heap%,tree(ct) � ,,,ohs
)� ș"OS_ReadMemMapInfo" � page
)�%ș"Wimp_SlotSize",-1,-1 � current
)�%ș"Wimp_SlotSize",current+page,-1
*!ș"Wimp_SlotSize",-1,-1 � new
*change=new-current
*�� change=0 � �query("Out Of Memory. Free more memory and try again."):ct-=1:ș&1D,3,heap%,tree(ct):stop=�:ș"Hourglass_Smash":�
*&ș"OS_Heap",5,heap%,,change
*04ș"OS_Heap",4,heap%,tree(ct),change � ,,tree(ct)
*:)ș"OS_Heap",6,heap%,tree(ct) � ,,,nhs
*Dhsizeb+=change
*Nmembuf+=nhs-ohs
*X�
*b
*l��makearclist
*v � j=0 � maxno: arc$(j)="": �
*�
aind=0
*�� j=0 � ct
*� � count=0 � tcount(j)
*� index=count*24
*�
 type$=""
*�  � h=21 � 23
*�!  type$+=�(tree(j)?(index+h))
*�  �
*� � type$="DDC" �
*�  t$=""
*�  � h=3 � 12
*�  val=tree(j)?(index+h)
*�  � val<>0 � t$+=�val
+  �
+B  � aind<maxno � arc$(aind)=t$+","+�(count+1)+","+�(j):aind+=1
+  �
+  � count
+*� j
+4arcct=aind-1
+>�
+H
+R
��last
+\� st=0 � �
+f	st-=1
+p,!block=main%:ș"Wimp_CloseWindow",,block
+z�newview
+��openwin(main%)
+��close(find%)
+��close(iinfo%)
+��close(tinfo%)
+��close(notfnd%)
+��close(found%)
+�	�pane
+��
+�
+�
��next
+�� st=ct � �
+�	st+=1
+�,!block=main%:ș"Wimp_CloseWindow",,block
,�newview
,�openwin(main%)
,�close(find%)
,$�close(iinfo%)
,.�close(tinfo%)
,8�close(notfnd%)
,B�close(found%)
,L	�pane
,V�
,`
,j
��newview
,t� ct=-1 � �
,~�info(bar%,0,troot$(st))
,�tptr=tcount(st)*24+1
,�
sizeb$=""
,��
,�"sizeb$=sizeb$+�(tree(st)?tptr)
,�tptr+=1
,�� tree(st)?tptr=18
,�tptr+=1
,�finishs$=""
,��
,�&finishs$=finishs$+�(tree(st)?tptr)
,�tptr+=1
,�� tree(st)?tptr=255
-�info(tinfo%,0,troot$(st))
-
�info(tinfo%,1,�tcount(st))
-�info(tinfo%,2,�tsize(st))
-�info(tinfo%,3,sizeb$)
-(�info(tinfo%,7,finishs$)
-2.xalt=tlen(st)*16:yalt=0-(tcount(st)*36+40)
-<�adjustwin(xalt,yalt)
-F
itemno=-1
-P$�seticstate(find%,4,1<<22,1<<22)
-Z
depth=568
-d5� tcount(st)*36+40<depth � depth=tcount(st)*36+40
-nwidth=tlen(st)*16
-x� width>500 � width=500
-��
-�
-���selectitem
-�olditemno=itemno
-�ycoord=block!4
-�.!block=main%:ș"Wimp_GetWindowInfo",,block
-�workx%=block!4-block!20
-�worky%=block!16-block!24
-�ycoord=0-(block!16-ycoord)
-�ycoord=ycoord+block!24
-�!itemno=�((ycoord-40)/36)*-1-3
-�
itemst=st
-�� olditemno=itemno � �
.ycoord=0-(itemno*36+44)
.=ș"Wimp_ForceRedraw",main%,1,ycoord-32,tlen(st)*16,ycoord
.ycoord=0-(olditemno*36+44)
."=ș"Wimp_ForceRedraw",main%,1,ycoord-32,tlen(st)*16,ycoord
.,�putinfo(itemno)
.6$�seticstate(find%,4,1<<22,0<<22)
.@�
.J
.T��putinfo(itemno)
.^n=itemno*24
.h	t$=""
.r*� h=3 � 12:i=n+h:t$+=�(tree(st)?i):� h
.|'�info(iinfo%,0,troot$(st)+"..."+t$)
.�	t$=""
.�+� h=14 � 20:i=n+h:t$+=�(tree(st)?i):� h
.��info(iinfo%,4,t$)
.�	t$=""
.�+� h=21 � 23:i=n+h:t$+=�(tree(st)?i):� h
.�te$="&"+t$+"     ("+t$+")"
.�tblk=tt
.�5ș"XOS_FSControl",18,,�hextodec(t$) � r0,,r2%,r3%
.�
� r0=18 �
.�/tblk!0=r2%:tblk!4=r3%:tblk?8=13:type$=$tblk
.�te$=type$+" ("+t$+")"
.��
.�st$="sfile_"+t$
/0� t$="APP" � te$="Application   ":st$="sapp"
/0� t$="DIR" � te$="Directory     ":st$="sdir"
/!�indir(iinfo%,1,"","b0;"+st$)
/&�info(iinfo%,3,te$)
/0�
/:
/D��selection
/N olds1=s1:olds2=s2:olditem=ss
/Xycoord=block!4
/b.!block=main%:ș"Wimp_GetWindowInfo",,block
/lworkx%=block!4-block!20
/vworky%=block!16-block!24
/�ycoord=0-(block!16-ycoord)
/�ycoord=ycoord+block!24
/�ss=�((ycoord-40)/36)*-1-3
/�E�seticstate(save%,4,1<<22,1<<22):�seticstate(save%,4,1<<21,0<<21)
/�� olditem=ss �
/�s1=-1:s2=-1
/�ycoord=0-(olds1*36+44)
/�Eș"Wimp_ForceRedraw",main%,1,ycoord-(olds2*36),tlen(st)*16,ycoord
/��
/��
/�gap=s2-s1:gap=gap/2
/�� s1=-1 � s1=ss
/�� ss>s1+gap � s2=ss
0� ss<s1 � s1=ss
0� ss<s1+gap � s1=ss
0� ss=s1+gap � s2=ss
0 '� s1>s2 � s2>-1 � sc=s2:s1=s2:s2=sc
0*6� s1>-1 � s2>-1 � �seticstate(save%,4,1<<22,0<<22)
04ycoord=0-(olds1*36+44)
0>Eș"Wimp_ForceRedraw",main%,1,ycoord-(olds2*36),tlen(st)*16,ycoord
0Hycoord=0-(s1*36+44)
0RBș"Wimp_ForceRedraw",main%,1,ycoord-(s2*36),tlen(st)*16,ycoord
0\�
0f
0p%��indir(handle,icon,text$,indir$)
0z;!block=handle:block!4=icon:ș"Wimp_GetIconState",,block
0�=$(block!28)=text$:$(block!32)=indir$:block!36=�(indir$)+1
0�block!8=0:block!12=0
0� ș"Wimp_SetIconState",,block
0��
0�
0���scroll
0�(pagesize=�((block!16-block!8-40)/36)
0�5� block!32=1 � block!20=block!20+(tlen(st)*16)/10
0�6� block!32=-1 � block!20=block!20-(tlen(st)*16)/10
0�<� block!36=1 � topno=�(block!24/36):block!24=topno*36+36
0�� block!36=-1 � ycoord=0-(block!16-block!8)+block!24:botno=�((ycoord-40)/36)*-1-3:botno=botno*36+36+40:block!24-=ycoord+botno
0�4� block!32=2 � block!20=block!20+(tlen(st)*16)/5
0�5� block!32=-2 � block!20=block!20-(tlen(st)*16)/5
1I� block!36=2 � topno=�(block!24/36)*-1:block!24=0-(topno-pagesize)*36
1�� block!36=-2 � ycoord=(0-(block!16-block!8))+block!24:botno=�((ycoord-40)/36)*-1-3:botno=(botno+pagesize-1)*36+36+40:block!24-=ycoord+botno
1ș"Wimp_OpenWindow",,block
1$�
1.
18��delete(no)
1Bdone=-1
1L
� no=ct �
1V ș"OS_Heap",3,heap%,tree(ct)
1`)ș"OS_Heap",1,heap% � ,,largest,tfree
1j)ș"OS_Heap",5,heap%,,0-(largest-1024)
1t hsizeb=hsizeb-(largest-1024)
1~	ct-=1
1�
done=1
1��
1�� no<>ct � done=-1 �
1�� j=no � ct
1�ș"OS_Heap",3,heap%,tree(j)
1��
1�� j=no � ct-1
1�/ș"OS_Heap",2,heap%,,tsize(j+1) � ,,tree(j)
1� � I=0 � tsize(j+1) � 4
1� tree(j)!I=tree(j+1)!I
1� � I
1�-tsize(j)=tsize(j+1):tcount(j)=tcount(j+1)
2+tlen(j)=tlen(j+1):troot$(j)=troot$(j+1)
2
� j
2	ct-=1
2)ș"OS_Heap",1,heap% � ,,largest,tfree
2()ș"OS_Heap",5,heap%,,0-(largest-1024)
22 hsizeb=hsizeb-(largest-1024)
2<�
2F ș"OS_ReadMemMapInfo" � page
2P%ș"Wimp_SlotSize",-1,-1 � current
2Z� largest>page �
2d&amount=�((largest-1024)/page)*page
2n>� current-amount<=origappsize � amount=current-origappsize
2x'ș"Wimp_SlotSize",current-amount,-1
2��
2�� ct=-1 � �clearall:�
2�� st>=no � st-=1
2�� st=-1 � st=0
2��info(finfo%,1,�(ct+1))
2�#�info(finfo%,2,�(hsizeb-tfree))
2�� saved=� �
2��info(finfo%,3,"Yes")
2�saved=�
2�!icond=main%
2�!ș"Wimp_GetWindowInfo",,icond
2� $(icond!76)=$(icond!76)+" *"
2�Fș"Wimp_ForceRedraw",-1,block!4,(block!16)-32,block!12,block!16+36
3�
3,!block=main%:ș"Wimp_CloseWindow",,block
3arclisted=�
3""�newview:�openwin(main%):�pane
3,�
36
3@��clearall
3J
� ct>-1 �
3T� I=0 � ct
3^ș"OS_Heap",3,heap%,tree(I)
3h�
3r)ș"OS_Heap",1,heap% � ,,largest,tfree
3|)ș"OS_Heap",5,heap%,,0-(largest-1024)
3�ș"Wimp_SlotSize",orig,-1
3��
3�)ș"OS_Heap",1,heap% � ,,largest,tfree
3�hsizeb=largest
3�	ct=-1
3�.!block=main%:ș"Wimp_GetWindowInfo",,block
3�$(block!76)="<Untitled>"
3�ș"Wimp_CloseWindow",,block
3��info(finfo%,0,"None")
3��info(finfo%,1,"0")
3��info(finfo%,2,"0")
3��info(finfo%,3,"No")
3�saved=�
4+!block=new%:ș"Wimp_CloseWindow",,block
4-!block=tinfo%:ș"Wimp_CloseWindow",,block
4-!block=finfo%:ș"Wimp_CloseWindow",,block
4&-!block=iinfo%:ș"Wimp_CloseWindow",,block
40+!block=bar%:ș"Wimp_CloseWindow",,block
4:/!block=toolbox%:ș"Wimp_CloseWindow",,block
4Dst=0
4Narclisted=�
4X�
4b
4l��opentree(no)
4v	st=no
4��newview
4�,!block=main%:ș"Wimp_CloseWindow",,block
4��openwin(main%):�pane
4��
4�
4���openarc(no)
4�use$=arc$(no)
4�str$=�use$,�use$,","))
4�#numb$=�use$,�(use$)-�use$,","))
4�oct$=�numb$,�numb$,",")-1)
4�x$=�numb$,�numb$-�oct$-1)
4�origt=st
4�st=�(x$)
5�goto(�(oct$)-1)
5�
5
5 ��goto(ino)
5*�info(bar%,0,troot$(st))
54tptr=tcount(st)*24+1
5>
sizeb$=""
5H�
5R$  sizeb$=sizeb$+�(tree(st)?tptr)
5\
  tptr+=1
5f� tree(st)?tptr=18
5ptptr+=1
5zfinishs$=""
5��
5�(  finishs$=finishs$+�(tree(st)?tptr)
5�
  tptr+=1
5�� tree(st)?tptr=255
5��info(tinfo%,0,troot$(st))
5��info(tinfo%,1,�tcount(st))
5��info(tinfo%,2,�tsize(st))
5��info(tinfo%,3,sizeb$)
5��info(tinfo%,7,finishs$)
5�(� uptot>-1 � uptot<>origt � �newview
5�,!block=main%:ș"Wimp_CloseWindow",,block
5��openwin(main%):�pane
5�.!block=main%:ș"Wimp_GetWindowInfo",,block
6workx%=block!4-block!20
6worky%=block!16-block!24
6ycoord=0-(itemno*36+44)
6$itemno=ino
6.!block!24=0-((itemno-2)*36+44)
68ș"Wimp_OpenWindow",,block
6B=ș"Wimp_ForceRedraw",main%,1,ycoord-32,tlen(st)*16,ycoord
6L�
6V
6`
��find
6j�close(find%)
6t�close(found%)
6~$� �checkflag(find%,1,21) � opt=1
6�$� �checkflag(find%,6,21) � opt=2
6�$� �checkflag(find%,9,21) � opt=3
6�
from=0
6�J� �checkflag(find%,17,21) � sttree=st:endtree=st � sttree=0:endtree=ct
6�B� �checkflag(find%,4,21) � from>-1 � from=itemno:sttree=itemst
6�origt=st
6�� � found �
6�nonefnd=-1
6�totalcnt=0
6�� n=sttree � endtree
6�totalcnt=+tcount(n)
6�� n
7nowon=0
7
�
7Ȏ opt �
7� 1:
7(search$=$�info(find%,2)
72 tex$=search$:tex2$="Name :-"
7<search$=�fulls(search$,10)
7Fcase=�checkflag(find%,3,21)
7P%� � case � search$=�caps(search$)
7Z4� found � �checkflag(find%,18,21) � sttree=uptot
7d� ontree=sttree � endtree
7n!� found � from=upto+1:found=�
7x
st=ontree
7�
n=from*24
7�ș"Hourglass_On"
7�� I=from � tcount(st)
7�
 nowon+=1
7�
 t$=""
7� � h=3 � 12
7�
 i=n+h
7� t$+=�(tree(st)?i)
7� � h
7� � � case � t$=�caps(t$)
7�] � t$=search$ � ș"Hourglass_Smash":nonefnd=1:upto=I:uptot=ontree:�goto(I):�found(I,st):�
7�
 n+=24
7�0 ș"Hourglass_Percentage",nowon/totalcnt*100
8� I
8from=0:upto=0
8� ontree
8"ș"Hourglass_Smash"
8,�
86� 2:
8@Search$=$�info(find%,7)
8J� �Search$,1)="&" �
8Tsearch$=Search$
8^"search$=�search$,�(search$)-1)
8h&� �search$>3 � search$=�search$,3)
8r,� �search$<3 � search$=�longs(search$,3)
8|$tex$="&"+search$:tex2$="Type :-"
8��
8�� �Search$,1)<>"&" �
8�search$=Search$
8�/ș"XOS_FSControl",31,search$ � r0,,filetype
8�Q� r0<>31 � �mess("File type not recognised; Try entering file type number"):�
8�search$=�~filetype
8�,� �search$<3 � search$=�longs(search$,3)
8�$tex$="&"+search$:tex2$="Type :-"
8��
8�4� found � �checkflag(find%,18,21) � sttree=uptot
8� � ontree=sttree � endtree
8�" � found � from=upto+1:found=�
8� st=ontree
9 n=from*24
9 ș"Hourglass_On"
9 � I=from � tcount(st)
9&  nowon+=1
90  t$=""
9:  � h=21 � 23
9D  i=n+h
9N  t$+=�(tree(st)?i)
9X	  � h
9b^  � t$=search$ � ș"Hourglass_Smash":nonefnd=1:upto=I:uptot=ontree:�goto(I):�found(I,st):�
9l  n+=24
9v1  ș"Hourglass_Percentage",nowon/totalcnt*100
9� � I
9�from=0:upto=0
9�� ontree
9�ș"Hourglass_Smash"
9��
9�� 3:
9�search$=$�info(find%,11)
9�search2$=$�info(find%,12)
9�search=�(search$)*1000
9�search2=�(search2$)*1000
9�.tex$=�((search+search2)/2):tex2$="Size :-"
9�search$=�fulls(search$,10)
9�4� found � �checkflag(find%,18,21) � sttree=uptot
:� ontree=sttree � endtree
:!� found � from=upto+1:found=�
:
st=ontree
: 
n=from*24
:*ș"Hourglass_On"
:4� I=from � tcount(st)
:>
 nowon+=1
:H
 t$=""
:R � h=14 � 20
:\
 i=n+h
:f t$+=�(tree(st)?i)
:p � h
:z t=�(t$)
:�g � t>search � t<search2 � ș"Hourglass_Smash":nonefnd=1:upto=I:uptot=ontree:�goto(I):�found(I,st):�
:�
 n+=24
:�0 ș"Hourglass_Percentage",nowon/totalcnt*100
:�� I
:�from=0:upto=0
:�� ontree
:�ș"Hourglass_Smash"
:��
:��
:�st=origt
:��info(notfnd%,1,tex$)
:��info(notfnd%,2,tex2$)
:��openwin(notfnd%)
;found=�
;�
;
;$��found(item,trno)
;.
n=item*24
;8	t$=""
;B*� h=3 � 12:i=n+h:t$+=�(tree(st)?i):� h
;L�info(found%,3,t$)
;V	t$=""
;`4� h=14 � 20:i=n+h:t$+=�(tree(st)?i):� h:size$=t$
;j	t$=""
;t+� h=21 � 23:i=n+h:t$+=�(tree(st)?i):� h
;~te$="&"+t$+"     ("+t$+")"
;�tblk=tt
;�6ș"XOS_ReadVarVal","File$Type_"+t$,tblk,512 � ,,br
;�
� br<>0 �
;�type$=""
;�� s=0 � br-1
;�type$+=�tblk?s
;�� s
;�� �(type$)<8 �
;��
;�type$=type$+" "
;�� �(type$)=8
;��
<te$=type$+" ("+t$+")"
<
�
<st$="sfile_"+t$
<0� t$="APP" � te$="Application   ":st$="sapp"
<(0� t$="DIR" � te$="Directory     ":st$="sdir"
<2!�indir(found%,1,"","b0;"+st$)
<<C� opt=1 � opt=2 �info(found%,2,"Type"):�info(found%,4,te$):�te$
<F8� opt=3 �info(found%,2,"Size"):�info(found%,4,size$)
<P�openwin(found%)
<Zfound=�
<d�putinfo(item)
<n�
<x
<�ݤhextodec(string$)
<�total=0
<�strlen=�string$
<�� I=strlen-1 � 0 � -1
<�  next$=�string$,1)
<�  val=-1
<�  � next$="0" � val=0
<�  � next$="1" � val=1
<�  � next$="2" � val=2
<�  � next$="3" � val=3
<�  � next$="4" � val=4
<�  � next$="5" � val=5
<�  � next$="6" � val=6
=  � next$="7" � val=7
=  � next$="8" � val=8
=  � next$="9" � val=9
="&  � next$="A" � next$="a" � val=10
=,&  � next$="B" � next$="b" � val=11
=6&  � next$="C" � next$="c" � val=12
=@&  � next$="D" � next$="d" � val=13
=J&  � next$="E" � next$="e" � val=14
=T&  � next$="F" � next$="f" � val=15
=^  � val=-1 � val=0
=h  total+=val*16^I
=r$  string$=�string$,�(string$)-1)
=|�
=�
=total
�
00000000  0d 00 0a 24 ee 20 85 20  f2 6d 65 73 73 28 f6 24  |...$. . .mess(.$|
00000010  2b 22 20 3a 20 61 74 20  6c 69 6e 65 20 22 2b c3  |+" : at line "+.|
00000020  9e 29 3a e0 0d 00 14 1d  f4 20 2a 3e 24 2e 21 44  |.):...... *>$.!D|
00000030  69 73 6b 54 72 65 65 2e  21 52 75 6e 49 6d 61 67  |iskTree.!RunImag|
00000040  65 0d 00 1e 3a f4 20 2a  4d 61 69 6e 20 50 72 6f  |e...:. *Main Pro|
00000050  67 72 61 6d 20 66 6f 72  20 21 44 69 73 6b 54 72  |gram for !DiskTr|
00000060  65 65 20 2d 20 44 69 72  65 63 74 6f 72 79 20 54  |ee - Directory T|
00000070  72 65 65 20 43 72 65 61  74 6f 72 0d 00 28 1f f4  |ree Creator..(..|
00000080  20 2a 56 65 72 73 69 6f  6e 20 31 2e 30 38 20 28  | *Version 1.08 (|
00000090  31 20 46 65 62 20 27 39  36 29 0d 00 32 1a f4 20  |1 Feb '96)..2.. |
000000a0  2a 41 75 74 68 75 72 20  a9 20 4a 2e 20 52 6f 62  |*Authur . J. Rob|
000000b0  62 69 6e 73 0d 00 3c 0d  6d 61 78 6e 6f 3d 31 35  |bins..<.maxno=15|
000000c0  30 0d 00 46 45 de 20 62  6c 6f 63 6b 20 26 31 30  |0..FE. block &10|
000000d0  30 30 2c 20 6d 65 6e 75  25 20 32 30 34 38 2c 20  |00, menu% 2048, |
000000e0  63 75 72 62 75 66 25 20  37 2a 31 30 32 34 2c 20  |curbuf% 7*1024, |
000000f0  69 63 6f 6e 64 20 32 30  34 38 2c 20 6d 62 6c 6f  |icond 2048, mblo|
00000100  63 6b 20 32 35 36 0d 00  50 33 de 20 6c 6f 6e 67  |ck 256..P3. long|
00000110  64 61 74 61 20 28 6d 61  78 6e 6f 2a 31 33 29 2b  |data (maxno*13)+|
00000120  32 34 2c 20 6c 6f 6e 67  6d 65 6e 20 28 6d 61 78  |24, longmen (max|
00000130  6e 6f 2a 32 34 29 2b 34  38 0d 00 5a 32 de 20 74  |no*24)+48..Z2. t|
00000140  72 65 65 28 6d 61 78 6e  6f 29 2c 6c 61 73 74 64  |ree(maxno),lastd|
00000150  69 72 28 32 35 36 29 2c  62 75 66 66 65 72 20 36  |ir(256),buffer 6|
00000160  33 2c 74 62 6c 6b 20 31  30 32 34 0d 00 64 46 de  |3,tblk 1024..dF.|
00000170  20 74 73 69 7a 65 28 6d  61 78 6e 6f 29 2c 74 63  | tsize(maxno),tc|
00000180  6f 75 6e 74 28 6d 61 78  6e 6f 29 2c 74 6c 65 6e  |ount(maxno),tlen|
00000190  28 6d 61 78 6e 6f 29 2c  74 72 6f 6f 74 24 28 6d  |(maxno),troot$(m|
000001a0  61 78 6e 6f 29 2c 61 72  63 24 28 6d 61 78 6e 6f  |axno),arc$(maxno|
000001b0  29 0d 00 6e 19 65 6e 64  62 75 66 25 3d 63 75 72  |)..n.endbuf%=cur|
000001c0  62 75 66 25 2b 26 36 30  30 30 0d 00 78 4c 65 6e  |buf%+&6000..xLen|
000001d0  64 25 3d 2d 31 3a 74 6f  6f 6c 73 6f 6e 3d b9 3a  |d%=-1:toolson=.:|
000001e0  71 75 69 74 69 6e 67 3d  a3 3a 74 6f 74 61 6c 6c  |quiting=.:totall|
000001f0  65 6e 3d 30 3a 66 6f 75  6e 64 3d a3 3a 75 70 74  |en=0:found=.:upt|
00000200  6f 3d 2d 31 3a 75 70 74  6f 74 3d 2d 31 3a 6f 6c  |o=-1:uptot=-1:ol|
00000210  64 73 74 3d 2d 31 0d 00  82 3e 73 61 76 65 64 3d  |dst=-1...>saved=|
00000220  a3 3a 70 72 65 71 75 69  74 77 61 69 74 3d a3 3a  |.:prequitwait=.:|
00000230  70 72 65 71 75 69 74 3d  a3 3a 73 65 6c 3d 2d 31  |prequit=.:sel=-1|
00000240  3a 74 74 3d 74 62 6c 6b  3a 61 72 63 6c 69 73 74  |:tt=tblk:arclist|
00000250  65 64 3d a3 0d 00 8c 4c  69 6e 3d a3 3a 73 74 61  |ed=....Lin=.:sta|
00000260  72 74 65 64 3d 30 3a 63  74 3d 2d 31 3a 61 72 63  |rted=0:ct=-1:arc|
00000270  63 74 3d 2d 31 3a 77 69  64 74 68 3d 2d 31 3a 69  |ct=-1:width=-1:i|
00000280  74 65 6d 6e 6f 3d 2d 31  3a 72 63 3d 2d 31 3a 73  |temno=-1:rc=-1:s|
00000290  31 3d 2d 31 3a 73 32 3d  2d 31 3a 73 73 3d 2d 31  |1=-1:s2=-1:ss=-1|
000002a0  0d 00 96 12 74 61 73 6b  3d 26 34 42 35 33 34 31  |....task=&4B5341|
000002b0  35 34 0d 00 a0 40 c8 99  20 22 57 69 6d 70 5f 49  |54...@.. "Wimp_I|
000002c0  6e 69 74 69 61 6c 69 73  65 22 2c 32 30 30 2c 74  |nitialise",200,t|
000002d0  61 73 6b 2c 22 21 44 69  73 6b 54 72 65 65 22 20  |ask,"!DiskTree" |
000002e0  b8 20 76 65 72 73 69 6f  6e 25 2c 6d 79 74 61 73  |. version%,mytas|
000002f0  6b 25 0d 00 aa 24 c8 99  20 22 57 69 6d 70 5f 43  |k%...$.. "Wimp_C|
00000300  6c 61 69 6d 49 6e 74 65  72 66 61 63 65 22 2c 6d  |laimInterface",m|
00000310  79 74 61 73 6b 25 0d 00  b4 12 72 65 69 6e 74 65  |ytask%....reinte|
00000320  72 3d 26 38 31 36 38 33  0d 00 be 0d f2 74 65 6d  |r=&81683.....tem|
00000330  70 6c 61 74 65 0d 00 c8  53 c8 99 22 58 4f 53 5f  |plate...S.."XOS_|
00000340  52 65 61 64 56 61 72 56  61 6c 22 2c 22 44 54 72  |ReadVarVal","DTr|
00000350  65 65 24 44 72 61 67 22  2c 62 6c 6f 63 6b 2c 32  |ee$Drag",block,2|
00000360  35 36 2c 30 2c 30 20 b8  20 2c 2c 6c 65 6e 3a 62  |56,0,0 . ,,len:b|
00000370  6c 6f 63 6b 3f 6c 65 6e  3d 31 33 3a 64 72 61 67  |lock?len=13:drag|
00000380  24 3d 24 62 6c 6f 63 6b  0d 00 d2 2a e7 20 64 72  |$=$block...*. dr|
00000390  61 67 24 3d 22 54 52 55  45 22 20 8c 20 64 72 61  |ag$="TRUE" . dra|
000003a0  67 73 70 72 3d b9 20 8b  20 64 72 61 67 73 70 72  |gspr=. . dragspr|
000003b0  3d a3 0d 00 dc 0b 65 6e  76 24 3d 22 22 0d 00 e6  |=.....env$=""...|
000003c0  19 c8 99 20 22 4f 53 5f  47 65 74 45 6e 76 22 20  |... "OS_GetEnv" |
000003d0  b8 20 65 6e 76 24 0d 00  f0 16 e7 20 a7 65 6e 76  |. env$..... .env|
000003e0  24 2c 22 2d 71 75 69 74  22 29 20 8c 0d 00 fa 12  |$,"-quit") .....|
000003f0  49 25 3d a7 65 6e 76 24  2c 22 22 22 22 29 0d 01  |I%=.env$,"""")..|
00000400  04 17 49 25 3d a7 65 6e  76 24 2c 22 22 22 22 2c  |..I%=.env$,"""",|
00000410  49 25 2b 31 29 0d 01 0e  05 f5 0d 01 18 09 49 25  |I%+1).........I%|
00000420  2b 3d 31 0d 01 22 16 fd  20 c1 65 6e 76 24 2c 49  |+=1..".. .env$,I|
00000430  25 2c 31 29 3c 3e 22 20  22 0d 01 2c 12 65 6e 76  |%,1)<>" "..,.env|
00000440  24 3d c1 65 6e 76 24 2c  49 25 29 0d 01 36 05 cd  |$=.env$,I%)..6..|
00000450  0d 01 40 10 69 6e 69 74  69 63 3d a4 69 63 6f 6e  |..@.initic=.icon|
00000460  0d 01 4a 22 c8 99 22 57  69 6d 70 5f 53 6c 6f 74  |..J".."Wimp_Slot|
00000470  53 69 7a 65 22 2c 2d 31  2c 2d 31 20 b8 20 6f 72  |Size",-1,-1 . or|
00000480  69 67 0d 01 54 20 6d 61  78 3d 93 2d e0 3a 6d 61  |ig..T max=.-.:ma|
00000490  78 3d a8 28 6d 61 78 2f  31 30 32 34 29 2a 31 30  |x=.(max/1024)*10|
000004a0  32 34 0d 01 5e 0e 6d 61  78 2d 3d 26 34 30 30 30  |24..^.max-=&4000|
000004b0  0d 01 68 1b 65 6e 64 25  3d a3 3a 64 72 61 67 25  |..h.end%=.:drag%|
000004c0  3d 30 3a 64 72 69 76 65  25 3d 30 0d 01 72 25 c8  |=0:drive%=0..r%.|
000004d0  99 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  |."Wimp_SlotSize"|
000004e0  2c 2d 31 2c 2d 31 20 b8  20 63 75 72 72 65 6e 74  |,-1,-1 . current|
000004f0  0d 01 7c 1e d3 3d 93 2d  6d 61 78 3a 68 73 69 7a  |..|..=.-max:hsiz|
00000500  65 62 3d 6d 61 78 3a 68  65 61 70 25 3d 93 0d 01  |eb=max:heap%=...|
00000510  86 15 e7 20 68 73 69 7a  65 62 3c 31 30 32 34 20  |... hsizeb<1024 |
00000520  8c 20 e0 0d 01 90 1f c8  99 22 4f 53 5f 48 65 61  |. ......."OS_Hea|
00000530  70 22 2c 30 2c 68 65 61  70 25 2c 2c 68 73 69 7a  |p",0,heap%,,hsiz|
00000540  65 62 0d 01 9a 27 6f 72  69 67 68 65 61 70 3d 68  |eb...'origheap=h|
00000550  73 69 7a 65 62 3a 6f 72  69 67 61 70 70 73 69 7a  |sizeb:origappsiz|
00000560  65 3d 63 75 72 72 65 6e  74 0d 01 a4 23 ee 20 85  |e=current...#. .|
00000570  20 f2 65 72 72 6f 72 28  f6 24 2b 22 20 3a 20 61  | .error(.$+" : a|
00000580  74 20 6c 69 6e 65 20 22  2b c3 9e 29 0d 01 ae 18  |t line "+..)....|
00000590  f2 69 6e 66 6f 28 62 61  72 25 2c 30 2c 22 4e 6f  |.info(bar%,0,"No|
000005a0  6e 65 22 29 0d 01 b8 18  f2 61 64 6a 75 73 74 77  |ne").....adjustw|
000005b0  69 6e 28 35 30 30 2c 2d  35 30 30 29 0d 01 c2 24  |in(500,-500)...$|
000005c0  f2 73 65 74 69 63 73 74  61 74 65 28 73 61 76 65  |.seticstate(save|
000005d0  25 2c 34 2c 31 3c 3c 32  32 2c 31 3c 3c 32 32 29  |%,4,1<<22,1<<22)|
000005e0  0d 01 cc 24 f2 73 65 74  69 63 73 74 61 74 65 28  |...$.seticstate(|
000005f0  66 69 6e 64 25 2c 34 2c  31 3c 3c 32 32 2c 31 3c  |find%,4,1<<22,1<|
00000600  3c 32 32 29 0d 01 d6 1a  e7 20 65 6e 76 24 3c 3e  |<22)..... env$<>|
00000610  22 22 20 f2 6c 6f 61 64  28 65 6e 76 24 29 0d 01  |"" .load(env$)..|
00000620  e0 05 f5 0d 01 ea 25 c8  99 22 57 69 6d 70 5f 50  |......%.."Wimp_P|
00000630  6f 6c 6c 22 2c 30 2c 62  6c 6f 63 6b 20 b8 20 65  |oll",0,block . e|
00000640  76 65 6e 74 63 6f 64 65  0d 01 f4 2d c8 99 20 22  |ventcode...-.. "|
00000650  57 69 6d 70 5f 50 6f 6c  6c 50 6f 69 6e 74 65 72  |Wimp_PollPointer|
00000660  22 2c 65 76 65 6e 74 63  6f 64 65 2c 2c 76 65 72  |",eventcode,,ver|
00000670  73 69 6f 6e 25 0d 01 fe  12 c8 8e 20 65 76 65 6e  |sion%...... even|
00000680  74 63 6f 64 65 20 ca 0d  02 08 34 c9 20 30 3a e7  |tcode ....4. 0:.|
00000690  20 ac 20 73 61 76 65 64  20 80 20 70 72 65 71 75  | . saved . prequ|
000006a0  69 74 20 c8 99 22 57 69  6d 70 5f 50 72 6f 63 65  |it .."Wimp_Proce|
000006b0  73 73 4b 65 79 22 2c 26  31 46 43 0d 02 12 18 c9  |ssKey",&1FC.....|
000006c0  20 31 3a f2 72 65 64 72  61 77 28 62 6c 6f 63 6b  | 1:.redraw(block|
000006d0  21 30 29 0d 02 1c 11 c9  20 32 3a f2 72 65 71 75  |!0)..... 2:.requ|
000006e0  65 73 74 32 0d 02 26 11  c9 20 33 3a f2 72 65 71  |est2..&.. 3:.req|
000006f0  75 65 73 74 33 0d 02 30  15 c9 20 36 3a f2 63 6c  |uest3..0.. 6:.cl|
00000700  69 63 6b 28 62 6c 6f 63  6b 29 0d 02 3a 0c c9 20  |ick(block)..:.. |
00000710  37 3a f2 6f 75 74 0d 02  44 10 c9 20 38 3a f2 70  |7:.out..D.. 8:.p|
00000720  72 6f 63 65 73 73 0d 02  4e 0f c9 20 39 3a f2 73  |rocess..N.. 9:.s|
00000730  65 6c 65 63 74 0d 02 58  10 c9 20 31 30 3a f2 73  |elect..X.. 10:.s|
00000740  63 72 6f 6c 6c 0d 02 62  16 c9 20 31 37 2c 31 38  |croll..b.. 17,18|
00000750  3a f2 6d 65 73 73 61 67  65 69 6e 0d 02 6c 05 cb  |:.messagein..l..|
00000760  0d 02 76 0a fd 20 65 6e  64 25 0d 02 80 08 f2 65  |..v.. end%.....e|
00000770  6e 64 0d 02 8a 05 e0 0d  02 94 04 0d 02 9e 09 dd  |nd..............|
00000780  f2 65 6e 64 0d 02 a8 15  c8 99 72 65 69 6e 74 65  |.end......reinte|
00000790  72 2c 6d 79 74 61 73 6b  25 0d 02 b2 23 c8 99 22  |r,mytask%...#.."|
000007a0  57 69 6d 70 5f 43 6c 6f  73 65 44 6f 77 6e 22 2c  |Wimp_CloseDown",|
000007b0  74 61 73 6b 2c 6d 79 74  61 73 6b 25 0d 02 bc 05  |task,mytask%....|
000007c0  e0 0d 02 c6 05 e1 0d 02  d0 04 0d 02 da 0e dd f2  |................|
000007d0  72 65 71 75 65 73 74 32  0d 02 e4 0e 77 69 6e 3d  |request2....win=|
000007e0  21 62 6c 6f 63 6b 0d 02  ee 11 e7 20 77 69 6e 3d  |!block..... win=|
000007f0  6d 61 69 6e 25 20 8c 0d  02 f8 13 21 69 63 6f 6e  |main% .....!icon|
00000800  64 3d 74 6f 6f 6c 62 6f  78 25 0d 03 02 23 c8 99  |d=toolbox%...#..|
00000810  20 22 57 69 6d 70 5f 47  65 74 57 69 6e 64 6f 77  | "Wimp_GetWindow|
00000820  53 74 61 74 65 22 2c 2c  69 63 6f 6e 64 0d 03 0c  |State",,icond...|
00000830  13 74 6f 6f 6c 32 38 3d  69 63 6f 6e 64 21 32 38  |.tool28=icond!28|
00000840  0d 03 16 10 21 69 63 6f  6e 64 3d 6d 61 69 6e 25  |....!icond=main%|
00000850  0d 03 20 23 c8 99 20 22  57 69 6d 70 5f 47 65 74  |.. #.. "Wimp_Get|
00000860  57 69 6e 64 6f 77 53 74  61 74 65 22 2c 2c 69 63  |WindowState",,ic|
00000870  6f 6e 64 0d 03 2a 0b 63  68 65 63 6b 3d 30 0d 03  |ond..*.check=0..|
00000880  34 20 e7 20 69 63 6f 6e  64 21 34 3c 3e 62 6c 6f  |4 . icond!4<>blo|
00000890  63 6b 21 34 20 8c 20 63  68 65 63 6b 3d 31 0d 03  |ck!4 . check=1..|
000008a0  3e 20 e7 20 69 63 6f 6e  64 21 38 3c 3e 62 6c 6f  |> . icond!8<>blo|
000008b0  63 6b 21 38 20 8c 20 63  68 65 63 6b 3d 31 0d 03  |ck!8 . check=1..|
000008c0  48 22 e7 20 69 63 6f 6e  64 21 31 32 3c 3e 62 6c  |H". icond!12<>bl|
000008d0  6f 63 6b 21 31 32 20 8c  20 63 68 65 63 6b 3d 31  |ock!12 . check=1|
000008e0  0d 03 52 22 e7 20 69 63  6f 6e 64 21 31 36 3c 3e  |..R". icond!16<>|
000008f0  62 6c 6f 63 6b 21 31 36  20 8c 20 63 68 65 63 6b  |block!16 . check|
00000900  3d 31 0d 03 5c 22 e7 20  69 63 6f 6e 64 21 32 30  |=1..\". icond!20|
00000910  3c 3e 62 6c 6f 63 6b 21  32 30 20 8c 20 63 68 65  |<>block!20 . che|
00000920  63 6b 3d 31 0d 03 66 22  e7 20 69 63 6f 6e 64 21  |ck=1..f". icond!|
00000930  32 34 3c 3e 62 6c 6f 63  6b 21 32 34 20 8c 20 63  |24<>block!24 . c|
00000940  68 65 63 6b 3d 31 0d 03  70 1b e7 20 62 6c 6f 63  |heck=1..p.. bloc|
00000950  6b 21 32 38 3d 2d 32 20  8c 20 63 68 65 63 6b 3d  |k!28=-2 . check=|
00000960  31 0d 03 7a 1a e7 20 74  6f 6f 6c 32 38 3c 3e 2d  |1..z.. tool28<>-|
00000970  31 20 8c 20 63 68 65 63  6b 3d 31 0d 03 84 31 e7  |1 . check=1...1.|
00000980  20 63 68 65 63 6b 3d 31  20 8c 20 c8 99 20 22 57  | check=1 . .. "W|
00000990  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
000009a0  2c 62 6c 6f 63 6b 3a f2  70 61 6e 65 0d 03 8e 05  |,block:.pane....|
000009b0  cc 0d 03 98 1f c8 99 20  22 57 69 6d 70 5f 4f 70  |....... "Wimp_Op|
000009c0  65 6e 57 69 6e 64 6f 77  22 2c 2c 62 6c 6f 63 6b  |enWindow",,block|
000009d0  0d 03 a2 05 cd 0d 03 ac  05 e1 0d 03 b6 04 0d 03  |................|
000009e0  c0 0e dd f2 72 65 71 75  65 73 74 33 0d 03 ca 0f  |....request3....|
000009f0  c8 8e 20 21 62 6c 6f 63  6b 20 ca 0d 03 d4 0c c9  |.. !block ......|
00000a00  20 6d 61 69 6e 25 3a 0d  03 de 20 c8 99 20 22 57  | main%:... .. "W|
00000a10  69 6d 70 5f 43 6c 6f 73  65 57 69 6e 64 6f 77 22  |imp_CloseWindow"|
00000a20  2c 2c 62 6c 6f 63 6b 0d  03 e8 58 21 62 6c 6f 63  |,,block...X!bloc|
00000a30  6b 3d 74 6f 6f 6c 62 6f  78 25 3a c8 99 20 22 57  |k=toolbox%:.. "W|
00000a40  69 6d 70 5f 43 6c 6f 73  65 57 69 6e 64 6f 77 22  |imp_CloseWindow"|
00000a50  2c 2c 62 6c 6f 63 6b 3a  21 62 6c 6f 63 6b 3d 62  |,,block:!block=b|
00000a60  61 72 25 3a c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |ar%:.."Wimp_Clos|
00000a70  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 0d  |eWindow",,block.|
00000a80  03 f2 59 21 62 6c 6f 63  6b 3d 74 69 6e 66 6f 25  |..Y!block=tinfo%|
00000a90  3a c8 99 20 22 57 69 6d  70 5f 43 6c 6f 73 65 57  |:.. "Wimp_CloseW|
00000aa0  69 6e 64 6f 77 22 2c 2c  62 6c 6f 63 6b 3a 21 62  |indow",,block:!b|
00000ab0  6c 6f 63 6b 3d 69 69 6e  66 6f 25 3a c8 99 20 22  |lock=iinfo%:.. "|
00000ac0  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00000ad0  22 2c 2c 62 6c 6f 63 6b  0d 03 fc 58 21 62 6c 6f  |",,block...X!blo|
00000ae0  63 6b 3d 66 6f 75 6e 64  25 3a c8 99 20 22 57 69  |ck=found%:.. "Wi|
00000af0  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
00000b00  2c 62 6c 6f 63 6b 3a 21  62 6c 6f 63 6b 3d 66 69  |,block:!block=fi|
00000b10  6e 64 25 3a c8 99 20 22  57 69 6d 70 5f 43 6c 6f  |nd%:.. "Wimp_Clo|
00000b20  73 65 57 69 6e 64 6f 77  22 2c 2c 62 6c 6f 63 6b  |seWindow",,block|
00000b30  0d 04 06 2f 21 62 6c 6f  63 6b 3d 6e 6f 74 66 6e  |.../!block=notfn|
00000b40  64 25 3a c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |d%:.. "Wimp_Clos|
00000b50  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 0d  |eWindow",,block.|
00000b60  04 10 21 c9 20 73 61 76  65 64 25 3a e7 70 72 65  |..!. saved%:.pre|
00000b70  71 75 69 74 20 8c 20 70  72 65 71 75 69 74 3d a3  |quit . prequit=.|
00000b80  0d 04 1a 35 c9 20 74 6f  6f 6c 62 6f 78 25 3a 74  |...5. toolbox%:t|
00000b90  6f 6f 6c 73 6f 6e 3d a3  3a c8 99 20 22 57 69 6d  |oolson=.:.. "Wim|
00000ba0  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
00000bb0  62 6c 6f 63 6b 0d 04 24  23 7f 20 3a c8 99 20 22  |block..$#. :.. "|
00000bc0  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00000bd0  22 2c 2c 62 6c 6f 63 6b  0d 04 2e 05 cb 0d 04 38  |",,block.......8|
00000be0  05 e1 0d 04 42 04 0d 04  4c 0a dd a4 69 63 6f 6e  |....B...L...icon|
00000bf0  0d 04 56 0d 21 69 63 6f  6e 64 3d 2d 31 0d 04 60  |..V.!icond=-1..`|
00000c00  0d 69 63 6f 6e 64 21 34  3d 30 0d 04 6a 25 69 63  |.icond!4=0..j%ic|
00000c10  6f 6e 64 21 38 3d 30 3a  69 63 6f 6e 64 21 31 32  |ond!8=0:icond!12|
00000c20  3d 36 38 3a 69 63 6f 6e  64 21 31 36 3d 36 38 0d  |=68:icond!16=68.|
00000c30  04 74 2b 69 63 6f 6e 64  21 32 30 3d 25 31 31 30  |.t+icond!20=%110|
00000c40  31 30 2b 28 28 32 5e 31  32 29 2a 33 29 3a 69 63  |10+((2^12)*3):ic|
00000c50  6f 6e 64 3f 32 33 3d 31  31 32 0d 04 7e 1f 24 28  |ond?23=112..~.$(|
00000c60  69 63 6f 6e 64 2b 32 34  29 3d 22 21 44 69 73 6b  |icond+24)="!Disk|
00000c70  54 72 65 65 22 2b bd 31  33 0d 04 88 26 c8 99 20  |Tree"+.13...&.. |
00000c80  22 57 69 6d 70 5f 43 72  65 61 74 65 49 63 6f 6e  |"Wimp_CreateIcon|
00000c90  22 2c 2c 69 63 6f 6e 64  20 b8 20 69 63 6f 6e 0d  |",,icond . icon.|
00000ca0  04 92 09 3d 69 63 6f 6e  0d 04 9c 04 0d 04 a6 16  |...=icon........|
00000cb0  dd a4 69 6e 66 28 68 61  6e 64 6c 65 2c 69 63 6f  |..inf(handle,ico|
00000cc0  6e 29 0d 04 b0 15 f2 67  65 65 28 68 61 6e 64 6c  |n).....gee(handl|
00000cd0  65 2c 69 63 6f 6e 29 0d  04 ba 0d 3d 69 63 6f 6e  |e,icon)....=icon|
00000ce0  64 21 32 38 0d 04 c4 04  0d 04 ce 0d dd a4 62 69  |d!28..........bi|
00000cf0  74 28 61 24 29 0d 04 d8  11 c8 95 20 a7 61 24 2c  |t(a$)...... .a$,|
00000d00  22 3a 22 29 3e 30 0d 04  e2 16 61 24 3d c1 61 24  |":")>0....a$=.a$|
00000d10  2c a7 61 24 2c 22 3a 22  29 2b 31 29 0d 04 ec 05  |,.a$,":")+1)....|
00000d20  ce 0d 04 f6 11 c8 95 20  a7 61 24 2c 22 2e 22 29  |....... .a$,".")|
00000d30  3e 30 0d 05 00 16 61 24  3d c1 61 24 2c a7 61 24  |>0....a$=.a$,.a$|
00000d40  2c 22 2e 22 29 2b 31 29  0d 05 0a 05 ce 0d 05 14  |,".")+1)........|
00000d50  07 3d 61 24 0d 05 1e 04  0d 05 28 11 dd a4 77 6f  |.=a$......(...wo|
00000d60  6f 6c 28 77 6f 6f 6c 25  29 0d 05 32 0a ea 20 63  |ol(wool%)..2.. c|
00000d70  6f 74 24 0d 05 3c 12 20  c8 95 20 3f 77 6f 6f 6c  |ot$..<. .. ?wool|
00000d80  25 3e 3d 33 32 0d 05 46  13 63 6f 74 24 2b 3d bd  |%>=32..F.cot$+=.|
00000d90  28 3f 77 6f 6f 6c 25 29  0d 05 50 0c 77 6f 6f 6c  |(?wool%)..P.wool|
00000da0  25 2b 3d 31 0d 05 5a 05  ce 0d 05 64 09 3d 63 6f  |%+=1..Z....d.=co|
00000db0  74 24 0d 05 6e 04 0d 05  78 14 dd a4 67 65 74 6c  |t$..n...x...getl|
00000dc0  65 61 66 28 6c 65 61 66  24 29 0d 05 82 12 c8 95  |eaf(leaf$)......|
00000dd0  20 a7 6c 65 61 66 24 2c  22 2e 22 29 0d 05 8c 1f  | .leaf$,".")....|
00000de0  6c 65 61 66 24 3d c1 6c  65 61 66 24 2c a7 6c 65  |leaf$=.leaf$,.le|
00000df0  61 66 24 2c 22 2e 22 29  2b 31 29 0d 05 96 0c ce  |af$,".")+1).....|
00000e00  3a 3d 6c 65 61 66 24 0d  05 a0 04 0d 05 aa 18 dd  |:=leaf$.........|
00000e10  a4 67 65 74 64 69 73 6b  6e 61 6d 65 28 70 61 74  |.getdiskname(pat|
00000e20  68 24 29 0d 05 b4 05 f5  0d 05 be 1c 70 61 74 68  |h$).........path|
00000e30  24 3d c2 70 61 74 68 24  2c a9 28 70 61 74 68 24  |$=.path$,.(path$|
00000e40  29 2d 31 29 0d 05 c8 13  fd 20 c0 70 61 74 68 24  |)-1)..... .path$|
00000e50  2c 31 29 3d 22 3a 22 0d  05 d2 17 3d c2 70 61 74  |,1)=":"....=.pat|
00000e60  68 24 2c a9 28 70 61 74  68 24 29 2d 31 29 0d 05  |h$,.(path$)-1)..|
00000e70  dc 04 0d 05 e6 17 dd a4  63 68 65 63 6b 69 74 28  |........checkit(|
00000e80  68 6e 64 25 2c 69 63 25  29 0d 05 f0 1b 21 69 63  |hnd%,ic%)....!ic|
00000e90  6f 6e 64 3d 68 6e 64 25  3a 69 63 6f 6e 64 21 34  |ond=hnd%:icond!4|
00000ea0  3d 69 63 25 0d 05 fa 20  c8 99 22 57 69 6d 70 5f  |=ic%... .."Wimp_|
00000eb0  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 69  |GetIconState",,i|
00000ec0  63 6f 6e 64 0d 06 04 13  66 6c 61 67 73 25 3d 69  |cond....flags%=i|
00000ed0  63 6f 6e 64 21 32 34 0d  06 0e 12 3d 66 6c 61 67  |cond!24....=flag|
00000ee0  73 25 80 26 46 30 30 30  30 0d 06 18 04 0d 06 22  |s%.&F0000......"|
00000ef0  0e dd a4 61 73 6b 28 66  6e 24 29 0d 06 2c 1e 21  |...ask(fn$)..,.!|
00000f00  69 63 6f 6e 64 3d 30 3a  24 28 69 63 6f 6e 64 2b  |icond=0:$(icond+|
00000f10  34 29 3d 66 6e 24 2b bd  30 0d 06 36 35 c8 99 22  |4)=fn$+.0..65.."|
00000f20  57 69 6d 70 5f 52 65 70  6f 72 74 45 72 72 6f 72  |Wimp_ReportError|
00000f30  22 2c 69 63 6f 6e 64 2c  26 31 33 2c 22 21 44 69  |",icond,&13,"!Di|
00000f40  73 6b 54 72 65 65 22 20  b8 20 2c 62 75 74 0d 06  |skTree" . ,but..|
00000f50  40 08 3d 62 75 74 0d 06  4a 04 0d 06 54 18 dd a4  |@.=but..J...T...|
00000f60  66 75 6c 6c 73 28 73 74  72 69 6e 67 24 2c 6c 65  |fulls(string$,le|
00000f70  6e 29 0d 06 5e 16 e7 20  a9 28 73 74 72 69 6e 67  |n)..^.. .(string|
00000f80  24 29 3c 6c 65 6e 20 8c  0d 06 68 05 f5 0d 06 72  |$)<len ...h....r|
00000f90  16 73 74 72 69 6e 67 24  3d 73 74 72 69 6e 67 24  |.string$=string$|
00000fa0  2b bd 30 0d 06 7c 14 fd  20 a9 28 73 74 72 69 6e  |+.0..|.. .(strin|
00000fb0  67 24 29 3d 6c 65 6e 0d  06 86 05 cd 0d 06 90 0c  |g$)=len.........|
00000fc0  3d 73 74 72 69 6e 67 24  0d 06 9a 04 0d 06 a4 18  |=string$........|
00000fd0  dd a4 6c 6f 6e 67 73 28  73 74 72 69 6e 67 24 2c  |..longs(string$,|
00000fe0  6c 65 6e 29 0d 06 ae 16  e7 20 a9 28 73 74 72 69  |len)..... .(stri|
00000ff0  6e 67 24 29 3c 6c 65 6e  20 8c 0d 06 b8 05 f5 0d  |ng$)<len .......|
00001000  06 c2 17 73 74 72 69 6e  67 24 3d 22 30 22 2b 73  |...string$="0"+s|
00001010  74 72 69 6e 67 24 0d 06  cc 14 fd 20 a9 28 73 74  |tring$..... .(st|
00001020  72 69 6e 67 24 29 3d 6c  65 6e 0d 06 d6 05 cd 0d  |ring$)=len......|
00001030  06 e0 0c 3d 73 74 72 69  6e 67 24 0d 06 ea 04 0d  |...=string$.....|
00001040  06 f4 21 dd a4 63 68 65  63 6b 66 6c 61 67 28 68  |..!..checkflag(h|
00001050  61 6e 64 6c 65 2c 69 63  6f 6e 2c 66 6c 61 67 29  |andle,icon,flag)|
00001060  0d 06 fe 09 62 69 74 3d  a3 0d 07 08 1e 21 69 63  |....bit=.....!ic|
00001070  6f 6e 64 3d 68 61 6e 64  6c 65 3a 69 63 6f 6e 64  |ond=handle:icond|
00001080  21 34 3d 69 63 6f 6e 0d  07 12 20 c8 99 22 57 69  |!4=icon... .."Wi|
00001090  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000010a0  2c 2c 69 63 6f 6e 64 0d  07 1c 22 e7 20 28 69 63  |,,icond...". (ic|
000010b0  6f 6e 64 21 32 34 80 28  31 3c 3c 66 6c 61 67 29  |ond!24.(1<<flag)|
000010c0  29 3e 30 20 62 69 74 3d  b9 0d 07 26 08 3d 62 69  |)>0 bit=...&.=bi|
000010d0  74 0d 07 30 04 0d 07 3a  0f dd a4 63 61 70 73 28  |t..0...:...caps(|
000010e0  75 70 24 29 0d 07 44 12  e3 20 4c 3d 31 20 b8 20  |up$)..D.. L=1 . |
000010f0  a9 28 75 70 24 29 0d 07  4e 23 c1 75 70 24 2c 4c  |.(up$)..N#.up$,L|
00001100  2c 31 29 3d bd 28 97 28  c1 75 70 24 2c 4c 2c 31  |,1)=.(.(.up$,L,1|
00001110  29 29 20 80 20 26 44 46  29 0d 07 58 05 ed 0d 07  |)) . &DF)..X....|
00001120  62 08 3d 75 70 24 0d 07  6c 04 0d 07 76 0e dd f2  |b.=up$..l...v...|
00001130  74 65 6d 70 6c 61 74 65  0d 07 80 32 c8 99 22 57  |template...2.."W|
00001140  69 6d 70 5f 4f 70 65 6e  54 65 6d 70 6c 61 74 65  |imp_OpenTemplate|
00001150  22 2c 2c 22 3c 44 54 72  65 65 24 44 69 72 3e 2e  |",,"<DTree$Dir>.|
00001160  54 65 6d 70 6c 61 74 65  73 22 0d 07 8a 11 69 6e  |Templates"....in|
00001170  64 69 72 3d 63 75 72 62  75 66 25 0d 07 94 1f 69  |dir=curbuf%....i|
00001180  6e 66 6f 25 3d a4 74 65  6d 70 6c 61 74 65 28 22  |nfo%=.template("|
00001190  50 72 6f 67 49 6e 66 6f  22 29 0d 07 9e 1b 73 61  |ProgInfo")....sa|
000011a0  76 65 25 3d a4 74 65 6d  70 6c 61 74 65 28 22 73  |ve%=.template("s|
000011b0  61 76 65 22 29 0d 07 a8  20 73 61 76 65 64 25 3d  |ave")... saved%=|
000011c0  a4 74 65 6d 70 6c 61 74  65 28 22 73 61 76 65 74  |.template("savet|
000011d0  65 78 74 22 29 0d 07 b2  1b 6d 61 69 6e 25 3d a4  |ext")....main%=.|
000011e0  74 65 6d 70 6c 61 74 65  28 22 74 72 65 65 22 29  |template("tree")|
000011f0  0d 07 bc 1f 74 6f 6f 6c  62 6f 78 25 3d a4 74 65  |....toolbox%=.te|
00001200  6d 70 6c 61 74 65 28 22  74 6f 6f 6c 73 22 29 0d  |mplate("tools").|
00001210  07 c6 1d 71 75 65 72 79  25 3d a4 74 65 6d 70 6c  |...query%=.templ|
00001220  61 74 65 28 22 71 75 65  72 79 22 29 0d 07 d0 1e  |ate("query")....|
00001230  71 75 69 74 25 3d a4 74  65 6d 70 6c 61 74 65 28  |quit%=.template(|
00001240  22 71 75 69 74 62 6f 78  22 29 0d 07 da 19 62 61  |"quitbox")....ba|
00001250  72 25 3d a4 74 65 6d 70  6c 61 74 65 28 22 62 61  |r%=.template("ba|
00001260  72 22 29 0d 07 e4 19 6e  65 77 25 3d a4 74 65 6d  |r")....new%=.tem|
00001270  70 6c 61 74 65 28 22 6e  65 77 22 29 0d 07 ee 1b  |plate("new")....|
00001280  66 69 6e 64 25 3d a4 74  65 6d 70 6c 61 74 65 28  |find%=.template(|
00001290  22 46 69 6e 64 22 29 0d  07 f8 1d 66 6f 75 6e 64  |"Find")....found|
000012a0  25 3d a4 74 65 6d 70 6c  61 74 65 28 22 66 6f 75  |%=.template("fou|
000012b0  6e 64 22 29 0d 08 02 1f  6e 6f 74 66 6e 64 25 3d  |nd")....notfnd%=|
000012c0  a4 74 65 6d 70 6c 61 74  65 28 22 6e 6f 74 66 6e  |.template("notfn|
000012d0  64 22 29 0d 08 0c 1c 69  69 6e 66 6f 25 3d a4 74  |d")....iinfo%=.t|
000012e0  65 6d 70 6c 61 74 65 28  22 69 6e 66 6f 22 29 0d  |emplate("info").|
000012f0  08 16 1d 66 69 6e 66 6f  25 3d a4 74 65 6d 70 6c  |...finfo%=.templ|
00001300  61 74 65 28 22 66 69 6e  66 6f 22 29 0d 08 20 1d  |ate("finfo").. .|
00001310  74 69 6e 66 6f 25 3d a4  74 65 6d 70 6c 61 74 65  |tinfo%=.template|
00001320  28 22 74 69 6e 66 6f 22  29 0d 08 2a 1b c8 99 20  |("tinfo")..*... |
00001330  22 57 69 6d 70 5f 43 6c  6f 73 65 54 65 6d 70 6c  |"Wimp_CloseTempl|
00001340  61 74 65 22 0d 08 34 17  73 74 65 78 3d a4 69 6e  |ate"..4.stex=.in|
00001350  66 6f 28 73 61 76 65 25  2c 31 29 0d 08 3e 19 73  |fo(save%,1)..>.s|
00001360  74 65 78 64 3d a4 69 6e  66 6f 28 73 61 76 65 64  |texd=.info(saved|
00001370  25 2c 31 29 0d 08 48 05  e1 0d 08 52 04 0d 08 5c  |%,1)..H....R...\|
00001380  12 dd a4 74 65 6d 70 6c  61 74 65 28 61 24 29 0d  |...template(a$).|
00001390  08 66 46 c8 99 22 57 69  6d 70 5f 4c 6f 61 64 54  |.fF.."Wimp_LoadT|
000013a0  65 6d 70 6c 61 74 65 22  2c 2c 62 6c 6f 63 6b 2c  |emplate",,block,|
000013b0  69 6e 64 69 72 2c 65 6e  64 62 75 66 25 2c 2d 31  |indir,endbuf%,-1|
000013c0  2c 61 24 2c 30 20 b8 20  2c 2c 69 6e 64 69 72 2c  |,a$,0 . ,,indir,|
000013d0  2c 2c 2c 63 25 0d 08 70  32 e7 20 63 25 3d 30 20  |,,,c%..p2. c%=0 |
000013e0  8c 20 f2 6d 65 73 73 28  22 54 65 6d 70 6c 61 74  |. .mess("Templat|
000013f0  65 20 22 2b 61 24 2b 22  20 6e 6f 74 20 66 6f 75  |e "+a$+" not fou|
00001400  6e 64 2e 22 29 3a e0 0d  08 7a 0e 62 6c 6f 63 6b  |nd."):...z.block|
00001410  21 36 34 3d 31 0d 08 84  29 c8 99 22 57 69 6d 70  |!64=1...).."Wimp|
00001420  5f 43 72 65 61 74 65 57  69 6e 64 6f 77 22 2c 2c  |_CreateWindow",,|
00001430  62 6c 6f 63 6b 20 b8 20  68 61 6e 64 6c 65 0d 08  |block . handle..|
00001440  8e 0b 3d 68 61 6e 64 6c  65 0d 08 98 04 0d 08 a2  |..=handle.......|
00001450  17 dd a4 69 6e 66 6f 28  68 61 6e 64 6c 65 2c 69  |...info(handle,i|
00001460  63 6f 6e 29 0d 08 ac 15  f2 67 65 65 28 68 61 6e  |con).....gee(han|
00001470  64 6c 65 2c 69 63 6f 6e  29 0d 08 b6 0d 3d 69 63  |dle,icon)....=ic|
00001480  6f 6e 64 21 32 38 0d 08  c0 04 0d 08 ca 1d dd f2  |ond!28..........|
00001490  69 6e 66 6f 28 68 61 6e  64 6c 65 2c 69 63 6f 6e  |info(handle,icon|
000014a0  2c 74 65 78 74 24 29 0d  08 d4 3b 21 62 6c 6f 63  |,text$)...;!bloc|
000014b0  6b 3d 68 61 6e 64 6c 65  3a 62 6c 6f 63 6b 21 34  |k=handle:block!4|
000014c0  3d 69 63 6f 6e 3a c8 99  22 57 69 6d 70 5f 47 65  |=icon:.."Wimp_Ge|
000014d0  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6c 6f  |tIconState",,blo|
000014e0  63 6b 0d 08 de 29 24 28  62 6c 6f 63 6b 21 32 38  |ck...)$(block!28|
000014f0  29 3d 74 65 78 74 24 3a  62 6c 6f 63 6b 21 33 36  |)=text$:block!36|
00001500  3d a9 28 74 65 78 74 24  29 2b 31 0d 08 e8 18 62  |=.(text$)+1....b|
00001510  6c 6f 63 6b 21 38 3d 30  3a 62 6c 6f 63 6b 21 31  |lock!8=0:block!1|
00001520  32 3d 30 0d 08 f2 20 c8  99 22 57 69 6d 70 5f 53  |2=0... .."Wimp_S|
00001530  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6c  |etIconState",,bl|
00001540  6f 63 6b 0d 08 fc 05 e1  0d 09 06 04 0d 09 10 16  |ock.............|
00001550  dd f2 67 65 65 28 68 61  6e 64 6c 65 2c 69 63 6f  |..gee(handle,ico|
00001560  6e 29 0d 09 1a 1e 21 69  63 6f 6e 64 3d 68 61 6e  |n)....!icond=han|
00001570  64 6c 65 3a 69 63 6f 6e  64 21 34 3d 69 63 6f 6e  |dle:icond!4=icon|
00001580  0d 09 24 20 c8 99 22 57  69 6d 70 5f 47 65 74 49  |..$ .."Wimp_GetI|
00001590  63 6f 6e 53 74 61 74 65  22 2c 2c 69 63 6f 6e 64  |conState",,icond|
000015a0  0d 09 2e 05 e1 0d 09 38  04 0d 09 42 38 dd f2 73  |.......8...B8..s|
000015b0  65 74 69 63 73 74 61 74  65 28 68 61 6e 64 6c 65  |eticstate(handle|
000015c0  25 2c 69 63 25 2c 63 6c  65 61 72 2c 65 6f 72 29  |%,ic%,clear,eor)|
000015d0  3a f4 20 61 73 20 69 6e  20 50 52 4d 20 28 43 45  |:. as in PRM (CE|
000015e0  29 0d 09 4c 39 21 62 6c  6f 63 6b 3d 68 61 6e 64  |)..L9!block=hand|
000015f0  6c 65 25 3a 62 6c 6f 63  6b 21 34 3d 69 63 25 3a  |le%:block!4=ic%:|
00001600  62 6c 6f 63 6b 21 38 3d  65 6f 72 3a 62 6c 6f 63  |block!8=eor:bloc|
00001610  6b 21 31 32 3d 63 6c 65  61 72 0d 09 56 20 c8 99  |k!12=clear..V ..|
00001620  22 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |"Wimp_SetIconSta|
00001630  74 65 22 2c 2c 62 6c 6f  63 6b 0d 09 60 05 e1 0d  |te",,block..`...|
00001640  09 6a 04 0d 09 74 0c dd  f2 63 6d 65 6e 75 73 0d  |.j...t...cmenus.|
00001650  09 7e 0c 74 6d 6f 70 74  3d 2d 31 0d 09 88 10 6d  |.~.tmopt=-1....m|
00001660  65 6e 75 6f 70 65 6e 3d  2d 34 34 0d 09 92 11 6d  |enuopen=-44....m|
00001670  65 6e 75 70 74 72 3d 6d  65 6e 75 25 0d 09 9c 0c  |enuptr=menu%....|
00001680  c8 97 20 78 2c 79 2c 62  0d 09 a6 28 74 72 65 65  |.. x,y,b...(tree|
00001690  73 25 3d a4 6d 65 6e 75  28 22 54 72 65 65 73 22  |s%=.menu("Trees"|
000016a0  2c 31 37 34 2c 22 4e 6f  20 54 72 65 65 73 22 29  |,174,"No Trees")|
000016b0  0d 09 b0 17 e7 20 63 74  3e 2d 31 20 8c 20 f2 74  |..... ct>-1 . .t|
000016c0  72 65 65 6d 65 6e 73 0d  09 ba 34 e7 20 74 6f 6f  |reemens...4. too|
000016d0  6c 73 6f 6e 20 8c 20 74  6f 6f 6c 6f 6e 24 3d 22  |lson . toolon$="|
000016e0  7b 80 7d 54 6f 6f 6c 73  22 3a 8b 20 74 6f 6f 6c  |{.}Tools":. tool|
000016f0  6f 6e 24 3d 22 54 6f 6f  6c 73 22 0d 09 c4 3f 53  |on$="Tools"...?S|
00001700  61 76 65 4d 65 6e 75 25  3d a4 6d 65 6e 75 28 22  |aveMenu%=.menu("|
00001710  53 61 76 65 22 2c 35 2a  31 36 2c 22 7b 62 7c 73  |Save",5*16,"{b|s|
00001720  61 76 65 25 7d 54 65 78  74 2c 7b 62 7c 73 61 76  |ave%}Text,{b|sav|
00001730  65 64 25 7d 44 61 74 61  22 29 0d 09 ce 3b 6d 69  |ed%}Data")...;mi|
00001740  73 63 25 3d a4 6d 65 6e  75 28 22 4d 69 73 63 22  |sc%=.menu("Misc"|
00001750  2c 35 2a 31 36 2c 22 7b  62 7c 69 6e 66 6f 25 7d  |,5*16,"{b|info%}|
00001760  49 6e 66 6f 2c 7b 62 7c  66 69 6e 66 6f 25 7d 46  |Info,{b|finfo%}F|
00001770  69 6c 65 22 29 0d 09 d8  5a 69 63 6f 6e 6d 65 6e  |ile")...Ziconmen|
00001780  75 25 3d a4 6d 65 6e 75  28 22 21 44 69 73 6b 54  |u%=.menu("!DiskT|
00001790  72 65 65 22 2c 39 2a 31  36 2c 22 7b 62 7c 6d 69  |ree",9*16,"{b|mi|
000017a0  73 63 25 7d 4d 69 73 63  2c 54 72 65 65 2c 4e 65  |sc%}Misc,Tree,Ne|
000017b0  77 20 54 72 65 65 2c 7b  62 7c 53 61 76 65 4d 65  |w Tree,{b|SaveMe|
000017c0  6e 75 25 7d 53 61 76 65  2c 51 75 69 74 22 29 0d  |nu%}Save,Quit").|
000017d0  09 e2 94 6d 61 69 6e 6d  65 6e 75 25 3d a4 6d 65  |...mainmenu%=.me|
000017e0  6e 75 28 22 21 44 69 73  6b 54 72 65 65 22 2c 31  |nu("!DiskTree",1|
000017f0  30 2a 31 36 2c 22 7b 62  7c 6d 69 73 63 25 7d 4d  |0*16,"{b|misc%}M|
00001800  69 73 63 2c 7b 62 7c 74  72 65 65 73 25 7d 54 72  |isc,{b|trees%}Tr|
00001810  65 65 73 2c 7b 62 7c 74  69 6e 66 6f 25 7d 54 72  |ees,{b|tinfo%}Tr|
00001820  65 65 20 49 6e 66 6f 2c  7b 62 7c 66 69 6e 64 25  |ee Info,{b|find%|
00001830  7d 46 69 6e 64 2c 22 2b  74 6f 6f 6c 6f 6e 24 2b  |}Find,"+toolon$+|
00001840  22 2c 4e 65 77 20 54 72  65 65 2c 7b 62 7c 53 61  |",New Tree,{b|Sa|
00001850  76 65 4d 65 6e 75 25 7d  53 61 76 65 2c 51 75 69  |veMenu%}Save,Qui|
00001860  74 22 29 0d 09 ec 20 72  6d 65 6e 3d 62 6c 6f 63  |t")... rmen=bloc|
00001870  6b 21 31 32 3a 72 69 63  6f 6e 3d 62 6c 6f 63 6b  |k!12:ricon=block|
00001880  21 31 36 0d 09 f6 4d e7  20 62 6c 6f 63 6b 21 31  |!16...M. block!1|
00001890  32 3d 2d 32 20 8c 20 6f  70 65 6e 6d 65 6e 75 25  |2=-2 . openmenu%|
000018a0  3d 69 63 6f 6e 6d 65 6e  75 25 3a 61 3d 78 2d 37  |=iconmenu%:a=x-7|
000018b0  35 3a 62 3d 28 35 2b 32  29 2a 34 38 3a f4 20 4e  |5:b=(5+2)*48:. N|
000018c0  6f 2e 20 6f 66 20 69 74  65 6d 73 2b 32 2a 34 38  |o. of items+2*48|
000018d0  0d 0a 00 32 e7 20 62 6c  6f 63 6b 21 31 32 3d 6d  |...2. block!12=m|
000018e0  61 69 6e 25 20 8c 20 61  3d 78 3a 62 3d 79 3a 6f  |ain% . a=x:b=y:o|
000018f0  70 65 6e 6d 65 6e 75 25  3d 6d 61 69 6e 6d 65 6e  |penmenu%=mainmen|
00001900  75 25 0d 0a 0a 47 e7 20  62 6c 6f 63 6b 21 31 32  |u%...G. block!12|
00001910  3d 74 6f 6f 6c 62 6f 78  25 20 80 20 62 6c 6f 63  |=toolbox% . bloc|
00001920  6b 21 31 36 3d 30 20 8c  20 74 6d 6f 70 74 3d 30  |k!16=0 . tmopt=0|
00001930  3a 6f 70 65 6e 6d 65 6e  75 25 3d 74 72 65 65 73  |:openmenu%=trees|
00001940  25 3a 61 3d 78 3a 62 3d  79 0d 0a 14 47 e7 20 62  |%:a=x:b=y...G. b|
00001950  6c 6f 63 6b 21 31 32 3d  74 6f 6f 6c 62 6f 78 25  |lock!12=toolbox%|
00001960  20 80 20 62 6c 6f 63 6b  21 31 36 3d 31 20 8c 20  | . block!16=1 . |
00001970  74 6d 6f 70 74 3d 31 3a  6f 70 65 6e 6d 65 6e 75  |tmopt=1:openmenu|
00001980  25 3d 74 72 65 65 73 25  3a 61 3d 78 3a 62 3d 79  |%=trees%:a=x:b=y|
00001990  0d 0a 1e 47 e7 20 62 6c  6f 63 6b 21 31 32 3d 74  |...G. block!12=t|
000019a0  6f 6f 6c 62 6f 78 25 20  80 20 62 6c 6f 63 6b 21  |oolbox% . block!|
000019b0  31 36 3d 32 20 8c 20 74  6d 6f 70 74 3d 32 3a 6f  |16=2 . tmopt=2:o|
000019c0  70 65 6e 6d 65 6e 75 25  3d 74 72 65 65 73 25 3a  |penmenu%=trees%:|
000019d0  61 3d 78 3a 62 3d 79 0d  0a 28 45 f2 73 65 74 69  |a=x:b=y..(E.seti|
000019e0  63 73 74 61 74 65 28 73  61 76 65 25 2c 33 2c 31  |cstate(save%,3,1|
000019f0  3c 3c 32 31 2c 30 3c 3c  32 31 29 3a f2 73 65 74  |<<21,0<<21):.set|
00001a00  69 63 73 74 61 74 65 28  73 61 76 65 25 2c 34 2c  |icstate(save%,4,|
00001a10  31 3c 3c 32 31 2c 30 3c  3c 32 31 29 0d 0a 32 25  |1<<21,0<<21)..2%|
00001a20  f2 73 65 74 69 63 73 74  61 74 65 28 73 61 76 65  |.seticstate(save|
00001a30  64 25 2c 33 2c 31 3c 3c  32 31 2c 30 3c 3c 32 31  |d%,3,1<<21,0<<21|
00001a40  29 0d 0a 3c 1d f2 69 6e  66 6f 28 73 61 76 65 25  |)..<..info(save%|
00001a50  2c 31 2c 22 54 65 78 74  46 69 6c 65 22 29 0d 0a  |,1,"TextFile")..|
00001a60  46 05 cd 0d 0a 50 12 f2  6f 70 65 6e 6d 65 6e 75  |F....P..openmenu|
00001a70  28 61 2c 62 29 0d 0a 5a  05 e1 0d 0a 64 04 0d 0a  |(a,b)..Z....d...|
00001a80  6e 0e dd f2 74 72 65 65  6d 65 6e 73 0d 0a 78 1c  |n...treemens..x.|
00001a90  e7 20 62 6c 6f 63 6b 21  31 32 3c 3e 74 6f 6f 6c  |. block!12<>tool|
00001aa0  62 6f 78 25 20 8c 20 e1  0d 0a 82 11 c8 8e 20 62  |box% . ....... b|
00001ab0  6c 6f 63 6b 21 31 36 20  ca 0d 0a 8c 0a c9 20 30  |lock!16 ...... 0|
00001ac0  2c 32 3a 0d 0a 96 08 20  6a 3d 30 0d 0a a0 39 20  |,2:.... j=0...9 |
00001ad0  e7 20 62 6c 6f 63 6b 21  31 36 3d 32 20 8c 20 24  |. block!16=2 . $|
00001ae0  28 6c 6f 6e 67 64 61 74  61 2b 28 6a 2a 31 33 29  |(longdata+(j*13)|
00001af0  29 3d 22 ac 43 6c 65 61  72 20 41 6c 6c 22 3a 20  |)=".Clear All": |
00001b00  6a 2b 3d 31 0d 0a aa 0f  20 e3 20 6d 3d 30 20 b8  |j+=1.... . m=0 .|
00001b10  20 63 74 0d 0a b4 0d 20  74 69 63 6b 24 3d 22 22  | ct.... tick$=""|
00001b20  0d 0a be 17 20 e7 20 6d  3d 73 74 20 8c 20 74 69  |.... . m=st . ti|
00001b30  63 6b 24 3d 22 80 22 0d  0a c8 20 20 6e 65 78 74  |ck$="."...  next|
00001b40  69 74 24 3d a4 67 65 74  6c 65 61 66 28 74 72 6f  |it$=.getleaf(tro|
00001b50  6f 74 24 28 6d 29 29 0d  0a d2 45 20 e7 20 6e 65  |ot$(m))...E . ne|
00001b60  78 74 69 74 24 3d 22 24  22 20 8c 20 6e 65 78 74  |xtit$="$" . next|
00001b70  69 74 24 3d a4 67 65 74  64 69 73 6b 6e 61 6d 65  |it$=.getdiskname|
00001b80  28 c0 74 72 6f 6f 74 24  28 6d 29 2c a9 28 74 72  |(.troot$(m),.(tr|
00001b90  6f 6f 74 24 28 6d 29 29  2d 32 29 29 0d 0a dc 25  |oot$(m))-2))...%|
00001ba0  20 24 28 6c 6f 6e 67 64  61 74 61 2b 28 6a 2a 31  | $(longdata+(j*1|
00001bb0  33 29 29 3d 74 69 63 6b  24 2b 6e 65 78 74 69 74  |3))=tick$+nextit|
00001bc0  24 0d 0a e6 09 20 6a 2b  3d 31 0d 0a f0 08 20 ed  |$.... j+=1.... .|
00001bd0  20 6d 0d 0a fa 31 20 74  72 65 65 73 25 3d a4 6c  | m...1 trees%=.l|
00001be0  6f 6e 67 6d 65 6e 75 28  22 54 72 65 65 73 22 2c  |ongmenu("Trees",|
00001bf0  31 31 2a 31 36 2c 6a 2d  31 2c 6c 6f 6e 67 64 61  |11*16,j-1,longda|
00001c00  74 61 29 0d 0b 04 08 c9  20 31 3a 0d 0b 0e 2d 20  |ta)..... 1:...- |
00001c10  e7 20 ac 20 61 72 63 6c  69 73 74 65 64 20 8c 20  |. . arclisted . |
00001c20  f2 6d 61 6b 65 61 72 63  6c 69 73 74 3a 61 72 63  |.makearclist:arc|
00001c30  6c 69 73 74 65 64 3d b9  0d 0b 18 11 20 e7 20 61  |listed=..... . a|
00001c40  72 63 63 74 3d 2d 31 20  8c 0d 0b 22 1c 20 20 74  |rcct=-1 ...".  t|
00001c50  72 65 65 6d 65 6e 24 3d  22 4e 6f 20 41 72 63 68  |reemen$="No Arch|
00001c60  69 76 65 73 22 0d 0b 2c  2a 20 20 74 72 65 65 73  |ives"..,*  trees|
00001c70  25 3d a4 6d 65 6e 75 28  22 54 72 65 65 73 22 2c  |%=.menu("Trees",|
00001c80  31 31 2a 31 36 2c 74 72  65 65 6d 65 6e 24 29 0d  |11*16,treemen$).|
00001c90  0b 36 06 20 cc 0d 0b 40  13 20 20 e3 20 6d 3d 30  |.6. ...@.  . m=0|
00001ca0  20 b8 20 61 72 63 63 74  0d 0b 4a 13 20 20 61 72  | . arcct..J.  ar|
00001cb0  63 79 24 3d 61 72 63 24  28 6d 29 0d 0b 54 21 20  |cy$=arc$(m)..T! |
00001cc0  20 6e 61 6d 65 24 3d c0  61 72 63 79 24 2c a7 61  | name$=.arcy$,.a|
00001cd0  72 63 79 24 2c 22 2c 22  29 2d 31 29 0d 0b 5e 1e  |rcy$,",")-1)..^.|
00001ce0  20 20 24 28 6c 6f 6e 67  64 61 74 61 2b 28 6d 2a  |  $(longdata+(m*|
00001cf0  31 33 29 29 3d 6e 61 6d  65 24 0d 0b 68 07 20 20  |13))=name$..h.  |
00001d00  ed 0d 0b 72 34 20 20 74  72 65 65 73 25 3d a4 6c  |...r4  trees%=.l|
00001d10  6f 6e 67 6d 65 6e 75 28  22 54 72 65 65 73 22 2c  |ongmenu("Trees",|
00001d20  31 31 2a 31 36 2c 61 72  63 63 74 2c 6c 6f 6e 67  |11*16,arcct,long|
00001d30  64 61 74 61 29 0d 0b 7c  06 20 cd 0d 0b 86 05 cb  |data)..|. ......|
00001d40  0d 0b 90 05 e1 0d 0b 9a  04 0d 0b a4 13 dd f2 6f  |...............o|
00001d50  70 65 6e 6d 65 6e 75 28  78 2c 79 29 0d 0b ae 26  |penmenu(x,y)...&|
00001d60  c8 99 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |.."Wimp_CreateMe|
00001d70  6e 75 22 2c 2c 6f 70 65  6e 6d 65 6e 75 25 2c 78  |nu",,openmenu%,x|
00001d80  2c 79 0d 0b b8 05 e1 0d  0b c2 04 0d 0b cc 1a dd  |,y..............|
00001d90  a4 6d 65 6e 75 28 74 69  74 24 2c 77 69 64 2c 6d  |.menu(tit$,wid,m|
00001da0  65 6e 75 24 29 0d 0b d6  0e 6d 65 6e 75 24 2b 3d  |enu$)....menu$+=|
00001db0  22 2c 22 0d 0b e0 13 6f  6c 64 6d 65 6e 75 3d 6d  |","....oldmenu=m|
00001dc0  65 6e 75 70 74 72 0d 0b  ea 11 24 6d 65 6e 75 70  |enuptr....$menup|
00001dd0  74 72 3d 74 69 74 24 0d  0b f4 10 6d 65 6e 75 70  |tr=tit$....menup|
00001de0  74 72 3f 31 32 3d 37 0d  0b fe 10 6d 65 6e 75 70  |tr?12=7....menup|
00001df0  74 72 3f 31 33 3d 32 0d  0c 08 10 6d 65 6e 75 70  |tr?13=2....menup|
00001e00  74 72 3f 31 34 3d 37 0d  0c 12 10 6d 65 6e 75 70  |tr?14=7....menup|
00001e10  74 72 3f 31 35 3d 30 0d  0c 1c 12 6d 65 6e 75 70  |tr?15=0....menup|
00001e20  74 72 21 31 36 3d 77 69  64 0d 0c 26 11 6d 65 6e  |tr!16=wid..&.men|
00001e30  75 70 74 72 21 32 30 3d  34 38 0d 0c 30 10 6d 65  |uptr!20=48..0.me|
00001e40  6e 75 70 74 72 21 32 34  3d 30 0d 0c 3a 0f 6d 65  |nuptr!24=0..:.me|
00001e50  6e 75 70 74 72 2b 3d 32  38 0d 0c 44 05 f5 0d 0c  |nuptr+=28..D....|
00001e60  4e 11 f2 74 68 69 6e 67  28 6d 65 6e 75 24 29 0d  |N..thing(menu$).|
00001e70  0c 58 1f 6d 65 6e 75 24  3d c1 6d 65 6e 75 24 2c  |.X.menu$=.menu$,|
00001e80  a7 6d 65 6e 75 24 2c 22  2c 22 29 2b 31 29 0d 0c  |.menu$,",")+1)..|
00001e90  62 0f 6d 65 6e 75 70 74  72 2b 3d 32 34 0d 0c 6c  |b.menuptr+=24..l|
00001ea0  0e fd 20 6d 65 6e 75 24  3d 22 22 0d 0c 76 29 6d  |.. menu$=""..v)m|
00001eb0  65 6e 75 70 74 72 21 2d  32 34 3d 28 6d 65 6e 75  |enuptr!-24=(menu|
00001ec0  70 74 72 21 2d 32 34 29  20 84 20 25 31 30 30 30  |ptr!-24) . %1000|
00001ed0  30 30 30 30 0d 0c 80 0c  3d 6f 6c 64 6d 65 6e 75  |0000....=oldmenu|
00001ee0  0d 0c 8a 04 0d 0c 94 28  dd a4 6c 6f 6e 67 6d 65  |.......(..longme|
00001ef0  6e 75 28 74 69 74 24 2c  77 69 64 2c 6e 75 6d 62  |nu(tit$,wid,numb|
00001f00  65 72 2c 6c 6f 6e 67 64  61 74 61 29 0d 0c 9e 11  |er,longdata)....|
00001f10  24 6c 6f 6e 67 6d 65 6e  3d 74 69 74 24 0d 0c a8  |$longmen=tit$...|
00001f20  10 6c 6f 6e 67 6d 65 6e  3f 31 32 3d 37 0d 0c b2  |.longmen?12=7...|
00001f30  10 6c 6f 6e 67 6d 65 6e  3f 31 33 3d 32 0d 0c bc  |.longmen?13=2...|
00001f40  10 6c 6f 6e 67 6d 65 6e  3f 31 34 3d 37 0d 0c c6  |.longmen?14=7...|
00001f50  10 6c 6f 6e 67 6d 65 6e  3f 31 35 3d 30 0d 0c d0  |.longmen?15=0...|
00001f60  12 6c 6f 6e 67 6d 65 6e  21 31 36 3d 77 69 64 0d  |.longmen!16=wid.|
00001f70  0c da 11 6c 6f 6e 67 6d  65 6e 21 32 30 3d 34 38  |...longmen!20=48|
00001f80  0d 0c e4 10 6c 6f 6e 67  6d 65 6e 21 32 34 3d 30  |....longmen!24=0|
00001f90  0d 0c ee 12 e3 20 69 3d  30 20 b8 20 6e 75 6d 62  |..... i=0 . numb|
00001fa0  65 72 0d 0c f8 11 70 74  72 3d 28 32 34 2a 69 29  |er....ptr=(24*i)|
00001fb0  2b 32 38 0d 0d 02 13 6c  6f 6e 67 6d 65 6e 21 28  |+28....longmen!(|
00001fc0  70 74 72 29 3d 30 0d 0d  0c 16 6c 6f 6e 67 6d 65  |ptr)=0....longme|
00001fd0  6e 21 28 70 74 72 2b 34  29 3d 2d 31 0d 0d 16 1d  |n!(ptr+4)=-1....|
00001fe0  6c 6f 6e 67 6d 65 6e 21  28 70 74 72 2b 38 29 3d  |longmen!(ptr+8)=|
00001ff0  26 30 37 30 30 30 30 30  31 0d 0d 20 1c 64 61 74  |&07000001.. .dat|
00002000  61 24 3d 24 28 6c 6f 6e  67 64 61 74 61 2b 28 69  |a$=$(longdata+(i|
00002010  2a 31 33 29 29 0d 0d 2a  50 e7 20 c0 64 61 74 61  |*13))..*P. .data|
00002020  24 2c 31 29 3d 22 ac 22  20 8c 20 6c 6f 6e 67 6d  |$,1)="." . longm|
00002030  65 6e 21 28 70 74 72 29  3d 6c 6f 6e 67 6d 65 6e  |en!(ptr)=longmen|
00002040  21 28 70 74 72 29 20 84  20 25 31 30 3a 64 61 74  |!(ptr) . %10:dat|
00002050  61 24 3d c2 64 61 74 61  24 2c a9 28 64 61 74 61  |a$=.data$,.(data|
00002060  24 29 2d 31 29 0d 0d 34  4f e7 20 c0 64 61 74 61  |$)-1)..4O. .data|
00002070  24 2c 31 29 3d 22 80 22  20 8c 20 6c 6f 6e 67 6d  |$,1)="." . longm|
00002080  65 6e 21 28 70 74 72 29  3d 6c 6f 6e 67 6d 65 6e  |en!(ptr)=longmen|
00002090  21 28 70 74 72 29 20 84  20 25 31 3a 64 61 74 61  |!(ptr) . %1:data|
000020a0  24 3d c2 64 61 74 61 24  2c a9 28 64 61 74 61 24  |$=.data$,.(data$|
000020b0  29 2d 31 29 0d 0d 3e 1d  24 28 6c 6f 6e 67 6d 65  |)-1)..>.$(longme|
000020c0  6e 2b 28 70 74 72 2b 31  32 29 29 3d 64 61 74 61  |n+(ptr+12))=data|
000020d0  24 0d 0d 48 05 ed 0d 0d  52 2b 6c 6f 6e 67 6d 65  |$..H....R+longme|
000020e0  6e 21 28 70 74 72 29 3d  6c 6f 6e 67 6d 65 6e 21  |n!(ptr)=longmen!|
000020f0  28 70 74 72 29 20 84 20  25 31 30 30 30 30 30 30  |(ptr) . %1000000|
00002100  30 0d 0d 5c 0c 3d 6c 6f  6e 67 6d 65 6e 0d 0d 66  |0..\.=longmen..f|
00002110  04 0d 0d 70 0f dd f2 74  68 69 6e 67 28 6d 24 29  |...p...thing(m$)|
00002120  0d 0d 7a 16 6d 24 3d c0  6d 24 2c a7 6d 24 2c 22  |..z.m$=.m$,.m$,"|
00002130  2c 22 29 2d 31 29 0d 0d  84 0f 69 24 3d 22 22 3a  |,")-1)....i$="":|
00002140  6a 24 3d 22 22 0d 0d 8e  12 e7 20 a7 6d 24 2c 22  |j$=""..... .m$,"|
00002150  7b 22 29 3e 30 20 8c 0d  0d 98 16 69 24 3d c0 6d  |{")>0 .....i$=.m|
00002160  24 2c a7 6d 24 2c 22 7d  22 29 2d 31 29 0d 0d a2  |$,.m$,"}")-1)...|
00002170  16 6d 24 3d c1 6d 24 2c  a7 6d 24 2c 22 7d 22 29  |.m$=.m$,.m$,"}")|
00002180  2b 31 29 0d 0d ac 16 6a  24 3d c0 69 24 2c a7 69  |+1)....j$=.i$,.i|
00002190  24 2c 22 7c 22 29 2d 31  29 0d 0d b6 16 69 24 3d  |$,"|")-1)....i$=|
000021a0  c1 69 24 2c a7 69 24 2c  22 7c 22 29 2b 31 29 0d  |.i$,.i$,"|")+1).|
000021b0  0d c0 05 cd 0d 0d ca 13  69 6a 61 63 6b 3d 26 30  |........ijack=&0|
000021c0  37 30 30 30 30 32 31 0d  0d d4 0b 6d 6a 61 63 6b  |7000021....mjack|
000021d0  3d 30 0d 0d de 0e 73 75  62 6d 65 6e 75 3d 2d 31  |=0....submenu=-1|
000021e0  0d 0d e8 20 e7 20 a7 6a  24 2c 22 62 22 29 3e 30  |... . .j$,"b")>0|
000021f0  20 8c 20 73 75 62 6d 65  6e 75 3d a0 28 69 24 29  | . submenu=.(i$)|
00002200  0d 0d f2 22 e7 20 a7 6a  24 2c 22 5f 22 29 3e 30  |...". .j$,"_")>0|
00002210  20 8c 20 6d 6a 61 63 6b  3d 6d 6a 61 63 6b 20 84  | . mjack=mjack .|
00002220  20 32 0d 0d fc 22 e7 20  a7 6a 24 2c 22 80 22 29  | 2...". .j$,".")|
00002230  3e 30 20 8c 20 6d 6a 61  63 6b 3d 6d 6a 61 63 6b  |>0 . mjack=mjack|
00002240  20 84 20 31 0d 0e 06 30  e7 20 a7 6a 24 2c 22 75  | . 1...0. .j$,"u|
00002250  22 29 3e 30 20 8c 20 6d  6a 61 63 6b 3d 6d 6a 61  |")>0 . mjack=mja|
00002260  63 6b 20 84 20 32 3a 73  75 62 6d 65 6e 75 3d a0  |ck . 2:submenu=.|
00002270  28 69 24 29 0d 0e 10 12  21 6d 65 6e 75 70 74 72  |(i$)....!menuptr|
00002280  3d 6d 6a 61 63 6b 0d 0e  1a 15 6d 65 6e 75 70 74  |=mjack....menupt|
00002290  72 21 34 3d 73 75 62 6d  65 6e 75 0d 0e 24 13 6d  |r!4=submenu..$.m|
000022a0  65 6e 75 70 74 72 21 38  3d 69 6a 61 63 6b 0d 0e  |enuptr!8=ijack..|
000022b0  2e 14 24 28 6d 65 6e 75  70 74 72 2b 31 32 29 3d  |..$(menuptr+12)=|
000022c0  6d 24 0d 0e 38 05 cd 0d  0e 42 05 e1 0d 0e 4c 04  |m$..8....B....L.|
000022d0  0d 0e 56 12 dd f2 63 6c  69 63 6b 28 62 6c 6f 63  |..V...click(bloc|
000022e0  6b 29 0d 0e 60 13 6b 65  65 70 62 25 3d 62 6c 6f  |k)..`.keepb%=blo|
000022f0  63 6b 21 31 32 0d 0e 6a  2a e7 20 a4 63 68 65 63  |ck!12..j*. .chec|
00002300  6b 69 74 28 62 6c 6f 63  6b 21 31 32 2c 62 6c 6f  |kit(block!12,blo|
00002310  63 6b 21 31 36 29 3d 39  38 33 30 34 30 20 8c 0d  |ck!16)=983040 ..|
00002320  0e 74 24 f2 73 6c 61 62  69 6e 28 6b 65 65 70 62  |.t$.slabin(keepb|
00002330  25 29 3a f2 73 6c 61 62  6f 75 74 28 6b 65 65 70  |%):.slabout(keep|
00002340  62 25 29 0d 0e 7e 05 cd  0d 0e 88 26 e7 20 71 75  |b%)..~.....&. qu|
00002350  69 74 69 6e 67 20 8c 20  71 75 69 74 69 6e 3d a3  |iting . quitin=.|
00002360  3a f2 63 6c 6f 73 65 28  71 75 69 74 25 29 0d 0e  |:.close(quit%)..|
00002370  92 27 e7 20 62 6c 6f 63  6b 21 31 32 3d 2d 32 20  |.'. block!12=-2 |
00002380  80 20 62 6c 6f 63 6b 21  38 3d 32 20 f2 63 6d 65  |. block!8=2 .cme|
00002390  6e 75 73 3a e1 0d 0e 9c  33 e7 20 62 6c 6f 63 6b  |nus:....3. block|
000023a0  21 31 32 3d 2d 32 20 80  20 62 6c 6f 63 6b 21 38  |!12=-2 . block!8|
000023b0  3d 34 20 f2 6f 70 65 6e  77 69 6e 28 6d 61 69 6e  |=4 .openwin(main|
000023c0  25 29 3a f2 70 61 6e 65  0d 0e a6 3d e7 20 62 6c  |%):.pane...=. bl|
000023d0  6f 63 6b 21 31 32 3d 2d  32 20 80 20 62 6c 6f 63  |ock!12=-2 . bloc|
000023e0  6b 21 38 3d 31 20 f2 6f  70 65 6e 77 69 6e 28 6e  |k!8=1 .openwin(n|
000023f0  65 77 25 29 3a f2 69 6e  66 6f 28 6e 65 77 25 2c  |ew%):.info(new%,|
00002400  31 2c 22 22 29 0d 0e b0  2a e7 20 62 6c 6f 63 6b  |1,"")...*. block|
00002410  21 31 32 3d 6d 61 69 6e  25 20 80 20 62 6c 6f 63  |!12=main% . bloc|
00002420  6b 21 38 3d 32 20 f2 63  6d 65 6e 75 73 3a e1 0d  |k!8=2 .cmenus:..|
00002430  0e ba 51 e7 20 62 6c 6f  63 6b 21 31 32 3d 73 61  |..Q. block!12=sa|
00002440  76 65 25 20 80 20 62 6c  6f 63 6b 21 31 36 3d 32  |ve% . block!16=2|
00002450  20 77 69 6e 73 61 76 65  25 3d 62 6c 6f 63 6b 21  | winsave%=block!|
00002460  31 32 3a 66 69 6c 65 74  79 70 65 24 3d 22 66 69  |12:filetype$="fi|
00002470  6c 65 5f 46 46 46 22 3a  f2 64 65 66 73 61 76 65  |le_FFF":.defsave|
00002480  0d 0e c4 52 e7 20 62 6c  6f 63 6b 21 31 32 3d 73  |...R. block!12=s|
00002490  61 76 65 64 25 20 80 20  62 6c 6f 63 6b 21 31 36  |aved% . block!16|
000024a0  3d 32 20 77 69 6e 73 61  76 65 25 3d 62 6c 6f 63  |=2 winsave%=bloc|
000024b0  6b 21 31 32 3a 66 69 6c  65 74 79 70 65 24 3d 22  |k!12:filetype$="|
000024c0  66 69 6c 65 5f 30 30 44  22 3a f2 64 65 66 73 61  |file_00D":.defsa|
000024d0  76 65 0d 0e ce 4d e7 20  62 6c 6f 63 6b 21 31 32  |ve...M. block!12|
000024e0  3d 73 61 76 65 25 20 80  20 62 6c 6f 63 6b 21 31  |=save% . block!1|
000024f0  36 3d 30 20 77 69 6e 73  61 76 65 25 3d 62 6c 6f  |6=0 winsave%=blo|
00002500  63 6b 21 31 32 3a f2 73  61 76 65 28 24 a4 69 6e  |ck!12:.save($.in|
00002510  66 6f 28 77 69 6e 73 61  76 65 25 2c 31 29 29 0d  |fo(winsave%,1)).|
00002520  0e d8 4e e7 20 62 6c 6f  63 6b 21 31 32 3d 73 61  |..N. block!12=sa|
00002530  76 65 64 25 20 80 20 62  6c 6f 63 6b 21 31 36 3d  |ved% . block!16=|
00002540  30 20 77 69 6e 73 61 76  65 25 3d 62 6c 6f 63 6b  |0 winsave%=block|
00002550  21 31 32 3a f2 73 61 76  65 28 24 a4 69 6e 66 6f  |!12:.save($.info|
00002560  28 77 69 6e 73 61 76 65  25 2c 31 29 29 0d 0e e2  |(winsave%,1))...|
00002570  2e e7 20 62 6c 6f 63 6b  21 31 32 3d 73 61 76 65  |.. block!12=save|
00002580  25 20 80 20 62 6c 6f 63  6b 21 31 36 3d 33 20 8c  |% . block!16=3 .|
00002590  20 f2 72 61 64 69 6f 73  61 76 65 0d 0e ec 2e e7  | .radiosave.....|
000025a0  20 62 6c 6f 63 6b 21 31  32 3d 73 61 76 65 25 20  | block!12=save% |
000025b0  80 20 62 6c 6f 63 6b 21  31 36 3d 34 20 8c 20 f2  |. block!16=4 . .|
000025c0  72 61 64 69 6f 73 61 76  65 0d 0e f6 4b e7 20 62  |radiosave...K. b|
000025d0  6c 6f 63 6b 21 31 32 3d  6e 65 77 25 20 80 20 62  |lock!12=new% . b|
000025e0  6c 6f 63 6b 21 31 36 3d  32 20 77 69 6e 73 61 76  |lock!16=2 winsav|
000025f0  65 25 3d 62 6c 6f 63 6b  21 31 32 3a 66 69 6c 65  |e%=block!12:file|
00002600  74 79 70 65 24 3d 22 6e  65 77 22 3a f2 64 65 66  |type$="new":.def|
00002610  73 61 76 65 0d 0f 00 26  e7 20 62 6c 6f 63 6b 21  |save...&. block!|
00002620  31 32 3d 6e 65 77 25 20  80 20 62 6c 6f 63 6b 21  |12=new% . block!|
00002630  31 36 3d 34 20 8c 20 f2  67 6f 0d 0f 0a 2a e7 20  |16=4 . .go...*. |
00002640  62 6c 6f 63 6b 21 31 32  3d 6e 65 77 25 20 80 20  |block!12=new% . |
00002650  62 6c 6f 63 6b 21 31 36  3d 35 20 8c 20 f2 64 72  |block!16=5 . .dr|
00002660  69 76 65 30 0d 0f 14 2e  e7 20 62 6c 6f 63 6b 21  |ive0..... block!|
00002670  31 32 3d 6d 61 69 6e 25  20 80 20 62 6c 6f 63 6b  |12=main% . block|
00002680  21 38 3d 34 20 8c 20 f2  73 65 6c 65 63 74 69 74  |!8=4 . .selectit|
00002690  65 6d 0d 0f 1e 2d e7 20  62 6c 6f 63 6b 21 31 32  |em...-. block!12|
000026a0  3d 6d 61 69 6e 25 20 80  20 62 6c 6f 63 6b 21 38  |=main% . block!8|
000026b0  3d 31 20 8c 20 f2 73 65  6c 65 63 74 69 6f 6e 0d  |=1 . .selection.|
000026c0  0f 28 3b e7 20 62 6c 6f  63 6b 21 31 32 3d 66 6f  |.(;. block!12=fo|
000026d0  75 6e 64 25 20 80 20 62  6c 6f 63 6b 21 31 36 3d  |und% . block!16=|
000026e0  37 20 8c 20 66 6f 75 6e  64 3d a3 3a f2 63 6c 6f  |7 . found=.:.clo|
000026f0  73 65 28 66 6f 75 6e 64  25 29 0d 0f 32 2a e7 20  |se(found%)..2*. |
00002700  62 6c 6f 63 6b 21 31 32  3d 66 6f 75 6e 64 25 20  |block!12=found% |
00002710  80 20 62 6c 6f 63 6b 21  31 36 3d 36 20 8c 20 f2  |. block!16=6 . .|
00002720  66 69 6e 64 0d 0f 3c 35  e7 20 62 6c 6f 63 6b 21  |find..<5. block!|
00002730  31 32 3d 6e 6f 74 66 6e  64 25 20 80 20 62 6c 6f  |12=notfnd% . blo|
00002740  63 6b 21 31 36 3d 33 20  8c 20 f2 63 6c 6f 73 65  |ck!16=3 . .close|
00002750  28 6e 6f 74 66 6e 64 25  29 0d 0f 46 2e e7 20 62  |(notfnd%)..F.. b|
00002760  6c 6f 63 6b 21 31 32 3d  74 6f 6f 6c 62 6f 78 25  |lock!12=toolbox%|
00002770  20 80 20 62 6c 6f 63 6b  21 31 36 3d 30 20 8c 20  | . block!16=0 . |
00002780  f2 63 6d 65 6e 75 73 0d  0f 50 2e e7 20 62 6c 6f  |.cmenus..P.. blo|
00002790  63 6b 21 31 32 3d 74 6f  6f 6c 62 6f 78 25 20 80  |ck!12=toolbox% .|
000027a0  20 62 6c 6f 63 6b 21 31  36 3d 31 20 8c 20 f2 63  | block!16=1 . .c|
000027b0  6d 65 6e 75 73 0d 0f 5a  2e e7 20 62 6c 6f 63 6b  |menus..Z.. block|
000027c0  21 31 32 3d 74 6f 6f 6c  62 6f 78 25 20 80 20 62  |!12=toolbox% . b|
000027d0  6c 6f 63 6b 21 31 36 3d  32 20 8c 20 f2 63 6d 65  |lock!16=2 . .cme|
000027e0  6e 75 73 0d 0f 64 44 e7  20 62 6c 6f 63 6b 21 31  |nus..dD. block!1|
000027f0  32 3d 74 6f 6f 6c 62 6f  78 25 20 80 20 62 6c 6f  |2=toolbox% . blo|
00002800  63 6b 21 31 36 3d 33 20  80 20 69 74 65 6d 6e 6f  |ck!16=3 . itemno|
00002810  3c 3e 2d 31 20 8c 20 f2  6f 70 65 6e 77 69 6e 28  |<>-1 . .openwin(|
00002820  69 69 6e 66 6f 25 29 0d  0f 6e 46 e7 20 62 6c 6f  |iinfo%)..nF. blo|
00002830  63 6b 21 31 32 3d 74 6f  6f 6c 62 6f 78 25 20 80  |ck!12=toolbox% .|
00002840  20 62 6c 6f 63 6b 21 31  36 3d 34 20 8c 20 f2 6f  | block!16=4 . .o|
00002850  70 65 6e 77 69 6e 28 6e  65 77 25 29 3a f2 69 6e  |penwin(new%):.in|
00002860  66 6f 28 6e 65 77 25 2c  31 2c 22 22 29 0d 0f 78  |fo(new%,1,"")..x|
00002870  2c e7 20 62 6c 6f 63 6b  21 31 32 3d 74 6f 6f 6c  |,. block!12=tool|
00002880  62 6f 78 25 20 80 20 62  6c 6f 63 6b 21 31 36 3d  |box% . block!16=|
00002890  35 20 8c 20 f2 6c 61 73  74 0d 0f 82 2c e7 20 62  |5 . .last...,. b|
000028a0  6c 6f 63 6b 21 31 32 3d  74 6f 6f 6c 62 6f 78 25  |lock!12=toolbox%|
000028b0  20 80 20 62 6c 6f 63 6b  21 31 36 3d 36 20 8c 20  | . block!16=6 . |
000028c0  f2 6e 65 78 74 0d 0f 8c  36 e7 20 62 6c 6f 63 6b  |.next...6. block|
000028d0  21 31 32 3d 74 6f 6f 6c  62 6f 78 25 20 80 20 62  |!12=toolbox% . b|
000028e0  6c 6f 63 6b 21 31 36 3d  37 20 8c 20 f2 6f 70 65  |lock!16=7 . .ope|
000028f0  6e 77 69 6e 28 66 69 6e  64 25 29 0d 0f 96 32 e7  |nwin(find%)...2.|
00002900  20 62 6c 6f 63 6b 21 31  32 3d 66 69 6e 64 25 20  | block!12=find% |
00002910  80 20 62 6c 6f 63 6b 21  31 36 3d 31 36 20 8c 20  |. block!16=16 . |
00002920  f2 63 6c 6f 73 65 28 66  69 6e 64 25 29 0d 0f a0  |.close(find%)...|
00002930  2a e7 20 62 6c 6f 63 6b  21 31 32 3d 66 69 6e 64  |*. block!12=find|
00002940  25 20 80 20 62 6c 6f 63  6b 21 31 36 3d 31 35 20  |% . block!16=15 |
00002950  8c 20 f2 66 69 6e 64 0d  0f aa 33 e7 20 62 6c 6f  |. .find...3. blo|
00002960  63 6b 21 31 32 3d 62 61  72 25 20 80 20 62 6c 6f  |ck!12=bar% . blo|
00002970  63 6b 21 31 36 3d 30 20  8c 20 f2 6f 70 65 6e 77  |ck!16=0 . .openw|
00002980  69 6e 28 74 69 6e 66 6f  25 29 0d 0f b4 39 e7 20  |in(tinfo%)...9. |
00002990  62 6c 6f 63 6b 21 31 32  3d 71 75 65 72 79 25 20  |block!12=query% |
000029a0  80 20 62 6c 6f 63 6b 21  31 36 3d 30 20 8c 20 f2  |. block!16=0 . .|
000029b0  63 6c 6f 73 65 28 71 75  65 72 79 25 29 3a f2 65  |close(query%):.e|
000029c0  6e 64 71 0d 0f be 0f e7  20 70 72 65 71 75 69 74  |ndq..... prequit|
000029d0  20 8c 0d 0f c8 73 e7 20  62 6c 6f 63 6b 21 31 32  | ....s. block!12|
000029e0  3d 71 75 69 74 25 20 80  20 62 6c 6f 63 6b 21 31  |=quit% . block!1|
000029f0  36 3d 30 20 8c 20 e0 3a  c8 99 22 57 69 6d 70 5f  |6=0 . .:.."Wimp_|
00002a00  50 72 6f 63 65 73 73 4b  65 79 22 2c 26 31 46 43  |ProcessKey",&1FC|
00002a10  3a c8 99 72 65 69 6e 74  65 72 2c 6d 79 74 61 73  |:..reinter,mytas|
00002a20  6b 25 3a c8 99 22 57 69  6d 70 5f 43 6c 6f 73 65  |k%:.."Wimp_Close|
00002a30  44 6f 77 6e 22 2c 74 61  73 6b 2c 6d 79 74 61 73  |Down",task,mytas|
00002a40  6b 25 3a e0 3a 0d 0f d2  3b e7 20 62 6c 6f 63 6b  |k%:.:...;. block|
00002a50  21 31 32 3d 71 75 69 74  25 20 80 20 62 6c 6f 63  |!12=quit% . bloc|
00002a60  6b 21 31 36 3d 32 20 8c  20 f2 63 6c 6f 73 65 28  |k!16=2 . .close(|
00002a70  71 75 69 74 25 29 3a 70  72 65 71 75 69 74 3d a3  |quit%):prequit=.|
00002a80  0d 0f dc 50 e7 20 62 6c  6f 63 6b 21 31 32 3d 71  |...P. block!12=q|
00002a90  75 69 74 25 20 80 20 62  6c 6f 63 6b 21 31 36 3d  |uit% . block!16=|
00002aa0  33 20 8c 20 f2 63 6c 6f  73 65 28 71 75 69 74 25  |3 . .close(quit%|
00002ab0  29 3a f2 6f 70 65 6e 77  69 6e 28 73 61 76 65 64  |):.openwin(saved|
00002ac0  25 29 3a 70 72 65 71 75  69 74 77 61 69 74 3d b9  |%):prequitwait=.|
00002ad0  0d 0f e6 27 e7 20 70 72  65 71 75 69 74 20 80 20  |...'. prequit . |
00002ae0  ac 20 70 72 65 71 75 69  74 77 61 69 74 20 70 72  |. prequitwait pr|
00002af0  65 71 75 69 74 3d a3 0d  0f f0 05 cc 0d 0f fa 57  |equit=.........W|
00002b00  e7 20 62 6c 6f 63 6b 21  31 32 3d 71 75 69 74 25  |. block!12=quit%|
00002b10  20 80 20 62 6c 6f 63 6b  21 31 36 3d 30 20 8c 20  | . block!16=0 . |
00002b20  c8 99 72 65 69 6e 74 65  72 2c 6d 79 74 61 73 6b  |..reinter,mytask|
00002b30  25 3a c8 99 22 57 69 6d  70 5f 43 6c 6f 73 65 44  |%:.."Wimp_CloseD|
00002b40  6f 77 6e 22 2c 74 61 73  6b 2c 6d 79 74 61 73 6b  |own",task,mytask|
00002b50  25 3a e0 0d 10 04 31 e7  20 62 6c 6f 63 6b 21 31  |%:....1. block!1|
00002b60  32 3d 71 75 69 74 25 20  80 20 62 6c 6f 63 6b 21  |2=quit% . block!|
00002b70  31 36 3d 32 20 8c 20 f2  63 6c 6f 73 65 28 71 75  |16=2 . .close(qu|
00002b80  69 74 25 29 0d 10 0e 4c  e7 20 62 6c 6f 63 6b 21  |it%)...L. block!|
00002b90  31 32 3d 71 75 69 74 25  20 80 20 62 6c 6f 63 6b  |12=quit% . block|
00002ba0  21 31 36 3d 33 20 8c 20  f2 63 6c 6f 73 65 28 71  |!16=3 . .close(q|
00002bb0  75 69 74 25 29 3a f2 6f  70 65 6e 77 69 6e 28 73  |uit%):.openwin(s|
00002bc0  61 76 65 64 25 29 3a 71  75 69 74 69 6e 67 3d b9  |aved%):quiting=.|
00002bd0  0d 10 18 05 cd 0d 10 22  05 e1 0d 10 2c 04 0d 10  |......."....,...|
00002be0  36 0d dd f2 70 72 6f 63  65 73 73 0d 10 40 4c e7  |6...process..@L.|
00002bf0  20 21 62 6c 6f 63 6b 3d  73 61 76 65 25 20 80 20  | !block=save% . |
00002c00  62 6c 6f 63 6b 21 32 34  3d 31 33 20 8c 20 77 69  |block!24=13 . wi|
00002c10  6e 73 61 76 65 25 3d 21  62 6c 6f 63 6b 3a f2 73  |nsave%=!block:.s|
00002c20  61 76 65 28 24 a4 69 6e  66 6f 28 77 69 6e 73 61  |ave($.info(winsa|
00002c30  76 65 25 2c 31 29 29 0d  10 4a 4d e7 20 21 62 6c  |ve%,1))..JM. !bl|
00002c40  6f 63 6b 3d 73 61 76 65  64 25 20 80 20 62 6c 6f  |ock=saved% . blo|
00002c50  63 6b 21 32 34 3d 31 33  20 8c 20 77 69 6e 73 61  |ck!24=13 . winsa|
00002c60  76 65 25 3d 21 62 6c 6f  63 6b 3a f2 73 61 76 65  |ve%=!block:.save|
00002c70  28 24 a4 69 6e 66 6f 28  77 69 6e 73 61 76 65 25  |($.info(winsave%|
00002c80  2c 31 29 29 0d 10 54 20  c8 99 22 57 69 6d 70 5f  |,1))..T .."Wimp_|
00002c90  50 72 6f 63 65 73 73 4b  65 79 22 2c 62 6c 6f 63  |ProcessKey",bloc|
00002ca0  6b 21 32 34 0d 10 5e 05  e1 0d 10 68 04 0d 10 72  |k!24..^....h...r|
00002cb0  0c dd f2 73 65 6c 65 63  74 0d 10 7c 0b 6e 6f 77  |...select..|.now|
00002cc0  61 79 3d 30 0d 10 86 2e  c8 99 22 57 69 6d 70 5f  |ay=0......"Wimp_|
00002cd0  44 65 63 6f 64 65 4d 65  6e 75 22 2c 2c 6f 70 65  |DecodeMenu",,ope|
00002ce0  6e 6d 65 6e 75 25 2c 62  6c 6f 63 6b 2c 69 63 6f  |nmenu%,block,ico|
00002cf0  6e 64 0d 10 90 12 c8 8e  20 6f 70 65 6e 6d 65 6e  |nd...... openmen|
00002d00  75 25 20 ca 0d 10 9a 1a  c9 20 6d 61 69 6e 6d 65  |u% ...... mainme|
00002d10  6e 75 25 2c 69 63 6f 6e  6d 65 6e 75 25 3a 0d 10  |nu%,iconmenu%:..|
00002d20  a4 2c e7 20 24 69 63 6f  6e 64 3d 22 51 75 69 74  |.,. $icond="Quit|
00002d30  22 20 8c 20 f2 61 72 65  79 6f 75 73 75 72 65 3a  |" . .areyousure:|
00002d40  71 75 69 74 69 6e 67 25  3d b9 0d 10 ae 40 e7 20  |quiting%=....@. |
00002d50  24 69 63 6f 6e 64 3d 22  54 6f 6f 6c 73 22 20 80  |$icond="Tools" .|
00002d60  20 74 6f 6f 6c 73 6f 6e  20 8c 20 74 6f 6f 6c 73  | toolson . tools|
00002d70  6f 6e 3d a3 3a f2 74 6f  6f 6c 62 6f 78 28 2d 31  |on=.:.toolbox(-1|
00002d80  29 3a 6e 6f 77 61 79 3d  2d 31 0d 10 b8 42 e7 20  |):noway=-1...B. |
00002d90  24 69 63 6f 6e 64 3d 22  54 6f 6f 6c 73 22 20 80  |$icond="Tools" .|
00002da0  20 ac 20 74 6f 6f 6c 73  6f 6e 20 80 20 6e 6f 77  | . toolson . now|
00002db0  61 79 3d 30 20 8c 20 74  6f 6f 6c 73 6f 6e 3d b9  |ay=0 . toolson=.|
00002dc0  3a f2 74 6f 6f 6c 62 6f  78 28 31 29 0d 10 c2 2b  |:.toolbox(1)...+|
00002dd0  e7 20 24 69 63 6f 6e 64  3d 22 54 72 65 65 22 20  |. $icond="Tree" |
00002de0  8c 20 f2 6f 70 65 6e 77  69 6e 28 6d 61 69 6e 25  |. .openwin(main%|
00002df0  29 3a f2 70 61 6e 65 0d  10 cc 39 e7 20 24 69 63  |):.pane...9. $ic|
00002e00  6f 6e 64 3d 22 4e 65 77  20 54 72 65 65 22 20 8c  |ond="New Tree" .|
00002e10  20 f2 6f 70 65 6e 77 69  6e 28 6e 65 77 25 29 3a  | .openwin(new%):|
00002e20  f2 69 6e 66 6f 28 6e 65  77 25 2c 31 2c 22 22 29  |.info(new%,1,"")|
00002e30  0d 10 d6 38 e7 20 24 69  63 6f 6e 64 3d 22 54 72  |...8. $icond="Tr|
00002e40  65 65 73 2e 4e 6f 20 54  72 65 65 22 20 8c 20 c8  |ees.No Tree" . .|
00002e50  99 22 57 69 6d 70 5f 43  72 65 61 74 65 4d 65 6e  |."Wimp_CreateMen|
00002e60  75 22 2c 2c 2d 31 3a e1  0d 10 e0 2d e7 20 c0 24  |u",,-1:....-. .$|
00002e70  69 63 6f 6e 64 2c 35 29  3d 22 54 72 65 65 73 22  |icond,5)="Trees"|
00002e80  20 8c 20 f2 6f 70 65 6e  74 72 65 65 28 62 6c 6f  | . .opentree(blo|
00002e90  63 6b 21 34 29 0d 10 ea  0c c9 20 74 72 65 65 73  |ck!4)..... trees|
00002ea0  25 0d 10 f4 3e e7 20 24  69 63 6f 6e 64 3d 22 43  |%...>. $icond="C|
00002eb0  6c 65 61 72 20 41 6c 6c  22 20 8c 20 f2 63 6c 65  |lear All" . .cle|
00002ec0  61 72 61 6c 6c 3a c8 99  22 57 69 6d 70 5f 43 72  |arall:.."Wimp_Cr|
00002ed0  65 61 74 65 4d 65 6e 75  22 2c 2c 2d 31 3a e1 0d  |eateMenu",,-1:..|
00002ee0  10 fe 33 e7 20 24 69 63  6f 6e 64 3d 22 4e 6f 20  |..3. $icond="No |
00002ef0  54 72 65 65 73 22 20 8c  20 c8 99 22 57 69 6d 70  |Trees" . .."Wimp|
00002f00  5f 43 72 65 61 74 65 4d  65 6e 75 22 2c 2c 2d 31  |_CreateMenu",,-1|
00002f10  3a e1 0d 11 08 21 e7 20  74 6d 6f 70 74 3d 30 20  |:....!. tmopt=0 |
00002f20  8c 20 f2 6f 70 65 6e 74  72 65 65 28 21 62 6c 6f  |. .opentree(!blo|
00002f30  63 6b 29 0d 11 12 20 e7  20 74 6d 6f 70 74 3d 31  |ck)... . tmopt=1|
00002f40  20 8c 20 f2 6f 70 65 6e  61 72 63 28 21 62 6c 6f  | . .openarc(!blo|
00002f50  63 6b 29 0d 11 1c 23 e7  20 74 6d 6f 70 74 3d 32  |ck)...#. tmopt=2|
00002f60  20 8c 20 f2 64 65 6c 65  74 65 28 28 21 62 6c 6f  | . .delete((!blo|
00002f70  63 6b 29 2d 31 29 0d 11  26 05 cb 0d 11 30 22 c8  |ck)-1)..&....0".|
00002f80  99 22 57 69 6d 70 5f 47  65 74 50 6f 69 6e 74 65  |."Wimp_GetPointe|
00002f90  72 49 6e 66 6f 22 2c 2c  62 6c 6f 63 6b 0d 11 3a  |rInfo",,block..:|
00002fa0  11 e7 20 62 6c 6f 63 6b  21 38 3d 31 20 8c 0d 11  |.. block!8=1 ...|
00002fb0  44 3e e7 20 6d 65 6e 75  6f 70 65 6e 3d 2d 34 34  |D>. menuopen=-44|
00002fc0  20 8c 20 72 63 3d 31 3a  62 6c 6f 63 6b 21 31 36  | . rc=1:block!16|
00002fd0  3d 72 69 63 6f 6e 3a 62  6c 6f 63 6b 21 31 32 3d  |=ricon:block!12=|
00002fe0  72 6d 65 6e 3a f2 63 6d  65 6e 75 73 0d 11 4e 22  |rmen:.cmenus..N"|
00002ff0  c8 99 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |.."Wimp_CreateMe|
00003000  6e 75 22 2c 2c 6f 70 65  6e 6d 65 6e 75 25 0d 11  |nu",,openmenu%..|
00003010  58 05 cc 0d 11 62 1b c8  99 22 57 69 6d 70 5f 43  |X....b..."Wimp_C|
00003020  72 65 61 74 65 4d 65 6e  75 22 2c 2c 2d 31 0d 11  |reateMenu",,-1..|
00003030  6c 05 cd 0d 11 76 05 e1  0d 11 80 04 0d 11 8a 0f  |l....v..........|
00003040  dd f2 72 61 64 69 6f 73  61 76 65 0d 11 94 0a 64  |..radiosave....d|
00003050  6f 6e 65 3d 30 0d 11 9e  12 e7 20 62 6c 6f 63 6b  |one=0..... block|
00003060  21 31 36 3d 33 20 8c 0d  11 a8 24 f2 73 65 74 69  |!16=3 ....$.seti|
00003070  63 73 74 61 74 65 28 73  61 76 65 25 2c 34 2c 31  |cstate(save%,4,1|
00003080  3c 3c 32 31 2c 30 3c 3c  32 31 29 0d 11 b2 1d f2  |<<21,0<<21).....|
00003090  69 6e 66 6f 28 73 61 76  65 25 2c 31 2c 22 54 65  |info(save%,1,"Te|
000030a0  78 74 46 69 6c 65 22 29  0d 11 bc 05 cd 0d 11 c6  |xtFile")........|
000030b0  12 e7 20 62 6c 6f 63 6b  21 31 36 3d 34 20 8c 0d  |.. block!16=4 ..|
000030c0  11 d0 24 f2 73 65 74 69  63 73 74 61 74 65 28 73  |..$.seticstate(s|
000030d0  61 76 65 25 2c 33 2c 31  3c 3c 32 31 2c 30 3c 3c  |ave%,3,1<<21,0<<|
000030e0  32 31 29 0d 11 da 1e f2  69 6e 66 6f 28 73 61 76  |21).....info(sav|
000030f0  65 25 2c 31 2c 22 53 65  6c 65 63 74 69 6f 6e 22  |e%,1,"Selection"|
00003100  29 0d 11 e4 05 cd 0d 11  ee 05 e1 0d 11 f8 04 0d  |)...............|
00003110  12 02 11 dd f2 6d 65 73  73 28 6d 65 73 73 24 29  |.....mess(mess$)|
00003120  0d 12 0c 20 21 69 63 6f  6e 64 3d 30 3a 24 28 69  |... !icond=0:$(i|
00003130  63 6f 6e 64 2b 34 29 3d  6d 65 73 73 24 2b bd 30  |cond+4)=mess$+.0|
00003140  0d 12 16 2c c8 99 22 57  69 6d 70 5f 52 65 70 6f  |...,.."Wimp_Repo|
00003150  72 74 45 72 72 6f 72 22  2c 69 63 6f 6e 64 2c 31  |rtError",icond,1|
00003160  2c 22 21 44 69 73 6b 54  72 65 65 22 0d 12 20 05  |,"!DiskTree".. .|
00003170  e1 0d 12 2a 04 0d 12 34  09 dd f2 6f 75 74 0d 12  |...*...4...out..|
00003180  3e 0f f2 64 72 61 67 73  70 72 28 31 29 0d 12 48  |>..dragspr(1)..H|
00003190  28 e7 20 77 69 6e 73 61  76 65 25 3d 6e 65 77 25  |(. winsave%=new%|
000031a0  20 8c 20 73 74 65 78 74  3d 73 74 65 78 3a 66 74  | . stext=stex:ft|
000031b0  3d 26 46 46 46 0d 12 52  29 e7 20 77 69 6e 73 61  |=&FFF..R). winsa|
000031c0  76 65 25 3d 73 61 76 65  25 20 8c 20 73 74 65 78  |ve%=save% . stex|
000031d0  74 3d 73 74 65 78 3a 66  74 3d 26 46 46 46 0d 12  |t=stex:ft=&FFF..|
000031e0  5c 2b e7 20 77 69 6e 73  61 76 65 25 3d 73 61 76  |\+. winsave%=sav|
000031f0  65 64 25 20 8c 20 73 74  65 78 74 3d 73 74 65 78  |ed% . stext=stex|
00003200  64 3a 66 74 3d 26 30 30  44 0d 12 66 10 e7 20 64  |d:ft=&00D..f.. d|
00003210  72 69 76 65 25 3d 31 20  8c 0d 12 70 23 c8 99 20  |rive%=1 ...p#.. |
00003220  22 57 69 6d 70 5f 47 65  74 50 6f 69 6e 74 65 72  |"Wimp_GetPointer|
00003230  49 6e 66 6f 22 2c 2c 62  6c 6f 63 6b 0d 12 7a 39  |Info",,block..z9|
00003240  54 6f 58 3d 62 6c 6f 63  6b 21 30 3a 54 6f 59 3d  |ToX=block!0:ToY=|
00003250  62 6c 6f 63 6b 21 34 3a  57 69 6e 64 6f 77 3d 62  |block!4:Window=b|
00003260  6c 6f 63 6b 21 31 32 3a  49 63 6f 6e 3d 62 6c 6f  |lock!12:Icon=blo|
00003270  63 6b 21 31 36 0d 12 84  33 6d 62 6c 6f 63 6b 21  |ck!16...3mblock!|
00003280  30 3d 32 35 36 3a 6d 62  6c 6f 63 6b 21 31 32 3d  |0=256:mblock!12=|
00003290  30 3a 6d 62 6c 6f 63 6b  21 31 36 3d 31 3a f4 20  |0:mblock!16=1:. |
000032a0  44 61 74 61 53 61 76 65  0d 12 8e 3f 6d 62 6c 6f  |DataSave...?mblo|
000032b0  63 6b 21 32 30 3d 57 69  6e 64 6f 77 3a 6d 62 6c  |ck!20=Window:mbl|
000032c0  6f 63 6b 21 32 34 3d 49  63 6f 6e 3a 6d 62 6c 6f  |ock!24=Icon:mblo|
000032d0  63 6b 21 32 38 3d 54 6f  58 3a 6d 62 6c 6f 63 6b  |ck!28=ToX:mblock|
000032e0  21 33 32 3d 54 6f 59 0d  12 98 37 6d 62 6c 6f 63  |!32=ToY...7mbloc|
000032f0  6b 21 33 36 3d 2d 31 3a  f4 20 4e 6f 20 69 64 65  |k!36=-1:. No ide|
00003300  61 20 77 68 61 74 20 74  68 65 20 73 69 7a 65 20  |a what the size |
00003310  69 73 20 67 6f 69 6e 67  20 74 6f 20 62 65 0d 12  |is going to be..|
00003320  a2 11 6d 62 6c 6f 63 6b  21 34 30 3d 66 74 3a 0d  |..mblock!40=ft:.|
00003330  12 ac 1d 24 73 74 65 78  74 3d 24 a4 69 6e 66 6f  |...$stext=$.info|
00003340  28 77 69 6e 73 61 76 65  25 2c 31 29 0d 12 b6 1b  |(winsave%,1)....|
00003350  24 73 74 65 78 74 3d a4  67 65 74 6c 65 61 66 28  |$stext=.getleaf(|
00003360  24 73 74 65 78 74 29 0d  12 c0 29 e3 20 49 3d 30  |$stext)...). I=0|
00003370  20 b8 20 32 35 35 3a e7  20 49 3f 73 74 65 78 74  | . 255:. I?stext|
00003380  3c 33 32 20 8c 20 49 3f  73 74 65 78 74 3d 31 33  |<32 . I?stext=13|
00003390  0d 12 ca 05 ed 0d 12 d4  20 24 28 6d 62 6c 6f 63  |........ $(mbloc|
000033a0  6b 2b 34 34 29 3d a4 62  69 74 28 24 73 74 65 78  |k+44)=.bit($stex|
000033b0  74 29 2b bd 30 0d 12 de  2e e7 20 77 69 6e 73 61  |t)+.0..... winsa|
000033c0  76 65 25 3d 6e 65 77 25  20 8c 20 24 28 6d 62 6c  |ve%=new% . $(mbl|
000033d0  6f 63 6b 2b 34 34 29 3d  22 44 69 72 65 63 74 6f  |ock+44)="Directo|
000033e0  72 79 22 0d 12 e8 3a c8  99 20 22 57 69 6d 70 5f  |ry"...:.. "Wimp_|
000033f0  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
00003400  6d 62 6c 6f 63 6b 2c 57  69 6e 64 6f 77 2c 49 63  |mblock,Window,Ic|
00003410  6f 6e 3a f4 20 44 61 74  61 53 61 76 65 0d 12 f2  |on:. DataSave...|
00003420  0b 64 72 61 67 25 3d 30  0d 12 fc 05 cd 0d 13 06  |.drag%=0........|
00003430  05 e1 0d 13 10 04 0d 13  1a 0d dd f2 64 65 66 73  |............defs|
00003440  61 76 65 0d 13 24 09 f2  4d 6f 64 65 0d 13 2e 13  |ave..$..Mode....|
00003450  21 62 6c 6f 63 6b 3d 77  69 6e 73 61 76 65 25 0d  |!block=winsave%.|
00003460  13 38 23 c8 99 20 22 57  69 6d 70 5f 47 65 74 57  |.8#.. "Wimp_GetW|
00003470  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 62 6c 6f  |indowState",,blo|
00003480  63 6b 0d 13 42 1b 79 73  69 7a 65 25 3d 62 6c 6f  |ck..B.ysize%=blo|
00003490  63 6b 21 31 36 2d 62 6c  6f 63 6b 21 38 0d 13 4c  |ck!16-block!8..L|
000034a0  23 78 25 3d 62 6c 6f 63  6b 21 34 3a 79 25 3d 62  |#x%=block!4:y%=b|
000034b0  6c 6f 63 6b 21 38 3a 62  6c 6f 63 6b 21 34 3d 32  |lock!8:block!4=2|
000034c0  0d 13 56 20 c8 99 22 57  69 6d 70 5f 47 65 74 49  |..V .."Wimp_GetI|
000034d0  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6f 63 6b  |conState",,block|
000034e0  0d 13 60 23 62 6c 6f 63  6b 21 38 2b 3d 78 25 3a  |..`#block!8+=x%:|
000034f0  62 6c 6f 63 6b 21 31 32  2b 3d 79 25 2b 79 73 69  |block!12+=y%+ysi|
00003500  7a 65 25 0d 13 6a 24 62  6c 6f 63 6b 21 31 36 2b  |ze%..j$block!16+|
00003510  3d 78 25 3a 62 6c 6f 63  6b 21 32 30 2b 3d 79 25  |=x%:block!20+=y%|
00003520  2b 79 73 69 7a 65 25 0d  13 74 35 62 6c 6f 63 6b  |+ysize%..t5block|
00003530  21 32 34 3d 30 3a 62 6c  6f 63 6b 21 32 38 3d 30  |!24=0:block!28=0|
00003540  3a 62 6c 6f 63 6b 21 33  32 3d 78 6d 61 78 3a 62  |:block!32=xmax:b|
00003550  6c 6f 63 6b 21 33 36 3d  79 6d 61 78 0d 13 7e 27  |lock!36=ymax..~'|
00003560  21 62 6c 6f 63 6b 3d 30  3a 62 6c 6f 63 6b 21 34  |!block=0:block!4|
00003570  3d 35 3a 64 72 61 67 25  3d b9 3a 64 72 69 76 65  |=5:drag%=.:drive|
00003580  25 3d 31 0d 13 88 0f e7  20 64 72 61 67 73 70 72  |%=1..... dragspr|
00003590  20 8c 0d 13 92 38 c8 99  20 22 44 72 61 67 41 53  | ....8.. "DragAS|
000035a0  70 72 69 74 65 5f 53 74  61 72 74 22 2c 25 31 30  |prite_Start",%10|
000035b0  30 30 30 31 30 31 2c 31  2c 66 69 6c 65 74 79 70  |000101,1,filetyp|
000035c0  65 24 2c 62 6c 6f 63 6b  2b 38 0d 13 9c 10 f2 64  |e$,block+8.....d|
000035d0  72 61 67 73 70 72 28 2d  31 29 0d 13 a6 05 cc 0d  |ragspr(-1)......|
000035e0  13 b0 1b c8 99 22 57 69  6d 70 5f 44 72 61 67 42  |....."Wimp_DragB|
000035f0  6f 78 22 2c 2c 62 6c 6f  63 6b 0d 13 ba 05 cd 0d  |ox",,block......|
00003600  13 c4 05 e1 0d 13 ce 04  0d 13 d8 0a dd f2 4d 6f  |..............Mo|
00003610  64 65 0d 13 e2 4d 21 62  6c 6f 63 6b 3d 31 33 30  |de...M!block=130|
00003620  3a 62 6c 6f 63 6b 21 34  3d 31 33 31 3a 62 6c 6f  |:block!4=131:blo|
00003630  63 6b 21 38 3d 2d 31 3a  c8 99 22 4f 53 5f 52 65  |ck!8=-1:.."OS_Re|
00003640  61 64 56 64 75 56 61 72  69 61 62 6c 65 73 22 2c  |adVduVariables",|
00003650  62 6c 6f 63 6b 2c 62 6c  6f 63 6b 2b 31 32 38 0d  |block,block+128.|
00003660  13 ec 29 c8 99 22 4f 53  5f 52 65 61 64 4d 6f 64  |..).."OS_ReadMod|
00003670  65 56 61 72 69 61 62 6c  65 22 2c eb 2c 34 20 b8  |eVariable",.,4 .|
00003680  20 2c 2c 58 65 69 67 25  0d 13 f6 29 c8 99 22 4f  | ,,Xeig%...).."O|
00003690  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
000036a0  6c 65 22 2c eb 2c 35 20  b8 20 2c 2c 59 65 69 67  |le",.,5 . ,,Yeig|
000036b0  25 0d 14 00 3d 78 6d 61  78 3d 28 28 62 6c 6f 63  |%...=xmax=((bloc|
000036c0  6b 21 31 32 38 29 2b 31  29 2a 32 5e 58 65 69 67  |k!128)+1)*2^Xeig|
000036d0  25 3a 79 6d 61 78 3d 28  28 62 6c 6f 63 6b 21 31  |%:ymax=((block!1|
000036e0  33 32 29 2b 31 29 2a 32  5e 59 65 69 67 25 0d 14  |32)+1)*2^Yeig%..|
000036f0  0a 05 e1 0d 14 14 04 0d  14 1e 11 dd f2 73 61 76  |.............sav|
00003700  65 28 73 61 76 65 24 29  0d 14 28 38 e7 20 63 74  |e(save$)..(8. ct|
00003710  3d 2d 31 20 8c 20 f2 6d  65 73 73 28 22 4e 6f 20  |=-1 . .mess("No |
00003720  64 69 72 65 63 74 6f 72  79 20 74 72 65 65 20 64  |directory tree d|
00003730  61 74 61 20 74 6f 20 73  61 76 65 21 22 29 3a e1  |ata to save!"):.|
00003740  0d 14 32 7b e7 20 a7 73  61 76 65 24 2c 22 2e 22  |..2{. .save$,"."|
00003750  29 3c 31 20 80 20 a7 73  61 76 65 24 2c 22 3a 22  |)<1 . .save$,":"|
00003760  29 3c 31 20 80 20 73 61  76 65 24 3c 3e 22 3c 57  |)<1 . save$<>"<W|
00003770  69 6d 70 24 53 63 72 61  70 3e 22 20 8c 20 f2 6d  |imp$Scrap>" . .m|
00003780  65 73 73 28 22 54 6f 20  73 61 76 65 2c 20 64 72  |ess("To save, dr|
00003790  61 67 20 74 68 65 20 66  69 6c 65 20 69 63 6f 6e  |ag the file icon|
000037a0  20 74 6f 20 61 20 64 69  72 65 63 74 6f 72 79 20  | to a directory |
000037b0  76 69 65 77 65 72 2e 22  29 3a e1 0d 14 3c 07 ea  |viewer."):...<..|
000037c0  20 85 0d 14 46 7b ee 20  85 20 ea 20 e7 20 9f 3d  | ...F{. . . . .=|
000037d0  37 31 36 32 32 3a f2 71  75 65 72 79 28 22 44 69  |71622:.query("Di|
000037e0  73 63 20 46 75 6c 6c 22  29 3a c8 99 26 30 44 2c  |sc Full"):..&0D,|
000037f0  30 2c 66 68 25 3a c8 99  26 34 30 36 43 31 3a f7  |0,fh%:..&406C1:.|
00003800  20 85 3a e1 3a 8b 20 f7  20 85 3a f2 65 72 72 6f  | .:.:. . .:.erro|
00003810  72 28 f6 24 2b 22 20 3a  20 61 74 20 6c 69 6e 65  |r(.$+" : at line|
00003820  20 22 2b c3 9e 29 3a c8  99 26 30 44 2c 30 2c 66  | "+..):..&0D,0,f|
00003830  68 25 3a c8 99 26 34 30  36 43 31 3a e1 0d 14 50  |h%:..&406C1:...P|
00003840  17 e7 20 77 69 6e 73 61  76 65 25 3d 73 61 76 65  |.. winsave%=save|
00003850  64 25 20 8c 0d 14 5a 14  c8 99 22 48 6f 75 72 67  |d% ...Z..."Hourg|
00003860  6c 61 73 73 5f 4f 6e 22  0d 14 64 0a 62 79 74 65  |lass_On"..d.byte|
00003870  3d 30 0d 14 6e 1f c8 99  22 4f 53 5f 46 69 6e 64  |=0..n..."OS_Find|
00003880  22 2c 26 38 30 2c 73 61  76 65 24 20 b8 20 66 68  |",&80,save$ . fh|
00003890  25 0d 14 78 0d 65 6e 64  74 3d 74 62 6c 6b 0d 14  |%..x.endt=tblk..|
000038a0  82 21 24 65 6e 64 74 3d  22 44 69 73 6b 54 72 65  |.!$endt="DiskTre|
000038b0  65 20 44 61 74 61 20 46  69 6c 65 20 76 b9 22 0d  |e Data File v.".|
000038c0  14 8c 24 65 6e 64 74 2b  3d a9 28 22 44 69 73 6b  |..$endt+=.("Disk|
000038d0  54 72 65 65 20 44 61 74  61 20 46 69 6c 65 20 76  |Tree Data File v|
000038e0  b9 22 29 0d 14 96 24 c8  99 22 4f 53 5f 47 42 50  |.")...$.."OS_GBP|
000038f0  42 22 2c 32 2c 66 68 25  2c 74 62 6c 6b 2c 65 6e  |B",2,fh%,tblk,en|
00003900  64 74 2d 74 62 6c 6b 0d  14 a0 3c e7 20 a4 63 68  |dt-tblk...<. .ch|
00003910  65 63 6b 66 6c 61 67 28  73 61 76 65 64 25 2c 33  |eckflag(saved%,3|
00003920  2c 32 31 29 20 8c 20 73  74 74 3d 73 74 3a 65 74  |,21) . stt=st:et|
00003930  74 3d 73 74 3a 8b 20 73  74 74 3d 30 3a 65 74 74  |t=st:. stt=0:ett|
00003940  3d 63 74 0d 14 aa 0d 65  6e 64 74 3d 74 62 6c 6b  |=ct....endt=tblk|
00003950  0d 14 b4 1c 43 54 24 3d  a4 66 75 6c 6c 73 28 c3  |....CT$=.fulls(.|
00003960  28 65 74 74 2d 73 74 74  29 2c 33 29 0d 14 be 0d  |(ett-stt),3)....|
00003970  24 65 6e 64 74 3d 43 54  24 0d 14 c8 0b 65 6e 64  |$endt=CT$....end|
00003980  74 2b 3d 33 0d 14 d2 24  c8 99 22 4f 53 5f 47 42  |t+=3...$.."OS_GB|
00003990  50 42 22 2c 32 2c 66 68  25 2c 74 62 6c 6b 2c 65  |PB",2,fh%,tblk,e|
000039a0  6e 64 74 2d 74 62 6c 6b  0d 14 dc 17 74 6f 74 61  |ndt-tblk....tota|
000039b0  6c 31 25 3d 30 3a 74 6f  74 61 6c 32 25 3d 30 0d  |l1%=0:total2%=0.|
000039c0  14 e6 28 e3 20 6b 3d 73  74 74 20 b8 20 65 74 74  |..(. k=stt . ett|
000039d0  3a 74 6f 74 61 6c 31 25  2b 3d 74 63 6f 75 6e 74  |:total1%+=tcount|
000039e0  28 6b 29 3a ed 20 6b 0d  14 f0 11 e3 20 6b 3d 73  |(k):. k..... k=s|
000039f0  74 74 20 b8 20 65 74 74  0d 14 fa 0e 74 6f 74 61  |tt . ett....tota|
00003a00  6c 32 25 2b 3d 31 0d 15  04 30 c8 99 22 48 6f 75  |l2%+=1...0.."Hou|
00003a10  72 67 6c 61 73 73 5f 50  65 72 63 65 6e 74 61 67  |rglass_Percentag|
00003a20  65 22 2c 74 6f 74 61 6c  32 25 2f 74 6f 74 61 6c  |e",total2%/total|
00003a30  31 25 2a 31 30 30 0d 15  0e 1d 74 73 24 3d a4 66  |1%*100....ts$=.f|
00003a40  75 6c 6c 73 28 c3 28 74  73 69 7a 65 28 6b 29 29  |ulls(.(tsize(k))|
00003a50  2c 37 29 0d 15 18 1c 74  6c 24 3d a4 66 75 6c 6c  |,7)....tl$=.full|
00003a60  73 28 c3 28 74 6c 65 6e  28 6b 29 29 2c 37 29 0d  |s(.(tlen(k)),7).|
00003a70  15 22 1e 74 63 24 3d a4  66 75 6c 6c 73 28 c3 28  |.".tc$=.fulls(.(|
00003a80  74 63 6f 75 6e 74 28 6b  29 29 2c 37 29 0d 15 2c  |tcount(k)),7)..,|
00003a90  24 72 6f 6f 74 6c 24 3d  a4 66 75 6c 6c 73 28 c3  |$rootl$=.fulls(.|
00003aa0  28 a9 28 74 72 6f 6f 74  24 28 6b 29 29 29 2c 33  |(.(troot$(k))),3|
00003ab0  29 0d 15 36 0d 65 6e 64  74 3d 74 62 6c 6b 0d 15  |)..6.endt=tblk..|
00003ac0  40 1c 24 65 6e 64 74 3d  74 73 24 2b 74 6c 24 2b  |@.$endt=ts$+tl$+|
00003ad0  74 63 24 2b 72 6f 6f 74  6c 24 0d 15 4a 0c 65 6e  |tc$+rootl$..J.en|
00003ae0  64 74 2b 3d 32 34 0d 15  54 1d c8 99 22 4f 53 5f  |dt+=24..T..."OS_|
00003af0  47 42 50 42 22 2c 32 2c  66 68 25 2c 74 62 6c 6b  |GBPB",2,fh%,tblk|
00003b00  2c 32 34 0d 15 5e 0d 65  6e 64 74 3d 74 62 6c 6b  |,24..^.endt=tblk|
00003b10  0d 15 68 13 24 65 6e 64  74 3d 74 72 6f 6f 74 24  |..h.$endt=troot$|
00003b20  28 6b 29 0d 15 72 16 65  6e 64 74 2b 3d a9 28 74  |(k)..r.endt+=.(t|
00003b30  72 6f 6f 74 24 28 6b 29  29 0d 15 7c 27 c8 99 22  |root$(k))..|'.."|
00003b40  4f 53 5f 47 42 50 42 22  2c 32 2c 66 68 25 2c 74  |OS_GBPB",2,fh%,t|
00003b50  62 6c 6b 2c a9 28 74 72  6f 6f 74 24 28 6b 29 29  |blk,.(troot$(k))|
00003b60  0d 15 86 26 c8 99 22 4f  53 5f 47 42 50 42 22 2c  |...&.."OS_GBPB",|
00003b70  32 2c 66 68 25 2c 74 72  65 65 28 6b 29 2c 74 73  |2,fh%,tree(k),ts|
00003b80  69 7a 65 28 6b 29 0d 15  90 07 ed 20 6b 0d 15 9a  |ize(k)..... k...|
00003b90  0f c8 99 26 30 44 2c 30  2c 66 68 25 0d 15 a4 1d  |...&0D,0,fh%....|
00003ba0  c8 99 22 4f 53 5f 46 69  6c 65 22 2c 31 38 2c 73  |.."OS_File",18,s|
00003bb0  61 76 65 24 2c 26 30 30  44 0d 15 ae 39 e7 20 73  |ave$,&00D...9. s|
00003bc0  61 76 65 24 3c 3e 22 3c  57 69 6d 70 24 53 63 72  |ave$<>"<Wimp$Scr|
00003bd0  61 70 3e 22 20 80 20 ac  20 a4 63 68 65 63 6b 66  |ap>" . . .checkf|
00003be0  6c 61 67 28 73 61 76 65  64 25 2c 33 2c 32 31 29  |lag(saved%,3,21)|
00003bf0  20 8c 0d 15 b8 10 21 62  6c 6f 63 6b 3d 6d 61 69  | .....!block=mai|
00003c00  6e 25 0d 15 c2 21 c8 99  22 57 69 6d 70 5f 47 65  |n%...!.."Wimp_Ge|
00003c10  74 57 69 6e 64 6f 77 49  6e 66 6f 22 2c 2c 62 6c  |tWindowInfo",,bl|
00003c20  6f 63 6b 0d 15 cc 0b 73  61 76 65 64 3d a3 0d 15  |ock....saved=...|
00003c30  d6 58 24 28 62 6c 6f 63  6b 21 37 36 29 3d 73 61  |.X$(block!76)=sa|
00003c40  76 65 24 3a c8 99 22 57  69 6d 70 5f 46 6f 72 63  |ve$:.."Wimp_Forc|
00003c50  65 52 65 64 72 61 77 22  2c 2d 31 2c 62 6c 6f 63  |eRedraw",-1,bloc|
00003c60  6b 21 34 2c 28 62 6c 6f  63 6b 21 31 36 29 2d 33  |k!4,(block!16)-3|
00003c70  32 2c 62 6c 6f 63 6b 21  31 32 2c 62 6c 6f 63 6b  |2,block!12,block|
00003c80  21 31 36 2b 33 36 0d 15  e0 19 f2 69 6e 66 6f 28  |!16+36.....info(|
00003c90  73 61 76 65 64 25 2c 31  2c 73 61 76 65 24 29 0d  |saved%,1,save$).|
00003ca0  15 ea 18 f2 69 6e 66 6f  28 66 69 6e 66 6f 25 2c  |....info(finfo%,|
00003cb0  33 2c 22 4e 6f 22 29 0d  15 f4 05 cd 0d 15 fe 17  |3,"No").........|
00003cc0  c8 99 22 48 6f 75 72 67  6c 61 73 73 5f 53 6d 61  |.."Hourglass_Sma|
00003cd0  73 68 22 0d 16 08 41 e7  20 71 75 69 74 69 6e 67  |sh"...A. quiting|
00003ce0  20 c8 99 72 65 69 6e 74  65 72 2c 6d 79 74 61 73  | ..reinter,mytas|
00003cf0  6b 25 3a c8 99 22 57 69  6d 70 5f 43 6c 6f 73 65  |k%:.."Wimp_Close|
00003d00  44 6f 77 6e 22 2c 74 61  73 6b 2c 6d 79 74 61 73  |Down",task,mytas|
00003d10  6b 25 3a e0 0d 16 12 05  cd 0d 16 1c 16 e7 20 77  |k%:........... w|
00003d20  69 6e 73 61 76 65 25 3d  73 61 76 65 25 20 8c 0d  |insave%=save% ..|
00003d30  16 26 14 c8 99 22 48 6f  75 72 67 6c 61 73 73 5f  |.&..."Hourglass_|
00003d40  4f 6e 22 0d 16 30 1f c8  99 22 4f 53 5f 46 69 6e  |On"..0..."OS_Fin|
00003d50  64 22 2c 26 38 30 2c 73  61 76 65 24 20 b8 20 66  |d",&80,save$ . f|
00003d60  68 25 0d 16 3a 3b e7 20  a4 63 68 65 63 6b 66 6c  |h%..:;. .checkfl|
00003d70  61 67 28 73 61 76 65 25  2c 33 2c 32 31 29 20 8c  |ag(save%,3,21) .|
00003d80  20 73 74 74 3d 73 74 3a  65 74 74 3d 73 74 3a 8b  | stt=st:ett=st:.|
00003d90  20 73 74 74 3d 30 3a 65  74 74 3d 63 74 0d 16 44  | stt=0:ett=ct..D|
00003da0  17 74 6f 74 61 6c 31 25  3d 30 3a 74 6f 74 61 6c  |.total1%=0:total|
00003db0  32 25 3d 30 0d 16 4e 28  e3 20 49 3d 73 74 74 20  |2%=0..N(. I=stt |
00003dc0  b8 20 65 74 74 3a 74 6f  74 61 6c 31 25 2b 3d 74  |. ett:total1%+=t|
00003dd0  63 6f 75 6e 74 28 49 29  3a ed 20 49 0d 16 58 11  |count(I):. I..X.|
00003de0  e3 20 49 3d 73 74 74 20  b8 20 65 74 74 0d 16 62  |. I=stt . ett..b|
00003df0  0e 74 6f 74 61 6c 32 25  2b 3d 31 0d 16 6c 30 c8  |.total2%+=1..l0.|
00003e00  99 22 48 6f 75 72 67 6c  61 73 73 5f 50 65 72 63  |."Hourglass_Perc|
00003e10  65 6e 74 61 67 65 22 2c  74 6f 74 61 6c 32 25 2f  |entage",total2%/|
00003e20  74 6f 74 61 6c 31 25 2a  31 30 30 0d 16 76 0d 65  |total1%*100..v.e|
00003e30  6e 64 74 3d 74 62 6c 6b  0d 16 80 2a 24 65 6e 64  |ndt=tblk...*$end|
00003e40  74 3d 22 20 20 20 20 20  20 20 20 20 20 20 20 22  |t="            "|
00003e50  2b 74 72 6f 6f 74 24 28  49 29 2b bd 31 30 2b bd  |+troot$(I)+.10+.|
00003e60  31 30 0d 16 8a 27 65 6e  64 74 2b 3d a9 28 22 20  |10...'endt+=.(" |
00003e70  20 20 20 20 20 20 20 20  20 20 20 22 2b 74 72 6f  |           "+tro|
00003e80  6f 74 24 28 49 29 29 2b  32 0d 16 94 24 c8 99 22  |ot$(I))+2...$.."|
00003e90  4f 53 5f 47 42 50 42 22  2c 32 2c 66 68 25 2c 74  |OS_GBPB",2,fh%,t|
00003ea0  62 6c 6b 2c 65 6e 64 74  2d 74 62 6c 6b 0d 16 9e  |blk,endt-tblk...|
00003eb0  64 e7 20 a4 63 68 65 63  6b 66 6c 61 67 28 73 61  |d. .checkflag(sa|
00003ec0  76 65 25 2c 34 2c 32 31  29 20 80 20 73 31 3e 2d  |ve%,4,21) . s1>-|
00003ed0  31 20 8c 20 73 74 74 3d  74 74 3a 65 74 74 3d 74  |1 . stt=tt:ett=t|
00003ee0  74 3a 73 74 70 74 72 3d  73 31 3a 65 6e 64 70 74  |t:stptr=s1:endpt|
00003ef0  72 3d 73 32 3a 8b 20 73  74 70 74 72 3d 30 3a 65  |r=s2:. stptr=0:e|
00003f00  6e 64 70 74 72 3d 74 63  6f 75 6e 74 28 49 29 2d  |ndptr=tcount(I)-|
00003f10  31 0d 16 a8 17 20 e3 20  4a 3d 73 74 70 74 72 20  |1.... . J=stptr |
00003f20  b8 20 65 6e 64 70 74 72  0d 16 b2 0b 20 6e 3d 4a  |. endptr.... n=J|
00003f30  2a 32 34 0d 16 bc 0a 20  74 24 3d 22 22 0d 16 c6  |*24.... t$=""...|
00003f40  0f 20 20 e3 20 68 3d 30  20 b8 20 32 0d 16 d0 0b  |.  . h=0 . 2....|
00003f50  20 20 69 3d 6e 2b 68 0d  16 da 16 20 20 74 24 2b  |  i=n+h....  t$+|
00003f60  3d bd 28 74 72 65 65 28  49 29 3f 69 29 0d 16 e4  |=.(tree(I)?i)...|
00003f70  09 20 20 ed 20 68 0d 16  ee 0e 20 65 6e 64 74 3d  |.  . h.... endt=|
00003f80  74 62 6c 6b 0d 16 f8 13  20 20 e3 20 68 3d 31 20  |tblk....  . h=1 |
00003f90  b8 20 bb 28 74 24 29 0d  17 02 0f 20 20 24 65 6e  |. .(t$)....  $en|
00003fa0  64 74 3d 22 20 22 0d 17  0c 0d 20 20 65 6e 64 74  |dt=" "....  endt|
00003fb0  2b 3d 31 0d 17 16 09 20  20 ed 20 68 0d 17 20 0a  |+=1....  . h.. .|
00003fc0  20 74 24 3d 22 22 0d 17  2a 10 20 20 e3 20 68 3d  | t$=""..*.  . h=|
00003fd0  33 20 b8 20 31 32 0d 17  34 0b 20 20 69 3d 6e 2b  |3 . 12..4.  i=n+|
00003fe0  68 0d 17 3e 27 20 20 e7  20 74 72 65 65 28 49 29  |h..>'  . tree(I)|
00003ff0  3f 69 3c 3e 30 20 8c 20  74 24 2b 3d bd 28 74 72  |?i<>0 . t$+=.(tr|
00004000  65 65 28 49 29 3f 69 29  0d 17 48 09 20 20 ed 20  |ee(I)?i)..H.  . |
00004010  68 0d 17 52 11 20 24 65  6e 64 74 3d 74 24 2b bd  |h..R. $endt=t$+.|
00004020  31 30 0d 17 5c 12 20 65  6e 64 74 2b 3d a9 28 74  |10..\. endt+=.(t|
00004030  24 29 2b 31 0d 17 66 25  20 c8 99 22 4f 53 5f 47  |$)+1..f% .."OS_G|
00004040  42 50 42 22 2c 32 2c 66  68 25 2c 74 62 6c 6b 2c  |BPB",2,fh%,tblk,|
00004050  65 6e 64 74 2d 74 62 6c  6b 0d 17 70 08 20 ed 20  |endt-tblk..p. . |
00004060  4a 0d 17 7a 0d 65 6e 64  74 3d 74 62 6c 6b 0d 17  |J..z.endt=tblk..|
00004070  84 11 24 65 6e 64 74 3d  bd 31 30 2b bd 31 30 0d  |..$endt=.10+.10.|
00004080  17 8e 0b 65 6e 64 74 2b  3d 32 0d 17 98 24 c8 99  |...endt+=2...$..|
00004090  22 4f 53 5f 47 42 50 42  22 2c 32 2c 66 68 25 2c  |"OS_GBPB",2,fh%,|
000040a0  74 62 6c 6b 2c 65 6e 64  74 2d 74 62 6c 6b 0d 17  |tblk,endt-tblk..|
000040b0  a2 07 ed 20 49 0d 17 ac  0f c8 99 26 30 44 2c 30  |... I......&0D,0|
000040c0  2c 66 68 25 0d 17 b6 1d  c8 99 22 4f 53 5f 46 69  |,fh%......"OS_Fi|
000040d0  6c 65 22 2c 31 38 2c 73  61 76 65 24 2c 26 46 46  |le",18,save$,&FF|
000040e0  46 0d 17 c0 0e c8 8e 20  73 61 76 65 24 20 ca 0d  |F...... save$ ..|
000040f0  17 ca 14 c9 20 22 3c 57  69 6d 70 24 53 63 72 61  |.... "<Wimp$Scra|
00004100  70 3e 22 0d 17 d4 05 7f  0d 17 de 10 21 62 6c 6f  |p>".........!blo|
00004110  63 6b 3d 6d 61 69 6e 25  0d 17 e8 21 c8 99 22 57  |ck=main%...!.."W|
00004120  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 49 6e 66  |imp_GetWindowInf|
00004130  6f 22 2c 2c 62 6c 6f 63  6b 0d 17 f2 0b 73 61 76  |o",,block....sav|
00004140  65 64 3d a3 0d 17 fc 58  24 28 62 6c 6f 63 6b 21  |ed=....X$(block!|
00004150  37 36 29 3d 73 61 76 65  24 3a c8 99 22 57 69 6d  |76)=save$:.."Wim|
00004160  70 5f 46 6f 72 63 65 52  65 64 72 61 77 22 2c 2d  |p_ForceRedraw",-|
00004170  31 2c 62 6c 6f 63 6b 21  34 2c 28 62 6c 6f 63 6b  |1,block!4,(block|
00004180  21 31 36 29 2d 33 32 2c  62 6c 6f 63 6b 21 31 32  |!16)-32,block!12|
00004190  2c 62 6c 6f 63 6b 21 31  36 2b 33 36 0d 18 06 18  |,block!16+36....|
000041a0  f2 69 6e 66 6f 28 66 69  6e 66 6f 25 2c 33 2c 22  |.info(finfo%,3,"|
000041b0  4e 6f 22 29 0d 18 10 05  cb 0d 18 1a 17 c8 99 22  |No")..........."|
000041c0  48 6f 75 72 67 6c 61 73  73 5f 53 6d 61 73 68 22  |Hourglass_Smash"|
000041d0  0d 18 24 41 e7 20 71 75  69 74 69 6e 67 20 c8 99  |..$A. quiting ..|
000041e0  72 65 69 6e 74 65 72 2c  6d 79 74 61 73 6b 25 3a  |reinter,mytask%:|
000041f0  c8 99 22 57 69 6d 70 5f  43 6c 6f 73 65 44 6f 77  |.."Wimp_CloseDow|
00004200  6e 22 2c 74 61 73 6b 2c  6d 79 74 61 73 6b 25 3a  |n",task,mytask%:|
00004210  e0 0d 18 2e 05 cd 0d 18  38 07 f7 20 85 0d 18 42  |........8.. ...B|
00004220  05 e1 0d 18 4c 04 0d 18  56 14 dd a4 67 65 74 62  |....L...V...getb|
00004230  73 28 66 68 25 2c 6c 65  6e 29 0d 18 60 0e 73 74  |s(fh%,len)..`.st|
00004240  72 69 6e 67 24 3d 22 22  0d 18 6a 0f e3 20 49 3d  |ring$=""..j.. I=|
00004250  31 20 b8 20 6c 65 6e 0d  18 74 1b c8 99 22 4f 53  |1 . len..t..."OS|
00004260  5f 42 47 65 74 22 2c 2c  66 68 25 20 b8 20 62 79  |_BGet",,fh% . by|
00004270  74 65 0d 18 7e 14 73 74  72 69 6e 67 24 2b 3d bd  |te..~.string$+=.|
00004280  28 62 79 74 65 29 0d 18  88 05 ed 0d 18 92 0c 3d  |(byte).........=|
00004290  73 74 72 69 6e 67 24 0d  18 9c 04 0d 18 a6 0f dd  |string$.........|
000042a0  f2 6d 65 73 73 61 67 65  69 6e 0d 18 b0 10 73 65  |.messagein....se|
000042b0  6e 64 6d 3d 26 34 30 30  45 37 0d 18 ba 1c 72 65  |ndm=&400E7....re|
000042c0  66 3d 62 6c 6f 63 6b 21  38 3a 74 61 73 6b 3d 62  |f=block!8:task=b|
000042d0  6c 6f 63 6b 21 34 0d 18  c4 11 c8 8e 20 62 6c 6f  |lock!4...... blo|
000042e0  63 6b 21 31 36 20 ca 0d  18 ce 0c c9 20 30 3a f2  |ck!16 ...... 0:.|
000042f0  65 6e 64 0d 18 d8 08 c9  20 32 3a 0d 18 e2 19 73  |end..... 2:....s|
00004300  61 76 65 24 3d a4 77 6f  6f 6c 28 62 6c 6f 63 6b  |ave$=.wool(block|
00004310  2b 34 34 29 0d 18 ec 0f  f2 64 72 61 67 73 70 72  |+44).....dragspr|
00004320  28 31 29 0d 18 f6 25 e7  20 77 69 6e 73 61 76 65  |(1)...%. winsave|
00004330  25 3d 6e 65 77 25 20 8c  20 f2 64 72 61 67 6e 65  |%=new% . .dragne|
00004340  77 28 73 61 76 65 24 29  0d 19 00 21 e7 20 64 72  |w(save$)...!. dr|
00004350  69 76 65 25 3d 31 20 80  20 77 69 6e 73 61 76 65  |ive%=1 . winsave|
00004360  25 3c 3e 6e 65 77 25 20  8c 0d 19 0a 10 f2 73 61  |%<>new% ......sa|
00004370  76 65 28 73 61 76 65 24  29 0d 19 14 10 6d 62 6c  |ve(save$)....mbl|
00004380  6f 63 6b 21 30 3d 32 35  36 0d 19 1e 11 6d 62 6c  |ock!0=256....mbl|
00004390  6f 63 6b 21 31 32 3d 72  65 66 0d 19 28 0f 6d 62  |ock!12=ref..(.mb|
000043a0  6c 6f 63 6b 21 31 36 3d  33 0d 19 32 10 6d 62 6c  |lock!16=3..2.mbl|
000043b0  6f 63 6b 21 33 36 3d 2d  31 0d 19 3c 16 24 28 6d  |ock!36=-1..<.$(m|
000043c0  62 6c 6f 63 6b 2b 34 34  29 3d 73 61 76 65 24 0d  |block+44)=save$.|
000043d0  19 46 27 c8 99 20 26 34  30 30 45 37 2c 31 38 2c  |.F'.. &400E7,18,|
000043e0  6d 62 6c 6f 63 6b 2c 74  61 73 6b 3a f4 20 44 61  |mblock,task:. Da|
000043f0  74 61 4c 6f 61 64 0d 19  50 05 cd 0d 19 5a 08 c9  |taLoad..P....Z..|
00004400  20 33 3a 0d 19 64 15 e7  20 62 6c 6f 63 6b 21 34  | 3:..d.. block!4|
00004410  30 3d 26 30 30 64 20 8c  0d 19 6e 26 6c 6f 61 64  |0=&00d ...n&load|
00004420  24 3d a4 77 6f 6f 6c 28  62 6c 6f 63 6b 2b 34 34  |$=.wool(block+44|
00004430  29 3a f2 6c 6f 61 64 28  6c 6f 61 64 24 29 0d 19  |):.load(load$)..|
00004440  78 05 e1 0d 19 82 05 cd  0d 19 8c 16 e7 20 62 6c  |x............ bl|
00004450  6f 63 6b 21 34 30 3c 3e  26 30 30 44 20 8c 0d 19  |ock!40<>&00D ...|
00004460  96 29 6c 6f 61 64 24 3d  a4 77 6f 6f 6c 28 62 6c  |.)load$=.wool(bl|
00004470  6f 63 6b 2b 34 34 29 3a  f2 6e 65 77 74 72 65 65  |ock+44):.newtree|
00004480  28 6c 6f 61 64 24 29 0d  19 a0 05 cd 0d 19 aa 08  |(load$).........|
00004490  c9 20 35 3a 0d 19 b4 15  e7 20 62 6c 6f 63 6b 21  |. 5:..... block!|
000044a0  34 30 3d 26 30 30 44 20  8c 0d 19 be 1f 62 6c 6f  |40=&00D .....blo|
000044b0  63 6b 21 31 32 3d 62 6c  6f 63 6b 21 38 3a 62 6c  |ck!12=block!8:bl|
000044c0  6f 63 6b 21 31 36 3d 34  0d 19 c8 2b c8 99 20 73  |ock!16=4...+.. s|
000044d0  65 6e 64 6d 2c 31 38 2c  62 6c 6f 63 6b 2c 62 6c  |endm,18,block,bl|
000044e0  6f 63 6b 21 34 3a f4 20  44 61 74 61 4c 6f 61 64  |ock!4:. DataLoad|
000044f0  41 63 6b 0d 19 d2 1a f2  6c 6f 61 64 28 a4 77 6f  |Ack.....load(.wo|
00004500  6f 6c 28 62 6c 6f 63 6b  2b 34 34 29 29 0d 19 dc  |ol(block+44))...|
00004510  05 cd 0d 19 e6 47 c9 20  38 3a e7 20 ac 20 70 72  |.....G. 8:. . pr|
00004520  65 71 75 69 74 20 62 6c  6f 63 6b 21 31 32 3d 72  |equit block!12=r|
00004530  65 66 3a c8 99 73 65 6e  64 6d 2c 31 39 2c 62 6c  |ef:..sendm,19,bl|
00004540  6f 63 6b 3a 70 72 65 71  75 69 74 3d b9 3a f2 61  |ock:prequit=.:.a|
00004550  72 65 79 6f 75 73 75 72  65 0d 19 f0 05 cb 0d 19  |reyousure.......|
00004560  fa 05 e1 0d 1a 04 04 0d  1a 0e 11 dd f2 6c 6f 61  |.............loa|
00004570  64 28 6c 6f 61 64 24 29  0d 1a 18 08 69 6e 3d b9  |d(load$)....in=.|
00004580  0d 1a 22 23 e7 20 63 74  3d 2d 31 20 8c 20 f2 69  |.."#. ct=-1 . .i|
00004590  6e 66 6f 28 66 69 6e 66  6f 25 2c 30 2c 6c 6f 61  |nfo(finfo%,0,loa|
000045a0  64 24 29 0d 1a 2c 21 c8  99 22 4f 53 5f 46 69 6e  |d$)..,!.."OS_Fin|
000045b0  64 22 2c 26 34 30 2c 6c  6f 61 64 24 20 b8 20 6c  |d",&40,load$ . l|
000045c0  6f 61 64 25 0d 1a 36 22  4c 65 6e 3d a9 28 22 44  |oad%..6"Len=.("D|
000045d0  69 73 6b 54 72 65 65 20  44 61 74 61 20 46 69 6c  |iskTree Data Fil|
000045e0  65 20 76 b9 22 29 0d 1a  40 1c 74 69 74 6c 65 24  |e v.")..@.title$|
000045f0  3d a4 67 65 74 62 73 28  6c 6f 61 64 25 2c 4c 65  |=.getbs(load%,Le|
00004600  6e 29 0d 1a 4a 68 e7 20  74 69 74 6c 65 24 3c 3e  |n)..Jh. title$<>|
00004610  22 44 69 73 6b 54 72 65  65 20 44 61 74 61 20 46  |"DiskTree Data F|
00004620  69 6c 65 20 76 b9 22 20  8c 20 f2 71 75 65 72 79  |ile v." . .query|
00004630  28 22 54 68 69 73 20 69  73 20 6e 6f 74 20 61 20  |("This is not a |
00004640  74 72 75 65 20 44 69 73  6b 54 72 65 65 20 44 61  |true DiskTree Da|
00004650  74 61 20 66 69 6c 65 21  22 29 3a c8 99 26 30 44  |ta file!"):..&0D|
00004660  2c 30 2c 6c 6f 61 64 25  3a e1 0d 1a 54 07 ea 20  |,0,load%:...T.. |
00004670  85 0d 1a 5e 73 ee 20 85  20 ea 20 e7 20 9f 3d 33  |...^s. . . . .=3|
00004680  38 38 20 f2 71 75 65 72  79 28 22 4f 75 74 20 4f  |88 .query("Out O|
00004690  66 20 4d 65 6d 6f 72 79  20 22 2b c3 9e 29 3a c8  |f Memory "+..):.|
000046a0  99 26 30 44 2c 30 2c 6c  6f 61 64 25 3a f7 20 85  |.&0D,0,load%:. .|
000046b0  3a e1 3a 8b 20 f7 20 85  3a f2 65 72 72 6f 72 28  |:.:. . .:.error(|
000046c0  f6 24 2b 22 20 3a 20 61  74 20 6c 69 6e 65 20 22  |.$+" : at line "|
000046d0  2b c3 9e 29 3a c8 99 26  30 44 2c 30 2c 6c 6f 61  |+..):..&0D,0,loa|
000046e0  64 25 3a e1 0d 1a 68 1a  6e 6f 66 3d bb 28 a4 67  |d%:...h.nof=.(.g|
000046f0  65 74 62 73 28 6c 6f 61  64 25 2c 33 29 29 0d 1a  |etbs(load%,3))..|
00004700  72 0f e3 20 6d 3d 30 20  b8 20 6e 6f 66 0d 1a 7c  |r.. m=0 . nof..||
00004710  1b 54 4c 65 6e 3d bb 28  a4 67 65 74 62 73 28 6c  |.TLen=.(.getbs(l|
00004720  6f 61 64 25 2c 37 29 29  0d 1a 86 15 54 4c 65 6e  |oad%,7))....TLen|
00004730  25 3d a8 28 54 4c 65 6e  2f 38 29 2a 38 0d 1a 90  |%=.(TLen/8)*8...|
00004740  29 c8 99 22 4f 53 5f 48  65 61 70 22 2c 31 2c 68  |).."OS_Heap",1,h|
00004750  65 61 70 25 20 b8 20 2c  2c 6c 61 72 67 65 73 74  |eap% . ,,largest|
00004760  2c 74 66 72 65 65 0d 1a  9a 1a e7 20 54 4c 65 6e  |,tfree..... TLen|
00004770  25 2b 31 30 32 34 3e 6c  61 72 67 65 73 74 20 8c  |%+1024>largest .|
00004780  0d 1a a4 25 c8 99 22 57  69 6d 70 5f 53 6c 6f 74  |...%.."Wimp_Slot|
00004790  53 69 7a 65 22 2c 2d 31  2c 2d 31 20 b8 20 63 75  |Size",-1,-1 . cu|
000047a0  72 72 65 6e 74 0d 1a ae  35 c8 99 22 57 69 6d 70  |rrent...5.."Wimp|
000047b0  5f 53 6c 6f 74 53 69 7a  65 22 2c 63 75 72 72 65  |_SlotSize",curre|
000047c0  6e 74 2b 28 54 4c 65 6e  25 2d 6c 61 72 67 65 73  |nt+(TLen%-larges|
000047d0  74 29 2b 31 30 32 34 2c  2d 31 0d 1a b8 21 c8 99  |t)+1024,-1...!..|
000047e0  22 57 69 6d 70 5f 53 6c  6f 74 53 69 7a 65 22 2c  |"Wimp_SlotSize",|
000047f0  2d 31 2c 2d 31 20 b8 20  6e 65 77 0d 1a c2 16 63  |-1,-1 . new....c|
00004800  68 61 6e 67 65 3d 6e 65  77 2d 63 75 72 72 65 6e  |hange=new-curren|
00004810  74 0d 1a cc 1f c8 99 22  4f 53 5f 48 65 61 70 22  |t......"OS_Heap"|
00004820  2c 35 2c 68 65 61 70 25  2c 2c 63 68 61 6e 67 65  |,5,heap%,,change|
00004830  0d 1a d6 12 68 73 69 7a  65 62 2b 3d 63 68 61 6e  |....hsizeb+=chan|
00004840  67 65 0d 1a e0 05 cd 0d  1a ea 09 63 74 2b 3d 31  |ge.........ct+=1|
00004850  0d 1a f4 12 74 73 69 7a  65 28 63 74 29 3d 54 4c  |....tsize(ct)=TL|
00004860  65 6e 0d 1a fe 1f 74 6c  65 6e 28 63 74 29 3d bb  |en....tlen(ct)=.|
00004870  28 a4 67 65 74 62 73 28  6c 6f 61 64 25 2c 37 29  |(.getbs(load%,7)|
00004880  29 0d 1b 08 21 74 63 6f  75 6e 74 28 63 74 29 3d  |)...!tcount(ct)=|
00004890  bb 28 a4 67 65 74 62 73  28 6c 6f 61 64 25 2c 37  |.(.getbs(load%,7|
000048a0  29 29 0d 1b 12 1c 72 6f  6f 74 6c 3d bb 28 a4 67  |))....rootl=.(.g|
000048b0  65 74 62 73 28 6c 6f 61  64 25 2c 33 29 29 0d 1b  |etbs(load%,3))..|
000048c0  1c 22 74 72 6f 6f 74 24  28 63 74 29 3d a4 67 65  |."troot$(ct)=.ge|
000048d0  74 62 73 28 6c 6f 61 64  25 2c 72 6f 6f 74 6c 29  |tbs(load%,rootl)|
000048e0  0d 1b 26 2a c8 99 22 4f  53 5f 48 65 61 70 22 2c  |..&*.."OS_Heap",|
000048f0  32 2c 68 65 61 70 25 2c  2c 54 4c 65 6e 20 b8 20  |2,heap%,,TLen . |
00004900  2c 2c 74 72 65 65 28 63  74 29 0d 1b 30 22 c8 99  |,,tree(ct)..0"..|
00004910  22 4f 53 5f 48 65 61 70  22 2c 31 2c 68 65 61 70  |"OS_Heap",1,heap|
00004920  25 20 b8 20 2c 2c 2c 74  66 72 65 65 0d 1b 3a 25  |% . ,,,tfree..:%|
00004930  c8 99 22 4f 53 5f 47 42  50 42 22 2c 34 2c 6c 6f  |.."OS_GBPB",4,lo|
00004940  61 64 25 2c 74 72 65 65  28 63 74 29 2c 54 4c 65  |ad%,tree(ct),TLe|
00004950  6e 0d 1b 44 07 ed 20 6d  0d 1b 4e 11 c8 99 26 30  |n..D.. m..N...&0|
00004960  44 2c 30 2c 6c 6f 61 64  25 0d 1b 58 10 21 69 63  |D,0,load%..X.!ic|
00004970  6f 6e 64 3d 6d 61 69 6e  25 0d 1b 62 21 c8 99 22  |ond=main%..b!.."|
00004980  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 49 6e  |Wimp_GetWindowIn|
00004990  66 6f 22 2c 2c 69 63 6f  6e 64 0d 1b 6c 59 73 61  |fo",,icond..lYsa|
000049a0  76 65 64 3d a3 3a 24 69  63 6f 6e 64 21 37 36 3d  |ved=.:$icond!76=|
000049b0  6c 6f 61 64 24 3a c8 99  22 57 69 6d 70 5f 46 6f  |load$:.."Wimp_Fo|
000049c0  72 63 65 52 65 64 72 61  77 22 2c 2d 31 2c 69 63  |rceRedraw",-1,ic|
000049d0  6f 6e 64 21 34 2c 69 63  6f 6e 64 21 31 36 2c 69  |ond!4,icond!16,i|
000049e0  63 6f 6e 64 21 31 32 2c  69 63 6f 6e 64 21 31 36  |cond!12,icond!16|
000049f0  2b 33 36 0d 1b 76 1f c8  99 22 57 69 6d 70 5f 43  |+36..v..."Wimp_C|
00004a00  6c 6f 73 65 57 69 6e 64  6f 77 22 2c 2c 69 63 6f  |loseWindow",,ico|
00004a10  6e 64 0d 1b 80 1a 24 a4  69 6e 66 6f 28 73 61 76  |nd....$.info(sav|
00004a20  65 64 25 2c 31 29 3d 6c  6f 61 64 24 0d 1b 8a 09  |ed%,1)=load$....|
00004a30  73 74 3d 63 74 0d 1b 94  22 f2 6e 65 77 76 69 65  |st=ct...".newvie|
00004a40  77 3a f2 6f 70 65 6e 77  69 6e 28 6d 61 69 6e 25  |w:.openwin(main%|
00004a50  29 3a f2 70 61 6e 65 0d  1b 9e 1b f2 69 6e 66 6f  |):.pane.....info|
00004a60  28 66 69 6e 66 6f 25 2c  31 2c c3 28 63 74 2b 31  |(finfo%,1,.(ct+1|
00004a70  29 29 0d 1b a8 23 f2 69  6e 66 6f 28 66 69 6e 66  |))...#.info(finf|
00004a80  6f 25 2c 32 2c c3 28 68  73 69 7a 65 62 2d 74 66  |o%,2,.(hsizeb-tf|
00004a90  72 65 65 29 29 0d 1b b2  0f 61 72 63 6c 69 73 74  |ree))....arclist|
00004aa0  65 64 3d a3 0d 1b bc 07  f7 20 85 0d 1b c6 05 e1  |ed=...... ......|
00004ab0  0d 1b d0 04 0d 1b da 16  dd f2 6f 70 65 6e 77 69  |..........openwi|
00004ac0  6e 28 68 61 6e 64 6c 65  25 29 0d 1b e4 47 e7 20  |n(handle%)...G. |
00004ad0  68 61 6e 64 6c 65 25 3d  6d 61 69 6e 25 20 80 20  |handle%=main% . |
00004ae0  63 74 3d 2d 31 20 8c 20  f2 71 75 65 72 79 28 22  |ct=-1 . .query("|
00004af0  4e 6f 20 64 69 72 65 63  74 6f 72 79 20 74 72 65  |No directory tre|
00004b00  65 73 20 69 6e 20 6d 65  6d 6f 72 79 21 22 29 3a  |es in memory!"):|
00004b10  e1 0d 1b ee 12 21 62 6c  6f 63 6b 3d 68 61 6e 64  |.....!block=hand|
00004b20  6c 65 25 0d 1b f8 21 c8  99 22 57 69 6d 70 5f 47  |le%...!.."Wimp_G|
00004b30  65 74 57 69 6e 64 6f 77  49 6e 66 6f 22 2c 2c 62  |etWindowInfo",,b|
00004b40  6c 6f 63 6b 0d 1c 02 1b  6f 70 65 6e 3d 62 6c 6f  |lock....open=blo|
00004b50  63 6b 21 33 32 20 80 20  28 31 3c 3c 31 36 29 0d  |ck!32 . (1<<16).|
00004b60  1c 0c 1c 66 72 6f 6e 74  3d 62 6c 6f 63 6b 21 33  |...front=block!3|
00004b70  32 20 80 20 28 31 3c 3c  31 37 29 0d 1c 16 57 e7  |2 . (1<<17)...W.|
00004b80  20 68 61 6e 64 6c 65 25  3d 6d 61 69 6e 25 20 80  | handle%=main% .|
00004b90  20 77 69 64 74 68 3e 2d  31 20 8c 20 62 6c 6f 63  | width>-1 . bloc|
00004ba0  6b 21 31 32 3d 62 6c 6f  63 6b 21 34 2b 77 69 64  |k!12=block!4+wid|
00004bb0  74 68 3a 62 6c 6f 63 6b  21 38 3d 62 6c 6f 63 6b  |th:block!8=block|
00004bc0  21 31 36 2d 64 65 70 74  68 3a 77 69 64 74 68 3d  |!16-depth:width=|
00004bd0  2d 31 0d 1c 20 0e e7 20  6f 70 65 6e 3d 30 20 8c  |-1.. .. open=0 .|
00004be0  0d 1c 2a 1e c8 99 22 57  69 6d 70 5f 4f 70 65 6e  |..*..."Wimp_Open|
00004bf0  57 69 6e 64 6f 77 22 2c  2c 62 6c 6f 63 6b 0d 1c  |Window",,block..|
00004c00  34 05 cd 0d 1c 3e 0f e7  20 66 72 6f 6e 74 3d 30  |4....>.. front=0|
00004c10  20 8c 0d 1c 48 2a 62 6c  6f 63 6b 21 32 38 3d 2d  | ...H*block!28=-|
00004c20  31 3a c8 99 22 57 69 6d  70 5f 4f 70 65 6e 57 69  |1:.."Wimp_OpenWi|
00004c30  6e 64 6f 77 22 2c 2c 62  6c 6f 63 6b 0d 1c 52 05  |ndow",,block..R.|
00004c40  cd 0d 1c 5c 05 e1 0d 1c  66 04 0d 1c 70 15 dd 20  |...\....f...p.. |
00004c50  f2 73 6c 61 62 69 6e 28  68 61 6e 64 6c 65 29 0d  |.slabin(handle).|
00004c60  1c 7a 11 21 69 63 6f 6e  64 3d 68 61 6e 64 6c 65  |.z.!icond=handle|
00004c70  0d 1c 84 23 c8 99 20 22  57 69 6d 70 5f 47 65 74  |...#.. "Wimp_Get|
00004c80  50 6f 69 6e 74 65 72 49  6e 66 6f 22 2c 2c 69 63  |PointerInfo",,ic|
00004c90  6f 6e 64 0d 1c 8e 1f c8  99 20 22 57 69 6d 70 5f  |ond...... "Wimp_|
00004ca0  42 6f 72 64 65 72 49 63  6f 6e 22 2c 2c 69 63 6f  |BorderIcon",,ico|
00004cb0  6e 64 0d 1c 98 05 e1 0d  1c a2 04 0d 1c ac 16 dd  |nd..............|
00004cc0  20 f2 73 6c 61 62 6f 75  74 28 68 61 6e 64 6c 65  | .slabout(handle|
00004cd0  29 0d 1c b6 11 21 69 63  6f 6e 64 3d 68 61 6e 64  |)....!icond=hand|
00004ce0  6c 65 0d 1c c0 23 c8 99  20 22 57 69 6d 70 5f 47  |le...#.. "Wimp_G|
00004cf0  65 74 50 6f 69 6e 74 65  72 49 6e 66 6f 22 2c 2c  |etPointerInfo",,|
00004d00  69 63 6f 6e 64 0d 1c ca  0d 69 63 6f 6e 64 21 38  |icond....icond!8|
00004d10  3d 30 0d 1c d4 1f c8 99  20 22 57 69 6d 70 5f 42  |=0...... "Wimp_B|
00004d20  6f 72 64 65 72 49 63 6f  6e 22 2c 2c 69 63 6f 6e  |orderIcon",,icon|
00004d30  64 0d 1c de 05 e1 0d 1c  e8 04 0d 1c f2 14 dd f2  |d...............|
00004d40  72 65 64 72 61 77 28 68  61 6e 64 6c 65 29 0d 1c  |redraw(handle)..|
00004d50  fc 0b 73 65 74 65 78 3d  a3 0d 1d 06 11 21 62 6c  |..setex=.....!bl|
00004d60  6f 63 6b 3d 68 61 6e 64  6c 65 0d 1d 10 0a ea 6d  |ock=handle.....m|
00004d70  6f 72 65 25 0d 1d 1a 29  c8 99 20 22 57 69 6d 70  |ore%...).. "Wimp|
00004d80  5f 52 65 64 72 61 77 57  69 6e 64 6f 77 22 2c 2c  |_RedrawWindow",,|
00004d90  62 6c 6f 63 6b 20 b8 20  6d 6f 72 65 25 0d 1d 24  |block . more%..$|
00004da0  0c c8 95 20 6d 6f 72 65  25 0d 1d 2e 10 20 c8 8e  |... more%.... ..|
00004db0  20 68 61 6e 64 6c 65 20  ca 0d 1d 38 0c 20 c9 20  | handle ...8. . |
00004dc0  6d 61 69 6e 25 0d 1d 42  18 20 f2 61 70 70 6c 69  |main%..B. .appli|
00004dd0  63 61 74 69 6f 6e 5f 72  65 64 72 61 77 0d 1d 4c  |cation_redraw..L|
00004de0  06 20 7f 0d 1d 56 21 20  c8 99 22 57 69 6d 70 5f  |. ...V! .."Wimp_|
00004df0  42 6f 72 64 65 72 57 69  6e 64 6f 77 22 2c 2c 62  |BorderWindow",,b|
00004e00  6c 6f 63 6b 0d 1d 60 06  20 cb 0d 1d 6a 2a 20 c8  |lock..`. ...j* .|
00004e10  99 20 22 57 69 6d 70 5f  47 65 74 52 65 63 74 61  |. "Wimp_GetRecta|
00004e20  6e 67 6c 65 22 2c 2c 62  6c 6f 63 6b 20 b8 20 6d  |ngle",,block . m|
00004e30  6f 72 65 25 0d 1d 74 06  20 ce 0d 1d 7e 05 e1 0d  |ore%..t. ...~...|
00004e40  1d 88 04 0d 1d 92 18 dd  f2 61 70 70 6c 69 63 61  |.........applica|
00004e50  74 69 6f 6e 5f 72 65 64  72 61 77 0d 1d 9c 1b 77  |tion_redraw....w|
00004e60  6f 72 6b 78 25 3d 62 6c  6f 63 6b 21 34 2d 62 6c  |orkx%=block!4-bl|
00004e70  6f 63 6b 21 32 30 0d 1d  a6 1c 77 6f 72 6b 79 25  |ock!20....worky%|
00004e80  3d 62 6c 6f 63 6b 21 31  36 2d 62 6c 6f 63 6b 21  |=block!16-block!|
00004e90  32 34 0d 1d b0 17 6d 61  78 3d 62 6c 6f 63 6b 21  |24....max=block!|
00004ea0  33 32 2d 77 6f 72 6b 79  25 0d 1d ba 17 6d 69 6e  |32-worky%....min|
00004eb0  3d 62 6c 6f 63 6b 21 34  30 2d 77 6f 72 6b 79 25  |=block!40-worky%|
00004ec0  0d 1d c4 16 6d 61 78 3d  28 6d 61 78 2b 34 36 29  |....max=(max+46)|
00004ed0  81 33 36 2a 2d 31 0d 1d  ce 16 6d 69 6e 3d 28 6d  |.36*-1....min=(m|
00004ee0  69 6e 2b 34 36 29 81 33  36 2a 2d 31 0d 1d d8 29  |in+46).36*-1...)|
00004ef0  e7 20 6d 61 78 3e 74 63  6f 75 6e 74 28 73 74 29  |. max>tcount(st)|
00004f00  2d 31 20 8c 20 6d 61 78  3d 74 63 6f 75 6e 74 28  |-1 . max=tcount(|
00004f10  73 74 29 2d 31 0d 1d e2  0f e7 20 63 74 3d 2d 31  |st)-1..... ct=-1|
00004f20  20 8c 20 e1 0d 1d ec 23  74 78 3d 77 6f 72 6b 78  | . ....#tx=workx|
00004f30  25 3a 74 79 3d 77 6f 72  6b 79 25 2d 34 36 2d 28  |%:ty=worky%-46-(|
00004f40  6d 69 6e 2a 33 36 29 0d  1d f6 0c 67 3d 26 34 30  |min*36)....g=&40|
00004f50  30 45 36 0d 1e 00 0c 6e  3d 6d 69 6e 2a 32 34 0d  |0E6....n=min*24.|
00004f60  1e 0a 11 e3 20 49 3d 6d  69 6e 20 b8 20 6d 61 78  |.... I=min . max|
00004f70  0d 1e 14 0a 20 c8 99 67  2c 37 0d 1e 1e 0a 20 74  |.... ..g,7.... t|
00004f80  24 3d 22 22 0d 1e 28 10  20 20 20 e3 20 68 3d 30  |$=""..(.   . h=0|
00004f90  20 b8 20 32 0d 1e 32 0c  20 20 20 69 3d 6e 2b 68  | . 2..2.   i=n+h|
00004fa0  0d 1e 3c 18 20 20 20 74  24 2b 3d bd 28 74 72 65  |..<.   t$+=.(tre|
00004fb0  65 28 73 74 29 3f 69 29  0d 1e 46 0a 20 20 20 ed  |e(st)?i)..F.   .|
00004fc0  20 68 0d 1e 50 10 20 6c  65 6e 3d bb 28 74 24 29  | h..P. len=.(t$)|
00004fd0  2d 31 0d 1e 5a 15 20 e7  20 6c 65 6e 3d 2d 31 20  |-1..Z. . len=-1 |
00004fe0  8c 20 6c 65 6e 3d 30 0d  1e 64 0a 20 74 24 3d 22  |. len=0..d. t$="|
00004ff0  22 0d 1e 6e 11 20 20 20  e3 20 68 3d 33 20 b8 20  |"..n.   . h=3 . |
00005000  31 32 0d 1e 78 0c 20 20  20 69 3d 6e 2b 68 0d 1e  |12..x.   i=n+h..|
00005010  82 18 20 20 20 74 24 2b  3d bd 28 74 72 65 65 28  |..   t$+=.(tree(|
00005020  73 74 29 3f 69 29 0d 1e  8c 0a 20 20 20 ed 20 68  |st)?i)....   . h|
00005030  0d 1e 96 4f 20 e7 20 69  74 65 6d 6e 6f 3d 49 20  |...O . itemno=I |
00005040  8c 20 c8 99 67 2c 39 3a  c8 93 20 c8 90 20 77 6f  |. ..g,9:.. .. wo|
00005050  72 6b 78 25 2b 30 2c 77  6f 72 6b 79 25 2d 30 2d  |rkx%+0,worky%-0-|
00005060  28 49 2a 33 36 2b 34 36  29 2c 74 6c 65 6e 28 73  |(I*36+46),tlen(s|
00005070  74 29 2a 31 36 2c 2d 33  30 3a c8 99 67 2c 37 0d  |t)*16,-30:..g,7.|
00005080  1e a0 56 20 e7 20 49 3e  3d 73 31 20 80 20 49 3c  |..V . I>=s1 . I<|
00005090  3d 73 32 2d 31 20 8c 20  c8 99 67 2c 37 3a c8 93  |=s2-1 . ..g,7:..|
000050a0  20 c8 90 20 77 6f 72 6b  78 25 2b 30 2c 77 6f 72  | .. workx%+0,wor|
000050b0  6b 79 25 2d 30 2d 28 49  2a 33 36 2b 34 36 29 2c  |ky%-0-(I*36+46),|
000050c0  74 6c 65 6e 28 73 74 29  2a 31 36 2c 2d 33 34 3a  |tlen(st)*16,-34:|
000050d0  c8 99 67 2c 30 0d 1e aa  4b 20 e7 20 49 3d 73 32  |..g,0...K . I=s2|
000050e0  20 8c 20 c8 99 67 2c 37  3a c8 93 20 c8 90 20 77  | . ..g,7:.. .. w|
000050f0  6f 72 6b 78 25 2b 30 2c  77 6f 72 6b 79 25 2d 30  |orkx%+0,worky%-0|
00005100  2d 28 49 2a 33 36 2b 34  36 29 2c 74 6c 65 6e 28  |-(I*36+46),tlen(|
00005110  73 74 29 2a 31 36 2c 2d  33 30 3a c8 99 67 2c 30  |st)*16,-30:..g,0|
00005120  0d 1e b4 21 20 e7 20 74  72 65 65 28 73 74 29 3f  |...! . tree(st)?|
00005130  28 69 2b 31 29 3d 31 33  38 20 8c 20 c8 99 67 2c  |(i+1)=138 . ..g,|
00005140  38 0d 1e be 0c 20 ec 20  74 78 2c 74 79 0d 1e c8  |8.... . tx,ty...|
00005150  0e 20 f1 20 8a 6c 65 6e  29 74 24 0d 1e d2 0b 20  |. . .len)t$.... |
00005160  74 79 2d 3d 33 36 0d 1e  dc 0a 20 6e 2b 3d 32 34  |ty-=36.... n+=24|
00005170  0d 1e e6 07 ed 20 49 0d  1e f0 14 74 79 79 3d 77  |..... I....tyy=w|
00005180  6f 72 6b 79 25 2d 74 79  2d 34 30 0d 1e fa 05 e1  |orky%-ty-40.....|
00005190  0d 1f 04 04 0d 1f 0e 0a  dd f2 70 61 6e 65 0d 1f  |..........pane..|
000051a0  18 0f e7 20 63 74 3d 2d  31 20 8c 20 e1 0d 1f 22  |... ct=-1 . ..."|
000051b0  39 62 61 72 31 3d 62 6c  6f 63 6b 21 34 3a 62 61  |9bar1=block!4:ba|
000051c0  72 32 3d 62 6c 6f 63 6b  21 38 3a 62 61 72 33 3d  |r2=block!8:bar3=|
000051d0  62 6c 6f 63 6b 21 31 32  3a 62 61 72 34 3d 62 6c  |block!12:bar4=bl|
000051e0  6f 63 6b 21 31 36 0d 1f  2c 1f 62 61 72 35 3d 62  |ock!16..,.bar5=b|
000051f0  6c 6f 63 6b 21 35 32 3a  62 61 72 36 3d 62 6c 6f  |lock!52:bar6=blo|
00005200  63 6b 21 32 30 0d 1f 36  1f e7 20 74 6f 6f 6c 73  |ck!20..6.. tools|
00005210  6f 6e 20 8c 20 f2 61 6c  6c 3a 8b 20 f2 62 61 72  |on . .all:. .bar|
00005220  6f 6e 6c 79 0d 1f 40 2f  21 62 6c 6f 63 6b 3d 66  |only..@/!block=f|
00005230  6f 75 6e 64 25 3a c8 99  22 57 69 6d 70 5f 47 65  |ound%:.."Wimp_Ge|
00005240  74 57 69 6e 64 6f 77 49  6e 66 6f 22 2c 2c 62 6c  |tWindowInfo",,bl|
00005250  6f 63 6b 0d 1f 4a 1b 6f  70 65 6e 3d 62 6c 6f 63  |ock..J.open=bloc|
00005260  6b 21 33 32 20 80 20 28  31 3c 3c 31 36 29 0d 1f  |k!32 . (1<<16)..|
00005270  54 1d e7 20 6f 70 65 6e  20 8c 20 f2 6f 70 65 6e  |T.. open . .open|
00005280  77 69 6e 28 66 6f 75 6e  64 25 29 0d 1f 5e 05 e1  |win(found%)..^..|
00005290  0d 1f 68 04 0d 1f 72 0d  dd f2 62 61 72 6f 6e 6c  |..h...r...baronl|
000052a0  79 0d 1f 7c 12 66 72 6f  6e 74 3d 62 6c 6f 63 6b  |y..|.front=block|
000052b0  21 32 38 0d 1f 86 2d 21  69 63 6f 6e 64 3d 62 61  |!28...-!icond=ba|
000052c0  72 25 3a c8 99 22 57 69  6d 70 5f 47 65 74 57 69  |r%:.."Wimp_GetWi|
000052d0  6e 64 6f 77 49 6e 66 6f  22 2c 2c 69 63 6f 6e 64  |ndowInfo",,icond|
000052e0  0d 1f 90 39 69 63 6f 6e  64 21 34 3d 62 61 72 31  |...9icond!4=bar1|
000052f0  3a 69 63 6f 6e 64 21 38  3d 62 61 72 32 3a 69 63  |:icond!8=bar2:ic|
00005300  6f 6e 64 21 31 32 3d 62  61 72 33 3a 69 63 6f 6e  |ond!12=bar3:icon|
00005310  64 21 31 36 3d 62 61 72  34 0d 1f 9a 11 69 63 6f  |d!16=bar4....ico|
00005320  6e 64 21 32 30 3d 62 61  72 36 0d 1f a4 2d 69 63  |nd!20=bar6...-ic|
00005330  6f 6e 64 21 32 38 3d 66  72 6f 6e 74 3a c8 99 22  |ond!28=front:.."|
00005340  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00005350  2c 2c 69 63 6f 6e 64 0d  1f ae 2c 62 6c 6f 63 6b  |,,icond...,block|
00005360  21 32 38 3d 62 61 72 25  3a c8 99 22 57 69 6d 70  |!28=bar%:.."Wimp|
00005370  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 62 6c  |_OpenWindow",,bl|
00005380  6f 63 6b 0d 1f b8 05 e1  0d 1f c2 04 0d 1f cc 09  |ock.............|
00005390  dd f2 61 6c 6c 0d 1f d6  12 66 72 6f 6e 74 3d 62  |..all....front=b|
000053a0  6c 6f 63 6b 21 32 38 0d  1f e0 32 78 31 3d 62 6c  |lock!28...2x1=bl|
000053b0  6f 63 6b 21 34 2d 39 34  3a 78 32 3d 78 31 2b 32  |ock!4-94:x2=x1+2|
000053c0  34 38 3a 79 31 3d 62 6c  6f 63 6b 21 38 3a 79 32  |48:y1=block!8:y2|
000053d0  3d 62 6c 6f 63 6b 21 31  36 0d 1f ea 0e 73 69 7a  |=block!16....siz|
000053e0  65 3d 78 32 2d 78 31 0d  1f f4 31 21 69 63 6f 6e  |e=x2-x1...1!icon|
000053f0  64 3d 74 6f 6f 6c 62 6f  78 25 3a c8 99 22 57 69  |d=toolbox%:.."Wi|
00005400  6d 70 5f 47 65 74 57 69  6e 64 6f 77 49 6e 66 6f  |mp_GetWindowInfo|
00005410  22 2c 2c 69 63 6f 6e 64  0d 1f fe 19 e7 20 78 31  |",,icond..... x1|
00005420  3c 30 20 8c 20 78 31 3d  30 3a 78 32 3d 73 69 7a  |<0 . x1=0:x2=siz|
00005430  65 0d 20 08 35 69 63 6f  6e 64 21 34 3d 78 31 3a  |e. .5icond!4=x1:|
00005440  69 63 6f 6e 64 21 38 3d  79 32 2d 35 37 30 3a 69  |icond!8=y2-570:i|
00005450  63 6f 6e 64 21 31 32 3d  78 32 3a 69 63 6f 6e 64  |cond!12=x2:icond|
00005460  21 31 36 3d 79 32 0d 20  12 2d 69 63 6f 6e 64 21  |!16=y2. .-icond!|
00005470  32 38 3d 66 72 6f 6e 74  3a c8 99 22 57 69 6d 70  |28=front:.."Wimp|
00005480  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 69 63  |_OpenWindow",,ic|
00005490  6f 6e 64 0d 20 1c 05 cd  0d 20 26 2d 21 69 63 6f  |ond. .... &-!ico|
000054a0  6e 64 3d 62 61 72 25 3a  c8 99 22 57 69 6d 70 5f  |nd=bar%:.."Wimp_|
000054b0  47 65 74 57 69 6e 64 6f  77 49 6e 66 6f 22 2c 2c  |GetWindowInfo",,|
000054c0  69 63 6f 6e 64 0d 20 30  39 69 63 6f 6e 64 21 34  |icond. 09icond!4|
000054d0  3d 62 61 72 31 3a 69 63  6f 6e 64 21 38 3d 62 61  |=bar1:icond!8=ba|
000054e0  72 32 3a 69 63 6f 6e 64  21 31 32 3d 62 61 72 33  |r2:icond!12=bar3|
000054f0  3a 69 63 6f 6e 64 21 31  36 3d 62 61 72 34 0d 20  |:icond!16=bar4. |
00005500  3a 11 69 63 6f 6e 64 21  32 30 3d 62 61 72 36 0d  |:.icond!20=bar6.|
00005510  20 44 30 69 63 6f 6e 64  21 32 38 3d 74 6f 6f 6c  | D0icond!28=tool|
00005520  62 6f 78 25 3a c8 99 22  57 69 6d 70 5f 4f 70 65  |box%:.."Wimp_Ope|
00005530  6e 57 69 6e 64 6f 77 22  2c 2c 69 63 6f 6e 64 0d  |nWindow",,icond.|
00005540  20 4e 2c 62 6c 6f 63 6b  21 32 38 3d 62 61 72 25  | N,block!28=bar%|
00005550  3a c8 99 22 57 69 6d 70  5f 4f 70 65 6e 57 69 6e  |:.."Wimp_OpenWin|
00005560  64 6f 77 22 2c 2c 62 6c  6f 63 6b 0d 20 58 05 e1  |dow",,block. X..|
00005570  0d 20 62 04 0d 20 6c 20  dd f2 61 64 6a 75 73 74  |. b.. l ..adjust|
00005580  77 69 6e 28 6e 65 77 78  6d 61 78 2c 6e 65 77 79  |win(newxmax,newy|
00005590  6d 69 6e 29 0d 20 76 2d  21 69 63 6f 6e 64 3d 62  |min). v-!icond=b|
000055a0  61 72 25 3a c8 99 22 57  69 6d 70 5f 47 65 74 57  |ar%:.."Wimp_GetW|
000055b0  69 6e 64 6f 77 49 6e 66  6f 22 2c 2c 69 63 6f 6e  |indowInfo",,icon|
000055c0  64 0d 20 80 14 69 63 6f  6e 64 21 35 32 3d 6e 65  |d. ..icond!52=ne|
000055d0  77 78 6d 61 78 0d 20 8a  24 c8 99 22 57 69 6d 70  |wxmax. .$.."Wimp|
000055e0  5f 53 65 74 45 78 74 65  6e 74 22 2c 62 61 72 25  |_SetExtent",bar%|
000055f0  2c 69 63 6f 6e 64 2b 34  34 0d 20 94 2e 21 69 63  |,icond+44. ..!ic|
00005600  6f 6e 64 3d 6d 61 69 6e  25 3a c8 99 22 57 69 6d  |ond=main%:.."Wim|
00005610  70 5f 47 65 74 57 69 6e  64 6f 77 49 6e 66 6f 22  |p_GetWindowInfo"|
00005620  2c 2c 69 63 6f 6e 64 0d  20 9e 25 69 63 6f 6e 64  |,,icond. .%icond|
00005630  21 34 38 3d 6e 65 77 79  6d 69 6e 3a 69 63 6f 6e  |!48=newymin:icon|
00005640  64 21 35 32 3d 6e 65 77  78 6d 61 78 0d 20 a8 25  |d!52=newxmax. .%|
00005650  c8 99 22 57 69 6d 70 5f  53 65 74 45 78 74 65 6e  |.."Wimp_SetExten|
00005660  74 22 2c 6d 61 69 6e 25  2c 69 63 6f 6e 64 2b 34  |t",main%,icond+4|
00005670  34 0d 20 b2 36 21 69 63  6f 6e 64 3d 62 61 72 25  |4. .6!icond=bar%|
00005680  3a 69 63 6f 6e 64 21 34  3d 30 3a c8 99 22 57 69  |:icond!4=0:.."Wi|
00005690  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000056a0  2c 2c 69 63 6f 6e 64 0d  20 bc 1e c8 99 22 57 69  |,,icond. ...."Wi|
000056b0  6d 70 5f 44 65 6c 65 74  65 49 63 6f 6e 22 2c 2c  |mp_DeleteIcon",,|
000056c0  69 63 6f 6e 64 0d 20 c6  30 69 63 6f 6e 64 3d 69  |icond. .0icond=i|
000056d0  63 6f 6e 64 2b 34 3a 69  63 6f 6e 64 21 31 32 3d  |cond+4:icond!12=|
000056e0  6e 65 77 78 6d 61 78 2b  32 3a 21 69 63 6f 6e 64  |newxmax+2:!icond|
000056f0  3d 62 61 72 25 0d 20 d0  25 c8 99 22 57 69 6d 70  |=bar%. .%.."Wimp|
00005700  5f 43 72 65 61 74 65 49  63 6f 6e 22 2c 30 2c 69  |_CreateIcon",0,i|
00005710  63 6f 6e 64 20 b8 20 69  63 25 0d 20 da 05 e1 0d  |cond . ic%. ....|
00005720  20 e4 04 0d 20 ee 13 dd  f2 74 6f 6f 6c 62 6f 78  | ... ....toolbox|
00005730  28 66 6c 61 67 29 0d 20  f8 3b e7 20 66 6c 61 67  |(flag). .;. flag|
00005740  3d 2d 31 20 8c 20 21 62  6c 6f 63 6b 3d 74 6f 6f  |=-1 . !block=too|
00005750  6c 62 6f 78 25 3a c8 99  22 57 69 6d 70 5f 43 6c  |lbox%:.."Wimp_Cl|
00005760  6f 73 65 57 69 6e 64 6f  77 22 2c 2c 62 6c 6f 63  |oseWindow",,bloc|
00005770  6b 0d 21 02 0e e7 20 66  6c 61 67 3d 31 20 8c 0d  |k.!... flag=1 ..|
00005780  21 0c 10 21 62 6c 6f 63  6b 3d 6d 61 69 6e 25 0d  |!..!block=main%.|
00005790  21 16 22 c8 99 22 57 69  6d 70 5f 47 65 74 57 69  |!.".."Wimp_GetWi|
000057a0  6e 64 6f 77 53 74 61 74  65 22 2c 2c 62 6c 6f 63  |ndowState",,bloc|
000057b0  6b 0d 21 20 1b 6f 70 65  6e 3d 62 6c 6f 63 6b 21  |k.! .open=block!|
000057c0  33 32 20 80 20 28 31 3c  3c 31 36 29 0d 21 2a 22  |32 . (1<<16).!*"|
000057d0  e7 20 6f 70 65 6e 3c 3e  30 20 8c 20 21 69 63 6f  |. open<>0 . !ico|
000057e0  6e 64 3d 6d 61 69 6e 25  3a f2 70 61 6e 65 0d 21  |nd=main%:.pane.!|
000057f0  34 05 cd 0d 21 3e 05 e1  0d 21 48 04 0d 21 52 11  |4...!>...!H..!R.|
00005800  dd f2 65 72 72 6f 72 28  65 72 72 24 29 0d 21 5c  |..error(err$).!\|
00005810  4d 21 69 63 6f 6e 64 3d  30 3a 24 28 69 63 6f 6e  |M!icond=0:$(icon|
00005820  64 2b 34 29 3d 65 72 72  24 2b 22 2e 22 2b 22 20  |d+4)=err$+"."+" |
00005830  50 72 65 73 73 20 4f 4b  20 74 6f 20 63 6f 6e 74  |Press OK to cont|
00005840  69 6e 75 65 20 6f 72 20  43 61 6e 63 65 6c 20 74  |inue or Cancel t|
00005850  6f 20 71 75 69 74 22 2b  bd 30 0d 21 66 33 c8 99  |o quit"+.0.!f3..|
00005860  22 57 69 6d 70 5f 52 65  70 6f 72 74 45 72 72 6f  |"Wimp_ReportErro|
00005870  72 22 2c 69 63 6f 6e 64  2c 33 2c 22 21 44 69 73  |r",icond,3,"!Dis|
00005880  6b 54 72 65 65 22 20 b8  20 2c 62 75 74 0d 21 70  |kTree" . ,but.!p|
00005890  41 e7 20 62 75 74 3d 32  20 8c 20 c8 99 72 65 69  |A. but=2 . ..rei|
000058a0  6e 74 65 72 2c 6d 79 74  61 73 6b 25 3a c8 99 22  |nter,mytask%:.."|
000058b0  57 69 6d 70 5f 43 6c 6f  73 65 44 6f 77 6e 22 2c  |Wimp_CloseDown",|
000058c0  74 61 73 6b 2c 6d 79 74  61 73 6b 25 3a e0 0d 21  |task,mytask%:..!|
000058d0  7a 05 e1 0d 21 84 04 0d  21 8e 10 dd f2 61 72 65  |z...!...!....are|
000058e0  79 6f 75 73 75 72 65 0d  21 98 0d e7 20 73 61 76  |yousure.!... sav|
000058f0  65 64 20 8c 0d 21 a2 13  f2 6f 70 65 6e 77 69 6e  |ed ..!...openwin|
00005900  28 71 75 69 74 25 29 0d  21 ac 07 ef 20 37 0d 21  |(quit%).!... 7.!|
00005910  b6 31 f2 69 6e 66 6f 28  71 75 69 74 25 2c 31 2c  |.1.info(quit%,1,|
00005920  22 59 6f 75 72 20 66 69  6c 65 20 68 61 73 20 62  |"Your file has b|
00005930  65 65 6e 20 6d 6f 64 69  66 69 65 64 2e 22 29 0d  |een modified.").|
00005940  21 c0 4d 21 62 6c 6f 63  6b 3d 31 33 30 3a 62 6c  |!.M!block=130:bl|
00005950  6f 63 6b 21 34 3d 31 33  31 3a 62 6c 6f 63 6b 21  |ock!4=131:block!|
00005960  38 3d 2d 31 3a c8 99 22  4f 53 5f 52 65 61 64 56  |8=-1:.."OS_ReadV|
00005970  64 75 56 61 72 69 61 62  6c 65 73 22 2c 62 6c 6f  |duVariables",blo|
00005980  63 6b 2c 62 6c 6f 63 6b  2b 31 32 38 0d 21 ca 25  |ck,block+128.!.%|
00005990  c8 99 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |.."OS_ReadModeVa|
000059a0  72 69 61 62 6c 65 22 2c  eb 2c 34 20 b8 20 2c 2c  |riable",.,4 . ,,|
000059b0  78 0d 21 d4 25 c8 99 22  4f 53 5f 52 65 61 64 4d  |x.!.%.."OS_ReadM|
000059c0  6f 64 65 56 61 72 69 61  62 6c 65 22 2c eb 2c 35  |odeVariable",.,5|
000059d0  20 b8 20 2c 2c 79 0d 21  de 39 c8 97 20 c8 93 20  | . ,,y.!.9.. .. |
000059e0  30 2c 30 2c 28 28 28 62  6c 6f 63 6b 21 31 32 38  |0,0,(((block!128|
000059f0  29 2b 31 29 2a 32 5e 78  29 2d 31 2c 28 28 62 6c  |)+1)*2^x)-1,((bl|
00005a00  6f 63 6b 21 31 33 32 29  2b 31 29 2a 32 5e 79 0d  |ock!132)+1)*2^y.|
00005a10  21 e8 05 cd 0d 21 f2 41  e7 20 ac 20 73 61 76 65  |!....!.A. . save|
00005a20  64 20 c8 99 72 65 69 6e  74 65 72 2c 6d 79 74 61  |d ..reinter,myta|
00005a30  73 6b 25 3a c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |sk%:.."Wimp_Clos|
00005a40  65 44 6f 77 6e 22 2c 74  61 73 6b 2c 6d 79 74 61  |eDown",task,myta|
00005a50  73 6b 25 3a e0 0d 21 fc  05 e1 0d 22 06 04 0d 22  |sk%:..!...."..."|
00005a60  10 10 dd f2 71 75 65 72  79 28 71 75 24 29 0d 22  |....query(qu$)."|
00005a70  1a 14 f2 6f 70 65 6e 77  69 6e 28 71 75 65 72 79  |...openwin(query|
00005a80  25 29 0d 22 24 07 ef 20  37 0d 22 2e 11 21 62 6c  |%)."$.. 7."..!bl|
00005a90  6f 63 6b 3d 71 75 65 72  79 25 0d 22 38 21 c8 99  |ock=query%."8!..|
00005aa0  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 49  |"Wimp_GetWindowI|
00005ab0  6e 66 6f 22 2c 2c 62 6c  6f 63 6b 0d 22 42 1b 77  |nfo",,block."B.w|
00005ac0  6f 72 6b 78 25 3d 62 6c  6f 63 6b 21 31 32 2d 62  |orkx%=block!12-b|
00005ad0  6c 6f 63 6b 21 34 0d 22  4c 1b 77 6f 72 6b 79 25  |lock!4."L.worky%|
00005ae0  3d 62 6c 6f 63 6b 21 31  36 2d 62 6c 6f 63 6b 21  |=block!16-block!|
00005af0  38 0d 22 56 27 c8 97 20  c8 93 20 62 6c 6f 63 6b  |8."V'.. .. block|
00005b00  21 34 2c 62 6c 6f 63 6b  21 38 2c 77 6f 72 6b 78  |!4,block!8,workx|
00005b10  25 2c 77 6f 72 6b 79 25  0d 22 60 17 f2 69 6e 66  |%,worky%."`..inf|
00005b20  6f 28 71 75 65 72 79 25  2c 31 2c 71 75 24 29 0d  |o(query%,1,qu$).|
00005b30  22 6a 05 e1 0d 22 74 04  0d 22 7e 0a dd f2 65 6e  |"j..."t.."~...en|
00005b40  64 71 0d 22 88 12 f2 63  6c 6f 73 65 28 71 75 65  |dq."...close(que|
00005b50  72 79 25 29 0d 22 92 4d  21 62 6c 6f 63 6b 3d 31  |ry%).".M!block=1|
00005b60  33 30 3a 62 6c 6f 63 6b  21 34 3d 31 33 31 3a 62  |30:block!4=131:b|
00005b70  6c 6f 63 6b 21 38 3d 2d  31 3a c8 99 22 4f 53 5f  |lock!8=-1:.."OS_|
00005b80  52 65 61 64 56 64 75 56  61 72 69 61 62 6c 65 73  |ReadVduVariables|
00005b90  22 2c 62 6c 6f 63 6b 2c  62 6c 6f 63 6b 2b 31 32  |",block,block+12|
00005ba0  38 0d 22 9c 25 c8 99 22  4f 53 5f 52 65 61 64 4d  |8.".%.."OS_ReadM|
00005bb0  6f 64 65 56 61 72 69 61  62 6c 65 22 2c eb 2c 34  |odeVariable",.,4|
00005bc0  20 b8 20 2c 2c 78 0d 22  a6 25 c8 99 22 4f 53 5f  | . ,,x.".%.."OS_|
00005bd0  52 65 61 64 4d 6f 64 65  56 61 72 69 61 62 6c 65  |ReadModeVariable|
00005be0  22 2c eb 2c 35 20 b8 20  2c 2c 79 0d 22 b0 39 c8  |",.,5 . ,,y.".9.|
00005bf0  97 20 c8 93 20 30 2c 30  2c 28 28 28 62 6c 6f 63  |. .. 0,0,(((bloc|
00005c00  6b 21 31 32 38 29 2b 31  29 2a 32 5e 78 29 2d 31  |k!128)+1)*2^x)-1|
00005c10  2c 28 28 62 6c 6f 63 6b  21 31 33 32 29 2b 31 29  |,((block!132)+1)|
00005c20  2a 32 5e 79 0d 22 ba 05  e1 0d 22 c4 04 0d 22 ce  |*2^y."...."...".|
00005c30  13 dd f2 63 6c 6f 73 65  28 21 62 6c 6f 63 6b 29  |...close(!block)|
00005c40  0d 22 d8 1f c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |."...."Wimp_Clos|
00005c50  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 0d  |eWindow",,block.|
00005c60  22 e2 05 e1 0d 22 ec 04  0d 22 f6 13 dd f2 64 72  |"...."..."....dr|
00005c70  61 67 73 70 72 28 66 6c  61 67 29 0d 23 00 0f e7  |agspr(flag).#...|
00005c80  20 64 72 61 67 73 70 72  20 8c 0d 23 0a 0d c8 8e  | dragspr ..#....|
00005c90  20 66 6c 61 67 20 ca 0d  23 14 08 c9 20 31 3a 0d  | flag ..#... 1:.|
00005ca0  23 1e 3b 21 62 6c 6f 63  6b 3d 77 69 6e 73 61 76  |#.;!block=winsav|
00005cb0  65 25 3a 62 6c 6f 63 6b  21 34 3d 32 3a c8 99 20  |e%:block!4=2:.. |
00005cc0  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00005cd0  74 65 22 2c 2c 62 6c 6f  63 6b 0d 23 28 2c 62 6c  |te",,block.#(,bl|
00005ce0  6f 63 6b 21 38 3d 30 3a  62 6c 6f 63 6b 21 31 32  |ock!8=0:block!12|
00005cf0  3d 30 3a 24 28 62 6c 6f  63 6b 21 33 32 29 3d 64  |=0:$(block!32)=d|
00005d00  69 6e 64 69 72 24 0d 23  32 21 c8 99 20 22 57 69  |indir$.#2!.. "Wi|
00005d10  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
00005d20  2c 2c 62 6c 6f 63 6b 0d  23 3c 19 c8 99 20 22 44  |,,block.#<... "D|
00005d30  72 61 67 41 53 70 72 69  74 65 5f 53 74 6f 70 22  |ragASprite_Stop"|
00005d40  0d 23 46 09 c9 20 2d 31  3a 0d 23 50 3b 21 62 6c  |.#F.. -1:.#P;!bl|
00005d50  6f 63 6b 3d 77 69 6e 73  61 76 65 25 3a 62 6c 6f  |ock=winsave%:blo|
00005d60  63 6b 21 34 3d 32 3a c8  99 20 22 57 69 6d 70 5f  |ck!4=2:.. "Wimp_|
00005d70  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 62  |GetIconState",,b|
00005d80  6c 6f 63 6b 0d 23 5a 17  64 69 6e 64 69 72 24 3d  |lock.#Z.dindir$=|
00005d90  24 28 62 6c 6f 63 6b 21  33 32 29 0d 23 64 28 62  |$(block!32).#d(b|
00005da0  6c 6f 63 6b 21 38 3d 30  3a 62 6c 6f 63 6b 21 31  |lock!8=0:block!1|
00005db0  32 3d 30 3a 24 28 62 6c  6f 63 6b 21 33 32 29 3d  |2=0:$(block!32)=|
00005dc0  bd 31 33 0d 23 6e 21 c8  99 20 22 57 69 6d 70 5f  |.13.#n!.. "Wimp_|
00005dd0  53 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 62  |SetIconState",,b|
00005de0  6c 6f 63 6b 0d 23 78 05  cb 0d 23 82 05 cd 0d 23  |lock.#x...#....#|
00005df0  8c 05 e1 0d 23 96 04 0d  23 a0 14 dd f2 6e 65 77  |....#...#....new|
00005e00  74 72 65 65 28 66 69 6c  65 24 29 0d 23 aa 25 e7  |tree(file$).#.%.|
00005e10  20 62 6c 6f 63 6b 21 34  30 3d 34 30 39 36 20 84  | block!40=4096 .|
00005e20  20 62 6c 6f 63 6b 21 34  30 3d 38 31 39 32 20 8c  | block!40=8192 .|
00005e30  0d 23 b4 13 70 61 74 68  24 3d 66 69 6c 65 24 2b  |.#..path$=file$+|
00005e40  22 2e 22 0d 23 be 17 f2  69 6e 66 6f 28 6e 65 77  |".".#...info(new|
00005e50  25 2c 31 2c 70 61 74 68  24 29 0d 23 c8 12 f2 6f  |%,1,path$).#...o|
00005e60  70 65 6e 77 69 6e 28 6e  65 77 25 29 0d 23 d2 05  |penwin(new%).#..|
00005e70  e1 0d 23 dc 05 cd 0d 23  e6 19 70 61 74 68 24 3d  |..#....#..path$=|
00005e80  a4 67 65 74 6c 65 61 66  28 66 69 6c 65 24 29 0d  |.getleaf(file$).|
00005e90  23 f0 23 70 61 74 68 24  3d c0 66 69 6c 65 24 2c  |#.#path$=.file$,|
00005ea0  a9 28 66 69 6c 65 24 29  2d a9 28 70 61 74 68 24  |.(file$)-.(path$|
00005eb0  29 29 0d 23 fa 17 f2 69  6e 66 6f 28 6e 65 77 25  |)).#...info(new%|
00005ec0  2c 31 2c 70 61 74 68 24  29 0d 24 04 05 e1 0d 24  |,1,path$).$....$|
00005ed0  0e 04 0d 24 18 14 dd f2  64 72 61 67 6e 65 77 28  |...$....dragnew(|
00005ee0  70 61 74 68 24 29 0d 24  22 2b 62 6c 6f 63 6b 21  |path$).$"+block!|
00005ef0  34 30 3d 34 30 39 36 3a  70 61 74 68 24 3d c0 70  |40=4096:path$=.p|
00005f00  61 74 68 24 2c a9 28 70  61 74 68 24 29 2d 31 30  |ath$,.(path$)-10|
00005f10  29 0d 24 2c 13 f2 6e 65  77 74 72 65 65 28 70 61  |).$,..newtree(pa|
00005f20  74 68 24 29 0d 24 36 05  e1 0d 24 40 04 0d 24 4a  |th$).$6...$@..$J|
00005f30  0c dd f2 64 72 69 76 65  30 0d 24 54 3d c8 99 22  |...drive0.$T=.."|
00005f40  4f 53 5f 46 53 43 6f 6e  74 72 6f 6c 22 2c 33 37  |OS_FSControl",37|
00005f50  2c 22 41 44 46 53 3a 3a  30 2e 24 22 2c 74 62 6c  |,"ADFS::0.$",tbl|
00005f60  6b 2c 30 2c 30 2c 31 30  32 34 20 b8 20 2c 2c 2c  |k,0,0,1024 . ,,,|
00005f70  2c 2c 74 6c 65 6e 0d 24  5e 27 f2 69 6e 66 6f 28  |,,tlen.$^'.info(|
00005f80  6e 65 77 25 2c 31 2c c0  24 74 62 6c 6b 2c 31 30  |new%,1,.$tblk,10|
00005f90  32 34 2d 74 6c 65 6e 29  2b 22 2e 22 29 0d 24 68  |24-tlen)+".").$h|
00005fa0  05 e1 0d 24 72 04 0d 24  7c 08 dd f2 67 6f 0d 24  |...$r..$|...go.$|
00005fb0  86 4c e7 20 63 74 3d 6d  61 78 6e 6f 20 8c 20 f2  |.L. ct=maxno . .|
00005fc0  6d 65 73 73 28 22 54 68  65 72 65 20 69 73 20 6e  |mess("There is n|
00005fd0  6f 20 6d 65 20 66 72 65  65 20 74 72 65 65 73 20  |o me free trees |
00005fe0  61 76 61 69 6c 61 62 6c  65 20 69 6e 20 74 68 69  |available in thi|
00005ff0  73 20 66 69 6c 65 22 29  3a e1 0d 24 90 23 61 72  |s file"):..$.#ar|
00006000  63 78 3d 30 3a 70 72 65  61 72 63 78 3d 2d 31 3a  |cx=0:prearcx=-1:|
00006010  61 72 63 73 3d a3 3a 61  70 70 73 3d a3 0d 24 9a  |arcs=.:apps=..$.|
00006020  20 61 72 63 73 3d ac 20  a4 63 68 65 63 6b 66 6c  | arcs=. .checkfl|
00006030  61 67 28 6e 65 77 25 2c  30 2c 32 31 29 0d 24 a4  |ag(new%,0,21).$.|
00006040  20 61 70 70 73 3d ac 20  a4 63 68 65 63 6b 66 6c  | apps=. .checkfl|
00006050  61 67 28 6e 65 77 25 2c  33 2c 32 31 29 0d 24 ae  |ag(new%,3,21).$.|
00006060  18 72 6f 6f 74 24 3d 24  a4 69 6e 66 6f 28 6e 65  |.root$=$.info(ne|
00006070  77 25 2c 31 29 0d 24 b8  44 e7 20 72 6f 6f 74 24  |w%,1).$.D. root$|
00006080  3d 22 22 20 8c 20 f2 6d  65 73 73 28 22 59 6f 75  |="" . .mess("You|
00006090  20 68 61 76 65 20 6e 6f  74 20 65 6e 74 65 72 65  | have not entere|
000060a0  64 20 61 20 70 61 74 68  20 74 6f 20 63 61 74 61  |d a path to cata|
000060b0  6c 6f 67 75 65 22 29 3a  e1 0d 24 c2 1c 72 6f 6f  |logue"):..$..roo|
000060c0  74 24 3d c0 72 6f 6f 74  24 2c a9 28 72 6f 6f 74  |t$=.root$,.(root|
000060d0  24 29 2d 31 29 0d 24 cc  1f c8 99 22 4f 53 5f 46  |$)-1).$...."OS_F|
000060e0  69 6c 65 22 2c 32 30 2c  72 6f 6f 74 24 20 b8 20  |ile",20,root$ . |
000060f0  74 79 70 65 0d 24 d6 43  e7 20 74 79 70 65 3c 3e  |type.$.C. type<>|
00006100  32 20 8c 20 f2 6d 65 73  73 28 22 54 68 65 20 70  |2 . .mess("The p|
00006110  61 74 68 20 74 6f 20 63  61 74 61 6c 6f 67 75 65  |ath to catalogue|
00006120  20 68 61 73 20 6e 6f 74  20 62 65 65 6e 20 66 6f  | has not been fo|
00006130  75 6e 64 22 29 3a e1 0d  24 e0 0d c8 8e 20 61 72  |und"):..$.... ar|
00006140  63 73 20 ca 0d 24 ea 08  c9 20 b9 3a 0d 24 f4 11  |cs ..$... .:.$..|
00006150  24 74 62 6c 6b 3d 22 41  72 63 46 53 22 0d 24 fe  |$tblk="ArcFS".$.|
00006160  1f c8 99 22 58 4f 53 5f  4d 6f 64 75 6c 65 22 2c  |..."XOS_Module",|
00006170  31 38 2c 74 62 6c 6b 20  b8 20 72 30 0d 25 08 0e  |18,tblk . r0.%..|
00006180  e7 20 72 30 3c 3e 31 38  20 8c 0d 25 12 92 e7 20  |. r0<>18 ..%... |
00006190  a4 61 73 6b 28 22 41 72  63 46 53 20 6e 6f 74 20  |.ask("ArcFS not |
000061a0  70 72 65 73 65 6e 74 2e  20 4f 6e 6c 79 20 61 62  |present. Only ab|
000061b0  6c 65 20 74 6f 20 63 72  65 61 74 65 20 74 72 65  |le to create tre|
000061c0  65 73 20 6f 66 20 61 72  63 68 69 76 65 73 20 69  |es of archives i|
000061d0  66 20 41 72 63 46 53 20  69 73 20 70 72 65 73 65  |f ArcFS is prese|
000061e0  6e 74 2e 20 43 6f 6e 74  69 6e 75 65 20 77 69 74  |nt. Continue wit|
000061f0  68 6f 75 74 20 61 72 63  68 69 76 65 73 3f 22 29  |hout archives?")|
00006200  3d 31 20 8c 20 61 72 63  73 3d a3 3a 8b 20 f2 63  |=1 . arcs=.:. .c|
00006210  6c 6f 73 65 28 6e 65 77  25 29 3a e1 0d 25 1c 05  |lose(new%):..%..|
00006220  cd 0d 25 26 05 cb 0d 25  30 20 c8 99 22 58 4f 53  |..%&...%0 .."XOS|
00006230  5f 46 69 6c 65 22 2c 31  33 2c 72 6f 6f 74 24 20  |_File",13,root$ |
00006240  b8 20 74 79 70 65 0d 25  3a 60 e7 20 74 79 70 65  |. type.%:`. type|
00006250  3c 32 20 80 20 74 79 70  65 3e 33 20 20 8c 20 f2  |<2 . type>3  . .|
00006260  71 75 65 72 79 28 22 50  61 74 68 20 74 6f 20 63  |query("Path to c|
00006270  72 65 61 74 65 20 74 72  65 65 20 66 72 6f 6d 20  |reate tree from |
00006280  69 73 20 6e 6f 74 20 61  20 64 69 72 65 63 74 6f  |is not a directo|
00006290  72 79 2f 64 6f 65 73 20  6e 6f 74 20 65 78 69 73  |ry/does not exis|
000062a0  74 2e 22 29 3a e1 0d 25  44 1c 65 6e 64 6c 69 73  |t."):..%D.endlis|
000062b0  74 79 3d 30 3a 6e 6c 65  6e 3d 30 3a 73 74 6f 70  |ty=0:nlen=0:stop|
000062c0  3d a3 0d 25 4e 18 62 6f  74 4c 45 44 3d 25 31 30  |=..%N.botLED=%10|
000062d0  3a 74 6f 74 73 69 7a 65  3d 30 0d 25 58 0b 63 6f  |:totsize=0.%X.co|
000062e0  75 6e 74 3d 30 0d 25 62  09 63 74 2b 3d 31 0d 25  |unt=0.%b.ct+=1.%|
000062f0  6c 14 c8 99 22 48 6f 75  72 67 6c 61 73 73 5f 4f  |l..."Hourglass_O|
00006300  6e 22 0d 25 76 28 c8 99  22 4f 53 5f 48 65 61 70  |n".%v(.."OS_Heap|
00006310  22 2c 31 2c 68 65 61 70  25 20 b8 20 2c 2c 6d 65  |",1,heap% . ,,me|
00006320  6d 62 75 66 2c 74 66 72  65 65 0d 25 80 16 6d 65  |mbuf,tfree.%..me|
00006330  6d 62 75 66 3d 6d 65 6d  62 75 66 2d 31 30 32 34  |mbuf=membuf-1024|
00006340  0d 25 8a 13 e7 20 6d 65  6d 62 75 66 3c 31 30 32  |.%... membuf<102|
00006350  34 20 8c 0d 25 94 25 c8  99 22 57 69 6d 70 5f 53  |4 ..%.%.."Wimp_S|
00006360  6c 6f 74 53 69 7a 65 22  2c 2d 31 2c 2d 31 20 b8  |lotSize",-1,-1 .|
00006370  20 63 75 72 72 65 6e 74  0d 25 9e 29 c8 99 22 57  | current.%.).."W|
00006380  69 6d 70 5f 53 6c 6f 74  53 69 7a 65 22 2c 63 75  |imp_SlotSize",cu|
00006390  72 72 65 6e 74 2b 28 38  2a 31 30 32 34 29 2c 2d  |rrent+(8*1024),-|
000063a0  31 0d 25 a8 21 c8 99 22  57 69 6d 70 5f 53 6c 6f  |1.%.!.."Wimp_Slo|
000063b0  74 53 69 7a 65 22 2c 2d  31 2c 2d 31 20 b8 20 6e  |tSize",-1,-1 . n|
000063c0  65 77 0d 25 b2 16 63 68  61 6e 67 65 3d 6e 65 77  |ew.%..change=new|
000063d0  2d 63 75 72 72 65 6e 74  0d 25 bc 1f c8 99 22 4f  |-current.%...."O|
000063e0  53 5f 48 65 61 70 22 2c  35 2c 68 65 61 70 25 2c  |S_Heap",5,heap%,|
000063f0  2c 63 68 61 6e 67 65 0d  25 c6 12 68 73 69 7a 65  |,change.%..hsize|
00006400  62 2b 3d 63 68 61 6e 67  65 0d 25 d0 12 6d 65 6d  |b+=change.%..mem|
00006410  62 75 66 2b 3d 63 68 61  6e 67 65 0d 25 da 05 cd  |buf+=change.%...|
00006420  0d 25 e4 2c c8 99 22 4f  53 5f 48 65 61 70 22 2c  |.%.,.."OS_Heap",|
00006430  32 2c 68 65 61 70 25 2c  2c 6d 65 6d 62 75 66 20  |2,heap%,,membuf |
00006440  b8 20 2c 2c 74 72 65 65  28 63 74 29 0d 25 ee 0c  |. ,,tree(ct).%..|
00006450  6f 62 6a 65 63 74 3d 30  0d 25 f8 15 65 6e 64 74  |object=0.%..endt|
00006460  65 78 74 25 3d 74 72 65  65 28 63 74 29 0d 26 02  |ext%=tree(ct).&.|
00006470  0b 64 69 72 24 3d 22 22  0d 26 0c 07 78 3d 30 0d  |.dir$="".&..x=0.|
00006480  26 16 10 6c 61 73 74 64  69 72 28 30 29 3d 30 0d  |&..lastdir(0)=0.|
00006490  26 20 0b 73 74 61 72 74  3d 91 0d 26 2a 05 f5 0d  |& .start=..&*...|
000064a0  26 34 15 6f 62 6a 65 63  74 3d 6c 61 73 74 64 69  |&4.object=lastdi|
000064b0  72 28 78 29 0d 26 3e 0b  f2 67 6f 74 72 65 65 0d  |r(x).&>..gotree.|
000064c0  26 48 0e e7 20 73 74 6f  70 20 8c 20 e1 0d 26 52  |&H.. stop . ..&R|
000064d0  14 e7 20 65 6e 64 6c 69  73 74 79 3d 31 20 8c 20  |.. endlisty=1 . |
000064e0  e1 0d 26 5c 05 f5 0d 26  66 19 64 69 72 24 3d c0  |..&\...&f.dir$=.|
000064f0  64 69 72 24 2c 28 a9 64  69 72 24 29 2d 31 29 0d  |dir$,(.dir$)-1).|
00006500  26 70 16 fd 20 c1 64 69  72 24 2c a9 64 69 72 24  |&p.. .dir$,.dir$|
00006510  29 3d 22 2e 22 0d 26 7a  19 64 69 72 24 3d c0 64  |)=".".&z.dir$=.d|
00006520  69 72 24 2c 28 a9 64 69  72 24 29 2d 31 29 0d 26  |ir$,(.dir$)-1).&|
00006530  84 07 fd 20 a3 0d 26 8e  05 e1 0d 26 98 04 0d 26  |... ..&....&...&|
00006540  a2 0c dd f2 67 6f 74 72  65 65 0d 26 ac 05 f5 0d  |....gotree.&....|
00006550  26 b6 41 c8 99 22 4f 53  5f 47 42 50 42 22 2c 31  |&.A.."OS_GBPB",1|
00006560  30 2c 72 6f 6f 74 24 2b  64 69 72 24 2c 62 75 66  |0,root$+dir$,buf|
00006570  66 65 72 2c 31 2c 6f 62  6a 65 63 74 2c 36 33 20  |fer,1,object,63 |
00006580  b8 20 2c 2c 2c 72 65 61  64 65 72 2c 6c 61 73 74  |. ,,,reader,last|
00006590  0d 26 c0 10 e7 20 6c 61  73 74 3c 3e 2d 31 20 8c  |.&... last<>-1 .|
000065a0  0d 26 ca 0c 66 69 6c 65  24 3d 22 22 0d 26 d4 0b  |.&..file$="".&..|
000065b0  62 75 66 66 3d 32 30 0d  26 de 05 f5 0d 26 e8 17  |buff=20.&....&..|
000065c0  66 69 6c 65 24 2b 3d bd  62 75 66 66 65 72 3f 62  |file$+=.buffer?b|
000065d0  75 66 66 0d 26 f2 0b 62  75 66 66 2b 3d 31 0d 26  |uff.&..buff+=1.&|
000065e0  fc 12 fd 62 75 66 66 65  72 3f 62 75 66 66 3d 30  |...buffer?buff=0|
000065f0  0d 27 06 29 e7 20 c0 66  69 6c 65 24 2c 31 29 3d  |.'.). .file$,1)=|
00006600  bd 30 20 66 69 6c 65 24  3d c2 66 69 6c 65 24 2c  |.0 file$=.file$,|
00006610  a9 66 69 6c 65 24 2d 31  29 0d 27 10 13 6c 65 6e  |.file$-1).'..len|
00006620  67 74 68 3d 62 75 66 66  65 72 21 38 0d 27 1a 12  |gth=buffer!8.'..|
00006630  74 79 70 65 3d 62 75 66  66 65 72 21 31 36 0d 27  |type=buffer!16.'|
00006640  24 3c c8 99 22 4f 53 5f  46 69 6c 65 22 2c 32 30  |$<.."OS_File",20|
00006650  2c 72 6f 6f 74 24 2b 64  69 72 24 2b 22 2e 22 2b  |,root$+dir$+"."+|
00006660  66 69 6c 65 24 20 b8 20  74 79 70 65 2c 2c 2c 2c  |file$ . type,,,,|
00006670  2c 2c 66 69 6c 65 74 79  70 65 0d 27 2e 3d e7 20  |,,filetype.'.=. |
00006680  66 69 6c 65 74 79 70 65  3d 34 30 39 36 20 84 20  |filetype=4096 . |
00006690  66 69 6c 65 74 79 70 65  3d 38 31 39 32 20 80 20  |filetype=8192 . |
000066a0  6c 65 6e 67 74 68 3d 2d  31 20 8c 20 6c 65 6e 67  |length=-1 . leng|
000066b0  74 68 3d 32 30 34 38 0d  27 38 1f e7 20 74 79 70  |th=2048.'8.. typ|
000066c0  65 3d 32 20 65 78 74 24  3d 22 89 22 20 8b 20 65  |e=2 ext$="." . e|
000066d0  78 74 24 3d bd 30 0d 27  42 39 e7 20 66 69 6c 65  |xt$=.0.'B9. file|
000066e0  74 79 70 65 3d 34 30 39  36 20 80 20 74 79 70 65  |type=4096 . type|
000066f0  3d 33 20 8c 20 66 69 6c  65 74 24 3d 22 44 44 43  |=3 . filet$="DDC|
00006700  22 3a 66 69 6c 65 74 79  70 65 3d 26 44 44 43 0d  |":filetype=&DDC.|
00006710  27 4c 23 e7 20 61 72 63  73 20 80 20 66 69 6c 65  |'L#. arcs . file|
00006720  74 79 70 65 3d 26 44 44  43 20 65 78 74 24 3d 22  |type=&DDC ext$="|
00006730  8a 22 0d 27 56 20 6e 6c  65 6e 74 3d a9 28 64 69  |.".'V nlent=.(di|
00006740  72 24 2b 66 69 6c 65 24  29 2d 78 2b 31 2b 61 72  |r$+file$)-x+1+ar|
00006750  63 78 0d 27 60 1d e7 20  6e 6c 65 6e 74 3e 6e 6c  |cx.'`.. nlent>nl|
00006760  65 6e 20 8c 20 6e 6c 65  6e 3d 6e 6c 65 6e 74 0d  |en . nlen=nlent.|
00006770  27 6a 1f 70 72 65 64 69  63 74 65 64 3d 65 6e 64  |'j.predicted=end|
00006780  74 65 78 74 25 2d 74 72  65 65 28 63 74 29 0d 27  |text%-tree(ct).'|
00006790  74 22 e7 20 70 72 65 64  69 63 74 65 64 3e 6d 65  |t". predicted>me|
000067a0  6d 62 75 66 2d 31 30 32  34 20 8c 20 f2 6d 65 6d  |mbuf-1024 . .mem|
000067b0  0d 27 7e 0e e7 20 73 74  6f 70 20 8c 20 e1 0d 27  |.'~.. stop . ..'|
000067c0  88 18 66 69 24 3d a4 66  75 6c 6c 73 28 66 69 6c  |..fi$=.fulls(fil|
000067d0  65 24 2c 31 30 29 0d 27  92 25 64 69 24 3d a4 66  |e$,10).'.%di$=.f|
000067e0  75 6c 6c 73 28 c3 28 28  a9 64 69 72 24 29 2d 78  |ulls(.((.dir$)-x|
000067f0  2b 61 72 63 78 2b 31 29  2c 33 29 0d 27 9c 1b 6c  |+arcx+1),3).'..l|
00006800  65 6e 67 24 3d a4 66 75  6c 6c 73 28 c3 6c 65 6e  |eng$=.fulls(.len|
00006810  67 74 68 2c 37 29 0d 27  a6 15 66 69 6c 65 74 24  |gth,7).'..filet$|
00006820  3d c3 7e 66 69 6c 65 74  79 70 65 0d 27 b0 22 e7  |=.~filetype.'.".|
00006830  20 66 69 6c 65 74 79 70  65 3d 34 30 39 36 20 8c  | filetype=4096 .|
00006840  20 66 69 6c 65 74 24 3d  22 44 49 52 22 0d 27 ba  | filet$="DIR".'.|
00006850  22 e7 20 66 69 6c 65 74  79 70 65 3d 38 31 39 32  |". filetype=8192|
00006860  20 8c 20 66 69 6c 65 74  24 3d 22 41 50 50 22 0d  | . filet$="APP".|
00006870  27 c4 35 e7 20 a9 28 66  69 6c 65 74 24 29 3c 33  |'.5. .(filet$)<3|
00006880  20 8c 20 f5 3a 66 69 6c  65 74 24 3d 22 30 22 2b  | . .:filet$="0"+|
00006890  66 69 6c 65 74 24 3a fd  20 a9 28 66 69 6c 65 74  |filet$:. .(filet|
000068a0  24 29 3d 33 0d 27 ce 27  24 65 6e 64 74 65 78 74  |$)=3.'.'$endtext|
000068b0  25 3d 64 69 24 2b 66 69  24 2b 65 78 74 24 2b 6c  |%=di$+fi$+ext$+l|
000068c0  65 6e 67 24 2b 66 69 6c  65 74 24 0d 27 d8 10 65  |eng$+filet$.'..e|
000068d0  6e 64 74 65 78 74 25 2b  3d 32 34 0d 27 e2 13 74  |ndtext%+=24.'..t|
000068e0  6f 74 73 69 7a 65 2b 3d  6c 65 6e 67 74 68 0d 27  |otsize+=length.'|
000068f0  ec 0d 6f 62 6a 65 63 74  2b 3d 31 0d 27 f6 0c 63  |..object+=1.'..c|
00006900  6f 75 6e 74 2b 3d 31 0d  28 00 2a e7 20 62 6f 74  |ount+=1.(.*. bot|
00006910  4c 45 44 3d 25 30 31 20  8c 20 62 6f 74 4c 45 44  |LED=%01 . botLED|
00006920  3d 25 31 30 20 8b 20 62  6f 74 4c 45 44 3d 25 30  |=%10 . botLED=%0|
00006930  31 0d 28 0a 21 c8 99 22  48 6f 75 72 67 6c 61 73  |1.(.!.."Hourglas|
00006940  73 5f 4c 45 44 73 22 2c  25 31 31 2c 62 6f 74 4c  |s_LEDs",%11,botL|
00006950  45 44 0d 28 14 1c e7 20  61 72 63 73 20 80 20 66  |ED.(... arcs . f|
00006960  69 6c 65 74 79 70 65 3d  26 44 44 43 20 8c 0d 28  |iletype=&DDC ..(|
00006970  1e 58 70 72 65 61 72 63  72 6f 6f 74 24 3d 72 6f  |.Xprearcroot$=ro|
00006980  6f 74 24 3a 70 72 65 61  72 63 64 69 72 24 3d 64  |ot$:prearcdir$=d|
00006990  69 72 24 3a 70 72 65 61  72 63 6c 61 73 74 3d 6f  |ir$:prearclast=o|
000069a0  62 6a 65 63 74 3a 6c 61  73 74 64 69 72 28 78 29  |bject:lastdir(x)|
000069b0  3d 6f 62 6a 65 63 74 3a  70 72 65 61 72 63 78 3d  |=object:prearcx=|
000069c0  78 3a 78 2b 3d 31 0d 28  28 2a ff 28 22 4f 70 65  |x:x+=1.((*.("Ope|
000069d0  6e 41 72 63 68 69 76 65  20 22 2b 72 6f 6f 74 24  |nArchive "+root$|
000069e0  2b 64 69 72 24 2b 22 2e  22 2b 66 69 6c 65 24 29  |+dir$+"."+file$)|
000069f0  0d 28 32 52 72 6f 6f 74  24 3d 22 41 72 63 46 53  |.(2Rroot$="ArcFS|
00006a00  23 22 2b 66 69 6c 65 24  2b 22 3a 24 22 3a 61 72  |#"+file$+":$":ar|
00006a10  63 6e 61 6d 65 24 3d 66  69 6c 65 24 3a 6f 62 6a  |cname$=file$:obj|
00006a20  65 63 74 3d 30 3a 61 72  63 78 3d a9 28 64 69 72  |ect=0:arcx=.(dir|
00006a30  24 2b 66 69 6c 65 24 29  2b 31 3a 64 69 72 24 3d  |$+file$)+1:dir$=|
00006a40  22 22 0d 28 3c 31 61 72  63 63 74 2b 3d 31 3a 61  |"".(<1arcct+=1:a|
00006a50  72 63 24 28 61 72 63 63  74 29 3d 66 69 6c 65 24  |rc$(arcct)=file$|
00006a60  2b 22 2c 22 2b c3 63 6f  75 6e 74 2b 22 2c 22 2b  |+","+.count+","+|
00006a70  c3 63 74 0d 28 46 05 cd  0d 28 50 47 e7 20 66 69  |.ct.(F...(PG. fi|
00006a80  6c 65 74 79 70 65 3d 34  30 39 36 20 64 69 72 24  |letype=4096 dir$|
00006a90  3d 64 69 72 24 2b 22 2e  22 2b 66 69 6c 65 24 3a  |=dir$+"."+file$:|
00006aa0  6c 61 73 74 64 69 72 28  78 29 3d 6f 62 6a 65 63  |lastdir(x)=objec|
00006ab0  74 3a 78 2b 3d 31 3a 6f  62 6a 65 63 74 3d 30 0d  |t:x+=1:object=0.|
00006ac0  28 5a 4e e7 20 66 69 6c  65 74 79 70 65 3d 38 31  |(ZN. filetype=81|
00006ad0  39 32 20 80 20 61 70 70  73 20 64 69 72 24 3d 64  |92 . apps dir$=d|
00006ae0  69 72 24 2b 22 2e 22 2b  66 69 6c 65 24 3a 6c 61  |ir$+"."+file$:la|
00006af0  73 74 64 69 72 28 78 29  3d 6f 62 6a 65 63 74 3a  |stdir(x)=object:|
00006b00  78 2b 3d 31 3a 6f 62 6a  65 63 74 3d 30 0d 28 64  |x+=1:object=0.(d|
00006b10  05 cd 0d 28 6e 0e fd 20  72 65 61 64 65 72 3d 30  |...(n.. reader=0|
00006b20  0d 28 78 08 78 2d 3d 31  0d 28 82 22 e7 20 78 3d  |.(x.x-=1.(.". x=|
00006b30  2d 31 20 80 20 70 72 65  61 72 63 78 3d 2d 31 20  |-1 . prearcx=-1 |
00006b40  f2 65 6e 64 6f 66 6c 69  73 74 0d 28 8c a4 e7 20  |.endoflist.(... |
00006b50  78 3d 70 72 65 61 72 63  78 20 80 20 70 72 65 61  |x=prearcx . prea|
00006b60  72 63 78 3e 2d 31 20 8c  20 78 3d 70 72 65 61 72  |rcx>-1 . x=prear|
00006b70  63 78 3a 72 6f 6f 74 24  3d 70 72 65 61 72 63 72  |cx:root$=prearcr|
00006b80  6f 6f 74 24 3a 64 69 72  24 3d 70 72 65 61 72 63  |oot$:dir$=prearc|
00006b90  64 69 72 24 3a 6f 62 6a  65 63 74 3d 70 72 65 61  |dir$:object=prea|
00006ba0  72 63 6c 61 73 74 3a 6c  61 73 74 64 69 72 28 78  |rclast:lastdir(x|
00006bb0  29 3d 6f 62 6a 65 63 74  3a 70 72 65 61 72 63 78  |)=object:prearcx|
00006bc0  3d 2d 31 3a 61 72 63 78  3d 30 3a ff 28 22 43 6c  |=-1:arcx=0:.("Cl|
00006bd0  6f 73 65 41 72 63 68 69  76 65 20 22 2b 61 72 63  |oseArchive "+arc|
00006be0  6e 61 6d 65 24 29 3a f2  67 6f 74 72 65 65 0d 28  |name$):.gotree.(|
00006bf0  96 14 e7 20 65 6e 64 6c  69 73 74 79 3d 31 20 8c  |... endlisty=1 .|
00006c00  20 e1 0d 28 a0 05 e1 0d  28 aa 04 0d 28 b4 0f dd  | ..(....(...(...|
00006c10  f2 65 6e 64 6f 66 6c 69  73 74 0d 28 be 12 66 69  |.endoflist.(..fi|
00006c20  6e 69 73 68 3d 91 2d 73  74 61 72 74 0d 28 c8 2b  |nish=.-start.(.+|
00006c30  24 65 6e 64 74 65 78 74  25 3d bd 31 37 2b c3 74  |$endtext%=.17+.t|
00006c40  6f 74 73 69 7a 65 2b bd  31 38 2b c3 66 69 6e 69  |otsize+.18+.fini|
00006c50  73 68 2b bd 32 35 35 0d  28 d2 23 65 6e 64 74 65  |sh+.255.(.#endte|
00006c60  78 74 25 2b 3d a9 28 c3  74 6f 74 73 69 7a 65 2b  |xt%+=.(.totsize+|
00006c70  c3 66 69 6e 69 73 68 29  2b 33 0d 28 dc 1f 74 73  |.finish)+3.(..ts|
00006c80  69 7a 65 28 63 74 29 3d  65 6e 64 74 65 78 74 25  |ize(ct)=endtext%|
00006c90  2d 74 72 65 65 28 63 74  29 0d 28 e6 39 74 63 6f  |-tree(ct).(.9tco|
00006ca0  75 6e 74 28 63 74 29 3d  63 6f 75 6e 74 3a 74 6c  |unt(ct)=count:tl|
00006cb0  65 6e 28 63 74 29 3d 6e  6c 65 6e 3a 73 74 3d 63  |en(ct)=nlen:st=c|
00006cc0  74 3a 74 72 6f 6f 74 24  28 63 74 29 3d 72 6f 6f  |t:troot$(ct)=roo|
00006cd0  74 24 0d 28 f0 2a c8 99  22 4f 53 5f 48 65 61 70  |t$.(.*.."OS_Heap|
00006ce0  22 2c 36 2c 68 65 61 70  25 2c 74 72 65 65 28 63  |",6,heap%,tree(c|
00006cf0  74 29 20 b8 20 2c 2c 2c  63 75 72 62 0d 28 fa 40  |t) . ,,,curb.(.@|
00006d00  c8 99 22 4f 53 5f 48 65  61 70 22 2c 34 2c 68 65  |.."OS_Heap",4,he|
00006d10  61 70 25 2c 74 72 65 65  28 63 74 29 2c 28 74 73  |ap%,tree(ct),(ts|
00006d20  69 7a 65 28 63 74 29 2d  63 75 72 62 29 2b 38 20  |ize(ct)-curb)+8 |
00006d30  b8 20 2c 2c 74 72 65 65  28 63 74 29 0d 29 04 17  |. ,,tree(ct).)..|
00006d40  c8 99 22 48 6f 75 72 67  6c 61 73 73 5f 53 6d 61  |.."Hourglass_Sma|
00006d50  73 68 22 0d 29 0e 0e 65  6e 64 6c 69 73 74 79 3d  |sh".)..endlisty=|
00006d60  31 0d 29 18 2b 21 62 6c  6f 63 6b 3d 6e 65 77 25  |1.).+!block=new%|
00006d70  3a c8 99 22 57 69 6d 70  5f 43 6c 6f 73 65 57 69  |:.."Wimp_CloseWi|
00006d80  6e 64 6f 77 22 2c 2c 62  6c 6f 63 6b 0d 29 22 2d  |ndow",,block.)"-|
00006d90  21 62 6c 6f 63 6b 3d 74  69 6e 66 6f 25 3a c8 99  |!block=tinfo%:..|
00006da0  22 57 69 6d 70 5f 43 6c  6f 73 65 57 69 6e 64 6f  |"Wimp_CloseWindo|
00006db0  77 22 2c 2c 62 6c 6f 63  6b 0d 29 2c 2d 21 62 6c  |w",,block.),-!bl|
00006dc0  6f 63 6b 3d 66 69 6e 66  6f 25 3a c8 99 22 57 69  |ock=finfo%:.."Wi|
00006dd0  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
00006de0  2c 62 6c 6f 63 6b 0d 29  36 2d 21 62 6c 6f 63 6b  |,block.)6-!block|
00006df0  3d 69 69 6e 66 6f 25 3a  c8 99 22 57 69 6d 70 5f  |=iinfo%:.."Wimp_|
00006e00  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6c  |CloseWindow",,bl|
00006e10  6f 63 6b 0d 29 40 1b f2  69 6e 66 6f 28 66 69 6e  |ock.)@..info(fin|
00006e20  66 6f 25 2c 31 2c c3 28  63 74 2b 31 29 29 0d 29  |fo%,1,.(ct+1)).)|
00006e30  4a 23 f2 69 6e 66 6f 28  66 69 6e 66 6f 25 2c 32  |J#.info(finfo%,2|
00006e40  2c c3 28 68 73 69 7a 65  62 2d 74 66 72 65 65 29  |,.(hsizeb-tfree)|
00006e50  29 0d 29 54 3c e7 20 24  a4 69 6e 66 6f 28 66 69  |).)T<. $.info(fi|
00006e60  6e 66 6f 25 2c 30 29 3d  22 4e 6f 6e 65 22 20 8c  |nfo%,0)="None" .|
00006e70  20 f2 69 6e 66 6f 28 66  69 6e 66 6f 25 2c 30 2c  | .info(finfo%,0,|
00006e80  22 3c 55 6e 74 69 74 6c  65 64 3e 22 29 0d 29 5e  |"<Untitled>").)^|
00006e90  0f e7 20 73 61 76 65 64  3d a3 20 8c 0d 29 68 0b  |.. saved=. ..)h.|
00006ea0  73 61 76 65 64 3d b9 0d  29 72 10 21 69 63 6f 6e  |saved=..)r.!icon|
00006eb0  64 3d 6d 61 69 6e 25 0d  29 7c 21 c8 99 22 57 69  |d=main%.)|!.."Wi|
00006ec0  6d 70 5f 47 65 74 57 69  6e 64 6f 77 49 6e 66 6f  |mp_GetWindowInfo|
00006ed0  22 2c 2c 69 63 6f 6e 64  0d 29 86 20 24 28 69 63  |",,icond.). $(ic|
00006ee0  6f 6e 64 21 37 36 29 3d  24 28 69 63 6f 6e 64 21  |ond!76)=$(icond!|
00006ef0  37 36 29 2b 22 20 2a 22  0d 29 90 46 c8 99 22 57  |76)+" *".).F.."W|
00006f00  69 6d 70 5f 46 6f 72 63  65 52 65 64 72 61 77 22  |imp_ForceRedraw"|
00006f10  2c 2d 31 2c 62 6c 6f 63  6b 21 34 2c 28 62 6c 6f  |,-1,block!4,(blo|
00006f20  63 6b 21 31 36 29 2d 33  32 2c 62 6c 6f 63 6b 21  |ck!16)-32,block!|
00006f30  31 32 2c 62 6c 6f 63 6b  21 31 36 2b 33 36 0d 29  |12,block!16+36.)|
00006f40  9a 19 f2 69 6e 66 6f 28  66 69 6e 66 6f 25 2c 33  |...info(finfo%,3|
00006f50  2c 22 59 65 73 22 29 0d  29 a4 05 cd 0d 29 ae 2c  |,"Yes").)....).,|
00006f60  21 62 6c 6f 63 6b 3d 6d  61 69 6e 25 3a c8 99 22  |!block=main%:.."|
00006f70  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00006f80  22 2c 2c 62 6c 6f 63 6b  0d 29 b8 22 f2 6e 65 77  |",,block.).".new|
00006f90  76 69 65 77 3a f2 6f 70  65 6e 77 69 6e 28 6d 61  |view:.openwin(ma|
00006fa0  69 6e 25 29 3a f2 70 61  6e 65 0d 29 c2 05 e1 0d  |in%):.pane.)....|
00006fb0  29 cc 04 0d 29 d6 09 dd  f2 6d 65 6d 0d 29 e0 29  |)...)....mem.).)|
00006fc0  c8 99 22 4f 53 5f 48 65  61 70 22 2c 36 2c 68 65  |.."OS_Heap",6,he|
00006fd0  61 70 25 2c 74 72 65 65  28 63 74 29 20 b8 20 2c  |ap%,tree(ct) . ,|
00006fe0  2c 2c 6f 68 73 0d 29 ea  20 c8 99 22 4f 53 5f 52  |,,ohs.). .."OS_R|
00006ff0  65 61 64 4d 65 6d 4d 61  70 49 6e 66 6f 22 20 b8  |eadMemMapInfo" .|
00007000  20 70 61 67 65 0d 29 f4  25 c8 99 22 57 69 6d 70  | page.).%.."Wimp|
00007010  5f 53 6c 6f 74 53 69 7a  65 22 2c 2d 31 2c 2d 31  |_SlotSize",-1,-1|
00007020  20 b8 20 63 75 72 72 65  6e 74 0d 29 fe 25 c8 99  | . current.).%..|
00007030  22 57 69 6d 70 5f 53 6c  6f 74 53 69 7a 65 22 2c  |"Wimp_SlotSize",|
00007040  63 75 72 72 65 6e 74 2b  70 61 67 65 2c 2d 31 0d  |current+page,-1.|
00007050  2a 08 21 c8 99 22 57 69  6d 70 5f 53 6c 6f 74 53  |*.!.."Wimp_SlotS|
00007060  69 7a 65 22 2c 2d 31 2c  2d 31 20 b8 20 6e 65 77  |ize",-1,-1 . new|
00007070  0d 2a 12 16 63 68 61 6e  67 65 3d 6e 65 77 2d 63  |.*..change=new-c|
00007080  75 72 72 65 6e 74 0d 2a  1c 83 e7 20 63 68 61 6e  |urrent.*... chan|
00007090  67 65 3d 30 20 8c 20 f2  71 75 65 72 79 28 22 4f  |ge=0 . .query("O|
000070a0  75 74 20 4f 66 20 4d 65  6d 6f 72 79 2e 20 46 72  |ut Of Memory. Fr|
000070b0  65 65 20 6d 6f 72 65 20  6d 65 6d 6f 72 79 20 61  |ee more memory a|
000070c0  6e 64 20 74 72 79 20 61  67 61 69 6e 2e 22 29 3a  |nd try again."):|
000070d0  63 74 2d 3d 31 3a c8 99  26 31 44 2c 33 2c 68 65  |ct-=1:..&1D,3,he|
000070e0  61 70 25 2c 74 72 65 65  28 63 74 29 3a 73 74 6f  |ap%,tree(ct):sto|
000070f0  70 3d b9 3a c8 99 22 48  6f 75 72 67 6c 61 73 73  |p=.:.."Hourglass|
00007100  5f 53 6d 61 73 68 22 3a  e1 0d 2a 26 1f c8 99 22  |_Smash":..*&..."|
00007110  4f 53 5f 48 65 61 70 22  2c 35 2c 68 65 61 70 25  |OS_Heap",5,heap%|
00007120  2c 2c 63 68 61 6e 67 65  0d 2a 30 34 c8 99 22 4f  |,,change.*04.."O|
00007130  53 5f 48 65 61 70 22 2c  34 2c 68 65 61 70 25 2c  |S_Heap",4,heap%,|
00007140  74 72 65 65 28 63 74 29  2c 63 68 61 6e 67 65 20  |tree(ct),change |
00007150  b8 20 2c 2c 74 72 65 65  28 63 74 29 0d 2a 3a 29  |. ,,tree(ct).*:)|
00007160  c8 99 22 4f 53 5f 48 65  61 70 22 2c 36 2c 68 65  |.."OS_Heap",6,he|
00007170  61 70 25 2c 74 72 65 65  28 63 74 29 20 b8 20 2c  |ap%,tree(ct) . ,|
00007180  2c 2c 6e 68 73 0d 2a 44  12 68 73 69 7a 65 62 2b  |,,nhs.*D.hsizeb+|
00007190  3d 63 68 61 6e 67 65 0d  2a 4e 13 6d 65 6d 62 75  |=change.*N.membu|
000071a0  66 2b 3d 6e 68 73 2d 6f  68 73 0d 2a 58 05 e1 0d  |f+=nhs-ohs.*X...|
000071b0  2a 62 04 0d 2a 6c 11 dd  f2 6d 61 6b 65 61 72 63  |*b..*l...makearc|
000071c0  6c 69 73 74 0d 2a 76 20  e3 20 6a 3d 30 20 b8 20  |list.*v . j=0 . |
000071d0  6d 61 78 6e 6f 3a 20 61  72 63 24 28 6a 29 3d 22  |maxno: arc$(j)="|
000071e0  22 3a 20 ed 0d 2a 80 0a  61 69 6e 64 3d 30 0d 2a  |": ..*..aind=0.*|
000071f0  8a 0e e3 20 6a 3d 30 20  b8 20 63 74 0d 2a 94 1a  |... j=0 . ct.*..|
00007200  20 e3 20 63 6f 75 6e 74  3d 30 20 b8 20 74 63 6f  | . count=0 . tco|
00007210  75 6e 74 28 6a 29 0d 2a  9e 13 20 69 6e 64 65 78  |unt(j).*.. index|
00007220  3d 63 6f 75 6e 74 2a 32  34 0d 2a a8 0d 20 74 79  |=count*24.*.. ty|
00007230  70 65 24 3d 22 22 0d 2a  b2 11 20 20 e3 20 68 3d  |pe$="".*..  . h=|
00007240  32 31 20 b8 20 32 33 0d  2a bc 21 20 20 74 79 70  |21 . 23.*.!  typ|
00007250  65 24 2b 3d bd 28 74 72  65 65 28 6a 29 3f 28 69  |e$+=.(tree(j)?(i|
00007260  6e 64 65 78 2b 68 29 29  0d 2a c6 07 20 20 ed 0d  |ndex+h)).*..  ..|
00007270  2a d0 14 20 e7 20 74 79  70 65 24 3d 22 44 44 43  |*.. . type$="DDC|
00007280  22 20 8c 0d 2a da 0b 20  20 74 24 3d 22 22 0d 2a  |" ..*..  t$="".*|
00007290  e4 10 20 20 e3 20 68 3d  33 20 b8 20 31 32 0d 2a  |..  . h=3 . 12.*|
000072a0  ee 1b 20 20 76 61 6c 3d  74 72 65 65 28 6a 29 3f  |..  val=tree(j)?|
000072b0  28 69 6e 64 65 78 2b 68  29 0d 2a f8 19 20 20 e7  |(index+h).*..  .|
000072c0  20 76 61 6c 3c 3e 30 20  8c 20 74 24 2b 3d bd 76  | val<>0 . t$+=.v|
000072d0  61 6c 0d 2b 02 07 20 20  ed 0d 2b 0c 42 20 20 e7  |al.+..  ..+.B  .|
000072e0  20 61 69 6e 64 3c 6d 61  78 6e 6f 20 8c 20 61 72  | aind<maxno . ar|
000072f0  63 24 28 61 69 6e 64 29  3d 74 24 2b 22 2c 22 2b  |c$(aind)=t$+","+|
00007300  c3 28 63 6f 75 6e 74 2b  31 29 2b 22 2c 22 2b c3  |.(count+1)+","+.|
00007310  28 6a 29 3a 61 69 6e 64  2b 3d 31 0d 2b 16 07 20  |(j):aind+=1.+.. |
00007320  20 cd 0d 2b 20 0c 20 ed  20 63 6f 75 6e 74 0d 2b  | ..+ . . count.+|
00007330  2a 07 ed 20 6a 0d 2b 34  10 61 72 63 63 74 3d 61  |*.. j.+4.arcct=a|
00007340  69 6e 64 2d 31 0d 2b 3e  05 e1 0d 2b 48 04 0d 2b  |ind-1.+>...+H..+|
00007350  52 0a dd f2 6c 61 73 74  0d 2b 5c 0e e7 20 73 74  |R...last.+\.. st|
00007360  3d 30 20 8c 20 e1 0d 2b  66 09 73 74 2d 3d 31 0d  |=0 . ..+f.st-=1.|
00007370  2b 70 2c 21 62 6c 6f 63  6b 3d 6d 61 69 6e 25 3a  |+p,!block=main%:|
00007380  c8 99 22 57 69 6d 70 5f  43 6c 6f 73 65 57 69 6e  |.."Wimp_CloseWin|
00007390  64 6f 77 22 2c 2c 62 6c  6f 63 6b 0d 2b 7a 0c f2  |dow",,block.+z..|
000073a0  6e 65 77 76 69 65 77 0d  2b 84 13 f2 6f 70 65 6e  |newview.+...open|
000073b0  77 69 6e 28 6d 61 69 6e  25 29 0d 2b 8e 11 f2 63  |win(main%).+...c|
000073c0  6c 6f 73 65 28 66 69 6e  64 25 29 0d 2b 98 12 f2  |lose(find%).+...|
000073d0  63 6c 6f 73 65 28 69 69  6e 66 6f 25 29 0d 2b a2  |close(iinfo%).+.|
000073e0  12 f2 63 6c 6f 73 65 28  74 69 6e 66 6f 25 29 0d  |..close(tinfo%).|
000073f0  2b ac 13 f2 63 6c 6f 73  65 28 6e 6f 74 66 6e 64  |+...close(notfnd|
00007400  25 29 0d 2b b6 12 f2 63  6c 6f 73 65 28 66 6f 75  |%).+...close(fou|
00007410  6e 64 25 29 0d 2b c0 09  f2 70 61 6e 65 0d 2b ca  |nd%).+...pane.+.|
00007420  05 e1 0d 2b d4 04 0d 2b  de 0a dd f2 6e 65 78 74  |...+...+....next|
00007430  0d 2b e8 0f e7 20 73 74  3d 63 74 20 8c 20 e1 0d  |.+... st=ct . ..|
00007440  2b f2 09 73 74 2b 3d 31  0d 2b fc 2c 21 62 6c 6f  |+..st+=1.+.,!blo|
00007450  63 6b 3d 6d 61 69 6e 25  3a c8 99 22 57 69 6d 70  |ck=main%:.."Wimp|
00007460  5f 43 6c 6f 73 65 57 69  6e 64 6f 77 22 2c 2c 62  |_CloseWindow",,b|
00007470  6c 6f 63 6b 0d 2c 06 0c  f2 6e 65 77 76 69 65 77  |lock.,...newview|
00007480  0d 2c 10 13 f2 6f 70 65  6e 77 69 6e 28 6d 61 69  |.,...openwin(mai|
00007490  6e 25 29 0d 2c 1a 11 f2  63 6c 6f 73 65 28 66 69  |n%).,...close(fi|
000074a0  6e 64 25 29 0d 2c 24 12  f2 63 6c 6f 73 65 28 69  |nd%).,$..close(i|
000074b0  69 6e 66 6f 25 29 0d 2c  2e 12 f2 63 6c 6f 73 65  |info%).,...close|
000074c0  28 74 69 6e 66 6f 25 29  0d 2c 38 13 f2 63 6c 6f  |(tinfo%).,8..clo|
000074d0  73 65 28 6e 6f 74 66 6e  64 25 29 0d 2c 42 12 f2  |se(notfnd%).,B..|
000074e0  63 6c 6f 73 65 28 66 6f  75 6e 64 25 29 0d 2c 4c  |close(found%).,L|
000074f0  09 f2 70 61 6e 65 0d 2c  56 05 e1 0d 2c 60 04 0d  |..pane.,V...,`..|
00007500  2c 6a 0d dd f2 6e 65 77  76 69 65 77 0d 2c 74 0f  |,j...newview.,t.|
00007510  e7 20 63 74 3d 2d 31 20  8c 20 e1 0d 2c 7e 1c f2  |. ct=-1 . ..,~..|
00007520  69 6e 66 6f 28 62 61 72  25 2c 30 2c 74 72 6f 6f  |info(bar%,0,troo|
00007530  74 24 28 73 74 29 29 0d  2c 88 18 74 70 74 72 3d  |t$(st)).,..tptr=|
00007540  74 63 6f 75 6e 74 28 73  74 29 2a 32 34 2b 31 0d  |tcount(st)*24+1.|
00007550  2c 92 0d 73 69 7a 65 62  24 3d 22 22 0d 2c 9c 05  |,..sizeb$="".,..|
00007560  f5 0d 2c a6 22 73 69 7a  65 62 24 3d 73 69 7a 65  |..,."sizeb$=size|
00007570  62 24 2b bd 28 74 72 65  65 28 73 74 29 3f 74 70  |b$+.(tree(st)?tp|
00007580  74 72 29 0d 2c b0 0b 74  70 74 72 2b 3d 31 0d 2c  |tr).,..tptr+=1.,|
00007590  ba 16 fd 20 74 72 65 65  28 73 74 29 3f 74 70 74  |... tree(st)?tpt|
000075a0  72 3d 31 38 0d 2c c4 0b  74 70 74 72 2b 3d 31 0d  |r=18.,..tptr+=1.|
000075b0  2c ce 0f 66 69 6e 69 73  68 73 24 3d 22 22 0d 2c  |,..finishs$="".,|
000075c0  d8 05 f5 0d 2c e2 26 66  69 6e 69 73 68 73 24 3d  |....,.&finishs$=|
000075d0  66 69 6e 69 73 68 73 24  2b bd 28 74 72 65 65 28  |finishs$+.(tree(|
000075e0  73 74 29 3f 74 70 74 72  29 0d 2c ec 0b 74 70 74  |st)?tptr).,..tpt|
000075f0  72 2b 3d 31 0d 2c f6 17  fd 20 74 72 65 65 28 73  |r+=1.,... tree(s|
00007600  74 29 3f 74 70 74 72 3d  32 35 35 0d 2d 00 1e f2  |t)?tptr=255.-...|
00007610  69 6e 66 6f 28 74 69 6e  66 6f 25 2c 30 2c 74 72  |info(tinfo%,0,tr|
00007620  6f 6f 74 24 28 73 74 29  29 0d 2d 0a 1f f2 69 6e  |oot$(st)).-...in|
00007630  66 6f 28 74 69 6e 66 6f  25 2c 31 2c c3 74 63 6f  |fo(tinfo%,1,.tco|
00007640  75 6e 74 28 73 74 29 29  0d 2d 14 1e f2 69 6e 66  |unt(st)).-...inf|
00007650  6f 28 74 69 6e 66 6f 25  2c 32 2c c3 74 73 69 7a  |o(tinfo%,2,.tsiz|
00007660  65 28 73 74 29 29 0d 2d  1e 1a f2 69 6e 66 6f 28  |e(st)).-...info(|
00007670  74 69 6e 66 6f 25 2c 33  2c 73 69 7a 65 62 24 29  |tinfo%,3,sizeb$)|
00007680  0d 2d 28 1c f2 69 6e 66  6f 28 74 69 6e 66 6f 25  |.-(..info(tinfo%|
00007690  2c 37 2c 66 69 6e 69 73  68 73 24 29 0d 2d 32 2e  |,7,finishs$).-2.|
000076a0  78 61 6c 74 3d 74 6c 65  6e 28 73 74 29 2a 31 36  |xalt=tlen(st)*16|
000076b0  3a 79 61 6c 74 3d 30 2d  28 74 63 6f 75 6e 74 28  |:yalt=0-(tcount(|
000076c0  73 74 29 2a 33 36 2b 34  30 29 0d 2d 3c 19 f2 61  |st)*36+40).-<..a|
000076d0  64 6a 75 73 74 77 69 6e  28 78 61 6c 74 2c 79 61  |djustwin(xalt,ya|
000076e0  6c 74 29 0d 2d 46 0d 69  74 65 6d 6e 6f 3d 2d 31  |lt).-F.itemno=-1|
000076f0  0d 2d 50 24 f2 73 65 74  69 63 73 74 61 74 65 28  |.-P$.seticstate(|
00007700  66 69 6e 64 25 2c 34 2c  31 3c 3c 32 32 2c 31 3c  |find%,4,1<<22,1<|
00007710  3c 32 32 29 0d 2d 5a 0d  64 65 70 74 68 3d 35 36  |<22).-Z.depth=56|
00007720  38 0d 2d 64 35 e7 20 74  63 6f 75 6e 74 28 73 74  |8.-d5. tcount(st|
00007730  29 2a 33 36 2b 34 30 3c  64 65 70 74 68 20 8c 20  |)*36+40<depth . |
00007740  64 65 70 74 68 3d 74 63  6f 75 6e 74 28 73 74 29  |depth=tcount(st)|
00007750  2a 33 36 2b 34 30 0d 2d  6e 15 77 69 64 74 68 3d  |*36+40.-n.width=|
00007760  74 6c 65 6e 28 73 74 29  2a 31 36 0d 2d 78 1b e7  |tlen(st)*16.-x..|
00007770  20 77 69 64 74 68 3e 35  30 30 20 8c 20 77 69 64  | width>500 . wid|
00007780  74 68 3d 35 30 30 0d 2d  82 05 e1 0d 2d 8c 04 0d  |th=500.-....-...|
00007790  2d 96 10 dd f2 73 65 6c  65 63 74 69 74 65 6d 0d  |-....selectitem.|
000077a0  2d a0 14 6f 6c 64 69 74  65 6d 6e 6f 3d 69 74 65  |-..olditemno=ite|
000077b0  6d 6e 6f 0d 2d aa 12 79  63 6f 6f 72 64 3d 62 6c  |mno.-..ycoord=bl|
000077c0  6f 63 6b 21 34 0d 2d b4  2e 21 62 6c 6f 63 6b 3d  |ock!4.-..!block=|
000077d0  6d 61 69 6e 25 3a c8 99  22 57 69 6d 70 5f 47 65  |main%:.."Wimp_Ge|
000077e0  74 57 69 6e 64 6f 77 49  6e 66 6f 22 2c 2c 62 6c  |tWindowInfo",,bl|
000077f0  6f 63 6b 0d 2d be 1b 77  6f 72 6b 78 25 3d 62 6c  |ock.-..workx%=bl|
00007800  6f 63 6b 21 34 2d 62 6c  6f 63 6b 21 32 30 0d 2d  |ock!4-block!20.-|
00007810  c8 1c 77 6f 72 6b 79 25  3d 62 6c 6f 63 6b 21 31  |..worky%=block!1|
00007820  36 2d 62 6c 6f 63 6b 21  32 34 0d 2d d2 1e 79 63  |6-block!24.-..yc|
00007830  6f 6f 72 64 3d 30 2d 28  62 6c 6f 63 6b 21 31 36  |oord=0-(block!16|
00007840  2d 79 63 6f 6f 72 64 29  0d 2d dc 1a 79 63 6f 6f  |-ycoord).-..ycoo|
00007850  72 64 3d 79 63 6f 6f 72  64 2b 62 6c 6f 63 6b 21  |rd=ycoord+block!|
00007860  32 34 0d 2d e6 21 69 74  65 6d 6e 6f 3d a8 28 28  |24.-.!itemno=.((|
00007870  79 63 6f 6f 72 64 2d 34  30 29 2f 33 36 29 2a 2d  |ycoord-40)/36)*-|
00007880  31 2d 33 0d 2d f0 0d 69  74 65 6d 73 74 3d 73 74  |1-3.-..itemst=st|
00007890  0d 2d fa 1a e7 20 6f 6c  64 69 74 65 6d 6e 6f 3d  |.-... olditemno=|
000078a0  69 74 65 6d 6e 6f 20 8c  20 e1 0d 2e 04 1b 79 63  |itemno . .....yc|
000078b0  6f 6f 72 64 3d 30 2d 28  69 74 65 6d 6e 6f 2a 33  |oord=0-(itemno*3|
000078c0  36 2b 34 34 29 0d 2e 0e  3d c8 99 22 57 69 6d 70  |6+44)...=.."Wimp|
000078d0  5f 46 6f 72 63 65 52 65  64 72 61 77 22 2c 6d 61  |_ForceRedraw",ma|
000078e0  69 6e 25 2c 31 2c 79 63  6f 6f 72 64 2d 33 32 2c  |in%,1,ycoord-32,|
000078f0  74 6c 65 6e 28 73 74 29  2a 31 36 2c 79 63 6f 6f  |tlen(st)*16,ycoo|
00007900  72 64 0d 2e 18 1e 79 63  6f 6f 72 64 3d 30 2d 28  |rd....ycoord=0-(|
00007910  6f 6c 64 69 74 65 6d 6e  6f 2a 33 36 2b 34 34 29  |olditemno*36+44)|
00007920  0d 2e 22 3d c8 99 22 57  69 6d 70 5f 46 6f 72 63  |.."=.."Wimp_Forc|
00007930  65 52 65 64 72 61 77 22  2c 6d 61 69 6e 25 2c 31  |eRedraw",main%,1|
00007940  2c 79 63 6f 6f 72 64 2d  33 32 2c 74 6c 65 6e 28  |,ycoord-32,tlen(|
00007950  73 74 29 2a 31 36 2c 79  63 6f 6f 72 64 0d 2e 2c  |st)*16,ycoord..,|
00007960  14 f2 70 75 74 69 6e 66  6f 28 69 74 65 6d 6e 6f  |..putinfo(itemno|
00007970  29 0d 2e 36 24 f2 73 65  74 69 63 73 74 61 74 65  |)..6$.seticstate|
00007980  28 66 69 6e 64 25 2c 34  2c 31 3c 3c 32 32 2c 30  |(find%,4,1<<22,0|
00007990  3c 3c 32 32 29 0d 2e 40  05 e1 0d 2e 4a 04 0d 2e  |<<22)..@....J...|
000079a0  54 15 dd f2 70 75 74 69  6e 66 6f 28 69 74 65 6d  |T...putinfo(item|
000079b0  6e 6f 29 0d 2e 5e 0f 6e  3d 69 74 65 6d 6e 6f 2a  |no)..^.n=itemno*|
000079c0  32 34 0d 2e 68 09 74 24  3d 22 22 0d 2e 72 2a e3  |24..h.t$=""..r*.|
000079d0  20 68 3d 33 20 b8 20 31  32 3a 69 3d 6e 2b 68 3a  | h=3 . 12:i=n+h:|
000079e0  74 24 2b 3d bd 28 74 72  65 65 28 73 74 29 3f 69  |t$+=.(tree(st)?i|
000079f0  29 3a ed 20 68 0d 2e 7c  27 f2 69 6e 66 6f 28 69  |):. h..|'.info(i|
00007a00  69 6e 66 6f 25 2c 30 2c  74 72 6f 6f 74 24 28 73  |info%,0,troot$(s|
00007a10  74 29 2b 22 2e 2e 2e 22  2b 74 24 29 0d 2e 86 09  |t)+"..."+t$)....|
00007a20  74 24 3d 22 22 0d 2e 90  2b e3 20 68 3d 31 34 20  |t$=""...+. h=14 |
00007a30  b8 20 32 30 3a 69 3d 6e  2b 68 3a 74 24 2b 3d bd  |. 20:i=n+h:t$+=.|
00007a40  28 74 72 65 65 28 73 74  29 3f 69 29 3a ed 20 68  |(tree(st)?i):. h|
00007a50  0d 2e 9a 16 f2 69 6e 66  6f 28 69 69 6e 66 6f 25  |.....info(iinfo%|
00007a60  2c 34 2c 74 24 29 0d 2e  a4 09 74 24 3d 22 22 0d  |,4,t$)....t$="".|
00007a70  2e ae 2b e3 20 68 3d 32  31 20 b8 20 32 33 3a 69  |..+. h=21 . 23:i|
00007a80  3d 6e 2b 68 3a 74 24 2b  3d bd 28 74 72 65 65 28  |=n+h:t$+=.(tree(|
00007a90  73 74 29 3f 69 29 3a ed  20 68 0d 2e b8 1e 74 65  |st)?i):. h....te|
00007aa0  24 3d 22 26 22 2b 74 24  2b 22 20 20 20 20 20 28  |$="&"+t$+"     (|
00007ab0  22 2b 74 24 2b 22 29 22  0d 2e c2 0b 74 62 6c 6b  |"+t$+")"....tblk|
00007ac0  3d 74 74 0d 2e cc 35 c8  99 22 58 4f 53 5f 46 53  |=tt...5.."XOS_FS|
00007ad0  43 6f 6e 74 72 6f 6c 22  2c 31 38 2c 2c a4 68 65  |Control",18,,.he|
00007ae0  78 74 6f 64 65 63 28 74  24 29 20 b8 20 72 30 2c  |xtodec(t$) . r0,|
00007af0  2c 72 32 25 2c 72 33 25  0d 2e d6 0d e7 20 72 30  |,r2%,r3%..... r0|
00007b00  3d 31 38 20 8c 0d 2e e0  2f 74 62 6c 6b 21 30 3d  |=18 ..../tblk!0=|
00007b10  72 32 25 3a 74 62 6c 6b  21 34 3d 72 33 25 3a 74  |r2%:tblk!4=r3%:t|
00007b20  62 6c 6b 3f 38 3d 31 33  3a 74 79 70 65 24 3d 24  |blk?8=13:type$=$|
00007b30  74 62 6c 6b 0d 2e ea 19  74 65 24 3d 74 79 70 65  |tblk....te$=type|
00007b40  24 2b 22 20 28 22 2b 74  24 2b 22 29 22 0d 2e f4  |$+" ("+t$+")"...|
00007b50  05 cd 0d 2e fe 13 73 74  24 3d 22 73 66 69 6c 65  |......st$="sfile|
00007b60  5f 22 2b 74 24 0d 2f 08  30 e7 20 74 24 3d 22 41  |_"+t$./.0. t$="A|
00007b70  50 50 22 20 8c 20 74 65  24 3d 22 41 70 70 6c 69  |PP" . te$="Appli|
00007b80  63 61 74 69 6f 6e 20 20  20 22 3a 73 74 24 3d 22  |cation   ":st$="|
00007b90  73 61 70 70 22 0d 2f 12  30 e7 20 74 24 3d 22 44  |sapp"./.0. t$="D|
00007ba0  49 52 22 20 8c 20 74 65  24 3d 22 44 69 72 65 63  |IR" . te$="Direc|
00007bb0  74 6f 72 79 20 20 20 20  20 22 3a 73 74 24 3d 22  |tory     ":st$="|
00007bc0  73 64 69 72 22 0d 2f 1c  21 f2 69 6e 64 69 72 28  |sdir"./.!.indir(|
00007bd0  69 69 6e 66 6f 25 2c 31  2c 22 22 2c 22 62 30 3b  |iinfo%,1,"","b0;|
00007be0  22 2b 73 74 24 29 0d 2f  26 17 f2 69 6e 66 6f 28  |"+st$)./&..info(|
00007bf0  69 69 6e 66 6f 25 2c 33  2c 74 65 24 29 0d 2f 30  |iinfo%,3,te$)./0|
00007c00  05 e1 0d 2f 3a 04 0d 2f  44 0f dd f2 73 65 6c 65  |.../:../D...sele|
00007c10  63 74 69 6f 6e 0d 2f 4e  20 6f 6c 64 73 31 3d 73  |ction./N olds1=s|
00007c20  31 3a 6f 6c 64 73 32 3d  73 32 3a 6f 6c 64 69 74  |1:olds2=s2:oldit|
00007c30  65 6d 3d 73 73 0d 2f 58  12 79 63 6f 6f 72 64 3d  |em=ss./X.ycoord=|
00007c40  62 6c 6f 63 6b 21 34 0d  2f 62 2e 21 62 6c 6f 63  |block!4./b.!bloc|
00007c50  6b 3d 6d 61 69 6e 25 3a  c8 99 22 57 69 6d 70 5f  |k=main%:.."Wimp_|
00007c60  47 65 74 57 69 6e 64 6f  77 49 6e 66 6f 22 2c 2c  |GetWindowInfo",,|
00007c70  62 6c 6f 63 6b 0d 2f 6c  1b 77 6f 72 6b 78 25 3d  |block./l.workx%=|
00007c80  62 6c 6f 63 6b 21 34 2d  62 6c 6f 63 6b 21 32 30  |block!4-block!20|
00007c90  0d 2f 76 1c 77 6f 72 6b  79 25 3d 62 6c 6f 63 6b  |./v.worky%=block|
00007ca0  21 31 36 2d 62 6c 6f 63  6b 21 32 34 0d 2f 80 1e  |!16-block!24./..|
00007cb0  79 63 6f 6f 72 64 3d 30  2d 28 62 6c 6f 63 6b 21  |ycoord=0-(block!|
00007cc0  31 36 2d 79 63 6f 6f 72  64 29 0d 2f 8a 1a 79 63  |16-ycoord)./..yc|
00007cd0  6f 6f 72 64 3d 79 63 6f  6f 72 64 2b 62 6c 6f 63  |oord=ycoord+bloc|
00007ce0  6b 21 32 34 0d 2f 94 1d  73 73 3d a8 28 28 79 63  |k!24./..ss=.((yc|
00007cf0  6f 6f 72 64 2d 34 30 29  2f 33 36 29 2a 2d 31 2d  |oord-40)/36)*-1-|
00007d00  33 0d 2f 9e 45 f2 73 65  74 69 63 73 74 61 74 65  |3./.E.seticstate|
00007d10  28 73 61 76 65 25 2c 34  2c 31 3c 3c 32 32 2c 31  |(save%,4,1<<22,1|
00007d20  3c 3c 32 32 29 3a f2 73  65 74 69 63 73 74 61 74  |<<22):.seticstat|
00007d30  65 28 73 61 76 65 25 2c  34 2c 31 3c 3c 32 31 2c  |e(save%,4,1<<21,|
00007d40  30 3c 3c 32 31 29 0d 2f  a8 12 e7 20 6f 6c 64 69  |0<<21)./... oldi|
00007d50  74 65 6d 3d 73 73 20 8c  0d 2f b2 0f 73 31 3d 2d  |tem=ss ../..s1=-|
00007d60  31 3a 73 32 3d 2d 31 0d  2f bc 1a 79 63 6f 6f 72  |1:s2=-1./..ycoor|
00007d70  64 3d 30 2d 28 6f 6c 64  73 31 2a 33 36 2b 34 34  |d=0-(olds1*36+44|
00007d80  29 0d 2f c6 45 c8 99 22  57 69 6d 70 5f 46 6f 72  |)./.E.."Wimp_For|
00007d90  63 65 52 65 64 72 61 77  22 2c 6d 61 69 6e 25 2c  |ceRedraw",main%,|
00007da0  31 2c 79 63 6f 6f 72 64  2d 28 6f 6c 64 73 32 2a  |1,ycoord-(olds2*|
00007db0  33 36 29 2c 74 6c 65 6e  28 73 74 29 2a 31 36 2c  |36),tlen(st)*16,|
00007dc0  79 63 6f 6f 72 64 0d 2f  d0 05 e1 0d 2f da 05 cd  |ycoord./..../...|
00007dd0  0d 2f e4 17 67 61 70 3d  73 32 2d 73 31 3a 67 61  |./..gap=s2-s1:ga|
00007de0  70 3d 67 61 70 2f 32 0d  2f ee 13 e7 20 73 31 3d  |p=gap/2./... s1=|
00007df0  2d 31 20 8c 20 73 31 3d  73 73 0d 2f f8 17 e7 20  |-1 . s1=ss./... |
00007e00  73 73 3e 73 31 2b 67 61  70 20 8c 20 73 32 3d 73  |ss>s1+gap . s2=s|
00007e10  73 0d 30 02 13 e7 20 73  73 3c 73 31 20 8c 20 73  |s.0... ss<s1 . s|
00007e20  31 3d 73 73 0d 30 0c 17  e7 20 73 73 3c 73 31 2b  |1=ss.0... ss<s1+|
00007e30  67 61 70 20 8c 20 73 31  3d 73 73 0d 30 16 17 e7  |gap . s1=ss.0...|
00007e40  20 73 73 3d 73 31 2b 67  61 70 20 8c 20 73 32 3d  | ss=s1+gap . s2=|
00007e50  73 73 0d 30 20 27 e7 20  73 31 3e 73 32 20 80 20  |ss.0 '. s1>s2 . |
00007e60  73 32 3e 2d 31 20 8c 20  73 63 3d 73 32 3a 73 31  |s2>-1 . sc=s2:s1|
00007e70  3d 73 32 3a 73 32 3d 73  63 0d 30 2a 36 e7 20 73  |=s2:s2=sc.0*6. s|
00007e80  31 3e 2d 31 20 80 20 73  32 3e 2d 31 20 8c 20 f2  |1>-1 . s2>-1 . .|
00007e90  73 65 74 69 63 73 74 61  74 65 28 73 61 76 65 25  |seticstate(save%|
00007ea0  2c 34 2c 31 3c 3c 32 32  2c 30 3c 3c 32 32 29 0d  |,4,1<<22,0<<22).|
00007eb0  30 34 1a 79 63 6f 6f 72  64 3d 30 2d 28 6f 6c 64  |04.ycoord=0-(old|
00007ec0  73 31 2a 33 36 2b 34 34  29 0d 30 3e 45 c8 99 22  |s1*36+44).0>E.."|
00007ed0  57 69 6d 70 5f 46 6f 72  63 65 52 65 64 72 61 77  |Wimp_ForceRedraw|
00007ee0  22 2c 6d 61 69 6e 25 2c  31 2c 79 63 6f 6f 72 64  |",main%,1,ycoord|
00007ef0  2d 28 6f 6c 64 73 32 2a  33 36 29 2c 74 6c 65 6e  |-(olds2*36),tlen|
00007f00  28 73 74 29 2a 31 36 2c  79 63 6f 6f 72 64 0d 30  |(st)*16,ycoord.0|
00007f10  48 17 79 63 6f 6f 72 64  3d 30 2d 28 73 31 2a 33  |H.ycoord=0-(s1*3|
00007f20  36 2b 34 34 29 0d 30 52  42 c8 99 22 57 69 6d 70  |6+44).0RB.."Wimp|
00007f30  5f 46 6f 72 63 65 52 65  64 72 61 77 22 2c 6d 61  |_ForceRedraw",ma|
00007f40  69 6e 25 2c 31 2c 79 63  6f 6f 72 64 2d 28 73 32  |in%,1,ycoord-(s2|
00007f50  2a 33 36 29 2c 74 6c 65  6e 28 73 74 29 2a 31 36  |*36),tlen(st)*16|
00007f60  2c 79 63 6f 6f 72 64 0d  30 5c 05 e1 0d 30 66 04  |,ycoord.0\...0f.|
00007f70  0d 30 70 25 dd f2 69 6e  64 69 72 28 68 61 6e 64  |.0p%..indir(hand|
00007f80  6c 65 2c 69 63 6f 6e 2c  74 65 78 74 24 2c 69 6e  |le,icon,text$,in|
00007f90  64 69 72 24 29 0d 30 7a  3b 21 62 6c 6f 63 6b 3d  |dir$).0z;!block=|
00007fa0  68 61 6e 64 6c 65 3a 62  6c 6f 63 6b 21 34 3d 69  |handle:block!4=i|
00007fb0  63 6f 6e 3a c8 99 22 57  69 6d 70 5f 47 65 74 49  |con:.."Wimp_GetI|
00007fc0  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6f 63 6b  |conState",,block|
00007fd0  0d 30 84 3d 24 28 62 6c  6f 63 6b 21 32 38 29 3d  |.0.=$(block!28)=|
00007fe0  74 65 78 74 24 3a 24 28  62 6c 6f 63 6b 21 33 32  |text$:$(block!32|
00007ff0  29 3d 69 6e 64 69 72 24  3a 62 6c 6f 63 6b 21 33  |)=indir$:block!3|
00008000  36 3d a9 28 69 6e 64 69  72 24 29 2b 31 0d 30 8e  |6=.(indir$)+1.0.|
00008010  18 62 6c 6f 63 6b 21 38  3d 30 3a 62 6c 6f 63 6b  |.block!8=0:block|
00008020  21 31 32 3d 30 0d 30 98  20 c8 99 22 57 69 6d 70  |!12=0.0. .."Wimp|
00008030  5f 53 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_SetIconState",,|
00008040  62 6c 6f 63 6b 0d 30 a2  05 e1 0d 30 ac 04 0d 30  |block.0....0...0|
00008050  b6 0c dd f2 73 63 72 6f  6c 6c 0d 30 c0 28 70 61  |....scroll.0.(pa|
00008060  67 65 73 69 7a 65 3d a8  28 28 62 6c 6f 63 6b 21  |gesize=.((block!|
00008070  31 36 2d 62 6c 6f 63 6b  21 38 2d 34 30 29 2f 33  |16-block!8-40)/3|
00008080  36 29 0d 30 ca 35 e7 20  62 6c 6f 63 6b 21 33 32  |6).0.5. block!32|
00008090  3d 31 20 8c 20 62 6c 6f  63 6b 21 32 30 3d 62 6c  |=1 . block!20=bl|
000080a0  6f 63 6b 21 32 30 2b 28  74 6c 65 6e 28 73 74 29  |ock!20+(tlen(st)|
000080b0  2a 31 36 29 2f 31 30 0d  30 d4 36 e7 20 62 6c 6f  |*16)/10.0.6. blo|
000080c0  63 6b 21 33 32 3d 2d 31  20 8c 20 62 6c 6f 63 6b  |ck!32=-1 . block|
000080d0  21 32 30 3d 62 6c 6f 63  6b 21 32 30 2d 28 74 6c  |!20=block!20-(tl|
000080e0  65 6e 28 73 74 29 2a 31  36 29 2f 31 30 0d 30 de  |en(st)*16)/10.0.|
000080f0  3c e7 20 62 6c 6f 63 6b  21 33 36 3d 31 20 8c 20  |<. block!36=1 . |
00008100  74 6f 70 6e 6f 3d a8 28  62 6c 6f 63 6b 21 32 34  |topno=.(block!24|
00008110  2f 33 36 29 3a 62 6c 6f  63 6b 21 32 34 3d 74 6f  |/36):block!24=to|
00008120  70 6e 6f 2a 33 36 2b 33  36 0d 30 e8 81 e7 20 62  |pno*36+36.0... b|
00008130  6c 6f 63 6b 21 33 36 3d  2d 31 20 8c 20 79 63 6f  |lock!36=-1 . yco|
00008140  6f 72 64 3d 30 2d 28 62  6c 6f 63 6b 21 31 36 2d  |ord=0-(block!16-|
00008150  62 6c 6f 63 6b 21 38 29  2b 62 6c 6f 63 6b 21 32  |block!8)+block!2|
00008160  34 3a 62 6f 74 6e 6f 3d  a8 28 28 79 63 6f 6f 72  |4:botno=.((ycoor|
00008170  64 2d 34 30 29 2f 33 36  29 2a 2d 31 2d 33 3a 62  |d-40)/36)*-1-3:b|
00008180  6f 74 6e 6f 3d 62 6f 74  6e 6f 2a 33 36 2b 33 36  |otno=botno*36+36|
00008190  2b 34 30 3a 62 6c 6f 63  6b 21 32 34 2d 3d 79 63  |+40:block!24-=yc|
000081a0  6f 6f 72 64 2b 62 6f 74  6e 6f 0d 30 f2 34 e7 20  |oord+botno.0.4. |
000081b0  62 6c 6f 63 6b 21 33 32  3d 32 20 8c 20 62 6c 6f  |block!32=2 . blo|
000081c0  63 6b 21 32 30 3d 62 6c  6f 63 6b 21 32 30 2b 28  |ck!20=block!20+(|
000081d0  74 6c 65 6e 28 73 74 29  2a 31 36 29 2f 35 0d 30  |tlen(st)*16)/5.0|
000081e0  fc 35 e7 20 62 6c 6f 63  6b 21 33 32 3d 2d 32 20  |.5. block!32=-2 |
000081f0  8c 20 62 6c 6f 63 6b 21  32 30 3d 62 6c 6f 63 6b  |. block!20=block|
00008200  21 32 30 2d 28 74 6c 65  6e 28 73 74 29 2a 31 36  |!20-(tlen(st)*16|
00008210  29 2f 35 0d 31 06 49 e7  20 62 6c 6f 63 6b 21 33  |)/5.1.I. block!3|
00008220  36 3d 32 20 8c 20 74 6f  70 6e 6f 3d a8 28 62 6c  |6=2 . topno=.(bl|
00008230  6f 63 6b 21 32 34 2f 33  36 29 2a 2d 31 3a 62 6c  |ock!24/36)*-1:bl|
00008240  6f 63 6b 21 32 34 3d 30  2d 28 74 6f 70 6e 6f 2d  |ock!24=0-(topno-|
00008250  70 61 67 65 73 69 7a 65  29 2a 33 36 0d 31 10 90  |pagesize)*36.1..|
00008260  e7 20 62 6c 6f 63 6b 21  33 36 3d 2d 32 20 8c 20  |. block!36=-2 . |
00008270  79 63 6f 6f 72 64 3d 28  30 2d 28 62 6c 6f 63 6b  |ycoord=(0-(block|
00008280  21 31 36 2d 62 6c 6f 63  6b 21 38 29 29 2b 62 6c  |!16-block!8))+bl|
00008290  6f 63 6b 21 32 34 3a 62  6f 74 6e 6f 3d a8 28 28  |ock!24:botno=.((|
000082a0  79 63 6f 6f 72 64 2d 34  30 29 2f 33 36 29 2a 2d  |ycoord-40)/36)*-|
000082b0  31 2d 33 3a 62 6f 74 6e  6f 3d 28 62 6f 74 6e 6f  |1-3:botno=(botno|
000082c0  2b 70 61 67 65 73 69 7a  65 2d 31 29 2a 33 36 2b  |+pagesize-1)*36+|
000082d0  33 36 2b 34 30 3a 62 6c  6f 63 6b 21 32 34 2d 3d  |36+40:block!24-=|
000082e0  79 63 6f 6f 72 64 2b 62  6f 74 6e 6f 0d 31 1a 1e  |ycoord+botno.1..|
000082f0  c8 99 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |.."Wimp_OpenWind|
00008300  6f 77 22 2c 2c 62 6c 6f  63 6b 0d 31 24 05 e1 0d  |ow",,block.1$...|
00008310  31 2e 04 0d 31 38 10 dd  f2 64 65 6c 65 74 65 28  |1...18...delete(|
00008320  6e 6f 29 0d 31 42 0b 64  6f 6e 65 3d 2d 31 0d 31  |no).1B.done=-1.1|
00008330  4c 0d e7 20 6e 6f 3d 63  74 20 8c 0d 31 56 20 c8  |L.. no=ct ..1V .|
00008340  99 22 4f 53 5f 48 65 61  70 22 2c 33 2c 68 65 61  |."OS_Heap",3,hea|
00008350  70 25 2c 74 72 65 65 28  63 74 29 0d 31 60 29 c8  |p%,tree(ct).1`).|
00008360  99 22 4f 53 5f 48 65 61  70 22 2c 31 2c 68 65 61  |."OS_Heap",1,hea|
00008370  70 25 20 b8 20 2c 2c 6c  61 72 67 65 73 74 2c 74  |p% . ,,largest,t|
00008380  66 72 65 65 0d 31 6a 29  c8 99 22 4f 53 5f 48 65  |free.1j).."OS_He|
00008390  61 70 22 2c 35 2c 68 65  61 70 25 2c 2c 30 2d 28  |ap",5,heap%,,0-(|
000083a0  6c 61 72 67 65 73 74 2d  31 30 32 34 29 0d 31 74  |largest-1024).1t|
000083b0  20 68 73 69 7a 65 62 3d  68 73 69 7a 65 62 2d 28  | hsizeb=hsizeb-(|
000083c0  6c 61 72 67 65 73 74 2d  31 30 32 34 29 0d 31 7e  |largest-1024).1~|
000083d0  09 63 74 2d 3d 31 0d 31  88 0a 64 6f 6e 65 3d 31  |.ct-=1.1..done=1|
000083e0  0d 31 92 05 cd 0d 31 9c  18 e7 20 6e 6f 3c 3e 63  |.1....1... no<>c|
000083f0  74 20 80 20 64 6f 6e 65  3d 2d 31 20 8c 0d 31 a6  |t . done=-1 ..1.|
00008400  0f e3 20 6a 3d 6e 6f 20  b8 20 63 74 0d 31 b0 1f  |.. j=no . ct.1..|
00008410  c8 99 22 4f 53 5f 48 65  61 70 22 2c 33 2c 68 65  |.."OS_Heap",3,he|
00008420  61 70 25 2c 74 72 65 65  28 6a 29 0d 31 ba 05 ed  |ap%,tree(j).1...|
00008430  0d 31 c4 11 e3 20 6a 3d  6e 6f 20 b8 20 63 74 2d  |.1... j=no . ct-|
00008440  31 0d 31 ce 2f c8 99 22  4f 53 5f 48 65 61 70 22  |1.1./.."OS_Heap"|
00008450  2c 32 2c 68 65 61 70 25  2c 2c 74 73 69 7a 65 28  |,2,heap%,,tsize(|
00008460  6a 2b 31 29 20 b8 20 2c  2c 74 72 65 65 28 6a 29  |j+1) . ,,tree(j)|
00008470  0d 31 d8 1b 20 e3 20 49  3d 30 20 b8 20 74 73 69  |.1.. . I=0 . tsi|
00008480  7a 65 28 6a 2b 31 29 20  88 20 34 0d 31 e2 1a 20  |ze(j+1) . 4.1.. |
00008490  74 72 65 65 28 6a 29 21  49 3d 74 72 65 65 28 6a  |tree(j)!I=tree(j|
000084a0  2b 31 29 21 49 0d 31 ec  08 20 ed 20 49 0d 31 f6  |+1)!I.1.. . I.1.|
000084b0  2d 74 73 69 7a 65 28 6a  29 3d 74 73 69 7a 65 28  |-tsize(j)=tsize(|
000084c0  6a 2b 31 29 3a 74 63 6f  75 6e 74 28 6a 29 3d 74  |j+1):tcount(j)=t|
000084d0  63 6f 75 6e 74 28 6a 2b  31 29 0d 32 00 2b 74 6c  |count(j+1).2.+tl|
000084e0  65 6e 28 6a 29 3d 74 6c  65 6e 28 6a 2b 31 29 3a  |en(j)=tlen(j+1):|
000084f0  74 72 6f 6f 74 24 28 6a  29 3d 74 72 6f 6f 74 24  |troot$(j)=troot$|
00008500  28 6a 2b 31 29 0d 32 0a  07 ed 20 6a 0d 32 14 09  |(j+1).2... j.2..|
00008510  63 74 2d 3d 31 0d 32 1e  29 c8 99 22 4f 53 5f 48  |ct-=1.2.).."OS_H|
00008520  65 61 70 22 2c 31 2c 68  65 61 70 25 20 b8 20 2c  |eap",1,heap% . ,|
00008530  2c 6c 61 72 67 65 73 74  2c 74 66 72 65 65 0d 32  |,largest,tfree.2|
00008540  28 29 c8 99 22 4f 53 5f  48 65 61 70 22 2c 35 2c  |().."OS_Heap",5,|
00008550  68 65 61 70 25 2c 2c 30  2d 28 6c 61 72 67 65 73  |heap%,,0-(larges|
00008560  74 2d 31 30 32 34 29 0d  32 32 20 68 73 69 7a 65  |t-1024).22 hsize|
00008570  62 3d 68 73 69 7a 65 62  2d 28 6c 61 72 67 65 73  |b=hsizeb-(larges|
00008580  74 2d 31 30 32 34 29 0d  32 3c 05 cd 0d 32 46 20  |t-1024).2<...2F |
00008590  c8 99 22 4f 53 5f 52 65  61 64 4d 65 6d 4d 61 70  |.."OS_ReadMemMap|
000085a0  49 6e 66 6f 22 20 b8 20  70 61 67 65 0d 32 50 25  |Info" . page.2P%|
000085b0  c8 99 22 57 69 6d 70 5f  53 6c 6f 74 53 69 7a 65  |.."Wimp_SlotSize|
000085c0  22 2c 2d 31 2c 2d 31 20  b8 20 63 75 72 72 65 6e  |",-1,-1 . curren|
000085d0  74 0d 32 5a 14 e7 20 6c  61 72 67 65 73 74 3e 70  |t.2Z.. largest>p|
000085e0  61 67 65 20 8c 0d 32 64  26 61 6d 6f 75 6e 74 3d  |age ..2d&amount=|
000085f0  a8 28 28 6c 61 72 67 65  73 74 2d 31 30 32 34 29  |.((largest-1024)|
00008600  2f 70 61 67 65 29 2a 70  61 67 65 0d 32 6e 3e e7  |/page)*page.2n>.|
00008610  20 63 75 72 72 65 6e 74  2d 61 6d 6f 75 6e 74 3c  | current-amount<|
00008620  3d 6f 72 69 67 61 70 70  73 69 7a 65 20 8c 20 61  |=origappsize . a|
00008630  6d 6f 75 6e 74 3d 63 75  72 72 65 6e 74 2d 6f 72  |mount=current-or|
00008640  69 67 61 70 70 73 69 7a  65 0d 32 78 27 c8 99 22  |igappsize.2x'.."|
00008650  57 69 6d 70 5f 53 6c 6f  74 53 69 7a 65 22 2c 63  |Wimp_SlotSize",c|
00008660  75 72 72 65 6e 74 2d 61  6d 6f 75 6e 74 2c 2d 31  |urrent-amount,-1|
00008670  0d 32 82 05 cd 0d 32 8c  19 e7 20 63 74 3d 2d 31  |.2....2... ct=-1|
00008680  20 8c 20 f2 63 6c 65 61  72 61 6c 6c 3a e1 0d 32  | . .clearall:..2|
00008690  96 14 e7 20 73 74 3e 3d  6e 6f 20 8c 20 73 74 2d  |... st>=no . st-|
000086a0  3d 31 0d 32 a0 12 e7 20  73 74 3d 2d 31 20 8c 20  |=1.2... st=-1 . |
000086b0  73 74 3d 30 0d 32 aa 1b  f2 69 6e 66 6f 28 66 69  |st=0.2...info(fi|
000086c0  6e 66 6f 25 2c 31 2c c3  28 63 74 2b 31 29 29 0d  |nfo%,1,.(ct+1)).|
000086d0  32 b4 23 f2 69 6e 66 6f  28 66 69 6e 66 6f 25 2c  |2.#.info(finfo%,|
000086e0  32 2c c3 28 68 73 69 7a  65 62 2d 74 66 72 65 65  |2,.(hsizeb-tfree|
000086f0  29 29 0d 32 be 0f e7 20  73 61 76 65 64 3d a3 20  |)).2... saved=. |
00008700  8c 0d 32 c8 19 f2 69 6e  66 6f 28 66 69 6e 66 6f  |..2...info(finfo|
00008710  25 2c 33 2c 22 59 65 73  22 29 0d 32 d2 0b 73 61  |%,3,"Yes").2..sa|
00008720  76 65 64 3d b9 0d 32 dc  10 21 69 63 6f 6e 64 3d  |ved=..2..!icond=|
00008730  6d 61 69 6e 25 0d 32 e6  21 c8 99 22 57 69 6d 70  |main%.2.!.."Wimp|
00008740  5f 47 65 74 57 69 6e 64  6f 77 49 6e 66 6f 22 2c  |_GetWindowInfo",|
00008750  2c 69 63 6f 6e 64 0d 32  f0 20 24 28 69 63 6f 6e  |,icond.2. $(icon|
00008760  64 21 37 36 29 3d 24 28  69 63 6f 6e 64 21 37 36  |d!76)=$(icond!76|
00008770  29 2b 22 20 2a 22 0d 32  fa 46 c8 99 22 57 69 6d  |)+" *".2.F.."Wim|
00008780  70 5f 46 6f 72 63 65 52  65 64 72 61 77 22 2c 2d  |p_ForceRedraw",-|
00008790  31 2c 62 6c 6f 63 6b 21  34 2c 28 62 6c 6f 63 6b  |1,block!4,(block|
000087a0  21 31 36 29 2d 33 32 2c  62 6c 6f 63 6b 21 31 32  |!16)-32,block!12|
000087b0  2c 62 6c 6f 63 6b 21 31  36 2b 33 36 0d 33 04 05  |,block!16+36.3..|
000087c0  cd 0d 33 0e 2c 21 62 6c  6f 63 6b 3d 6d 61 69 6e  |..3.,!block=main|
000087d0  25 3a c8 99 22 57 69 6d  70 5f 43 6c 6f 73 65 57  |%:.."Wimp_CloseW|
000087e0  69 6e 64 6f 77 22 2c 2c  62 6c 6f 63 6b 0d 33 18  |indow",,block.3.|
000087f0  0f 61 72 63 6c 69 73 74  65 64 3d a3 0d 33 22 22  |.arclisted=..3""|
00008800  f2 6e 65 77 76 69 65 77  3a f2 6f 70 65 6e 77 69  |.newview:.openwi|
00008810  6e 28 6d 61 69 6e 25 29  3a f2 70 61 6e 65 0d 33  |n(main%):.pane.3|
00008820  2c 05 e1 0d 33 36 04 0d  33 40 0e dd f2 63 6c 65  |,...36..3@...cle|
00008830  61 72 61 6c 6c 0d 33 4a  0d e7 20 63 74 3e 2d 31  |arall.3J.. ct>-1|
00008840  20 8c 0d 33 54 0e e3 20  49 3d 30 20 b8 20 63 74  | ..3T.. I=0 . ct|
00008850  0d 33 5e 1f c8 99 22 4f  53 5f 48 65 61 70 22 2c  |.3^..."OS_Heap",|
00008860  33 2c 68 65 61 70 25 2c  74 72 65 65 28 49 29 0d  |3,heap%,tree(I).|
00008870  33 68 05 ed 0d 33 72 29  c8 99 22 4f 53 5f 48 65  |3h...3r).."OS_He|
00008880  61 70 22 2c 31 2c 68 65  61 70 25 20 b8 20 2c 2c  |ap",1,heap% . ,,|
00008890  6c 61 72 67 65 73 74 2c  74 66 72 65 65 0d 33 7c  |largest,tfree.3||
000088a0  29 c8 99 22 4f 53 5f 48  65 61 70 22 2c 35 2c 68  |).."OS_Heap",5,h|
000088b0  65 61 70 25 2c 2c 30 2d  28 6c 61 72 67 65 73 74  |eap%,,0-(largest|
000088c0  2d 31 30 32 34 29 0d 33  86 1d c8 99 22 57 69 6d  |-1024).3...."Wim|
000088d0  70 5f 53 6c 6f 74 53 69  7a 65 22 2c 6f 72 69 67  |p_SlotSize",orig|
000088e0  2c 2d 31 0d 33 90 05 cd  0d 33 9a 29 c8 99 22 4f  |,-1.3....3.).."O|
000088f0  53 5f 48 65 61 70 22 2c  31 2c 68 65 61 70 25 20  |S_Heap",1,heap% |
00008900  b8 20 2c 2c 6c 61 72 67  65 73 74 2c 74 66 72 65  |. ,,largest,tfre|
00008910  65 0d 33 a4 12 68 73 69  7a 65 62 3d 6c 61 72 67  |e.3..hsizeb=larg|
00008920  65 73 74 0d 33 ae 09 63  74 3d 2d 31 0d 33 b8 2e  |est.3..ct=-1.3..|
00008930  21 62 6c 6f 63 6b 3d 6d  61 69 6e 25 3a c8 99 22  |!block=main%:.."|
00008940  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 49 6e  |Wimp_GetWindowIn|
00008950  66 6f 22 2c 2c 62 6c 6f  63 6b 0d 33 c2 1c 24 28  |fo",,block.3..$(|
00008960  62 6c 6f 63 6b 21 37 36  29 3d 22 3c 55 6e 74 69  |block!76)="<Unti|
00008970  74 6c 65 64 3e 22 0d 33  cc 1f c8 99 22 57 69 6d  |tled>".3...."Wim|
00008980  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
00008990  62 6c 6f 63 6b 0d 33 d6  1a f2 69 6e 66 6f 28 66  |block.3...info(f|
000089a0  69 6e 66 6f 25 2c 30 2c  22 4e 6f 6e 65 22 29 0d  |info%,0,"None").|
000089b0  33 e0 17 f2 69 6e 66 6f  28 66 69 6e 66 6f 25 2c  |3...info(finfo%,|
000089c0  31 2c 22 30 22 29 0d 33  ea 17 f2 69 6e 66 6f 28  |1,"0").3...info(|
000089d0  66 69 6e 66 6f 25 2c 32  2c 22 30 22 29 0d 33 f4  |finfo%,2,"0").3.|
000089e0  18 f2 69 6e 66 6f 28 66  69 6e 66 6f 25 2c 33 2c  |..info(finfo%,3,|
000089f0  22 4e 6f 22 29 0d 33 fe  0b 73 61 76 65 64 3d a3  |"No").3..saved=.|
00008a00  0d 34 08 2b 21 62 6c 6f  63 6b 3d 6e 65 77 25 3a  |.4.+!block=new%:|
00008a10  c8 99 22 57 69 6d 70 5f  43 6c 6f 73 65 57 69 6e  |.."Wimp_CloseWin|
00008a20  64 6f 77 22 2c 2c 62 6c  6f 63 6b 0d 34 12 2d 21  |dow",,block.4.-!|
00008a30  62 6c 6f 63 6b 3d 74 69  6e 66 6f 25 3a c8 99 22  |block=tinfo%:.."|
00008a40  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00008a50  22 2c 2c 62 6c 6f 63 6b  0d 34 1c 2d 21 62 6c 6f  |",,block.4.-!blo|
00008a60  63 6b 3d 66 69 6e 66 6f  25 3a c8 99 22 57 69 6d  |ck=finfo%:.."Wim|
00008a70  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
00008a80  62 6c 6f 63 6b 0d 34 26  2d 21 62 6c 6f 63 6b 3d  |block.4&-!block=|
00008a90  69 69 6e 66 6f 25 3a c8  99 22 57 69 6d 70 5f 43  |iinfo%:.."Wimp_C|
00008aa0  6c 6f 73 65 57 69 6e 64  6f 77 22 2c 2c 62 6c 6f  |loseWindow",,blo|
00008ab0  63 6b 0d 34 30 2b 21 62  6c 6f 63 6b 3d 62 61 72  |ck.40+!block=bar|
00008ac0  25 3a c8 99 22 57 69 6d  70 5f 43 6c 6f 73 65 57  |%:.."Wimp_CloseW|
00008ad0  69 6e 64 6f 77 22 2c 2c  62 6c 6f 63 6b 0d 34 3a  |indow",,block.4:|
00008ae0  2f 21 62 6c 6f 63 6b 3d  74 6f 6f 6c 62 6f 78 25  |/!block=toolbox%|
00008af0  3a c8 99 22 57 69 6d 70  5f 43 6c 6f 73 65 57 69  |:.."Wimp_CloseWi|
00008b00  6e 64 6f 77 22 2c 2c 62  6c 6f 63 6b 0d 34 44 08  |ndow",,block.4D.|
00008b10  73 74 3d 30 0d 34 4e 0f  61 72 63 6c 69 73 74 65  |st=0.4N.arcliste|
00008b20  64 3d a3 0d 34 58 05 e1  0d 34 62 04 0d 34 6c 12  |d=..4X...4b..4l.|
00008b30  dd f2 6f 70 65 6e 74 72  65 65 28 6e 6f 29 0d 34  |..opentree(no).4|
00008b40  76 09 73 74 3d 6e 6f 0d  34 80 0c f2 6e 65 77 76  |v.st=no.4...newv|
00008b50  69 65 77 0d 34 8a 2c 21  62 6c 6f 63 6b 3d 6d 61  |iew.4.,!block=ma|
00008b60  69 6e 25 3a c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |in%:.."Wimp_Clos|
00008b70  65 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 0d  |eWindow",,block.|
00008b80  34 94 19 f2 6f 70 65 6e  77 69 6e 28 6d 61 69 6e  |4...openwin(main|
00008b90  25 29 3a f2 70 61 6e 65  0d 34 9e 05 e1 0d 34 a8  |%):.pane.4....4.|
00008ba0  04 0d 34 b2 11 dd f2 6f  70 65 6e 61 72 63 28 6e  |..4....openarc(n|
00008bb0  6f 29 0d 34 bc 11 75 73  65 24 3d 61 72 63 24 28  |o).4..use$=arc$(|
00008bc0  6e 6f 29 0d 34 c6 1a 73  74 72 24 3d c0 75 73 65  |no).4..str$=.use|
00008bd0  24 2c a7 75 73 65 24 2c  22 2c 22 29 29 0d 34 d0  |$,.use$,",")).4.|
00008be0  23 6e 75 6d 62 24 3d c2  75 73 65 24 2c a9 28 75  |#numb$=.use$,.(u|
00008bf0  73 65 24 29 2d a7 75 73  65 24 2c 22 2c 22 29 29  |se$)-.use$,","))|
00008c00  0d 34 da 1e 6f 63 74 24  3d c0 6e 75 6d 62 24 2c  |.4..oct$=.numb$,|
00008c10  a7 6e 75 6d 62 24 2c 22  2c 22 29 2d 31 29 0d 34  |.numb$,",")-1).4|
00008c20  e4 1d 78 24 3d c2 6e 75  6d 62 24 2c a9 6e 75 6d  |..x$=.numb$,.num|
00008c30  62 24 2d a9 6f 63 74 24  2d 31 29 0d 34 ee 0c 6f  |b$-.oct$-1).4..o|
00008c40  72 69 67 74 3d 73 74 0d  34 f8 0c 73 74 3d bb 28  |rigt=st.4..st=.(|
00008c50  78 24 29 0d 35 02 14 f2  67 6f 74 6f 28 bb 28 6f  |x$).5...goto(.(o|
00008c60  63 74 24 29 2d 31 29 0d  35 0c 05 e1 0d 35 16 04  |ct$)-1).5....5..|
00008c70  0d 35 20 0f dd f2 67 6f  74 6f 28 69 6e 6f 29 0d  |.5 ...goto(ino).|
00008c80  35 2a 1c f2 69 6e 66 6f  28 62 61 72 25 2c 30 2c  |5*..info(bar%,0,|
00008c90  74 72 6f 6f 74 24 28 73  74 29 29 0d 35 34 18 74  |troot$(st)).54.t|
00008ca0  70 74 72 3d 74 63 6f 75  6e 74 28 73 74 29 2a 32  |ptr=tcount(st)*2|
00008cb0  34 2b 31 0d 35 3e 0d 73  69 7a 65 62 24 3d 22 22  |4+1.5>.sizeb$=""|
00008cc0  0d 35 48 05 f5 0d 35 52  24 20 20 73 69 7a 65 62  |.5H...5R$  sizeb|
00008cd0  24 3d 73 69 7a 65 62 24  2b bd 28 74 72 65 65 28  |$=sizeb$+.(tree(|
00008ce0  73 74 29 3f 74 70 74 72  29 0d 35 5c 0d 20 20 74  |st)?tptr).5\.  t|
00008cf0  70 74 72 2b 3d 31 0d 35  66 16 fd 20 74 72 65 65  |ptr+=1.5f.. tree|
00008d00  28 73 74 29 3f 74 70 74  72 3d 31 38 0d 35 70 0b  |(st)?tptr=18.5p.|
00008d10  74 70 74 72 2b 3d 31 0d  35 7a 0f 66 69 6e 69 73  |tptr+=1.5z.finis|
00008d20  68 73 24 3d 22 22 0d 35  84 05 f5 0d 35 8e 28 20  |hs$="".5....5.( |
00008d30  20 66 69 6e 69 73 68 73  24 3d 66 69 6e 69 73 68  | finishs$=finish|
00008d40  73 24 2b bd 28 74 72 65  65 28 73 74 29 3f 74 70  |s$+.(tree(st)?tp|
00008d50  74 72 29 0d 35 98 0d 20  20 74 70 74 72 2b 3d 31  |tr).5..  tptr+=1|
00008d60  0d 35 a2 17 fd 20 74 72  65 65 28 73 74 29 3f 74  |.5... tree(st)?t|
00008d70  70 74 72 3d 32 35 35 0d  35 ac 1e f2 69 6e 66 6f  |ptr=255.5...info|
00008d80  28 74 69 6e 66 6f 25 2c  30 2c 74 72 6f 6f 74 24  |(tinfo%,0,troot$|
00008d90  28 73 74 29 29 0d 35 b6  1f f2 69 6e 66 6f 28 74  |(st)).5...info(t|
00008da0  69 6e 66 6f 25 2c 31 2c  c3 74 63 6f 75 6e 74 28  |info%,1,.tcount(|
00008db0  73 74 29 29 0d 35 c0 1e  f2 69 6e 66 6f 28 74 69  |st)).5...info(ti|
00008dc0  6e 66 6f 25 2c 32 2c c3  74 73 69 7a 65 28 73 74  |nfo%,2,.tsize(st|
00008dd0  29 29 0d 35 ca 1a f2 69  6e 66 6f 28 74 69 6e 66  |)).5...info(tinf|
00008de0  6f 25 2c 33 2c 73 69 7a  65 62 24 29 0d 35 d4 1c  |o%,3,sizeb$).5..|
00008df0  f2 69 6e 66 6f 28 74 69  6e 66 6f 25 2c 37 2c 66  |.info(tinfo%,7,f|
00008e00  69 6e 69 73 68 73 24 29  0d 35 de 28 e7 20 75 70  |inishs$).5.(. up|
00008e10  74 6f 74 3e 2d 31 20 80  20 75 70 74 6f 74 3c 3e  |tot>-1 . uptot<>|
00008e20  6f 72 69 67 74 20 8c 20  f2 6e 65 77 76 69 65 77  |origt . .newview|
00008e30  0d 35 e8 2c 21 62 6c 6f  63 6b 3d 6d 61 69 6e 25  |.5.,!block=main%|
00008e40  3a c8 99 22 57 69 6d 70  5f 43 6c 6f 73 65 57 69  |:.."Wimp_CloseWi|
00008e50  6e 64 6f 77 22 2c 2c 62  6c 6f 63 6b 0d 35 f2 19  |ndow",,block.5..|
00008e60  f2 6f 70 65 6e 77 69 6e  28 6d 61 69 6e 25 29 3a  |.openwin(main%):|
00008e70  f2 70 61 6e 65 0d 35 fc  2e 21 62 6c 6f 63 6b 3d  |.pane.5..!block=|
00008e80  6d 61 69 6e 25 3a c8 99  22 57 69 6d 70 5f 47 65  |main%:.."Wimp_Ge|
00008e90  74 57 69 6e 64 6f 77 49  6e 66 6f 22 2c 2c 62 6c  |tWindowInfo",,bl|
00008ea0  6f 63 6b 0d 36 06 1b 77  6f 72 6b 78 25 3d 62 6c  |ock.6..workx%=bl|
00008eb0  6f 63 6b 21 34 2d 62 6c  6f 63 6b 21 32 30 0d 36  |ock!4-block!20.6|
00008ec0  10 1c 77 6f 72 6b 79 25  3d 62 6c 6f 63 6b 21 31  |..worky%=block!1|
00008ed0  36 2d 62 6c 6f 63 6b 21  32 34 0d 36 1a 1b 79 63  |6-block!24.6..yc|
00008ee0  6f 6f 72 64 3d 30 2d 28  69 74 65 6d 6e 6f 2a 33  |oord=0-(itemno*3|
00008ef0  36 2b 34 34 29 0d 36 24  0e 69 74 65 6d 6e 6f 3d  |6+44).6$.itemno=|
00008f00  69 6e 6f 0d 36 2e 21 62  6c 6f 63 6b 21 32 34 3d  |ino.6.!block!24=|
00008f10  30 2d 28 28 69 74 65 6d  6e 6f 2d 32 29 2a 33 36  |0-((itemno-2)*36|
00008f20  2b 34 34 29 0d 36 38 1e  c8 99 22 57 69 6d 70 5f  |+44).68..."Wimp_|
00008f30  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 62 6c 6f  |OpenWindow",,blo|
00008f40  63 6b 0d 36 42 3d c8 99  22 57 69 6d 70 5f 46 6f  |ck.6B=.."Wimp_Fo|
00008f50  72 63 65 52 65 64 72 61  77 22 2c 6d 61 69 6e 25  |rceRedraw",main%|
00008f60  2c 31 2c 79 63 6f 6f 72  64 2d 33 32 2c 74 6c 65  |,1,ycoord-32,tle|
00008f70  6e 28 73 74 29 2a 31 36  2c 79 63 6f 6f 72 64 0d  |n(st)*16,ycoord.|
00008f80  36 4c 05 e1 0d 36 56 04  0d 36 60 0a dd f2 66 69  |6L...6V..6`...fi|
00008f90  6e 64 0d 36 6a 11 f2 63  6c 6f 73 65 28 66 69 6e  |nd.6j..close(fin|
00008fa0  64 25 29 0d 36 74 12 f2  63 6c 6f 73 65 28 66 6f  |d%).6t..close(fo|
00008fb0  75 6e 64 25 29 0d 36 7e  24 e7 20 a4 63 68 65 63  |und%).6~$. .chec|
00008fc0  6b 66 6c 61 67 28 66 69  6e 64 25 2c 31 2c 32 31  |kflag(find%,1,21|
00008fd0  29 20 8c 20 6f 70 74 3d  31 0d 36 88 24 e7 20 a4  |) . opt=1.6.$. .|
00008fe0  63 68 65 63 6b 66 6c 61  67 28 66 69 6e 64 25 2c  |checkflag(find%,|
00008ff0  36 2c 32 31 29 20 8c 20  6f 70 74 3d 32 0d 36 92  |6,21) . opt=2.6.|
00009000  24 e7 20 a4 63 68 65 63  6b 66 6c 61 67 28 66 69  |$. .checkflag(fi|
00009010  6e 64 25 2c 39 2c 32 31  29 20 8c 20 6f 70 74 3d  |nd%,9,21) . opt=|
00009020  33 0d 36 9c 0a 66 72 6f  6d 3d 30 0d 36 a6 4a e7  |3.6..from=0.6.J.|
00009030  20 a4 63 68 65 63 6b 66  6c 61 67 28 66 69 6e 64  | .checkflag(find|
00009040  25 2c 31 37 2c 32 31 29  20 8c 20 73 74 74 72 65  |%,17,21) . sttre|
00009050  65 3d 73 74 3a 65 6e 64  74 72 65 65 3d 73 74 20  |e=st:endtree=st |
00009060  8b 20 73 74 74 72 65 65  3d 30 3a 65 6e 64 74 72  |. sttree=0:endtr|
00009070  65 65 3d 63 74 0d 36 b0  42 e7 20 a4 63 68 65 63  |ee=ct.6.B. .chec|
00009080  6b 66 6c 61 67 28 66 69  6e 64 25 2c 34 2c 32 31  |kflag(find%,4,21|
00009090  29 20 80 20 66 72 6f 6d  3e 2d 31 20 8c 20 66 72  |) . from>-1 . fr|
000090a0  6f 6d 3d 69 74 65 6d 6e  6f 3a 73 74 74 72 65 65  |om=itemno:sttree|
000090b0  3d 69 74 65 6d 73 74 0d  36 ba 0c 6f 72 69 67 74  |=itemst.6..origt|
000090c0  3d 73 74 0d 36 c4 0f e7  20 ac 20 66 6f 75 6e 64  |=st.6... . found|
000090d0  20 8c 0d 36 ce 0e 6e 6f  6e 65 66 6e 64 3d 2d 31  | ..6..nonefnd=-1|
000090e0  0d 36 d8 0e 74 6f 74 61  6c 63 6e 74 3d 30 0d 36  |.6..totalcnt=0.6|
000090f0  e2 18 e3 20 6e 3d 73 74  74 72 65 65 20 b8 20 65  |... n=sttree . e|
00009100  6e 64 74 72 65 65 0d 36  ec 17 74 6f 74 61 6c 63  |ndtree.6..totalc|
00009110  6e 74 3d 2b 74 63 6f 75  6e 74 28 6e 29 0d 36 f6  |nt=+tcount(n).6.|
00009120  07 ed 20 6e 0d 37 00 0b  6e 6f 77 6f 6e 3d 30 0d  |.. n.7..nowon=0.|
00009130  37 0a 05 cd 0d 37 14 0c  c8 8e 20 6f 70 74 20 ca  |7....7.... opt .|
00009140  0d 37 1e 08 c9 20 31 3a  0d 37 28 1b 73 65 61 72  |.7... 1:.7(.sear|
00009150  63 68 24 3d 24 a4 69 6e  66 6f 28 66 69 6e 64 25  |ch$=$.info(find%|
00009160  2c 32 29 0d 37 32 20 74  65 78 24 3d 73 65 61 72  |,2).72 tex$=sear|
00009170  63 68 24 3a 74 65 78 32  24 3d 22 4e 61 6d 65 20  |ch$:tex2$="Name |
00009180  3a 2d 22 0d 37 3c 1e 73  65 61 72 63 68 24 3d a4  |:-".7<.search$=.|
00009190  66 75 6c 6c 73 28 73 65  61 72 63 68 24 2c 31 30  |fulls(search$,10|
000091a0  29 0d 37 46 1f 63 61 73  65 3d a4 63 68 65 63 6b  |).7F.case=.check|
000091b0  66 6c 61 67 28 66 69 6e  64 25 2c 33 2c 32 31 29  |flag(find%,3,21)|
000091c0  0d 37 50 25 e7 20 ac 20  63 61 73 65 20 8c 20 73  |.7P%. . case . s|
000091d0  65 61 72 63 68 24 3d a4  63 61 70 73 28 73 65 61  |earch$=.caps(sea|
000091e0  72 63 68 24 29 0d 37 5a  34 e7 20 66 6f 75 6e 64  |rch$).7Z4. found|
000091f0  20 80 20 a4 63 68 65 63  6b 66 6c 61 67 28 66 69  | . .checkflag(fi|
00009200  6e 64 25 2c 31 38 2c 32  31 29 20 8c 20 73 74 74  |nd%,18,21) . stt|
00009210  72 65 65 3d 75 70 74 6f  74 0d 37 64 1d e3 20 6f  |ree=uptot.7d.. o|
00009220  6e 74 72 65 65 3d 73 74  74 72 65 65 20 b8 20 65  |ntree=sttree . e|
00009230  6e 64 74 72 65 65 0d 37  6e 21 e7 20 66 6f 75 6e  |ndtree.7n!. foun|
00009240  64 20 8c 20 66 72 6f 6d  3d 75 70 74 6f 2b 31 3a  |d . from=upto+1:|
00009250  66 6f 75 6e 64 3d a3 0d  37 78 0d 73 74 3d 6f 6e  |found=..7x.st=on|
00009260  74 72 65 65 0d 37 82 0d  6e 3d 66 72 6f 6d 2a 32  |tree.7..n=from*2|
00009270  34 0d 37 8c 14 c8 99 22  48 6f 75 72 67 6c 61 73  |4.7...."Hourglas|
00009280  73 5f 4f 6e 22 0d 37 96  19 e3 20 49 3d 66 72 6f  |s_On".7... I=fro|
00009290  6d 20 b8 20 74 63 6f 75  6e 74 28 73 74 29 0d 37  |m . tcount(st).7|
000092a0  a0 0d 20 6e 6f 77 6f 6e  2b 3d 31 0d 37 aa 0a 20  |.. nowon+=1.7.. |
000092b0  74 24 3d 22 22 0d 37 b4  0f 20 e3 20 68 3d 33 20  |t$="".7.. . h=3 |
000092c0  b8 20 31 32 0d 37 be 0a  20 69 3d 6e 2b 68 0d 37  |. 12.7.. i=n+h.7|
000092d0  c8 16 20 74 24 2b 3d bd  28 74 72 65 65 28 73 74  |.. t$+=.(tree(st|
000092e0  29 3f 69 29 0d 37 d2 08  20 ed 20 68 0d 37 dc 1c  |)?i).7.. . h.7..|
000092f0  20 e7 20 ac 20 63 61 73  65 20 8c 20 74 24 3d a4  | . . case . t$=.|
00009300  63 61 70 73 28 74 24 29  0d 37 e6 5d 20 e7 20 74  |caps(t$).7.] . t|
00009310  24 3d 73 65 61 72 63 68  24 20 8c 20 c8 99 22 48  |$=search$ . .."H|
00009320  6f 75 72 67 6c 61 73 73  5f 53 6d 61 73 68 22 3a  |ourglass_Smash":|
00009330  6e 6f 6e 65 66 6e 64 3d  31 3a 75 70 74 6f 3d 49  |nonefnd=1:upto=I|
00009340  3a 75 70 74 6f 74 3d 6f  6e 74 72 65 65 3a f2 67  |:uptot=ontree:.g|
00009350  6f 74 6f 28 49 29 3a f2  66 6f 75 6e 64 28 49 2c  |oto(I):.found(I,|
00009360  73 74 29 3a e1 0d 37 f0  0a 20 6e 2b 3d 32 34 0d  |st):..7.. n+=24.|
00009370  37 fa 30 20 c8 99 22 48  6f 75 72 67 6c 61 73 73  |7.0 .."Hourglass|
00009380  5f 50 65 72 63 65 6e 74  61 67 65 22 2c 6e 6f 77  |_Percentage",now|
00009390  6f 6e 2f 74 6f 74 61 6c  63 6e 74 2a 31 30 30 0d  |on/totalcnt*100.|
000093a0  38 04 07 ed 20 49 0d 38  0e 11 66 72 6f 6d 3d 30  |8... I.8..from=0|
000093b0  3a 75 70 74 6f 3d 30 0d  38 18 0c ed 20 6f 6e 74  |:upto=0.8... ont|
000093c0  72 65 65 0d 38 22 17 c8  99 22 48 6f 75 72 67 6c  |ree.8"..."Hourgl|
000093d0  61 73 73 5f 53 6d 61 73  68 22 0d 38 2c 05 cd 0d  |ass_Smash".8,...|
000093e0  38 36 08 c9 20 32 3a 0d  38 40 1b 53 65 61 72 63  |86.. 2:.8@.Searc|
000093f0  68 24 3d 24 a4 69 6e 66  6f 28 66 69 6e 64 25 2c  |h$=$.info(find%,|
00009400  37 29 0d 38 4a 17 e7 20  c0 53 65 61 72 63 68 24  |7).8J.. .Search$|
00009410  2c 31 29 3d 22 26 22 20  8c 0d 38 54 13 73 65 61  |,1)="&" ..8T.sea|
00009420  72 63 68 24 3d 53 65 61  72 63 68 24 0d 38 5e 22  |rch$=Search$.8^"|
00009430  73 65 61 72 63 68 24 3d  c2 73 65 61 72 63 68 24  |search$=.search$|
00009440  2c a9 28 73 65 61 72 63  68 24 29 2d 31 29 0d 38  |,.(search$)-1).8|
00009450  68 26 e7 20 a9 73 65 61  72 63 68 24 3e 33 20 8c  |h&. .search$>3 .|
00009460  20 73 65 61 72 63 68 24  3d c0 73 65 61 72 63 68  | search$=.search|
00009470  24 2c 33 29 0d 38 72 2c  e7 20 a9 73 65 61 72 63  |$,3).8r,. .searc|
00009480  68 24 3c 33 20 8c 20 73  65 61 72 63 68 24 3d a4  |h$<3 . search$=.|
00009490  6c 6f 6e 67 73 28 73 65  61 72 63 68 24 2c 33 29  |longs(search$,3)|
000094a0  0d 38 7c 24 74 65 78 24  3d 22 26 22 2b 73 65 61  |.8|$tex$="&"+sea|
000094b0  72 63 68 24 3a 74 65 78  32 24 3d 22 54 79 70 65  |rch$:tex2$="Type|
000094c0  20 3a 2d 22 0d 38 86 05  cd 0d 38 90 18 e7 20 c0  | :-".8....8... .|
000094d0  53 65 61 72 63 68 24 2c  31 29 3c 3e 22 26 22 20  |Search$,1)<>"&" |
000094e0  8c 0d 38 9a 13 73 65 61  72 63 68 24 3d 53 65 61  |..8..search$=Sea|
000094f0  72 63 68 24 0d 38 a4 2f  c8 99 22 58 4f 53 5f 46  |rch$.8./.."XOS_F|
00009500  53 43 6f 6e 74 72 6f 6c  22 2c 33 31 2c 73 65 61  |SControl",31,sea|
00009510  72 63 68 24 20 b8 20 72  30 2c 2c 66 69 6c 65 74  |rch$ . r0,,filet|
00009520  79 70 65 0d 38 ae 51 e7  20 72 30 3c 3e 33 31 20  |ype.8.Q. r0<>31 |
00009530  8c 20 f2 6d 65 73 73 28  22 46 69 6c 65 20 74 79  |. .mess("File ty|
00009540  70 65 20 6e 6f 74 20 72  65 63 6f 67 6e 69 73 65  |pe not recognise|
00009550  64 3b 20 54 72 79 20 65  6e 74 65 72 69 6e 67 20  |d; Try entering |
00009560  66 69 6c 65 20 74 79 70  65 20 6e 75 6d 62 65 72  |file type number|
00009570  22 29 3a e1 0d 38 b8 16  73 65 61 72 63 68 24 3d  |"):..8..search$=|
00009580  c3 7e 66 69 6c 65 74 79  70 65 0d 38 c2 2c e7 20  |.~filetype.8.,. |
00009590  a9 73 65 61 72 63 68 24  3c 33 20 8c 20 73 65 61  |.search$<3 . sea|
000095a0  72 63 68 24 3d a4 6c 6f  6e 67 73 28 73 65 61 72  |rch$=.longs(sear|
000095b0  63 68 24 2c 33 29 0d 38  cc 24 74 65 78 24 3d 22  |ch$,3).8.$tex$="|
000095c0  26 22 2b 73 65 61 72 63  68 24 3a 74 65 78 32 24  |&"+search$:tex2$|
000095d0  3d 22 54 79 70 65 20 3a  2d 22 0d 38 d6 05 cd 0d  |="Type :-".8....|
000095e0  38 e0 34 e7 20 66 6f 75  6e 64 20 80 20 a4 63 68  |8.4. found . .ch|
000095f0  65 63 6b 66 6c 61 67 28  66 69 6e 64 25 2c 31 38  |eckflag(find%,18|
00009600  2c 32 31 29 20 8c 20 73  74 74 72 65 65 3d 75 70  |,21) . sttree=up|
00009610  74 6f 74 0d 38 ea 1e 20  e3 20 6f 6e 74 72 65 65  |tot.8.. . ontree|
00009620  3d 73 74 74 72 65 65 20  b8 20 65 6e 64 74 72 65  |=sttree . endtre|
00009630  65 0d 38 f4 22 20 e7 20  66 6f 75 6e 64 20 8c 20  |e.8." . found . |
00009640  66 72 6f 6d 3d 75 70 74  6f 2b 31 3a 66 6f 75 6e  |from=upto+1:foun|
00009650  64 3d a3 0d 38 fe 0e 20  73 74 3d 6f 6e 74 72 65  |d=..8.. st=ontre|
00009660  65 0d 39 08 0e 20 6e 3d  66 72 6f 6d 2a 32 34 0d  |e.9.. n=from*24.|
00009670  39 12 15 20 c8 99 22 48  6f 75 72 67 6c 61 73 73  |9.. .."Hourglass|
00009680  5f 4f 6e 22 0d 39 1c 1a  20 e3 20 49 3d 66 72 6f  |_On".9.. . I=fro|
00009690  6d 20 b8 20 74 63 6f 75  6e 74 28 73 74 29 0d 39  |m . tcount(st).9|
000096a0  26 0e 20 20 6e 6f 77 6f  6e 2b 3d 31 0d 39 30 0b  |&.  nowon+=1.90.|
000096b0  20 20 74 24 3d 22 22 0d  39 3a 11 20 20 e3 20 68  |  t$="".9:.  . h|
000096c0  3d 32 31 20 b8 20 32 33  0d 39 44 0b 20 20 69 3d  |=21 . 23.9D.  i=|
000096d0  6e 2b 68 0d 39 4e 17 20  20 74 24 2b 3d bd 28 74  |n+h.9N.  t$+=.(t|
000096e0  72 65 65 28 73 74 29 3f  69 29 0d 39 58 09 20 20  |ree(st)?i).9X.  |
000096f0  ed 20 68 0d 39 62 5e 20  20 e7 20 74 24 3d 73 65  |. h.9b^  . t$=se|
00009700  61 72 63 68 24 20 8c 20  c8 99 22 48 6f 75 72 67  |arch$ . .."Hourg|
00009710  6c 61 73 73 5f 53 6d 61  73 68 22 3a 6e 6f 6e 65  |lass_Smash":none|
00009720  66 6e 64 3d 31 3a 75 70  74 6f 3d 49 3a 75 70 74  |fnd=1:upto=I:upt|
00009730  6f 74 3d 6f 6e 74 72 65  65 3a f2 67 6f 74 6f 28  |ot=ontree:.goto(|
00009740  49 29 3a f2 66 6f 75 6e  64 28 49 2c 73 74 29 3a  |I):.found(I,st):|
00009750  e1 0d 39 6c 0b 20 20 6e  2b 3d 32 34 0d 39 76 31  |..9l.  n+=24.9v1|
00009760  20 20 c8 99 22 48 6f 75  72 67 6c 61 73 73 5f 50  |  .."Hourglass_P|
00009770  65 72 63 65 6e 74 61 67  65 22 2c 6e 6f 77 6f 6e  |ercentage",nowon|
00009780  2f 74 6f 74 61 6c 63 6e  74 2a 31 30 30 0d 39 80  |/totalcnt*100.9.|
00009790  08 20 ed 20 49 0d 39 8a  11 66 72 6f 6d 3d 30 3a  |. . I.9..from=0:|
000097a0  75 70 74 6f 3d 30 0d 39  94 0c ed 20 6f 6e 74 72  |upto=0.9... ontr|
000097b0  65 65 0d 39 9e 17 c8 99  22 48 6f 75 72 67 6c 61  |ee.9...."Hourgla|
000097c0  73 73 5f 53 6d 61 73 68  22 0d 39 a8 05 cd 0d 39  |ss_Smash".9....9|
000097d0  b2 08 c9 20 33 3a 0d 39  bc 1c 73 65 61 72 63 68  |... 3:.9..search|
000097e0  24 3d 24 a4 69 6e 66 6f  28 66 69 6e 64 25 2c 31  |$=$.info(find%,1|
000097f0  31 29 0d 39 c6 1d 73 65  61 72 63 68 32 24 3d 24  |1).9..search2$=$|
00009800  a4 69 6e 66 6f 28 66 69  6e 64 25 2c 31 32 29 0d  |.info(find%,12).|
00009810  39 d0 1a 73 65 61 72 63  68 3d bb 28 73 65 61 72  |9..search=.(sear|
00009820  63 68 24 29 2a 31 30 30  30 0d 39 da 1c 73 65 61  |ch$)*1000.9..sea|
00009830  72 63 68 32 3d bb 28 73  65 61 72 63 68 32 24 29  |rch2=.(search2$)|
00009840  2a 31 30 30 30 0d 39 e4  2e 74 65 78 24 3d c3 28  |*1000.9..tex$=.(|
00009850  28 73 65 61 72 63 68 2b  73 65 61 72 63 68 32 29  |(search+search2)|
00009860  2f 32 29 3a 74 65 78 32  24 3d 22 53 69 7a 65 20  |/2):tex2$="Size |
00009870  3a 2d 22 0d 39 ee 1e 73  65 61 72 63 68 24 3d a4  |:-".9..search$=.|
00009880  66 75 6c 6c 73 28 73 65  61 72 63 68 24 2c 31 30  |fulls(search$,10|
00009890  29 0d 39 f8 34 e7 20 66  6f 75 6e 64 20 80 20 a4  |).9.4. found . .|
000098a0  63 68 65 63 6b 66 6c 61  67 28 66 69 6e 64 25 2c  |checkflag(find%,|
000098b0  31 38 2c 32 31 29 20 8c  20 73 74 74 72 65 65 3d  |18,21) . sttree=|
000098c0  75 70 74 6f 74 0d 3a 02  1d e3 20 6f 6e 74 72 65  |uptot.:... ontre|
000098d0  65 3d 73 74 74 72 65 65  20 b8 20 65 6e 64 74 72  |e=sttree . endtr|
000098e0  65 65 0d 3a 0c 21 e7 20  66 6f 75 6e 64 20 8c 20  |ee.:.!. found . |
000098f0  66 72 6f 6d 3d 75 70 74  6f 2b 31 3a 66 6f 75 6e  |from=upto+1:foun|
00009900  64 3d a3 0d 3a 16 0d 73  74 3d 6f 6e 74 72 65 65  |d=..:..st=ontree|
00009910  0d 3a 20 0d 6e 3d 66 72  6f 6d 2a 32 34 0d 3a 2a  |.: .n=from*24.:*|
00009920  14 c8 99 22 48 6f 75 72  67 6c 61 73 73 5f 4f 6e  |..."Hourglass_On|
00009930  22 0d 3a 34 19 e3 20 49  3d 66 72 6f 6d 20 b8 20  |".:4.. I=from . |
00009940  74 63 6f 75 6e 74 28 73  74 29 0d 3a 3e 0d 20 6e  |tcount(st).:>. n|
00009950  6f 77 6f 6e 2b 3d 31 0d  3a 48 0a 20 74 24 3d 22  |owon+=1.:H. t$="|
00009960  22 0d 3a 52 10 20 e3 20  68 3d 31 34 20 b8 20 32  |".:R. . h=14 . 2|
00009970  30 0d 3a 5c 0a 20 69 3d  6e 2b 68 0d 3a 66 16 20  |0.:\. i=n+h.:f. |
00009980  74 24 2b 3d bd 28 74 72  65 65 28 73 74 29 3f 69  |t$+=.(tree(st)?i|
00009990  29 0d 3a 70 08 20 ed 20  68 0d 3a 7a 0c 20 74 3d  |).:p. . h.:z. t=|
000099a0  bb 28 74 24 29 0d 3a 84  67 20 e7 20 74 3e 73 65  |.(t$).:.g . t>se|
000099b0  61 72 63 68 20 80 20 74  3c 73 65 61 72 63 68 32  |arch . t<search2|
000099c0  20 8c 20 c8 99 22 48 6f  75 72 67 6c 61 73 73 5f  | . .."Hourglass_|
000099d0  53 6d 61 73 68 22 3a 6e  6f 6e 65 66 6e 64 3d 31  |Smash":nonefnd=1|
000099e0  3a 75 70 74 6f 3d 49 3a  75 70 74 6f 74 3d 6f 6e  |:upto=I:uptot=on|
000099f0  74 72 65 65 3a f2 67 6f  74 6f 28 49 29 3a f2 66  |tree:.goto(I):.f|
00009a00  6f 75 6e 64 28 49 2c 73  74 29 3a e1 0d 3a 8e 0a  |ound(I,st):..:..|
00009a10  20 6e 2b 3d 32 34 0d 3a  98 30 20 c8 99 22 48 6f  | n+=24.:.0 .."Ho|
00009a20  75 72 67 6c 61 73 73 5f  50 65 72 63 65 6e 74 61  |urglass_Percenta|
00009a30  67 65 22 2c 6e 6f 77 6f  6e 2f 74 6f 74 61 6c 63  |ge",nowon/totalc|
00009a40  6e 74 2a 31 30 30 0d 3a  a2 07 ed 20 49 0d 3a ac  |nt*100.:... I.:.|
00009a50  11 66 72 6f 6d 3d 30 3a  75 70 74 6f 3d 30 0d 3a  |.from=0:upto=0.:|
00009a60  b6 0c ed 20 6f 6e 74 72  65 65 0d 3a c0 17 c8 99  |... ontree.:....|
00009a70  22 48 6f 75 72 67 6c 61  73 73 5f 53 6d 61 73 68  |"Hourglass_Smash|
00009a80  22 0d 3a ca 05 cd 0d 3a  d4 05 cb 0d 3a de 0c 73  |".:....:....:..s|
00009a90  74 3d 6f 72 69 67 74 0d  3a e8 19 f2 69 6e 66 6f  |t=origt.:...info|
00009aa0  28 6e 6f 74 66 6e 64 25  2c 31 2c 74 65 78 24 29  |(notfnd%,1,tex$)|
00009ab0  0d 3a f2 1a f2 69 6e 66  6f 28 6e 6f 74 66 6e 64  |.:...info(notfnd|
00009ac0  25 2c 32 2c 74 65 78 32  24 29 0d 3a fc 15 f2 6f  |%,2,tex2$).:...o|
00009ad0  70 65 6e 77 69 6e 28 6e  6f 74 66 6e 64 25 29 0d  |penwin(notfnd%).|
00009ae0  3b 06 0b 66 6f 75 6e 64  3d a3 0d 3b 10 05 e1 0d  |;..found=..;....|
00009af0  3b 1a 04 0d 3b 24 16 dd  f2 66 6f 75 6e 64 28 69  |;...;$...found(i|
00009b00  74 65 6d 2c 74 72 6e 6f  29 0d 3b 2e 0d 6e 3d 69  |tem,trno).;..n=i|
00009b10  74 65 6d 2a 32 34 0d 3b  38 09 74 24 3d 22 22 0d  |tem*24.;8.t$="".|
00009b20  3b 42 2a e3 20 68 3d 33  20 b8 20 31 32 3a 69 3d  |;B*. h=3 . 12:i=|
00009b30  6e 2b 68 3a 74 24 2b 3d  bd 28 74 72 65 65 28 73  |n+h:t$+=.(tree(s|
00009b40  74 29 3f 69 29 3a ed 20  68 0d 3b 4c 16 f2 69 6e  |t)?i):. h.;L..in|
00009b50  66 6f 28 66 6f 75 6e 64  25 2c 33 2c 74 24 29 0d  |fo(found%,3,t$).|
00009b60  3b 56 09 74 24 3d 22 22  0d 3b 60 34 e3 20 68 3d  |;V.t$="".;`4. h=|
00009b70  31 34 20 b8 20 32 30 3a  69 3d 6e 2b 68 3a 74 24  |14 . 20:i=n+h:t$|
00009b80  2b 3d bd 28 74 72 65 65  28 73 74 29 3f 69 29 3a  |+=.(tree(st)?i):|
00009b90  ed 20 68 3a 73 69 7a 65  24 3d 74 24 0d 3b 6a 09  |. h:size$=t$.;j.|
00009ba0  74 24 3d 22 22 0d 3b 74  2b e3 20 68 3d 32 31 20  |t$="".;t+. h=21 |
00009bb0  b8 20 32 33 3a 69 3d 6e  2b 68 3a 74 24 2b 3d bd  |. 23:i=n+h:t$+=.|
00009bc0  28 74 72 65 65 28 73 74  29 3f 69 29 3a ed 20 68  |(tree(st)?i):. h|
00009bd0  0d 3b 7e 1e 74 65 24 3d  22 26 22 2b 74 24 2b 22  |.;~.te$="&"+t$+"|
00009be0  20 20 20 20 20 28 22 2b  74 24 2b 22 29 22 0d 3b  |     ("+t$+")".;|
00009bf0  88 0b 74 62 6c 6b 3d 74  74 0d 3b 92 36 c8 99 22  |..tblk=tt.;.6.."|
00009c00  58 4f 53 5f 52 65 61 64  56 61 72 56 61 6c 22 2c  |XOS_ReadVarVal",|
00009c10  22 46 69 6c 65 24 54 79  70 65 5f 22 2b 74 24 2c  |"File$Type_"+t$,|
00009c20  74 62 6c 6b 2c 35 31 32  20 b8 20 2c 2c 62 72 0d  |tblk,512 . ,,br.|
00009c30  3b 9c 0d e7 20 62 72 3c  3e 30 20 8c 0d 3b a6 0c  |;... br<>0 ..;..|
00009c40  74 79 70 65 24 3d 22 22  0d 3b b0 10 e3 20 73 3d  |type$="".;... s=|
00009c50  30 20 b8 20 62 72 2d 31  0d 3b ba 12 74 79 70 65  |0 . br-1.;..type|
00009c60  24 2b 3d bd 74 62 6c 6b  3f 73 0d 3b c4 07 ed 20  |$+=.tblk?s.;... |
00009c70  73 0d 3b ce 12 e7 20 a9  28 74 79 70 65 24 29 3c  |s.;... .(type$)<|
00009c80  38 20 8c 0d 3b d8 05 f5  0d 3b e2 13 74 79 70 65  |8 ..;....;..type|
00009c90  24 3d 74 79 70 65 24 2b  22 20 22 0d 3b ec 10 fd  |$=type$+" ".;...|
00009ca0  20 a9 28 74 79 70 65 24  29 3d 38 0d 3b f6 05 cd  | .(type$)=8.;...|
00009cb0  0d 3c 00 19 74 65 24 3d  74 79 70 65 24 2b 22 20  |.<..te$=type$+" |
00009cc0  28 22 2b 74 24 2b 22 29  22 0d 3c 0a 05 cd 0d 3c  |("+t$+")".<....<|
00009cd0  14 13 73 74 24 3d 22 73  66 69 6c 65 5f 22 2b 74  |..st$="sfile_"+t|
00009ce0  24 0d 3c 1e 30 e7 20 74  24 3d 22 41 50 50 22 20  |$.<.0. t$="APP" |
00009cf0  8c 20 74 65 24 3d 22 41  70 70 6c 69 63 61 74 69  |. te$="Applicati|
00009d00  6f 6e 20 20 20 22 3a 73  74 24 3d 22 73 61 70 70  |on   ":st$="sapp|
00009d10  22 0d 3c 28 30 e7 20 74  24 3d 22 44 49 52 22 20  |".<(0. t$="DIR" |
00009d20  8c 20 74 65 24 3d 22 44  69 72 65 63 74 6f 72 79  |. te$="Directory|
00009d30  20 20 20 20 20 22 3a 73  74 24 3d 22 73 64 69 72  |     ":st$="sdir|
00009d40  22 0d 3c 32 21 f2 69 6e  64 69 72 28 66 6f 75 6e  |".<2!.indir(foun|
00009d50  64 25 2c 31 2c 22 22 2c  22 62 30 3b 22 2b 73 74  |d%,1,"","b0;"+st|
00009d60  24 29 0d 3c 3c 43 e7 20  6f 70 74 3d 31 20 84 20  |$).<<C. opt=1 . |
00009d70  6f 70 74 3d 32 20 f2 69  6e 66 6f 28 66 6f 75 6e  |opt=2 .info(foun|
00009d80  64 25 2c 32 2c 22 54 79  70 65 22 29 3a f2 69 6e  |d%,2,"Type"):.in|
00009d90  66 6f 28 66 6f 75 6e 64  25 2c 34 2c 74 65 24 29  |fo(found%,4,te$)|
00009da0  3a f4 74 65 24 0d 3c 46  38 e7 20 6f 70 74 3d 33  |:.te$.<F8. opt=3|
00009db0  20 f2 69 6e 66 6f 28 66  6f 75 6e 64 25 2c 32 2c  | .info(found%,2,|
00009dc0  22 53 69 7a 65 22 29 3a  f2 69 6e 66 6f 28 66 6f  |"Size"):.info(fo|
00009dd0  75 6e 64 25 2c 34 2c 73  69 7a 65 24 29 0d 3c 50  |und%,4,size$).<P|
00009de0  14 f2 6f 70 65 6e 77 69  6e 28 66 6f 75 6e 64 25  |..openwin(found%|
00009df0  29 0d 3c 5a 0b 66 6f 75  6e 64 3d b9 0d 3c 64 12  |).<Z.found=..<d.|
00009e00  f2 70 75 74 69 6e 66 6f  28 69 74 65 6d 29 0d 3c  |.putinfo(item).<|
00009e10  6e 05 e1 0d 3c 78 04 0d  3c 82 17 dd a4 68 65 78  |n...<x..<....hex|
00009e20  74 6f 64 65 63 28 73 74  72 69 6e 67 24 29 0d 3c  |todec(string$).<|
00009e30  8c 0b 74 6f 74 61 6c 3d  30 0d 3c 96 13 73 74 72  |..total=0.<..str|
00009e40  6c 65 6e 3d a9 73 74 72  69 6e 67 24 0d 3c a0 19  |len=.string$.<..|
00009e50  e3 20 49 3d 73 74 72 6c  65 6e 2d 31 20 b8 20 30  |. I=strlen-1 . 0|
00009e60  20 88 20 2d 31 0d 3c aa  17 20 20 6e 65 78 74 24  | . -1.<..  next$|
00009e70  3d c0 73 74 72 69 6e 67  24 2c 31 29 0d 3c b4 0c  |=.string$,1).<..|
00009e80  20 20 76 61 6c 3d 2d 31  0d 3c be 19 20 20 e7 20  |  val=-1.<..  . |
00009e90  6e 65 78 74 24 3d 22 30  22 20 8c 20 76 61 6c 3d  |next$="0" . val=|
00009ea0  30 0d 3c c8 19 20 20 e7  20 6e 65 78 74 24 3d 22  |0.<..  . next$="|
00009eb0  31 22 20 8c 20 76 61 6c  3d 31 0d 3c d2 19 20 20  |1" . val=1.<..  |
00009ec0  e7 20 6e 65 78 74 24 3d  22 32 22 20 8c 20 76 61  |. next$="2" . va|
00009ed0  6c 3d 32 0d 3c dc 19 20  20 e7 20 6e 65 78 74 24  |l=2.<..  . next$|
00009ee0  3d 22 33 22 20 8c 20 76  61 6c 3d 33 0d 3c e6 19  |="3" . val=3.<..|
00009ef0  20 20 e7 20 6e 65 78 74  24 3d 22 34 22 20 8c 20  |  . next$="4" . |
00009f00  76 61 6c 3d 34 0d 3c f0  19 20 20 e7 20 6e 65 78  |val=4.<..  . nex|
00009f10  74 24 3d 22 35 22 20 8c  20 76 61 6c 3d 35 0d 3c  |t$="5" . val=5.<|
00009f20  fa 19 20 20 e7 20 6e 65  78 74 24 3d 22 36 22 20  |..  . next$="6" |
00009f30  8c 20 76 61 6c 3d 36 0d  3d 04 19 20 20 e7 20 6e  |. val=6.=..  . n|
00009f40  65 78 74 24 3d 22 37 22  20 8c 20 76 61 6c 3d 37  |ext$="7" . val=7|
00009f50  0d 3d 0e 19 20 20 e7 20  6e 65 78 74 24 3d 22 38  |.=..  . next$="8|
00009f60  22 20 8c 20 76 61 6c 3d  38 0d 3d 18 19 20 20 e7  |" . val=8.=..  .|
00009f70  20 6e 65 78 74 24 3d 22  39 22 20 8c 20 76 61 6c  | next$="9" . val|
00009f80  3d 39 0d 3d 22 26 20 20  e7 20 6e 65 78 74 24 3d  |=9.="&  . next$=|
00009f90  22 41 22 20 84 20 6e 65  78 74 24 3d 22 61 22 20  |"A" . next$="a" |
00009fa0  8c 20 76 61 6c 3d 31 30  0d 3d 2c 26 20 20 e7 20  |. val=10.=,&  . |
00009fb0  6e 65 78 74 24 3d 22 42  22 20 84 20 6e 65 78 74  |next$="B" . next|
00009fc0  24 3d 22 62 22 20 8c 20  76 61 6c 3d 31 31 0d 3d  |$="b" . val=11.=|
00009fd0  36 26 20 20 e7 20 6e 65  78 74 24 3d 22 43 22 20  |6&  . next$="C" |
00009fe0  84 20 6e 65 78 74 24 3d  22 63 22 20 8c 20 76 61  |. next$="c" . va|
00009ff0  6c 3d 31 32 0d 3d 40 26  20 20 e7 20 6e 65 78 74  |l=12.=@&  . next|
0000a000  24 3d 22 44 22 20 84 20  6e 65 78 74 24 3d 22 64  |$="D" . next$="d|
0000a010  22 20 8c 20 76 61 6c 3d  31 33 0d 3d 4a 26 20 20  |" . val=13.=J&  |
0000a020  e7 20 6e 65 78 74 24 3d  22 45 22 20 84 20 6e 65  |. next$="E" . ne|
0000a030  78 74 24 3d 22 65 22 20  8c 20 76 61 6c 3d 31 34  |xt$="e" . val=14|
0000a040  0d 3d 54 26 20 20 e7 20  6e 65 78 74 24 3d 22 46  |.=T&  . next$="F|
0000a050  22 20 84 20 6e 65 78 74  24 3d 22 66 22 20 8c 20  |" . next$="f" . |
0000a060  76 61 6c 3d 31 35 0d 3d  5e 16 20 20 e7 20 76 61  |val=15.=^.  . va|
0000a070  6c 3d 2d 31 20 8c 20 76  61 6c 3d 30 0d 3d 68 15  |l=-1 . val=0.=h.|
0000a080  20 20 74 6f 74 61 6c 2b  3d 76 61 6c 2a 31 36 5e  |  total+=val*16^|
0000a090  49 0d 3d 72 24 20 20 73  74 72 69 6e 67 24 3d c2  |I.=r$  string$=.|
0000a0a0  73 74 72 69 6e 67 24 2c  a9 28 73 74 72 69 6e 67  |string$,.(string|
0000a0b0  24 29 2d 31 29 0d 3d 7c  05 ed 0d 3d 86 0a 3d 74  |$)-1).=|...=..=t|
0000a0c0  6f 74 61 6c 0d ff                                 |otal..|
0000a0c6