Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6607 | serge | 1 | #include |
2 | #include |
||
3 | #include |
||
4 | #include |
||
5 | #include |
||
6 | #include |
||
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 | } |