]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/wcswidth.3.patch
Libc-498.1.7.tar.gz
[apple/libc.git] / string / FreeBSD / wcswidth.3.patch
1 --- _SB/Libc/string/FreeBSD/wcswidth.3 2003-05-20 15:23:56.000000000 -0700
2 +++ _SB/Libc/string/FreeBSD/wcswidth.3.edit 2006-06-28 16:55:53.000000000 -0700
3 @@ -28,14 +28,26 @@
4 .Dt WCSWIDTH 3
5 .Os
6 .Sh NAME
7 -.Nm wcswidth
8 +.Nm wcswidth ,
9 +.Nm wcswidth_l
10 .Nd "number of column positions in wide-character string"
11 .Sh LIBRARY
12 .Lb libc
13 .Sh SYNOPSIS
14 .In wchar.h
15 .Ft int
16 -.Fn wcswidth "const wchar_t *pwcs" "size_t n"
17 +.Fo wcswidth
18 +.Fa "const wchar_t *pwcs"
19 +.Fa "size_t n"
20 +.Fc
21 +.In wchar.h
22 +.In xlocale.h
23 +.Ft int
24 +.Fo wcswidth_l
25 +.Fa "const wchar_t *pwcs"
26 +.Fa "size_t n"
27 +.Fa "locale_t loc"
28 +.Fc
29 .Sh DESCRIPTION
30 The
31 .Fn wcswidth
32 @@ -44,17 +56,26 @@
33 characters of
34 .Fa pwcs ,
35 or until a null wide character (L'\e0') is encountered.
36 +.Pp
37 +Although the
38 +.Fn wcswidth
39 +function uses the current locale, the
40 +.Fn wcswidth_l
41 +function may be passed a locale directly. See
42 +.Xr xlocale 3
43 +for more information.
44 .Sh RETURN VALUES
45 The
46 .Fn wcswidth
47 function returns 0 if
48 .Fa pwcs
49 is an empty string (L""),
50 -\-1 if a non-printing wide character is encountered,
51 -otherwise it returns the number of column positions occupied.
52 +\-1 if a non-printing wide character is encountered;
53 +otherwise, it returns the number of column positions occupied.
54 .Sh SEE ALSO
55 .Xr iswprint 3 ,
56 -.Xr wcwidth 3
57 +.Xr wcwidth 3 ,
58 +.Xr xlocale 3
59 .Sh STANDARDS
60 The
61 .Fn wcswidth