search for: __ctype_space

Displaying 2 results from an estimated 2 matches for "__ctype_space".

2003 Nov 11
4
isspace() and other ctype.h functions
...ike 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...
2003 Nov 24
1
[PATCH] fix off-by-one correction in ctypes
...urn __ctypes[__c+1] & __ctype_print; + return __ctypes[__c] & __ctype_print; } __ctype_inline int ispunct(int __c) { - return __ctypes[__c+1] & __ctype_punct; + return __ctypes[__c] & __ctype_punct; } __ctype_inline int isspace(int __c) { - return __ctypes[__c+1] & __ctype_space; + return __ctypes[__c] & __ctype_space; } __ctype_inline int isupper(int __c) { - return __ctypes[__c+1] & __ctype_upper; + return __ctypes[__c] & __ctype_upper; } __ctype_inline int isxdigit(int __c) { - return __ctypes[__c+1] & __ctype_xdigit; + return __ctypes[__c...