06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

fflush pREPC+ <strong>System</strong> <strong>Calls</strong><br />

fflush Flushes the buffer associated with an open stream.<br />

#include <br />

#include <br />

int fflush(<br />

FILE *stream /* stream pointer */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

The fflush() function writes any unwritten, buffered data associated with the<br />

stream pointed to by stream to the file or I/O device. An error is returned if the<br />

stream has not been opened for write or update. If stream is a null pointer, the<br />

fflush() function performs the flushing action on all the streams open for write or<br />

update.<br />

stream Points to an open pREPC+ stream.<br />

This function returns 0 if successful or EOF on error. If an error occurs, errno is<br />

set.<br />

Refer to Appendix B.<br />

1. If the write is to an I/O device, fflush() calls the pSOS+ I/O call<br />

de_write().<br />

2. If the write is to a disk file, fflush() calls the pHILE+ call write_f().<br />

Callable From<br />

■ Task<br />

3-34 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!