next up previous contents index
Next: 4.8.4 setsize: Set the Up: 4.8 oskit_stream: standard interface Previous: 4.8.2 write: Write to

4.8.3 seek: Change the seek pointer of this stream

 

SYNOPSIS

#include <oskit/com/stream.h>

OSKIT_COMDECL oskit_stream_seek(oskit_stream_t *f, oskit_s64_t ofs, oskit_seek_t whence, [out] oskit_u64_t *out_newpos);

DESCRIPTION

This method changes the seek pointer of this stream. If whence is OSKIT_SEEK_SET, then ofs is used as the new seek pointer value. If whence is OSKIT_SEEK_CUR, then the new seek pointer value is set to the sum of ofs and the former seek pointer value. If whence is OSKIT_SEEK_END, then the new seek pointer value is set to the sum of ofs and the size of the stream object. The new seek pointer value is returned via out_newpos.

PARAMETERS

f
The object whose seek pointer is to be changed.
ofs
The relative offset used in computing the new seek pointer.
whence
The location that ofs to which ofs is relative.
out_newpos
The new seek pointer value.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group