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