Mail Archives: djgpp-workers/1998/02/12/06:33:26
I wrote:
> Pro's:
> ------
> - EOF is an element of the 'signed char' range which means that no
> matter what trickery is applied, only 256 distinct values can be
> represented of which EOF is one. This has as a consequence that locales
> that have a real character defined for value (char)255 (i.e. EOF) cannot
> be supported by ANY is* macro's, no matter how smart implemented. Those
> locales are non-fictitious. The 'unsigned char' range is completely
> distinct from EOF, which makes it much easier to implement a optimal
> performing library.
The only reason AFAIK that the Standard Committee decided that real
characters should lay in the 'unsigned char' is just because of this EOF
that needs to be a different value. This makes 'unsigned char' a better
choice for 'char' by default, even when NOT considering the possible
consequences.
--
\ Vik /-_-_-_-_-_-_/
\___/ Heyndrickx /
\ /-_-_-_-_-_-_/
- Raw text -