Content-type: text/html Man page of mbsinit

mbsinit

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

mbsinit - Determines whether a multibyte-character string is in the initial conversion state  

LIBRARY

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

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 Tru64 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) delim off


 

Index

NAME
LIBRARY
SYNOPSIS
STANDARDS
PARAMETERS
DESCRIPTION
RESTRICTIONS
RETURN VALUES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:42:01 GMT, October 02, 2010