.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "LDM_RELATIVE" "" "06 October 2005" "" ""
.SH NAME
ldm_relative \- Calculate the next relative offset
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ldm_relative (const u8 * \fIbuffer\fB, int \fIbuflen\fB, int \fIbase\fB, int \fIoffset\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIbuffer\fB\fR
Block of data being worked on
.TP
\fB\fIbuflen\fB\fR
Size of the block of data
.TP
\fB\fIbase\fB\fR
Size of the previous fixed width fields
.TP
\fB\fIoffset\fB\fR
Cumulative size of the previous variable-width fields
.SH "DESCRIPTION"
.PP
Because many of the VBLK fields are variable-width, it's necessary
to calculate each offset based on the previous one and the length
of the field it pointed to.
.SH "RETURN"
.PP
-1 Error, the calculated offset exceeded the size of the buffer
n OK, a range-checked offset into buffer