.\" 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 "NTFS_UCSTONLS" "9" "09 October 2005" "" ""
.SH NAME
ntfs_ucstonls \- convert little endian Unicode string to NLS string
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int ntfs_ucstonls (const ntfs_volume * \fIvol\fB, const ntfschar * \fIins\fB, const int \fIins_len\fB, unsigned char ** \fIouts\fB, int \fIouts_len\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIvol\fB\fR
ntfs volume which we are working with
.TP
\fB\fIins\fB\fR
input Unicode string buffer
.TP
\fB\fIins_len\fB\fR
length of input string in Unicode characters
.TP
\fB\fIouts\fB\fR
on return contains the (allocated) output NLS string buffer
.TP
\fB\fIouts_len\fB\fR
length of output string buffer in bytes
.SH "DESCRIPTION"
.PP
Convert the input little endian, 2-byte Unicode string \fIins\fR, of length
\fIins_len\fR into the string format dictated by the loaded NLS.
.PP
If *\fIouts\fR is NULL, this function allocates the string and the caller is
responsible for calling kfree(*\fIouts\fR); when finished with it. In this case
\fIouts_len\fR is ignored and can be 0.
.PP
On success the function returns the number of bytes written to the output
string *\fIouts\fR (>= 0), not counting the terminating NULL byte. If the output
string buffer was allocated, *\fIouts\fR is set to it.
.PP
On error, a negative number corresponding to the error code is returned. In
that case the output string is not allocated. The contents of *\fIouts\fR are
then undefined.
.PP
This might look a bit odd due to fast path optimization...