[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] grep: prepare for libification of *search.c
From: |
Paolo Bonzini |
Subject: |
[PATCH 8/9] grep: prepare for libification of *search.c |
Date: |
Fri, 19 Mar 2010 12:36:51 +0100 |
* src/dfasearch.c (Ecompile): Remove.
* src/esearch.c: Place it here...
* src/gsearch.c: ... and here.
---
src/dfasearch.c | 6 ------
src/esearch.c | 6 ++++++
src/gsearch.c | 6 ++++++
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/dfasearch.c b/src/dfasearch.c
index ef9404b..791a5ed 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -195,12 +195,6 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t
syntax_bits)
free(motif);
}
-static void
-Ecompile (char const *pattern, size_t size)
-{
- return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
-}
-
static size_t
EGexecute (char const *buf, size_t size, size_t *match_size, char const
*start_ptr)
{
diff --git a/src/esearch.c b/src/esearch.c
index 8c749c8..b1be2a7 100644
--- a/src/esearch.c
+++ b/src/esearch.c
@@ -1,5 +1,11 @@
#include "dfasearch.c"
+static void
+Ecompile (char const *pattern, size_t size)
+{
+ return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
+}
+
struct matcher const matchers[] = {
{ "egrep", Ecompile, EGexecute },
{ NULL, NULL, NULL },
diff --git a/src/gsearch.c b/src/gsearch.c
index 07ceba6..8eee952 100644
--- a/src/gsearch.c
+++ b/src/gsearch.c
@@ -10,6 +10,12 @@ Gcompile (char const *pattern, size_t size)
}
static void
+Ecompile (char const *pattern, size_t size)
+{
+ return GEAcompile (pattern, size, RE_SYNTAX_POSIX_EGREP);
+}
+
+static void
Acompile (char const *pattern, size_t size)
{
return GEAcompile (pattern, size, RE_SYNTAX_AWK);
--
1.6.6.1
- Re: [PATCH 2/9] grep: remove one #ifdef, (continued)
- [PATCH 3/9] grep: change struct matcher termination, Paolo Bonzini, 2010/03/19
- [PATCH 4/9] grep: make egrep/fgrep use struct matcher, Paolo Bonzini, 2010/03/19
- [PATCH 5/9] grep: eliminate {COMPILE,EXECUTE}_{RET,ARGS,FCT}, Paolo Bonzini, 2010/03/19
- [PATCH 6/9] grep: remove one #ifdef, Paolo Bonzini, 2010/03/19
- [PATCH 8/9] grep: prepare for libification of *search.c,
Paolo Bonzini <=
- [PATCH 9/9] grep: libify *search.c, Paolo Bonzini, 2010/03/19
- [PATCH 7/9] grep: split search.c, Paolo Bonzini, 2010/03/19
- Re: [PATCH 0/9] remove most {,E,F}GREP_PROGRAM occurrences, Jim Meyering, 2010/03/19
- Re: [PATCH 0/9] remove most {,E,F}GREP_PROGRAM occurrences, Jim Meyering, 2010/03/19
- Re: [PATCH 0/9] remove most {,E,F}GREP_PROGRAM occurrences, Jim Meyering, 2010/03/19