source: azure_iot_hub/trunk/musl-1.1.18/src/multibyte/mbrtoc32.c@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 354 bytes
Line 
1#include <uchar.h>
2#include <wchar.h>
3
4size_t mbrtoc32(char32_t *restrict pc32, const char *restrict s, size_t n, mbstate_t *restrict ps)
5{
6 static unsigned internal_state;
7 if (!ps) ps = (void *)&internal_state;
8 if (!s) return mbrtoc32(0, "", 1, ps);
9 wchar_t wc;
10 size_t ret = mbrtowc(&wc, s, n, ps);
11 if (ret <= 4 && pc32) *pc32 = wc;
12 return ret;
13}
Note: See TracBrowser for help on using the repository browser.