Deleted Added
full compact
25c25
< .\" $FreeBSD: head/lib/libc/locale/mbrtowc.3 216756 2010-12-28 10:08:50Z uqs $
---
> .\" $FreeBSD: head/lib/libc/locale/mbrtowc.3 250883 2013-05-21 19:59:37Z ed $
27c27
< .Dd April 8, 2004
---
> .Dd May 21, 2013
31c31,33
< .Nm mbrtowc
---
> .Nm mbrtowc ,
> .Nm mbrtoc16 ,
> .Nm mbrtoc32
39c41
< .Fa "wchar_t * restrict pwc" "const char * restrict s" "size_t n"
---
> .Fa "wchar_t * restrict pc" "const char * restrict s" "size_t n"
41a44,54
> .In uchar.h
> .Ft size_t
> .Fo mbrtoc16
> .Fa "char16_t * restrict pc" "const char * restrict s" "size_t n"
> .Fa "mbstate_t * restrict ps"
> .Fc
> .Ft size_t
> .Fo mbrtoc32
> .Fa "char32_t * restrict pc" "const char * restrict s" "size_t n"
> .Fa "mbstate_t * restrict ps"
> .Fc
44,45c57,61
< .Fn mbrtowc
< function inspects at most
---
> .Fn mbrtowc ,
> .Fn mbrtoc16
> and
> .Fn mbrtoc32
> functions inspect at most
52c68
< .Fa pwc
---
> .Fa pc
58c74,77
< .Vt wchar_t
---
> .Vt wchar_t ,
> .Vt char16_t
> or
> .Vt char32_t
65,67c84,85
< .Fn mbrtowc
< behaves as if
< .Fa pwc
---
> these functions behave as if
> .Fa pc
84,85c102
< .Fn mbrtowc
< uses an internal, static
---
> these functions use an internal, static
88a106,112
> .Pp
> As a single
> .Vt char16_t
> is not large enough to represent certain multibyte characters, the
> .Fn mbrtoc16
> function may need to be invoked multiple times to convert a single
> multibyte character sequence.
91,92c115,119
< .Fn mbrtowc
< functions returns:
---
> .Fn mbrtowc ,
> .Fn mbrtoc16
> and
> .Fn mbrtoc32
> functions return:
103,106c130,136
< or fewer bytes
< represent a valid character,
< .Fn mbrtowc
< returns the number of bytes used to complete the multibyte character.
---
> or fewer bytes represent a valid character, these functions
> return the number of bytes used to complete the multibyte character.
> .It Po Vt size_t Pc Ns \-1
> An encoding error has occurred.
> The next
> .Fa n
> or fewer bytes do not contribute to a valid multibyte character.
114,118d143
< .It Po Vt size_t Pc Ns \-1
< An encoding error has occurred.
< The next
< .Fa n
< or fewer bytes do not contribute to a valid multibyte character.
119a145,153
> .Pp
> The
> .Fn mbrtoc16
> function also returns:
> .Bl -tag -width indent
> .It Po Vt size_t Pc Ns \-3
> The next character resulting from a previous call has been stored.
> No bytes from the input have been consumed.
> .El
122,123c156,160
< .Fn mbrtowc
< function will fail if:
---
> .Fn mbrtowc ,
> .Fn mbrtoc16
> and
> .Fn mbrtoc32
> functions will fail if:
137,139c174,179
< .Fn mbrtowc
< function conforms to
< .St -isoC-99 .
---
> .Fn mbrtowc ,
> .Fn mbrtoc16
> and
> .Fn mbrtoc32
> functions conform to
> .St -isoC-2011 .