Date: Wed, 4 Feb 1998 21:13:28 -0500 (EST) Message-Id: <199802050213.VAA14414@delorie.com> From: DJ Delorie To: eliz AT is DOT elta DOT co DOT il CC: djgpp-workers AT delorie DOT com In-reply-to: (message from Eli Zaretskii on Wed, 4 Feb 1998 19:47:00 +0200 (IST)) Subject: Re: char != unsigned char... sometimes, sigh Precedence: bulk > 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).