Home » Personal collection » Acorn hard disk » apps » MultiStore » !MultiStor/MSCreate
!MultiStor/MSCreate
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn hard disk » apps » MultiStore |
Filename: | !MultiStor/MSCreate |
Read OK: | ✔ |
File size: | DA58 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM> <MultiStore$Dir>.MSCreate 20REM By Merlyn Kline for Copyright (c) Minerva Software, 1989 30: version$="2.02" 40 50ONERROR:PROCerror(ERR,REPORT$,ERL,TRUE) 60PROCinit 70ONERROR:PROCerror(ERR,REPORT$,ERL,process%<4ANDprocess%>0):PROCreport 80PROCnormpoint 90 100REPEAT 110IFprocess%>0:PROCprocess 120SYS"Wimp_PollIdle",,q%,delay%TOreason% 130IFtaskhandle%>0:SYSswi%,selecttask_%,taskhandle% 140PROCrespond(reason%) 150UNTILquit% 160PROCCLOSE:PROCquit(FALSE) 170END 180 190DEFPROCrespond(reason%) 200IFreason%:PROCwaitpoint 210CASEreason%OF 220WHEN 0:PROCbackgrnd 230WHEN 1:PROCredraw(FALSE) 240WHEN 2:PROCopen(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28) 250WHEN 3:PROCclosew(!q%) 260WHEN 6:PROCmouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20) 270WHEN 7:PROCenddrag 280WHEN 8:PROCkey(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24) 290WHEN 9:PROCmenuselect 300WHEN17,18:PROCumess1 310WHEN19:PROCumess2 320ENDCASE 330PROCnormpoint 340ENDPROC 350 360DEFPROCquit(T%):PROCnormpoint 370$q%="TASK":SYS"Wimp_CloseDown",taskhandle%,!q% 380PROCnovars 390IFT%ORFNdebug:PROCtidy:END 400SYSswi%,killtask_%,taskhandle% 410QUIT 420 430DEFFNtask=otask% 440 450DEFPROCinit:otask%=Z%:PROCswinums 460appl$="MultiStore":pstream%=0:PROCreleasepr 470DIM q% 2500, workbuf% 1500,dialct% 24 480waiter%=0:file%=-1:v%=FNinitwimp:IFv%<180:MODE12:PROCerr(2) 490PROCwaitpoint:LIBRARY(FNdir+"BaseLib") 500LIBRARY(FNdir+"SwiList"):PROCswilist 510quit%=FALSE:dialreason%=-1:dialogue%=-1 520ackpending%=FALSE:ackref%=-1 530dragreason%=-1:dialogue%=-1 540savereason%=-1 550file2%=-1:reason2%=-1 560menufile%=-1:menusub%=-1 570closeok%=FALSE 580sbfile%=-1:pass$="":exi0%=-1:exi1%=-1 590SYS"OS_Byte",182,0,255 TO,pterm% 600IF(pterm%AND&80)=0SYS"OS_Byte",246,0,255TO,pterm% 610IFpterm%=10pterm%=1:ELSEpterm%=2 620id_wcia%=42:id_exb%=43:id_bbc%=0 630DIM edbuf% 256,edval% 15 640edfield%=-1:edicon%=-1:edrec%=-1:edx%=-1:$edval%="a0-9\-+." 650ss%=12:lc%=3:PROCreadparams:PROCfilevars 660PROCloadsprites:PROCdefws:PROCdefmenus:PROCversion 670process%=1:checkref%=-1:delay%=0 680lastact%=0:chunk%=7:fn$="":lcards$="":lkbytes$="" 690as$="Are you sure ?":rl$="Really ":ri$=rl$+"interrupt ?":fi$="File: " 700unt$="UNTITLED":sy$="Sorry! " 710VDU23,255,0,126,126,126,126,126,126,0 720PROCbaricon:ENDPROC 730 740DEFPROCswinums 750ENDPROC 760 770DEFPROCfilevars 780REM ;{n 790REM ;{n window handles in w%(maxw%) - <=0 = Deleted 800REM ;{n (0)=Card (1)=Pane (2)=Fields (3)=Indices 810REM ;{n tw%(maxw%) - pointers to window formats 820REM ;{n fsize%(1) - file size cards,bytes 830REM ;{n 840REM ;{n maxw% = max array index (windows) 850REM ;{n 860ft_form%=&DE7:ft_data%=&DE8:maxw%=3 870DIM w%(maxw%),tw%(maxw%),fsize%(1) 880f_filt%=1<<00:f_pane%=1<<01:f_macb%=1<<02:f_mace%=1<<03 890f_fspc%=1<<04:f_fupp%=1<<05:f_sspc%=1<<06:f_supp%=1<<07 900f_sadd%=1<<08:f_rspc%=1<<09:f_rupp%=1<<10:f_srup%=1<<11 910f_stot%=1<<12:f_stit%=1<<13:f_sdas%=1<<14:f_wspc%=1<<15 920f_wupp%=1<<16:f_wbnk%=1<<17:f_7bit%=1<<18:f_rejb%=1<<19 930f_reja%=1<<20:f_rdsp%=1<<21:f_rtpn%=1<<22:f_rbpn%=1<<23 940f_rpdt%=1<<24:f_rtpg%=1<<25:f_rtsu%=1<<26:f_rldu%=1<<27 950f_rlsu%=1<<28 960ENDPROC 970 980DEFPROCsdvars 990SYSswi%,sd64_%,3TOlinegap% 1000margin%=8 1010IFsound%:SYSswi%,opt_%,10TOG%:ELSESYSswi%,opt_%,9TOG% 1020ENDPROC 1030 1040DEFPROCcheckprot:LOCALT%:SYS"FlexiFile_Address"TOsd% 1050LOCALERROR 1060ONERRORLOCAL:process%=2:ENDPROC 1070SYSswi%,reset_%,taskhandle% 1080IFprocess%=3PROCstop(1,"OK. Please remove original &","replace backup if necessary") 1090date$=FNstrdate1(FNnow,4) 1100PROCsdvars:IFFNv_(1)<>0PROCerr(3) 1110process%=4:ENDPROC 1120 1130DEFPROCversion 1140LOCALT$:T$=version$:IFNOTFNprod:T$+=" *UNFINISHED*" 1150PROCseti(w_pinfo%,4,"v"+T$):$FNtia(tw_status%,11)="v"+T$ 1160ENDPROC 1170 1180DEFFNprod=MID$(version$,INSTR(version$,".")+1,1)="0" 1190DEFFNdebug=NOTFNprod ANDINKEY-1ANDINKEY-2 1200 1210DEFFNinitwimp:first%=FALSE:taskhandle%=FNtask:IFtaskhandle%<>0:=200 1220$q%="TASK":SYS"Wimp_Initialise",200,!q%,"MultiStore"TO!q%,taskhandle% 1230first%=TRUE:=!q% 1240 1250DEFPROCtidy 1260PROCnormpoint 1270VDU4,26:PRINTTAB(0,2);:*fx4 1280*fx225,1 1290*fx229 1300Z%=0:SYSswi%,killtask_% 1310ONERROR:REPORT:PRINT" ";ERL:PROCquit(TRUE) 1320PRINT;menuend%-menufree%" bytes menu space" 1330PRINT;endbuf%-curbuf%" bytes indirection buffer space" 1340PRINT;tbe%-tbs%" bytes template buffer" 1350ENDPROC 1360 1370DEFPROCbaricon:IFNOTfirst%:ENDPROC 1380!q%=-1:q%!4=0:q%!8=0:q%!12=102:q%!16=68 1390q%!20=%11000000000010:$(q%+24)="!"+LEFT$(appl$,9) 1400SYS"Wimp_CreateIcon",,q%TObaricon% 1410ENDPROC 1420 1430DEFPROCerror(err%,err$,erl%,quit%) 1440IFFNdebug:VDU4,30:PRINTerr$" @ ";erl%:PROCquit(TRUE) 1450PROCnormpoint:dragreason%=-1:@%=&90A:*fx229,1 1460LOCALi%,e%,t$,T$ 1470IFNOTFNprod:err$+=" ("+STR$ERL+")" 1480LOCALERROR 1490ONERRORLOCAL:PROCerror(ERR,REPORT$,ERL,TRUE) 1500!q%=err%:$(q%+4)=err$:SYS"Wimp_ReportError",q%,1,appl$ 1510IFquit%:PROCquit(FALSE) 1520ENDPROC 1530 1540DEFPROCreport:IFFNdebug:VDU4:REPORT:PRINT" @ ";ERL:PROCquit(TRUE) 1550ENDPROC 1560 1570DEFFNdir 1580LOCALT$:T$=FNArfVar(appl$+"$Dir") 1590IFT$="":T$="&.!"+LEFT$(appl$,9)+"." 1600IFRIGHT$(T$)<>".":T$+="." 1610=T$ 1620 1630DEFFNArfVar(A$):LOCALL%,V% 1640SYS"XOS_ReadVarVal",A$,workbuf%,254,0,3TO,,L%;V%:IFV%AND1:L%=0 1650workbuf%?L%=13:=$workbuf% 1660 1670DEFPROCumess1 1680ref%=q%!8:task%=q%!4:IFtask%=taskhandle%:ENDPROC 1690mess%=q%!16 1700CASEmess%OF 1710WHEN0:PROCCLOSE:PROCquit(FALSE) 1720WHEN1:PROCdatasaved 1730WHEN2:PROCsavedata 1740WHEN3:PROCdataload 1750WHEN4:ackpending%=FALSE 1760WHEN5:PROCdataopen 1770WHEN6: 1780WHEN7: 1790WHEN8:PROCprequit 1800WHEN9: 1810WHEN&502: 1820WHEN&400C0:PROCsubmenu(q%!20,q%!24,q%!28,q%+32) 1830WHEN&80300:PROCackrec 1840ENDCASE 1850ENDPROC 1860 1870DEFPROCdataopen 1880IFq%!40=ft_form%:PROCdataloadack:PROCerr(1) 1890IFq%!40<>ft_data%:ENDPROC 1900PROCdataloadack:mh%=-1:PROCcheckopen 1910IFprocess%=0:IFNOTFNdialogue:PROCmstore("2:"+FNzts(q%+44),"MultiStore") 1920ENDPROC 1930 1940DEFPROCdataload 1950LOCALT$:T$=FNzts(q%+44):del%=q%!12<>0 1960PROCreadpointer:PROCwtof(mh%) 1970CASE TRUE OF 1980WHEN q%!40=&1000:file$=FNzts(q%+44):PROCstop(38,RIGHT$(file$,29),rl$+" set picture path ?") 1990WHEN q%!40=ft_data%ANDmh%=-2 2000PROCdataloadack 2010IFprocess%=0IFNOTFNdialogue:PROCcheckopen:PROCmstore("3:"+T$,"MultiStore") 2020WHEN q%!40=&FFD ANDmh%=-2 2030IFprocess%=0:IFNOTFNdialogue:PROCcheckconv(T$) 2040WHEN q%!40=ft_form%ANDmh%=-2:PROCdataloadack:PROCerr(1) 2050WHEN (q%!40=ft_form%ORq%!40=ft_data%)ANDfile%>=0ANDwind%<2:PROCdataloadack:file$=T$:PROCstop(100,FNleaf(file$),rl$+"load layout ?") 2060WHEN q%!40=&FFF ANDfile%>=0ANDwind%=0:PROCdataloadack:file$=T$:PROCstop(26,"",rl$+"load ASCII card ?") 2070ENDCASE 2080ENDPROC 2090 2100DEFPROCnoscrap 2110IFdel%:*remove <Wimp$Scrap> 2120ENDPROC 2130 2140DEFPROCdatasaved:IFFNdialogue:ENDPROC 2150PROCreadpointer:PROCwtof(mh%) 2160CASE TRUE OF 2170WHEN q%!40=&FFF ANDfile%>=0AND(wind%=6ORwind%=7ORwind%=0):PROCdatasaveack 2180ENDCASE 2190ENDPROC 2200 2210DEFPROCerr(E%) 2220LOCALT$,A$:IFfile%>=0A$=", "+fi$+FNfilename+" - ":ELSEA$=" - " 2230@%=&90A:*fx229,1 2240CASEE%OF 2250WHEN0:T$=REPORT$ 2260WHEN1:T$="To use a format, drag it onto a card" 2270WHEN2:T$="Must be version 1.8 WIMP or later" 2280WHEN3:T$=sy$+"Too many files already open" 2290WHEN4:T$=sy$+"You can only run one RAMManager task at a time" 2300WHEN5:T$="To save, drag the icon to a directory viewer or another task" 2310WHEN6:T$="Couldn't open file: "+REPORT$:IFREPORT$="Data lost":T$+=" (Ensure the disc is not write protected)" 2320WHEN7:T$="Couldn't open format: "+REPORT$ 2330WHEN10:T$="Unbalanced quote marks ("")" 2340WHEN11:T$="Unbalanced brackets" 2350WHEN16:T$="Field names must start with a letter" 2360WHEN24:T$="Field assignment expected" 2370WHEN25:T$="Field name not specified" 2380WHEN41:T$="Printer already in use" 2390WHEN46:T$="Exporting report"+A$+REPORT$+" (export cancelled)" 2400WHEN47:T$="The two new passwords must be identical. Please re-enter" 2410WHEN50:T$="Can't recognise format of setup file" 2420WHEN51:T$="You must specify the current password correctly" 2430WHEN59:T$="Program not found" 2440WHEN60:T$=REPORT$+" - Can't load requested software" 2450WHEN100:T$=sy$+"You can't create a file/format when others are open" 2460WHEN101:T$="Please specify full pathname or drag icon to directory viewer" 2470WHEN102:T$="Please drag the icon to a directory viewer, NOT another task" 2480WHEN103:T$=sy$+"No access to the printer driver while creating a file" 2490WHEN104:T$=sy$+"You can't open a file while you are creating one" 2500WHEN105:T$=sy$+"You must save the file before you can set the size" 2510WHEN106:T$="Please design the card layout before setting the file size" 2520WHEN107:T$="The caret must be in the field to be deleted" 2530WHEN108:T$="This is a format, not a file" 2540WHEN109:T$=sy$+"You can't transfer cards into a format or undefined file" 2550WHEN110:T$=sy$+"You can't sort a file while you are creating it!" 2560WHEN111:T$="Index names must start with a letter" 2570WHEN112:T$="Please enter a suitable expression for the index" 2580WHEN113:T$=REPORT$+" - copy not completed" 2590WHEN114:T$="Copy interrupted" 2600WHEN115:T$="Please use unique field names" 2610WHEN116:T$="Sorry - BBC files are not available" 2620OTHERWISE:T$="Unrecognised internal error" 2630ENDCASE 2640IFFNdebug:T$+=" ("+STR$ERL+") ["+STR$E%+"]" 2650ERROR99,T$ 2660 2670DEFPROCinitfile 2680flg%=0:IFtools%:flg%=f_pane%:fsize%(0)=0:fsize%(1)=0 2690ENDPROC 2700 2710DEFPROCclosefile(T%) 2720IFT%THEN 2730SYSswi%,close_%TOS% 2740ELSE 2750SYSswi%,abandon_% 2760PROCremove 2770ENDIF 2780PROCready:PROCdelfilews 2790w%(0)=-1E9:closeok%=FALSE 2800ENDPROC 2810 2820DEFPROCremove:LOCALERROR:ONERRORLOCAL:RESTOREERROR:ENDPROC 2830IFfn$<>unt$:OSCLI"*remove "+fn$ 2840ENDPROC 2850 2860DEFPROCalign(I%):IFtx1%-tx0%>108:ENDPROC 2870DEFPROCalign1(I%) 2880tx0%=I%*40-40+panew%+8:tx1%=tx0%+440 2890ty1%=900-I%*40+40:ty0%=ty1%-320 2900ENDPROC 2910 2920DEFPROCmakepane 2930LOCALP%:P%=FNcrwind(tw%(1)):w%(1)=P% 2940PROCgetw(P%):paneh%=y1%-y0%:panew%=x1%-x0%:PROCwext(P%,panew%,paneh%) 2950ENDPROC 2960 2970DEFPROCmakeflist:LOCALX%,Y%,P%,T% 2980P%=FNmakewind(2):T%=FNta(P%):$T%="Fields="+FNfilename 2990T%=LEN$T%+4:SYSswi%,sd64_%,1TOG% 3000IFG%<T%G%=T% 3010X%=G%:IFX%<21X%=21 3020Y%=FNv_(7):IFY%<2Y%=2 3030PROCwext(P%,X%*16+margin%*2,Y%*linegap%+margin%*2) 3040ENDPROC 3050 3060DEFPROCmakeilist:LOCALX%,Y%,T%,P% 3070P%=FNmakewind(3):T%=FNta(P%):$T%="Indices="+FNfilename 3080T%=LEN$T%+4:SYSswi%,sd64_%,2TOG% 3090IFG%<T%G%=T% 3100X%=G%:IFX%<23X%=23 3110Y%=FNnindices:IFY%<2Y%=2 3120PROCwext(P%,X%*16+margin%*2,Y%*linegap%+margin%*2):ENDPROC 3130 3140DEFFNmakewind(T%):LOCALP%,I%,K% 3150K%=w%(T%)>0:IFK%PROCgetw(w%(T%))ELSEPROCreadblock(tw%(T%)) 3160tx0%=x0%:ty0%=y0%:tx1%=x1%:ty1%=y1%:PROCalign(T%) 3170PROCdelfilew(T%):P%=FNcrwind(tw%(T%)):w%(T%)=P% 3180PROCopen(P%,tx0%,ty0%,tx1%,ty1%,0,0,-1):=P% 3190 3200DEFFNcrwind(T%):SYS"Wimp_CreateWindow",,T%TOT%:=T% 3210 3220DEFPROCinitpane 3230lcx%=-1:lcy%=-1:lcf%=-1 3240PROCshowcurs:PROCshowfld:PROCshowsize 3250ENDPROC 3260 3270DEFPROCshowcurs:LOCALX%,Y%:X%=FNv_(12):Y%=FNv_(13) 3280IFX%=lcx%ANDY%=lcy%:ENDPROC 3290PROCseti(w%(1),15,STR$X%+","+STR$Y%):lcx%=X%:lcy%=Y%:ENDPROC 3300 3310DEFPROCshowfld:SYSswi%,sd70_%TOG% 3320IFG%=lcf%:ENDPROC 3330LOCALT%,T$ 3340T%=G%:IFG%>0THEN 3350SYSswi%,sd17_%,11,G%TOG% 3360T$=LEFT$($sd%,16) 3370ENDIF 3380PROCmarkfld(T%):PROCseti(w%(1),17,T$):lcf%=T%:ENDPROC 3390 3400DEFPROCshowsize 3410CASEFNfspec OF 3420WHEN0:PROCseti(w%(1),5,"BBC Compatable") 3430WHEN1:PROCseti(w%(1),5,"No Subsets") 3440WHEN5:PROCseti(w%(1),5,"24 + 8 Bits") 3450OTHERWISE:PROCseti(w%(1),5,STR$((FNfspec-1)*8)+" Subsets") 3460ENDCASE 3470IFfsize%(0)<>0ORfsize%(1)<>0THEN 3480PROCseti(w%(1),12,STR$(ABSfsize%(1)DIV1024)+"K") 3490PROCseti(w%(1),13,STR$ABSfsize%(0)+" Cds") 3500ELSE 3510PROCseti(w%(1),12,"(Format)"):PROCseti(w%(1),13,"(Format)") 3520ENDIF 3530ENDPROC 3540 3550DEFPROCdelfilews:LOCALI%:IFw%(0)>0PROCdelw(w%(0)) 3560FORI%=1TOmaxw%:PROCdelfilew(I%):NEXT:ENDPROC 3570 3580DEFPROCdelfilew(I%) 3590IFw%(I%)>0:PROCclosew(w%(I%)):IFw%(I%)>0PROCdelw(w%(I%)) 3600ENDPROC 3610 3620DEFPROCumess2 3630CASEq%!16OF 3640WHEN6:IFq%!8=loadref%:PROCdatasaveack:ENDPROC 3650ENDCASE 3660ENDPROC 3670 3680DEFPROCbackgrnd:LOCALT% 3690IFw_fsize%>0PROCchecktype 3700IFackpending%:ackpending%=FALSE 3710ENDPROC 3720 3730DEFPROCtemplate(T$) 3740PROCtemplate1(T$,q%) 3750ENDPROC 3760 3770DEFPROCtemplate1(T$,q%):T$=FNlower(T$):LOCAL I%,T%,L% 3780I%=temp%+16:WHILE!I%>0ANDFNlower($(I%+12))<>T$:I%+=24:ENDWHILE 3790IF!I%<=0:ERROR99,"Template '"+T$+"' not found" 3800T%=temp%+!I%:L%=I%!4:FORI%=0TOL%STEP4:q%!I%=T%!I%:NEXT:T%=q%+88+q%!84*32 3810IF(q%!56)AND(1<<8)THEN 3820q%!72=FNworkspace(q%!80):$(q%!72)=$T%:T%+=LEN$T%+1 3830IFq%!76>0:q%!76=FNworkspace(LEN$T%+1):$(q%!76)=$T%:T%+=LEN$T%+1 3840ENDIF 3850IFq%!84>0THEN 3860FORI%=q%+88TOq%+84+q%!84*32STEP32 3870IF(I%!16)AND(1<<8)THEN 3880I%!20=FNworkspace(I%!28):$(I%!20)=$T%:T%+=LEN$T%+1 3890IFI%!24>0:I%!24=FNworkspace(LEN$T%+1):$(I%!24)=$T%:T%+=LEN$T%+1 3900ENDIF 3910NEXT 3920ENDIF 3930q%!64=sprites% 3940ENDPROC 3950 3960DEFPROCopentemplate(A$):temp%=HIMEM-30000 3970OSCLI"Load "+A$+" "+STR$~temp%:ENDPROC 3980 3990DEFFNtemplate(T$) 4000PROCtemplate1(T$,tbs%) 4010T%=tbs%:tbs%+=88+tbs%!84*32 4020IFtbs%>tbe%:ERROR99,"Template buffer full" 4030=T% 4040 4050DEFPROCdefws 4060LOCALI% 4070bufsz%=&F00 4080DIM buffer% bufsz%:curbuf%=buffer%:endbuf%=buffer%+bufsz% 4090PROCopentemplate(FNdir+"MSFrm3") 4100PROCtemplate("stopbox"):SYS"Wimp_CreateWindow",,q%TOw_stop% 4110PROCtemplate("save") 4120q%!64=1:SYS"Wimp_CreateWindow",,q%TOw_save% 4130PROCtemplate("ProgInfo"):SYS"Wimp_CreateWindow",,q%TOw_pinfo% 4140PROCtemplate("ProgInfo2"):SYS"Wimp_CreateWindow",,q%TOw_pinfo2% 4150PROCtemplate("shadow"):SYS"Wimp_CreateWindow",,q%TOw_shadow% 4160bufsz%=&1F00 4170DIM template% bufsz%:tbs%=template%:tbe%=tbs%+bufsz% 4180tw%(0)=FNtemplate("file") 4190tw%(1)=FNtemplate("filepane") 4200tw%(2)=FNtemplate("FieldList") 4210tw%(3)=FNtemplate("FieldList") 4220PROCopentemplate(FNdir+"MSFrm4") 4230tw_fsize%=FNtemplate("FSize"):w_fsize%=-1E9:tw_fsize%!64=1 4240tw_finf%=FNtemplate("FieldInfo"):w_finf%=-1E9 4250tw_status%=FNtemplate("Status"):w_status%=-1E9 4260tw_mess%=FNtemplate("message"):w_mess%=-1E9 4270tw_passw%=FNtemplate("password"):w_passw%=-1E9 4280tw_aband%=FNtemplate("abandon"):w_aband%=-1E9 4290tw_fspec%=FNtemplate("filespec"):w_fspec%=-1E9 4300tw_csize%=FNtemplate("cardsize"):w_csize%=-1E9 4310tw_index%=FNtemplate("index"):w_index%=-1E9 4320tw_passw1%=FNtemplate("password1"):w_passw1%=-1E9 4330ENDPROC 4340 4350DEFPROCloadsprites 4360ssize%=16*1024 4370DIMsprites% ssize% 4380!sprites%=ssize%:SYS"OS_SpriteOp",&109,sprites% 4390SYS"OS_SpriteOp",&10A,sprites%,FNdir+"MSSpr" 4400ENDPROC 4410 4420DEFPROCdefmenus 4430LOCALt$ 4440DIM mlist% 32,function% 51 4450bufsz%=1100 4460DIM menufree% bufsz%:menuptr%=menufree%:menuend%=menufree%+bufsz% 4470menustart%=menufree%:RESTORE+2 4480READt$:m_main%=FNcrmenu(t$) 4490DATA"#MultiStore,Info>w_pinfo%,Transfer,Fast Sort,Create,Status,Printer,Quit" 4500READt$:m_wind%=FNcrmenu(t$) 4510DATA"#Window,Field,Index#,Tidy Up" 4520READt$:m_file%=FNcrmenu(t$) 4530DATA"#File,Size,Open,Abandon" 4540DIM t_copies% 3:READt$:m_copies%=FNcrmenu(t$) 4550DATA"#Copies,$t_copies%(3)" 4560READt$:m_card1%=FNcrmenu(t$) 4570DATA"#Card,Del.Line,Ins.Line,Copy Line>m_copies%,Clear,Size,Export>w_save%" 4580READt$:m_card%=FNcrmenu(t$) 4590DATA"#Card,Tools>w_pinfo%,Card>m_card1%,File>m_file%,Window>m_wind%" 4600READt$:m_status%=FNcrmenu(t$) 4610DATA"#Statusmenu..,Align Windows,Update Media,Password,Extended Charset" 4620READt$:m_index%=FNcrmenu(t$) 4630DATA"#Index,Create,Edit,Delete" 4640READt$:m_fields%=FNcrmenu(t$) 4650DATA"#Field List,Export>w_save%" 4660ENDPROC 4670 4680DEFPROCfront(h%,X%,Y%) 4690PROCgetw(h%) 4700IFX%>=0x1%+=X%-x0%:x0%=X% 4710IFY%>=0y1%+=Y%-y0%:y0%=Y% 4720PROCopen(h%,x0%,y0%,x1%,y1%,scx%,scy%,-1) 4730ENDPROC 4740 4750DEFPROCopen(oh%,ox0%,oy0%,ox1%,oy1%,oscx%,oscy%,obh%) 4760LOCALO% 4770!q%=oh%:SYS"Wimp_GetWindowState",,q% 4780PROCwtof(oh%):IFfile%>=0THEN 4790CASEwind%OF 4800WHEN0:PROCopenpane 4810OTHERWISE:PROCwimpopen 4820ENDCASE 4830ELSE 4840CASEoh%OF 4850OTHERWISE:PROCwimpopen 4860ENDCASE 4870ENDIF 4880IFoh%=dialogue%ANDshadows%:PROCgetw(oh%):PROCopen(w_shadow%,x0%+ss%,y0%-ss%,x1%+ss%,y1%-ss%,0,0,dialogue%) 4890open%=O% 4900ENDPROC 4910 4920DEFPROCwimpopen 4930!q%=oh%:q%!4=ox0%:q%!8=oy0%:q%!12=ox1%:q%!16=oy1% 4940q%!20=oscx%:q%!24=oscy%:q%!28=obh%:SYS"Wimp_OpenWindow",,q% 4950ENDPROC 4960 4970DEFPROCopenpane 4980IFNOTFNflg(f_pane%):PROCwimpopen:ENDPROC 4990LOCALP%,f%:P%=w%(1) 5000f%=oy1%-paneh%:IFf%<oy0%f%=oy0% 5010PROCgetw(P%) 5020IFbhandle%=obh%ORobh%=w%(0)THEN 5030obh%=P% 5040IFNOTopen%PROCopen(P%,ox0%-panew%-4,f%,ox0%-4,oy1%,0,0,obh%) 5050ENDIF 5060PROCgetw(P%):f%=oy1%-paneh%:IFf%<oy0%f%=oy0% 5070PROCwimpopen 5080PROCgetw(w%(0)):IFobh%=-2:obh%=bhandle% 5090f%=oy1%-paneh%:IFf%<oy0%f%=oy0% 5100PROCopen(P%,x0%-panew%-4,f%,x0%-4,y1%,0,0,obh%) 5110ENDPROC 5120 5130DEFPROCclosew(!q%) 5140LOCALI% 5150PROCwtof(!q%) 5160IFfile%>=0THEN 5170CASEwind%OF 5180WHEN0:IFFNshowbranch:ENDPROC:ELSEIFNOTcloseok%:PROCcloseok:ENDPROC 5190ENDCASE 5200ENDIF 5210IF!q%=dialogue%:PROCtidydial 5220SYS"Wimp_CloseWindow",,q% 5230PROCnodial:PROCwtof(!q%):IFfile%>=0THEN 5240CASEwind%OF 5250WHEN0:PROCclosefile(TRUE) 5260WHEN2,3:PROCdelw(w%(wind%)) 5270ENDCASE 5280ELSE 5290CASE!q%OF 5300WHENw_stop%:stopfile%=-1 5310WHENw_status%:PROCdelw(w_status%) 5320WHENw_passw%:PROCdelw(w_passw%) 5330WHENw_mess%:PROCdelw(w_mess%) 5340WHENw_finf%:PROCdelw(w_finf%) 5350WHENw_fsize%:PROCdelw(w_fsize%):PROCnewdelay 5360WHENw_aband%:PROCdelw(w_aband%) 5370WHENw_fspec%:PROCdelw(w_fspec%) 5380WHENw_csize%:PROCdelw(w_csize%) 5390WHENw_index%:PROCdelw(w_index%) 5400WHENw_passw1%:PROCdelw(w_passw1%) 5410ENDCASE 5420ENDIF 5430ENDPROC 5440 5450DEFPROCtidydial:PROCrestorect 5460dialreason%=-1:dialogue%=-1:PROCclosew(w_shadow%):exi0%=-1:exi1%=-1 5470ENDPROC 5480 5490DEFPROCrestorect 5500LOCALERROR:ONERRORLOCAL:RESTOREERROR:ENDPROC 5510SYS "Wimp_GetCaretPosition",,workbuf% 5520IF!workbuf%=dialogue%SYS "Wimp_SetCaretPosition",!dialct%,dialct%!4,dialct%!8,dialct%!12,dialct%!16,dialct%!20 5530ENDPROC 5540 5550DEFPROCdelw(RETURN T%):!q%=T%:SYS"Wimp_DeleteWindow",,q%:T%=-1E9:ENDPROC 5560 5570DEFFNia(h%,i%):PROCgeti(h%,i%):PROCchkii:=q%!28 5580DEFFNva(h%,i%):PROCgeti(h%,i%):PROCchkii:=q%!32 5590DEFFNil(h%,i%):PROCgeti(h%,i%):PROCchkii:=q%!36 5600 5610DEFFNtia(T%,i%):LOCALq%:q%=T%+32*i%+88:PROCchkii:=q%!20 5620 5630DEFPROCchkii:IF(q%!24AND&100)=0ERROR1,"Icon not indirected" 5640ENDPROC 5650 5660DEFPROCgeti(h%,i%):!q%=h%:q%!4=i%:SYS"Wimp_GetIconState",,q%:ENDPROC 5670 5680DEFFNta(h%):!q%=h%:SYS"Wimp_GetWindowInfo",,q% 5690IF(q%!60AND&100)=0ERROR1,"Title not indirected" 5700=q%!76 5710 5720DEFPROCstop(r%,T$,U$) 5730dialreason%=r%:stopfile%=T% 5740IFINKEY-3ORNOTstopboxes%:mi%=3:PROCmstop:ENDPROC 5750PROCseti(w_stop%,0,T$):PROCseti(w_stop%,1,U$) 5760PROCunselall(w_stop%):PROCdialogue(w_stop%) 5770dialreason%=r%:stopfile%=T% 5780ENDPROC 5790 5800DEFPROCdialogue(h%) 5810LOCALX%,Y%:PROCnodial 5820SYS "Wimp_GetCaretPosition",,dialct% 5830dialfile%=file%:PROCnomenu:PROCreadpointer:X%=mx%-200:Y%=my%-85 5840IFX%<0X%=0 5850IFY%<96Y%=96 5860dialogue%=h%:PROCfront(h%,X%,Y%):PROCsetct(h%,-1,-1) 5870RESTORE14380:REPEAT 5880READh%:IFh%=dialogue%:READX%:PROCsetct(h%,X%,LEN$FNia(h%,X%)) 5890IFh%<>-1:REPEAT:READX%:UNTILX%<-1:h%=0 5900UNTILh%=dialogue%ORh%<0:ENDPROC 5910 5920DEFPROCreadpointer:LOCALq%:q%=workbuf% 5930SYS"Wimp_GetPointerInfo",,q% 5940mx%=!q%:my%=q%!4:mb%=q%!8:mh%=q%!12:mi%=q%!16 5950ENDPROC 5960 5970DEFFNdialogue:LOCALfile% 5980IFdialogue%>=0ANDmh%<>dialogue%ANDmh%<>w_shadow%PROCnodial 5990=FALSE 6000 6010DEFPROCmouse(mx%,my%,mb%,mh%,mi%,mo%) 6020IFdragreason%>=0ORmb%>255:ENDPROC 6030PROCwtof(mh%):IFfile%>=0ANDwind%=6AND(mb%=1ORmb%=4)ANDmi%<19:ENDPROC 6040IFmb%<16:IFFNdialogue:ENDPROC 6050w_info%=w_pinfo%:IFmb%=7:mb%=2:w_info%=w_pinfo2% 6060CASEmb%OF 6070WHEN2:PROCmenu 6080WHEN1,4:PROCselect 6090WHEN16,64:PROCstartdrag 6100ENDCASE 6110ENDPROC 6120 6130DEFPROCseti(h%,i%,T$):T$=LEFT$(T$,FNil(h%,i%)):$FNia(h%,i%)=T$ 6140PROCiconupd(h%,i%):PROCgetct:IF!q%=h%ANDq%!4=i%:PROCsetct(h%,i%,LENT$) 6150ENDPROC 6160 6170DEFPROCiset(h%,i%,B%,E%):LOCALq%:q%=workbuf% 6180!q%=h%:q%!4=i%:q%!12=B%:q%!8=E%:SYS"Wimp_SetIconState",,q%:ENDPROC 6190 6200DEFPROCiconupd(h%,i%):PROCiset(h%,i%,0,0):ENDPROC 6210 6220DEFPROCforce(h%) 6230CASEh%OF 6240OTHERWISESYS"Wimp_ForceRedraw",h%,-1E9,-1E9,1E9,1E9 6250ENDCASE 6260ENDPROC 6270 6280DEFPROCreadblock(p%) 6290x0%=!p%:y0%=p%!4:x1%=p%!8:y1%=p%!12:REM physical area 6300scx%=p%!16:scy%=p%!20:bhandle%=p%!24:REM scroll offsets, stack depth 6310bx%=x0%-scx%:by%=y1%-scy%:REM calculate physical co-ords of logical area 6320ex0%=p%!40:ey0%=p%!44:ex1%=p%!48:ey1%=p%!52:REM logical area 6330gx0%=p%!24:gy0%=p%!28:gx1%=p%!32:gy1%=p%!36:REM graphics window 6340open%=(p%!28AND&10000)<>0:REM window open flag 6350ENDPROC 6360 6370DEFPROCgetw(h%) 6380!q%=h%:SYS"Wimp_GetWindowInfo",,q% 6390PROCreadblock(q%+4) 6400ENDPROC 6410 6420DEFPROCselect 6430IFFNnumi(mh%,mi%,mb%) 6440IFfile%>=0THEN 6450CASEwind%OF 6460WHEN0:PROCmcard 6470WHEN1:PROCmpane 6480WHEN2:PROCmflist 6490ENDCASE 6500ELSE 6510CASEmh%OF 6520WHEN-2:IFmb%=1ANDINKEY-1ANDINKEY-2:PROCoscli(""):ELSEPROCstatus 6530WHENw_stop%:PROCmstop 6540WHENw_save%:PROCmsave 6550WHENw_finf%:PROCmfinf 6560WHENw_status%:PROCmstatus 6570WHENw_mess%:IFmi%=6:PROCclosew(w_mess%) 6580WHENw_passw%:PROCmpassw 6590WHENw_fsize%:PROCmfsize 6600WHENw_aband%:PROCmaband 6610WHENw_fspec%:PROCmfspec 6620WHENw_csize%:PROCmcsize 6630WHENw_index%:PROCmindex 6640WHENw_passw1%:PROCmpassw1 6650ENDCASE 6660ENDIF 6670ENDPROC 6680 6690DEFPROCmindex:IFmi%<>13ANDmi%<>12:ENDPROC 6700IFmi%=13THEN 6710LOCALT$,t$,I%,f%,T% 6720T$=FNs($FNia(w_index%,1)):IFASCT$<33ORASCT$=48ORVALT$>0:PROCerr(111) 6730t$=FNs($FNia(w_index%,3)):IFASCt$<33:PROCerr(112) 6740f%=0:PROCwchi(w_index%):I%=q%:REPEAT 6750CASE!I%OF 6760WHEN4:f%=f%OR1 6770WHEN5:f%=f%OR2 6780WHEN6:f%=f%OR4 6790WHEN7:f%=f%OR8 6800WHEN8:f%=f%OR16 6810WHEN9:f%=f%OR64 6820WHEN10:f%=f%OR256 6830WHEN11:f%=f%OR128 6840ENDCASE 6850I%+=4:UNTILI%!-4<0 6860T%=-1:IFdialreason%=1:T%=menuindex% 6870SYSswi%,makeindex_%,T$,t$,f%,T% 6880ENDIF 6890PROCmakeilist:PROCnodial:ENDPROC 6900 6910DEFPROCmcard 6920LOCALX%,Y%:PROCcurmouse:IFmb%<>1:ENDPROC 6930SYSswi%,sd70_%TOG% 6940IFG%>0:menufield%=G%:PROCfinfo(TRUE):ENDPROC 6950X%=FNv_(12):Y%=FNv_(13):SYSswi%,sd11_%TOG% 6960IFG%<>64ANDG%<>43:ENDPROC 6970SYSswi%,sd44_%,X%,Y% 6980SYSswi%,field_%,FNv_(7)+1,"?",,,,7 6990SYSswi%,sd44_%,X%,Y% 7000PROCmatchct:PROCupdline:PROCresize 7010PROCinitpane:PROCupdfds:SYSswi%,sd70_%TOG% 7020IFG%>0:menufield%=G%:PROCfinfo(TRUE) 7030ENDPROC 7040 7050DEFPROCmflist:LOCALY%:Y%=my%:PROCyconv(Y%,FNv_(7),mh%) 7060menufield%=Y%:IFmb%=1:PROCfinfo(TRUE):ELSEPROCfindfield 7070ENDPROC 7080 7090DEFPROCmpane 7100CASEmi%OF 7110WHEN0:PROCcsize 7120WHEN1:PROCsettab 7130WHEN2:PROCdelfield 7140WHEN3:PROCstop(103,"",rl$+"destroy layout ?") 7150WHEN4,5:PROCfspec 7160WHEN12,13,19:PROCfsize 7170ENDCASE 7180ENDPROC 7190 7200DEFPROCmpassw1 7210IFmi%<2ORmi%>3:ENDPROC 7220IFmi%=3:pass$=$FNia(w_passw1%,1):PROCnodial:PROCglayout:ELSEPROCnodial 7230ENDPROC 7240 7250DEFPROCmstop:IFmi%<3ORmi%>4ENDPROC 7260LOCALT%:T%=dialreason%:dialreason%=-1 7270IFmi%=3THEN 7280PROCclosew(w_stop%) 7290CASET%OF 7300WHEN2:closeok%=TRUE:PROCclosew(w%(0)) 7310WHEN6:PROCCLOSE:PROCquit(FALSE) 7320WHEN20:stopboxes%=FALSE 7330WHEN26:PROCasccard 7340WHEN27:SYSswi%,setpass_%,"" 7350WHEN36:OSCLI"*settype "+file$+" "+STR$~menufield% 7360IFmenufield%=ft_data%:PROCcheckopen:PROCmstore("3:"+file$,"MultiStore") 7370WHEN38:PROCpicpath 7380WHEN100:PROCnodial:PROCglayout:ENDPROC 7390WHEN101:PROCerr(116) 7400WHEN102:SYSswi%,delfield_%TOG% 7410PROCupdline:PROCresize:PROCmatchct:PROCupdfds 7420WHEN103:SYSswi%,clear_% 7430PROCresize:PROCfext:PROCmatchct 7440PROCforcecard:PROCupdfds:PROCupdixs 7450WHEN104:PROCclosefile(FALSE) 7460WHEN105:PROCdelindex 7470ENDCASE 7480ELSE 7490IFT%=1:PROCCLOSE:PROCquit(FALSE) 7500ENDIF 7510PROCclosew(w_stop%):ENDPROC 7520 7530DEFPROCmsave 7540IFmi%<>0ENDPROC 7550LOCALT$:T$=$FNia(w_save%,2):IFT$=FNleaf(T$):PROCerr(5) 7560savetype%=savet%:task%=-1:file$=T$:PROCsavedata1 7570ENDPROC 7580 7590DEFPROCmfinf 7600CASEmi%OF 7610WHEN17:PROCclosew(w_finf%) 7620WHEN7:PROCgeti(w_finf%,7):IF(q%!24)AND(1<<21)THEN 7630PROCgeti(w_finf%,12):IF((q%!24)AND(1<<21))=0THEN 7640PROCunseli(w_finf%,10):PROCseli(w_finf%,11) 7650ENDIF 7660ENDIF 7670WHEN13,14,15 7680PROCunseli(w_finf%,10):PROCunseli(w_finf%,11):PROCseli(w_finf%,12) 7690WHEN19 7700LOCALT$,T%,B%,L%,K%,I% 7710IFw%(2)>0PROCforce(w%(2)) 7720T$=$FNia(w_finf%,5):T%=VAL$FNia(w_finf%,2):IFT%<1T%=1ELSEIFT%>255T%=255 7730B%=ASCFNup(T$):IFB%<65ORB%>90PROCerr(16) 7740L%=VAL$FNia(w_finf%,20):IFL%<1L%=1ELSEIFL%>255L%=255 7750B%=VAL$FNia(w_finf%,13):IFB%<0B%=0ELSEIFB%>6B%=6 7760K%=FALSE:PROCwchi(w_finf%):I%=q%:REPEAT 7770CASE!I%OF 7780WHEN6:K%=TRUE 7790WHEN7:B%=B%OR8 7800WHEN8:B%=B%OR128 7810WHEN9:B%=B%OR64 7820WHEN10:B%=B%OR7 7830WHEN11:B%=B%ANDNOT7 7840ENDCASE 7850I%+=4:UNTILI%!-4<0 7860SYSswi%,sd18_%,B%,4,menufield% 7870SYSswi%,sd67_%,T$TOG% 7880IFG%<>menufield%ANDG%>0PROCsetct(w_finf%,5,LENT$):PROCerr(115) 7890SYSswi%,sd20_%,T$,menufield% 7900IFdialreason%THEN 7910IFK%:SYSswi%,makekey_%,menufield% 7920IFNOTK%:SYSswi%,removekey_%,menufield% 7930SYSswi%,flength_%,L%,menufield% 7940IFT%<>menufield%:SYSswi%,fnumber_%,T%,menufield% 7950menufield%=T% 7960ENDIF 7970PROCnodial:PROCresize:PROCinitpane:PROCupdline:PROCupdfds:PROCmatchct 7980ENDCASE 7990ENDPROC 8000 8010DEFPROCmstatus 8020LOCALT%,I%,A% 8030CASEmi%OF 8040WHEN15:IFw%(0)>0:PROCfront(w%(0),-1,-1) 8050WHEN12 8060WHEN13 8070sound%=FALSE:shadows%=FALSE:pix%=FALSE 8080PROCwchi(w_status%):I%=q%:REPEAT 8090CASE!I%OF 8100WHEN24:sound%=TRUE 8110WHEN25:shadows%=TRUE 8120WHEN23:A%=TRUE 8130WHEN28:pix%=TRUE 8140ENDCASE 8150I%+=4:UNTILI%!-4<0 8160IFsound%:SYSswi%,opt_%,10TOG%:ELSESYSswi%,opt_%,9TOG% 8170IFA%<>stopboxes%THEN 8180IFA%stopboxes%=TRUE:ELSEPROCstop(20,rl$+"disable these","stop boxes ?"):ENDPROC 8190ENDIF 8200OTHERWISEENDPROC 8210ENDCASE 8220PROCclosew(w_status%):ENDPROC 8230 8240DEFPROCmpassw:IFmi%=4:PROCclosew(w_passw%) 8250IFmi%<>3ENDPROC 8260LOCALT$,t$:T$=FNsu($FNia(w_passw%,5)):SYSswi%,sd63_%,T$TOG% 8270IFG%=2:PROCsetct(w_passw%,5,LEN$FNia(w_passw%,5)):PROCerr(51) 8280T$=FNsu($FNia(w_passw%,1)):t$=FNsu($FNia(w_passw%,2)) 8290IFT$<>t$:PROCerr(47) 8300IFT$="":PROCstop(27,fi$+FNfilename,rl$+"delete password ?"):ENDPROC 8310SYSswi%,setpass_%,T$ 8320PROCclosew(w_passw%):ENDPROC 8330 8340DEFPROCmfsize 8350LOCALT$,T%,t% 8360LOCALERROR 8370ONERRORLOCAL:RESTOREERROR:PROCseti(w_fsize%,11,f_cf$):PROCerr(0) 8380CASEmi%OF 8390WHEN12 8400T$=$FNia(w_fsize%,11) 8410IFINSTR(FNu(T$),"$SCRAP>"):PROCerr(102) 8420IFT$=FNleaf(T$):f_cf$=T$:PROCerr(101) 8430PROCremove:f_cf$=T$:fn$=T$:T%=q%:PROCwchi(w_fsize%):t%=2:REPEAT 8440CASE!T%OF 8450WHEN3:t%=0 8460WHEN4:t%=1 8470ENDCASE 8480T%+=4:UNTILT%!-4<0 8490CASEt%OF 8500WHEN0:PROCsetcards(VAL$FNia(w_fsize%,6)) 8510WHEN1:PROCsetbytes(VAL$FNia(w_fsize%,7)) 8520WHEN2:PROCsetform 8530ENDCASE 8540PROCnodial:PROCshowsize 8550WHEN6,7:PROCunselall(w_fsize%):PROCseli(w_fsize%,mi%-3) 8560WHEN3,4:PROCsetct(w_fsize%,mi%+3,LEN$FNia(w_fsize%,mi%+3)) 8570WHEN13:PROCnodial 8580ENDCASE 8590ENDPROC 8600 8610DEFPROCmaband:LOCALT%:T%=dialreason% 8620CASEmi%OF 8630WHEN3:PROCfsize 8640WHEN4:PROCnodial:PROCclosefile(FALSE):IFT%=2PROCquit(FALSE) 8650ENDCASE 8660ENDPROC 8670 8680DEFPROCmfspec:LOCALT%,t% 8690CASEmi%OF 8700WHEN6:t%=FNfspec:PROCwchi(w_fspec%):T%=!q%:IFT%>=0ANDT%<>t%THEN 8710IFT%<>0THEN 8720SYSswi%,subbytes_%,T%-1 8730PROCresize 8740ELSE 8750PROCstop(101,rl$+"make this file","BBC compatable ?"):ENDPROC 8760ENDIF 8770ENDIF 8780PROCnodial 8790WHEN7:PROCnodial 8800ENDCASE:ENDPROC 8810 8820DEFPROCmcsize:LOCALw%,h%,I% 8830CASEmi%OF 8840WHEN65:PROCnodial 8850WHEN64 8860w%=VAL$FNia(w_csize%,61) 8870h%=VAL$FNia(w_csize%,57) 8880FORI%=1TO2 8890SYSswi%,width_%,w% 8900SYSswi%,height_%,h% 8910NEXT 8920PROCfext:PROCforcecard:PROCmatchct:PROCresize:PROCnodial 8930IFFNv_(5)<>h%ORFNv_(6)<>w%:PROCbuzz2 8940ENDCASE:ENDPROC 8950 8960DEFPROCstartdrag 8970dragreason%=-1:dragbutton%=mb% 8980PROCwtof(mh%):IFfile%>=0THEN 8990CASEwind%OF 9000WHEN0 9010IFmb%=16THEN 9020dragreason%=4:PROCdragcard 9030ELSE 9040PROCcurmouse:SYSswi%,sd70_%TOG% 9050menufield%=G% 9060IFG%>0dragreason%=3:PROCdragfield:ELSEdragreason%=101:PROCdragtext 9070ENDIF 9080WHEN1 9090CASEmi%OF 9100WHEN6:dragreason%=1:PROCdragicon(mh%,mi%) 9110ENDCASE 9120WHEN2 9130menufield%=my%:PROCyconv(menufield%,FNv_(7),mh%) 9140dragreason%=3:PROCdragfield1 9150ENDCASE 9160ELSE 9170CASEmh%OF 9180WHENw_save%:IFmi%=3:dragreason%=5:PROCdragicon(w_save%,3) 9190WHENw_fsize%:IFmi%=10:dragreason%=100:PROCdragicon(mh%,mi%) 9200ENDCASE 9210ENDIF 9220ENDPROC 9230 9240DEFPROCenddrag 9250PROCreadpointer 9260IFmh%<>-1THEN 9270LOCALT$ 9280CASEdragreason%OF 9290WHEN1:PROCcarddr 9300WHEN3:PROCfielddr 9310WHEN4:PROCcarddr1 9320WHEN5:PROCsavereq(FNleaf($FNia(w_save%,2)),savet%,saves%,savereason%) 9330WHEN100:PROCsavereq(FNleaf($FNia(w_fsize%,11)),&DE7,FNext,100) 9340WHEN101:PROCtextdr 9350ENDCASE 9360ELSE 9370IFdragreason%=4:PROCcarddr1 9380ENDIF 9390dragreason%=-1:menufile%=-1 9400ENDPROC 9410 9420DEFPROCunseli(h%,i%):PROCiset(h%,i%,&200000,0):ENDPROC 9430 9440DEFPROCseli(h%,i%):PROCiset(h%,i%,&200000,&200000):ENDPROC 9450DEFPROCshadei(h%,i%):PROCiset(h%,i%,&400000,&400000):ENDPROC 9460 9470DEFPROCunselall(h%) 9480LOCALI%,i%:PROCwchi(h%) 9490I%=q%:REPEAT:i%=!I%:IFi%>=0:PROCunseli(h%,i%) 9500I%+=4:UNTILi%<0:ENDPROC 9510 9520DEFPROCwchi(h%):SYS"Wimp_WhichIcon",h%,q%,&200000,&200000 9530ENDPROC 9540 9550DEFPROCmenu 9560PROCwtof(mh%):IFfile%>=0THEN 9570CASEwind%OF 9580WHEN0,1:PROCcardmenu 9590WHEN2:PROCpop(m_fields%,-1) 9600WHEN3:PROCpop(m_index%,-1) 9610ENDCASE 9620ELSE 9630CASEmh%OF 9640WHEN-2:my%=64+7*44:PROCpop(m_main%,-1) 9650WHENw_status%:PROCstatmenu 9660ENDCASE 9670ENDIF 9680ENDPROC 9690 9700DEFPROCcardmenu:PROCpop(m_card%,-1):ENDPROC 9710 9720DEFPROCstatmenu:IFFNv_(1)=1ANDmi%=15PROCpop(m_status%,-1) 9730ENDPROC 9740 9750DEFFNpar(t$,s$,RETURN i%):LOCALi1% 9760i1%=i%+1:i%=INSTR(t$+s$,s$,i1%) 9770=MID$(t$,i1%,i%-i1%) 9780 9790DEFFNcrmenu(menu$) 9800IFmenufree%+28>menuend%ERROR99,"Menu area full" 9810LOCAL m% 9820menuptr%=menufree% 9830i%=0 9840IF LEFT$(menu$,1)="#"i%=1:menutitle$=FNpar(menu$,",",i%)ELSEmenutitle$="" 9850$menuptr%=menutitle$ 9860menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0 9870menuptr%!16=196-24:menuptr%!20=44:menuptr%!24=0 9880menuptr%+=28:maxx%=LENmenutitle$ 9890REPEATitem$=FNpar(menu$,",",i%) 9900PROCmenuitem(item$) 9910UNTIL item$="" 9920m%=menufree%:m%!16=(maxx%*8+6)*2 9930menufree%=menuptr% 9940=m% 9950 9960DEFPROCmenuitem(text$) 9970IFtext$=""menuptr%!-24=(menuptr%!-24)OR&80:ENDPROC 9980IFmenuptr%+24>menuend%THENERROR99,"Menu area full" 9990LOCALi%,flg% 10000flg%=&00 10010i%=INSTR(text$,">") 10020IFi%>0subptr%=EVALMID$(text$,i%+1):text$=LEFT$(text$,i%-1)ELSEsubptr%=-1 10030i%=INSTR(text$,"}") 10040IFi%>0subptr%=EVALMID$(text$,i%+1):text$=LEFT$(text$,i%-1):flg%+=&08 10050IFRIGHT$(text$,1)="#"text$=LEFT$(text$):flg%+=&02 10060menuptr%!0=flg%:menuptr%!4=subptr%:menuptr%!8=&07000021 10070IFLEFT$(text$,1)="$"THEN 10080!menuptr%+=&04:menuptr%!8+=&100:i%=INSTR(text$,"(") 10090IFi%>0THENL%=VALMID$(text$,i%+1):text$=LEFT$(text$,i%-1)ELSEL%=12 10100menuptr%!12=EVALMID$(text$,2):menuptr%!16=-1:menuptr%!20=L% 10110text$=STRING$(L%," ") 10120ELSE 10130IFLENtext$<=12THEN 10140$(menuptr%+12)=text$ 10150ELSE 10160I%=FNworkspace(LENtext$+1):$I%=text$ 10170menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=LENtext$+1 10180menuptr%!8=menuptr%!8 OR &100 10190ENDIF 10200IFLENtext$>maxx%maxx%=LENtext$ 10210ENDIF 10220menuptr%+=24 10230ENDPROC 10240 10250DEFFNworkspace(L%) 10260IF curbuf%+L%>endbuf%ERROR99,"No more buffer space" 10270curbuf%+=L%:=curbuf%-L% 10280 10290DEFPROCprep(menu%,tree%) 10300LOCALI%,T$:PROCclearts(menu%) 10310CASEmenu%OF 10320WHENm_main%:PROCmp_main 10330WHENm_card%:PROCmp_card 10340WHENm_card1%:PROCmp_card1 10350WHENm_file%:PROCmp_file 10360WHENm_wind%:PROCmp_wind 10370WHENm_status%:PROCmp_status 10380WHENm_index%:PROCmp_index 10390WHENm_fields%:PROCmp_fields 10400ENDCASE 10410ENDPROC 10420 10430DEFPROCmp_index 10440menuindex%=FNmousei 10450IFmenuindex%<=0PROCshade(menu%,1):PROCshade(menu%,2) 10460ENDPROC 10470 10480DEFPROCmp_card 10490T%=menu%+28+0*24+4 10500IFFNflg(f_pane%):PROCtick(menu%,0):!T%=-1:ELSE:!T%=w%(1) 10510PROCprep(m_file%,tree%):PROCprep(m_wind%,tree%) 10520PROCprep(m_card1%,tree%):PROCmatchct 10530ENDPROC 10540 10550DEFPROCmp_fields:IFFNv_(1)<>1:ENDPROC 10560SYSswi%,sd64_%,1TOG% 10570PROCsaveset(f_fl$,&FFF,3,FNv_(7)*G%+FNv_(7)):ENDPROC 10580 10590DEFPROCmp_card1 10600$t_copies%="1" 10610PROCsaveset(f_cd$,&FFF,1,FNwd*FNht) 10620ENDPROC 10630 10640DEFPROCmp_file 10650IFFNv_(7)=0PROCshade(menu%,0):PROCshade(menu%,1) 10660IFfn$=unt$ORfsize%(0)=0:PROCshade(menu%,1) 10670ENDPROC 10680 10690DEFPROCmp_wind 10700IFw%(2)>0PROCtick(menu%,0) 10710IFw%(3)>0PROCtick(menu%,1) 10720ENDPROC 10730 10740DEFPROCmp_main 10750IFFNv_(1)<>0AND(fn$=unt$ORFNv_(7)=0ORfsize%(0)=0):PROCshade(menu%,1) 10760IFFNv_(1)>0:PROCshade(menu%,2):PROCshade(menu%,3):PROCtick(menu%,3):PROCshade(menu%,5) 10770ENDPROC 10780 10790DEFPROCmp_status 10800$menu%=FNfilename 10810IFNOTFNflg(f_7bit%)PROCtick(menu%,3) 10820ENDPROC 10830 10840DEFPROCpop(menu%,tree%):IFprocess%>0:ENDPROC 10850IFmenu%<0:ENDPROC 10860PROCprep(menu%,tree%) 10870SYS"Wimp_CreateMenu",,menu%,mx%-50,my%+32 10880openmenu%=menu% 10890ENDPROC 10900 10910DEFPROCnomenu 10920SYS"Wimp_CreateMenu",,-1:openmenu%=-1 10930ENDPROC 10940 10950DEFPROCnodial:IFdialogue%>0PROCclosew(dialogue%) 10960ENDPROC 10970 10980DEFPROCmenuselect 10990LOCALI% 11000I%=0:REPEATmlist%!I%=q%!I%:I%+=4:UNTILq%!(I%-4)=-1 11010PROCreadpointer 11020CASEopenmenu%OF 11030WHENm_main%:PROCm_main 11040WHENm_card%:PROCm_card 11050WHENm_status%:PROCm_status 11060WHENm_index%:PROCm_index 11070WHENm_fields%:PROCm_fields 11080ENDCASE 11090IFmb%=1THEN 11100PROCpop(openmenu%,mlist%):ELSEPROCnomenu 11110ENDIF 11120ENDIF 11130ENDPROC 11140 11150DEFPROCm_fields 11160ENDPROC 11170 11180DEFPROCm_main 11190CASE!mlist%OF 11200WHEN0:PROCdialogue(w_info%) 11210WHEN1:PROCtransfer 11220WHEN2:PROCfastsort 11230WHEN3:PROCmakeform 11240WHEN4:PROCstatus 11250WHEN5:PROCpdriver 11260WHEN6:IFFNv_(1)=0:PROCquit(FALSE):ELSEPROCqquit 11270ENDCASE 11280ENDPROC 11290 11300DEFPROCm_index 11310CASE!mlist%OF 11320WHEN0:PROCnewindex(-1) 11330WHEN1:PROCeditindex 11340WHEN2:PROCstop(105,"Index: "+FNindexname(menuindex%),rl$+"delete index ?") 11350ENDCASE 11360ENDPROC 11370 11380DEFPROCm_card 11390CASE!mlist%OF 11400WHEN0:PROCswpane 11410WHEN1:PROCm_card1 11420WHEN2:PROCm_file 11430WHEN3:PROCm_wind 11440ENDCASE 11450ENDPROC 11460 11470DEFPROCm_wind 11480LOCALT%:T%=mlist%!4 11490IFT%>-1ANDT%<maxw%-1:IFw%(T%+2)>0:PROCclosew(w%(T%+2)):ENDPROC 11500CASET%OF 11510WHEN0:PROCfieldlist 11520WHEN1:PROCindex 11530WHEN2:PROCwtidy 11540ENDCASE 11550ENDPROC 11560 11570DEFPROCm_file 11580CASEmlist%!4OF 11590WHEN0:PROCfsize 11600WHEN1:PROCopenfile 11610WHEN2 11620IFFNv_(7)=0THEN 11630PROCclosefile(FALSE) 11640ELSE 11650PROCstop(104,"",rl$+"abandon layout ?") 11660ENDIF 11670ENDCASE 11680ENDPROC 11690 11700DEFPROCm_card1 11710CASEmlist%!4OF 11720WHEN0:PROCdelln 11730WHEN1:PROCinsln 11740WHEN2:PROCcopyln 11750WHEN3:PROCstop(103,"",rl$+"destroy layout ?") 11760WHEN4:PROCcsize 11770ENDCASE 11780ENDPROC 11790 11800DEFPROCm_status 11810CASE!mlist%OF 11820WHEN0:PROCwalign 11830WHEN1:SYSswi%,sd43_% 11840WHEN2:PROCgetpass 11850WHEN3:PROCswap7 11860ENDCASE 11870ENDPROC 11880 11890DEFPROCsubmenu(menu%,X%,Y%,q%) 11900LOCALI% 11910I%=0:REPEATmlist%!I%=q%!I%:I%+=4:UNTILq%!(I%-4)=-1 11920PROCprep(openmenu%,mlist%) 11930SYS"Wimp_CreateSubMenu",,menu%,X%,Y% 11940ENDPROC 11950 11960DEFPROCclearts(mh%):LOCALI%:I%=mh%+28 11970IFmh%<menustart%ORmh%>menuend%:ENDPROC 11980REPEAT 11990!I%=!I%ANDNOT1:I%!8=I%!8ANDNOT&400000: 12000I%+=24:UNTILI%!-24AND&80 12010ENDPROC 12020 12030DEFPROCshade(mh%,I%) 12040mh%!(28+8+24*I%)=mh%!(28+8+24*I%)OR&400000:ENDPROC 12050 12060DEFPROCtick(mh%,I%) 12070mh%!(28+24*I%)=mh%!(28+24*I%)OR&01:ENDPROC 12080 12090DEFPROCredraw(update%) 12100LOCALh%,T%:IFupdate%THEN 12110SYS"Wimp_UpdateWindow",,q% TO more% 12120ELSE 12130SYS"Wimp_RedrawWindow",,q% TO more% 12140ENDIF 12150h%=!q%:PROCwtof(h%):PROCreadblock(q%+4) 12160WHILE more% 12170T%=FALSE:LOCALERROR:ONERRORLOCAL:T%=TRUE 12180IFT%THEN 12190IFINKEY-3:PROCrectfill(REPORT$):ELSERESTOREERROR:PROCerr(0) 12200ELSE 12210IFfile%>=0THEN 12220CASEwind%OF 12230WHEN0:PROCdrawcard 12240WHEN2:PROCdrawflist 12250WHEN3:PROCdrawilist 12260ENDCASE 12270ELSE 12280ENDIF 12290ENDIF 12300RESTOREERROR 12310!q%=h%:more%=FNnextrectangle 12320ENDWHILE 12330ENDPROC 12340 12350DEFPROCdrawcard 12360PROCgcol(0,7):PROCgcol(0,128) 12370MOVEbx%+margin%,by%-margin%:SYSswi%,wimp_%,1 12380ENDPROC 12390 12400DEFPROCdrawflist:LOCALT%,X%,Y%,x%,y%:T%=&10000:IFupdate%T%=T%OR1 12410IFFNv_(7)=0PROCrectfill("No fields in this file"):ENDPROC 12420MOVEbx%+margin%,by%-margin%-4:SYSswi%,wimp_%,T% 12430SYSswi%,sd70_%TOG% 12440IFG%>0THEN 12450X%=bx%:Y%=by%-margin%-G%*linegap%:y%=Y%+linegap%+3:x%=X%+5000 12460IFX%<gx0%X%=gx0% 12470IFx%>gx1%x%=gx1%-1 12480IFY%<gy0%Y%=gy0% 12490IFy%>gy1%y%=gy1%-1 12500IFy%>=Y%ANDx%>=X%VDU24,X%;Y%;x%;y%;:PROCgcol(0,128+7):PROCgcol(0,1):MOVEbx%+margin%,by%-margin%-4:SYSswi%,wimp_%,&10001 12510ENDIF 12520ENDPROC 12530 12540DEFPROCdrawilist:LOCALT%:T%=&20000:IFupdate%T%=T%OR1 12550IFFNnindices=0PROCrectfill("No indices in this file"):ENDPROC 12560MOVEbx%+margin%,by%-margin%-4:SYSswi%,wimp_%,T% 12570ENDPROC 12580 12590DEFFNnextrectangle:LOCALT%:SYS"Wimp_GetRectangle",,q%TOT% 12600PROCreadblock(q%+4):=T% 12610 12620DEFPROCrectfill(T$) 12630PROCgcol(0,3):LOCALI%,J%,L%,X%,Y% 12640L%=LENT$*16+48 12650X%=bx%+margin%:J%=gx0%-X%:X%=X%-J%+J%MODL% 12660J%=by%-gy1%-margin%:J%=J%-J%MODlinegap%:Y%=by%-margin%-4-J% 12670FORJ%=Y%TOgy0%STEP-linegap% 12680MOVEX%,J%:FORI%=X%TOgx1%STEPL%:PRINTT$" - ";:NEXT 12690NEXT:ENDPROC 12700 12710DEFPROCwaitpoint 12720waiter%+=1 12730SYS"Hourglass_On" 12740ENDPROC 12750 12760DEFPROCnormpoint 12770WHILEwaiter%>0:SYS"Hourglass_Off":waiter%-=1:ENDWHILE:waiter%=0 12780ENDPROC 12790 12800DEFPROCgcol(m%,c%) 12810SYS"Wimp_SetColour",(m%<<4)+c% 12820ENDPROC 12830 12840DEFPROCdataloadack 12850!q%=20:q%!12=ref%:q%!16=4 12860SYS"Wimp_SendMessage",17,q%,task% 12870ENDPROC 12880 12890DEFPROCdatasaveack 12900IFFNArfVar("Wimp$Scrap")="":ERROR99,"<Wimp$Scrap> not defined" 12910!q%=60:q%!12=ref%:q%!16=2:q%!36=-1:$(q%+44)="<Wimp$Scrap>"+CHR$0 12920SYS"Wimp_SendMessage",17,q%,task%:ackref%=q%!8 12930ENDPROC 12940 12950DEFPROCsavereq(T$,t%,s%,r%) 12960savereason%=r%:q%!32=my%:q%!28=mx%:q%!24=mi%:q%!20=mh% 12970q%!16=1:q%!12=0:q%!36=s%:q%!40=t%:!q%=(LENT$+53)AND&FFFC 12980$(q%+44)=T$+STRING$(5,CHR$0):SYS"Wimp_SendMessage",17,q%,mh%,mi% 12990saveref%=q%!8:savetype%=t%:ENDPROC 13000 13010DEFPROCloadmess:PROCreadpointer:IFtask%<0:ENDPROC 13020$(q%+44)=file$+CHR$0:!q%=(LENfile$+49)AND&FFFC 13030q%!12=ref%:q%!16=3:q%!40=savetype% 13040q%!20=mh%:q%!24=mi%:q%!28=mx%:q%!32=my%:q%!36=FNfsize(file$) 13050SYS"Wimp_SendMessage",17,q%,task% 13060ackpending%=TRUE:ENDPROC 13070 13080DEFFNfsize(T$):LOCALT%,s%:T%=OPENINT$:IFT%=0:=0 13090s%=EXT#T%:CLOSE#T%:=s% 13100 13110DEFFNzts(T%):LOCALT$ 13120WHILE?T%<>0:T$+=CHR$?T%:T%+=1:ENDWHILE 13130=T$ 13140 13150DEFPROCkey(h%,icon%,x%,y%,carh%,off%,key%) 13160PROCwtof(h%):IFfile%>=0:PROCcardkey(key%):ENDPROC 13170LOCALF%:F%=TRUE 13180CASEkey%OF 13190WHEN9,&18A:PROCfindct 13200WHEN13:PROCcursor(h%,icon%,1,0) 13210WHEN19:PROCswapcase 13220WHEN27:IFdialogue%>=0PROCnodial:ELSEF%=FALSE 13230WHEN&181:IFNOTFNprod:PROCquit(TRUE) 13240WHEN&18F:PROCcursor(h%,icon%,-1,off%) 13250WHEN&18E:PROCcursor(h%,icon%,1,off%) 13260WHEN&19F:PROCcursor(h%,icon%,-5,off%) 13270WHEN&19E:PROCcursor(h%,icon%,5,off%) 13280WHEN&1AF,30:PROCcursor(h%,icon%,-1E9,off%) 13290WHEN&1AE:PROCcursor(h%,icon%,1E9,off%) 13300OTHERWISEF%=FALSE 13310ENDCASE 13320IFF%:ENDPROC 13330SYS"Wimp_ProcessKey",key% 13340ENDPROC 13350 13360DEFPROCcardkey(key%) 13370LOCALF%,X%,Y%,T%:F%=TRUE:X%=FNv_(12):Y%=FNv_(13):T%=0 13380CASEkey%OF 13390WHEN9,&18A:PROCfindct 13400WHEN13:X%=1:Y%+=1 13410WHEN19:SYSswi%,sd11_%TOG% 13420IFG%>64ANDG%<91key%=G%+32:ELSEIFG%>96ANDG%<123key%=G%-32:ELSEkey%=G% 13430WHEN&181:IFNOTFNprod:PROCquit(TRUE) 13440WHEN&18F:Y%-=1 13450WHEN&18E:Y%+=1 13460WHEN&19F:Y%-=5 13470WHEN&19E:Y%+=5 13480WHEN&1AF,30:Y%=1 13490WHEN&1AE:Y%=FNv_(5) 13500WHEN&18C:X%-=1 13510WHEN&18D:X%+=1 13520WHEN&19C:X%-=5 13530WHEN&19D:X%+=5 13540WHEN&1AC:X%=1 13550WHEN&1AD:X%=FNv_(6) 13560WHEN&19B,&1CD:SYSswi%,sd70_%TOG% 13570T%=G%:SYSswi%,sd15_% 13580PROCupdline:IFT%>0PROCresize 13590T%=0 13600WHEN127:X%-=1:SYSswi%,sd70_%TOG% 13610T%=G%:SYSswi%,sd16_% 13620PROCupdline:IFT%>0PROCresize 13630T%=1 13640WHEN&1AB,&1ED:PROCinsln 13650WHEN25:PROCdelln 13660OTHERWISEF%=FALSE 13670ENDCASE 13680IFkey%>31ANDkey%<255ANDkey%<>127THEN 13690X%+=1:SYSswi%,sd12_%,key% 13700PROCupdchr 13710ENDIF 13720IFX%<1X%=1:ELSEIFX%>FNv_(6)X%=FNv_(6) 13730IFY%<1Y%=1:ELSEIFY%>FNv_(5)Y%=FNv_(5) 13740IFT%ORX%<>FNv_(12)ORY%<>FNv_(13)THEN 13750SYSswi%,sd44_%,X%,Y% 13760PROCmatchct 13770ENDIF 13780IFF%:ENDPROC 13790SYS"Wimp_ProcessKey",key% 13800ENDPROC 13810 13820DEFPROCswapcase:PROCgetct:T%=q%!20+FNia(!q%,q%!4) 13830IF?T%<123AND?T%>96 ?T%-=32:ELSEIF?T%<91AND?T%>64 ?T%+=32 13840PROCgetct:IF?T%>31PROCsetct(!q%,q%!4,q%!20+1) 13850PROCgetct:PROCiconupd(!q%,q%!4):ENDPROC 13860 13870DEFPROCgetct:SYS"Wimp_GetCaretPosition",,q%:ENDPROC 13880 13890DEFPROCsetct(h%,i%,o%):SYS"Wimp_SetCaretPosition",h%,i%,,,-1,o% 13900IFi%>=0PROCfindct 13910ENDPROC 13920 13930DEFFNnumi(h%,i%,b%) 13940RESTORE14110 13950LOCALU%,D%,N%,T%,B%,W%,F%,S%,V% 13960WHILEW%<>-1ANDF%=FALSE 13970READW%:READU%,D%,N%,T%,B% 13980IFW%=h%THEN 13990IFi%=U%ORi%=D%THEN 14000F%=TRUE 14010V%=VAL$FNia(W%,N%) 14020S%=1:IFi%=D%:S%=-1 14030IFb%=1:S%=S%*10 14040V%+=S%:IFV%<B%:V%=B% 14050IFV%>T%V%=T% 14060PROCseti(W%,N%,STR$V%) 14070ENDIF 14080ENDIF 14090ENDWHILE 14100=F% 14110DATAw_finf%,3,4,2,255,1 14120DATAw_finf%,18,21,20,255,1 14130DATAw_finf%,14,15,13,6,1 14140DATAw_csize%,56,58,57,255,1 14150DATAw_csize%,60,62,61,255,1 14160DATA-1,-1,-1,-1,-1,-1,-1 14170 14180DEFPROCcursor(h%,i%,s%,o%) 14190RESTORE14380 14200LOCALW%,T$,I% 14210WHILEW%<>-1 14220READW%:IFW%<>h%THEN 14230IFW%<>-1:REPEAT:READW%:UNTILW%<-1:W%=0 14240ELSE 14250REPEAT 14260READW%:IFW%<>-1:T$+=CHR$(W%) 14270UNTILW%<-1:T$=LEFT$(T$) 14280IFkey%=13:IFASCRIGHT$(T$)=i%:mi%=ABS(W%+100):mb%=1:mh%=h%:PROCselect:ENDPROC 14290IFs%=1E9:s%=LENT$:ELSEIFs%=-1E9:s%=1:ELSEs%+=INSTR(T$,CHR$i%) 14300WHILEs%>LENT$:s%-=LENT$:ENDWHILE 14310WHILEs%<1:s%+=LENT$:ENDWHILE 14320I%=ASCMID$(T$,s%) 14330IFo%>LEN$FNia(h%,I%)o%=LEN$FNia(h%,I%) 14340PROCsetct(h%,I%,o%) 14350ENDIF 14360ENDWHILE 14370ENDPROC 14380DATAw_save%,2,-100 14390DATAw_passw%,5,1,2,-103 14400DATAw_passw1%,1,-103 14410DATAw_finf%,5,exi0%,13,exi1%,-119 14420DATAw_fsize%,6,7,11,-112 14430DATAw_csize%,61,57,-164 14440DATAw_index%,1,3,-111 14450DATA-1 14460 14470DEFFNleaf(T$) 14480LOCALI%,C% 14490IF((INSTR(T$,".")=0)AND(INSTR(T$,":")=0))THEN=T$ 14500I%=LEN(T$) 14510REPEAT 14520C%=ASCMID$(T$,I%,1) 14530I%-=1 14540UNTIL(I%<=0ORC%=ASC"."ORC%=ASC":") 14550IFI%>0THEN=RIGHT$(T$,LEN(T$)-I%-1) 14560=T$ 14570 14580DEFPROCwext(h%,x%,y%):!q%=0:q%!4=-y%:q%!8=x%:q%!12=0 14590SYS"Wimp_SetExtent",h%,q%:PROCforce(h%) 14600PROCgetw(h%):IFopen%THEN 14610IFx1%-x0%>x%:x%+=x0%:ELSEx%=x1% 14620IFy1%-y0%>y%:y%=y1%-y%:ELSEy%=y0% 14630PROCopen(h%,x0%,y%,x%,y1%,scx%,scy%,bhandle%) 14640ENDIF 14650ENDPROC 14660 14670DEFPROCprocess 14680IFdialreason%>=0ORdialogue%>=0ORackpending%ENDPROC 14690CASEprocess%OF 14700WHEN1:PROCcheckprot 14710WHEN2:PROCstop(1,"Please place original","MultiStore disk in drive :0"):process%+=1 14720WHEN3:PROCcheckprot 14730WHEN4:PROCstartopen 14740OTHERWISEprocess%=0 14750ENDCASE 14760PROCnewdelay 14770ENDPROC 14780 14790DEFPROCdragicon(h%,i%) 14800LOCALx%,y%,ys%,tx0%,ty0%,tx1%,ty1% 14810PROCgetw(h%):ys%=y1%-y0%:x%=bx%:y%=y0%-scy% 14820PROCgeti(h%,i%):q%!8+=x%:q%!12+=y%+ys%:q%!16+=x% 14830q%!20+=y%+ys%:q%!24=0:q%!28=0:!q%=0:PROCdrag5:ENDPROC 14840 14850DEFPROCdrag5:PROCreadpointer:PROCscrsz:tx0%=mx%-q%!8:ty0%=my%-q%!12 14860q%!24-=tx0%:q%!28-=ty0%:q%!32+=q%!16-mx%:q%!36+=q%!20-my% 14870q%!4=5:SYS"Wimp_DragBox",,q%:ENDPROC 14880 14890DEFFNlower(T$):IFT$="":="" 14900LOCALI%,C% 14910FORI%=1TOLENT$:C%=ASCMID$(T$,I%) 14920IFC%>64ANDC%<91MID$(T$,I%,1)=CHR$(C%+32) 14930NEXT:=T$ 14940 14950DEFPROCwtof(T%):LOCALJ%:wind%=-1:file%=-1 14960FORJ%=0TOmaxw%:IFw%(J%)=T%:file%=0:wind%=J%:ENDPROC 14970NEXT:ENDPROC 14980 14990DEFPROCfext 15000LOCALx%,y% 15010y%=FNht*linegap%+margin%*2:IFy%<paneh%y%=paneh% 15020x%=FNwd*16+margin%*2:IFx%<22*16x%=22*16 15030!q%=0:q%!4=-y%:q%!8=x%:q%!12=0:SYS"Wimp_SetExtent",w%(0),q% 15040PROCgetw(w%(0)) 15050IFx1%-x0%>x%:x%+=x0%:ELSEx%=x1% 15060IFy1%-y0%>y%:y%=y1%-y%:ELSEy%=y0% 15070PROCopen(w%(0),x0%,y%,x%,y1%,scx%,scy%,bhandle%) 15080ENDPROC 15090 15100DEFFNht:SYSswi%,sd57_%,"height"TOG% 15110DEFFNwd:SYSswi%,sd57_%,"width"TOG% 15120=G% 15130 15140DEFPROCupdchr:q%!4=margin%+FNv_(12)*16-16:q%!12=q%!4+16 15150DEFPROCupdline:q%!4=-1E9:q%!12=1E9 15160q%!8=-margin%-linegap%*FNv_(13):q%!16=q%!8+32 15170!q%=w%(0):PROCredraw(TRUE):ENDPROC 15180 15190DEFPROCstartopen 15200T$=FNArfVar("MultiStore$Function") 15210CASEVALT$OF 15220WHEN1:PROCmakeform 15230ENDCASE 15240*unset MultiStore$Function 15250process%+=1:ENDPROC 15260 15270DEFPROCready 15280ENDPROC 15290 15300DEFPROCcloseok 15310IFfn$<>unt$THEN 15320PROCstop(2,"","Close file "+FNfilename) 15330ELSE 15340w_aband%=FNcrwind(tw_aband%):PROCdialogue(w_aband%):dialreason%=1 15350ENDIF 15360ENDPROC 15370 15380DEFFNfilename 15390SYSswi%,stat_%TOG% 15400=RIGHT$(FNleaf($sd%),10) 15410 15420DEFPROCswpane 15430PROCflgx(f_pane%):IFFNflg(f_pane%)THEN 15440PROCgetw(w%(0)) 15450PROCopen(w%(0),x0%,y0%,x1%,y1%,scx%,scy%,bhandle%) 15460ELSE 15470PROCgetw(w%(1)) 15480PROCopen(w%(1),x0%,y1%-paneh%,x0%+panew%,y1%,scx%,scy%,-2) 15490PROCclosew(w%(1)) 15500ENDIF 15510ENDPROC 15520 15530DEFPROCforcecard:PROCforce(w%(0)):ENDPROC 15540 15550DEFFNhdbyte(T%):SYSswi%,sd13_%,T%TOG% 15560=G% 15570 15580DEFPROCfieldlist:IFw%(2)<=0:PROCmakeflist:ENDPROC 15590PROCfront(w%(2),-1,-1):ENDPROC 15600 15610DEFPROCindex:IFw%(3)<=0:PROCmakeilist:ENDPROC 15620PROCfront(w%(3),-1,-1):ENDPROC 15630 15640DEFPROCcarddr 15650PROCwtof(mh%):IFfile%>=0THEN 15660CASEwind%OF 15670ENDCASE 15680ELSE 15690CASEmh%OF 15700OTHERWISE:PROCsavereq("Card",&FFF,FNwd*FNht,1) 15710ENDCASE 15720ENDIF 15730ENDPROC 15740 15750DEFPROCcarddr1 15760tx0%=!q%:tx1%=q%!8:ty0%=q%!4:ty1%=q%!12 15770IFABS(tx0%-tx1%)<10ANDABS(ty0%-ty1%)<10:mb%=1:PROCselect:ENDPROC 15780PROCcxconv(tx0%):PROCcxconv(tx1%):PROCcyconv(ty0%):PROCcyconv(ty1%) 15790IFtx0%>tx1%:SWAPtx0%,tx1% 15800IFty0%>ty1%:SWAPty0%,ty1% 15810PROCsavew(f_cd$,&FFF,2,(tx1%-tx0%+1)*(ty1%-ty0%+1)) 15820ENDPROC 15830 15840DEFPROCfielddr:LOCALX%,Y% 15850PROCwtof(mh%):IFfile%>=0THEN 15860CASEwind%OF 15870WHEN0 15880X%=mx%:Y%=my%:PROCcxconv(X%):PROCcyconv(Y%):SYSswi%,sd44_%,X%,Y% 15890PROCmatchct:SYSswi%,sd70_%TOG% 15900IFG%>0ANDG%<>menufield%PROCcopyfield(G%):ENDPROC 15910tx0%=mx%-tx0%+8:ty0%=my%-ty0%+16:PROCcxconv(tx0%):PROCcyconv(ty0%) 15920X%=tx0%:Y%=ty0%:PROCforcefield(menufield%):SYSswi%,sd21_%,X%,Y%,menufield% 15930PROCupdatefield(menufield%):PROCmatchct 15940WHEN2:PROCyconv(my%,FNv_(7),mh%):SYSswi%,fnumber_%,my%,menufield% 15950PROCforce(mh%):PROCmatchct 15960WHEN3:PROCnewindex(menufield%) 15970ENDCASE 15980ELSE 15990IFmh%=w_index%ANDmi%=3:PROCseti(mh%,3,FNaddfield($FNia(mh%,3),menufield%)) 16000ENDIF 16010ENDPROC 16020 16030DEFPROCtextdr:LOCALX%,Y%,I%,T$ 16040PROCwtof(mh%):IFfile%>=0THEN 16050CASEwind%OF 16060WHEN0 16070tx0%=mx%-tx0%+8:ty0%=my%-ty0%+16:PROCcxconv(tx0%):PROCcyconv(ty0%) 16080X%=FNv_(12):Y%=FNv_(13):$sd%=STRING$(LENtext$," ") 16090SYSswi%,text_%,$sd%,txtx%,txty% 16100PROCupdline:SYSswi%,text_%,text$,tx0%,ty0% 16110SYSswi%,sd38_%,255 16120PROCupdline:PROCmatchct 16130ENDCASE 16140ELSE 16150ENDIF 16160ENDPROC 16170 16180DEFPROCsavedata:IFq%!12<>saveref%:ENDPROC 16190file$=FNzts(q%+44) 16200IFsavereason%=100:mi%=12:PROCseti(w_fsize%,11,file$):PROCmfsize:ENDPROC 16210PROCsavedata1:ENDPROC 16220 16230DEFPROCsavedata1:PROCclosew(w_save%) 16240outfile%=0:outfile%=OPENOUTfile$:IFoutfile%=0:ENDPROC 16250LOCALERROR 16260ONERRORLOCAL:RESTOREERROR:CLOSE#outfile%:PROCerr(0) 16270CASEsavereason%OF 16280WHEN1:PROCsavecard:PROCnewfn(f_cd$) 16290WHEN2:PROCsavecard1:PROCnewfn(f_cd$) 16300WHEN3:PROCsaveflist:PROCnewfn(f_fl$) 16310ENDCASE 16320RESTOREERROR:CLOSE#outfile% 16330OSCLI"settype "+file$+" "+STR$~savetype%:PROCloadmess 16340savereason%=-1:PROCnomenu 16350ENDPROC 16360 16370DEFPROCsavecard:LOCALI% 16380LOCALERROR:ONERRORLOCAL:RESTOREERROR:SYSswi%,sd38_%,255:PROCmatchct:PROCerr(0) 16390SYSswi%,sd38_%,fieldchr% 16400FORI%=1TOFNht:SYSswi%,gline_%,I% 16410PROCdprint($sd%):NEXT:SYSswi%,sd38_%,255 16420PROCmatchct:ENDPROC 16430 16440DEFPROCsavecard1:LOCALI% 16450LOCALERROR:ONERRORLOCAL:RESTOREERROR:SYSswi%,sd38_%,255:PROCmatchct:PROCerr(0) 16460SYSswi%,sd38_%,fieldchr% 16470FORI%=ty0%TOty1%:SYSswi%,gline_%,I% 16480PROCdprint(MID$($sd%,tx0%,tx1%-tx0%+1)):NEXT:SYSswi%,sd38_%,255 16490PROCmatchct:ENDPROC 16500 16510DEFPROCsaveflist:LOCALI% 16520IFFNv_(7)=0:PROCdprint("No fields in this file"):ENDPROC 16530FORI%=1TOFNv_(7):SYSswi%,sd17_%,11,I%TOG% 16540PROCdprint(LEFT$($sd%)):NEXT:ENDPROC 16550 16560DEFFNmousei:LOCALY%,T%:Y%=my%:T%=FNnindices:IFT%<=0:=0 16570PROCyconv(Y%,T%,mh%):=Y% 16580 16590DEFPROCdragfield:PROCfieldsz(menufield%) 16600!q%=w%(0):q%!8=bx%+tx0%:q%!12=by%+ty0%:q%!16=bx%+tx1% 16610q%!20=by%+ty1%:q%!24=0:q%!28=0:q%!4=5:PROCdrag5:ENDPROC 16620 16630DEFPROCdragtext:LOCALL%,x%,y%,T$,T%:PROCgetw(w%(0)):!q%=w%(0) 16640X%=FNv_(12):Y%=FNv_(13):L%=-1:tx0%=X%:SYSswi%,gline_%,Y% 16650G%=?(sd%+tx0%-1):WHILEtx0%>1ANDNOT(G%=32ANDL%=32)ANDG%<>255 16660tx0%-=1:L%=G%:G%=?(sd%+tx0%-1):ENDWHILE:tx0%-=(G%=32)+(L%=32)+(G%=255) 16670L%=-1:tx1%=X%:G%=?(sd%+tx1%-1) 16680WHILEtx1%<FNv_(6)ANDNOT(G%=32ANDL%=32)ANDG%<>255 16690tx1%+=1:L%=G%:G%=?(sd%+tx1%-1):ENDWHILE:tx1%+=(G%=32)+(L%=32)+(G%=255) 16700G%=?(sd%+X%-1):IFtx0%>tx1%ORtx0%=tx1%ANDG%=32:dragreason%=-1:ENDPROC 16710SYSswi%,sd44_%,X%,Y% 16720text$=MID$($sd%,tx0%,tx1%-tx0%+1):txtx%=tx0%:txty%=Y% 16730tx0%=margin%+16*tx0%-16:tx1%=margin%+16*tx1% 16740ty0%=-margin%-linegap%*FNv_(13):ty1%=ty0%+linegap%+4 16750q%!8=bx%+tx0%:q%!12=by%+ty0%:q%!16=bx%+tx1% 16760q%!20=by%+ty1%:q%!24=0:q%!28=0:q%!4=5:PROCdrag5:ENDPROC 16770 16780DEFPROCdragfield1:LOCALY% 16790PROCgetw(w%(2)):Y%=by%-menufield%*linegap%-margin%+linegap% 16800q%!8=bx%+margin%:!q%=w%(2):q%!12=Y%-32:q%!16=bx%+ex1%-margin% 16810q%!20=Y%:q%!24=0:q%!28=0:q%!4=5:PROCdrag5:ENDPROC 16820 16830DEFPROCdragcard:IFFNdialogue:ENDPROC 16840!q%=w%(0):PROCgetw(!q%) 16850q%!8=mx%:q%!12=my%:q%!16=mx%:q%!20=my% 16860q%!24=bx%+ex0%+margin%:q%!28=by%+ey1%-margin%-FNht*linegap% 16870q%!32=bx%+ex0%+margin%+FNwd*16 16880q%!36=by%+ey1%-margin%:q%!4=6:SYS"Wimp_DragBox",,q% 16890ENDPROC 16900 16910DEFPROCcxconv(RETURN X%):PROCxconv(X%,FNwd,w%(0)):ENDPROC 16920DEFPROCcyconv(RETURN Y%):PROCyconv(Y%,FNht,w%(0)):ENDPROC 16930 16940DEFPROCyconv(RETURN Y%,T%,h%):PROCgetw(h%) 16950Y%=(by%-Y%-margin%)DIVlinegap%+1:IFY%<1Y%=1ELSEIFY%>T%Y%=T% 16960ENDPROC 16970 16980DEFPROCxconv(RETURN X%,T%,h%):PROCgetw(h%) 16990X%=(X%-bx%-margin%)DIV16+1:IFX%<1X%=1ELSEIFX%>T%X%=T% 17000ENDPROC 17010 17020DEFPROCsavew(f$,T%,r%,s%) 17030PROCsaveset(f$,T%,r%,s%) 17040PROCdialogue(w_save%):ENDPROC 17050 17060DEFPROCsaveset(f$,T%,r%,s%) 17070savereason%=r%:savet%=T%:saves%=s% 17080PROCseti(w_save%,2,f$):$FNva(w_save%,3)="sfile_"+RIGHT$("00"+STR$~T%,3) 17090ENDPROC 17100 17110DEFPROCCLOSE 17120IFFNv_(1)>0:closeok%=TRUE:PROCclosefile(TRUE) 17130ENDPROC 17140 17150DEFPROCprequit 17160IFFNv_(1)>0PROCackrec:PROCqquit 17170ENDPROC 17180 17190DEFPROCackrec:q%!12=ref%:SYS"Wimp_SendMessage",19,q%,task% 17200ENDPROC 17210 17220DEFPROCqquit:IFfn$<>unt$THEN 17230PROCstop(6,"Close files and quit",as$) 17240ELSE 17250w_aband%=FNcrwind(tw_aband%):PROCdialogue(w_aband%):dialreason%=2 17260ENDIF 17270ENDPROC 17280 17290DEFFNfname(T%):SYSswi%,sd17_%,9,T%TOG% 17300=$sd% 17310 17320DEFFNfname1(T%):IFT%<0:="N%":ELSESYSswi%,sd17_%,4,T%TOG% 17330IF(G%AND7)=7:="@"+FNfname(T%):ELSE="#"+FNfname(T%) 17340 17350DEFPROCflg0(T%):flg%=flg%ANDNOTT%:ENDPROC 17360DEFPROCflg1(T%):flg%=flg%ORT%:ENDPROC 17370DEFPROCflgx(T%):flg%=flg%EORT%:ENDPROC 17380DEFPROCflgm(M%,F%):flg%=(flg%ANDNOTM%)OR(F%ANDM%):ENDPROC 17390DEFPROCflg(T%,F%):flg%=(flg%ANDNOTT%)OR((F%<>0)ANDT%):ENDPROC 17400DEFFNflg(T%)=(flg%ANDT%)<>0 17410 17420DEFFNev(A$,s%,u%) 17430$sd%="N":IFs%$sd%+="S" 17440IFu%$sd%+="U" 17450SYSswi%,expand_%,A$,$sd% 17460=EVAL$sd% 17470 17480DEFPROCwtidy 17490LOCALI%:FORI%=2TOmaxw%:IFw%(I%)>0PROCclosew(w%(I%)) 17500NEXT:ENDPROC 17510 17520DEFPROCbuzz2:SYSswi%,beep_% 17530ENDPROC 17540 17550DEFPROCfinfo(f%) 17560LOCALL%,T$,T%:T%=menufield%:dialreason%=f% 17570w_finf%=FNcrwind(tw_finf%):PROCgetw(w%(0)):SYSswi%,sd17_%,1,T%TOG% 17580L%=G%:SYSswi%,sd17_%,9,T%TOG% 17590T$=$sd%:IFT$="?"T$="" 17600SYSswi%,sd17_%,10,T%TOG% 17610SYSswi%,sd17_%,4,T%TOG% 17620PROCunselall(w_finf%):PROCseti(w_finf%,5,T$) 17630PROCseti(w_finf%,2,STR$T%):PROCseti(w_finf%,20,STR$L%) 17640IFINSTR($sd%,"K"):PROCseli(w_finf%,6) 17650IFG%AND8:PROCseli(w_finf%,7) 17660IFG%AND128:PROCseli(w_finf%,8) 17670IFG%AND64:PROCseli(w_finf%,9) 17680G%=G%AND7:CASEG%OF 17690WHEN0:PROCseli(w_finf%,11) 17700WHEN7:PROCseli(w_finf%,10):G%=0 17710OTHERWISE:PROCseli(w_finf%,12) 17720ENDCASE:PROCseti(w_finf%,13,STR$G%) 17730IFNOTf%THEN 17740exi0%=-1:exi1%=-1:RESTORE17790 17750FORT%=0TO6:READL%:PROCiset(w_finf%,L%,&40F000,0):NEXT 17760ELSE:exi0%=2:exi1%=20 17770ENDIF 17780PROCdialogue(w_finf%):ENDPROC 17790DATA6,18,20,21,2,3,4 17800 17810DEFPROCcopyfield(t%) 17820LOCALL%,T$,T%:T%=menufield%:menufield%=t%:dialreason%=TRUE 17830w_finf%=FNcrwind(tw_finf%):PROCgetw(w%(0)):SYSswi%,sd17_%,1,T%TOG% 17840L%=G%:SYSswi%,sd17_%,9,T%TOG% 17850T$=$sd%:IFT$="?"T$="" 17860T$=FNnewfd(T$) 17870SYSswi%,sd17_%,10,T%TOG% 17880SYSswi%,sd17_%,4,T%TOG% 17890PROCunselall(w_finf%):PROCseti(w_finf%,5,T$) 17900PROCseti(w_finf%,2,STR$t%):PROCseti(w_finf%,20,STR$L%) 17910IFINSTR($sd%,"K"):PROCseli(w_finf%,6) 17920IFG%AND8:PROCseli(w_finf%,7) 17930IFG%AND128:PROCseli(w_finf%,8) 17940IFG%AND64:PROCseli(w_finf%,9) 17950G%=G%AND7:CASEG%OF 17960WHEN0:PROCseli(w_finf%,11) 17970WHEN7:PROCseli(w_finf%,10):G%=0 17980OTHERWISE:PROCseli(w_finf%,12) 17990ENDCASE:PROCseti(w_finf%,13,STR$G%) 18000exi0%=2:exi1%=20 18010ENDIF 18020PROCdialogue(w_finf%):ENDPROC 18030 18040DEFPROCscrsz 18050!workbuf%=4:workbuf%!4=5:workbuf%!8=11:workbuf%!12=12:workbuf%!16=-1 18060SYS"OS_ReadVduVariables",workbuf%,workbuf%+24 18070q%!32=(workbuf%!32)<<(workbuf%!24):q%!36=(workbuf%!36)<<(workbuf%!28) 18080ENDPROC 18090 18100DEFPROCfindfield:LOCALX%,Y% 18110PROCgetw(w%(0)):SYSswi%,sd17_%,2,menufield%TOG% 18120X%=G%:SYSswi%,sd17_%,3,menufield%TOG% 18130Y%=G%:SYSswi%,sd44_%,X%,Y% 18140Y%=-Y%*linegap%-margin%+linegap%/2:X%=X%*16+margin%-8 18150PROCmatchct:PROCgetw(w%(0)) 18160MOUSETObx%+X%,by%+Y%:PROCfront(w%(0),-1,-1):ENDPROC 18170 18180DEFPROCscrollto(X%,Y%,h%):IFh%<0ENDPROC:ELSEPROCgetw(h%) 18190IFX%>=x0%-bx%ANDX%<=x1%-bx%ANDY%<=y1%-by%-32ANDY%>=y0%-by%ENDPROC 18200scx%=X%-(x1%-x0%)DIV2:scy%=ABSY%-(y1%-y0%)DIV2 18210IFscx%<0scx%=0 18220IFscy%<0scy%=0 18230PROCopen(h%,x0%,y0%,x1%,y1%,scx%,-scy%,bhandle%) 18240ENDPROC 18250 18260DEFPROCfindct:PROCgetct:PROCscrollto(q%!8,q%!12,!q%):ENDPROC 18270 18280DEFPROCstatus:w_status%=FNcrwind(tw_status%) 18290LOCALI%,T%,T$,s$:s$=STRING$(12," ") 18300PROCunselall(w_status%):T%=0 18310IFFNv_(1)=1THEN 18320T$=LEFT$(FNfilename+STRING$(11," "),11) 18330T$+=RIGHT$(s$+STR$ABSfsize%(0),10)+" (CREATING) (CREATING) " 18340IFT%<8:PROCseti(w_status%,T%+15,T$):T%+=1 18350ENDIF 18360WHILET%<8:PROCseti(w_status%,T%+15,""):T%+=1:ENDWHILE 18370IFstopboxes%:PROCseli(w_status%,23) 18380IFsound%:PROCseli(w_status%,24) 18390IFshadows%:PROCseli(w_status%,25) 18400IFpix%:PROCseli(w_status%,28) 18410IFsprsz%<=0:PROCshadei(w_status%,28) 18420PROCdialogue(w_status%):ENDPROC 18430 18440DEFPROCoscli(T$):IFASCT$=42:OSCLIT$:ENDPROC 18450LOCALI%,J%:SYS"Wimp_CommandWindow",1 18460PROCnormpoint:mode%=MODE:MODE12 18470*fx229 18480IFT$=""THEN 18490PROCnovars 18500LOCALERROR 18510ONERRORLOCALIFERR=17ANDT$="":PROCendoscli:ENDPROC:ELSEREPORT:PRINT 18520REPEATT$="":INPUTLINE"*"T$ 18530CASE TRUE OF 18540WHEN ASCT$=63ANDFNv_(1)=0:PRINTEVAL(MID$(T$,2)) 18550WHEN ASCT$=63ANDFNv_(1)>0:PRINTFNev(MID$(T$,2),0,0) 18560OTHERWISEOSCLIT$ 18570ENDCASE 18580UNTILT$="" 18590RESTOREERROR 18600ELSE 18610LOCALERROR 18620ONERRORLOCAL:RESTOREERROR:PROCendoscli:PROCerr(0) 18630TIME=0:OSCLIT$:SYS"OS_Byte",&86TO,I%,J% 18640IFTIME<150ANDI%+J%<>0REPEATUNTILINKEY0<0:PRINT''"Press a key... ";:IFGET 18650ENDIF 18660PROCendoscli:ENDPROC 18670 18680DEFPROCendoscli:*fx229,1 18690SYS"Wimp_CommandWindow",-1 18700SYS"Wimp_SetMode",mode%:OFF:PROCforce(-1) 18710PROCsdvars:ENDPROC 18720 18730DEFPROCupdatefield(T%):LOCALX%,L%:PROCfieldsz(T%) 18740!q%=w%(0):q%!4=tx0%:q%!8=ty0%:q%!12=tx1%:q%!16=ty1%:PROCredraw(TRUE) 18750ENDPROC 18760 18770DEFPROCforcefield(T%):LOCALX%,L%:PROCfieldsz(T%) 18780SYS"Wimp_ForceRedraw",w%(0),tx0%,ty0%,tx1%,ty1%:ENDPROC 18790 18800DEFFNshowbranch:PROCreadpointer:IFmb%<>1ORmi%<>-3:=FALSE 18810LOCALT$,t$:T$=fn$::t$=FNleaf(T$):IFt$=T$:=TRUE 18820OSCLI"*filer_opendir "+LEFT$(T$,LENT$-LENt$-1):=TRUE 18830 18840DEFPROCwalign:LOCALX%,Y% 18850X%=panew%+8:Y%=900-paneh% 18860PROCopen(w%(0),X%,Y%,X%+paneh%,Y%+paneh%,0,0,-1) 18870LOCALI%:FORI%=2TOmaxw%:IFw%(I%)>0THEN 18880PROCalign1(I%):PROCopen(w%(I%),tx0%,ty0%,tx1%,ty1%,0,0,-1) 18890ENDIF:NEXT:ENDPROC 18900 18910DEFPROCreleasepr:IFpstream%>0:CLOSE#pstream% 18920printer%=-2:pstream%=0:ENDPROC 18930 18940DEFPROCasccard 18950LOCALh%,I%,T%:T%=OPENINfile$:IFT%=0:ENDPROC 18960I%=1:h%=FNht:WHILEI%<=h%ANDNOTEOF#T%:$sd%=GET$#T% 18970SYSswi%,sd00_%,sd%,I% 18980I%+=1:ENDWHILE:CLOSE#T%:SYSswi%,sd38_%,255 18990SYSswi%,sd38_% 19000PROCforcecard:PROCnoscrap:ENDPROC 19010 19020DEFPROCgetpass:w_passw%=FNcrwind(tw_passw%) 19030PROCseti(w_passw%,0,"File "+FNfilename+", password:") 19040PROCseti(w_passw%,1,""):PROCseti(w_passw%,2,""):PROCseti(w_passw%,5,"") 19050PROCdialogue(w_passw%):ENDPROC 19060 19070DEFPROCgetpass1:w_passw1%=FNcrwind(tw_passw1%) 19080PROCseti(w_passw1%,1,""):PROCdialogue(w_passw1%):ENDPROC 19090 19100DEFPROCnewfn(RETURN T$):IFFNu(file$)<>"<WIMP$SCRAP>"T$=file$ 19110ENDPROC 19120 19130DEFPROCreadparams:LOCALI%,F% 19140stopboxes%=TRUE:sound%=TRUE:shadows%=TRUE:tools%=TRUE:pix%=FALSE 19150sprsz%=0:dplen%=66:dpwid%=79:f_cd$="Card":f_cf$="MStoreFile" 19160f_fl$="FieldList":fieldchr%=35:encrypt%=FALSE 19170F%=OPENIN(FNdir+"Params") 19180IFF%:WHILENOTEOF#F%:PROCreadparam(GET$#F%):ENDWHILE:CLOSE#F% 19190IFsprsz%>50THEN 19200sprsz%=50:DIM sprbuf% sprsz%,colours% 366 19210!sprbuf%=sprsz%:sprbuf%!16=0:SYS"OS_SpriteOp",&109,sprbuf% 19220ELSE 19230sprsz%=0 19240ENDIF 19250pix%=sprsz%>0:IFencrypt%encrypt%=1 19260PROCreadflags:ENDPROC 19270 19280DEFPROCreadparam(T$) 19290T$=FNs1(T$):IFT$=""ORASCT$=ASC";"ENDPROC 19300LOCALV$,T%,on,off:on=TRUE:T%=INSTR(T$," "):IFT%=0ENDPROC 19310V$=MID$(T$,T%):T$=LEFT$(T$,T%-1):V$=FNs1(V$) 19320T%=INSTR(V$,";"):IFT%V$=LEFT$(V$,T%-1) 19330LOCALERROR:ONERRORLOCAL:RESTOREERROR:ENDPROC 19340CASEFNlower(T$)OF 19350WHEN"shadow":shadows%=EVALV$ 19360WHEN"stopboxes":stopboxes%=EVALV$ 19370WHEN"sound":sound%=EVALV$ 19380WHEN"tools":tools%=EVALV$ 19390WHEN"fncard":f_cd$=V$ 19400WHEN"fncreate":f_cf$=V$ 19410WHEN"fnfields":f_fl$=V$ 19420WHEN"clearpass":clearpass%=EVALV$ 19430WHEN"pagelen":dplen%=EVALV$ 19440WHEN"pagewid":dpwid%=EVALV$ 19450WHEN"pictures":sprsz%=EVALV$ 19460WHEN"encrypt":encrypt%=EVALV$ 19470WHEN"fieldchar":fieldchr%=ASCV$:IFfieldchr%<32ORfieldchr%=127fieldchr%=35 19480ENDCASE:ENDPROC 19490 19500DEFFNs1(T$):WHILEASCT$=32:T$=MID$(T$,2):ENDWHILE 19510WHILERIGHT$(T$)=" ":T$=LEFT$(T$):ENDWHILE:=T$ 19520 19530DEFPROCswap7:PROCforce(w%(0)) 19540SYSswi%,sd57_%,"bit7"TOG% 19550G%=G%EOR1:SYSswi%,sd58_%,G%,"bit7" 19560SYSswi%,sd57_%,"bit7"TOG% 19570PROCflg(f_7bit%,G%):SYSswi%,sd39_% 19580ENDPROC 19590 19600DEFFNnindices:SYSswi%,sd57_%,"indices"TOG% 19610=G% 19620 19630DEFPROCmstore(A$,T$):LOCALT%,B% 19640LOCALERROR:ONERRORLOCAL:RESTOREERROR:PROCerr(60) 19650T$=FNdir+T$:T%=OPENIN(T$):IFT%=0PROCerr(59) 19660B%=BGET#T%:CLOSE#T%:IFFNs(A$)>""OSCLI"*Set MultiStore$Function "+A$ 19670PROCwriteflags:RESTOREERROR 19680ONERRORPROCerror(ERR,REPORT$,ERL,TRUE):PROCreport:PROCquit(FALSE) 19690PROCdelw(w_stop%):PROCdelw(w_save%):PROCdelw(w_pinfo%) 19700PROCdelw(w_pinfo2%):PROCdelw(w_shadow%) 19710PROCnormpoint 19720PROCnovars:Z%=taskhandle%:CHAIN(T$):END 19730 19740DEFPROCpdriver:IFFNv_(1)=1PROCerr(103) 19750PROCmstore("1","MultiStore"):ENDPROC 19760 19770DEFPROCcheckopen:IFFNv_(1)=1PROCerr(104) 19780ENDPROC 19790 19800DEFPROCmakeform:IFFNv_(1)<>0PROCerr(100) 19810LOCALI%,g%,h%,X%,Y%,T$ 19820SYSswi%,format_%,"Untitled" 19830SYSswi%,sd58_%,encrypt%,"Encrypt" 19840w%(0)=FNcrwind(tw%(0)):PROCmakepane 19850PROCinitfile:PROCfext:PROCinitpane:PROCtitle 19860X%=h%*80+panew%+8:Y%=900-h%*40-paneh% 19870PROCopen(w%(0),X%,Y%,X%+paneh%,Y%+paneh%,0,0,-1) 19880SYSswi%,sd57_%,"bit7"TOG% 19890PROCflg(f_7bit%,G%):SYSswi%,sd14_%,id_exb%,&35 19900PROCsetws:fn$=unt$ 19910PROCmatchct:PROCforcecard:PROCupdfds:PROCupdixs 19920ENDPROC 19930 19940DEFPROCglayout 19950LOCALERROR 19960ONERRORLOCAL:RESTOREERROR:IFERR=&80301PROCgetpass1:ENDPROC:ELSEPROCerr(0) 19970SYSswi%,password_%,FNsu(pass$) 19980pass$="" 19990SYSswi%,glayout_%,file$ 20000PROCinitpane:PROCfext:PROCforcecard 20010PROCmatchct:PROCupdfds:PROCupdixs 20020ENDPROC 20030 20040DEFPROCmatchct 20050SYS"Wimp_SetCaretPosition",w%(0),-1,FNv_(12)*16+margin%-16,-margin%-linegap%*FNv_(13),&1000020,-1 20060PROCshowcurs:PROCshowfld:PROCfindct:ENDPROC 20070 20080DEFPROCinsln:SYSswi%,sd61_% 20090PROCfext:PROCresize:PROCsetct(w%(0),-1,-1) 20100SYS "Wimp_BlockCopy",w%(0),-1E9,-1E9,1E9,-margin%-(FNv_(13)-1)*linegap%,-1E9,-1E9-linegap% 20110PROCmatchct:PROCupdline:ENDPROC 20120 20130DEFPROCdelln 20140PROCsetct(w%(0),-1,-1):SYSswi%,sd62_% 20150SYS "Wimp_BlockCopy",w%(0),-1E9,-1E9,1E9,-margin%-FNv_(13)*linegap%,-1E9,-1E9+linegap% 20160PROCfext:PROCresize:PROCmatchct:ENDPROC 20170 20180DEFPROCcopyln:LOCALT%,I%,J%,X%,Y%,T$ 20190T%=VAL$t_copies%:IFT%<1ORT%>99ENDPROC 20200LOCALERROR:ONERRORLOCAL:RESTOREERROR:PROCcopied:PROCerr(113) 20210FORI%=1TOT% 20220Y%=FNv_(13)+1 20230IFY%>FNv_(5)THEN 20240SYSswi%,height_%,Y% 20250ELSE 20260SYSswi%,sd44_%,FNv_(12),Y% 20270SYSswi%,sd61_% 20280ENDIF 20290SYSswi%,gline_%,Y%-1 20300SYSswi%,text_%,$sd%,1,Y% 20310SYSswi%,sd44_%,FNv_(12),Y% 20320J%=1:WHILEJ%<=FNv_(7) 20330SYSswi%,sd17_%,3,J%TOG% 20340IFG%=Y%-1THEN 20350SYSswi%,sd17_%,2,J%TOG% 20360X%=G%:SYSswi%,sd17_%,9,J%TOG% 20370T$=$sd%:REPEAT:T$=FNnewfd(T$) 20380SYSswi%,sd67_%,T$TOG% 20390UNTILG%=0ORVALT$>0 20400SYSswi%,sd17_%,1,J%TOG% 20410SYSswi%,field_%,FNv_(7)+1,T$,G%,X%,Y%TO,G% 20420SYSswi%,sd17_%,4,J%TOG% 20430SYSswi%,sd18_%,G%,4,FNv_(7) 20440PROCshowfld 20450ENDIF 20460IFINKEY0=27:PROCerr(114) 20470J%+=1:ENDWHILE 20480SYSswi%,sd44_%,FNv_(12),Y% 20490NEXT 20500PROCcopied:ENDPROC 20510 20520DEFPROCcopied:IFw%(2)>0PROCforce(w%(2)) 20530PROCfext:PROCresize:PROCsetct(w%(0),-1,-1) 20540PROCupdfds:PROCforcecard:PROCmatchct:ENDPROC 20550 20560DEFPROCsetbytes(s%):PROCchkresize 20570IFs%=0:PROCsetform:ENDPROC 20580s%=(s%<<10):IFs%<8000:PROCbuzz2:ENDPROC 20590fsize%(1)=-s%:fsize%(0)=5 20600SYSswi%,create_%,fn$,s%TOG% 20610PROCcreated:ENDPROC 20620 20630DEFPROCsetcards(s%):PROCchkresize 20640IFs%=0:PROCsetform:ENDPROC 20650LOCALT%:IFs%<2ORs%>2^31:PROCbuzz2:ENDPROC 20660fsize%(0)=-s%:fsize%(1)=5 20670PROCresize:T%=ABSfsize%(1) 20680SYSswi%,create_%,fn$,T%TOG% 20690PROCcreated:ENDPROC 20700 20710DEFPROCsetform 20720fsize%(0)=0:fsize%(1)=0 20730SYSswi%,create_%,fn$TOG% 20740SYSswi%,format_%,fn$ 20750PROCresize:PROCtitle:ENDPROC 20760 20770DEFPROCcreated:PROCsetws:PROCtitle:fsize%(0)=0 20780fsize%(1)=FNext:fsize%(0)=FNncards 20790ENDPROC 20800 20810DEFPROCsetws 20820CASEFNhdbyte(&35)OF 20830WHENid_bbc%:SYSswi%,wsbytes_%,2500TOG% 20840WHENid_exb%:SYSswi%,wsbytes_%,3500TOG% 20850WHENid_wcia%:SYSswi%,wsbytes_%,2500TOG% 20860ENDCASE 20870ENDPROC 20880 20890DEFPROCtitle 20900LOCALT$:T$="File":IFfsize%(0)=0ANDfsize%(1)=0:T$="Form" 20910T$+="="+FNfilename:PROCsettitle(w%(0),T$) 20920ENDPROC 20930 20940DEFPROCresize 20950IFfsize%(0)<>0ANDfsize%(1)<>0THEN 20960IFfsize%(0)<0fsize%(1)=FNfext:ELSEfsize%(0)=FNncards 20970ENDIF 20980PROCinitpane:ENDPROC 20990 21000DEFPROCchkresize 21010IFfn$=unt$PROCerr(105) 21020IFFNv_(7)=0PROCerr(106) 21030ENDPROC 21040 21050DEFFNfext:IFfsize%(0)=0ANDfsize%(1)=0:=0 21060IFfsize%(0)<0:=FNcalcext:ELSE=ABSfsize%(1) 21070 21080DEFFNext 21090SYSswi%,stat_%TOG% 21100=FNv_(22) 21110 21120DEFFNncards:IFfsize%(0)<0:=ABSfsize%(0) 21130SYSswi%,sd50_% 21140=FNv_(16) 21150 21160DEFFNcalcext:LOCALC%:C%=ABSfsize%(0):SYSswi%,sd68_%,C%TOG% 21170=G% 21180 21190DEFFNnsubs=FNhdbyte(&51) 21200 21210DEFPROCfsize:IFFNv_(7)=0:PROCerr(106) 21220w_fsize%=FNcrwind(tw_fsize%):PROCunselall(w_fsize%) 21230PROCseti(w_fsize%,11,f_cf$) 21240PROCseti(w_fsize%,6,STR$ABSfsize%(0)) 21250PROCseti(w_fsize%,7,STR$(ABSfsize%(1)DIV1024)) 21260$FNva(w_fsize%,10)="sfile_de8" 21270IFfsize%(0)=0ANDfsize%(1)=0THEN 21280PROCseli(w_fsize%,5) 21290ELSE 21300IFfsize%(0)<0PROCseli(w_fsize%,3):ELSEPROCseli(w_fsize%,4) 21310ENDIF 21320lcards$=$FNia(w_fsize%,6):lkbytes$=$FNia(w_fsize%,7) 21330PROCdialogue(w_fsize%):PROCnewdelay:ENDPROC 21340 21350DEFPROCnewdelay 21360IFprocess%>0ORw_fsize%>0delay%=0ELSEdelay%=2E9 21370ENDPROC 21380 21390DEFPROCfieldsz1(T%):LOCALgx0%,gy0%,gx1%,gy1% 21400DEFPROCfieldsz(T%) 21410LOCALL%,X%,Y%,G%,t% 21420PROCgetw(w%(0)):SYSswi%,sd17_%,1,T%TOL% 21430SYSswi%,sd17_%,2,T%TOX% 21440SYSswi%,sd17_%,3,T%TOY% 21450SYS"OS_ReadModeVariable",-1,5TO,,T% 21460ty0%=(-Y%*linegap%-margin%)ANDNOT((1<<T%)-1) 21470tx0%=X%*16+margin%-16:ty1%=ty0%+linegap%:tx1%=tx0%+L%*16+2 21480ENDPROC 21490 21500DEFPROCcurmouse:LOCALX%,Y% 21510X%=mx%:Y%=my%:PROCcyconv(Y%):PROCcxconv(X%) 21520SYSswi%,sd44_%,X%,Y% 21530PROCmatchct:ENDPROC 21540 21550DEFPROCdprint1(T$):BPUT#outfile%,T$;:ENDPROC 21560 21570DEFPROCdprint(T$):PROCdprint1(T$):PROCdnewl:ENDPROC 21580 21590DEFPROCdnewl:BPUT#outfile%,"":ENDPROC 21600 21610DEFPROCfspec:w_fspec%=FNcrwind(tw_fspec%):PROCunselall(w_fspec%) 21620PROCseli(w_fspec%,FNfspec):PROCdialogue(w_fspec%):ENDPROC 21630 21640DEFFNfspec:IFFNhdbyte(0)=&EA:=0 21650=FNnsubs+1 21660 21670DEFPROCcsize:w_csize%=FNcrwind(tw_csize%) 21680PROCseti(w_csize%,61,STR$FNv_(6)) 21690PROCseti(w_csize%,57,STR$FNv_(5)) 21700PROCdialogue(w_csize%):ENDPROC 21710 21720DEFPROCsettab 21730SYSswi%,sd14_%,FNv_(12),&10 21740SYSswi%,sd14_%,FNv_(13),&11 21750PROCstop(0,"The TAB position has now been","set to the caret position") 21760ENDPROC 21770 21780DEFPROCdelfield 21790SYSswi%,sd70_%TOG% 21800IFG%<=0PROCerr(107) 21810SYSswi%,sd17_%,9,G%TOG% 21820menufield%=G% 21830PROCstop(102,"Field "+STR$G%+":"+$sd%,rl$+"delete field ?") 21840ENDPROC 21850 21860DEFPROCcheckconv(T$):LOCALT%,B% 21870LOCALERROR:ONERRORLOCAL:RESTOREERROR:CLOSE#T%:ENDPROC 21880file$=T$:T%=OPENIN(file$):IFT%=0:ENDPROC 21890B%=BGET#T%:IFB%<>234ANDB%<>235:CLOSE#T%:ENDPROC 21900B%=BGET#T%+BGET#T%+BGET#T%+BGET#T%:CLOSE#T% 21910RESTOREERROR 21920IFB%=0B%=ft_form%ELSEB%=ft_data% 21930menufield%=B%:PROCstop(36,"Wrong file type","Convert to MultiStore ?") 21940ENDPROC 21950 21960DEFPROCupdfds:IFw%(2)>0:PROCmakeflist 21970DEFPROCupdixs:IFw%(3)>0:PROCmakeilist 21980ENDPROC 21990 22000DEFPROCopenfile:IFfsize%(0)=0PROCerr(108) 22010PROCclosefile(TRUE):PROCmstore("2:"+fn$,"MultiStore") 22020ENDPROC 22030 22040DEFPROCmarkfld(G%):IFw%(2)<=0ORG%=lcf%ENDPROC 22050IFG%>0PROCupdfld1(G%) 22060IFlcf%>0PROCupdfld1(lcf%) 22070ENDPROC 22080 22090DEFPROCupdfld1(T%) 22100!q%=w%(2):q%!4=0:q%!8=-margin%-T%*linegap% 22110q%!12=1E9:q%!16=q%!8+linegap%+4:PROCredraw(TRUE):ENDPROC 22120 22130DEFPROCsettitle(h%,T$):$FNta(h%)=T$:PROCgetw(h%) 22140SYS"Wimp_ForceRedraw",-1,x0%,y1%+4,x1%,y1%+44:ENDPROC 22150 22160DEFPROCtransfer:LOCALT$ 22170IFFNv_(1)<>0AND(fn$=unt$ORFNv_(7)=0ORfsize%(0)=0):PROCerr(109) 22180IFFNv_(1)>0T$=","+fn$:PROCclosefile(TRUE) 22190PROCmstore("1:"+T$,"MSTransfer") 22200 22210DEFPROCfastsort:IFFNv_(1)<>0PROCerr(110) 22220PROCmstore("","MSFastSort"):ENDPROC 22230 22240DEFFNindexname(T%):SYSswi%,istat_%,T%TOG%,P% 22250=$sd% 22260 22270DEFPROCnewindex(T%):LOCALf%,T$,t$ 22280f%=%100010011:IFT%>0THEN 22290t$=FNfname1(T%):LOCALI%,J%,K% 22300T$=FNu(FNfname(T%)):K%=FNnindices:I%=1:J%=1 22310WHILEI%<=K% 22320SYSswi%,istat_%,I%TOG%,P% 22330SYSswi%,upper_% 22340IFT$=$sd%ANDJ%=1:J%=2 22350IFLEFT$($sd%,LENT$)=T$:IFVALMID$($sd%,LENT$+2)>=J%:J%=VALMID$($sd%,LENT$+2)+1 22360I%+=1 22370ENDWHILE:IFJ%>1T$+="-"+RIGHT$("00"+STR$J%,3) 22380f%=%100010011:SYSswi%,sd17_%,4,T%TOG% 22390IF(G%AND7)<>7:f%=%000000000:IF(G%AND7)<>0f%=f%OR%010000000 22400ENDIF 22410PROCiwind(T$,t$,f%,0):ENDPROC 22420 22430DEFPROCiwind(T$,t$,f%,r%):LOCALT%,I% 22440w_index%=FNcrwind(tw_index%):PROCunselall(w_index%) 22450PROCseti(w_index%,1,T$):PROCseti(w_index%,3,t$) 22460RESTORE+1:FORI%=4TO11:READT%:IFf%ANDT%PROCseli(w_index%,I%) 22470NEXT:dialreason%=r%:PROCdialogue(w_index%):ENDPROC 22480DATA1,2,4,8,16,64,256,128 22490 22500DEFPROCeditindex:SYSswi%,istat_%,menuindex%TOG%,P% 22510PROCiwind($sd%,$(sd%+16),G%,1):ENDPROC 22520 22530DEFPROCdelindex 22540LOCALT%:T%=menuindex%OR(1<<27) 22550SYSswi%,makeindex_%,"","","",T% 22560PROCmakeilist:ENDPROC 22570 22580DEFFNnewfd(A$) 22590LOCALI%,T%,t%:I%=LENA$ 22600WHILEI%>0ANDMID$(A$,I%,1)>="0"ANDMID$(A$,I%,1)<="9":I%-=1:ENDWHILE 22610IFI%=LENA$:T%=4-I%:ELSET%=LENA$-I% 22620t%=VALMID$(A$,I%+1)+1:A$=LEFT$(A$,I%) 22630IFT%<4ANDt%>VALLEFT$("9999",T%):T%+=1:IFLENA$+T%>4A$=LEFT$(A$) 22640=A$+RIGHT$("000"+STR$t%,T%) 22650 22660DEFPROCchecktype:LOCALA% 22670A%=FNia(w_fsize%,6):IFlcards$<>$A%:PROCunselall(w_fsize%):PROCseli(w_fsize%,3):lcards$=$A% 22680A%=FNia(w_fsize%,7):IFlkbytes$<>$A%:PROCunselall(w_fsize%):PROCseli(w_fsize%,4):lkbytes$=$A% 22690ENDPROC 22700 22710DEFPROCwriteflags:LOCALT$ 22720T$=FNflgstr(sound%)+FNflgstr(stopboxes%)+FNflgstr(shadows%)+FNflgstr(pix%) 22730OSCLI"*Set MultiStore$Flags "+T$:ENDPROC 22740 22750DEFFNflgstr(T%):IFT%:="*":ELSE="-" 22760 22770DEFPROCstrflg(T$,RETURN T%) 22780IFT$="*":T%=TRUE:ELSEIFT$="-"T%=FALSE 22790ENDPROC 22800 22810DEFPROCreadflags:LOCALT$:T$=FNArfVar("MultiStore$Flags") 22820PROCstrflg(LEFT$(T$,1),sound%):PROCstrflg(MID$(T$,2,1),stopboxes%) 22830PROCstrflg(MID$(T$,3,1),shadows%):PROCstrflg(MID$(T$,4,1),pix%) 22840*unset MultiStore$Flags 22850ENDPROC 22860 22870DEFPROCnovars 22880ENDPROC 22890 22900DEFPROCpicpath:LOCALT$:IFLENfile$>230:ENDPROC 22910T$=FNArfVar("MultiStorePics$Path"):IFINSTR(FNu(T$),FNu(file$)):ENDPROC 22920file$+=".":WHILELENT$+LENfile$>229 22930REPEAT:T$=LEFT$(T$):UNTILRIGHT$(T$)=","ORT$="":T$=LEFT$(T$) 22940ENDWHILE:IFT$>"":file$+="," 22950OSCLI"Set MultiStorePics$Path "+file$+T$ 22960FORI%=0TOmaxf%:IFw%(I%,0)>0PROCforce(w%(I%,0)) 22970NEXT:ENDPROC 22980 22990DEFFNaddfield(T$,T%) 23000LOCALC%,t$,A$:t$=T$:WHILERIGHT$(t$)=" ":t$=LEFT$(t$):ENDWHILE 23010IFt$="":=FNfname1(T%) 23020IFRIGHT$(t$)="@"ORRIGHT$(t$)="#":=t$+FNfname(T%) 23030C%=FALSE:RESTORE+1:REPEAT:READA$:C%=RIGHT$(t$,LENA$)=A$ 23040UNTILC%ORA$="****":IFNOTC%T$+="+" 23050IFINSTR(T$,"@"):=T$+"@"+FNfname(T%) 23060IFINSTR(T$,"#"):=T$+"#"+FNfname(T%) 23070=T$+FNfname1(T%) 23080DATA+,-,*,/,AND,OR,NOT,>,<,=,(,",",":",****
�> <MultiStore$Dir>.MSCreate ?� By Merlyn Kline for Copyright (c) Minerva Software, 1989 : version$="2.02" ( 2�:�error(�,�$,�,�) < �init F3�:�error(�,�$,�,process%<4�process%>0):�report P�normpoint Z d� n�process%>0:�process x(È™"Wimp_PollIdle",,q%,delay%�reason% �2�taskhandle%>0:È™swi%,selecttask_%,taskhandle% ��respond(reason%) � �quit% ��CLOSE:�quit(�) �� � ���respond(reason%) ��reason%:�waitpoint �Ȏreason%� �� 0:�backgrnd �� 1:�redraw(�) �:� 2:�open(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28) �� 3:�closew(!q%) /� 6:�mouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20) � 7:�enddrag 3� 8:�key(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24) "� 9:�menuselect ,�17,18:�umess1 6�19:�umess2 @� J�normpoint T� ^ h��quit(T%):�normpoint r1$q%="TASK":È™"Wimp_CloseDown",taskhandle%,!q% |�novars ��T%��debug:�tidy:� �!È™swi%,killtask_%,taskhandle% �Ș � �ݤtask=otask% � ���init:otask%=Z%:�swinums �,appl$="MultiStore":pstream%=0:�releasepr �'� q% 2500, workbuf% 1500,dialct% 24 �7waiter%=0:file%=-1:v%=�initwimp:�v%<180:�12:�err(2) �!�waitpoint:È›(�dir+"BaseLib") �ț(�dir+"SwiList"):�swilist �'quit%=�:dialreason%=-1:dialogue%=-1 ackpending%=�:ackref%=-1 dragreason%=-1:dialogue%=-1 savereason%=-1 &file2%=-1:reason2%=-1 0menufile%=-1:menusub%=-1 :closeok%=� D)sbfile%=-1:pass$="":exi0%=-1:exi1%=-1 N"È™"OS_Byte",182,0,255 �,pterm% X0�(pterm%�&80)=0È™"OS_Byte",246,0,255�,pterm% b �pterm%=10pterm%=1:�pterm%=2 l$id_wcia%=42:id_exb%=43:id_bbc%=0 v� edbuf% 256,edval% 15 �?edfield%=-1:edicon%=-1:edrec%=-1:edx%=-1:$edval%="a0-9\-+." �&ss%=12:lc%=3:�readparams:�filevars �*�loadsprites:�defws:�defmenus:�version �$process%=1:checkref%=-1:delay%=0 �5lastact%=0:chunk%=7:fn$="":lcards$="":lkbytes$="" �Ias$="Are you sure ?":rl$="Really ":ri$=rl$+"interrupt ?":fi$="File: " �!unt$="UNTITLED":sy$="Sorry! " �'�23,255,0,126,126,126,126,126,126,0 ��baricon:� � � ��swinums �� � ��filevars � ;{n 6� ;{n window handles in w%(maxw%) - <=0 = Deleted @� ;{n (0)=Card (1)=Pane (2)=Fields (3)=Indices *2� ;{n tw%(maxw%) - pointers to window formats 4,� ;{n fsize%(1) - file size cards,bytes > � ;{n H0� ;{n maxw% = max array index (windows) R � ;{n \'ft_form%=&DE7:ft_data%=&DE8:maxw%=3 f$� w%(maxw%),tw%(maxw%),fsize%(1) p;f_filt%=1<<00:f_pane%=1<<01:f_macb%=1<<02:f_mace%=1<<03 z;f_fspc%=1<<04:f_fupp%=1<<05:f_sspc%=1<<06:f_supp%=1<<07 �;f_sadd%=1<<08:f_rspc%=1<<09:f_rupp%=1<<10:f_srup%=1<<11 �;f_stot%=1<<12:f_stit%=1<<13:f_sdas%=1<<14:f_wspc%=1<<15 �;f_wupp%=1<<16:f_wbnk%=1<<17:f_7bit%=1<<18:f_rejb%=1<<19 �;f_reja%=1<<20:f_rdsp%=1<<21:f_rtpn%=1<<22:f_rbpn%=1<<23 �;f_rpdt%=1<<24:f_rtpg%=1<<25:f_rtsu%=1<<26:f_rldu%=1<<27 �f_rlsu%=1<<28 �� � ���sdvars �șswi%,sd64_%,3�linegap% � margin%=8 �1�sound%:È™swi%,opt_%,10�G%:�șswi%,opt_%,9�G% �� -��checkprot:�T%:È™"FlexiFile_Address"�sd% � $��:process%=2:� .È™swi%,reset_%,taskhandle% 8T�process%=3�stop(1,"OK. Please remove original &","replace backup if necessary") Bdate$=�strdate1(�now,4) L�sdvars:�v_(1)<>0�err(3) Vprocess%=4:� ` j ��version t/�T$:T$=version$:笤prod:T$+=" *UNFINISHED*" ~8�seti(w_pinfo%,4,"v"+T$):$�tia(tw_status%,11)="v"+T$ �� � �,ݤprod=�version$,�version$,".")+1,1)="0" �ݤdebug=��prod ��-1��-2 � �>ݤinitwimp:first%=�:taskhandle%=�task:�taskhandle%<>0:=200 �G$q%="TASK":È™"Wimp_Initialise",200,!q%,"MultiStore"�!q%,taskhandle% �first%=�:=!q% � � ��tidy ��normpoint ��4,26:�0,2);:*fx4 *fx225,1 *fx229 Z%=0:È™swi%,killtask_% �:�:�" ";�:�quit(�) (+�;menuend%-menufree%" bytes menu space" 26�;endbuf%-curbuf%" bytes indirection buffer space" <'�;tbe%-tbs%" bytes template buffer" F� P Z��baricon:�first%:� d+!q%=-1:q%!4=0:q%!8=0:q%!12=102:q%!16=68 n0q%!20=%11000000000010:$(q%+24)="!"+�appl$,9) x$È™"Wimp_CreateIcon",,q%�baricon% �� � �!��error(err%,err$,erl%,quit%) �*�debug:�4,30:�err$" @ ";erl%:�quit(�) �.�normpoint:dragreason%=-1:@%=&90A:*fx229,1 ��i%,e%,t$,T$ �笤prod:err$+=" ("+Þ+")" �� ���:�error(�,�$,�,�) �9!q%=err%:$(q%+4)=err$:È™"Wimp_ReportError",q%,1,appl$ ��quit%:�quit(�) �� � +��report:�debug:�4:�:�" @ ";�:�quit(�) � " ݤdir , �T$:T$=�ArfVar(appl$+"$Dir") 6!�T$="":T$="&.!"+�appl$,9)+"." @��T$)<>".":T$+="." J=T$ T ^ݤArfVar(A$):�L%,V% h=È™"XOS_ReadVarVal",A$,workbuf%,254,0,3�,,L%;V%:�V%�1:L%=0 rworkbuf%?L%=13:=$workbuf% | ���umess1 �-ref%=q%!8:task%=q%!4:�task%=taskhandle%:� �mess%=q%!16 �Ȏmess%� ��0:�CLOSE:�quit(�) ��1:�datasaved ��2:�savedata ��3:�dataload ��4:ackpending%=� ��5:�dataopen ��6: ��7: ��8:�prequit �9: �&502: -�&400C0:�submenu(q%!20,q%!24,q%!28,q%+32) &�&80300:�ackrec 0� :� D N��dataopen X(�q%!40=ft_form%:�dataloadack:�err(1) b�q%!40<>ft_data%:� l"�dataloadack:mh%=-1:�checkopen vB�process%=0:笤dialogue:�mstore("2:"+�zts(q%+44),"MultiStore") �� � ���dataload �$�T$:T$=�zts(q%+44):del%=q%!12<>0 ��readpointer:�wtof(mh%) � ÈŽ � � �R� q%!40=&1000:file$=�zts(q%+44):�stop(38,�file$,29),rl$+" set picture path ?") �� q%!40=ft_data%�mh%=-2 ��dataloadack �C�process%=0笤dialogue:�checkopen:�mstore("3:"+T$,"MultiStore") �� q%!40=&FFD �mh%=-2 �*�process%=0:笤dialogue:�checkconv(T$) �0� q%!40=ft_form%�mh%=-2:�dataloadack:�err(1) x� (q%!40=ft_form%�q%!40=ft_data%)�file%>=0�wind%<2:�dataloadack:file$=T$:�stop(100,�leaf(file$),rl$+"load layout ?") ]� q%!40=&FFF �file%>=0�wind%=0:�dataloadack:file$=T$:�stop(26,"",rl$+"load ASCII card ?") � � * 4 ��noscrap >�del%:*remove <Wimp$Scrap> H� R \��datasaved:�dialogue:� f�readpointer:�wtof(mh%) p ÈŽ � � zA� q%!40=&FFF �file%>=0�(wind%=6�wind%=7�wind%=0):�datasaveack �� �� � � ��err(E%) �9�T$,A$:�file%>=0A$=", "+fi$+�filename+" - ":�A$=" - " �@%=&90A:*fx229,1 � ÈŽE%� ��0:T$=�$ �0�1:T$="To use a format, drag it onto a card" �-�2:T$="Must be version 1.8 WIMP or later" �+�3:T$=sy$+"Too many files already open" �>�4:T$=sy$+"You can only run one RAMManager task at a time" �H�5:T$="To save, drag the icon to a directory viewer or another task" c�6:T$="Couldn't open file: "+�$:�$="Data lost":T$+=" (Ensure the disc is not write protected)" %�7:T$="Couldn't open format: "+�$ (�10:T$="Unbalanced quote marks ("")" $ �11:T$="Unbalanced brackets" .1�16:T$="Field names must start with a letter" 8&�24:T$="Field assignment expected" B%�25:T$="Field name not specified" L#�41:T$="Printer already in use" V9�46:T$="Exporting report"+A$+�$+" (export cancelled)" `E�47:T$="The two new passwords must be identical. Please re-enter" j1�50:T$="Can't recognise format of setup file" t<�51:T$="You must specify the current password correctly" ~�59:T$="Program not found" �0�60:T$=�$+" - Can't load requested software" �E�100:T$=sy$+"You can't create a file/format when others are open" �K�101:T$="Please specify full pathname or drag icon to directory viewer" �J�102:T$="Please drag the icon to a directory viewer, NOT another task" �G�103:T$=sy$+"No access to the printer driver while creating a file" �B�104:T$=sy$+"You can't open a file while you are creating one" �D�105:T$=sy$+"You must save the file before you can set the size" �H�106:T$="Please design the card layout before setting the file size" �:�107:T$="The caret must be in the field to be deleted" �*�108:T$="This is a format, not a file" �J�109:T$=sy$+"You can't transfer cards into a format or undefined file" �B�110:T$=sy$+"You can't sort a file while you are creating it!" 2�111:T$="Index names must start with a letter" >�112:T$="Please enter a suitable expression for the index" &�113:T$=�$+" - copy not completed" �114:T$="Copy interrupted" (+�115:T$="Please use unique field names" 21�116:T$="Sorry - BBC files are not available" <&:T$="Unrecognised internal error" F� P%�debug:T$+=" ("+Þ+") ["+�E%+"]" Z �99,T$ d n��initfile x7flg%=0:�tools%:flg%=f_pane%:fsize%(0)=0:fsize%(1)=0 �� � ���closefile(T%) ��T%� �șswi%,close_%�S% �� �șswi%,abandon_% ��remove �� ��ready:�delfilews �w%(0)=-1E9:closeok%=� �� � ��remove:�:��:��:� �fn$<>unt$:�"*remove "+fn$ � " , ��align(I%):�tx1%-tx0%>108:� 6��align1(I%) @(tx0%=I%*40-40+panew%+8:tx1%=tx0%+440 J#ty1%=900-I%*40+40:ty0%=ty1%-320 T� ^ h��makepane r#�P%:P%=�crwind(tw%(1)):w%(1)=P% |C�getw(P%):paneh%=y1%-y0%:panew%=x1%-x0%:�wext(P%,panew%,paneh%) �� � ���makeflist:�X%,Y%,P%,T% �6P%=�makewind(2):T%=�ta(P%):$T%="Fields="+�filename � T%=�$T%+4:È™swi%,sd64_%,1�G% ��G%<T%G%=T% �X%=G%:�X%<21X%=21 �Y%=�v_(7):�Y%<2Y%=2 �3�wext(P%,X%*16+margin%*2,Y%*linegap%+margin%*2) �� � ���makeilist:�X%,Y%,T%,P% �7P%=�makewind(3):T%=�ta(P%):$T%="Indices="+�filename T%=�$T%+4:È™swi%,sd64_%,2�G% �G%<T%G%=T% X%=G%:�X%<23X%=23 &Y%=�nindices:�Y%<2Y%=2 05�wext(P%,X%*16+margin%*2,Y%*linegap%+margin%*2):� : Dݤmakewind(T%):�P%,I%,K% N4K%=w%(T%)>0:�K%�getw(w%(T%))��readblock(tw%(T%)) X2tx0%=x0%:ty0%=y0%:tx1%=x1%:ty1%=y1%:�align(T%) b/�delfilew(T%):P%=�crwind(tw%(T%)):w%(T%)=P% l,�open(P%,tx0%,ty0%,tx1%,ty1%,0,0,-1):=P% v �1ݤcrwind(T%):È™"Wimp_CreateWindow",,T%�T%:=T% � ���initpane �lcx%=-1:lcy%=-1:lcf%=-1 � �showcurs:�showfld:�showsize �� � �+��showcurs:�X%,Y%:X%=�v_(12):Y%=�v_(13) ��X%=lcx%�Y%=lcy%:� �1�seti(w%(1),15,�X%+","+�Y%):lcx%=X%:lcy%=Y%:� � ���showfld:È™swi%,sd70_%�G% ��G%=lcf%:� �T%,T$ T%=G%:�G%>0� È™swi%,sd17_%,11,G%�G% T$=�$sd%,16) *� 4-�markfld(T%):�seti(w%(1),17,T$):lcf%=T%:� > H��showsize RȎ�fspec � \&�0:�seti(w%(1),5,"BBC Compatable") f"�1:�seti(w%(1),5,"No Subsets") p#�5:�seti(w%(1),5,"24 + 8 Bits") z/:�seti(w%(1),5,�((�fspec-1)*8)+" Subsets") �� ��fsize%(0)<>0�fsize%(1)<>0� �*�seti(w%(1),12,�(�fsize%(1)�1024)+"K") �&�seti(w%(1),13,Ôfsize%(0)+" Cds") �� �9�seti(w%(1),12,"(Format)"):�seti(w%(1),13,"(Format)") �� �� � �(��delfilews:�I%:�w%(0)>0�delw(w%(0)) �!�I%=1�maxw%:�delfilew(I%):�:� � ���delfilew(I%) 4�w%(I%)>0:�closew(w%(I%)):�w%(I%)>0�delw(w%(I%)) � $��umess2 .ÈŽq%!16� 8$�6:�q%!8=loadref%:�datasaveack:� B� L� V `��backgrnd:�T% j�w_fsize%>0�checktype t�ackpending%:ackpending%=� ~� � ���template(T$) ��template1(T$,q%) �� � �/��template1(T$,q%):T$=�lower(T$):� I%,T%,L% �5I%=temp%+16:È•!I%>0��lower($(I%+12))<>T$:I%+=24:� �-�!I%<=0:�99,"Template '"+T$+"' not found" �CT%=temp%+!I%:L%=I%!4:�I%=0�L%�4:q%!I%=T%!I%:�:T%=q%+88+q%!84*32 ��(q%!56)�(1<<8)� �3q%!72=�workspace(q%!80):$(q%!72)=$T%:T%+=�$T%+1 �=�q%!76>0:q%!76=�workspace(�$T%+1):$(q%!76)=$T%:T%+=�$T%+1 � �q%!84>0� �I%=q%+88�q%+84+q%!84*32�32 �(I%!16)�(1<<8)� (3I%!20=�workspace(I%!28):$(I%!20)=$T%:T%+=�$T%+1 2=�I%!24>0:I%!24=�workspace(�$T%+1):$(I%!24)=$T%:T%+=�$T%+1 <� F� P� Zq%!64=sprites% d� n x$��opentemplate(A$):temp%=�-30000 ��"Load "+A$+" "+�~temp%:� � �ݤtemplate(T$) ��template1(T$,tbs%) �T%=tbs%:tbs%+=88+tbs%!84*32 �)�tbs%>tbe%:�99,"Template buffer full" �=T% � ���defws ��I% �bufsz%=&F00 �;� buffer% bufsz%:curbuf%=buffer%:endbuf%=buffer%+bufsz% � �opentemplate(�dir+"MSFrm3") :�template("stopbox"):È™"Wimp_CreateWindow",,q%�w_stop% �template("save") -q%!64=1:È™"Wimp_CreateWindow",,q%�w_save% "<�template("ProgInfo"):È™"Wimp_CreateWindow",,q%�w_pinfo% ,>�template("ProgInfo2"):È™"Wimp_CreateWindow",,q%�w_pinfo2% 6;�template("shadow"):È™"Wimp_CreateWindow",,q%�w_shadow% @bufsz%=&1F00 J6� template% bufsz%:tbs%=template%:tbe%=tbs%+bufsz% Ttw%(0)=�template("file") ^ tw%(1)=�template("filepane") h!tw%(2)=�template("FieldList") r!tw%(3)=�template("FieldList") | �opentemplate(�dir+"MSFrm4") �=tw_fsize%=�template("FSize"):w_fsize%=-1E9:tw_fsize%!64=1 �0tw_finf%=�template("FieldInfo"):w_finf%=-1E9 �1tw_status%=�template("Status"):w_status%=-1E9 �.tw_mess%=�template("message"):w_mess%=-1E9 �1tw_passw%=�template("password"):w_passw%=-1E9 �0tw_aband%=�template("abandon"):w_aband%=-1E9 �1tw_fspec%=�template("filespec"):w_fspec%=-1E9 �1tw_csize%=�template("cardsize"):w_csize%=-1E9 �.tw_index%=�template("index"):w_index%=-1E9 �4tw_passw1%=�template("password1"):w_passw1%=-1E9 �� � ���loadsprites ssize%=16*1024 �sprites% ssize% 2!sprites%=ssize%:È™"OS_SpriteOp",&109,sprites% &.È™"OS_SpriteOp",&10A,sprites%,�dir+"MSSpr" 0� : D��defmenus N�t$ X� mlist% 32,function% 51 bbufsz%=1100 lC� menufree% bufsz%:menuptr%=menufree%:menuend%=menufree%+bufsz% vmenustart%=menufree%:�+2 ��t$:m_main%=�crmenu(t$) �N�"#MultiStore,Info>w_pinfo%,Transfer,Fast Sort,Create,Status,Printer,Quit" ��t$:m_wind%=�crmenu(t$) �#�"#Window,Field,Index#,Tidy Up" ��t$:m_file%=�crmenu(t$) ��"#File,Size,Open,Abandon" �+� t_copies% 3:�t$:m_copies%=�crmenu(t$) ��"#Copies,$t_copies%(3)" ��t$:m_card1%=�crmenu(t$) �L�"#Card,Del.Line,Ins.Line,Copy Line>m_copies%,Clear,Size,Export>w_save%" ��t$:m_card%=�crmenu(t$) �E�"#Card,Tools>w_pinfo%,Card>m_card1%,File>m_file%,Window>m_wind%" ��t$:m_status%=�crmenu(t$) I�"#Statusmenu..,Align Windows,Update Media,Password,Extended Charset" �t$:m_index%=�crmenu(t$) �"#Index,Create,Edit,Delete" �t$:m_fields%=�crmenu(t$) *!�"#Field List,Export>w_save%" 4� > H��front(h%,X%,Y%) R �getw(h%) \�X%>=0x1%+=X%-x0%:x0%=X% f�Y%>=0y1%+=Y%-y0%:y0%=Y% p*�open(h%,x0%,y0%,x1%,y1%,scx%,scy%,-1) z� � �4��open(oh%,ox0%,oy0%,ox1%,oy1%,oscx%,oscy%,obh%) ��O% �'!q%=oh%:È™"Wimp_GetWindowState",,q% ��wtof(oh%):�file%>=0� �Ȏwind%� ��0:�openpane �:�wimpopen �� �� � ÈŽoh%� �:�wimpopen �� � e�oh%=dialogue%�shadows%:�getw(oh%):�open(w_shadow%,x0%+ss%,y0%-ss%,x1%+ss%,y1%-ss%,0,0,dialogue%) open%=O% $� . 8��wimpopen B5!q%=oh%:q%!4=ox0%:q%!8=oy0%:q%!12=ox1%:q%!16=oy1% L>q%!20=oscx%:q%!24=oscy%:q%!28=obh%:È™"Wimp_OpenWindow",,q% V� ` j��openpane t笤flg(f_pane%):�wimpopen:� ~�P%,f%:P%=w%(1) �"f%=oy1%-paneh%:�f%<oy0%f%=oy0% � �getw(P%) ��bhandle%=obh%�obh%=w%(0)� �obh%=P% �:�open%�open(P%,ox0%-panew%-4,f%,ox0%-4,oy1%,0,0,obh%) �� �,�getw(P%):f%=oy1%-paneh%:�f%<oy0%f%=oy0% � �wimpopen �'�getw(w%(0)):�obh%=-2:obh%=bhandle% �"f%=oy1%-paneh%:�f%<oy0%f%=oy0% �0�open(P%,x0%-panew%-4,f%,x0%-4,y1%,0,0,obh%) �� ��closew(!q%) �I% �wtof(!q%) (�file%>=0� 2ÈŽwind%� <,�0:�showbranch:�:��closeok%:�closeok:� F� P� Z�!q%=dialogue%:�tidydial dÈ™"Wimp_CloseWindow",,q% n!�nodial:�wtof(!q%):�file%>=0� xÈŽwind%� ��0:�closefile(�) ��2,3:�delw(w%(wind%)) �� �� � ÈŽ!q%� ��w_stop%:stopfile%=-1 ��w_status%:�delw(w_status%) ��w_passw%:�delw(w_passw%) ��w_mess%:�delw(w_mess%) ��w_finf%:�delw(w_finf%) �'�w_fsize%:�delw(w_fsize%):�newdelay ��w_aband%:�delw(w_aband%) ��w_fspec%:�delw(w_fspec%) �w_csize%:�delw(w_csize%) �w_index%:�delw(w_index%) �w_passw1%:�delw(w_passw1%) "� ,� 6� @ J��tidydial:�restorect TDdialreason%=-1:dialogue%=-1:�closew(w_shadow%):exi0%=-1:exi1%=-1 ^� h r��restorect |�:��:��:� �(È™ "Wimp_GetCaretPosition",,workbuf% �p�!workbuf%=dialogue%È™ "Wimp_SetCaretPosition",!dialct%,dialct%!4,dialct%!8,dialct%!12,dialct%!16,dialct%!20 �� � �;��delw(� T%):!q%=T%:È™"Wimp_DeleteWindow",,q%:T%=-1E9:� � �*ݤia(h%,i%):�geti(h%,i%):�chkii:=q%!28 �*ݤva(h%,i%):�geti(h%,i%):�chkii:=q%!32 �*ݤil(h%,i%):�geti(h%,i%):�chkii:=q%!36 � �1ݤtia(T%,i%):�q%:q%=T%+32*i%+88:�chkii:=q%!20 � �3��chkii:�(q%!24�&100)=0�1,"Icon not indirected" � <��geti(h%,i%):!q%=h%:q%!4=i%:È™"Wimp_GetIconState",,q%:� & 0.ݤta(h%):!q%=h%:È™"Wimp_GetWindowInfo",,q% :,�(q%!60�&100)=0�1,"Title not indirected" D =q%!76 N X��stop(r%,T$,U$) bdialreason%=r%:stopfile%=T% l#�-3��stopboxes%:mi%=3:�mstop:� v+�seti(w_stop%,0,T$):�seti(w_stop%,1,U$) �)�unselall(w_stop%):�dialogue(w_stop%) �dialreason%=r%:stopfile%=T% �� � ���dialogue(h%) ��X%,Y%:�nodial �'È™ "Wimp_GetCaretPosition",,dialct% �=dialfile%=file%:�nomenu:�readpointer:X%=mx%-200:Y%=my%-85 � �X%<0X%=0 ��Y%<96Y%=96 �2dialogue%=h%:�front(h%,X%,Y%):�setct(h%,-1,-1) ���Tlx:� �4�h%:�h%=dialogue%:�X%:�setct(h%,X%,�$�ia(h%,X%)) �h%<>-1:�:�X%:�X%<-1:h%=0 �h%=dialogue%�h%<0:� !��readpointer:�q%:q%=workbuf% *È™"Wimp_GetPointerInfo",,q% 41mx%=!q%:my%=q%!4:mb%=q%!8:mh%=q%!12:mi%=q%!16 >� H Rݤdialogue:�file% \6�dialogue%>=0�mh%<>dialogue%�mh%<>w_shadow%�nodial f=� p z$��mouse(mx%,my%,mb%,mh%,mi%,mo%) ��dragreason%>=0�mb%>255:� �7�wtof(mh%):�file%>=0�wind%=6�(mb%=1�mb%=4)�mi%<19:� ��mb%<16:�dialogue:� �3w_info%=w_pinfo%:�mb%=7:mb%=2:w_info%=w_pinfo2% � ÈŽmb%� ��2:�menu ��1,4:�select ��16,64:�startdrag �� �� � �6��seti(h%,i%,T$):T$=�T$,�il(h%,i%)):$�ia(h%,i%)=T$ �<�iconupd(h%,i%):�getct:�!q%=h%�q%!4=i%:�setct(h%,i%,�T$) � '��iset(h%,i%,B%,E%):�q%:q%=workbuf% $?!q%=h%:q%!4=i%:q%!12=B%:q%!8=E%:È™"Wimp_SetIconState",,q%:� . 8'��iconupd(h%,i%):�iset(h%,i%,0,0):� B L��force(h%) V ÈŽh%� `.È™"Wimp_ForceRedraw",h%,-1E9,-1E9,1E9,1E9 j� t� ~ ���readblock(p%) �7x0%=!p%:y0%=p%!4:x1%=p%!8:y1%=p%!12:� physical area �Fscx%=p%!16:scy%=p%!20:bhandle%=p%!24:� scroll offsets, stack depth �Jbx%=x0%-scx%:by%=y1%-scy%:� calculate physical co-ords of logical area �>ex0%=p%!40:ey0%=p%!44:ex1%=p%!48:ey1%=p%!52:� logical area �Agx0%=p%!24:gy0%=p%!28:gx1%=p%!32:gy1%=p%!36:� graphics window �.open%=(p%!28�&10000)<>0:� window open flag �� � ���getw(h%) �%!q%=h%:È™"Wimp_GetWindowInfo",,q% ��readblock(q%+4) � ��select �numi(mh%,mi%,mb%) (�file%>=0� 2ÈŽwind%� < �0:�mcard F �1:�mpane P�2:�mflist Z� d� n ÈŽmh%� x*�-2:�mb%=1��-1��-2:�oscli(""):��status ��w_stop%:�mstop ��w_save%:�msave ��w_finf%:�mfinf ��w_status%:�mstatus �$�w_mess%:�mi%=6:�closew(w_mess%) ��w_passw%:�mpassw ��w_fsize%:�mfsize ��w_aband%:�maband ��w_fspec%:�mfspec ��w_csize%:�mcsize ��w_index%:�mindex ��w_passw1%:�mpassw1 �� � � "��mindex:�mi%<>13�mi%<>12:� ,�mi%=13� 6�T$,t$,I%,f%,T% @:T$=�s($�ia(w_index%,1)):�T$<33��T$=48��T$>0:�err(111) J-t$=�s($�ia(w_index%,3)):�t$<33:�err(112) T f%=0:�wchi(w_index%):I%=q%:� ^ ÈŽ!I%� h�4:f%=f%�1 r�5:f%=f%�2 |�6:f%=f%�4 ��7:f%=f%�8 ��8:f%=f%�16 ��9:f%=f%�64 ��10:f%=f%�256 ��11:f%=f%�128 �� �I%+=4:�I%!-4<0 �&T%=-1:�dialreason%=1:T%=menuindex% �"È™swi%,makeindex_%,T$,t$,f%,T% �� ��makeilist:�nodial:� � ���mcard �X%,Y%:�curmouse:�mb%<>1:� È™swi%,sd70_%�G% #�G%>0:menufield%=G%:�finfo(�):� &*X%=�v_(12):Y%=�v_(13):È™swi%,sd11_%�G% 0�G%<>64�G%<>43:� :È™swi%,sd44_%,X%,Y% D$È™swi%,field_%,�v_(7)+1,"?",,,,7 NÈ™swi%,sd44_%,X%,Y% X�matchct:�updline:�resize b&�initpane:�updfds:È™swi%,sd70_%�G% l!�G%>0:menufield%=G%:�finfo(�) v� � �-��mflist:�Y%:Y%=my%:�yconv(Y%,�v_(7),mh%) �.menufield%=Y%:�mb%=1:�finfo(�):��findfield �� � ���mpane � ÈŽmi%� � �0:�csize ��1:�settab ��2:�delfield �+�3:�stop(103,"",rl$+"destroy layout ?") ��4,5:�fspec ��12,13,19:�fsize � � ��mpassw1 *�mi%<2�mi%>3:� 4<�mi%=3:pass$=$�ia(w_passw1%,1):�nodial:�glayout:��nodial >� H R��mstop:�mi%<3�mi%>4� \%�T%:T%=dialreason%:dialreason%=-1 f�mi%=3� p�closew(w_stop%) z ÈŽT%� � �2:closeok%=�:�closew(w%(0)) ��6:�CLOSE:�quit(�) ��20:stopboxes%=� ��26:�asccard ��27:È™swi%,setpass_%,"" �+�36:�"*settype "+file$+" "+�~menufield% �D�menufield%=ft_data%:�checkopen:�mstore("3:"+file$,"MultiStore") ��38:�picpath ��100:�nodial:�glayout:� ��101:�err(116) ��102:È™swi%,delfield_%�G% �%�updline:�resize:�matchct:�updfds ��103:È™swi%,clear_% �resize:�fext:�matchct �forcecard:�updfds:�updixs �104:�closefile(�) $�105:�delindex .� 8� B�T%=1:�CLOSE:�quit(�) L� V�closew(w_stop%):� ` j��msave t�mi%<>0� ~0�T$:T$=$�ia(w_save%,2):�T$=�leaf(T$):�err(5) �1savetype%=savet%:task%=-1:file$=T$:�savedata1 �� � ���mfinf � ÈŽmi%� ��17:�closew(w_finf%) �)�7:�geti(w_finf%,7):�(q%!24)�(1<<21)� �+�geti(w_finf%,12):�((q%!24)�(1<<21))=0� �)�unseli(w_finf%,10):�seli(w_finf%,11) �� �� � �13,14,15 =�unseli(w_finf%,10):�unseli(w_finf%,11):�seli(w_finf%,12) �19 �T$,T%,B%,L%,K%,I% �w%(2)>0�force(w%(2)) (BT$=$�ia(w_finf%,5):T%=�$�ia(w_finf%,2):�T%<1T%=1��T%>255T%=255 2$B%=��up(T$):�B%<65�B%>90�err(16) <0L%=�$�ia(w_finf%,20):�L%<1L%=1��L%>255L%=255 F,B%=�$�ia(w_finf%,13):�B%<0B%=0��B%>6B%=6 PK%=�:�wchi(w_finf%):I%=q%:� Z ÈŽ!I%� d�6:K%=� n�7:B%=B%�8 x�8:B%=B%�128 ��9:B%=B%�64 ��10:B%=B%�7 ��11:B%=B%��7 �� �I%+=4:�I%!-4<0 �!È™swi%,sd18_%,B%,4,menufield% �șswi%,sd67_%,T$�G% �7�G%<>menufield%�G%>0�setct(w_finf%,5,�T$):�err(115) �șswi%,sd20_%,T$,menufield% ��dialreason%� �#�K%:È™swi%,makekey_%,menufield% �&�K%:È™swi%,removekey_%,menufield% �"È™swi%,flength_%,L%,menufield% 2�T%<>menufield%:È™swi%,fnumber_%,T%,menufield% menufield%=T% � "7�nodial:�resize:�initpane:�updline:�updfds:�matchct ,� 6� @ J ��mstatus T �T%,I%,A% ^ ÈŽmi%� h$�15:�w%(0)>0:�front(w%(0),-1,-1) r�12 |�13 �sound%=�:shadows%=�:pix%=� ��wchi(w_status%):I%=q%:� � ÈŽ!I%� ��24:sound%=� ��25:shadows%=� ��23:A%=� ��28:pix%=� �� �I%+=4:�I%!-4<0 �1�sound%:È™swi%,opt_%,10�G%:�șswi%,opt_%,9�G% ��A%<>stopboxes%� �C�A%stopboxes%=�:��stop(20,rl$+"disable these","stop boxes ?"):� �� � � �closew(w_status%):� & 0%��mpassw:�mi%=4:�closew(w_passw%) :�mi%<>3� D7�T$,t$:T$=�su($�ia(w_passw%,5)):È™swi%,sd63_%,T$�G% N7�G%=2:�setct(w_passw%,5,�$�ia(w_passw%,5)):�err(51) X5T$=�su($�ia(w_passw%,1)):t$=�su($�ia(w_passw%,2)) b�T$<>t$:�err(47) l<�T$="":�stop(27,fi$+�filename,rl$+"delete password ?"):� vÈ™swi%,setpass_%,T$ ��closew(w_passw%):� � ���mfsize � �T$,T%,t% �� �+��:��:�seti(w_fsize%,11,f_cf$):�err(0) � ÈŽmi%� ��12 �T$=$�ia(w_fsize%,11) �!秤u(T$),"$SCRAP>"):�err(102) �$�T$=�leaf(T$):f_cf$=T$:�err(101) �8�remove:f_cf$=T$:fn$=T$:T%=q%:�wchi(w_fsize%):t%=2:� � ÈŽ!T%� !�3:t%=0 !�4:t%=1 !� ! T%+=4:�T%!-4<0 !* ÈŽt%� !4#�0:�setcards(�$�ia(w_fsize%,6)) !>#�1:�setbytes(�$�ia(w_fsize%,7)) !H�2:�setform !R� !\�nodial:�showsize !f2�6,7:�unselall(w_fsize%):�seli(w_fsize%,mi%-3) !p5�3,4:�setct(w_fsize%,mi%+3,�$�ia(w_fsize%,mi%+3)) !z�13:�nodial !�� !�� !� !���maband:�T%:T%=dialreason% !� ÈŽmi%� !� �3:�fsize !�*�4:�nodial:�closefile(�):�T%=2�quit(�) !�� !�� !� !���mfspec:�T%,t% !� ÈŽmi%� !�6�6:t%=�fspec:�wchi(w_fspec%):T%=!q%:�T%>=0�T%<>t%� "�T%<>0� "È™swi%,subbytes_%,T%-1 "�resize "$� ".8�stop(101,rl$+"make this file","BBC compatable ?"):� "8� "B� "L�nodial "V�7:�nodial "`�:� "j "t��mcsize:�w%,h%,I% "~ ÈŽmi%� "��65:�nodial "��64 "�w%=�$�ia(w_csize%,61) "�h%=�$�ia(w_csize%,57) "��I%=1�2 "�șswi%,width_%,w% "�șswi%,height_%,h% "�� "�-�fext:�forcecard:�matchct:�resize:�nodial "�!�v_(5)<>h%��v_(6)<>w%:�buzz2 "��:� "� # ��startdrag # "dragreason%=-1:dragbutton%=mb% #�wtof(mh%):�file%>=0� #ÈŽwind%� #(�0 #2�mb%=16� #<dragreason%=4:�dragcard #F� #P�curmouse:È™swi%,sd70_%�G% #Zmenufield%=G% #d<�G%>0dragreason%=3:�dragfield:�dragreason%=101:�dragtext #n� #x�1 #� ÈŽmi%� #�'�6:dragreason%=1:�dragicon(mh%,mi%) #�� #��2 #�0menufield%=my%:�yconv(menufield%,�v_(7),mh%) #�dragreason%=3:�dragfield1 #�� #�� #� ÈŽmh%� #�6�w_save%:�mi%=3:dragreason%=5:�dragicon(w_save%,3) #�8�w_fsize%:�mi%=10:dragreason%=100:�dragicon(mh%,mi%) #�� #�� $� $ $ ��enddrag $"�readpointer $, �mh%<>-1� $6�T$ $@ÈŽdragreason%� $J�1:�carddr $T�3:�fielddr $^�4:�carddr1 $hA�5:�savereq(�leaf($�ia(w_save%,2)),savet%,saves%,savereason%) $r9�100:�savereq(�leaf($�ia(w_fsize%,11)),&DE7,�ext,100) $|�101:�textdr $�� $�� $��dragreason%=4:�carddr1 $�� $�dragreason%=-1:menufile%=-1 $�� $� $�,��unseli(h%,i%):�iset(h%,i%,&200000,0):� $� $�0��seli(h%,i%):�iset(h%,i%,&200000,&200000):� $�2��shadei(h%,i%):�iset(h%,i%,&400000,&400000):� $� $���unselall(h%) %�I%,i%:�wchi(h%) %(I%=q%:�:i%=!I%:�i%>=0:�unseli(h%,i%) %I%+=4:�i%<0:� %& %07��wchi(h%):È™"Wimp_WhichIcon",h%,q%,&200000,&200000 %:� %D %N ��menu %X�wtof(mh%):�file%>=0� %bÈŽwind%� %l�0,1:�cardmenu %v�2:�pop(m_fields%,-1) %��3:�pop(m_index%,-1) %�� %�� %� ÈŽmh%� %�$�-2:my%=64+7*44:�pop(m_main%,-1) %��w_status%:�statmenu %�� %�� %�� %� %�!��cardmenu:�pop(m_card%,-1):� %� %�1��statmenu:�v_(1)=1�mi%=15�pop(m_status%,-1) &� & &ݤpar(t$,s$,� i%):�i1% & i1%=i%+1:i%=�t$+s$,s$,i1%) &*=�t$,i1%,i%-i1%) &4 &>ݤcrmenu(menu$) &H.�menufree%+28>menuend%�99,"Menu area full" &R� m% &\menuptr%=menufree% &fi%=0 &pC� �menu$,1)="#"i%=1:menutitle$=�par(menu$,",",i%)�menutitle$="" &z$menuptr%=menutitle$ &�;menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0 &�3menuptr%!16=196-24:menuptr%!20=44:menuptr%!24=0 &�"menuptr%+=28:maxx%=�menutitle$ &��item$=�par(menu$,",",i%) &��menuitem(item$) &�� item$="" &�$m%=menufree%:m%!16=(maxx%*8+6)*2 &�menufree%=menuptr% &�=m% &� &���menuitem(text$) &�.�text$=""menuptr%!-24=(menuptr%!-24)�&80:� &�.�menuptr%+24>menuend%��99,"Menu area full" '�i%,flg% 'flg%=&00 'i%=�text$,">") '$<�i%>0subptr%=��text$,i%+1):text$=�text$,i%-1)�subptr%=-1 '.i%=�text$,"}") '8;�i%>0subptr%=��text$,i%+1):text$=�text$,i%-1):flg%+=&08 'B)��text$,1)="#"text$=�text$):flg%+=&02 'L;menuptr%!0=flg%:menuptr%!4=subptr%:menuptr%!8=&07000021 'V�text$,1)="$"� '`2!menuptr%+=&04:menuptr%!8+=&100:i%=�text$,"(") 'j3�i%>0�L%=��text$,i%+1):text$=�text$,i%-1)�L%=12 't8menuptr%!12=��text$,2):menuptr%!16=-1:menuptr%!20=L% '~text$=�L%," ") '�� '��text$<=12� '�$(menuptr%+12)=text$ '�� '�%I%=�workspace(�text$+1):$I%=text$ '�6menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=�text$+1 '� menuptr%!8=menuptr%!8 � &100 '�� '��text$>maxx%maxx%=�text$ '�� '�menuptr%+=24 '�� ( ( ݤworkspace(L%) (2� curbuf%+L%>endbuf%�99,"No more buffer space" (curbuf%+=L%:=curbuf%-L% (( (2��prep(menu%,tree%) (<�I%,T$:�clearts(menu%) (FÈŽmenu%� (P�m_main%:�mp_main (Z�m_card%:�mp_card (d�m_card1%:�mp_card1 (n�m_file%:�mp_file (x�m_wind%:�mp_wind (��m_status%:�mp_status (��m_index%:�mp_index (��m_fields%:�mp_fields (�� (�� (� (���mp_index (�menuindex%=�mousei (�1�menuindex%<=0�shade(menu%,1):�shade(menu%,2) (�� (� (� ��mp_card (�T%=menu%+28+0*24+4 )4�flg(f_pane%):�tick(menu%,0):!T%=-1:�:!T%=w%(1) )-�prep(m_file%,tree%):�prep(m_wind%,tree%) )"�prep(m_card1%,tree%):�matchct )"� ), )6��mp_fields:�v_(1)<>1:� )@È™swi%,sd64_%,1�G% )J-�saveset(f_fl$,&FFF,3,�v_(7)*G%+�v_(7)):� )T )^��mp_card1 )h$t_copies%="1" )r"�saveset(f_cd$,&FFF,1,�wd*�ht) )|� )� )� ��mp_file )�,�v_(7)=0�shade(menu%,0):�shade(menu%,1) )�)�fn$=unt$�fsize%(0)=0:�shade(menu%,1) )�� )� )� ��mp_wind )��w%(2)>0�tick(menu%,0) )��w%(3)>0�tick(menu%,1) )�� )� )� ��mp_main )�>�v_(1)<>0�(fn$=unt$��v_(7)=0�fsize%(0)=0):�shade(menu%,1) *L�v_(1)>0:�shade(menu%,2):�shade(menu%,3):�tick(menu%,3):�shade(menu%,5) *� * *&��mp_status *0$menu%=�filename *:!笤flg(f_7bit%)�tick(menu%,3) *D� *N *X$��pop(menu%,tree%):�process%>0:� *b�menu%<0:� *l�prep(menu%,tree%) *v,È™"Wimp_CreateMenu",,menu%,mx%-50,my%+32 *�openmenu%=menu% *�� *� *���nomenu *�(È™"Wimp_CreateMenu",,-1:openmenu%=-1 *�� *� *�+��nodial:�dialogue%>0�closew(dialogue%) *�� *� *���menuselect *��I% *�-I%=0:�mlist%!I%=q%!I%:I%+=4:�q%!(I%-4)=-1 +�readpointer +ÈŽopenmenu%� +�m_main%:�m_main + �m_card%:�m_card +*�m_status%:�m_status +4�m_index%:�m_index +>�m_fields%:�m_fields +H� +R�mb%=1� +\#�pop(openmenu%,mlist%):��nomenu +f� +p� +z� +� +���m_fields +�� +� +���m_main +�Ȏ!mlist%� +��0:�dialogue(w_info%) +��1:�transfer +��2:�fastsort +��3:�makeform +��4:�status +��5:�pdriver +�!�6:�v_(1)=0:�quit(�):��qquit ,� ,� , ,$ ��m_index ,.ÈŽ!mlist%� ,8�0:�newindex(-1) ,B�1:�editindex ,LG�2:�stop(105,"Index: "+�indexname(menuindex%),rl$+"delete index ?") ,V� ,`� ,j ,t��m_card ,~ÈŽ!mlist%� ,��0:�swpane ,��1:�m_card1 ,��2:�m_file ,��3:�m_wind ,�� ,�� ,� ,���m_wind ,��T%:T%=mlist%!4 ,�5�T%>-1�T%<maxw%-1:�w%(T%+2)>0:�closew(w%(T%+2)):� ,� ÈŽT%� ,��0:�fieldlist - �1:�index - �2:�wtidy -� -� -( -2��m_file -<ÈŽmlist%!4� -F �0:�fsize -P�1:�openfile -Z�2 -d�v_(7)=0� -n�closefile(�) -x� -�(�stop(104,"",rl$+"abandon layout ?") -�� -�� -�� -� -� ��m_card1 -�Ȏmlist%!4� -� �0:�delln -� �1:�insln -��2:�copyln -�+�3:�stop(103,"",rl$+"destroy layout ?") -� �4:�csize -�� .� . .��m_status ."ÈŽ!mlist%� .,�0:�walign .6�1:È™swi%,sd43_% .@�2:�getpass .J �3:�swap7 .T� .^� .h .r��submenu(menu%,X%,Y%,q%) .|�I% .�-I%=0:�mlist%!I%=q%!I%:I%+=4:�q%!(I%-4)=-1 .��prep(openmenu%,mlist%) .�'È™"Wimp_CreateSubMenu",,menu%,X%,Y% .�� .� .� ��clearts(mh%):�I%:I%=mh%+28 .�"�mh%<menustart%�mh%>menuend%:� .�� .�"!I%=!I%��1:I%!8=I%!8��&400000: .�I%+=24:�I%!-24�&80 .�� .� .���shade(mh%,I%) //mh%!(28+8+24*I%)=mh%!(28+8+24*I%)�&400000:� / /��tick(mh%,I%) /&'mh%!(28+24*I%)=mh%!(28+24*I%)�&01:� /0 /:��redraw(update%) /D�h%,T%:�update%� /N%È™"Wimp_UpdateWindow",,q% � more% /X� /b%È™"Wimp_RedrawWindow",,q% � more% /l� /v%h%=!q%:�wtof(h%):�readblock(q%+4) /�ȕ more% /�T%=�:�:��:T%=� /��T%� /�"�-3:�rectfill(�$):���:�err(0) /�� /��file%>=0� /�Ȏwind%� /��0:�drawcard /��2:�drawflist /��3:�drawilist /�� /�� /�� 0� 0�� 0!q%=h%:more%=�nextrectangle 0 � 0*� 04 0>��drawcard 0H�gcol(0,7):�gcol(0,128) 0R,�bx%+margin%,by%-margin%:È™swi%,wimp_%,1 0\� 0f 0p9��drawflist:�T%,X%,Y%,x%,y%:T%=&10000:�update%T%=T%�1 0z2�v_(7)=0�rectfill("No fields in this file"):� 0�/�bx%+margin%,by%-margin%-4:È™swi%,wimp_%,T% 0�șswi%,sd70_%�G% 0� �G%>0� 0�AX%=bx%:Y%=by%-margin%-G%*linegap%:y%=Y%+linegap%+3:x%=X%+5000 0��X%<gx0%X%=gx0% 0��x%>gx1%x%=gx1%-1 0��Y%<gy0%Y%=gy0% 0��y%>gy1%y%=gy1%-1 0�l�y%>=Y%�x%>=X%�24,X%;Y%;x%;y%;:�gcol(0,128+7):�gcol(0,1):�bx%+margin%,by%-margin%-4:È™swi%,wimp_%,&10001 0�� 0�� 0� 0�-��drawilist:�T%:T%=&20000:�update%T%=T%�1 16�nindices=0�rectfill("No indices in this file"):� 1/�bx%+margin%,by%-margin%-4:È™swi%,wimp_%,T% 1� 1$ 1.4ݤnextrectangle:�T%:È™"Wimp_GetRectangle",,q%�T% 18�readblock(q%+4):=T% 1B 1L��rectfill(T$) 1V�gcol(0,3):�I%,J%,L%,X%,Y% 1`L%=�T$*16+48 1j,X%=bx%+margin%:J%=gx0%-X%:X%=X%-J%+J%�L% 1t=J%=by%-gy1%-margin%:J%=J%-J%�linegap%:Y%=by%-margin%-4-J% 1~�J%=Y%�gy0%�-linegap% 1�%�X%,J%:�I%=X%�gx1%�L%:�T$" - ";:� 1��:� 1� 1���waitpoint 1�waiter%+=1 1�ș"Hourglass_On" 1�� 1� 1���normpoint 1�8È•waiter%>0:È™"Hourglass_Off":waiter%-=1:�:waiter%=0 1�� 1� 2 ��gcol(m%,c%) 2 !È™"Wimp_SetColour",(m%<<4)+c% 2� 2 2(��dataloadack 22!q%=20:q%!12=ref%:q%!16=4 2<$È™"Wimp_SendMessage",17,q%,task% 2F� 2P 2Z��datasaveack 2d<�ArfVar("Wimp$Scrap")="":�99,"<Wimp$Scrap> not defined" 2nA!q%=60:q%!12=ref%:q%!16=2:q%!36=-1:$(q%+44)="<Wimp$Scrap>"+�0 2x1È™"Wimp_SendMessage",17,q%,task%:ackref%=q%!8 2�� 2� 2���savereq(T$,t%,s%,r%) 2�:savereason%=r%:q%!32=my%:q%!28=mx%:q%!24=mi%:q%!20=mh% 2�8q%!16=1:q%!12=0:q%!36=s%:q%!40=t%:!q%=(�T$+53)�&FFFC 2�9$(q%+44)=T$+�5,�0):È™"Wimp_SendMessage",17,q%,mh%,mi% 2� saveref%=q%!8:savetype%=t%:� 2� 2�&��loadmess:�readpointer:�task%<0:� 2�+$(q%+44)=file$+�0:!q%=(�file$+49)�&FFFC 2�&q%!12=ref%:q%!16=3:q%!40=savetype% 2�?q%!20=mh%:q%!24=mi%:q%!28=mx%:q%!32=my%:q%!36=�fsize(file$) 2�$È™"Wimp_SendMessage",17,q%,task% 3ackpending%=�:� 3 3&ݤfsize(T$):�T%,s%:T%=�T$:�T%=0:=0 3"s%=�#T%:�#T%:=s% 3, 36ݤzts(T%):�T$ 3@È•?T%<>0:T$+=�?T%:T%+=1:� 3J=T$ 3T 3^)��key(h%,icon%,x%,y%,carh%,off%,key%) 3h(�wtof(h%):�file%>=0:�cardkey(key%):� 3r�F%:F%=� 3|ÈŽkey%� 3��9,&18A:�findct 3��13:�cursor(h%,icon%,1,0) 3��19:�swapcase 3�"�27:�dialogue%>=0�nodial:�F%=� 3��&181:笤prod:�quit(�) 3�#�&18F:�cursor(h%,icon%,-1,off%) 3�"�&18E:�cursor(h%,icon%,1,off%) 3�#�&19F:�cursor(h%,icon%,-5,off%) 3�"�&19E:�cursor(h%,icon%,5,off%) 3�(�&1AF,30:�cursor(h%,icon%,-1E9,off%) 3�$�&1AE:�cursor(h%,icon%,1E9,off%) 3� F%=� 3�� 4 �F%:� 4È™"Wimp_ProcessKey",key% 4� 4& 40��cardkey(key%) 4:0�F%,X%,Y%,T%:F%=�:X%=�v_(12):Y%=�v_(13):T%=0 4DÈŽkey%� 4N�9,&18A:�findct 4X�13:X%=1:Y%+=1 4b�19:È™swi%,sd11_%�G% 4l<�G%>64�G%<91key%=G%+32:��G%>96�G%<123key%=G%-32:�key%=G% 4v�&181:笤prod:�quit(�) 4��&18F:Y%-=1 4��&18E:Y%+=1 4��&19F:Y%-=5 4��&19E:Y%+=5 4��&1AF,30:Y%=1 4��&1AE:Y%=�v_(5) 4��&18C:X%-=1 4��&18D:X%+=1 4��&19C:X%-=5 4��&19D:X%+=5 4��&1AC:X%=1 4��&1AD:X%=�v_(6) 4��&19B,&1CD:È™swi%,sd70_%�G% 5T%=G%:È™swi%,sd15_% 5�updline:�T%>0�resize 5T%=0 5 �127:X%-=1:È™swi%,sd70_%�G% 5*T%=G%:È™swi%,sd16_% 54�updline:�T%>0�resize 5>T%=1 5H�&1AB,&1ED:�insln 5R�25:�delln 5\ F%=� 5f� 5p �key%>31�key%<255�key%<>127� 5zX%+=1:È™swi%,sd12_%,key% 5��updchr 5�� 5�"�X%<1X%=1:��X%>�v_(6)X%=�v_(6) 5�"�Y%<1Y%=1:��Y%>�v_(5)Y%=�v_(5) 5� �T%�X%<>�v_(12)�Y%<>�v_(13)� 5�șswi%,sd44_%,X%,Y% 5��matchct 5�� 5� �F%:� 5�ș"Wimp_ProcessKey",key% 5�� 5� 5�,��swapcase:�getct:T%=q%!20+�ia(!q%,q%!4) 63�?T%<123�?T%>96 ?T%-=32:��?T%<91�?T%>64 ?T%+=32 6*�getct:�?T%>31�setct(!q%,q%!4,q%!20+1) 6�getct:�iconupd(!q%,q%!4):� 6$ 6.+��getct:È™"Wimp_GetCaretPosition",,q%:� 68 6B=��setct(h%,i%,o%):È™"Wimp_SetCaretPosition",h%,i%,,,-1,o% 6L�i%>=0�findct 6V� 6` 6jݤnumi(h%,i%,b%) 6t ��T^w 6~�U%,D%,N%,T%,B%,W%,F%,S%,V% 6�ȕW%<>-1�F%=� 6��W%:�U%,D%,N%,T%,B% 6��W%=h%� 6��i%=U%�i%=D%� 6�F%=� 6�V%=�$�ia(W%,N%) 6�S%=1:�i%=D%:S%=-1 6��b%=1:S%=S%*10 6�V%+=S%:�V%<B%:V%=B% 6��V%>T%V%=T% 6��seti(W%,N%,�V%) 6�� 7 � 7 � 7=F% 7�w_finf%,3,4,2,255,1 7(�w_finf%,18,21,20,255,1 72�w_finf%,14,15,13,6,1 7<�w_csize%,56,58,57,255,1 7F�w_csize%,60,62,61,255,1 7P�-1,-1,-1,-1,-1,-1,-1 7Z 7d��cursor(h%,i%,s%,o%) 7n ��Tlx 7x �W%,T$,I% 7�ȕW%<>-1 7��W%:�W%<>h%� 7��W%<>-1:�:�W%:�W%<-1:W%=0 7�� 7�� 7��W%:�W%<>-1:T$+=�(W%) 7��W%<-1:T$=�T$) 7�;�key%=13:��T$)=i%:mi%=�(W%+100):mb%=1:mh%=h%:�select:� 7�/�s%=1E9:s%=�T$:��s%=-1E9:s%=1:�s%+=�T$,�i%) 7�ȕs%>�T$:s%-=�T$:� 7�ȕs%<1:s%+=�T$:� 7�I%=��T$,s%) 7�#�o%>�$�ia(h%,I%)o%=�$�ia(h%,I%) 8�setct(h%,I%,o%) 8� 8� 8"� 8,�w_save%,2,-100 86�w_passw%,5,1,2,-103 8@�w_passw1%,1,-103 8J"�w_finf%,5,exi0%,13,exi1%,-119 8T�w_fsize%,6,7,11,-112 8^�w_csize%,61,57,-164 8h�w_index%,1,3,-111 8r�-1 8| 8�ݤleaf(T$) 8� �I%,C% 8�$�((�T$,".")=0)�(�T$,":")=0))�=T$ 8�I%=�(T$) 8�� 8�C%=��T$,I%,1) 8� I%-=1 8��(I%<=0�C%=�"."�C%=�":") 8��I%>0�=�T$,�(T$)-I%-1) 8�=T$ 8� 8�3��wext(h%,x%,y%):!q%=0:q%!4=-y%:q%!8=x%:q%!12=0 8�'È™"Wimp_SetExtent",h%,q%:�force(h%) 9�getw(h%):�open%� 9�x1%-x0%>x%:x%+=x0%:�x%=x1% 9!�y1%-y0%>y%:y%=y1%-y%:�y%=y0% 9&.�open(h%,x0%,y%,x%,y1%,scx%,scy%,bhandle%) 90� 9:� 9D 9N ��process 9X-�dialreason%>=0�dialogue%>=0�ackpending%� 9bÈŽprocess%� 9l�1:�checkprot 9vQ�2:�stop(1,"Please place original","MultiStore disk in drive :0"):process%+=1 9��3:�checkprot 9��4:�startopen 9�process%=0 9�� 9� �newdelay 9�� 9� 9���dragicon(h%,i%) 9�"�x%,y%,ys%,tx0%,ty0%,tx1%,ty1% 9�,�getw(h%):ys%=y1%-y0%:x%=bx%:y%=y0%-scy% 9�1�geti(h%,i%):q%!8+=x%:q%!12+=y%+ys%:q%!16+=x% 9�0q%!20+=y%+ys%:q%!24=0:q%!28=0:!q%=0:�drag5:� 9� :<��drag5:�readpointer:�scrsz:tx0%=mx%-q%!8:ty0%=my%-q%!12 :=q%!24-=tx0%:q%!28-=ty0%:q%!32+=q%!16-mx%:q%!36+=q%!20-my% :!q%!4=5:È™"Wimp_DragBox",,q%:� : :*ݤlower(T$):�T$="":="" :4 �I%,C% :>�I%=1��T$:C%=��T$,I%) :H"�C%>64�C%<91�T$,I%,1)=�(C%+32) :R �:=T$ :\ :f$��wtof(T%):�J%:wind%=-1:file%=-1 :p-�J%=0�maxw%:�w%(J%)=T%:file%=0:wind%=J%:� :z�:� :� :� ��fext :� �x%,y% :�1y%=�ht*linegap%+margin%*2:�y%<paneh%y%=paneh% :�)x%=�wd*16+margin%*2:�x%<22*16x%=22*16 :�>!q%=0:q%!4=-y%:q%!8=x%:q%!12=0:È™"Wimp_SetExtent",w%(0),q% :��getw(w%(0)) :��x1%-x0%>x%:x%+=x0%:�x%=x1% :�!�y1%-y0%>y%:y%=y1%-y%:�y%=y0% :�1�open(w%(0),x0%,y%,x%,y1%,scx%,scy%,bhandle%) :�� :� :�"ݤht:È™swi%,sd57_%,"height"�G% ;!ݤwd:È™swi%,sd57_%,"width"�G% ;=G% ; ;$5��updchr:q%!4=margin%+�v_(12)*16-16:q%!12=q%!4+16 ;.!��updline:q%!4=-1E9:q%!12=1E9 ;80q%!8=-margin%-linegap%*�v_(13):q%!16=q%!8+32 ;B!q%=w%(0):�redraw(�):� ;L ;V��startopen ;`%T$=�ArfVar("MultiStore$Function") ;j Ȏ�T$� ;t�1:�makeform ;~� ;�*unset MultiStore$Function ;�process%+=1:� ;� ;���ready ;�� ;� ;� ��closeok ;��fn$<>unt$� ;�'�stop(2,"","Close file "+�filename) ;�� ;�Aw_aband%=�crwind(tw_aband%):�dialogue(w_aband%):dialreason%=1 ;�� <