home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 455.lha / finddisk_v3.1 / FindDisk3.1.doc < prev    next >
Text File  |  1990-12-10  |  8KB  |  216 lines

  1.  
  2.   FindDisk3.1  The Workbench version.
  3.  
  4.   A Public Domain Program by Ross MacGregor.
  5.  
  6.   The source was compiled with the Manx compiler.
  7.   (It shouldn't need much, if any, work to compile with Lattice)
  8.  
  9.   Most people that own Amiga's soon accumulate a *GREAT* collection of
  10.   3-&-1/2 '' disks filled with lots and lots of PD software.  And I'm sure
  11.   that many people still go through the same time-consuming process I use to
  12.   when finding a certain program  [ I think it's on this disk...no maybe this
  13.   one...lets try this one...it must be here...I guess not...argggh! $#@#%! ].
  14.  
  15.   If you have been looking to organize your disks a little better, this may
  16.   be just what you need.  I have seen other disk cataloging programs but
  17.   they looked BIG and complicated.
  18.  
  19.  
  20.   I wanted a simple, unintrusive CLI command that would tell me on what disk
  21.   such-n-such a program could be found.
  22.  
  23.   So I created a CLI command FD that did just that.  This is the workbench
  24.   version of that program, but it will still search for strings given as
  25.   CLI arguments.
  26.  
  27.   Type> FindDisk3.1       ;  And the its display window is opened up.
  28.  
  29.   [Please rename it if being used from the CLI.]
  30.  
  31.   Type> FindDisk3.1 text  ;  And the disk's directory listing containing
  32.                              'text' is displayed just as if you had done
  33.                              an ls df0:. The text could also be the name
  34.                              of the disk.
  35.  
  36.                     Multiple arguments can also be given so that the
  37.                     directory, ARP_COMMANDS_DOC could be found with,
  38.                     FD doc arp.
  39.  
  40.  
  41.   The DiskList
  42.  
  43.   FD uses a file which by default is called DiskList and is contained in
  44.   the directory df0:FindDisk.  This is an almost ASCII file containing
  45.   the listings of your disks.
  46.   [clarification of almost...]
  47.   To save space the listings are stored with the spaces ($20's) compacted
  48.   and some words of the listing tokenized. This results in a file with many
  49.   special (non-standard) control characters.  It will not TYPE properly!
  50.  
  51.   The DiskList can be loaded to ram: (yes, it's just a COPY but its also an
  52.   FD command, [LoadDL] ).  This enables single drive users to capture the
  53.   dir listings of other disks.  It frees up the drive and also speeds
  54.   things up if the DiskList gets large.
  55.  
  56.  
  57.   TempDL
  58.  
  59.   When you capture the dir of a disk [SaveDir] it goes to an intermediate
  60.   file, TempDL, instead of going directly to DiskList (basically it's a
  61.   Shell> dir >>ram:TempDL ).  This is for reasons of more efficient
  62.   updating of the DiskList.  If someone had many disks to do, inserting the
  63.   directories into DiskList one at a time would take much longer than
  64.   inserting them all at once as FD does.  Single drive users would also
  65.   need to reinsert their DiskList disk after each [SaveDir].
  66.   You must do an [UpdateDL] or [SaveDL] to update the DiskList.
  67.  
  68.   [Update] will update the current DiskList.  If DiskList was loaded to
  69.   ram: the current one is considered there, otherwise it updates the disk
  70.   DiskList.
  71.  
  72.   [SaveDL] will copy the ram:DiskList to its disk location after doing an
  73.   update (as above).  If the current DiskList is not in RAM it will only do
  74.   an update.
  75.  
  76.  
  77.  
  78.                             FindDisk3.1
  79.                           ---------------
  80.  
  81.   [    _    ]   The display window opens up with the string input gadget
  82.                 activated.  Here you can type in several text strings
  83.                 with space separaters followed by return.
  84.  
  85.                 If these strings are all found on the same line of a
  86.                 directory listing in the DiskList then that dir listing is
  87.                 printed.
  88.  
  89.                 If the search text is preceded with an ! with no spaces in
  90.                 between then the search is case sensitive otherwise it is
  91.                 not.
  92.  
  93.                 The disk name can also be used to list its contents.
  94.  
  95.                 Typing [q] [return] will quit the display when the "more"
  96.                 prompt is displayed.
  97.  
  98.       *s        The commands below marked with '*s' will look at the string
  99.                 input gadget for input.
  100.                 When typing in one of these strings you must remember not
  101.                 to hit the return key, otherwise, the program will think it
  102.                 is a search string.
  103.  
  104.  
  105.   [LoadDL]      Loads DiskList to ram: by default or to an alternate
  106.                 path/name if specified by the environment variable dltemp .
  107.                 The DiskList in RAM then becomes the current DiskList.
  108.                 DiskList must be now be saved to disk using [SaveDL] if any
  109.                 changes are made  because [UpdateDL] will only update the
  110.                 RAM DiskList.
  111.  
  112.   [SaveDir]     Appends in ram:TempDL the ASCII (root) directory listing
  113.                 of the disk in drive DF0: by default.  It takes it from
  114.                 an alternate drive if specified by the environment
  115.                 variable dldisk.
  116.      *s         It will also capture the listing of a disk or
  117.                 directory path specified by the string input gadget.
  118.  
  119.   [UpdateDL]    This will update the current DiskList with
  120.                 the contents of the temporary file TempDL.
  121.  
  122.   [SaveDL]      Does an update (as above) then, if the DiskList is in RAM,
  123.                 it is copied to its disk location.  DiskList and TempDL are
  124.                 removed from RAM.
  125.  
  126.   [NewDL]       Creates a new DiskList, by deleting the contents of the
  127.                 Current DiskList.
  128.  
  129.   *s [RemDir]   This will remove the disk listing in DiskList that matches
  130.                 the diskname in the input string.
  131.  
  132.  
  133.   Switches:
  134.  
  135.   [Root Directory/Sub-Directories]
  136.  
  137.   When 'Sub-Directories' is selected, the SaveDir command will recursively
  138.   capture any sub-directories in the directory it's listing.
  139.  
  140.   When 'Root Directory' is selected, SaveDir will only capture the root
  141.   directory.
  142.  
  143.   [Standard Display/Short Form]
  144.  
  145.   When 'Short Form' is selected, only the lines that contain the search
  146.   string will be output on the display window.
  147.  
  148.  
  149.  
  150.                       Environment Variables
  151.                       ---------------------
  152.  
  153.  
  154.   FindDisk will check for the three environment variables listed below.
  155.  
  156.   *Notice* that dldisk and dltemp require the name of DiskList also!
  157.  
  158.   Variable =  Default setting if not specified.
  159.  
  160.   DLDISK   =  df0:FindDisk/Disklist
  161.   ------
  162.            Disk storage location/name.  This is where FD expects to find
  163.            the permanent DiskList.  It must be on a floppy or hard drive.
  164.  
  165.   DLTEMP   =  ram:DiskList
  166.   ------
  167.            Ram storage location/name.  This is where FD will copy the
  168.            permanent DiskList to on a [LoadDL].  This makes the DiskList
  169.            resident and frees up the drive.
  170.  
  171.   DLDRIVE  =  df0:
  172.   -------
  173.            Captures directory of this drive on a [SaveDir] command.
  174.  
  175.  
  176.  
  177.  
  178.                          DiskList Format
  179.                          ---------------
  180.  
  181.    The DiskList is stored in a compacted form which presently:
  182.  
  183.      below: { unskrunched } => { skrunched }
  184.             [] is a byte of memory
  185.  
  186.      * compacts strings of spaces
  187.          { [$20] [$20] [$20] [$20] [$20] } => { [SKRUNCHAR] [30+5] }
  188.          { [$20] [$20] } => { [$20] [$20] }
  189.  
  190.      * the STARTSTR is compacted
  191.          { STARTSTR } => { [STARTCHAR] }
  192.  
  193.  
  194.  
  195.  
  196.                     BUG FIXES / UPDATE HISTORY
  197.                     --------------------------
  198.  
  199.  
  200.    FindDisk3.1   Fixed search lockup. Reproducible when a small DiskList
  201.                  was used.
  202.  
  203.                  Option created to capture all sub-directories on a given
  204.                  disk when adding it to the DiskList.
  205.  
  206.                  A sub-directory can now be specified as a parameter
  207.                  to SaveDir.
  208.  
  209.                  New "Short Form" listing option.
  210.  
  211.                  Some 3.0 error returns were not propery freeing up
  212.                  allocated resouces.  These were accordingly squashed.
  213.  
  214.    FindDisk3.0   First release.
  215.  
  216.