dmi_reader_skip_ex

Synopsis

#include <opendmi/reader.h>

bool dmi_reader_skip_ex(
        dmi_reader_t      *reader,
        dmi_reader_mark_t  from,
        size_t             length);

Description

The dmi_reader_skip_ex function advances the reader cursor to length bytes past the mark from.

Records of a declared length are stepped over by that length rather than by the number of bytes read from them: mark the beginning of the record with dmi_reader_mark, read whatever fields it is known to hold, then advance by the length of the record from the mark.

Counting from the current position is what dmi_reader_skip does.

Parameters

reader

Reader to advance.

from

Mark to count length from, taken from the same reader with dmi_reader_mark.

length

Number of bytes to advance by.

Return value

true on success, false if the resulting position is beyond the end of the range, or if from was taken from a reader reading another range.

Errors

None.