blob: 06caa81b6855889bf44a06eb6308fff41776732b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <wchar.h>
#include "_wchar.h"
size_t mbrlen(const char * restrict s, size_t n, mbstate_t * restrict ps)
{
static mbstate_t internal = {0};
SIGNAL_SAFE(0);
ASSERT_MBSTATE(ps, MBTOW, NULL, NULL);
/* TODO: overlap */
return mbrtowc(NULL, s, n, ps != NULL ? ps : &internal);
}
/*
STDC(199409)
*/
|