]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/mbsrtowcs.3.patch
ad11bb01c7ffad4b03ff1da98667b7ab32032bfd
[apple/libc.git] / locale / FreeBSD / mbsrtowcs.3.patch
1 --- mbsrtowcs.3.orig 2009-11-09 15:05:25.000000000 -0800
2 +++ mbsrtowcs.3 2009-11-09 15:05:26.000000000 -0800
3 @@ -27,29 +27,55 @@
4 .Dt MBSRTOWCS 3
5 .Os
6 .Sh NAME
7 +.Nm mbsnrtowcs ,
8 +.Nm mbsnrtowcs_l ,
9 .Nm mbsrtowcs ,
10 -.Nm mbsnrtowcs
11 +.Nm mbsrtowcs_l
12 .Nd "convert a character string to a wide-character string (restartable)"
13 .Sh LIBRARY
14 .Lb libc
15 .Sh SYNOPSIS
16 .In wchar.h
17 .Ft size_t
18 +.Fo mbsnrtowcs
19 +.Fa "wchar_t *restrict dst"
20 +.Fa "const char **restrict src"
21 +.Fa "size_t nms"
22 +.Fa "size_t len"
23 +.Fa "mbstate_t *restrict ps"
24 +.Fc
25 +.Ft size_t
26 .Fo mbsrtowcs
27 -.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t len"
28 -.Fa "mbstate_t * restrict ps"
29 +.Fa "wchar_t *restrict dst"
30 +.Fa "const char **restrict src"
31 +.Fa "size_t len"
32 +.Fa "mbstate_t *restrict ps"
33 .Fc
34 +.In wchar.h
35 +.In xlocale.h
36 .Ft size_t
37 -.Fo mbsnrtowcs
38 -.Fa "wchar_t * restrict dst" "const char ** restrict src" "size_t nms"
39 -.Fa "size_t len" "mbstate_t * restrict ps"
40 +.Fo mbsrtowcs_l
41 +.Fa "wchar_t *restrict dst"
42 +.Fa "const char **restrict src"
43 +.Fa "size_t len"
44 +.Fa "mbstate_t *restrict ps"
45 +.Fa "locale_t loc"
46 +.Fc
47 +.Ft size_t
48 +.Fo mbsnrtowcs_l
49 +.Fa "wchar_t *restrict dst"
50 +.Fa "const char **restrict src"
51 +.Fa "size_t nms"
52 +.Fa "size_t len"
53 +.Fa "mbstate_t *restrict ps"
54 +.Fa "locale_t loc"
55 .Fc
56 .Sh DESCRIPTION
57 The
58 .Fn mbsrtowcs
59 -function converts a sequence of multibyte characters pointed to indirectly by
60 -.Fa src
61 -into a sequence of corresponding wide characters and stores at most
62 +function converts a sequence of multibyte characters, pointed to indirectly by
63 +.Fa src ,
64 +into a sequence of corresponding wide characters. It stores at most
65 .Fa len
66 of them in the
67 .Vt wchar_t
68 @@ -97,6 +123,18 @@ except that conversion stops after readi
69 .Fa nms
70 bytes from the buffer pointed to by
71 .Fa src .
72 +.Pp
73 +While the
74 +.Fn mbsrtowcs
75 +and
76 +.Fn mbsnrtowcs
77 +functions use the current locale, the
78 +.Fn mbsrtowcs_l
79 +and
80 +.Fn mbsnrtowcs_l
81 +functions may be passed locales directly. See
82 +.Xr xlocale 3
83 +for more information.
84 .Sh RETURN VALUES
85 The
86 .Fn mbsrtowcs
87 @@ -123,7 +161,8 @@ The conversion state is invalid.
88 .Xr mbrtowc 3 ,
89 .Xr mbstowcs 3 ,
90 .Xr multibyte 3 ,
91 -.Xr wcsrtombs 3
92 +.Xr wcsrtombs 3 ,
93 +.Xr xlocale 3
94 .Sh STANDARDS
95 The
96 .Fn mbsrtowcs