Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/grep
Joerg Sonnenberger <joerg%NetBSD.org@localhost> writes:
> Module Name: src
> Committed By: joerg
> Date: Wed Feb 16 01:31:34 UTC 2011
>
> Modified Files:
> src/usr.bin/grep: Makefile file.c grep.1 grep.c grep.h queue.c util.c
> Added Files:
> src/usr.bin/grep: fastgrep.c
I just did `more fastgrep.c' and found following piece of code. The
usage of wflag is an obvious regression from OpenBSD code.
| if (fg->len >= 14 &&
| strncmp(pat + (fg->bol ? 1 : 0), "[[:<:]]", 7) == 0 &&
| strncmp(pat + (fg->bol ? 1 : 0) + fg->len - 7, "[[:>:]]", 7) == 0) {
| fg->len -= 14;
| /* Word boundary is handled separately in util.c */
| wflag = true;
| }
|
| /*
| * Copy pattern minus '^' and '$' characters as well as word
| * match character classes at the beginning and ending of the
| * string respectively.
| */
| fg->pattern = grep_malloc(fg->len + 1);
| strlcpy((char *)fg->pattern, pat + (bol ? 1 : 0) + wflag,
| fg->len + 1);
enami.
Home |
Main Index |
Thread Index |
Old Index