When to use fflush()?

Karl Heuer karl at haddock.ima.isc.com
Sat Sep 2 08:48:54 AEST 1989


In article <10882 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>Use fflush() whenever you want to make sure that the buffers are forced out.

I've forgotten whether this issue was ever resolved: what should happen if the
output stream is a VMS record-oriented file?  If the currently buffered output
contains no newlines, is it appropriate for fflush() to do nothing, and return
success?

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint
(The problem is that, if I'm not mistaken, a `line' in such a file consists of
a record with a byte-count prefix, and no actual newline character.)



More information about the Comp.lang.c mailing list