[klibc] isspace() and other ctype.h functions
Greg KH
greg at kroah.com
Tue Nov 11 23:14:25 PST 2003
Hm, finally subscribed here, forgot to...
Anyway, I'm using klibc in udev and have added some needed functions
(like ftruncate and vsyslog). Should I post the patches here before
commiting them to the cvs tree?
Also, it looks like ctype.h has a off-by-one bug. isspace(' ') returns
0 right now, but if you change the function from:
__ctype_inline int isspace(int __c)
{
return __ctypes[__c+1] & __ctype_space; */
}
to
__ctype_inline int isspace(int __c)
{
return __ctypes[__c] & __ctype_space; */
}
things start working again :)
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?
I can also check in this change if no one minds.
thanks,
greg k-h
More information about the klibc
mailing list