Last change
on this file since 577 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
400 bytes
|
Rev | Line | |
---|
[444] | 1 | #include <reent.h> |
---|
| 2 | #include <newlib.h> |
---|
| 3 | #include <wchar.h> |
---|
| 4 | #include <stdlib.h> |
---|
| 5 | #include <stdio.h> |
---|
| 6 | #include <errno.h> |
---|
| 7 | |
---|
| 8 | size_t |
---|
| 9 | mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps) |
---|
| 10 | { |
---|
| 11 | #ifdef _MB_CAPABLE |
---|
| 12 | if (ps == NULL) |
---|
| 13 | { |
---|
| 14 | struct _reent *reent = _REENT; |
---|
| 15 | |
---|
| 16 | _REENT_CHECK_MISC(reent); |
---|
| 17 | ps = &(_REENT_MBRLEN_STATE(reent)); |
---|
| 18 | } |
---|
| 19 | #endif |
---|
| 20 | |
---|
| 21 | return mbrtowc(NULL, s, n, ps); |
---|
| 22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.