 (This is GREPHIST.HTM in plain text.  If you have a Web browser,
 you will find the HTML version much easier to read. It has the
 same text but is better formatted and contains many helpful hyperlinks.




   #Stan Brown
   
GREP 7.2 -- Revision History
Find Regular Expressions in Files

   Program Dated 13 Jan 2003  /  Document Dated 13 Jan 2003
   Copyright (c) 1986-2003 Stan Brown, Oak Road Systems
   
   Summary:  This document is the complete revision history, starting
   with the most recent changes. To use GREP, please see the user guide
   and the reference manual.
   
Release 7.2, 13 Jan 2003

   Program changes: The latest changes from PCRE release 3.9 were adapted
   into the code for the /E2 and /E4 options. Those changes fixed some
   esoteric bugs but did not add any features. (This affects only GREP32
   since those options don't exist in GREP16, but the GREP16 release
   number was updated for consistency.)
   
   Documentation changes:
     * In response to a user query, the reference manual clarified that
       many options are toggles, and if used multiple times on the
       command line will reverse themselves.
     * The GREP*.HTM documents were styled to match the Oak Road Systems
       Web site. As part of this, the stylesheet ORSSW.CSS has been
       replaced by the separate stylesheets SCREEN.CSS and PRINT.CSS.
       
Release 7.11, 29 Apr 2002

   This release fixed a memory allocation bug that affected the /E4
   option. For some regexes, an internal error was generated.
   
Release 7.1, 27 Mar 2002

   The new /E4 option tells GREP to search for your regex as a word.
   
   An optional second argument on the /M option now lets you define what
   is a "word" character, if you need to.
   
   Release 7.02, 24 Mar 2002, was an internal checkpoint release for a
   few minor changes:
     * Per user request, when you specify a list of input files with the
       /@ option leading and trailing blanks are now removed from the
       filespecs.
     * The new value 4 is returned in ERRORLEVEL if GREP found no files
       to match any of your input filespecs. A warning message also
       appears, if you specified multiple filespecs on the command line
       or used the /@ option.
     * The message "no files at all matched filespec" became "no files
       exist like filespec". This should reduce confusion with the
       (possibly normal) situation where the input file exists but none
       of its lines match the regex.
     * The warning message "Some matches in the middle of long lines may
       have been missed. You might want to try the /Wn option" now
       suggests both text and binary widths, when GREP is deciding
       whether files are text or binary (/R-1 or /R-2 option), This is
       just a clarification of the warning message; there is no change in
       how GREP handles files.
     * The reference manual says that, when an input filespec doesn't
       match any files, GREP reminds you to check your exclusions. In 7.0
       and 7.01 the warning appeared even if you never used the /X
       option; now it doesn't.
       
Release 7.01, 10 Feb 2002

   Program changes:
     * The warning message "the X option is useful only with named input
       files" is now "the X option is ignored when reading only standard
       input", and is suppressed when you have only stored /X options in
       the environment variable.
     * The warning message "the R option applies only to named files, not
       standard input" now appears only when you told GREP to read files
       in binary (/R2 or /R3), not when you told GREP to sense the file
       type (/R-1 or /R-2).
     * In reading text files, GREP 7.01 doesn't check for error unless
       the read function returns a non-normal status. The way it was done
       in 7.0 was correct but wasted a very few CPU cycles.
       
   Documentation changes:
     * In the Troubleshooting section of the user guide, "GREP is finding
       too many matches!" was changed to "How do I search for a word?"
       New question "How do I find all files that contain 'this' and
       'that'?" was added.
     * The stylesheet was developed further, and validated.
       
Release 7.0, 21 Jan 2002

   As promised, this release was driven by users' responses to the poll
   distributed with release 6.9.
   
   Program changes:
     * Filenames have more extensive wildcards. The wildcard rules were
       added to the help message.
       GREP16 users, please note that ABC* now means the same thing as
       ABC*.*, namely all filenames that begin with ABC.
     * You can use the new /@ option to give GREP a file list in a file,
       when a program generates your list of input files or there are
       simply too many for the command line.
     * You can use the new /X option to exclude filenames that match
       certain patterns.
     * The /Kcount option was added, to tell GREP to stop reading each
       file after reporting the first count matches.
     * When no input files are named, and input is from the keyboard (not
       redirected from file), GREP now prompts you to enter each line.
       Previously, it just sat there and waited for you to realize your
       mistake.
     * The message prompting you for regexes (/F- option) is now written
       directly to the console, not to standard error (which could be
       redirected in some operating systems.) And a prompt appears for
       each regex after the first.
     * The text of several error and warning messages was tweaked
       slightly for consistency, and the help text was expanded a bit
       more. Customized text was removed from all "insufficient memory"
       messages, in favor of automatically generated file and line
       numbers.
       
   Documentation changes:
     * A complete list of GREP's warnings and error messages, with
       explanations, was added to the reference manual.
     * The description of command line syntax was overhauled. Input
       redirection was clarified, and a section was added on output
       redirection. The description of named input files was greatly
       simplified, with the detailed (and new) rules moved to the
       reference manual.
     * The HTML versions now use an experimental style sheet, which
       should make them slightly more attractive on your screen.
       
Release 6.9, 22 Dec 2001

   This was a pre-release of 7.0. A poll distributed with this release
   asked users to indicate which requested features they would like to
   see in the program.
   
   Program changes:
     * Binary file modes have been completely overhauled. The old /R
       toggle has been replaced by a mode selection via the /R2 option
       for record-oriented binary or the /R3 option for free-format
       binary. This solves a known but serious problem with the old
       binary mode, where a match would be missed if it crossed a block
       boundary.
     * The new /R-1 or /R-2 option lets you tell GREP to figure out on
       its own whether each input file is text or binary. (/R-1 and /R-2
       are available only with the registered version.)
     * You can now specify different widths for binary blocks and text
       lines with the /W option. The /W option minimum value, formerly 10
       characters, is now 2.
     * (GREP32 only) The new /M option allows correct case-blind matching
       and character classes with non-English letters and other 8-bit
       characters. (A test file is included.) Binary output now displays
       the hex value <nn> for every non-printing character, according to
       the current character set (/M option).
     * A new demo file, TOUR.BAT, is included.
     * The new /J option tells GREP to display from each line only the
       portion that matched the search string, basic regex, or extended
       regex. In release 6.0, this was added for extended regexes only,
       and you specified the /E3 option. /E3 is still allowed, but is
       equivalent to /E2 /J.
     * In record-oriented binary files (/R2 option), the ^ anchor at the
       start and $ anchor at the end of a basic regex now mean the start
       and end of block, for better consistency with extended regexes.
     * GREP is now about 5% faster on text files, and NUL (ASCII 0) will
       no longer cause the rest of a line to be ignored.
     * With the /L option, GREP now stops reading a file as soon as it
       finds a match, unless the /V option is also set.
     * Debug output now includes additional information:
          + per-file execution time and number of lines/records/buffers
            read
          + the maximum line length of any individual text file that
            exceeds the txwid in the /W option
          + total execution time, number of files scanned, and number of
            files that contained matches
          + the compiled form of extended regexes
          + blank lines and dashes at the start of debug output when
            written to a real file
            
     * Bug fix: Release 6.0 began diagnosing wildcard filespecs that
       produce no files at all, even when the /S (subdirectory) option is
       set. Unfortunately, the code to do that broke the previous code
       that diagnosed missing single files. The code to check the various
       cases is now collected in one place, and diagnosis should be
       correct and complete.
     * Bug fix: The numeric values of the /Q option were added to debug
       output and the help message, where they should have been for
       release 6.0.
       
   Documentation changes (in addition to those driven by the above
   program changes):
     * The user guide had grown more and more unwieldy. All the details
       of options and regexes are now split off into a separate reference
       manual, which is included in the download file but not published
       on the Web.
     * A table of options with one-line descriptions and a summary of
       regexes were added to the user guide; both are hyperlinked to
       sections in the reference manual. This may make it easier to find
       the feature you need.
     * Information on greedy and ungreedy quantifiers was added to the
       reference manual and to the help message.
     * The groups of options in the reference manual and the help message
       were rearranged to input, pattern-matching, output, and general.
     * The writeups of several options in the help message were expanded.
       
Release 6.0, 8 Sep 2001

   Note: There were beta test releases numbered 5.95, 5.97, and 5.98. For
   users who participated in the beta test, a number in parentheses
   indicates the release where a particular change was made.
   
   Program changes:
     * (5.95) The big news is the addition of extended regular
       expressions. GREP can now handle constructs like alternatives |,
       optionals ?, general quantifiers {...}, subexpressions (...), and
       more. With extended regexes, you can choose whether GREP reports
       matching lines as usual, or just the portion of each line that
       matches the extended regex.
     * (5.95) You can now bypass regular expressions entirely and just
       search for literal text.
     * (5.97) You can now turn the Special Rules for the Command Line on
       and off.
     * (5.98) You now have finer-grained control over warning messages
       with numeric levels for the /Q option.
     * (5.97) GREP now displays a warning message for any file spec that
       matches no files, even if the /S option (search subdirectories) is
       on.
     * (5.97) You can now put a plus sign after an option to turn it on
       (as opposed to toggling it). Example: repeated /N will flip the
       option between on and off, but /N+ turns on the option regardless
       of any previous settings.
     * (5.98) Character types and assertions were added to the help
       message.
     * (5.95) When you put a regex on the command line, you may need to
       enclose it in quotes, and if you do then GREP strips them (as past
       releases did). But, in agreement with the user guide, it no longer
       does that with regexes entered in a file or at the keyboard (/F
       option).
     * (5.95) Two bugs in parsing oddly constructed character classes
       were fixed. (1) If you had a regex like []abc], GREP wrongly took
       the first square bracket as ending the class. GREP now correctly
       treats a ] at the beginning of a character class as an ordinary
       character. (2) A minus sign at the end of a class, like [abc-], is
       now treated correctly as a normal character.
     * (5.95) The user guide told you that when your regex begins with a
       - or / character, you should prefix it with a \ to keep it from
       being taken as an option. GREP was considering that leading \ as
       part of the regex; it doesn't any more.
     * (5.98) If you specify named input files and also redirected input
       (<file), GREP has always ignored the redirected input. A warning
       message now appears in this case.
     * (5.97) The /Z option used to reset all options except /F; it now
       resets all options as documented.
       
   User guide changes:
     * (5.95) The section on regular expressions was pretty much
       rewritten, rather than try to shoehorn in all the stuff for
       extended regexes. (Only about 80% of the syntax of extended
       regular expressions was added to the user guide, though all is
       supported in the program. For a complete description, the relevant
       parts of the PCRE man page are also included.)
     * (5.95) A section on troubleshooting was added.
     * (5.97) The section on the environment variable now makes clear
       that the /Z option resets all options including /D and /F.
     * (5.97) The section on Special Rules for the Command Line was
       reorganized to make it clearer when you do and don't need the
       rules, and information was added on the new ability to turn them
       on and off.
       
Release 5.33, 19 Aug 2001

   This is a repackaging for Simtel; there are no significant functional
   changes.
   
Release 5.32, 20 May 2001

   If you specified current directory on another disk, such as "d:*.htm",
   GREP was taking that as root directory, "d:\*.htm". Apparently no one
   but the program author ever does such a thing!
   
Release 5.31, 18 April 2001

   Unfortunately, a bug was introduced in release 5.3: under certain
   circumstances, GREP got confused about whether it was working from
   standard input or input files. This release corrects that bug, with my
   apologies to everyone who downloaded the buggy 5.3.
   
Release 5.3, 17 April 2001

   New features:
     * The new /Y option lets you search for lines that contain multiple
       regexes in any order.
     * The /D option now allows the pseudo filename "-", for debugging
       display on standard output.
     * Options can now appear anywhere on the command line, not just
       before the first file spec.
       
   Other changes:
     * If the regex began with a single or double quote but did not end
       with one, GREP formerly assumed you meant to put it in quotes but
       forgot the closing quote. Now, it interprets the quote mark as the
       first character of the regex.
     * If GREP detects an internal error, it returns 128 in ERRORLEVEL
       instead of 252.
     * Two facilities for "canning" GREP parameters are now restricted to
       the registered version of the program: the environment variable
       and multiple regexes from file. (Multiple regexes can still be
       entered "live" at the keyboard.)
     * Some internal functions of the code were factored out into common
       routines used by multiple Oak Road Systems programs. There should
       be no significant change visible to users beyond the formatting of
       some messages.
     * For people who license the source code, the build procedure was
       streamlined to use a single makefile.
       
Release 5.2, 4 Jan 2001

     * In the user guide, split out the file input options and
       pattern-matching options from the big group of general options,
       and provide a road map to the plethora of output options.
     * In the help message, describe the /C option and /V option a bit
       more explicitly, arrange the options to match the functional
       groups in the user guide, and add a tip about using more to
       paginate the message.
     * In the list of option settings (displayed if you turn on the /D
       option), arrange the options to match the functional groups in the
       user guide, add the relevant option letter to each setting, and
       show the setting of the /1 or /0 option.
     * Replace a lot of funky macros with more straightforward functions
       for displaying diagnostic messages, and clarify the text of a few
       messages.
     * Tie certain features to the registered version of GREP. Make the
       logo and the debugging output reflect the registration status.
       
Release 5.1, 31 May 2000

     * fix a bug: a redundant *-expression preceding $ at the end of a
       regular expression should have matched the end of line, but did
       not. Example: ab*$ would match ab, abb, abbb, etc. at end of line;
       but it did not match an a at end of line, as it should have.
       
Release 5.0, 7 May 2000

   Program changes:
     * Add the /R option to read and display files in binary mode
     * Add the /W option to set the line width (formerly fixed at 255
       characters), and warn the user if longer lines were found
     * Add the /Z option to reset all options
     * Disallow out-of-order character ranges like z-a; previously they
       were silently treated like the three characters "z", "-", "a"
     * Add new return values 2 and 252-254
     * Expand the treatment of regular expressions in the help message
     * Send the help message to stdout instead of stderr as previously
     * Don't display the help screens when the user types grep with no
       options or regular expression; instead, suggest using grep /?
       |more
     * In debug mode, add more trace messages for opening input files
     * When displaying a regular expression in debug mode, use a numeric
       to show number of members in a character class
     * Fix bug in 4.5: if you used wildcards with drive but no directory,
       e.g. d:*, the drive was ignored
       
   User guide changes:
     * Change file name to GREPUSER.HTM from GREP.HTM.
     * Add an alphabetical index of options
     * Add note about using double quotes around filenames that contain
       spaces.
       
Release 4.5, 25 Sep 1999 (general release)
Release 4.4, 18 Sep 1999 (limited release)

   Proram changes:
     * Add the /S option for searching subdirectories (4.4)
     * Add the /A option for searching hidden and system files (4.4)
     * Add a section to the user guide to describe input files and
       redirection (4.4)
     * Fix a bug: on the command line, regular expressions like
       [\244-\246\248-\255], with adjacent escaped 8-bit character
       ranges, were not expanded correctly (4.5)
     * Systematize the debugging output somewhat, in the course of fixing
       the preceding bug (4.5)
     * Fix a bug: on the command line, \e in regular expressions was
       expanded to Control-W (octal 27) instead of Escape (decimal 27)
       (4.5)
       
   User guide changes: Clarify and expand "Special rules for the command
   line" section of the user guide, clarify the descriptions of the /D
   and /I options, and add quite a few internal hyperlinks (4.5)
   
Release 4.3, 4 Aug 1999

     * Update contact information (new physical address and URL)
     * Simplify registration options
     * Add site license pricing
       
Release 4.2, 20 Feb 1999

     * Allow 8-bit characters in regular expressions
     * Allow multiple regular expressions to be typed in directly, with
       the /F- option
     * Fix a bug: with /I, character classes entered in lower case were
       expanded incorrectly
       
Release 4.1, 22 Jan 1999

     * Add the /U option (UNIX-style output) and the /Q option (quiet).
       Distinguish between option errors in the environment variable and
       on the command line
     * Make all output options toggles (except /P); diagnose conflicts
       only after the last option has been scanned
     * Take an optional output file name with /D (debug), which is no
       longer a toggle
     * Default /P (show context lines) to 2,2 if user specifies /P
       without numbers
     * Honor the special escape sequences only on the command line, since
       they're not needed when entering regular expressions in a file
     * Rewrite and greatly expand the user guide. Use HTML instead of MS
       Word for Windows
       
Release 4.0, 19 Nov 1998

     * Package the existing release 4.0 for shareware release: revise
       documents without changing the software
       
Release 4.0, May 1998

     * Add the /F option (multiple regular expressions in a file)
     * Build a 32-bit version (to accept long filenames) along with the
       16-bit version, using a single set of source files
       
Release 3.4, March 1998

     * With the /P option, remove the < > widgets around the line numbers
       of the context lines, so that the lines that actually match are
       more easily seen
       
Release 3.3, Feb 1998

     * Add the /L option
     * Accept options from an environment variable
     * In the output, show the file path as specified on the command
       line, not just the filename
     * Prefix program messages with "grep:" or "grep/debug:"
     * Add warning messages for incompatible or redundant sets of options
     * Diagnose a regular expression containing empty brackets [] as a
       user error, not an internal error
     * Remove the /S option (search subdirectories), because GREP's code
       now uses the C run-time library to interpret file specs on the
       command line
     * Fix a bug: inside [...] in regular expressions, the backslash was
       swallowing an extra character
       
Release 3.2, June 1997

     * Add the /0 and /1 options to control exit status
     * /D now shows the number of matches in each file, total matches,
       and exit status
       
Release 3.1, Jan 1997

     * Allow numeric escapes like \0x9A, \045, and \211 in the regular
       expression
       
Release 3.0, Dec 1996

     * Add the /P option (show context lines around the actual matches)
     * Display the values of all options when /D is on the command line
       
Release 2.4, April 1990

     * Add + in regular expressions (match one or more occurrences)
     * Allow options both before and after the regular expression
     * Add the /S option (search subdirectories)
       
Release 2.3, March 1990

     * Reverse the meaning of the /B option: now the default is to show
       only the names of matching files
     * Suppress "matched 0 lines" when /C (count matches) is specified
       and /B is not
     * Fix a bug: [...] character classes containing the range character
       - weren't always expanded correctly
       
Release 2.2, Jan 1990

     * Add the /B option (show only the names of files that contain
       matches)
       
Release 2.1, Dec 1989

     * Make the /D option show the input pattern as well as the decoded
       version
     * Fix a bug: character classes [...] weren't working with the /I
       option
       
Release 2.0, July 1989

     * Complete rewrite
     * Add the /I option (ignore case)
     * In the regular expression, add \e (escape) and \q (equal sign)
       
Release 1.0, April 1986

     * initial release (to clients only): Though all code was developed
       independently, I got some ideas from PC Tech Journal, May 1996,
       pages 191-199.
