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.
This commit is contained in:
Tim J. Robbins 2002-09-18 06:11:21 +00:00
parent 24990dfad0
commit 7948cae0d2
2 changed files with 19 additions and 0 deletions

View File

@ -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

View File

@ -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;