program sr32;
{$APPTYPE CONSOLE}
{
  Demo program for Unit getOpts, QuoteStr & ScanFiles
  +cxpos (the extremely high performance Search/Replace SubStr)

  Copyright (c) 2004, aa, Inge DR. & Adrian Hafizh.
  Property of PT SOFTINDO Jakarta.
  All rights reserved.

  mailto:aa|AT|softindo|DOT|net, zero_inge|AT|yahoo|DOT|com
  http://delphi.softindo.net
}

[Search and Replace Pattern]
Unit cxpos demo - extremely high performance Search and Replace
Copyright 2004, D.Sofyan, Adrian Hafizh & Inge DR.
All right reserved

Usage:
  SR32.EXE  [/A[1-9]]  [[/F] list-file-masks]... [/X list-file-masks]... 
  [/D list-dirs]... (/S pattern) [/R pattern] [/I] [/E] [/N] [/T] [/V#] [/H|?] 

  Block bracket [] : the switch/argument is optional
  Parentheses () : the switch/argument MUST be supplied
  Ellipsis ... : the switch/argument might be supplied more than once

  List separator is semicolon (;)
  Pattern (for /S & /R only) will be interpreted using default-style:
    - Use double-quotes (") to embed inline whitespaces
    - Use backslash (\) followed by decimal number(s) to implies the
      corresponding ASCII character. Use \x instead for hexadecimal number
    note: in the default-style, single quote (') is NOT a special character
    (see switch /A for example of how the pattern would be interpreted)

  Switch is case-insensitive (ie. lower and uppercase are treated equally)
  Between one switch with another switch, or a switch with it's argument
    (if any), MUST be separated by whitespaces (SPACES or/and TABS)
  Switches and their arguments might be appeared anywhere (no precedence)
  The default value will be taken if one particular switch is omitted
  Unknown switches will be silently discarded
  Arguments without any recognizable switch will be assumed as an /F arg.

Switches which (optionally) need for an argument are:
  /F: List of file masks, /F may be omitted (ie. switch not used)
  /X: List of excluded file masks (current program always excluded)
  /D: List of directories (default: current dir)
  /S: Search pattern (MUST be supplied)
  /R: Replace pattern (default: BLANK)

ON/OFF switches are:
  /I: Ignore case (default: case-sensitive)
  /E: Recursive into subdir (default: not recursive)
  /N: Search & count only, NO write (default: write replacement/changes)
  /T: Do not change file date/time of modified file (default: update)

Other switches (independent or high priority) are:
  /V#: Verbose level (0 - 3). V0 = quiet, nothing will be displayed at all
  /H,/?: Show this HELP. Might be overriden by the "test-mode" (/A) switch
  /A: Test the following arguments for SEARCH/REPLACE Pattern. MUST be the
      first switch to take effect, otherwise she treated as usual argument
      of the preceding switch (such as an argument for /S or /R)
  /A#: Test sample #n instead (get the highest precedence over any switches)


SAMPLE USAGE:
  
  1. SR32 *.txt /s " " /d c:\;d:\e:\f:\ 
  
     means: delete all space in all text files in root drive c: d: e: and f
  
  2. SR32 *.txt /s " " /d c:\;d:\e:\f:\ /n 

     means: as above without delete, just count them all (for each files)

  3. SR32 * c:\;d:\e:\f:\ /s \xd\10 /n /x *.txt /E

     means: count CR-LF pair in all files in drive c: d: e: and f:
            except in the text files

  4. SR32 /r \32\x20 /s \9 *.pas
     means: change tab in source codes in current directory with doublespaces


  