]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/wcrtomb.3.patch
Libc-498.tar.gz
[apple/libc.git] / locale / FreeBSD / wcrtomb.3.patch
1 --- _SB/Libc/locale/FreeBSD/wcrtomb.3 2004-11-25 11:38:20.000000000 -0800
2 +++ _SB/Libc/locale/FreeBSD/wcrtomb.3.edit 2006-06-28 16:55:51.000000000 -0700
3 @@ -28,14 +28,28 @@
4 .Dt WCRTOMB 3
5 .Os
6 .Sh NAME
7 -.Nm wcrtomb
8 +.Nm wcrtomb ,
9 +.Nm wcrtomb_l
10 .Nd "convert a wide-character code to a character (restartable)"
11 .Sh LIBRARY
12 .Lb libc
13 .Sh SYNOPSIS
14 .In wchar.h
15 .Ft size_t
16 -.Fn wcrtomb "char * restrict s" "wchar_t wc" "mbstate_t * restrict ps"
17 +.Fo wcrtomb
18 +.Fa "char *restrict s"
19 +.Fa "wchar_t wc"
20 +.Fa "mbstate_t *restrict ps"
21 +.Fc
22 +.In wchar.h
23 +.In xlocale.h
24 +.Ft size_t
25 +.Fo wcrtomb_l
26 +.Fa "char *restrict s"
27 +.Fa "wchar_t wc"
28 +.Fa "mbstate_t *restrict ps"
29 +.Fa "locale_t loc"
30 +.Fc
31 .Sh DESCRIPTION
32 The
33 .Fn wcrtomb
34 @@ -44,10 +58,10 @@
35 .Fa wc ,
36 including any necessary shift sequences, to the
37 character array
38 -.Fa s ,
39 -storing a maximum of
40 +.Fa s .
41 +A maximum of
42 .Dv MB_CUR_MAX
43 -bytes.
44 +bytes will be stored.
45 .Pp
46 If
47 .Fa s
48 @@ -58,7 +72,7 @@
49 .Fa s
50 pointed to an internal buffer and
51 .Fa wc
52 -was a null wide character (L'\e0').
53 +were a null wide character (L'\e0').
54 .Pp
55 The
56 .Ft mbstate_t
57 @@ -72,6 +86,14 @@
58 .Vt mbstate_t
59 object, which is initialized to the initial conversion state
60 at program startup.
61 +.Pp
62 +While the
63 +.Fn wcrtomb
64 +function uses the current locale, the
65 +.Fn wcrtomb_l
66 +function may be passed a locale directly. See
67 +.Xr xlocale 3
68 +for more information.
69 .Sh RETURN VALUES
70 The
71 .Fn wcrtomb
72 @@ -97,7 +119,8 @@
73 .Xr mbrtowc 3 ,
74 .Xr multibyte 3 ,
75 .Xr setlocale 3 ,
76 -.Xr wctomb 3
77 +.Xr wctomb 3 ,
78 +.Xr xlocale 3
79 .Sh STANDARDS
80 The
81 .Fn wcrtomb