ChangeLog revision 56230
1247738Sbapt2000-01-04  Paul Eggert
2247738Sbapt
3247738Sbapt	Inititial patch from David O'Brien.
4247738Sbapt
5247738Sbapt	Add --binary-files option.
6247738Sbapt	* NEWS, doc/grep.1, doc/grep.texi: Document it.
7247738Sbapt	* src/grep.c (BINARY_FILES_OPTION): New constant.
8247738Sbapt	(long_options, grep, usage, main): New --binary-files option.
9247738Sbapt	(binary_files): New var.
10247738Sbapt	* src/system.h (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, CHAR_MAX):
11247738Sbapt	New macros.
12247738Sbapt	(INT_MAX, UCHAR_MAX): Define in terms of TYPE_MAXIMUM.
13247738Sbapt
14247738Sbapt2000-01-04  Paul Eggert
15247738Sbapt
16247738Sbapt	* savedir.c (savedir): Don't store past the end of an array if
17247738Sbapt	name_size is zero and the directory is empty.
18247738Sbapt	Reported by Dima Barsky <dima@pwd.hp.com>.
19247738Sbapt
20247738Sbapt1999-11-18  Paul Eggert
21247738Sbapt
22247738Sbapt	* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23247738Sbapt	problem with the QNX 4.25 shell, which doesn't propagate exit
24247738Sbapt	status of failed commands inside shell assignments.
25247738Sbapt
26247738Sbapt1999-11-13  Eli Zaretskii
27247738Sbapt
28247738Sbapt	* doc/grep.texi: Minor markup and spelling corrections.  Use
29247738Sbapt	@noindent where appropriate.
30247738Sbapt
31247738Sbapt	* PATCHES-{AM,AC}: rename to PATCHES.{AM,AC}
32247738Sbapt
33247738Sbapt1999-11-12  Eli Zaretskii
34247738Sbapt
35247738Sbapt	doc/grep.texi: Minor fixes and typos corrected.
36247738Sbapt	djgpp/README: Updated version.
37247738Sbapt
38247738Sbapt1999-11-07  Paul Eggert
39247738Sbapt
40247738Sbapt	* src/grep.c (usage): Fix misspelling.
41247738Sbapt
42247738Sbapt1999-11-07  Paul Eggert
43247738Sbapt
44247738Sbapt	Don't assume that the C library has re_set_syntax and friends.
45247738Sbapt	* src/Makefile.am (base_sources): Add regex.c, regex.h.
46247738Sbapt	(EXTRA_DIST): Remove regex.c, regex.h.
47247738Sbapt
48247738Sbapt	* src/grep.c (prtext): Use out_quiet, not not_text, to decide
49247738Sbapt	whether to set pending to zero at the end.
50247738Sbapt	(not_text): Remove static variable, undoing latest change.
51247738Sbapt	(grep): Likewise.
52247738Sbapt
53247738Sbapt	* doc/grep.texi: Tighten up the text, and fix some minor
54247738Sbapt	spelling and usage errors.  Use @enumerate rather than @table
55247738Sbapt	@samp, since it's better for Q&A format.  Add cross
56247738Sbapt	references.
57247738Sbapt
58247738Sbapt1999-11-01 Alain Magloire
59247738Sbapt
60247738Sbapt	* src/search.c: Use the more portable [[:alnum:]]
61247738Sbapt	to define a word instead of Ascii dependent [0-9A-Za-z]
62247738Sbapt	* src/grep.c: make not_text global to not display text when
63247738Sbapt	the context switches -A/-B/-C are use on binary files.
64247738Sbapt	* make grep-2.3g available for testing.
65247738Sbapt	* configure.in: drop support for --without-included-regex.
66247738Sbapt	This was generating bogus bug reports, since many GNU/Linux
67247738Sbapt	users have different version of glibc.  And glibc maintainers
68247738Sbapt	decided to drop k&r support.
69247738Sbapt
70247738Sbapt1999-11-01 Arnold D. Robbins
71247738Sbapt
72247738Sbapt	* regex.c (init_syntax_once): move below definition of
73247738Sbapt	ISALNUM etc., then use ISALNUM to init the table, so that
74247738Sbapt	the word ops will work if i18n'ed.
75247738Sbapt	(SYNTAX): And subscript with 0xFF for Latin-1 characters.
76247738Sbapt
77247738Sbapt1999-10-26  Alain Magloire
78247738Sbapt
79247738Sbapt	* src/regex.c: Merge changes from GNU lib C.
80247738Sbapt	* Updated the *.po files
81247738Sbapt
82247738Sbapt1999-10-26  Paul Eggert
83247738Sbapt
84247738Sbapt	* src/grep.c (fillbuf): Don't report buffer size overflow if
85247738Sbapt	newalloc == save and maxalloc == save.  This can happen
86247738Sbapt	e.g. when reading a large page-aligned file that contains
87247738Sbapt	no newlines.
88247738Sbapt
89247738Sbapt1999-10-21  Paul Eggert
90247738Sbapt
91247738Sbapt	* src/grep.c (usage): Give example.  Clarify -F.
92247738Sbapt	Explain exit status more clearly.
93247738Sbapt
94247738Sbapt1999-10-12  Paul Eggert
95247738Sbapt
96247738Sbapt	* doc/grep.texi: Shorten the commentary about egrep and {.
97247738Sbapt	"BSD grep" -> "traditional grep".
98247738Sbapt	* doc/grep.1: Match recent changes to grep.texi.
99247738Sbapt
100247738Sbapt1999-10-11  Paul Eggert
101247738Sbapt
102247738Sbapt	* NEWS, doc/grep.1, doc/grep.texi: New option --mmap.
103247738Sbapt	* src/grep.c (mmap_option): New variable.
104247738Sbapt	(long_options, reset, usage): Add --mmap.
105247738Sbapt	Default is now read, not mmap.
106247738Sbapt
107247738Sbapt	* doc/grep.1: Document -Z or --null.
108247738Sbapt
109247738Sbapt1999-10-11  Paul Eggert
110247738Sbapt
111247738Sbapt	* doc/grep.texi: Fix texinfo glitches.  POSIX -> POSIX.2 where
112247738Sbapt	appropriate.
113247738Sbapt
114247738Sbapt1999-10-11  Paul Eggert
115247738Sbapt
116247738Sbapt	* acconfig.h (ssize_t): New #undef.
117247738Sbapt
118247738Sbapt	* configure.in (AC_CHECK_TYPE): Add ssize_t.
119247738Sbapt
120247738Sbapt	* src/grep.c (PREFERRED_SAVE_FACTOR): New macro.
121247738Sbapt	(reset): If the buffer has already been allocated, set bufsalloc to
122247738Sbapt	be bufalloc / PREFERRED_SAVE_FACTOR.  This avoids problems when
123247738Sbapt	bufsalloc == bufalloc (possible after reading a large binary file).
124247738Sbapt	(reset): Use PREFERRED_SAVE_FACTOR instead of magic constant.
125247738Sbapt	Do not set bufbeg; nobody uses it.
126247738Sbapt	Always set buflim.
127247738Sbapt	Check for lseek error.
128247738Sbapt	Use SEEK_CUR, not a magic constant.
129247738Sbapt	(fillbuf): Return an error indication, not a count.
130247738Sbapt	All callers changed.
131247738Sbapt	Do not assume ssize_t fits in int.
132247738Sbapt	Use PREFERRED_SAVE_FACTOR instead of magic constant.
133247738Sbapt	Clean up mmap code.
134247738Sbapt	Do not attempt to mmap zero bytes.
135247738Sbapt	Check for lseek error.
136247738Sbapt	Use SEEK_SET, not a magic constant.
137247738Sbapt	Work correctly if read is interrupted.
138247738Sbapt	(grepfile): Work correctly if open or close is interrupted.
139247738Sbapt
140247738Sbapt	* src/system.h (SEEK_SET, SEEK_CUR): New macros.
141247738Sbapt
142247738Sbapt1999-10-02 Alain Magloire
143247738Sbapt
144247738Sbapt	* src/regex.[ch]: upgrade from GNU lib C source tree.
145247738Sbapt
146247738Sbapt	* make beta 2.3f available.
147247738Sbapt
148247738Sbapt1999-10-02  Paul Eggert
149247738Sbapt
150247738Sbapt	* NEWS: egrep is now equivalent to `grep -E'.
151247738Sbapt	The lower bound of an interval is not optional.
152247738Sbapt	You can specify a matcher multiple types without error.
153247738Sbapt	-u and -U are now allowed on non-DOS hosts, and have no effect.
154247738Sbapt	* doc/grep.texi: Likewise.
155247738Sbapt	* doc/grep.1: Likewise.
156247738Sbapt	Fix some troff bugs that prevented `groff' from rendering the page.
157247738Sbapt
158247738Sbapt	* src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher):
159247738Sbapt	Remove.
160247738Sbapt	(matcher): Add.
161247738Sbapt	* src/grep.h (default_matcher): Remove.
162247738Sbapt	(matcher): Now exported from ?grepmat.c, not grep.c.
163247738Sbapt
164247738Sbapt	* src/dfa.c (lex): If { would start an invalid interval specification,
165247738Sbapt        treat it as a normal character.
166247738Sbapt        Remove (broken) support for {,M} meaning {0,M}.
167247738Sbapt        Diagnose bogus intervals like {1,0}.
168247738Sbapt        (closure): maxrep is now -1 to indicate no limit, not zero;
169247738Sbapt        zero is a valid value for maxrep, meaning an upper bound of zero.
170247738Sbapt
171247738Sbapt	* src/grep.c (short_options): New constant.
172247738Sbapt	(long_options, main): -u and -U are now supported on Unix,
173247738Sbapt	with no effect.
174247738Sbapt	(matcher): Removed; now defined by ?grepmat.c.
175247738Sbapt	(install_matcher): Renamed from setmatcher.
176247738Sbapt	(setmatcher): New function.
177247738Sbapt	(usage): Report new, more uniform option scheme.
178247738Sbapt	(main): Do not initialize matcher; ?grepmat.c now does this.
179247738Sbapt	Rely on setmatcher to catch matcher conflicts.
180247738Sbapt	Default matcher is "grep".
181247738Sbapt
182247738Sbapt	* src/search.c (matchers):
183247738Sbapt	Remove "posix-egrep" matcher; no longer needed.
184247738Sbapt	(Ecompile): Likewise.
185247738Sbapt	The egrep matcher now has POSIX behavior.
186247738Sbapt
187247738Sbapt	* tests/bre.tests: grep '\{' is no longer an error.
188247738Sbapt	Fix test for interval too large, and enable it.
189247738Sbapt	* tests/ere.tests: grep -E {1 is no longer an error
190247738Sbapt	Likewise for a{1, a{1a, a{1a}, a{1,x}.
191247738Sbapt
192247738Sbapt1999-09-22  Paul Eggert
193247738Sbapt
194247738Sbapt	* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
195247738Sbapt	2.95.1 bug with HP-UX 10.20.
196247738Sbapt
197247738Sbapt1999-09-12  Paul Eggert
198247738Sbapt
199247738Sbapt	* src/grep.c (fillbuf): Fix typo: we sometimes reported
200247738Sbapt	arithmetic overflow even when there wasn't any.
201247738Sbapt
202247738Sbapt1999-09-12  Paul Eggert
203247738Sbapt
204247738Sbapt	* configure.in (AC_CHECK_FUNCS): Add memmove.
205247738Sbapt
206247738Sbapt	* src/system.h (S_ISREG): New macro.
207247738Sbapt	(memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove,
208247738Sbapt	not if !defined STDC_HEADERS.  This is needed for SunOS 4.1.4,
209247738Sbapt	which defines STDC_HEADERS but lacks memmove.
210247738Sbapt
211247738Sbapt	* src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP.
212247738Sbapt	(reset): Always fstat the file, since we always need its size if it is
213247738Sbapt	regular.
214247738Sbapt	Similarly, get the buffer offset of every regular file.
215247738Sbapt	Set bufmapped to 0 if the file's initial offset is not a multiple
216247738Sbapt	of the page size.
217247738Sbapt	(fillbuf): Calculate an upper bound on how much memory we should
218247738Sbapt	allocate only for regular files, since we don't know the sizes of
219247738Sbapt	other files.
220247738Sbapt	Don't bother to check whether the file offset is a multiple of the page
221247738Sbapt	size, since we now do that just once in `reset'.
222247738Sbapt	When an mmapped area would fall past the end of the file, trim it to
223247738Sbapt	just before instead of giving up immediately and doing a `read';
224247738Sbapt	that avoids a worst-case behavior that could read half an mmapped file.
225247738Sbapt	Fix bug when computing offsets on hosts that don't have mmap.
226247738Sbapt
227247738Sbapt1999-08-27  Paul Eggert
228247738Sbapt
229247738Sbapt	* src/system.h (memmove): New macro.
230247738Sbapt
231247738Sbapt	* src/grep.c (page_alloc): Reallocate the old buffer instead
232247738Sbapt	of having both old and new buffers active simultaneously.
233247738Sbapt	Remove valloc debugging variant, which no longer applies.
234247738Sbapt
235247738Sbapt	(fillbuf): Rejigger the buffer allocation mechanism.  The old
236247738Sbapt	mechanism could allocate more than 10*N bytes for an N-byte
237247738Sbapt	file, which was excessive.  Check for arithmetic overflow a
238247738Sbapt	bit more carefully.
239247738Sbapt
240247738Sbapt1999-08-25  Paul Eggert
241247738Sbapt
242247738Sbapt	* src/grep.c (grepdir):
243247738Sbapt	Don't assume that st_ino and st_dev must be integers;
244247738Sbapt	POSIX.1 allows them to be floating-point (!).
245247738Sbapt
246247738Sbapt	* src/vms_fab.h (arr_ptr): `:' -> `;' to fix typo.
247247738Sbapt
248247738Sbapt1999-08-18  Alain Magloire
249247738Sbapt
250247738Sbapt	* 2.3e snapshot.
251247738Sbapt
252247738Sbapt1999-08-18  Alain Magloire
253247738Sbapt
254247738Sbapt	* src/search.c: On a CRAY J90 system running UNICOS 8.0.
255247738Sbapt	Compilation of ./src/search.c failed because the declaration of
256247738Sbapt	the variable "regex":
257247738Sbapt	  static struct re_pattern_buffer regex;
258247738Sbapt	conflicted with a previous declaration search.c #includes "system.h",
259247738Sbapt	which #includes <stdlib.h>, which declares :
260247738Sbapt        extern char *regex __((char *_Re, char *_Subject, ...));
261247738Sbapt	The declaration in search.c is local to that one source file.
262247738Sbapt	I just changed its name to something less likely to conflict.
263247738Sbapt	(I called it "regexbuf", but you could pick any name you want.)
264247738Sbapt	Excerpt email from Dean Kopesky.
265247738Sbapt
266247738Sbapt1999-08-16  Paul Eggert
267247738Sbapt
268247738Sbapt	Upgrade large-file support to the version used in tar and
269247738Sbapt	textutils.
270247738Sbapt
271247738Sbapt	* Makefile.am (ACLOCAL_AMFLAGS): Define to be empty.
272247738Sbapt	(M4DIR, ACINCLUDE_INPUTS): New macros.
273247738Sbapt	($(srcdir)/acinclude.m4): New rule.
274247738Sbapt
275247738Sbapt	* configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add.
276247738Sbapt	(AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility
277247738Sbapt	with what should appear in the next autoconf release.
278247738Sbapt
279247738Sbapt	* m4/largefile.m4: Renamed from m4/lfs.m4.
280247738Sbapt
281247738Sbapt	* src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub:
282247738Sbapt	New files.  config.guess and config.sub ar needed by the new
283247738Sbapt	AC_SYS_LARGEFILE.  ansi2knr is needed by AM_C_PROTOTYPES,
284247738Sbapt	which in turn is needed by the new AC_SYS_LARGEFILE.
285247738Sbapt
286247738Sbapt1999-08-16  Alain Magloire
287247738Sbapt
288247738Sbapt	* 2.3d snapshot on ftp server.
289247738Sbapt
290247738Sbapt1999-07-26  Paul Eggert
291247738Sbapt
292247738SbaptSeveral GNU tools have options to process arbitrary file names, even
293247738Sbaptfile names that contain newline characters.  These include `find
294247738Sbapt-print0', `perl -0', `sort -z', and `xargs -0'.  It'd be handy if GNU
295247738Sbaptgrep also processed such file names.  Here's a proposed patch to do
296247738Sbaptthis, relative to grep 2.3c.  This patch introduces two options, one
297247738Sbaptfor the data, and one for the file names.  (Sometimes one wants
298247738Sbaptnull-terminated file names in the output, and sometimes one wants to
299247738Sbaptprocess lists of null-terminated strings, and these are orthogonal
300247738Sbaptaxes.)
301247738Sbapt
302247738Sbapt        * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options.
303247738Sbapt        * src/grep.c (long_options, usage, main): Likewise.
304247738Sbapt
305247738Sbapt        * src/dfa.h (dfasyntax): New eol parameter.
306247738Sbapt        * src/dfa.c (eolbyte): New var.
307247738Sbapt        (dfasyntax): Set it from new parameter.
308247738Sbapt        (lex, dfastat, build_state, dfaexec): Use it instead of '\n'.
309247738Sbapt
310247738Sbapt        * src/grep.h (eolbyte): New decl.
311247738Sbapt        * src/grep.c (eolbyte): New var.
312247738Sbapt        (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'.
313247738Sbapt        (filename_mask): New var.
314247738Sbapt        (prline, grepfile): Output NUL separator if filename_mask is zero.
315247738Sbapt        (grep): Look for '\200' as the hallmark of a binary file, not '\0',
316247738Sbapt        if -z or --null-data is specified, since it implies that '\0' is
317247738Sbapt        expected as text.
318247738Sbapt
319247738Sbapt        * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax.
320247738Sbapt        (EGexecute, Fexecute): Use eolbyte instead of '\n'.
321247738Sbapt
322247738Sbapt1999-06-15 Alain Magloire
323247738Sbapt
324247738Sbapt	* src/grep.c, doc/grep{1,texi} :
325247738Sbapt	--revert-match should be --invert-match.
326247738Sbapt	Correction proposed by Karl Berry.
327247738Sbapt
328247738Sbapt1999-06-12 Alain Magloire
329247738Sbapt
330247738Sbapt	* doc/grep.{1,texi}: add description for --with-filename.
331247738Sbapt	Noted missing by UEBAYASHI Masao.
332247738Sbapt
333247738Sbapt1999-03-17 Paul Eggert
334247738Sbapt
335247738Sbapt	* NEWS: Add GREP_OPTIONS.
336247738Sbapt
337247738Sbapt	* doc/grep.texi: Document GREP_OPTIONS, and the other
338247738Sbapt	environment variables.  Fix doc for [:blank:], [:cntrl:], [:punct:].
339247738Sbapt
340247738Sbapt	* src/grep.c (prepend_args, prepend_default_options): New functions.
341247738Sbapt	(main): Use them to implement GREP_OPTIONS.
342247738Sbapt	* src/system.h (getenv): New decl.
343247738Sbapt
344247738Sbapt1999-03-16 Volker Borchert
345247738Sbapt
346247738Sbapt	* configure.in: Use case case ... esac for  checking Visual C++.
347247738Sbapt	When ${CC} contains options it was not recognize.
348247738Sbapt
349247738Sbapt1999-03-07 Paul Eggert
350247738Sbapt
351247738Sbapt	* src/grep.c (usage): Don't report -E, -F, and -G unless we're grep.
352247738Sbapt	(main): Don't match options -E, -F, and -G unless we're grep.
353247738Sbapt	Remove after-the-fact check for options -E, -F, and -G, since
354247738Sbapt	they're no longer needed.
355247738Sbapt
356247738Sbapt1999-03-05  Eli Zaretskii
357247738Sbapt
358247738Sbapt	* src/grep.c (main): Print the name of the default matcher instead
359247738Sbapt	of just "grep".
360247738Sbapt
361247738Sbapt1999-02-06 Alain Magloire
362247738Sbapt
363247738Sbapt	* tests/*.awk : Linux users are seeing "Broken Pipe" on make check.
364247738Sbapt	The problem is that grep does not drain its stdin, thus the previous
365247738Sbapt	process in the pipeline receives a SIGPIPE.  Other shells are silent
366247738Sbapt	about this.  There is actually no failure, since the broken pipe is
367247738Sbapt	expected.  You can work around it by changing the pipeline, so that
368247738Sbapt	the input is drained, like this:
369247738Sbapt	status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1;
370247738Sbapt	echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi
371247738Sbapt	Excerpt email from Andreas Schwab.
372247738Sbapt
373247738Sbapt1999-02-23 Alain Magloire
374247738Sbapt
375247738Sbapt	* src/grep.c : Restrict the use of -E, -F, -G
376247738Sbapt	to only grep driver, Posix behaviour. {f,e}grep
377	the matcher is already set. This change may brake
378	scripts, warn in NEWS.
379
380	* doc/grep.{1,texi} : -C takes arguments, upgrade manual.
381
382	* beta 2.3a
383
3841999-02-23 Alain Magloire
385
386	* configure.in : Change the configure VC test from
387	'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;'
388	Email from Joshua R. Poulson.
389
3901999-02-23 Paul Eggert
391
392	Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL.
393	The btowc.c shipped with grep 2.3 is incorrect for Solaris
394	2.5.1 and earlier, as it assumes UTF8, which these OSes do not
395	support.  Solaris 7 supports btowc, so there's no need to ship
396	a substitute for it.  The only questionable case is Solaris
397	2.6, which lacks btowc but does support UTF8.  However, 2.6
398	supports UTF8 but only as a demonstration (for an English
399	locale!); Japanese Solaris 2.6 users typically use EUC, or
400	sometimes shift-JIS, but they cannot use UTF8 since Japanese
401	UTF8 is not supported.  Hence there's no point to having grep
402	substitute a btowc that uses UTF8, as it is either redundant,
403	or it will almost invariably have incorrect behavior.
404
405	* configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR.
406	(AC_CHECK_FUNCS): Add btowc, wctype.
407	(AC_REPLACE_FUNCS): Don't replace btowc; our replacement is
408	invariably doing the wrong thing anyway, at least on SunOS/Solaris.
409	Don't bother to check for wctype in -lw, as we don't support
410	wide characters on Solaris 2.5.1 or earlier anyway.
411
412	* bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT).
413
414	* src/btowc.c: Removed; no longer needed.
415
4161999-02-19  Paul Eggert
417
418	* NEWS: Fix typo when talking about the old behavior of
419	silently skipping directories; it was grep 2.1, not grep 2.2.
420
4211999-02-15 Alain Magloire
422
423	* bootstrap/Makefile.try : add DJGPP DEFS.
424	Done by Elie Zaretsckii.
425
4261999-02-14 Alain Magloire
427
428	* m4/gettext.m4 : Guard [] with changequote.
429	From Elie Zaretskii.
430
431	* djgpp/config.bat : Makefile.in.in --> Makefile.in-in
432	From Elie Zaretskii.
433
434	* src/dosbuf: k&r function parameter.
435
436	* release of 2.3.
437
4381999-02-10 Alain Magloire
439
440	* bootstrap/{Makefile{try,am},REAMDE} : skeleton
441	provided for system lacking the tools to autoconfigure.
442
443	* src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H]
444
4451999-02-10 Alain Magloire
446
447	* PATCHES-AC, PATCHES-AM: updated.
448
449	* m4/regex.m4 : updated.
450
4511999-02-05 Eli Zaretskii
452
453	* m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file
454	names.
455
456	* aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the
457	latter prevents GCC from finding headers and libraries.
458
459	* djgpp/config.bat: Make building from another directory work
460
461	* djgpp/config.sed: Remove redundant command wich edited path
462	separator: now done by configure.
463
464	* src/grep.c [O_BINARY]: Add prototype for undossify_input.
465
466	* doc/grep.texi (Introduction): Typo fixed.
467
4681999-02-03 Alain Magloire
469
470	* grep-2.2f beta release.
471
4721999-02-02 Alain Magloire
473
474	* m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 :
475	New files to aid configuration and unload configure.in.
476	* m4/Makefile.am : updated.
477	* src/btowc.c : protect for wchar.h
478
4791999-01-28 Alain Magloire
480
481	* intl/Makefile.in: Replace .o with .${ac_objext} where necessary.
482	Work around a limitation of Visual C++ on Cygwin32.
483	* acconfig.h configure.in: Define `alloca' as `_alloca' when CC=cl.
484	This little hack was suggested by Ian Roxborough <irox@cygnus.com>.
485	Patch forwarded by Ben Elliston.
486
4871999-01-28 Alain Magloire
488
489	* PATCHES-AM: New file. A small patch for automake-1.4, use $(sep)
490	as the path separator base on @SEP@.
491	* PATCHES-AC configure.in : updated for autoconf-13.
492
4931999-01-27 Volker Borchert
494
495	* grep.c: fgrep -NUM not working correctly.
496	add the argument number to digit_args_val.
497
4981999-01-22 Paul Eggert
499
500	Prevent grep -r from recursing infinitely through directory loops via
501	symbolic links.
502
503	* grep.c (struct stats): New type.
504	(stats_base): New var.
505	(bufstat): Remove; subsumed by stats->stat.
506	(reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg,
507	for directory loop checking; use this instead of the bufstat global.
508	All callers changed.
509	(grepfile): Stat the file before invoking grepdir.
510	(grepdir): Assume that the argument has already been statted.
511	No longer a need for a directory size argument, since it
512	can be gotten from the struct stats * argument.
513	Check for directory loops.
514	Create linked list of directories currently being visited,
515	to detect loops.
516
5171998-12-29 Kaveh R. Ghazi
518
519	intl/localealias.c: When building grep-2.2e using cc on Irix4,
520	I needed the following patch to intl/localealias.c.
521	(Its the same patch used by fileutils-4.0.) The patch resolves
522	conflicts between char* and unsigned char* in the i18n code.
523
5241998-12-10 Alain Magloire
525
526	* src/grep.c : Typo in contex -->context
527	Noted by  Vladimir Michl.
528
5291998-12-01  Alain Magloire
530
531	* doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am:
532	New files.
533
534	* m4/progtest.m4: proctect '[]' from m4.
535	Noted by Eli Z.
536
537	* PATCHES-AC: New file, add the patch for autoconf in the dist.
538
539	* acconfig.h: (HAVE_DOS_FILENAME)
540
541	* TODO: updated.
542
543	* src/search.c: remove obsolete 'gegrep,ggrep,gnugrep'
544	matchers. grep no longer depend on argv[0].
545
546	* grep-2.2e beta to test DJGPP port.
547
5481998-11-28  Paul Eggert
549
550	Various portability enhancements:
551	- Don't assume that O_BINARY implies DOS.  Use separate
552	macros D_OK (for DOS-like directory access) and
553	HAVE_DOS_FILE_NAMES (for DOS-like file names).
554	- Don't assume that off_t fits into long; it doesn't on Solaris 2.6.
555	- Have is_EISDIR set errno properly on hosts with screwed-up EISDIR.
556	- Treat ':' specially in DOS file names only if it's the end of a
557	drive specifier.
558	- Protect against errno < 0.
559
560	* src/grep.c (is_EISDIR): Move defn to system.h.
561	(print_offset_sep): New function.
562	(fillbuf): Remove redundant test of O_BINARY.
563	(totalcc, totalnl): Now of type off_t.
564	(prline): Use print_offset_sep to print file offsets.
565	(grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility
566	on machines that don't work properly with EISDIR.
567	(grepdir): Don't assume ':' means slash on all DOS filenames;
568	it means it only in the file prefix.
569
570	* src/system.h (strerror): Check for negative error numbers.
571	(is_EISDIR): Depend on D_OK, not O_BINARY.
572	(SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__.
573	(IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES,
574	not O_BINARY.
575	(CHAR_BIT): New macro.
576
577	* src/dosbuf.c (struct dos_map):
578	pos and add members are now of type off_t.
579	(dos_stripped_crs): Now of type off_t.
580	(dossified_pos): Now accepts arg and returns value of type off_t.
581
582	* configure.in (AC_CHECK_FUNCS): Add setmode.
583	(HAVE_DOS_FILENAMES): New macro
584
5851998-11-27  Eli Zaretskii
586
587	* djgpp/config.sed: New file, a Sed script to edit configure
588	script before running it on DOS/Windows.
589	* djgpp/config.bat: Updated to handle po2tbl.sed.in and
590	po/Makefile.in.in on DOS filesystems, and to run config.sed.
591
5921998-11-24  Jim Meyering
593
594	* src/grep.c : Typo s/infalid/invalid/
595	Also noted by Stanislav Brabec.
596
5971998-11-24  Eli Zaretskii
598
599	* doc/grep.texi: I found and corrected several typos.
600	I believe the GNU standards require the section that describes the
601	options to the programs to be called ``Invoking'' or ``Invoking
602	<program-name>''.  This is so users and programs can easily find
603	that node in any Info file.  So I changed the name of the
604	`Options' chapter to `Invoking', and corrected the
605	cross-references accordingly.
606	I added some markup to things like file names and options.
607	I added some additional index entries where that seemed useful.
608	I also corrected some index entries, such as "@cindex [:alnum:]",
609	which used a colon in them (the colons confuse Info readers).
610
6111998-11-24  Alain Magloire
612
613	* grep/doc/grep.texi : -h is not use for help.
614	Nit spotted by Jim Meyering.
615
6161998-11-23  Alain Magloire
617
618	* doc: New directory, grep.1, {e,f}grep.man move here
619	* doc/grep.texi: New info manual
620	* doc/version.texi: New
621	* doc/Makefile.am: New
622	* tests/{ere,bre}.*: New files. The spencer2 test is split
623	in two ere/bre.
624	* config.hin: New, config.h.in rename to config.hin for OS
625	with limited file system aka DOS.
626
627	* grep-2.2d release for beta.
628
6291998-11-18  Alain Magloire
630
631	* src/regex.[ch] : Updated from GLibc, previous patches were
632	integrate by Ulrich Drepper and some added ones.
633
6341998-11-16  Paul Eggert
635
636	* grep.h (__attribute__): New macro, if not GCC.
637	(fatal): Add __attribute__((noreturn)).
638	* grep.c (usage): Add __attribute__((noreturn)).
639
6401998-11-16  Paul Eggert
641
642	Remove memory leak with valloced buffers, by invoking malloc instead.
643
644	* configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove.
645	* src/grep.c (page_alloc): New function.
646	(ubuffer, pagesize): New vars.
647	(ALIGN_TO): New macro.
648	(reset): Initialize new vars.  Check for overflow in buffer size calc.
649	Use page_alloc instead of valloc.
650	(fillbuf): Likewise.  Use memcpy to copy saved area.
651
6521998-11-15  Paul Eggert
653
654	* dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned.
655
6561998-11-14  Paul Eggert
657
658	* src/grep.c (grepdir): Fix bug: memory freed twice.
659
660	* src/search.c (Gcompile, Ecompile): Don't invoke dfainit,
661	since dfacomp does it for us, and if we also do it then we
662	leak memory.
663
6641998-11-13  Eli Zaretskii
665
666	* djgpp/config.bat: Rewrite to run the configure script via Bash.
667	* djgpp/config.site, djgpp/getconf: New files.
668	* djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove.
669	* djgpp/README: Update instructions.
670
671	* Makefile.am (EXTRA_DIST): Update the list of DJGPP files.
672
673	* src/system.h (IS_SLASH): New macro.
674	(is_EISDIR): Define it here for DOS and Windows.
675
676	* src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the
677	EOL formats of the input and output files match, unless stdout is
678	the console device.
679	(is_EISDIR): Don't define if already defined.  Accept a second
680	argument, the file name; all callers changed.
681	(grepdir): Don't free `file', inside the loop.  Use IS_SLASH to
682	check whether `dir' needs a slash.
683	(grepfile): If file is a directory, set e to EISDIR.
684
6851998-11-10  Alain Magloire
686
687	* src/vms_fab.{c,h}: New file for VMS wildcard expansion
688	Written by Phillip C. Brisco.
689
690	* vms/make.com : add line to compile vms_fab.c and
691	{e,f,}grepmat.c with link for each grep/fgrep/egrep.
692	Base on patch send by Phillib C. Brisco.
693
6941998-11-09  Alain Magloire
695
696	* grep-2.2c on alpha for testing.
697
6981998-11-09  Paul Eggert
699
700	* src/grep.1: Fix `Last Change' of output by generating the date
701	from the RCS Id.
702
703	* src/grep.c (is_EISDIR): New macro.
704	(grep): If -s, suppress errors from trying to read directories.
705	(grepfile): Use is_EISDIR to simplify code.
706	(grepdir): If -s, suppress errors from trying to read directories.
707
708	* src/grep.1: Fix -q -r -s problems; describe BSD grep better.
709
710	* src/grep.c (main): Update copyright.
711
712	Specify default matcher with default_matcher extern var, not
713	DEFAULT_MATCHER macro.  This is more straightforward and means
714	we need to compile grep.c just once.
715
716	* src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files.
717
718	* src/Makefile.am (base_sources): New macro.
719	(egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of
720	$(base_sources) plus the single tailoring file.
721	(grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove.
722	(EXTRA_DIST): Remove grep.c, regex.c.
723	(fgrep.o, egrep.o): Remove.
724
725	* src/grep.h (matcher): Now char const *.
726	(default_matcher): New decl.
727
728	* src/grep.c (matcher): Now char const *.
729	(setmatcher): Now accepts char const *.
730	(main): Default the matcher from default_matcher (linked externally)
731	rather than DEFAULT_MATCHER (a macro).
732
7331998-11-08 Alain Magloire
734
735	* src/grep.1: `prep.ai.mit.edu' should be replaced with `gnu.org'.
736	Nit from Paul Eggert.
737
7381998-11-06 Alain Magloire
739
740	* src/grep.c: The Matcher is not set to argv[0] but
741	explicitly by a #define MATCHER at compile time default is "grep".
742
743	* aclocal/: NEW dir. provides our own *.m4
744
745	* configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4)
746	Taken from Jim Meyering fileutils.
747
7481998-11-05 Alain Magloire
749
750	* src/grep.1: update the man pages according to the
751	changes make by Miles.
752
753	* po/*.po: updated.
754
755	* first beta release for 2.3 (2.2a).
756
7571998-11-04 Miles Bader
758
759	* src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B
760	options, and allow -C to have an optional argument. -NUM can
761	now be mixed with -C, and -A, -B always take precedence over
762	-C/-NUM, regardless of order.
763	(long_options): Let -C/--context take an optional argument.
764
7651998-11-03 Alain Magloire
766
767	* src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h>
768	#undef if defined.
769	Fixed by Andreas Ley and Philippe Defert.
770
771	* src/grep.1 : mention that -s follows POSIX.2 behavior.
772	Noted by Paul Eggert and others.
773
774	* tests/khadafy.sh: a typo in failure(s).
775	Spotted By Sotiris Vassilopoulos.
776
7771998-11-01  Paul Eggert
778
779	* src/system.h (IN_CTYPE_DOMAIN): New macro.
780	(ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE,
781	ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use
782	IN_CTYPE_DOMAIN instead of isascii.
783
7841998-08-18  Paul Eggert
785
786	Add support for new -r or --recursive (or -d recurse or
787	--directories=recurse) option.
788
789	* src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c.
790
791	* src/grep.1: Describe new options.
792
793	* src/grep.c: Include "savedir.h".
794	(long_options): Add -r or --recursive.
795	(RECURSE_DIRECTORIES): New enum value.
796	(IS_DIRECTORY_ERRNO): Remove.
797	(reset, grep): Add file name arg.
798	(grepdir, grepfile): New functions.
799	(initial_bufoffset): New var.
800	(reset): Initialize it.
801	(fillbuf): Use it.
802	(count_matches, list_files, no_filenames, suppress_errors): New static
803	vars; formerly were local to `main'.
804	(grep): Recurse through directories if the user asks for this.
805	(usage, main): Add new options.
806	(main): Change some local vars to be static, as described above.
807	Move most of the guts into grepfile function.
808	so that it can be recursed through.
809
810	* configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add.
811	(AC_REPLACE_FUNCS): Add stpcpy.
812
813	* src/savedir.c, src/savedir.h, src/stpcpy.c: New files;
814	taken from fileutils 3.16u.
815
8161998-08-11  Paul Eggert
817
818	* src/system.h (initialize_main): New macro.
819	* src/grep.c (main): Invoke initialize_main first thing.
820
8211998-04-29  Paul Eggert
822
823	* NEWS, src/grep.1: Describe new -a and -d options.
824
825	* src/grep.c (long_options, usage, main):
826	New options -d or --directories and -a or --text.
827	(directories, always_text): New variables.
828	(IS_DIRECTORY_ERRNO): New macro.
829	(reset): Now returns value specifying whether to skip this file.
830	Stat the file if either mmap or directory-skipping is possible.
831	Skip the file if it's a directory and we're skipping directories.
832	(grep): Skip the file if `reset' tells us to.
833	(main): If open fails because the file is a directory, and if we're
834	skipping directories, don't report an error.
835	Remove special case for DOS and Windows.
836
837	* src/dosbuf.c (guess_type): Use the same method for guessing whether a
838	file is binary as grep.c's grep does.
839	There's no longer any need to declare `bp' to be unsigned.
840
8411998-04-26 Alain Magloire
842
843	* grep-2.2 release.
844
845	* src/dfa.c: Wrong revision was pulled out
846	for beta 2.1.1d.
847	* src/search.c: Wrong revision was pulled out
848	for beta 2.1.1d.
849
850	* src/grep.c: ck_atoi () added instead of atoi ().
851	Suggestion from Jim Meyering.
852	ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert.
853
854	* AUTHORS: Rephrase of some sentences.
855	* README:  Rewording.
856	Noted and patched by Joel N. Weber II.
857
8581998-04-17 Kaveh R. Ghazi
859
860	* src/dfa.h: Don't define `const', trust autoconf to handle it.
861
8621998-04-16 Alain Magloire
863
864	* tests/{status,empty}.sh: wrong return status.
865
866	* src/grep.c: Remove the REGEX part in usage (), it was
867	consider overkill by most.
868
8691998-04-14  Eli Zaretskii
870
871	* djgpp/config.bat: Support file names with multiple dots on all
872	platforms.
873
874	* djgpp/README: Add instructions about file names illegal on
875	MS-DOS.
876
8771998-04-13 Alain Magloire
878
879	* src/dfa.c: by "popular" demand reverse
880	back to '_' not word-constituent.
881
882	* grep-2.1.1c available for testing.
883
8841998-04-13  Karl Heuer
885
886	* src/grep.c: (a) The directory check is done too early:
887	logically, if the argument is "-", then it refers to standard
888	input, regardless of whether there's something in the file
889	system answering to "-".
890	(b) The sh command "grep -l root /etc/passwd /etc/group 0<&-"
891	prints "(standard input)" instead of "/etc/passwd", because it
892	mistakenly believes that a named file will never be opened on fd
893	0.  The string "(standard input)" should be based on the file
894	having been originally specified as "-", rather than making
895	assumptions about the fd.
896	(c) the code that calls close(fd) is being done outside of the
897	test for a bad fd.  Thus, if the open failed, this code will
898	attempt to close(-1).  It should be done inside the "fd != -1"
899	branch.
900	This patch addresses all three of these problems.
901
9021998-04-13 Alain Magloire
903
904	* configure.in: remove the deprecated AC_ISC_POSIX macro.
905	Spotted by Karl Heuer.
906
9071998-04-03  Eli Zaretskii
908
909	* djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the
910	relevant Makefile.in files.
911
912	* djgpp/config.bat: Create files in intl directory like the
913	configure script does.
914
9151998-03-28  Eli Zaretskii
916
917	* djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track
918	changes in respective Makefile.in files.
919
920	* src/dosbuf.c (guess_type): Avoid running off the end of the
921	buffer.  Spotted by Paul Eggert.
922
9231998-03-27  Alain Magloire
924
925	* grep-2.1.1b.tar.gz available.
926
927	* src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6
928	when WCTYPE and WCHAR are not defined. When class names
929	where bigger then 6, it will not detect an error.
930	example '[[:alphabet:]]'.
931
932	* Updated the copyright of the files with emacs.
933	With emacs Jim :).
934
9351998-03-26 Jim Meyering
936
937	* src/dfa.c (IS_WORD_CONSTITUENT): Define.
938	(lex): Use IS_WORD_CONSTITUENT, not ISALNUM.
939	Don't special-case '_'.
940	(dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM.
941	(dfaexec): Likewise.
942
9431998-03-25  Alain Magloire
944
945	* tests/warning.sh: typos and replace the echos with
946	a simple cat.
947	Noted By Jim Meyering.
948
949	* src/regex.c: #undef ISASCII and ISPRINT before defining
950	them(On Solaris it was define).
951	Pattern 'a[[:]:]]b' is an invalid char class and the error
952	from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE).
953	Fix with help from Ulrich Drepper.
954
955	* src/grep.c (usage): Ulrich wrote: "A single printf should
956	not have more than 900 bytes. For translation reasons the
957	text shouldn't be split in too many pieces since this is
958	tiresome and also does not help to generate a consistent picture."
959	Noted by Ulrich Drepper.
960	* src/grep.c (usage): Dig out and old patch from
961	Franc,ois to explain the regex in usage().
962	Ideas from Franc,ois Pinard.
963
9641998-03-23 Alain Magloire
965
966	* testing: grep-2.1.1a for testing.
967
968	* configure.in: Solaris needs '-lw' if we use wchar/wctype
969	functions.
970	* src/btowc.c: New file from GNU libc. Solaris 2.5 don't
971	have it define.
972	* configure.in : check for btowc ().
973
974	* regex.c: Include <wchar.h> before <wctype.h>, to work around
975	a Solaris 2.5 bug.
976	Patch provided by Paul Eggert.
977
978	* tests/status.sh: new file to check return status code.
979	* tests/empty.sh: new file to check for empty pattern.
980	* tests/warning.sh: new file to tell where to report errors.
981
982	* configure.in: If available, prefer support for large files
983	unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS
984	variables.
985	Done by Paul Eggert.
986
987	* src/grep.c (usage): change prep.ai.mit.edu for gnu.org.
988
9891998-03-18 Alain Magloire
990
991	* src/grep.c (usage): Formating the --help message a bit off.
992	Noted by William Bader.
993
994	* src/grep.c (main): When checking conflicting matcher for option -E the
995	matcher was to "egrep" instead of "posix-egrep".
996	Reported by kwzh@gnu.org.
997
998	* src/grep.c: Typos and rewording the --help message.
999	Reported by Karl Heuer.
1000
1001	* src/grep.1: The man page wording :
1002	  A regular expression matching a single character may be
1003	  followed by one of several repetition operators:
1004	is unclear since 'x(yz)*z' is a valid regex.
1005	Remove the "matching a single character".
1006	Suggested by Harald Hanche-Olsen.
1007
1008	* src/grep.c (main): `-f /dev/null' now specifies no patterns
1009	and therfore matches nothing.
1010	Reported by Jorge Stolfi.
1011	Patched by Paul Eggert.
1012
10131998-03-10 Alain Magloire
1014
1015	* Ice storm 98(el nino). Lost grep repository disk,
1016	and my $HOME directory, etc ..
1017	Trying to get the emails/patch from dejanews.com
1018	and start from grep-2.1.
1019	sigh ....
1020
10211997-11-01 Alain Magloire
1022
1023	* src/grep.c: For the long options, the problems are:
1024	--file appears in the option table as 'no_argument'
1025	instead of 'required_argument'.
1026	--files-with-matches is missing from the option table.
1027	The help lists '--fixed-strings' as the long option for -F,
1028	the table has '--fixed-regexp'.
1029	--regexp appears in the option table as 'no_argument'
1030	instead of 'required_argument'.
1031	--with-filename is missing from the option table.
1032	Reported by Grant McDorman and Krishna Sethuraman.
1033
10341997-10-19 Alain Magloire
1035
1036	* src/grep.c: the option "with-filename was not in the arg table.
1037	Corrected by Jim Hand.
1038
1039	* GNU gettext library from gettext-0.10.32.
1040
1041	* src/grep.c: reverse back to greping directories,
1042	One could skip the error message by defining
1043	SKIP_DIR_ERROR. There is no clear way of doing
1044	things, I hope to setle this on the next majore release
1045	Thanks Paul Eggert, Eli Zaretskii and gnits for the
1046	exchange.
1047
1048	* tests/status.sh: add this check to make sure
1049	That the return status code is ok.
1050
10511997-10-10 Andreas Schwab
1052
1053	* src/grep.1: Fix formatting.
1054
1055	* configure.in: Check for wctype.h, wchar.h, libintl.h and
1056	isascii, which are needed for regex.c.
1057
10581997-10-01 Paul Eggert
1059
1060	* src/grep.c (fillbuf): Don't warn about mmap failures.
1061
10621997-09-7 Alain Magloire
1063
1064	* src/grep.c: added code for -H --with-filename.
1065
1066	* djgpp/*: patch wrongly apply
1067	duplication of text in djgpp/{README,config.h}.
1068	Filter djgpp/config.bat with unix2dos.
1069
1070	* djgpp/make.mak: beautify
1071	From Eli Zaretskii.
1072
1073	* grep-2.1 release.
1074
10751997-09-01 Alain Magloire
1076
1077	* grep-2.0f out for testing.
1078
1079	* update to GNU gettext library from gettext-0.10.31
1080
1081	* grep.c : have a nicer format for --version.
1082	Noted by Ulrich Drepper.
1083
1084	* obstack.[ch]: updated from GNU C library
1085	* configure.in: look for stdlib.h [HAVE_STDLIB_H]
1086	Comments from Ulrich Drepper.
1087
10881997-08-25 Philippe De Muyter  <phdm@info.ucl.ac.be>
1089
1090	* src/dfa.c (sys/types.h): File included unconditionnaly.
1091
10921997-08-16  Eli Zaretskii  <eliz@is.elta.co.il>
1093
1094	* grep.c (long_options) [O_BINARY]: Add DOS-specific options.
1095	(fillbuf) [O_BINARY]: For DOS-style text files, strip CR
1096	characters at end of line.
1097	(prline) [O_BINARY]: Report correct byte offsets, even though CR
1098	characters were stripped when reading the file.
1099	(usage) [O_BINARY]: Add DOS-specific options.
1100	(setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the
1101	matcher won't ever overflow the stack.
1102	(main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters
1103	in argv[0], remove the .exe suffix, and downcase the prgram name.
1104	[O_BINARY]: Pass additional DOS-specific options to getopt_long
1105	and handle them.  Call stat before attempting to open the file, in
1106	case it is a directory (DOS will fail the open call for
1107	directories).  Switch the input descriptor to binary mode, unless
1108	it is a terminal device.
1109
1110	* system.h [O_BINARY]: Define macros to switch a handle to binary
1111	mode, so binary files could be grep'ed on MS-DOS and MS-Windows.
1112	[HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of
1113	HAVE_LC_MESSAGES, to prevent compilation error in grep.c on
1114	systems which don't define HAVE_LC_MESSAGES, but have setlocale.
1115
1116	* dosbuf.c: New file, functions specific for MS-DOS/MS-Windows.
1117	(guess_type, undossify_input, dossified_pos): New functions.
1118
1119	* djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak,
1120	djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed:
1121	New files, for building Grep with DJGPP tools for MS-DOS and
1122	MS-Windows.
1123
1124	* grep.1: Document DOS-specific switches.
1125
11261997-08-08 Alain Magloire
1127
1128	* grep-2.0e: available for testing
1129
1130	* grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE).
1131	Suggested by Jochen Hein.
1132
1133	* ABOUT-NLS: updated.
1134	* grep.c: --version: more verbosity (COPYRIGHT).
1135	* grep.c: --help: PATTERN, FILE instead of <pattern>, <file>.
1136	* INSTALL.grep: not necessary removed.
1137	* configure.in: --disable-regex rename --without-include-regex.
1138	* THANKS: format: first row name, second email.
1139	* ChangeLog: format ISO 8601.
1140	Reported by Franc,ois Pinard.
1141
1142	* grep.c: move dcl of struct stat st into "else" where it's used.
1143	Reported by Jim Meyering.
1144
1145	* grep.c: totalnl should be %u in printf.
1146	Reported by Michael Aichlmay
1147	Corrected with guidance from Ulrich Drepper
1148
11491997-07-24 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1150
1151	* Makefile.am: corrected an error when installing {f,e}grep.1.
1152	From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
1153	From Ulrich Drepper <drepper@cygnus.com>.
1154
1155	* Many files: use PARAMS instead of __STDC__ for prototypes.
1156	From Jim Meyering <meyering@eng.ascend.com>.
1157	Patch provided by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
1158
1159	* dfa.[ch]: uses the one in gawk-3.0.3 with the patch from
1160	Arnold (see Changelog: July 12 1997)
1161
1162	* grep.1: a note to say -l, -L, -q stop on first match.
1163	Noted by Andrew Beattie <gaffer@tug.com>.
1164
1165	* grep.c: refuse to scan if the file is a directory.
1166	This was causing problems on SUNs. If the directory contains
1167	a file that could match the pattern, garbage was display.
1168
1169	* tests directory: added new set of tests from Henry Spencer
1170	regex package. Change the way the tests were done to be more
1171	conformant to automake.
1172
1173	* configure.in: added --disable-regex for folks with their own fuctions.
1174
1175	* grep-20d : available for testing
1176
11771997-07-18 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1178
1179	* grep-2.0c: available for testing
1180
11811997-07-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1182
1183	* src/grep.c: Cause grep to fail if `fclose (stdout)' fails.
1184	From Jim Meyering <meyering@eng.ascend.com>.
1185
1186	* grep.c:usage() more consistency in the --help.
1187
1188	* egrep, fgrep were links This is in violation of GNU standards:
1189	"Please don't make the behavior of a utility depend on the name used
1190	to invoke it.  It is useful sometimes to make a link to a utility with
1191	a different name, and that should not change what it does."
1192	For now egrep and fgrep will be copies of grep. A better scheme
1193	should be found later.
1194	After discussion with Tom Tromey <tromey@cygnus.com>.
1195
1196	* fgrep.man and egrep.man included: They are stubs that call grep.1.
1197	* Makefile.am: modified to install {f,e,}grep[,.1].
1198
1199	* speed hack for -l, -L: bail out on first match.
1200	From Scott Weikart <scott@igc.apc.org>.
1201
1202	* *.[ch]: provided prototypes for strict argument checking
1203	With the help of Stewart Levin <stew@sep.stanford.edu>.
1204
12051997-07-16 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1206
1207	* configure.in: typo in the creation of po/Makefile
1208	Noted by Volker Borchert bt@teknon.de.
1209
1210	* grep-2.0b: make it available for testing.
1211
12121997-07-15 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1213
1214	* src/grep.c usage(): cut the --help in smaller printf()'s
1215	Noted by Ulrich Drepper <drepper@cygnus.com>.
1216
12171997-07-14 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1218
1219	* grep-2.0a: make an alpha available for testing.
1220
12211997-07-12 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1222
1223	* run gettextize: added the po directory filled with *.po files.
1224
1225	* check.sh, scriptgen.awk: fix grep paths.
1226
1227	* change the directory strucure: grep is now in src to comply with
1228	gettext.m4.
1229
1230	* grep.c version.c [VERSION]: got rid of version.c,
1231	it is now define via config.h.
1232
1233	* dfa.c: patch to speed up initialization.
1234	Arnold Robbins (arnold@gnu.ai.mit.edu).
1235
12361997-07-09 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1237
1238	* *.c [HAVE_CONFIG_H]: Macro defined.
1239
1240	* support for I18N in Makefile.am and configure.in.
1241
1242	* update all the string to use gettext(I18N).
1243	Help from Franc,ois Pinard previous patch <pinard@IRO.UMontreal.CA>.
1244
12451997-07-04 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1246
1247	* obstack.[ch]: updated from glibc.
1248	Work of Ulrich Drepper <drepper@cygnus.com>.
1249
1250	* regex.[ch]: updated from glibc.
1251	Work of Ulrich Drepper <drepper@cygnus.com>.
1252
1253	* grep.c: for option -e not counting '\n' for new keys.
1254	From Mark Waite <markw@mddmew.fc.hp.com>.
1255
1256	* grep.c: for option -f allocating the right count.
1257	From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
1258	Mike Heartel (mike@cs.uoregon.edu).
1259
1260	* kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing.
1261	From Jim Meyering <meyering@asic.sc.ti.com>.
1262
1263	* grep.1: various typos.
1264	From Keith Bostic <bostic@bsdi.com>.
1265	Mike Heartel (mike@cs.uoregon.edu).
1266
12671997-06-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1268
1269	* grep.c: support for long options.
1270	patch done by Franc,ois Pinard <pinard@IRO.UMontreal.CA>.
1271
1272	* add getopt1.c in Makefile.am.
1273	Noted by Franc,ois Pinard <pinard@IRO.UMontreal.CA>
1274
1275	* replace getopt.[ch] and add getopt1.c.
1276
1277	* kwset.c: undef malloc before define it.
1278	Franc,ois Pinard <pinard@IRO.UMontreal.CA>.
1279
12801997-06-07 Alain Magloire <alainm@rcsm.ee.mcgill.ca>
1281
1282	* grep.c: format incorrect in
1283	fprintf("%s: warning: %s: %s...", filename, strerror(errno)).
1284	Mike Heartel (mike@cs.uoregon.edu).
1285
12861996-11-19  David J MacKenzie  <djm@catapult.va.pubnix.com>
1287
1288	* make.com: Set the logical SYS. From rdb@cocamrd.oz.au (Rodney Brown).
1289
1290	* grep.c (S_ISREG): Define if not defined already, for e.g.
1291	SunOS 4.0.3.
1292
1293	* dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit,
1294	setbit, clrbit to avoid conflict with HP-UX sys/param.h macros.
1295
1296	* memchr.c: New file, from GNU libc.
1297	* grep.c (memchr): Remove definition.
1298	* configure.in: Use AC_REPLACE_FUNCS for memchr.
1299
1300	* configure.in: Remove unused checks for memalign and unsigned char.
1301	* grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP.
1302
1303	* system.h: New file.
1304	* dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating
1305	portability boilerplate.
1306
1307	* grep.c: Include sys/types.h once, instead of three times
1308	conditionally.
1309	* dfa.c, kwset.c, search.c: Include sys/types.h unconditionally,
1310	to always try to get size_t (needed on some old SysV's).
1311
1312	* dfa.c: Define strchr in terms of index, not the other way around.
1313	* search.c: Use memcpy instead of bcopy.
1314
13151996-11-15  David J MacKenzie  <djm@catapult.va.pubnix.com>
1316
1317	* Many files: Update FSF address.
1318	Update configuration to use autoconf v2 and automake.
1319
13201993-05-22  Mike Haertel  <mike@cs.uoregon.edu>
1321
1322	* Version 2.0 released.
1323