[klibc] isspace() and other ctype.h functions

Greg KH greg at kroah.com
Tue Nov 11 23:53:17 PST 2003


On Tue, Nov 11, 2003 at 11:46:21PM -0800, H. Peter Anvin wrote:
> >In looking at the __ctypes[] array, it is 0 based, so all of the +1
> >array changes in ctype.h should be removed.  Or am I missing something
> >here?
> >
> 
> Yes, the first element should be -1 == EOF.  However, the array starts:
> 
> const unsigned char __ctypes[257] = {
>   0,                            /* EOF */
>   0,                            /* control character */
>   0,                            /* control character */
>   0,                            /* control character */
>   0,                            /* control character */
>   0,                            /* control character */
>   0,                            /* control character */
>   0,                            /* control character */
>   __ctype_space,                /* BS */
> 
> ... there is one too few of the middle lines; I'll check that in right away.

Ah, that makes more sense.  Thanks for looking at this.

I'll resync with the cvs tree and post patches here for the new
functions when I get a chance.

thanks,

greg k-h


More information about the klibc mailing list