| Click this button to go to the index for this section. |
mbsinit(3)
NAME
mbsinit - Determines whether a multibyte-character string is in the initial conversion stateLIBRARY
Standard C Library (libc.so, libc.a)SYNOPSIS
#include <wchar.h> int mbsinit( const mbstate_t *ps);STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: mbsinit(): ISO C Refer to the standards(5) reference page for more information about industry standards and associated tags.PARAMETERS
*ps Points to an mbstate object that contains the current conversion state of a string.DESCRIPTION
The mbsinit() function determines whether the character sequence being converted is in the initial conversion state; that is, the function determines whether the current character of a character sequence is a multibyte character in the initial shift state as defined by the LC_TYPE category of the current locale. Use this function along with the restartable conversion functions (mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs) to convert between multibyte- character and wide-character format. Only restartable conversion functions use an mbstate_t parameter. Therefore, results are undefined when restartable and nonrestartable conversion functions operate on the same arrays during a conversion operation.RESTRICTIONS
The mbsinit() function and restartable versions of conversion routines are functional only when used with locales that support shift state encoding. Currently, the DIGITAL UNIX product does not provide any locales that use shift state encoding and the mbsinit() function returns a nonzero value only to indicate that *ps is a null pointer.RETURN VALUES
The mbsinit() function returns a nonzero value if *ps is a null pointer or ps describes an initial conversion state; otherwise, the function returns zero.RELATED INFORMATION
Functions: mblen(3), mbstowcs(3), mbtowc(3), wcstombs(3), wctomb(3) Files: locale(4)