On Wed, Sep 02, 2009 at 09:08:09AM +0200, Simon L. Nielsen wrote:
> > Log:
> > Use (unsigned char) cast for ctype macro
> Acording to the manual page and the C standard book I have, isdigit()
> takes an int for an argument, so why change this?
Not exactly that. From our manual page:
"The value of the argument must be representable as an unsigned char or
the value of EOF."
Signed char (automatically casted to int in expression even without direct
(int) cast) passed to any ctype macro potentically may cause a lot of
problems, such as: incorrect char class detection or even core dump in
This is due to automatic sign extension of 8bit (if present).