diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 2000-03-22 03:30:37 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 2000-03-22 03:30:37 +0000 |
commit | 05860b2d966701a5a9f70a650d32b30ae2612eeb (patch) | |
tree | f91bbea08ec07490573e38c166dbb2fc56f8ef64 /THANKS | |
parent | c5c570c67a775b63cec93762e3f8babc0d217280 (diff) | |
download | grep-05860b2d966701a5a9f70a650d32b30ae2612eeb.tar.gz |
configure.in ChangeLog NEWS src/search.c src/grep.c
doc/grep.1 doc/grep.texi
support for -P(--pcre) Perl Compatible Regular Expression.
support for -m --max-count.
* configure.in: added AC_CHECK_LIB(pcre, pcre_exec)
* ChangeLog: Typos corrected.
* src/search.c: new MACRO HAVE_LIBPCRE
* src/Makefile.am(bin_PROGRAMS): added pgrep and new macro
pgrep_SOURCES.
* src/search.c: new functions Pcompile() and Pexecute()
to support PCRE. Update matcher[] array for pgrep.
* src/grep.c: new short and long option --pcre and -P.
usage() updated.
Improvement of the -m or --max-count option. Now works for NUM > 1 and
prints trailing context for the last matching line.
* src/grep.c
(after_last_match): Is a new off_t variable that replaces inputhwm
to retain the correct input offset even after a call to fillbuf. Note
that after_last_match has a different meaning than inputhwm:
it always points to the offset in the input of the first byte after
the last matching line, and is 0 if no matching line has been found
yet.
(grep): Print trailing context after the NUMth match when the -m NUM
option is used.
(grep): Added comment. Should have been commented already.
(grepbuf): Now updates outleft correctly. This fixes the bug that the
-m NUM option did not stop after NUM lines for NUM greater than 1.
(grepbuf, prtext): Now update after_last_match instead of inputhwm.
(fillbuf): No longer updates inputhwm.
(prpending): When outputting trailing context of the max_count-th
(grepfile): Seek to after_last_match or eof, depending on the values
(usage): added the -m or --max-count option to the help message.
* doc/grep.texi, doc/grep.1: Document the change of the -m option.
Add new -m or --max-count option, based on a suggestion by
Bastiaan Stougie.
* doc/grep.texi, doc/grep.1: Document it.
* src/grep.c (short_options, long_options, main): Add it.
(inputhwm): New variable.
(fillbuf, prtext, grepbuf): Set it.
(bufmapped): Now a macro (defined to zero) if HAVE_MMAP is not defined.
(max_count, outleft): New variables.
(prtext, grepbuf, grep): Don't output more than outleft lines.
(grepfile): If grepping standard input, seek to the limit of what
we've read before exiting. This fixes a bug with mmapped input,
and is needed for proper -m support.
(main): Exit immediately if -m 0 is specified.
Diffstat (limited to 'THANKS')
-rw-r--r-- | THANKS | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4,6 +4,7 @@ Alain Magloire <alainm@gnu.org> Andreas Schwab <schwab@suse.de> Andreas Ley <andy@rz.uni-karlsruhe.de> Ben Elliston <bje@cygnus.com> +Bastiaan "Darquan" Stougie <darquan@zonnet.nl> David J MacKenzie <djm@catapult.va.pubnix.com> David O'Brien <obrien@freebsd.org> Eli Zaretskii <eliz@is.elta.co.il> |