btowc(), btowc_l()

determine if character is a valid character in initial shift state 

Function


SYNOPSIS

#include <stdio.h>

#include <wchar.h>

wint_t btowc(int c);

#include <wchar.h>

#include <locale.h>

wint_t btowc_l(int c, locale_t locale);


DESCRIPTION

The btowc() function determines whether the specified character constitutes a valid (one-byte) character in the initial shift state. The behavior of this function is affected by the LC_CTYPE category of the current locale.

The _l-suffixed version take an explicit locale argument, while the non- suffixed versions use the current global or per-thread locale.


PARAMETERS

c 

Is the character to test.

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

The btowc() and btowc_l() functions return WEOF if c has the value EOF or if c does not constitute a valid (one-byte) character in the initial shift state. Otherwise, it returns the wide character representation of the character.


CONFORMANCE

IEEE Std 1003.1-2001 'POSIX.1'.


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

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

The function btowc_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(), wctob(), wctob_l()


PTC MKS Toolkit 10.4 Documentation Build 39.