diff --git a/grep-2.5.1-icolor.patch b/grep-2.5.1-icolor.patch new file mode 100644 index 0000000..14b2617 --- /dev/null +++ b/grep-2.5.1-icolor.patch @@ -0,0 +1,36 @@ +--- grep-2.5.1a/src/grep.c.icolor 2005-01-07 12:05:20.877785250 +0000 ++++ grep-2.5.1a/src/grep.c 2005-01-07 12:05:44.690194388 +0000 +@@ -564,33 +564,6 @@ + { + size_t match_size; + size_t match_offset; +- if(match_icase) +- { +- /* Yuck, this is tricky */ +- char *buf = (char*) xmalloc (lim - beg); +- char *ibeg = buf; +- char *ilim = ibeg + (lim - beg); +- int i; +- for (i = 0; i < lim - beg; i++) +- ibeg[i] = tolower (beg[i]); +- while ((match_offset = (*execute) (ibeg, ilim-ibeg, &match_size, 1)) +- != (size_t) -1) +- { +- char const *b = beg + match_offset; +- if (b == lim) +- break; +- fwrite (beg, sizeof (char), match_offset, stdout); +- printf ("\33[%sm", grep_color); +- fwrite (b, sizeof (char), match_size, stdout); +- fputs ("\33[00m", stdout); +- beg = b + match_size; +- ibeg = ibeg + match_offset + match_size; +- } +- fwrite (beg, 1, lim - beg, stdout); +- free (buf); +- lastout = lim; +- return; +- } + while (lim-beg && (match_offset = (*execute) (beg, lim - beg, &match_size, 1)) + != (size_t) -1) + { diff --git a/grep.spec b/grep.spec index 307bb2c..a83e96b 100644 --- a/grep.spec +++ b/grep.spec @@ -11,6 +11,7 @@ Patch2: grep-2.5-i18n.patch Patch3: grep-2.5.1-oi.patch Patch4: grep-2.5.1-manpage.patch Patch5: grep-2.5.1-color.patch +Patch6: grep-2.5.1-icolor.patch Patch10: grep-2.5.1-egf-speedup.patch Patch11: grep-2.5.1-dfa-optional.patch Patch12: grep-2.5.1-tests.patch @@ -37,6 +38,7 @@ utility for searching through text. %patch3 -p1 -b .oi %patch4 -p1 -b .manpage %patch5 -p1 -b .color +%patch6 -p1 -b .icolor %patch10 -p1 -b .egf-speedup %patch11 -p1 -b .dfa-optional %patch12 -p1 -b .tests @@ -88,6 +90,9 @@ fi %{_mandir}/*/* %changelog +* Fri Jan 7 2005 Tim Waugh +- Removed redundant (and incorrect) code in prline. + * Fri Jan 7 2005 Tim Waugh 2.5.1-46 - More -w tests from Jakub Jelinek. - Rebased on 2.5.1a.