home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1996-10-08 | 16.7 KB | 560 lines |
- --> CD Catalogue
- This program and all documentation
- David Holden 1995
- A_$="1.30":
- 262343,D_%,E_%
- G_%:A%=1:B%=E_%:G%=H_%:H%=I_%:
- 262341,,E_%
- 262351,,L_%+100:
- L_%?108=4
- :E_%!100=K_%:
- 262342,,E_%+100:M_%=N_%:O_%=P_%:Q_$=$R_%
- 262342,,E_%:I%=
- T_(0)
- 262342,,E_%:E_%!4=0:
- 262340,,E_%:I%=
- T_(0)
- 262342,,E_%
- W_(X_%,Y_%)
- 262364,E_%!24
- 17,18:
- E_%!16
- 262351,,E_%+&C0:c_%=E_%!&C8:d_%=E_%!&C4:
- E_%!4=-1
- 0:!E_%=G_%:
- 262342,,E_%:!E_%=U_%:
- 262342,,E_%:$e_%="CDview Help":
- f_(g_$+".!Help")
- c_%=1
- 262356,,h_%,i_%,j_%
- k_%,l_%:i_%=!E_%:d_%=E_%!4:c_%=E_%!8:l_%=E_%!12:k_%=E_%!16:
- k_%=m_%
- 1:P_%=O_%:N_%=M_%:$R_%=Q_$:
- n_(P_%)
- 2:j_%=228:
- 262356,,h_%,i_%-60,j_%
- 4:P_%=o_%+1:N_%=48:
- $(o_%+4)=".^" $R_%=g_$+".^"
- $R_%=$(o_%+4)
- n_(P_%)
- 263872:
- p_(k_%)
- 64,16:J%=
- q_(k_%,P_%):I%=J%+2:
- ?I%<33:I%+=1:
- :r_$=$R_%+"."+$I%:
- s_(K_%,k_%,J%)
- &416,&404:I%=
- q_(k_%,P_%)+2:
- ?I%<33:I%+=1:
- :r_$=$R_%+"."+$I%
- 263873
- N_%=48
- 263872:A%=4:B%=P_%:C%=N_%:P_%=
- (J_%):N_%=P_%?1:I%=R_%+
- ($R_%):
- ?I%<>46:I%-=1:
- :?I%=13:
- n_(P_%):
- 263873:
- q_(i%,p%):
- t_%:t_%=i%:p%=
- u_(p%):
- t_%>0:
- ?p%<>N_%:p%=
- u_(p%):
- u_(p%)
- u_(p%)
- :t_%-=1:
- p_(i%):
- v_%,t_%,x%,y%,w_%:
- q_(i%,P_%):
- ">":P_%=v_%:N_%+=1:v_%+=3:
- ?v_%<32:v_%+=1:
- :$R_%=$R_%+"."+$v_%:
- n_(P_%)
- x_(K_%,i%,0):I%=v_%+2:
- ?I%<33:I%+=1:
- :$e_%=$I%:r_$=$R_%+"."+$e_%:!E_%=G_%:
- 262342,,E_%:!E_%=U_%:
- 262342,,E_%:I%=
- T_(0):
- ?v_%<>
- !y_%=U_%:
- 262348,,y_%:$(y_%!76)=$e_%:
- 53,-1,11
- ,,x%:
- 53,-1,4
- ,,w_%:x%=x%<<w_%:
- 53,-1,12
- ,,y%:
- 53,-1,5
- ,,w_%:y%=y%<<w_%:!E_%=0:E_%!4=-(y%-40):E_%!8=x%-32:E_%!12=0:
- 262359,U_%,E_%
- z_(&D94,r_$)
- f_(r_$)
- z_(&AFF,r_$)
- z_(&FF9,r_$)
- n_(p%):
- __%,`_%,a$:__%=-20:`_%=0:
- p%?2=
- "x" A`%=
- 263872:!y_%=K_%:
- 262348,,y_%:I%=y_%!88:
- I%>=0:!L_%=K_%:L_%!4=I%-1:
- 262340,,L_%:I%-=1:
- :I%=R_%+
- ($R_%):
- ?I%<>46:I%-=1:
- :I%+=1:a$=$I%:
- a$="^" a$="$"
- U$(y_%!76)=a$:p%=
- u_(p%):
- 4:L_%!(I%+4)=B`%!I%:
- :!L_%=K_%:
- ?p%>=N_%:
- p%?1=N_%+1
- C`(D`%,p%+2)
- :A%=3:B%=p%:C%=N_%:p%=
- (J_%)
- C`(D`%+64,p%+1):p%=
- u_(p%)
- C`(D`%+16,p%+1):p%=
- u_(p%)
- C`(D`%+32,p%+1):p%=
- u_(p%)
- C`(D`%+48,p%+1):p%=
- u_(p%)
- u_(p%)
- :__%=-(`_%
- 2+`_%
- 2)*40-20:
- __%>E`% __%=E`%
- !L_%=0:L_%!4=__%:L_%!8=274:L_%!12=0:
- 262359,K_%,L_%:!y_%=K_%:
- 262348,,y_%+1:y_%!24=0:y_%!28=-1:
- 262341,,y_%:
- 262353,-1,y_%!4,y_%!8,y_%!12,y_%!16+40:
- 263873:
- C`(i%,p%):
- ?p%<32
- ?p%=120:p%+=1:
- :L_%!24=p%:L_%!28=i%:
- 262338,,L_%:
- L_%!4>200
- >L_%!8=L_%!8-40:L_%!16=L_%!16-40:L_%!4=8:L_%!12=272:__%-=40
- :L_%!4=276:L_%!12=542
- :`_%+=1:
- 8,17,g_$+".Cat_File"
- F%,,,,I_%:
- 1)<>1 I%=
- G`(1,"No catalogue data found - unable to continue"):
- H`% I_%+&20:
- 8,16,g_$+".Cat_File",H`%,0:A%=0:B%=H`%:C%=I_%:
- J_%:I`$=$H`%:o_%=
- u_(H`%):P_%=o_%+1:O_%=P_%:N_%=48:M_%=N_%:A`%=
- $(o_%+4)=".^" $R_%=g_$+".^"
- $R_%=$(o_%+4)
- MQ_$=$R_%:!E_%=K_%:
- 262347,,E_%:E`%=E_%!8-E_%!16:
- n_(P_%):
- 262341,,E_%:
- s_(w%,i%,p%):
- x%,y%:X_%=w%:Y_%=i%:
- 262351,,L_%:x%=!L_%-18:y%=L_%!4-9:!L_%=w%:L_%!4=i%:
- 262350,,L_%:!L_%=x%:L_%!4=y%:L_%!8=x%+36:L_%!12=y%+18:
- 271360,%11000101,1,"file_d94",L_%
- 271360,%11000101,1,"file_aff",L_%
- 271360,%11000101,1,"file_ff8",L_%
- 271360,%11000101,1,"file_fff",L_%
- 271360,%11000101,1,"directory",L_%
- s_(w%,i%):X_%=w%:Y_%=i%:!L_%=w%:
- 262347,,L_%:X%=L_%!4-L_%!20:Y%=L_%!16-L_%!24:L_%!4=i%:
- 262350,,L_%:!L_%=L_%!8+X%:L_%!4=L_%!12+Y%:L_%!8=L_%!16+X%:L_%!12=L_%!20+Y%:
- 271360,%11000101,1,(L_%!32)+1,L_%:
- W_(w%,i%):
- 271361:J`%=0:L_%!&80=w%:L_%!&84=i%:
- 262350,,L_%+&80:I%=(L_%!&9C):
- $(I%),"."):I%+=1:
- :e_$=$(I%):
- 262351,,L_%:L_%!20=L_%!12:L_%!24=L_%!16:L_%!28=!L_%:L_%!32=L_%!4:L_%!16=1:$(L_%+44)=e_$
- @!L_%=(
- (e_$)+49)
- 3:L_%!12=0:
- 262375,17,L_%,L_%!20,L_%!24:
- f$,d$,i$,i%,K`%:
- "Closearchive cd_dir_arc":
- :i%=E_%+44:
- ?i%>31:i%+=1:
- ?i%<>46:i%-=1:
- :?i%=13:d$=$(E_%+44):$L_%=r_$:i%=L_%+
- ?i%<>46:i%-=1:
- :?i%=13:f$=$L_%:!y_%=K_%:
- 262348,,y_%:i%=y_%!88:
- i%>=0:
- M`(K_%,i%)=
- i$="."+
- N`(K_%,i%):
- 5,"openarchive "+$R_%+" cd_dir_arc":f$="arcfs#cd_dir_arc:$":L`%=
- 8,5,f$+i$
- ,,K`%,,I_%:K`%=(K`%>>8)
- &FFF:
- K`%=&3FB
- I_%<&C000
- 5,"openarchive "+f$+i$+" cd_dir_arc":f$="arcfs#cd_dir_arc:$":L`%=
- "copy "+f$+i$+" "+d$+i$+" RQ~V~C":
- "Closearchive cd_dir_arc":L`%=
- x_(K_%,i%,0)
- :i%-=1:
- x_(w%,i%,s%):!L_%=w%:L_%!4=i%:L_%!8=s%<<21:L_%!12=1<<21:
- 262349,,L_%:
- N`(w%,i%):!L_%=w%:L_%!4=i%:
- 262350,,L_%:I%=(L_%!28):
- ?I%>31:I%+=1:
- :?I%=13:=$(L_%!28)
- M`(w%,i%):!L_%=w%:L_%!4=i%:
- 262350,,L_%:
- (L_%!24
- 1<<21):=
- T_(O`%):
- 262380,P`%+O`%,-1
- e%>=(P`%+O`%):=
- 262380,P`%,-1:=
- R`,S`,T`,U`,m%:S`=1:R`=2:U`=4:T`=&80:
- V`%&200:m%=V`%:h_%=
- W`(m%,"CDview",180):m%=
- X`("Help",0,0):m%=
- X`("Info",0,Y`%):m%=
- X`("Quit",T`,0):
- W` (a%,Z`$,a`%):$a%=Z`$:a%!12=&70207:a%!16=a`%:a%!20=40:a%!24=0:m%=a%+28:=a%
- X` (b`$,c`%,d`%):!m%=c`%:m%!4=d`%:m%!8=&7000001:$(m%+12)=b`$:=m%+24
- e` (f`$,g`%,h`$):
- i`% 24:$i`%="s!"+f`$:$(i`%+16)=h`$:!E_%=g`%:E_%!4=0:E_%!8=-24:E_%!12=80:E_%!16=80:E_%!20=&1700210B:E_%!28=i`%:E_%!24=i`%+16:E_%!32=8:
- 262338,,E_%
- I%:=I%
- u_(p%):
- :p%+=1:
- ?p%=10
- ?p%=13:=p%+1
- C_(j`$,k`%):
- 263874:D_%=&C31:!L_%=
- :$(L_%+4)="Error "+
- )+": "+j`$++
- 262367,L_%,1,l`%:
- 262365,m`%,&4B534154:
- G`(n`%,a$):L_%!&80=0:$(L_%+&84)=a$+
- 262367,L_%+&80,16
- n`%,l`%
- ,I%:=I%
- J_%&500:
- 2:P%=J_%:[OPT p`:adr r8,q`:mov r0,r0,lsl#2:ldr pc,[r8,r0]:.r` equd 0:equd 0
- /.q` equd s`:equd t`:equd u`:equd v`:equd S_
- .v`:mov r0,r1:.w` ldrb r1,[r0],#1:cmp r1,#13:cmpne r1,#10:bne w`:ldrb r1,[r0]:cmp r1,r2:bne w`:.w` ldrb r1,[r0],#1:cmp r1,#13:cmpne r1,#10:bne w`:mov pc,r14
- .S_ mov r0,r1:.w` ldrb r1,[r0,#-1]!:cmp r1,#13:bne w`:ldrb r1,[r0,#1]:cmp r1,#62:bne w`:ldrb r1,[r0,#2]:cmp r1,r2:bge w`:add r0,r0,#1:mov pc,r14
- .u` add r2,r1,r2:mov r0,#32:.w` ldrb r3,[r1],#1:cmp r1,r2:movgt pc,r14:cmp r3,#10:cmpne r3,#13:bne w`:ldrb r11,[r1]:add r11,r11,r3:cmp r11,#23:addeq r1,r1,#1:add r0,r0,#32:bal w`
- o.s` add r2,r1,r2:.w` ldrb r0,[r1],#1:cmp r0,#10:moveq r0,#13:streqb r0,[r1,#-1]:cmp r1,r2:blt w`:mov pc,r14
- .t` stmfd r13!,{r14}:add r7,r7,r6:ldr r2,x`:str r2,[r1]:swi "Wimp_RedrawWindow":.y` cmp r0,#0:ldmeqfd r13!,{pc}:ldr r0,[r1,#4]:ldr r2,[r1,#20]:sub r8,r0,r2:add r8,r8,#16:ldr r0,[r1,#16]:ldr r2,[r1,#24]:sub r9,r0,r2
- ldr r3,[r1,#40]:sub r3,r9,r3:mov r3,r3,lsr#5:mov r2,r3,lsl#5:sub r9,r9,r2:mov r2,r6:subs r3,r3,#1:bmi z`:._` ldrb r0,[r2],#1:cmp r0,#13:cmpne r0,#10:bne _`:ldrb r11,[r2]:add r11,r11,r0:cmp r11,#23:addeq r2,r2,#1:subs r3,r3,#1
- bpl _`
- d.z` ldr r4,[r1,#40]:ldr r3,[r1,#32]:sub r5,r4,r3:mov r5,r5,lsr#5:add r5,r5,#1:sub r9,r9,#4:bl ``
- k.Aa cmp r2,r7:bgt Ba:ldrb r0,[r2],#1:cmp r0,#31:swigt "OS_WriteC":bgt Aa:cmp r0,#10:cmpne r0,#13:beq Ca
- bal Aa
- .Ca ldr r11,[r2]:add r11,r11,r0:cmp r11,#23:addeq r2,r2,#1:subs r5,r5,#1:bmi Ba:sub r9,r9,#32:bl ``:bal Aa:.Ba swi "Wimp_GetRectangle":bal y`
- .`` swi 256+25:swi 256+4:mov r0,r8:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":mov r0,r9:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":movs pc,r14
- .x` equd G_%
- .Da% equd 0:.Ea% equd 0:.Fa% equd 0:.Ga% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ha% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ia% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0
- equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ja% equd 0:.Ka% equd 0:.La% equd 0:.Ma% equd-1:.Na% equd 0:.Oa% equd 0:.Pa% equd 0:.Qa% equd 0:.Ra% equd 0:.Sa% equd 255
- G<equs "Unable to resize block for ArtWorks!":equb 0:align
- .Ta cmp r11,#0:stmfd r13!,{r4-r8,r14}:andne r5,r15,#(%1101<<28):teqnep r15,r5:ldmnefd r13!,{r4-r8,pc}:mov r1,#0:sub r1,r1,#1:cmp r0,r1:beq Ua:ldmltfd r13!,{r4-r8,pc}:.Va str r0,Da%:ldr r3,Ka%:sub r3,r3,#&8000:add r3,r3,r0
- mov r0,r3:swi "Wimp_SlotSize":cmp r3,r0:bgt Wa:ldr r0,Ka%:ldr r1,Da%:str r1,La%:ldr r2,Ma%:ldr r3,Na%:and r5,r15,#(%111<<29):
- make sure V is clear
- teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Wa:adr r0,Sa%:orr r5,r15,#1<<28:teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Ua:ldr r0,Ka%:ldr r1,La%:ldr r2,Ma%:ldr r3,Na%:ldmfd r13!,{r4-r8,pc}:.Ea stmfd r13!,{r14}:swi "XAWRender_FileInitAddress"
- str r0,Ea%:ldr r0,Ka%:mov r12,r1:adr r1,Ta:ldr r2,La%:adr r14,Xa:ldr pc,Ea%:.Xa swivs "OS_GenerateError":str r0,La%:ldmfd r13!,{pc}:.Fa stmfd r13!,{r14}:swi "XAWRender_RenderAddress":str r0,Fa%:ldr r0,Ma%:mov r12,r1
- adr r1,Ga%:adr r2,Ha%:adr r3,Ia%:ldr r4,Ka%:adr r5,Ta:ldr r6,Ja%:mov r7,#0:adr r14,Ya:ldr pc,Fa%:.Ya swivs "OS_GenerateError":ldmfd r13!,{pc}:.Za stmfd r13!,{r14}:ldr r0,Ma%:swi "XAWRender_DocBounds":str r2,Oa%:str r3,Pa%
- /str r4,Qa%:str r5,Ra%:ldmfd r13!,{pc}:]:
- aa (ba%):
- ca% ba%,da%&100:E%=ca%+ba%:
- 262361,,g_$+".templates":
- 262363,,H_%,ca%,E%,-1,"info",0
- ,,R%:
- 262337,,H_%
- 262363,,H_%,R%,E%,-1,"file",0
- ,,R%:
- 262337,,H_%
- 262363,,H_%,R%,E%,-1,"text",0
- 262337,,H_%
- 262363,,H_%,R%,E%,-1,"pic",0
- ,,R%:
- 262337,,H_%
- 262362:!E_%=Y`%:E_%!4=1:
- 262350,,E_%:$(E_%!28)=ea$:!E_%=Y`%:E_%!4=2:
- 262350,,E_%:$(E_%!28)=fa$:!E_%=Y`%:E_%!4=3:
- 262350,,E_%:$(E_%!28)=ga$
- E!E_%=K_%:E_%!4=0:
- 262350,,E_%:J%=E_%+8:
- 32:B`%!I%=J%!I%:
- 262336,200,&4B534154,"CDview"
- ha%,m`%:
- ha%<300
- 0,"This program requires RISC-OS 3 or better":
- E_%&180,L_%&100,l`% 24,R_%&100,e_% 15:
- B`%&28,D`%&60,y_%&B000:$l`%="CDview":
- $+" During initialisation",
- -&8000:H_%=
- 35,"CDview$Dir",E_%,256,0,3
- ,,I%:E_%?I%=13:g_$=$E_%:
- T_(&1000)=
- G`(1,"Not enough memory available to run !CDview"):
- aa(&400):
- F`:m_%=
- e`("CDview",-1,I`$):
- Q`:I%=
- T_(0):
- 35,"ArcFS$check",E_%,256,0,3
- ,,I%:E_%?I%=13:
- $E_%="No"
- ,$E_%="Run "+g_$+".^.!ArcFS":
- 262366,E_%
- :*unset ArcFS$check
- ia:$D`%="Ssmall_dir":$(D`%+16)="Ssmall_FFF":$(D`%+32)="Ssmall_FF9":$(D`%+48)="Ssmall_AFF":$(D`%+64)="Ssmall_D94":$(D`%+80)="Ssmall_FF9":ea$="CDview v0.13":fa$="David Holden":ga$="
- A.P.D.L. 1995":D_%=%110000110001:E`%=-550
- ja%&300,ka 24,la% 13,ma% 15,na% 255:
- oa:pa%=
- f_(qa$):
- "Closearchive cd_dir_arc":
- 5,"openarchive "+$R_%+" cd_dir_arc":qa$="arcfs#cd_dir_arc:$."+$e_%:L`%=
- 8,17,qa$
- F%,,,,I_%:
- 1)<>1
- 100,"File not found.":
- T_(I_%+20)=
- G`(1,"Not enough memory available to load this file"):
- "Closearchive cd_dir_arc":L`%=
- :!y_%=G_%:
- 262348,,y_%:$(y_%!76)=$e_%:
- 8,16,qa$,H_%,0:
- "Closearchive cd_dir_arc":L`%=
- H_%!I_%=&0A0A0A0A:A%=2:B%=H_%:C%=I_%:ra%=
- (J_%):!E_%=0:E_%!4=-ra%:E_%!8=1232:E_%!12=0:
- 262359,G_%,E_%:!E_%=G_%:
- 262347,,E_%:E_%!20=0:E_%!24=0:E_%!28=-1:
- 262341,,E_%:
- z_(sa%,ta$):
- ua%,va%,wa%,K`%:
- xa%,f`%,ya%:
- "Closearchive cd_dir_arc":
- Get file length
- 5,"openarchive "+$R_%+" cd_dir_arc":ta$="arcfs#cd_dir_arc:$."+$e_%:L`%=
- 8,5,ta$
- ,,K`%,,I_%:K`%=(K`%>>8)
- &FFF:
- K`%=&3FB
- 5,"openarchive "+ta$+" cd_dir_arc":ta$="arcfs#cd_dir_arc:$."+$e_%:L`%=
- 8,5,ta$
- ,,,,I_%
- :!y_%=U_%:
- 262348,,y_%:
- If window has an icon, delete it
- y_%!88>0
- ,!E_%=U_%:E_%!4=0:
- 262340,,E_%:I%=
- T_(0)
- Get size of window
- Iua%=y_%!12-y_%!4:va%=y_%!16-y_%!8:
- Calculate space needed for sprite
- Lwa%=
- za(ua%,
- ,xa%):
- Grab space, initialise sprite area(s) and load file
- T_(xa%+I_%+8)=0 I%=
- G`(1,"Not enough memory available to load this file"):
- /f`%=H_%:ya%=f`%+xa%:
- _a(f`%,xa%):
- sa%=&FF9
- _a(ya%,I_%+8):
- 46,10+256,ya%,ta$
- 8,255,ta$,ya%
- "Closearchive cd_dir_arc":L`%=
- Make the sprite
- `a(sa%,ya%,I_%,$e_%,f`%,wa%,
- Ab(f`%,
- Add the sprite to the window
- !E_%=U_%:E_%!4=0:E_%!12=ua%:E_%!8=-ua%:E_%!16=0:E_%!20=&0700A11A:E_%!24=e_%:E_%!28=f`%:E_%!32=
- ($e_%):
- 262338,,E_%:
- Open the window
- +c!E_%=U_%:
- 262347,,E_%:E_%!28=-1:
- 262341,,E_%:
- 262353,-1,E_%!4,E_%!8,E_%!4+ua%,E_%!8+ua%+40:
- `a(sa%,Bb%,Cb%,Db$,Eb%,Fb%,Gb%):
- r0%,r1%,r2%,r3%:
- Hb%,Ib%,I%:
- Jb%,Kb%,Lb%,Mb%,Nb%,Ob%,Pb%:
- Qb(Gb%,Jb%,Kb%,Lb%,Mb%,Nb%,Ob%,Pb%):
- Jb%>=63 Hb%=0
- Hb%=1
- Create a sprite
- 131118,15+256,Eb%,Db$,Hb%,Fb%
- Lb%,Fb%
- Nb%,Gb%:
- Divert output to it
- :g!ja%=0:
- 131118,60+256,Eb%,Db$,ja%
- r0%,r1%,r2%,r3%:
- 46,r0%,r1%,r2%,r3%:I%=
- T_(0):
- Give the sprite a palette (if less than 63 colours)
- 131118,24+256,Eb%,Db$
- ,,Ib%:
- 4:Ib%!(44+I%*2)=Rb%!I%:Ib%!(44+I%*2+4)=Rb%!I%:
- 4:Ib%!(44+I%*2)=Sb%!I%:Ib%!(44+I%*2+4)=Sb%!I%:
- 4:Ib%!(44+I%*2)=Tb%!I%:Ib%!(44+I%*2+4)=Tb%!I%:
- 264016:
- Make white background
- Ub(&FFFFFF00):
- 0,0,Fb%:
- Call appropriate sub-routine
- &FF9:
- Vb(Bb%,1,Gb%,0,0,Fb%,Fb%)
- &AFF,&CC3:
- Wb(Bb%,Fb%,Cb%)
- &D94:
- Xb(Bb%,Fb%,Cb%)
- Restore output back to screen
- 46,r0%,r1%,r2%,r3%:
- 264016:
- G`(1,"Unable to display this Artworks file."):pa%=
- Vb(Yb%,Zb%,Gb%,ab%,bb%,cb%,db%):
- eb%,fb%,gb%,Jb%,Kb%,hb%,Mb%,ib%,Ob%,Pb%,Lb%,Nb%:
- jb,kb,lb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