On 10/09/2011 09:00 PM, Aharon Robbins wrote:
Hi.

Having variables grep_mb_cur_max and dfa_mb_cur_max (separate for the
reasons Arnold explained) would work, but it would make it impossible
for the compiler to throw away the multibyte code when MBS_SUPPORT is zero.

Why?

#if MBS_SUPPORT
int greb_mb_cur_max = MB_CUR_MAX; /* or initialize it in main */
#else
#define grep_mb_cur_max 1
#endif

Hmmm.  Maybe I should try a proof-of-concept for this in gawk... :-)

I did that and it works ok. At least with GCC. :-)

Patches are welcome. :)

Paolo


Reply via email to