diff options
author | midipix <writeonce@midipix.org> | 2017-11-11 14:25:38 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-11-25 11:30:31 -0500 |
commit | 0c84af4c4f4cb6c63487830c8e2b943d28d3221a (patch) | |
tree | debc5d015de0789703c97795fbaf706a490798be /src | |
parent | fa3616f801d6154048135288d0eb406d93cba3f4 (diff) | |
download | u16ports-0c84af4c4f4cb6c63487830c8e2b943d28d3221a.tar.bz2 u16ports-0c84af4c4f4cb6c63487830c8e2b943d28d3221a.tar.xz |
added u16_mbrtowc().
Diffstat (limited to 'src')
-rw-r--r-- | src/u16_mbrtowc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/u16_mbrtowc.c b/src/u16_mbrtowc.c new file mode 100644 index 0000000..9a83554 --- /dev/null +++ b/src/u16_mbrtowc.c @@ -0,0 +1,16 @@ +/*******************************************************************/ +/* u16ports: u16 variants of wide character string functions. */ +/* Copyright (C) 2017 Z. Gilboa */ +/* 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); +} |