Skip to content

Commit

Permalink
Process patterns containing $ end ^ (but not as last or first char)
Browse files Browse the repository at this point in the history
using regcomp() instead of fastcomp(). ok millert@
  • Loading branch information
omoerbeek authored and howardjp committed Nov 28, 2009
1 parent 69dbfbb commit 8e46716
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util.c
@@ -1,4 +1,4 @@
/* $OpenBSD: util.c,v 1.34 2006/12/26 20:59:23 otto Exp $ */
/* $OpenBSD: util.c,v 1.35 2007/09/02 15:19:32 deraadt Exp $ */

/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 8e46716

Please sign in to comment.