www.delorie.com/djgpp/bugs/show.cgi | search |
Hello, It seems there is a bug in isspace() and other macros defined in ctype.ha. isspace() returns a nonzero value for a lot of characters that are not whitespaces. Changing all (int) in ctype.ha to (unsigned int) should fix the problem. Are the funtion version of these macros also affected? Theera.
Asking the bug reporter in private Email, I confirmed that it's not a library bug, but incorrect usage of isspace() that caused the problem. In a nutshell: never call the <ctype.h> functions/macros with a char or signed char argument. It *must* be casted to unsigned char, instead.
webmaster | delorie software privacy |
Copyright © 2010 by DJ Delorie | Updated Jul 2010 |