qvm_slice()
Given a starting offset and length, calculate the resulting slice array according to a descriptor array
Synopsis:
#include <qvm/utils.h>unsigned qvm_slice(unsigned offset,
unsigned len,
const struct qvm_slice_descriptor *desc,
struct qvm_slice_result *slices)Arguments:
- offset
- The starting offset.
- len
- The length, in bytes.
- desc
- A pointer to an array that describes how to slice the data beginning at offset and spanning len bytes.
- slices
- A pointer to a location for storing the slice result entries.
Returns:
The number of slice result entries that were generated.
Page updated:
