Remove setrunelocale()
This commit is contained in:
parent
ca1ccb195b
commit
27ecbe8a77
@ -34,9 +34,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* setrunelocale() is obsolete in FreeBSD 6 -- use ANSI functions instead. */
|
||||
#define OBSOLETE_IN_6
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
@ -64,26 +61,6 @@ extern _RuneLocale *_Read_RuneMagi(FILE *);
|
||||
|
||||
static int __setrunelocale(const char *);
|
||||
|
||||
__warn_references(setrunelocale, "warning: setrunelocale() is obsolete. See setrunelocale(3).");
|
||||
int
|
||||
setrunelocale(char *encoding)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!encoding || !*encoding || strlen(encoding) > ENCODING_LEN ||
|
||||
(encoding[0] == '.' &&
|
||||
(encoding[1] == '\0' ||
|
||||
(encoding[1] == '.' && encoding[2] == '\0'))) ||
|
||||
strchr(encoding, '/') != NULL)
|
||||
return (EINVAL);
|
||||
|
||||
ret = __detect_path_locale();
|
||||
if (ret != 0)
|
||||
return (ret);
|
||||
|
||||
return (__setrunelocale((const char *)encoding));
|
||||
}
|
||||
|
||||
static int
|
||||
__setrunelocale(const char *encoding)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user