grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.25-35-g46ca6d2


From: Paul Eggert
Subject: grep branch, master, updated. v2.25-35-g46ca6d2
Date: Thu, 21 Jul 2016 11:56:57 +0000 (UTC)

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  46ca6d2573dc5628589d8d2a80a41611cbf80356 (commit)
      from  4620f062d60a38790fd76135c7b8b6aa71f18f7d (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=46ca6d2573dc5628589d8d2a80a41611cbf80356


commit 46ca6d2573dc5628589d8d2a80a41611cbf80356
Author: Norihiro Tanaka <address@hidden>
Date:   Sun Nov 2 14:39:43 2014 +0900

    grep: always match single line only with DFA superset
    
    \n cannot occur inside a multibyte character.  So an input always
    matches single line only with DFA superset.
    
    * src/dfasearch.c (EGexecute): Simplify it with above.

diff --git a/src/dfasearch.c b/src/dfasearch.c
index 8052ef0..fbf0fac 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -283,23 +283,22 @@ EGexecute (char *buf, size_t size, size_t *match_size,
               /* Keep using the superset while it reports multiline
                  potential matches; this is more likely to be fast
                  than falling back to KWset would be.  */
-              while ((next_beg = dfaexec (superset, dfa_beg, (char *) end, 1,
-                                          &count, NULL))
-                     && next_beg != end
-                     && count != 0)
+              next_beg = dfaexec (superset, dfa_beg, (char *) end, 0,
+                                  &count, NULL);
+              if (next_beg == NULL || next_beg == end)
+                continue;
+
+              /* Narrow down to the line we've found.  */
+              if (count != 0)
                 {
-                  /* Try to match in just one line.  */
-                  count = 0;
                   beg = memrchr (buf, eol, next_beg - buf);
                   beg++;
                   dfa_beg = beg;
                 }
-              if (next_beg == NULL || next_beg == end)
-                continue;
-
-              /* Narrow down to the line we've found.  */
               end = memchr (next_beg, eol, buflim - next_beg);
               end = end ? end + 1 : buflim;
+
+              count = 0;
             }
 
           /* Try matching with DFA.  */

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

Summary of changes:
 src/dfasearch.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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