- Removed redundant (and incorrect) code in prline.

This commit is contained in:
Tim Waugh 2005-01-07 12:08:02 +00:00
parent 59788ab210
commit e09e1940d7
2 changed files with 41 additions and 0 deletions

36
grep-2.5.1-icolor.patch Normal file
View File

@ -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)
{

View File

@ -11,6 +11,7 @@ Patch2: grep-2.5-i18n.patch
Patch3: grep-2.5.1-oi.patch Patch3: grep-2.5.1-oi.patch
Patch4: grep-2.5.1-manpage.patch Patch4: grep-2.5.1-manpage.patch
Patch5: grep-2.5.1-color.patch Patch5: grep-2.5.1-color.patch
Patch6: grep-2.5.1-icolor.patch
Patch10: grep-2.5.1-egf-speedup.patch Patch10: grep-2.5.1-egf-speedup.patch
Patch11: grep-2.5.1-dfa-optional.patch Patch11: grep-2.5.1-dfa-optional.patch
Patch12: grep-2.5.1-tests.patch Patch12: grep-2.5.1-tests.patch
@ -37,6 +38,7 @@ utility for searching through text.
%patch3 -p1 -b .oi %patch3 -p1 -b .oi
%patch4 -p1 -b .manpage %patch4 -p1 -b .manpage
%patch5 -p1 -b .color %patch5 -p1 -b .color
%patch6 -p1 -b .icolor
%patch10 -p1 -b .egf-speedup %patch10 -p1 -b .egf-speedup
%patch11 -p1 -b .dfa-optional %patch11 -p1 -b .dfa-optional
%patch12 -p1 -b .tests %patch12 -p1 -b .tests
@ -88,6 +90,9 @@ fi
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Fri Jan 7 2005 Tim Waugh <twaugh@redhat.com>
- Removed redundant (and incorrect) code in prline.
* Fri Jan 7 2005 Tim Waugh <twaugh@redhat.com> 2.5.1-46 * Fri Jan 7 2005 Tim Waugh <twaugh@redhat.com> 2.5.1-46
- More -w tests from Jakub Jelinek. - More -w tests from Jakub Jelinek.
- Rebased on 2.5.1a. - Rebased on 2.5.1a.