]> git.saurik.com Git - apple/libc.git/blame - string/FreeBSD/wcswidth.3.patch
Libc-498.1.7.tar.gz
[apple/libc.git] / string / FreeBSD / wcswidth.3.patch
CommitLineData
224c7076
A
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 @@
3d9156a7
A
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
224c7076 13 .Sh SYNOPSIS
3d9156a7
A
14 .In wchar.h
15 .Ft int
224c7076
A
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
3d9156a7
A
22+.In xlocale.h
23+.Ft int
224c7076
A
24+.Fo wcswidth_l
25+.Fa "const wchar_t *pwcs"
26+.Fa "size_t n"
27+.Fa "locale_t loc"
28+.Fc
3d9156a7
A
29 .Sh DESCRIPTION
30 The
31 .Fn wcswidth
224c7076 32@@ -44,17 +56,26 @@
3d9156a7
A
33 characters of
34 .Fa pwcs ,
35 or until a null wide character (L'\e0') is encountered.
36+.Pp
224c7076 37+Although the
3d9156a7
A
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
224c7076
A
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.
3d9156a7
A
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