grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.21-75-g662b19f


From: Paul Eggert
Subject: grep branch, master, updated. v2.21-75-g662b19f
Date: Sat, 17 Oct 2015 05:42:10 +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  662b19f2d0edc0bf07f1a2c1421080252df4a37c (commit)
       via  468d5217ed6ec1679512dec208c7f30fb8612957 (commit)
       via  805811db0ab57e37dda30f95be2927d6f7a7eba7 (commit)
       via  79d7918c889dea0d83c270cc1e8a9d8786b20102 (commit)
      from  09eca14b3b7d676ce87a8a4b162265c347643d2a (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=662b19f2d0edc0bf07f1a2c1421080252df4a37c


commit 662b19f2d0edc0bf07f1a2c1421080252df4a37c
Author: Paul Eggert <address@hidden>
Date:   Fri Oct 16 22:39:51 2015 -0700

    grep: simplify previous change
    
    * src/grep.c (main): Simplify recently-changed grep -Fw test.

diff --git a/src/grep.c b/src/grep.c
index 0ca0d9a..2c5e09a 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2561,14 +2561,15 @@ main (int argc, char **argv)
   build_mbclen_cache ();
   init_easy_encoding ();
 
-  /* If fgrep in a multibyte locale, then use grep if either
+  /* In a unibyte locale, switch from fgrep to grep if
+     the pattern matches words (where grep is typically faster).
+     In a multibyte locale, switch from fgrep to grep if either
      (1) case is ignored (where grep is typically faster), or
-     (2) the pattern matches words (where grep is typically faster), or
-     (3) the pattern has an encoding error (where fgrep might not work).  */
+     (2) the pattern has an encoding error (where fgrep might not work).  */
   if (compile == Fcompile
-      && (MB_CUR_MAX > 1 && (match_icase
-                             || contains_encoding_error (keys, keycc)))
-          || (MB_CUR_MAX == 1 && match_words))
+      && (MB_CUR_MAX <= 1
+          ? match_words
+          : match_icase || contains_encoding_error (keys, keycc)))
     {
       size_t new_keycc;
       char *new_keys;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=468d5217ed6ec1679512dec208c7f30fb8612957


commit 662b19f2d0edc0bf07f1a2c1421080252df4a37c
Author: Paul Eggert <address@hidden>
Date:   Fri Oct 16 22:39:51 2015 -0700

    grep: simplify previous change
    
    * src/grep.c (main): Simplify recently-changed grep -Fw test.

diff --git a/src/grep.c b/src/grep.c
index 0ca0d9a..2c5e09a 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2561,14 +2561,15 @@ main (int argc, char **argv)
   build_mbclen_cache ();
   init_easy_encoding ();
 
-  /* If fgrep in a multibyte locale, then use grep if either
+  /* In a unibyte locale, switch from fgrep to grep if
+     the pattern matches words (where grep is typically faster).
+     In a multibyte locale, switch from fgrep to grep if either
      (1) case is ignored (where grep is typically faster), or
-     (2) the pattern matches words (where grep is typically faster), or
-     (3) the pattern has an encoding error (where fgrep might not work).  */
+     (2) the pattern has an encoding error (where fgrep might not work).  */
   if (compile == Fcompile
-      && (MB_CUR_MAX > 1 && (match_icase
-                             || contains_encoding_error (keys, keycc)))
-          || (MB_CUR_MAX == 1 && match_words))
+      && (MB_CUR_MAX <= 1
+          ? match_words
+          : match_icase || contains_encoding_error (keys, keycc)))
     {
       size_t new_keycc;
       char *new_keys;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=805811db0ab57e37dda30f95be2927d6f7a7eba7


commit 662b19f2d0edc0bf07f1a2c1421080252df4a37c
Author: Paul Eggert <address@hidden>
Date:   Fri Oct 16 22:39:51 2015 -0700

    grep: simplify previous change
    
    * src/grep.c (main): Simplify recently-changed grep -Fw test.

diff --git a/src/grep.c b/src/grep.c
index 0ca0d9a..2c5e09a 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2561,14 +2561,15 @@ main (int argc, char **argv)
   build_mbclen_cache ();
   init_easy_encoding ();
 
-  /* If fgrep in a multibyte locale, then use grep if either
+  /* In a unibyte locale, switch from fgrep to grep if
+     the pattern matches words (where grep is typically faster).
+     In a multibyte locale, switch from fgrep to grep if either
      (1) case is ignored (where grep is typically faster), or
-     (2) the pattern matches words (where grep is typically faster), or
-     (3) the pattern has an encoding error (where fgrep might not work).  */
+     (2) the pattern has an encoding error (where fgrep might not work).  */
   if (compile == Fcompile
-      && (MB_CUR_MAX > 1 && (match_icase
-                             || contains_encoding_error (keys, keycc)))
-          || (MB_CUR_MAX == 1 && match_words))
+      && (MB_CUR_MAX <= 1
+          ? match_words
+          : match_icase || contains_encoding_error (keys, keycc)))
     {
       size_t new_keycc;
       char *new_keys;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=79d7918c889dea0d83c270cc1e8a9d8786b20102


commit 662b19f2d0edc0bf07f1a2c1421080252df4a37c
Author: Paul Eggert <address@hidden>
Date:   Fri Oct 16 22:39:51 2015 -0700

    grep: simplify previous change
    
    * src/grep.c (main): Simplify recently-changed grep -Fw test.

diff --git a/src/grep.c b/src/grep.c
index 0ca0d9a..2c5e09a 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2561,14 +2561,15 @@ main (int argc, char **argv)
   build_mbclen_cache ();
   init_easy_encoding ();
 
-  /* If fgrep in a multibyte locale, then use grep if either
+  /* In a unibyte locale, switch from fgrep to grep if
+     the pattern matches words (where grep is typically faster).
+     In a multibyte locale, switch from fgrep to grep if either
      (1) case is ignored (where grep is typically faster), or
-     (2) the pattern matches words (where grep is typically faster), or
-     (3) the pattern has an encoding error (where fgrep might not work).  */
+     (2) the pattern has an encoding error (where fgrep might not work).  */
   if (compile == Fcompile
-      && (MB_CUR_MAX > 1 && (match_icase
-                             || contains_encoding_error (keys, keycc)))
-          || (MB_CUR_MAX == 1 && match_words))
+      && (MB_CUR_MAX <= 1
+          ? match_words
+          : match_icase || contains_encoding_error (keys, keycc)))
     {
       size_t new_keycc;
       char *new_keys;

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

Summary of changes:
 src/grep.c     |   10 +++++++---
 src/kwsearch.c |   14 +++++++-------
 2 files changed, 14 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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