grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to grep/src/grep.c


From: Charles Levert
Subject: Changes to grep/src/grep.c
Date: Fri, 29 Apr 2005 02:04:49 -0400

Index: grep/src/grep.c
diff -u grep/src/grep.c:1.96 grep/src/grep.c:1.97
--- grep/src/grep.c:1.96        Tue Apr 12 17:43:54 2005
+++ grep/src/grep.c     Fri Apr 29 06:04:47 2005
@@ -538,7 +538,7 @@
          while ((match_offset = (*execute) (ibeg, ilim - ibeg, &match_size, 1))
                 != (size_t) -1)
            {
-             char const *b = ibeg + match_offset;
+             char const *b = beg + match_offset;
              if (b == lim)
                break;
              if (match_size == 0)
@@ -549,7 +549,8 @@
              if(color_option)
                fputs("\33[00m", stdout);
              fputs("\n", stdout);
-             ibeg = b + match_size;
+             beg = b + match_size;
+             ibeg += match_offset + match_size;
            }
          free (buf);
          lastout = lim;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]