home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 1b / stdcat.doc < prev    next >
Encoding:
Text File  |  1991-02-27  |  16.1 KB  |  450 lines

  1.     /*------------------------------------------------------------------*/
  2.     /*                                    */
  3.     /*                STDCAT    V4.3                */
  4.     /*                     by                    */
  5.     /*                Bob Silliker                */
  6.     /*                                    */
  7.     /*                   July  16, 1989                */
  8.     /*                                    */
  9.     /*------------------------------------------------------------------*/
  10.  
  11.  
  12.     Introduction
  13.     ------------
  14.  
  15.     STDCAT is a simple disk catalog program.  The name was derived
  16.     from 520ST (ST) and Disk CATalog (DCAT).  It will work on
  17.     either mono or color systems (Med Rez color).
  18.  
  19.     This is the last version of STDCAT (provided there aren't any
  20.     major bugs.) that will work with the existing catalog file format.
  21.     The next major release of STDCAT (V5.0) will be out sometime in
  22.     the fall of 1989.
  23.     
  24.  
  25.     Version 4.3 has the following improvments over 4.2
  26.       - I have extended the printer time out from about 6 seconds to
  27.         about 18 seconds.  Some sloooow printers were timing out when
  28.         they shouldn't.
  29.  
  30.     Version 4.2 has the following improvments over 4.0
  31.       - The program forces the .CAT extension for all catalog file
  32.         names.  When saving a catalog the catalog file name will have
  33.         the extension replaced with .CAT.
  34.  
  35.       - The volume name underscore 2-3-4 bomb problem is fixed.  This
  36.         was caused by a GEM bug (tedinfo and valid string "nnnnnnnnnnn").
  37.         However, the new allow string allows '?' and '*' to be entered
  38.         in the volume name dialog.  So the program detects the '?' and
  39.         '*' and replaces them with '_'.
  40.     
  41.           - The program would ask you if the catalog disk was in drive A
  42.         when saving even when the catalog save file is on another disk.
  43.         This only occured when the A was the default drive.  It no
  44.         longer does this.
  45.  
  46.       - The catalog stats dialog now contains the catalog file
  47.         modification date.
  48.  
  49.       - The program will take one command line argument that is either
  50.         the catalog directory or the catalog file to open.
  51.  
  52.       - The menu entry 'Comment' is now 'Dcomment' and is still the
  53.         Disk comment (like Fcomment is File/Folder comment).
  54.  
  55.       - The menu entry 'Display Comments' is now 'Display Fcomments'.
  56.  
  57.       - The menu entry 'Print Comments' is now 'Print Fcomments'.
  58.  
  59.       - If extra volume labels are found they are deleted when the
  60.         volume label is changed.
  61.  
  62.       - There is a new menu option that allows reading catalogs onto
  63.         the end of the a catalog already loaded into memory.
  64.  
  65.       - I have provided the source code for a program that shows how
  66.         to read the catalog information from the catalog file.  This
  67.         is for people who want to write their own printing programs.
  68.  
  69.         Version 4.0 has at least the following features over 3.0
  70.  
  71.       - the bug that caused the 16 folder limit on a disk has been
  72.         been corrected and is 16 folder levels.
  73.  
  74.       - there is a environment variable 'STDCAT' for the default path
  75.         to the catalog file.
  76.  
  77.           - a new menu option that allows deletion of a disk.  This
  78.             causes the disks (after the disk deleted) to be renumbered.
  79.  
  80.           - each folder/file can have a 33 character comment string.
  81.  
  82.       - minor fix that allows the use of lowercase letters when
  83.             entering the volume name (the volume name is converted to
  84.             uppercase when the user exists the volume dialog).
  85.  
  86.           - there is a new print option to include the file comment
  87.             in the printout.
  88.  
  89.       - find has been expanded to include comment and volume fields.
  90.  
  91.       - find has much better pattern matching capabilities.
  92.  
  93.       - when adding or updating a disk the disk serial number is
  94.         read in and stored.
  95.  
  96.     The program has two windows.  One window is used to contain
  97.     a list of the disk volumes in the catalog.  The other window
  98.     lists the contents of the current disk.  The user is allowed
  99.     to browse through either window using either the slider bars
  100.     or arrows.
  101.  
  102.     There are menu options to sort the disk content window by
  103.     name, date, size or type and options to find files using wild
  104.     cards, add/update/delete disks, add a comment to a disk/folder/
  105.     file, and finally change the volume name of a disk.
  106.  
  107.     The user can print out the contents of the catalog on the
  108.     parallel printer port.  The printout can be sorted by
  109.     name, date, size or type.  These sort options are separate
  110.     from the display sort options.  There are options to include
  111.     a table of contents (printed at the end of the printout),
  112.     the date, size and folder/file comment.  The user can select
  113.     any combination.
  114.  
  115.     There are miscellanous menu options to: reset the window
  116.     positions and sizes, set Auto Newtop, display catalog
  117.     statistics, and display STDCAT limitations and set colors.
  118.  
  119.  
  120.     Menu options
  121.     ------------
  122.  
  123.         File menu
  124.         ---------
  125.  
  126.         New
  127.         Start a new catalog.  The default name for the catalog
  128.         will be STDCAT.CAT on the current drive.  The number of
  129.         disks will be set to 0.  You can rename the catalog,
  130.         when you save it to disk, using the Save As menu option.
  131.  
  132.         Open
  133.         Open an existing catalog.  The standard file selector
  134.         dialog is displayed and the user can change the path
  135.         or file at will.  If OK is selected then an attempt
  136.         will be made to open the catalog.  If the catalog
  137.         is corrupted then the user will be prompted to
  138.         CONTINUE or CANCEL the open operation.  If the user
  139.         selects CONTINUE then the user will see what was
  140.         found in the catalog.  This could be complete garbage.
  141.  
  142.         Read
  143.         Read a catalog onto the end of the existing open catalog.
  144.         The disk numbers for the disks of the catalog being read
  145.         start from the last disk number (plus 1) already loaded.
  146.         You can't exceed 999 disks loaded at one time.
  147.  
  148.         Save
  149.         Save the catalog to disk.  The catalog will be saved
  150.         using the current catalog name and will remain open.
  151.     
  152.         Save AS
  153.         Save the catalog to disk using a new catalog name. The
  154.         user will be prompted for a new catalog name using the
  155.         standard file selector box.
  156.  
  157.         Close
  158.         Close the catalog.  If modifications have been made
  159.         to the catalog then the user will be prompted to:
  160.         save before exiting, close without saving or cancel
  161.         the close operation.  Once close is complete the
  162.         user is back to the state where a catalog is not open.
  163.  
  164.         Quit
  165.         Exit STDCAT and return to whatever shell invoked it.
  166.         If modifications have been made to the catalog then the
  167.         user will be prompted to: save before exiting, exit
  168.         without saving or cancel the quit operation.
  169.  
  170.         View
  171.         ----
  172.         Display Fcomments
  173.                 This will cause the size/date/time fields to be switched
  174.         with the folder/file comment field in the disk content
  175.         window.  Doing a full on the disk content window will
  176.         show all of the folder/file information.
  177.  
  178.         Display Serial #
  179.         The disk serial number will be displayed in place of the
  180.         disk volume.
  181.  
  182.         Sort by Name
  183.         Sort by Date
  184.         Sort by Size
  185.         Sort by Type
  186.         All of these menu options sort the contents of the disk
  187.         content window.  When sorting by Date, Size or Type
  188.         files that are similar for that attribute will be sorted
  189.         by name and type as a sub-group.
  190.  
  191.          Descending
  192.         Sort the enteries from highest to lowest.  The default
  193.         is from lowest to highest.
  194.  
  195.         Disk
  196.         ----
  197.  
  198.         Find
  199.         Find a file, folder, comment or volume name in the catalog.
  200.         The '*' will match any sequence of characters and the
  201.         '?' will match any character in a single position.  The
  202.         user can also specify lists and ranges for a particular
  203.         character using '[set]'.  Where 'set' is a list and/or
  204.             range of characters.  The wild cards '*' and '?' match
  205.         literally if included in 'set'.  If 'set' starts with '^'
  206.         the set is complemented and to match ']' literally put
  207.         it first in the list.  You can mix '*', '?', and '[set]'
  208.         as much as you want.
  209.  
  210.         EG.
  211.             a*        - match anything that starts with 'a'
  212.             [am-ox]*    - match anything that starts with 'a',
  213.                   'm' to 'o', or 'x'.
  214.             [^a-l]*    - match anything that does not start
  215.                   with 'a' to 'l'.
  216.  
  217.         If you  want to match '*' or '?' or '[' literally
  218.         outside of a '[set]' then you can use the '/' as
  219.         the escape character.  To match '/' literally you have
  220.         to use '//'.
  221.  
  222.         Add
  223.         Add a disk to the end of the catalog.  The new disk
  224.         will be given the next disk number.  The program will
  225.         read in the disks volume name serial number and complete
  226.         contents into ram.  If you run out of ram then drop some
  227.         accessories or use multiple catalogs.
  228.  
  229.         Update
  230.         Update an existing disk in the catalog.  The program
  231.         checks the volume name and serial number on the disk to
  232.         the volume name and serial number on the current disk.
  233.         If the names are not the same the user is prompted to
  234.         verify that it is OK to update the disk in the catalog.
  235.         The program will copy over the comments of the folders
  236.         and files that have the same path on the old disk as on
  237.         the new disk.
  238.  
  239.         Delete
  240.         Delete a disk from the catalog.  The disks that come after
  241.         the disk deleted will be shifted down (up?) and have their
  242.         disk numbers decremented by 1.
  243.  
  244.         Volume
  245.         Change the volume name of a disk.  The user will be asked
  246.         to place the disk in drive 'A' and then old volume name
  247.         will be verified before changing the name.  The volume
  248.         dialog now allows lowercase letters to be entered.  The
  249.         volume name will be converted to all uppercase after the
  250.         user exist the volume dialog.  The program checks the
  251.         disk serial number and will complain if it is not correct.
  252.         If the disk serial number is not in the catalog then the
  253.         program will load when the volume name has been changed.
  254.  
  255.         NOTE:  The dialog will allow '?' and '*' to be entered
  256.         into the volume name (a problem with limitations of
  257.         tedinfo valid strings in GEM).  The program will replace
  258.         every occurance of '?' and '*' in the volume name with
  259.         the underscore ('_') character.
  260.  
  261.     Comment
  262.     -------
  263.  
  264.         Fcomment
  265.         Add a comment to a folder/file in the catalog.  This is
  266.         also used to change an existing comment.  There are only
  267.         33 characters available for a comment.
  268.  
  269.         Dcomment
  270.         Add a comment to a disk in the catalog.  This is also used
  271.         to change an existing comment.  There are only 33 characters
  272.         available for a comment.
  273.  
  274.         Print
  275.         -----
  276.  
  277.         Print Date
  278.         When printing the catalog include the date and time as
  279.         part of the printout.
  280.  
  281.         Print Size
  282.         When printing the catalog include the size of a file as
  283.         part of the printout.
  284.  
  285.         Print Fcomments
  286.         When printing the catalog include the file comment for
  287.         each file in the printout.
  288.  
  289.         Print Contents
  290.         When printing the catalog include a table of contents.
  291.         This lists each disk and the page number the disk can
  292.         be found on.  The table of contents is printed last.
  293.  
  294.         Disk Per Page
  295.         This is a print switch that will cause only one disk to
  296.         be printed on a page.  This can waste lots of paper if
  297.         there are not many files or folders on a disk.
  298.  
  299.         Sort by Name
  300.         Sort by Date
  301.         Sort by Size
  302.         Sort by Type
  303.         All of these menu options sort the contents of a disk
  304.         when printed.  When sorting by Date, Size or Type
  305.         files that are similar for that attribute will be sorted
  306.         by name and type as a sub-group.
  307.  
  308.         Descending
  309.         Sort the enteries from highest to lowest the default is
  310.         from lowest to highest.
  311.  
  312.         Print Catalog
  313.         Print the catalog.  A dialog is displayed and the user
  314.         can select the range of disks to be printed (default
  315.         is all disks).  The user can stop the printout at
  316.         any time.  If the printer is not connected then printing
  317.         will be aborted after a short timeout.
  318.  
  319.         The printer must support:
  320.  
  321.             0x0D    - Carrige Return
  322.             0x0A    - Line feed
  323.             0x0C    - Form feed
  324.  
  325.             80 columns
  326.             66 lines    (62 lines are used)
  327.  
  328.         Misc
  329.         ----
  330.  
  331.         Default Windows
  332.         Set the window sizes and positions back to default
  333.         settings.
  334.  
  335.  
  336.         Auto Newtop
  337.         This is a mode switch that when checked will automatically
  338.         switch the top window under the mouse.  This saves from
  339.         having to click on the window to bring it to the top
  340.         when moving from one window to the other.
  341.  
  342.         Catalog Stats
  343.         Displays the number of disks, the number of bytes used,
  344.         the number of bytes unused, the number of files and the
  345.         number of folders in the catalog.
  346.  
  347.         STDCAT Limits
  348.         Displays some of the limitations of stdcat.
  349.  
  350.  
  351.     General
  352.     -------
  353.  
  354.     When you first run the program an attempt is made to find the
  355.     environment variable 'STDCAT'.  If the environment variable is not
  356.     found then the program will try to open '\STDCAT.CAT'.  If the
  357.     environment variable is found then the default path set to the path
  358.         after the '='.   If the path does not end in a '\' then the program
  359.         will setup the catalog file name to the last name in the path.  If
  360.         the path ends in a '\' then the program program will look for the
  361.         default catalog file name 'STDCAT.CAT' using the path.  If the
  362.         catalog file cannot be opened then the user must either use the menu
  363.         entries "New" or "Open" to either create a new catalog or open an
  364.         existing catalog.  If the file is there it is opened, read in, and
  365.         displayed (Did you follow that?).
  366.  
  367.         Examples:
  368.  
  369.           STDCAT=c:\catalogs\           - open stdcat.cat in c:\catalogs
  370.           STDCAT=c:\catalogs\usenet.cat - open specified catalog.
  371.  
  372.     This is now complicated by a single command line argument that
  373.      will take precedence over what is set in the environment.  This
  374.     argument can be either the path to the catalog directory, a complete
  375.     path to the catalog file, or a catalog file that exists in the
  376.     catalog directory set by the environment variable STDCAT.
  377.  
  378.     Examples:
  379.  
  380.       Suppose the environment variable has been set to the following:
  381.  
  382.           STDCAT=c:\catalogs\usenet.cat
  383.  
  384.       Now execute stdcat from a shell
  385.  
  386.       1) stdcat.ttp             - open c:\catalogs\usenet.cat
  387.       2) stdcat.ttp arcdisks.cat - open c:\catalogs\arcdisks.cat
  388.       3) stdcat.ttp d:\test.cat  - open d:\test.cat
  389.       4) stdcat.ttp \test.cat    - open \test.cat on current drive
  390.       5) stdcat.ttp .\test.cat   - open test.cat in the current directory
  391.  
  392.         If the environment variable STDCAT is not defined then 2 above is the
  393.     same as 5.
  394.  
  395.     To select a current disk click on the name in the disk window
  396.     (usally on the left of the screen).  The contents of the current
  397.     disk is always displayed in the disk content window (usually
  398.     on the right of the screen).  The menu entries "Update", "Volume",
  399.     "Delete" and "Dcomment" only work with the current disk.
  400.  
  401.     To see the contents of a directory that is displayed in the disk
  402.     content window double-click on the directory.  This way you can
  403.         decend the directory hierarchy of a disk.  Use the closer on the
  404.         disk content window to return to the previous level.
  405.  
  406.     A find operation will change the current disk to the disk and
  407.     directory the file was last found in.  It attemps to locate the
  408.     file as the top item in the disk content window and highlites
  409.     the folder/file.
  410.  
  411.  
  412.     Acknowlegements
  413.     ---------------
  414.  
  415.     I would like to thank John Altstadt (johna@moliman.molienergy.bc.ca)
  416.     for testing version 4.0 and making some useful suggestions on
  417.     program operation.
  418.  
  419.     I would also like to thank D. Hugh Redelmeier (hugh@csri.toronto.edu)
  420.         for providing me with the source for the new pattern matching
  421.         logic and for a useful list of improvements (some of which I
  422.         implemented (my brain still hurts :-) ).
  423.  
  424.  
  425.     Warnings
  426.     --------
  427.  
  428.     This program has not been tested at all with two drive systems.
  429.     It has, however, been tested in a ram disk, on a single drive
  430.     system and on a hard disk.  Use folderXXX if you plan to exceed
  431.         the 40 folder limit on a disk.
  432.  
  433.  
  434.     Bugs
  435.     ----
  436.  
  437.     STDCAT V4.3 is not known to have any bugs.  Should you discover
  438.     any please let me know.
  439.  
  440.                 Bob Silliker
  441.                 13097 107th Ave
  442.                 Surrey B.C,
  443.                 Canada V3T 2G2
  444.             
  445.                 Phone: (604)-584-3668
  446.  
  447.     bsilliker@wimsey.bc.ca
  448.     ...!uunet!ubc-cs!van-bc!bsilliker
  449.     ...!uunet!van-bc!bsilliker
  450.