Re: yucky patch

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 12 Feb 1999 09:05:04 +0100

David Luyer wrote:

> you shouldn't assume this luxury though.
>
> Basically, from this comment, it looks like you should force it to
> (unsigned char).

As I said, the functions are only defined for EOF and unsigned char. All
other values are undefined (and may even crash on some systems...).

In fact it is a good practice to have all strings of type unsigned char.
It is very easy to get confused when someone uses national (8 bit)
characters otherwise.

It is a pity that char by default is unsigned when almost no one thinks
of characters as being signed. Some compilers (including gcc) has a flag
for turning char into unsigned, but this is compiler specific and should
not be relied on in a portable application.

/Henrik
Received on Tue Jul 29 2003 - 13:15:57 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:04 MST