home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / disclook / !Disc / !RunImage (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1994-02-12  |  16.4 KB  |  757 lines

  1.  DiscLook II 1.00
  2.  (c) 1993 RJ Developments
  3.  By Ian Clark
  4. $+" at line "+
  5. quit%=
  6. Error
  7.  quit%=
  8.  noquit%=
  9. "WimpExt_CloseDown",id%
  10. "XOS_Module",7,,msg%
  11. "Wimp_CloseDown"
  12.  ON ERROR LOCAL SYS"WimpExt_CloseDown",id%:SYS"Wimp_CloseDown",id%,&4B534154:RUN
  13. "Hourglass_On"
  14. ,msgpath$="<Disc$Dir>.Resources.Messages"
  15. "MessageTrans_FileInfo",,msgpath$ 
  16.  ,,msgsize%
  17.  "OS_Module",6,,,20+
  18. msgpath$ 
  19.  ,,msg%
  20. .$(msg%+16)="<Disc$Dir>.Resources.Messages"
  21.  msblk% msgsize%
  22. "MessageTrans_OpenFile",msg%,msg%+16,msblk%
  23.  block% 800
  24.  buffer% 4
  25.  handles% 8
  26.  indirected% 238
  27.  ok% 32
  28.  qui% 32
  29.  ibtxt% 50
  30.  ibsp% 255
  31.  imm% 32
  32.  prefs% 32
  33.  bkprefs% 30
  34. mount%=
  35. curfs$="ADFS"
  36. actfs$="ADFS"
  37. menhelp%=
  38. noquit%=
  39. nohd%=
  40. cfs%=
  41. cfs$=""
  42. fstick%=1
  43. drive%=0
  44. drm%=0
  45. 0    on%=
  46. ?prefs%=1
  47. prefs%?1=1
  48. prefs%?2=0
  49. prefs%?3=1
  50. prefs%?4=1
  51. $(prefs%+8)="1234"+
  52. $(prefs%+20)="1234"+
  53. 8%$qui%="Quit"+
  54. 0+"Cancel"+
  55. $ok%="OK"+
  56. :#$imm%="OK"+
  57. 0+"Cancel"+
  58. ;d$ibsp%="sFloppyLook;whThe Disc Look II icon.|mA RJ Developments program.|mCode 
  59. 1993 Ian Clark."
  60. shutdown%=
  61. running%=
  62. task%=
  63. open%=
  64. toquit%=
  65. password%=0
  66. correct%=0
  67. C<!block%=&502:block%!4=&400C0:block%!8=&43B00:block%!12=0
  68. "Wimp_Initialise",310,&4B534154,"Disc Look II",block% 
  69.  ver%,id%
  70.  ver%<310 
  71.  0,"Disc Look II needs Risc OS 3.10 or later"
  72. "WimpExt_Initialise",14,id%,%010010010 
  73.  ver%
  74.  ver%<195 
  75.  0,"Disc Look II needs Wimp Extentions 1.95 or later. (There is a copy inside the !DMen directory.)"
  76. "OS_File",13,"<Disc$Dir>.Resources.Sprites" 
  77.  ,,,,size%
  78. size%+=4:
  79.  sprite% size%
  80. !sprite%=size%:sprite%!8=16
  81. "OS_SpriteOp",&209,sprite%
  82. "OS_SpriteOp",&20A,sprite%,"<Disc$Dir>.Resources.Sprites"
  83.  x%=0 
  84. handles%!x%=%101:
  85. "WimpExt_LoadTemplates",handles%,block%,indirected%,indirected%+238,-1,"<Disc$Dir>.Resources.Templates",sprite%
  86. P8infow%=!handles%:titlew%=handles%!4:curw%=handles%!8
  87. "WimpExt_SetIconString",,,titlew%,5,"1.00"
  88. "WimpExt_OpenWindowTop",titlew%
  89. "WimpExt_PrePoll"
  90. "Wimp_Poll",0,block% 
  91.  code%
  92. "WimpExt_Action",id%,block%,code% 
  93.  code%
  94.  code% 
  95.  1 : 
  96. "WimpExt_AutoRedraw",,block%
  97.  2 : 
  98. "Wimp_OpenWindow",,block%
  99.  3 : 
  100. "Wimp_CloseWindow",,block%
  101.  code%=0
  102. "WimpExt_SetIconString",,,infow%,3,"
  103. 1993 Ian Clark ("+
  104. Gm("Date")+")"
  105. "WimpExt_SetIconString",,,infow%,0,
  106. Gm("Ver")
  107. GetFSs
  108. "ADFS_Drives" 
  109.  ,flop%,hard%
  110. Drivemenu(flop%,hard%)
  111. d0curfs$=
  112. String(devicem%+16+(24*(fstick%+1)))
  113. !block%=titlew%
  114. "Wimp_CloseWindow",,block%
  115. Ibtxt
  116. h    on%=
  117.  x%=END
  118.  PROCImm("Disc Look 2 is currently using "+STR$x%+" bytes, that's "+STR$(INT(x%/1024))+"K")
  119. "Hourglass_Off"      
  120.  title$
  121. title$=
  122. Gm("MT01")
  123.  barmenu% 28+(24*6)
  124.  actm% 28+(24*6)
  125.  formatm% 28+(24*6)
  126.  otherformatm% 28+(24*6)
  127. $barmenu%=title$
  128. width%=(
  129. title$-1)*16
  130. barmenu%?12=7
  131. barmenu%?13=2
  132. barmenu%?14=7
  133. barmenu%?15=0
  134. barmenu%!20=44
  135. barmenu%!24=0
  136.  The procedure below adds a single item to a menu.
  137.    Item Text        Flag Item Menu Submenu Pointer
  138.            |           | |    |       |
  139.           \ /         \/\/   \ /     \ /
  140. Additem(
  141. Gm("MI00"),2,1,barmenu%,infow%)
  142. Additem(
  143. Gm("MI01"),0,2,barmenu%,devicem%)
  144. Additem(
  145. Gm("MI02"),8,3,barmenu%,drivem%)
  146. Additem(
  147. Gm("MI03"),0,4,barmenu%,actm%)
  148. Additem(
  149. Gm("MI04"),2,5,barmenu%,-1)
  150. Additem(
  151. Gm("MI05"),&80,6,barmenu%,-1)
  152. barmenu%!16=width%
  153. title$=
  154. Gm("MT04")
  155. $actm%=title$
  156. width%=(
  157. title$-1)*16
  158. actm%?12=7
  159. actm%?13=2
  160. actm%?14=7
  161. actm%?15=0
  162. actm%!20=44
  163. actm%!24=0
  164. Additem(
  165. Gm("MI40"),0,1,actm%,-1)
  166. Additem(
  167. Gm("MI41"),0,2,actm%,-1)
  168. Additem(
  169. Gm("MI42"),0,3,actm%,formatm%)
  170. Additem(
  171. Gm("MI43"),0,4,actm%,-1)
  172. Additem(
  173. Gm("MI44"),0,5,actm%,-1)
  174. Additem(
  175. Gm("MI45"),&80,6,actm%,-1)
  176. actm%!16=width%
  177. title$=
  178. Gm("MT05")
  179. $formatm%=title$
  180. width%=(
  181. title$-1)*16
  182. formatm%?12=7
  183. formatm%?13=2
  184. formatm%?14=7
  185. formatm%?15=0
  186. formatm%!20=44
  187. formatm%!24=0
  188. Additem(
  189. Gm("MI55"),8,1,formatm%,curw%)
  190. Additem(
  191. Gm("MI50"),0,2,formatm%,-1)
  192. Additem(
  193. Gm("MI51"),0,3,formatm%,-1)
  194. Additem(
  195. Gm("MI52"),0,4,formatm%,-1)
  196. Additem(
  197. Gm("MI53"),0,5,formatm%,-1)
  198. Additem(
  199. Gm("MI54"),&80,6,formatm%,otherformatm%)
  200. formatm%!16=width%
  201. title$=
  202. Gm("MT05")
  203. $otherformatm%=title$
  204. width%=(
  205. title$-1)*16
  206. otherformatm%?12=7
  207. otherformatm%?13=2
  208. otherformatm%?14=7
  209. otherformatm%?15=0
  210. otherformatm%!20=44
  211. otherformatm%!24=0
  212. Additem(
  213. Gm("MI60"),0,1,otherformatm%,-1)
  214. Additem(
  215. Gm("MI61"),0,2,otherformatm%,-1)
  216. Additem(
  217. Gm("MI62"),0,3,otherformatm%,-1)
  218. Additem(
  219. Gm("MI63"),0,4,otherformatm%,-1)
  220. Additem(
  221. Gm("MI64"),0,5,otherformatm%,-1)
  222. Additem(
  223. Gm("MI65"),&80,6,otherformatm%,-1)
  224. otherformatm%!16=width%
  225. Imm(text$)
  226. Errbox(
  227. Gm("MS01"),text$,1)
  228. Errbox(title$,text$,bflag%)
  229.  bt%,pressed%
  230.  bflag% 
  231.  1 : bt%=ok%
  232.  2 : bt%=imm%
  233.  3 : bt%=qui%
  234.  : bt%=ok%
  235. "WimpExt_ControlImmediate",,2,title$,text$,bt%,1 
  236.  pressed%
  237. =pressed%
  238. Decodemenu
  239.  buffer%
  240.  buffer% 512
  241. "Wimp_DecodeMenu",,menu%,block%,buffer%
  242.  menu% 
  243.  barmenu% : 
  244.  $buffer% 
  245. Gm("MI05") : quit%=
  246. Gm("MI00") : 
  247. Gm("MS02"))
  248. Gm("MI04") : 
  249. FSWarn
  250. Gm("MI01")+".CFS#+" : 
  251. SwapCFS
  252. Gm("MI03")+"."+
  253. Gm("MI41") : 
  254. Dismount
  255. Gm("MI03")+"."+
  256. Gm("MI44") : 
  257. Verify
  258. Gm("MI03")+"."+
  259. Gm("MI45") : 
  260. Showfree
  261.  !block%=3 
  262.  block%!4=2 
  263.  block%!8<>-1 
  264. Format(block%!8,block%!12)
  265. $buffer%,
  266. Gm("MI01"))+1)=
  267. Gm("MI01")+"." 
  268. NewFS($buffer%)
  269. $buffer%,
  270. Gm("MI02"))+1)=
  271. Gm("MI02")+"." 
  272. Newdrive($buffer%)
  273. Additem(item$,flag%,item%,menu%,submenu%)
  274. item$>12 
  275. Gm1("ER00",item$)
  276. item$+1)*16>width% 
  277.  width%=(
  278. item$+1)*16
  279. P%=menu%+28+(24*(item%-1))
  280.     OPT 0
  281. EQUD flag%
  282. EQUD submenu%
  283. EQUD &7000021
  284. !EQUS item$+
  285. item$-1),
  286. Error
  287.  67795 : 
  288. Imm("Drive '"+curfs$+" "+
  289. drive%+"' is empty!"):
  290.  67756 : 
  291. Imm("Bad drive regarding '"+curfs$+" "+
  292. drive%+"'!"):
  293. }bt%=
  294. Errbox("Error "+
  295. +" from Disc Look II","Error: '"+
  296. $+"' - Internal error code "+
  297. +", "+
  298. +". What should I do?",3)
  299.  bt% 
  300.  0 : 
  301. "WimpExt_CloseDown",id%:
  302. "Wimp_CloseDown":
  303.  quit% 
  304.  noquit% 
  305. "WimpExt_PrePoll"
  306. "Wimp_Poll",0,block% 
  307.  code%
  308. "WimpExt_Action",id%,block%,code% 
  309.  code%
  310.  code% 
  311.  1 : 
  312. "WimpExt_AutoRedraw",,block%
  313.  2 : 
  314. "Wimp_OpenWindow",,block%
  315.  3 : 
  316. "Wimp_CloseWindow",,block%
  317.  6 : 
  318. Click(block%!8,block%!12,block%!16,!block%,block%!4)
  319.  8 : 
  320. Processkey
  321.  9 : 
  322. Decodemenu
  323.  17,18 : 
  324. Receive
  325. Exists(path$)
  326. "OS_File",17,path$ 
  327.  found%
  328.  found%=0 =
  329. Click(b%,w%,i%,x%,y%)
  330.  -2 : 
  331. $            
  332.  baricon% : 
  333. n                             
  334.  2 : menu%=barmenu%:
  335.  "WimpExt_CreateMenu",,barmenu%,x%-64,96+(44*6)+(24*2)
  336. /                             
  337.  4 : 
  338. Opendir
  339. !                            
  340.            
  341.  infow% : 
  342.  3 : 
  343. Gm("IW03"))
  344.  4 : 
  345. Gm("IW02"))
  346. String(pointertostring%)
  347.  ?pointertostring%>25 
  348. tx$<255
  349. $1tx$+=
  350. (?pointertostring%):pointertostring%+=1
  351. Receive
  352.  block%!16 
  353.  0 : quit%=
  354.   WHEN 3 : CASE block%!40 OF
  355.             WHEN &FFF : PROCReadtextfile(FNString(block%+44))
  356.            ENDCASE
  357.  &502 : 
  358.  block%!32 
  359. /&              
  360.  infow% : 
  361. Infohelp
  362. 03             
  363. Menuhelp(block%!32,block%!36)
  364.               
  365.  &400C0 : 
  366.  block%!20=curw% 
  367. Currentform 
  368. Drivewarn
  369.  &43B00 : 
  370. String(block%+20),8)="DiscLook" 
  371. Extcommand(
  372. String(block%+20),9))
  373. Sendhelp(help$)
  374. "WimpExt_SendHelp",help$,block%
  375. Menuhelp(w%,i%)
  376.  menuhelp%
  377.  menuhelp% 512
  378.  menhelp% 
  379.  w%=barmenu% 
  380.  i%=3 
  381. "Wimp_GetMenuState",0,menuhelp%
  382.  !menuhelp% 
  383.  -1 : 
  384. Sendhelp("Ohh! Your sooooooo good with that mouse!!")
  385.  0 : 
  386. Sendhelp("This option leads to a standard info box.")
  387.  1 : 
  388.  menuhelp%!4 
  389.  -1 : 
  390. Sendhelp("Move right to select a filing system")
  391.  0 : 
  392.  cfs% 
  393. Sendhelp("Click here to turn CFS off.") 
  394. Sendhelp("Click here to turn CFS on.")
  395. Sendhelp("Click here to select this as the current filing system.")
  396.  4 : 
  397. Sendhelp("Click here to re-calculate the device menu, usefull if any filing systems have started up since the program was loaded, eg the RAM filer.")
  398. Ibtxt
  399.  drive$
  400.  drive%<>-1 drive$=":"+
  401. drive% 
  402.  drive$="$"
  403. R text$=cfs$+actfs$+":"+drive$
  404. $ibtxt%=text$
  405.  width%
  406. ($ibtxt%)*16>100 
  407.  width%=
  408. ($ibtxt%)*16 
  409.  width%=100
  410.  on% !block%=-7:block%!4=baricon%:
  411. "Wimp_DeleteIcon",,block%
  412. !block%=-6
  413. block%!4=0
  414. block%!8=-16
  415. block%!12=width%
  416. block%!16=90
  417. block%!20=&1700310B
  418. block%!24=ibtxt%
  419. block%!28=ibsp%
  420. block%!32=50
  421. "Wimp_CreateIcon",251658240,block% 
  422.  baricon%
  423. a    on%=
  424. "WimpExt_PrePoll":
  425. "Wimp_Poll",0,block% 
  426.  code%:
  427. "WimpExt_Action",id%,block%,code% 
  428.  code%
  429.  code%=1 
  430. "WimpExt_AutoRedraw",,block%
  431.  code%=0
  432. Opendir
  433.  drive$
  434.  drive%=-1 drive$="$" 
  435.  drive$=
  436. drive%
  437. discname$=""
  438. CheckSWI(curfs$+"_DescribeDisc") 
  439.  curfs$+"_DescribeDisc",":"+drive$,block%
  440. n$discname$=":"+
  441. String(block%+22)
  442. discname$,1))<=32
  443. discname$=
  444. discname$)
  445. discname$+=".$"
  446. discname$="$"
  447.  SYS"Wimp_StartTask",actfs$+":Mount "+STR$drive%
  448. "XOS_CLI","Filer_OpenDir "+cfs$+actfs$+":"+discname$
  449. GetFSs
  450.  This is the proc which gets the current devices.
  451. fs$=""
  452.  x%=1 
  453. fs$+=
  454. Getfsname(x%)+","
  455. fs$,2)=",," fs$=
  456. title$=
  457. Gm("MT02")
  458. it%=-1
  459.  x%=0 
  460. fs$,x%,1)="," 
  461.  it%+=1
  462.  devicem% 28+(24*(it%+2))
  463. $devicem%=title$
  464. width%=(
  465. title$-1)*16
  466. devicem%?12=7
  467. devicem%?13=2
  468. devicem%?14=7
  469. devicem%?15=0
  470. devicem%!20=44
  471. devicem%!24=0
  472.  The procedure below adds a single item to a menu.
  473.    Item Text   Flag Item Menu Submenu Pointer
  474.            |      | |    |     |
  475.           \ /    \/\/   \ /   \ /
  476. Additem("CFS#+",2,1,devicem%,-1)
  477.  x%=1 
  478. pos%=
  479. fs$,2),",")
  480. fs$,2,pos%-1)
  481.  x%<>it% fl%=0 
  482.  fl%=&80
  483. Additem(it$,fl%,x%+1,devicem%,-1)
  484. fs$,pos%+1)
  485. devicem%!16=width%
  486. Modexist("CFSModule") 
  487. "WimpExt_ShadeEntry",,devicem%,0,1
  488. cfs%=
  489. cfs$=""
  490. "WimpExt_ShadeEntry",,devicem%,0,0
  491.  fstick%>it% 
  492.  fstick%=it%
  493.  cfs% tk%=1 
  494.  tk%=0
  495. "WimpExt_TickEntry",,devicem%,0,tk%
  496. "WimpExt_TickEntry",,devicem%,fstick%,1
  497. Getfsname(num%)
  498.  name$,name%
  499. "XOS_FSControl",33,num%,block%,12 
  500.  ,,name%
  501.  ?name% 
  502. name$=
  503. String(name%)
  504.  name$ 
  505.  "null","printer","serial","vdu","rawvdu","kbd","rawkbd","deskfs","msdos","netprint","pipe","Pipe","devices","CFS" : name$=""
  506. name$=""
  507. =name$
  508. FSWarn
  509. GetFSs
  510. "WimpExt_CreateMenu",,-1
  511. SwapCFS
  512.  cfs% 
  513.  cfs%=
  514.  cfs%=
  515.  cfs% 
  516.  cfs$="CFS#" 
  517.  cfs$=""
  518.  cfs% tk%=1 
  519.  tk%=0
  520. "WimpExt_TickEntry",,devicem%,0,tk%
  521. Ibtxt
  522. NewFS(item$)
  523.  fs$,dr%,tick%
  524.  item$="Device.CFS#+" 
  525.  !block%<>1 
  526. tick%=block%!4
  527. +fs$=
  528. String(devicem%+16+(24*(tick%+1)))
  529. actfs$=fs$
  530.  fs$="RAM" fs$="RamFS"
  531. CheckSWI(fs$+"_Drives") 
  532.     dr%=
  533. fs$,2)="fs" 
  534. 9   fs$=
  535. fs$-2)+"FS":dr%=
  536. CheckSWI(fs$+"_Drives")
  537. fs$,2)="FS" 
  538. 5    fs$=
  539. fs$-2):dr%=
  540. CheckSWI(fs$+"_Drives")
  541.         
  542.      
  543. fs$,2)<>"fs" 
  544. /     fs$+="FS":dr%=
  545. CheckSWI(fs$+"_Drives")
  546.      
  547.       
  548. fs$,2)<>"FS" 
  549. 0      fs$+="FS":dr%=
  550. CheckSWI(fs$+"_Drives")
  551.       
  552.      
  553.         
  554.  dr% 
  555.  fs$+"_Drives" 
  556.  ,flop%,hard%
  557.  nohd% hard%=0
  558.  flop%+hard%=0 
  559.  drive%=-1:drm$=-1:
  560.  flop%=0 
  561.  drive%=4:drm%=0 
  562.  drive%=0:drm%=0
  563. drive%=-1
  564. flop%=0:hard%=0
  565. curfs$=fs$
  566. "WimpExt_TickEntry",,devicem%,fstick%,0
  567. fstick%=tick%
  568. "WimpExt_TickEntry",,devicem%,fstick%,1
  569. Ibtxt
  570. CheckSWI(swi$)
  571.  "XOS_SWINumberFromString",,swi$ 
  572.  ;error%
  573. =((error% 
  574.  1)=0)
  575. Drivemenu(flop%,hard%)
  576. menhelp%=
  577.  it%,flag%,count%
  578. title$=
  579. Gm("MT03")
  580.  flop%+hard%=0 
  581.  it%=1 
  582.  it%=flop%+hard%
  583.  drivem% 28+(24*it%)
  584. $drivem%=title$
  585. width%=(
  586. title$-1)*16
  587. drivem%?12=7
  588. drivem%?13=2
  589. drivem%?14=7
  590. drivem%?15=0
  591. drivem%!20=44
  592. drivem%!24=0
  593.  flop%+hard%=0 
  594. Additem("<None>",&80,1,drivem%,-1):drivem%!16=width%:
  595. "WimpExt_ShadeEntry",,drivem%,0,1:
  596. count%=1
  597.  flop%>0 
  598.  x%=1 
  599.  flop%
  600.  x%=flop% 
  601.  hard%=0 
  602.  flag%=&80 
  603.  flag%=2
  604. flag%=0
  605. Additem("Drive "+
  606. (x%-1),flag%,count%,drivem%,-1)
  607. count%+=1
  608.  hard%>0 
  609.  x%=1 
  610.  hard%
  611.  x%=hard% 
  612.  flag%=&80 
  613.  flag%=0
  614. Additem("Drive "+
  615. (3+x%),flag%,count%,drivem%,-1)
  616. count%+=1
  617. drivem%!16=width%
  618.  drm%>-1 
  619. "WimpExt_TickEntry",,drivem%,drm%,1
  620. menhelp%=
  621. Drivewarn
  622. menhelp%=
  623.  nohd% thd%=0 
  624.  thd%=hard%
  625. Drivemenu(flop%,thd%)
  626. "Wimp_CreateSubMenu",,drivem%,block%!24,block%!28
  627. menhelp%=
  628. Modexist(name$)
  629. "XOS_Module",18,name$ 
  630.  ;error%
  631. =((error% 
  632.  1)=0)
  633. Newdrive(item$)
  634. drm%=block%!4
  635. drive%=
  636. item$))
  637. Ibtxt
  638. Infohelp
  639.  block%!36<7 
  640. Sendhelp(
  641. Gm("IW00")):
  642. Sendhelp(
  643. Gm("IW01"))
  644. Gm(tok$)
  645. p1$=""
  646. Gm1(tok$,p1$)
  647. p2$=""
  648. Gm2(tok$,p1$,p2$)
  649. Imm("Couldn't find message token: '"+tok$+"' parm 1: '"+p1$+"' parm 2: '"+p2$+"'"):="---- Fatal Error ----"
  650. "MessageTrans_Lookup",msg%,tok$,msblk%,msgsize%,p1$,p2$
  651. String(msblk%)
  652. Dismount
  653.  drive%=-1 
  654. Gm1("ER01",actfs$)):
  655. "XWimp_StartTask",actfs$+":Dismount "+
  656. drive%
  657. "XWimp_StartTask","Filer_CloseDir CFS#"+actfs$+"::"+
  658. drive%
  659. Showfree
  660.  drive%=-1 
  661.  actfs$="Mem" 
  662. "XWimp_StartTask","Mem:Free":
  663. Gm1("ER01",actfs$)):
  664. "XWimp_StartTask","ShowFree -FS "+actfs$+" "+
  665. drive%
  666. Format(fo%,ofo%)
  667.  actfs$<>"ADFS" 
  668. Gm1("ER01",actfs$)):
  669.  drive%>3 
  670. Gm("ER02"):
  671.  fo% 
  672.  0 : 
  673. "XWimp_StartTask","ADFS:Format "+
  674. drive%+" F"
  675.  1 : 
  676. "XWimp_StartTask","ADFS:Format "+
  677. drive%+" E"
  678.  2 : 
  679. "XWimp_StartTask","ADFS:Format "+
  680. drive%+" D"
  681.  3 : 
  682. "XWimp_StartTask","ADFS:Format "+
  683. drive%+" L"
  684.  4 : 
  685.  ofo% 
  686. S@   
  687.  0 : 
  688. "XWimp_StartTask","ADFS:Format "+
  689. drive%+" DOS/Q"
  690. T@   
  691.  1 : 
  692. "XWimp_StartTask","ADFS:Format "+
  693. drive%+" DOS/M"
  694. U@   
  695.  2 : 
  696. "XWimp_StartTask","ADFS:Format "+
  697. drive%+" DOS/H"
  698. V@   
  699.  3 : 
  700. "XWimp_StartTask","ADFS:Format "+
  701. drive%+" DOS/N"
  702. WB   
  703.  4 : 
  704. "XWimp_StartTask","ADFS:Format "+
  705. drive%+" Atari/M"
  706. XB   
  707.  5 : 
  708. "XWimp_StartTask","ADFS:Format "+
  709. drive%+" Atari/N"
  710. Verify
  711.  drive%=-1 
  712. Gm1("ER01",actfs$)):
  713.  "XWimp_StartTask",actfs$+":Verify "+
  714. drive%
  715. Extcommand(com$)
  716. com$))<33
  717. com$=
  718. com$,2)
  719.  WHILE ASC(RIGHT$(com$))<33
  720.  com$=LEFT$(com$,LENcom$-1)
  721.  ENDWHILE
  722.  com$ 
  723.  "-Quit" : quit%=
  724.  "-ShadeQuit" : noquit%=
  725.  "-UnshadeQuit" : noquit%=
  726.  "-NoHD" : nohd%=
  727.  drive%>3 
  728.  drive%=0:
  729. Ibtxt
  730.  "-HD" : nohd%=
  731. Currentform
  732.  ptr%
  733. CheckSWI(curfs$+"_DescribeDisc") 
  734. "WimpExt_SetIconString",,,curw%,1,
  735. Gm("MS03")
  736. "Wimp_CreateSubMenu",,block%!20,block%!24,block%!28
  737. ptr%=block%+32
  738.  curfs$+"_DescribeDisc",
  739. drive%,ptr%
  740. "WimpExt_SetIconString",,,curw%,1,
  741. String(ptr%+22)
  742. "WimpExt_SetIconString",,,curw%,5,
  743. (ptr%!16/1024)+"K"
  744. "WimpExt_SetNumberIcon",,,curw%,7,ptr%?3
  745. den%=ptr%?2
  746. $ptr%="Don't know"
  747.  den% 
  748.  0 : $ptr%="Hard disc"
  749.  1 : $ptr%="Single"
  750.  2 : $ptr%="Double"
  751.  3 : $ptr%="Double+"
  752.  4 : $ptr%="Quad"
  753.  8 : $ptr%="Octal"
  754. "WimpExt_SetIconString",,,curw%,3,
  755. String(ptr%) 
  756. "Wimp_CreateSubMenu",,block%!20,block%!24,block%!28
  757.