[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS: cvs.openbsd.org: src
- To: source-changes_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: CVS: cvs.openbsd.org: src
- From: "Todd C. Miller" <millert_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org>
- Date: Sun, 25 Jan 2004 14:36:00 -0700 (MST)
CVSROOT: /cvs
Module name: src
Changes by: millert_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org 2004/01/25 14:36:00
Modified files:
usr.bin/grep : grep.c grep.h util.c
Log message:
Previously, in -w mode, for each match on a line grep would check
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_(_at_)__(_dot_)_
Visit your host, monkey.org