732ac981c4
Wed Jan 22 2003 Tim Powers <timp@redhat.com> - rebuilt Tue Nov 19 2002 Tim Waugh <twaugh@redhat.com> 2.5.1-6 - i18n patch. Mon Oct 21 2002 Tim Waugh <twaugh@redhat.com> 2.5.1-5 - Don't install /usr/share/info/dir. - Fix -o -i (bug #72641). Sat Jul 20 2002 Florian La Roche <Florian.LaRoche@redhat.de> - install all info files #69204 Fri Jun 21 2002 Tim Powers <timp@redhat.com> - automated rebuild Thu May 23 2002 Tim Powers <timp@redhat.com> - automated rebuild
43 lines
1.1 KiB
Diff
43 lines
1.1 KiB
Diff
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=72641 (sent upstream)
|
|
|
|
--- grep-2.5.1/src/grep.c.oi 2002-10-13 20:58:55.000000000 +0100
|
|
+++ grep-2.5.1/src/grep.c 2002-10-13 21:02:43.000000000 +0100
|
|
@@ -533,6 +533,37 @@
|
|
{
|
|
size_t match_size;
|
|
size_t match_offset;
|
|
+ if(match_icase)
|
|
+ {
|
|
+ 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, lim - beg, &match_size, 1))
|
|
+ != (size_t) -1)
|
|
+ {
|
|
+ char const *b = ibeg + match_offset;
|
|
+ if (b == lim)
|
|
+ break;
|
|
+ if (match_size == 0)
|
|
+ break;
|
|
+ if(color_option)
|
|
+ printf("\33[%sm", grep_color);
|
|
+ fwrite(b, sizeof (char), match_size, stdout);
|
|
+ if(color_option)
|
|
+ fputs("\33[00m", stdout);
|
|
+ fputs("\n", stdout);
|
|
+ ibeg = b + match_size;
|
|
+ }
|
|
+ free (buf);
|
|
+ lastout = lim;
|
|
+ if(line_buffered)
|
|
+ fflush(stdout);
|
|
+ return;
|
|
+ }
|
|
while ((match_offset = (*execute) (beg, lim - beg, &match_size, 1))
|
|
!= (size_t) -1)
|
|
{
|