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.

pHILE+ <strong>System</strong> <strong>Calls</strong> read_f<br />

read_f <strong>Read</strong>s from a file.<br />

#include <br />

unsigned long read_f(<br />

unsigned long fid, /* file identifier */<br />

void *buffer, /* input buffer */<br />

unsigned long bcount, /* byte read count */<br />

unsigned long *tcount /* read count status */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

Return Value<br />

All volume types.<br />

read_f() reads data from a file, beginning at the current position of the<br />

connection's L_ptr.<br />

After read_f(), the file's L_ptr is updated to point to the byte after the last byte<br />

that was read.<br />

fid Specifies the file identifier associated with the file.<br />

buffer Points to the memory area to receive the data.<br />

bcount Specifies the number of bytes to read.<br />

tcount Points to the variable where read_f() stores the number of<br />

bytes actually read. The tcount value equals bcount unless the<br />

end-of-file was reached or an error occurred.<br />

This system call returns 0 on success or an error code on failure.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 2-93<br />

2

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

Saved successfully!

Ooh no, something went wrong!