]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- _SB/Libc/locale/FreeBSD/wcstombs.3 2004-11-25 11:38:20.000000000 -0800 |
2 | +++ _SB/Libc/locale/FreeBSD/wcstombs.3.edit 2006-06-28 16:55:51.000000000 -0700 | |
3d9156a7 A |
3 | @@ -41,7 +41,8 @@ |
4 | .Dt WCSTOMBS 3 | |
5 | .Os | |
6 | .Sh NAME | |
7 | -.Nm wcstombs | |
8 | +.Nm wcstombs , | |
9 | +.Nm wcstombs_l | |
10 | .Nd convert a wide-character string to a character string | |
11 | .Sh LIBRARY | |
12 | .Lb libc | |
224c7076 A |
13 | @@ -49,28 +50,47 @@ |
14 | .In stdlib.h | |
15 | .Ft size_t | |
16 | .Fo wcstombs | |
17 | -.Fa "char * restrict mbstring" "const wchar_t * restrict wcstring" | |
18 | -.Fa "size_t nbytes" | |
19 | +.Fa "char *restrict s" | |
20 | +.Fa "const wchar_t *restrict pwcs" | |
21 | +.Fa "size_t n" | |
22 | +.Fc | |
23 | +.In stdlib.h | |
3d9156a7 A |
24 | +.In xlocale.h |
25 | +.Ft size_t | |
26 | +.Fo wcstombs_l | |
224c7076 A |
27 | +.Fa "char *restrict s" |
28 | +.Fa "const wchar_t *restrict pwcs" | |
29 | +.Fa "size_t n" | |
30 | +.Fa "locale_t loc" | |
31 | .Fc | |
3d9156a7 A |
32 | .Sh DESCRIPTION |
33 | The | |
34 | .Fn wcstombs | |
224c7076 A |
35 | function converts a wide character string |
36 | -.Fa wcstring | |
37 | +.Fa pwcs | |
38 | into a multibyte character string, | |
39 | -.Fa mbstring , | |
40 | +.Fa s , | |
41 | beginning in the initial conversion state. | |
42 | Up to | |
43 | -.Fa nbytes | |
44 | +.Fa n | |
45 | bytes are stored in | |
46 | -.Fa mbstring . | |
47 | +.Fa s . | |
3d9156a7 | 48 | Partial multibyte characters at the end of the string are not stored. |
224c7076 A |
49 | -The multibyte character string is null terminated if there is room. |
50 | +The multibyte character string is null terminated, if there is room. | |
3d9156a7 | 51 | +.Pp |
224c7076 | 52 | +Although the |
3d9156a7 A |
53 | +.Fn wcstombs |
54 | +function uses the current locale, the | |
55 | +.Fn wcstombs_l | |
56 | +function may be passed a locale directly. See | |
57 | +.Xr xlocale 3 | |
58 | +for more information. | |
59 | .Sh RETURN VALUES | |
60 | The | |
61 | .Fn wcstombs | |
224c7076 A |
62 | function returns the number of bytes converted |
63 | -(not including any terminating null), if successful, otherwise it returns | |
64 | +(not including any terminating null), if successful; | |
65 | +otherwise, it returns | |
66 | .Po Vt size_t Pc Ns \-1 . | |
67 | .Sh ERRORS | |
68 | The | |
69 | @@ -86,7 +106,8 @@ | |
3d9156a7 A |
70 | .Xr mbstowcs 3 , |
71 | .Xr multibyte 3 , | |
72 | .Xr wcsrtombs 3 , | |
73 | -.Xr wctomb 3 | |
74 | +.Xr wctomb 3 , | |
75 | +.Xr xlocale 3 | |
76 | .Sh STANDARDS | |
77 | The | |
78 | .Fn wcstombs |