blob: 7b57f5753907a02a6dc9dece83015aabeec2a5ab [file] [log] [blame]
/**
* 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;
}
return mbrtowc (NULL, mbs, count, state);
}