svn commit: r225553 - user/gabor/grep/trunk/regex
Gabor Kovesdan
gabor at FreeBSD.org
Wed Sep 14 13:09:06 UTC 2011
Author: gabor
Date: Wed Sep 14 13:09:05 2011
New Revision: 225553
URL: http://svn.freebsd.org/changeset/base/225553
Log:
- Fix anchoring
Modified:
user/gabor/grep/trunk/regex/tre-fastmatch.c
Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c
==============================================================================
--- user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 14 12:55:52 2011 (r225552)
+++ user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 14 13:09:05 2011 (r225553)
@@ -822,8 +822,8 @@ badpat:
_SHIFT_ONE;
#define _BOL_COND \
- ((j == 0) || ((type == STR_WIDE) ? tre_isspace(str_wide[j - 1]) : \
- isspace(str_byte[j - 1])))
+ ((j == 0) || ((type == STR_WIDE) ? (str_wide[j - 1] == TRE_CHAR('\n'))\
+ : (str_byte[j - 1] == '\n')))
/*
* Checks BOL anchor and shifts one if match is not on a
@@ -834,9 +834,10 @@ badpat:
_SHIFT_ONE;
#define _EOL_COND \
- ((type == STR_WIDE) ? \
- ((j + fg->wlen == len) || tre_isspace(str_wide[j + fg->wlen])) : \
- ((j + fg->len == len) || isspace(str_byte[j + fg->wlen])))
+ ((type == STR_WIDE) \
+ ? ((j + fg->wlen == len) || \
+ (str_wide[j + fg->wlen] == TRE_CHAR('\n'))) \
+ : ((j + fg->len == len) || (str_byte[j + fg->wlen] == '\n')))
/*
* Checks EOL anchor and shifts one if match is not on a
More information about the svn-src-user
mailing list