summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/wctob.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-05-12 14:26:54 +0000
committertjr <tjr@FreeBSD.org>2004-05-12 14:26:54 +0000
commit5ad27cd64f958bb973cd2fe0e8c9169e69168e05 (patch)
treea4b3d33fdc70e217fd81cdb660a70bd2e6e3af51 /lib/libc/locale/wctob.c
parente3f042f4aff04f73fd65f7788919c29bd71cfd1e (diff)
downloadFreeBSD-src-5ad27cd64f958bb973cd2fe0e8c9169e69168e05.zip
FreeBSD-src-5ad27cd64f958bb973cd2fe0e8c9169e69168e05.tar.gz
Reduce overhead by calling internal versions of the multibyte conversion
functions directly wherever possible.
Diffstat (limited to 'lib/libc/locale/wctob.c')
-rw-r--r--lib/libc/locale/wctob.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/locale/wctob.c b/lib/libc/locale/wctob.c
index 4f4d295..cb39adc 100644
--- a/lib/libc/locale/wctob.c
+++ b/lib/libc/locale/wctob.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdio.h>
#include <wchar.h>
+#include "mblocal.h"
int
wctob(wint_t c)
@@ -38,7 +39,7 @@ wctob(wint_t c)
mbstate_t mbs = initial;
char buf[MB_LEN_MAX];
- if (c == WEOF || wcrtomb(buf, c, &mbs) != 1)
+ if (c == WEOF || __wcrtomb(buf, c, &mbs) != 1)
return (EOF);
return ((unsigned char)*buf);
}
OpenPOWER on IntegriCloud