home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util2 / wssi330.lzh / WSSIFRM.DOC < prev    next >
Text File  |  1986-08-24  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.         This is a description of the format of a WSSINDEX database.  This
  5.         information is not needed for normal program operation, but may be
  6.         useful if you want to write a program to convert an existing
  7.         database into a WSSINDEX database, read the database with another
  8.         program to produce a customized listing, or recover a damaged disk
  9.         file.  This description may be easier to follow if you use it as a
  10.         guide while examining a small database with DEBUG or some other
  11.         utility.
  12.  
  13.         Dates and times are stored in the same format as used in an FCB.
  14.         Date has 7 bits for years since 1980, 4 bits for month, 5 bits for
  15.         day.  Time has 5 bits for hour, 6 bits for minute, 5 bits for
  16.         second.
  17.  
  18.         The database is stored unsorted.  This is done because the time
  19.         required by the Quicksort algorithm used by WSSINDEX is O(n*log n)
  20.         for a randomly ordered source, but O(n*n) for an already ordered
  21.         input.  In more concrete terms, storing the database in sorted
  22.         order would turn a 30 second sort into a longer than 10 minute
  23.         sort.
  24.  
  25.         Notation:   \n   - a newline, that is an ASCII linefeed, hex 0A
  26.                     \EOS - end of string marker, hex 0
  27.                     *    - a field dependent on the WSSINDEX version
  28.  
  29.            length     contents
  30.            (bytes)
  31.  
  32.         Header:
  33.  
  34.            9          "WSSINDEX\n"
  35.            4-6*       version number\n
  36.            2          number of disks in database
  37.            2          number of subdirectories (including root)
  38.            2          number of files
  39.  
  40.         Disk record, repeated for each disk:
  41.  
  42.            11         volume name, blank padded to 11 chars (no \n or EOS)
  43.            4          bytes on disk
  44.            4          free bytes on disk
  45.            2          number of files on disk
  46.            2          number of subdirectories on disk (not counting root)
  47.            2          date indexed
  48.            1          "Y" or "N" for bootable or not
  49.  
  50.         Subdirectory record, repeated for each subdirectory:
  51.  
  52.            2          disk number, count starts at zero
  53.            variable   subdirectory name\n
  54.  
  55.         File record, repeated for each file:
  56.  
  57.            10         file name\EOS   there may be garbage after the \EOS
  58.            4          extension\EOS   there may be garbage after the \EOS
  59.  
  60.  
  61.                                         1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.            2          date
  71.            2          time
  72.            4          size
  73.            2          disk number, high bit set if file is a member of an ARC file
  74.            2          subdirectory number (root is 0) for ordinary file, file
  75.                       number of containing .ARC file for .ARC member
  76.            1          "C" (if commented), else blank
  77.            variable   comment\n   if comments flag is "C"
  78.            1*         "C" (if categorized), else blank; field only present
  79.                       if written by version 2.00 or later
  80.            variable*  category\n  if category flag is "C"
  81.  
  82.         Note that there is not a control-Z to mark the end of file, and there may
  83.         be embedded control-Z's in the binary fields (date, time, size, etc.).
  84.  
  85.         This information is subject to change in future releases.
  86.         However, I do guarantee that WSSINDEX will alway be able to read
  87.         databases written by older versions of the program.  Note that this
  88.         guarantee does not apply to configuration files.
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                         2
  128.  
  129.  
  130.  
  131.  
  132.  
  133.