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.

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

lseek_f Repositions for read or write within an open file.<br />

#include <br />

unsigned long lseek_f(<br />

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

unsigned long position, /* relative seek vector */<br />

long offset, /* offset */<br />

unsigned long *old_lptr /* previous L_ptr */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

All volume types.<br />

lseek_f() repositions the L_ptr associated with an open file connection. Each file<br />

connection has its own L_ptr, and it points to the next byte to be read or written in<br />

the file. Repositioning can be specified relative to the beginning of the file, the<br />

current L_ptr, or the end of the file.<br />

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

position Defines how to reposition L_ptr and must have one of the<br />

following values:<br />

Value Meaning<br />

0 Offset from beginning of file<br />

1 Offset from current L_ptr<br />

2 Offset from end of file<br />

offset Specifies the number of bytes to move L_ptr. A negative<br />

offset moves L_ptr backwards.<br />

old_lptr Points to the variable where lseek_f() stores the previous<br />

value of the L_ptr.<br />

2-58 <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!