Re: [PATCH 2/2] man/man3/wcrtomb.3: Document MB_CUR_MAX length requirement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux