summaryrefslogtreecommitdiff
path: root/src/pcresearch.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-20 08:56:06 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-20 18:06:22 -0800
commit214be13d33a26ab45231afe8e983d9a174aae282 (patch)
tree8eca98d5f11dee7d6cbb49906e814581b3e31be3 /src/pcresearch.c
parent75bca3ca0a6ea87a66531ab7c0f8859e1d6c4300 (diff)
downloadgrep-214be13d33a26ab45231afe8e983d9a174aae282.tar.gz
grep: simplify matcher configuration
* src/grep.c (matcher, compile): Remove static vars. (compile_fp_t): Now takes a 3rd syntax argument. (Gcomppile, Ecompile, Acompile, GAcompile, PAcompile): Remove. (struct matcher): Now nameless, since it is used only once. Make 'name' a bit shorter. New member 'syntax'. (matchers): Initialize it, and change removed functions to GEAcompile. (F_MATCHER_INDEX, G_MATCHER_INDEX): New constants. (setmatcher): New arg MATCHER, and return new matcher index. Avoid unnecessary call to strcmp. (main): Keep matcher as a local int, not a global pointer. * src/kwsearch.c (Fcompile): * src/pcresearch.c (Pcompile): Ignore the 3rd syntax argument.
Diffstat (limited to 'src/pcresearch.c')
-rw-r--r--src/pcresearch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 108baff8..0e34861d 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -88,7 +88,7 @@ static int empty_match[2];
#endif
void
-Pcompile (char const *pattern, size_t size)
+Pcompile (char const *pattern, size_t size, reg_syntax_t ignored)
{
#if !HAVE_LIBPCRE
die (EXIT_TROUBLE, 0,