Paolo Bonzini wrote:
> From: Norihirio Tanaka <[email protected]>
>
> Unfortunately, using wchar.h unconditionally would not be okay for gawk.
> Until Arnold is prodded strongly enough, we need some slightly ugly
> hacks.

Now that we've sync'd with gawk,
it's up to him to decide if and how to follow.
I'm happy to defer dfa.c clean-up on "master" for a few days
while we ensure that 2.6.x has stabilized, but going forward,
dfa.c will jump whole-heartedly onto the gnulib bandwagon.

> I think MBS_SUPPORT should become a configure-time option now that
> gnulib is in use (because it will always be on otherwise).  There is
> still value in removing the expensive multibyte support from src/dfa.c
> if only C-locale matching is interesting.  Its implementation can
> also be simplified to something like:
>
>     #if MBS_SUPPORT
>     #define GREP_MB_CUR_MAX MB_CUR_MAX
>     #else
>     #define GREP_MB_CUR_MAX 1
>     #endif
>
> Anyway, in the meanwhile this patch fixes the bitrot; with !MBS_SUPPORT
> three tests are skipped and none is failed.
>
> * src/dfa.c (cur_mb_len): Initialize to 1 and always make it available.
> (setbit_case_fold): Do not use wint_t in prototype if !MBS_SUPPORT.
> (parse_bracket_exp): Fix compilation with !MBS_SUPPORT.
> * src/kwsearch.c (kwsinit): Do not use mbtolower and MB_CUR_MAX
> if !MBS_SUPPORT.
> * src/searchutils.c (kwsinit): Do not refer to MB_CUR_MAX if !MBS_SUPPORT.
>
> * tests/char-class-multibyte: Skip if UTF-8 matching does not work.
> * tests/fmbtest.sh: Likewise.

Thanks.
This looks fine now.  As soon as you push it
I'll make a snapshot, and then (maybe in 5-6 hrs), a release.


Reply via email to