summaryrefslogtreecommitdiff
path: root/src/wctype/wctrans.c
blob: 54a6e211d43be83077fb341d43ac5f2e57079477 (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
38
#include <wctype.h>
#include "string.h"
#include "nonstd/assert.h"
#include "nonstd/ctype.h"

/** lookup character translation **/
wctrans_t wctrans(const char * property)
{
	ASSERT_NONNULL(property);

	if (!strcmp(property, "tolower")) {
		return LOWER;
	} else if (!strcmp(property, "toupper")) {
		return UPPER;
	}

	return 0;
}

/***
The fn(wctrans) function looks up the wide character translation mapping
specified by the string arg(property), to be used as the arg(desc) parameter
to fn(towctrans).

At least the following mappings are supported: ctrans(tolower) and
ctrans(toupper).
***/

/* RETURN(0): arg(property) is not a recognized translation */
/* RETURN(NZ): a mapping identifier to be used as the arg(desc) parameter to fn(towctrans) */

/* UNSPECIFED: - */
/* IMPLEMENTATION: - */
/* LOCALE: LC_CTYPE */

/*
STDC(199409)
*/