Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

wctrans(3) Guardian Native C Library Calls Reference Manual
NAME
wctrans - Character transliteration function
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <wctype.h>
wctrans_t wctrans(const char *charclass);
PARAMETERS
charclass Describes the transliteration mapping.
DESCRIPTION
The wctrans() function is dened for valid character mapping names identified in the current
locale. The charclass paramter 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" and "toupper". The function returns a value of type wctrans_t,
which can be used as the second argument to subsequent calls of towctrans( ). The wctrans()
function determines values of wctrans_t according to the rules of the coded character set defined
by character mapping information in the locale (category LC_CTYPE) for the program. The
values returned by wctrans() are valid until a call to setlocale() that modifies the category
LC_CTYPE.
The strings "tolower" and "toupper" are reserved for the standard mapping names. In the follow-
ing list, functions in the left column are equivalent to functions in the right column.
towlower(wc) wctrans(wc, wctrans("tolower"))
towupper(wc) wctrans(wc, wctrans("toupper"))
RETURN VALUES
The wctrans() function returns (wchar_t)0 if the given character mapping name is not valid for
the current locale (category LC_CTYPE), otherwise it returns a non-zero object of type
wctrans_t that can be used in calls to towctrans().
ERRORS
If this condition occurs, the wctrans() function fails and sets errno to the corresponding value.
[EINVAL] The character mapping name pointed to by the charclass paramter is not valid in
the current locale.
RELATED INFORMATION
Functions: towctrans(3).
STANDARDS CONFORMANCE
The behavior of this function conforms to the ISO/IEC 9899:1999 standard.
7188 Hewlett-Packard Company 527192-018