source:
trunk/sys/dietlibc/btowc.c
@
90
| Last change on this file since 90 was 1, checked in by , 9 years ago | |
|---|---|
| File size: 220 bytes | |
| Rev | Line | |
|---|---|---|
| [1] | 1 | #include <wchar.h> |
| 2 | #include "dietlocale.h" | |
| 3 | ||
| 4 | wint_t btowc(int c) { | |
| 5 | if (c==EOF) return WEOF; | |
| 6 | switch (lc_ctype) { | |
| 7 | case CT_8BIT: | |
| 8 | return c>0xff?WEOF:1; | |
| 9 | case CT_UTF8: | |
| 10 | return c>0x7f?WEOF:1; | |
| 11 | } | |
| 12 | return WEOF; | |
| 13 | } |
Note: See TracBrowser
for help on using the repository browser.
