Synopsis:
#include <aoi.h>
int64_t (*Seek)(void *ctx,
int64_t offset,
int32_t whence);
Arguments:
- ctx
- The context for the stream you want to seek in.
- offset
- The offset, in bytes, to which you want to seek.
- whence
- The position from which to apply the offset, one of:
- SEEK_SET
- Compute the new file position relative to the start of the file.
The value of offset must not be negative.
- SEEK_CUR
- Compute the new file position relative to the current file position.
The value of offset may be positive, negative, or zero.
- SEEK_END
- Compute the new file position relative to the end of the file.
The value of offset must not be negative.
Description:
This function should seek to the given position in the stream.
Returns:
The new stream position, in bytes relative to the position indicated by
whence, or -1 if an error occurred.