| /** |
| * This file has no copyright assigned and is placed in the Public Domain. |
| * This file is part of the mingw-w64 runtime package. |
| * No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| */ |
| #include <wchar.h> |
| |
| size_t mbrlen ( |
| const char *__restrict__ mbs, |
| size_t count, |
| mbstate_t *__restrict__ state |
| ) { |
| /* Use private `mbstate_t` if caller did not supply one */ |
| if (state == NULL) { |
| static mbstate_t state_mbrlen = {0}; |
| state = &state_mbrlen; |
| } |
| wchar_t wc = WEOF; |
| return mbrtowc (&wc, mbs, count, state); |
| } |