FileSplitter v1.01 (Sun 27th February 94) Copyright Ainsley Pereira 1994 ver$="1.01 (27 Feb 1994)" q% &400, iicon% &400, spr% 8900, menu% 28+24*2 !iiend%=iicon%+&400:ip%=iicon% "Wimp_Initialise",200,&4b534154,"FileSplit" ,task% "Wimp_OpenTemplate",,".Templates" "Wimp_LoadTemplate",,q%,ip%,iiend%,-1,"split",0 ,,ip% "Wimp_CreateWindow",,q% split% "Wimp_LoadTemplate",,q%,ip%,iiend%,-1,"join",0 ,,ip% "Wimp_CreateWindow",,q% join% "Wimp_LoadTemplate",,q%,ip%,iiend%,-1,"out",0 ,,ip% "Wimp_CreateWindow",,q% out% "Wimp_LoadTemplate",,q%,ip%,iiend%,-1,"info",0 ,,ip% "Wimp_CreateWindow",,q% info% "Wimp_LoadTemplate",,q%,ip%,iiend%,-1,"me",0 ,,ip% "Wimp_CreateWindow",,q% "Wimp_LoadTemplate",,q%,ip%,iiend%,-1,"next",0 ,,ip% "Wimp_CreateWindow",,q% next% "Wimp_CloseTemplate" `!spr%=8900:spr%!4=0:spr%!8=16:spr%!12=16: "OS_SpriteOp",266,spr%,".Sprites" M$menu%="FileSplit"+ 0:menu%!12=&70207:menu%!16=160:menu%!20=44:menu%!24=0 Gmenu%!28=&00:menu%!32=info%:menu%!36=&7000031:$(menu%+40)="Info"+ Dmenu%!52=&80:menu%!56=-1:menu%!60=&7000031:$(menu%+64)="Quit"+ O!q%=-1:q%!4=0:q%!8=0:q%!12=68:q%!16=68:q%!20=&3002:$(q%+24)="!filesplit"+ "Wimp_CreateIcon",,q% icbar% sets(info%, 7, ver$) .joinptr%=0 :splitptr%=0 :splitto%=0 0jointo$="" :splitfrom$="" :splitdst$="" !jointotal%=0 :splittotal%=0 !#joinseqsize%=0 :splitseqsize%=0 "!joinname$="" :splitname$="" joinseq%=0 :splitseq%=0 initjoin: initsplit quit%= error "Wimp_Poll",%110000110001,q% event% event% redraw +% "Wimp_OpenWindow",,q% close -- q%!12=-2 barclick winclick .' "Wimp_ProcessKey",q%!24 !q%=1 quit%= 17,18: message quit% "Wimp_CloseDown",task%,&4b534154 close "Wimp_CloseWindow",,q% !q% join% : initjoin split% : initsplit message q%!16 0:quit%= filedrop redraw "Wimp_RedrawWindow",,q% more% more% x0%=q%!4-q%!20 y0%=q%!16-q%!24 "Wimp_ReadPixTrans",&100,spr%,"ampy",,,,q%+&300,q%+&310 "OS_SpriteOp",308,spr%,"ampy",x0%+18,y0%-302,0,q%+&300,q%+&310 "Wimp_GetRectangle",,q% more% filedrop q%!20 join% : q%!40 &1000: openjoin WH splitopen%= open(split%):splitopen%= :splitfrom$= getfd X openjoin joinopen%= open(join%) joinseq%=0 joinopen%= jointo$= getfd sets(join%, 2, "None") barclick (q%!8 %010)=%010 "Wimp_CreateMenu",,menu%,!q%-64,184 open(wh%) q%!&300=wh% "Wimp_GetWindowState",,q%+&300 m,q%!&31C=-1: "Wimp_OpenWindow",,q%+&300 getfd fd$="" fdchar$="" X<256 fdchar$<> fd$+=fdchar$ fdchar$= (q%?X) X+=1 File format 12 - original leafname CR terminated 1 - number of files 1 - file number 4 - total size a%,b%,totsize%,wrong%,file%,file$,area%:wrong%= file$= getfd file%= (file$) "OS_GBPB",4,file%,q%,12,0 joinname$="" joinname$=$q% joinname$<>$q% report("This is not the right file") wrong%= wrong% "OS_BGet",,file% joinseqsize% "OS_BGet",,file% a%<>joinseq% ` report("This file is out of sequence, please drag the correct file to the Join window") wrong%= wrong% "Hourglass_On" "OS_BGet",,file% "OS_BGet",,file% b%:totsize%=b%+(a%<<8) "OS_BGet",,file% "OS_BGet",,file% b%:totsize%+=(a%<<16)+(b%<<24) "OS_File",5,file$ ,,,,length%:length%-=18 "OS_Module",6,,,length% ,,area% "XOS_GBPB",3,file%,area%,length%,18 joinseq%=0 ) a%= (jointo$+"."+joinname$): joinptr%=0 "XOS_Find",&C3,jointo$+"."+joinname$ dst% "XOS_GBPB",1,dst%,area%,length%,joinptr% ,,,,joinptr% "XOS_Find",0,dst% "XOS_Module",7,,area% joinseq%+=1 joinseq%=joinseqsize% !q%=join%: "Wimp_CloseWindow",,q%: initjoin sets(join%, 2, joinseq%+" of "+ joinseqsize%) "Hourglass_Off" "OS_Find",0,file% winclick q%!12 split%: q%!16=11 dosplit out% : q%!16=2 "Wimp_CloseWindow",,q%+12 info% : q%!16=5 open(me%) next% : q%!16=1 makefile geticon(w, i): x,x$ =!(q%+&300)=w:!(q%+&304)=i: "Wimp_GetIconState",,q%+&300 /x$="":x=q%!&31C: ?x>31:x$+= ?x:x+=1: issel(w, i) q%!&300=w:q%!&304=i "Wimp_GetIconState",,q%+&300 =(q%!&318 1<<21) sets(w, i, s$) 7q%!&300=w:q%!&304=i: "Wimp_GetIconState",,q%+&300 $(q%!&31C)=s$ 7q%!&308=0:q%!&30C=0: "Wimp_SetIconState",,q%+&300 report(e$) sets(out%, 1, e$) open(out%) dosplit splitto%= issel(split%, 9) splitsize%=794*1024 issel(split%, 3) splitsize%=1584*1024 issel(split%, 4) splitsize%= geticon(split%,5))*1024 splitseq%=0 "OS_File",5,splitfrom$ ,,,,splittotal% *splitseqsize%=(splittotal%/splitsize%) splitseqsize%<>splittotal%/splitsize% splitseqsize%+=1 !q%=split% "Wimp_CloseWindow",,q% splitname$=splitfrom$ splitname$,".") 0 splitname$= splitname$, splitname$,".")+1) splitptr%=0 splitto% sets(next%, 0, "Please insert disc 1 of "+ splitseqsize%) open(next%) splitdst$="adfs::0.$." splitdst$=splitfrom$ splitdst$= splitdst$) splitdst$)="." makefile splitseq%=splitseqsize% makefile file% "Hourglass_On" )file%= (splitdst$+"Split"+ splitseq%) #file%,splitname$+ #file%=12 #file%,splitseqsize% #file%,splitseq% #file%,(splittotal% &FF) #file%,((splittotal%>>8) &FF) #file%,((splittotal%>>16) &FF) #file%,((splittotal%>>24) &FF) "OS_Find",&43,splitfrom$ src% "OS_Module",6,,,splitsize% ,,area% "XOS_GBPB",3,src%,area%,splitsize%,splitptr% "XOS_GBPB",1,file%,area%,splitsize%,18 "XOS_Module",7,,area% "OS_Find",0,src% "OS_Find",0,file% &splitseq%+=1:splitptr%+=splitsize% splittotal%-(splitseq%*splitsize%)