freebsd-dev/usr.bin/grep
Ed Maste fe8c9d5bf1 bsdgrep: emit more than MAX_LINE_MATCHES per line
We should not set an arbitrary cap on the number of matches on a line,
and in any case MAX_LINE_MATCHES of 32 is much too low.  Instead, if we
match more than MAX_LINE_MATCHES, keep processing and matching from the
last match until all are found.

For the regression test, we produce 4096 matches (larger than we expect
we'll ever set MAX_LINE_MATCHES) and make sure we actually get 4096
lines of output with the -o flag.

We'll also make sure that every distinct line is getting its own line
number to detect line metadata not being printed as appropriate along
the way.

PR:		218811
Submitted by:	Kyle Evans <kevans91@ksu.edu>
Reported by:	jbeich
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10577
2017-05-20 03:51:31 +00:00
..
nls bsdgrep: correct nls usage data after r317049 2017-05-02 13:47:15 +00:00
regex bsdgrep: fix escape map building for multibyte strings 2017-05-02 20:44:06 +00:00
tests bsdgrep: fix -w flag matching with an empty pattern 2017-05-02 20:39:33 +00:00
file.c bsdgrep: fix segfault with --mmap 2017-05-20 00:42:47 +00:00
grep.1 bsdgrep: add -z/--null-data support 2017-04-17 13:14:18 +00:00
grep.c bsdgrep: don't allow negative -A / -B / -C 2017-05-15 17:51:01 +00:00
grep.h bsdgrep: don't allow negative -A / -B / -C 2017-05-15 17:51:01 +00:00
Makefile bsdgrep: Add GNU compatible version string indicator 2017-05-02 13:38:20 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-05-09 01:48:23 +00:00
queue.c bsdgrep: don't allow negative -A / -B / -C 2017-05-15 17:51:01 +00:00
util.c bsdgrep: emit more than MAX_LINE_MATCHES per line 2017-05-20 03:51:31 +00:00