Message ID | CADDzAfMfQ0Tg+Xy_0Moe2oQ6SC5BgXhCa8oBDPgrmMRb2RPnUA@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | wctomb(3) and wcrtomb(3) man page updates | expand |
Hi, On Sun, Mar 16, 2025 at 05:08:39PM +0800, Kang-Che Sung wrote: > The wcrtomb(3) function, like wctomb(3), has a length requirement about > MB_CUR_MAX. So copy the wording about MB_CUR_MAX from wctomb(3) to > wcrtomb(3). > > Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Since this patch does the same exact thing as patch 1/2 but to a different page, we can squash both patches into one. Cheers, Alex > --- > man/man3/wcrtomb.3 | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/man/man3/wcrtomb.3 b/man/man3/wcrtomb.3 > index 967a1a0f6..27b5bd9c1 100644 > --- a/man/man3/wcrtomb.3 > +++ b/man/man3/wcrtomb.3 > @@ -94,6 +94,14 @@ is NULL, a static anonymous > state known only to the > .BR wcrtomb () > function is used instead. > +.P > +At most > +.B MB_CUR_MAX > +bytes can 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 () > @@ -101,6 +109,9 @@ function returns the number of > bytes that have been or would > have been written to the byte array at > .IR s . > +The value returned will never be greater than the value of the > +.B MB_CUR_MAX > +macro. > If > .I wc > can not be > -- > 2.49.0
diff --git a/man/man3/wcrtomb.3 b/man/man3/wcrtomb.3 index 967a1a0f6..27b5bd9c1 100644 --- a/man/man3/wcrtomb.3 +++ b/man/man3/wcrtomb.3 @@ -94,6 +94,14 @@ is NULL, a static anonymous state known only to the .BR wcrtomb () function is used instead. +.P +At most +.B MB_CUR_MAX +bytes can 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 () @@ -101,6 +109,9 @@ function returns the number of bytes that have been or would have been written to the byte array at .IR s . +The value returned will never be greater than the value of the +.B MB_CUR_MAX +macro. If .I wc can not be
The wcrtomb(3) function, like wctomb(3), has a length requirement about MB_CUR_MAX. So copy the wording about MB_CUR_MAX from wctomb(3) to wcrtomb(3). Signed-off-by: Kang-Che Sung <explorer09@gmail.com> --- man/man3/wcrtomb.3 | 11 +++++++++++ 1 file changed, 11 insertions(+)