]> git.saurik.com Git - apple/libc.git/blame - locale/FreeBSD/wcsrtombs.3.patch
Libc-763.11.tar.gz
[apple/libc.git] / locale / FreeBSD / wcsrtombs.3.patch
CommitLineData
1f2f436a
A
1--- wcsrtombs.3.orig 2009-11-09 15:05:25.000000000 -0800
2+++ wcsrtombs.3 2009-11-09 15:05:26.000000000 -0800
224c7076
A
3@@ -28,30 +28,57 @@
4 .Dt WCSRTOMBS 3
3d9156a7
A
5 .Os
6 .Sh NAME
224c7076
A
7+.Nm wcsnrtombs ,
8+.Nm wcsnrtombs_l ,
3d9156a7
A
9 .Nm wcsrtombs ,
10-.Nm wcsnrtombs
224c7076 11+.Nm wcsrtombs_l
3d9156a7
A
12 .Nd "convert a wide-character string to a character string (restartable)"
13 .Sh LIBRARY
14 .Lb libc
224c7076
A
15 .Sh SYNOPSIS
16 .In wchar.h
17 .Ft size_t
18+.Fo wcsnrtombs
19+.Fa "char *restrict dst"
20+.Fa "const wchar_t **restrict src"
21+.Fa "size_t nwc"
22+.Fa "size_t len"
23+.Fa "mbstate_t *restrict ps"
3d9156a7
A
24+.Fc
25+.Ft size_t
224c7076
A
26 .Fo wcsrtombs
27-.Fa "char * restrict dst" "const wchar_t ** restrict src"
28-.Fa "size_t len" "mbstate_t * restrict ps"
29+.Fa "char *restrict dst"
30+.Fa "const wchar_t **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 wcsnrtombs
38-.Fa "char * restrict dst" "const wchar_t ** restrict src" "size_t nwc"
39-.Fa "size_t len" "mbstate_t * restrict ps"
3d9156a7 40+.Fo wcsnrtombs_l
224c7076
A
41+.Fa "char *restrict dst"
42+.Fa "const wchar_t **restrict src"
43+.Fa "size_t nwc"
44+.Fa "size_t len"
45+.Fa "mbstate_t *restrict ps"
46+.Fa "locale_t loc"
3d9156a7 47+.Fc
224c7076
A
48+.Ft size_t
49+.Fo wcsrtombs_l
50+.Fa "char *restrict dst"
51+.Fa "const wchar_t **restrict src"
52+.Fa "size_t len"
53+.Fa "mbstate_t *restrict ps"
54+.Fa "locale_t loc"
55 .Fc
3d9156a7
A
56 .Sh DESCRIPTION
57 The
58 .Fn wcsrtombs
224c7076
A
59-function converts a string of wide characters indirectly pointed to by
60-.Fa src
61-to a corresponding multibyte character string stored in the array
62-pointed to by
63+function converts a string of wide characters,
64+indirectly pointed to by
65+.Fa src ,
66+to a corresponding multi-byte character string,
67+stored in the array pointed to by
68 .Fa dst .
69 No more than
70 .Fa len
1f2f436a 71@@ -97,15 +124,28 @@ except that conversion stops after readi
3d9156a7
A
72 .Fa nwc
73 characters from the buffer pointed to by
74 .Fa src .
75+.Pp
224c7076 76+Although the
3d9156a7
A
77+.Fn wcsrtombs
78+and
79+.Fn wcsnrtombs
80+functions use the current locale, the
81+.Fn wcsrtombs_l
82+and
83+.Fn wcsnrtombs_l
84+functions may be passed locales directly. See
85+.Xr xlocale 3
86+for more information.
87 .Sh RETURN VALUES
224c7076
A
88-The
89+If successful, the
3d9156a7 90 .Fn wcsrtombs
224c7076
A
91 and
92 .Fn wcsnrtombs
93 functions return the number of bytes stored in
94 the array pointed to by
95 .Fa dst
96-(not including any terminating null), if successful, otherwise it returns
97+(not including any terminating null);
98+otherwise, they return
99 .Po Vt size_t Pc Ns \-1 .
100 .Sh ERRORS
101 The
1f2f436a 102@@ -122,7 +162,8 @@ The conversion state is invalid.
3d9156a7
A
103 .Sh SEE ALSO
104 .Xr mbsrtowcs 3 ,
105 .Xr wcrtomb 3 ,
106-.Xr wcstombs 3
107+.Xr wcstombs 3 ,
108+.Xr xlocale 3
109 .Sh STANDARDS
110 The
111 .Fn wcsrtombs