INtime SDK Help
fflush

Flushes a buffered stream (has no effect on an unbuffered stream).

#include <stdio.h>

int fflush (FILE *stream);

Parameters

stream
Pointer to FILE structure.

Remarks

If the file associated with stream is open for output, fflush writes the contents of the buffer to the file. If stream is open for input, fflush clears the contents of the buffer.

The stream remains open after the call.

Buffers are automatically flushed when they are full, when stream is closed, or when a program terminates normally without closing stream.

Return Values

0 (zero), meaning one of these occurred:
  • Buffer successfully flushed.
  • Stream has no buffer.
  • Stream is open only for reading.
Success.
EOF.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/stdio.h stdio.h clib.lib

See Also

fclose, flushall, setbuf