HAMMER 61F2/Many: Fix bug in last commit
[dragonfly.git] / gnu / usr.bin / grep / ChangeLog
blob1e279c347da0372131b5c1422d6b09b72ed235d8
1 2000-01-28  Alain Magloire
3         * src/grep.c (usage):  The example "%s -i 'hello.*world' could
4         lead to confusion when progname is 'fgrep.
5         Noted by Akim Demaille.
7         * configure.in: Reenable, jm_INCLUDE_REGEX() since we now
8         track GNU lib C.
9         * src/Makefile.am: EXTRA_DIST new macros with regex.c regex.h. 
10         Requested By Ulrich Drepper.
11   
12 2000-01-25  Paul Eggert
14         * src/grep.c (grep): If the final byte of an input file is not
15         a newline, grep now silently supplies one.
16         * doc/grep.texi, NEWS: Likewise.  
18 2000-01-25  Paul Eggert
20         * NEWS, doc/grep.1, doc/grep.texi: Add -I option.
21         * src/grep.c (short_options, usage, main): Likewise.
23         * doc/grep.texi: Fix some incorrect references to ASCII.
25 2000-01-25  Paul Eggert
27         * doc/grep.1: Simplify synopsis; sort options; mention
28         environment variables; clean up some minor gaffes.
30 2000-01-25  Paul Eggert
32         * doc/grep.texi:
33         Fix some errors in description of [:print:] and the like.
35 2000-01-23  Paul Eggert
37         * src/dfa.c (FETCH, lex): Put brackets around if-body to avoid
38         GCC warning about ambiguous if-then-else.
40 2000-01-23  Paul Eggert
42         * src/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits.
43         * src/dfa.c (ISASCIIDIGIT): New macro.
44         (lex): Use it instead of ISDIGIT.
46 2000-01-23  Paul Eggert
48         The bug is that regular expression ranges like [a-z] compare raw
49         byte codes to the range boundaries, whereas POSIX says that they
50         should use the current collating sequence instead.  For example,
51         in Solaris 7 with LC_ALL=en_US, the command
52         echo x | grep '[ -~]'
53         outputs 'x', but it shouldn't output anything since ' ' and '~'
54         sort before all letters in that locale.
56         * src/regex.c (compile_range): When matching a character
57         range, use the current collating sequence, as POSIX requires.
58         * src/dfa.c (lex): Likewise.
60 2000-01-20  Alain Magloire
62         * tests/Makefile.am (dist-hook): Added new rule to make sure
63         that the shell scripts have the right permissions.
64         * src/posix/Makefile.am (EXTRA_DIST): added regex.h in the
65         distribution.
66         * THANKS: updated.
68 2000-01-18  Alain Magloire
70         * Rectification the initial patch to add --binary-file option
71         was done by Ruslan Ermilov.
73 2000-01-17  Paul Eggert
75         Sync with sources of fileutils 4.0n, tar 1.13.17, glibc 2.1.3a1.
76         Convert to ANSI C prototypes (using ansi2knr for backwards
77         compatibility), as this makes it easier to sync.
79         * configure.in (AC_OBJEXT): Spell in a funny way, to work around
80         a bug in automake 1.4 with ansi2knr.
81         (LIBOBJS): Add assignment so that .o files in LIBOBJS are also built
82         via the ANSI2KNR-filtering rules.
83         (AC_OUTPUT): Add src/posix/Makefile.
84         * src/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
85         (SUBDIRS): New macro.
86         * src/ansi2knr.1, src/ansi2knr.c, src/posix/Makefile.am: New files.
87         * src/dfa.c, src/dosbuf.c, src/grep.c, src/kwset.c, src/search.c,
88         src/vms_fab.c:
89         Use prototypes for function definitions.
90         * src/grep.c (main): Use int counter for default context,
91         fixing an ANSI portability bug uncovered by the above changes.
93         * config.guess, config.sub, install-sh, missing, src/alloca.c,
94         src/getpagesize.h, src/memchr.c, src/savedir.c, src/savedir.h,
95         src/stpcpy.c:
96         Upgrade to latest version from fileutils 4.0n.
98         * src/getopt.c, src/getopt.h, src/getopt1.c: Upgrade to latest
99         version from tar 1.13.17.
101         * src/obstack.c, src/obstack.h, src/regex.c, src/regex.h:
102         Upgrade to glibc 2.1.3 alpha 1, with K&R C portability fix.
103         * src/posix/regex.h: New file, from glibc 2.1.3 alpha 1.
105 2000-01-04  Paul Eggert
107         Inititial patch from David O'Brien.
109         Add --binary-files option.
110         * NEWS, doc/grep.1, doc/grep.texi: Document it.
111         * src/grep.c (BINARY_FILES_OPTION): New constant.
112         (long_options, grep, usage, main): New --binary-files option.
113         (binary_files): New var.
114         * src/system.h (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, CHAR_MAX):
115         New macros.
116         (INT_MAX, UCHAR_MAX): Define in terms of TYPE_MAXIMUM.
118 2000-01-04  Paul Eggert
120         * savedir.c (savedir): Don't store past the end of an array if
121         name_size is zero and the directory is empty.
122         Reported by Dima Barsky <dima@pwd.hp.com>.
124 1999-11-18  Paul Eggert
126         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
127         problem with the QNX 4.25 shell, which doesn't propagate exit
128         status of failed commands inside shell assignments.
130 1999-11-13  Eli Zaretskii
132         * doc/grep.texi: Minor markup and spelling corrections.  Use
133         @noindent where appropriate.
135         * PATCHES-{AM,AC}: rename to PATCHES.{AM,AC}
137 1999-11-12  Eli Zaretskii
139         doc/grep.texi: Minor fixes and typos corrected.
140         djgpp/README: Updated version.
142 1999-11-07  Paul Eggert
144         * src/grep.c (usage): Fix misspelling.
146 1999-11-07  Paul Eggert
148         Don't assume that the C library has re_set_syntax and friends.
149         * src/Makefile.am (base_sources): Add regex.c, regex.h.
150         (EXTRA_DIST): Remove regex.c, regex.h.
152         * src/grep.c (prtext): Use out_quiet, not not_text, to decide
153         whether to set pending to zero at the end.
154         (not_text): Remove static variable, undoing latest change.
155         (grep): Likewise.
157         * doc/grep.texi: Tighten up the text, and fix some minor
158         spelling and usage errors.  Use @enumerate rather than @table
159         @samp, since it's better for Q&A format.  Add cross
160         references.
162 1999-11-01 Alain Magloire
164         * src/search.c: Use the more portable [[:alnum:]]
165         to define a word instead of Ascii dependent [0-9A-Za-z]
166         * src/grep.c: make not_text global to not display text when
167         the context switches -A/-B/-C are use on binary files.
168         * make grep-2.3g available for testing.
169         * configure.in: drop support for --without-included-regex.
170         This was generating bogus bug reports, since many GNU/Linux
171         users have different version of glibc.  And glibc maintainers
172         decided to drop k&r support.
174 1999-11-01 Arnold D. Robbins
176         * regex.c (init_syntax_once): move below definition of
177         ISALNUM etc., then use ISALNUM to init the table, so that
178         the word ops will work if i18n'ed.
179         (SYNTAX): And subscript with 0xFF for Latin-1 characters.
181 1999-10-26  Alain Magloire
183         * src/regex.c: Merge changes from GNU lib C.
184         * Updated the *.po files
186 1999-10-26  Paul Eggert
188         * src/grep.c (fillbuf): Don't report buffer size overflow if
189         newalloc == save and maxalloc == save.  This can happen
190         e.g. when reading a large page-aligned file that contains
191         no newlines.
193 1999-10-21  Paul Eggert
195         * src/grep.c (usage): Give example.  Clarify -F.
196         Explain exit status more clearly.
198 1999-10-12  Paul Eggert
200         * doc/grep.texi: Shorten the commentary about egrep and {.
201         "BSD grep" -> "traditional grep".
202         * doc/grep.1: Match recent changes to grep.texi.
204 1999-10-11  Paul Eggert
206         * NEWS, doc/grep.1, doc/grep.texi: New option --mmap.
207         * src/grep.c (mmap_option): New variable.
208         (long_options, reset, usage): Add --mmap.
209         Default is now read, not mmap.
211         * doc/grep.1: Document -Z or --null.
213 1999-10-11  Paul Eggert
215         * doc/grep.texi: Fix texinfo glitches.  POSIX -> POSIX.2 where
216         appropriate.
218 1999-10-11  Paul Eggert
220         * acconfig.h (ssize_t): New #undef.
222         * configure.in (AC_CHECK_TYPE): Add ssize_t.
224         * src/grep.c (PREFERRED_SAVE_FACTOR): New macro.
225         (reset): If the buffer has already been allocated, set bufsalloc to
226         be bufalloc / PREFERRED_SAVE_FACTOR.  This avoids problems when
227         bufsalloc == bufalloc (possible after reading a large binary file).
228         (reset): Use PREFERRED_SAVE_FACTOR instead of magic constant.
229         Do not set bufbeg; nobody uses it.
230         Always set buflim.
231         Check for lseek error.
232         Use SEEK_CUR, not a magic constant.
233         (fillbuf): Return an error indication, not a count.
234         All callers changed.
235         Do not assume ssize_t fits in int.
236         Use PREFERRED_SAVE_FACTOR instead of magic constant.
237         Clean up mmap code.
238         Do not attempt to mmap zero bytes.
239         Check for lseek error.
240         Use SEEK_SET, not a magic constant.
241         Work correctly if read is interrupted.
242         (grepfile): Work correctly if open or close is interrupted.
244         * src/system.h (SEEK_SET, SEEK_CUR): New macros.
246 1999-10-02 Alain Magloire
248         * src/regex.[ch]: upgrade from GNU lib C source tree.
250         * make beta 2.3f available.
252 1999-10-02  Paul Eggert
254         * NEWS: egrep is now equivalent to `grep -E'.
255         The lower bound of an interval is not optional.
256         You can specify a matcher multiple types without error.
257         -u and -U are now allowed on non-DOS hosts, and have no effect.
258         * doc/grep.texi: Likewise.
259         * doc/grep.1: Likewise.
260         Fix some troff bugs that prevented `groff' from rendering the page.
262         * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher):
263         Remove.
264         (matcher): Add.
265         * src/grep.h (default_matcher): Remove.
266         (matcher): Now exported from ?grepmat.c, not grep.c.
268         * src/dfa.c (lex): If { would start an invalid interval specification,
269         treat it as a normal character.
270         Remove (broken) support for {,M} meaning {0,M}.
271         Diagnose bogus intervals like {1,0}.
272         (closure): maxrep is now -1 to indicate no limit, not zero;
273         zero is a valid value for maxrep, meaning an upper bound of zero.
275         * src/grep.c (short_options): New constant.
276         (long_options, main): -u and -U are now supported on Unix,
277         with no effect.
278         (matcher): Removed; now defined by ?grepmat.c.
279         (install_matcher): Renamed from setmatcher.
280         (setmatcher): New function.
281         (usage): Report new, more uniform option scheme.
282         (main): Do not initialize matcher; ?grepmat.c now does this.
283         Rely on setmatcher to catch matcher conflicts.
284         Default matcher is "grep".
286         * src/search.c (matchers):
287         Remove "posix-egrep" matcher; no longer needed.
288         (Ecompile): Likewise.
289         The egrep matcher now has POSIX behavior.
291         * tests/bre.tests: grep '\{' is no longer an error.
292         Fix test for interval too large, and enable it.
293         * tests/ere.tests: grep -E {1 is no longer an error
294         Likewise for a{1, a{1a, a{1a}, a{1,x}.
296 1999-09-22  Paul Eggert
298         * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
299         2.95.1 bug with HP-UX 10.20.
301 1999-09-12  Paul Eggert
303         * src/grep.c (fillbuf): Fix typo: we sometimes reported
304         arithmetic overflow even when there wasn't any.
306 1999-09-12  Paul Eggert
308         * configure.in (AC_CHECK_FUNCS): Add memmove.
310         * src/system.h (S_ISREG): New macro.
311         (memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove,
312         not if !defined STDC_HEADERS.  This is needed for SunOS 4.1.4,
313         which defines STDC_HEADERS but lacks memmove.
315         * src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP.
316         (reset): Always fstat the file, since we always need its size if it is
317         regular.
318         Similarly, get the buffer offset of every regular file.
319         Set bufmapped to 0 if the file's initial offset is not a multiple
320         of the page size.
321         (fillbuf): Calculate an upper bound on how much memory we should
322         allocate only for regular files, since we don't know the sizes of
323         other files.
324         Don't bother to check whether the file offset is a multiple of the page
325         size, since we now do that just once in `reset'.
326         When an mmapped area would fall past the end of the file, trim it to
327         just before instead of giving up immediately and doing a `read';
328         that avoids a worst-case behavior that could read half an mmapped file.
329         Fix bug when computing offsets on hosts that don't have mmap.
331 1999-08-27  Paul Eggert
333         * src/system.h (memmove): New macro.
335         * src/grep.c (page_alloc): Reallocate the old buffer instead
336         of having both old and new buffers active simultaneously.
337         Remove valloc debugging variant, which no longer applies.
339         (fillbuf): Rejigger the buffer allocation mechanism.  The old
340         mechanism could allocate more than 10*N bytes for an N-byte
341         file, which was excessive.  Check for arithmetic overflow a
342         bit more carefully.
344 1999-08-25  Paul Eggert
346         * src/grep.c (grepdir):
347         Don't assume that st_ino and st_dev must be integers;
348         POSIX.1 allows them to be floating-point (!).
350         * src/vms_fab.h (arr_ptr): `:' -> `;' to fix typo.
352 1999-08-18  Alain Magloire
354         * 2.3e snapshot.
356 1999-08-18  Alain Magloire
358         * src/search.c: On a CRAY J90 system running UNICOS 8.0.
359         Compilation of ./src/search.c failed because the declaration of
360         the variable "regex":
361           static struct re_pattern_buffer regex;
362         conflicted with a previous declaration search.c #includes "system.h",
363         which #includes <stdlib.h>, which declares :
364         extern char *regex __((char *_Re, char *_Subject, ...));
365         The declaration in search.c is local to that one source file.
366         I just changed its name to something less likely to conflict.
367         (I called it "regexbuf", but you could pick any name you want.)
368         Excerpt email from Dean Kopesky.
370 1999-08-16  Paul Eggert
372         Upgrade large-file support to the version used in tar and
373         textutils.
375         * Makefile.am (ACLOCAL_AMFLAGS): Define to be empty.
376         (M4DIR, ACINCLUDE_INPUTS): New macros.
377         ($(srcdir)/acinclude.m4): New rule.
379         * configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add.
380         (AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility
381         with what should appear in the next autoconf release.
383         * m4/largefile.m4: Renamed from m4/lfs.m4.
385         * src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub:
386         New files.  config.guess and config.sub ar needed by the new
387         AC_SYS_LARGEFILE.  ansi2knr is needed by AM_C_PROTOTYPES,
388         which in turn is needed by the new AC_SYS_LARGEFILE.
390 1999-08-16  Alain Magloire
392         * 2.3d snapshot on ftp server.
394 1999-07-26  Paul Eggert
396 Several GNU tools have options to process arbitrary file names, even
397 file names that contain newline characters.  These include `find
398 -print0', `perl -0', `sort -z', and `xargs -0'.  It'd be handy if GNU
399 grep also processed such file names.  Here's a proposed patch to do
400 this, relative to grep 2.3c.  This patch introduces two options, one
401 for the data, and one for the file names.  (Sometimes one wants
402 null-terminated file names in the output, and sometimes one wants to
403 process lists of null-terminated strings, and these are orthogonal
404 axes.)
406         * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options.
407         * src/grep.c (long_options, usage, main): Likewise.
409         * src/dfa.h (dfasyntax): New eol parameter.
410         * src/dfa.c (eolbyte): New var.
411         (dfasyntax): Set it from new parameter.
412         (lex, dfastat, build_state, dfaexec): Use it instead of '\n'.
414         * src/grep.h (eolbyte): New decl.
415         * src/grep.c (eolbyte): New var.
416         (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'.
417         (filename_mask): New var.
418         (prline, grepfile): Output NUL separator if filename_mask is zero.
419         (grep): Look for '\200' as the hallmark of a binary file, not '\0',
420         if -z or --null-data is specified, since it implies that '\0' is
421         expected as text.
423         * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax.
424         (EGexecute, Fexecute): Use eolbyte instead of '\n'.
426 1999-06-15 Alain Magloire
428         * src/grep.c, doc/grep{1,texi} :
429         --revert-match should be --invert-match.
430         Correction proposed by Karl Berry.
432 1999-06-12 Alain Magloire
434         * doc/grep.{1,texi}: add description for --with-filename.
435         Noted missing by UEBAYASHI Masao.
437 1999-03-17 Paul Eggert
439         * NEWS: Add GREP_OPTIONS.
441         * doc/grep.texi: Document GREP_OPTIONS, and the other
442         environment variables.  Fix doc for [:blank:], [:cntrl:], [:punct:].
444         * src/grep.c (prepend_args, prepend_default_options): New functions.
445         (main): Use them to implement GREP_OPTIONS.
446         * src/system.h (getenv): New decl.
448 1999-03-16 Volker Borchert
450         * configure.in: Use case case ... esac for  checking Visual C++.
451         When ${CC} contains options it was not recognize.
453 1999-03-07 Paul Eggert
455         * src/grep.c (usage): Don't report -E, -F, and -G unless we're grep.
456         (main): Don't match options -E, -F, and -G unless we're grep.
457         Remove after-the-fact check for options -E, -F, and -G, since
458         they're no longer needed.
460 1999-03-05  Eli Zaretskii
462         * src/grep.c (main): Print the name of the default matcher instead
463         of just "grep".
465 1999-02-06 Alain Magloire
467         * tests/*.awk : Linux users are seeing "Broken Pipe" on make check.
468         The problem is that grep does not drain its stdin, thus the previous
469         process in the pipeline receives a SIGPIPE.  Other shells are silent
470         about this.  There is actually no failure, since the broken pipe is
471         expected.  You can work around it by changing the pipeline, so that
472         the input is drained, like this:
473         status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1;
474         echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi
475         Excerpt email from Andreas Schwab.
477 1999-02-23 Alain Magloire
479         * src/grep.c : Restrict the use of -E, -F, -G
480         to only grep driver, Posix behaviour. {f,e}grep
481         the matcher is already set. This change may brake
482         scripts, warn in NEWS.
484         * doc/grep.{1,texi} : -C takes arguments, upgrade manual.
486         * beta 2.3a
488 1999-02-23 Alain Magloire
490         * configure.in : Change the configure VC test from
491         'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;'
492         Email from Joshua R. Poulson.
494 1999-02-23 Paul Eggert
496         Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL.
497         The btowc.c shipped with grep 2.3 is incorrect for Solaris
498         2.5.1 and earlier, as it assumes UTF8, which these OSes do not
499         support.  Solaris 7 supports btowc, so there's no need to ship
500         a substitute for it.  The only questionable case is Solaris
501         2.6, which lacks btowc but does support UTF8.  However, 2.6
502         supports UTF8 but only as a demonstration (for an English
503         locale!); Japanese Solaris 2.6 users typically use EUC, or
504         sometimes shift-JIS, but they cannot use UTF8 since Japanese
505         UTF8 is not supported.  Hence there's no point to having grep
506         substitute a btowc that uses UTF8, as it is either redundant,
507         or it will almost invariably have incorrect behavior.
509         * configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR.
510         (AC_CHECK_FUNCS): Add btowc, wctype.
511         (AC_REPLACE_FUNCS): Don't replace btowc; our replacement is
512         invariably doing the wrong thing anyway, at least on SunOS/Solaris.
513         Don't bother to check for wctype in -lw, as we don't support
514         wide characters on Solaris 2.5.1 or earlier anyway.
516         * bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT).
518         * src/btowc.c: Removed; no longer needed.
520 1999-02-19  Paul Eggert
522         * NEWS: Fix typo when talking about the old behavior of
523         silently skipping directories; it was grep 2.1, not grep 2.2.
525 1999-02-15 Alain Magloire
527         * bootstrap/Makefile.try : add DJGPP DEFS.
528         Done by Elie Zaretsckii.
530 1999-02-14 Alain Magloire
532         * m4/gettext.m4 : Guard [] with changequote.
533         From Elie Zaretskii.
535         * djgpp/config.bat : Makefile.in.in --> Makefile.in-in
536         From Elie Zaretskii.
538         * src/dosbuf: k&r function parameter.
540         * release of 2.3.
542 1999-02-10 Alain Magloire
544         * bootstrap/{Makefile{try,am},REAMDE} : skeleton
545         provided for system lacking the tools to autoconfigure.
547         * src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H]
549 1999-02-10 Alain Magloire
551         * PATCHES-AC, PATCHES-AM: updated.
553         * m4/regex.m4 : updated.
555 1999-02-05 Eli Zaretskii
557         * m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file
558         names.
560         * aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the
561         latter prevents GCC from finding headers and libraries.
563         * djgpp/config.bat: Make building from another directory work
565         * djgpp/config.sed: Remove redundant command wich edited path
566         separator: now done by configure.
568         * src/grep.c [O_BINARY]: Add prototype for undossify_input.
570         * doc/grep.texi (Introduction): Typo fixed.
572 1999-02-03 Alain Magloire
574         * grep-2.2f beta release.
576 1999-02-02 Alain Magloire
578         * m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 :
579         New files to aid configuration and unload configure.in.
580         * m4/Makefile.am : updated.
581         * src/btowc.c : protect for wchar.h
583 1999-01-28 Alain Magloire
585         * intl/Makefile.in: Replace .o with .${ac_objext} where necessary.
586         Work around a limitation of Visual C++ on Cygwin32.
587         * acconfig.h configure.in: Define `alloca' as `_alloca' when CC=cl.
588         This little hack was suggested by Ian Roxborough <irox@cygnus.com>.
589         Patch forwarded by Ben Elliston.
591 1999-01-28 Alain Magloire
593         * PATCHES-AM: New file. A small patch for automake-1.4, use $(sep)
594         as the path separator base on @SEP@.
595         * PATCHES-AC configure.in : updated for autoconf-13.
597 1999-01-27 Volker Borchert
599         * grep.c: fgrep -NUM not working correctly.
600         add the argument number to digit_args_val.
602 1999-01-22 Paul Eggert
604         Prevent grep -r from recursing infinitely through directory loops via
605         symbolic links.
607         * grep.c (struct stats): New type.
608         (stats_base): New var.
609         (bufstat): Remove; subsumed by stats->stat.
610         (reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg,
611         for directory loop checking; use this instead of the bufstat global.
612         All callers changed.
613         (grepfile): Stat the file before invoking grepdir.
614         (grepdir): Assume that the argument has already been statted.
615         No longer a need for a directory size argument, since it
616         can be gotten from the struct stats * argument.
617         Check for directory loops.
618         Create linked list of directories currently being visited,
619         to detect loops.
621 1998-12-29 Kaveh R. Ghazi
623         intl/localealias.c: When building grep-2.2e using cc on Irix4,
624         I needed the following patch to intl/localealias.c.
625         (Its the same patch used by fileutils-4.0.) The patch resolves
626         conflicts between char* and unsigned char* in the i18n code.
628 1998-12-10 Alain Magloire
630         * src/grep.c : Typo in contex -->context
631         Noted by  Vladimir Michl.
633 1998-12-01  Alain Magloire
635         * doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am:
636         New files.
638         * m4/progtest.m4: proctect '[]' from m4.
639         Noted by Eli Z.
641         * PATCHES-AC: New file, add the patch for autoconf in the dist.
643         * acconfig.h: (HAVE_DOS_FILENAME)
645         * TODO: updated.
647         * src/search.c: remove obsolete 'gegrep,ggrep,gnugrep'
648         matchers. grep no longer depend on argv[0].
650         * grep-2.2e beta to test DJGPP port.
652 1998-11-28  Paul Eggert
654         Various portability enhancements:
655         - Don't assume that O_BINARY implies DOS.  Use separate
656         macros D_OK (for DOS-like directory access) and
657         HAVE_DOS_FILE_NAMES (for DOS-like file names).
658         - Don't assume that off_t fits into long; it doesn't on Solaris 2.6.
659         - Have is_EISDIR set errno properly on hosts with screwed-up EISDIR.
660         - Treat ':' specially in DOS file names only if it's the end of a
661         drive specifier.
662         - Protect against errno < 0.
664         * src/grep.c (is_EISDIR): Move defn to system.h.
665         (print_offset_sep): New function.
666         (fillbuf): Remove redundant test of O_BINARY.
667         (totalcc, totalnl): Now of type off_t.
668         (prline): Use print_offset_sep to print file offsets.
669         (grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility
670         on machines that don't work properly with EISDIR.
671         (grepdir): Don't assume ':' means slash on all DOS filenames;
672         it means it only in the file prefix.
674         * src/system.h (strerror): Check for negative error numbers.
675         (is_EISDIR): Depend on D_OK, not O_BINARY.
676         (SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__.
677         (IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES,
678         not O_BINARY.
679         (CHAR_BIT): New macro.
681         * src/dosbuf.c (struct dos_map):
682         pos and add members are now of type off_t.
683         (dos_stripped_crs): Now of type off_t.
684         (dossified_pos): Now accepts arg and returns value of type off_t.
686         * configure.in (AC_CHECK_FUNCS): Add setmode.
687         (HAVE_DOS_FILENAMES): New macro
689 1998-11-27  Eli Zaretskii
691         * djgpp/config.sed: New file, a Sed script to edit configure
692         script before running it on DOS/Windows.
693         * djgpp/config.bat: Updated to handle po2tbl.sed.in and
694         po/Makefile.in.in on DOS filesystems, and to run config.sed.
696 1998-11-24  Jim Meyering
698         * src/grep.c : Typo s/infalid/invalid/
699         Also noted by Stanislav Brabec.
701 1998-11-24  Eli Zaretskii
703         * doc/grep.texi: I found and corrected several typos.
704         I believe the GNU standards require the section that describes the
705         options to the programs to be called ``Invoking'' or ``Invoking
706         <program-name>''.  This is so users and programs can easily find
707         that node in any Info file.  So I changed the name of the
708         `Options' chapter to `Invoking', and corrected the
709         cross-references accordingly.
710         I added some markup to things like file names and options.
711         I added some additional index entries where that seemed useful.
712         I also corrected some index entries, such as "@cindex [:alnum:]",
713         which used a colon in them (the colons confuse Info readers).
715 1998-11-24  Alain Magloire
717         * grep/doc/grep.texi : -h is not use for help.
718         Nit spotted by Jim Meyering.
720 1998-11-23  Alain Magloire
722         * doc: New directory, grep.1, {e,f}grep.man move here
723         * doc/grep.texi: New info manual
724         * doc/version.texi: New
725         * doc/Makefile.am: New
726         * tests/{ere,bre}.*: New files. The spencer2 test is split
727         in two ere/bre.
728         * config.hin: New, config.h.in rename to config.hin for OS
729         with limited file system aka DOS.
731         * grep-2.2d release for beta.
733 1998-11-18  Alain Magloire
735         * src/regex.[ch] : Updated from GLibc, previous patches were
736         integrate by Ulrich Drepper and some added ones.
738 1998-11-16  Paul Eggert
740         * grep.h (__attribute__): New macro, if not GCC.
741         (fatal): Add __attribute__((noreturn)).
742         * grep.c (usage): Add __attribute__((noreturn)).
744 1998-11-16  Paul Eggert
746         Remove memory leak with valloced buffers, by invoking malloc instead.
748         * configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove.
749         * src/grep.c (page_alloc): New function.
750         (ubuffer, pagesize): New vars.
751         (ALIGN_TO): New macro.
752         (reset): Initialize new vars.  Check for overflow in buffer size calc.
753         Use page_alloc instead of valloc.
754         (fillbuf): Likewise.  Use memcpy to copy saved area.
756 1998-11-15  Paul Eggert
758         * dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned.
760 1998-11-14  Paul Eggert
762         * src/grep.c (grepdir): Fix bug: memory freed twice.
764         * src/search.c (Gcompile, Ecompile): Don't invoke dfainit,
765         since dfacomp does it for us, and if we also do it then we
766         leak memory.
768 1998-11-13  Eli Zaretskii
770         * djgpp/config.bat: Rewrite to run the configure script via Bash.
771         * djgpp/config.site, djgpp/getconf: New files.
772         * djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove.
773         * djgpp/README: Update instructions.
775         * Makefile.am (EXTRA_DIST): Update the list of DJGPP files.
777         * src/system.h (IS_SLASH): New macro.
778         (is_EISDIR): Define it here for DOS and Windows.
780         * src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the
781         EOL formats of the input and output files match, unless stdout is
782         the console device.
783         (is_EISDIR): Don't define if already defined.  Accept a second
784         argument, the file name; all callers changed.
785         (grepdir): Don't free `file', inside the loop.  Use IS_SLASH to
786         check whether `dir' needs a slash.
787         (grepfile): If file is a directory, set e to EISDIR.
789 1998-11-10  Alain Magloire
791         * src/vms_fab.{c,h}: New file for VMS wildcard expansion
792         Written by Phillip C. Brisco.
794         * vms/make.com : add line to compile vms_fab.c and
795         {e,f,}grepmat.c with link for each grep/fgrep/egrep.
796         Base on patch send by Phillib C. Brisco.
798 1998-11-09  Alain Magloire
800         * grep-2.2c on alpha for testing.
802 1998-11-09  Paul Eggert
804         * src/grep.1: Fix `Last Change' of output by generating the date
805         from the RCS Id.
807         * src/grep.c (is_EISDIR): New macro.
808         (grep): If -s, suppress errors from trying to read directories.
809         (grepfile): Use is_EISDIR to simplify code.
810         (grepdir): If -s, suppress errors from trying to read directories.
812         * src/grep.1: Fix -q -r -s problems; describe BSD grep better.
814         * src/grep.c (main): Update copyright.
816         Specify default matcher with default_matcher extern var, not
817         DEFAULT_MATCHER macro.  This is more straightforward and means
818         we need to compile grep.c just once.
820         * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files.
822         * src/Makefile.am (base_sources): New macro.
823         (egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of
824         $(base_sources) plus the single tailoring file.
825         (grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove.
826         (EXTRA_DIST): Remove grep.c, regex.c.
827         (fgrep.o, egrep.o): Remove.
829         * src/grep.h (matcher): Now char const *.
830         (default_matcher): New decl.
832         * src/grep.c (matcher): Now char const *.
833         (setmatcher): Now accepts char const *.
834         (main): Default the matcher from default_matcher (linked externally)
835         rather than DEFAULT_MATCHER (a macro).
837 1998-11-08 Alain Magloire
839         * src/grep.1: `prep.ai.mit.edu' should be replaced with `gnu.org'.
840         Nit from Paul Eggert.
842 1998-11-06 Alain Magloire
844         * src/grep.c: The Matcher is not set to argv[0] but
845         explicitly by a #define MATCHER at compile time default is "grep".
847         * aclocal/: NEW dir. provides our own *.m4
849         * configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4)
850         Taken from Jim Meyering fileutils.
852 1998-11-05 Alain Magloire
854         * src/grep.1: update the man pages according to the
855         changes make by Miles.
857         * po/*.po: updated.
859         * first beta release for 2.3 (2.2a).
861 1998-11-04 Miles Bader
863         * src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B
864         options, and allow -C to have an optional argument. -NUM can
865         now be mixed with -C, and -A, -B always take precedence over
866         -C/-NUM, regardless of order.
867         (long_options): Let -C/--context take an optional argument.
869 1998-11-03 Alain Magloire
871         * src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h>
872         #undef if defined.
873         Fixed by Andreas Ley and Philippe Defert.
875         * src/grep.1 : mention that -s follows POSIX.2 behavior.
876         Noted by Paul Eggert and others.
878         * tests/khadafy.sh: a typo in failure(s).
879         Spotted By Sotiris Vassilopoulos.
881 1998-11-01  Paul Eggert
883         * src/system.h (IN_CTYPE_DOMAIN): New macro.
884         (ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE,
885         ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use
886         IN_CTYPE_DOMAIN instead of isascii.
888 1998-08-18  Paul Eggert
890         Add support for new -r or --recursive (or -d recurse or
891         --directories=recurse) option.
893         * src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c.
895         * src/grep.1: Describe new options.
897         * src/grep.c: Include "savedir.h".
898         (long_options): Add -r or --recursive.
899         (RECURSE_DIRECTORIES): New enum value.
900         (IS_DIRECTORY_ERRNO): Remove.
901         (reset, grep): Add file name arg.
902         (grepdir, grepfile): New functions.
903         (initial_bufoffset): New var.
904         (reset): Initialize it.
905         (fillbuf): Use it.
906         (count_matches, list_files, no_filenames, suppress_errors): New static
907         vars; formerly were local to `main'.
908         (grep): Recurse through directories if the user asks for this.
909         (usage, main): Add new options.
910         (main): Change some local vars to be static, as described above.
911         Move most of the guts into grepfile function.
912         so that it can be recursed through.
914         * configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add.
915         (AC_REPLACE_FUNCS): Add stpcpy.
917         * src/savedir.c, src/savedir.h, src/stpcpy.c: New files;
918         taken from fileutils 3.16u.
920 1998-08-11  Paul Eggert
922         * src/system.h (initialize_main): New macro.
923         * src/grep.c (main): Invoke initialize_main first thing.
925 1998-04-29  Paul Eggert
927         * NEWS, src/grep.1: Describe new -a and -d options.
929         * src/grep.c (long_options, usage, main):
930         New options -d or --directories and -a or --text.
931         (directories, always_text): New variables.
932         (IS_DIRECTORY_ERRNO): New macro.
933         (reset): Now returns value specifying whether to skip this file.
934         Stat the file if either mmap or directory-skipping is possible.
935         Skip the file if it's a directory and we're skipping directories.
936         (grep): Skip the file if `reset' tells us to.
937         (main): If open fails because the file is a directory, and if we're
938         skipping directories, don't report an error.
939         Remove special case for DOS and Windows.
941         * src/dosbuf.c (guess_type): Use the same method for guessing whether a
942         file is binary as grep.c's grep does.
943         There's no longer any need to declare `bp' to be unsigned.
945 1998-04-26 Alain Magloire
947         * grep-2.2 release.
949         * src/dfa.c: Wrong revision was pulled out
950         for beta 2.1.1d.
951         * src/search.c: Wrong revision was pulled out
952         for beta 2.1.1d.
954         * src/grep.c: ck_atoi () added instead of atoi ().
955         Suggestion from Jim Meyering.
956         ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert.
958         * AUTHORS: Rephrase of some sentences.
959         * README:  Rewording.
960         Noted and patched by Joel N. Weber II.
962 1998-04-17 Kaveh R. Ghazi
964         * src/dfa.h: Don't define `const', trust autoconf to handle it.
966 1998-04-16 Alain Magloire
968         * tests/{status,empty}.sh: wrong return status.
970         * src/grep.c: Remove the REGEX part in usage (), it was
971         consider overkill by most.
973 1998-04-14  Eli Zaretskii
975         * djgpp/config.bat: Support file names with multiple dots on all
976         platforms.
978         * djgpp/README: Add instructions about file names illegal on
979         MS-DOS.
981 1998-04-13 Alain Magloire
983         * src/dfa.c: by "popular" demand reverse
984         back to '_' not word-constituent.
986         * grep-2.1.1c available for testing.
988 1998-04-13  Karl Heuer
990         * src/grep.c: (a) The directory check is done too early:
991         logically, if the argument is "-", then it refers to standard
992         input, regardless of whether there's something in the file
993         system answering to "-".
994         (b) The sh command "grep -l root /etc/passwd /etc/group 0<&-"
995         prints "(standard input)" instead of "/etc/passwd", because it
996         mistakenly believes that a named file will never be opened on fd
997         0.  The string "(standard input)" should be based on the file
998         having been originally specified as "-", rather than making
999         assumptions about the fd.
1000         (c) the code that calls close(fd) is being done outside of the
1001         test for a bad fd.  Thus, if the open failed, this code will
1002         attempt to close(-1).  It should be done inside the "fd != -1"
1003         branch.
1004         This patch addresses all three of these problems.
1006 1998-04-13 Alain Magloire
1008         * configure.in: remove the deprecated AC_ISC_POSIX macro.
1009         Spotted by Karl Heuer.
1011 1998-04-03  Eli Zaretskii
1013         * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the
1014         relevant Makefile.in files.
1016         * djgpp/config.bat: Create files in intl directory like the
1017         configure script does.
1019 1998-03-28  Eli Zaretskii
1021         * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track
1022         changes in respective Makefile.in files.
1024         * src/dosbuf.c (guess_type): Avoid running off the end of the
1025         buffer.  Spotted by Paul Eggert.
1027 1998-03-27  Alain Magloire
1029         * grep-2.1.1b.tar.gz available.
1031         * src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6
1032         when WCTYPE and WCHAR are not defined. When class names
1033         where bigger then 6, it will not detect an error.
1034         example '[[:alphabet:]]'.
1036         * Updated the copyright of the files with emacs.
1037         With emacs Jim :).
1039 1998-03-26 Jim Meyering
1041         * src/dfa.c (IS_WORD_CONSTITUENT): Define.
1042         (lex): Use IS_WORD_CONSTITUENT, not ISALNUM.
1043         Don't special-case '_'.
1044         (dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM.
1045         (dfaexec): Likewise.
1047 1998-03-25  Alain Magloire
1049         * tests/warning.sh: typos and replace the echos with
1050         a simple cat.
1051         Noted By Jim Meyering.
1053         * src/regex.c: #undef ISASCII and ISPRINT before defining
1054         them(On Solaris it was define).
1055         Pattern 'a[[:]:]]b' is an invalid char class and the error
1056         from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE).
1057         Fix with help from Ulrich Drepper.
1059         * src/grep.c (usage): Ulrich wrote: "A single printf should
1060         not have more than 900 bytes. For translation reasons the
1061         text shouldn't be split in too many pieces since this is
1062         tiresome and also does not help to generate a consistent picture."
1063         Noted by Ulrich Drepper.
1064         * src/grep.c (usage): Dig out and old patch from
1065         Franc,ois to explain the regex in usage().
1066         Ideas from Franc,ois Pinard.
1068 1998-03-23 Alain Magloire
1070         * testing: grep-2.1.1a for testing.
1072         * configure.in: Solaris needs '-lw' if we use wchar/wctype
1073         functions.
1074         * src/btowc.c: New file from GNU libc. Solaris 2.5 don't
1075         have it define.
1076         * configure.in : check for btowc ().
1078         * regex.c: Include <wchar.h> before <wctype.h>, to work around
1079         a Solaris 2.5 bug.
1080         Patch provided by Paul Eggert.
1082         * tests/status.sh: new file to check return status code.
1083         * tests/empty.sh: new file to check for empty pattern.
1084         * tests/warning.sh: new file to tell where to report errors.
1086         * configure.in: If available, prefer support for large files
1087         unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS
1088         variables.
1089         Done by Paul Eggert.
1091         * src/grep.c (usage): change prep.ai.mit.edu for gnu.org.
1093 1998-03-18 Alain Magloire
1095         * src/grep.c (usage): Formating the --help message a bit off.
1096         Noted by William Bader.
1098         * src/grep.c (main): When checking conflicting matcher for option -E the
1099         matcher was to "egrep" instead of "posix-egrep".
1100         Reported by kwzh@gnu.org.
1102         * src/grep.c: Typos and rewording the --help message.
1103         Reported by Karl Heuer.
1105         * src/grep.1: The man page wording :
1106           A regular expression matching a single character may be
1107           followed by one of several repetition operators:
1108         is unclear since 'x(yz)*z' is a valid regex.
1109         Remove the "matching a single character".
1110         Suggested by Harald Hanche-Olsen.
1112         * src/grep.c (main): `-f /dev/null' now specifies no patterns
1113         and therfore matches nothing.
1114         Reported by Jorge Stolfi.
1115         Patched by Paul Eggert.
1117 1998-03-10 Alain Magloire
1119         * Ice storm 98(el nino). Lost grep repository disk,
1120         and my $HOME directory, etc ..
1121         Trying to get the emails/patch from dejanews.com
1122         and start from grep-2.1.
1123         sigh ....
1125 1997-11-01 Alain Magloire
1127         * src/grep.c: For the long options, the problems are:
1128         --file appears in the option table as 'no_argument'
1129         instead of 'required_argument'.
1130         --files-with-matches is missing from the option table.
1131         The help lists '--fixed-strings' as the long option for -F,
1132         the table has '--fixed-regexp'.
1133         --regexp appears in the option table as 'no_argument'
1134         instead of 'required_argument'.
1135         --with-filename is missing from the option table.
1136         Reported by Grant McDorman and Krishna Sethuraman.
1138 1997-10-19 Alain Magloire
1140         * src/grep.c: the option "with-filename was not in the arg table.
1141         Corrected by Jim Hand.
1143         * GNU gettext library from gettext-0.10.32.
1145         * src/grep.c: reverse back to greping directories,
1146         One could skip the error message by defining
1147         SKIP_DIR_ERROR. There is no clear way of doing
1148         things, I hope to setle this on the next majore release
1149         Thanks Paul Eggert, Eli Zaretskii and gnits for the
1150         exchange.
1152         * tests/status.sh: add this check to make sure
1153         That the return status code is ok.
1155 1997-10-10 Andreas Schwab
1157         * src/grep.1: Fix formatting.
1159         * configure.in: Check for wctype.h, wchar.h, libintl.h and
1160         isascii, which are needed for regex.c.
1162 1997-10-01 Paul Eggert
1164         * src/grep.c (fillbuf): Don't warn about mmap failures.
1166 1997-09-7 Alain Magloire
1168         * src/grep.c: added code for -H --with-filename.
1170         * djgpp/*: patch wrongly apply
1171         duplication of text in djgpp/{README,config.h}.
1172         Filter djgpp/config.bat with unix2dos.
1174         * djgpp/make.mak: beautify
1175         From Eli Zaretskii.
1177         * grep-2.1 release.
1179 1997-09-01 Alain Magloire
1181         * grep-2.0f out for testing.
1183         * update to GNU gettext library from gettext-0.10.31
1185         * grep.c : have a nicer format for --version.
1186         Noted by Ulrich Drepper.
1188         * obstack.[ch]: updated from GNU C library
1189         * configure.in: look for stdlib.h [HAVE_STDLIB_H]
1190         Comments from Ulrich Drepper.
1192 1997-08-25 Philippe De Muyter  <phdm@info.ucl.ac.be>
1194         * src/dfa.c (sys/types.h): File included unconditionnaly.
1196 1997-08-16  Eli Zaretskii  <eliz@is.elta.co.il>
1198         * grep.c (long_options) [O_BINARY]: Add DOS-specific options.
1199         (fillbuf) [O_BINARY]: For DOS-style text files, strip CR
1200         characters at end of line.
1201         (prline) [O_BINARY]: Report correct byte offsets, even though CR
1202         characters were stripped when reading the file.
1203         (usage) [O_BINARY]: Add DOS-specific options.
1204         (setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the
1205         matcher won't ever overflow the stack.
1206         (main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters
1207         in argv[0], remove the .exe suffix, and downcase the prgram name.
1208         [O_BINARY]: Pass additional DOS-specific options to getopt_long
1209         and handle them.  Call stat before attempting to open the file, in
1210         case it is a directory (DOS will fail the open call for
1211         directories).  Switch the input descriptor to binary mode, unless
1212         it is a terminal device.
1214         * system.h [O_BINARY]: Define macros to switch a handle to binary
1215         mode, so binary files could be grep'ed on MS-DOS and MS-Windows.
1216         [HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of
1217         HAVE_LC_MESSAGES, to prevent compilation error in grep.c on
1218         systems which don't define HAVE_LC_MESSAGES, but have setlocale.
1220         * dosbuf.c: New file, functions specific for MS-DOS/MS-Windows.
1221         (guess_type, undossify_input, dossified_pos): New functions.
1223         * djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak,
1224         djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed:
1225         New files, for building Grep with DJGPP tools for MS-DOS and
1226         MS-Windows.
1228         * grep.1: Document DOS-specific switches.
1230 1997-08-08 Alain Magloire
1232         * grep-2.0e: available for testing
1234         * grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE).
1235         Suggested by Jochen Hein.
1237         * ABOUT-NLS: updated.
1238         * grep.c: --version: more verbosity (COPYRIGHT).
1239         * grep.c: --help: PATTERN, FILE instead of <pattern>, <file>.
1240         * INSTALL.grep: not necessary removed.
1241         * configure.in: --disable-regex rename --without-include-regex.
1242         * THANKS: format: first row name, second email.
1243         * ChangeLog: format ISO 8601.
1244         Reported by Franc,ois Pinard.
1246         * grep.c: move dcl of struct stat st into "else" where it's used.
1247         Reported by Jim Meyering.
1249         * grep.c: totalnl should be %u in printf.
1250         Reported by Michael Aichlmay
1251         Corrected with guidance from Ulrich Drepper
1253 1997-07-24 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1255         * Makefile.am: corrected an error when installing {f,e}grep.1.
1256         From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
1257         From Ulrich Drepper <drepper@cygnus.com>.
1259         * Many files: use PARAMS instead of __STDC__ for prototypes.
1260         From Jim Meyering <meyering@eng.ascend.com>.
1261         Patch provided by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
1263         * dfa.[ch]: uses the one in gawk-3.0.3 with the patch from
1264         Arnold (see Changelog: July 12 1997)
1266         * grep.1: a note to say -l, -L, -q stop on first match.
1267         Noted by Andrew Beattie <gaffer@tug.com>.
1269         * grep.c: refuse to scan if the file is a directory.
1270         This was causing problems on SUNs. If the directory contains
1271         a file that could match the pattern, garbage was display.
1273         * tests directory: added new set of tests from Henry Spencer
1274         regex package. Change the way the tests were done to be more
1275         conformant to automake.
1277         * configure.in: added --disable-regex for folks with their own fuctions.
1279         * grep-20d : available for testing
1281 1997-07-18 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1283         * grep-2.0c: available for testing
1285 1997-07-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1287         * src/grep.c: Cause grep to fail if `fclose (stdout)' fails.
1288         From Jim Meyering <meyering@eng.ascend.com>.
1290         * grep.c:usage() more consistency in the --help.
1292         * egrep, fgrep were links This is in violation of GNU standards:
1293         "Please don't make the behavior of a utility depend on the name used
1294         to invoke it.  It is useful sometimes to make a link to a utility with
1295         a different name, and that should not change what it does."
1296         For now egrep and fgrep will be copies of grep. A better scheme
1297         should be found later.
1298         After discussion with Tom Tromey <tromey@cygnus.com>.
1300         * fgrep.man and egrep.man included: They are stubs that call grep.1.
1301         * Makefile.am: modified to install {f,e,}grep[,.1].
1303         * speed hack for -l, -L: bail out on first match.
1304         From Scott Weikart <scott@igc.apc.org>.
1306         * *.[ch]: provided prototypes for strict argument checking
1307         With the help of Stewart Levin <stew@sep.stanford.edu>.
1309 1997-07-16 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1311         * configure.in: typo in the creation of po/Makefile
1312         Noted by Volker Borchert bt@teknon.de.
1314         * grep-2.0b: make it available for testing.
1316 1997-07-15 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1318         * src/grep.c usage(): cut the --help in smaller printf()'s
1319         Noted by Ulrich Drepper <drepper@cygnus.com>.
1321 1997-07-14 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1323         * grep-2.0a: make an alpha available for testing.
1325 1997-07-12 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1327         * run gettextize: added the po directory filled with *.po files.
1329         * check.sh, scriptgen.awk: fix grep paths.
1331         * change the directory strucure: grep is now in src to comply with
1332         gettext.m4.
1334         * grep.c version.c [VERSION]: got rid of version.c,
1335         it is now define via config.h.
1337         * dfa.c: patch to speed up initialization.
1338         Arnold Robbins (arnold@gnu.ai.mit.edu).
1340 1997-07-09 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1342         * *.c [HAVE_CONFIG_H]: Macro defined.
1344         * support for I18N in Makefile.am and configure.in.
1346         * update all the string to use gettext(I18N).
1347         Help from Franc,ois Pinard previous patch <pinard@IRO.UMontreal.CA>.
1349 1997-07-04 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1351         * obstack.[ch]: updated from glibc.
1352         Work of Ulrich Drepper <drepper@cygnus.com>.
1354         * regex.[ch]: updated from glibc.
1355         Work of Ulrich Drepper <drepper@cygnus.com>.
1357         * grep.c: for option -e not counting '\n' for new keys.
1358         From Mark Waite <markw@mddmew.fc.hp.com>.
1360         * grep.c: for option -f allocating the right count.
1361         From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
1362         Mike Heartel (mike@cs.uoregon.edu).
1364         * kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing.
1365         From Jim Meyering <meyering@asic.sc.ti.com>.
1367         * grep.1: various typos.
1368         From Keith Bostic <bostic@bsdi.com>.
1369         Mike Heartel (mike@cs.uoregon.edu).
1371 1997-06-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1373         * grep.c: support for long options.
1374         patch done by Franc,ois Pinard <pinard@IRO.UMontreal.CA>.
1376         * add getopt1.c in Makefile.am.
1377         Noted by Franc,ois Pinard <pinard@IRO.UMontreal.CA>
1379         * replace getopt.[ch] and add getopt1.c.
1381         * kwset.c: undef malloc before define it.
1382         Franc,ois Pinard <pinard@IRO.UMontreal.CA>.
1384 1997-06-07 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1386         * grep.c: format incorrect in
1387         fprintf("%s: warning: %s: %s...", filename, strerror(errno)).
1388         Mike Heartel (mike@cs.uoregon.edu).
1390 1996-11-19  David J MacKenzie  <djm@catapult.va.pubnix.com>
1392         * make.com: Set the logical SYS. From rdb@cocamrd.oz.au (Rodney Brown).
1394         * grep.c (S_ISREG): Define if not defined already, for e.g.
1395         SunOS 4.0.3.
1397         * dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit,
1398         setbit, clrbit to avoid conflict with HP-UX sys/param.h macros.
1400         * memchr.c: New file, from GNU libc.
1401         * grep.c (memchr): Remove definition.
1402         * configure.in: Use AC_REPLACE_FUNCS for memchr.
1404         * configure.in: Remove unused checks for memalign and unsigned char.
1405         * grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP.
1407         * system.h: New file.
1408         * dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating
1409         portability boilerplate.
1411         * grep.c: Include sys/types.h once, instead of three times
1412         conditionally.
1413         * dfa.c, kwset.c, search.c: Include sys/types.h unconditionally,
1414         to always try to get size_t (needed on some old SysV's).
1416         * dfa.c: Define strchr in terms of index, not the other way around.
1417         * search.c: Use memcpy instead of bcopy.
1419 1996-11-15  David J MacKenzie  <djm@catapult.va.pubnix.com>
1421         * Many files: Update FSF address.
1422         Update configuration to use autoconf v2 and automake.
1424 1993-05-22  Mike Haertel  <mike@cs.uoregon.edu>
1426         * Version 2.0 released.