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.

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

fwrite Writes to a stream.<br />

#include <br />

#include <br />

size_t fwrite(<br />

const void *ptr, /* output buffer */<br />

size_t size, /* item size */<br />

size_t nmemb, /* item count */<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

The fwrite() function writes, from the array pointed to by ptr, up to nmemb<br />

elements whose size is specified by size to the stream pointed to by stream.<br />

The file position indicator for the stream (if defined) is advanced by the number of<br />

characters successfully written. If an error occurs, the resulting value of the file<br />

position indicator for the stream is indeterminate.<br />

ptr Points to the output buffer.<br />

size Specifies the size of each item to write.<br />

nmemb Specifies the number of items to write.<br />

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

This function returns the number of items written. If an error occurs, errno is set.<br />

Refer to Appendix B.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 3-67<br />

3

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

Saved successfully!

Ooh no, something went wrong!