Thanks for looking into this. Unfortunately the combination of the two
patches causes "make check" to fail, because it reintroduces a titlecase
bug. I can draft a further patch for that, but in the meantime can you
look at a few other things?
First, why does the first patch add those four using_utf8 calls to
parse_bracket_exp? Isn't that optimization valid regardless of whether
the multibyte encoding is UTF-8?
Second, the comment "UTF-8 allows treating a simple, non-inverted MBCSET
like a CSET." no longer seems to match the code, since addtok no longer
invokes using_utf8.
Third, could you please draft a proper commit message? The format is
something like this:
grep: minor tuning for mb_case_map_apply
* src/kwsearch.c (mb_case_map_apply): Avoid unnecessary widening of
size_t to intmax_t. Avoid unnecessary reinitialization of k.
That is, a first line of the form "program: short description". Then an
empty line. Then a ChangeLog entry in standard GNU format.
I'll take a look at the second patch later.