home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / arc_lbr / arff.arc / ARFF.DOC < prev    next >
Text File  |  1988-08-20  |  5KB  |  147 lines

  1. ARFF -- ARchive File Finder                                                  1
  2.  
  3.  
  4.  
  5. Summary:
  6. -------
  7.  
  8. ARFF is a directory tree searcher that can search archives as they are 
  9. encountered.
  10.  
  11.  
  12.  
  13. Usage:
  14. -----
  15.  
  16.     arff [-an] [path] file ...
  17.  
  18.         -a        look in archives only
  19.         -n        don't look in archives
  20.         path        start looking here
  21.         file(s)        what to look for, allows MS-DOS wildcards * and ?
  22.  
  23.  
  24.  
  25. Configuration:
  26. -------------
  27.  
  28. To make ARFF more general, it uses the actual archive manipulation programs to 
  29. list the archive contents.  The output from the archive programs is captured 
  30. and searched for matching names.  If any are found, their lisings are 
  31. reformatted and displayed.
  32.  
  33. The command used to list an archive's contents and the expected format of the 
  34. archive listing are controlled by entries in the configuration file.  The 
  35. configuration file is found as follows.  If the environment variable ARFF.CFG 
  36. is set, use its value for the configuration file name.  If not, use the default 
  37. name.  If you are running DOS 3.X, the default name is derived from the 
  38. executable name by changing its extension to .CFG.  If you are running DOS 2.X, 
  39. the default name is C:\BIN\ARFF.CFG.
  40.  
  41. Each line in the configuration file tells ARFF how to deal with a particular 
  42. type of archive.  Any line that begins with a semi-colon is ignored.  Each 
  43. definition line consists 
  44. of:
  45.     example            description
  46.     _______            ___________
  47.  
  48.     .ARC            This is the archive identifier, any file 
  49.                 encountered with this extension is listed and 
  50.                 searched using information from this entry.
  51.  
  52.     "c:\bin\arcv.com %s"    This is the command used to list the archive to 
  53.                 stdout.  The name of the archive is represented 
  54.                 by the %s in the string.  Use of full path name 
  55.                 is required.
  56.  
  57.     "="            This is a string, starting in column one of the 
  58.                 listing that identifies the last line of 
  59.                 information that preceeds the file names in the 
  60.                 archive listing.  If there are no preceeding 
  61.                 lines, use "."
  62.  
  63.     "%s"            This is the format used to read the file name 
  64.                 from the archive listing.  This is passed 
  65.                 directly to sscanf().  sscanf formats are 
  66.                 discussed later in this document.
  67.  
  68.     "%*12c %s"        This is the format used to read the file size 
  69.                 from the archive listing.  This is passed 
  70.                 directly to sscanf().  sscanf formats are 
  71.                 discussed later in this document.
  72.  
  73.     "%*50c%9c"        This is the format used to read the file date 
  74.                 from the archive listing.  This is passed 
  75.                 directly to sscanf().  sscanf formats are 
  76.                 discussed later in this document.
  77.  
  78.     "%*61c%8c"        This is the format used to read the file time 
  79.                 from the archive listing.  This is passed 
  80.                 directly to sscanf().  sscanf formats are 
  81.                 discussed later in this document.  If the time 
  82.                 was read as part of the date, use "."
  83.  
  84.     "."            This is the format used to read the file 
  85.                 options/attributes from the archive listing.  
  86.                 This is passed directly to sscanf().  sscanf 
  87.                 formats are discussed later in this document.  
  88.                 If there are no options, use "."
  89.  
  90.     "*total"        This is a string, starting in column one of the 
  91.                 listing that identifies the first line of 
  92.                 information that follows the file names in the 
  93.                 archive listing.  If there are no following 
  94.                 lines, use "."
  95.  
  96. Sample ARFF.CFG file:
  97.  
  98. ; for ARCV 1.17
  99. .ARC "c:\bin\arcv.com %s" "=" "%s" "%*12c %s" "%*50c%9c" "%*61c%8c" "." "*total"
  100. ; for ZOO 2.00
  101. .ZOO "c:\bin\zoo.exe ld %s" "-" "%*46c%s" " %s" "%*24c%9c" "%*34c%8s" "%*43c%2c" "-"
  102. ; for TAR (unknown version, DOS/MINIX port of gnu 1.21)
  103. .TAR "c:\bin\tar.exe -tvf %s" "." "%*42c%s" "%*14c %s" "%*24c%17c" "." "%3c" "."
  104.  
  105.  
  106.  
  107. Archive listing reformatter:
  108. ------- ------- -----------
  109.  
  110. The input format for each field is contained in the configuration file.  It is
  111. a fairly simple subset of C's standard scanf() formats:
  112.     "%*#c"    skip # characters
  113.     " "    skip 0 or more "white space" characters (space, tab, EOL)
  114.     "%#c"    the target field is # characters
  115.     "%s"    the target is a "white space" terminated string
  116.  
  117. The output format is fixed:
  118.     file size    8 character right justified
  119.     2 spaces
  120.     date and time    19 characters left justified, 2 spaces between date and 
  121.             time fields
  122.     1 space
  123.     options        3 characters, right justified
  124.     1 space
  125.     archive name    variable length string
  126.     :
  127.     file name    variable length string
  128.  
  129.  
  130.  
  131. Bugs:
  132. ----
  133.  
  134. If you interrupt (control-C) ARFF at the right time, it leaves its temporary
  135. file around.  The temporary files are placed in the directory named in the TMP
  136. environment variable, or in the root directory if TMP is not set.  The temp
  137. files are named $ARFxxxx.
  138.  
  139.  
  140.  
  141. Author:
  142. ------
  143.  
  144. Mark Armbrust        (maa@nbires.UUCP)
  145. 70 So. 31st Street
  146. Boulder, CO 80303
  147.