summaryrefslogtreecommitdiff
path: root/src/wctype/towctrans.c
blob: 4dccfa64d506c92c67f9f82fc0055da0d2a3fea7 (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
36
37
#include <wctype.h>
#include <wchar.h>
#include "_wctype.h"

wint_t towctrans(wint_t wc, wctrans_t desc)
{
	SIGNAL_SAFE(0);
	ASSERT_REPRESENTABLE(wc, WCHAR_MIN, WCHAR_MAX, "wchar_t", WEOF);
	//ASSERT_REPRESENTABLE(desc, 1, __libc.wctype.nwctrans, "wctrans_t", 0);

	if (__get_locale()->ctype_epoch != (desc >> CT_EPOCH_SHIFT)) {
		UNDEFINED("LC_CTYPE has changed since the call to wctrans()");
	}

	/* TODO: actual work */
	(void)wc; (void)desc;

	return 0;
}

CHECK_2(wint_t, 0, towctrans, wint_t, wctrans_t)

/***
The fn(towctrans) function translates the wide character arg(wc) according to
mapping described by arg(desc), which must come from a previous call to
fn(wctrans), in the current locale.
***/

/* RETURN: the translated wide character */

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

/*
STDC(199409)
*/