summaryrefslogtreecommitdiffhomepage
path: root/src/u16_mbrtowc.c
blob: 4d96c69b2cb97968b0bdac454b7422d141c2abf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*******************************************************************/
/*  u16ports: u16 variants of wide character string functions.     */
/*  Copyright (C) 2017  SysDeer Technologies, LLC                  */
/*  Released under the Standard MIT License; see COPYING.U16PORTS. */
/*******************************************************************/

#include <wchar.h>
#include <uchar.h>
#include <u16ports/u16ports.h>

static mbstate_t internal_state = {0};

size_t u16_mbrtowc(uint16_t * dst, const char * src, size_t len, mbstate_t * ps)
{
	return mbrtoc16(dst,src,len, ps ? ps : &internal_state);
}