]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/mbrlen.3.patch
Libc-594.1.4.tar.gz
[apple/libc.git] / locale / FreeBSD / mbrlen.3.patch
1 --- _SB/Libc/locale/FreeBSD/mbrlen.3 2004-11-25 11:38:18.000000000 -0800
2 +++ _SB/Libc/locale/FreeBSD/mbrlen.3.edit 2006-06-28 16:55:51.000000000 -0700
3 @@ -28,21 +28,35 @@
4 .Dt MBRLEN 3
5 .Os
6 .Sh NAME
7 -.Nm mbrlen
8 +.Nm mbrlen ,
9 +.Nm mbrlen_l
10 .Nd "get number of bytes in a character (restartable)"
11 .Sh LIBRARY
12 .Lb libc
13 .Sh SYNOPSIS
14 .In wchar.h
15 .Ft size_t
16 -.Fn mbrlen "const char * restrict s" "size_t n" "mbstate_t * restrict ps"
17 +.Fo mbrlen
18 +.Fa "const char *restrict s"
19 +.Fa "size_t n"
20 +.Fa "mbstate_t *restrict ps"
21 +.Fc
22 +.In wchar.h
23 +.In xlocale.h
24 +.Ft size_t
25 +.Fo mbrlen_l
26 +.Fa "const char *restrict s"
27 +.Fa "size_t n"
28 +.Fa "mbstate_t *restrict ps"
29 +.Fa "locale_t loc"
30 +.Fc
31 .Sh DESCRIPTION
32 The
33 .Fn mbrlen
34 function inspects at most
35 .Fa n
36 -bytes pointed to by
37 -.Fa s
38 +bytes, pointed to by
39 +.Fa s ,
40 to determine the number of bytes needed to complete the next
41 multibyte character.
42 .Pp
43 @@ -63,7 +77,7 @@
44 .Pp
45 .Dl "mbrtowc(NULL, s, n, ps);"
46 .Pp
47 -Except that when
48 +Except that, when
49 .Fa ps
50 is a
51 .Dv NULL
52 @@ -72,6 +86,14 @@
53 uses its own static, internal
54 .Vt mbstate_t
55 object to keep track of the shift state.
56 +.Pp
57 +Although the
58 +.Fn mbrlen
59 +function uses the current locale, the
60 +.Fn mbrlen_l
61 +function may be passed a locale directly. See
62 +.Xr xlocale 3
63 +for more information.
64 .Sh RETURN VALUES
65 The
66 .Fn mbrlen
67 @@ -137,7 +159,8 @@
68 .Sh SEE ALSO
69 .Xr mblen 3 ,
70 .Xr mbrtowc 3 ,
71 -.Xr multibyte 3
72 +.Xr multibyte 3 ,
73 +.Xr xlocale 3
74 .Sh STANDARDS
75 The
76 .Fn mbrlen