ntdll: rtlstr.c: Implement checking for control characters inRtlIsTextUnicode [try 2]

Zac Brown zac at zacbrown.org
Thu Jun 19 15:01:35 CDT 2008


Rolf Kalbermatter wrote:
> Dan Kegel [mailto:dank at kegel.com] 
>  
>> e.g.
>>
>>     if (flags & IS_TEXT_UNICODE_CONTROLS)
>> 	for (i = 0; i < len; i++)
>>            switch (s[i]) {
>>            case '\t':
>>            case '\n':
>>            case 'r':
>>            case 0x20:
>>                 out_flags |= IS_TEXT_UNICODE_CONTROLS;
>>                 goto done;
>>            default:
>>            }
>>     }
>>     done:
> 
> Shouldn't a break instead of the goto work too?
> 
> Rolf Kalbermatter
> 
> 
> 

A break will only exit the switch statement which is pointless since we don't 
care about the rest of the string if we find a control character.

I made that mistake in my third try of the patch, didn't even think about it 
until Dan mentioned somethign to me.

Hopefully the 4th try will actually be decent.

-Zac



More information about the wine-devel mailing list