.\" 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_GET_VSTR" "" "06 October 2005" "" ""
.SH NAME
ldm_get_vstr \- Read a length-prefixed string into a buffer
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ldm_get_vstr (const u8 * \fIblock\fB, u8 * \fIbuffer\fB, int \fIbuflen\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIblock\fB\fR
Pointer to the length marker
.TP
\fB\fIbuffer\fB\fR
Location to copy string to
.TP
\fB\fIbuflen\fB\fR
Size of the output buffer
.SH "DESCRIPTION"
.PP
Many of the strings in the LDM Database are not NULL terminated. Instead
they are prefixed by a one byte length marker. This function copies one of
these strings into a buffer.
.PP
N.B. This function DOES NOT perform any range checking on the input.
If the buffer is too small, the output will be truncated.
.SH "RETURN"
.PP
0, Error and \fIbuffer\fR contents are undefined
n, String length in characters (excluding NULL)
buflen-1, String was truncated.