X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..2be56ee90c5c5bee77895b8787a43e894249002b:/locale/FreeBSD/mbsrtowcs.3?ds=sidebyside diff --git a/locale/FreeBSD/mbsrtowcs.3 b/locale/FreeBSD/mbsrtowcs.3 index 05f2e1a..ff6e699 100644 --- a/locale/FreeBSD/mbsrtowcs.3 +++ b/locale/FreeBSD/mbsrtowcs.3 @@ -22,34 +22,60 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/mbsrtowcs.3,v 1.5 2004/07/21 10:54:57 tjr Exp $ +.\" $FreeBSD: src/lib/libc/locale/mbsrtowcs.3,v 1.6 2005/01/11 20:50:49 ru Exp $ .Dd July 21, 2004 .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 @@ -95,8 +121,20 @@ function behaves identically to .Fn mbsrtowcs , except that conversion stops after reading at most .Fa nms -bytes from the buffer pointed to by +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