Age | Commit message (Collapse) | Author |
|
delayed so options that affect pattern-building (such as -w) can be
applied evenly to all such patterns.
ok and help otto, ok millert
|
|
using the -w option with parentheses, to avoid operators in the
expressions binding to the markers. Compare [[:<:]]foo|bar[[:>:]]
and [[:<:]](foo|bar)[[:>:]]. Problem spotted by aaron@; ok millert@
aaron@ jaredy@
|
|
(PR 3940, 3941) which can be fixed, but if a match starts at the
end of a block and continues into the next block, no match will be
found. Measurements by millert@ showed that the improvements of
this optimization are non-measurable anyway. Diff from Alexander Taler.
ok millert@
|
|
more helpful;
this includes some ideas/fixes from otto and jared;
|
|
|
|
fastcomp. This makes fgrep faster and fixes the -w flag w/ fgrep.
Also remove free_patterns() since calling free right before exit
is silly. Problem noticed by espie@
|
|
ok millert@ tedu@
|
|
With this change we pass the updated regress. Tested and OK by ho@
|
|
to see if the match was on a word boundary. However, this missed
lines where the first match was not on a word boundary but a
subsequent match was. Problem originally spotted by miod@
We fix this by using the [[:<:]] and [[:>:]] character classes for
the slow path and by checking the word boundaries in grep_search()
for the fast path instead of doing the checks after running
regexec() or grep_search().
With this change, grep passes the new regress tests 15 and 16.
problem originally spotted by espie@.
|
|
ok deraadt@ jmc@
|
|
the fact that optind refers to the *next* argument to be consumed
by getopt(), not the current one. This means we have to keep track
of when we are working with a new argv entry by hand. OK hugh@
|
|
Fixes a problem on sparc64 where sizeof(int) != sizeof(pointer).
Based on a patch from Brian Poole; tedu@ OK
|
|
|
|
deraadt@ OK
|
|
|
|
keep track of what the last char from getopt was as well as the
previous value of optind so we know when a new number has started.
|
|
o maxPatternLen should be size_t since that's what it is compared against
o remove useless casts of NULL to various pointer types
|
|
the program name as expected. ok millert@
|
|
also add a note why we can't use strlcpy.
|
|
of a potentially nontermined src.
|
|
this makes searching for constant strings much faster by avoiding regex.
ok deraadt@
|
|
|
|
|
|
|
|
make -a do the right thing, doc and implement -U, -I.
add --help and --mmap for compatibility.
some other minor fixes.
some from NetBSD. ok deraadt@
|
|
|
|
|
|
|
|
needed. (and knf)
|
|
|
|
|
|
favor of the GNU version), but it gets fixed anyways. ok mickey@
|
|
slow because libc regexp is slow. Anyone out there have the balls to sit
down and optimize libc regexp?
|