tech-userlevel archive

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

Re: using the interfaces in ctype.h



On Mon, 21 Apr 2008, Greg A. Woods; Planix, Inc. wrote:
> Besides, the standards don't, so far as I can tell, require
> implementations to always return zero for all the is*() APIs when EOF
> is passed to them.  This whole "the mask prevents the implementation
> from distinguishing between 0xFF and EOF" claim is completely bogus.
> It just doesn't matter what these functions return when passed EOF --
> their result in that case is undefined anyway.

Since you are the only person who appears to believe the above claims,
please justify them with detailed references to sections in the
C99 standard.

> I guess the on additional point I should make is that the use of "(_ctype_ 
> + 1)" as the start of the array can be done away with if the index is 
> masked by ~(~0 << CHAR_BIT).  That might even speed up these macros, at 
> least on machines which can do the mask faster than they can add one to a 
> pointer.  :-)

The above claim has been refuted several times.  I won't do it again.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index