home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / find32.zip / FIND32.DOC next >
Text File  |  1995-09-09  |  8KB  |  226 lines

  1. ##############################################################################
  2. ##  $Workfile::   FIND32.DOC                                                 $
  3. ## ===========================================================================
  4. ## Copyright (c) kirchner SOFT. All rights reserved.
  5. ## ---------------------------------------------------------------------------
  6. ## TASK      :: documentation for FIND32.
  7. ##
  8. ## ---------------------------------------------------------------------------
  9. ## AUTHOR    :: Mario Semo
  10. ## CREATED   :: 93-02-14
  11. ## ---------------------------------------------------------------------------
  12. ## NOTES     ::
  13. ## ===========================================================================
  14. ## HISTORY   ::  $Author::   MS                    $$Revision::   1.0        $
  15. ##              $Modtime::   12 Jun 1995 14:36:50                            $
  16. ## ---------------------------------------------------------------------------
  17. ##       $Log::   K:/LC32/L.ARC/UTIL/FIND32.DO$                              $
  18. ##
  19. ##    Rev 1.0   12 Jun 1995 15:26:20   MS new
  20. ##
  21. ##############################################################################
  22.  
  23.                       ╔═══════════════════════════════════╗
  24.                       ║                                   ║
  25.                       ║              FIND32               ║
  26.                       ║                 A                 ║
  27.                       ║             FreeWare              ║
  28.                       ║      32 bit Text Search Util      ║
  29.                       ║        for OS/2 2.x & 3.x         ║
  30.                       ║          by Mario Semo            ║
  31.                       ║              V1.43                ║
  32.                       ║           1995-03-06              ║
  33.                       ╚═══════════════════════════════════╝
  34.  
  35. Mario Semo:
  36.  
  37. FIDO : 2:310/14.11@fidonet
  38. EMAIL: 100414.1025@compuserve.com
  39. CIS  : 100414,1025
  40.  
  41. History :
  42.  
  43. 14.2.93 : Ver 1.0   initial version
  44. 21.2.93 : Ver 1.1   file find feature new
  45. 23.2.93 : Ver 1.11  -- option, threads optimized
  46. 07.4.93 : Ver 1.2   corrected a bug in output thread (data overrun).
  47. 23.8.93 : Ver 1.3   multiple File Masks, Ctrl-Break Handling.
  48. 04.4.94 : Ver 1.4   FindFirst options implemented (-1, -1f)
  49.                     fixed a bug with '?' in pattern string. (looping)
  50. 14.12.94: Ver 1.41  now shows only files where text is found (now FASTER!).
  51.                     now allows multiple instances run at same time (hope so).
  52. 24.02.95: Ver 1.42  -0 option implemented. (faster!)
  53.                     FIND32 environment string implemented. -v option
  54. 06.03.95: Ver 1.43  fixed bug introduced in 1.42. (-1a always active)
  55. 09.09.95:           added EPM interface doc here.
  56.  
  57. Highlights:
  58. -----------
  59.  .) High Speed Scanning Algorithm
  60.  .) Multithreaded (4 threads for DiskScan,FileI/O,TextScan,VioOut)
  61.  .) Allows for upto 1 ScanError (Substitution/Insert/Delete Errors)
  62.       eg: 1234 matches 12a4  in 1 substitution
  63.           1234 matches 12a34 with 1 insert
  64.           1234 matches 124   with 1 delete
  65.       configurable !
  66.  .) Allows Scanning of binary/ASCII Files
  67.  .) Allows for Subdirectory recursion
  68.  .) PatternString can be given ASCII, Hex, or via regular expression
  69.       eg: ASCII   : "1234"
  70.           HEX     : 0x50aa00b4
  71.           Pattern : a-zA-Z|0-9|?|Ee|?^0-9
  72.                      (means: pos1 : is either a lower case or upper case char
  73.                              pos2 : is a number digit
  74.                              pos3 : any char
  75.                              pos4 : either E or e
  76.                              pos5 : anything but a number digit
  77.  
  78.  .) Specifing Pattern String in any of the ways, allowing for Errors
  79.     does NOT result in a performance degradiation.
  80.     (except for different startup code, the scanning is independend of these
  81.      features).
  82.  .) imbedded FileFind Feature
  83.  .) wildcard for DriveLetter (*:)
  84.  
  85. Restrictions:
  86. -------------
  87. The Length of the Pattern String must be <= 32.
  88.  
  89. Performance Results
  90. -------------------
  91.  
  92. Find32 : This utility
  93. Find16 : just a different Public Domain FAPI Text Search
  94. FindOS2: The OS/2 Find Program
  95.  
  96. scanning a 1mb text ascii file for the string 12221 (VDISK)
  97. Find32   :  5438ms
  98. Find16   : 11344ms
  99. FindOS2  : 26250ms
  100.  
  101. scanning  111 files with 1333141 bytes (FAT)
  102. Find32   :  8594ms
  103. Find16   : 14469ms
  104. FindOS2  : 37875ms (via: for %i in (*.c) do ....)
  105.  
  106. Usage
  107. -----
  108. Find32 Options PatternString FileMask
  109.  
  110. Options:
  111.   Option delimiter is either - or /
  112.   Options can be given case independent.
  113.  
  114.   -1f: find first in each file only
  115.          if the string is found in a file, the processing of the file stops
  116.   -1 : find first only
  117.          after the first match, the whole processing stops
  118.   -e : exact match only (default)
  119.   -s : 1 substitution allowed
  120.   -f : 1 substitution/insert/delete allowed
  121.   -r : recurse subdirectories
  122.   -i : ignore case
  123.   -b : binary file scan
  124.   -t : Totals only (only for -- scan option)
  125.   -? : simple online help.
  126.   -h : simple online help.
  127.   -a : display all file names while scanning
  128.   -- : perform only a FileFind
  129.          sample: find32 -- -r *:\cmd.exe
  130.            searches all drives, all pathes for cmd.exe
  131.   -0 : display only the files, not the lines where data is found.
  132.        (disables -a and enables -1f)
  133.   -v : igonre environment string, even if defined.
  134.  
  135.  
  136. Pattern Specification
  137.   ASCII      : PatternString
  138.   HEX        : -xString : hex Search String, eg: -x4500ff
  139.   EXPRESSION : "-pPatternExpression"
  140.  
  141.   You can specify only ONE of these pattern.
  142.  
  143.  ASCII      : If you want to include special chars (blank, |, ... in the
  144.               string, you must enclose the string in "...".
  145.               You cant search for DoubleQuotationMarks.
  146.  HEX        : You have to use 2 hex digits for each position.
  147.  EXPRESSION : The Expression must be enclosed in "..."
  148.               You specify a simple expression for each position and
  149.               split the different positions with the '|' character.
  150.  
  151.                 List      : List | ElemDef
  152.                             ElemDef
  153.                 ElemDef   : ElemDef SimpleElem
  154.                             SimpleElem
  155.                 SimpleElem: char
  156.                             char-char
  157.                             ^char
  158.                             ^char-char
  159.                             ?
  160.                             \char
  161.  
  162.               meaning of the SimpleElems:
  163.                  char : allows the char for the position
  164.                  char-char : allows all chars in the given range for
  165.                              the position
  166.                  ^char     : forbids char for the position
  167.                              NOTE : this enables NO character for the position.
  168.                  ^char-char: forbids all chars in the given range.
  169.                  ?         : enables ALL chars for the position
  170.                  \char     : enables char for the position, this
  171.                              can be used to enable -,^,\,|,? characters.
  172.  
  173.               Samples for SimpleElem:
  174.                 0-9^4a-z : enables 0-9
  175.                            disables 4
  176.                            enables a-z
  177.  
  178.               Sample for the complete Expression:
  179.                 "-p?^a-z^A-Z|a-zA-z|?|?^||0-9"
  180.  
  181.                 matches eg: 3a|^4 exact.
  182.  
  183. FileMask:
  184.  The FileMask has the following form:
  185.    [x:][path]mask
  186.  
  187.    sample:
  188.      \test\mydir\*.c
  189.      c:*.obj
  190.      *:\*           ... all files on all drives (except floppy drives),
  191.                     ... when given with -r.
  192.      "a\x b .. c..d" ... a HPFS file name.
  193.  
  194.  If no file mask is specified, a default of "*" is used.
  195.  
  196.  There can be more than 1 FileMask given.
  197.  eg: find32 hallo c\*.c h\*.h
  198.      find32 -- -r mak*.* *.mak
  199.        (better: find32 -- -r *mak* )
  200.  
  201.  
  202.  
  203. You can define some of the command line options in an environment variable
  204. 'FIND32'. These options are:
  205.    0 1 1f a b e f ? i r s
  206.  
  207. sample:
  208.  
  209. SET FIND32=-i-r-0
  210.  
  211. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  212.  
  213. EPM interface
  214.  
  215. ======= f32.e ========
  216. defmain
  217. parse arg arguments
  218. dos_command('find32 ' arguments)
  219. return
  220. =======================
  221.  
  222. etpm f32.e
  223. mv f32.ex -> epm(beta) directory
  224.  
  225. Mario.
  226.