grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.19-7-g7da3585


From: Paul Eggert
Subject: grep branch, master, updated. v2.19-7-g7da3585
Date: Mon, 26 May 2014 16:07:36 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  7da358518836a0fdea84ee89a053f43f14fde633 (commit)
      from  7585d81dcc262613aead279c22b56c7cffeeef3f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=7da358518836a0fdea84ee89a053f43f14fde633


commit 7da358518836a0fdea84ee89a053f43f14fde633
Author: Norihiro Tanaka <address@hidden>
Date:   Fri May 16 18:44:59 2014 +0900

    grep: remove unnecessary argument
    
    * src/grep.c (do_execute): Remove argument 'start_ptr'.  It's always null.
    All uses changed.

diff --git a/src/grep.c b/src/grep.c
index 6a2a029..acc08c7 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1052,8 +1052,7 @@ prtext (char const *beg, char const *lim)
    is no match, return (size_t) -1.  Otherwise, set *MATCH_SIZE to the
    length of the match and return the offset of the start of the match.  */
 static size_t
-do_execute (char const *buf, size_t size, size_t *match_size,
-            char const *start_ptr)
+do_execute (char const *buf, size_t size, size_t *match_size)
 {
   size_t result;
   const char *line_next;
@@ -1072,7 +1071,7 @@ do_execute (char const *buf, size_t size, size_t 
*match_size,
      return buf + size otherwise.  */
   if (! (execute == Fexecute || execute == Pexecute)
       || MB_CUR_MAX == 1 || !match_icase)
-    return execute (buf, size, match_size, start_ptr);
+    return execute (buf, size, match_size, NULL);
 
   for (line_next = buf; line_next < buf + size; )
     {
@@ -1084,10 +1083,7 @@ do_execute (char const *buf, size_t size, size_t 
*match_size,
       else
         line_next = line_end + 1;
 
-      if (start_ptr && start_ptr >= line_end)
-        continue;
-
-      result = execute (line_buf, line_next - line_buf, match_size, start_ptr);
+      result = execute (line_buf, line_next - line_buf, match_size, NULL);
       if (result != (size_t) -1)
         return (line_buf - buf) + result;
     }
@@ -1108,7 +1104,7 @@ grepbuf (char const *beg, char const *lim)
   for (p = beg; p < lim; p = endp)
     {
       size_t match_size;
-      size_t match_offset = do_execute (p, lim - p, &match_size, NULL);
+      size_t match_offset = do_execute (p, lim - p, &match_size);
       if (match_offset == (size_t) -1)
         {
           if (!out_invert)

-----------------------------------------------------------------------

Summary of changes:
 src/grep.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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