X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..2be56ee90c5c5bee77895b8787a43e894249002b:/locale/FreeBSD/mbsrtowcs.3?ds=inline diff --git a/locale/FreeBSD/mbsrtowcs.3 b/locale/FreeBSD/mbsrtowcs.3 index dce9c78..ff6e699 100644 --- a/locale/FreeBSD/mbsrtowcs.3 +++ b/locale/FreeBSD/mbsrtowcs.3 @@ -27,29 +27,55 @@ .Dt MBSRTOWCS 3 .Os .Sh NAME +.Nm mbsnrtowcs , +.Nm mbsnrtowcs_l , .Nm mbsrtowcs , -.Nm mbsnrtowcs +.Nm mbsrtowcs_l .Nd "convert a character string to a wide-character string (restartable)" .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In wchar.h .Ft size_t +.Fo mbsnrtowcs +.Fa "wchar_t *restrict dst" +.Fa "const char **restrict src" +.Fa "size_t nms" +.Fa "size_t len" +.Fa "mbstate_t *restrict ps" +.Fc +.Ft size_t .Fo mbsrtowcs -.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t len" -.Fa "mbstate_t * restrict ps" +.Fa "wchar_t *restrict dst" +.Fa "const char **restrict src" +.Fa "size_t len" +.Fa "mbstate_t *restrict ps" .Fc +.In wchar.h +.In xlocale.h .Ft size_t -.Fo mbsnrtowcs -.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t nms" -.Fa "size_t len" "mbstate_t * restrict ps" +.Fo mbsrtowcs_l +.Fa "wchar_t *restrict dst" +.Fa "const char **restrict src" +.Fa "size_t len" +.Fa "mbstate_t *restrict ps" +.Fa "locale_t loc" +.Fc +.Ft size_t +.Fo mbsnrtowcs_l +.Fa "wchar_t *restrict dst" +.Fa "const char **restrict src" +.Fa "size_t nms" +.Fa "size_t len" +.Fa "mbstate_t *restrict ps" +.Fa "locale_t loc" .Fc .Sh DESCRIPTION The .Fn mbsrtowcs -function converts a sequence of multibyte characters pointed to indirectly by -.Fa src -into a sequence of corresponding wide characters and stores at most +function converts a sequence of multibyte characters, pointed to indirectly by +.Fa src , +into a sequence of corresponding wide characters. It stores at most .Fa len of them in the .Vt wchar_t @@ -97,6 +123,18 @@ except that conversion stops after reading at most .Fa nms bytes from the buffer pointed to by .Fa src . +.Pp +While the +.Fn mbsrtowcs +and +.Fn mbsnrtowcs +functions use the current locale, the +.Fn mbsrtowcs_l +and +.Fn mbsnrtowcs_l +functions may be passed locales directly. See +.Xr xlocale 3 +for more information. .Sh RETURN VALUES The .Fn mbsrtowcs @@ -123,7 +161,8 @@ The conversion state is invalid. .Xr mbrtowc 3 , .Xr mbstowcs 3 , .Xr multibyte 3 , -.Xr wcsrtombs 3 +.Xr wcsrtombs 3 , +.Xr xlocale 3 .Sh STANDARDS The .Fn mbsrtowcs