summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-04-01 18:05:37 +0200
committerJim Meyering <meyering@redhat.com>2011-09-16 10:30:38 +0200
commit33cc67e4fa32056e4b480ee0e221b0e501688f7e (patch)
tree698daee7592686591b54a2d67cc2ba2c5e4afdec
parentdd8b2045018dd9b3fcbdb273231e4f517a4a520a (diff)
downloadgrep-33cc67e4fa32056e4b480ee0e221b0e501688f7e.tar.gz
maint: dfa: convert #if-MBS_SUPPORT (parse_bracket_exp)
* src/dfa.c (parse_bracket_exp): Use regular "if", not #if MBS_SUPPORT.
-rw-r--r--src/dfa.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/dfa.c b/src/dfa.c
index 4c0c2786..9efbd605 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1019,34 +1019,33 @@ parse_bracket_exp (void)
colon_warning_state |= (c == ':') ? 2 : 4;
-#if MBS_SUPPORT
- if (MB_CUR_MAX > 1)
+ if (!MBS_SUPPORT || MB_CUR_MAX == 1)
{
- if (case_fold && iswalpha(wc))
- {
- wc = towlower(wc);
- if (!setbit_wc (wc, ccl))
- {
- REALLOC_IF_NECESSARY(work_mbc->chars, chars_al,
- work_mbc->nchars + 1);
- work_mbc->chars[work_mbc->nchars++] = wc;
- }
-#ifdef GREP
- continue;
-#else
- wc = towupper(wc);
-#endif
- }
+ setbit_case_fold_c (c, ccl);
+ continue;
+ }
+
+ if (case_fold && iswalpha(wc))
+ {
+ wc = towlower(wc);
if (!setbit_wc (wc, ccl))
{
REALLOC_IF_NECESSARY(work_mbc->chars, chars_al,
work_mbc->nchars + 1);
work_mbc->chars[work_mbc->nchars++] = wc;
}
- }
- else
+#ifdef GREP
+ continue;
+#else
+ wc = towupper(wc);
#endif
- setbit_case_fold_c (c, ccl);
+ }
+ if (!setbit_wc (wc, ccl))
+ {
+ REALLOC_IF_NECESSARY(work_mbc->chars, chars_al,
+ work_mbc->nchars + 1);
+ work_mbc->chars[work_mbc->nchars++] = wc;
+ }
}
while ((
#if MBS_SUPPORT