From MAILER-DAEMON Wed Jul 06 13:28:32 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bKqci-0008OL-F6
	for mharc-grep-commit@gnu.org; Wed, 06 Jul 2016 13:28:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45899)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bKqcf-0008OD-Hd
	for grep-commit@gnu.org; Wed, 06 Jul 2016 13:28:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bKqcc-0008A8-UM
	for grep-commit@gnu.org; Wed, 06 Jul 2016 13:28:28 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:54292)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bKqcc-00089z-R0
	for grep-commit@gnu.org; Wed, 06 Jul 2016 13:28:26 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69712)
	id B3A6C22015C; Wed,  6 Jul 2016 17:28:26 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-29-g1f3d1c3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 440b0b85d13dab62a562762db51c6de2255fc9f1
X-Git-Newrev: 1f3d1c3be3ff564a9d641c2ebd180124f455a697
Message-Id: <20160706172826.B3A6C22015C@vcs.savannah.gnu.org>
Date: Wed,  6 Jul 2016 17:28:26 +0000 (UTC)
From: eggert@cs.ucla.edu (Paul Eggert)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Jul 2016 17:28:31 -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  1f3d1c3be3ff564a9d641c2ebd180124f455a697 (commit)
       via  26d1db317487a8cc279e872224e7876d112cdf50 (commit)
       via  08d06101acc3b2e2bbcfec8a5347229060489b95 (commit)
       via  6b4e05d3d53a9b842c43fccb3a0e1780a506fbcd (commit)
      from  440b0b85d13dab62a562762db51c6de2255fc9f1 (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=1f3d1c3be3ff564a9d641c2ebd180124f455a697


commit 1f3d1c3be3ff564a9d641c2ebd180124f455a697
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jul 6 19:25:20 2016 +0200

    dfa: don't treat null bytes specially
    
    * src/dfa.c (transit_state): Do not treat null byte specially
    when eolbyte == '\n'.

diff --git a/src/dfa.c b/src/dfa.c
index d5ffe72..8f9f0bc 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2962,17 +2962,13 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
                unsigned char const *end)
 {
   state_num s1, s2;
-  int mbclen;  /* The length of current input multibyte character.  */
   wint_t wc;
-  int context;
   size_t i, j;
   int k;
   int separate_contexts;
 
-  /* Note: caller must free the return value of this function.  */
-  mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
-
-  context = (wc == (wchar_t) eolbyte || wc == 0) ? CTX_NEWLINE : CTX_NONE;
+  int mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
+  int context = wc == eolbyte ? CTX_NEWLINE : CTX_NONE;
 
   /* This state has some operators which can match a multibyte character.  */
   d->mb_follows.nelem = 0;
@@ -3000,10 +2996,9 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
     }
 
   separate_contexts = state_separate_contexts (&d->mb_follows);
-  if (context == CTX_NEWLINE && separate_contexts & CTX_NEWLINE)
-    s1 = state_index (d, &d->mb_follows, CTX_NEWLINE);
-  else
-    s1 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
+  if (! (context == CTX_NEWLINE || separate_contexts & CTX_NEWLINE))
+    context = separate_contexts ^ CTX_ANY;
+  s1 = state_index (d, &d->mb_follows, context);
   realloc_trans_if_necessary (d, s1);
 
   return s1;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=26d1db317487a8cc279e872224e7876d112cdf50


commit 1f3d1c3be3ff564a9d641c2ebd180124f455a697
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jul 6 19:25:20 2016 +0200

    dfa: don't treat null bytes specially
    
    * src/dfa.c (transit_state): Do not treat null byte specially
    when eolbyte == '\n'.

diff --git a/src/dfa.c b/src/dfa.c
index d5ffe72..8f9f0bc 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2962,17 +2962,13 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
                unsigned char const *end)
 {
   state_num s1, s2;
-  int mbclen;  /* The length of current input multibyte character.  */
   wint_t wc;
-  int context;
   size_t i, j;
   int k;
   int separate_contexts;
 
-  /* Note: caller must free the return value of this function.  */
-  mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
-
-  context = (wc == (wchar_t) eolbyte || wc == 0) ? CTX_NEWLINE : CTX_NONE;
+  int mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
+  int context = wc == eolbyte ? CTX_NEWLINE : CTX_NONE;
 
   /* This state has some operators which can match a multibyte character.  */
   d->mb_follows.nelem = 0;
@@ -3000,10 +2996,9 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
     }
 
   separate_contexts = state_separate_contexts (&d->mb_follows);
-  if (context == CTX_NEWLINE && separate_contexts & CTX_NEWLINE)
-    s1 = state_index (d, &d->mb_follows, CTX_NEWLINE);
-  else
-    s1 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
+  if (! (context == CTX_NEWLINE || separate_contexts & CTX_NEWLINE))
+    context = separate_contexts ^ CTX_ANY;
+  s1 = state_index (d, &d->mb_follows, context);
   realloc_trans_if_necessary (d, s1);
 
   return s1;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=08d06101acc3b2e2bbcfec8a5347229060489b95


commit 1f3d1c3be3ff564a9d641c2ebd180124f455a697
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jul 6 19:25:20 2016 +0200

    dfa: don't treat null bytes specially
    
    * src/dfa.c (transit_state): Do not treat null byte specially
    when eolbyte == '\n'.

diff --git a/src/dfa.c b/src/dfa.c
index d5ffe72..8f9f0bc 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2962,17 +2962,13 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
                unsigned char const *end)
 {
   state_num s1, s2;
-  int mbclen;  /* The length of current input multibyte character.  */
   wint_t wc;
-  int context;
   size_t i, j;
   int k;
   int separate_contexts;
 
-  /* Note: caller must free the return value of this function.  */
-  mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
-
-  context = (wc == (wchar_t) eolbyte || wc == 0) ? CTX_NEWLINE : CTX_NONE;
+  int mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
+  int context = wc == eolbyte ? CTX_NEWLINE : CTX_NONE;
 
   /* This state has some operators which can match a multibyte character.  */
   d->mb_follows.nelem = 0;
@@ -3000,10 +2996,9 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
     }
 
   separate_contexts = state_separate_contexts (&d->mb_follows);
-  if (context == CTX_NEWLINE && separate_contexts & CTX_NEWLINE)
-    s1 = state_index (d, &d->mb_follows, CTX_NEWLINE);
-  else
-    s1 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
+  if (! (context == CTX_NEWLINE || separate_contexts & CTX_NEWLINE))
+    context = separate_contexts ^ CTX_ANY;
+  s1 = state_index (d, &d->mb_follows, context);
   realloc_trans_if_necessary (d, s1);
 
   return s1;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=6b4e05d3d53a9b842c43fccb3a0e1780a506fbcd


commit 1f3d1c3be3ff564a9d641c2ebd180124f455a697
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jul 6 19:25:20 2016 +0200

    dfa: don't treat null bytes specially
    
    * src/dfa.c (transit_state): Do not treat null byte specially
    when eolbyte == '\n'.

diff --git a/src/dfa.c b/src/dfa.c
index d5ffe72..8f9f0bc 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -2962,17 +2962,13 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
                unsigned char const *end)
 {
   state_num s1, s2;
-  int mbclen;  /* The length of current input multibyte character.  */
   wint_t wc;
-  int context;
   size_t i, j;
   int k;
   int separate_contexts;
 
-  /* Note: caller must free the return value of this function.  */
-  mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
-
-  context = (wc == (wchar_t) eolbyte || wc == 0) ? CTX_NEWLINE : CTX_NONE;
+  int mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
+  int context = wc == eolbyte ? CTX_NEWLINE : CTX_NONE;
 
   /* This state has some operators which can match a multibyte character.  */
   d->mb_follows.nelem = 0;
@@ -3000,10 +2996,9 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
     }
 
   separate_contexts = state_separate_contexts (&d->mb_follows);
-  if (context == CTX_NEWLINE && separate_contexts & CTX_NEWLINE)
-    s1 = state_index (d, &d->mb_follows, CTX_NEWLINE);
-  else
-    s1 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
+  if (! (context == CTX_NEWLINE || separate_contexts & CTX_NEWLINE))
+    context = separate_contexts ^ CTX_ANY;
+  s1 = state_index (d, &d->mb_follows, context);
   realloc_trans_if_necessary (d, s1);
 
   return s1;

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

Summary of changes:
 src/dfa.c |  355 ++++++++++++++++---------------------------------------------
 1 file changed, 90 insertions(+), 265 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Thu Jul 07 06:00:16 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bL66S-0008Kz-3S
	for mharc-grep-commit@gnu.org; Thu, 07 Jul 2016 06:00:16 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43139)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bL66P-0008Kk-Tt
	for grep-commit@gnu.org; Thu, 07 Jul 2016 06:00:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bL66N-0001zS-Es
	for grep-commit@gnu.org; Thu, 07 Jul 2016 06:00:12 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:34620)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bL66N-0001zL-AL
	for grep-commit@gnu.org; Thu, 07 Jul 2016 06:00:11 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69712)
	id 22CB022015C; Thu,  7 Jul 2016 10:00:11 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-30-g220cbd1
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1f3d1c3be3ff564a9d641c2ebd180124f455a697
X-Git-Newrev: 220cbd1c8459b9e0d284d62aa65023c663bb71f8
Message-Id: <20160707100011.22CB022015C@vcs.savannah.gnu.org>
Date: Thu,  7 Jul 2016 10:00:11 +0000 (UTC)
From: eggert@cs.ucla.edu (Paul Eggert)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jul 2016 10:00:15 -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  220cbd1c8459b9e0d284d62aa65023c663bb71f8 (commit)
      from  1f3d1c3be3ff564a9d641c2ebd180124f455a697 (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=220cbd1c8459b9e0d284d62aa65023c663bb71f8


commit 220cbd1c8459b9e0d284d62aa65023c663bb71f8
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Jul 7 11:59:06 2016 +0200

    dfa: fix comments to match code better
    
    * src/dfa.c: Fix comments.

diff --git a/src/dfa.c b/src/dfa.c
index 8f9f0bc..f7e907b 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3034,28 +3034,29 @@ skip_remains_mb (struct dfa *d, unsigned char const *p,
   return mbp;
 }
 
-/* Search through a buffer looking for a match to the given struct dfa.
+/* Search through a buffer looking for a match to the struct dfa *D.
    Find the first occurrence of a string matching the regexp in the
    buffer, and the shortest possible version thereof.  Return a pointer to
    the first character after the match, or NULL if none is found.  BEGIN
    points to the beginning of the buffer, and END points to the first byte
    after its end.  Note however that we store a sentinel byte (usually
    newline) in *END, so the actual buffer must be one byte longer.
-   When ALLOW_NL is nonzero, newlines may appear in the matching string.
+   When ALLOW_NL, newlines may appear in the matching string.
    If COUNT is non-NULL, increment *COUNT once for each newline processed.
-   Finally, if BACKREF is non-NULL set *BACKREF to indicate whether we
-   encountered a DFA-unfriendly construct.  The caller may use this to
-   decide whether to fall back on a matcher like regex.  If MULTIBYTE,
-   the input consists of multibyte characters and/or encoding-error bytes.
-   Otherwise, the input consists of single-byte characters.
+   If MULTIBYTE, the input consists of multibyte characters and/or
+   encoding-error bytes.  Otherwise, it consists of single-byte characters.
    Here is the list of features that make this DFA matcher punt:
-    - [M-N]-range-in-MB-locale: regex is up to 25% faster on [a-z]
+    - [M-N] range in non-simple locale: regex is up to 25% faster on [a-z]
+    - [^...] in non-simple locale
+    - [[=foo=]] or [[.foo.]]
+    - [[:alpha:]] etc. in multibyte locale (except [[:digit:]] works OK)
     - back-reference: (.)\1
-    - word-delimiter-in-MB-locale: \<, \>, \b
-    */
+    - word-delimiter in multibyte locale: \<, \>, \b, \B
+   See using_simple_locale for the definition of "simple locale".  */
+
 static inline char *
 dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
-             size_t *count, bool multibyte)
+              size_t *count, bool multibyte)
 {
   state_num s, s1;              /* Current state.  */
   unsigned char const *p, *mbp; /* Current input character.  */
@@ -3224,8 +3225,8 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
   return (char *) p;
 }
 
-/* Specialized versions of dfaexec_main for multibyte and single-byte
-   cases.  This is for performance.  */
+/* Specialized versions of dfaexec for multibyte and single-byte cases.
+   This is for performance, as dfaexec_main is an inline function.  */
 
 static char *
 dfaexec_mb (struct dfa *d, char const *begin, char *end,
@@ -3251,8 +3252,9 @@ dfaexec_noop (struct dfa *d, char const *begin, char *end,
   return (char *) begin;
 }
 
-/* Like dfaexec_main (D, BEGIN, END, ALLOW_NL, COUNT, BACKREF, D->multibyte),
-   but faster.  */
+/* Like dfaexec_main (D, BEGIN, END, ALLOW_NL, COUNT, D->multibyte),
+   but faster and set *BACKREF if the DFA code does not support this
+   regexp usage.  */
 
 char *
 dfaexec (struct dfa *d, char const *begin, char *end,

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

Summary of changes:
 src/dfa.c |   32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jul 15 06:02:46 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bNzxF-0004gz-QZ
	for mharc-grep-commit@gnu.org; Fri, 15 Jul 2016 06:02:45 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37874)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bNzxC-0004cW-8M
	for grep-commit@gnu.org; Fri, 15 Jul 2016 06:02:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bNzx6-0008FZ-Gp
	for grep-commit@gnu.org; Fri, 15 Jul 2016 06:02:41 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:54446)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bNzx6-0008FP-CO
	for grep-commit@gnu.org; Fri, 15 Jul 2016 06:02:36 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69712)
	id D6286220140; Fri, 15 Jul 2016 10:02:35 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-33-ge9ee68d
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 220cbd1c8459b9e0d284d62aa65023c663bb71f8
X-Git-Newrev: e9ee68dfd8150145a64ec11e5227c9029c7ee3c0
Message-Id: <20160715100235.D6286220140@vcs.savannah.gnu.org>
Date: Fri, 15 Jul 2016 10:02:35 +0000 (UTC)
From: eggert@cs.ucla.edu (Paul Eggert)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Jul 2016 10:02:44 -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  e9ee68dfd8150145a64ec11e5227c9029c7ee3c0 (commit)
       via  65fa1e31c0da8dc26f872c050e81b649dc65a32b (commit)
       via  cf39d76da476b747b1b875bdd92dd00770ae4936 (commit)
      from  220cbd1c8459b9e0d284d62aa65023c663bb71f8 (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=e9ee68dfd8150145a64ec11e5227c9029c7ee3c0


commit e9ee68dfd8150145a64ec11e5227c9029c7ee3c0
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jul 15 12:02:01 2016 +0200

    maint: modernize HACKING a bit
    
    * HACKING: Remove some ancient history to simplify maintenance.

diff --git a/HACKING b/HACKING
index a4ab327..111870c 100644
--- a/HACKING
+++ b/HACKING
@@ -3,14 +3,6 @@ Grep Contribution Guidelines
 
 Prerequisites
 =============
-You will need the "git" version control tools.
-On Fedora-based systems, do "yum install git".
-On Debian-based ones install the "git-core" package.
-Then run "git --version".  If that says it's older than
-version 1.4.4, then you'd do well to get a newer version.
-At worst, just download the latest stable release from
-http://git.or.cz/ and build from source.
-
 For details on building the programs in this package, see
 the file, README-hacking.
 
@@ -22,12 +14,9 @@ You can get a copy of the latest with this command:
 
     git clone git://git.sv.gnu.org/grep
 
-That downloads the entire repository, including revision control history
-dating back to 1991.  The repository (the part you download, and which
-resides in grep/.git) currently weighs in at about 9MB.  So you don't
-want to download it more often than necessary.  Once downloaded, you
-can get incremental updates by running one of these commands from
-inside your new grep/ directory:
+That downloads the entire repository, including revision control history.
+Once downloaded, you can get incremental updates by running one of
+these commands from inside your new grep/ directory:
 
 If you have made *no* changes:
     git pull
@@ -202,11 +191,10 @@ grep-specific:
 
 No more ChangeLog files
 =======================
-Do not modify any of the ChangeLog files in grep.  Starting in
-2008, the policy changed.  Before, we would insert the exact same text
-(or worse, sometimes slightly differing) into both the ChangeLog file
-and the commit log.  Now we put that information only in the commit log,
-and generate the top-level ChangeLog file from logs at "make dist" time.
+
+Do not modify any the ChangeLog files during development.  Instead,
+put that information only in commit messages.  The "make dist" command
+will generate the top-level ChangeLog file from commit messages.
 As such, there are strict requirements on the form of the commit log
 messages.
 

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=65fa1e31c0da8dc26f872c050e81b649dc65a32b


commit e9ee68dfd8150145a64ec11e5227c9029c7ee3c0
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jul 15 12:02:01 2016 +0200

    maint: modernize HACKING a bit
    
    * HACKING: Remove some ancient history to simplify maintenance.

diff --git a/HACKING b/HACKING
index a4ab327..111870c 100644
--- a/HACKING
+++ b/HACKING
@@ -3,14 +3,6 @@ Grep Contribution Guidelines
 
 Prerequisites
 =============
-You will need the "git" version control tools.
-On Fedora-based systems, do "yum install git".
-On Debian-based ones install the "git-core" package.
-Then run "git --version".  If that says it's older than
-version 1.4.4, then you'd do well to get a newer version.
-At worst, just download the latest stable release from
-http://git.or.cz/ and build from source.
-
 For details on building the programs in this package, see
 the file, README-hacking.
 
@@ -22,12 +14,9 @@ You can get a copy of the latest with this command:
 
     git clone git://git.sv.gnu.org/grep
 
-That downloads the entire repository, including revision control history
-dating back to 1991.  The repository (the part you download, and which
-resides in grep/.git) currently weighs in at about 9MB.  So you don't
-want to download it more often than necessary.  Once downloaded, you
-can get incremental updates by running one of these commands from
-inside your new grep/ directory:
+That downloads the entire repository, including revision control history.
+Once downloaded, you can get incremental updates by running one of
+these commands from inside your new grep/ directory:
 
 If you have made *no* changes:
     git pull
@@ -202,11 +191,10 @@ grep-specific:
 
 No more ChangeLog files
 =======================
-Do not modify any of the ChangeLog files in grep.  Starting in
-2008, the policy changed.  Before, we would insert the exact same text
-(or worse, sometimes slightly differing) into both the ChangeLog file
-and the commit log.  Now we put that information only in the commit log,
-and generate the top-level ChangeLog file from logs at "make dist" time.
+
+Do not modify any the ChangeLog files during development.  Instead,
+put that information only in commit messages.  The "make dist" command
+will generate the top-level ChangeLog file from commit messages.
 As such, there are strict requirements on the form of the commit log
 messages.
 

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


commit e9ee68dfd8150145a64ec11e5227c9029c7ee3c0
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jul 15 12:02:01 2016 +0200

    maint: modernize HACKING a bit
    
    * HACKING: Remove some ancient history to simplify maintenance.

diff --git a/HACKING b/HACKING
index a4ab327..111870c 100644
--- a/HACKING
+++ b/HACKING
@@ -3,14 +3,6 @@ Grep Contribution Guidelines
 
 Prerequisites
 =============
-You will need the "git" version control tools.
-On Fedora-based systems, do "yum install git".
-On Debian-based ones install the "git-core" package.
-Then run "git --version".  If that says it's older than
-version 1.4.4, then you'd do well to get a newer version.
-At worst, just download the latest stable release from
-http://git.or.cz/ and build from source.
-
 For details on building the programs in this package, see
 the file, README-hacking.
 
@@ -22,12 +14,9 @@ You can get a copy of the latest with this command:
 
     git clone git://git.sv.gnu.org/grep
 
-That downloads the entire repository, including revision control history
-dating back to 1991.  The repository (the part you download, and which
-resides in grep/.git) currently weighs in at about 9MB.  So you don't
-want to download it more often than necessary.  Once downloaded, you
-can get incremental updates by running one of these commands from
-inside your new grep/ directory:
+That downloads the entire repository, including revision control history.
+Once downloaded, you can get incremental updates by running one of
+these commands from inside your new grep/ directory:
 
 If you have made *no* changes:
     git pull
@@ -202,11 +191,10 @@ grep-specific:
 
 No more ChangeLog files
 =======================
-Do not modify any of the ChangeLog files in grep.  Starting in
-2008, the policy changed.  Before, we would insert the exact same text
-(or worse, sometimes slightly differing) into both the ChangeLog file
-and the commit log.  Now we put that information only in the commit log,
-and generate the top-level ChangeLog file from logs at "make dist" time.
+
+Do not modify any the ChangeLog files during development.  Instead,
+put that information only in commit messages.  The "make dist" command
+will generate the top-level ChangeLog file from commit messages.
 As such, there are strict requirements on the form of the commit log
 messages.
 

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

Summary of changes:
 HACKING                       |   26 +++++++-------------------
 src/kwset.c                   |    5 +++--
 tests/Makefile.am             |    1 +
 tests/{c-locale => two-chars} |   20 +++++++++-----------
 4 files changed, 20 insertions(+), 32 deletions(-)
 copy tests/{c-locale => two-chars} (53%)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jul 15 06:27:33 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bO0LF-0003Hv-9n
	for mharc-grep-commit@gnu.org; Fri, 15 Jul 2016 06:27:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42240)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bO0LD-0003Ho-4T
	for grep-commit@gnu.org; Fri, 15 Jul 2016 06:27:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bO0LB-00054x-Pq
	for grep-commit@gnu.org; Fri, 15 Jul 2016 06:27:31 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:54628)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bO0LB-00054q-M1
	for grep-commit@gnu.org; Fri, 15 Jul 2016 06:27:29 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69712)
	id 7BA94220140; Fri, 15 Jul 2016 10:27:29 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-34-g4620f06
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e9ee68dfd8150145a64ec11e5227c9029c7ee3c0
X-Git-Newrev: 4620f062d60a38790fd76135c7b8b6aa71f18f7d
Message-Id: <20160715102729.7BA94220140@vcs.savannah.gnu.org>
Date: Fri, 15 Jul 2016 10:27:29 +0000 (UTC)
From: eggert@cs.ucla.edu (Paul Eggert)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Jul 2016 10:27:32 -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  4620f062d60a38790fd76135c7b8b6aa71f18f7d (commit)
      from  e9ee68dfd8150145a64ec11e5227c9029c7ee3c0 (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=4620f062d60a38790fd76135c7b8b6aa71f18f7d


commit 4620f062d60a38790fd76135c7b8b6aa71f18f7d
Author: Norihiro Tanaka <noritnk@kcn.ne.jp>
Date:   Fri Jul 15 12:26:53 2016 +0200

    dfa: fix whitespace problems
    
    * src/dfa.c: Use GNU style for pointer decls.

diff --git a/src/dfa.c b/src/dfa.c
index f7e907b..596cc13 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1942,7 +1942,7 @@ dfaparse (char const *s, size_t len, struct dfa *d)
 
 /* Copy one set to another.  */
 static void
-copy (position_set const *src, position_set * dst)
+copy (position_set const *src, position_set *dst)
 {
   if (dst->alloc < src->nelem)
     {
@@ -1955,7 +1955,7 @@ copy (position_set const *src, position_set * dst)
 }
 
 static void
-alloc_position_set (position_set * s, size_t size)
+alloc_position_set (position_set *s, size_t size)
 {
   s->elems = xnmalloc (size, sizeof *s->elems);
   s->alloc = size;
@@ -1967,7 +1967,7 @@ alloc_position_set (position_set * s, size_t size)
    then merge (logically-OR) P's constraints into the one in S.
    S->elems must point to an array large enough to hold the resulting set.  */
 static void
-insert (position p, position_set * s)
+insert (position p, position_set *s)
 {
   size_t count = s->nelem;
   size_t lo = 0, hi = count;
@@ -1997,7 +1997,7 @@ insert (position p, position_set * s)
 /* Merge two sets of positions into a third.  The result is exactly as if
    the positions of both sets were inserted into an initially empty set.  */
 static void
-merge (position_set const *s1, position_set const *s2, position_set * m)
+merge (position_set const *s1, position_set const *s2, position_set *m)
 {
   size_t i = 0, j = 0;
 
@@ -2026,7 +2026,7 @@ merge (position_set const *s1, position_set const *s2, position_set * m)
 
 /* Delete a position from a set.  */
 static void
-delete (position p, position_set * s)
+delete (position p, position_set *s)
 {
   size_t i;
 
@@ -2605,8 +2605,8 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
       prtok (d->tokens[pos.index]);
       fprintf (stderr, " of");
       for (j = 0; j < NOTCHAR; j++)
-      if (tstbit (j,  matches))
-        fprintf (stderr, " 0x%02zx", j);
+        if (tstbit (j, matches))
+          fprintf (stderr, " 0x%02zx", j);
       fprintf (stderr, "\n");
 #endif
 

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

Summary of changes:
 src/dfa.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Thu Jul 21 07:57:02 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bQCb8-0003EJ-QZ
	for mharc-grep-commit@gnu.org; Thu, 21 Jul 2016 07:57:02 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54849)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bQCb6-0003ED-BG
	for grep-commit@gnu.org; Thu, 21 Jul 2016 07:57:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bQCb3-00036a-T9
	for grep-commit@gnu.org; Thu, 21 Jul 2016 07:56:59 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:37707)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1bQCb3-00036W-Pu
	for grep-commit@gnu.org; Thu, 21 Jul 2016 07:56:57 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69712)
	id 8F9BF220159; Thu, 21 Jul 2016 11:56:57 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-35-g46ca6d2
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4620f062d60a38790fd76135c7b8b6aa71f18f7d
X-Git-Newrev: 46ca6d2573dc5628589d8d2a80a41611cbf80356
Message-Id: <20160721115657.8F9BF220159@vcs.savannah.gnu.org>
Date: Thu, 21 Jul 2016 11:56:57 +0000 (UTC)
From: eggert@cs.ucla.edu (Paul Eggert)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jul 2016 11:57:01 -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  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 <noritnk@kcn.ne.jp>
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


From MAILER-DAEMON Sun Jul 24 17:59:28 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bRRQm-0001Si-HL
	for mharc-grep-commit@gnu.org; Sun, 24 Jul 2016 17:59:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56477)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1bRRQk-0001RV-Jv
	for grep-commit@gnu.org; Sun, 24 Jul 2016 17:59:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1bRRQj-00071I-GV
	for grep-commit@gnu.org; Sun, 24 Jul 2016 17:59:26 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:34973)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1bRRQj-00071D-D7
	for grep-commit@gnu.org; Sun, 24 Jul 2016 17:59:25 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69698)
	id 2E716220161; Sun, 24 Jul 2016 21:59:25 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-36-g5a9640c
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 46ca6d2573dc5628589d8d2a80a41611cbf80356
X-Git-Newrev: 5a9640cf2a36da39abbda98a4e9aa956d3951f9f
Message-Id: <20160724215925.2E716220161@vcs.savannah.gnu.org>
Date: Sun, 24 Jul 2016 21:59:25 +0000 (UTC)
From: jim@meyering.net (Jim Meyering)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Jul 2016 21:59:27 -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  5a9640cf2a36da39abbda98a4e9aa956d3951f9f (commit)
      from  46ca6d2573dc5628589d8d2a80a41611cbf80356 (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=5a9640cf2a36da39abbda98a4e9aa956d3951f9f


commit 5a9640cf2a36da39abbda98a4e9aa956d3951f9f
Author: Jim Meyering <meyering@fb.com>
Date:   Fri Jul 15 08:20:28 2016 -0700

    doc: omit an excess word in HACKING

diff --git a/HACKING b/HACKING
index 111870c..4791639 100644
--- a/HACKING
+++ b/HACKING
@@ -192,7 +192,7 @@ grep-specific:
 No more ChangeLog files
 =======================
 
-Do not modify any the ChangeLog files during development.  Instead,
+Do not modify the ChangeLog files during development.  Instead,
 put that information only in commit messages.  The "make dist" command
 will generate the top-level ChangeLog file from commit messages.
 As such, there are strict requirements on the form of the commit log

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

Summary of changes:
 HACKING |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Tue Jul 26 01:58:55 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1bRvOJ-0002Zw-Ke
	for mharc-grep-commit@gnu.org; Tue, 26 Jul 2016 01:58:55 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47474)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1bRvOF-0002ZZ-Kj
	for grep-commit@gnu.org; Tue, 26 Jul 2016 01:58:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1bRvOB-0001uc-7x
	for grep-commit@gnu.org; Tue, 26 Jul 2016 01:58:50 -0400
Received: from vcs.savannah.gnu.org ([208.118.235.72]:51861)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1bRvOB-0001uW-35
	for grep-commit@gnu.org; Tue, 26 Jul 2016 01:58:47 -0400
Received: by vcs.savannah.gnu.org (Postfix, from userid 69698)
	id DAF3C220161; Tue, 26 Jul 2016 05:58:46 +0000 (UTC)
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.25-38-gf13c169
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5a9640cf2a36da39abbda98a4e9aa956d3951f9f
X-Git-Newrev: f13c169e13aed279baa00d9ced9d93fe24775493
Message-Id: <20160726055846.DAF3C220161@vcs.savannah.gnu.org>
Date: Tue, 26 Jul 2016 05:58:46 +0000 (UTC)
From: jim@meyering.net (Jim Meyering)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.72
X-BeenThere: grep-commit@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: CVS commit notices for GNU grep <grep-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/grep-commit/>
List-Post: <mailto:grep-commit@gnu.org>
List-Help: <mailto:grep-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grep-commit>,
	<mailto:grep-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jul 2016 05:58:54 -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  f13c169e13aed279baa00d9ced9d93fe24775493 (commit)
       via  4443fda05ace21b2a2da2d80b09313cc976afe59 (commit)
      from  5a9640cf2a36da39abbda98a4e9aa956d3951f9f (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=f13c169e13aed279baa00d9ced9d93fe24775493


commit f13c169e13aed279baa00d9ced9d93fe24775493
Author: Jim Meyering <meyering@fb.com>
Date:   Sat Jul 16 10:51:31 2016 -0700

    grep: print "filename:lineno:" in invalid-regex diagnostic
    
    Determining the file name and line number is a little tricky because
    of the way the regular expressions are all concatenated onto a newline-
    separated list.  By the time grep would compile regular expressions,
    the <filename,lineno> origin of each regexp was no longer available.
    This patch adds a list of filename,first_lineno pairs, one per input
    source, by which we can then map the ordinal regexp number to a
    filename,lineno pair for the diagnostic.
    
    * src/dfasearch.c (GEAcompile): When diagnosing an invalid regexp
    specified via -f FILE, include the "FILENAME:LINENO: " prefix.
    Also, when there are two or more lines with compilation failures,
    diagnose all of them, rather than stopping after the first.
    * src/grep.h (pattern_file_name): Declare it.
    * src/grep.c: (struct FL_pair): Define type.
    (fl_pair, n_fl_pair_slots, n_pattern_files, patfile_lineno):
    Define globals.
    (fl_add, pattern_file_name): Define functions.
    (main): Call fl_add for each type of the following: -e argument,
    -f argument, command-line-specified (without -e) regexp.
    * tests/filename-lineno.pl: New file.
    * tests/Makefile.am (TESTS): Add it.
    * NEWS (Improvements): Mention this.
    Initially reported by Gunnar Wolf in https://bugs.debian.org/525214
    Forwarded to grep's bug list by Santiago Ruano Rincón as
    http://debbugs.gnu.org/23965

diff --git a/NEWS b/NEWS
index c3e6000..44b6fdf 100644
--- a/NEWS
+++ b/NEWS
@@ -6,12 +6,13 @@ GNU grep NEWS                                    -*- outline -*-
 
   grep can be much faster now when standard output is /dev/null.
 
-** Improvements
-
   grep -F is now typically much faster when many patterns are given,
   as it now uses the Aho-Corasick algorithm instead of the
   Commentz-Walter algorithm in that case.
 
+  grep now prints a "FILENAME:LINENO: " prefix when diagnosing an
+  invalid regular expression that was read from an '-f'-specified file.
+
 
 * Noteworthy changes in release 2.25 (2016-04-21) [stable]
 
diff --git a/src/dfasearch.c b/src/dfasearch.c
index fbf0fac..9a523c8 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -135,6 +135,7 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
      this should be a syntax error.  The same for backref, where the
      backref should be local to each pattern.  */
   char const *p = pattern;
+  bool compilation_failed = false;
   do
     {
       size_t len;
@@ -157,12 +158,25 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
       char const *err = re_compile_pattern (p, len,
                                             &(patterns[pcount].regexbuf));
       if (err)
-        error (EXIT_TROUBLE, 0, "%s", err);
+        {
+          /* With patterns specified only on the command line, emit the bare
+             diagnostic.  Otherwise, include a filename:lineno: prefix.  */
+          size_t lineno;
+          char const *pat_filename = pattern_file_name (pcount + 1, &lineno);
+          if (*pat_filename == '\0')
+            error (0, 0, "%s", err);
+          else
+            error (0, 0, "%s:%zu: %s", pat_filename, lineno, err);
+          compilation_failed = true;
+        }
       pcount++;
       p = sep;
     }
   while (p);
 
+  if (compilation_failed)
+    exit (EXIT_TROUBLE);
+
   /* In the match_words and match_lines cases, we use a different pattern
      for the DFA matcher that will quickly throw out cases that won't work.
      Then if DFA succeeds we do some hairy stuff using the regex matcher
diff --git a/src/grep.c b/src/grep.c
index 302e4d7..a82da61 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -81,6 +81,85 @@ static bool only_matching;
 /* If nonzero, make sure first content char in a line is on a tab stop. */
 static bool align_tabs;
 
+/* See below */
+struct FL_pair
+  {
+    char const *filename;
+    size_t lineno;
+  };
+
+/* A list of lineno,filename pairs corresponding to -f FILENAME
+   arguments. Since we store the concatenation of all patterns in
+   a single array, KEYS, be they from the command line via "-e PAT"
+   or read from one or more -f-specified FILENAMES.  Given this
+   invocation, grep -f <(seq 5) -f <(seq 2) -f <(seq 3) FILE, there
+   will be three entries in LF_PAIR: {1, x} {6, y} {8, z}, where
+   x, y and z are just place-holders for shell-generated names.  */
+static struct FL_pair *fl_pair;
+static size_t n_fl_pair_slots;
+/* Count not only -f-specified files, but also individual -e operands
+   and any command-line argument that serves as a regular expression.  */
+static size_t n_pattern_files;
+
+/* Given the concatenation of all patterns, one per line, be they
+   specified via -e, a lone command-line argument or -f, this is the
+   number of the first line of each entity, in that concatenation.
+   It is advanced by fl_add and, when needed, used in pattern_file_name
+   to derive a file-relative line number.  */
+static uintmax_t patfile_lineno = 1;
+
+/* Return the number of newline bytes in BUF starting at offset BEG
+   and up to and not including offset END.  */
+static size_t _GL_ATTRIBUTE_PURE
+count_nl_bytes (char const *buf, size_t beg, size_t end)
+{
+  char const *p = buf + beg;
+  char const *end_p = buf + end;
+  uintmax_t n = 0;
+  while (true)
+    {
+      p = memchr (p, '\n', end_p - p);
+      if (!p)
+        break;
+      p++;
+      n++;
+    }
+  return n;
+}
+
+/* Append a FILENAME,line-number pair to FL_PAIR.  The line number we save
+   with FILENAME is the initial value of the global PATFILE_LINENO.
+   PATFILE_LINENO is then incremented by the number of newlines in BUF
+   from offset BEG up to but not including offset END.  */
+static void
+fl_add (char const *buf, size_t beg, size_t end, char const *filename)
+{
+  if (n_fl_pair_slots <= n_pattern_files)
+    fl_pair = x2nrealloc (fl_pair, &n_fl_pair_slots, sizeof *fl_pair);
+
+  fl_pair[n_pattern_files].lineno = patfile_lineno;
+  fl_pair[n_pattern_files].filename = filename;
+  n_pattern_files++;
+  patfile_lineno += count_nl_bytes (buf, beg, end);
+}
+
+/* Map the line number, LINENO, of one of the input patterns to the
+   name of the file from which it came.  If it was read from stdin
+   or if it was specified on the command line, return "-".  */
+char const * _GL_ATTRIBUTE_PURE
+pattern_file_name (size_t lineno, size_t *new_lineno)
+{
+  size_t i;
+  for (i = 1; i < n_pattern_files; i++)
+    {
+      if (lineno < fl_pair[i].lineno)
+        break;
+    }
+
+  *new_lineno = lineno - fl_pair[i - 1].lineno + 1;
+  return fl_pair[i - 1].filename;
+}
+
 #if HAVE_ASAN
 /* Record the starting address and length of the sole poisoned region,
    so that we can unpoison it later, just before each following read.  */
@@ -2381,6 +2460,7 @@ main (int argc, char **argv)
         strcpy (&keys[keycc], optarg);
         keycc += cc;
         keys[keycc++] = '\n';
+        fl_add (keys, keycc - cc - 1, keycc, "");
         break;
 
       case 'f':
@@ -2405,6 +2485,7 @@ main (int argc, char **argv)
         /* Append final newline if file ended in non-newline. */
         if (oldcc != keycc && keys[keycc - 1] != '\n')
           keys[keycc++] = '\n';
+        fl_add (keys, oldcc, keycc, xstrdup (optarg));
         break;
 
       case 'h':
@@ -2645,6 +2726,7 @@ main (int argc, char **argv)
       /* A copy must be made in case of an xrealloc() or free() later.  */
       keycc = strlen (argv[optind]);
       keys = xmemdup (argv[optind++], keycc + 1);
+      fl_add (keys, 0, keycc, "");
     }
   else
     usage (EXIT_TROUBLE);
diff --git a/src/grep.h b/src/grep.h
index 75b7ef7..b45992f 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -30,5 +30,6 @@ extern bool match_lines;	/* -x */
 extern char eolbyte;		/* -z */
 
 extern bool buf_has_encoding_errors (char *, size_t);
+extern char const *pattern_file_name (size_t, size_t *);
 
 #endif
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 03cfdbb..77502ca 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -99,6 +99,7 @@ TESTS =						\
   fedora					\
   fgrep-infloop					\
   file						\
+  filename-lineno.pl				\
   fmbtest					\
   foad1						\
   grep-dev-null					\
diff --git a/tests/filename-lineno.pl b/tests/filename-lineno.pl
new file mode 100755
index 0000000..3827f4d
--- /dev/null
+++ b/tests/filename-lineno.pl
@@ -0,0 +1,80 @@
+#!/usr/bin/perl
+# Prior to 2.26, an invalid regexp in a -f-specified file would elicit
+# a diagnostic like "Unmatched [ or [^", with no indication of the
+# file or line number from which the offending regular expression came.
+# With 2.26, now, each such diagnostic has a "FILENAME:LINENO: " prefix.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict;
+
+(my $program_name = $0) =~ s|.*/||;
+
+my $prog = 'grep';
+
+# Turn off localization of executable's output.
+@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
+# There are at least two variants of one diagnostic:
+#   - Unmatched [, [^, [:, [., or [=
+#   - Unmatched [ or [^
+# Transform each to this: "Unmatched [..."
+my $err_subst = {ERR_SUBST => 's/(: Unmatched \[).*/$1.../'};
+
+my @Tests =
+  (
+   # Show that grep now includes filename:lineno in the diagnostic:
+   ['invalid-re', '-f g', {AUX=>{g=>"1\n2\n3\n4[[\n"}}, {EXIT=>2},
+    $err_subst,
+    {ERR => "$prog: g:4: Unmatched [...\n"},
+   ],
+
+   # Show that with two or more errors, grep now prints all diagnostics:
+   ['invalid-re-2-files', '-f g -f h', {EXIT=>2},
+    {AUX=>{g=>"1\n2[[\n3\n4[[\n"}},
+    {AUX=>{h=>"\n\n[[\n"}},
+    $err_subst,
+    {ERR => "$prog: g:2: Unmatched [...\n"
+         . "$prog: g:4: Unmatched [...\n"
+         . "$prog: h:3: Unmatched [...\n"
+    },
+   ],
+
+   # Like the above, but on the other lines.
+   ['invalid-re-2-files2', '-f g -f h', {EXIT=>2},
+    {AUX=>{g=>"1[[\n2\n3[[\n4\n"}},
+    {AUX=>{h=>"[[\n[[\n\n"}},
+    $err_subst,
+    {ERR => "$prog: g:1: Unmatched [...\n"
+         . "$prog: g:3: Unmatched [...\n"
+         . "$prog: h:1: Unmatched [...\n"
+         . "$prog: h:2: Unmatched [...\n"
+    },
+   ],
+
+   # Show that with two '-e'-specified erroneous regexps,
+   # there is no file name or line number.
+   ['invalid-re-2e', '-e "[[" -e "[["', {EXIT=>2},
+    $err_subst,
+    {ERR => "$prog: Unmatched [...\n" x 2},
+   ],
+  );
+
+my $save_temps = $ENV{DEBUG};
+my $verbose = $ENV{VERBOSE};
+
+my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
+exit $fail;

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=4443fda05ace21b2a2da2d80b09313cc976afe59


commit f13c169e13aed279baa00d9ced9d93fe24775493
Author: Jim Meyering <meyering@fb.com>
Date:   Sat Jul 16 10:51:31 2016 -0700

    grep: print "filename:lineno:" in invalid-regex diagnostic
    
    Determining the file name and line number is a little tricky because
    of the way the regular expressions are all concatenated onto a newline-
    separated list.  By the time grep would compile regular expressions,
    the <filename,lineno> origin of each regexp was no longer available.
    This patch adds a list of filename,first_lineno pairs, one per input
    source, by which we can then map the ordinal regexp number to a
    filename,lineno pair for the diagnostic.
    
    * src/dfasearch.c (GEAcompile): When diagnosing an invalid regexp
    specified via -f FILE, include the "FILENAME:LINENO: " prefix.
    Also, when there are two or more lines with compilation failures,
    diagnose all of them, rather than stopping after the first.
    * src/grep.h (pattern_file_name): Declare it.
    * src/grep.c: (struct FL_pair): Define type.
    (fl_pair, n_fl_pair_slots, n_pattern_files, patfile_lineno):
    Define globals.
    (fl_add, pattern_file_name): Define functions.
    (main): Call fl_add for each type of the following: -e argument,
    -f argument, command-line-specified (without -e) regexp.
    * tests/filename-lineno.pl: New file.
    * tests/Makefile.am (TESTS): Add it.
    * NEWS (Improvements): Mention this.
    Initially reported by Gunnar Wolf in https://bugs.debian.org/525214
    Forwarded to grep's bug list by Santiago Ruano Rincón as
    http://debbugs.gnu.org/23965

diff --git a/NEWS b/NEWS
index c3e6000..44b6fdf 100644
--- a/NEWS
+++ b/NEWS
@@ -6,12 +6,13 @@ GNU grep NEWS                                    -*- outline -*-
 
   grep can be much faster now when standard output is /dev/null.
 
-** Improvements
-
   grep -F is now typically much faster when many patterns are given,
   as it now uses the Aho-Corasick algorithm instead of the
   Commentz-Walter algorithm in that case.
 
+  grep now prints a "FILENAME:LINENO: " prefix when diagnosing an
+  invalid regular expression that was read from an '-f'-specified file.
+
 
 * Noteworthy changes in release 2.25 (2016-04-21) [stable]
 
diff --git a/src/dfasearch.c b/src/dfasearch.c
index fbf0fac..9a523c8 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -135,6 +135,7 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
      this should be a syntax error.  The same for backref, where the
      backref should be local to each pattern.  */
   char const *p = pattern;
+  bool compilation_failed = false;
   do
     {
       size_t len;
@@ -157,12 +158,25 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
       char const *err = re_compile_pattern (p, len,
                                             &(patterns[pcount].regexbuf));
       if (err)
-        error (EXIT_TROUBLE, 0, "%s", err);
+        {
+          /* With patterns specified only on the command line, emit the bare
+             diagnostic.  Otherwise, include a filename:lineno: prefix.  */
+          size_t lineno;
+          char const *pat_filename = pattern_file_name (pcount + 1, &lineno);
+          if (*pat_filename == '\0')
+            error (0, 0, "%s", err);
+          else
+            error (0, 0, "%s:%zu: %s", pat_filename, lineno, err);
+          compilation_failed = true;
+        }
       pcount++;
       p = sep;
     }
   while (p);
 
+  if (compilation_failed)
+    exit (EXIT_TROUBLE);
+
   /* In the match_words and match_lines cases, we use a different pattern
      for the DFA matcher that will quickly throw out cases that won't work.
      Then if DFA succeeds we do some hairy stuff using the regex matcher
diff --git a/src/grep.c b/src/grep.c
index 302e4d7..a82da61 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -81,6 +81,85 @@ static bool only_matching;
 /* If nonzero, make sure first content char in a line is on a tab stop. */
 static bool align_tabs;
 
+/* See below */
+struct FL_pair
+  {
+    char const *filename;
+    size_t lineno;
+  };
+
+/* A list of lineno,filename pairs corresponding to -f FILENAME
+   arguments. Since we store the concatenation of all patterns in
+   a single array, KEYS, be they from the command line via "-e PAT"
+   or read from one or more -f-specified FILENAMES.  Given this
+   invocation, grep -f <(seq 5) -f <(seq 2) -f <(seq 3) FILE, there
+   will be three entries in LF_PAIR: {1, x} {6, y} {8, z}, where
+   x, y and z are just place-holders for shell-generated names.  */
+static struct FL_pair *fl_pair;
+static size_t n_fl_pair_slots;
+/* Count not only -f-specified files, but also individual -e operands
+   and any command-line argument that serves as a regular expression.  */
+static size_t n_pattern_files;
+
+/* Given the concatenation of all patterns, one per line, be they
+   specified via -e, a lone command-line argument or -f, this is the
+   number of the first line of each entity, in that concatenation.
+   It is advanced by fl_add and, when needed, used in pattern_file_name
+   to derive a file-relative line number.  */
+static uintmax_t patfile_lineno = 1;
+
+/* Return the number of newline bytes in BUF starting at offset BEG
+   and up to and not including offset END.  */
+static size_t _GL_ATTRIBUTE_PURE
+count_nl_bytes (char const *buf, size_t beg, size_t end)
+{
+  char const *p = buf + beg;
+  char const *end_p = buf + end;
+  uintmax_t n = 0;
+  while (true)
+    {
+      p = memchr (p, '\n', end_p - p);
+      if (!p)
+        break;
+      p++;
+      n++;
+    }
+  return n;
+}
+
+/* Append a FILENAME,line-number pair to FL_PAIR.  The line number we save
+   with FILENAME is the initial value of the global PATFILE_LINENO.
+   PATFILE_LINENO is then incremented by the number of newlines in BUF
+   from offset BEG up to but not including offset END.  */
+static void
+fl_add (char const *buf, size_t beg, size_t end, char const *filename)
+{
+  if (n_fl_pair_slots <= n_pattern_files)
+    fl_pair = x2nrealloc (fl_pair, &n_fl_pair_slots, sizeof *fl_pair);
+
+  fl_pair[n_pattern_files].lineno = patfile_lineno;
+  fl_pair[n_pattern_files].filename = filename;
+  n_pattern_files++;
+  patfile_lineno += count_nl_bytes (buf, beg, end);
+}
+
+/* Map the line number, LINENO, of one of the input patterns to the
+   name of the file from which it came.  If it was read from stdin
+   or if it was specified on the command line, return "-".  */
+char const * _GL_ATTRIBUTE_PURE
+pattern_file_name (size_t lineno, size_t *new_lineno)
+{
+  size_t i;
+  for (i = 1; i < n_pattern_files; i++)
+    {
+      if (lineno < fl_pair[i].lineno)
+        break;
+    }
+
+  *new_lineno = lineno - fl_pair[i - 1].lineno + 1;
+  return fl_pair[i - 1].filename;
+}
+
 #if HAVE_ASAN
 /* Record the starting address and length of the sole poisoned region,
    so that we can unpoison it later, just before each following read.  */
@@ -2381,6 +2460,7 @@ main (int argc, char **argv)
         strcpy (&keys[keycc], optarg);
         keycc += cc;
         keys[keycc++] = '\n';
+        fl_add (keys, keycc - cc - 1, keycc, "");
         break;
 
       case 'f':
@@ -2405,6 +2485,7 @@ main (int argc, char **argv)
         /* Append final newline if file ended in non-newline. */
         if (oldcc != keycc && keys[keycc - 1] != '\n')
           keys[keycc++] = '\n';
+        fl_add (keys, oldcc, keycc, xstrdup (optarg));
         break;
 
       case 'h':
@@ -2645,6 +2726,7 @@ main (int argc, char **argv)
       /* A copy must be made in case of an xrealloc() or free() later.  */
       keycc = strlen (argv[optind]);
       keys = xmemdup (argv[optind++], keycc + 1);
+      fl_add (keys, 0, keycc, "");
     }
   else
     usage (EXIT_TROUBLE);
diff --git a/src/grep.h b/src/grep.h
index 75b7ef7..b45992f 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -30,5 +30,6 @@ extern bool match_lines;	/* -x */
 extern char eolbyte;		/* -z */
 
 extern bool buf_has_encoding_errors (char *, size_t);
+extern char const *pattern_file_name (size_t, size_t *);
 
 #endif
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 03cfdbb..77502ca 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -99,6 +99,7 @@ TESTS =						\
   fedora					\
   fgrep-infloop					\
   file						\
+  filename-lineno.pl				\
   fmbtest					\
   foad1						\
   grep-dev-null					\
diff --git a/tests/filename-lineno.pl b/tests/filename-lineno.pl
new file mode 100755
index 0000000..3827f4d
--- /dev/null
+++ b/tests/filename-lineno.pl
@@ -0,0 +1,80 @@
+#!/usr/bin/perl
+# Prior to 2.26, an invalid regexp in a -f-specified file would elicit
+# a diagnostic like "Unmatched [ or [^", with no indication of the
+# file or line number from which the offending regular expression came.
+# With 2.26, now, each such diagnostic has a "FILENAME:LINENO: " prefix.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict;
+
+(my $program_name = $0) =~ s|.*/||;
+
+my $prog = 'grep';
+
+# Turn off localization of executable's output.
+@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
+# There are at least two variants of one diagnostic:
+#   - Unmatched [, [^, [:, [., or [=
+#   - Unmatched [ or [^
+# Transform each to this: "Unmatched [..."
+my $err_subst = {ERR_SUBST => 's/(: Unmatched \[).*/$1.../'};
+
+my @Tests =
+  (
+   # Show that grep now includes filename:lineno in the diagnostic:
+   ['invalid-re', '-f g', {AUX=>{g=>"1\n2\n3\n4[[\n"}}, {EXIT=>2},
+    $err_subst,
+    {ERR => "$prog: g:4: Unmatched [...\n"},
+   ],
+
+   # Show that with two or more errors, grep now prints all diagnostics:
+   ['invalid-re-2-files', '-f g -f h', {EXIT=>2},
+    {AUX=>{g=>"1\n2[[\n3\n4[[\n"}},
+    {AUX=>{h=>"\n\n[[\n"}},
+    $err_subst,
+    {ERR => "$prog: g:2: Unmatched [...\n"
+         . "$prog: g:4: Unmatched [...\n"
+         . "$prog: h:3: Unmatched [...\n"
+    },
+   ],
+
+   # Like the above, but on the other lines.
+   ['invalid-re-2-files2', '-f g -f h', {EXIT=>2},
+    {AUX=>{g=>"1[[\n2\n3[[\n4\n"}},
+    {AUX=>{h=>"[[\n[[\n\n"}},
+    $err_subst,
+    {ERR => "$prog: g:1: Unmatched [...\n"
+         . "$prog: g:3: Unmatched [...\n"
+         . "$prog: h:1: Unmatched [...\n"
+         . "$prog: h:2: Unmatched [...\n"
+    },
+   ],
+
+   # Show that with two '-e'-specified erroneous regexps,
+   # there is no file name or line number.
+   ['invalid-re-2e', '-e "[[" -e "[["', {EXIT=>2},
+    $err_subst,
+    {ERR => "$prog: Unmatched [...\n" x 2},
+   ],
+  );
+
+my $save_temps = $ENV{DEBUG};
+my $verbose = $ENV{VERBOSE};
+
+my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
+exit $fail;

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

Summary of changes:
 NEWS                                  |    5 +-
 configure.ac                          |    7 +
 src/dfasearch.c                       |   16 +-
 src/grep.c                            |   82 +++++
 src/grep.h                            |    1 +
 tests/Coreutils.pm                    |  620 +++++++++++++++++++++++++++++++++
 tests/{dfa-heap-overrun => CuSkip.pm} |   35 +-
 tests/CuTmpdir.pm                     |  111 ++++++
 tests/Makefile.am                     |   25 ++
 tests/filename-lineno.pl              |   80 +++++
 tests/no-perl                         |    6 +
 11 files changed, 974 insertions(+), 14 deletions(-)
 create mode 100644 tests/Coreutils.pm
 copy tests/{dfa-heap-overrun => CuSkip.pm} (52%)
 mode change 100755 => 100644
 create mode 100644 tests/CuTmpdir.pm
 create mode 100755 tests/filename-lineno.pl
 create mode 100644 tests/no-perl


hooks/post-receive
-- 
grep


