Mail Archives: djgpp-workers/1998/02/04/21:13:32
> This thread was born out of a concern that our ctype functions don't
> support EOF. ANSI C requires this support. Knowing that funny things
> will happen in this case doesn't seem to help a bit when we face the sad
> conclusion that our libc is not fully compliant with the ANSI C standard.
OK, then, how do we fix it? Is there ever a case where the is*()
functions/macros *care* if it's EOF or 0xff? The only ones I know of
are tolower/toupper, which return 0 for EOF (funny, toupper/tolower
return *unsigned* char!). If we change that to return 0xff for EOF,
then it won't matter if EOF==0xff, and we can just mask the value
we're given with 0xff and be done with it (not even add 1).
- Raw text -