From MAILER-DAEMON Fri Jan 01 17:36:59 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aF8Jf-0002pV-UM
	for mharc-grep-commit@gnu.org; Fri, 01 Jan 2016 17:36:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51659)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aF8JY-0002of-Qx
	for grep-commit@gnu.org; Fri, 01 Jan 2016 17:36:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aF8JS-0001MD-VE
	for grep-commit@gnu.org; Fri, 01 Jan 2016 17:36:52 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:55224)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aF8JS-0001M9-QU
	for grep-commit@gnu.org; Fri, 01 Jan 2016 17:36:46 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1aF8JS-0006Qq-31
	for grep-commit@gnu.org; Fri, 01 Jan 2016 22:36:46 +0000
Date: Fri, 01 Jan 2016 22:36:46 +0000
Message-Id: <E1aF8JS-0006Qq-31@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-14-gc65dcd7
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1c6e37246cbc1bba8624b43ddd5e08275923034e
X-Git-Newrev: c65dcd72d12d26d8540e1153232e03fa29610137
From: Jim Meyering <jim@meyering.net>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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, 01 Jan 2016 22:36:59 -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  c65dcd72d12d26d8540e1153232e03fa29610137 (commit)
      from  1c6e37246cbc1bba8624b43ddd5e08275923034e (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=c65dcd72d12d26d8540e1153232e03fa29610137


commit c65dcd72d12d26d8540e1153232e03fa29610137
Author: Jim Meyering <meyering@fb.com>
Date:   Fri Jan 1 14:34:20 2016 -0800

    maint: update copyright year, bootstrap, init.sh
    
    Run "make update-copyright" and then...
    
    * gnulib: Update to latest.
    * tests/init.sh: Update from gnulib.
    * bootstrap: Likewise.

diff --git a/AUTHORS b/AUTHORS
index e788341..cafd903 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2016 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/ChangeLog-2009 b/ChangeLog-2009
index 508e90e..055b720 100644
--- a/ChangeLog-2009
+++ b/ChangeLog-2009
@@ -3648,6 +3648,6 @@
 
         * Version 2.0 released.
 
-Copyright (C) 1998-2015 Free Software Foundation, Inc.
+Copyright (C) 1998-2016 Free Software Foundation, Inc.
 Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
diff --git a/HACKING b/HACKING
index e5a0aa5..a4ab327 100644
--- a/HACKING
+++ b/HACKING
@@ -610,7 +610,7 @@ Then just open the index.html file (in the generated lcov-html directory)
 in your favorite web browser.
 
 ========================================================================
-Copyright (C) 2009-2015 Free Software Foundation, Inc.
+Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/Makefile.am b/Makefile.am
index 3a2ed84..e0fcdff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 # Process this file with automake to create Makefile.in
 #
-# Copyright 1997-1998, 2005-2015 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-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
diff --git a/NEWS b/NEWS
index 6e97e45..f572a0c 100644
--- a/NEWS
+++ b/NEWS
@@ -916,7 +916,7 @@ necessary to track the evolution of the regex package, and since
 I was changing it anyway I decided to do a general cleanup.
 
 ========================================================================
-Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+Copyright (C) 1992, 1997-2002, 2004-2016 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README b/README
index e41c161..0ce7f1e 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2016 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README-alpha b/README-alpha
index abd6893..d179192 100644
--- a/README-alpha
+++ b/README-alpha
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2016 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/README-hacking b/README-hacking
index c26519b..76996e3 100644
--- a/README-hacking
+++ b/README-hacking
@@ -67,7 +67,7 @@ reporting address of this package, and not to that of gnulib, even
 if the problem seems to originate in a gnulib-provided file.
 -----
 
-Copyright (C) 2002-2015 Free Software Foundation, Inc.
+Copyright (C) 2002-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
diff --git a/TODO b/TODO
index 9eb21c2..cb48cc2 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-  Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+  Copyright (C) 1992, 1997-2002, 2004-2016 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
diff --git a/bootstrap b/bootstrap
index e72894c..294c0bc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ scriptversion=2014-12-08.12; # UTC
 
 # Bootstrap this package from checked-out sources.
 
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
diff --git a/bootstrap.conf b/bootstrap.conf
index 9db620b..22f5c21 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
 # Bootstrap configuration.
 
-# Copyright (C) 2006-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-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
diff --git a/cfg.mk b/cfg.mk
index da387e9..0824e04 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk                           -*- makefile -*-
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-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
diff --git a/configure.ac b/configure.ac
index 3f6d389..4de0f39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl
 dnl autoconf input file for GNU grep
 dnl
-dnl Copyright (C) 1997-2006, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2006, 2009-2016 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GNU grep.
 dnl
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 7ac0f68..048c691 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,7 @@
 # Process this file with automake to create Makefile.in
 # Makefile.am for grep/doc.
 #
-# Copyright 2008-2015 Free Software Foundation, Inc.
+# Copyright 2008-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
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index 8938478..ade11b4 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -1074,7 +1074,7 @@ is used and a line is selected, the exit status is 0 even if an error
 occurred.
 .
 .SH COPYRIGHT
-Copyright 1998-2000, 2002, 2005-2015 Free Software Foundation, Inc.
+Copyright 1998-2000, 2002, 2005-2016 Free Software Foundation, Inc.
 .PP
 This is free software;
 see the source for copying conditions.
diff --git a/doc/grep.texi b/doc/grep.texi
index b9a4d25..76769b9 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -18,7 +18,7 @@
 @copying
 This manual is for @command{grep}, a pattern matching engine.
 
-Copyright @copyright{} 1999-2002, 2005, 2008-2015 Free Software Foundation,
+Copyright @copyright{} 1999-2002, 2005, 2008-2016 Free Software Foundation,
 Inc.
 
 @quotation
diff --git a/gnulib b/gnulib
index 956fa54..271dfe3 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 956fa543b16d81a30ffc0656f52337fd1e9c70f6
+Subproject commit 271dfe37985ff3a6e9cf9d08ab67e8ea3e239162
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f1d99a9..a14c8b7 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1997-1998, 2005-2015 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-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
diff --git a/lib/colorize-posix.c b/lib/colorize-posix.c
index 9261ae1..eb66c1b 100644
--- a/lib/colorize-posix.c
+++ b/lib/colorize-posix.c
@@ -1,5 +1,5 @@
 /* Output colorization.
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-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
diff --git a/lib/colorize-w32.c b/lib/colorize-w32.c
index cdb64a6..2f3d3d3 100644
--- a/lib/colorize-w32.c
+++ b/lib/colorize-w32.c
@@ -1,5 +1,5 @@
 /* Output colorization on MS-Windows.
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-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
diff --git a/lib/colorize.h b/lib/colorize.h
index d04fcb4..7abc295 100644
--- a/lib/colorize.h
+++ b/lib/colorize.h
@@ -1,6 +1,6 @@
 /* Output colorization.
 
-   Copyright 2011-2015 Free Software Foundation, Inc.
+   Copyright 2011-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, or (at your option)
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index 0effc53..3bffcf5 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -1,6 +1,6 @@
 # pcre.m4 - check for libpcre support
 
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2016 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index aa8ef5d..0205c2b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
 # List of files which containing translatable strings.
 #
-# Copyright 1997-1998, 2005-2015 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-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
diff --git a/src/Makefile.am b/src/Makefile.am
index ce81228..941384e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to create Makefile.in
-# Copyright 1997-1998, 2005-2015 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-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
diff --git a/src/dfa.c b/src/dfa.c
index c99c8f1..adc5de3 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1,5 +1,5 @@
 /* dfa.c - deterministic extended regexp routines for GNU
-   Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2015 Free Software
+   Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/dfa.h b/src/dfa.h
index 80ddac3..fb9ac9a 100644
--- a/src/dfa.h
+++ b/src/dfa.h
@@ -1,5 +1,5 @@
 /* dfa.h - declarations for GNU deterministic regexp compiler
-   Copyright (C) 1988, 1998, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988, 1998, 2007, 2009-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
diff --git a/src/dfasearch.c b/src/dfasearch.c
index de51321..0205011 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -1,5 +1,5 @@
 /* dfasearch.c - searching subroutines using dfa and regex for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-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
diff --git a/src/dosbuf.c b/src/dosbuf.c
index 0e8f6f7..839cc3a 100644
--- a/src/dosbuf.c
+++ b/src/dosbuf.c
@@ -1,5 +1,5 @@
 /* dosbuf.c
-   Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1997-2002, 2004-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
diff --git a/src/grep.c b/src/grep.c
index 06f3345..1207a76 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1,5 +1,5 @@
 /* grep.c - main driver file for grep.
-   Copyright (C) 1992, 1997-2002, 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1997-2002, 2004-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
diff --git a/src/grep.h b/src/grep.h
index 2e4527c..577fb72 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -1,5 +1,5 @@
 /* grep.h - interface to grep driver for searching subroutines.
-   Copyright (C) 1992, 1998, 2001, 2007, 2009-2015 Free Software Foundation,
+   Copyright (C) 1992, 1998, 2001, 2007, 2009-2016 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/kwsearch.c b/src/kwsearch.c
index 2997ae1..e33caaf 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -1,5 +1,5 @@
 /* kwsearch.c - searching subroutines using kwset for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-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
diff --git a/src/kwset.c b/src/kwset.c
index ad7a89e..03520b6 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -1,5 +1,5 @@
 /* kwset.c - search for any of a set of keywords.
-   Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2015 Free Software
+   Copyright (C) 1989, 1998, 2000, 2005, 2007, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/kwset.h b/src/kwset.h
index b449847..95693e3 100644
--- a/src/kwset.h
+++ b/src/kwset.h
@@ -1,5 +1,5 @@
 /* kwset.h - header declaring the keyword set library.
-   Copyright (C) 1989, 1998, 2005, 2007, 2009-2015 Free Software Foundation,
+   Copyright (C) 1989, 1998, 2005, 2007, 2009-2016 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify
diff --git a/src/pcresearch.c b/src/pcresearch.c
index c403032..a647514 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -1,5 +1,5 @@
 /* pcresearch.c - searching subroutines using PCRE for grep.
-   Copyright 2000, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright 2000, 2007, 2009-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
diff --git a/src/search.h b/src/search.h
index 3e4d005..5031d67 100644
--- a/src/search.h
+++ b/src/search.h
@@ -1,5 +1,5 @@
 /* search.c - searching subroutines using dfa, kwset and regex for grep.
-   Copyright 1992, 1998, 2000, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-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
diff --git a/src/searchutils.c b/src/searchutils.c
index dd42451..2eab3dc 100644
--- a/src/searchutils.c
+++ b/src/searchutils.c
@@ -1,5 +1,5 @@
 /* searchutils.c - helper subroutines for grep's matchers.
-   Copyright 1992, 1998, 2000, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright 1992, 1998, 2000, 2007, 2009-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
diff --git a/src/system.h b/src/system.h
index 15a1abb..6f4918d 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,5 +1,5 @@
 /* Portability cruft.  Include after config.h and sys/types.h.
-   Copyright 1996, 1998-2000, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright 1996, 1998-2000, 2007, 2009-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
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e8b11b5..f349aa3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
 ## Process this file with automake to create Makefile.in
-# Copyright 1997-1998, 2005-2015 Free Software Foundation, Inc.
+# Copyright 1997-1998, 2005-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
diff --git a/tests/backref b/tests/backref
index a52a585..1d15434 100755
--- a/tests/backref
+++ b/tests/backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for backreferences and other things.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/backref-alt b/tests/backref-alt
index a58e407..654b345 100755
--- a/tests/backref-alt
+++ b/tests/backref-alt
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for a bug in glibc's regex code as of 2015-09-19.
 #
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/backslash-s-and-repetition-operators b/tests/backslash-s-and-repetition-operators
index bd9adf7..45a4b55 100755
--- a/tests/backslash-s-and-repetition-operators
+++ b/tests/backslash-s-and-repetition-operators
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that \s and \S work with repetition operators.
 #
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/backslash-s-vs-invalid-multitype b/tests/backslash-s-vs-invalid-multitype
index 5578233..a77b6a5 100755
--- a/tests/backslash-s-vs-invalid-multitype
+++ b/tests/backslash-s-vs-invalid-multitype
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that neither \s nor \S matches an invalid multibyte character.
 #
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/bre b/tests/bre
index 571d4b9..324d198 100755
--- a/tests/bre
+++ b/tests/bre
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/bre.awk b/tests/bre.awk
index 6b57edb..4f3e006 100644
--- a/tests/bre.awk
+++ b/tests/bre.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/case-fold-titlecase b/tests/case-fold-titlecase
index ebd14f1..57a4613 100755
--- a/tests/case-fold-titlecase
+++ b/tests/case-fold-titlecase
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check that case folding works even with titlecase and similarly odd chars.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/count-newline b/tests/count-newline
index fd89961..b37b8ec 100755
--- a/tests/count-newline
+++ b/tests/count-newline
@@ -2,7 +2,7 @@
 # Test that newline is counted correctly even when the transition
 # table is rebuilt.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/dfa-coverage b/tests/dfa-coverage
index e46a727..ca8654f 100755
--- a/tests/dfa-coverage
+++ b/tests/dfa-coverage
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise the final reachable code in dfa.c's match_mb_charset.
 
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-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
diff --git a/tests/dfa-heap-overrun b/tests/dfa-heap-overrun
index 481bf94..874dea2 100755
--- a/tests/dfa-heap-overrun
+++ b/tests/dfa-heap-overrun
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Trigger a heap overrun in grep-2.6..grep-2.8.
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
diff --git a/tests/dfa-match b/tests/dfa-match
index a996e36..373c83c 100755
--- a/tests/dfa-match
+++ b/tests/dfa-match
@@ -1,7 +1,7 @@
 #!/bin/sh
 # This would fail for grep-2.21.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/dfa-match-aux.c b/tests/dfa-match-aux.c
index 87cb4a9..af933ff 100644
--- a/tests/dfa-match-aux.c
+++ b/tests/dfa-match-aux.c
@@ -1,6 +1,6 @@
 /* Auxiliary program to test a DFA code path that cannot be triggered
    by grep or gawk.
-   Copyright 2014-2015 Free Software Foundation, Inc.
+   Copyright 2014-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
diff --git a/tests/empty b/tests/empty
index a9fae0b..2b5ecf2 100755
--- a/tests/empty
+++ b/tests/empty
@@ -2,7 +2,7 @@
 # test that the empty file means no pattern
 # and an empty pattern means match all.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/empty-line-mb b/tests/empty-line-mb
index 709c5d2..605ecf9 100755
--- a/tests/empty-line-mb
+++ b/tests/empty-line-mb
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Exercise bugs in grep-2.13 with -i, -n and an RE of ^$ in a multi-byte locale.
 #
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/encoding-error b/tests/encoding-error
index fe52de2..2f09c21 100755
--- a/tests/encoding-error
+++ b/tests/encoding-error
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test grep's behavior on encoding errors.
 #
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/ere b/tests/ere
index 45d3e22..68d1533 100755
--- a/tests/ere
+++ b/tests/ere
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/ere.awk b/tests/ere.awk
index 5d987db..9ffc9f6 100644
--- a/tests/ere.awk
+++ b/tests/ere.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/file b/tests/file
index 5729847..11de7e4 100755
--- a/tests/file
+++ b/tests/file
@@ -4,7 +4,7 @@
 # grep -F -f pattern_file file
 # grep -G -f pattern_file file
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/fmbtest b/tests/fmbtest
index 75b4b58..6f60f03 100755
--- a/tests/fmbtest
+++ b/tests/fmbtest
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/foad1 b/tests/foad1
index a8dbadd..9417381 100755
--- a/tests/foad1
+++ b/tests/foad1
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test various combinations of command-line options.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/get-mb-cur-max.c b/tests/get-mb-cur-max.c
index 777110a..403beb4 100644
--- a/tests/get-mb-cur-max.c
+++ b/tests/get-mb-cur-max.c
@@ -1,5 +1,5 @@
 /* Auxiliary program to detect support for a locale.
-   Copyright 2010-2015 Free Software Foundation, Inc.
+   Copyright 2010-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
diff --git a/tests/help-version b/tests/help-version
index 8781529..59ecaeb 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -2,7 +2,7 @@
 # Make sure all these programs work properly
 # when invoked with --help or --version.
 
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-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
diff --git a/tests/high-bit-range b/tests/high-bit-range
index 0a3a7d8..e414c93 100755
--- a/tests/high-bit-range
+++ b/tests/high-bit-range
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise high-bit-set unibyte-in-[...]-range bug.
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
diff --git a/tests/init.sh b/tests/init.sh
index d366206..ee08022 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-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
@@ -327,7 +327,7 @@ elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
       fi
     }
   fi
-elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
   compare_ () { cmp -s "$@"; }
 else
   compare_ () { cmp "$@"; }
diff --git a/tests/invalid-char-class b/tests/invalid-char-class
index 5060b50..2417361 100755
--- a/tests/invalid-char-class
+++ b/tests/invalid-char-class
@@ -1,7 +1,7 @@
 #!/bin/sh
 # This use of our DFA-testing helper would fail for grep-2.21.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/khadafy b/tests/khadafy
index e8142dd..73ee1c7 100755
--- a/tests/khadafy
+++ b/tests/khadafy
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/kwset-abuse b/tests/kwset-abuse
index 6d8ec0c..84e9416 100755
--- a/tests/kwset-abuse
+++ b/tests/kwset-abuse
@@ -2,7 +2,7 @@
 # Evoke a segfault in a hard-to-reach code path of kwset.c.
 # This bug affected grep versions 2.19 through 2.21.
 #
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-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
diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf
index 2c9d080..b88c03c 100755
--- a/tests/long-pattern-perf
+++ b/tests/long-pattern-perf
@@ -1,7 +1,7 @@
 #!/bin/sh
 # grep-2.21 would incur a 100x penalty for 10x increase in regexp length
 
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-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
diff --git a/tests/match-lines b/tests/match-lines
index bf378dd..7e1f291 100755
--- a/tests/match-lines
+++ b/tests/match-lines
@@ -3,7 +3,7 @@
 # grep -F -x -o PAT print an extra newline for each match.
 # This would fail for grep-2.19 and grep-2.20.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/mb-dot-newline b/tests/mb-dot-newline
index ea78ba4..9e3db15 100755
--- a/tests/mb-dot-newline
+++ b/tests/mb-dot-newline
@@ -2,7 +2,7 @@
 # Trigger a bug in the DFA matcher.
 # This would fail for grep-2.20.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/mb-non-UTF8-overrun b/tests/mb-non-UTF8-overrun
index 9e6c30a..69335d3 100755
--- a/tests/mb-non-UTF8-overrun
+++ b/tests/mb-non-UTF8-overrun
@@ -2,7 +2,7 @@
 # grep would sometimes read beyond end of input, when using a non-UTF8
 # multibyte locale.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index 9bd5d39..e8433d8 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -3,7 +3,7 @@
 # The 200x is on an Intel i7-based system.
 # On an AMD FX-4100, it would take up to 2500x longer.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/multibyte-white-space b/tests/multibyte-white-space
index 04c734a..c2a493b 100755
--- a/tests/multibyte-white-space
+++ b/tests/multibyte-white-space
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test whether \s matches SP and UTF-8 multi-byte white space characters.
 #
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/multiple-begin-or-end-line b/tests/multiple-begin-or-end-line
index 550392a..ec6da30 100755
--- a/tests/multiple-begin-or-end-line
+++ b/tests/multiple-begin-or-end-line
@@ -2,7 +2,7 @@
 # Test a pattern of multiple begin or end line constraints.
 # This would mistakenly print a line when using grep-2.19.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/null-byte b/tests/null-byte
index 2419667..44dad92 100755
--- a/tests/null-byte
+++ b/tests/null-byte
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test NUL bytes in patterns and data.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/options b/tests/options
index 249e20c..97d2a03 100755
--- a/tests/options
+++ b/tests/options
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for POSIX options for grep
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre b/tests/pcre
index e7647fe..a9dfb4b 100755
--- a/tests/pcre
+++ b/tests/pcre
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that with -P, \s matches a newline.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-abort b/tests/pcre-abort
index 379bba4..5e9fdf2 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -2,7 +2,7 @@
 # Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
 # In grep-2.8, it would abort.
 #
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-count b/tests/pcre-count
index 78e1c7c..24afa17 100755
--- a/tests/pcre-count
+++ b/tests/pcre-count
@@ -2,7 +2,7 @@
 # grep -P / grep -Pc are inconsistent results
 # This bug affected grep versions 2.21 through 2.22.
 #
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-infloop b/tests/pcre-infloop
index e845163..2f93e70 100755
--- a/tests/pcre-infloop
+++ b/tests/pcre-infloop
@@ -2,7 +2,7 @@
 # With some versions of libpcre, apparently including 8.35,
 # the following would trigger an infinite loop in its match function.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/pcre-invalid-utf8-infloop b/tests/pcre-invalid-utf8-infloop
index 2b696b4..e96f1f5 100755
--- a/tests/pcre-invalid-utf8-infloop
+++ b/tests/pcre-invalid-utf8-infloop
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that grep -oaP doesn't infloop for invalid multi-byte input
 #
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-invalid-utf8-input b/tests/pcre-invalid-utf8-input
index dd9a18b..fec23ae 100755
--- a/tests/pcre-invalid-utf8-input
+++ b/tests/pcre-invalid-utf8-input
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that grep -P doesn't abort for invalid multi-byte input
 #
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-jitstack b/tests/pcre-jitstack
index d9a5615..bdae37b 100755
--- a/tests/pcre-jitstack
+++ b/tests/pcre-jitstack
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Grep 2.21 would report "grep: internal PCRE error: -27"
 #
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-o b/tests/pcre-o
index 817e71a..7c46f27 100755
--- a/tests/pcre-o
+++ b/tests/pcre-o
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that grep -oP doesn't cause internal error at match.
 #
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8
index f32ed1c..a29b412 100755
--- a/tests/pcre-utf8
+++ b/tests/pcre-utf8
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Ensure that, with -P, Unicode \p{} symbols are correctly matched.
 #
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-w b/tests/pcre-w
index d0906fe..2c91e90 100755
--- a/tests/pcre-w
+++ b/tests/pcre-w
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Before grep-2.19, grep -Pw %% would match %% enclosed in word boundaries
 #
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/pcre-wx-backref b/tests/pcre-wx-backref
index 515f93c..907c858 100755
--- a/tests/pcre-wx-backref
+++ b/tests/pcre-wx-backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Before grep-2.19, grep -P and -w/-x would not with a backreference.
 #
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/posix-bracket b/tests/posix-bracket
index 840e53e..bca4303 100755
--- a/tests/posix-bracket
+++ b/tests/posix-bracket
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check various bracket expressions in the POSIX locale.
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/spencer1 b/tests/spencer1
index 4db7c36..65503d3 100755
--- a/tests/spencer1
+++ b/tests/spencer1
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Regression test for GNU grep.
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1-locale b/tests/spencer1-locale
index 4bcf273..3f202d8 100755
--- a/tests/spencer1-locale
+++ b/tests/spencer1-locale
@@ -2,7 +2,7 @@
 # Regression test for GNU grep.
 #
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1-locale.awk b/tests/spencer1-locale.awk
index 485857f..bc92ecf 100644
--- a/tests/spencer1-locale.awk
+++ b/tests/spencer1-locale.awk
@@ -1,5 +1,5 @@
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer1.awk b/tests/spencer1.awk
index 7367761..aff38f9 100644
--- a/tests/spencer1.awk
+++ b/tests/spencer1.awk
@@ -1,5 +1,5 @@
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/spencer2 b/tests/spencer2
index 880b61d..c31a393 100644
--- a/tests/spencer2
+++ b/tests/spencer2
@@ -2,7 +2,7 @@
 # Regression test for GNU grep.
 #
 # Copyright (C) 1988 Henry Spencer.
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/status b/tests/status
index 976dd18..9de98df 100755
--- a/tests/status
+++ b/tests/status
@@ -5,7 +5,7 @@
 #  1 no match
 #  2 file not found
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/surrogate-pair b/tests/surrogate-pair
index f0a11df..93eeb5a 100755
--- a/tests/surrogate-pair
+++ b/tests/surrogate-pair
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Trigger a segfault-inducing bug with -i in grep-2.14 on Cygwin.
 
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-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
diff --git a/tests/symlink b/tests/symlink
index 4e159ce..a915bbe 100755
--- a/tests/symlink
+++ b/tests/symlink
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check that "grep -r" does the right thing with symbolic links.
 
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-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
diff --git a/tests/tests b/tests/tests
index 641c0fa..d59b974 100644
--- a/tests/tests
+++ b/tests/tests
@@ -1,6 +1,6 @@
 # regular expression test set
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/triple-backref b/tests/triple-backref
index 035c576..3d36c05 100755
--- a/tests/triple-backref
+++ b/tests/triple-backref
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test for a bug in glibc's regex code as of September 7, 2014.
 #
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/turkish-I b/tests/turkish-I
index 3bc8642..43becea 100755
--- a/tests/turkish-I
+++ b/tests/turkish-I
@@ -1,7 +1,7 @@
 #!/bin/sh
 # grep -i in UTF-8: missing NL in output on line containing I WITH DOT (U+0130)
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
diff --git a/tests/turkish-I-without-dot b/tests/turkish-I-without-dot
index b94de35..69215de 100755
--- a/tests/turkish-I-without-dot
+++ b/tests/turkish-I-without-dot
@@ -3,7 +3,7 @@
 # (like "I" in the tr_TR.utf8 locale) whose lower-case representation
 # occupies more bytes (two in this case, for 0xc4b1, aka U+0131).
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
diff --git a/tests/turkish-eyes b/tests/turkish-eyes
index d13abd6..b57df8e 100755
--- a/tests/turkish-eyes
+++ b/tests/turkish-eyes
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Ensure that case-insensitive matching works with all Turkish i's
 
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-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
diff --git a/tests/two-files b/tests/two-files
index d655e56..1b52e3f 100755
--- a/tests/two-files
+++ b/tests/two-files
@@ -2,7 +2,7 @@
 # Read two files, of increasing size.
 # With ASAN, this would have triggered a false-positive read of poisoned memory.
 #
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
index 11a1364..68c475c 100755
--- a/tests/unibyte-bracket-expr
+++ b/tests/unibyte-bracket-expr
@@ -5,7 +5,7 @@
 # ru_RU.KOI8-R for any C whose wide-char representation differed from
 # its single-byte equivalent.
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
diff --git a/tests/unibyte-negated-circumflex b/tests/unibyte-negated-circumflex
index a54a149..03e448a 100755
--- a/tests/unibyte-negated-circumflex
+++ b/tests/unibyte-negated-circumflex
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise a bug where [^^-^] was treated as if it were [^-^].
 
-# Copyright 2014-2015 Free Software Foundation, Inc.
+# Copyright 2014-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
diff --git a/tests/utf8-bracket b/tests/utf8-bracket
index b63afbb..e85877c 100755
--- a/tests/utf8-bracket
+++ b/tests/utf8-bracket
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Check bracket expressions in a UTF-8 locale.
 
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-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
diff --git a/tests/yesno b/tests/yesno
index 2fd0ea0..fd8d4ec 100755
--- a/tests/yesno
+++ b/tests/yesno
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test feature interaction of -C, -v, -o, and -m.
 #
-# Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright

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

Summary of changes:
 AUTHORS                                    |    2 +-
 ChangeLog-2009                             |    2 +-
 HACKING                                    |    2 +-
 Makefile.am                                |    2 +-
 NEWS                                       |    2 +-
 README                                     |    2 +-
 README-alpha                               |    2 +-
 README-hacking                             |    2 +-
 TODO                                       |    2 +-
 bootstrap                                  |    2 +-
 bootstrap.conf                             |    2 +-
 cfg.mk                                     |    2 +-
 configure.ac                               |    2 +-
 doc/Makefile.am                            |    2 +-
 doc/grep.in.1                              |    2 +-
 doc/grep.texi                              |    2 +-
 gnulib                                     |    2 +-
 lib/Makefile.am                            |    2 +-
 lib/colorize-posix.c                       |    2 +-
 lib/colorize-w32.c                         |    2 +-
 lib/colorize.h                             |    2 +-
 m4/pcre.m4                                 |    2 +-
 po/POTFILES.in                             |    2 +-
 src/Makefile.am                            |    2 +-
 src/dfa.c                                  |    2 +-
 src/dfa.h                                  |    2 +-
 src/dfasearch.c                            |    2 +-
 src/dosbuf.c                               |    2 +-
 src/grep.c                                 |    2 +-
 src/grep.h                                 |    2 +-
 src/kwsearch.c                             |    2 +-
 src/kwset.c                                |    2 +-
 src/kwset.h                                |    2 +-
 src/pcresearch.c                           |    2 +-
 src/search.h                               |    2 +-
 src/searchutils.c                          |    2 +-
 src/system.h                               |    2 +-
 tests/Makefile.am                          |    2 +-
 tests/backref                              |    2 +-
 tests/backref-alt                          |    2 +-
 tests/backslash-s-and-repetition-operators |    2 +-
 tests/backslash-s-vs-invalid-multitype     |    2 +-
 tests/bre                                  |    2 +-
 tests/bre.awk                              |    2 +-
 tests/case-fold-titlecase                  |    2 +-
 tests/count-newline                        |    2 +-
 tests/dfa-coverage                         |    2 +-
 tests/dfa-heap-overrun                     |    2 +-
 tests/dfa-match                            |    2 +-
 tests/dfa-match-aux.c                      |    2 +-
 tests/empty                                |    2 +-
 tests/empty-line-mb                        |    2 +-
 tests/encoding-error                       |    2 +-
 tests/ere                                  |    2 +-
 tests/ere.awk                              |    2 +-
 tests/file                                 |    2 +-
 tests/fmbtest                              |    2 +-
 tests/foad1                                |    2 +-
 tests/get-mb-cur-max.c                     |    2 +-
 tests/help-version                         |    2 +-
 tests/high-bit-range                       |    2 +-
 tests/init.sh                              |    4 ++--
 tests/invalid-char-class                   |    2 +-
 tests/khadafy                              |    2 +-
 tests/kwset-abuse                          |    2 +-
 tests/long-pattern-perf                    |    2 +-
 tests/match-lines                          |    2 +-
 tests/mb-dot-newline                       |    2 +-
 tests/mb-non-UTF8-overrun                  |    2 +-
 tests/mb-non-UTF8-performance              |    2 +-
 tests/multibyte-white-space                |    2 +-
 tests/multiple-begin-or-end-line           |    2 +-
 tests/null-byte                            |    2 +-
 tests/options                              |    2 +-
 tests/pcre                                 |    2 +-
 tests/pcre-abort                           |    2 +-
 tests/pcre-count                           |    2 +-
 tests/pcre-infloop                         |    2 +-
 tests/pcre-invalid-utf8-infloop            |    2 +-
 tests/pcre-invalid-utf8-input              |    2 +-
 tests/pcre-jitstack                        |    2 +-
 tests/pcre-o                               |    2 +-
 tests/pcre-utf8                            |    2 +-
 tests/pcre-w                               |    2 +-
 tests/pcre-wx-backref                      |    2 +-
 tests/posix-bracket                        |    2 +-
 tests/spencer1                             |    2 +-
 tests/spencer1-locale                      |    2 +-
 tests/spencer1-locale.awk                  |    2 +-
 tests/spencer1.awk                         |    2 +-
 tests/spencer2                             |    2 +-
 tests/status                               |    2 +-
 tests/surrogate-pair                       |    2 +-
 tests/symlink                              |    2 +-
 tests/tests                                |    2 +-
 tests/triple-backref                       |    2 +-
 tests/turkish-I                            |    2 +-
 tests/turkish-I-without-dot                |    2 +-
 tests/turkish-eyes                         |    2 +-
 tests/two-files                            |    2 +-
 tests/unibyte-bracket-expr                 |    2 +-
 tests/unibyte-negated-circumflex           |    2 +-
 tests/utf8-bracket                         |    2 +-
 tests/yesno                                |    2 +-
 104 files changed, 105 insertions(+), 105 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sat Jan 02 00:17:20 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aFEZ6-0006Kv-IW
	for mharc-grep-commit@gnu.org; Sat, 02 Jan 2016 00:17:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51114)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aFEZ3-0006Jo-C0
	for grep-commit@gnu.org; Sat, 02 Jan 2016 00:17:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aFEZ1-0004F2-Fs
	for grep-commit@gnu.org; Sat, 02 Jan 2016 00:17:17 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:59543)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aFEZ1-0004Ey-C0
	for grep-commit@gnu.org; Sat, 02 Jan 2016 00:17:15 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aFEZ0-0003YK-Q9
	for grep-commit@gnu.org; Sat, 02 Jan 2016 05:17:15 +0000
Date: Sat, 02 Jan 2016 05:17:14 +0000
Message-Id: <E1aFEZ0-0003YK-Q9@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-15-g40ed879
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c65dcd72d12d26d8540e1153232e03fa29610137
X-Git-Newrev: 40ed879db22d57516a31fefd1c39416974b74ec4
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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: Sat, 02 Jan 2016 05:17:19 -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  40ed879db22d57516a31fefd1c39416974b74ec4 (commit)
      from  c65dcd72d12d26d8540e1153232e03fa29610137 (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=40ed879db22d57516a31fefd1c39416974b74ec4


commit 40ed879db22d57516a31fefd1c39416974b74ec4
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jan 1 21:16:12 2016 -0800

    grep: fix bug with with invalid unibyte sequence
    
    This was introduced by the recent binary-data-detection changes.
    Problem reported by Norihiro Tanaka in: http://bugs.gnu.org/20526#86
    * src/grep.c (HIBYTE, easy_encoding, init_easy_encoding): Remove,
    replacing with ...
    (uword_max, unibyte_mask, initialize_unibyte_mask): ... this new
    constant, static var, and function.  All uses changed.  The
    unibyte_mask var generalizes the old local var hibyte_mask, which
    worked only for encodings where every byte with 0x80 turned off is
    a single-byte character.
    (buf_has_encoding_errors): Return false immediately if
    unibyte_mask is zero, not whether the current encoding is unibyte.
    The old test was incorrect in unibyte locales in which some bytes
    were encoding errors.
    * tests/pcre-z: Require UTF-8 locale, since the grep -z . test now
    needs this.  Use printf \0 rather than tr.  Port the 'grep -z .'
    test to platforms where the C locale says '\200' is an encoding
    error.  Use cmp rather than compare, as the file is binary and
    so non-GNU diff might not work.
    * tests/unibyte-binary: New file.
    * tests/Makefile.am (TESTS): Add it.

diff --git a/src/grep.c b/src/grep.c
index 1207a76..a5f1fa2 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -484,21 +484,6 @@ clean_up_stdout (void)
     close_stdout ();
 }
 
-/* The high-order bit of a byte.  */
-enum { HIBYTE = 0x80 };
-
-/* True if every byte with HIBYTE off is a single-byte character.
-   UTF-8 has this property.  */
-static bool easy_encoding;
-
-static void
-init_easy_encoding (void)
-{
-  easy_encoding = true;
-  for (int i = 0; i < HIBYTE; i++)
-    easy_encoding &= mbclen_cache[i] == 1;
-}
-
 /* A cast to TYPE of VAL.  Use this when TYPE is a pointer type, VAL
    is properly aligned for TYPE, and 'gcc -Wcast-align' cannot infer
    the alignment and would otherwise complain about the cast.  */
@@ -517,21 +502,33 @@ init_easy_encoding (void)
 /* An unsigned type suitable for fast matching.  */
 typedef uintmax_t uword;
 
+/* All bytes that are not unibyte characters, ANDed together, and then
+   with the pattern repeated to fill a uword.  For an encoding where
+   all bytes are unibyte characters, this is 0.  For UTF-8, this is
+   0x808080....  For encodings where unibyte characters have no useful
+   pattern, this is all 1s.  The unsigned char C is a unibyte
+   character if C & UNIBYTE_MASK is zero.  If the uword W is the
+   concatenation of bytes, the bytes are all unibyte characters
+   if W & UNIBYTE_MASK is zero.  */
+static uword unibyte_mask;
+
+static void
+initialize_unibyte_mask (void)
+{
+  unsigned char mask = UCHAR_MAX;
+  for (int i = 1; i <= UCHAR_MAX; i++)
+    if (mbclen_cache[i] != 1)
+      mask &= i;
+  uword uword_max = -1;
+  unibyte_mask = uword_max / UCHAR_MAX * mask;
+}
+
 /* Skip the easy bytes in a buffer that is guaranteed to have a sentinel
    that is not easy, and return a pointer to the first non-easy byte.
-   In easy encodings, the easy bytes all have HIBYTE off.
-   In other encodings, no byte is easy.  */
+   The easy bytes all have UNIBYTE_MASK off.  */
 static char const * _GL_ATTRIBUTE_PURE
 skip_easy_bytes (char const *buf)
 {
-  if (!easy_encoding)
-    return buf;
-
-  uword uword_max = -1;
-
-  /* 0x8080..., extended to be wide enough for uword.  */
-  uword hibyte_mask = uword_max / UCHAR_MAX * HIBYTE;
-
   /* Search a byte at a time until the pointer is aligned, then a
      uword at a time until a match is found, then a byte at a time to
      identify the exact byte.  The uword search may go slightly past
@@ -539,11 +536,11 @@ skip_easy_bytes (char const *buf)
   char const *p;
   uword const *s;
   for (p = buf; (uintptr_t) p % sizeof (uword) != 0; p++)
-    if (*p & HIBYTE)
+    if (to_uchar (*p) & unibyte_mask)
       return p;
-  for (s = CAST_ALIGNED (uword const *, p); ! (*s & hibyte_mask); s++)
+  for (s = CAST_ALIGNED (uword const *, p); ! (*s & unibyte_mask); s++)
     continue;
-  for (p = (char const *) s; ! (*p & HIBYTE); p++)
+  for (p = (char const *) s; ! (to_uchar (*p) & unibyte_mask); p++)
     continue;
   return p;
 }
@@ -554,7 +551,7 @@ skip_easy_bytes (char const *buf)
 static bool
 buf_has_encoding_errors (char *buf, size_t size)
 {
-  if (MB_CUR_MAX <= 1)
+  if (! unibyte_mask)
     return false;
 
   mbstate_t mbs = { 0 };
@@ -2592,7 +2589,7 @@ main (int argc, char **argv)
     usage (EXIT_TROUBLE);
 
   build_mbclen_cache ();
-  init_easy_encoding ();
+  initialize_unibyte_mask ();
 
   /* In a unibyte locale, switch from fgrep to grep if
      the pattern matches words (where grep is typically faster).
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f349aa3..a38303c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -133,6 +133,7 @@ TESTS =						\
   turkish-I-without-dot				\
   turkish-eyes					\
   two-files					\
+  unibyte-binary				\
   unibyte-bracket-expr				\
   unibyte-negated-circumflex			\
   utf8-bracket					\
diff --git a/tests/pcre-z b/tests/pcre-z
index 6bbde94..4ce9a93 100755
--- a/tests/pcre-z
+++ b/tests/pcre-z
@@ -2,10 +2,11 @@
 # Test Perl regex with NUL-separated input
 . "${srcdir=.}/init.sh"; path_prepend_ ../src
 require_pcre_
+require_en_utf8_locale_
 
 REGEX=a
 
-printf "%s\n0" abc def ghi aaa gah | tr 0 \\0 > in
+printf '%s\n\0' abc def ghi aaa gah > in || framework_failure_
 
 grep -z "$REGEX" in > exp 2>err || fail_ 'Cannot do BRE (grep -z) match.'
 compare /dev/null err || fail_ 'stderr not empty on grep -z.'
@@ -20,8 +21,8 @@ grep -Pz "$REGEX" in > out 2>err || fail=1
 compare exp out || fail=1
 compare /dev/null err || fail=1
 
-printf '\200\0' >in0
-LC_ALL=C grep -z . in0 >out || fail=1
-compare in0 out || fail=1
+printf '\303\200\0' >in0 # "À" followed by a NUL.
+LC_ALL=en_US.UTF-8 grep -z . in0 >out || fail=1
+cmp in0 out || fail=1
 
 Exit $fail
diff --git a/tests/unibyte-binary b/tests/unibyte-binary
new file mode 100755
index 0000000..78735b8
--- /dev/null
+++ b/tests/unibyte-binary
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Test binary files in unibyte locales with encoding errors
+
+# Copyright 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/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_unibyte_locale
+
+fail=0
+
+printf 'a\n\200\nb\n' >in || framework_failure_
+printf 'a\nBinary file in matches\n' >exp || framework_failure_
+grep . in >out || fail=1
+compare exp out || fail=1
+Exit $fail

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

Summary of changes:
 src/grep.c                                         |   57 +++++++++----------
 tests/Makefile.am                                  |    1 +
 tests/pcre-z                                       |    9 ++--
 .../{unibyte-negated-circumflex => unibyte-binary} |   11 ++--
 4 files changed, 39 insertions(+), 39 deletions(-)
 copy tests/{unibyte-negated-circumflex => unibyte-binary} (73%)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Wed Jan 06 02:29:53 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aGiXZ-0001aJ-Qr
	for mharc-grep-commit@gnu.org; Wed, 06 Jan 2016 02:29:53 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39112)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGiXW-0001Zh-Kc
	for grep-commit@gnu.org; Wed, 06 Jan 2016 02:29:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGiXV-0001Pf-G5
	for grep-commit@gnu.org; Wed, 06 Jan 2016 02:29:50 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:39402)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGiXV-0001PF-CL
	for grep-commit@gnu.org; Wed, 06 Jan 2016 02:29:49 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGiXT-0000vj-IY
	for grep-commit@gnu.org; Wed, 06 Jan 2016 07:29:48 +0000
Date: Wed, 06 Jan 2016 07:29:47 +0000
Message-Id: <E1aGiXT-0000vj-IY@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-16-g71c206b
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 40ed879db22d57516a31fefd1c39416974b74ec4
X-Git-Newrev: 71c206b5042a11c976c25a9f77aff04ebb29fcd9
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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 Jan 2016 07:29:51 -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  71c206b5042a11c976c25a9f77aff04ebb29fcd9 (commit)
      from  40ed879db22d57516a31fefd1c39416974b74ec4 (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=71c206b5042a11c976c25a9f77aff04ebb29fcd9


commit 71c206b5042a11c976c25a9f77aff04ebb29fcd9
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue Jan 5 23:29:07 2016 -0800

    Fix calculation of unibyte_mask
    
    * src/grep.c (initialize_unibyte_mask): The old method worked for
    UTF-8 and other typical encodings, but did not work for weird
    encodings, e.g., one where all bytes other than 0x7f and 0x80 are
    unibyte characters.

diff --git a/src/grep.c b/src/grep.c
index a5f1fa2..f6fb0bc 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -502,10 +502,10 @@ clean_up_stdout (void)
 /* An unsigned type suitable for fast matching.  */
 typedef uintmax_t uword;
 
-/* All bytes that are not unibyte characters, ANDed together, and then
-   with the pattern repeated to fill a uword.  For an encoding where
+/* A mask to test for unibyte characters, with the pattern repeated to
+   fill a uword.  For a multibyte character encoding where
    all bytes are unibyte characters, this is 0.  For UTF-8, this is
-   0x808080....  For encodings where unibyte characters have no useful
+   0x808080....  For encodings where unibyte characters have no discerned
    pattern, this is all 1s.  The unsigned char C is a unibyte
    character if C & UNIBYTE_MASK is zero.  If the uword W is the
    concatenation of bytes, the bytes are all unibyte characters
@@ -515,10 +515,23 @@ static uword unibyte_mask;
 static void
 initialize_unibyte_mask (void)
 {
-  unsigned char mask = UCHAR_MAX;
+  /* For each encoding error I that MASK does not already match,
+     accumulate I's most significant 1 bit by ORing it into MASK.
+     Although any 1 bit of I could be used, in practice high-order
+     bits work better.  */
+  unsigned char mask = 0;
+  int ms1b = 1;
   for (int i = 1; i <= UCHAR_MAX; i++)
-    if (mbclen_cache[i] != 1)
-      mask &= i;
+    if (mbclen_cache[i] != 1 && ! (mask & i))
+      {
+        while (ms1b * 2 <= i)
+          ms1b *= 2;
+        mask |= ms1b;
+      }
+
+  /* Now MASK will detect any encoding-error byte, although it may
+     cry wolf and it may not be optimal.  Build a uword-length mask by
+     repeating MASK.  */
   uword uword_max = -1;
   unibyte_mask = uword_max / UCHAR_MAX * mask;
 }

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

Summary of changes:
 src/grep.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Wed Jan 06 03:27:00 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aGjQq-00023I-1X
	for mharc-grep-commit@gnu.org; Wed, 06 Jan 2016 03:27:00 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47194)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGjQm-00022U-Lm
	for grep-commit@gnu.org; Wed, 06 Jan 2016 03:26:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGjQl-0003dp-2j
	for grep-commit@gnu.org; Wed, 06 Jan 2016 03:26:56 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:39985)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGjQk-0003dl-UG
	for grep-commit@gnu.org; Wed, 06 Jan 2016 03:26:54 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGjQk-00015i-4n
	for grep-commit@gnu.org; Wed, 06 Jan 2016 08:26:54 +0000
Date: Wed, 06 Jan 2016 08:26:54 +0000
Message-Id: <E1aGjQk-00015i-4n@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-17-gf6603c4
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 71c206b5042a11c976c25a9f77aff04ebb29fcd9
X-Git-Newrev: f6603c4e1e04dbb87a7232c4b44acc6afdf65fef
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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 Jan 2016 08:26:58 -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  f6603c4e1e04dbb87a7232c4b44acc6afdf65fef (commit)
      from  71c206b5042a11c976c25a9f77aff04ebb29fcd9 (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=f6603c4e1e04dbb87a7232c4b44acc6afdf65fef


commit f6603c4e1e04dbb87a7232c4b44acc6afdf65fef
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jan 6 00:26:26 2016 -0800

    grep: restore -P PCRE_NO_UTF8_CHECK optimization
    
    On my platform in the en_US.utf8 locale, this makes 'grep -P "z.*a" k'
    220x faster, where k is created by the shell command:
    yes 'abcdefg hijklmn opqrstu vwxyz' | head -n 10000000 >k
    * src/dfasearch.c (EGexecute):
    * src/grep.c (execute_fp_t):
    * src/kwsearch.c (Fexecute):
    * src/pcresearch.c (Pexecute):
    First arg is now char *, not char const *, since Pexecute now
    temporarily modifies this argument.
    * src/grep.c, src/grep.h (buf_has_encoding_errors): Now extern.
    * src/pcresearch.c (Pexecute): Use it.  If the input is free of
    encoding errors, use a multiline search and the PCRE_NO_UTF8_CHECK
    option, as this is typically way faster.  This restores an
    optimization that was removed with the recent changes for binary
    file detection.

diff --git a/src/dfasearch.c b/src/dfasearch.c
index 0205011..a330eac 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -202,7 +202,7 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)
 }
 
 size_t
-EGexecute (char const *buf, size_t size, size_t *match_size,
+EGexecute (char *buf, size_t size, size_t *match_size,
            char const *start_ptr)
 {
   char const *buflim, *beg, *end, *ptr, *match, *best_match, *mb_start;
diff --git a/src/grep.c b/src/grep.c
index f6fb0bc..10aabf9 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -462,7 +462,7 @@ enum { SEEK_HOLE = SEEK_SET };
 
 /* Functions we'll use to search. */
 typedef void (*compile_fp_t) (char const *, size_t);
-typedef size_t (*execute_fp_t) (char const *, size_t, size_t *, char const *);
+typedef size_t (*execute_fp_t) (char *, size_t, size_t *, char const *);
 static compile_fp_t compile;
 static execute_fp_t execute;
 
@@ -561,7 +561,7 @@ skip_easy_bytes (char const *buf)
 /* Return true if BUF, of size SIZE, has an encoding error.
    BUF must be followed by at least sizeof (uword) bytes,
    the first of which may be modified.  */
-static bool
+bool
 buf_has_encoding_errors (char *buf, size_t size)
 {
   if (! unibyte_mask)
diff --git a/src/grep.h b/src/grep.h
index 577fb72..75b7ef7 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -29,4 +29,6 @@ extern bool match_words;	/* -w */
 extern bool match_lines;	/* -x */
 extern char eolbyte;		/* -z */
 
+extern bool buf_has_encoding_errors (char *, size_t);
+
 #endif
diff --git a/src/kwsearch.c b/src/kwsearch.c
index e33caaf..e9966d4 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -78,7 +78,7 @@ Fcompile (char const *pattern, size_t size)
 }
 
 size_t
-Fexecute (char const *buf, size_t size, size_t *match_size,
+Fexecute (char *buf, size_t size, size_t *match_size,
           char const *start_ptr)
 {
   char const *beg, *try, *end, *mb_start;
diff --git a/src/pcresearch.c b/src/pcresearch.c
index a647514..8f3d935 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -174,7 +174,7 @@ Pcompile (char const *pattern, size_t size)
 }
 
 size_t
-Pexecute (char const *buf, size_t size, size_t *match_size,
+Pexecute (char *buf, size_t size, size_t *match_size,
           char const *start_ptr)
 {
 #if !HAVE_LIBPCRE
@@ -194,13 +194,31 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
      error.  */
   char const *subject = buf;
 
+  /* If the input is free of encoding errors a multiline search is
+     typically more efficient.  Otherwise, a single-line search is
+     typically faster, so that pcre_exec doesn't waste time validating
+     the entire input buffer.  */
+  bool multiline = ! buf_has_encoding_errors (buf, size - 1);
+  buf[size - 1] = eolbyte;
+
   for (; p < buf + size; p = line_start = line_end + 1)
     {
-      /* A single-line search is typically faster, so that
-         pcre_exec doesn't waste time validating the entire input
-         buffer.  */
-      line_end = memchr (p, eolbyte, buf + size - p);
-      if (INT_MAX < line_end - p)
+      bool too_big;
+
+      if (multiline)
+        {
+          size_t pcre_size_max = MIN (INT_MAX, SIZE_MAX - 1);
+          size_t scan_size = MIN (pcre_size_max + 1, buf + size - p);
+          line_end = memrchr (p, eolbyte, scan_size);
+          too_big = ! line_end;
+        }
+      else
+        {
+          line_end = memchr (p, eolbyte, buf + size - p);
+          too_big = INT_MAX < line_end - p;
+        }
+
+      if (too_big)
         error (EXIT_TROUBLE, 0, _("exceeded PCRE's line length limit"));
 
       for (;;)
@@ -228,11 +246,27 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
           int options = 0;
           if (!bol)
             options |= PCRE_NOTBOL;
+          if (multiline)
+            options |= PCRE_NO_UTF8_CHECK;
 
           e = jit_exec (subject, line_end - subject, search_offset,
                         options, sub);
           if (e != PCRE_ERROR_BADUTF8)
-            break;
+            {
+              if (0 < e && multiline && sub[1] - sub[0] != 0)
+                {
+                  char const *nl = memchr (subject + sub[0], eolbyte,
+                                           sub[1] - sub[0]);
+                  if (nl)
+                    {
+                      /* This match crosses a line boundary; reject it.  */
+                      p = subject + sub[0];
+                      line_end = nl;
+                      continue;
+                    }
+                }
+              break;
+            }
           int valid_bytes = sub[0];
 
           /* Try to match the string before the encoding error.  */
@@ -304,6 +338,15 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
           beg = matchbeg;
           end = matchend;
         }
+      else if (multiline)
+        {
+          char const *prev_nl = memrchr (line_start - 1, eolbyte,
+                                         matchbeg - (line_start - 1));
+          char const *next_nl = memchr (matchend, eolbyte,
+                                        line_end + 1 - matchend);
+          beg = prev_nl + 1;
+          end = next_nl + 1;
+        }
       else
         {
           beg = line_start;

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

Summary of changes:
 src/dfasearch.c  |    2 +-
 src/grep.c       |    4 +-
 src/grep.h       |    2 +
 src/kwsearch.c   |    2 +-
 src/pcresearch.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++------
 5 files changed, 56 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Wed Jan 06 12:55:56 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aGsJQ-00031n-C2
	for mharc-grep-commit@gnu.org; Wed, 06 Jan 2016 12:55:56 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57394)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGsJN-00031a-VF
	for grep-commit@gnu.org; Wed, 06 Jan 2016 12:55:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGsJM-0000kR-Ua
	for grep-commit@gnu.org; Wed, 06 Jan 2016 12:55:53 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:45882)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGsJM-0000kL-Qt
	for grep-commit@gnu.org; Wed, 06 Jan 2016 12:55:52 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aGsJM-0000YW-9F
	for grep-commit@gnu.org; Wed, 06 Jan 2016 17:55:52 +0000
Date: Wed, 06 Jan 2016 17:55:52 +0000
Message-Id: <E1aGsJM-0000YW-9F@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-18-g4f04b82
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f6603c4e1e04dbb87a7232c4b44acc6afdf65fef
X-Git-Newrev: 4f04b821d3bd00283cbfed17b81f68dba5fdd9cb
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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 Jan 2016 17:55:55 -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  4f04b821d3bd00283cbfed17b81f68dba5fdd9cb (commit)
      from  f6603c4e1e04dbb87a7232c4b44acc6afdf65fef (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=4f04b821d3bd00283cbfed17b81f68dba5fdd9cb


commit 4f04b821d3bd00283cbfed17b81f68dba5fdd9cb
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jan 6 09:55:28 2016 -0800

    grep: restore -P optimization (followup fix)
    
    * src/search.h (EGexecute, Fexecute, Pexecute):
    Change decls to match new implementations.
    I forgot to add this file to the previous commit.

diff --git a/src/search.h b/src/search.h
index 5031d67..a69bf19 100644
--- a/src/search.h
+++ b/src/search.h
@@ -57,15 +57,15 @@ extern wint_t mb_next_wc (char const *, char const *);
 
 /* dfasearch.c */
 extern void GEAcompile (char const *, size_t, reg_syntax_t);
-extern size_t EGexecute (char const *, size_t, size_t *, char const *);
+extern size_t EGexecute (char *, size_t, size_t *, char const *);
 
 /* kwsearch.c */
 extern void Fcompile (char const *, size_t);
-extern size_t Fexecute (char const *, size_t, size_t *, char const *);
+extern size_t Fexecute (char *, size_t, size_t *, char const *);
 
 /* pcresearch.c */
 extern void Pcompile (char const *, size_t);
-extern size_t Pexecute (char const *, size_t, size_t *, char const *);
+extern size_t Pexecute (char *, size_t, size_t *, char const *);
 
 /* Return the number of bytes in the character at the start of S, which
    is of size N.  N must be positive.  MBS is the conversion state.

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

Summary of changes:
 src/search.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Thu Jan 07 01:41:28 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aH4GG-0003mb-BB
	for mharc-grep-commit@gnu.org; Thu, 07 Jan 2016 01:41:28 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60483)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aH4GE-0003mP-8g
	for grep-commit@gnu.org; Thu, 07 Jan 2016 01:41:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aH4GD-0003pY-5n
	for grep-commit@gnu.org; Thu, 07 Jan 2016 01:41:26 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:52724)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aH4GD-0003pM-2K
	for grep-commit@gnu.org; Thu, 07 Jan 2016 01:41:25 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aH4GB-0000AD-Bk
	for grep-commit@gnu.org; Thu, 07 Jan 2016 06:41:23 +0000
Date: Thu, 07 Jan 2016 06:41:23 +0000
Message-Id: <E1aH4GB-0000AD-Bk@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-19-g5cb49d2
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4f04b821d3bd00283cbfed17b81f68dba5fdd9cb
X-Git-Newrev: 5cb49d2f375f0606ac9d916af6024d4b92ba0786
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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 Jan 2016 06:41: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  5cb49d2f375f0606ac9d916af6024d4b92ba0786 (commit)
      from  4f04b821d3bd00283cbfed17b81f68dba5fdd9cb (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=5cb49d2f375f0606ac9d916af6024d4b92ba0786


commit 5cb49d2f375f0606ac9d916af6024d4b92ba0786
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Wed Jan 6 22:40:23 2016 -0800

    Improve on fix for Bug#22181
    
    * src/pcresearch.c (Pexecute): Update subject when skipping past
    easily-determined encoding errors, as this is faster than letting
    pcre_exec skip them.  On my platform this improves performance
    4.7x on a benchmark created via "yes $(printf '\200\200\200\200
    \200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200x\n')
    | head -n 1000000 >j; grep -oP y j" in a UTF-8 locale.  Rework
    code that deals with PCRE_ERROR_BADUTF8 return, to avoid an
    incorrect (albeit currently harmless) 'bol = false' assignment.

diff --git a/src/pcresearch.c b/src/pcresearch.c
index 8f3d935..c0b8678 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -229,6 +229,7 @@ Pexecute (char *buf, size_t size, size_t *match_size,
           while (mbclen_cache[to_uchar (*p)] == (size_t) -1)
             {
               p++;
+              subject = p;
               bol = false;
             }
 
@@ -269,29 +270,30 @@ Pexecute (char *buf, size_t size, size_t *match_size,
             }
           int valid_bytes = sub[0];
 
-          /* Try to match the string before the encoding error.  */
-          if (valid_bytes < search_offset)
-            e = PCRE_ERROR_NOMATCH;
-          else if (valid_bytes == 0)
+          if (search_offset <= valid_bytes)
             {
-              /* Handle the empty-match case specially, for speed.
-                 This optimization is valid if VALID_BYTES is zero,
-                 which means SEARCH_OFFSET is also zero.  */
-              sub[1] = 0;
-              e = empty_match[bol];
-            }
-          else
-            e = jit_exec (subject, valid_bytes, search_offset,
-                          options | PCRE_NO_UTF8_CHECK | PCRE_NOTEOL, sub);
+              /* Try to match the string before the encoding error.  */
+              if (valid_bytes == 0)
+                {
+                  /* Handle the empty-match case specially, for speed.
+                     This optimization is valid if VALID_BYTES is zero,
+                     which means SEARCH_OFFSET is also zero.  */
+                  sub[1] = 0;
+                  e = empty_match[bol];
+                }
+              else
+                e = jit_exec (subject, valid_bytes, search_offset,
+                              options | PCRE_NO_UTF8_CHECK | PCRE_NOTEOL, sub);
 
-          if (e != PCRE_ERROR_NOMATCH)
-            break;
+              if (e != PCRE_ERROR_NOMATCH)
+                break;
+
+              /* Treat the encoding error as data that cannot match.  */
+              p = subject + valid_bytes + 1;
+              bol = false;
+            }
 
-          /* Treat the encoding error as data that cannot match.  */
           subject += valid_bytes + 1;
-          if (p < subject)
-            p = subject;
-          bol = false;
         }
 
       if (e != PCRE_ERROR_NOMATCH)

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

Summary of changes:
 src/pcresearch.c |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jan 08 00:30:38 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aHPdG-000781-I6
	for mharc-grep-commit@gnu.org; Fri, 08 Jan 2016 00:30:38 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35834)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPdE-00077s-1Z
	for grep-commit@gnu.org; Fri, 08 Jan 2016 00:30:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPdC-0000W7-Or
	for grep-commit@gnu.org; Fri, 08 Jan 2016 00:30:35 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:38336)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPdC-0000W3-LN
	for grep-commit@gnu.org; Fri, 08 Jan 2016 00:30:34 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPdC-0005DV-3B
	for grep-commit@gnu.org; Fri, 08 Jan 2016 05:30:34 +0000
Date: Fri, 08 Jan 2016 05:30:34 +0000
Message-Id: <E1aHPdC-0005DV-3B@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-20-gd1160ec
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5cb49d2f375f0606ac9d916af6024d4b92ba0786
X-Git-Newrev: d1160ec6d239b2e0f20c2fb3395e3b70963bf916
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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, 08 Jan 2016 05:30:37 -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  d1160ec6d239b2e0f20c2fb3395e3b70963bf916 (commit)
      from  5cb49d2f375f0606ac9d916af6024d4b92ba0786 (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=d1160ec6d239b2e0f20c2fb3395e3b70963bf916


commit d1160ec6d239b2e0f20c2fb3395e3b70963bf916
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Jan 7 21:28:23 2016 -0800

    grep: improve unibyte -P performance
    
    This is a followon to the recent changes prompted by Bug#20526.
    In <http://bugs.gnu.org/bug=20526#86> Norihiro Tanaka pointed out
    that grep mistakenly assumed that unibyte locales cannot have
    encoding errors.  Here, the mistake hurt performance significantly.
    On Fedora 23 x86-64 in the C locale, this patch improved grep's
    performance by a factor of 7 when run as "grep -P 'z.*a'" on the
    output of "yes $(printf '\200\n') | head -n 1000000000".
    * src/pcresearch.c (multibyte_locale) [HAVE_LIBPCRE]: New static var.
    (Pcompile): Set it.
    (Pexecute): Use it to avoid the need to call
    buf_has_encoding_errors in unibyte locales.

diff --git a/src/pcresearch.c b/src/pcresearch.c
index c0b8678..1fae94d 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -84,6 +84,8 @@ jit_exec (char const *subject, int search_bytes, int search_offset,
 /* Table, indexed by ! (flag & PCRE_NOTBOL), of whether the empty
    string matches when that flag is used.  */
 static int empty_match[2];
+
+static bool multibyte_locale;
 #endif
 
 void
@@ -104,10 +106,14 @@ Pcompile (char const *pattern, size_t size)
   char const *p;
   char const *pnul;
 
-  if (using_utf8 ())
-    flags |= PCRE_UTF8;
-  else if (MB_CUR_MAX != 1)
-    error (EXIT_TROUBLE, 0, _("-P supports only unibyte and UTF-8 locales"));
+  if (1 < MB_CUR_MAX)
+    {
+      if (! using_utf8 ())
+        error (EXIT_TROUBLE, 0,
+               _("-P supports only unibyte and UTF-8 locales"));
+      multibyte_locale = true;
+      flags |= PCRE_UTF8;
+    }
 
   /* FIXME: Remove these restrictions.  */
   if (memchr (pattern, '\n', size))
@@ -194,12 +200,16 @@ Pexecute (char *buf, size_t size, size_t *match_size,
      error.  */
   char const *subject = buf;
 
-  /* If the input is free of encoding errors a multiline search is
+  /* If the input is unibyte or is free of encoding errors a multiline search is
      typically more efficient.  Otherwise, a single-line search is
      typically faster, so that pcre_exec doesn't waste time validating
      the entire input buffer.  */
-  bool multiline = ! buf_has_encoding_errors (buf, size - 1);
-  buf[size - 1] = eolbyte;
+  bool multiline = true;
+  if (multibyte_locale)
+    {
+      multiline = ! buf_has_encoding_errors (buf, size - 1);
+      buf[size - 1] = eolbyte;
+    }
 
   for (; p < buf + size; p = line_start = line_end + 1)
     {

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

Summary of changes:
 src/pcresearch.c |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jan 08 00:34:26 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aHPgw-0007Qw-BN
	for mharc-grep-commit@gnu.org; Fri, 08 Jan 2016 00:34:26 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36453)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPgu-0007Qa-Ec
	for grep-commit@gnu.org; Fri, 08 Jan 2016 00:34:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPgt-0001Av-HY
	for grep-commit@gnu.org; Fri, 08 Jan 2016 00:34:24 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:38370)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPgt-0001Aq-E3
	for grep-commit@gnu.org; Fri, 08 Jan 2016 00:34:23 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHPgs-00073k-ON
	for grep-commit@gnu.org; Fri, 08 Jan 2016 05:34:22 +0000
Date: Fri, 08 Jan 2016 05:34:22 +0000
Message-Id: <E1aHPgs-00073k-ON@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-21-gca68df3
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d1160ec6d239b2e0f20c2fb3395e3b70963bf916
X-Git-Newrev: ca68df394ba1d9359c0e4d825394ab875c7fe1c2
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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, 08 Jan 2016 05:34:25 -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  ca68df394ba1d9359c0e4d825394ab875c7fe1c2 (commit)
      from  d1160ec6d239b2e0f20c2fb3395e3b70963bf916 (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=ca68df394ba1d9359c0e4d825394ab875c7fe1c2


commit ca68df394ba1d9359c0e4d825394ab875c7fe1c2
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu Jan 7 21:34:00 2016 -0800

    doc: mention unibyte encoding fix
    
    * NEWS: Document recent fix for encoding errors in unibyte locales.

diff --git a/NEWS b/NEWS
index f572a0c..a0f6bbb 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,11 @@ GNU grep NEWS                                    -*- outline -*-
   grep -c no longer stops counting when finding binary data.
   [bug introduced in grep-2.21]
 
+  grep no longer outputs encoding errors in unibyte locales.
+  For example, if the byte '\x81' is not a valid character in a
+  unibyte locale, grep treats the byte as binary data.
+  [bug introduced in grep-2.21]
+
   grep -oP is no longer susceptible to an infinite loop when processing
   invalid UTF8 just before a match.
   [bug introduced in grep-2.22]

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

Summary of changes:
 NEWS |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jan 08 19:57:56 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aHhqu-0000oQ-72
	for mharc-grep-commit@gnu.org; Fri, 08 Jan 2016 19:57:56 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43068)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aHhqr-0000lU-SP
	for grep-commit@gnu.org; Fri, 08 Jan 2016 19:57:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aHhqq-0007Ij-Ow
	for grep-commit@gnu.org; Fri, 08 Jan 2016 19:57:53 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:50504)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aHhqq-0007If-LX
	for grep-commit@gnu.org; Fri, 08 Jan 2016 19:57:52 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1aHhqp-0006EC-Ua
	for grep-commit@gnu.org; Sat, 09 Jan 2016 00:57:52 +0000
Date: Sat, 09 Jan 2016 00:57:51 +0000
Message-Id: <E1aHhqp-0006EC-Ua@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-23-g8eb7260
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ca68df394ba1d9359c0e4d825394ab875c7fe1c2
X-Git-Newrev: 8eb72603aec2007f990f9ff196310b2eea662c6b
From: Jim Meyering <jim@meyering.net>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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: Sat, 09 Jan 2016 00:57:55 -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  8eb72603aec2007f990f9ff196310b2eea662c6b (commit)
       via  6c7f8166c7928cf48a8288c0333941f3bf3466c1 (commit)
      from  ca68df394ba1d9359c0e4d825394ab875c7fe1c2 (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=8eb72603aec2007f990f9ff196310b2eea662c6b


commit 8eb72603aec2007f990f9ff196310b2eea662c6b
Author: Jim Meyering <meyering@fb.com>
Date:   Fri Jan 8 16:56:50 2016 -0800

    tests: fix encoding-error test failure to use of printf '\xHH'
    
    * tests/encoding-error: Don't rely on printf having support for \xHH
    hexadecimal.  That is not portable.  Use \OOO octal, instead.
    
    maint: fix typo in NEWS: s/a/an/

diff --git a/tests/encoding-error b/tests/encoding-error
index 2f09c21..4b5fcb5 100755
--- a/tests/encoding-error
+++ b/tests/encoding-error
@@ -16,7 +16,7 @@ export LC_ALL
 
 printf 'Alfred Jones\n' > a || framework_failure_
 printf 'John Smith\n' >j || framework_failure_
-printf 'Pedro P\xe9rez\n' >p || framework_failure_
+printf 'Pedro P\351rez\n' >p || framework_failure_
 cat a p j >in || framework_failure_
 
 fail=0

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


commit 8eb72603aec2007f990f9ff196310b2eea662c6b
Author: Jim Meyering <meyering@fb.com>
Date:   Fri Jan 8 16:56:50 2016 -0800

    tests: fix encoding-error test failure to use of printf '\xHH'
    
    * tests/encoding-error: Don't rely on printf having support for \xHH
    hexadecimal.  That is not portable.  Use \OOO octal, instead.
    
    maint: fix typo in NEWS: s/a/an/

diff --git a/tests/encoding-error b/tests/encoding-error
index 2f09c21..4b5fcb5 100755
--- a/tests/encoding-error
+++ b/tests/encoding-error
@@ -16,7 +16,7 @@ export LC_ALL
 
 printf 'Alfred Jones\n' > a || framework_failure_
 printf 'John Smith\n' >j || framework_failure_
-printf 'Pedro P\xe9rez\n' >p || framework_failure_
+printf 'Pedro P\351rez\n' >p || framework_failure_
 cat a p j >in || framework_failure_
 
 fail=0

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

Summary of changes:
 tests/encoding-error          |    2 +-
 tests/mb-non-UTF8-performance |   13 +++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jan 08 21:48:59 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aHjaN-0007Tl-Qp
	for mharc-grep-commit@gnu.org; Fri, 08 Jan 2016 21:48:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42323)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHjaL-0007Ta-VH
	for grep-commit@gnu.org; Fri, 08 Jan 2016 21:48:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHjaK-0001gT-Nf
	for grep-commit@gnu.org; Fri, 08 Jan 2016 21:48:57 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:51520)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHjaK-0001gP-K8
	for grep-commit@gnu.org; Fri, 08 Jan 2016 21:48:56 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aHjaK-0005s8-21
	for grep-commit@gnu.org; Sat, 09 Jan 2016 02:48:56 +0000
Date: Sat, 09 Jan 2016 02:48:56 +0000
Message-Id: <E1aHjaK-0005s8-21@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-24-g4a20676
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8eb72603aec2007f990f9ff196310b2eea662c6b
X-Git-Newrev: 4a2067645af7b2dcf9f61886a1ed2c801dfa44cd
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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: Sat, 09 Jan 2016 02:48:59 -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  4a2067645af7b2dcf9f61886a1ed2c801dfa44cd (commit)
      from  8eb72603aec2007f990f9ff196310b2eea662c6b (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=4a2067645af7b2dcf9f61886a1ed2c801dfa44cd


commit 4a2067645af7b2dcf9f61886a1ed2c801dfa44cd
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jan 8 18:48:14 2016 -0800

    tests: port to other POSIXish platforms
    
    I tested this on Solaris 10 and AIX 7.1.
    * tests/max-count-overread:
    * tests/mb-non-UTF8-performance:
    Don't assume 'yes' exists, as 'yes' is not in POSIX.
    * tests/mb-non-UTF8-performance:
    Don't rely on 'head -1000', as that option syntax is not POSIX.
    * tests/pcre-count: Don't rely on "printf '\x0'".
    * tests/unibyte-binary: Don't assume \200 is an encoding error
    in every unibyte locale.

diff --git a/tests/max-count-overread b/tests/max-count-overread
index d7aafd6..ec98ac8 100755
--- a/tests/max-count-overread
+++ b/tests/max-count-overread
@@ -9,7 +9,7 @@ fail=0
 
 echo x > exp || framework_failure_
 
-yes x | timeout 3 grep -m1 x > out || fail=1
+${AWK-awk} 'BEGIN{for (;;) print "x"}' | timeout 3 grep -m1 x > out || fail=1
 compare exp out || fail=1
 
 Exit $fail
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index fc371bd..c350dfb 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -31,7 +31,9 @@ expensive_
 # the unibyte test takes at least 10ms of user time.
 n_lines=100000
 while :; do
-  yes $(printf '%078d' 0) | head -$n_lines > in || framework_failure_
+  ${AWK-awk} -v n_lines=$n_lines \
+      'BEGIN {while (n_lines--) printf "%078d\n", 0}' </dev/null >in ||
+    framework_failure_
   ubyte_ms=$(LC_ALL=C user_time_ 1 grep -i foobar in) || fail=1
   test $ubyte_ms -ge 10 && break
   n_lines=$(expr $n_lines + 200000)
diff --git a/tests/pcre-count b/tests/pcre-count
index 24afa17..4bcb2b3 100755
--- a/tests/pcre-count
+++ b/tests/pcre-count
@@ -13,7 +13,7 @@ require_pcre_
 
 fail=0
 
-printf 'a\n%032768d\nb\x0\n%032768d\na\n' 0 0 > in
+printf 'a\n%032768d\nb\0\n%032768d\na\n' 0 0 > in
 
 LC_ALL=C grep -P 'a' in | wc -l > exp
 
diff --git a/tests/unibyte-binary b/tests/unibyte-binary
index 78735b8..11325ee 100755
--- a/tests/unibyte-binary
+++ b/tests/unibyte-binary
@@ -24,5 +24,9 @@ fail=0
 printf 'a\n\200\nb\n' >in || framework_failure_
 printf 'a\nBinary file in matches\n' >exp || framework_failure_
 grep . in >out || fail=1
-compare exp out || fail=1
+
+# In some unibyte locales, \200 is an encoding error;
+# in others, it is a valid character.  Allow either possibility.
+compare exp out || compare in out || fail=1
+
 Exit $fail

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

Summary of changes:
 tests/max-count-overread      |    2 +-
 tests/mb-non-UTF8-performance |    4 +++-
 tests/pcre-count              |    2 +-
 tests/unibyte-binary          |    6 +++++-
 4 files changed, 10 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Mon Jan 11 14:31:43 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aIiBq-0003UN-Vi
	for mharc-grep-commit@gnu.org; Mon, 11 Jan 2016 14:31:42 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37526)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aIiBp-0003UA-1t
	for grep-commit@gnu.org; Mon, 11 Jan 2016 14:31:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aIiBn-0004Bl-Jx
	for grep-commit@gnu.org; Mon, 11 Jan 2016 14:31:40 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:34697)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aIiBn-0004Bh-Hz
	for grep-commit@gnu.org; Mon, 11 Jan 2016 14:31:39 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aIiBk-0001UK-Om
	for grep-commit@gnu.org; Mon, 11 Jan 2016 19:31:38 +0000
Date: Mon, 11 Jan 2016 19:31:36 +0000
Message-Id: <E1aIiBk-0001UK-Om@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-25-g69f885e
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4a2067645af7b2dcf9f61886a1ed2c801dfa44cd
X-Git-Newrev: 69f885ed355708b6ae624682fefe42062d2c3f17
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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: Mon, 11 Jan 2016 19:31:42 -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  69f885ed355708b6ae624682fefe42062d2c3f17 (commit)
      from  4a2067645af7b2dcf9f61886a1ed2c801dfa44cd (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=69f885ed355708b6ae624682fefe42062d2c3f17


commit 69f885ed355708b6ae624682fefe42062d2c3f17
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Mon Jan 11 11:30:56 2016 -0800

    * tests/pcre-count: Don't assume the page size is 32kB.

diff --git a/tests/pcre-count b/tests/pcre-count
index 4bcb2b3..e638635 100755
--- a/tests/pcre-count
+++ b/tests/pcre-count
@@ -13,11 +13,17 @@ require_pcre_
 
 fail=0
 
-printf 'a\n%032768d\nb\0\n%032768d\na\n' 0 0 > in
+printf 'a\n%032768d\nb\0\n%032768d\na\n' 0 0 > in || framework_failure_
 
-LC_ALL=C grep -P 'a' in | wc -l > exp
+# grep will discover that the input is a binary file sooner if the
+# page size is larger, so allow for either possible output.
+printf 'a\nBinary file in matches\n' >exp1a || framework_failure_
+printf 'Binary file in matches\n' >exp1b || framework_failure_
+LC_ALL=C grep -P 'a' in >out || fail=1
+compare exp1a out || compare exp1b out || fail=1
 
-LC_ALL=C grep -Pc 'a' in > out ||  fail=1
-compare exp out || fail=1
+printf '2\n' >exp2 || framework_failure_
+LC_ALL=C grep -Pc 'a' in >out || fail=1
+compare exp2 out || fail=1
 
 Exit $fail

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

Summary of changes:
 tests/pcre-count |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Mon Jan 11 23:55:39 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aIqzb-0005cl-Ki
	for mharc-grep-commit@gnu.org; Mon, 11 Jan 2016 23:55:39 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43656)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aIqzZ-0005bp-2c
	for grep-commit@gnu.org; Mon, 11 Jan 2016 23:55:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aIqzY-0006F3-39
	for grep-commit@gnu.org; Mon, 11 Jan 2016 23:55:37 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:39963)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aIqzX-0006Ez-VU
	for grep-commit@gnu.org; Mon, 11 Jan 2016 23:55:36 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1aIqzX-0005OW-5W
	for grep-commit@gnu.org; Tue, 12 Jan 2016 04:55:35 +0000
Date: Tue, 12 Jan 2016 04:55:35 +0000
Message-Id: <E1aIqzX-0005OW-5W@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-26-g20f20a4
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 69f885ed355708b6ae624682fefe42062d2c3f17
X-Git-Newrev: 20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8
From: Jim Meyering <jim@meyering.net>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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, 12 Jan 2016 04:55:38 -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  20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8 (commit)
      from  69f885ed355708b6ae624682fefe42062d2c3f17 (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=20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8


commit 20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8
Author: Jim Meyering <meyering@fb.com>
Date:   Fri Jan 8 19:23:25 2016 -0800

    tests: do use "yes" but via an AWK replacement
    
    Also, use sed Nq in place of head -N
    * tests/init.cfg (yes): Define.
    Thanks to Paul Eggert for this definition.
    * tests/max-count-overread: Revert to using "yes".
    * tests/mb-non-UTF8-performance: Likewise, and use
    "sed Nq" in place of head -N.

diff --git a/tests/init.cfg b/tests/init.cfg
index be03357..bc62c32 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -200,3 +200,6 @@ user_time_()
     $child_user *= 1000;
     print int ($child_user + 0.5)' "$@"
 }
+
+# yes is not portable, fake it with $AWK
+yes() { line=${*-y} ${AWK-awk} 'BEGIN{for (;;) print ENVIRON["line"]}'; }
diff --git a/tests/max-count-overread b/tests/max-count-overread
index ec98ac8..d7aafd6 100755
--- a/tests/max-count-overread
+++ b/tests/max-count-overread
@@ -9,7 +9,7 @@ fail=0
 
 echo x > exp || framework_failure_
 
-${AWK-awk} 'BEGIN{for (;;) print "x"}' | timeout 3 grep -m1 x > out || fail=1
+yes x | timeout 3 grep -m1 x > out || fail=1
 compare exp out || fail=1
 
 Exit $fail
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index c350dfb..3f9209c 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -31,9 +31,7 @@ expensive_
 # the unibyte test takes at least 10ms of user time.
 n_lines=100000
 while :; do
-  ${AWK-awk} -v n_lines=$n_lines \
-      'BEGIN {while (n_lines--) printf "%078d\n", 0}' </dev/null >in ||
-    framework_failure_
+  yes $(printf '%078d' 0) | sed ${n_lines}q > in || framework_failure_
   ubyte_ms=$(LC_ALL=C user_time_ 1 grep -i foobar in) || fail=1
   test $ubyte_ms -ge 10 && break
   n_lines=$(expr $n_lines + 200000)

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

Summary of changes:
 tests/init.cfg                |    3 +++
 tests/max-count-overread      |    2 +-
 tests/mb-non-UTF8-performance |    4 +---
 3 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Fri Jan 15 14:24:03 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aK9yd-0000F6-Ml
	for mharc-grep-commit@gnu.org; Fri, 15 Jan 2016 14:24:03 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46530)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aK9ya-0000EP-SD
	for grep-commit@gnu.org; Fri, 15 Jan 2016 14:24:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aK9yZ-0004bw-ND
	for grep-commit@gnu.org; Fri, 15 Jan 2016 14:24:00 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:36729)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aK9yZ-0004br-J0
	for grep-commit@gnu.org; Fri, 15 Jan 2016 14:23:59 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aK9yZ-0001OI-5f
	for grep-commit@gnu.org; Fri, 15 Jan 2016 19:23:59 +0000
Date: Fri, 15 Jan 2016 19:23:59 +0000
Message-Id: <E1aK9yZ-0001OI-5f@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-27-gba10d36
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8
X-Git-Newrev: ba10d3618d407245780e836e6a51255da145a316
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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 Jan 2016 19:24:02 -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  ba10d3618d407245780e836e6a51255da145a316 (commit)
      from  20f20a4dae4830b587fbbc5e8198bdc44b3dd3a8 (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=ba10d3618d407245780e836e6a51255da145a316


commit ba10d3618d407245780e836e6a51255da145a316
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jan 15 11:23:13 2016 -0800

    tests: omit update-copyright-tests
    
    This test does not check how 'grep' itself operates, so it is
    out of place for grep's 'make check'.  Problem reported by Sam Razavi in:
    http://bugs.gnu.org/22376
    * bootstrap.conf (avoided_gnulib_modules): Add update-copyright-tests.

diff --git a/bootstrap.conf b/bootstrap.conf
index 22f5c21..3bff7c3 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -18,6 +18,7 @@
 avoided_gnulib_modules='
   --avoid=lock-tests
   --avoid=mbrtowc-tests
+  --avoid=update-copyright-tests
 '
 
 # gnulib modules used by this package.

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

Summary of changes:
 bootstrap.conf |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sat Jan 16 02:06:03 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aKKvz-0005UO-TP
	for mharc-grep-commit@gnu.org; Sat, 16 Jan 2016 02:06:03 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47706)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aKKvx-0005UH-6x
	for grep-commit@gnu.org; Sat, 16 Jan 2016 02:06:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aKKvv-0002M7-IT
	for grep-commit@gnu.org; Sat, 16 Jan 2016 02:06:01 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:43425)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1aKKvv-0002M3-Eu
	for grep-commit@gnu.org; Sat, 16 Jan 2016 02:05:59 -0500
Received: from eggert by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <eggert@cs.ucla.edu>) id 1aKKvk-0006m3-Cd
	for grep-commit@gnu.org; Sat, 16 Jan 2016 07:05:58 +0000
Date: Sat, 16 Jan 2016 07:05:50 +0000
Message-Id: <E1aKKvk-0006m3-Cd@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-28-g68d5d03
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ba10d3618d407245780e836e6a51255da145a316
X-Git-Newrev: 68d5d036cf6d4b02f3e6a2ced750231b523efae9
From: Paul Eggert <eggert@cs.ucla.edu>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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: Sat, 16 Jan 2016 07:06:02 -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  68d5d036cf6d4b02f3e6a2ced750231b523efae9 (commit)
      from  ba10d3618d407245780e836e6a51255da145a316 (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=68d5d036cf6d4b02f3e6a2ced750231b523efae9


commit 68d5d036cf6d4b02f3e6a2ced750231b523efae9
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Fri Jan 15 23:04:23 2016 -0800

    grep: -x now supersedes -w more consistently
    
    * NEWS, doc/grep.texi (Matching Control): Mention this.
    * src/dfasearch.c (EGexecute):
    * src/pcresearch.c (Pcompile):
    Don't get confused by -w if -x is also present.
    * src/pcresearch.c (Pcompile): Remove misleading comment about
    non-UTF-8 multibyte locales, as PCRE doesn't support them.
    Calculate buffer sizes more carefully; the old method
    allocated a buffer slightly too big, seemingly due to luck.
    * tests/backref-word, tests/pcre: Add tests for this bug.

diff --git a/NEWS b/NEWS
index a0f6bbb..9de7fcb 100644
--- a/NEWS
+++ b/NEWS
@@ -32,9 +32,12 @@ GNU grep NEWS                                    -*- outline -*-
   This partly reverts the --exclude-related change in 2.22.
   [bug introduced in grep-2.22]
 
-  --line-buffer is no longer ineffective when combined with -l
+  --line-buffer is no longer ineffective when combined with -l.
   [bug introduced in grep-2.5]
 
+  -xw is now equivalent to -x more consistently, with -P and with backrefs.
+  [bug only partially fixed in grep-2.19]
+
 
 * Noteworthy changes in release 2.22 (2015-11-01) [stable]
 
diff --git a/doc/grep.texi b/doc/grep.texi
index 76769b9..8883b27 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -233,6 +233,7 @@ Similarly,
 it must be either at the end of the line
 or followed by a non-word constituent character.
 Word-constituent characters are letters, digits, and the underscore.
+This option has no effect if @option{-x} is also specified.
 
 @item -x
 @itemx --line-regexp
diff --git a/src/dfasearch.c b/src/dfasearch.c
index a330eac..e04a2df 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -363,14 +363,14 @@ EGexecute (char *buf, size_t size, size_t *match_size,
                   len = end - ptr;
                   goto assess_pattern_match;
                 }
-              /* If -w, check if the match aligns with word boundaries.
-                 We do this iteratively because:
+              /* If -w and not -x, check whether the match aligns with
+                 word boundaries.  Do this iteratively because:
                  (a) the line may contain more than one occurrence of the
                  pattern, and
                  (b) Several alternatives in the pattern might be valid at a
                  given point, and we may need to consider a shorter one to
                  find a word boundary.  */
-              if (match_words)
+              if (!match_lines && match_words)
                 while (match <= best_match)
                   {
                     regoff_t shorter_len = 0;
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 1fae94d..3fee67a 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -98,7 +98,13 @@ Pcompile (char const *pattern, size_t size)
 #else
   int e;
   char const *ep;
-  char *re = xnmalloc (4, size + 7);
+  static char const wprefix[] = "(?<!\\w)(?:";
+  static char const wsuffix[] = ")(?!\\w)";
+  static char const xprefix[] = "^(?:";
+  static char const xsuffix[] = ")$";
+  int fix_len_max = MAX (sizeof wprefix - 1 + sizeof wsuffix - 1,
+                         sizeof xprefix - 1 + sizeof xsuffix - 1);
+  char *re = xnmalloc (4, size + (fix_len_max + 4 - 1) / 4);
   int flags = (PCRE_MULTILINE
                | (match_icase ? PCRE_CASELESS : 0));
   char const *patlim = pattern + size;
@@ -120,20 +126,16 @@ Pcompile (char const *pattern, size_t size)
     error (EXIT_TROUBLE, 0, _("the -P option only supports a single pattern"));
 
   *n = '\0';
-  if (match_lines)
-    strcpy (n, "^(?:");
   if (match_words)
-    strcpy (n, "(?<!\\w)(?:");
+    strcpy (n, wprefix);
+  if (match_lines)
+    strcpy (n, xprefix);
   n += strlen (n);
 
   /* The PCRE interface doesn't allow NUL bytes in the pattern, so
      replace each NUL byte in the pattern with the four characters
      "\000", removing a preceding backslash if there are an odd
-     number of backslashes before the NUL.
-
-     FIXME: This method does not work with some multibyte character
-     encodings, notably Shift-JIS, where a multibyte character can end
-     in a backslash byte.  */
+     number of backslashes before the NUL.  */
   for (p = pattern; (pnul = memchr (p, '\0', patlim - p)); p = pnul + 1)
     {
       memcpy (n, p, pnul - p);
@@ -149,9 +151,9 @@ Pcompile (char const *pattern, size_t size)
   n += patlim - p;
   *n = '\0';
   if (match_words)
-    strcpy (n, ")(?!\\w)");
+    strcpy (n, wsuffix);
   if (match_lines)
-    strcpy (n, ")$");
+    strcpy (n, xsuffix);
 
   cre = pcre_compile (re, flags, &ep, &e, pcre_maketables ());
   if (!cre)
diff --git a/tests/backref-word b/tests/backref-word
index 557c6d8..e5b5486 100755
--- a/tests/backref-word
+++ b/tests/backref-word
@@ -9,6 +9,10 @@ for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
   out=out1-$LOC
   LC_ALL=$LOC grep -w '\(foo\) \1' exp1 > $out || fail=1
   compare exp1 $out || fail=1
+
+  LC_ALL=$LOC grep -wx '\(foo\) \1' exp1 > $out
+  test $? -eq 1 || fail=1
+  compare /dev/null $out || fail=1
 done
 
 Exit $fail
diff --git a/tests/pcre b/tests/pcre
index a9dfb4b..92e788e 100755
--- a/tests/pcre
+++ b/tests/pcre
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Ensure that with -P, \s matches a newline.
+# Simple PCRE tests.
 #
 # Copyright (C) 2001, 2006, 2009-2016 Free Software Foundation, Inc.
 #
@@ -15,4 +15,7 @@ fail=0
 echo | grep -P '\s*$' || fail=1
 echo | grep -zP '\s$' || fail=1
 
+echo '.ab' | grep -Pwx ab
+test $? -eq 1 || fail=1
+
 Exit $fail

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

Summary of changes:
 NEWS               |    5 ++++-
 doc/grep.texi      |    1 +
 src/dfasearch.c    |    6 +++---
 src/pcresearch.c   |   24 +++++++++++++-----------
 tests/backref-word |    4 ++++
 tests/pcre         |    5 ++++-
 6 files changed, 29 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sat Jan 23 05:21:20 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aMvJo-0004Nr-I4
	for mharc-grep-commit@gnu.org; Sat, 23 Jan 2016 05:21:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46640)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aMvJm-0004Iq-6W
	for grep-commit@gnu.org; Sat, 23 Jan 2016 05:21:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aMvJl-00049h-53
	for grep-commit@gnu.org; Sat, 23 Jan 2016 05:21:18 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:37953)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aMvJl-00049c-1t
	for grep-commit@gnu.org; Sat, 23 Jan 2016 05:21:17 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1aMvJk-0005v7-6M
	for grep-commit@gnu.org; Sat, 23 Jan 2016 10:21:16 +0000
Date: Sat, 23 Jan 2016 10:21:16 +0000
Message-Id: <E1aMvJk-0005v7-6M@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-29-g83df094
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 68d5d036cf6d4b02f3e6a2ced750231b523efae9
X-Git-Newrev: 83df0949c9e5cb02b86098526f97c7fb79c25a78
From: Jim Meyering <jim@meyering.net>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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: Sat, 23 Jan 2016 10:21:19 -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  83df0949c9e5cb02b86098526f97c7fb79c25a78 (commit)
      from  68d5d036cf6d4b02f3e6a2ced750231b523efae9 (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=83df0949c9e5cb02b86098526f97c7fb79c25a78


commit 83df0949c9e5cb02b86098526f97c7fb79c25a78
Author: Jim Meyering <meyering@fb.com>
Date:   Fri Jan 8 13:30:23 2016 -0800

    maint: fix typo in NEWS: s/a/an/

diff --git a/NEWS b/NEWS
index 9de7fcb..df260d7 100644
--- a/NEWS
+++ b/NEWS
@@ -7,7 +7,7 @@ GNU grep NEWS                                    -*- outline -*-
   Binary files are now less likely to generate diagnostics and more
   likely to yield text matches.  grep now reports "Binary file FOO
   matches" and suppresses further output instead of outputting a line
-  containing a encoding error; hence grep can now report matching text
+  containing an encoding error; hence grep can now report matching text
   before a later binary match.  Formerly, grep reported FOO to be
   binary when it found an encoding error in FOO before generating
   output for FOO, which meant it never reported both matching text and

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

Summary of changes:
 NEWS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Sat Jan 23 23:37:27 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aNCQZ-0004aq-Pe
	for mharc-grep-commit@gnu.org; Sat, 23 Jan 2016 23:37:27 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54805)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aNCQX-0004aE-Kl
	for grep-commit@gnu.org; Sat, 23 Jan 2016 23:37:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aNCQW-00070T-Fu
	for grep-commit@gnu.org; Sat, 23 Jan 2016 23:37:25 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:49012)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aNCQW-00070H-C3
	for grep-commit@gnu.org; Sat, 23 Jan 2016 23:37:24 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1aNCQV-0000k6-Li
	for grep-commit@gnu.org; Sun, 24 Jan 2016 04:37:23 +0000
Date: Sun, 24 Jan 2016 04:37:23 +0000
Message-Id: <E1aNCQV-0000k6-Li@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-30-ge07b248
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 83df0949c9e5cb02b86098526f97c7fb79c25a78
X-Git-Newrev: e07b248935b7a2c6c365dfb634c9deac3ea9db15
From: Jim Meyering <jim@meyering.net>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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 Jan 2016 04:37:26 -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  e07b248935b7a2c6c365dfb634c9deac3ea9db15 (commit)
      from  83df0949c9e5cb02b86098526f97c7fb79c25a78 (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=e07b248935b7a2c6c365dfb634c9deac3ea9db15


commit e07b248935b7a2c6c365dfb634c9deac3ea9db15
Author: Jim Meyering <meyering@fb.com>
Date:   Sun Jan 24 12:19:15 2016 +0800

    gnulib: update to latest

diff --git a/gnulib b/gnulib
index 271dfe3..0fce642 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 271dfe37985ff3a6e9cf9d08ab67e8ea3e239162
+Subproject commit 0fce642dc86773a562c278a93b7268bde8e6db09

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

Summary of changes:
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


From MAILER-DAEMON Thu Jan 28 19:36:29 2016
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1aOx37-0007cT-Ir
	for mharc-grep-commit@gnu.org; Thu, 28 Jan 2016 19:36:29 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37288)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aOx35-0007WD-Hw
	for grep-commit@gnu.org; Thu, 28 Jan 2016 19:36:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aOx34-0007yJ-IP
	for grep-commit@gnu.org; Thu, 28 Jan 2016 19:36:27 -0500
Received: from vcs.savannah.gnu.org ([208.118.235.72]:36464)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1aOx34-0007yD-G2
	for grep-commit@gnu.org; Thu, 28 Jan 2016 19:36:26 -0500
Received: from meyering by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <jim@meyering.net>) id 1aOx33-0006vs-Oi
	for grep-commit@gnu.org; Fri, 29 Jan 2016 00:36:26 +0000
Date: Fri, 29 Jan 2016 00:36:25 +0000
Message-Id: <E1aOx33-0006vs-Oi@vcs.savannah.gnu.org>
To: grep-commit@gnu.org
Subject: grep branch, master, updated. v2.22-31-g8b6a670
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e07b248935b7a2c6c365dfb634c9deac3ea9db15
X-Git-Newrev: 8b6a670569f1c99e63868c2a473490ddc5ec53a0
From: Jim Meyering <jim@meyering.net>
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.14
Precedence: list
Reply-To: bug-grep@gnu.org
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, 29 Jan 2016 00:36:28 -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  8b6a670569f1c99e63868c2a473490ddc5ec53a0 (commit)
      from  e07b248935b7a2c6c365dfb634c9deac3ea9db15 (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=8b6a670569f1c99e63868c2a473490ddc5ec53a0


commit 8b6a670569f1c99e63868c2a473490ddc5ec53a0
Author: Jim Meyering <meyering@fb.com>
Date:   Thu Jan 28 13:23:03 2016 -0800

    gnulib: update to latest

diff --git a/gnulib b/gnulib
index 0fce642..7757cc8 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 0fce642dc86773a562c278a93b7268bde8e6db09
+Subproject commit 7757cc8cf3de8b1515af95709d3c30c88d51f459

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

Summary of changes:
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
grep


