From 8db86d864616316ac534d47c0a876c45c1aaeebd Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka Date: Thu, 23 Oct 2014 07:50:15 +0900 Subject: [PATCH 2/2] grep: change caller for previous change * (src/dfasearch.c) GEAcompile: Use bool for boolean. --- src/dfasearch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dfasearch.c b/src/dfasearch.c index 77b4e3e..d667470 100644 --- a/src/dfasearch.c +++ b/src/dfasearch.c @@ -199,7 +199,7 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits) motif = NULL; dfa = dfaalloc (); - dfacomp (pattern, size, dfa, 1); + dfacomp (pattern, size, dfa, true); kwsmusts (); free(motif); @@ -287,8 +287,8 @@ EGexecute (char const *buf, size_t size, size_t *match_size, /* Keep using the superset while it reports multiline potential matches; this is more likely to be fast than falling back to KWset would be. */ - while ((next_beg = dfaexec (superset, dfa_beg, (char *) end, 1, - &count, NULL)) + while ((next_beg = dfaexec (superset, dfa_beg, (char *) end, + true, &count, NULL)) && next_beg != end && count != 0) { @@ -307,7 +307,8 @@ EGexecute (char const *buf, size_t size, size_t *match_size, } /* Try matching with DFA. */ - next_beg = dfaexec (dfa, dfa_beg, (char *) end, 0, &count, &backref); + next_beg = dfaexec (dfa, dfa_beg, (char *) end, false, &count, + &backref); /* If there's no match, or if we've matched the sentinel, we're done. */ -- 2.1.1