diff --git a/grep-2.5.1-egf-speedup.patch b/grep-2.5.1-egf-speedup.patch index 0e9a5eb..6d777de 100644 --- a/grep-2.5.1-egf-speedup.patch +++ b/grep-2.5.1-egf-speedup.patch @@ -1,5 +1,5 @@ ---- grep-2.5.1/src/search.c 2004-12-16 16:53:01.110921088 +0000 -+++ grep-2.5.1/src/search.c 2004-12-16 17:46:57.039678304 +0000 +--- grep-2.5.1/src/search.c 2004-12-16 17:46:57.039678304 +0000 ++++ grep-2.5.1/src/search.c 2004-12-17 13:03:49.300731757 +0000 @@ -39,6 +39,9 @@ #ifdef HAVE_LIBPCRE # include @@ -125,7 +125,7 @@ #endif /* MBS_SUPPORT */ buflim = buf + size; -@@ -373,21 +337,60 @@ +@@ -373,21 +337,63 @@ if (kwset) { /* Find a possible match using the KWset matcher. */ @@ -185,12 +185,15 @@ while (beg > buf && beg[-1] != eol) --beg; - if (kwsm.index < kwset_exact_matches) -+ if (!(match_icase && MB_CUR_MAX > 1) && ++ if ( ++#ifdef MBS_SUPPORT ++ !(match_icase && MB_CUR_MAX > 1) && ++#endif /* MBS_SUPPORT */ + (kwsm.index < kwset_exact_matches)) goto success_in_beg_and_end; if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) continue; -@@ -395,13 +398,47 @@ +@@ -395,13 +401,47 @@ else { /* No good fixed strings; start with DFA. */ @@ -238,7 +241,7 @@ while (beg > buf && beg[-1] != eol) --beg; } -@@ -469,15 +506,6 @@ +@@ -469,15 +509,6 @@ } /* for (beg = end ..) */ failure: @@ -254,7 +257,7 @@ return (size_t) -1; success_in_beg_and_end: -@@ -486,15 +514,6 @@ +@@ -486,15 +517,6 @@ /* FALLTHROUGH */ success_in_start_and_len: @@ -270,7 +273,7 @@ *match_size = len; return start; } -@@ -504,6 +523,7 @@ +@@ -504,6 +526,7 @@ { char const *beg, *lim, *err; @@ -278,7 +281,7 @@ kwsinit (); beg = pattern; do -@@ -531,17 +551,8 @@ +@@ -531,17 +554,8 @@ struct kwsmatch kwsmatch; size_t ret_val; #ifdef MBS_SUPPORT @@ -298,7 +301,7 @@ #endif /* MBS_SUPPORT */ for (beg = buf; beg <= buf + size; ++beg) -@@ -550,8 +561,33 @@ +@@ -550,8 +564,33 @@ if (offset == (size_t) -1) goto failure; #ifdef MBS_SUPPORT @@ -334,7 +337,7 @@ #endif /* MBS_SUPPORT */ beg += offset; len = kwsmatch.size[0]; -@@ -587,6 +623,36 @@ +@@ -587,6 +626,36 @@ if (offset == -1) { break; /* Try a different anchor. */ } @@ -371,7 +374,7 @@ beg += offset; len = kwsmatch.size[0]; } -@@ -597,19 +663,31 @@ +@@ -597,19 +666,31 @@ } failure: @@ -411,7 +414,7 @@ end++; while (buf < beg && beg[-1] != eol) --beg; -@@ -618,15 +696,6 @@ +@@ -618,15 +699,6 @@ success_in_beg_and_len: *match_size = len; diff --git a/grep.spec b/grep.spec index d022343..efb51e3 100644 --- a/grep.spec +++ b/grep.spec @@ -1,7 +1,7 @@ Summary: The GNU versions of grep pattern matching utilities. Name: grep Version: 2.5.1 -Release: 42 +Release: 43 License: GPL Group: Applications/Text Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.bz2 @@ -85,7 +85,7 @@ fi %{_mandir}/*/* %changelog -* Thu Dec 16 2004 Tim Waugh +* Thu Dec 16 2004 Tim Waugh 2.5.1-43 - Bypass kwset matching when ignoring case and processing multibyte input (bug #143079).