emaste 95e99f98db bsdgrep: fix matching behaviour
- Set REG_NOTBOL if we've already matched beginning of line and we're
  examining later parts

- For each pattern we examine, apply it to the remaining bits of the
  line rather than (potentially) smaller subsets

- Check for REG_NOSUB after we've looked at all patterns initially
  matching the line

- Keep track of the last match we made to later determine if we're
  simply not matching any longer or if we need to proceed another byte
  because we hit a zero-length match

- Match the earliest and longest bit of each line before moving the
  beginning of what we match to further in the line, past the end of the
  longest match; this generally matches how gnugrep(1) seems to behave,
  and seems like pretty good behavior to me

- Finally, bail out of printing any matches if we were set to print all
  (empty pattern) but -o (output matches) was set

PR:		195763, 180990, 197555, 197531, 181263, 209116
Submitted by:	"Kyle Evans" <kevans91@ksu.edu>
Reviewed by:	cem
MFC after:	1 month
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D10104
2017-04-03 23:16:51 +00:00
..
2017-02-28 23:42:47 +00:00
2016-07-30 06:32:18 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-06 23:02:33 +00:00
2017-03-20 13:02:27 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-01-04 16:24:40 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-20 13:02:27 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2016-01-27 00:03:43 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-06 08:27:19 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2016-03-29 11:56:00 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-04-03 23:16:51 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2016-12-16 02:06:34 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-15 22:36:26 +00:00
2017-02-28 23:42:47 +00:00
2016-12-16 01:59:28 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2016-12-16 01:51:12 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2016-05-17 12:52:31 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2016-07-09 04:56:28 +00:00
2017-02-11 23:45:50 +00:00
2015-10-21 05:37:09 +00:00
2016-09-30 13:50:59 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-21 08:57:20 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-24 00:02:12 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-31 03:08:07 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2015-12-03 14:32:54 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-10 06:23:15 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2016-11-08 23:59:41 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-03-12 18:58:44 +00:00
2017-02-28 23:42:47 +00:00
2017-03-12 18:58:44 +00:00