limb 0.2.0

2024-01-09

siov_seek(3)
limb manual
siov_seek(3)

NAME

siov_seek - seek into an array of vectors

SYNOPSIS

#include <limb/siovec.h>
size_t siov_seek(struct iovec *v, unsigned int n, size_t offset)

DESCRIPTION

The siov_seek() function updates the array v of n vectors so that the data it represents now start after offset byte.

You can think of it as a way to perform s += offset for vectors.

Note

Note that it is safe to have offset larger than the amount of data represented by v, as that will simply set all vectors to 0 -- i.e. the array v of n vectors will not represent any data anymore. In other words, siov_len(v, n) will then return 0.

RETURN VALUE

The siov_seek() function return the number of bytes "skipped over" which may be less than offset if there wasn't that much data, as noted above.

SEE ALSO

siov_len(3), siov_trunc(3)

limb 0.1.0
2023-07-24
siov_seek(3)