bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08/34] maint: dfa: convert #if-MBS_SUPPORT (dfaoptimize, dfac


From: Jim Meyering
Subject: Re: [PATCH 08/34] maint: dfa: convert #if-MBS_SUPPORT (dfaoptimize, dfacomp)
Date: Thu, 15 Sep 2011 14:21:19 +0200

Paolo Bonzini wrote:

> On 09/15/2011 12:27 PM, Jim Meyering wrote:
>> -  for (i = 0; i<  d->tindex; ++i)
>> +  if (MBS_SUPPORT)
>>       {
>> -      switch(d->tokens[i])
>> +      unsigned int i;
>> +      if (!using_utf8())
>> +        return;
>
> As an additional cleanup, you can make using_utf8() return always
> false if !MBS_SUPPORT.

using_utf8 does that already:

static inline int
using_utf8 (void)
{
  static int utf8 = -1;
  if (utf8 == -1)
    {
#if defined HAVE_LANGINFO_CODESET && defined MBS_SUPPORT
      utf8 = (STREQ (nl_langinfo (CODESET), "UTF-8"));
#else
      utf8 = 0;
#endif
    }

  return utf8;
}


> This lets you clean up dfa_optimize further.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]