summaryrefslogtreecommitdiff
path: root/src/kwsearch.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/kwsearch.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/kwsearch.c')
-rw-r--r--src/kwsearch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kwsearch.c b/src/kwsearch.c
index c3e69b39..72759735 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -34,7 +34,7 @@ wordchar (wint_t wc)
static kwset_t kwset;
void
-Fcompile (char const *pattern, size_t size)
+Fcompile (char const *pattern, size_t size, reg_syntax_t ignored)
{
size_t total = size;