.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH MBTOWC 3 2011-09-28 "GNU" "Linux Programmer's Manual"
+.TH MBTOWC 3 2019-03-06 "GNU" "Linux Programmer's Manual"
.SH NAME
mbtowc \- convert a multibyte sequence to a wide character
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
-.sp
+.PP
.BI "int mbtowc(wchar_t *" pwc ", const char *" s ", size_t " n );
.fi
.SH DESCRIPTION
function.
If
.I s
-does not point to a null byte (\(aq\\0\(aq), it returns the number
+does not point to a null byte (\(aq\e0\(aq), it returns the number
of bytes that were consumed from
.IR s ,
otherwise it returns 0.
is not NULL but
.I pwc
is NULL.
-In this
-case the
+In this case, the
.BR mbtowc ()
function behaves as above, except that it does not
store the converted wide character in memory.
function
returns nonzero if the encoding
has nontrivial shift state, or zero if the encoding is stateless.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR mbtowc ()
+T} Thread safety MT-Unsafe race
+.TE
.SH CONFORMING TO
-C99.
+POSIX.1-2001, POSIX.1-2008, C99.
.SH NOTES
The behavior of
.BR mbtowc ()
a better interface to the same functionality.
.SH SEE ALSO
.BR MB_CUR_MAX (3),
+.BR mblen (3),
.BR mbrtowc (3),
-.BR mbstowcs (3)
+.BR mbstowcs (3),
+.BR wcstombs (3),
+.BR wctomb (3)