Paolo Bonzini wrote: > 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. :)
Hi Paolo, Arnold, Thanks, but actually, I would not like a dfa.c patch that adds a new global variable like that (even if it were "static"). Why avoid redefining MB_CUR_MAX at all? The only reason I've heard is that "it might cause problems." Yet I know of no system on which it does. Of course, if there is a modern system (at least not museum piece) for which the redefinition causes trouble, please report the details.
