This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] Avoid table lookup in isascii, isxdigit.


On 04/12/2013 11:43 PM, Rich Felker wrote:
> Then make it ((unsigned)(int)(c)-'0'<10).

On further thought, that's dubious too.
An implementation is required to diagnose a call
like 'isdigit ("")' but the above implementation
wouldn't necessarily do that.

I think OndÅej's original implementation should work fine.
(As a style issue, I prefer to omit the unnecessary parentheses,
though, and I don't understand why the change added them.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]