summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-09-18 06:11:21 +0000
committertjr <tjr@FreeBSD.org>2002-09-18 06:11:21 +0000
commit7eb8c7cf9aa4aa5eb76d14d7b7b0778c3bdb95cc (patch)
tree999249bafd16b28b7b2f1c9a370b7e35ec7a53bb /lib/libc
parent5bb288ec923336fc582dae1b5ee61a4965037b5f (diff)
downloadFreeBSD-src-7eb8c7cf9aa4aa5eb76d14d7b7b0778c3bdb95cc.zip
FreeBSD-src-7eb8c7cf9aa4aa5eb76d14d7b7b0778c3bdb95cc.tar.gz
Mark mbmb(), mbrune(), and mbrrune() as deprecated functions. We want to
get applications to move to the ISO C interfaces as well as have the freedom to replace the rune interfaces with ones that support stateful conversions some time in the future.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/mbrune.316
-rw-r--r--lib/libc/locale/mbrune.c3
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/libc/locale/mbrune.3 b/lib/libc/locale/mbrune.3
index 7228f7a..8e0aa08 100644
--- a/lib/libc/locale/mbrune.3
+++ b/lib/libc/locale/mbrune.3
@@ -54,6 +54,22 @@
.Ft char *
.Fn mbmb "const char *string" "char *pattern"
.Sh DESCRIPTION
+.Bf Em
+The
+.Bx 4.4
+.Dq rune
+functions have been deprecated in favour of the
+.Tn ISO
+C99 extended multibyte and wide character facilities
+and should not be used in new applications.
+.Ef
+Consider working with wide characters instead, and using
+.Xr wcschr 3 ,
+.Xr wcsrchr 3 ,
+and
+.Xr wcsstr 3
+instead of these functions.
+.Pp
These routines provide the corresponding functionality of
.Fn strchr ,
.Fn strrchr
diff --git a/lib/libc/locale/mbrune.c b/lib/libc/locale/mbrune.c
index a6c9920..b54ee97 100644
--- a/lib/libc/locale/mbrune.c
+++ b/lib/libc/locale/mbrune.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <stddef.h>
#include <string.h>
+__warn_references(mbrune, "warning: mbrune() is deprecated. See mbrune(3).");
char *
mbrune(string, c)
const char *string;
@@ -62,6 +63,7 @@ mbrune(string, c)
return (c == *string ? (char *)string : NULL);
}
+__warn_references(mbrrune, "warning: mbrrune() is deprecated. See mbrrune(3).");
char *
mbrrune(string, c)
const char *string;
@@ -79,6 +81,7 @@ mbrrune(string, c)
return (c == *string ? (char *)string : (char *)last);
}
+__warn_references(mbmb, "warning: mbmb() is deprecated. See mbmb(3).");
char *
mbmb(string, pattern)
const char *string;
OpenPOWER on IntegriCloud