12345678910111213141516171819202122232425262728293031323334353637383940 |
- #include <config.h>
- #include <wchar.h>
- #include <stdio.h>
- #include <stdlib.h>
- wint_t
- btowc (int c)
- {
- if (c != EOF)
- {
- char buf[1];
- wchar_t wc;
- buf[0] = c;
- if (mbtowc (&wc, buf, 1) >= 0)
- return wc;
- }
- return WEOF;
- }
|