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> fgetc<br />

fgetc Gets a character from a stream.<br />

#include <br />

#include <br />

int fgetc(<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

The fgetc() function reads the next character, as an unsigned char converted to<br />

an int, from the input stream pointed to by stream and advances the associated<br />

file position indicator for the stream, if defined. It is operationally equivalent to the<br />

getc function.<br />

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

This function returns the character that is read from the stream. If the end-of-file<br />

condition is detected, the stream’s end-of-file indicator is set and EOF is returned. If<br />

a read error occurs, the stream's error indicator is set, EOF is returned, and errno<br />

is set.<br />

Refer to Appendix B.<br />

Callable From<br />

■ Task<br />

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

3

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

Saved successfully!

Ooh no, something went wrong!