]> git.saurik.com Git - apple/libc.git/blame - locale/FreeBSD/wctomb.3.patch
Libc-594.9.5.tar.gz
[apple/libc.git] / locale / FreeBSD / wctomb.3.patch
CommitLineData
224c7076
A
1--- _SB/Libc/locale/FreeBSD/wctomb.3 2004-11-25 11:38:20.000000000 -0800
2+++ _SB/Libc/locale/FreeBSD/wctomb.3.edit 2006-06-28 16:55:51.000000000 -0700
3@@ -41,37 +41,56 @@
3d9156a7
A
4 .Dt WCTOMB 3
5 .Os
6 .Sh NAME
7-.Nm wctomb
8+.Nm wctomb ,
9+.Nm wctomb_l
10 .Nd convert a wide-character code to a character
11 .Sh LIBRARY
12 .Lb libc
224c7076 13 .Sh SYNOPSIS
3d9156a7
A
14 .In stdlib.h
15 .Ft int
224c7076
A
16-.Fn wctomb "char *mbchar" "wchar_t wchar"
17+.Fo wctomb
18+.Fa "char *s"
19+.Fa "wchar_t wchar"
20+.Fc
21+.In stdlib.h
3d9156a7
A
22+.In xlocale.h
23+.Ft int
224c7076
A
24+.Fo wctomb_l
25+.Fa "char *s"
26+.Fa "wchar_t wchar"
27+.Fa "locale_t loc"
28+.Fc
3d9156a7
A
29 .Sh DESCRIPTION
30 The
31 .Fn wctomb
224c7076
A
32-function converts a wide character
33-.Fa wchar
34-into a multibyte character and stores
35-the result in
36-.Fa mbchar .
37+function converts a wide character,
38+.Fa wchar ,
39+into a multibyte character and stores the result in
40+.Fa s .
41 The object pointed to by
42-.Fa mbchar
43-must be large enough to accommodate the multibyte character, which
44-may be up to
45+.Fa s
46+must be large enough to accommodate the multibyte character,
47+which may be up to
48 .Dv MB_LEN_MAX
49 bytes.
50 .Pp
51 A call with a null
52-.Fa mbchar
53+.Fa s
3d9156a7
A
54 pointer returns nonzero if the current locale requires shift states,
55 zero otherwise;
56 if shift states are required, the shift state is reset to the initial state.
57+.Pp
224c7076 58+Although the
3d9156a7
A
59+.Fn wctomb
60+function uses the current locale, the
61+.Fn wctomb_l
62+function may be passed a locale directly. See
63+.Xr xlocale 3
64+for more information.
65 .Sh RETURN VALUES
66 If
224c7076
A
67-.Fa mbchar
68+.Fa s
69 is
70 .Dv NULL ,
71 the
72@@ -79,12 +98,12 @@
73 function returns nonzero if shift states are supported,
74 zero otherwise.
75 If
76-.Fa mbchar
77+.Fa s
78 is valid,
79 .Fn wctomb
80 returns
81 the number of bytes processed in
82-.Fa mbchar ,
83+.Fa s ,
84 or \-1 if no multibyte character
85 could be recognized or converted.
86 In this case,
87@@ -104,7 +123,8 @@
3d9156a7
A
88 .Xr mbtowc 3 ,
89 .Xr wcrtomb 3 ,
90 .Xr wcstombs 3 ,
91-.Xr wctob 3
92+.Xr wctob 3 ,
93+.Xr xlocale 3
94 .Sh STANDARDS
95 The
96 .Fn wctomb