diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-02 17:59:19 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-02 17:59:19 +0000 |
commit | 51fe3c1e1cb9f1ae15819b82e5127d3ef64d2e2c (patch) | |
tree | c018f645d9ae1af95a39d59bc9e9bded1ee9bcac /usr.bin/grep/util.c | |
parent | eb6fed1cbd08ba3a924ef05d18e17023b3dab4bc (diff) |
Process patterns containing $ end ^ (but not as last or first char)
using regcomp() instead of fastcomp(). ok millert@
Diffstat (limited to 'usr.bin/grep/util.c')
-rw-r--r-- | usr.bin/grep/util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 970dd1413e2..4feb17cf8ab 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.35 2007/09/02 15:19:32 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.36 2007/10/02 17:59:18 otto Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -327,7 +327,6 @@ fastcomp(fastgrep_t *fg, const char *pattern) /* Can still cheat? */ if ((isalnum(fg->pattern[i])) || isspace(fg->pattern[i]) || (fg->pattern[i] == '_') || (fg->pattern[i] == ',') || - (fg->pattern[i] == '^') || (fg->pattern[i] == '$') || (fg->pattern[i] == '=') || (fg->pattern[i] == '-') || (fg->pattern[i] == ':') || (fg->pattern[i] == '/')) { /* As long as it is good, upper case it for later. */ |