home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 579a.lha / FindDisk_v3.3 / FindDisk3.doc.pp / FindDisk3.doc
Text File  |  1991-12-05  |  9KB  |  234 lines

  1.  
  2.   FindDisk3.3  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.3       ;  And the its display window is opened up.
  28.  
  29.   [Please rename it if being used from the CLI.]
  30.  
  31.   Type> FindDisk3.3 text  ;  And the disk's directory listing containing
  32.                              'text' is displayed, just as if you executed
  33.                              an ls. The text could also be the name of
  34.                              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 FindDisk:DiskList.
  44.   This is an almost ASCII file containing the listings of your disks.
  45.   [clarification of almost...]
  46.   To save space the listings are stored with the spaces ($20's) compacted
  47.   and some words of the listing tokenized. This results in a file with many
  48.   special (non-standard) control characters.  It will not TYPE properly!
  49.  
  50.   The DiskList can be loaded to ram: (yes, it's just a COPY but its also an
  51.   FD command, [LoadDL] ).  This enables single drive users to capture the
  52.   dir listings of other disks.  It frees up the drive and also speeds
  53.   things up if the DiskList gets large.
  54.  
  55.  
  56.   TempDL
  57.  
  58.   When you capture the dir of a disk [SaveDir] it goes to an intermediate
  59.   file, TempDL, instead of going directly to DiskList (basically it's a
  60.   Shell> dir >>ram:TempDL ).  This is for reasons of more efficient
  61.   updating of the DiskList.  If someone had many disks to do, inserting the
  62.   directories into DiskList one at a time would take much longer than
  63.   inserting them all at once as FD does.  Single drive users would also
  64.   need to reinsert their DiskList disk after each [SaveDir]!
  65.   You must do an [UpdateDL] or [SaveDL] to update the DiskList.
  66.  
  67.   [Update] will update the current DiskList.  If DiskList was loaded to
  68.   ram: the current one is considered there, otherwise it updates the disk
  69.   DiskList.
  70.  
  71.   [SaveDL] will copy the ram:DiskList to its disk location after doing an
  72.   update (as above).  If the current DiskList is not in RAM it will only do
  73.   an update.
  74.  
  75.  
  76.  
  77.                             FindDisk3.3
  78.                           ---------------
  79.  
  80.   [    _    ]   The display window opens up with the string input gadget
  81.                 activated.  Here you can type in several text strings
  82.                 with space separaters followed by return.
  83.  
  84.                 If these strings are all found on the same line of a
  85.                 directory listing in the DiskList then that dir listing is
  86.                 printed.
  87.  
  88.                 If the search text is preceded with an ! with no spaces in
  89.                 between then the search is case sensitive, otherwise it is
  90.                 not.
  91.  
  92.                 The disk name can also be used to list its contents.
  93.  
  94.                 Typing [q] [return] will quit the display when the "more"
  95.                 prompt is displayed.
  96.  
  97.       *s        The commands below marked with '*s' will look at the string
  98.                 input gadget for input.
  99.                 When typing in one of these strings you must remember not
  100.                 to hit the return key, otherwise, the program will think it
  101.                 is a search string.
  102.  
  103.  
  104.   [LoadDL]      Loads DiskList to ram: by default or to an alternate
  105.                 path/name if specified by the environment variable DLTEMP .
  106.                 The DiskList in RAM then becomes the current DiskList.
  107.                 DiskList must be now be saved to disk using [SaveDL] if any
  108.                 changes are made  because [UpdateDL] will only update the
  109.                 RAM DiskList.
  110.  
  111.   [SaveDir]     Appends in ram:TempDL the ASCII (root) directory listing
  112.                 of the disk in drive DF0: by default.  It takes it from
  113.                 an alternate drive if specified by the environment
  114.                 variable DLDISK.
  115.      *s         It will also capture the listing of a disk or
  116.                 directory path specified by the string input gadget.
  117.  
  118.   [UpdateDL]    This will update the current DiskList with
  119.                 the contents of the temporary file TempDL.
  120.  
  121.   [SaveDL]      Does an update (as above) then if the DiskList is in RAM,
  122.                 it is copied to its disk location.  DiskList and TempDL are
  123.                 removed from RAM.
  124.  
  125.   [NewDL]       Creates a new DiskList, by deleting the contents of the
  126.                 Current DiskList.
  127.  
  128.   *s [RemDir]   This will remove the disk listing in DiskList that matches
  129.                 the diskname in the input string.
  130.  
  131.  
  132.   Switches:
  133.  
  134.   [Root Directory/Sub-Directories]
  135.  
  136.   When 'Sub-Directories' is selected, the SaveDir command will recursively
  137.   capture any sub-directories in the directory it's listing.
  138.  
  139.   When 'Root Directory' is selected, SaveDir will only capture the root
  140.   directory.
  141.  
  142.   [Standard Display/Short Form]
  143.  
  144.   When 'Short Form' is selected, only the lines that contain the search
  145.   string will be output on the display window.
  146.  
  147.  
  148.  
  149.                       Environment Variables
  150.                       ---------------------
  151.  
  152.  
  153.   FindDisk will check for the three environment variables listed below.
  154.  
  155.   *Notice* that DLDISK and DLTEMP require the name of DiskList also!
  156.  
  157.   Variable =  Default setting if not specified.
  158.  
  159.   DLDISK   =  FindDisk:Disklist
  160.   ------
  161.            Disk storage location/name.  This is where FD expects to find
  162.            the permanent DiskList.  It must be on a floppy or hard drive.
  163.  
  164.   DLTEMP   =  RAM:DiskList
  165.   ------
  166.            Ram storage location/name.  This is where FD will copy the
  167.            permanent DiskList to on a [LoadDL].  This makes the DiskList
  168.            resident and frees up the drive.
  169.  
  170.   DLDRIVE  =  DF0:
  171.   -------
  172.            Captures directory of this drive on a [SaveDir] command.
  173.  
  174.  
  175.  
  176.  
  177.                          DiskList Format
  178.                          ---------------
  179.  
  180.    The DiskList is stored in a compacted form which presently:
  181.  
  182.      below: { unskrunched } => { skrunched }
  183.             [] is a byte of memory
  184.  
  185.      * compacts strings of spaces
  186.          { [$20] [$20] [$20] [$20] [$20] } => { [SKRUNCHAR] [30+5] }
  187.          { [$20] [$20] } => { [$20] [$20] }
  188.  
  189.      * the STARTSTR is compacted
  190.          { STARTSTR } => { [STARTCHAR] }
  191.  
  192.  
  193.  
  194.  
  195.                     BUG FIXES / UPDATE HISTORY
  196.                     --------------------------
  197.  
  198.    FindDisk3.3   The New Look!
  199.  
  200.                  Extra character at end of the message display problem fixed.
  201.  
  202.                  Function getstr() was not freeing all of its allocated
  203.                  memory.
  204.  
  205.                  Add/RemoveGadget() calls were not needed so they were
  206.                  removed.
  207.  
  208.                  More input buffer write out of bounds.
  209.  
  210.                  Use of strncpy() was causing problems because of padding.
  211.  
  212.                  Remove limit of DiskList size (it was a fair size but
  213.                  unnecessary).
  214.  
  215.    FindDisk3.2   Default file for environment variable DLDISK changed
  216.                  to FindDisk:DiskList.
  217.  
  218.    FindDisk3.1   Fixed search lockup. Reproducible when a small DiskList
  219.                  was used.
  220.  
  221.                  Option created to capture all sub-directories on a given
  222.                  disk when adding it to the DiskList.
  223.  
  224.                  A sub-directory can now be specified as a parameter
  225.                  to SaveDir.
  226.  
  227.                  New "Short Form" listing option.
  228.  
  229.                  Some 3.0 error returns were not propery freeing up
  230.                  allocated resouces.  These were accordingly squashed.
  231.  
  232.    FindDisk3.0   First release.
  233.  
  234.