]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/wcwidth.3.patch
bc9dfc25e4d9f268d042b625f0d27824133b11a6
[apple/libc.git] / locale / FreeBSD / wcwidth.3.patch
1 --- wcwidth.3.orig 2009-11-09 15:05:25.000000000 -0800
2 +++ wcwidth.3 2009-11-09 15:05:26.000000000 -0800
3 @@ -28,20 +28,38 @@
4 .Dt WCWIDTH 3
5 .Os
6 .Sh NAME
7 -.Nm wcwidth
8 +.Nm wcwidth ,
9 +.Nm wcwidth_l
10 .Nd "number of column positions of a wide-character code"
11 .Sh LIBRARY
12 .Lb libc
13 .Sh SYNOPSIS
14 .In wchar.h
15 .Ft int
16 -.Fn wcwidth "wchar_t wc"
17 +.Fo wcwidth
18 +.Fa "wchar_t wc"
19 +.Fc
20 +.In wchar.h
21 +.In xlocale.h
22 +.Ft int
23 +.Fo wcwidth_l
24 +.Fa "wchar_t wc"
25 +.Fa "locale_t loc"
26 +.Fc
27 .Sh DESCRIPTION
28 The
29 .Fn wcwidth
30 function determines the number of column positions required to
31 display the wide character
32 .Fa wc .
33 +.Pp
34 +Although the
35 +.Fn wcwidth
36 +function uses the current locale, the
37 +.Fn wcwidth_l
38 +function may be passed a locale directly. See
39 +.Xr xlocale 3
40 +for more information.
41 .Sh RETURN VALUES
42 The
43 .Fn wcwidth
44 @@ -50,8 +68,8 @@ function returns 0 if the
45 argument is a null wide character (L'\e0'),
46 \-1 if
47 .Fa wc
48 -is not printable,
49 -otherwise it returns the number of column positions the
50 +is not printable;
51 +otherwise, it returns the number of column positions the
52 character occupies.
53 .Sh EXAMPLES
54 This code fragment reads text from standard input and
55 @@ -79,7 +97,8 @@ while ((ch = getwchar()) != WEOF) {
56 .Ed
57 .Sh SEE ALSO
58 .Xr iswprint 3 ,
59 -.Xr wcswidth 3
60 +.Xr wcswidth 3 ,
61 +.Xr xlocale 3
62 .Sh STANDARDS
63 The
64 .Fn wcwidth