home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / Dopus5 / DC-OP55B.LZX / Opus5 / modules / Hotlist.dopus5 < prev    next >
Encoding:
Text File  |  1996-07-10  |  17.9 KB  |  689 lines

  1. /* Super-Hotlist Directory Opus 5.5
  2.    by Leo 'Nudel' Davidson for Gods'Gift Utilities
  3.    email: leo.davidson@keble.oxford.ac.uk  www: http://users.ox.ac.uk/~kebl0364
  4.  
  5. $VER: Hotlist.dopus5 1.7 (7.7.96)
  6.  
  7.    Huge thanks to Jonathan Potter for adding the commands to Opus which were
  8.    required to do this properly.
  9.  
  10.    Thanks to Edmund Vermeulen who always seems to have a better way of writting
  11.    something in ARexx and whose ArcDir script proved a good source of source.
  12.  
  13. -------------------------------------------------------------------------------
  14.  
  15.    This ARexx module adds a "Hotlist" command to Opus which behaves just
  16.    like the internal "Devicelist" command (including the "NEW" switch).
  17.  
  18.    To install just put this file (Hotlist.dopus5) in your DOpus5:modules/
  19.    directory. The Hotlist command will then be added (you don't even have
  20.    to reboot!). Then just put it on a button or your double-click script
  21.    instead of DeviceList, ScanDir, or whatever you have at the moment to
  22.    open new listers! -- You might want to add it to your lister toolbar,
  23.    too.
  24.  
  25.    Maybe I'll convert this to 'C' once I've learnt it, it'd speed things
  26.    up quite a bit. (I'm certainly not writting /this/ in assembler!)
  27.  
  28.    Arguments:  (*** ORDER IS IMPORTANT! ***)
  29.    NEW/S    Force a new hotlist to be openned even if there is a
  30.         source lister available.
  31.    CONFIG/K    Specify a hotlist file to use if you don't want to use
  32.         the default (DOpus5:System/hotlist.config). You can use
  33.         this to have different hotlists on different buttons.
  34.  
  35.    e.g.  "Hotlist NEW Ram Disk:NewHotListFile"
  36.    (Note that quotes should not be put around the config name even if it
  37.    does contain a space). If you just use "Hotlist" it'll behave pretty
  38.    much like the internal DOpus DeviceList command.
  39.  
  40.  
  41.    Usage (Adding entries):
  42.    The first time you run the hotlist will be empty: just drag'n'drop
  43.    directories to the hotlist to have them added! You'll be asked what
  44.    name you want to give the entry (if you want it different to the
  45.    path's name), and what colour you want it in the list. (Sorry, you can't
  46.    control what order things are in at this time).
  47.  
  48.    You can also click your normal "MakeDir" lister toolbar icon to create
  49.    a new entry just by typing its path in.
  50.  
  51.    If you add a file to the list (instead of a directory or device),
  52.    double-clicking the file will perform whatever the doubleclick
  53.    action is for that filetype. You can use this to put your favourate
  54.    programs, pictures, or whatever in a hotlist.
  55.  
  56.  
  57.    Usage (Jumping to entries):
  58.    To jump to an entry in the hotlist just double-click on it. If you
  59.    hold shift (or MMB if you're running MMBShift and have a 3-button
  60.    mouse) the entry will be read into a new lister.
  61.  
  62.    You can also drop entries onto other listers to have them read them
  63.    in and keep the hotlist open.
  64.  
  65.  
  66.    Usage (Removing entries):
  67.    Select all the entries you want removed and press your normal delete
  68.    button in the lister toolbar.
  69.  
  70.  
  71.    Notes:
  72.  
  73. *) You can 'Snapshot' Hotlist listers. Of course, the snapshot position
  74.    is only used when a new lister is openned, not when an existing
  75.    lister it turned into a Hotlist. 'UnSnapshot' also works.
  76.  
  77. *) You can do all of the above using pop-up menus over items if you have
  78.    "Name mode PopUp" turned on in Environment/Lister Options.
  79.  
  80. *) Dragging stuff between Hotlists isn't supported and can cause strange
  81.    things (only sometimes). You can usually just close both listers,
  82.    though. I doubt that dragging between OpusFTP, ArcDir, or any other
  83.    handler will work, either, but so what?
  84.  
  85. */
  86.  
  87.  
  88. /*--------------------------------------------------------------------------------*/
  89.  
  90. I'm a little ashamed of this long-pasta code. Perhaps I'll tidy things up sometime.
  91.  
  92. /*--------------------------------------------------------------------------------*/
  93.  
  94.  
  95. options results
  96. options failat 99
  97. parse arg portname function source dest arguments
  98. address value portname
  99.  
  100. If ~Show('L','rexxsupport.library') then
  101.     call addlib('rexxsupport.library',0,-30,0)
  102.  
  103. CR = '0a'x
  104.  
  105. If function='init' then do
  106.     dopus command "Hotlist" program "Hotlist" desc "'Show user defined path hotlist'" template "NEW/S,CONFIG/K" "source"
  107.     exit
  108.     end
  109.  
  110. If function~='Hotlist' then Exit
  111.  
  112. /*--------------------------------------------------------------------------------*/
  113.  
  114. If Strip(Upper(Word(arguments,1))) = "NEW" then do
  115.     New_Switch = 1
  116.     Arguments = DelWord(Arguments,1,1)
  117.     end
  118. else
  119.     New_Switch = 0
  120.  
  121.  
  122.  
  123.  
  124.  
  125. /*    Remove the "CONFIG" keyword if it was given. */
  126.  
  127. If Strip(Upper(Word(arguments,1))) = "CONFIG" then
  128.     arguments = DelWord(arguments,1,1)
  129.  
  130. def_hotlist_file = "DOpus5:System/hotlist.config"
  131.  
  132. If Arguments = "" then do
  133.     hotlist_file = def_hotlist_file
  134.     HL_Header = "(default)"
  135.     HL_Label = "Hotlist"
  136.     end
  137. Else do
  138.     hotlist_file = strip(arguments)
  139.     HL_Header = hotlist_file
  140.     HL_Label = "Hotlist <"hotlist_file">"
  141.     end
  142.  
  143. /*=============*/
  144. Call ParseConfig
  145. /*=============*/
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152. If New_Switch = 1 then do
  153. /*    If "NEW" argument given we must still check the "source" argument
  154.     as Opus may have automatically busied the source lister for us and
  155.     it should be unbusied. */
  156.  
  157.     If source~=0 then
  158.         lister set source busy off
  159.  
  160.     lister new snapshot
  161.     source = RESULT
  162.     End
  163.  
  164. Else Do
  165. /*    If not launched from a toolbar (source given as argument), find the
  166.     source lister and if none open a new lister */
  167.  
  168.     If source=0 then do
  169.         lister query 'source' stem source_handle.
  170.         If source_handle.count ~= 0 Then
  171.             source = source_handle.0
  172.         Else do
  173.             lister new snapshot
  174.             source = RESULT
  175.             End
  176.         End
  177.     End
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185. /* Setup the lister */
  186.  
  187. lister set source busy 1
  188. lister set source off
  189. lister set source namelength 50
  190. lister set source separate dirsfirst
  191. lister set source display name comment
  192. lister set source lock state on format on
  193.  
  194. lister clear source
  195. lister set source path ""
  196. lister set source title "Hotlist"
  197. lister set source header HL_Header
  198. lister set source field 0 Name 4 Path
  199. lister set source label HL_Label
  200. lister refresh source full
  201.  
  202. Call AddConfigEntries
  203.  
  204. /*--------------------------------------------------------------------------------*/
  205.  
  206. myportname = "hotlisthd_"source
  207.  
  208. about_string = '"Super-Hotlist for Directory Opus 5'CR'Written by Leo '"'"'Nudel'"'"' Davidson for Gods'"'"'Gift Utils.'CR||CR'Read '"'"'dopus5:modules/Hotlist.dopus5'"'"' for more info." OK'
  209.  
  210. /* Open a port to talk to the lister with. Make sure there isn't already one! */
  211. Call Forbid()
  212.     If Show("P",myportname) then do
  213.         Call Permit()
  214.         dopus request '"Hotlist error: multiple handlers!" OK'
  215.         Exit
  216.         End
  217.     If ~openport(myportname) then do
  218.         Call Permit()
  219.         dopus request '"Hotlist error: could not open port" OK'
  220.         Exit
  221.         End
  222. Call Permit()
  223. lister set source handler myportname quotes fullpath
  224.  
  225. Wanted = "Delete MakeDir ScanDir"
  226. TrapAndKill = Wanted "Hotlist PrintDir DiskInfo Copy CopyAs Move MoveAs Rename Parent Root Comment Protect Read HexRead Show Play Assign GetSizes DateStamp"
  227. do while TrapAndKill ~= ""
  228.     parse var TrapAndKill FluffyRabbit TrapAndKill
  229.     dopus addtrap FluffyRabbit myportname
  230.     end
  231.  
  232. do forever
  233.     call waitpkt(myportname)
  234.  
  235.     packet=getpkt(myportname)
  236.     if packet~='00000000'x then do
  237.         arg0=getarg(packet,0)
  238.         arg1=getarg(packet,1)
  239.         arg2=getarg(packet,2)
  240.         arg3=getarg(packet,3)
  241.         arg4=getarg(packet,4)
  242.         arg5=getarg(packet,5)
  243.         arg6=getarg(packet,6)
  244.         end
  245.     else
  246.         arg0="spam"
  247.  
  248.     call reply(packet,0)
  249.  
  250.     Rereadconfig = 0
  251.  
  252.  
  253.  
  254. /*    If we get scandir, re-read the config file. */
  255.  
  256.     if Arg0 = "ScanDir" then
  257.         Rereadconfig = 1
  258.  
  259.  
  260. /*    If they type in a path of their own, just read it in (removes us). */
  261.  
  262.     If Arg0 = "path" then
  263.         if arg2 ~= "" then
  264.             lister read source arg2
  265.  
  266. /*    If they've used one of the pop-up menu items do that funky stuff...
  267.     **** MUST BE ABOVE "MakeDir" SECTION!!! **** (Spaghetti code ;-) ) */
  268.  
  269.     If (Arg0 = "menu" & Arg4 = "file") then do
  270.         if arg5 = totents + 1 then
  271.             lister request source '"Hotlist error: bad entry! (Too long?)" OK'
  272.         else do
  273.             if type.arg5 = "FILE" then do
  274.                 if Arg3 = file_open then
  275.                     command doubleclick Path.arg5
  276.                 if Arg3 = file_remove then do
  277.                     DelennNeedsIt.Count = 1
  278.                     DelennNeedsIt.0 = Name.arg5
  279.                     Call DeleteEntryRoutine
  280.                     end
  281.                 if Arg3 = file_add then
  282.                     Arg0 = "MakeDir"
  283.                 if Arg3 = file_about then
  284.                     lister request source about_string
  285.                 end
  286.             if type.arg5 = "PATH" then do
  287.                 if Arg3 = path_read then
  288.                     lister read source '"'Path.arg5'"'
  289.                 if Arg3 = path_new then
  290.                     lister new Path.arg5
  291.                 if Arg3 = path_remove then do
  292.                     DelennNeedsIt.Count = 1
  293.                     DelennNeedsIt.0 = Name.arg5
  294.                     Call DeleteEntryRoutine
  295.                     end
  296.                 if Arg3 = path_add then
  297.                     Arg0 = "MakeDir"
  298.                 if Arg3 = path_about then
  299.                     lister request source about_string
  300.                 end
  301.             if type.arg5 = "INFO" then do
  302.                 if Arg3 = info_about then
  303.                     lister request source about_string
  304.                 end
  305.             end
  306.         end
  307.  
  308.  
  309.  
  310. /*    If something gets dropped on us we should add it to the config
  311.     file and refresh the display -- Ooow this bit's so wide it hurts!
  312.     I'm sure Edmund the ARexx-Guru knows a better way to do this and I'm
  313.     also sure I could think of one, but it's not that bad so WTF... :) */
  314.  
  315.     If Arg0 = "MakeDir" Then Arg2 = "Can you say Kludge?"
  316.     If (Arg0 = "drop" | Arg0 = "MakeDir") then do while Arg2 ~= ""
  317.  
  318.         If Arg0 = "drop" then
  319.             parse var Arg2 '"'NewPath'"' Arg2
  320.  
  321.         If Arg0 = "MakeDir" then do
  322.             RESULT = ""
  323.             lister getstring source '"Enter path for new entry" 100 "" Okay|Cancel'
  324.             NewPath = RESULT
  325.             If DOPUSRC = 0 Then NewPath = ""
  326.             Arg2=""
  327.             End
  328.  
  329.         If NewPath ~= "" Then Do
  330.             NewPath_U = Upper(NewPath)
  331.             Do i=0 to totents while (NewPath_U ~= Upper(Path.i))
  332.                 End
  333.             If i ~= totents + 1 Then
  334.                 lister request source '"'NewPath||CR'is already in the hotlist!" OK'
  335.             Else do
  336.                 RESULT = ""
  337.                 lister getstring source '"Enter name for'CR||NewPath'" 50 "'NewPath'" Okay|Cancel'
  338.                 If (DOPUSRC ~= 0 & RESULT ~= "") Then Do
  339.                     NewName = RESULT
  340.  
  341.                     NewName_U = Upper(NewName)
  342.                     Do i=0 to totents while (NewName_U ~= Upper(Name.i))
  343.                         End
  344.                     If i ~= totents + 1 then
  345.                         lister request source '"'NewName||CR'is already used in the hotlist!" OK'
  346.                     Else do
  347.                         If Word(StateF(NewPath),1) = "FILE" Then
  348.                             NewType = "FILE"
  349.                         Else
  350.                             NewType = "PATH"
  351.                         lister request source '"Select type-colour for'CR||NewPath'" Device|Dir|File|Assign|Cancel'
  352.                         If RC ~= 0 Then do
  353.                             If RC = 1 then NewColour = "DEV"
  354.                             If RC = 2 then NewColour = "DIR"
  355.                             If RC = 3 then NewColour = "FIL"
  356.                             If RC = 4 then NewColour = "ASS"
  357.                             lister request source '"Plain or Bold?" Plain|Bold'
  358.                             If RC = 0 then NewColour = "B"||Left(NewColour,2)
  359.  
  360.                             If Exists(hotlist_file) then
  361.                                 ncfg_mode = "A"
  362.                             Else
  363.                                 ncfg_mode = "W"
  364.                             If ~Open(ncfg,hotlist_file,ncfg_mode) then
  365.                                 lister request source '"Could not write to hotlist!" OK'
  366.                             Else do
  367.                                 If NewName = NewPath then
  368.                                     Call Writeln(ncfg,NewColour NewType '"'NewPath'"')
  369.                                 Else
  370.                                     Call Writeln(ncfg,NewColour NewType '"'NewPath'"' '"'NewName'"')
  371.                                 Call Close(ncfg)
  372.                                 Rereadconfig = 1
  373.                                 end
  374.                             End
  375.                         End
  376.                     End
  377.                 end
  378.             end
  379.         end            /* Wheeee it's a slide! */
  380.  
  381.  
  382.  
  383. /*    If they've clicked on an entry, read it in. (Will read into a new buffer
  384.     and close us down). Unless it's a file, then do doubleclick on it. */
  385.  
  386.     If Arg0 = "doubleclick" then do
  387.         if arg5 = totents + 1 then
  388.             lister request source '"Hotlist error: bad entry! (Too long?)" OK'
  389.         else do
  390.             If type.arg5 = "INFO" Then
  391.                 lister request source about_string
  392.             If Type.arg5 = "FILE" Then
  393.                 command doubleclick Path.arg5
  394.             If Type.arg5 = "PATH" then do
  395.                 if arg6 = "shift" Then
  396.                     lister new Path.arg5
  397.                 else
  398.                     lister read source '"'Path.arg5'"'
  399.                 end
  400.             end
  401.         end
  402.  
  403.  
  404.  
  405. /*    If they've dropped one of our entries on another lister tell it
  406.     that it had better read it or there will be trouble from da boyez... */
  407.  
  408.     If Arg0 = "dropfrom" then do
  409.         /* I don't know if it's a bug or not but under Opus 5.1226 droping on things which are not other listers returns our lister handle instead of zero! */
  410.         If (Arg3=0 | Arg3=source) Then
  411.             lister request source '"You can only drop entries on other listers." OK'
  412.         Else do
  413.             /* Just take the first entry if more than one, and strip quotes, too */
  414.             parse var arg2 '"'arg2'"' junk
  415.             do i=0 to totents while (arg2 ~= Name.i)
  416.                 end
  417.             selecent = i
  418.             if selecent = totents + 1 then
  419.                 lister request source '"Hotlist error: bad entry! (Too long?)" OK'
  420.             else do
  421.                 If Type.selecent = "INFO" then
  422.                     lister request source '"Uhh, no, you can'"'"'t drop that anywhere..." Oh, silly me'
  423.                 If Type.selecent = "FILE" then
  424.                     lister request source '"Drag-n-drop of files doesn'"'"'t'CR'do anything right now." OK'
  425.                 If Type.selecent = "PATH" then
  426.                     lister read arg3 '"'Path.selecent'"'
  427.                 end
  428.             end
  429.         end
  430.  
  431.  
  432.  
  433. /*    Inactive message means close down. No need to check the lister handle
  434.     as we only deal with one per script */
  435.  
  436.     If Arg0 = "inactive" then do
  437.         lister set source lock state off format off
  438.         Call closeport(myportname)
  439.         Exit
  440.         End
  441.  
  442.  
  443.  
  444. /*    The complete pain-in-the-butt Delete routine. I guess I have to
  445.     write it sooner or later, let's get it over with... Oh, that wasn't too bad. */
  446.  
  447.     If Arg0 = "Delete" then do
  448.         lister query source selentries stem DelennNeedsIt.
  449.         Call DeleteEntryRoutine
  450.         End
  451.  
  452.  
  453.  
  454. /*    Snapshot & UnSnapshot */
  455.  
  456.     If Arg0 = "snapshot" then do
  457.         lister query source position
  458.         snapshot = RESULT
  459.         Call SaveConfigRoutine
  460.         end
  461.  
  462.     If Arg0 = "unsnapshot" then do
  463.         snapshot = ""
  464.         Call SaveConfigRoutine
  465.         end
  466.  
  467.  
  468.  
  469.     If Rereadconfig = 1 then do
  470.         lister set source busy 1
  471.         lister refresh source full
  472.         Call ParseConfig
  473.         Call AddConfigEntries
  474.         Rereadconfig = 0
  475.         end
  476.  
  477.  
  478.  
  479.     end
  480.  
  481.  
  482.  
  483. EXIT /* Just in case forever comes ;-) */
  484.  
  485.  
  486.  
  487. /*--------------------------------------------------------------------------------*/
  488.  
  489. /* Read and parse the config file and add items to the lister.
  490.    *** SHOULD BE CALLED WITH LISTER IN BUSY STATE! *** */
  491.  
  492. ParseConfig:
  493.  
  494. /* Read and parse the config */
  495.  
  496. pathmenu.COUNT = 8
  497. pathmenu.0 = "Read Path"
  498. pathmenu.1 = "Read Into New Lister"
  499. pathmenu.2 = "---"
  500. pathmenu.3 = "Remove from Hotlist"
  501. pathmenu.4 = "---"
  502. pathmenu.5 = "New Item"
  503. pathmenu.6 = "---"
  504. pathmenu.7 = "About Hotlist"
  505.  
  506. path_read   = 0
  507. path_new    = 1
  508. path_remove = 3
  509. path_add    = 5
  510. path_about  = 7
  511.  
  512. filemenu.COUNT = 7
  513. filemenu.0 = "Open"
  514. filemenu.1 = "---"
  515. filemenu.2 = "Remove from Hotlist"
  516. filemenu.3 = "---"
  517. filemenu.4 = "New Item"
  518. filemenu.5 = "---"
  519. filemenu.6 = "About Hotlist"
  520.  
  521. file_open   = 0
  522. file_remove = 2
  523. file_add    = 4
  524. file_about  = 6
  525.  
  526. infomenu.COUNT = 1
  527. infomenu.0 = "About Hotlist"
  528.  
  529. info_about = 0
  530.  
  531. /* Initialise... */
  532.  
  533. i = -1
  534. badents = 0
  535. snapshot = ""
  536.  
  537.  
  538. If open(hl,hotlist_file,"R") then do
  539.     Do until EOF(hl)
  540.         erp = readln(hl)
  541.  
  542.         if length(erp) > 0 then do
  543.  
  544.             if word(erp,1) = "SNAPSHOT:" then
  545.                 snapshot = word(erp,2)
  546.  
  547.             else do
  548.                 i=i+1
  549.                 parse var erp Colour.i " " Type.i ' "'Path.i'"' " " '"'Name.i'"'
  550.                 If Path.i ~= "" Then do
  551.                     If Type.i = "" Then
  552.                         Type.i = "PATH"
  553.                     OrgColour.i = Colour.i
  554.                     select
  555.                         when Colour.i = "DEV" then Colour.i = -2    /* Device */
  556.                         when Colour.i = "DIR" then Colour.i = 1        /* Dir */
  557.                         when Colour.i = "FIL" then Colour.i = -1    /* File */
  558.                         when Colour.i = "ASS" then Colour.i = 2        /* Assign */
  559.                         when Colour.i = "BDE" then Colour.i = -4    /* Bold device */
  560.                         when Colour.i = "BDI" then Colour.i = 3        /* Bold dir */
  561.                         when Colour.i = "BFI" then Colour.i = -3    /* Bold file */
  562.                         when Colour.i = "BAS" then Colour.i = 4        /* Bold assign */
  563.                         otherwise Colour.i = 2
  564.                         end
  565.                     end
  566.                 else do
  567.                     lister request source '"Bad entry on line' (i+badents+1) 'of config file" OK'
  568.                     i=i-1
  569.                     badents = badents + 1
  570.                     end
  571.                 end
  572.             end
  573.         end
  574.     Call close(hl)
  575.     end
  576.  
  577. totents = i
  578.  
  579. If totents = -1 then do
  580.     totents = 0
  581.     Name.0 = ""
  582.     Path.0 = "« Empty Hotlist : Click for info »"
  583.     Colour.0 = -2
  584.     Type.0 = "INFO"
  585.     End
  586.  
  587. return
  588.  
  589. /*--------------------------------------------------------------------------------*/
  590.  
  591. /* Add the entries */
  592.  
  593. AddConfigEntries:
  594.  
  595. lister clear source
  596.  
  597. do i=0 to totents
  598.     If Name.i = "" Then do
  599.         Name.i = Path.i   /* This is important! */
  600.         Morden.COMMENT = ""
  601.         end
  602.     Else
  603.         Morden.COMMENT = "(" || Path.i || ")"
  604.  
  605.     Morden.NAME = Name.i
  606.     Morden.TYPE = Colour.i
  607.  
  608. /*    The userdata field (returned in arg5 for doubleclick, drop, and menu
  609.     events) is used to quickly identify which entry DOpus is talking
  610.     about. */
  611.  
  612.     Morden.USERDATA = i
  613.  
  614.     If Type.i = "INFO" Then
  615.         Morden.MENU = infomenu.
  616.     If Type.i = "FILE" Then
  617.         Morden.MENU = filemenu.
  618.     If Type.i = "PATH" then
  619.         Morden.MENU = pathmenu.
  620.  
  621.     lister addstem source Morden.
  622.     end
  623.  
  624. lister refresh source full
  625. lister set source busy 0
  626.  
  627. return
  628.  
  629. /* ========================================================================= */
  630.  
  631. DeleteEntryRoutine:
  632. If DelennNeedsIt.Count > 0 then do
  633.     If DelennNeedsIt.Count = 1 then
  634.         plural = "y"
  635.     else
  636.         plural = "ies"
  637.  
  638.     lister request source '"Warning: you cannot get back'CR'what you delete! OK to delete:'CR||CR||DelennNeedsIt.Count 'entr'plural' from the hotlist?" Proceed|Cancel'
  639.     If RC ~= 0 Then do
  640.         If ~Open(ncfg,hotlist_file,"W") then
  641.             lister request source '"Could not write to hotlist!" OK'
  642.         Else do
  643.  
  644.             If snapshot ~= "" then
  645.                 Writeln(ncfg,"SNAPSHOT:" snapshot)
  646.  
  647.             Do i=0 to totents
  648.                 Do x=0 to DelennNeedsIt.Count While (Name.i ~= DelennNeedsIt.x)
  649.                     End
  650.                 If x = ( DelennNeedsIt.Count + 1 ) Then do
  651.                     If Name.i = Path.i then
  652.                         Call Writeln(ncfg,OrgColour.i Type.i '"'Path.i'"')
  653.                     Else
  654.                         Call Writeln(ncfg,OrgColour.i Type.i '"'Path.i'"' '"'Name.i'"')
  655.                     End
  656.                 End
  657.             Call Close(ncfg)
  658.             Rereadconfig = 1
  659.             End
  660.         End
  661.     End
  662. Return
  663.  
  664. /* ========================================================================= */
  665.  
  666. SaveConfigRoutine:    /* Does *not* cause config to be re-read! */
  667.  
  668. If ~Open(ncfg,hotlist_file,"W") then
  669.     lister request source '"Could not write to hotlist!" OK'
  670. Else do
  671.  
  672.     If snapshot ~= "" then
  673.         Writeln(ncfg,"SNAPSHOT:" snapshot)
  674.  
  675.     Do i=0 to totents
  676.         If Name.i = Path.i then
  677.             Call Writeln(ncfg,OrgColour.i Type.i '"'Path.i'"')
  678.         Else
  679.             Call Writeln(ncfg,OrgColour.i Type.i '"'Path.i'"' '"'Name.i'"')
  680.         End
  681.  
  682.     Call Close(ncfg)
  683.     End
  684. Return
  685.  
  686. /* ========================================================================= */
  687.  
  688. /* Dum tee dumm... Just got ta put another Pizza in the oven... */
  689.