Tim Waugh e09e19
--- grep-2.5.1a/src/grep.c.icolor	2005-01-07 12:05:20.877785250 +0000
Tim Waugh e09e19
+++ grep-2.5.1a/src/grep.c	2005-01-07 12:05:44.690194388 +0000
Tim Waugh e09e19
@@ -564,33 +564,6 @@
Tim Waugh e09e19
     {
Tim Waugh e09e19
       size_t match_size;
Tim Waugh e09e19
       size_t match_offset;
Tim Waugh e09e19
-      if(match_icase)
Tim Waugh e09e19
-        {
Tim Waugh e09e19
-	  /* Yuck, this is tricky */
Tim Waugh e09e19
-          char *buf = (char*) xmalloc (lim - beg);
Tim Waugh e09e19
-	  char *ibeg = buf;
Tim Waugh e09e19
-	  char *ilim = ibeg + (lim - beg);
Tim Waugh e09e19
-	  int i;
Tim Waugh e09e19
-	  for (i = 0; i < lim - beg; i++)
Tim Waugh e09e19
-	    ibeg[i] = tolower (beg[i]);
Tim Waugh e09e19
-	  while ((match_offset = (*execute) (ibeg, ilim-ibeg, &match_size, 1))
Tim Waugh e09e19
-		 != (size_t) -1)
Tim Waugh e09e19
-	    {
Tim Waugh e09e19
-	      char const *b = beg + match_offset;
Tim Waugh e09e19
-	      if (b == lim)
Tim Waugh e09e19
-		break;
Tim Waugh e09e19
-	      fwrite (beg, sizeof (char), match_offset, stdout);
Tim Waugh e09e19
-	      printf ("\33[%sm", grep_color);
Tim Waugh e09e19
-	      fwrite (b, sizeof (char), match_size, stdout);
Tim Waugh e09e19
-	      fputs ("\33[00m", stdout);
Tim Waugh e09e19
-	      beg = b + match_size;
Tim Waugh e09e19
-	      ibeg = ibeg + match_offset + match_size;
Tim Waugh e09e19
-	    }
Tim Waugh e09e19
-	  fwrite (beg, 1, lim - beg, stdout);
Tim Waugh e09e19
-	  free (buf);
Tim Waugh e09e19
-	  lastout = lim;
Tim Waugh e09e19
-	  return;
Tim Waugh e09e19
-	}
Tim Waugh e09e19
       while (lim-beg && (match_offset = (*execute) (beg, lim - beg, &match_size, 1))
Tim Waugh e09e19
 	     != (size_t) -1)
Tim Waugh e09e19
 	{