(e-mail address removed) wrote:
defined as EOF (don't
even speculate about it's value, while it's often -1 that's not
necessary and 1725 would also do)
No it would not. EOF must be negative.
From ISO/IEC 9899:1999 (E) 7.19.1/3 :
--------------------------------------------------------------
EOF
which expands to an integer constant expression, with type int
and a negative value, that is returned by several functions to
indicate end-of-file, that is, no more input from a stream
--------------------------------------------------------------
Anyway, the value 1725 could easily be valid character value
for implementations whose byte size can accomodate it. Also,
if a member of the basic execution character set is stored in
a char object, its value is guaranteed to be positive.
(6.2.5/3).
-Mike