summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-01 17:15:44 +0200
committerJim Meyering <meyering@redhat.com>2011-09-16 10:30:38 +0200
commitebf1ca7ee208c789184099391adcce76471041f1 (patch)
tree13666526df9f0ac1c750a351cf43ddd86a19c62b /src
parent1fb468215e69babcd55f784c5d3b11305f4078de (diff)
downloadgrep-ebf1ca7ee208c789184099391adcce76471041f1.tar.gz
maint: convert #if-MBS_SUPPORT (EGexecute)
* src/dfasearch.c (EGexecute): Remove in-function #if MBS_SUPPORT.
Diffstat (limited to 'src')
-rw-r--r--src/dfasearch.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/dfasearch.c b/src/dfasearch.c
index 7fd57c47..68c19664 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -214,8 +214,7 @@ EGexecute (char const *buf, size_t size, size_t *match_size,
int backref, start, len, best_len;
struct kwsmatch kwsm;
size_t i, ret_val;
-#if MBS_SUPPORT
- if (MB_CUR_MAX > 1)
+ if (MBS_SUPPORT && MB_CUR_MAX > 1)
{
if (match_icase)
{
@@ -227,7 +226,6 @@ EGexecute (char const *buf, size_t size, size_t *match_size,
buf = case_buf;
}
}
-#endif /* MBS_SUPPORT */
mb_start = buf;
buflim = buf + size;
@@ -255,13 +253,14 @@ EGexecute (char const *buf, size_t size, size_t *match_size,
--beg;
if (kwsm.index < kwset_exact_matches)
{
-#if MBS_SUPPORT
+ if (!MBS_SUPPORT)
+ goto success;
+
if (mb_start < beg)
mb_start = beg;
if (MB_CUR_MAX == 1
|| !is_mb_middle (&mb_start, match, buflim,
kwsm.size[0]))
-#endif
goto success;
}
if (dfaexec (dfa, beg, (char *) end, 0, NULL, &backref) == NULL)