Rolf Kalbermatter wrote:
Dan Kegel [mailto:dank@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