[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] unicode: fix lineedit navigation over wide and combining
From: Tomas Heinrich <heinrich.tomas () gmail ! com>
Date: 2010-04-27 19:45:41
Message-ID: 4BD73EE5.4070808 () gmail ! com
[Download RAW message or body]
On 04/27/2010 06:49 AM, Rob Landley wrote:
> On Wednesday 21 April 2010 16:22:47 Tomas Heinrich wrote:
>> }
>> +#if ENABLE_UNICODE_SUPPORT
>> + c = validate_wc(c);
>> +#endif
>> +#if ENABLE_UNICODE_COMBINING_WCHARS || ENABLE_UNICODE_WIDE_WCHARS
>> + cmdedit_x += wcwidth(c);
>> +#else
>> + cmdedit_x++;
>> +#endif
>> #if ENABLE_FEATURE_NONPRINTABLE_INVERSE_PUT
>
> No need for #ifdefs
>
> if (ENABLE_UNICODE_SUPPORT) c = validate_wc(c);
> if (ENABLE_UNICODE_COMBINING_WCHARS || ENABLE_UNICODE_WIDE_WCHARS)
> cmedit_x += wcwidth(c);
> else cmdedit_x++;
>
> if (0) drops out due to the compiler's dead code elimination. And C99
> requires that (0 || 0) gets simplified at compile time to (0)...
You're right. Thanks.
Tomas
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic