blob: a2928a8b010a9b03fcd61de004151ea7bda4d3f2 (
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
|
#include <stdlib.h>
/** convert wide character to multibyte character **/
int wctomb(char * s, wchar_t wchar)
{
/* FIXME: forward dependency on AMD1 */
#if 0
static mbstate_t ps = 0;
return wcrtomb(s, wchar, &ps);
#else
(void)s; (void)wchar;
return 0;
#endif
}
/***
converts the wide character ARGUMENT(wchar) to a multibyte character, which is
stored at the address ARGUMENT(s). At most CONSTANT(MB_CUR_MAX) bytes are
stored.
If ARGUMENT(s) is CONSTANT(NULL), fn(wctomb) tests whether multibyte encodings
carry state dependency.
***/
/*
LC_CTYPE
RETURN(0, `If ARGUMENT(s) is CONSTANT(NULL), multibyte encodings do not have state dependencies')
RETURN(NONZERO, `If ARGUMENT(s) is CONSTANT(NULL), multibyte encodings do have state dependencies')
RETURN(-1, The value of ARGUMENT(wchar) does not correspond to a valid multibyte character)
RETURN(TYPE(int), The number of bytes contained in the multibyte character corresponding to ARGUMENT(wchar))
STDC(1)
*/
|