summaryrefslogtreecommitdiff
path: root/usr.bin/grep/grep.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-10-03 19:23:03 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-10-03 19:23:03 +0000
commit3061d292a889eed3e39bca845c7cb7ca03db2002 (patch)
treea3be9f2251fdc48c2c4821a6ee006508201ca174 /usr.bin/grep/grep.c
parentbe1570cce7b30a560fbe463737aa530bcbb659ca (diff)
Remove block based mmap optimization. There are newline problems
(PR 3940, 3941) which can be fixed, but if a match starts at the end of a block and continues into the next block, no match will be found. Measurements by millert@ showed that the improvements of this optimization are non-measurable anyway. Diff from Alexander Taler. ok millert@
Diffstat (limited to 'usr.bin/grep/grep.c')
-rw-r--r--usr.bin/grep/grep.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 3f96ea62a4a..f416f15e9a2 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grep.c,v 1.30 2004/09/28 20:51:15 jmc Exp $ */
+/* $OpenBSD: grep.c,v 1.31 2004/10/03 19:23:02 otto Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -97,8 +97,6 @@ enum {
int first; /* flag whether or not this is our first match */
int tail; /* lines left to print */
int lead; /* number of lines in leading context queue */
-int boleol; /* At least one pattern has a bol or eol */
-size_t maxPatternLen; /* Longest length of all patterns */
extern char *__progname;
@@ -193,9 +191,6 @@ add_pattern(char *pat, size_t len)
pattern[patterns][len] = '\0';
}
++patterns;
-
- if (len > maxPatternLen)
- maxPatternLen = len;
}
static void