problem with fread/fwrite

Karl Heuer karl at ima.isc.com
Wed Nov 14 12:43:52 AEST 1990


In article <3337 at bruce.cs.monash.OZ.AU> cechew at bruce.cs.monash.OZ.AU (Earl Chew) writes:
>The main obstacle to switching between reads and writes is:
>1. the behaviour of early implementations of stdio
>2. subsequent casting of (1) in concrete by ANSI-C

X3J11 did not freeze this behavior.  They declined to correct it (and quite
properly so, if there was no existing practice), but the fix is a valid
conforming extension.  It would even be possible for some other standard, like
POSIX, to require it.

>I am unsure whether ANSI-C prohibits stdio implementations from automatic
>switching, but it clear that if such a feature were to be implemented, its
>use would make the application non-conforming.

True (as does, say, the use of "isatty()").  But if the vendors add it now, it
might be required behavior by the time C-2001 is done.

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list