Date: Wed, 18 Dec 2024 19:45:36 +0100
From: Roland Illig <[email protected]>
Message-ID: <[email protected]>
| > You need to first test for EOF but then cast any non-EOF characters to
| > unsigned char to be portable:
|
| That's wrong. The CAVEATS section explicit allows character I/O operations:
Yes, passing EOF (as an int) to these macros/functions is permitted, there
is no need to test for it as Martin's sample code did.
The problem case is when the return from [f]getc() is stored into a
char type variable, and then that variable is passed to the <ctype.h>
macros/functions - that doesn't work. As long as only int variables
are used, it is all OK.
kre