Mike Barcroft <[EMAIL PROTECTED]> writes:
> Andrey A. Chernov <[EMAIL PROTECTED]> writes:
> > On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote:
> > > +         if ((len == 0) || !isspace(buf[len - 1])) {
> > Must be isspace((unsigned char)....)
> Why and where can I find documentation about this?

If buf[len - 1] is a char (which is signed), non-ASCII characters will
be sign-extended unless you cast to unsigned char.  It so happens that
it doesn't make any difference for isspace() because in the character
sets we use, no space characters have the high bit set, but strictly
speaking you still need the cast.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to