On Thu, Mar 19, 2015 at 03:58:16PM +0100, Stefan Sperling wrote:
> 
> Perhaps the following diff would make everyone happy again?

Thanks Stefan, it looks good for me.

> 
> Index: mbstowcs.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/locale/mbstowcs.3,v
> retrieving revision 1.6
> diff -u -p -r1.6 mbstowcs.3
> --- mbstowcs.3        19 Mar 2015 12:41:51 -0000      1.6
> +++ mbstowcs.3        19 Mar 2015 14:54:15 -0000
> @@ -39,16 +39,12 @@
>  .Fn mbstowcs "wchar_t * restrict pwcs" "const char * restrict s" "size_t n"
>  .\" ----------------------------------------------------------------------
>  .Sh DESCRIPTION
> -The
>  .Fn mbstowcs
>  converts a null-terminated multibyte character string pointed to by
>  .Fa s
> -to the corresponding wide-character string and stores it in the array
> -pointed to by
> -.Fa pwcs .
> -Up to
> +to the corresponding wide-character string and stores up to
>  .Fa n
> -elements are stored in
> +wide characters in the array pointed to by
>  .Fa pwcs .
>  Each character will be converted as if
>  .Xr mbtowc 3
> Index: wcrtomb.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/locale/wcrtomb.3,v
> retrieving revision 1.8
> diff -u -p -r1.8 wcrtomb.3
> --- wcrtomb.3 19 Mar 2015 12:41:51 -0000      1.8
> +++ wcrtomb.3 19 Mar 2015 14:51:10 -0000
> @@ -42,16 +42,13 @@
>  .Fn wcrtomb
>  converts the wide character given by
>  .Fa wc
> -to the corresponding multibyte character, and stores it in the array
> -pointed to by
> +to the corresponding multibyte character, and stores up to
> +.Dv MB_CUR_MAX
> +bytes in the array pointed to by
>  .Fa s
> -unless
> +if 
>  .Fa s
> -is a null pointer.
> -Up to
> -.Dv MB_CUR_MAX
> -bytes are stored in
> -.Fa s .
> +is not a null pointer.
>  .Pp
>  The behaviour of
>  .Fn wcrtomb
> Index: wcstombs.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/locale/wcstombs.3,v
> retrieving revision 1.6
> diff -u -p -r1.6 wcstombs.3
> --- wcstombs.3        19 Mar 2015 12:41:51 -0000      1.6
> +++ wcstombs.3        19 Mar 2015 14:53:30 -0000
> @@ -43,11 +43,9 @@
>  converts the null-terminated wide-character string pointed to by
>  .Fa pwcs
>  to the corresponding multibyte character string,
> -and stores it in the array pointed to by
> -.Fa s .
> -Up to
> +and stores up to
>  .Fa n
> -bytes are stored in
> +bytes in the array pointed to by
>  .Fa s .
>  Each character will be converted as if
>  .Xr wctomb 3
> 

Reply via email to