Add the missing length requirement about MB_CUR_MAX to wcrtomb(3).
Change the wording on the MB_CUR_MAX requirement in wctomb(3). If
programmers know the wide character to convert beforehand, they are
allowed to use a buffer smaller than MB_CUR_MAX bytes, as long as it
"fits" the sequence.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Message-ID: <CADDzAfN7_kdv4iQtH=OpgSWtRuqOZXYhxsBiz_OF8Zqf-zy4_Q@mail.gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
state known only to the
.BR wcrtomb ()
function is used instead.
+.P
+At most
+.B MB_CUR_MAX
+bytes will be written at
+.IR s .
+The programmer must ensure that there is enough room to store the
+multibyte sequence at
+.IR s .
.SH RETURN VALUE
The
.BR wcrtomb ()
bytes written at
.IR s .
.P
-The programmer must ensure that there is
-room for at least
+At most
.B MB_CUR_MAX
-bytes at
+bytes will be written at
+.IR s .
+The programmer must ensure that there is enough room to store the
+multibyte sequence at
.IR s .
.P
If