summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/btowc.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/btowc.c')
-rw-r--r--newlib/libc/stdlib/btowc.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/newlib/libc/stdlib/btowc.c b/newlib/libc/stdlib/btowc.c
deleted file mode 100644
index ec6c29152..000000000
--- a/newlib/libc/stdlib/btowc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <wchar.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <reent.h>
-#include <string.h>
-#include "local.h"
-
-wint_t
-btowc (int c)
-{
- mbstate_t mbs;
- int retval = 0;
- wchar_t pwc;
- unsigned char b;
-
- if (c == EOF)
- return WEOF;
-
- b = (unsigned char)c;
-
- /* Put mbs in initial state. */
- memset (&mbs, '\0', sizeof (mbs));
-
- _REENT_CHECK_MISC(_REENT);
-
- retval = __mbtowc (_REENT, &pwc, &b, 1, __locale_charset (), &mbs);
-
- if (retval != 0 && retval != 1)
- return WEOF;
-
- return (wint_t)pwc;
-}