<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] warning cleared



On Tue, 20 Sep 2005, Vincent Lefevre wrote:

On 2005-09-20 08:19:31 -0500, David Champion wrote:
* On 2005.09.20, in <20050920081219.GB10503@xxxxxxxxxxxxx>,
*       "Vincent Lefevre" <vincent@xxxxxxxxxx> wrote:
to an unsigned char or EOF. You need to cast to an unsigned char
first (you can then cast to an int, but this is useless, and the
compiler shouldn't complain):

As you like.  I wrote the code being patched, and happen to know that
casting to int is a correct solution. :)

If the string can contain a non-ASCII character, then it isn't correct
and would lead to an undefined behavior on machines with signed chars.

What you meant to point out is that the ctype macros are not defined for
negative values other than -1

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net