-/* c32rtomb(
- char *restrict s,
- char32_t c32,
- mbstate_t *restrict ps);
+/* c32rtomb( char *, char32_t, mbstate_t * )
This file is part of the Public Domain C Library (PDCLib).
Permission is granted to use, modify, and / or redistribute at will.
#include <stdint.h>
#include <assert.h>
#include <stdlib.h>
-#include <_PDCLIB_encoding.h>
-#include <_PDCLIB_locale.h>
+#include "_PDCLIB_encoding.h"
+#include "_PDCLIB_locale.h"
size_t c32rtomb_l(
char *restrict s,
locale_t restrict l
)
{
+ char buf[s ? 0 : MB_CUR_MAX];
+ s = s ? s : buf;
+
const char32_t *restrict psrc = &c32;
size_t srcsz = 1;
size_t dstsz = MB_CUR_MAX;
#endif
#ifdef TEST
-#include <_PDCLIB_test.h>
+#include "_PDCLIB_test.h"
int main( void )
{