mbsinit()

determines if object describes an initial conversion state 

Function


SYNOPSIS

#include <wchar.h>

int mbsinit(const mbstate_t *ps);


DESCRIPTION

If the specified pointer is not null, the mbsinit() function determines whether it describes an initial conversion state.

An mbstate_t object is used to describe the current conversion state from a particular character sequence to a wide character sequence (or vice-versa) under the rules of a particular setting of the LC_CTYPE locale category.

The initial conversion state corresponds, for a conversion in either direction, to the beginning of a new character sequence in the initial shift state. A zero valued mbstate_t object is at least one way to describe an initial conversion state. A zero valued mbstate_t object can be used to initiate conversion involving any character sequence, in any LC_CTYPE setting.

If an mbstate_t object is altered by any of the functions described as restartable, and is then used with a different character sequence, or in the other conversion directory, or with a different LC_CTYPE category setting than on earlier function calls, the behavior is undefined.


PARAMETERS

ps 

Points to the state variable to test.


RETURN VALUES

The mbsinit() function returns non-zero if ps is a null pointer, or if the pointed-to object describes an initial conversion state; otherwise, it returns zero.


CONFORMANCE

ANSI/ISO 9899-1990/AM 1-1995


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

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


PORTING ISSUES

None.


AVAILABILITY

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


SEE ALSO

Functions:
mbrlen(), mbrtowc(), mbsrtowcs(), setlocale(), wcrtomb(), wcsrtombs()


MKS Toolkit 9.3 Documentation Build 6.