diff options
author | dim <dim@FreeBSD.org> | 2015-08-12 18:39:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-08-12 18:39:49 +0000 |
commit | 3f7c441c4cd6f441b9929f363c993f413fe0026c (patch) | |
tree | b2b9ea1c251f22a17c660fad5546623e05782e63 /lib/libc | |
parent | f5e45b5422283dd403ec8dc4137e6bbbbc3379e5 (diff) | |
parent | 53d48e6cc191a84ab881b32c7ed3b412526830db (diff) | |
download | FreeBSD-src-3f7c441c4cd6f441b9929f363c993f413fe0026c.zip FreeBSD-src-3f7c441c4cd6f441b9929f363c993f413fe0026c.tar.gz |
Merge ^/head r286422 through r286684.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/locale/utf8.c | 16 | ||||
-rw-r--r-- | lib/libc/string/bcopy.3 | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c index ce49279..55e2931 100644 --- a/lib/libc/locale/utf8.c +++ b/lib/libc/locale/utf8.c @@ -145,14 +145,6 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, mask = 0x07; want = 4; lbound = 0x10000; - } else if ((ch & 0xfc) == 0xf8) { - mask = 0x03; - want = 5; - lbound = 0x200000; - } else if ((ch & 0xfe) == 0xfc) { - mask = 0x01; - want = 6; - lbound = 0x4000000; } else { /* * Malformed input; input is not UTF-8. @@ -328,15 +320,9 @@ _UTF8_wcrtomb(char * __restrict s, wchar_t wc, mbstate_t * __restrict ps) } else if ((wc & ~0xffff) == 0) { lead = 0xe0; len = 3; - } else if ((wc & ~0x1fffff) == 0) { + } else if (wc >= 0 && wc <= 0x10ffff) { lead = 0xf0; len = 4; - } else if ((wc & ~0x3ffffff) == 0) { - lead = 0xf8; - len = 5; - } else if ((wc & ~0x7fffffff) == 0) { - lead = 0xfc; - len = 6; } else { errno = EILSEQ; return ((size_t)-1); diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3 index 1608fad..ede910b 100644 --- a/lib/libc/string/bcopy.3 +++ b/lib/libc/string/bcopy.3 @@ -31,7 +31,7 @@ .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd August 11, 2015 .Dt BCOPY 3 .Os .Sh NAME @@ -57,6 +57,20 @@ The two strings may overlap. If .Fa len is zero, no bytes are copied. +.Pp +This function is deprecated (marked as LEGACY in +POSIX.1-2001): use +.Xr memcpy 3 +or +.Xr memmove 3 +in new programs. +Note that the first two arguments are +interchanged for +.Xr memcpy 3 +and +.Xr memmove 3 . +POSIX.1-2008 removes the specification of +.Fn bcopy . .Sh SEE ALSO .Xr memccpy 3 , .Xr memcpy 3 , |