Home | History | Annotate | Line # | Download | only in dist
      1 2004-11-12  Stepan Kasal  <kasal (a] ucw.cz>
      2 
      3 	* 2.5.1a tarball released.  Excluding directory autom4te-2.53.cache
      4 	  and .cvsignore files.
      5 
      6 2004-11-12  Stepan Kasal  <kasal (a] ucw.cz>
      7 
      8 	Change bug-gnu-utils address to bug-grep, on many places; there
      9 	is no need to have the word ``grep'' in subject then.
     10 	Thanks to Tony Abou-Assaleh and Benno Schulenberg for pointing
     11 	out this.
     12 
     13 2004-11-11  Stepan Kasal  <kasal (a] ucw.cz>
     14 
     15 	* tests/spencer1.awk: Use only lines with 3 fields.
     16 	* tests/spencer1.tests: Correct #55 and disable it for now.
     17 	* tests/backref.sh: Modify #2 so that current glibc regex can
     18 	  handle it in finite time.
     19 
     20 2002-03-26  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     21 
     22 	* 2.5.1 Release.
     23 
     24 2002-03-26  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     25 	* src/grep.c: Don't fail if we don't have an stdout fd and -q
     26 	  is used (happens e.g. on calls from hotplug scripts)
     27 	* src/grep.c: Don't hang forever if fed with an empty string to
     28 	  grep for and --color enabled
     29 	* src/grep.c: Fix infinite loop on
     30 	  echo "1 one" | grep -E "[0-9]*" -o
     31 	  echo "1 one" | grep -E "[0-9]*" --color
     32 	* po/*: Sync wiith translation project
     33 	* src/grep.c, src/Makefile.am, configure.in: Add patch from
     34 	  Paul Eggert <eggert (a] twinsun.com> to comply with ridiculous
     35 	  guidelines (don't act differently if invoked as egrep or fgrep)
     36 	* configure.in: Bump version number, require a recent autoconf
     37 
     38 2002-03-14  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     39 	* src/Makefile.am, po/Makefile.in.in: Support DESTDIR properly
     40 	* tests/bre.tests: Add fix from
     41 	  Peter Breitenlohner <peb (a] mppmu.mpg.de>
     42 
     43 2002-03-13  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     44 	* configure.in, m4/regex.m4, m4/malloc.m4, m4/realloc.m4:
     45 	  Don't set LIBOBJS directly, autoconf 2.53 doesn't like it
     46 	* intl/*: Sync with gettext 0.11
     47 	* po/*: Sync with translation project
     48 	* configure.in, src/Makefile.am: Don't duplicate code - make
     49 	  egrep and fgrep links to grep and set matcher based on
     50 	  application name, suggestion from
     51 	  Guillaume Cottenceau <gc (a] mandrakesoft.com>
     52 	* src/grep.c: (prline) Add fix for -i --color from
     53 	  Jim Meyering <meyering (a] lucent.com>
     54 	* configure.in: Version 2.5; release
     55 
     56 2002-01-23  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     57 	* configure.in: Version 2.5g
     58 	* Makefile.cvs, grep.spec: Add packaging tools
     59 	Merge djgpp changes from Andrew Cottrell <anddjgpp (a] ihug.coml.au>:
     60 	* src/grep.c: Added conditional compilation for DJGPP
     61 	* djgpp: remove directory as it is no longer required with DJGPP 2.03
     62                  (or 2.04 when released)
     63 	* README.DOS: Moved djgpp/readme to readme.dos
     64 	* PATCHES.AC, PATCHES.AM: delete files - redundant
     65 	* configure.in, Makefile.am: remove djgpp directory from list
     66 
     67 2002-01-22  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     68 	* doc/grep.texi, doc/grep.1, NEWS: Document --label
     69 	* po/ru.po: Sync with translation project
     70 	* po/grep.pot: Sync with source
     71 
     72 2002-01-18  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     73 	* src/grep.c: Add --label, based on patch from Stepan Koltsov
     74 
     75 2001-11-20  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     76 	* autogen.sh: Don't hardcode aclocal dir
     77 
     78 2001-11-19  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     79 	* src/grep.c: Add --only-matching (-o) switch (see NEWS)
     80 	* doc/grep.texi, doc/grep.1, NEWS: Document changes
     81 	* configure.in, lib/Makefile.am: Don't use internal getopt if
     82           we're on a system that provides a working getopt function
     83 
     84 2001-09-25  Bernhard Rosenkraenzer <bero (a] arklinux.org>
     85 	* configure.in: Detect pcre correctly even when it's in
     86 	  non-standard locations, using pcre-config
     87 	* src/grep.c: Add --color={always,never,tty} argument (like in ls)
     88 	* src/grep.c: Turn off blinking in the default colorization
     89 	* src/grep.c: Add --devices (-D) switch (analogous to --directories)
     90 	* src/dfa.c: Fix an i18n bug: echo "A" | grep '[A-Z0-9]' wouldn't work
     91 	  in non-C-Locales on systems using current versions of glibc.
     92 	* AUTHORS: Change maintainer, credit Alain for his work until now
     93 	* configure.in, m4/decl.m4, m4/dosfile.m4, m4/gettext.m4,
     94 	  m4/init.m4, m4/install.m4, m4/largefile.m4, m4/lcmessage.m4,
     95 	  m4/header.m4, m4/isc-posix.m4, m4/missing.m4, m4/progtest.m4,
     96 	  m4/sanity.m4:
     97 	  Fix build with autoconf 2.5x, retain 2.1x compatibility for now
     98 	* autogen.sh: Add some crude hacks to make it possible to build with
     99 	  both autoconf 2.5x and 2.1x
    100 	* acconfig.h: removed (no longer required)
    101 	* Makefile.am: add cvs-clean target
    102 	* doc/grep.texi, doc/grep.1, NEWS: Document changes
    103 	  (--color, --devices, -D)
    104 	* src/dfa.c, src/grep.c: Add vim modelines
    105 
    106 2001-08-30  Alain Magloire
    107 
    108 	* configure.in: Add gl in ALL_LINGUAS.
    109 
    110 2001-08-30  Kurt D Schwehr
    111 
    112 	* doc/grep.1: Warn that grep insert a "--" between groups of matches,
    113 	when using the context options.
    114 	* doc/grep.texi: Likewised.
    115 
    116 2001-08-25  Heikki Korpela
    117 
    118 	* doc/grep.texi: Point out that some Platforms do not support
    119 	reading of directories and silently ignore them.
    120 
    121 2001-08-21  Alain Magloire
    122 
    123 	* lib/malloc.c: New file:
    124 	* lib/realloc.c: New file:
    125 	* lib/Makefile.am: Add malloc.c and realloc.c in EXTRA_DIST.
    126 
    127 2001-07-31  Alain Magloire
    128 
    129 	* po/*.po: New files from the translation team:
    130 	grep-2.5e.de.po  grep-2.5e.el.po  grep-2.5e.eo.po grep-2.5e.es.po
    131 	grep-2.5e.et.po  grep-2.5e.fr.po  grep-2.5e.gl.po grep-2.5e.it.po
    132 	grep-2.5e.pl.po  grep-2.5e.sl.po
    133 
    134 2001-07-31  Andreas Schwab
    135 
    136 	* src/grep.c: Fix all uses of error to pass a proper format
    137 	string.
    138 
    139 2001-07-29  Alain Magloire
    140 
    141 	* grep/src/grep.c (usage): Typos corrected.
    142 	Patches from Santiago Vila.
    143 
    144 2001-07-29  Alain Magloire
    145 
    146 	David Clissold, wrote:
    147 	a small bug in the GNU grep 2.4.2, which may have gone unnoticed
    148 	because it only causes a failure if building on a system with large
    149 	files enabled (e.g. an "off_t" is a "long long" rather than a "long").
    150 	savedir() takes on off_t argument, but in grepdir() the parameter
    151 	is cast to an (unsigned).  Well, if an off_t is larger than an int,
    152 	the value gets truncated.  This would not normally have an effect on a
    153 	little-endian platform (unless the file is >2GB), but on a big-endian
    154 	system it will always fail.  The external effect is that
    155 	"grep -r foo dir_name" fails with ENOMEM (from malloc() within
    156 	savedir()).
    157 
    158 	* grep/src/grep.c (grepdir): Remove the (unsigned) cast when calling
    159 	savedir().
    160 	Patch from David Clissold.
    161 
    162 2001-07-29  Alain Magloire
    163 
    164 	* grep/doc/grep.texi: In Bugs report use {n,m} for consistency.
    165 	* grep/doc/grep.1: Likewised.
    166 	Noted by Steven Lucy.
    167 
    168 2001-04-27  Isamu Hasegawa
    169 
    170 	* dfa.c (mblen_buf) : New variable contains the amount of remain
    171 	byte of corresponding multibyte character in the input string.
    172 	(SKIP_REMAIN_MB_IF_INITIAL_STATE) : Use mblen_buf.
    173 	(match_anychar) : Use mblen_buf.
    174 	(match_mb_charset) : Use mblen_buf.
    175 	(transit_state_consume_1char) : Use mblen_buf.
    176 	(transit_state) : Use inputwcs to get current (multibyte) character.
    177 	(dfaexec) : Add initialization of mblen_buf.
    178 
    179 2001-04-27  Isamu Hasegawa
    180 
    181 	* dfa.c (addtok) : Set appropriate value to multibyte_prop.
    182 	(dfastate) : Add the initialization of the variable.
    183 	(dfaexec) : Call transit_state if d->fail may transit by
    184 	multibyte characters.
    185 	(transit_state_singlebyte) : Clean up unnecessary code.
    186 	(transit_state_consume_1char) : Likewise.
    187         (transit_state) : Add checking for word and newline.
    188 
    189 2001-04-19  Isamu Hasegawa
    190 
    191 	* search.c (check_multibyte_string) : Check the case when mbclen == 0.
    192 
    193 2001-04-11  Isamu Hasegawa
    194 
    195 	* search.c (check_multibyte_string) : Check the head of multibyte
    196 	characters, and optimize a bit.
    197 	(EGexecute) : Optimize a bit.
    198 	(Fexecute) : Fix the index.
    199 
    200 2001-04-02  Alain Magloire
    201 
    202 	* lib/regex.c: Update from GNU lib C, with the changes
    203 	provided by Paul Eggert.
    204 	* lib/posix/regex.h: Likewise.
    205 
    206 2001-02-17  Paul Eggert
    207 
    208 	Stop trying to support hosts that have nonstandard declarations for
    209 	mbrtowc and/or mbstate_t.  It's not worth the portability hassle.
    210 
    211 	* lib/quotearg.c (mbrtowc, mbsinit): Remove workaround macros
    212 	for hosts that have mbrtowc but not mbstate_t, as we now
    213 	insist on proper declarations for both before using mbrtowc.
    214 
    215 2001-03-18  Alain Magloire
    216 
    217 	* configure.in: Call AC_MBSTATE_T.
    218 	* Makefile.am: Add mbstate_t.m4
    219 	* m4/Makefile.am: Add mbstate_t.m4
    220 	* m4/mbstate_t.m4: New m4 macro.
    221 	* lib/strtol.c: Define CHAR_BITS.
    222 	Uwe H. Steinfeld, Ruslan Ermilov, Volkert Bochert, noted
    223 	that mbstate_t was not define for certain platforms.
    224 
    225 2001-03-18  Paul Eggert
    226 
    227 	* src/grep.c (fillbuf): Fix storage allocation performance
    228 	bug: buffer was doubling in size in many cases where it didn't
    229 	have to.
    230 
    231 2001-03-17  Paul Eggert
    232 
    233 	* src/grep.c (fillbuf): Avoid unnecessary division by 2.
    234 	Don't check xrealloc return value; it's guaranteed to be nonzero.
    235 	(fillbuf, grepdir): Use xalloc_die rather than error; it's shorter.
    236 
    237 2001-03-17  Alain Magloire
    238 
    239 	* src/grep.c (context_length_arg): error () passing wrong format.
    240 	Spotted by Jim Meyering.
    241 
    242 2001-03-07  Alain Magloire
    243 
    244 	* README-alpha: Removed reference to GNU tar, add the location
    245 	of the CVSROOT.
    246 
    247 2001-03-06  Alain Magloire
    248 
    249 	Only the Regex patterns should be split in an array, patterns[].
    250 	The dfa and KWset compiled patterns should remain global and the
    251 	patterns compiled all at once.
    252 
    253 	* src/search.c: include "error.h" and "xalloc.h" to get prototyping
    254 	of x*alloc() and error().
    255 	(kwsinit): Reverse to previous behaviour and takes no argument.
    256 	(kwsmusts): Likewised.
    257 	(Gcompile): For the regex pattern, split them and each pattern
    258 	is put in different compiled structure patterns[]. The patterns
    259 	are given to dfacomp() and kwsmusts() as is.
    260 	(Ecompile): Likewised.
    261 	(Fcompile): Reverse to the old behaviour of compiling the enire
    262 	patterns in one shot.
    263 	(EGexecute): If falling to GNU regex for the matching, loop in the
    264 	array of compile patterns[] to find a match.
    265 	(error): Many error () were call with arguments in the wrong order.
    266 	* tests/file.sh: Simple test to check for pattern in files.
    267 
    268 	Reaction to bug report fired by Greg Louis <glouis (a] dynamicro.on.ca>
    269 
    270 2001-03-06  Isamu Hasegawa
    271 
    272 	In multibyte environments, handle multibyte characters as single
    273 	characters in bracket expressions.
    274 
    275 	* src/dfa.h (mb_char_classes) : new structure.
    276 	(mbcsets): new variable.
    277 	(nmbcsets): new variable.
    278 	(mbcsets_alloc) : new variable.
    279 	* src/dfa.c (prtok) : handle MBCSET.
    280 	(fetch_wc): new function to fetch a wide character.
    281 	(parse_bracket_exp_mb) : new function to handle multibyte character
    282 	in lex().
    283 	(lex): invoke parse_bracket_exp_mb() for multibyte bracket expression.
    284 	(atom): handle MBCSET.
    285 	(epsclosure): likewise.
    286 	(dfaanalyze): likewise.
    287 	(dfastate): likewise.
    288 	(match_mb_charset): new function to judge whether a bracket match
    289 	with a multibyte character.
    290 	(check_matching_with_multibyte_ops) : handle MBCSET.
    291 	(dfainit): initialize new variables.
    292 	(dfafree): free new variables.
    293 
    294 2001-03-04  Alain Magloire
    295 
    296 	To get more in sync with other GNU utilities like GNU tar and fetish
    297 	all the supporting functions are now under lib.
    298 	Thanks to Jim Meyering, Volkert Bochert and Paul Eggert for
    299 	the code and the reminders.
    300 
    301 	* src/grep.c (fatal): Function removed, using error () from
    302 	lib/error.c instead.
    303 	(usage): Copyright updated.
    304 	(error): Function removed, using error () from lib/error.c instead,
    305 	adjust prototypes.
    306 	(prog): Global variable rename to program_name, to work with new
    307 	lib/error.c.
    308 	(xrealloc): Removed using lib/xmalloc.c.
    309 	(xmalloc): Removed using lib/xmalloc.c
    310 	(main): Register with atexit() to check for error on stdout.
    311 	* configure.in: Check for atexit(), call jm_MALLOC, jm_RELLOC and
    312 	jm_PREREQ_ERROR.
    313 	* tests/bre.awk: Removed the hack to drain the buffer since we
    314 	always fclose(stdout) atexit.
    315 	* tests/ere.awk: Likewise.
    316 	* tests/spencer1.awk: Likewise.
    317 	* bootstrap/Makefile.try: Update the Makefile to reflect the changes
    318 	in the new hierarchy.
    319 
    320 	* README-alpha: New File.
    321 	* m4/realloc.m4: New File.
    322 	* m4/malloc.m4: New File.
    323 	* m4/error.m4: New File.
    324 	* m4/Makefile.am: Updated.
    325 	* lib: New directory.
    326 	* lib/Makefile.am: New file.
    327 	* lib/closeout.c: New file.
    328 	* lib/closeout.h: New file.
    329 	* lib/fnmatch.c: New file.
    330 	* lib/fnmatch.h: New file.
    331 	* lib/atexit.c: New file.
    332 	* lib/error.c: New file.
    333 	* lib/error.h: New file.
    334 	* lib/quotearg.h: New file.
    335 	* lib/quotearg.c: New file.
    336 	* lib/xmalloc.c: New file.
    337 	* lib/posix: New directory.
    338 	* lib/posix/Makefile.am: New file.
    339 	* src/getopt.c: Moved to lib.
    340 	* src/getopt1.c: Moved to lib.
    341 	* src/getopt.h: Moved to lib.
    342 	* src/alloca.c: Moved to lib.
    343 	* src/exclude.c: Moved to lib.
    344 	* src/exclude.h: Moved to lib.
    345 	* src/hard-locale.h: Moved to lib.
    346 	* src/hard-locale.c: Moved to lib.
    347 	* src/isdir.c: Moved to lib.
    348 	* src/mechr.c: Moved to lib.
    349 	* src/obstack.c: Moved to lib.
    350 	* src/obstack.h: Moved to lib.
    351 	* src/regex.c: Moved to lib.
    352 	* src/regex.h: Moved to lib.
    353 	* src/posix: Moved to lib.
    354 	* src/posix/regex.h: Moved to lib.
    355 	* src/savedir.h: Moved to lib.
    356 	* src/savedir.c: Moved to lib.
    357 	* src/stpcpy.c: Moved to lib.
    358 	* src/strtoul.c: Moved to lib.
    359 	* src/strtol.c: Moved to lib.
    360 	* src/strtoull.c: Moved to lib.
    361 	* src/strtoumax.c: Moved to lib.
    362 	* src/xstrtol.c: Moved to lib.
    363 	* src/xstrtol.h: Moved to lib.
    364 	* src/xstrtoumax.c: Moved to lib.
    365 
    366 2001-03-01  Isamu Hasegawa
    367 
    368 	Implement the mechanism to match with multibyte characters,
    369 	and use it for `period' in multibyte environments.
    370 
    371 	* dfa.h (mbps): new variable.
    372 	* dfa.c (prtok): handle ANYCHAR.
    373 	(lex): use ANYCHAR for `period' in multibyte environments.
    374 	(atom): handle ANYCHAR.
    375 	(state_index): initialize mbps in multibyte environments.
    376 	(epsclosure): handle ANYCHAR.
    377 	(dfaanalyze): handle ANYCHAR.
    378 	(dfastate): handle ANYCHAR.
    379 	(realloc_trans_if_necessary): new function.
    380 	(transit_state_singlebyte): new function.
    381 	(match_anychar): new function.
    382 	(check_matching_with_multibyte_ops): new function.
    383 	(transit_state_consume_1char): new function.
    384 	(transit_state): new function.
    385 	(dfaexec): invoke transit_state if expression can match with
    386 	a multibyte character in multibyte environments.
    387 	(dfamust): handle ANYCHAR.
    388 
    389 2001-03-01  Alain Magloire
    390 
    391 	* src/exclude.c: New file.
    392 	* src/exclude.h: New file.
    393 	* src/grep.c (main): Took the GNU tar code to handle
    394 	the option --include, --exclude, --exclude-from.
    395 	Files are check for a match, with exlude_filename ().
    396 	New option --exclude-from.
    397 	* src/savedir.c: Call exclude_filename() to check for
    398 	file pattern exclusion or inclusion.
    399 	* configure.in: --disable-pcre rename to --disable-perl-regexp.
    400 
    401 
    402 2001-02-25  Alain Magloire
    403 
    404 	* src/dfa.c: Typo corrected.
    405 	Noted by Isamu Hasegawa.
    406 	* src/savedir.c: Typos corrected.
    407 
    408 2001-02-22  Alain Magloire
    409 
    410 	* src/savedir.c (isdir1): New function, calling isdir with
    411 	the correct pathname.
    412 
    413 2001-02-19  Isamu Hasegawa
    414 
    415 	Avoid incorrect state transition in multibyte environments.
    416 
    417 	* dfa.h (nmultibyte_prop): new variable.
    418 	(multibyte_prop): new variable.
    419 	* dfa.c (addtok): set inputwcs.
    420 	(dfastate): avoid incorrect state transition in multibyte
    421 	environments.
    422 	(dfaexec): likewise.
    423 	(dfainit): init multibyte_prop.
    424 	(dfafree): free multibyte_prop.
    425 	(inputwcs): new variable.
    426 
    427 2001-02-19  Isamu Hasegawa
    428 
    429 	Handle a multibyte character followed by '*', '+', and '{n,m}'
    430 	correctly.
    431 
    432 	* dfa.c (update_mb_len_index): new function.
    433 	Support for multibyte string.
    434 	(FETCH): call update_mb_len_index.
    435 	(lex): check cur_mb_index not to misunderstand multibyte characters.
    436 	(atom): make a tree from a multibyte character.
    437 	(dfaparse): initialize new variables.
    438 	(mbs): new variable.
    439 	(cur_mb_len): new variable.
    440 	(cur_mb_index): new variable.
    441 
    442 2001-02-18  Jim Meyering
    443 
    444 	* m4/dosfile.m4 (AC_DOSFILE): Move AC_DEFINEs out of AC_CACHE_CHECK.
    445 
    446 2001-02-17  Alain Malgoire
    447 
    448 	* doc/grep.texi: Document the new options and the new behaviour
    449 	back-references are local.  Use excerpt from Karl Berry regex
    450 	texinfo.
    451 
    452 	* bootstrap/Makefile.try: Added xstrtoumax.o xstrtoul.o hard-local.o
    453 
    454 2001-02-17  Alain Magloire
    455 
    456 	From Guglielmo 'bond' Bondioni :
    457 	The bug was that using a multi line file that contained REs (one per
    458 	line), backreferences in the REs were considered global (to the file)
    459 	and not local (to the line).
    460 	That is, \1 in line n refers to the first \(.\) in the whole file,
    461 	rather than in the line itself.
    462 
    463 	From Tapani Tarvainen :
    464 	# Re: grep -e '\(a\)\1' -e '\(b\)\1'
    465 	That's not the way it should work: multiple -e arguments
    466 	should be treated as independent patterns and back references
    467 	should not refer to previous ones.
    468 
    469 	From Paul Eggert :
    470 	GNU grep currently does not issue
    471 	diagnostics for the following two cases, both of which are erroneous:
    472 	grep -e '[' -e ']'
    473 	grep '[
    474 	]'
    475 	POSIX requires a diagnostic in both cases because '[' is not a valid
    476 	regular expression.
    477 
    478 	To overcome those problems, grep no longer pass the concatenate
    479 	patterns to GNU regex but rather compile each patterns separately
    480 	and keep the result in an array.
    481 
    482 	* src/search.c (patterns): New global variable; a structure array
    483 	holding the compiled patterns.
    484 	Declare function prototypes to minimize error.
    485 	(dfa, kswset, regexbuf, regs): Removed, no longer static globals, but
    486 	rather fields in patterns[] structure per motif.
    487 	(Fcompile): Alloc an entry in patterns[] to hold the regex.
    488 	(Ecompile): Alloc an entry per motif in the patterns[] array.
    489 	(Gcompile): Likewise.
    490 	(EGexecute): Loop through of array of patterns[] for a match.
    491 
    492 2001-02-17  Alain Magloire
    493 
    494 	From Bernd Strieder :
    495 	# tail -f logfile | grep important | do_something_urgent
    496 	# tail -f logfile | grep important | do_something_taking_very_long
    497 	If grep does full buffering in these cases then the urgent operation
    498 	does not happen as it should in the first case, and in the second case
    499 	time is lost due to waiting for the buffer to be filled.
    500 	This is clearly spoken not grep's fault in the first place, but libc's.
    501 	There is a heuristic in libc that make a stream line-buffered only if a
    502 	terminal is on the other end. This doesn't take care of the cases where
    503 	this connection is somehow indirect.
    504 
    505 	* src/grep.c (line_buffered): new option variable.
    506 	(prline): if line_buffered is set fflush() is call.
    507 	(usage): line_buffered new option.
    508 	Input from Paul Eggert, doing setvbuf() may not be portable
    509 	and breaks grep -z.
    510 
    511 2001-02-16  Alain Magloire
    512 
    513 	Patch from Isamu Hasegawa, for multibyte support.
    514 	This patch prevent kwset_matcher from following problems.
    515 	For example, in SJIS encoding, one character has the codepoint 0x895c.
    516 	So the second byte of the character can match with '\' incorrectly.
    517 	And in eucJP encoding, there are the characters whose codepoints are
    518 	0xa5b9, 0xa5c8.  On the other hand, there is one character whose
    519 	codepoint is 0xb9a5.  So 0xb9a5 can match with 2nd byte of 0xa5b9
    520 	and 1st byte of 0xa5c8.
    521 
    522 	* configure.in: Add check for mbrtowc.
    523 	* src/search.c (check_multibyte_string): new function.
    524 	Support for multibyte string.
    525 	(EGexecute): call check_multibyte_string when kwset is set.
    526 	(Fexecute): call to check_multibyte_string.
    527 	(MBS_SUPPORT): new macro.
    528 	(MB_CUR_MAX): new macro.
    529 
    530 2001-02-16  Alain Magloire
    531 
    532 	* djgpp/config.bat: Fix for 4dos.com.
    533 	* m4/dosfile.m4 (HAVE_DOS_FILE_CONTENTS): Was not set.
    534 	Bugs noted and patched by Juan Manuel Guerrero.
    535 
    536 2001-02-16  Alain Magloire
    537 
    538 	A much requested feature, the possibility to select
    539 	files when doing recurse :
    540 	# find . -name "*.c" | xargs grep main {}
    541 	# grep --include=*.c main .
    542 	# find . -not -name "*.c" | xargs grep main {}
    543 	# grep --exclude=*.c main .
    544 
    545 	* src/grep.c (short_options): -R equivalent to -r.
    546 	(#ifdef) : Fix some inconsistencies in the use of #ifdefs, prefer
    547 	#if defined() wen possible.
    548 	(long_options): Add --color, --include and exclude.
    549 	(Usage): Description of new options.
    550 	(color): Rename color variable to color_option.
    551 	Removed 'always|never|auto' arguments, not necessary for grep.
    552 	(exclude_pattern): new variable, holder for the file pattern.
    553 	(include_pattern): new variable, hoder for the file pattern.
    554 	* src/savedir.c: Signature change, take two new argmuments.
    555 	* doc/grep.texi: Document, new options.
    556 	* doc/grep.man: Document, new options.
    557 
    558 2001-02-09  Alain Magloire
    559 
    560 	* src/grep.c (long_options): Added equivalent to -r with -R.
    561 	* src/grep.c (usage): added --color and --colour.
    562 	Noted with patch from, H.Merijn Brand and Wichert Akkerman.
    563 
    564 2001-02-09  Alain Magloire
    565 
    566 	Patch from Ulrich Drepper to provide hilighting.
    567 
    568 	* src/grep.c: New option --color.
    569 	(color): New static var.
    570 	(COLOR_OPTION): new constant.
    571 	(grep_color): new static var.
    572 	(prline): Now when color is set prline() will call the current matcher
    573 	to find the offset of the matching string.
    574 	* src/savedir.c: Take advantage of _DIRENT_HAVE_TYPE if supported.
    575 	* src/search.c (EGexecute, Fexecute, Pexecute): Take a new argument
    576 	when doing exact match for the color hiligting.
    577 
    578 2000-09-01  Brian Youmans
    579 
    580 	* doc/grep.texi: Typo fixes.
    581 
    582 2000-08-30  Paul Eggert
    583 
    584 	* doc/grep.texi (Usage): Talk about what "grep -r hello *.c"
    585 	means.
    586 
    587 2000-08-20  Paul Eggert
    588 
    589 	Handle range expressions correctly even when they match
    590 	strings with two or more characters.
    591 
    592 	* src/dfa.h (CRANGE): New enum value.  Comment fix.
    593 
    594 	* src/dfa.c: Include <locale.h> if HAVE_SETLOCALE.
    595 	Include "hard-locale.h".
    596 	(prtok): Print CRANGE.
    597 	(hard_LC_COLLATE): New static var.
    598 	(lex): Return CRANGE when parsing a character range in a hard locale.
    599 	Don't use strcoll; it's no longer needed and wasn't correct anyway.
    600 	Use unsigned rather than token to hold unsigned chars.
    601 	(addtok): Comment fix.
    602 	(atom): Treat a CRANGE as if it were (.\1), approximately.
    603 	(dfaparse): Initialize hard_LC_COLLATE.
    604 
    605 	* src/Makefile.am (base_sources): Add hard-locale.c, hard-locale.h.
    606 
    607 	* src/hard-locale.c, src/hard-locale.h: New files, taken from
    608 	textutils.
    609 
    610 2000-08-20  Paul Eggert
    611 
    612 	* tests/Makefile.am (TESTS_ENVIRONMENT): Add LC_ALL=C, since
    613 	some of the tests assume the C locale.
    614 
    615 2000-08-16  Paul Eggert
    616 
    617 	* src/search.c (Gcompile, Ecompile): -x overrides -w, for
    618 	consistency with fgrep.  Don't assume that sizes fit in 'int'.
    619 	Fix comments to match code.
    620 
    621 2000-06-06  Paul Eggert
    622 
    623 	* src/grep.c (grepdir): Don't look at st_dev when testing for
    624 	Mingw32 bug.
    625 
    626 2000-06-05  Paul Eggert
    627 
    628 	Port to Mingw32, based on suggestions from Christian Groessler
    629 	<cpg (a] aladdin.de>.
    630 
    631 	* src/isdir.c: New file, taken from fileutils.
    632 
    633 	* src/Makefile.am (base_sources): Add isdir.c.
    634 
    635 	* src/grep.c (grepfile): Use isdir instead of doing it inline.
    636 	(grepdir): Suppress ancestor check if the directory's inode and device
    637 	are both zero, as that occurs only on Mingw32 which doesn't support
    638 	inode or device.
    639 
    640 	* src/system.h (isdir): New decl.
    641 	(is_EISDIR): Depend on HAVE_DIR_EACCES_BUG, not D_OK.
    642 	Use isdir, not access.
    643 
    644 2000-06-02  Paul Eggert
    645 
    646 	Problen noted by Gerald Stoller <gerald_stoller (a] hotmail.com>
    647 
    648 	* src/grep.c (main): POSIX.2 says that -q overrides -l, which
    649 	in turn overrides the other output options.  Fix grep to
    650 	behave that way.
    651 
    652 2000-05-27  Paul Eggert
    653 
    654 	Simplify and tune the buffer allocation strategy.  Do not reserve a
    655 	large save area: reserve only enough bytes to hold the residue, plus
    656 	page alignment.  Put a newline sentinel before the buffer, for speed
    657 	when searching backwards for newline.
    658 
    659 	* src/grep.c (ubuffer, bufsalloc, PREFERRED_SAVE_FACTOR, page_alloc):
    660 	Remove.  All uses changed.
    661 	(INITIAL_BUFSIZE): New macro.
    662 	(reset, fillbuf): Use simpler buffer allocation strategy.
    663 	(reset): Check for preposterously large pagesize that would cause
    664 	later calculations to overflow.
    665 	(fillbuf): Do not resize buffer if there's room at the end for
    666 	at least one more page.  This greatly increases performance when
    667 	reading from non-regular files that contain no newlines.
    668 	When growing the buffer, double its size instead of using a
    669 	more complicated algorithm.
    670 	(prtext, grep): Speed up by relying on the newline sentinel before the
    671 	start of the buffer.
    672 	(grep): When looking backwards for the last newline in a buffer,
    673 	stop when we hit the residue, since it can't contain a newline.
    674 	This avoids an O(N**2) algorithm when reading binary data from
    675 	a pipe.  Use a sentinel to speed up the backward search for newline.
    676 	(nlscan): Undo previous change; it wasn't needed and just complicates
    677 	and slows down the code a tad.
    678 
    679 2000-05-24  Paul Eggert
    680 
    681 	Handle very large input counts better. Bug noted by Jim Meyering.
    682 
    683 	* src/grep.c (totalcc, totalnl): Use uintmax_t, not off_t.
    684 	(add_count): New function.
    685 	(nlscan, prline, grep): Use it to check line and byte count overflows.
    686 	(nlscan, grep): Don't keep track of counts when not asked to; this
    687 	avoids unnecessary overflow diagnostics.
    688 	(print_offset_sep): Now takes args of type uintmax_t and char,
    689 	not off_t and int.
    690 
    691 2000-05-16  Paul Eggert
    692 
    693 	Problem reported by Bob Proulx <rwp (a] hprwp.fc.hp.com>, this patch
    694 	is base on his finding, with appropiate corrections.
    695 
    696 	* src/grep.c (main): Fix bug: -x and -w matched even when no
    697 	patterns were specified.
    698 	* tests/empty.sh: Test for -x and -w bug in grep 2.4.2.
    699 
    700 2000-04-24  Paul Eggert
    701 
    702 	POSIX.2 conformance fixes: grep -q now exits with status zero
    703 	if an input line is selected, even if an error also occurs.
    704 	grep -s no longer affects exit status.
    705 
    706 	* src/grep.c (suppress_errors): Move definition earlier so
    707 	that suppressible_error can use it.
    708 	(suppressible_error): New function.
    709 	(exit_on_match): New var.
    710 	(grepbuf): If exit_on_match is nonzero, exit with status zero
    711 	immediately.
    712 	(grep, grepfile, grepdir): Invoke suppressible_error.
    713 	(main): -q sets exit_on_match.
    714 
    715 	* doc/grep.1, doc/grep.texi, NEWS:
    716 	Document -q's behavior as required by POSIX.2.
    717 
    718 	* tests/status.sh:
    719 	Test for -q and -s behavior as conforming to POSIX.2.
    720 
    721 2000-04-20  Paul Eggert
    722 
    723 	* tests/Makefile.am (TESTS_ENVIRONMENT):
    724 	Set GREP_OPTIONS to the empty string.
    725 
    726 2000-04-20  Paul Eggert
    727 
    728 	* tests/status.sh: Fix typo: test -b -> test -r.
    729 
    730 2000-04-20  Paul Eggert
    731 
    732 	* src/dfa.c (lex):
    733 	Do not assume that [c] is equivalent to [c-c]; this isn't true
    734 	if LC_COLLATE specifies that some characters are equivalent.
    735 	(setbit_case_fold): New function.
    736 	(lex): Use it to simplify the code a bit.
    737 
    738 2000-04-17  Paul Eggert
    739 
    740 	Do CRLF munging only if HAVE_DOS_FILE_CONTENTS, instead of
    741 	having it depend on O_BINARY (which leads to incorrect results
    742 	on BeOS, VMS, and MacOS).
    743 
    744 	* bootstrap/Makefile.try (DEFS): Add -DHAVE_DOS_FILE_CONTENTS.
    745 	* src/system.h (SET_BINARY): Define only if HAVE_DOS_FILE_CONTENTS.
    746 	(O_BINARY): Do not define.
    747 
    748 	* m4/dosfile.m4: Define HAVE_DOS_FILE_CONTENTS if it appears we're
    749 	using DOS.
    750 
    751 	* src/grep.c (undossify_input, fillbuf, dosbuf.c, prline, main):
    752 	Depend on HAVE_DOS_FILE_CONTENTS, not O_BINARY, when handling CRLF
    753 	matters.
    754 	(grepfile, main): Depend on SET_BINARY, not O_BINARY, when
    755 	handling binary files on hosts that care about text versus binary.
    756 
    757 2000-04-17  Paul Eggert
    758 
    759 	* lib/getpagesize.h (getpagesize): Define to B_PAGE_SIZE if
    760 	__BEOS__ is defined.  Based on a fix by Bruno Haible
    761 	<haible (a] clisp.cons.org>.
    762 
    763 2000-04-17  Bruno Haible
    764 
    765 	* src/system.h [BeOS]: Ignore O_BINARY.
    766 	* src/getpagesize.h [BeOS]: Define getpagesize() as B_PAGE_SIZE.
    767 
    768 2000-04-10  Paul Eggert
    769 
    770 	* doc/grep.1, doc/grep.texi, NEWS: -C now requires an operand.
    771 	* src/grep.c (short_options, long_options, main, usage): Likewise.
    772 	(context_length_arg): Renamed from ck_atoi.  Now reports an error
    773 	and exits if the number is out of range for a context length.
    774 	(get_nondigit_option): New function, which checks for overflow
    775 	correctly, and which does not parse nonadjacent strings of digits
    776 	into a single number.
    777 	(main): Use get_nondigit_option instead of doing the code inline.
    778 	With -A, -B, and -C, optarg is now guaranteed to be nonzero.
    779 
    780 2000-04-08  Paul Eggert
    781 
    782 	Now that we know that the input is always terminated by a
    783 	newline before the matching algorithms see it, clean up the
    784 	matching algorithms so that they no longer need to modify the
    785 	input by inserting a sentinel newline, and no longer worry
    786 	about running off the end of the buffer due to a missing sentinel.
    787 
    788 	* src/grep.c (nlscan, prpending, prtext, grepbuf): Do not
    789 	worry about running off the end of the input buffer, since
    790 	it's now guaranteed to end in the sentinel newline.
    791 	* src/search.c (EGexecute, Pexecute): Likewise.
    792 
    793 	* src/dfa.c (prtok, dfasyntax, dfaparse, copy, merge, state_index,
    794 	epsclosure, dfaexec, dfacomp):
    795 	Change many instances of "T *" to "T const *", to catch
    796 	any inadvertent programming errors made during this conversion.
    797 	* src/dfa.h (dfacomp, dfaexec, dfaparse): Likewise.
    798 	* src/grep.c (struct stats.parent, long_options, grepdir,
    799 	compile, execute, fillbuf, lastnl, lastout, nlscan, prline,
    800 	prpending, prtext, grepbuf, grep, grepfile, grepdir): Likewise.
    801 	* src/grep.h (struct matcher.compile, struct matcher.execute):
    802 	Likewise.
    803 	* src/kwset.c (struct kwset.trans, kwsalloc, kwsincr, treefails,
    804 	treedelta, hasevery, treenext, bmexec, cwexec, kwsexec): Likewise.
    805 	* src/kwset.h (kwsalloc, kwsincr, kwsexec): Likewise.
    806 	* src/search.c (kwsmusts, Gcompile, Ecompile, EGexecute, Pcompile,
    807 	Pexecute): Likewise.
    808 
    809 	* src/dfa.c (dfaexec):
    810 	Use size_t, not char *, to avoid worrisome casts to convert
    811 	char const * to char *.
    812 	* src/dfa.h (dfaexec): Likewise.
    813 	* src/grep.c (execute): Likewise.
    814 	* src/grep.h (execute): Likewise.
    815 	* src/kwset.c (bmexec, cwexec, kwsexec): Likewise.
    816 	* src/kwset.h (struct kwsmatch.offset, kwsalloc, kwsincr,
    817 	kwsexec): Likewise.
    818 	* src/search.c (EGexecute, Fexecute, Pexecute): Likewise.
    819 
    820 	* src/dfa.h (_PTR_T): Depend on defined __STDC__, not __STDC__.
    821 	(PARAMS): Depend on PROTOTYPES, not __STDC__.
    822 
    823 	* src/dfa.c (dfasyntax): Last arg is unsigned char, not int.
    824 	* src/dfa.h (dfasyntax): Likewise.
    825 
    826 	* src/dfa.h (struct dfa): Remove member newlines; no longer needed.
    827 	* src/dfa.c (build_state, dfaexec, dfafree): Do not worry
    828 	about special newline state.
    829 
    830 	* src/search.c (matchers): Move definition to end of file, so
    831 	that we don't need forward decls.
    832 	(lastexact): Remove.
    833 	(kwset_exact_matches): New var; subsumes old lastexact var.
    834 	All uses changed.
    835 
    836 	* src/dfa.c (index): Remove macro.
    837 	(REALLOC_IF_NECESSARY): Skip unnecessary test.
    838 	(tstbit, setbit, clrbit): Declare arg to be unsigned, to help compiler.
    839 	(copyset, zeroset, equal): Use C builtin primitives, to help compiler.
    840 	(dfaexec): Do not modify input string.
    841 	Remove newline parameter; no longer needed.
    842 	(comsubs): Use strchr, not index.
    843 
    844 	* src/grep.h (matchers): Use fixed name size, not pointer (as
    845 	there's no need for the extra flexibility).  All uses changed.
    846 
    847 	* src/kwset.h (struct kwsmatch.offset): Renamed from beg, with
    848 	change of type to size_t.  All uses changed.
    849 
    850 	* src/grep.c (reset): No longer need kludge for dfaexec.  Simplify.
    851 	(reset, grepbuf): Adjust to new interface for 'execute'.
    852 	(install_matcher): List is now terminated by null compile,
    853 	not null name.
    854 	Do not invoke setrlimit if that wouldn't change the limit.
    855 
    856 	* src/dfa.c (xcalloc, xmalloc, xrealloc, prtok, tstbit, setbit,
    857 	clrbit, copyset, zeroset, notset, equal, charclass_index,
    858 	looking_at, lex, addtok, atom, nsubtoks, copytoks, closure,
    859 	branch, regexp, copy, insert, merge, delete, state_index,
    860 	build_state, build_state_zero, icatalloc, icpyalloc, istrstr,
    861 	ifree, freelist, enlist, comsubs, addlists, inboth):
    862 	Remove forward decls; no longer needed.
    863 	* src/grep.c (ck_atoi, usage, error, setmatcher,
    864 	install_matcher, prepend_args, prepend_default_options,
    865 	page_alloc, reset, fillbuf, grepbuf, prtext, prpending, prline,
    866 	print_offset_sep, nlscan, grep, grepfile): Likewise.
    867 	* src/kwset.c (enqueue, treefails, treedelta, hasevery,
    868 	treenext, bmexec, cwexec): Likewise.
    869 	* src/search.c (Gcompile, Ecompile, EGexecute, Fcompile, Fexecute,
    870 	Pcompile, Pexecute, kwsinit): Likewise.
    871 
    872 	* src/search.c (Pcompile): Do not assume newly allocated
    873 	storage is zeroed.
    874 
    875 2000-04-06  Paul Eggert
    876 
    877 	* doc/grep.1, doc/grep.texi, NEWS: Improve the explanation of
    878 	locale-dependent behavior of range expressions.  Mention
    879 	LC_COLLATE, since this affects range expressions.
    880 
    881 2000-03-26  Paul Eggert
    882 
    883 	* Makefile.am (ACINCLUDE_INPUTS): Add decl.m4, inttypes_h.m4,
    884 	uintmax_t.m4, ulonglong.m4, xstrtoumax.m4.
    885 	* m4/Makefile.am (EXTRA_DIST): Likewise.
    886 
    887 	* src/Makefile.am (base_sources):
    888 	Add xstrtol.c, xstrtol.h, xstrtoumax.c.
    889 	(EXTRA_DIST): Add strtol.c.
    890 
    891 	* configure.in (jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX,
    892 	HAVE_DECL_STRTOUL, HAVE_DECL_STRTOULL): Add.
    893 	(AC_REPLACE_FUNCS): Add strtoul.
    894 
    895 	* src/grep.c: Include xstrtol.h.
    896 	(ck_atio): Use xstrtoumax and do proper overflow checking.
    897 	(max_count, outleft): Now off_t, not int.
    898 	(main): Likewise. Use xstrtoumax to convert max_count from string.
    899 
    900 	* acconfig.h (HAVE_DECL_STRTOUL, HAVE_DECL_STRTOULL): New #undefs.
    901 	(HAVE_STPCPY, ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
    902 	HAVE_LC_MESSAGES): Remove.
    903 
    904 	* m4/decl.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4,
    905 	m4/xstrtoumax.m4, src/strtol.c, src/strtoul.c, src/strtoull.c,
    906 	src/strtoumax.c, src/xstrtol.c, src/xstrtol.h, src/xstrtoumax.c:
    907 	New files, taken unchanged from textutils, fileutils, sh-utils
    908 	and/or tar.
    909 
    910 2000-03-23  Paul Eggert
    911 
    912 	* src/search.c (Pcompile): Add support for NUL bytes in
    913 	Perl regular expressions.
    914 
    915 2000-03-23  Paul Eggert
    916 
    917 	* NEWS, doc/grep.1, doc/grep.texi: Change --pcre to --perl-regexp.
    918 	* src/grep.c (long_options, usage): Likewise.
    919 
    920 	* doc/grep.1, doc/grep.texi: Remove pgrep program.
    921 	* src/Makefile.am (bin_PROGRAMS): Likewise.
    922 	(pgrep_SOURCES): Remove.
    923 
    924 	* src/grep.c (main): Rename matcher from "pgrep" to "perl".
    925 	* src/search.c (matchers): Likewise.
    926 
    927 	* src/search.c: Do not include stdio.h; no longer needed.
    928 	(NILP): Remove.
    929 	(sub): No longer static.
    930 	(n_pcre): Remove.
    931 	(cre): No longer an array.  Present only if HAVE_LIBPCRE.
    932 	(extra): New variable.
    933 	(Pcompile): Use fatal to report errors.
    934 	This also removes a possible core dump.
    935 	Add checks (marked FIXME) for restrictions in pcre.
    936 	Use pcre_maketables for proper localized behavior.
    937 	(Pcompile, Pexecute): Use GNU coding style.
    938 	The argument is a single pattern, not a list of patterns separated
    939 	by newlines; this is for consistency with grep and egrep.
    940 	Use pcre_study for speed.
    941 	(Pexecute): Abort if we lack pcre.
    942 	Abort if pcre_exec reports an impossible error.
    943 	Use code similar to the rest of search.c
    944 	to narrow down to the line we've found.
    945 
    946 2000-03-21  Alain Magloire
    947 
    948 	* configure.in: added AC_CHECK_LIB(pcre, pcre_exec)
    949 	* ChangeLog: Typos corrected.
    950 	* src/search.c: new MACRO HAVE_LIBPCRE
    951 
    952 2000-03-21  H.Merijn Brand
    953 
    954 	* src/Makefile.am(bin_PROGRAMS): added pgrep and new macro
    955 	pgrep_SOURCES.
    956 	* src/search.c: new functions Pcompile() and Pexecute()
    957 	to support PCRE.  Update matcher[] array for pgrep.
    958 	* src/grep.c: new short and long option --pcre and -P.
    959 	usage() updated.
    960 
    961 2000-03-21  Bastiaan Stougie
    962 
    963 	Improvement of the -m or --max-count option. Now works for NUM > 1 and
    964 	prints trailing context for the last matching line.
    965 
    966 	* src/grep.c
    967 	(after_last_match): Is a new off_t variable that replaces inputhwm
    968 	to retain the correct input offset even after a call to fillbuf. Note
    969 	that after_last_match has a different meaning than inputhwm:
    970 	it always points to the offset in the input of the first byte after
    971 	the last matching line, and is 0 if no matching line has been found
    972 	yet.
    973 	(grep): Print trailing context after the NUMth match when the -m NUM
    974 	option is used.
    975 	(grep): Added comment. Should have been commented already.
    976 	(grepbuf): Now updates outleft correctly. This fixes the bug that the
    977 	-m NUM option did not stop after NUM lines for NUM greater than 1.
    978 	(grepbuf, prtext): Now update after_last_match instead of inputhwm.
    979 	(fillbuf): No longer updates inputhwm.
    980 	(prpending): When outputting trailing context of the max_count-th
    981         matching line, stop at the first matching line.
    982 	(grepfile): Seek to after_last_match or eof, depending on the values
    983         of outleft and bufmapped.
    984 	(usage): added the -m or --max-count option to the help message.
    985 	* doc/grep.texi, doc/grep.1: Document the change of the -m option.
    986 
    987 2000-03-17  Paul Eggert
    988 
    989 	Add new -m or --max-count option, based on a suggestion by
    990 	Bastiaan Stougie.
    991 
    992 	* doc/grep.texi, doc/grep.1: Document it.
    993 	* src/grep.c (short_options, long_options, main): Add it.
    994 	(inputhwm): New variable.
    995 	(fillbuf, prtext, grepbuf): Set it.
    996 	(bufmapped): Now a macro (defined to zero) if HAVE_MMAP is not defined.
    997 	(max_count, outleft): New variables.
    998 	(prtext, grepbuf, grep): Don't output more than outleft lines.
    999 	(grepfile): If grepping standard input, seek to the limit of what
   1000 	we've read before exiting.  This fixes a bug with mmapped input,
   1001 	and is needed for proper -m support.
   1002 	(main): Exit immediately if -m 0 is specified.
   1003 
   1004 2000-03-08  Alain Magloire
   1005 
   1006 	* configure.in: version 2.4.2
   1007 
   1008 2000-03-07  Paul Eggert
   1009 
   1010 	* Make intl subdirectory match fileutils, tar, etc.;
   1011 	see intl/ChangeLog for details.
   1012 
   1013 	* src/getpagesize.h: Reformat to match latest fileutils.
   1014 
   1015 	* src/savedir.c (savedir): Work even if directory size is
   1016 	negative; this can happen with some NFS screwups.
   1017 
   1018 2000-03-03  Jim Meyering
   1019 
   1020 	* regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
   1021 
   1022 2000-03-02  Alain Magloire
   1023 
   1024 	* 2.4.1 Release
   1025 
   1026 2000-02-25  Paul Eggert
   1027 
   1028 	* configure.in (LIBOBJS): Work around automake 1.4 bug:
   1029 	regex.c wasn't being passed through ansi2knr on pre-ANSI hosts.
   1030 	(ac_use_included_regex): Fix typo in warning.
   1031 	* src/Makefile.am (EXTRA_DIST): Remove regex.c, as the LIBOBJS
   1032 	workaround means that automake now puts regex.c into DIST_COMMON.
   1033 
   1034 2000-02-25  Alain Magloire
   1035 
   1036 	* po/*.po: update of the PO files.
   1037 
   1038 2000-02-22  Eli Zaretskii
   1039 
   1040 	* doc/grep.1:  Two small glitches(typos).
   1041 
   1042 2000-02-18  Eli Zaretskii
   1043 
   1044 	* djgpp/config.site (prefix, INSTALL): Use /dev/env/DJDIR instead
   1045 	of ${DJDIR}, so that the produced Makefile's work on any DJGPP
   1046 	installation.
   1047 
   1048 2000-01-30 Alain Magloire
   1049 
   1050 	* doc/grep.1:  corrected typo.
   1051 	Noted by Ruslan Ermilov.
   1052 
   1053 2000-01-30 Alain Magloire
   1054 
   1055 	* vms/Makefile.am: added config_vms.h to EXTRA_DIST.
   1056 	* vms/config_vms.h: New File, contains macros specific to VMS and
   1057 	avoid namespace collision with operating system supplied C library.
   1058 	* vms/make.com: Better compiler auto-detection; information for builds
   1059 	on pre-OpenVMS 7.x systems; general overhaul.
   1060 	* src/getpagesize.h: Reinstate support for different pagesizes on
   1061 	VAX and Alpha. Work around problem with DEC C compiler.
   1062 	* src/vms_fab.c: Cast to some assigments; fixed typo argcp vs. argp.
   1063 	* src/vms_fab.h: Added new include files to avoid warnings about
   1064 	undefined function prototypes.
   1065 	Those patches were provided by Martin P.J. Zinser (zinser (a] decus.de).
   1066 
   1067 2000-01-30  Paul Eggert
   1068 
   1069         * src/grep.c (main): Update copyright notice.
   1070 
   1071 2000-01-28  Alain Magloire
   1072 
   1073 	* src/grep.c (usage):  The example "%s -i 'hello.*world' could
   1074 	lead to confusion when progname is 'fgrep.
   1075 	Noted by Akim Demaille.
   1076 
   1077 	* configure.in: Reenable, jm_INCLUDE_REGEX() since we now
   1078 	track GNU lib C.
   1079 	* src/Makefile.am: EXTRA_DIST new macros with regex.c regex.h.
   1080 	Requested By Ulrich Drepper.
   1081 
   1082 2000-01-25  Paul Eggert
   1083 
   1084 	* src/grep.c (grep): If the final byte of an input file is not
   1085 	a newline, grep now silently supplies one.
   1086 	* doc/grep.texi, NEWS: Likewise.
   1087 
   1088 2000-01-25  Paul Eggert
   1089 
   1090 	* NEWS, doc/grep.1, doc/grep.texi: Add -I option.
   1091 	* src/grep.c (short_options, usage, main): Likewise.
   1092 
   1093 	* doc/grep.texi: Fix some incorrect references to ASCII.
   1094 
   1095 2000-01-25  Paul Eggert
   1096 
   1097 	* doc/grep.1: Simplify synopsis; sort options; mention
   1098 	environment variables; clean up some minor gaffes.
   1099 
   1100 2000-01-25  Paul Eggert
   1101 
   1102 	* doc/grep.texi:
   1103 	Fix some errors in description of [:print:] and the like.
   1104 
   1105 2000-01-23  Paul Eggert
   1106 
   1107 	* src/dfa.c (FETCH, lex): Put brackets around if-body to avoid
   1108 	GCC warning about ambiguous if-then-else.
   1109 
   1110 2000-01-23  Paul Eggert
   1111 
   1112 	* src/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits.
   1113 	* src/dfa.c (ISASCIIDIGIT): New macro.
   1114 	(lex): Use it instead of ISDIGIT.
   1115 
   1116 2000-01-23  Paul Eggert
   1117 
   1118 	The bug is that regular expression ranges like [a-z] compare raw
   1119 	byte codes to the range boundaries, whereas POSIX says that they
   1120 	should use the current collating sequence instead.  For example,
   1121 	in Solaris 7 with LC_ALL=en_US, the command
   1122 	echo x | grep '[ -~]'
   1123 	outputs 'x', but it shouldn't output anything since ' ' and '~'
   1124 	sort before all letters in that locale.
   1125 
   1126 	* src/regex.c (compile_range): When matching a character
   1127 	range, use the current collating sequence, as POSIX requires.
   1128 	* src/dfa.c (lex): Likewise.
   1129 
   1130 2000-01-20  Alain Magloire
   1131 
   1132 	* tests/Makefile.am (dist-hook): Added new rule to make sure
   1133 	that the shell scripts have the right permissions.
   1134 	* src/posix/Makefile.am (EXTRA_DIST): added regex.h in the
   1135 	distribution.
   1136 	* THANKS: updated.
   1137 
   1138 2000-01-18  Alain Magloire
   1139 
   1140 	* Rectification the initial patch to add --binary-file option
   1141 	was done by Ruslan Ermilov.
   1142 
   1143 2000-01-17  Paul Eggert
   1144 
   1145 	Sync with sources of fileutils 4.0n, tar 1.13.17, glibc 2.1.3a1.
   1146 	Convert to ANSI C prototypes (using ansi2knr for backwards
   1147 	compatibility), as this makes it easier to sync.
   1148 
   1149 	* configure.in (AC_OBJEXT): Spell in a funny way, to work around
   1150 	a bug in automake 1.4 with ansi2knr.
   1151 	(LIBOBJS): Add assignment so that .o files in LIBOBJS are also built
   1152 	via the ANSI2KNR-filtering rules.
   1153 	(AC_OUTPUT): Add src/posix/Makefile.
   1154 	* src/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
   1155 	(SUBDIRS): New macro.
   1156 	* src/ansi2knr.1, src/ansi2knr.c, src/posix/Makefile.am: New files.
   1157 	* src/dfa.c, src/dosbuf.c, src/grep.c, src/kwset.c, src/search.c,
   1158 	src/vms_fab.c:
   1159 	Use prototypes for function definitions.
   1160 	* src/grep.c (main): Use int counter for default context,
   1161 	fixing an ANSI portability bug uncovered by the above changes.
   1162 
   1163 	* config.guess, config.sub, install-sh, missing, src/alloca.c,
   1164 	src/getpagesize.h, src/memchr.c, src/savedir.c, src/savedir.h,
   1165 	src/stpcpy.c:
   1166 	Upgrade to latest version from fileutils 4.0n.
   1167 
   1168 	* src/getopt.c, src/getopt.h, src/getopt1.c: Upgrade to latest
   1169 	version from tar 1.13.17.
   1170 
   1171 	* src/obstack.c, src/obstack.h, src/regex.c, src/regex.h:
   1172 	Upgrade to glibc 2.1.3 alpha 1, with K&R C portability fix.
   1173 	* src/posix/regex.h: New file, from glibc 2.1.3 alpha 1.
   1174 
   1175 2000-01-04  Paul Eggert
   1176 
   1177 	Initial patch by Ruslan Ermilov.
   1178 
   1179 	Add --binary-files option.
   1180 	* NEWS, doc/grep.1, doc/grep.texi: Document it.
   1181 	* src/grep.c (BINARY_FILES_OPTION): New constant.
   1182 	(long_options, grep, usage, main): New --binary-files option.
   1183 	(binary_files): New var.
   1184 	* src/system.h (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, CHAR_MAX):
   1185 	New macros.
   1186 	(INT_MAX, UCHAR_MAX): Define in terms of TYPE_MAXIMUM.
   1187 
   1188 2000-01-04  Paul Eggert
   1189 
   1190 	* savedir.c (savedir): Don't store past the end of an array if
   1191 	name_size is zero and the directory is empty.
   1192 	Reported by Dima Barsky <dima (a] pwd.hp.com>.
   1193 
   1194 1999-12-03  Alain Magloire
   1195 
   1196 	* 2.4 Release.
   1197 
   1198 1999-11-18  Paul Eggert
   1199 
   1200 	* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
   1201 	problem with the QNX 4.25 shell, which doesn't propagate exit
   1202 	status of failed commands inside shell assignments.
   1203 
   1204 1999-11-13  Eli Zaretskii
   1205 
   1206 	* doc/grep.texi: Minor markup and spelling corrections.  Use
   1207 	@noindent where appropriate.
   1208 
   1209 	* PATCHES-{AM,AC}: rename to PATCHES.{AM,AC}
   1210 
   1211 1999-11-12  Eli Zaretskii
   1212 
   1213 	doc/grep.texi: Minor fixes and typos corrected.
   1214 	djgpp/README: Updated version.
   1215 
   1216 1999-11-07  Paul Eggert
   1217 
   1218 	* src/grep.c (usage): Fix misspelling.
   1219 
   1220 1999-11-07  Paul Eggert
   1221 
   1222 	Don't assume that the C library has re_set_syntax and friends.
   1223 	* src/Makefile.am (base_sources): Add regex.c, regex.h.
   1224 	(EXTRA_DIST): Remove regex.c, regex.h.
   1225 
   1226 	* src/grep.c (prtext): Use out_quiet, not not_text, to decide
   1227 	whether to set pending to zero at the end.
   1228 	(not_text): Remove static variable, undoing latest change.
   1229 	(grep): Likewise.
   1230 
   1231 	* doc/grep.texi: Tighten up the text, and fix some minor
   1232 	spelling and usage errors.  Use @enumerate rather than @table
   1233 	@samp, since it's better for Q&A format.  Add cross
   1234 	references.
   1235 
   1236 1999-11-01 Alain Magloire
   1237 
   1238 	* src/search.c: Use the more portable [[:alnum:]]
   1239 	to define a word instead of Ascii dependent [0-9A-Za-z]
   1240 	* src/grep.c: make not_text global to not display text when
   1241 	the context switches -A/-B/-C are use on binary files.
   1242 	* make grep-2.3g available for testing.
   1243 	* configure.in: drop support for --without-included-regex.
   1244 	This was generating bogus bug reports, since many GNU/Linux
   1245 	users have different version of glibc.  And glibc maintainers
   1246 	decided to drop k&r support.
   1247 
   1248 1999-11-01 Arnold D. Robbins
   1249 
   1250 	* regex.c (init_syntax_once): move below definition of
   1251 	ISALNUM etc., then use ISALNUM to init the table, so that
   1252 	the word ops will work if i18n'ed.
   1253 	(SYNTAX): And subscript with 0xFF for Latin-1 characters.
   1254 
   1255 1999-10-26  Alain Magloire
   1256 
   1257 	* src/regex.c: Merge changes from GNU lib C.
   1258 	* Updated the *.po files
   1259 
   1260 1999-10-26  Paul Eggert
   1261 
   1262 	* src/grep.c (fillbuf): Don't report buffer size overflow if
   1263 	newalloc == save and maxalloc == save.  This can happen
   1264 	e.g. when reading a large page-aligned file that contains
   1265 	no newlines.
   1266 
   1267 1999-10-21  Paul Eggert
   1268 
   1269 	* src/grep.c (usage): Give example.  Clarify -F.
   1270 	Explain exit status more clearly.
   1271 
   1272 1999-10-12  Paul Eggert
   1273 
   1274 	* doc/grep.texi: Shorten the commentary about egrep and {.
   1275 	"BSD grep" -> "traditional grep".
   1276 	* doc/grep.1: Match recent changes to grep.texi.
   1277 
   1278 1999-10-11  Paul Eggert
   1279 
   1280 	* NEWS, doc/grep.1, doc/grep.texi: New option --mmap.
   1281 	* src/grep.c (mmap_option): New variable.
   1282 	(long_options, reset, usage): Add --mmap.
   1283 	Default is now read, not mmap.
   1284 
   1285 	* doc/grep.1: Document -Z or --null.
   1286 
   1287 1999-10-11  Paul Eggert
   1288 
   1289 	* doc/grep.texi: Fix texinfo glitches.  POSIX -> POSIX.2 where
   1290 	appropriate.
   1291 
   1292 1999-10-11  Paul Eggert
   1293 
   1294 	* acconfig.h (ssize_t): New #undef.
   1295 
   1296 	* configure.in (AC_CHECK_TYPE): Add ssize_t.
   1297 
   1298 	* src/grep.c (PREFERRED_SAVE_FACTOR): New macro.
   1299 	(reset): If the buffer has already been allocated, set bufsalloc to
   1300 	be bufalloc / PREFERRED_SAVE_FACTOR.  This avoids problems when
   1301 	bufsalloc == bufalloc (possible after reading a large binary file).
   1302 	(reset): Use PREFERRED_SAVE_FACTOR instead of magic constant.
   1303 	Do not set bufbeg; nobody uses it.
   1304 	Always set buflim.
   1305 	Check for lseek error.
   1306 	Use SEEK_CUR, not a magic constant.
   1307 	(fillbuf): Return an error indication, not a count.
   1308 	All callers changed.
   1309 	Do not assume ssize_t fits in int.
   1310 	Use PREFERRED_SAVE_FACTOR instead of magic constant.
   1311 	Clean up mmap code.
   1312 	Do not attempt to mmap zero bytes.
   1313 	Check for lseek error.
   1314 	Use SEEK_SET, not a magic constant.
   1315 	Work correctly if read is interrupted.
   1316 	(grepfile): Work correctly if open or close is interrupted.
   1317 
   1318 	* src/system.h (SEEK_SET, SEEK_CUR): New macros.
   1319 
   1320 1999-10-02 Alain Magloire
   1321 
   1322 	* src/regex.[ch]: upgrade from GNU lib C source tree.
   1323 
   1324 	* make beta 2.3f available.
   1325 
   1326 1999-10-02  Paul Eggert
   1327 
   1328 	* NEWS: egrep is now equivalent to `grep -E'.
   1329 	The lower bound of an interval is not optional.
   1330 	You can specify a matcher multiple types without error.
   1331 	-u and -U are now allowed on non-DOS hosts, and have no effect.
   1332 	* doc/grep.texi: Likewise.
   1333 	* doc/grep.1: Likewise.
   1334 	Fix some troff bugs that prevented `groff' from rendering the page.
   1335 
   1336 	* src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher):
   1337 	Remove.
   1338 	(matcher): Add.
   1339 	* src/grep.h (default_matcher): Remove.
   1340 	(matcher): Now exported from ?grepmat.c, not grep.c.
   1341 
   1342 	* src/dfa.c (lex): If { would start an invalid interval specification,
   1343         treat it as a normal character.
   1344         Remove (broken) support for {,M} meaning {0,M}.
   1345         Diagnose bogus intervals like {1,0}.
   1346         (closure): maxrep is now -1 to indicate no limit, not zero;
   1347         zero is a valid value for maxrep, meaning an upper bound of zero.
   1348 
   1349 	* src/grep.c (short_options): New constant.
   1350 	(long_options, main): -u and -U are now supported on Unix,
   1351 	with no effect.
   1352 	(matcher): Removed; now defined by ?grepmat.c.
   1353 	(install_matcher): Renamed from setmatcher.
   1354 	(setmatcher): New function.
   1355 	(usage): Report new, more uniform option scheme.
   1356 	(main): Do not initialize matcher; ?grepmat.c now does this.
   1357 	Rely on setmatcher to catch matcher conflicts.
   1358 	Default matcher is "grep".
   1359 
   1360 	* src/search.c (matchers):
   1361 	Remove "posix-egrep" matcher; no longer needed.
   1362 	(Ecompile): Likewise.
   1363 	The egrep matcher now has POSIX behavior.
   1364 
   1365 	* tests/bre.tests: grep '\{' is no longer an error.
   1366 	Fix test for interval too large, and enable it.
   1367 	* tests/ere.tests: grep -E {1 is no longer an error
   1368 	Likewise for a{1, a{1a, a{1a}, a{1,x}.
   1369 
   1370 1999-09-22  Paul Eggert
   1371 
   1372 	* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
   1373 	2.95.1 bug with HP-UX 10.20.
   1374 
   1375 1999-09-12  Paul Eggert
   1376 
   1377 	* src/grep.c (fillbuf): Fix typo: we sometimes reported
   1378 	arithmetic overflow even when there wasn't any.
   1379 
   1380 1999-09-12  Paul Eggert
   1381 
   1382 	* configure.in (AC_CHECK_FUNCS): Add memmove.
   1383 
   1384 	* src/system.h (S_ISREG): New macro.
   1385 	(memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove,
   1386 	not if !defined STDC_HEADERS.  This is needed for SunOS 4.1.4,
   1387 	which defines STDC_HEADERS but lacks memmove.
   1388 
   1389 	* src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP.
   1390 	(reset): Always fstat the file, since we always need its size if it is
   1391 	regular.
   1392 	Similarly, get the buffer offset of every regular file.
   1393 	Set bufmapped to 0 if the file's initial offset is not a multiple
   1394 	of the page size.
   1395 	(fillbuf): Calculate an upper bound on how much memory we should
   1396 	allocate only for regular files, since we don't know the sizes of
   1397 	other files.
   1398 	Don't bother to check whether the file offset is a multiple of the page
   1399 	size, since we now do that just once in `reset'.
   1400 	When an mmapped area would fall past the end of the file, trim it to
   1401 	just before instead of giving up immediately and doing a `read';
   1402 	that avoids a worst-case behavior that could read half an mmapped file.
   1403 	Fix bug when computing offsets on hosts that don't have mmap.
   1404 
   1405 1999-08-27  Paul Eggert
   1406 
   1407 	* src/system.h (memmove): New macro.
   1408 
   1409 	* src/grep.c (page_alloc): Reallocate the old buffer instead
   1410 	of having both old and new buffers active simultaneously.
   1411 	Remove valloc debugging variant, which no longer applies.
   1412 
   1413 	(fillbuf): Rejigger the buffer allocation mechanism.  The old
   1414 	mechanism could allocate more than 10*N bytes for an N-byte
   1415 	file, which was excessive.  Check for arithmetic overflow a
   1416 	bit more carefully.
   1417 
   1418 1999-08-25  Paul Eggert
   1419 
   1420 	* src/grep.c (grepdir):
   1421 	Don't assume that st_ino and st_dev must be integers;
   1422 	POSIX.1 allows them to be floating-point (!).
   1423 
   1424 	* src/vms_fab.h (arr_ptr): `:' -> `;' to fix typo.
   1425 
   1426 1999-08-18  Alain Magloire
   1427 
   1428 	* 2.3e snapshot.
   1429 
   1430 1999-08-18  Alain Magloire
   1431 
   1432 	* src/search.c: On a CRAY J90 system running UNICOS 8.0.
   1433 	Compilation of ./src/search.c failed because the declaration of
   1434 	the variable "regex":
   1435 	  static struct re_pattern_buffer regex;
   1436 	conflicted with a previous declaration search.c #includes "system.h",
   1437 	which #includes <stdlib.h>, which declares :
   1438         extern char *regex __((char *_Re, char *_Subject, ...));
   1439 	The declaration in search.c is local to that one source file.
   1440 	I just changed its name to something less likely to conflict.
   1441 	(I called it "regexbuf", but you could pick any name you want.)
   1442 	Excerpt email from Dean Kopesky.
   1443 
   1444 1999-08-16  Paul Eggert
   1445 
   1446 	Upgrade large-file support to the version used in tar and
   1447 	textutils.
   1448 
   1449 	* Makefile.am (ACLOCAL_AMFLAGS): Define to be empty.
   1450 	(M4DIR, ACINCLUDE_INPUTS): New macros.
   1451 	($(srcdir)/acinclude.m4): New rule.
   1452 
   1453 	* configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add.
   1454 	(AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility
   1455 	with what should appear in the next autoconf release.
   1456 
   1457 	* m4/largefile.m4: Renamed from m4/lfs.m4.
   1458 
   1459 	* src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub:
   1460 	New files.  config.guess and config.sub ar needed by the new
   1461 	AC_SYS_LARGEFILE.  ansi2knr is needed by AM_C_PROTOTYPES,
   1462 	which in turn is needed by the new AC_SYS_LARGEFILE.
   1463 
   1464 1999-08-16  Alain Magloire
   1465 
   1466 	* 2.3d snapshot on ftp server.
   1467 
   1468 1999-07-26  Paul Eggert
   1469 
   1470 Several GNU tools have options to process arbitrary file names, even
   1471 file names that contain newline characters.  These include `find
   1472 -print0', `perl -0', `sort -z', and `xargs -0'.  It'd be handy if GNU
   1473 grep also processed such file names.  Here's a proposed patch to do
   1474 this, relative to grep 2.3c.  This patch introduces two options, one
   1475 for the data, and one for the file names.  (Sometimes one wants
   1476 null-terminated file names in the output, and sometimes one wants to
   1477 process lists of null-terminated strings, and these are orthogonal
   1478 axes.)
   1479 
   1480         * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options.
   1481         * src/grep.c (long_options, usage, main): Likewise.
   1482 
   1483         * src/dfa.h (dfasyntax): New eol parameter.
   1484         * src/dfa.c (eolbyte): New var.
   1485         (dfasyntax): Set it from new parameter.
   1486         (lex, dfastat, build_state, dfaexec): Use it instead of '\n'.
   1487 
   1488         * src/grep.h (eolbyte): New decl.
   1489         * src/grep.c (eolbyte): New var.
   1490         (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'.
   1491         (filename_mask): New var.
   1492         (prline, grepfile): Output NUL separator if filename_mask is zero.
   1493         (grep): Look for '\200' as the hallmark of a binary file, not '\0',
   1494         if -z or --null-data is specified, since it implies that '\0' is
   1495         expected as text.
   1496 
   1497         * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax.
   1498         (EGexecute, Fexecute): Use eolbyte instead of '\n'.
   1499 
   1500 1999-06-15 Alain Magloire
   1501 
   1502 	* src/grep.c, doc/grep{1,texi} :
   1503 	--revert-match should be --invert-match.
   1504 	Correction proposed by Karl Berry.
   1505 
   1506 1999-06-12 Alain Magloire
   1507 
   1508 	* doc/grep.{1,texi}: add description for --with-filename.
   1509 	Noted missing by UEBAYASHI Masao.
   1510 
   1511 1999-03-17 Paul Eggert
   1512 
   1513 	* NEWS: Add GREP_OPTIONS.
   1514 
   1515 	* doc/grep.texi: Document GREP_OPTIONS, and the other
   1516 	environment variables.  Fix doc for [:blank:], [:cntrl:], [:punct:].
   1517 
   1518 	* src/grep.c (prepend_args, prepend_default_options): New functions.
   1519 	(main): Use them to implement GREP_OPTIONS.
   1520 	* src/system.h (getenv): New decl.
   1521 
   1522 1999-03-16 Volker Borchert
   1523 
   1524 	* configure.in: Use case case ... esac for  checking Visual C++.
   1525 	When ${CC} contains options it was not recognize.
   1526 
   1527 1999-03-07 Paul Eggert
   1528 
   1529 	* src/grep.c (usage): Don't report -E, -F, and -G unless we're grep.
   1530 	(main): Don't match options -E, -F, and -G unless we're grep.
   1531 	Remove after-the-fact check for options -E, -F, and -G, since
   1532 	they're no longer needed.
   1533 
   1534 1999-03-05  Eli Zaretskii
   1535 
   1536 	* src/grep.c (main): Print the name of the default matcher instead
   1537 	of just "grep".
   1538 
   1539 1999-02-06 Alain Magloire
   1540 
   1541 	* tests/*.awk : Linux users are seeing "Broken Pipe" on make check.
   1542 	The problem is that grep does not drain its stdin, thus the previous
   1543 	process in the pipeline receives a SIGPIPE.  Other shells are silent
   1544 	about this.  There is actually no failure, since the broken pipe is
   1545 	expected.  You can work around it by changing the pipeline, so that
   1546 	the input is drained, like this:
   1547 	status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1;
   1548 	echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi
   1549 	Excerpt email from Andreas Schwab.
   1550 
   1551 1999-02-23 Alain Magloire
   1552 
   1553 	* src/grep.c : Restrict the use of -E, -F, -G
   1554 	to only grep driver, Posix behaviour. {f,e}grep
   1555 	the matcher is already set. This change may brake
   1556 	scripts, warn in NEWS.
   1557 
   1558 	* doc/grep.{1,texi} : -C takes arguments, upgrade manual.
   1559 
   1560 	* beta 2.3a
   1561 
   1562 1999-02-23 Alain Magloire
   1563 
   1564 	* configure.in : Change the configure VC test from
   1565 	'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;'
   1566 	Email from Joshua R. Poulson.
   1567 
   1568 1999-02-23 Paul Eggert
   1569 
   1570 	Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL.
   1571 	The btowc.c shipped with grep 2.3 is incorrect for Solaris
   1572 	2.5.1 and earlier, as it assumes UTF8, which these OSes do not
   1573 	support.  Solaris 7 supports btowc, so there's no need to ship
   1574 	a substitute for it.  The only questionable case is Solaris
   1575 	2.6, which lacks btowc but does support UTF8.  However, 2.6
   1576 	supports UTF8 but only as a demonstration (for an English
   1577 	locale!); Japanese Solaris 2.6 users typically use EUC, or
   1578 	sometimes shift-JIS, but they cannot use UTF8 since Japanese
   1579 	UTF8 is not supported.  Hence there's no point to having grep
   1580 	substitute a btowc that uses UTF8, as it is either redundant,
   1581 	or it will almost invariably have incorrect behavior.
   1582 
   1583 	* configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR.
   1584 	(AC_CHECK_FUNCS): Add btowc, wctype.
   1585 	(AC_REPLACE_FUNCS): Don't replace btowc; our replacement is
   1586 	invariably doing the wrong thing anyway, at least on SunOS/Solaris.
   1587 	Don't bother to check for wctype in -lw, as we don't support
   1588 	wide characters on Solaris 2.5.1 or earlier anyway.
   1589 
   1590 	* bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT).
   1591 
   1592 	* src/btowc.c: Removed; no longer needed.
   1593 
   1594 1999-02-19  Paul Eggert
   1595 
   1596 	* NEWS: Fix typo when talking about the old behavior of
   1597 	silently skipping directories; it was grep 2.1, not grep 2.2.
   1598 
   1599 1999-02-15 Alain Magloire
   1600 
   1601 	* bootstrap/Makefile.try : add DJGPP DEFS.
   1602 	Done by Elie Zaretsckii.
   1603 
   1604 1999-02-14 Alain Magloire
   1605 
   1606 	* m4/gettext.m4 : Guard [] with changequote.
   1607 	From Elie Zaretskii.
   1608 
   1609 	* djgpp/config.bat : Makefile.in.in --> Makefile.in-in
   1610 	From Elie Zaretskii.
   1611 
   1612 	* src/dosbuf: k&r function parameter.
   1613 
   1614 	* release of 2.3.
   1615 
   1616 1999-02-10 Alain Magloire
   1617 
   1618 	* bootstrap/{Makefile{try,am},REAMDE} : skeleton
   1619 	provided for system lacking the tools to autoconfigure.
   1620 
   1621 	* src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H]
   1622 
   1623 1999-02-10 Alain Magloire
   1624 
   1625 	* PATCHES-AC, PATCHES-AM: updated.
   1626 
   1627 	* m4/regex.m4 : updated.
   1628 
   1629 1999-02-05 Eli Zaretskii
   1630 
   1631 	* m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file
   1632 	names.
   1633 
   1634 	* aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the
   1635 	latter prevents GCC from finding headers and libraries.
   1636 
   1637 	* djgpp/config.bat: Make building from another directory work
   1638 
   1639 	* djgpp/config.sed: Remove redundant command wich edited path
   1640 	separator: now done by configure.
   1641 
   1642 	* src/grep.c [O_BINARY]: Add prototype for undossify_input.
   1643 
   1644 	* doc/grep.texi (Introduction): Typo fixed.
   1645 
   1646 1999-02-03 Alain Magloire
   1647 
   1648 	* grep-2.2f beta release.
   1649 
   1650 1999-02-02 Alain Magloire
   1651 
   1652 	* m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 :
   1653 	New files to aid configuration and unload configure.in.
   1654 	* m4/Makefile.am : updated.
   1655 	* src/btowc.c : protect for wchar.h
   1656 
   1657 1999-01-28 Alain Magloire
   1658 
   1659 	* intl/Makefile.in: Replace .o with .${ac_objext} where necessary.
   1660 	Work around a limitation of Visual C++ on Cygwin32.
   1661 	* acconfig.h configure.in: Define `alloca' as `_alloca' when CC=cl.
   1662 	This little hack was suggested by Ian Roxborough <irox (a] cygnus.com>.
   1663 	Patch forwarded by Ben Elliston.
   1664 
   1665 1999-01-28 Alain Magloire
   1666 
   1667 	* PATCHES-AM: New file. A small patch for automake-1.4, use $(sep)
   1668 	as the path separator base on @SEP@.
   1669 	* PATCHES-AC configure.in : updated for autoconf-13.
   1670 
   1671 1999-01-27 Volker Borchert
   1672 
   1673 	* grep.c: fgrep -NUM not working correctly.
   1674 	add the argument number to digit_args_val.
   1675 
   1676 1999-01-22 Paul Eggert
   1677 
   1678 	Prevent grep -r from recursing infinitely through directory loops via
   1679 	symbolic links.
   1680 
   1681 	* grep.c (struct stats): New type.
   1682 	(stats_base): New var.
   1683 	(bufstat): Remove; subsumed by stats->stat.
   1684 	(reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg,
   1685 	for directory loop checking; use this instead of the bufstat global.
   1686 	All callers changed.
   1687 	(grepfile): Stat the file before invoking grepdir.
   1688 	(grepdir): Assume that the argument has already been statted.
   1689 	No longer a need for a directory size argument, since it
   1690 	can be gotten from the struct stats * argument.
   1691 	Check for directory loops.
   1692 	Create linked list of directories currently being visited,
   1693 	to detect loops.
   1694 
   1695 1998-12-29 Kaveh R. Ghazi
   1696 
   1697 	intl/localealias.c: When building grep-2.2e using cc on Irix4,
   1698 	I needed the following patch to intl/localealias.c.
   1699 	(Its the same patch used by fileutils-4.0.) The patch resolves
   1700 	conflicts between char* and unsigned char* in the i18n code.
   1701 
   1702 1998-12-10 Alain Magloire
   1703 
   1704 	* src/grep.c : Typo in contex -->context
   1705 	Noted by  Vladimir Michl.
   1706 
   1707 1998-12-01  Alain Magloire
   1708 
   1709 	* doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am:
   1710 	New files.
   1711 
   1712 	* m4/progtest.m4: proctect '[]' from m4.
   1713 	Noted by Eli Z.
   1714 
   1715 	* PATCHES-AC: New file, add the patch for autoconf in the dist.
   1716 
   1717 	* acconfig.h: (HAVE_DOS_FILENAME)
   1718 
   1719 	* TODO: updated.
   1720 
   1721 	* src/search.c: remove obsolete 'gegrep,ggrep,gnugrep'
   1722 	matchers. grep no longer depend on argv[0].
   1723 
   1724 	* grep-2.2e beta to test DJGPP port.
   1725 
   1726 1998-11-28  Paul Eggert
   1727 
   1728 	Various portability enhancements:
   1729 	- Don't assume that O_BINARY implies DOS.  Use separate
   1730 	macros D_OK (for DOS-like directory access) and
   1731 	HAVE_DOS_FILE_NAMES (for DOS-like file names).
   1732 	- Don't assume that off_t fits into long; it doesn't on Solaris 2.6.
   1733 	- Have is_EISDIR set errno properly on hosts with screwed-up EISDIR.
   1734 	- Treat ':' specially in DOS file names only if it's the end of a
   1735 	drive specifier.
   1736 	- Protect against errno < 0.
   1737 
   1738 	* src/grep.c (is_EISDIR): Move defn to system.h.
   1739 	(print_offset_sep): New function.
   1740 	(fillbuf): Remove redundant test of O_BINARY.
   1741 	(totalcc, totalnl): Now of type off_t.
   1742 	(prline): Use print_offset_sep to print file offsets.
   1743 	(grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility
   1744 	on machines that don't work properly with EISDIR.
   1745 	(grepdir): Don't assume ':' means slash on all DOS filenames;
   1746 	it means it only in the file prefix.
   1747 
   1748 	* src/system.h (strerror): Check for negative error numbers.
   1749 	(is_EISDIR): Depend on D_OK, not O_BINARY.
   1750 	(SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__.
   1751 	(IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES,
   1752 	not O_BINARY.
   1753 	(CHAR_BIT): New macro.
   1754 
   1755 	* src/dosbuf.c (struct dos_map):
   1756 	pos and add members are now of type off_t.
   1757 	(dos_stripped_crs): Now of type off_t.
   1758 	(dossified_pos): Now accepts arg and returns value of type off_t.
   1759 
   1760 	* configure.in (AC_CHECK_FUNCS): Add setmode.
   1761 	(HAVE_DOS_FILENAMES): New macro
   1762 
   1763 1998-11-27  Eli Zaretskii
   1764 
   1765 	* djgpp/config.sed: New file, a Sed script to edit configure
   1766 	script before running it on DOS/Windows.
   1767 	* djgpp/config.bat: Updated to handle po2tbl.sed.in and
   1768 	po/Makefile.in.in on DOS filesystems, and to run config.sed.
   1769 
   1770 1998-11-24  Jim Meyering
   1771 
   1772 	* src/grep.c : Typo s/infalid/invalid/
   1773 	Also noted by Stanislav Brabec.
   1774 
   1775 1998-11-24  Eli Zaretskii
   1776 
   1777 	* doc/grep.texi: I found and corrected several typos.
   1778 	I believe the GNU standards require the section that describes the
   1779 	options to the programs to be called ``Invoking'' or ``Invoking
   1780 	<program-name>''.  This is so users and programs can easily find
   1781 	that node in any Info file.  So I changed the name of the
   1782 	`Options' chapter to `Invoking', and corrected the
   1783 	cross-references accordingly.
   1784 	I added some markup to things like file names and options.
   1785 	I added some additional index entries where that seemed useful.
   1786 	I also corrected some index entries, such as "@cindex [:alnum:]",
   1787 	which used a colon in them (the colons confuse Info readers).
   1788 
   1789 1998-11-24  Alain Magloire
   1790 
   1791 	* grep/doc/grep.texi : -h is not use for help.
   1792 	Nit spotted by Jim Meyering.
   1793 
   1794 1998-11-23  Alain Magloire
   1795 
   1796 	* doc: New directory, grep.1, {e,f}grep.man move here
   1797 	* doc/grep.texi: New info manual
   1798 	* doc/version.texi: New
   1799 	* doc/Makefile.am: New
   1800 	* tests/{ere,bre}.*: New files. The spencer2 test is split
   1801 	in two ere/bre.
   1802 	* config.hin: New, config.h.in rename to config.hin for OS
   1803 	with limited file system aka DOS.
   1804 
   1805 	* grep-2.2d release for beta.
   1806 
   1807 1998-11-18  Alain Magloire
   1808 
   1809 	* src/regex.[ch] : Updated from GLibc, previous patches were
   1810 	integrate by Ulrich Drepper and some added ones.
   1811 
   1812 1998-11-16  Paul Eggert
   1813 
   1814 	* grep.h (__attribute__): New macro, if not GCC.
   1815 	(fatal): Add __attribute__((noreturn)).
   1816 	* grep.c (usage): Add __attribute__((noreturn)).
   1817 
   1818 1998-11-16  Paul Eggert
   1819 
   1820 	Remove memory leak with valloced buffers, by invoking malloc instead.
   1821 
   1822 	* configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove.
   1823 	* src/grep.c (page_alloc): New function.
   1824 	(ubuffer, pagesize): New vars.
   1825 	(ALIGN_TO): New macro.
   1826 	(reset): Initialize new vars.  Check for overflow in buffer size calc.
   1827 	Use page_alloc instead of valloc.
   1828 	(fillbuf): Likewise.  Use memcpy to copy saved area.
   1829 
   1830 1998-11-15  Paul Eggert
   1831 
   1832 	* dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned.
   1833 
   1834 1998-11-14  Paul Eggert
   1835 
   1836 	* src/grep.c (grepdir): Fix bug: memory freed twice.
   1837 
   1838 	* src/search.c (Gcompile, Ecompile): Don't invoke dfainit,
   1839 	since dfacomp does it for us, and if we also do it then we
   1840 	leak memory.
   1841 
   1842 1998-11-13  Eli Zaretskii
   1843 
   1844 	* djgpp/config.bat: Rewrite to run the configure script via Bash.
   1845 	* djgpp/config.site, djgpp/getconf: New files.
   1846 	* djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove.
   1847 	* djgpp/README: Update instructions.
   1848 
   1849 	* Makefile.am (EXTRA_DIST): Update the list of DJGPP files.
   1850 
   1851 	* src/system.h (IS_SLASH): New macro.
   1852 	(is_EISDIR): Define it here for DOS and Windows.
   1853 
   1854 	* src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the
   1855 	EOL formats of the input and output files match, unless stdout is
   1856 	the console device.
   1857 	(is_EISDIR): Don't define if already defined.  Accept a second
   1858 	argument, the file name; all callers changed.
   1859 	(grepdir): Don't free `file', inside the loop.  Use IS_SLASH to
   1860 	check whether `dir' needs a slash.
   1861 	(grepfile): If file is a directory, set e to EISDIR.
   1862 
   1863 1998-11-10  Alain Magloire
   1864 
   1865 	* src/vms_fab.{c,h}: New file for VMS wildcard expansion
   1866 	Written by Phillip C. Brisco.
   1867 
   1868 	* vms/make.com : add line to compile vms_fab.c and
   1869 	{e,f,}grepmat.c with link for each grep/fgrep/egrep.
   1870 	Base on patch send by Phillib C. Brisco.
   1871 
   1872 1998-11-09  Alain Magloire
   1873 
   1874 	* grep-2.2c on alpha for testing.
   1875 
   1876 1998-11-09  Paul Eggert
   1877 
   1878 	* src/grep.1: Fix `Last Change' of output by generating the date
   1879 	from the RCS Id.
   1880 
   1881 	* src/grep.c (is_EISDIR): New macro.
   1882 	(grep): If -s, suppress errors from trying to read directories.
   1883 	(grepfile): Use is_EISDIR to simplify code.
   1884 	(grepdir): If -s, suppress errors from trying to read directories.
   1885 
   1886 	* src/grep.1: Fix -q -r -s problems; describe BSD grep better.
   1887 
   1888 	* src/grep.c (main): Update copyright.
   1889 
   1890 	Specify default matcher with default_matcher extern var, not
   1891 	DEFAULT_MATCHER macro.  This is more straightforward and means
   1892 	we need to compile grep.c just once.
   1893 
   1894 	* src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files.
   1895 
   1896 	* src/Makefile.am (base_sources): New macro.
   1897 	(egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of
   1898 	$(base_sources) plus the single tailoring file.
   1899 	(grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove.
   1900 	(EXTRA_DIST): Remove grep.c, regex.c.
   1901 	(fgrep.o, egrep.o): Remove.
   1902 
   1903 	* src/grep.h (matcher): Now char const *.
   1904 	(default_matcher): New decl.
   1905 
   1906 	* src/grep.c (matcher): Now char const *.
   1907 	(setmatcher): Now accepts char const *.
   1908 	(main): Default the matcher from default_matcher (linked externally)
   1909 	rather than DEFAULT_MATCHER (a macro).
   1910 
   1911 1998-11-08 Alain Magloire
   1912 
   1913 	* src/grep.1: `prep.ai.mit.edu' should be replaced with `gnu.org'.
   1914 	Nit from Paul Eggert.
   1915 
   1916 1998-11-06 Alain Magloire
   1917 
   1918 	* src/grep.c: The Matcher is not set to argv[0] but
   1919 	explicitly by a #define MATCHER at compile time default is "grep".
   1920 
   1921 	* aclocal/: NEW dir. provides our own *.m4
   1922 
   1923 	* configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4)
   1924 	Taken from Jim Meyering fileutils.
   1925 
   1926 1998-11-05 Alain Magloire
   1927 
   1928 	* src/grep.1: update the man pages according to the
   1929 	changes make by Miles.
   1930 
   1931 	* po/*.po: updated.
   1932 
   1933 	* first beta release for 2.3 (2.2a).
   1934 
   1935 1998-11-04 Miles Bader
   1936 
   1937 	* src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B
   1938 	options, and allow -C to have an optional argument. -NUM can
   1939 	now be mixed with -C, and -A, -B always take precedence over
   1940 	-C/-NUM, regardless of order.
   1941 	(long_options): Let -C/--context take an optional argument.
   1942 
   1943 1998-11-03 Alain Magloire
   1944 
   1945 	* src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h>
   1946 	#undef if defined.
   1947 	Fixed by Andreas Ley and Philippe Defert.
   1948 
   1949 	* src/grep.1 : mention that -s follows POSIX.2 behavior.
   1950 	Noted by Paul Eggert and others.
   1951 
   1952 	* tests/khadafy.sh: a typo in failure(s).
   1953 	Spotted By Sotiris Vassilopoulos.
   1954 
   1955 1998-11-01  Paul Eggert
   1956 
   1957 	* src/system.h (IN_CTYPE_DOMAIN): New macro.
   1958 	(ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE,
   1959 	ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use
   1960 	IN_CTYPE_DOMAIN instead of isascii.
   1961 
   1962 1998-08-18  Paul Eggert
   1963 
   1964 	Add support for new -r or --recursive (or -d recurse or
   1965 	--directories=recurse) option.
   1966 
   1967 	* src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c.
   1968 
   1969 	* src/grep.1: Describe new options.
   1970 
   1971 	* src/grep.c: Include "savedir.h".
   1972 	(long_options): Add -r or --recursive.
   1973 	(RECURSE_DIRECTORIES): New enum value.
   1974 	(IS_DIRECTORY_ERRNO): Remove.
   1975 	(reset, grep): Add file name arg.
   1976 	(grepdir, grepfile): New functions.
   1977 	(initial_bufoffset): New var.
   1978 	(reset): Initialize it.
   1979 	(fillbuf): Use it.
   1980 	(count_matches, list_files, no_filenames, suppress_errors): New static
   1981 	vars; formerly were local to `main'.
   1982 	(grep): Recurse through directories if the user asks for this.
   1983 	(usage, main): Add new options.
   1984 	(main): Change some local vars to be static, as described above.
   1985 	Move most of the guts into grepfile function.
   1986 	so that it can be recursed through.
   1987 
   1988 	* configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add.
   1989 	(AC_REPLACE_FUNCS): Add stpcpy.
   1990 
   1991 	* src/savedir.c, src/savedir.h, src/stpcpy.c: New files;
   1992 	taken from fileutils 3.16u.
   1993 
   1994 1998-08-11  Paul Eggert
   1995 
   1996 	* src/system.h (initialize_main): New macro.
   1997 	* src/grep.c (main): Invoke initialize_main first thing.
   1998 
   1999 1998-04-29  Paul Eggert
   2000 
   2001 	* NEWS, src/grep.1: Describe new -a and -d options.
   2002 
   2003 	* src/grep.c (long_options, usage, main):
   2004 	New options -d or --directories and -a or --text.
   2005 	(directories, always_text): New variables.
   2006 	(IS_DIRECTORY_ERRNO): New macro.
   2007 	(reset): Now returns value specifying whether to skip this file.
   2008 	Stat the file if either mmap or directory-skipping is possible.
   2009 	Skip the file if it's a directory and we're skipping directories.
   2010 	(grep): Skip the file if `reset' tells us to.
   2011 	(main): If open fails because the file is a directory, and if we're
   2012 	skipping directories, don't report an error.
   2013 	Remove special case for DOS and Windows.
   2014 
   2015 	* src/dosbuf.c (guess_type): Use the same method for guessing whether a
   2016 	file is binary as grep.c's grep does.
   2017 	There's no longer any need to declare `bp' to be unsigned.
   2018 
   2019 1998-04-26 Alain Magloire
   2020 
   2021 	* grep-2.2 release.
   2022 
   2023 	* src/dfa.c: Wrong revision was pulled out
   2024 	for beta 2.1.1d.
   2025 	* src/search.c: Wrong revision was pulled out
   2026 	for beta 2.1.1d.
   2027 
   2028 	* src/grep.c: ck_atoi () added instead of atoi ().
   2029 	Suggestion from Jim Meyering.
   2030 	ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert.
   2031 
   2032 	* AUTHORS: Rephrase of some sentences.
   2033 	* README:  Rewording.
   2034 	Noted and patched by Joel N. Weber II.
   2035 
   2036 1998-04-17 Kaveh R. Ghazi
   2037 
   2038 	* src/dfa.h: Don't define `const', trust autoconf to handle it.
   2039 
   2040 1998-04-16 Alain Magloire
   2041 
   2042 	* tests/{status,empty}.sh: wrong return status.
   2043 
   2044 	* src/grep.c: Remove the REGEX part in usage (), it was
   2045 	consider overkill by most.
   2046 
   2047 1998-04-14  Eli Zaretskii
   2048 
   2049 	* djgpp/config.bat: Support file names with multiple dots on all
   2050 	platforms.
   2051 
   2052 	* djgpp/README: Add instructions about file names illegal on
   2053 	MS-DOS.
   2054 
   2055 1998-04-13 Alain Magloire
   2056 
   2057 	* src/dfa.c: by "popular" demand reverse
   2058 	back to '_' not word-constituent.
   2059 
   2060 	* grep-2.1.1c available for testing.
   2061 
   2062 1998-04-13  Karl Heuer
   2063 
   2064 	* src/grep.c: (a) The directory check is done too early:
   2065 	logically, if the argument is "-", then it refers to standard
   2066 	input, regardless of whether there's something in the file
   2067 	system answering to "-".
   2068 	(b) The sh command "grep -l root /etc/passwd /etc/group 0<&-"
   2069 	prints "(standard input)" instead of "/etc/passwd", because it
   2070 	mistakenly believes that a named file will never be opened on fd
   2071 	0.  The string "(standard input)" should be based on the file
   2072 	having been originally specified as "-", rather than making
   2073 	assumptions about the fd.
   2074 	(c) the code that calls close(fd) is being done outside of the
   2075 	test for a bad fd.  Thus, if the open failed, this code will
   2076 	attempt to close(-1).  It should be done inside the "fd != -1"
   2077 	branch.
   2078 	This patch addresses all three of these problems.
   2079 
   2080 1998-04-13 Alain Magloire
   2081 
   2082 	* configure.in: remove the deprecated AC_ISC_POSIX macro.
   2083 	Spotted by Karl Heuer.
   2084 
   2085 1998-04-03  Eli Zaretskii
   2086 
   2087 	* djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the
   2088 	relevant Makefile.in files.
   2089 
   2090 	* djgpp/config.bat: Create files in intl directory like the
   2091 	configure script does.
   2092 
   2093 1998-03-28  Eli Zaretskii
   2094 
   2095 	* djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track
   2096 	changes in respective Makefile.in files.
   2097 
   2098 	* src/dosbuf.c (guess_type): Avoid running off the end of the
   2099 	buffer.  Spotted by Paul Eggert.
   2100 
   2101 1998-03-27  Alain Magloire
   2102 
   2103 	* grep-2.1.1b.tar.gz available.
   2104 
   2105 	* src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6
   2106 	when WCTYPE and WCHAR are not defined. When class names
   2107 	where bigger then 6, it will not detect an error.
   2108 	example '[[:alphabet:]]'.
   2109 
   2110 	* Updated the copyright of the files with emacs.
   2111 	With emacs Jim :).
   2112 
   2113 1998-03-26 Jim Meyering
   2114 
   2115 	* src/dfa.c (IS_WORD_CONSTITUENT): Define.
   2116 	(lex): Use IS_WORD_CONSTITUENT, not ISALNUM.
   2117 	Don't special-case '_'.
   2118 	(dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM.
   2119 	(dfaexec): Likewise.
   2120 
   2121 1998-03-25  Alain Magloire
   2122 
   2123 	* tests/warning.sh: typos and replace the echos with
   2124 	a simple cat.
   2125 	Noted By Jim Meyering.
   2126 
   2127 	* src/regex.c: #undef ISASCII and ISPRINT before defining
   2128 	them(On Solaris it was define).
   2129 	Pattern 'a[[:]:]]b' is an invalid char class and the error
   2130 	from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE).
   2131 	Fix with help from Ulrich Drepper.
   2132 
   2133 	* src/grep.c (usage): Ulrich wrote: "A single printf should
   2134 	not have more than 900 bytes. For translation reasons the
   2135 	text shouldn't be split in too many pieces since this is
   2136 	tiresome and also does not help to generate a consistent picture."
   2137 	Noted by Ulrich Drepper.
   2138 	* src/grep.c (usage): Dig out and old patch from
   2139 	Franc,ois to explain the regex in usage().
   2140 	Ideas from Franc,ois Pinard.
   2141 
   2142 1998-03-23 Alain Magloire
   2143 
   2144 	* testing: grep-2.1.1a for testing.
   2145 
   2146 	* configure.in: Solaris needs '-lw' if we use wchar/wctype
   2147 	functions.
   2148 	* src/btowc.c: New file from GNU libc. Solaris 2.5 don't
   2149 	have it define.
   2150 	* configure.in : check for btowc ().
   2151 
   2152 	* regex.c: Include <wchar.h> before <wctype.h>, to work around
   2153 	a Solaris 2.5 bug.
   2154 	Patch provided by Paul Eggert.
   2155 
   2156 	* tests/status.sh: new file to check return status code.
   2157 	* tests/empty.sh: new file to check for empty pattern.
   2158 	* tests/warning.sh: new file to tell where to report errors.
   2159 
   2160 	* configure.in: If available, prefer support for large files
   2161 	unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS
   2162 	variables.
   2163 	Done by Paul Eggert.
   2164 
   2165 	* src/grep.c (usage): change prep.ai.mit.edu for gnu.org.
   2166 
   2167 1998-03-18 Alain Magloire
   2168 
   2169 	* src/grep.c (usage): Formating the --help message a bit off.
   2170 	Noted by William Bader.
   2171 
   2172 	* src/grep.c (main): When checking conflicting matcher for option -E the
   2173 	matcher was to "egrep" instead of "posix-egrep".
   2174 	Reported by kwzh (a] gnu.org.
   2175 
   2176 	* src/grep.c: Typos and rewording the --help message.
   2177 	Reported by Karl Heuer.
   2178 
   2179 	* src/grep.1: The man page wording :
   2180 	  A regular expression matching a single character may be
   2181 	  followed by one of several repetition operators:
   2182 	is unclear since 'x(yz)*z' is a valid regex.
   2183 	Remove the "matching a single character".
   2184 	Suggested by Harald Hanche-Olsen.
   2185 
   2186 	* src/grep.c (main): `-f /dev/null' now specifies no patterns
   2187 	and therfore matches nothing.
   2188 	Reported by Jorge Stolfi.
   2189 	Patched by Paul Eggert.
   2190 
   2191 1998-03-10 Alain Magloire
   2192 
   2193 	* Ice storm 98(el nino). Lost grep repository disk,
   2194 	and my $HOME directory, etc ..
   2195 	Trying to get the emails/patch from dejanews.com
   2196 	and start from grep-2.1.
   2197 	sigh ....
   2198 
   2199 1997-11-01 Alain Magloire
   2200 
   2201 	* src/grep.c: For the long options, the problems are:
   2202 	--file appears in the option table as 'no_argument'
   2203 	instead of 'required_argument'.
   2204 	--files-with-matches is missing from the option table.
   2205 	The help lists '--fixed-strings' as the long option for -F,
   2206 	the table has '--fixed-regexp'.
   2207 	--regexp appears in the option table as 'no_argument'
   2208 	instead of 'required_argument'.
   2209 	--with-filename is missing from the option table.
   2210 	Reported by Grant McDorman and Krishna Sethuraman.
   2211 
   2212 1997-10-19 Alain Magloire
   2213 
   2214 	* src/grep.c: the option "with-filename was not in the arg table.
   2215 	Corrected by Jim Hand.
   2216 
   2217 	* GNU gettext library from gettext-0.10.32.
   2218 
   2219 	* src/grep.c: reverse back to greping directories,
   2220 	One could skip the error message by defining
   2221 	SKIP_DIR_ERROR. There is no clear way of doing
   2222 	things, I hope to setle this on the next majore release
   2223 	Thanks Paul Eggert, Eli Zaretskii and gnits for the
   2224 	exchange.
   2225 
   2226 	* tests/status.sh: add this check to make sure
   2227 	That the return status code is ok.
   2228 
   2229 1997-10-10 Andreas Schwab
   2230 
   2231 	* src/grep.1: Fix formatting.
   2232 
   2233 	* configure.in: Check for wctype.h, wchar.h, libintl.h and
   2234 	isascii, which are needed for regex.c.
   2235 
   2236 1997-10-01 Paul Eggert
   2237 
   2238 	* src/grep.c (fillbuf): Don't warn about mmap failures.
   2239 
   2240 1997-09-7 Alain Magloire
   2241 
   2242 	* src/grep.c: added code for -H --with-filename.
   2243 
   2244 	* djgpp/*: patch wrongly apply
   2245 	duplication of text in djgpp/{README,config.h}.
   2246 	Filter djgpp/config.bat with unix2dos.
   2247 
   2248 	* djgpp/make.mak: beautify
   2249 	From Eli Zaretskii.
   2250 
   2251 	* grep-2.1 release.
   2252 
   2253 1997-09-01 Alain Magloire
   2254 
   2255 	* grep-2.0f out for testing.
   2256 
   2257 	* update to GNU gettext library from gettext-0.10.31
   2258 
   2259 	* grep.c : have a nicer format for --version.
   2260 	Noted by Ulrich Drepper.
   2261 
   2262 	* obstack.[ch]: updated from GNU C library
   2263 	* configure.in: look for stdlib.h [HAVE_STDLIB_H]
   2264 	Comments from Ulrich Drepper.
   2265 
   2266 1997-08-25 Philippe De Muyter  <phdm (a] info.ucl.ac.be>
   2267 
   2268 	* src/dfa.c (sys/types.h): File included unconditionnaly.
   2269 
   2270 1997-08-16  Eli Zaretskii  <eliz (a] is.elta.co.il>
   2271 
   2272 	* grep.c (long_options) [O_BINARY]: Add DOS-specific options.
   2273 	(fillbuf) [O_BINARY]: For DOS-style text files, strip CR
   2274 	characters at end of line.
   2275 	(prline) [O_BINARY]: Report correct byte offsets, even though CR
   2276 	characters were stripped when reading the file.
   2277 	(usage) [O_BINARY]: Add DOS-specific options.
   2278 	(setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the
   2279 	matcher won't ever overflow the stack.
   2280 	(main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters
   2281 	in argv[0], remove the .exe suffix, and downcase the prgram name.
   2282 	[O_BINARY]: Pass additional DOS-specific options to getopt_long
   2283 	and handle them.  Call stat before attempting to open the file, in
   2284 	case it is a directory (DOS will fail the open call for
   2285 	directories).  Switch the input descriptor to binary mode, unless
   2286 	it is a terminal device.
   2287 
   2288 	* system.h [O_BINARY]: Define macros to switch a handle to binary
   2289 	mode, so binary files could be grep'ed on MS-DOS and MS-Windows.
   2290 	[HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of
   2291 	HAVE_LC_MESSAGES, to prevent compilation error in grep.c on
   2292 	systems which don't define HAVE_LC_MESSAGES, but have setlocale.
   2293 
   2294 	* dosbuf.c: New file, functions specific for MS-DOS/MS-Windows.
   2295 	(guess_type, undossify_input, dossified_pos): New functions.
   2296 
   2297 	* djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak,
   2298 	djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed:
   2299 	New files, for building Grep with DJGPP tools for MS-DOS and
   2300 	MS-Windows.
   2301 
   2302 	* grep.1: Document DOS-specific switches.
   2303 
   2304 1997-08-08 Alain Magloire
   2305 
   2306 	* grep-2.0e: available for testing
   2307 
   2308 	* grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE).
   2309 	Suggested by Jochen Hein.
   2310 
   2311 	* ABOUT-NLS: updated.
   2312 	* grep.c: --version: more verbosity (COPYRIGHT).
   2313 	* grep.c: --help: PATTERN, FILE instead of <pattern>, <file>.
   2314 	* INSTALL.grep: not necessary removed.
   2315 	* configure.in: --disable-regex rename --without-include-regex.
   2316 	* THANKS: format: first row name, second email.
   2317 	* ChangeLog: format ISO 8601.
   2318 	Reported by Franc,ois Pinard.
   2319 
   2320 	* grep.c: move dcl of struct stat st into "else" where it's used.
   2321 	Reported by Jim Meyering.
   2322 
   2323 	* grep.c: totalnl should be %u in printf.
   2324 	Reported by Michael Aichlmay
   2325 	Corrected with guidance from Ulrich Drepper
   2326 
   2327 1997-07-24 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2328 
   2329 	* Makefile.am: corrected an error when installing {f,e}grep.1.
   2330 	From Kaveh R. Ghazi <ghazi (a] caip.rutgers.edu>.
   2331 	From Ulrich Drepper <drepper (a] cygnus.com>.
   2332 
   2333 	* Many files: use PARAMS instead of __STDC__ for prototypes.
   2334 	From Jim Meyering <meyering (a] eng.ascend.com>.
   2335 	Patch provided by Kaveh R. Ghazi <ghazi (a] caip.rutgers.edu>.
   2336 
   2337 	* dfa.[ch]: uses the one in gawk-3.0.3 with the patch from
   2338 	Arnold (see Changelog: July 12 1997)
   2339 
   2340 	* grep.1: a note to say -l, -L, -q stop on first match.
   2341 	Noted by Andrew Beattie <gaffer (a] tug.com>.
   2342 
   2343 	* grep.c: refuse to scan if the file is a directory.
   2344 	This was causing problems on SUNs. If the directory contains
   2345 	a file that could match the pattern, garbage was display.
   2346 
   2347 	* tests directory: added new set of tests from Henry Spencer
   2348 	regex package. Change the way the tests were done to be more
   2349 	conformant to automake.
   2350 
   2351 	* configure.in: added --disable-regex for folks with their own fuctions.
   2352 
   2353 	* grep-20d : available for testing
   2354 
   2355 1997-07-18 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2356 
   2357 	* grep-2.0c: available for testing
   2358 
   2359 1997-07-17 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2360 
   2361 	* src/grep.c: Cause grep to fail if `fclose (stdout)' fails.
   2362 	From Jim Meyering <meyering (a] eng.ascend.com>.
   2363 
   2364 	* grep.c:usage() more consistency in the --help.
   2365 
   2366 	* egrep, fgrep were links This is in violation of GNU standards:
   2367 	"Please don't make the behavior of a utility depend on the name used
   2368 	to invoke it.  It is useful sometimes to make a link to a utility with
   2369 	a different name, and that should not change what it does."
   2370 	For now egrep and fgrep will be copies of grep. A better scheme
   2371 	should be found later.
   2372 	After discussion with Tom Tromey <tromey (a] cygnus.com>.
   2373 
   2374 	* fgrep.man and egrep.man included: They are stubs that call grep.1.
   2375 	* Makefile.am: modified to install {f,e,}grep[,.1].
   2376 
   2377 	* speed hack for -l, -L: bail out on first match.
   2378 	From Scott Weikart <scott (a] igc.apc.org>.
   2379 
   2380 	* *.[ch]: provided prototypes for strict argument checking
   2381 	With the help of Stewart Levin <stew (a] sep.stanford.edu>.
   2382 
   2383 1997-07-16 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2384 
   2385 	* configure.in: typo in the creation of po/Makefile
   2386 	Noted by Volker Borchert bt (a] teknon.de.
   2387 
   2388 	* grep-2.0b: make it available for testing.
   2389 
   2390 1997-07-15 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2391 
   2392 	* src/grep.c usage(): cut the --help in smaller printf()'s
   2393 	Noted by Ulrich Drepper <drepper (a] cygnus.com>.
   2394 
   2395 1997-07-14 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2396 
   2397 	* grep-2.0a: make an alpha available for testing.
   2398 
   2399 1997-07-12 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2400 
   2401 	* run gettextize: added the po directory filled with *.po files.
   2402 
   2403 	* check.sh, scriptgen.awk: fix grep paths.
   2404 
   2405 	* change the directory strucure: grep is now in src to comply with
   2406 	gettext.m4.
   2407 
   2408 	* grep.c version.c [VERSION]: got rid of version.c,
   2409 	it is now define via config.h.
   2410 
   2411 	* dfa.c: patch to speed up initialization.
   2412 	Arnold Robbins (arnold (a] gnu.ai.mit.edu).
   2413 
   2414 1997-07-09 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2415 
   2416 	* *.c [HAVE_CONFIG_H]: Macro defined.
   2417 
   2418 	* support for I18N in Makefile.am and configure.in.
   2419 
   2420 	* update all the string to use gettext(I18N).
   2421 	Help from Franc,ois Pinard previous patch <pinard (a] IRO.UMontreal.CA>.
   2422 
   2423 1997-07-04 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2424 
   2425 	* obstack.[ch]: updated from glibc.
   2426 	Work of Ulrich Drepper <drepper (a] cygnus.com>.
   2427 
   2428 	* regex.[ch]: updated from glibc.
   2429 	Work of Ulrich Drepper <drepper (a] cygnus.com>.
   2430 
   2431 	* grep.c: for option -e not counting '\n' for new keys.
   2432 	From Mark Waite <markw (a] mddmew.fc.hp.com>.
   2433 
   2434 	* grep.c: for option -f allocating the right count.
   2435 	From Andreas Schwab <schwab (a] issan.informatik.uni-dortmund.de>.
   2436 	Mike Heartel (mike (a] cs.uoregon.edu).
   2437 
   2438 	* kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing.
   2439 	From Jim Meyering <meyering (a] asic.sc.ti.com>.
   2440 
   2441 	* grep.1: various typos.
   2442 	From Keith Bostic <bostic (a] bsdi.com>.
   2443 	Mike Heartel (mike (a] cs.uoregon.edu).
   2444 
   2445 1997-06-17 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2446 
   2447 	* grep.c: support for long options.
   2448 	patch done by Franc,ois Pinard <pinard (a] IRO.UMontreal.CA>.
   2449 
   2450 	* add getopt1.c in Makefile.am.
   2451 	Noted by Franc,ois Pinard <pinard (a] IRO.UMontreal.CA>
   2452 
   2453 	* replace getopt.[ch] and add getopt1.c.
   2454 
   2455 	* kwset.c: undef malloc before define it.
   2456 	Franc,ois Pinard <pinard (a] IRO.UMontreal.CA>.
   2457 
   2458 1997-06-07 Alain Magloire <alainm (a] rcsm.ee.mcgill.ca>
   2459 
   2460 	* grep.c: format incorrect in
   2461 	fprintf("%s: warning: %s: %s...", filename, strerror(errno)).
   2462 	Mike Heartel (mike (a] cs.uoregon.edu).
   2463 
   2464 1996-11-19  David J MacKenzie  <djm (a] catapult.va.pubnix.com>
   2465 
   2466 	* make.com: Set the logical SYS. From rdb (a] cocamrd.oz.au (Rodney Brown).
   2467 
   2468 	* grep.c (S_ISREG): Define if not defined already, for e.g.
   2469 	SunOS 4.0.3.
   2470 
   2471 	* dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit,
   2472 	setbit, clrbit to avoid conflict with HP-UX sys/param.h macros.
   2473 
   2474 	* memchr.c: New file, from GNU libc.
   2475 	* grep.c (memchr): Remove definition.
   2476 	* configure.in: Use AC_REPLACE_FUNCS for memchr.
   2477 
   2478 	* configure.in: Remove unused checks for memalign and unsigned char.
   2479 	* grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP.
   2480 
   2481 	* system.h: New file.
   2482 	* dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating
   2483 	portability boilerplate.
   2484 
   2485 	* grep.c: Include sys/types.h once, instead of three times
   2486 	conditionally.
   2487 	* dfa.c, kwset.c, search.c: Include sys/types.h unconditionally,
   2488 	to always try to get size_t (needed on some old SysV's).
   2489 
   2490 	* dfa.c: Define strchr in terms of index, not the other way around.
   2491 	* search.c: Use memcpy instead of bcopy.
   2492 
   2493 1996-11-15  David J MacKenzie  <djm (a] catapult.va.pubnix.com>
   2494 
   2495 	* Many files: Update FSF address.
   2496 	Update configuration to use autoconf v2 and automake.
   2497 
   2498 1993-05-22  Mike Haertel  <mike (a] cs.uoregon.edu>
   2499 
   2500 	* Version 2.0 released.
   2501