wcstombs.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-01-13 21:48:03 +13:00
parent 4bd05f8fe0
commit d75efe7376
1 changed files with 4 additions and 3 deletions

View File

@ -70,17 +70,18 @@ is NULL,
.I n
is ignored, and the conversion proceeds as
above, except that the converted bytes are not written out to memory,
and that no length limit exists.
and no length limit exists.
.PP
In order to avoid the case 2 above, the programmer should make sure
.I n
is greater or equal to
is greater than or equal to
.IR "wcstombs(NULL,src,0)+1" .
.SH RETURN VALUE
The
.BR wcstombs ()
function returns the number of bytes that make up the
converted part of multibyte sequence, not including the terminating null byte.
converted part of a multibyte sequence,
not including the terminating null byte.
If a wide character was encountered which could not be
converted,
.I (size_t)\ \-1