home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util2 / wssi330.lzh / WSSINDEX.FRM < prev    next >
Text File  |  1986-02-17  |  3KB  |  72 lines

  1. This is a description of the format of a WSSINDEX database.  This
  2. information is not needed for normal program operation, but may be
  3. useful if you want to write a program to convert an existing
  4. database into a WSSINDEX database, read the database with another
  5. program to produce a customized listing, or recover a damaged disk
  6. file.  This description may be easier to follow if you use it as a
  7. guide while examining a small database with DEBUG or some other
  8. utility.
  9.  
  10. Dates and times are stored in the same format as used in an FCB. 
  11. Date has 7 bits for years since 1980, 4 bits for month, 5 bits for
  12. day.  Time has 5 bits for hour, 6 bits for minute, 5 bits for
  13. second.
  14.  
  15. The database is stored unsorted.  This is done because the time
  16. required by the Quicksort algorithm used by WSSINDEX is O(n*log n)
  17. for a randomly ordered source, but O(n*n) for an already ordered
  18. input.  In more concrete terms, storing the database in sorted
  19. order would turn a 30 second sort into a longer than 10 minute
  20. sort.
  21.  
  22. Notation:   \n   - a newline, that is an ASCII linefeed, hex 0A
  23.             \EOS - end of string marker, hex 0
  24.             *    - a field dependent on the WSSINDEX version 
  25.  
  26.    length     contents
  27.    (bytes)
  28.  
  29. Header:
  30.  
  31.    9          "WSSINDEX\n"
  32.    5 or 6*    version number\n
  33.    2          number of disks in database
  34.    2          number of subdirectories (including root)
  35.    2          number of files
  36.  
  37. Disk record, repeated for each disk:
  38.  
  39.    11         volume name, blank padded to 11 chars (no \n or EOS)
  40.    4          bytes on disk
  41.    4          free bytes on disk
  42.    2          number of files on disk
  43.    2          number of subdirectories on disk (not counting root)
  44.    2          date indexed
  45.    1          "Y" or "N" for bootable or not
  46.  
  47. Subdirectory record, repeated for each subdirectory:
  48.  
  49.    2          disk number, cout starts at zero
  50.    variable   subdirectory name\n
  51.  
  52. File record, repeated for each file:
  53.  
  54.    10         file name\EOS   there may be garbage after the \EOS
  55.    4          extension\EOS   there may be garbage after the \EOS
  56.    2          date
  57.    2          time
  58.    4          size
  59.    2          disk number
  60.    2          subdirectory number, root is 0
  61.    1          "C" (if commented), else blank
  62.    variable   comment\n   if comments flag is "C"
  63.    1*         "C" (if categorized), else blank; field only present
  64.               if written by version 2.00 or later
  65.    variable*  category\n  if category flag is "C"
  66.  
  67. Note that there is not a control-Z to mark the end of file.
  68.  
  69. This information is subject to change in future releases. 
  70. However, I do guarantee that WSSINDEX will alway be able to read
  71. databases written by older versions of the program.
  72.