SYNOPSIS
#include <wchar.h>
int mbsinit(const mbstate_t *ps);
#include <wchar.h>
#include <locale.h>
int mbsinit_l(const mbstate_t *ps, locale_t locale);
DESCRIPTION
If the specified pointer is not
null, the
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.
- locale
-
Is a locale_t perhaps returned by
newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set withuselocale() .
RETURN VALUES
The
CONFORMANCE
MULTITHREAD SAFETY LEVEL
MT-Safe, with exceptions.
The
The function
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:
mbrlen() ,mbrlen_l() ,mbrtowc() ,mbrtowc_l() ,mbsnrtowcs() ,mbsnrtowcs_l() ,mbsrtowcs() ,mbsrtowcs_l() ,newlocale() ,setlocale() ,wcrtomb() ,wcrtomb_l() ,wcsrtombs() ,wcsrtombs_l()
PTC MKS Toolkit 10.4 Documentation Build 39.