summaryrefslogtreecommitdiff
path: root/src/stdlib/wctomb_s.c
blob: 6303b21ea51d3e3e6bd104bad10a3af5bec08c53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdlib.h>
#include "_stdlib.h"

/** convert wide character to multibyte character **/
errno_t wctomb_s(int * restrict status, char * restrict s, rsize_t smax, wchar_t wc)
{
	SIGNAL_SAFE(0);
	ASSERT_NOOVERLAP(status, sizeof(*status), s, smax);
	(void)status; (void)s; (void)smax; (void)wc;
	/* TODO */
	return 0;
}

/***
The fn(wctomb) function converts the wide character arg(wchar) to a multibyte
character, which is stored at the address arg(s). At most macro(MB_CUR_MAX)
bytes are stored.

If arg(s) is macro(NULL), fn(wctomb) tests whether multibyte encodings carry
state dependency.
***/

/* UNSPECIFIED: - */
/* UNDEFINED: - */
/* IMPLEMENTATION: - */
/* LOCALE: LC_CTYPE */

/* RETURN(0): if arg(s) is macro(NULL), multibyte encodings do not have state dependencies */
/* RETURN(NZ): if arg(s) is macro(NULL), multibyte encodings do have state dependencies */
/* RETURN(-1): the value of arg(wchar) does not correspond to a valid multibyte character */
/* RETURN: the number of bytes contained in the multibyte character corresponding to arg(wchar) */

/*
CEXT1(201112)
*/