dmi_writer_skip

Synopsis

#include <opendmi/writer.h>

bool dmi_writer_skip(dmi_writer_t *writer, size_t length);

Description

The dmi_writer_skip function pads the data up to length bytes from the current position and advances the writer cursor.

Only the bytes past the end of the data are made up, as zeros, which is what the bytes a structure holds and nothing reads are left as. The ones written already are stepped over rather than written over, so that padding over a part of the data which is being written again keeps it.

Padding a record out to its declared length is what dmi_writer_skip_ex does.

Parameters

writer

Writer to write to.

length

Number of bytes to pad with.

Return value

true on success, false if the padding does not fit into the range.

Errors

DMI_ERROR_OUT_OF_MEMORY

Buffer of the writer cannot grow.