summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep/grep.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2004-10-03 19:23:02 +0000
committerotto <otto@openbsd.org>2004-10-03 19:23:02 +0000
commitf6ceeffddffd5c985d194d617a5417eb80749333 (patch)
tree4799583d098ea322565b6f3c712b1dc90eb6a71e /usr.bin/grep/grep.c
parentKill <sys/types.h> (diff)
downloadwireguard-openbsd-f6ceeffddffd5c985d194d617a5417eb80749333.tar.xz
wireguard-openbsd-f6ceeffddffd5c985d194d617a5417eb80749333.zip
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