"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "grep-2.5.4/ChangeLog" of archive grep-2.5.4.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 2009-02-10  Tony Abou-Assaleh <taa@acm.org>
    2 
    3 	* po/*.po: update from the Translation Project
    4 
    5 2009-02-02  Karl Berry  <karl@tug.org>
    6 
    7 	* configure.ac.in (pcre): set CPPFLAGS, not CFLAGS.
    8 
    9 2009-02-01  Tony Abou-Assaleh <taa@acm.org>
   10 
   11 	* po/*.po: update from the Translation Project
   12 
   13 	* po/Makefile.in.in: Remove deleted file ChangeLog from DISTFILES
   14 
   15 	* configure.ac.in: Replace obsolete macro AC_OUTPUT with modern equivalent
   16 
   17 2009-02-01  Karl Berry  <karl@tug.org>
   18 
   19 	* missing: re-add (from gnulib), since it's missing.
   20 
   21 	* src/grep.c (usage): consistent punctuation.
   22 
   23 2009-01-31  Tony Abou-Assaleh <taa@acm.org>
   24 
   25 	* m4/*.m4: quote underquoted definitions
   26 	* m4/codeset.m4: serial AM1 -> serial 1
   27 	* m4/iconv.m4: serial AM2 -> serial 2
   28 	* m4/header.m4: m4_regexp -> m4_bregexp, m4_patsubst -> m4_bpatsubst
   29 
   30 2009-01-29  Karl Berry  <karl@gnu.org>
   31 
   32 	* src/grep.c (usage): mention gnu.org/s/grep and gnu.org/gethelp.
   33 
   34         Update and/or add copyright notices:
   35         * ABOUT-NLS
   36         * AUTHORS
   37         * ChangeLog
   38         * Makefile.am
   39         * NEWS
   40         * README
   41         * README-alpha
   42         * README.DOS
   43         * THANKS
   44         * autogen.sh
   45         * configure.ac.in
   46         * bootstrap/Makefile.am
   47         * bootstrap/Makefile.try
   48         * bootstrap/README
   49         * doc/Makefile.am
   50         * doc/grep.texi
   51         * lib/Makefile.am
   52         * m4/Makefile.am
   53         * po/POTFILES.in
   54         * src/Makefile.am
   55         * src/dfa.h
   56         * src/dosbuf.c
   57         * src/grep.h
   58         * src/kwset.c
   59         * src/kwset.h
   60         * src/mbsupport.h
   61         * src/search.c
   62         * src/system.h
   63         * src/vms_fab.c
   64         * src/vms_fab.h
   65         * tests/Makefile.am
   66         * tests/backref.sh
   67         * tests/bre.awk
   68         * tests/bre.sh
   69         * tests/empty.sh
   70         * tests/ere.awk
   71         * tests/ere.sh
   72         * tests/file.sh
   73         * tests/fmbtest.sh
   74         * tests/foad1.sh
   75         * tests/khadafy.sh
   76         * tests/options.sh
   77         * tests/pcre.sh
   78         * tests/spencer1.awk
   79         * tests/spencer1.sh
   80         * tests/spencer2.sh
   81         * tests/status.sh
   82         * tests/tests
   83         * tests/warning.sh
   84         * tests/yesno.sh
   85                 * vms/Makefile.am
   86         * vms/config_vms.h
   87 
   88         * po/ChangeLog: remove this file, just a bit of ancient cruft.
   89 
   90 2009-01-25  Tony Abou-Assaleh <taa@acm.org>
   91 
   92         * README: updated "KNOWN BUGS" section
   93 
   94 2009-01-24  Bruno Haible  <bruno@clisp.org>
   95 
   96         * lib/posix/regex.h (__restrict, __restrict_arr): Remove macros.
   97           (_Restrict_, _Restrict_arr_): New macros. From gnulib/lib/regex.h.
   98           (regcomp, regexec): Update declarations to use them.
   99 
  100         * lib/savedir.c (isdir): New declaration.
  101 
  102         * src/dfa.c (update_mb_len_index): Change argument type to
  103           'char const *'.
  104           (match_mb_charset): Cast argument to strncpy.
  105           (dfaexec): Add pointer cast.
  106 
  107         * src/grep.c (parse_grep_colors): Add braces for disambiguation.
  108 
  109         * src/kwset.c: Include xalloc.h instead of declaring xmalloc manually.
  110 
  111 2009-01-20  Tony Abou-Assaleh <taa@acm.org>
  112 
  113         * tests/foad1.sh: disable tests that fail under cs_CZ.UTF-8.
  114         * tests/fmbtest.sh: likewise
  115         * README: added "KNOWN BUGS" section
  116         * src/grep.c: updated copyright year
  117 
  118 2008-12-12  Karl Berry  <karl@gnu.org>
  119 
  120         * doc/grep.texi (Exit Status, grep Programs): move these
  121           nodes to under Invoking.
  122 
  123         * doc/grep.texi: remove all remaining node pointers;
  124           downcase cindex entries.
  125 
  126 2008-12-11  Karl Berry  <karl@gnu.org>
  127 
  128         * doc/grep.texi (Copying): update url's.
  129           (GNU General Public License): remove node.
  130           (GNU Free Documentation License): @include fdl.texi instead.
  131           (@copying): update to v1.3 or later.
  132         * doc/fdl.texi: new file, copied from
  133           http://www.gnu.org/licenses/fdl.texi.
  134         * doc/Makefile.am (grep_TEXINFOS): new variable to get fdl.texi.
  135           Also add usual GPL license statement.
  136 
  137         * doc/grep.texi (Index): Merge in Concept Index node,
  138           to have only one index.  Arrange @syncodeindex's accordingly.
  139 
  140 2008-12-10  Karl Berry  <karl@gnu.org>
  141 
  142         * doc/grep.texi (@copying): use @copying; move @contents to
  143           beginning; rearrange other frontmatter in the conventional ways.
  144 
  145 2008-06-15  Tony Abou-Assaleh <taa@acm.org>
  146 
  147         * src/ansi2knr.[1c]: Remove generated files (installed by
  148           automake). Thanks to Emanuele Giaquinta for this.
  149 
  150 2008-02-14  Tony Abou-Assaleh <taa@acm.org>
  151 
  152         * src/grep.c: Factor out copyright year in --version. Thanks to
  153           Karl Berry for this.
  154         * src/grep.c: Update copyright years
  155 
  156         * po/POTFILES.in: +src/system.h +lib/closeout.c +lib/regex.c
  157           +lib/xmalloc.c -lib/getopt1.c
  158 
  159 2008-02-09  Tony Abou-Assaleh <taa@acm.org>
  160 
  161         * src/dfa.c: Replace a MALLOC and for loop with a CALLOC.  Thanks to
  162           Johan Walles for this. Patch #6288
  163 
  164         * README-alpha: more info about CVS code
  165         * README: pointer to README-alpha
  166 
  167         * src/grep.c: Update grep copyright year
  168 
  169 2008-02-08  Reuben Thomas <rrt@sc3d.org> (tiny change)
  170 
  171         * .cvsignore: add configure.ac
  172         * src/.cvsignore: add .deps
  173 
  174 2008-02-06  Tony Abou-Assaleh <taa@acm.org>
  175 
  176         * tests/foad1.sh: Comment out cases that are known to fail. These
  177       should be uncommented after the 2.5.4 release.
  178         * tests/yesno.sh: Likewise.
  179         * doc/grep.1: Update description of -e PATTERN; from Benno Schulenberg
  180         * doc/grep.texi: Likewise.
  181 
  182 2007-11-19  Tony Abou-Assaleh <taa@acm.org>
  183 
  184         * m4/Makefile.am: Remove reference strerror_r.m4
  185 
  186 2007-11-16  Tony Abou-Assaleh <taa@acm.org>
  187 
  188         * po/sk.po: updated from the translation project
  189 
  190 2007-11-03  Tony Abou-Assaleh <taa@acm.org>
  191 
  192         * po/*.po: get latest translations
  193         * po/no.po: removed
  194         * po/ky.po: added
  195         * po/sk.po: added
  196 
  197 2007-10-10  Tony Abou-Assaleh <taa@acm.org>
  198 
  199         * configure.ac.in: update version to 2.6-dev
  200 
  201         * src/grep.c: update --version message
  202 
  203 2007-10-07  Tony Abou-Assaleh <taa@acm.org>
  204 
  205         * src/grep.c: When -h and -H are combined, use the last specified,
  206           Bug #15620, Patch #4866
  207         * tests/foad1.sh: add tests for -h and -H
  208 
  209         * ChangeLog: Add a copyright notice (years taken from commit logs),
  210           add a license notice (taken from gnulib ChangeLog)
  211 
  212         * TODO: update the link to a list of other grep implementations
  213 
  214 2007-06-29  Bernhard Rosenkraenzer <bero@arklinux.org>
  215 
  216         * all files: GPLv3
  217         * configure.ac.in: Change version number
  218 
  219 2006-11-25  Bernhard Rosenkraenzer <bero@arklinux.org>
  220 
  221         * configure.ac.in: Update version number for post-2.5.2 development
  222 
  223 2006-11-25  Bernhard Rosenkraenzer <bero@arklinux.org>
  224 
  225         * configure.ac.in, grep.spec: Update version number
  226 
  227         * Makefile.cvs: Update to work with current autoconf scripts
  228 
  229         * po/Makefile.in.in: Adjust to work with automake 1.1x
  230 
  231 2006-08-19  Bernhard Rosenkraenzer <bero@arklinux.org>
  232 
  233         * po/*: Sync with translation project
  234 
  235         * doc/*: Assorted documentation updates, Patch #4610
  236 
  237         * autogen.sh, configure.in, configure.ac.in: Autogenerate
  238           ALL_LINGUAS variable
  239 
  240         * m4/strerror_r.m4, configure.ac.in: Fix detection of strerror_r
  241 
  242         * lib/error.c: Remove bogus warning
  243 
  244         * lib/savedir.c, lib/savedir.h, src/grep.c, doc/*:
  245           Add --exclude-dir option (patch #5051)
  246 
  247 2005-11-18  Charles Levert  <charles_levert@gna.org>
  248 
  249         * tests/foad1.sh: Use ": ${VERBOSE=}" so that the caller can
  250           set it without modifying the script; the usual caller (Makefile)
  251           still leaves it untouched (usually unset, so it's off by default).
  252           Modify "-m1 -A99 '^...$'" tests that failed so that their
  253           expectation now corresponds to the output currently produced
  254           by grep.  Those tests used to expect that two selected (or
  255           selectable) lines be output, even with -m1.  Nothing was
  256           modified with other similar tests that output _context_ lines
  257           after one selected line has been output with -m1; they used to
  258           and still succeed.  Although tests/yesno.sh now provides a more
  259           comprehensive framework for testing -m/-C feature interaction,
  260           it doesn't exercise mixing them with anchors so the whole
  261           relevant tests/foad1.sh test group is kept, notably to check
  262           that grep doesn't crash when it is run.
  263 
  264 2005-11-17  Charles Levert  <charles_levert@gna.org>
  265 
  266         On 2005-06-21, many changes were made that affected --color,
  267         --only-matching, and --invert-match.  Some of them introduced a
  268         misunderstanding between the concepts of matched/non-matched and
  269         selected/rejected lines.  Furthermore, a few bugs with -v sneaked
  270         in stemming from this.  This set of changes aims to rectify most
  271         of this situation.  Some GREP_COLORS capabilities are also added
  272         as a result of the clarification.  (Further issues with -v/-o/-C
  273         feature interaction still remain to be sorted out.)
  274 
  275         * src/grep.c: Rename/add global variables, macros, and capabilities:
  276             SEP_CHAR_MATCH    -->  SEP_CHAR_SELECTED
  277             SEP_CHAR_CONTEXT  -->  SEP_CHAR_REJECTED
  278             SEP_STR_CHUNK     -->  SEP_STR_GROUP
  279             grep_color        -->  selected_match_color + context_match_color
  280             mlines_color      -->  selected_line_color
  281             context_color     -->  context_line_color
  282             "ml"              -->  "sl"
  283             "mt"              -->  "mt" = "ms" + "mc"
  284                               -->  "rv" (reverse "sl"/"cx" when -v)
  285         * src/grep.c (color_cap_mt_fct, color_cap_rv_fct): New functions.
  286         * src/grep.c (print_line_tail): Renamed color argument to line_color.
  287         * src/grep.c (print_line_middle, prline): Revert part of the logic to
  288           a pre-2005-06-21 one so that lines with matches have their matched
  289           parts properly handled again ("m?" colors or --only-matching),
  290           whether or not -v is specified.  Whole line colors ("sl", "cx")
  291           follow a selected / rejected(context) logic, as opposed to a
  292           matched / non-matched one (unless "rv").  Matched text colors ("ms",
  293           "mc") always follow a selected / rejected(context) logic,
  294           regardless of "rv", because only matched lines use them anyway.
  295           pr_line_middle() now takes additional line_color and match_color
  296           arguments computed by prline() prior to calling that function.
  297           The old logic was a buggy hybrid matched / rejected(context) one.
  298         * src/grep.c (prpending, prtext, grepfile): Renamed macro invocations.
  299         * src/grep.c (parse_grep_colors): Update top comment.
  300         * src/grep.c (main): GREP_COLOR (singular) now sets both
  301           selected_match_color and context_match_color.
  302 
  303 2005-11-16  Charles Levert  <charles_levert@gna.org>
  304 
  305         * src/search.c (Pcompile): Clarify message for the -P option
  306           not being supported so that users don't assume it's a run-time
  307           problem, but know that it's a compile-time configuration choice.
  308           Based on an idea by:  Benno Schulenberg <benno@nietvergeten.nl>.
  309 
  310 2005-11-13  Charles Levert  <charles_levert@gna.org>
  311 
  312         * tests/yesno.sh: New file.  Test feature interaction
  313           of -C, -v, -o, and -m.  This reveals bugs, including some I
  314           introduced on 2005-06-21, but also others.
  315         * tests/Makefile.am (TESTS): Add yesno.sh.
  316         * tests/Makefile.am (CLEANFILES): Add cspatfile and csinput, as
  317           created by fmbtest.sh.  Add yesno.txt, as created by yesno.sh.
  318 
  319 2005-11-11  Charles Levert  <charles_levert@gna.org>
  320 
  321         * configure.in (ALL_LINGUAS): Add languages that were missing
  322           from this variable (bg, ca, da, nb, tr), but that GNU grep supports
  323           with a po/xx.po file.  Reported by Tony Abou-Assaleh <taa@acm.org>.
  324 
  325         * src/search.c (Pcompile): Abort in error if -P and multiple patterns
  326           are specified, with an error message explaining the situation.
  327           Fixing this won't be simple; the '\n' characters separating the
  328           patterns cannot just be replaced by '|' to create an alternation as
  329           back-references are assumed to be local to each individual pattern.
  330 
  331         * src/grep.c (parse_grep_colors, main): Replace all uses of
  332           fprintf(stderr, _("%s: foo\n"), program_name, ...) with
  333           error(0, 0, _("foo"), ...) for uniformization and simplification
  334           of warning messages that will be up for localization.  (My bad.)
  335 
  336 2005-11-10  Charles Levert  <charles_levert@gna.org>
  337 
  338         The introduction of the --only-matching and --color GNU extensions
  339         to grep added the requirement that each execute() implementation
  340         not only be able to identify matching lines as a whole, but also
  341         individual "exact" matches within a line known to be matching,
  342         from leftmost to rightmost match, when the output from matching
  343         lines is actually produced.  The interface and implementations
  344         of execute() were not up to it.  This set of changes aims to
  345         rectify that situation.  Previously failing tests relative to
  346         left anchors (^ and \<) and -w should now pass.  This fixes
  347         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11579>,
  348         <http://savannah.gnu.org/patch/?func=detailitem&item_id=1834>,
  349         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=8243>,
  350         and possibly part of other, bigger, pending patches.  The problem
  351         was also compounded by the POSIX requirement to support a pattern
  352         list instead of just an individual pattern (for -G and -E as well).
  353 
  354         * tests/foad1.sh: Test for increasing/decreasing-length word
  355           matches, given pattern order, and leftmost/longest match.
  356         * tests/fmbtest.sh: Modify test #6 according to new expectations.
  357           Better document what tests #6 and #7 are actually for.  Eliminate
  358           test #5 in favor of bringing tests #6 and #7 within the F G E loop.
  359         * src/grep.h (EXECUTE_ARGS): Change last argument from "int exact"
  360           to "char const *start_ptr".  Testing for "start_ptr" being non-NULL
  361           retains the same semantics as testing for "exact" being non-zero.
  362         * src/grep.c (print_line_middle): Call execute() with whole
  363           buffer to work on, but using current position as start_ptr.
  364         * src/grep.c (prpending, grepbuf): Call execute() with NULL
  365           as start_ptr.
  366         * src/search.c (EGexecute, Fexecute, Pexecute): When start_ptr is
  367           non-NULL, return first match from it as an offset relative to buf.
  368         * src/search.c (EGexecute): Consider all patterns if many and,
  369           for an exact match, return the best one (leftmost, then longest).
  370           Don't explore worst solutions, of course (branch and bound).
  371 
  372 2005-11-10  Charles Levert  <charles_levert@gna.org>
  373 
  374         * src/grep.c (main): Fix a subtle memory allocation bug introduced
  375           with the mb_icase_keys() function, which can call xrealloc() or
  376           free() on keys, by making sure keys is always dynamically allocated.
  377 
  378 2005-11-09  Charles Levert  <charles_levert@gna.org>
  379 
  380         * doc/grep.1, doc/grep.texi: Advise users to test for
  381           "exit_status > 1" instead of "exit_status == 2" in order to
  382           detect errors, for portability with other POSIX-compliant
  383           implementations.
  384 
  385 2005-11-09  Charles Levert  <charles_levert@gna.org>
  386 
  387         The following set of changes aims to make "egrep" and "fgrep"
  388         minimal executable programs for legacy applications, instead of
  389         shell scripts.  This "fgrep" is much smaller than "grep".
  390         This set of changes appears more daunting than it really is.
  391 
  392         * src/egrep.c, src/fgrep.c, src/esearch.c, src/fsearch.c: New files
  393           that #define either EGREP_PROGRAM or FGREP_PROGRAM and #include
  394           the corresponding generic (i.e., non e or f specific) *.c file.
  395         * src/grepmat.c: Remove whole file.
  396         * src/Makefile.am: Remove no-dependencies from AUTOMAKE_OPTIONS.
  397           Add definitions to make "egrep" and "fgrep" specific standalone
  398           executable programs that only use the source files they need.
  399           Remove rules for "egrep" and "fgrep" shell scripts.
  400         * src/grep.h: #define GREP_PROGRAM if both EGREP_PROGRAM and
  401           FGREP_PROGRAM are #undef.  Only declare matchers[] in this case
  402           along with the compile_fp_t and execute_fp_t function pointers
  403           typedefs, otherwise declare prototypes for straight compile()
  404           and execute() functions for the specialized "egrep" and "fgrep"
  405           programs.  Remove the extern declaration for matcher.
  406           Define COMPILE_RET, COMPILE_ARGS, EXECUTE_RET, EXECUTE_ARGS,
  407           COMPILE_FCT, and EXECUTE_FCT helper preprocessor macros.
  408         * src/grep.c (short_options, long_options, usage, main): Only
  409           support -G, -E, -F, -P, and -X for GREP_PROGRAM, but not for
  410           EGREP_PROGRAM or FGREP_PROGRAM.  Customize usage messages.
  411         * src/grep.c (set_limits): New function with unchanged code,
  412           called from main(), because it shouldn't be in install_matcher()
  413           since it was already matcher-independent.
  414         * src/grep.c (matcher): Add as static, only for GREP_PROGRAM.
  415         * src/grep.c (setmatcher, install_matcher): Only for GREP_PROGRAM.
  416         * src/grep.c (main): Remove any tweaking and dependence on argv[0].
  417         * src/grep.c (print_line_middle, prpending, grepbuf, main): Call
  418           compile() and execute() directly, not through a function
  419           pointer dereferencing notation, so that it works with both
  420           straight functions (in EGREP_PROGRAM and FGREP_PROGRAM) and
  421           function pointers (in GREP_PROGRAM).
  422         * src/search.c (<regex.h>, "dfa.h", dfa, pattern0, patterns,
  423           pcount, dfaerror, kwset_exact_matches, kwsmusts): Only
  424           include/declare/define if not FGREP_PROGRAM.
  425         * src/search.c: Remove function prototypes for all functions
  426           that are not used before their definition, since this is just
  427           a hassle now with their varying names and conditional definition.
  428         * src/search.c (GEAcompile): Rename from Ecompile().  Add new
  429           syntax_bits argument/variable.  Use as compile() for EGREP_PROGRAM.
  430           Put in the needed RE_ICASE fix, albeit commented-out for now.
  431           Make sure to free() modified word/line pattern after use, if any.
  432         * src/search.c (Gcompile): Merge with GEAcompile() then remove.
  433         * src/search.c (Gcompile, Acompile, Ecompile): New small functions
  434           that call GEAcompile(), now that matcher is not an extern variable.
  435         * src/search.c (GEAcompile, Gcompile, Acompile, Ecompile,
  436           Fcompile, Pcompile, EGexecute, Fexecute, Pexecute, matchers):
  437           Only define when needed according to *GREP_PROGRAM, and rename
  438           to just compile() and execute() when appropriate.
  439         * grep/bootstrap/Makefile.try: Similar changes.
  440 
  441 2005-11-08  Charles Levert  <charles_levert@gna.org>
  442 
  443         * README.DOS, TODO, grep.spec, doc/grep.1, doc/grep.texi,
  444           src/grep.h, po/da.po, po/nb.po, po/no.po, po/sv.po:
  445           Replace all capitalized "Grep" by a lowercase "grep", except
  446           in citations.  Reported by Benno Schulenberg <benno@nietvergeten.nl>
  447           from the <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=190551>
  448           entry in the Debian bug tracker.
  449         * doc/grep.1, doc/grep.texi: Explain that the "egrep" and "fgrep"
  450           commands are deprecated and provided for historical applications.
  451           Replace some "egrep" uses by "grep -E" to promote the newer usage.
  452           Typeset "zgrep" as a command.  Fix some spacing and punctuation bugs.
  453 
  454 2005-11-08  Julian Foad  <julianfoad@btopenworld.com>
  455 
  456         * doc/grep.texi: Rewrite a poorly written usage example about
  457           back-references, and tweak another.  New text by Benno Schulenberg.
  458 
  459 2005-11-04  Charles Levert  <charles_levert@gna.org>
  460 
  461         * src/grep.c (mb_icase_keys): New function to properly lowercase
  462           keys if match_icase.  The problem was that some multi-octet
  463           characters can get longer or shorter upon this conversion, so that
  464           it cannot just naively be done in place on the same memory buffer.
  465         * src/grep.c (main): Call mb_icase_keys (and remove in-line code).
  466 
  467         * tests/foad1.sh:  Duplicate three "-o -b" tests for the "-F"
  468           mode because it relies on a different code path that deserves
  469           the same kind of testing.
  470 
  471 2005-09-27  Stepan Kasal  <kasal@ucw.cz>
  472 
  473         * doc/grep.1: Fix a typo.
  474 
  475 2005-08-24  Charles Levert  <charles_levert@gna.org>
  476 
  477         * src/grep.c (print_line_middle): In case of an empty match,
  478           make minimal progress and continue instead of aborting process
  479           of the remainder of the line, in case there's still an upcoming
  480           non-empty match.
  481         * tests/foad1.sh: Add two tests for this.
  482         * doc/grep.texi, doc/grep.1: Document this behavior, since
  483           --only-matching and --color are GNU extensions which are
  484           otherwise unspecified by POSIX or other standards.
  485 
  486 2005-07-26  Charles Levert  <charles_levert@gna.org>
  487 
  488         * tests/pcre.sh: New file.  Add test 1.
  489         * tests/Makefile.am: Add pcre.sh to TESTS.
  490 
  491 2005-07-07  Charles Levert  <charles_levert@gna.org>
  492 
  493         * src/grep.c: Remove all xm capability code.
  494 
  495 2005-07-05  Charles Levert  <charles_levert@gna.org>
  496 
  497         * doc/grep.texi: Add missing green color in GREP_COLORS description.
  498         * doc/grep.1: Fix typo and reorganize GREP_COLORS documentation.
  499 
  500         * src/kwset.c (DEPTH_SIZE): New macro to anticipate
  501           architectures/compilers where CHAR_BIT is not 8 (we assume it
  502           won't be less than 4, which would be non-standard and unlikely).
  503           Checked to hold for CHAR_BIT up to 1023 (and maybe more)!
  504         * src/kwset.c (kwsincr): Use DEPTH_SIZE in two array declarations.
  505 
  506         * src/kwset.c (kwsincr): When a second obstack_alloc() call fails,
  507           free what the first one successfully allocated by popping it
  508           off the top of the obstack, before returning in error, just
  509           to keep things clean.
  510         * src/kwset.c (kwsprep): Verify return value of obstack_alloc()
  511           and return a memory exhausted error if so.  This function had
  512           a prototype to return such errors, but never did.
  513 
  514 2005-07-04  Charles Levert  <charles_levert@gna.org>
  515 
  516         * src/kwset.c: Readability changes.
  517           Replace uses of 0 for pointer values by NULL.
  518           Generalize use of existing U() macro to whole file.
  519 
  520         * src/kwset.c (kwsprep): Use memset() and memcpy() when appropriate.
  521 
  522         * src/kwset.c (kwsprep): Move three variable declarations to
  523           the single {}-block where they are used.
  524 
  525         * src/kwset.c (kwsprep): Optimize search for mind2 value by
  526           starting from the end of the target[] array.
  527 
  528 2005-06-22  Charles Levert  <charles_levert@gna.org>
  529 
  530         * grep/autogen.sh, grep/src/Makefile.am, grep/tests/backref.sh,
  531           grep/tests/bre.sh, grep/tests/empty.sh, grep/tests/ere.sh,
  532           grep/tests/file.sh, grep/tests/fmbtest.sh, grep/tests/foad1.sh,
  533           grep/tests/khadafy.sh, grep/tests/options.sh,
  534           grep/tests/spencer1.sh, grep/tests/spencer2.sh,
  535           grep/tests/status.sh, grep/tests/warning.sh: As per autoconf's
  536           "Portable Shell Programming" guidelines, replace all instances
  537           of "#!/bin/sh" by "#! /bin/sh" (notice the space).
  538 
  539 2005-06-21  Charles Levert  <charles_levert@gna.org>
  540 
  541         * src/grep.c (nlscan): Make this function more robust by removing
  542           the undocumented assumption that its "lim" argument points
  543           right after a line boundary.  This will be used later to fix
  544           --byte-offset's broken behavior.  Patch #3769.
  545 
  546         * src/grep.c (main): Add a test to check if -o/--only-matching
  547           and context lines are both specified and if so, set both context
  548           specifications (before and after) to zero then print an explicit
  549           warning to stderr explaining what was done and why (as opposed
  550           to drastically aborting the process in error).  Patch #3768.
  551           Other code needs this zero setting to work correctly without
  552           having to repeatedly test for this conflictual condition.
  553 
  554         * tests/foad1.sh: Add tests combining -o, -n/-b/-H, and -i,
  555           since there are separate code paths for -i.  Add tests combining
  556           -o, -n/-b/-H, and -3, since any context line specification
  557           should be ignored when combined with -o.
  558         * src/grep.c (print_line_head): New function, culled off the
  559           top content of prline().  Adds a guard against "lastnl" having
  560           already reached "lim", which can happen when if the function
  561           is called more than once per line.
  562         * src/grep.c (prline): Now calls print_line_head(), not only at
  563           the beginning to replace the moved code when -o is not
  564           specified, but also for each match when -o is specified (two
  565           code paths with this).  Patch #3770, more or less.  This makes
  566           all tests combining -o and -n/-b/-H pass, which they didn't
  567           before.  Fixes bug #12727.
  568 
  569         * src/grep.c (SEP_CHAR_MATCH, SEP_CHAR_CONTEXT, SEP_STR_CHUNK):
  570           New macros for ':', '-', and "--".  Used throughout the file.
  571           Will be used even more in upcoming updates, so good to have now.
  572 
  573         * src/grep.c: The new GREP_COLORS (plural) framework, only
  574           partially used at this point to make for a simpler initial
  575           patch in CVS.  A subset of patch #3644 on Savannah.
  576         * src/grep.c (color_cap_ne_fct, color_cap_xm_fct, print_filename,
  577           print_sep, parse_grep_colors): New functions.
  578         * src/grep.c (prtext, grepfile, main): Existing functions modified
  579           to use the new framework.
  580         * doc/grep.texi, doc/grep.1: Document GREP_COLORS.
  581 
  582         * src/grep.c: The new -T/--initial-tab framework, only
  583           partially used at this point to make for a simpler initial
  584           patch in CVS.  A subset of patch #3644 on Savannah.
  585           The option name/calling convention is the same as for GNU diff.
  586         * doc/grep.texi, doc/grep.1: Document -T/--initial-tab.
  587 
  588         * src/grep.c (print_offset): Renamed print_offset_sep() to better
  589           represent its new functionality; new calling convention.
  590         * src/grep.c (print_offset, print_line_head): Use and implement
  591           missing parts of the GREP_COLORS and -T/--initial-tab frameworks.
  592 
  593         * src/grep.c (print_line_middle, print_line_tail): New functions,
  594           unused for now, intended to allow a simplifying rewrite of
  595           prline().  Adding them first will make for cleaner CVS patches.
  596 
  597         * src/grep.c (prline): Simplifying rewrite using
  598           print_line_middle() and print_line_tail().  No longer attempts
  599           to find matches to colorize in context lines, thus avoiding
  600           costly calls to (*execute)(), since we know by then that they
  601           can't contain any by definition.  There are no longer four
  602           different code paths whether -o and -i are each specified
  603           or not; they have been unified into one, which should help
  604           avoid bugs similar to previous ones due to not updating all
  605           code paths in a synchronized fashion.  The -i code has been
  606           explicitly marked since it doesn't belong there and should
  607           be removed as soon as other -i code elsewhere is fixed.
  608           The remaining GREP_COLORS functionality is implemented.
  609           Savannah patch #3771 and patch #3644, heavily reworked.
  610 
  611         * src/grep.c (color_cap_ne_fct, color_cap_xm_fct,
  612           print_line_middle, print_line_tail): Make these four functions
  613           static.
  614 
  615 2005-06-20  Charles Levert  <charles_levert@gna.org>
  616 
  617         * src/grep.c: Extensively document the SGR/EL-to-Right issue.
  618 
  619         * src/grep.c: Explain the context and logic for choosing default
  620           --color screen attributes (SGR parameters).
  621 
  622 2005-06-15  Charles Levert  <charles_levert@gna.org>
  623 
  624         * tests/foad1.sh: Since this script is run by /bin/sh, it
  625           must work under posix mode.  That means not using assignment
  626           statements right before a function call (LC_ALL=... grep_test,
  627           in this case), because it won't do the expected thing.
  628 
  629 2005-06-14  Charles Levert  <charles_levert@gna.org>
  630 
  631         Fix bug #11022 (Line wrapping causes GREP_COLOR background
  632         color to "smear") by outputting a "clear to end of line"
  633         control sequence after each SGR (Select Graphic Rendition)
  634         control sequence (START and END).  This also avoid similar
  635         problems with HT (tab) characters.
  636 
  637         * src/grep.c (SGR_START, SGR_END, PR_SGR_FMT, PR_SGR_FMT_IF,
  638           PR_SGR_START, PR_SGR_END, PR_SGR_START_IF, PR_SGR_END_IF):
  639           New macros.
  640         * src/grep.c (prline): Use the new macros.
  641         * tests/fmbtest.sh, tests/foad1.sh: Adjust the regression tests
  642           to expect the new control sequences.
  643 
  644 2005-05-06  Charles Levert  <charles_levert@gna.org>
  645 
  646         * TODO: Add a few more projects and derived versions to check out.
  647 
  648 2005-05-05  Charles Levert  <charles_levert@gna.org>
  649 
  650         * README-alpha: Document grep-commit mailing list.
  651         * TODO: Add various stuff culled from the mailing list.
  652 
  653 2005-05-02  Charles Levert  <charles_levert@gna.org>
  654 
  655         * 78 files: Update FSF's civic address, zip code,
  656           and citizen relocation code.
  657 
  658 2005-04-29  Charles Levert  <charles_levert@gna.org>
  659 
  660         * tests/foad1.sh: Add -b and tricky UTF-8 tests.
  661           Display LC_ALL when its value is special.  Patch #3962.
  662 
  663         * ABOUT-NLS: Sync with CVS revision 1.9
  664           of 2005-04-13T11:21:55Z from GNU gettext
  665           on ":pserver:anoncvs@sources.redhat.com:/cvs/gettext",
  666           file "gettext/gettext-runtime/ABOUT-NLS".
  667 
  668 2005-04-29  Julian Foad  <julianfoad@btopenworld.com>
  669 
  670         * Makefile.am: Remove reference to long-gone files PATCHES.AC and
  671           PATCHES.AM.  Thanks to Tony Abou-Assaleh for this.  Patch #3961.
  672 
  673 2005-04-29  Charles Levert  <charles_levert@gna.org>
  674 
  675         * src/grep.c: Fix typo in prline()'s --only-matching --ignore-case
  676           code path; this fixes bug #9768 and passes one more test
  677           in tests/foad1.sh.  This whole code path should be removed in
  678           the future, when other --ignore-case issues are dealt with.
  679 
  680 2005-04-28  Julian Foad  <julianfoad@btopenworld.com>
  681 
  682         * tests/foad1.sh: Remove Bash-specific syntax.
  683 
  684         * src/dfa.c: Fix a DFA bug whereby a bracket "[" was matched by the
  685           pattern "[[:alpha:]]" in UTF-8 locales.  Patch #3800, by Tim Waugh.
  686         * tests/foad1.sh: Add a regression test for that.
  687 
  688 2005-04-27  Julian Foad  <julianfoad@btopenworld.com>
  689 
  690         Fix a bug reported by Elliott Hughes in patch #1834 whereby "grep -Fw"
  691         would miss matches after a non-word occurrence of the pattern.  Fix by
  692         Gordon Lack; tests based on reproduction recipes by Gordon Lack.
  693 
  694         * src/search.c (Fexecute): Fix the "match_words" case.
  695         * tests/foad1.sh: Modify the test framework so that the "PATTERN"
  696           argument is optional.  Add a regression test and a test for
  697           a similar case that other proposed patches have got wrong.
  698 
  699         Add more tests, some initially failing.
  700 
  701         * tests/foad1.sh: Add tests for "--color", most initially failing.
  702         * tests/fmbtest.sh: New file of tests for "grep -i" with multi-byte
  703           chars, by Jakub Jelinek, from patch #3808: Red Hat's "tests" patch.
  704           Initially, test #4 fails (in all three modes).
  705         * tests/Makefile.am: Include the new tests file "fmbtest.sh".
  706 
  707 2005-04-12  Julian Foad  <julianfoad@btopenworld.com>
  708 
  709         * tests/bre.tests: Enable a regression test for bug #9519.
  710         * src/grep.c: Fix a seg-fault in "-o -i": patch #1939.
  711         * tests/foad1.sh: New tests for "-o", initially all failing.
  712         * tests/Makefile.am: Include the new tests file "foad1.sh".
  713         * tests/spencer2.sh: Be consistent with "spencer1.sh" in the
  714           naming of associated files.
  715         * src/grep.c: Fix off-by-one error in prpending().
  716           Patch #3840 by Claudio Fontana.
  717         * tests/foad1.sh: Add tests by Pavol Gono for patch #3840.
  718           Some of them still fail, but no longer seg-fault due to that bug.
  719 
  720 2005-04-11  Julian Foad  <julianfoad@btopenworld.com>
  721 
  722         * doc/grep.texi, doc/grep.1: Document USG grep -s too.
  723           Based on a patch by Paul Eggert; suggested by Keith Marshall.
  724         * src/dfa.c (lex): Fix bug #9519: "echo do^re | grep do^re" was
  725           failing to find a match.
  726 
  727 2005-03-09  Stepan Kasal  <kasal@ucw.cz>
  728 
  729         * src/search.c (EGexecute, Fexecute): Use xmalloc, not malloc.
  730         (EGexecute): Handle the failure in one place, goto there.
  731 
  732 2005-02-26  Stepan Kasal  <kasal@ucw.cz>
  733 
  734         * src/grep.c (get_nondigit_option): Don't give up too early.
  735         * src/search.c (Pexecute): Add a comment explaining that this
  736           situation should not happen.
  737 
  738 2005-02-22  Claudio Fontana  <sick_soul@users.sourceforge.net>  (tiny change)
  739 
  740         * src/search.c (Pexecute): Consider eof case when delimiting
  741           matching line.  Fixes bug #4531.
  742 
  743 2005-02-23  Julian Foad  <julianfoad@btopenworld.com>
  744 
  745         * po/ko.po: Fix email address.
  746         * README-alpha: Fix email addresses and clarify the notes.
  747         * tests/backref.sh: Fix trivial typos.
  748 
  749 2005-02-08  Bruno Haible  <bruno@clisp.org>  (tiny change)
  750 
  751         * src/kwset.h (kwsincr, kwsprep): Change return type to 'const char *'.
  752         * src/kwset.c (kwsincr, kwsprep): Likewise.
  753 
  754 2005-02-08  Arnold D. Robbins  <arnold@skeeve.com>
  755             Stepan Kasal  <kasal@ucw.cz>
  756 
  757         * src/mbsupport.h: Don't say the file is part of GAWK.
  758         Make wording in explanatory comment more generic.
  759 
  760 2005-02-07  Stepan Kasal  <kasal@ucw.cz>
  761 
  762         * src/grep.c: Document that -X is undocumented.
  763 
  764 2005-01-16  Bruno Haible  <bruno@clisp.org>  (tiny change)
  765             Stepan Kasal  <kasal@ucw.cz>
  766 
  767         * configure.in: Add tests for iswctype, mbrlen, wcrtomb, wcscoll;
  768           use AC_FUNC_MBRTOWC to check for mbrtowc and mbstate_t; move
  769           AC_MBSTATE_T below it.
  770         * src/grep.c: Include mbsupport.h to define MBS_SUPPORT uniformly.
  771         * src/mbsupport.h: Don't test for HAVE_WCTYPE_T.
  772 
  773 2005-01-13  Arnold D. Robbins  <arnold@skeeve.com>
  774 
  775         * src/dfa.c (dfaparse): Use LC_COLLATE whenever it is defined;
  776           ENABLE_NLS has nothing to do with this.
  777 
  778 2005-01-07  Stepan Kasal  <kasal@ucw.cz>
  779 
  780         * tests/status.sh: Added two tests--option `-s' should have no
  781           influence on the exit status.
  782 
  783 2004-12-16  Stepan Kasal  <kasal@ucw.cz>
  784 
  785         Cosmetic changes, mostly imported from gawk:
  786 
  787         * src/dfa.c (lexstart): Removed unused variable.
  788         (parse_bracket_exp_mb): Don't initialize different pointers in one
  789           assignment
  790         (lex): Don't initialize automatic arrays, it's invalid in pre-C89
  791           compilers.
  792         Various other typos.
  793         * src/dfa.h, src/grep.c, src/search.c: Typos.
  794 
  795 2004-12-16  Isamu Hasegawa  <isamuh@jp.ibm.com>
  796 
  797         From http://oss.software.ibm.com/linux/patches/?patch_id=25
  798 
  799         * src/search.c: Patch for i18n correctness.
  800         * src/grep.c: Likewise.
  801         * src/dfa.c: Likewise.
  802         * lib/regex.c: Likewise.
  803 
  804 2004-12-15  Julian Foad  <julianfoad@btopenworld.com>
  805 
  806         Changes to documentation and help text, mostly from Stepan Kasal.
  807 
  808         * doc/grep.texi: Minor fixes of phrasing.
  809         * doc/grep.1: Likewise.
  810         * src/grep.c: Likewise.
  811 
  812 2004-12-01  Stepan Kasal  <kasal@ucw.cz>
  813 
  814         * src/grep.c (usage): Use ``FILE_PATTERN'' for --include and --exclude,
  815           change ``only print'' to ``print only''.
  816         * doc/grep.1: Likewise; state that wildcard matching is used.
  817           Move some options so that they are sorted alphabetically.
  818         * dfa.c, NEWS: Fix typos.
  819 
  820 2004-11-28  Benno Schulenberg  <benno@nietvergeten.nl>  (tiny change)
  821 
  822         * src/grep.c (usage): Clean up several details in the usage string.
  823         * doc/grep.1: Fix descriptions of --include and --exclude.
  824         * doc/grep.texi: Likewise.
  825 
  826 2004-11-23  Stepan Kasal  <kasal@ucw.cz>
  827 
  828         * src/Makefile.am: The egrep and fgrep script now use their own
  829         path to construct the full pathname of grep.
  830 
  831 2004-11-23  Stepan Kasal  <kasal@ucw.cz>
  832 
  833         * src/Makefile.am: Merged the rules for creating the egrep and
  834         fgrep script.
  835 
  836 2004-11-23  Stepan Kasal  <kasal@ucw.cz>
  837 
  838         * src/grep.c (usage): Make sure both copies of the ``usage''
  839           strings match.  Add ``(C)'' to the copyright notice.
  840         * src/dfa.c: Changed ``out of memory'' to ``memory exhausted'' to
  841           match messages elsewhere in the source.
  842 
  843 2004-11-22  Stepan Kasal  <kasal@ucw.cz>
  844 
  845         * src/search.c: Use mbsupport.h .
  846         * src/dfa.c: Move the inclusion of mbsupport.h lower.
  847 
  848 2004-11-22  Stepan Kasal  <kasal@ucw.cz>
  849 
  850         * src/grep.c (main): Use PACKAGE_STRING for --version.
  851 
  852 2004-11-20  Benno Schulenberg  <benno@nietvergeten.nl>  (tiny change)
  853 
  854         * src/grep.c (reset): Move the stat check ...
  855         (grepfile): ... here, and also check for a fifo.
  856 
  857 2004-11-20  Stepan Kasal  <kasal@ucw.cz>
  858 
  859         This change is based on a suggestion by Elliott Hughes.
  860 
  861         * src/grep.c (usage): Use PACKAGE_BUGREPORT.
  862         * po/*.po: Hacked the current translation again.
  863 
  864 2004-11-20  Stepan Kasal  <kasal@ucw.cz>
  865 
  866         * configure.in: Added a copyright notice (using gawk as a template).
  867         (AC_INIT, AM_INIT_AUTOMAKE): Changed to the ``new'' form so that
  868           the PACKAGE_* symbols get defined correctly in config.h.
  869 
  870 2004-11-20  Stepan Kasal  <kasal@ucw.cz>
  871 
  872         * ./cvsignore: Amended several .cvsignore files and
  873           removed *.gmo, acinclude.m4 and stamp-h.in from the root one.
  874         * m4/init.m4: Nuked, it was breaking current automake.
  875         * m4/Makefile.m4: Removed init.m4.
  876         * autogen.m4: Drop support for legacy autoconf; tell whether the
  877           auto tools exited successfully or not; fix the permissions of
  878           tests/*.sh--CVS doesn't provide a way to fix it.
  879 
  880 2004-11-19  Stepan Kasal  <kasal@ucw.cz>
  881 
  882         * src/dfa.c: Removed old version of gofast patch, from 2003-05-30.
  883         * src/search.c (check_multibyte_string): Likewise.
  884 
  885 2004-11-19  Stepan Kasal  <kasal@ucw.cz>
  886 
  887         * src/dfa.c: Added some simple changes from gawk.
  888         * src/mbsupport.h: Imported from gawk.
  889 
  890 2004-11-11  Stepan Kasal  <kasal@ucw.cz>
  891 
  892         * tests/spencer1.awk: Use only lines with 3 fields.
  893         * tests/spencer1.tests: Disable #55 for now.
  894         * tests/ere.tests, tests/bre.tests: Add ``TO CORRECT'' to disabled
  895           tests which had empty $4.
  896         * tests/backref.sh: Modify #2 so that current glibc regex can
  897           handle it in finite time.
  898 
  899 2004-11-12  Stepan Kasal  <kasal@ucw.cz>
  900 
  901         Change bug-gnu-utils address to bug-grep, on many places; there
  902         is no need to have the word ``grep'' in subject then.
  903         Thanks to Tony Abou-Assaleh and Benno Schulenberg for pointing
  904         out this.
  905 
  906 2004-11-02  Stepan Kasal  <kasal@ucw.cz>
  907 
  908         * README-alpha: Remove obsolete instructions about CVS, redirect
  909           the reader to savannah web.
  910 
  911 2004-09-26  Stepan Kasal  <kasal@ucw.cz>
  912 
  913         * src/search.c (check_multibyte_string, Gcompile, Ecompile): Replace
  914           malloc with xmalloc.
  915         * src/dfa.c (dfamust): Replace two calls to ``malloc'' by MALLOC.
  916 
  917 2003-07-23  Stepan Kasal  <kasal@ucw.cz>
  918 
  919         * src/Makefile.am: Add the egrep and fgrep scripts to CLEANFILES.
  920 
  921 2003-07-23  Stepan Kasal  <kasal@ucw.cz>
  922         * tests/backref.sh: Messages fixed.
  923 
  924 2003-07-08  David Kaelbling  <drk@sgi.com>  (tiny change)
  925         * src/dfa.c: remove non-constant initializers from dfa.c
  926 
  927 2003-06-16  Stepan Kasal  <kasal@ucw.cz>
  928         * doc/grep.1: two typos ``--line-buffered [...] penalty''
  929         * doc/grep.texi: a typo
  930 
  931 2003-06-12  Bernhard Rosenkraenzer <bero@arklinux.org>
  932         * README-alpha: Mention bug tracking system and grep-devel-list
  933         * tests/spencer1.tests: Fix test 55, as noted by Tim Waugh
  934         * src/search.c: Speed up multibyte support (Patch from Tim Waugh)
  935 
  936 2003-06-05  Stepan Kasal  <kasal@ucw.cz>
  937         * tests/formatbre.awk, tests/formatere.awk: probably unused, so
  938           I've removed them.
  939 
  940 2003-06-05  Stepan Kasal  <kasal@ucw.cz>
  941         * intl/Makefile: remove generated file.
  942 
  943 2003-06-04  Stepan Kasal  <kasal@ucw.cz>
  944         * src/dfa.c: typos fixed.
  945 
  946 2003-05-30  Bernhard Rosenkraenzer <bero@arklinux.org>
  947         * src/dfa.c: Speed up multibyte support (Patch from Tim Waugh)
  948 
  949 2003-01-18  Bernhard Rosenkraenzer <bero@arklinux.org>
  950         * src/grep.c: Fix -i -o combination (Patch from Tim Waugh)
  951 
  952 2002-03-26  Bernhard Rosenkraenzer <bero@arklinux.org>
  953 
  954         * 2.5.1 Release.
  955 
  956 2002-03-26  Bernhard Rosenkraenzer <bero@arklinux.org>
  957         * src/grep.c: Don't fail if we don't have an stdout fd and -q
  958           is used (happens e.g. on calls from hotplug scripts)
  959         * src/grep.c: Don't hang forever if fed with an empty string to
  960           grep for and --color enabled
  961         * src/grep.c: Fix infinite loop on
  962           echo "1 one" | grep -E "[0-9]*" -o
  963           echo "1 one" | grep -E "[0-9]*" --color
  964         * po/*: Sync with translation project
  965         * src/grep.c, src/Makefile.am, configure.in: Add patch from
  966           Paul Eggert <eggert@twinsun.com> to comply with ridiculous
  967           guidelines (don't act differently if invoked as egrep or fgrep)
  968         * configure.in: Bump version number, require a recent autoconf
  969 
  970 2002-03-14  Bernhard Rosenkraenzer <bero@arklinux.org>
  971         * src/Makefile.am, po/Makefile.in.in: Support DESTDIR properly
  972         * tests/bre.tests: Add fix from
  973           Peter Breitenlohner <peb@mppmu.mpg.de>
  974 
  975 2002-03-13  Bernhard Rosenkraenzer <bero@arklinux.org>
  976         * configure.in, m4/regex.m4, m4/malloc.m4, m4/realloc.m4:
  977           Don't set LIBOBJS directly, autoconf 2.53 doesn't like it
  978         * intl/*: Sync with gettext 0.11
  979         * po/*: Sync with translation project
  980         * configure.in, src/Makefile.am: Don't duplicate code - make
  981           egrep and fgrep links to grep and set matcher based on
  982           application name, suggestion from
  983           Guillaume Cottenceau <gc@mandrakesoft.com>
  984         * src/grep.c: (prline) Add fix for -i --color from
  985           Jim Meyering <meyering@lucent.com>
  986         * configure.in: Version 2.5; release
  987 
  988 2002-01-23  Bernhard Rosenkraenzer <bero@arklinux.org>
  989         * configure.in: Version 2.5g
  990         * Makefile.cvs, grep.spec: Add packaging tools
  991         Merge djgpp changes from Andrew Cottrell <anddjgpp@ihug.coml.au>:
  992         * src/grep.c: Added conditional compilation for DJGPP
  993         * djgpp: remove directory as it is no longer required with DJGPP 2.03
  994                  (or 2.04 when released)
  995         * README.DOS: Moved djgpp/readme to readme.dos
  996         * PATCHES.AC, PATCHES.AM: delete files - redundant
  997         * configure.in, Makefile.am: remove djgpp directory from list
  998 
  999 2002-01-22  Bernhard Rosenkraenzer <bero@arklinux.org>
 1000         * doc/grep.texi, doc/grep.1, NEWS: Document --label
 1001         * po/ru.po: Sync with translation project
 1002         * po/grep.pot: Sync with source
 1003 
 1004 2002-01-18  Bernhard Rosenkraenzer <bero@arklinux.org>
 1005         * src/grep.c: Add --label, based on patch from Stepan Koltsov
 1006 
 1007 2001-11-20  Bernhard Rosenkraenzer <bero@arklinux.org>
 1008         * autogen.sh: Don't hardcode aclocal dir
 1009 
 1010 2001-11-19  Bernhard Rosenkraenzer <bero@arklinux.org>
 1011         * src/grep.c: Add --only-matching (-o) switch (see NEWS)
 1012         * doc/grep.texi, doc/grep.1, NEWS: Document changes
 1013         * configure.in, lib/Makefile.am: Don't use internal getopt if
 1014           we're on a system that provides a working getopt function
 1015 
 1016 2001-09-25  Bernhard Rosenkraenzer <bero@arklinux.org>
 1017         * configure.in: Detect pcre correctly even when it's in
 1018           non-standard locations, using pcre-config
 1019         * src/grep.c: Add --color={always,never,tty} argument (like in ls)
 1020         * src/grep.c: Turn off blinking in the default colorization
 1021         * src/grep.c: Add --devices (-D) switch (analogous to --directories)
 1022         * src/dfa.c: Fix an i18n bug: echo "A" | grep '[A-Z0-9]' wouldn't work
 1023           in non-C-Locales on systems using current versions of glibc.
 1024         * AUTHORS: Change maintainer, credit Alain for his work until now
 1025         * configure.in, m4/decl.m4, m4/dosfile.m4, m4/gettext.m4,
 1026           m4/init.m4, m4/install.m4, m4/largefile.m4, m4/lcmessage.m4,
 1027           m4/header.m4, m4/isc-posix.m4, m4/missing.m4, m4/progtest.m4,
 1028           m4/sanity.m4:
 1029           Fix build with autoconf 2.5x, retain 2.1x compatibility for now
 1030         * autogen.sh: Add some crude hacks to make it possible to build with
 1031           both autoconf 2.5x and 2.1x
 1032         * acconfig.h: removed (no longer required)
 1033         * Makefile.am: add cvs-clean target
 1034         * doc/grep.texi, doc/grep.1, NEWS: Document changes
 1035           (--color, --devices, -D)
 1036         * src/dfa.c, src/grep.c: Add vim modelines
 1037 
 1038 2001-08-30  Alain Magloire
 1039 
 1040         * configure.in: Add gl in ALL_LINGUAS.
 1041 
 1042 2001-08-30  Kurt D Schwehr
 1043 
 1044         * doc/grep.1: Warn that grep insert a "--" between groups of matches,
 1045         when using the context options.
 1046         * doc/grep.texi: Likewised.
 1047 
 1048 2001-08-25  Heikki Korpela
 1049 
 1050         * doc/grep.texi: Point out that some Platforms do not support
 1051         reading of directories and silently ignore them.
 1052 
 1053 2001-08-21  Alain Magloire
 1054 
 1055         * lib/malloc.c: New file:
 1056         * lib/realloc.c: New file:
 1057         * lib/Makefile.am: Add malloc.c and realloc.c in EXTRA_DIST.
 1058 
 1059 2001-07-31  Alain Magloire
 1060 
 1061         * po/*.po: New files from the translation team:
 1062         grep-2.5e.de.po  grep-2.5e.el.po  grep-2.5e.eo.po grep-2.5e.es.po
 1063         grep-2.5e.et.po  grep-2.5e.fr.po  grep-2.5e.gl.po grep-2.5e.it.po
 1064         grep-2.5e.pl.po  grep-2.5e.sl.po
 1065 
 1066 2001-07-31  Andreas Schwab
 1067 
 1068         * src/grep.c: Fix all uses of error to pass a proper format
 1069         string.
 1070 
 1071 2001-07-29  Alain Magloire
 1072 
 1073         * grep/src/grep.c (usage): Typos corrected.
 1074         Patches from Santiago Vila.
 1075 
 1076 2001-07-29  Alain Magloire
 1077 
 1078         David Clissold, wrote:
 1079         a small bug in the GNU grep 2.4.2, which may have gone unnoticed
 1080         because it only causes a failure if building on a system with large
 1081         files enabled (e.g. an "off_t" is a "long long" rather than a "long").
 1082         savedir() takes on off_t argument, but in grepdir() the parameter
 1083         is cast to an (unsigned).  Well, if an off_t is larger than an int,
 1084         the value gets truncated.  This would not normally have an effect on a
 1085         little-endian platform (unless the file is >2GB), but on a big-endian
 1086         system it will always fail.  The external effect is that
 1087         "grep -r foo dir_name" fails with ENOMEM (from malloc() within
 1088         savedir()).
 1089 
 1090         * grep/src/grep.c (grepdir): Remove the (unsigned) cast when calling
 1091         savedir().
 1092         Patch from David Clissold.
 1093 
 1094 2001-07-29  Alain Magloire
 1095 
 1096         * grep/doc/grep.texi: In Bugs report use {n,m} for consistency.
 1097         * grep/doc/grep.1: Likewised.
 1098         Noted by Steven Lucy.
 1099 
 1100 2001-04-27  Isamu Hasegawa
 1101 
 1102         * dfa.c (mblen_buf) : New variable contains the amount of remain
 1103         byte of corresponding multibyte character in the input string.
 1104         (SKIP_REMAIN_MB_IF_INITIAL_STATE) : Use mblen_buf.
 1105         (match_anychar) : Use mblen_buf.
 1106         (match_mb_charset) : Use mblen_buf.
 1107         (transit_state_consume_1char) : Use mblen_buf.
 1108         (transit_state) : Use inputwcs to get current (multibyte) character.
 1109         (dfaexec) : Add initialization of mblen_buf.
 1110 
 1111 2001-04-27  Isamu Hasegawa
 1112 
 1113         * dfa.c (addtok) : Set appropriate value to multibyte_prop.
 1114         (dfastate) : Add the initialization of the variable.
 1115         (dfaexec) : Call transit_state if d->fail may transit by
 1116         multibyte characters.
 1117         (transit_state_singlebyte) : Clean up unnecessary code.
 1118         (transit_state_consume_1char) : Likewise.
 1119         (transit_state) : Add checking for word and newline.
 1120 
 1121 2001-04-19  Isamu Hasegawa
 1122 
 1123         * search.c (check_multibyte_string) : Check the case when mbclen == 0.
 1124 
 1125 2001-04-11  Isamu Hasegawa
 1126 
 1127         * search.c (check_multibyte_string) : Check the head of multibyte
 1128         characters, and optimize a bit.
 1129         (EGexecute) : Optimize a bit.
 1130         (Fexecute) : Fix the index.
 1131 
 1132 2001-04-02  Alain Magloire
 1133 
 1134         * lib/regex.c: Update from GNU lib C, with the changes
 1135         provided by Paul Eggert.
 1136         * lib/posix/regex.h: Likewise.
 1137 
 1138 2001-02-17  Paul Eggert
 1139 
 1140         Stop trying to support hosts that have nonstandard declarations for
 1141         mbrtowc and/or mbstate_t.  It's not worth the portability hassle.
 1142 
 1143         * lib/quotearg.c (mbrtowc, mbsinit): Remove workaround macros
 1144         for hosts that have mbrtowc but not mbstate_t, as we now
 1145         insist on proper declarations for both before using mbrtowc.
 1146 
 1147 2001-03-18  Alain Magloire
 1148 
 1149         * configure.in: Call AC_MBSTATE_T.
 1150         * Makefile.am: Add mbstate_t.m4
 1151         * m4/Makefile.am: Add mbstate_t.m4
 1152         * m4/mbstate_t.m4: New m4 macro.
 1153         * lib/strtol.c: Define CHAR_BITS.
 1154         Uwe H. Steinfeld, Ruslan Ermilov, Volkert Bochert, noted
 1155         that mbstate_t was not define for certain platforms.
 1156 
 1157 2001-03-18  Paul Eggert
 1158 
 1159         * src/grep.c (fillbuf): Fix storage allocation performance
 1160         bug: buffer was doubling in size in many cases where it didn't
 1161         have to.
 1162 
 1163 2001-03-17  Paul Eggert
 1164 
 1165         * src/grep.c (fillbuf): Avoid unnecessary division by 2.
 1166         Don't check xrealloc return value; it's guaranteed to be nonzero.
 1167         (fillbuf, grepdir): Use xalloc_die rather than error; it's shorter.
 1168 
 1169 2001-03-17  Alain Magloire
 1170 
 1171         * src/grep.c (context_length_arg): error () passing wrong format.
 1172         Spotted by Jim Meyering.
 1173 
 1174 2001-03-07  Alain Magloire
 1175 
 1176         * README-alpha: Removed reference to GNU tar, add the location
 1177         of the CVSROOT.
 1178 
 1179 2001-03-06  Alain Magloire
 1180 
 1181         Only the Regex patterns should be split in an array, patterns[].
 1182         The dfa and KWset compiled patterns should remain global and the
 1183         patterns compiled all at once.
 1184 
 1185         * src/search.c: include "error.h" and "xalloc.h" to get prototyping
 1186         of x*alloc() and error().
 1187         (kwsinit): Reverse to previous behaviour and takes no argument.
 1188         (kwsmusts): Likewised.
 1189         (Gcompile): For the regex pattern, split them and each pattern
 1190         is put in different compiled structure patterns[]. The patterns
 1191         are given to dfacomp() and kwsmusts() as is.
 1192         (Ecompile): Likewised.
 1193         (Fcompile): Reverse to the old behaviour of compiling the enire
 1194         patterns in one shot.
 1195         (EGexecute): If falling to GNU regex for the matching, loop in the
 1196         array of compile patterns[] to find a match.
 1197         (error): Many error () were call with arguments in the wrong order.
 1198         * tests/file.sh: Simple test to check for pattern in files.
 1199 
 1200         Reaction to bug report fired by Greg Louis <glouis@dynamicro.on.ca>
 1201 
 1202 2001-03-06  Isamu Hasegawa
 1203 
 1204         In multibyte environments, handle multibyte characters as single
 1205         characters in bracket expressions.
 1206 
 1207         * src/dfa.h (mb_char_classes) : new structure.
 1208         (mbcsets): new variable.
 1209         (nmbcsets): new variable.
 1210         (mbcsets_alloc) : new variable.
 1211         * src/dfa.c (prtok) : handle MBCSET.
 1212         (fetch_wc): new function to fetch a wide character.
 1213         (parse_bracket_exp_mb) : new function to handle multibyte character
 1214         in lex().
 1215         (lex): invoke parse_bracket_exp_mb() for multibyte bracket expression.
 1216         (atom): handle MBCSET.
 1217         (epsclosure): likewise.
 1218         (dfaanalyze): likewise.
 1219         (dfastate): likewise.
 1220         (match_mb_charset): new function to judge whether a bracket match
 1221         with a multibyte character.
 1222         (check_matching_with_multibyte_ops) : handle MBCSET.
 1223         (dfainit): initialize new variables.
 1224         (dfafree): free new variables.
 1225 
 1226 2001-03-04  Alain Magloire
 1227 
 1228         To get more in sync with other GNU utilities like GNU tar and fetish
 1229         all the supporting functions are now under lib.
 1230         Thanks to Jim Meyering, Volkert Bochert and Paul Eggert for
 1231         the code and the reminders.
 1232 
 1233         * src/grep.c (fatal): Function removed, using error () from
 1234         lib/error.c instead.
 1235         (usage): Copyright updated.
 1236         (error): Function removed, using error () from lib/error.c instead,
 1237         adjust prototypes.
 1238         (prog): Global variable rename to program_name, to work with new
 1239         lib/error.c.
 1240         (xrealloc): Removed using lib/xmalloc.c.
 1241         (xmalloc): Removed using lib/xmalloc.c
 1242         (main): Register with atexit() to check for error on stdout.
 1243         * configure.in: Check for atexit(), call jm_MALLOC, jm_RELLOC and
 1244         jm_PREREQ_ERROR.
 1245         * tests/bre.awk: Removed the hack to drain the buffer since we
 1246         always fclose(stdout) atexit.
 1247         * tests/ere.awk: Likewise.
 1248         * tests/spencer1.awk: Likewise.
 1249         * bootstrap/Makefile.try: Update the Makefile to reflect the changes
 1250         in the new hierarchy.
 1251 
 1252         * README-alpha: New File.
 1253         * m4/realloc.m4: New File.
 1254         * m4/malloc.m4: New File.
 1255         * m4/error.m4: New File.
 1256         * m4/Makefile.am: Updated.
 1257         * lib: New directory.
 1258         * lib/Makefile.am: New file.
 1259         * lib/closeout.c: New file.
 1260         * lib/closeout.h: New file.
 1261         * lib/fnmatch.c: New file.
 1262         * lib/fnmatch.h: New file.
 1263         * lib/atexit.c: New file.
 1264         * lib/error.c: New file.
 1265         * lib/error.h: New file.
 1266         * lib/quotearg.h: New file.
 1267         * lib/quotearg.c: New file.
 1268         * lib/xmalloc.c: New file.
 1269         * lib/posix: New directory.
 1270         * lib/posix/Makefile.am: New file.
 1271         * src/getopt.c: Moved to lib.
 1272         * src/getopt1.c: Moved to lib.
 1273         * src/getopt.h: Moved to lib.
 1274         * src/alloca.c: Moved to lib.
 1275         * src/exclude.c: Moved to lib.
 1276         * src/exclude.h: Moved to lib.
 1277         * src/hard-locale.h: Moved to lib.
 1278         * src/hard-locale.c: Moved to lib.
 1279         * src/isdir.c: Moved to lib.
 1280         * src/mechr.c: Moved to lib.
 1281         * src/obstack.c: Moved to lib.
 1282         * src/obstack.h: Moved to lib.
 1283         * src/regex.c: Moved to lib.
 1284         * src/regex.h: Moved to lib.
 1285         * src/posix: Moved to lib.
 1286         * src/posix/regex.h: Moved to lib.
 1287         * src/savedir.h: Moved to lib.
 1288         * src/savedir.c: Moved to lib.
 1289         * src/stpcpy.c: Moved to lib.
 1290         * src/strtoul.c: Moved to lib.
 1291         * src/strtol.c: Moved to lib.
 1292         * src/strtoull.c: Moved to lib.
 1293         * src/strtoumax.c: Moved to lib.
 1294         * src/xstrtol.c: Moved to lib.
 1295         * src/xstrtol.h: Moved to lib.
 1296         * src/xstrtoumax.c: Moved to lib.
 1297 
 1298 2001-03-01  Isamu Hasegawa
 1299 
 1300         Implement the mechanism to match with multibyte characters,
 1301         and use it for `period' in multibyte environments.
 1302 
 1303         * dfa.h (mbps): new variable.
 1304         * dfa.c (prtok): handle ANYCHAR.
 1305         (lex): use ANYCHAR for `period' in multibyte environments.
 1306         (atom): handle ANYCHAR.
 1307         (state_index): initialize mbps in multibyte environments.
 1308         (epsclosure): handle ANYCHAR.
 1309         (dfaanalyze): handle ANYCHAR.
 1310         (dfastate): handle ANYCHAR.
 1311         (realloc_trans_if_necessary): new function.
 1312         (transit_state_singlebyte): new function.
 1313         (match_anychar): new function.
 1314         (check_matching_with_multibyte_ops): new function.
 1315         (transit_state_consume_1char): new function.
 1316         (transit_state): new function.
 1317         (dfaexec): invoke transit_state if expression can match with
 1318         a multibyte character in multibyte environments.
 1319         (dfamust): handle ANYCHAR.
 1320 
 1321 2001-03-01  Alain Magloire
 1322 
 1323         * src/exclude.c: New file.
 1324         * src/exclude.h: New file.
 1325         * src/grep.c (main): Took the GNU tar code to handle
 1326         the option --include, --exclude, --exclude-from.
 1327         Files are check for a match, with exlude_filename ().
 1328         New option --exclude-from.
 1329         * src/savedir.c: Call exclude_filename() to check for
 1330         file pattern exclusion or inclusion.
 1331         * configure.in: --disable-pcre rename to --disable-perl-regexp.
 1332 
 1333 
 1334 2001-02-25  Alain Magloire
 1335 
 1336         * src/dfa.c: Typo corrected.
 1337         Noted by Isamu Hasegawa.
 1338         * src/savedir.c: Typos corrected.
 1339 
 1340 2001-02-22  Alain Magloire
 1341 
 1342         * src/savedir.c (isdir1): New function, calling isdir with
 1343         the correct pathname.
 1344 
 1345 2001-02-19  Isamu Hasegawa
 1346 
 1347         Avoid incorrect state transition in multibyte environments.
 1348 
 1349         * dfa.h (nmultibyte_prop): new variable.
 1350         (multibyte_prop): new variable.
 1351         * dfa.c (addtok): set inputwcs.
 1352         (dfastate): avoid incorrect state transition in multibyte
 1353         environments.
 1354         (dfaexec): likewise.
 1355         (dfainit): init multibyte_prop.
 1356         (dfafree): free multibyte_prop.
 1357         (inputwcs): new variable.
 1358 
 1359 2001-02-19  Isamu Hasegawa
 1360 
 1361         Handle a multibyte character followed by '*', '+', and '{n,m}'
 1362         correctly.
 1363 
 1364         * dfa.c (update_mb_len_index): new function.
 1365         Support for multibyte string.
 1366         (FETCH): call update_mb_len_index.
 1367         (lex): check cur_mb_index not to misunderstand multibyte characters.
 1368         (atom): make a tree from a multibyte character.
 1369         (dfaparse): initialize new variables.
 1370         (mbs): new variable.
 1371         (cur_mb_len): new variable.
 1372         (cur_mb_index): new variable.
 1373 
 1374 2001-02-18  Jim Meyering
 1375 
 1376         * m4/dosfile.m4 (AC_DOSFILE): Move AC_DEFINEs out of AC_CACHE_CHECK.
 1377 
 1378 2001-02-17  Alain Malgoire
 1379 
 1380         * doc/grep.texi: Document the new options and the new behaviour
 1381         back-references are local.  Use excerpt from Karl Berry regex
 1382         texinfo.
 1383 
 1384         * bootstrap/Makefile.try: Added xstrtoumax.o xstrtoul.o hard-local.o
 1385 
 1386 2001-02-17  Alain Magloire
 1387 
 1388         From Guglielmo 'bond' Bondioni :
 1389         The bug was that using a multi line file that contained REs (one per
 1390         line), backreferences in the REs were considered global (to the file)
 1391         and not local (to the line).
 1392         That is, \1 in line n refers to the first \(.\) in the whole file,
 1393         rather than in the line itself.
 1394 
 1395         From Tapani Tarvainen :
 1396         # Re: grep -e '\(a\)\1' -e '\(b\)\1'
 1397         That's not the way it should work: multiple -e arguments
 1398         should be treated as independent patterns and back references
 1399         should not refer to previous ones.
 1400 
 1401         From Paul Eggert :
 1402         GNU grep currently does not issue
 1403         diagnostics for the following two cases, both of which are erroneous:
 1404         grep -e '[' -e ']'
 1405         grep '[
 1406         ]'
 1407         POSIX requires a diagnostic in both cases because '[' is not a valid
 1408         regular expression.
 1409 
 1410         To overcome those problems, grep no longer pass the concatenate
 1411         patterns to GNU regex but rather compile each patterns separately
 1412         and keep the result in an array.
 1413 
 1414         * src/search.c (patterns): New global variable; a structure array
 1415         holding the compiled patterns.
 1416         Declare function prototypes to minimize error.
 1417         (dfa, kswset, regexbuf, regs): Removed, no longer static globals, but
 1418         rather fields in patterns[] structure per motif.
 1419         (Fcompile): Alloc an entry in patterns[] to hold the regex.
 1420         (Ecompile): Alloc an entry per motif in the patterns[] array.
 1421         (Gcompile): Likewise.
 1422         (EGexecute): Loop through of array of patterns[] for a match.
 1423 
 1424 2001-02-17  Alain Magloire
 1425 
 1426         From Bernd Strieder :
 1427         # tail -f logfile | grep important | do_something_urgent
 1428         # tail -f logfile | grep important | do_something_taking_very_long
 1429         If grep does full buffering in these cases then the urgent operation
 1430         does not happen as it should in the first case, and in the second case
 1431         time is lost due to waiting for the buffer to be filled.
 1432         This is clearly spoken not grep's fault in the first place, but libc's.
 1433         There is a heuristic in libc that make a stream line-buffered only if a
 1434         terminal is on the other end. This doesn't take care of the cases where
 1435         this connection is somehow indirect.
 1436 
 1437         * src/grep.c (line_buffered): new option variable.
 1438         (prline): if line_buffered is set fflush() is call.
 1439         (usage): line_buffered new option.
 1440         Input from Paul Eggert, doing setvbuf() may not be portable
 1441         and breaks grep -z.
 1442 
 1443 2001-02-16  Alain Magloire
 1444 
 1445         Patch from Isamu Hasegawa, for multibyte support.
 1446         This patch prevent kwset_matcher from following problems.
 1447         For example, in SJIS encoding, one character has the codepoint 0x895c.
 1448         So the second byte of the character can match with '\' incorrectly.
 1449         And in eucJP encoding, there are the characters whose codepoints are
 1450         0xa5b9, 0xa5c8.  On the other hand, there is one character whose
 1451         codepoint is 0xb9a5.  So 0xb9a5 can match with 2nd byte of 0xa5b9
 1452         and 1st byte of 0xa5c8.
 1453 
 1454         * configure.in: Add check for mbrtowc.
 1455         * src/search.c (check_multibyte_string): new function.
 1456         Support for multibyte string.
 1457         (EGexecute): call check_multibyte_string when kwset is set.
 1458         (Fexecute): call to check_multibyte_string.
 1459         (MBS_SUPPORT): new macro.
 1460         (MB_CUR_MAX): new macro.
 1461 
 1462 2001-02-16  Alain Magloire
 1463 
 1464         * djgpp/config.bat: Fix for 4dos.com.
 1465         * m4/dosfile.m4 (HAVE_DOS_FILE_CONTENTS): Was not set.
 1466         Bugs noted and patched by Juan Manuel Guerrero.
 1467 
 1468 2001-02-16  Alain Magloire
 1469 
 1470         A much requested feature, the possibility to select
 1471         files when doing recurse :
 1472         # find . -name "*.c" | xargs grep main {}
 1473         # grep --include=*.c main .
 1474         # find . -not -name "*.c" | xargs grep main {}
 1475         # grep --exclude=*.c main .
 1476 
 1477         * src/grep.c (short_options): -R equivalent to -r.
 1478         (#ifdef) : Fix some inconsistencies in the use of #ifdefs, prefer
 1479         #if defined() wen possible.
 1480         (long_options): Add --color, --include and exclude.
 1481         (Usage): Description of new options.
 1482         (color): Rename color variable to color_option.
 1483         Removed 'always|never|auto' arguments, not necessary for grep.
 1484         (exclude_pattern): new variable, holder for the file pattern.
 1485         (include_pattern): new variable, hoder for the file pattern.
 1486         * src/savedir.c: Signature change, take two new argmuments.
 1487         * doc/grep.texi: Document, new options.
 1488         * doc/grep.man: Document, new options.
 1489 
 1490 2001-02-09  Alain Magloire
 1491 
 1492         * src/grep.c (long_options): Added equivalent to -r with -R.
 1493         * src/grep.c (usage): added --color and --colour.
 1494         Noted with patch from, H.Merijn Brand and Wichert Akkerman.
 1495 
 1496 2001-02-09  Alain Magloire
 1497 
 1498         Patch from Ulrich Drepper to provide hilighting.
 1499 
 1500         * src/grep.c: New option --color.
 1501         (color): New static var.
 1502         (COLOR_OPTION): new constant.
 1503         (grep_color): new static var.
 1504         (prline): Now when color is set prline() will call the current matcher
 1505         to find the offset of the matching string.
 1506         * src/savedir.c: Take advantage of _DIRENT_HAVE_TYPE if supported.
 1507         * src/search.c (EGexecute, Fexecute, Pexecute): Take a new argument
 1508         when doing exact match for the color hiligting.
 1509 
 1510 2000-09-01  Brian Youmans
 1511 
 1512         * doc/grep.texi: Typo fixes.
 1513 
 1514 2000-08-30  Paul Eggert
 1515 
 1516         * doc/grep.texi (Usage): Talk about what "grep -r hello *.c"
 1517         means.
 1518 
 1519 2000-08-20  Paul Eggert
 1520 
 1521         Handle range expressions correctly even when they match
 1522         strings with two or more characters.
 1523 
 1524         * src/dfa.h (CRANGE): New enum value.  Comment fix.
 1525 
 1526         * src/dfa.c: Include <locale.h> if HAVE_SETLOCALE.
 1527         Include "hard-locale.h".
 1528         (prtok): Print CRANGE.
 1529         (hard_LC_COLLATE): New static var.
 1530         (lex): Return CRANGE when parsing a character range in a hard locale.
 1531         Don't use strcoll; it's no longer needed and wasn't correct anyway.
 1532         Use unsigned rather than token to hold unsigned chars.
 1533         (addtok): Comment fix.
 1534         (atom): Treat a CRANGE as if it were (.\1), approximately.
 1535         (dfaparse): Initialize hard_LC_COLLATE.
 1536 
 1537         * src/Makefile.am (base_sources): Add hard-locale.c, hard-locale.h.
 1538 
 1539         * src/hard-locale.c, src/hard-locale.h: New files, taken from
 1540         textutils.
 1541 
 1542 2000-08-20  Paul Eggert
 1543 
 1544         * tests/Makefile.am (TESTS_ENVIRONMENT): Add LC_ALL=C, since
 1545         some of the tests assume the C locale.
 1546 
 1547 2000-08-16  Paul Eggert
 1548 
 1549         * src/search.c (Gcompile, Ecompile): -x overrides -w, for
 1550         consistency with fgrep.  Don't assume that sizes fit in 'int'.
 1551         Fix comments to match code.
 1552 
 1553 2000-06-06  Paul Eggert
 1554 
 1555         * src/grep.c (grepdir): Don't look at st_dev when testing for
 1556         Mingw32 bug.
 1557 
 1558 2000-06-05  Paul Eggert
 1559 
 1560         Port to Mingw32, based on suggestions from Christian Groessler
 1561         <cpg@aladdin.de>.
 1562 
 1563         * src/isdir.c: New file, taken from fileutils.
 1564 
 1565         * src/Makefile.am (base_sources): Add isdir.c.
 1566 
 1567         * src/grep.c (grepfile): Use isdir instead of doing it inline.
 1568         (grepdir): Suppress ancestor check if the directory's inode and device
 1569         are both zero, as that occurs only on Mingw32 which doesn't support
 1570         inode or device.
 1571 
 1572         * src/system.h (isdir): New decl.
 1573         (is_EISDIR): Depend on HAVE_DIR_EACCES_BUG, not D_OK.
 1574         Use isdir, not access.
 1575 
 1576 2000-06-02  Paul Eggert
 1577 
 1578         Problen noted by Gerald Stoller <gerald_stoller@hotmail.com>
 1579 
 1580         * src/grep.c (main): POSIX.2 says that -q overrides -l, which
 1581         in turn overrides the other output options.  Fix grep to
 1582         behave that way.
 1583 
 1584 2000-05-27  Paul Eggert
 1585 
 1586         Simplify and tune the buffer allocation strategy.  Do not reserve a
 1587         large save area: reserve only enough bytes to hold the residue, plus
 1588         page alignment.  Put a newline sentinel before the buffer, for speed
 1589         when searching backwards for newline.
 1590 
 1591         * src/grep.c (ubuffer, bufsalloc, PREFERRED_SAVE_FACTOR, page_alloc):
 1592         Remove.  All uses changed.
 1593         (INITIAL_BUFSIZE): New macro.
 1594         (reset, fillbuf): Use simpler buffer allocation strategy.
 1595         (reset): Check for preposterously large pagesize that would cause
 1596         later calculations to overflow.
 1597         (fillbuf): Do not resize buffer if there's room at the end for
 1598         at least one more page.  This greatly increases performance when
 1599         reading from non-regular files that contain no newlines.
 1600         When growing the buffer, double its size instead of using a
 1601         more complicated algorithm.
 1602         (prtext, grep): Speed up by relying on the newline sentinel before the
 1603         start of the buffer.
 1604         (grep): When looking backwards for the last newline in a buffer,
 1605         stop when we hit the residue, since it can't contain a newline.
 1606         This avoids an O(N**2) algorithm when reading binary data from
 1607         a pipe.  Use a sentinel to speed up the backward search for newline.
 1608         (nlscan): Undo previous change; it wasn't needed and just complicates
 1609         and slows down the code a tad.
 1610 
 1611 2000-05-24  Paul Eggert
 1612 
 1613         Handle very large input counts better. Bug noted by Jim Meyering.
 1614 
 1615         * src/grep.c (totalcc, totalnl): Use uintmax_t, not off_t.
 1616         (add_count): New function.
 1617         (nlscan, prline, grep): Use it to check line and byte count overflows.
 1618         (nlscan, grep): Don't keep track of counts when not asked to; this
 1619         avoids unnecessary overflow diagnostics.
 1620         (print_offset_sep): Now takes args of type uintmax_t and char,
 1621         not off_t and int.
 1622 
 1623 2000-05-16  Paul Eggert
 1624 
 1625         Problem reported by Bob Proulx <rwp@hprwp.fc.hp.com>, this patch
 1626         is base on his finding, with appropiate corrections.
 1627 
 1628         * src/grep.c (main): Fix bug: -x and -w matched even when no
 1629         patterns were specified.
 1630         * tests/empty.sh: Test for -x and -w bug in grep 2.4.2.
 1631 
 1632 2000-04-24  Paul Eggert
 1633 
 1634         POSIX.2 conformance fixes: grep -q now exits with status zero
 1635         if an input line is selected, even if an error also occurs.
 1636         grep -s no longer affects exit status.
 1637 
 1638         * src/grep.c (suppress_errors): Move definition earlier so
 1639         that suppressible_error can use it.
 1640         (suppressible_error): New function.
 1641         (exit_on_match): New var.
 1642         (grepbuf): If exit_on_match is nonzero, exit with status zero
 1643         immediately.
 1644         (grep, grepfile, grepdir): Invoke suppressible_error.
 1645         (main): -q sets exit_on_match.
 1646 
 1647         * doc/grep.1, doc/grep.texi, NEWS:
 1648         Document -q's behavior as required by POSIX.2.
 1649 
 1650         * tests/status.sh:
 1651         Test for -q and -s behavior as conforming to POSIX.2.
 1652 
 1653 2000-04-20  Paul Eggert
 1654 
 1655         * tests/Makefile.am (TESTS_ENVIRONMENT):
 1656         Set GREP_OPTIONS to the empty string.
 1657 
 1658 2000-04-20  Paul Eggert
 1659 
 1660         * tests/status.sh: Fix typo: test -b -> test -r.
 1661 
 1662 2000-04-20  Paul Eggert
 1663 
 1664         * src/dfa.c (lex):
 1665         Do not assume that [c] is equivalent to [c-c]; this isn't true
 1666         if LC_COLLATE specifies that some characters are equivalent.
 1667         (setbit_case_fold): New function.
 1668         (lex): Use it to simplify the code a bit.
 1669 
 1670 2000-04-17  Paul Eggert
 1671 
 1672         Do CRLF munging only if HAVE_DOS_FILE_CONTENTS, instead of
 1673         having it depend on O_BINARY (which leads to incorrect results
 1674         on BeOS, VMS, and MacOS).
 1675 
 1676         * bootstrap/Makefile.try (DEFS): Add -DHAVE_DOS_FILE_CONTENTS.
 1677         * src/system.h (SET_BINARY): Define only if HAVE_DOS_FILE_CONTENTS.
 1678         (O_BINARY): Do not define.
 1679 
 1680         * m4/dosfile.m4: Define HAVE_DOS_FILE_CONTENTS if it appears we're
 1681         using DOS.
 1682 
 1683         * src/grep.c (undossify_input, fillbuf, dosbuf.c, prline, main):
 1684         Depend on HAVE_DOS_FILE_CONTENTS, not O_BINARY, when handling CRLF
 1685         matters.
 1686         (grepfile, main): Depend on SET_BINARY, not O_BINARY, when
 1687         handling binary files on hosts that care about text versus binary.
 1688 
 1689 2000-04-17  Paul Eggert
 1690 
 1691         * lib/getpagesize.h (getpagesize): Define to B_PAGE_SIZE if
 1692         __BEOS__ is defined.  Based on a fix by Bruno Haible
 1693         <haible@clisp.cons.org>.
 1694 
 1695 2000-04-17  Bruno Haible
 1696 
 1697         * src/system.h [BeOS]: Ignore O_BINARY.
 1698         * src/getpagesize.h [BeOS]: Define getpagesize() as B_PAGE_SIZE.
 1699 
 1700 2000-04-10  Paul Eggert
 1701 
 1702         * doc/grep.1, doc/grep.texi, NEWS: -C now requires an operand.
 1703         * src/grep.c (short_options, long_options, main, usage): Likewise.
 1704         (context_length_arg): Renamed from ck_atoi.  Now reports an error
 1705         and exits if the number is out of range for a context length.
 1706         (get_nondigit_option): New function, which checks for overflow
 1707         correctly, and which does not parse nonadjacent strings of digits
 1708         into a single number.
 1709         (main): Use get_nondigit_option instead of doing the code inline.
 1710         With -A, -B, and -C, optarg is now guaranteed to be nonzero.
 1711 
 1712 2000-04-08  Paul Eggert
 1713 
 1714         Now that we know that the input is always terminated by a
 1715         newline before the matching algorithms see it, clean up the
 1716         matching algorithms so that they no longer need to modify the
 1717         input by inserting a sentinel newline, and no longer worry
 1718         about running off the end of the buffer due to a missing sentinel.
 1719 
 1720         * src/grep.c (nlscan, prpending, prtext, grepbuf): Do not
 1721         worry about running off the end of the input buffer, since
 1722         it's now guaranteed to end in the sentinel newline.
 1723         * src/search.c (EGexecute, Pexecute): Likewise.
 1724 
 1725         * src/dfa.c (prtok, dfasyntax, dfaparse, copy, merge, state_index,
 1726         epsclosure, dfaexec, dfacomp):
 1727         Change many instances of "T *" to "T const *", to catch
 1728         any inadvertent programming errors made during this conversion.
 1729         * src/dfa.h (dfacomp, dfaexec, dfaparse): Likewise.
 1730         * src/grep.c (struct stats.parent, long_options, grepdir,
 1731         compile, execute, fillbuf, lastnl, lastout, nlscan, prline,
 1732         prpending, prtext, grepbuf, grep, grepfile, grepdir): Likewise.
 1733         * src/grep.h (struct matcher.compile, struct matcher.execute):
 1734         Likewise.
 1735         * src/kwset.c (struct kwset.trans, kwsalloc, kwsincr, treefails,
 1736         treedelta, hasevery, treenext, bmexec, cwexec, kwsexec): Likewise.
 1737         * src/kwset.h (kwsalloc, kwsincr, kwsexec): Likewise.
 1738         * src/search.c (kwsmusts, Gcompile, Ecompile, EGexecute, Pcompile,
 1739         Pexecute): Likewise.
 1740 
 1741         * src/dfa.c (dfaexec):
 1742         Use size_t, not char *, to avoid worrisome casts to convert
 1743         char const * to char *.
 1744         * src/dfa.h (dfaexec): Likewise.
 1745         * src/grep.c (execute): Likewise.
 1746         * src/grep.h (execute): Likewise.
 1747         * src/kwset.c (bmexec, cwexec, kwsexec): Likewise.
 1748         * src/kwset.h (struct kwsmatch.offset, kwsalloc, kwsincr,
 1749         kwsexec): Likewise.
 1750         * src/search.c (EGexecute, Fexecute, Pexecute): Likewise.
 1751 
 1752         * src/dfa.h (_PTR_T): Depend on defined __STDC__, not __STDC__.
 1753         (PARAMS): Depend on PROTOTYPES, not __STDC__.
 1754 
 1755         * src/dfa.c (dfasyntax): Last arg is unsigned char, not int.
 1756         * src/dfa.h (dfasyntax): Likewise.
 1757 
 1758         * src/dfa.h (struct dfa): Remove member newlines; no longer needed.
 1759         * src/dfa.c (build_state, dfaexec, dfafree): Do not worry
 1760         about special newline state.
 1761 
 1762         * src/search.c (matchers): Move definition to end of file, so
 1763         that we don't need forward decls.
 1764         (lastexact): Remove.
 1765         (kwset_exact_matches): New var; subsumes old lastexact var.
 1766         All uses changed.
 1767 
 1768         * src/dfa.c (index): Remove macro.
 1769         (REALLOC_IF_NECESSARY): Skip unnecessary test.
 1770         (tstbit, setbit, clrbit): Declare arg to be unsigned, to help compiler.
 1771         (copyset, zeroset, equal): Use C builtin primitives, to help compiler.
 1772         (dfaexec): Do not modify input string.
 1773         Remove newline parameter; no longer needed.
 1774         (comsubs): Use strchr, not index.
 1775 
 1776         * src/grep.h (matchers): Use fixed name size, not pointer (as
 1777         there's no need for the extra flexibility).  All uses changed.
 1778 
 1779         * src/kwset.h (struct kwsmatch.offset): Renamed from beg, with
 1780         change of type to size_t.  All uses changed.
 1781 
 1782         * src/grep.c (reset): No longer need kludge for dfaexec.  Simplify.
 1783         (reset, grepbuf): Adjust to new interface for 'execute'.
 1784         (install_matcher): List is now terminated by null compile,
 1785         not null name.
 1786         Do not invoke setrlimit if that wouldn't change the limit.
 1787 
 1788         * src/dfa.c (xcalloc, xmalloc, xrealloc, prtok, tstbit, setbit,
 1789         clrbit, copyset, zeroset, notset, equal, charclass_index,
 1790         looking_at, lex, addtok, atom, nsubtoks, copytoks, closure,
 1791         branch, regexp, copy, insert, merge, delete, state_index,
 1792         build_state, build_state_zero, icatalloc, icpyalloc, istrstr,
 1793         ifree, freelist, enlist, comsubs, addlists, inboth):
 1794         Remove forward decls; no longer needed.
 1795         * src/grep.c (ck_atoi, usage, error, setmatcher,
 1796         install_matcher, prepend_args, prepend_default_options,
 1797         page_alloc, reset, fillbuf, grepbuf, prtext, prpending, prline,
 1798         print_offset_sep, nlscan, grep, grepfile): Likewise.
 1799         * src/kwset.c (enqueue, treefails, treedelta, hasevery,
 1800         treenext, bmexec, cwexec): Likewise.
 1801         * src/search.c (Gcompile, Ecompile, EGexecute, Fcompile, Fexecute,
 1802         Pcompile, Pexecute, kwsinit): Likewise.
 1803 
 1804         * src/search.c (Pcompile): Do not assume newly allocated
 1805         storage is zeroed.
 1806 
 1807 2000-04-06  Paul Eggert
 1808 
 1809         * doc/grep.1, doc/grep.texi, NEWS: Improve the explanation of
 1810         locale-dependent behavior of range expressions.  Mention
 1811         LC_COLLATE, since this affects range expressions.
 1812 
 1813 2000-03-26  Paul Eggert
 1814 
 1815         * Makefile.am (ACINCLUDE_INPUTS): Add decl.m4, inttypes_h.m4,
 1816         uintmax_t.m4, ulonglong.m4, xstrtoumax.m4.
 1817         * m4/Makefile.am (EXTRA_DIST): Likewise.
 1818 
 1819         * src/Makefile.am (base_sources):
 1820         Add xstrtol.c, xstrtol.h, xstrtoumax.c.
 1821         (EXTRA_DIST): Add strtol.c.
 1822 
 1823         * configure.in (jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX,
 1824         HAVE_DECL_STRTOUL, HAVE_DECL_STRTOULL): Add.
 1825         (AC_REPLACE_FUNCS): Add strtoul.
 1826 
 1827         * src/grep.c: Include xstrtol.h.
 1828         (ck_atio): Use xstrtoumax and do proper overflow checking.
 1829         (max_count, outleft): Now off_t, not int.
 1830         (main): Likewise. Use xstrtoumax to convert max_count from string.
 1831 
 1832         * acconfig.h (HAVE_DECL_STRTOUL, HAVE_DECL_STRTOULL): New #undefs.
 1833         (HAVE_STPCPY, ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
 1834         HAVE_LC_MESSAGES): Remove.
 1835 
 1836         * m4/decl.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4,
 1837         m4/xstrtoumax.m4, src/strtol.c, src/strtoul.c, src/strtoull.c,
 1838         src/strtoumax.c, src/xstrtol.c, src/xstrtol.h, src/xstrtoumax.c:
 1839         New files, taken unchanged from textutils, fileutils, sh-utils
 1840         and/or tar.
 1841 
 1842 2000-03-23  Paul Eggert
 1843 
 1844         * src/search.c (Pcompile): Add support for NUL bytes in
 1845         Perl regular expressions.
 1846 
 1847 2000-03-23  Paul Eggert
 1848 
 1849         * NEWS, doc/grep.1, doc/grep.texi: Change --pcre to --perl-regexp.
 1850         * src/grep.c (long_options, usage): Likewise.
 1851 
 1852         * doc/grep.1, doc/grep.texi: Remove pgrep program.
 1853         * src/Makefile.am (bin_PROGRAMS): Likewise.
 1854         (pgrep_SOURCES): Remove.
 1855 
 1856         * src/grep.c (main): Rename matcher from "pgrep" to "perl".
 1857         * src/search.c (matchers): Likewise.
 1858 
 1859         * src/search.c: Do not include stdio.h; no longer needed.
 1860         (NILP): Remove.
 1861         (sub): No longer static.
 1862         (n_pcre): Remove.
 1863         (cre): No longer an array.  Present only if HAVE_LIBPCRE.
 1864         (extra): New variable.
 1865         (Pcompile): Use fatal to report errors.
 1866         This also removes a possible core dump.
 1867         Add checks (marked FIXME) for restrictions in pcre.
 1868         Use pcre_maketables for proper localized behavior.
 1869         (Pcompile, Pexecute): Use GNU coding style.
 1870         The argument is a single pattern, not a list of patterns separated
 1871         by newlines; this is for consistency with grep and egrep.
 1872         Use pcre_study for speed.
 1873         (Pexecute): Abort if we lack pcre.
 1874         Abort if pcre_exec reports an impossible error.
 1875         Use code similar to the rest of search.c
 1876         to narrow down to the line we've found.
 1877 
 1878 2000-03-21  Alain Magloire
 1879 
 1880         * configure.in: added AC_CHECK_LIB(pcre, pcre_exec)
 1881         * ChangeLog: Typos corrected.
 1882         * src/search.c: new MACRO HAVE_LIBPCRE
 1883 
 1884 2000-03-21  H.Merijn Brand
 1885 
 1886         * src/Makefile.am(bin_PROGRAMS): added pgrep and new macro
 1887         pgrep_SOURCES.
 1888         * src/search.c: new functions Pcompile() and Pexecute()
 1889         to support PCRE.  Update matcher[] array for pgrep.
 1890         * src/grep.c: new short and long option --pcre and -P.
 1891         usage() updated.
 1892 
 1893 2000-03-21  Bastiaan Stougie
 1894 
 1895         Improvement of the -m or --max-count option. Now works for NUM > 1 and
 1896         prints trailing context for the last matching line.
 1897 
 1898         * src/grep.c
 1899         (after_last_match): Is a new off_t variable that replaces inputhwm
 1900         to retain the correct input offset even after a call to fillbuf. Note
 1901         that after_last_match has a different meaning than inputhwm:
 1902         it always points to the offset in the input of the first byte after
 1903         the last matching line, and is 0 if no matching line has been found
 1904         yet.
 1905         (grep): Print trailing context after the NUMth match when the -m NUM
 1906         option is used.
 1907         (grep): Added comment. Should have been commented already.
 1908         (grepbuf): Now updates outleft correctly. This fixes the bug that the
 1909         -m NUM option did not stop after NUM lines for NUM greater than 1.
 1910         (grepbuf, prtext): Now update after_last_match instead of inputhwm.
 1911         (fillbuf): No longer updates inputhwm.
 1912         (prpending): When outputting trailing context of the max_count-th
 1913         matching line, stop at the first matching line.
 1914         (grepfile): Seek to after_last_match or eof, depending on the values
 1915         of outleft and bufmapped.
 1916         (usage): added the -m or --max-count option to the help message.
 1917         * doc/grep.texi, doc/grep.1: Document the change of the -m option.
 1918 
 1919 2000-03-17  Paul Eggert
 1920 
 1921         Add new -m or --max-count option, based on a suggestion by
 1922         Bastiaan Stougie.
 1923 
 1924         * doc/grep.texi, doc/grep.1: Document it.
 1925         * src/grep.c (short_options, long_options, main): Add it.
 1926         (inputhwm): New variable.
 1927         (fillbuf, prtext, grepbuf): Set it.
 1928         (bufmapped): Now a macro (defined to zero) if HAVE_MMAP is not defined.
 1929         (max_count, outleft): New variables.
 1930         (prtext, grepbuf, grep): Don't output more than outleft lines.
 1931         (grepfile): If grepping standard input, seek to the limit of what
 1932         we've read before exiting.  This fixes a bug with mmapped input,
 1933         and is needed for proper -m support.
 1934         (main): Exit immediately if -m 0 is specified.
 1935 
 1936 2000-03-08  Alain Magloire
 1937 
 1938         * configure.in: version 2.4.2
 1939 
 1940 2000-03-07  Paul Eggert
 1941 
 1942         * Make intl subdirectory match fileutils, tar, etc.;
 1943         see intl/ChangeLog for details.
 1944 
 1945         * src/getpagesize.h: Reformat to match latest fileutils.
 1946 
 1947         * src/savedir.c (savedir): Work even if directory size is
 1948         negative; this can happen with some NFS screwups.
 1949 
 1950 2000-03-03  Jim Meyering
 1951 
 1952         * regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
 1953 
 1954 2000-03-02  Alain Magloire
 1955 
 1956         * 2.4.1 Release
 1957 
 1958 2000-02-25  Paul Eggert
 1959 
 1960         * configure.in (LIBOBJS): Work around automake 1.4 bug:
 1961         regex.c wasn't being passed through ansi2knr on pre-ANSI hosts.
 1962         (ac_use_included_regex): Fix typo in warning.
 1963         * src/Makefile.am (EXTRA_DIST): Remove regex.c, as the LIBOBJS
 1964         workaround means that automake now puts regex.c into DIST_COMMON.
 1965 
 1966 2000-02-25  Alain Magloire
 1967 
 1968         * po/*.po: update of the PO files.
 1969 
 1970 2000-02-22  Eli Zaretskii
 1971 
 1972         * doc/grep.1:  Two small glitches(typos).
 1973 
 1974 2000-02-18  Eli Zaretskii
 1975 
 1976         * djgpp/config.site (prefix, INSTALL): Use /dev/env/DJDIR instead
 1977         of ${DJDIR}, so that the produced Makefile's work on any DJGPP
 1978         installation.
 1979 
 1980 2000-01-30 Alain Magloire
 1981 
 1982         * doc/grep.1:  corrected typo.
 1983         Noted by Ruslan Ermilov.
 1984 
 1985 2000-01-30 Alain Magloire
 1986 
 1987         * vms/Makefile.am: added config_vms.h to EXTRA_DIST.
 1988         * vms/config_vms.h: New File, contains macros specific to VMS and
 1989         avoid namespace collision with operating system supplied C library.
 1990         * vms/make.com: Better compiler auto-detection; information for builds
 1991         on pre-OpenVMS 7.x systems; general overhaul.
 1992         * src/getpagesize.h: Reinstate support for different pagesizes on
 1993         VAX and Alpha. Work around problem with DEC C compiler.
 1994         * src/vms_fab.c: Cast to some assigments; fixed typo argcp vs. argp.
 1995         * src/vms_fab.h: Added new include files to avoid warnings about
 1996         undefined function prototypes.
 1997         Those patches were provided by Martin P.J. Zinser (zinser@decus.de).
 1998 
 1999 2000-01-30  Paul Eggert
 2000 
 2001         * src/grep.c (main): Update copyright notice.
 2002 
 2003 2000-01-28  Alain Magloire
 2004 
 2005         * src/grep.c (usage):  The example "%s -i 'hello.*world' could
 2006         lead to confusion when progname is 'fgrep.
 2007         Noted by Akim Demaille.
 2008 
 2009         * configure.in: Reenable, jm_INCLUDE_REGEX() since we now
 2010         track GNU lib C.
 2011         * src/Makefile.am: EXTRA_DIST new macros with regex.c regex.h.
 2012         Requested By Ulrich Drepper.
 2013 
 2014 2000-01-25  Paul Eggert
 2015 
 2016         * src/grep.c (grep): If the final byte of an input file is not
 2017         a newline, grep now silently supplies one.
 2018         * doc/grep.texi, NEWS: Likewise.
 2019 
 2020 2000-01-25  Paul Eggert
 2021 
 2022         * NEWS, doc/grep.1, doc/grep.texi: Add -I option.
 2023         * src/grep.c (short_options, usage, main): Likewise.
 2024 
 2025         * doc/grep.texi: Fix some incorrect references to ASCII.
 2026 
 2027 2000-01-25  Paul Eggert
 2028 
 2029         * doc/grep.1: Simplify synopsis; sort options; mention
 2030         environment variables; clean up some minor gaffes.
 2031 
 2032 2000-01-25  Paul Eggert
 2033 
 2034         * doc/grep.texi:
 2035         Fix some errors in description of [:print:] and the like.
 2036 
 2037 2000-01-23  Paul Eggert
 2038 
 2039         * src/dfa.c (FETCH, lex): Put brackets around if-body to avoid
 2040         GCC warning about ambiguous if-then-else.
 2041 
 2042 2000-01-23  Paul Eggert
 2043 
 2044         * src/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits.
 2045         * src/dfa.c (ISASCIIDIGIT): New macro.
 2046         (lex): Use it instead of ISDIGIT.
 2047 
 2048 2000-01-23  Paul Eggert
 2049 
 2050         The bug is that regular expression ranges like [a-z] compare raw
 2051         byte codes to the range boundaries, whereas POSIX says that they
 2052         should use the current collating sequence instead.  For example,
 2053         in Solaris 7 with LC_ALL=en_US, the command
 2054         echo x | grep '[ -~]'
 2055         outputs 'x', but it shouldn't output anything since ' ' and '~'
 2056         sort before all letters in that locale.
 2057 
 2058         * src/regex.c (compile_range): When matching a character
 2059         range, use the current collating sequence, as POSIX requires.
 2060         * src/dfa.c (lex): Likewise.
 2061 
 2062 2000-01-20  Alain Magloire
 2063 
 2064         * tests/Makefile.am (dist-hook): Added new rule to make sure
 2065         that the shell scripts have the right permissions.
 2066         * src/posix/Makefile.am (EXTRA_DIST): added regex.h in the
 2067         distribution.
 2068         * THANKS: updated.
 2069 
 2070 2000-01-18  Alain Magloire
 2071 
 2072         * Rectification the initial patch to add --binary-file option
 2073         was done by Ruslan Ermilov.
 2074 
 2075 2000-01-17  Paul Eggert
 2076 
 2077         Sync with sources of fileutils 4.0n, tar 1.13.17, glibc 2.1.3a1.
 2078         Convert to ANSI C prototypes (using ansi2knr for backwards
 2079         compatibility), as this makes it easier to sync.
 2080 
 2081         * configure.in (AC_OBJEXT): Spell in a funny way, to work around
 2082         a bug in automake 1.4 with ansi2knr.
 2083         (LIBOBJS): Add assignment so that .o files in LIBOBJS are also built
 2084         via the ANSI2KNR-filtering rules.
 2085         (AC_OUTPUT): Add src/posix/Makefile.
 2086         * src/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
 2087         (SUBDIRS): New macro.
 2088         * src/ansi2knr.1, src/ansi2knr.c, src/posix/Makefile.am: New files.
 2089         * src/dfa.c, src/dosbuf.c, src/grep.c, src/kwset.c, src/search.c,
 2090         src/vms_fab.c:
 2091         Use prototypes for function definitions.
 2092         * src/grep.c (main): Use int counter for default context,
 2093         fixing an ANSI portability bug uncovered by the above changes.
 2094 
 2095         * config.guess, config.sub, install-sh, missing, src/alloca.c,
 2096         src/getpagesize.h, src/memchr.c, src/savedir.c, src/savedir.h,
 2097         src/stpcpy.c:
 2098         Upgrade to latest version from fileutils 4.0n.
 2099 
 2100         * src/getopt.c, src/getopt.h, src/getopt1.c: Upgrade to latest
 2101         version from tar 1.13.17.
 2102 
 2103         * src/obstack.c, src/obstack.h, src/regex.c, src/regex.h:
 2104         Upgrade to glibc 2.1.3 alpha 1, with K&R C portability fix.
 2105         * src/posix/regex.h: New file, from glibc 2.1.3 alpha 1.
 2106 
 2107 2000-01-04  Paul Eggert
 2108 
 2109         Initial patch by Ruslan Ermilov.
 2110 
 2111         Add --binary-files option.
 2112         * NEWS, doc/grep.1, doc/grep.texi: Document it.
 2113         * src/grep.c (BINARY_FILES_OPTION): New constant.
 2114         (long_options, grep, usage, main): New --binary-files option.
 2115         (binary_files): New var.
 2116         * src/system.h (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, CHAR_MAX):
 2117         New macros.
 2118         (INT_MAX, UCHAR_MAX): Define in terms of TYPE_MAXIMUM.
 2119 
 2120 2000-01-04  Paul Eggert
 2121 
 2122         * savedir.c (savedir): Don't store past the end of an array if
 2123         name_size is zero and the directory is empty.
 2124         Reported by Dima Barsky <dima@pwd.hp.com>.
 2125 
 2126 1999-12-03  Alain Magloire
 2127 
 2128         * 2.4 Release.
 2129 
 2130 1999-11-18  Paul Eggert
 2131 
 2132         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
 2133         problem with the QNX 4.25 shell, which doesn't propagate exit
 2134         status of failed commands inside shell assignments.
 2135 
 2136 1999-11-13  Eli Zaretskii
 2137 
 2138         * doc/grep.texi: Minor markup and spelling corrections.  Use
 2139         @noindent where appropriate.
 2140 
 2141         * PATCHES-{AM,AC}: rename to PATCHES.{AM,AC}
 2142 
 2143 1999-11-12  Eli Zaretskii
 2144 
 2145         doc/grep.texi: Minor fixes and typos corrected.
 2146         djgpp/README: Updated version.
 2147 
 2148 1999-11-07  Paul Eggert
 2149 
 2150         * src/grep.c (usage): Fix misspelling.
 2151 
 2152 1999-11-07  Paul Eggert
 2153 
 2154         Don't assume that the C library has re_set_syntax and friends.
 2155         * src/Makefile.am (base_sources): Add regex.c, regex.h.
 2156         (EXTRA_DIST): Remove regex.c, regex.h.
 2157 
 2158         * src/grep.c (prtext): Use out_quiet, not not_text, to decide
 2159         whether to set pending to zero at the end.
 2160         (not_text): Remove static variable, undoing latest change.
 2161         (grep): Likewise.
 2162 
 2163         * doc/grep.texi: Tighten up the text, and fix some minor
 2164         spelling and usage errors.  Use @enumerate rather than @table
 2165         @samp, since it's better for Q&A format.  Add cross
 2166         references.
 2167 
 2168 1999-11-01 Alain Magloire
 2169 
 2170         * src/search.c: Use the more portable [[:alnum:]]
 2171         to define a word instead of Ascii dependent [0-9A-Za-z]
 2172         * src/grep.c: make not_text global to not display text when
 2173         the context switches -A/-B/-C are use on binary files.
 2174         * make grep-2.3g available for testing.
 2175         * configure.in: drop support for --without-included-regex.
 2176         This was generating bogus bug reports, since many GNU/Linux
 2177         users have different version of glibc.  And glibc maintainers
 2178         decided to drop k&r support.
 2179 
 2180 1999-11-01 Arnold D. Robbins
 2181 
 2182         * regex.c (init_syntax_once): move below definition of
 2183         ISALNUM etc., then use ISALNUM to init the table, so that
 2184         the word ops will work if i18n'ed.
 2185         (SYNTAX): And subscript with 0xFF for Latin-1 characters.
 2186 
 2187 1999-10-26  Alain Magloire
 2188 
 2189         * src/regex.c: Merge changes from GNU lib C.
 2190         * Updated the *.po files
 2191 
 2192 1999-10-26  Paul Eggert
 2193 
 2194         * src/grep.c (fillbuf): Don't report buffer size overflow if
 2195         newalloc == save and maxalloc == save.  This can happen
 2196         e.g. when reading a large page-aligned file that contains
 2197         no newlines.
 2198 
 2199 1999-10-21  Paul Eggert
 2200 
 2201         * src/grep.c (usage): Give example.  Clarify -F.
 2202         Explain exit status more clearly.
 2203 
 2204 1999-10-12  Paul Eggert
 2205 
 2206         * doc/grep.texi: Shorten the commentary about egrep and {.
 2207         "BSD grep" -> "traditional grep".
 2208         * doc/grep.1: Match recent changes to grep.texi.
 2209 
 2210 1999-10-11  Paul Eggert
 2211 
 2212         * NEWS, doc/grep.1, doc/grep.texi: New option --mmap.
 2213         * src/grep.c (mmap_option): New variable.
 2214         (long_options, reset, usage): Add --mmap.
 2215         Default is now read, not mmap.
 2216 
 2217         * doc/grep.1: Document -Z or --null.
 2218 
 2219 1999-10-11  Paul Eggert
 2220 
 2221         * doc/grep.texi: Fix texinfo glitches.  POSIX -> POSIX.2 where
 2222         appropriate.
 2223 
 2224 1999-10-11  Paul Eggert
 2225 
 2226         * acconfig.h (ssize_t): New #undef.
 2227 
 2228         * configure.in (AC_CHECK_TYPE): Add ssize_t.
 2229 
 2230         * src/grep.c (PREFERRED_SAVE_FACTOR): New macro.
 2231         (reset): If the buffer has already been allocated, set bufsalloc to
 2232         be bufalloc / PREFERRED_SAVE_FACTOR.  This avoids problems when
 2233         bufsalloc == bufalloc (possible after reading a large binary file).
 2234         (reset): Use PREFERRED_SAVE_FACTOR instead of magic constant.
 2235         Do not set bufbeg; nobody uses it.
 2236         Always set buflim.
 2237         Check for lseek error.
 2238         Use SEEK_CUR, not a magic constant.
 2239         (fillbuf): Return an error indication, not a count.
 2240         All callers changed.
 2241         Do not assume ssize_t fits in int.
 2242         Use PREFERRED_SAVE_FACTOR instead of magic constant.
 2243         Clean up mmap code.
 2244         Do not attempt to mmap zero bytes.
 2245         Check for lseek error.
 2246         Use SEEK_SET, not a magic constant.
 2247         Work correctly if read is interrupted.
 2248         (grepfile): Work correctly if open or close is interrupted.
 2249 
 2250         * src/system.h (SEEK_SET, SEEK_CUR): New macros.
 2251 
 2252 1999-10-02 Alain Magloire
 2253 
 2254         * src/regex.[ch]: upgrade from GNU lib C source tree.
 2255 
 2256         * make beta 2.3f available.
 2257 
 2258 1999-10-02  Paul Eggert
 2259 
 2260         * NEWS: egrep is now equivalent to `grep -E'.
 2261         The lower bound of an interval is not optional.
 2262         You can specify a matcher multiple types without error.
 2263         -u and -U are now allowed on non-DOS hosts, and have no effect.
 2264         * doc/grep.texi: Likewise.
 2265         * doc/grep.1: Likewise.
 2266         Fix some troff bugs that prevented `groff' from rendering the page.
 2267 
 2268         * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher):
 2269         Remove.
 2270         (matcher): Add.
 2271         * src/grep.h (default_matcher): Remove.
 2272         (matcher): Now exported from ?grepmat.c, not grep.c.
 2273 
 2274         * src/dfa.c (lex): If { would start an invalid interval specification,
 2275         treat it as a normal character.
 2276         Remove (broken) support for {,M} meaning {0,M}.
 2277         Diagnose bogus intervals like {1,0}.
 2278         (closure): maxrep is now -1 to indicate no limit, not zero;
 2279         zero is a valid value for maxrep, meaning an upper bound of zero.
 2280 
 2281         * src/grep.c (short_options): New constant.
 2282         (long_options, main): -u and -U are now supported on Unix,
 2283         with no effect.
 2284         (matcher): Removed; now defined by ?grepmat.c.
 2285         (install_matcher): Renamed from setmatcher.
 2286         (setmatcher): New function.
 2287         (usage): Report new, more uniform option scheme.
 2288         (main): Do not initialize matcher; ?grepmat.c now does this.
 2289         Rely on setmatcher to catch matcher conflicts.
 2290         Default matcher is "grep".
 2291 
 2292         * src/search.c (matchers):
 2293         Remove "posix-egrep" matcher; no longer needed.
 2294         (Ecompile): Likewise.
 2295         The egrep matcher now has POSIX behavior.
 2296 
 2297         * tests/bre.tests: grep '\{' is no longer an error.
 2298         Fix test for interval too large, and enable it.
 2299         * tests/ere.tests: grep -E {1 is no longer an error
 2300         Likewise for a{1, a{1a, a{1a}, a{1,x}.
 2301 
 2302 1999-09-22  Paul Eggert
 2303 
 2304         * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
 2305         2.95.1 bug with HP-UX 10.20.
 2306 
 2307 1999-09-12  Paul Eggert
 2308 
 2309         * src/grep.c (fillbuf): Fix typo: we sometimes reported
 2310         arithmetic overflow even when there wasn't any.
 2311 
 2312 1999-09-12  Paul Eggert
 2313 
 2314         * configure.in (AC_CHECK_FUNCS): Add memmove.
 2315 
 2316         * src/system.h (S_ISREG): New macro.
 2317         (memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove,
 2318         not if !defined STDC_HEADERS.  This is needed for SunOS 4.1.4,
 2319         which defines STDC_HEADERS but lacks memmove.
 2320 
 2321         * src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP.
 2322         (reset): Always fstat the file, since we always need its size if it is
 2323         regular.
 2324         Similarly, get the buffer offset of every regular file.
 2325         Set bufmapped to 0 if the file's initial offset is not a multiple
 2326         of the page size.
 2327         (fillbuf): Calculate an upper bound on how much memory we should
 2328         allocate only for regular files, since we don't know the sizes of
 2329         other files.
 2330         Don't bother to check whether the file offset is a multiple of the page
 2331         size, since we now do that just once in `reset'.
 2332         When an mmapped area would fall past the end of the file, trim it to
 2333         just before instead of giving up immediately and doing a `read';
 2334         that avoids a worst-case behavior that could read half an mmapped file.
 2335         Fix bug when computing offsets on hosts that don't have mmap.
 2336 
 2337 1999-08-27  Paul Eggert
 2338 
 2339         * src/system.h (memmove): New macro.
 2340 
 2341         * src/grep.c (page_alloc): Reallocate the old buffer instead
 2342         of having both old and new buffers active simultaneously.
 2343         Remove valloc debugging variant, which no longer applies.
 2344 
 2345         (fillbuf): Rejigger the buffer allocation mechanism.  The old
 2346         mechanism could allocate more than 10*N bytes for an N-byte
 2347         file, which was excessive.  Check for arithmetic overflow a
 2348         bit more carefully.
 2349 
 2350 1999-08-25  Paul Eggert
 2351 
 2352         * src/grep.c (grepdir):
 2353         Don't assume that st_ino and st_dev must be integers;
 2354         POSIX.1 allows them to be floating-point (!).
 2355 
 2356         * src/vms_fab.h (arr_ptr): `:' -> `;' to fix typo.
 2357 
 2358 1999-08-18  Alain Magloire
 2359 
 2360         * 2.3e snapshot.
 2361 
 2362 1999-08-18  Alain Magloire
 2363 
 2364         * src/search.c: On a CRAY J90 system running UNICOS 8.0.
 2365         Compilation of ./src/search.c failed because the declaration of
 2366         the variable "regex":
 2367           static struct re_pattern_buffer regex;
 2368         conflicted with a previous declaration search.c #includes "system.h",
 2369         which #includes <stdlib.h>, which declares :
 2370         extern char *regex __((char *_Re, char *_Subject, ...));
 2371         The declaration in search.c is local to that one source file.
 2372         I just changed its name to something less likely to conflict.
 2373         (I called it "regexbuf", but you could pick any name you want.)
 2374         Excerpt email from Dean Kopesky.
 2375 
 2376 1999-08-16  Paul Eggert
 2377 
 2378         Upgrade large-file support to the version used in tar and
 2379         textutils.
 2380 
 2381         * Makefile.am (ACLOCAL_AMFLAGS): Define to be empty.
 2382         (M4DIR, ACINCLUDE_INPUTS): New macros.
 2383         ($(srcdir)/acinclude.m4): New rule.
 2384 
 2385         * configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add.
 2386         (AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility
 2387         with what should appear in the next autoconf release.
 2388 
 2389         * m4/largefile.m4: Renamed from m4/lfs.m4.
 2390 
 2391         * src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub:
 2392         New files.  config.guess and config.sub ar needed by the new
 2393         AC_SYS_LARGEFILE.  ansi2knr is needed by AM_C_PROTOTYPES,
 2394         which in turn is needed by the new AC_SYS_LARGEFILE.
 2395 
 2396 1999-08-16  Alain Magloire
 2397 
 2398         * 2.3d snapshot on ftp server.
 2399 
 2400 1999-07-26  Paul Eggert
 2401 
 2402 Several GNU tools have options to process arbitrary file names, even
 2403 file names that contain newline characters.  These include `find
 2404 -print0', `perl -0', `sort -z', and `xargs -0'.  It'd be handy if GNU
 2405 grep also processed such file names.  Here's a proposed patch to do
 2406 this, relative to grep 2.3c.  This patch introduces two options, one
 2407 for the data, and one for the file names.  (Sometimes one wants
 2408 null-terminated file names in the output, and sometimes one wants to
 2409 process lists of null-terminated strings, and these are orthogonal
 2410 axes.)
 2411 
 2412         * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options.
 2413         * src/grep.c (long_options, usage, main): Likewise.
 2414 
 2415         * src/dfa.h (dfasyntax): New eol parameter.
 2416         * src/dfa.c (eolbyte): New var.
 2417         (dfasyntax): Set it from new parameter.
 2418         (lex, dfastat, build_state, dfaexec): Use it instead of '\n'.
 2419 
 2420         * src/grep.h (eolbyte): New decl.
 2421         * src/grep.c (eolbyte): New var.
 2422         (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'.
 2423         (filename_mask): New var.
 2424         (prline, grepfile): Output NUL separator if filename_mask is zero.
 2425         (grep): Look for '\200' as the hallmark of a binary file, not '\0',
 2426         if -z or --null-data is specified, since it implies that '\0' is
 2427         expected as text.
 2428 
 2429         * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax.
 2430         (EGexecute, Fexecute): Use eolbyte instead of '\n'.
 2431 
 2432 1999-06-15 Alain Magloire
 2433 
 2434         * src/grep.c, doc/grep{1,texi} :
 2435         --revert-match should be --invert-match.
 2436         Correction proposed by Karl Berry.
 2437 
 2438 1999-06-12 Alain Magloire
 2439 
 2440         * doc/grep.{1,texi}: add description for --with-filename.
 2441         Noted missing by UEBAYASHI Masao.
 2442 
 2443 1999-03-17 Paul Eggert
 2444 
 2445         * NEWS: Add GREP_OPTIONS.
 2446 
 2447         * doc/grep.texi: Document GREP_OPTIONS, and the other
 2448         environment variables.  Fix doc for [:blank:], [:cntrl:], [:punct:].
 2449 
 2450         * src/grep.c (prepend_args, prepend_default_options): New functions.
 2451         (main): Use them to implement GREP_OPTIONS.
 2452         * src/system.h (getenv): New decl.
 2453 
 2454 1999-03-16 Volker Borchert
 2455 
 2456         * configure.in: Use case case ... esac for  checking Visual C++.
 2457         When ${CC} contains options it was not recognize.
 2458 
 2459 1999-03-07 Paul Eggert
 2460 
 2461         * src/grep.c (usage): Don't report -E, -F, and -G unless we're grep.
 2462         (main): Don't match options -E, -F, and -G unless we're grep.
 2463         Remove after-the-fact check for options -E, -F, and -G, since
 2464         they're no longer needed.
 2465 
 2466 1999-03-05  Eli Zaretskii
 2467 
 2468         * src/grep.c (main): Print the name of the default matcher instead
 2469         of just "grep".
 2470 
 2471 1999-02-06 Alain Magloire
 2472 
 2473         * tests/*.awk : Linux users are seeing "Broken Pipe" on make check.
 2474         The problem is that grep does not drain its stdin, thus the previous
 2475         process in the pipeline receives a SIGPIPE.  Other shells are silent
 2476         about this.  There is actually no failure, since the broken pipe is
 2477         expected.  You can work around it by changing the pipeline, so that
 2478         the input is drained, like this:
 2479         status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1;
 2480         echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi
 2481         Excerpt email from Andreas Schwab.
 2482 
 2483 1999-02-23 Alain Magloire
 2484 
 2485         * src/grep.c : Restrict the use of -E, -F, -G
 2486         to only grep driver, Posix behaviour. {f,e}grep
 2487         the matcher is already set. This change may brake
 2488         scripts, warn in NEWS.
 2489 
 2490         * doc/grep.{1,texi} : -C takes arguments, upgrade manual.
 2491 
 2492         * beta 2.3a
 2493 
 2494 1999-02-23 Alain Magloire
 2495 
 2496         * configure.in : Change the configure VC test from
 2497         'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;'
 2498         Email from Joshua R. Poulson.
 2499 
 2500 1999-02-23 Paul Eggert
 2501 
 2502         Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL.
 2503         The btowc.c shipped with grep 2.3 is incorrect for Solaris
 2504         2.5.1 and earlier, as it assumes UTF8, which these OSes do not
 2505         support.  Solaris 7 supports btowc, so there's no need to ship
 2506         a substitute for it.  The only questionable case is Solaris
 2507         2.6, which lacks btowc but does support UTF8.  However, 2.6
 2508         supports UTF8 but only as a demonstration (for an English
 2509         locale!); Japanese Solaris 2.6 users typically use EUC, or
 2510         sometimes shift-JIS, but they cannot use UTF8 since Japanese
 2511         UTF8 is not supported.  Hence there's no point to having grep
 2512         substitute a btowc that uses UTF8, as it is either redundant,
 2513         or it will almost invariably have incorrect behavior.
 2514 
 2515         * configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR.
 2516         (AC_CHECK_FUNCS): Add btowc, wctype.
 2517         (AC_REPLACE_FUNCS): Don't replace btowc; our replacement is
 2518         invariably doing the wrong thing anyway, at least on SunOS/Solaris.
 2519         Don't bother to check for wctype in -lw, as we don't support
 2520         wide characters on Solaris 2.5.1 or earlier anyway.
 2521 
 2522         * bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT).
 2523 
 2524         * src/btowc.c: Removed; no longer needed.
 2525 
 2526 1999-02-19  Paul Eggert
 2527 
 2528         * NEWS: Fix typo when talking about the old behavior of
 2529         silently skipping directories; it was grep 2.1, not grep 2.2.
 2530 
 2531 1999-02-15 Alain Magloire
 2532 
 2533         * bootstrap/Makefile.try : add DJGPP DEFS.
 2534         Done by Elie Zaretsckii.
 2535 
 2536 1999-02-14 Alain Magloire
 2537 
 2538         * m4/gettext.m4 : Guard [] with changequote.
 2539         From Elie Zaretskii.
 2540 
 2541         * djgpp/config.bat : Makefile.in.in --> Makefile.in-in
 2542         From Elie Zaretskii.
 2543 
 2544         * src/dosbuf: k&r function parameter.
 2545 
 2546         * release of 2.3.
 2547 
 2548 1999-02-10 Alain Magloire
 2549 
 2550         * bootstrap/{Makefile{try,am},REAMDE} : skeleton
 2551         provided for system lacking the tools to autoconfigure.
 2552 
 2553         * src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H]
 2554 
 2555 1999-02-10 Alain Magloire
 2556 
 2557         * PATCHES-AC, PATCHES-AM: updated.
 2558 
 2559         * m4/regex.m4 : updated.
 2560 
 2561 1999-02-05 Eli Zaretskii
 2562 
 2563         * m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file
 2564         names.
 2565 
 2566         * aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the
 2567         latter prevents GCC from finding headers and libraries.
 2568 
 2569         * djgpp/config.bat: Make building from another directory work
 2570 
 2571         * djgpp/config.sed: Remove redundant command wich edited path
 2572         separator: now done by configure.
 2573 
 2574         * src/grep.c [O_BINARY]: Add prototype for undossify_input.
 2575 
 2576         * doc/grep.texi (Introduction): Typo fixed.
 2577 
 2578 1999-02-03 Alain Magloire
 2579 
 2580         * grep-2.2f beta release.
 2581 
 2582 1999-02-02 Alain Magloire
 2583 
 2584         * m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 :
 2585         New files to aid configuration and unload configure.in.
 2586         * m4/Makefile.am : updated.
 2587         * src/btowc.c : protect for wchar.h
 2588 
 2589 1999-01-28 Alain Magloire
 2590 
 2591         * intl/Makefile.in: Replace .o with .${ac_objext} where necessary.
 2592         Work around a limitation of Visual C++ on Cygwin32.
 2593         * acconfig.h configure.in: Define `alloca' as `_alloca' when CC=cl.
 2594         This little hack was suggested by Ian Roxborough <irox@cygnus.com>.
 2595         Patch forwarded by Ben Elliston.
 2596 
 2597 1999-01-28 Alain Magloire
 2598 
 2599         * PATCHES-AM: New file. A small patch for automake-1.4, use $(sep)
 2600         as the path separator base on @SEP@.
 2601         * PATCHES-AC configure.in : updated for autoconf-13.
 2602 
 2603 1999-01-27 Volker Borchert
 2604 
 2605         * grep.c: fgrep -NUM not working correctly.
 2606         add the argument number to digit_args_val.
 2607 
 2608 1999-01-22 Paul Eggert
 2609 
 2610         Prevent grep -r from recursing infinitely through directory loops via
 2611         symbolic links.
 2612 
 2613         * grep.c (struct stats): New type.
 2614         (stats_base): New var.
 2615         (bufstat): Remove; subsumed by stats->stat.
 2616         (reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg,
 2617         for directory loop checking; use this instead of the bufstat global.
 2618         All callers changed.
 2619         (grepfile): Stat the file before invoking grepdir.
 2620         (grepdir): Assume that the argument has already been statted.
 2621         No longer a need for a directory size argument, since it
 2622         can be gotten from the struct stats * argument.
 2623         Check for directory loops.
 2624         Create linked list of directories currently being visited,
 2625         to detect loops.
 2626 
 2627 1998-12-29 Kaveh R. Ghazi
 2628 
 2629         intl/localealias.c: When building grep-2.2e using cc on Irix4,
 2630         I needed the following patch to intl/localealias.c.
 2631         (Its the same patch used by fileutils-4.0.) The patch resolves
 2632         conflicts between char* and unsigned char* in the i18n code.
 2633 
 2634 1998-12-10 Alain Magloire
 2635 
 2636         * src/grep.c : Typo in contex -->context
 2637         Noted by  Vladimir Michl.
 2638 
 2639 1998-12-01  Alain Magloire
 2640 
 2641         * doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am:
 2642         New files.
 2643 
 2644         * m4/progtest.m4: proctect '[]' from m4.
 2645         Noted by Eli Z.
 2646 
 2647         * PATCHES-AC: New file, add the patch for autoconf in the dist.
 2648 
 2649         * acconfig.h: (HAVE_DOS_FILENAME)
 2650 
 2651         * TODO: updated.
 2652 
 2653         * src/search.c: remove obsolete 'gegrep,ggrep,gnugrep'
 2654         matchers. grep no longer depend on argv[0].
 2655 
 2656         * grep-2.2e beta to test DJGPP port.
 2657 
 2658 1998-11-28  Paul Eggert
 2659 
 2660         Various portability enhancements:
 2661         - Don't assume that O_BINARY implies DOS.  Use separate
 2662         macros D_OK (for DOS-like directory access) and
 2663         HAVE_DOS_FILE_NAMES (for DOS-like file names).
 2664         - Don't assume that off_t fits into long; it doesn't on Solaris 2.6.
 2665         - Have is_EISDIR set errno properly on hosts with screwed-up EISDIR.
 2666         - Treat ':' specially in DOS file names only if it's the end of a
 2667         drive specifier.
 2668         - Protect against errno < 0.
 2669 
 2670         * src/grep.c (is_EISDIR): Move defn to system.h.
 2671         (print_offset_sep): New function.
 2672         (fillbuf): Remove redundant test of O_BINARY.
 2673         (totalcc, totalnl): Now of type off_t.
 2674         (prline): Use print_offset_sep to print file offsets.
 2675         (grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility
 2676         on machines that don't work properly with EISDIR.
 2677         (grepdir): Don't assume ':' means slash on all DOS filenames;
 2678         it means it only in the file prefix.
 2679 
 2680         * src/system.h (strerror): Check for negative error numbers.
 2681         (is_EISDIR): Depend on D_OK, not O_BINARY.
 2682         (SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__.
 2683         (IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES,
 2684         not O_BINARY.
 2685         (CHAR_BIT): New macro.
 2686 
 2687         * src/dosbuf.c (struct dos_map):
 2688         pos and add members are now of type off_t.
 2689         (dos_stripped_crs): Now of type off_t.
 2690         (dossified_pos): Now accepts arg and returns value of type off_t.
 2691 
 2692         * configure.in (AC_CHECK_FUNCS): Add setmode.
 2693         (HAVE_DOS_FILENAMES): New macro
 2694 
 2695 1998-11-27  Eli Zaretskii
 2696 
 2697         * djgpp/config.sed: New file, a Sed script to edit configure
 2698         script before running it on DOS/Windows.
 2699         * djgpp/config.bat: Updated to handle po2tbl.sed.in and
 2700         po/Makefile.in.in on DOS filesystems, and to run config.sed.
 2701 
 2702 1998-11-24  Jim Meyering
 2703 
 2704         * src/grep.c : Typo s/infalid/invalid/
 2705         Also noted by Stanislav Brabec.
 2706 
 2707 1998-11-24  Eli Zaretskii
 2708 
 2709         * doc/grep.texi: I found and corrected several typos.
 2710         I believe the GNU standards require the section that describes the
 2711         options to the programs to be called ``Invoking'' or ``Invoking
 2712         <program-name>''.  This is so users and programs can easily find
 2713         that node in any Info file.  So I changed the name of the
 2714         `Options' chapter to `Invoking', and corrected the
 2715         cross-references accordingly.
 2716         I added some markup to things like file names and options.
 2717         I added some additional index entries where that seemed useful.
 2718         I also corrected some index entries, such as "@cindex [:alnum:]",
 2719         which used a colon in them (the colons confuse Info readers).
 2720 
 2721 1998-11-24  Alain Magloire
 2722 
 2723         * grep/doc/grep.texi : -h is not use for help.
 2724         Nit spotted by Jim Meyering.
 2725 
 2726 1998-11-23  Alain Magloire
 2727 
 2728         * doc: New directory, grep.1, {e,f}grep.man move here
 2729         * doc/grep.texi: New info manual
 2730         * doc/version.texi: New
 2731         * doc/Makefile.am: New
 2732         * tests/{ere,bre}.*: New files. The spencer2 test is split
 2733         in two ere/bre.
 2734         * config.hin: New, config.h.in rename to config.hin for OS
 2735         with limited file system aka DOS.
 2736 
 2737         * grep-2.2d release for beta.
 2738 
 2739 1998-11-18  Alain Magloire
 2740 
 2741         * src/regex.[ch] : Updated from GLibc, previous patches were
 2742         integrate by Ulrich Drepper and some added ones.
 2743 
 2744 1998-11-16  Paul Eggert
 2745 
 2746         * grep.h (__attribute__): New macro, if not GCC.
 2747         (fatal): Add __attribute__((noreturn)).
 2748         * grep.c (usage): Add __attribute__((noreturn)).
 2749 
 2750 1998-11-16  Paul Eggert
 2751 
 2752         Remove memory leak with valloced buffers, by invoking malloc instead.
 2753 
 2754         * configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove.
 2755         * src/grep.c (page_alloc): New function.
 2756         (ubuffer, pagesize): New vars.
 2757         (ALIGN_TO): New macro.
 2758         (reset): Initialize new vars.  Check for overflow in buffer size calc.
 2759         Use page_alloc instead of valloc.
 2760         (fillbuf): Likewise.  Use memcpy to copy saved area.
 2761 
 2762 1998-11-15  Paul Eggert
 2763 
 2764         * dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned.
 2765 
 2766 1998-11-14  Paul Eggert
 2767 
 2768         * src/grep.c (grepdir): Fix bug: memory freed twice.
 2769 
 2770         * src/search.c (Gcompile, Ecompile): Don't invoke dfainit,
 2771         since dfacomp does it for us, and if we also do it then we
 2772         leak memory.
 2773 
 2774 1998-11-13  Eli Zaretskii
 2775 
 2776         * djgpp/config.bat: Rewrite to run the configure script via Bash.
 2777         * djgpp/config.site, djgpp/getconf: New files.
 2778         * djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove.
 2779         * djgpp/README: Update instructions.
 2780 
 2781         * Makefile.am (EXTRA_DIST): Update the list of DJGPP files.
 2782 
 2783         * src/system.h (IS_SLASH): New macro.
 2784         (is_EISDIR): Define it here for DOS and Windows.
 2785 
 2786         * src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the
 2787         EOL formats of the input and output files match, unless stdout is
 2788         the console device.
 2789         (is_EISDIR): Don't define if already defined.  Accept a second
 2790         argument, the file name; all callers changed.
 2791         (grepdir): Don't free `file', inside the loop.  Use IS_SLASH to
 2792         check whether `dir' needs a slash.
 2793         (grepfile): If file is a directory, set e to EISDIR.
 2794 
 2795 1998-11-10  Alain Magloire
 2796 
 2797         * src/vms_fab.{c,h}: New file for VMS wildcard expansion
 2798         Written by Phillip C. Brisco.
 2799 
 2800         * vms/make.com : add line to compile vms_fab.c and
 2801         {e,f,}grepmat.c with link for each grep/fgrep/egrep.
 2802         Base on patch send by Phillib C. Brisco.
 2803 
 2804 1998-11-09  Alain Magloire
 2805 
 2806         * grep-2.2c on alpha for testing.
 2807 
 2808 1998-11-09  Paul Eggert
 2809 
 2810         * src/grep.1: Fix `Last Change' of output by generating the date
 2811         from the RCS Id.
 2812 
 2813         * src/grep.c (is_EISDIR): New macro.
 2814         (grep): If -s, suppress errors from trying to read directories.
 2815         (grepfile): Use is_EISDIR to simplify code.
 2816         (grepdir): If -s, suppress errors from trying to read directories.
 2817 
 2818         * src/grep.1: Fix -q -r -s problems; describe BSD grep better.
 2819 
 2820         * src/grep.c (main): Update copyright.
 2821 
 2822         Specify default matcher with default_matcher extern var, not
 2823         DEFAULT_MATCHER macro.  This is more straightforward and means
 2824         we need to compile grep.c just once.
 2825 
 2826         * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files.
 2827 
 2828         * src/Makefile.am (base_sources): New macro.
 2829         (egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of
 2830         $(base_sources) plus the single tailoring file.
 2831         (grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove.
 2832         (EXTRA_DIST): Remove grep.c, regex.c.
 2833         (fgrep.o, egrep.o): Remove.
 2834 
 2835         * src/grep.h (matcher): Now char const *.
 2836         (default_matcher): New decl.
 2837 
 2838         * src/grep.c (matcher): Now char const *.
 2839         (setmatcher): Now accepts char const *.
 2840         (main): Default the matcher from default_matcher (linked externally)
 2841         rather than DEFAULT_MATCHER (a macro).
 2842 
 2843 1998-11-08 Alain Magloire
 2844 
 2845         * src/grep.1: `prep.ai.mit.edu' should be replaced with `gnu.org'.
 2846         Nit from Paul Eggert.
 2847 
 2848 1998-11-06 Alain Magloire
 2849 
 2850         * src/grep.c: The Matcher is not set to argv[0] but
 2851         explicitly by a #define MATCHER at compile time default is "grep".
 2852 
 2853         * aclocal/: NEW dir. provides our own *.m4
 2854 
 2855         * configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4)
 2856         Taken from Jim Meyering fileutils.
 2857 
 2858 1998-11-05 Alain Magloire
 2859 
 2860         * src/grep.1: update the man pages according to the
 2861         changes make by Miles.
 2862 
 2863         * po/*.po: updated.
 2864 
 2865         * first beta release for 2.3 (2.2a).
 2866 
 2867 1998-11-04 Miles Bader
 2868 
 2869         * src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B
 2870         options, and allow -C to have an optional argument. -NUM can
 2871         now be mixed with -C, and -A, -B always take precedence over
 2872         -C/-NUM, regardless of order.
 2873         (long_options): Let -C/--context take an optional argument.
 2874 
 2875 1998-11-03 Alain Magloire
 2876 
 2877         * src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h>
 2878         #undef if defined.
 2879         Fixed by Andreas Ley and Philippe Defert.
 2880 
 2881         * src/grep.1 : mention that -s follows POSIX.2 behavior.
 2882         Noted by Paul Eggert and others.
 2883 
 2884         * tests/khadafy.sh: a typo in failure(s).
 2885         Spotted By Sotiris Vassilopoulos.
 2886 
 2887 1998-11-01  Paul Eggert
 2888 
 2889         * src/system.h (IN_CTYPE_DOMAIN): New macro.
 2890         (ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE,
 2891         ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use
 2892         IN_CTYPE_DOMAIN instead of isascii.
 2893 
 2894 1998-08-18  Paul Eggert
 2895 
 2896         Add support for new -r or --recursive (or -d recurse or
 2897         --directories=recurse) option.
 2898 
 2899         * src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c.
 2900 
 2901         * src/grep.1: Describe new options.
 2902 
 2903         * src/grep.c: Include "savedir.h".
 2904         (long_options): Add -r or --recursive.
 2905         (RECURSE_DIRECTORIES): New enum value.
 2906         (IS_DIRECTORY_ERRNO): Remove.
 2907         (reset, grep): Add file name arg.
 2908         (grepdir, grepfile): New functions.
 2909         (initial_bufoffset): New var.
 2910         (reset): Initialize it.
 2911         (fillbuf): Use it.
 2912         (count_matches, list_files, no_filenames, suppress_errors): New static
 2913         vars; formerly were local to `main'.
 2914         (grep): Recurse through directories if the user asks for this.
 2915         (usage, main): Add new options.
 2916         (main): Change some local vars to be static, as described above.
 2917         Move most of the guts into grepfile function.
 2918         so that it can be recursed through.
 2919 
 2920         * configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add.
 2921         (AC_REPLACE_FUNCS): Add stpcpy.
 2922 
 2923         * src/savedir.c, src/savedir.h, src/stpcpy.c: New files;
 2924         taken from fileutils 3.16u.
 2925 
 2926 1998-08-11  Paul Eggert
 2927 
 2928         * src/system.h (initialize_main): New macro.
 2929         * src/grep.c (main): Invoke initialize_main first thing.
 2930 
 2931 1998-04-29  Paul Eggert
 2932 
 2933         * NEWS, src/grep.1: Describe new -a and -d options.
 2934 
 2935         * src/grep.c (long_options, usage, main):
 2936         New options -d or --directories and -a or --text.
 2937         (directories, always_text): New variables.
 2938         (IS_DIRECTORY_ERRNO): New macro.
 2939         (reset): Now returns value specifying whether to skip this file.
 2940         Stat the file if either mmap or directory-skipping is possible.
 2941         Skip the file if it's a directory and we're skipping directories.
 2942         (grep): Skip the file if `reset' tells us to.
 2943         (main): If open fails because the file is a directory, and if we're
 2944         skipping directories, don't report an error.
 2945         Remove special case for DOS and Windows.
 2946 
 2947         * src/dosbuf.c (guess_type): Use the same method for guessing whether a
 2948         file is binary as grep.c's grep does.
 2949         There's no longer any need to declare `bp' to be unsigned.
 2950 
 2951 1998-04-26 Alain Magloire
 2952 
 2953         * grep-2.2 release.
 2954 
 2955         * src/dfa.c: Wrong revision was pulled out
 2956         for beta 2.1.1d.
 2957         * src/search.c: Wrong revision was pulled out
 2958         for beta 2.1.1d.
 2959 
 2960         * src/grep.c: ck_atoi () added instead of atoi ().
 2961         Suggestion from Jim Meyering.
 2962         ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert.
 2963 
 2964         * AUTHORS: Rephrase of some sentences.
 2965         * README:  Rewording.
 2966         Noted and patched by Joel N. Weber II.
 2967 
 2968 1998-04-17 Kaveh R. Ghazi
 2969 
 2970         * src/dfa.h: Don't define `const', trust autoconf to handle it.
 2971 
 2972 1998-04-16 Alain Magloire
 2973 
 2974         * tests/{status,empty}.sh: wrong return status.
 2975 
 2976         * src/grep.c: Remove the REGEX part in usage (), it was
 2977         consider overkill by most.
 2978 
 2979 1998-04-14  Eli Zaretskii
 2980 
 2981         * djgpp/config.bat: Support file names with multiple dots on all
 2982         platforms.
 2983 
 2984         * djgpp/README: Add instructions about file names illegal on
 2985         MS-DOS.
 2986 
 2987 1998-04-13 Alain Magloire
 2988 
 2989         * src/dfa.c: by "popular" demand reverse
 2990         back to '_' not word-constituent.
 2991 
 2992         * grep-2.1.1c available for testing.
 2993 
 2994 1998-04-13  Karl Heuer
 2995 
 2996         * src/grep.c: (a) The directory check is done too early:
 2997         logically, if the argument is "-", then it refers to standard
 2998         input, regardless of whether there's something in the file
 2999         system answering to "-".
 3000         (b) The sh command "grep -l root /etc/passwd /etc/group 0<&-"
 3001         prints "(standard input)" instead of "/etc/passwd", because it
 3002         mistakenly believes that a named file will never be opened on fd
 3003         0.  The string "(standard input)" should be based on the file
 3004         having been originally specified as "-", rather than making
 3005         assumptions about the fd.
 3006         (c) the code that calls close(fd) is being done outside of the
 3007         test for a bad fd.  Thus, if the open failed, this code will
 3008         attempt to close(-1).  It should be done inside the "fd != -1"
 3009         branch.
 3010         This patch addresses all three of these problems.
 3011 
 3012 1998-04-13 Alain Magloire
 3013 
 3014         * configure.in: remove the deprecated AC_ISC_POSIX macro.
 3015         Spotted by Karl Heuer.
 3016 
 3017 1998-04-03  Eli Zaretskii
 3018 
 3019         * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the
 3020         relevant Makefile.in files.
 3021 
 3022         * djgpp/config.bat: Create files in intl directory like the
 3023         configure script does.
 3024 
 3025 1998-03-28  Eli Zaretskii
 3026 
 3027         * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track
 3028         changes in respective Makefile.in files.
 3029 
 3030         * src/dosbuf.c (guess_type): Avoid running off the end of the
 3031         buffer.  Spotted by Paul Eggert.
 3032 
 3033 1998-03-27  Alain Magloire
 3034 
 3035         * grep-2.1.1b.tar.gz available.
 3036 
 3037         * src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6
 3038         when WCTYPE and WCHAR are not defined. When class names
 3039         where bigger then 6, it will not detect an error.
 3040         example '[[:alphabet:]]'.
 3041 
 3042         * Updated the copyright of the files with emacs.
 3043         With emacs Jim :).
 3044 
 3045 1998-03-26 Jim Meyering
 3046 
 3047         * src/dfa.c (IS_WORD_CONSTITUENT): Define.
 3048         (lex): Use IS_WORD_CONSTITUENT, not ISALNUM.
 3049         Don't special-case '_'.
 3050         (dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM.
 3051         (dfaexec): Likewise.
 3052 
 3053 1998-03-25  Alain Magloire
 3054 
 3055         * tests/warning.sh: typos and replace the echos with
 3056         a simple cat.
 3057         Noted By Jim Meyering.
 3058 
 3059         * src/regex.c: #undef ISASCII and ISPRINT before defining
 3060         them(On Solaris it was define).
 3061         Pattern 'a[[:]:]]b' is an invalid char class and the error
 3062         from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE).
 3063         Fix with help from Ulrich Drepper.
 3064 
 3065         * src/grep.c (usage): Ulrich wrote: "A single printf should
 3066         not have more than 900 bytes. For translation reasons the
 3067         text shouldn't be split in too many pieces since this is
 3068         tiresome and also does not help to generate a consistent picture."
 3069         Noted by Ulrich Drepper.
 3070         * src/grep.c (usage): Dig out and old patch from
 3071         Franc,ois to explain the regex in usage().
 3072         Ideas from Franc,ois Pinard.
 3073 
 3074 1998-03-23 Alain Magloire
 3075 
 3076         * testing: grep-2.1.1a for testing.
 3077 
 3078         * configure.in: Solaris needs '-lw' if we use wchar/wctype
 3079         functions.
 3080         * src/btowc.c: New file from GNU libc. Solaris 2.5 don't
 3081         have it define.
 3082         * configure.in : check for btowc ().
 3083 
 3084         * regex.c: Include <wchar.h> before <wctype.h>, to work around
 3085         a Solaris 2.5 bug.
 3086         Patch provided by Paul Eggert.
 3087 
 3088         * tests/status.sh: new file to check return status code.
 3089         * tests/empty.sh: new file to check for empty pattern.
 3090         * tests/warning.sh: new file to tell where to report errors.
 3091 
 3092         * configure.in: If available, prefer support for large files
 3093         unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS
 3094         variables.
 3095         Done by Paul Eggert.
 3096 
 3097         * src/grep.c (usage): change prep.ai.mit.edu for gnu.org.
 3098 
 3099 1998-03-18 Alain Magloire
 3100 
 3101         * src/grep.c (usage): Formating the --help message a bit off.
 3102         Noted by William Bader.
 3103 
 3104         * src/grep.c (main): When checking conflicting matcher for option -E the
 3105         matcher was to "egrep" instead of "posix-egrep".
 3106         Reported by kwzh@gnu.org.
 3107 
 3108         * src/grep.c: Typos and rewording the --help message.
 3109         Reported by Karl Heuer.
 3110 
 3111         * src/grep.1: The man page wording :
 3112           A regular expression matching a single character may be
 3113           followed by one of several repetition operators:
 3114         is unclear since 'x(yz)*z' is a valid regex.
 3115         Remove the "matching a single character".
 3116         Suggested by Harald Hanche-Olsen.
 3117 
 3118         * src/grep.c (main): `-f /dev/null' now specifies no patterns
 3119         and therfore matches nothing.
 3120         Reported by Jorge Stolfi.
 3121         Patched by Paul Eggert.
 3122 
 3123 1998-03-10 Alain Magloire
 3124 
 3125         * Ice storm 98(el nino). Lost grep repository disk,
 3126         and my $HOME directory, etc ..
 3127         Trying to get the emails/patch from dejanews.com
 3128         and start from grep-2.1.
 3129         sigh ....
 3130 
 3131 1997-11-01 Alain Magloire
 3132 
 3133         * src/grep.c: For the long options, the problems are:
 3134         --file appears in the option table as 'no_argument'
 3135         instead of 'required_argument'.
 3136         --files-with-matches is missing from the option table.
 3137         The help lists '--fixed-strings' as the long option for -F,
 3138         the table has '--fixed-regexp'.
 3139         --regexp appears in the option table as 'no_argument'
 3140         instead of 'required_argument'.
 3141         --with-filename is missing from the option table.
 3142         Reported by Grant McDorman and Krishna Sethuraman.
 3143 
 3144 1997-10-19 Alain Magloire
 3145 
 3146         * src/grep.c: the option "with-filename was not in the arg table.
 3147         Corrected by Jim Hand.
 3148 
 3149         * GNU gettext library from gettext-0.10.32.
 3150 
 3151         * src/grep.c: reverse back to greping directories,
 3152         One could skip the error message by defining
 3153         SKIP_DIR_ERROR. There is no clear way of doing
 3154         things, I hope to setle this on the next majore release
 3155         Thanks Paul Eggert, Eli Zaretskii and gnits for the
 3156         exchange.
 3157 
 3158         * tests/status.sh: add this check to make sure
 3159         That the return status code is ok.
 3160 
 3161 1997-10-10 Andreas Schwab
 3162 
 3163         * src/grep.1: Fix formatting.
 3164 
 3165         * configure.in: Check for wctype.h, wchar.h, libintl.h and
 3166         isascii, which are needed for regex.c.
 3167 
 3168 1997-10-01 Paul Eggert
 3169 
 3170         * src/grep.c (fillbuf): Don't warn about mmap failures.
 3171 
 3172 1997-09-7 Alain Magloire
 3173 
 3174         * src/grep.c: added code for -H --with-filename.
 3175 
 3176         * djgpp/*: patch wrongly apply
 3177         duplication of text in djgpp/{README,config.h}.
 3178         Filter djgpp/config.bat with unix2dos.
 3179 
 3180         * djgpp/make.mak: beautify
 3181         From Eli Zaretskii.
 3182 
 3183         * grep-2.1 release.
 3184 
 3185 1997-09-01 Alain Magloire
 3186 
 3187         * grep-2.0f out for testing.
 3188 
 3189         * update to GNU gettext library from gettext-0.10.31
 3190 
 3191         * grep.c : have a nicer format for --version.
 3192         Noted by Ulrich Drepper.
 3193 
 3194         * obstack.[ch]: updated from GNU C library
 3195         * configure.in: look for stdlib.h [HAVE_STDLIB_H]
 3196         Comments from Ulrich Drepper.
 3197 
 3198 1997-08-25 Philippe De Muyter  <phdm@info.ucl.ac.be>
 3199 
 3200         * src/dfa.c (sys/types.h): File included unconditionnaly.
 3201 
 3202 1997-08-16  Eli Zaretskii  <eliz@is.elta.co.il>
 3203 
 3204         * grep.c (long_options) [O_BINARY]: Add DOS-specific options.
 3205         (fillbuf) [O_BINARY]: For DOS-style text files, strip CR
 3206         characters at end of line.
 3207         (prline) [O_BINARY]: Report correct byte offsets, even though CR
 3208         characters were stripped when reading the file.
 3209         (usage) [O_BINARY]: Add DOS-specific options.
 3210         (setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the
 3211         matcher won't ever overflow the stack.
 3212         (main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters
 3213         in argv[0], remove the .exe suffix, and downcase the prgram name.
 3214         [O_BINARY]: Pass additional DOS-specific options to getopt_long
 3215         and handle them.  Call stat before attempting to open the file, in
 3216         case it is a directory (DOS will fail the open call for
 3217         directories).  Switch the input descriptor to binary mode, unless
 3218         it is a terminal device.
 3219 
 3220         * system.h [O_BINARY]: Define macros to switch a handle to binary
 3221         mode, so binary files could be grep'ed on MS-DOS and MS-Windows.
 3222         [HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of
 3223         HAVE_LC_MESSAGES, to prevent compilation error in grep.c on
 3224         systems which don't define HAVE_LC_MESSAGES, but have setlocale.
 3225 
 3226         * dosbuf.c: New file, functions specific for MS-DOS/MS-Windows.
 3227         (guess_type, undossify_input, dossified_pos): New functions.
 3228 
 3229         * djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak,
 3230         djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed:
 3231         New files, for building Grep with DJGPP tools for MS-DOS and
 3232         MS-Windows.
 3233 
 3234         * grep.1: Document DOS-specific switches.
 3235 
 3236 1997-08-08 Alain Magloire
 3237 
 3238         * grep-2.0e: available for testing
 3239 
 3240         * grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE).
 3241         Suggested by Jochen Hein.
 3242 
 3243         * ABOUT-NLS: updated.
 3244         * grep.c: --version: more verbosity (COPYRIGHT).
 3245         * grep.c: --help: PATTERN, FILE instead of <pattern>, <file>.
 3246         * INSTALL.grep: not necessary removed.
 3247         * configure.in: --disable-regex rename --without-include-regex.
 3248         * THANKS: format: first row name, second email.
 3249         * ChangeLog: format ISO 8601.
 3250         Reported by Franc,ois Pinard.
 3251 
 3252         * grep.c: move dcl of struct stat st into "else" where it's used.
 3253         Reported by Jim Meyering.
 3254 
 3255         * grep.c: totalnl should be %u in printf.
 3256         Reported by Michael Aichlmay
 3257         Corrected with guidance from Ulrich Drepper
 3258 
 3259 1997-07-24 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3260 
 3261         * Makefile.am: corrected an error when installing {f,e}grep.1.
 3262         From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
 3263         From Ulrich Drepper <drepper@cygnus.com>.
 3264 
 3265         * Many files: use PARAMS instead of __STDC__ for prototypes.
 3266         From Jim Meyering <meyering@eng.ascend.com>.
 3267         Patch provided by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
 3268 
 3269         * dfa.[ch]: uses the one in gawk-3.0.3 with the patch from
 3270         Arnold (see Changelog: July 12 1997)
 3271 
 3272         * grep.1: a note to say -l, -L, -q stop on first match.
 3273         Noted by Andrew Beattie <gaffer@tug.com>.
 3274 
 3275         * grep.c: refuse to scan if the file is a directory.
 3276         This was causing problems on SUNs. If the directory contains
 3277         a file that could match the pattern, garbage was display.
 3278 
 3279         * tests directory: added new set of tests from Henry Spencer
 3280         regex package. Change the way the tests were done to be more
 3281         conformant to automake.
 3282 
 3283         * configure.in: added --disable-regex for folks with their own fuctions.
 3284 
 3285         * grep-20d : available for testing
 3286 
 3287 1997-07-18 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3288 
 3289         * grep-2.0c: available for testing
 3290 
 3291 1997-07-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3292 
 3293         * src/grep.c: Cause grep to fail if `fclose (stdout)' fails.
 3294         From Jim Meyering <meyering@eng.ascend.com>.
 3295 
 3296         * grep.c:usage() more consistency in the --help.
 3297 
 3298         * egrep, fgrep were links This is in violation of GNU standards:
 3299         "Please don't make the behavior of a utility depend on the name used
 3300         to invoke it.  It is useful sometimes to make a link to a utility with
 3301         a different name, and that should not change what it does."
 3302         For now egrep and fgrep will be copies of grep. A better scheme
 3303         should be found later.
 3304         After discussion with Tom Tromey <tromey@cygnus.com>.
 3305 
 3306         * fgrep.man and egrep.man included: They are stubs that call grep.1.
 3307         * Makefile.am: modified to install {f,e,}grep[,.1].
 3308 
 3309         * speed hack for -l, -L: bail out on first match.
 3310         From Scott Weikart <scott@igc.apc.org>.
 3311 
 3312         * *.[ch]: provided prototypes for strict argument checking
 3313         With the help of Stewart Levin <stew@sep.stanford.edu>.
 3314 
 3315 1997-07-16 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3316 
 3317         * configure.in: typo in the creation of po/Makefile
 3318         Noted by Volker Borchert bt@teknon.de.
 3319 
 3320         * grep-2.0b: make it available for testing.
 3321 
 3322 1997-07-15 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3323 
 3324         * src/grep.c usage(): cut the --help in smaller printf()'s
 3325         Noted by Ulrich Drepper <drepper@cygnus.com>.
 3326 
 3327 1997-07-14 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3328 
 3329         * grep-2.0a: make an alpha available for testing.
 3330 
 3331 1997-07-12 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3332 
 3333         * run gettextize: added the po directory filled with *.po files.
 3334 
 3335         * check.sh, scriptgen.awk: fix grep paths.
 3336 
 3337         * change the directory strucure: grep is now in src to comply with
 3338         gettext.m4.
 3339 
 3340         * grep.c version.c [VERSION]: got rid of version.c,
 3341         it is now define via config.h.
 3342 
 3343         * dfa.c: patch to speed up initialization.
 3344         Arnold Robbins (arnold@gnu.ai.mit.edu).
 3345 
 3346 1997-07-09 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3347 
 3348         * *.c [HAVE_CONFIG_H]: Macro defined.
 3349 
 3350         * support for I18N in Makefile.am and configure.in.
 3351 
 3352         * update all the string to use gettext(I18N).
 3353         Help from Franc,ois Pinard previous patch <pinard@IRO.UMontreal.CA>.
 3354 
 3355 1997-07-04 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3356 
 3357         * obstack.[ch]: updated from glibc.
 3358         Work of Ulrich Drepper <drepper@cygnus.com>.
 3359 
 3360         * regex.[ch]: updated from glibc.
 3361         Work of Ulrich Drepper <drepper@cygnus.com>.
 3362 
 3363         * grep.c: for option -e not counting '\n' for new keys.
 3364         From Mark Waite <markw@mddmew.fc.hp.com>.
 3365 
 3366         * grep.c: for option -f allocating the right count.
 3367         From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
 3368         Mike Heartel (mike@cs.uoregon.edu).
 3369 
 3370         * kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing.
 3371         From Jim Meyering <meyering@asic.sc.ti.com>.
 3372 
 3373         * grep.1: various typos.
 3374         From Keith Bostic <bostic@bsdi.com>.
 3375         Mike Heartel (mike@cs.uoregon.edu).
 3376 
 3377 1997-06-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3378 
 3379         * grep.c: support for long options.
 3380         patch done by Franc,ois Pinard <pinard@IRO.UMontreal.CA>.
 3381 
 3382         * add getopt1.c in Makefile.am.
 3383         Noted by Franc,ois Pinard <pinard@IRO.UMontreal.CA>
 3384 
 3385         * replace getopt.[ch] and add getopt1.c.
 3386 
 3387         * kwset.c: undef malloc before define it.
 3388         Franc,ois Pinard <pinard@IRO.UMontreal.CA>.
 3389 
 3390 1997-06-07 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
 3391 
 3392         * grep.c: format incorrect in
 3393         fprintf("%s: warning: %s: %s...", filename, strerror(errno)).
 3394         Mike Heartel (mike@cs.uoregon.edu).
 3395 
 3396 1996-11-19  David J MacKenzie  <djm@catapult.va.pubnix.com>
 3397 
 3398         * make.com: Set the logical SYS. From rdb@cocamrd.oz.au (Rodney Brown).
 3399 
 3400         * grep.c (S_ISREG): Define if not defined already, for e.g.
 3401         SunOS 4.0.3.
 3402 
 3403         * dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit,
 3404         setbit, clrbit to avoid conflict with HP-UX sys/param.h macros.
 3405 
 3406         * memchr.c: New file, from GNU libc.
 3407         * grep.c (memchr): Remove definition.
 3408         * configure.in: Use AC_REPLACE_FUNCS for memchr.
 3409 
 3410         * configure.in: Remove unused checks for memalign and unsigned char.
 3411         * grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP.
 3412 
 3413         * system.h: New file.
 3414         * dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating
 3415         portability boilerplate.
 3416 
 3417         * grep.c: Include sys/types.h once, instead of three times
 3418         conditionally.
 3419         * dfa.c, kwset.c, search.c: Include sys/types.h unconditionally,
 3420         to always try to get size_t (needed on some old SysV's).
 3421 
 3422         * dfa.c: Define strchr in terms of index, not the other way around.
 3423         * search.c: Use memcpy instead of bcopy.
 3424 
 3425 1996-11-15  David J MacKenzie  <djm@catapult.va.pubnix.com>
 3426 
 3427         * Many files: Update FSF address.
 3428         Update configuration to use autoconf v2 and automake.
 3429 
 3430 1993-05-22  Mike Haertel  <mike@cs.uoregon.edu>
 3431 
 3432         * Version 2.0 released.
 3433 
 3434 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
 3435 2008, 2009 Free Software Foundation, Inc.
 3436 Copying and distribution of this file, with or without modification,
 3437   are permitted provided the copyright notice and this notice are preserved.