diff options
author | Jim Meyering <meyering@redhat.com> | 2010-04-01 18:05:37 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-09-16 10:30:38 +0200 |
commit | 33cc67e4fa32056e4b480ee0e221b0e501688f7e (patch) | |
tree | 698daee7592686591b54a2d67cc2ba2c5e4afdec | |
parent | dd8b2045018dd9b3fcbdb273231e4f517a4a520a (diff) | |
download | grep-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.c | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -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 |