wctrans(), wctrans_l

define wide character mapping 

Function


SYNOPSIS

#include <wctype.h>

wctrans_t wctrans(const char *charclass);

wctrans_t wctrans_l(const char *charclass, locale_t locale);


DESCRIPTION

The wctrans() and wctrans_l() functions are defined for valid character mapping names defined in the current thread, process or specified locale. The specified character class is a string identifying a generic character mapping name for which codeset-specific information is required. The following character mapping names are defined in all locales:

"tolower"
"toupper"

The wctrans() function returns a value of type wctrans_t, which can be used as the second argument to subsequent calls to towctrans().

The wctrans_l() function returns a value of type wctrans_t, which can be used as the second argument to subsequent calls to towctrans_l().

The wctrans() and wctrans_l() functions determines values of wctrans_t according to the rules of the coded character set defined by character mapping information in the program's, thread's or specified locale (category LC_CTYPE). The values returned by wctrans() are valid until a call to setlocale() that modifies the category LC_CTYPE. The values returned by wctrans_l() are valid in wctrans_l calls or until a call to uselocale() that modifies the per thread category LC_CTYPE.


PARAMETERS

charclass 

Is a character class name defining a mapping descriptor to be returned.


RETURN VALUES

On success, wctrans() and wctrans_l() return a non-zero object of type wctrans_t that can be used in calls to towctrans() and towctrans_l(). Otherwise it returns 0, and sets errno to one of the following values:

EINVAL 

The specified character mapping is not valid in the current process, thread or specified locale.


CONFORMANCE

wctrans() conforms to ANSI/ISO 9899-1990/AM 1-1995


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

The function wctrans() is MT-Safe as long as no thread calls setlocale() while this function is executing.

The function wctrans_l() is MT-Safe as long as no thread calls freelocale() on locale while this function is executing.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
newlocale(), setlocale(), towctrans(), towctrans_l(), towlower(), towlower_l(), towupper(), towupper_l(), uselocale()


PTC MKS Toolkit 10.3 Documentation Build 39.