home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / msh21b.zip / MSHFILES.ZIP / STDDEFS.MSH < prev    next >
Text File  |  1992-08-19  |  19KB  |  634 lines

  1. |    file: STDDEF.MSH      Standard definitions for Mi-Shell
  2. |───────────────────────────────────────────────────────────
  3. |
  4. |              ┌─────────────────────────────────────────────┐
  5. |              │ utilities to get various parts of a pathname│
  6. |              └─────────────────────────────────────────────┘
  7. |
  8. ("."cutlast drop)basename!
  9. ("."cutlast swap drop)extension!
  10. |
  11. | the following definition tests if top is a substring of top+1
  12. |
  13. (swap dup 3 roll cutfirst drop = not )belong!
  14. |
  15. | Cut a pathname into its unit and the rest.
  16. |
  17. (dup ":"cutfirst dup
  18.  (3 roll drop swap":"&swap)
  19.  (drop 2 pick =
  20.   (false swap)
  21.   (false)
  22.   ifelse
  23.  )
  24.  ifelse
  25. )unit_and_name!
  26. |
  27. | Get the directory of a pathname. It is hard because of DOS's dumb syntax.
  28. | examples:  "a:x\y" -> "a:x", "a:x\" -> "a:x\.",   "a:" -> "a:.", etc...
  29. |
  30. (unit_and_name
  31.  dup"\\"cutlast
  32.  (dup(swap drop)
  33.      (drop drop "\\")
  34.      ifelse
  35.  )
  36.  (drop &".")
  37.  ifelse
  38.  &
  39. )directory!
  40. |
  41. | A simpler variant which gives the directory part of a pathname, so
  42. | that dirpart&filepart=initial pathname.
  43. | examples:  "a:x\y" -> "a:x\", "a:x\" -> "a:x\",   "a:" -> "a:", etc...
  44. |
  45. (dup "\\"endsby("."&)if
  46.  unit_and_name"\\"cutlast
  47.  ("\\"&)
  48.  (drop"")
  49.  ifelse
  50.  &
  51. )dirpart!
  52. |
  53. | Get the filename part of a pathname.
  54. |
  55. (unit_and_name swap drop
  56.  "\\"cutlast dup
  57.  (swap drop)
  58.  (drop)
  59.  ifelse
  60. )filepart!
  61. |
  62. | makename puts together a directory and a filename. The difficulty is
  63. | to add a '\' when necessary.
  64. |
  65. (2 pick swap cutlast (drop drop false)(match not)ifelse)endsby!
  66. |
  67. (swap
  68.  dup "\\" endsby
  69.  (dup ":" endsby
  70.   ("\\"&)ifnot
  71.  )
  72.  ifnot
  73.  swap &
  74. )makename!
  75. |
  76. |              ┌─────────────────────────────────┐
  77. |              │ various kind of loops on a panel│
  78. |              └─────────────────────────────────┘
  79. |
  80. |   panels creation
  81. |
  82. (
  83. |               display directory panels & main menu
  84. |               there is some complicated arithmetic in order to start with
  85. |               3 panels when you have 132 columns!
  86. |
  87.  linescols 40 / nb_panels! drop | nb_panels gets 2 if 80 cols, 3 if 132 cols
  88.  cwd "*.*" makename dup panel.pattern! | start with pattern:
  89.                                        |  current_directory/*.*
  90.  1 cnt!             | loop from 1 to nb_panels-1 (one panel already exists)
  91.  (cnt nb_panels <)
  92.  (cnt 1+ cnt! dup panel.install cur_pn!)
  93.  while 
  94.  drop
  95.  cur_pn 1+ nb_panels- cur_pn! next_panel | we were on last panel, goback to 1st
  96. )create_panels!
  97. |
  98. | loop_panel: general loop operator. Assumes top is a piece of code and
  99. | executes it for each entry in the panel
  100. |
  101. ( action! current.pos oldpos! 0 current.pos!
  102.   panel.nbfiles 0 > 
  103.   ((action current.pos 1+ dup current.pos! panel.nbfiles = not)()while)if
  104.   oldpos current.pos!
  105. )loop_panel!
  106. |
  107. | deselect: deselect all selected files.
  108. |
  109. ((current.selected(false current.selected!)if)loop_panel)deselect!
  110. |
  111. | foreachselected: supposes <Top> is a piece of code taking 1 argument,
  112. | and execute for each selected file that code with the selected
  113. | file as argument (uses current if no file was selected)
  114. |
  115. ( s_action! false found!(current.selected(true found! current.name s_action)if)
  116.   loop_panel
  117.   found (panel.nbfiles 0 >(current.name s_action)if)ifnot
  118. )foreachselected!
  119. |
  120. | foreachbase: same as foreachselected but use the basename as argument.
  121. |
  122. ( s_action! false found! 
  123.  (current.selected(true found! current.name basename s_action)if)loop_panel
  124.   found (panel.nbfiles 0 >(current.name basename s_action)if)ifnot
  125. )foreachbase!
  126. |
  127. | selected_list: <Push> the list of selected files, catenated with blanks
  128. | as separators. If nothing was selected, <Push> current.
  129. |
  130. (false slist! (slist swap&" "&slist!)foreachselected slist)selected_list!
  131. |
  132. | next: circular version of down to be used in circular searches
  133. |
  134. (current.pos 1+ dup current.pos! panel.nbfiles=(0 current.pos!)if)next!
  135. |
  136. | search: positions to the first file matching <Top>
  137. |
  138. ( current.name
  139.   (2 pick current.name match
  140.    (false)
  141.    (next dup current.name = not)
  142.    ifelse
  143.   )
  144.   ()
  145.   while
  146.   drop
  147. )search!
  148. |
  149. |              ┌──────────────────────┐
  150. |              │ updates of the panels│
  151. |              └──────────────────────┘
  152. |
  153. |  refresh refills the panel with the contents of the current directory
  154. |
  155. (cwd panel.pattern filepart makename panel.pattern!)refresh!
  156. |
  157. |  reread updates the current panel by rereading from disk (but doesn't
  158. |  change its directory to the current one: use refresh for that)
  159. |
  160. (panel.pattern panel.pattern!)reread!
  161. |
  162. | variants which deal with the next panel
  163. |
  164. ("panel.on_activate"@oa! ()panel.on_activate! next_panel
  165.  #prev_panel oa "panel.on_activate!"&#)in_next_panel!
  166. ((reread) in_next_panel)reread_next!
  167. ((panel.pattern directory)in_next_panel)next_dir!
  168. |
  169. |
  170. |              ┌──────────────────────┐
  171. |              │ variants of 'execute'│
  172. |              └──────────────────────┘
  173. |
  174. | execshow: show the command in a message window before executing it
  175. |
  176. (dup 600 swap"Executing..." swap flash execute)execshow!
  177. |
  178. | exec: usual variant: just reread after 'execute'
  179. |
  180. (execute reread)exec!
  181. |
  182. | with_magic: do something with `magic' swap enabled
  183. | with_nomagic: do something with magic off
  184. | with_magicnoxms: do something with swap to disk enabled but swap to xms disabled
  185. |
  186. (magic oldmagic!"*"magic! # oldmagic magic!)with_nomagic!
  187. (magic oldmagic!tmp_dir magic! # oldmagic magic!)with_magic!
  188. (magic oldmagic!"*"tmp_dir& magic! # oldmagic magic!)with_magicnoxms!
  189. |
  190. | confirm: ask confirmation before executing command
  191. |
  192. (act! dup ok(act)(drop)ifelse)confirm!
  193. |
  194. | execsave: variant executed by Enter which saves the command on the circular
  195. | list of saved commands before execution
  196. |
  197. ( cmd dup cmdlist nl&swap&cmdlist! dup
  198.   " "cutfirst drop"."cutfirst drop"*"nl&swap&nl&"*"& dup magic_list match
  199.   ( drop(execute)with_magic)
  200.   ( nl"set"&match
  201.     ("="cutfirst dup(swap " " cutlast swap drop "$"swap& !)
  202.                     (drop execute)ifelse)
  203.     (execute)ifelse
  204.   )ifelse 
  205.   cmd.clear refresh
  206. )execsave!
  207. |
  208. | below is part of the code for Enter.
  209. |
  210. ( current.isdir
  211.   ( current.name cwd! refresh)
  212.   ( "extension_" current.name extension&#)
  213.   ifelse
  214. )cur_action!
  215. |
  216. ("cur_action"panel.type&#)act_on_cur!
  217. |
  218. (current.isdir
  219.  (current.name cwd! refresh)
  220.  ("extension2_" current.name extension&#)
  221.  ifelse
  222. )act2_on_cur!
  223. |
  224. |              ┌───────────────────────────────┐
  225. |              │ now, the actions on the panels│
  226. |              └───────────────────────────────┘
  227. |
  228. | wide_narrow: flip between complete/name only listing of entries
  229. |
  230. (panel.size(false panel.size! false panel.attrs!
  231.             false panel.date! false panel.time!)
  232.        (true  panel.size! true  panel.attrs!
  233.         true  panel.date! true  panel.time!)
  234.        ifelse
  235. )wide_narrow!
  236. |
  237. ( linescols drop 4/ nb_pn_lines! menu_line 1+ 0 panel.startrc!
  238.   nb_pn_lines 79  panel.rc!
  239.   (nb_pn_lines menu_line 1++ 0 panel.startrc! nb_pn_lines 79  panel.rc!)
  240.   in_next_panel
  241. )top_bottom!
  242. |
  243. (linescols drop 2/ 1- nb_pn_lines! 0 startcol!
  244.  ( menu_line 1+ startcol panel.startrc!
  245.    nb_pn_lines 40  panel.rc! true panel.on!
  246.    normal_att current_att selected_att current_selected_att panel.att!
  247.    startcol 40+startcol!
  248.  )
  249.  loop_panels
  250. )side_by_side!
  251. |
  252. (linescols drop 1- nb_pn_lines! 0 startcol!
  253.  ( menu_line 1+ startcol panel.startrc!
  254.    nb_pn_lines 40  panel.rc!
  255.    true panel.on!
  256.    normal_att current_att selected_att current_selected_att panel.att!
  257.    startcol 40+startcol!
  258.  )
  259.  loop_panels
  260. )full_screen_panels!
  261. |
  262. | the next code executes the action <top> for each panel
  263. |
  264. ("panel.on_activate"@oa! ()panel.on_activate! 
  265.   0 cnt! 
  266.   (cnt nb_panels <)
  267.   (cnt 1+ cnt! dup # next_panel)
  268.   while 
  269.   drop
  270.   oa "panel.on_activate!"&#
  271. )loop_panels!
  272. |
  273. |    switches panels on/off
  274. |    adapt the following code if you get rid of some of the panels or menus
  275. |
  276. (panel.on
  277.  ((false panel.on!)loop_panels main_menu_no window.uninstall
  278.   drive_menu_no window.uninstall)
  279.  ((true panel.on!)loop_panels show_menu drive_menu clock)
  280.  ifelse
  281. )hide_all!
  282. |
  283. | swap the panels
  284. |
  285. (panel.startrc (panel.startrc 4 roll 4 roll panel.startrc!)in_next_panel
  286.  panel.startrc!)swap_panels!
  287. |
  288. |
  289. | Up/Down: move up/down; note that they do prevcmd/nextcmd if panels are off
  290. |
  291. (panel.on(current.pos 0=(beep)(current.pos 1 - current.pos!)ifelse)
  292.          (prevcmd)
  293.      ifelse
  294. )Up_panel!
  295. |
  296. (panel.on(current.pos panel.nbfiles 1- =(beep)(current.pos 1 + current.pos!)
  297.           ifelse)
  298.          (nextcmd)
  299.      ifelse
  300. )Down_panel!
  301. |
  302. |  go up/down one panel-windowfull
  303. |
  304. (current.pos panel.rc drop 2 - - current.pos!)PageUp_panel!
  305. (panel.rc drop 2 - current.pos + current.pos!)PageDown_panel!
  306. |
  307. | goto next/previous panel
  308. |
  309. (panel_directory cwd!)panel.on_activate!
  310. (cur_pn 1 + dup nb_panels>(nb_panels -)if dup cur_pn! window.activate)
  311. next_panel!
  312. (cur_pn 1 - dup 0 le(nb_panels +)if dup cur_pn! window.activate)
  313. prev_panel!
  314. |
  315. ( panel.type
  316.   (panel.pattern panel.type cutfirst drop panel.type&)
  317.   (panel.pattern)
  318.   ifelse
  319.   directory
  320. )panel_directory!
  321. |
  322. | Expand/Trim current panel
  323. |
  324. (panel.rc swap 3+ swap panel.rc!)expand_panel!
  325. (panel.rc swap 2- swap panel.rc!)trim_panel!
  326. |
  327. | search first file whose beginning matches contents of command line
  328. |
  329. (cmd cmd.clear file_to_search! find_again)find_file!
  330. (file_to_search "*.*"&dup next drop search current.name match(beep)ifnot)find_again!
  331. |
  332. | Replace selection pattern of current.name panel from command line contents
  333. |
  334. (cmd () ("*.*" cmd!) ifelse
  335. panel.pattern dirpart cmd&cmd.clear panel.pattern!)filter_files!
  336. |
  337. |  select all files matching command line contents; if the command
  338. | line is empty, select all.
  339. |
  340. (cmd cmd.clear dup(drop "*.*")ifnot
  341.  (dup current.name match
  342.    (current.isdir (true current.selected!)ifnot)if)loop_panel
  343.  drop
  344. )sel_match!
  345. |
  346. |  deselect all selected files matching pattern
  347. |
  348. (cmd cmd.clear dup(drop "*.*")ifnot
  349.  (dup current.name match(false current.selected!)if)loop_panel
  350.  drop
  351. )desel_match!
  352. |
  353. |  select/deselect current entry
  354. |
  355. (current.selected not current.selected!)select_on_off!
  356. |
  357. |  go up one level in directory hierarchy
  358. |
  359. (".."cwd! refresh)go_up!
  360. |
  361. ("go_up"panel.type&#)up_one_level!
  362. |
  363. |  go home
  364. |
  365. (0 current.pos!)go_home!
  366. |
  367. |  go to end of list of entries
  368. |
  369. (panel.nbfiles current.pos!)go_end!
  370. |
  371. |
  372. |              ┌─────────────────────────────┐
  373. |              │ actions on the command line │
  374. |              └─────────────────────────────┘
  375. |
  376. | prevcmd/nextcmd: replace command line with previous/next item in circular
  377. | list of saved commands.
  378. |
  379. | first, the variable nl is set to a newline.
  380. "
  381. "nl!
  382. |
  383. (cmdlist nl cutfirst swap drop nl cutfirst nl swap & swap dup the_cmd!
  384.  swap nl&swap&cmdlist! cmd.clear the_cmd cmd!)nextcmd!
  385. |
  386. (cmdlist nl cutlast dup the_cmd! nl swap&swap&cmdlist!cmd.clear the_cmd cmd!)
  387. prevcmd!
  388. |
  389. |  show the command stack.
  390. |
  391. (tmp!"tmp"@)quote!
  392. (
  393. cmdlist temp!""cmd2!
  394. (temp nl cutlast dup)
  395. (dup "%"swap&"%"&nl&cmd2 swap&cmd2!
  396.  quote"("swap&"cmd!)"&#swap
  397.  temp!
  398. )while
  399. drop drop
  400. cmd2 () "-1" "-1" "hv: Command Stack "temp_menu)view_cmdlist!
  401. |
  402. |  write 'current' to the command line
  403. |
  404. (current.name " "&cmd!)write_current!
  405. |
  406. | write the selected list to the command line
  407. |
  408. (selected_list deselect cmd!)write_all_selected!
  409. |
  410. |  write complete pathname of 'current' of next panel to the command line
  411. |
  412. ((panel.pattern dirpart current.name&" "&cmd!)in_next_panel)write_other_current!
  413. |
  414. |  add in turn to the command line the basename of each selected file
  415. |       and execute the resulting command
  416. |
  417. (cmd CMD!(CMD " "& swap &execshow)foreachbase)run_on_selected!
  418. |
  419. |  execute as an MSH script instruction the contents of the command line
  420. |
  421. (cmd cmd.clear#)exec_msh!
  422. |
  423. |  display on the command line, ready to be edited, the definition of
  424. | the identifier whose name was on the command line
  425. |
  426. (cmd @cmd&"!"&cmd.clear cmd!)definition!
  427. |
  428. | toggle insert mode
  429. |
  430. (cmd.imode(false cmd.imode!)(true cmd.imode!)ifelse)insert_toggle!
  431. |
  432. |
  433. |              ┌───────────────┐
  434. |              │ Miscellaneous │
  435. |              └───────────────┘
  436. |
  437. |
  438. | the next instruction defines the name of the config file
  439. |
  440. (prog_dir"config.msh"&)cfg_filename!
  441. |
  442. (0 0 linescols page_att page_status_att page_empty_att page_tab_att page)pager!
  443. |
  444. | express a fraction as a percentage
  445. |
  446.  (swap 1000 * swap / dup 10 / dup 10 * 3 roll swap - "%" & "." swap &&)percent!
  447. |
  448. |
  449. ( cwd "" disk_stats 3 roll bytes_per_cluster!
  450.   0 (bytes_per_cluster dup current.size + 1- 2 pick / * +)
  451.      loop_panel " bytes occupied by "&panel.nbfiles&" files"&nl&
  452.   0 (current.selected(1 +)if)loop_panel | get nr of selected files
  453.   dup 0 >                               | any selected ?
  454.   (
  455.   0 (current.selected(current.size +)if)loop_panel
  456.   " bytes in " & swap &
  457.   " selected files"&nl&&
  458.   )
  459.   (drop)                                | don't need nr anymore
  460.   ifelse
  461.   3 pick bytes_per_cluster*" free bytes on drive "&cwd unit_and_name drop&
  462.   " ("&4 roll 4 roll percent
  463.   ")"&&&
  464.   message
  465. )panel_stats!
  466. |
  467. |
  468. |              ┌─────────────────────────────────────┐
  469. |              │ Various kinds of menus and messages │
  470. |              └─────────────────────────────────────┘
  471. |
  472. | creates (using a menu) a message window left until deleted
  473. |
  474. (swap title! () "-1" "-1" alert_att alert_att current_selected_att ":"title&
  475.  true menu.install)permanent_message!
  476. |
  477. (alert_att save_att! page_att alert_att!message save_att alert_att!)
  478. normal_message!
  479. |
  480. (normal_att current_att current_selected_att 4 roll true menu.install)
  481. permanent_menu!
  482. |
  483. (normal_att current_att current_selected_att 4 roll false menu.install)
  484. temp_menu!
  485. |
  486. ((true)(false)3 roll nl&" %yes% %no%"&
  487. (false)"-1" 5 alert_att alert_att current_selected_att true false menu.install)
  488. my_ok!
  489. |
  490. (dup 32 / dup 32 * 3 roll swap - " "&swap
  491.  dup 64 / dup 64 * 3 roll swap - dup 10 < ("0"swap&)if":"& 3 roll&swap
  492.  dup 32 / dup 32 * 3 roll swap - dup 10 < (" "swap&)if":"& 3 roll&swap
  493.  dup 32 / dup 32 * 3 roll swap - dup 10 < (" "swap&)if"/"&swap
  494.  dup 16 / dup 16 * 3 roll swap - dup 10 < ("0"swap&)if"/"&swap 80 +&&&
  495. )time_convert!
  496. |
  497. | The next code rereads the config file; this allows you to see the effect
  498. | of any changes you make in it|
  499. |
  500. ("config.msh" loaddefs)reconfig!
  501. |
  502. ("ascii table" prog_dir"ascii.hlp" makename read normal_message)ascii!
  503. |
  504. ("do you want the captured screen to keep video attributes
  505.   as ANSI escapes (or a plain text file)" ok
  506.   "Please input the filename where the captured screen will be appended
  507.   (default is file 'screen' in MSH program directory)" 60 input dup 
  508.   (drop prog_dir"screen" makename)ifnot
  509.  swap capture_screen swap write refresh)capt_screen!
  510. |
  511. (current.name": "¤t.size&" bytes -- last modified "¤t.time
  512.  time_convert &)file_stats!
  513. |
  514. (editor selected_list deselect &exec)edit_selected!
  515. |
  516. |
  517. | flip on/off Debug switch
  518. |
  519. (debug not debug!)debug_toggle!
  520. |
  521. ((stack_size 0 > ) (drop) while)clean_stack!
  522. |
  523. ( "time_menu_no"isdefined(time_menu_no window.uninstall)if
  524.   time time_convert ":" cutlast drop () menu_line 0=(73)(75)ifelse menu_line
  525.   "" permanent_menu time_menu_no!)show_clock!
  526. ("enter time when you want to ring (e.g. 22:13)" 5 input entered_time!
  527.  time
  528.  dup 32 / dup 32 * 3 roll swap - swap
  529.  dup 64 / dup 64 * 3 roll swap - drop entered_time ":" cutfirst! swap drop swap
  530.  dup 32 / dup 32 * 3 roll swap - drop entered_time ":" cutfirst! drop swap
  531.  dup 32 / dup 32 * 3 roll swap - swap
  532.  dup 16 / dup 16 * 3 roll swap - swap
  533.  16 * + 32 * + 32 * + 64 * + 32 * + alarm_time!
  534. )set_alarm!
  535. 2000000000 alarm_time!
  536. ( show_clock
  537. | see if time is larger than alarm_time
  538.   alarm_time time < ( beep "alarm" "the alarm you requested for " alarm_time
  539.   time_convert & " is up!"&message 2000000000 alarm_time!) if
  540.   1000 (clock)timer)clock!
  541. |( show_clock 1000 (clock)timer)clock!
  542. |
  543. | the following extend conveniently the dos commands
  544. |
  545. ("copy"panel.type&"to"&(panel.type)in_next_panel&#)copy_files!
  546. ("move"panel.type&"to"&(panel.type)in_next_panel&#)move_files!
  547. ("delete"panel.type&#)delete_files!
  548. ("browse"panel.type&#)browse_current!
  549. |
  550. (current.name pager)browse!
  551. |
  552. |
  553. ( "delete "selected_list& ok
  554.  ((current.isdir 
  555.     ("rd "swap&(execshow)with_nomagic)
  556.     ("Deleting..." file_stats permanent_message swap unlink
  557.     window.uninstall) ifelse
  558.    false current.selected!
  559.   )foreachselected reread
  560.  )
  561.  if
  562. )delete!
  563.  
  564. ( dup testfile dup
  565.   (time_convert " bytes -- last modified "swap&
  566.    next_bytes_per_cluster dup 4 pick + 1 - swap / size!
  567.    &": "swap&&
  568.    "overwrite"nl&swap &ok(size)(false)ifelse)(drop drop 0)ifelse
  569. )test_overwrite!
  570.  
  571. (next_dir dup unit_and_name drop other_drive! panel.pattern directory=
  572.  ( "warning" "cannot copy files: next panel is the same directory" message)
  573.  ( "copy "selected_list&" to "&next_dir& ok
  574.    ( other_drive disk_stats drop next_avail! next_bytes_per_cluster!
  575.      ( dup next_dir swap makename
  576.        "copying..." file_stats permanent_message
  577.        3 roll 3 roll dup test_overwrite dup
  578.        ( next_avail dup 3 roll + next_bytes_per_cluster dup current.size
  579.      + 1 - swap / - dup 0 ge
  580.      ( next_avail! drop copy)
  581.      ( drop "warning" swap next_bytes_per_cluster *
  582.        ": not enough bytes left on drive "&other_drive&" to copy "&
  583.        current.name& message drop drop false
  584.      )
  585.      ifelse
  586.      (false current.selected!)if
  587.        )
  588.        (drop drop drop)
  589.        ifelse
  590.        window.uninstall 
  591.      )
  592.      foreachselected reread_next
  593.    )if
  594.  )ifelse
  595. )copyto!
  596.  
  597. (next_dir dup unit_and_name drop other_drive! panel.pattern directory=
  598.  ("warning" "cannot move files: next panel is the same directory" message)
  599.  ( panel.pattern unit_and_name drop other_drive = not different_drives!
  600.    "move "selected_list&" to "&next_dir& ok
  601.    ( other_drive disk_stats drop next_avail! next_bytes_per_cluster!
  602.      ( dup next_dir swap makename
  603.        "moving..." file_stats permanent_message
  604.        3 roll 3 roll dup test_overwrite dup
  605.        ( different_drives
  606.      ( next_avail dup 3 roll + next_bytes_per_cluster dup current.size
  607.        + 1 - swap / - dup 0 ge
  608.        ( next_avail! drop copy
  609.          ( window.uninstall 
  610.            "deleting..." file_stats permanent_message
  611.            current.name unlink
  612.            false current.selected!
  613.          )if
  614.        )
  615.        ( drop "warning" swap next_bytes_per_cluster *
  616.          ": not enough bytes left on drive "&other_drive&" to copy "&
  617.          current.name& message drop drop
  618.        )
  619.        ifelse
  620.      )
  621.      ( drop dup unlink rename
  622.        (false current.selected!)if
  623.      )ifelse
  624.        )
  625.        (drop drop drop)
  626.        ifelse
  627.        window.uninstall
  628.     )
  629.     foreachselected reread reread_next
  630.   )if
  631.  )ifelse
  632. )moveto!
  633. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  634.