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

ftell Gets the file position indicator.<br />

#include <br />

#include <br />

long ftell(<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

The ftell() function obtains the current value of the position indicator for the<br />

stream pointed to by stream. This value can be passed to fseek() as an input<br />

parameter.<br />

For a binary stream, the position indicator is the number of characters from the<br />

beginning of the file. For a text stream, the position indicator contains unspecified<br />

information, usable by fseek function.<br />

If stream refers to an I/O device, this function does nothing and returns a zero.<br />

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

If successful, this function returns the current file position indicator. It returns EOF<br />

if an error occurs, and sets the errno.<br />

Refer to Appendix B.<br />

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

3

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

Saved successfully!

Ooh no, something went wrong!