bug-grep
[Top][All Lists]
Advanced

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

Re: [bug #33198] Incorrect bracket expression when parsing in ru_RU.KOI8


From: arnold
Subject: Re: [bug #33198] Incorrect bracket expression when parsing in ru_RU.KOI8-R (Russian locale)
Date: Sun, 8 May 2011 08:30:51 GMT

Jim et al,

Hi.

> diff --git a/src/dfa.c b/src/dfa.c
> index f2064ed..b41cbb6 100644
> --- a/src/dfa.c
> +++ b/src/dfa.c
> @@ -573,7 +573,8 @@ setbit_case_fold (
>    else
>      {
>  #if MBS_SUPPORT
> -      if (wctob ((unsigned char)b) == b)
> +      int b2 = wctob ((unsigned char) b);
> +      if (b2 == EOF || b2 == b)
>  #endif
>          setbit (b, c);
>      }

Any chance this could please be recast as

        int b2 = wctob((unsigned char) b);
        if (b2 == EOF || b2 == b)
        ...

The reason is that gawk still supports C90-only compilers (I have users
wit such compilers) and the declaration after executable code won't fly
in that case.

This also makes only one call to wctob() instead of two. :-)

Thanks,

Arnold



reply via email to

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