MBSINIT(3)

NAME
mbsinit, mbsinit_l - determine whether the state object is in initial state

SYNOPSIS
#include <wchar.h>
int
mbsinit(const mbstate_t *ps);
#include <xlocale.h>
int
mbsinit_l(const mbstate_t *ps, locale_t);

DESCRIPTION
mbsinit() and mbsinit_l() determine whether the state object pointed to by ps is in initial conversion state, or not.

The behavior of mbsinit() depends on the current locale, while the behavior of mbsinit_l() depends on the locale provided as parameter, see xlocale(3). ps may be a NULL pointer. In this case, mbsinit() will always return non-zero.

RETURN VALUES
mbsinit() returns:

0   The current state is not in initial state.

non-zero
    The current state is in initial state or ps is a NULL pointer.

ERRORS
No errors are defined.

STANDARDS
The mbsinit() conforms to POSIX 2008, ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”).