towctrans(), towctrans_l()

transliterate wide character 

Function


SYNOPSIS

#include <wctype.h>

wint_t towctrans(wint_t wc, wctrans_t desc);

wint_t towctrans_l(wint_t wc, wctrans_t desc, locale_t locale);


DESCRIPTION

The towctrans() function transliterates the specified wide character code using the specified mapping. The current setting of the LC_CTYPE locale category should be the same as during the call to wctrans() that returns the value of desc. If the value of desc is invalid (that is, not obtained by a call to wctrans() or desc is invalidated by a subsequent call to setlocale() that has affected the LC_CTYPE category), the result is undefined.

towctrans_l() behaves in the same way as towctrans() without the _l suffix, but uses the specified locale rather than the global or per-thread locale. A locale_t is returned by newlocale().


PARAMETERS

wc 

Is a wide character to transliterate.

desc 

Is the descriptor for the transliteration to be performed, as returned by wctrans().

locale 

Is a locale_t perhaps returned by newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set with uselocale().


RETURN VALUES

On success, towctrans() (and towctrans_l()) returns the mapped value of wc using the mapping described by desc. Otherwise it returns wc unchanged, and sets errno to one of the following values:

EINVAL 

desc contains an invalid transliteration descriptor.


CONFORMANCE

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


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

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

The function towctrans_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(), towlower(), towlower_l(), towupper(), towupper_l(), wctrans(), wctrans_l()


PTC MKS Toolkit 10.4 Documentation Build 39.