X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fwchar%2Fwcrtomb.c;fp=functions%2Fwchar%2Fwcrtomb.c;h=e692923c53121d322f31f679845bb8c9b09d1ea2;hb=5fe150c45e1bfecf7b14d17d08317436e5bc53b4;hp=0000000000000000000000000000000000000000;hpb=27a26e4e6e80e36691f9eb2c9de62e5595dba388;p=pdclib diff --git a/functions/wchar/wcrtomb.c b/functions/wchar/wcrtomb.c new file mode 100644 index 0000000..e692923 --- /dev/null +++ b/functions/wchar/wcrtomb.c @@ -0,0 +1,48 @@ +/* wcrtomb( + char *restrict s, + wchar_t wc, + mbstate_t *restrict ps); + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#ifndef REGTEST +#include +#include +#include +#include +#include +#include <_PDCLIB_encoding.h> +#include <_PDCLIB_locale.h> + +size_t wcrtomb_l( + char *restrict s, + wchar_t wc, + mbstate_t *restrict ps, + locale_t restrict l +) +{ + return _PDCLIB_cwcrtomb_l(s, wc, ps, l); +} + +size_t wcrtomb( + char *restrict s, + wchar_t wc, + mbstate_t *restrict ps +) +{ + return _PDCLIB_cwcrtomb(s, wc, ps); +} + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + TESTCASE( NO_TESTDRIVER ); + return TEST_RESULTS; +} +#endif