summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/utf8.c16
-rw-r--r--lib/libc/string/bcopy.316
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 ,
OpenPOWER on IntegriCloud