1mbsinit(3C)              Standard C Library Functions              mbsinit(3C)
2
3
4

NAME

6       mbsinit - determine conversion object status
7

SYNOPSIS

9       #include <wchar.h>
10
11       int mbsinit(const mbstate_t *ps);
12
13

DESCRIPTION

15       If  ps is not a null pointer, the mbsinit() function determines whether
16       the object pointed to by ps describes an initial conversion state.
17

RETURN VALUES

19       The mbsinit() function returns non-zero if  ps is a null pointer, or if
20       the pointed-to object describes an initial conversion state; otherwise,
21       it returns 0.
22
23
24       If an mbstate_t object is altered by any of the functions described  as
25       "restartable", and is then used with a different character sequence, or
26       in the other conversion direction, or with a different  LC_CTYPE  cate‐
27       gory setting than on earlier function calls, the behavior is undefined.
28       See environ(5).
29

ERRORS

31       No errors are defined.
32

USAGE

34       The mbstate_t object is used to describe the current  conversion  state
35       from  a  particular character sequence to a wide-character sequence (or
36       vice versa) under the rules of a particular  setting  of  the  LC_CTYPE
37       category of the current locale.
38
39
40       The  initial  conversion  state corresponds, for a conversion in either
41       direction, to the beginning of a new character sequence in the  initial
42       shift  state.   A  zero-valued  mbstate_t object is at least one way to
43       describe an initial conversion state.  A zero-valued  mbstate_t  object
44       can be used to initiate conversion involving any character sequence, in
45       any LC_CTYPE category setting.
46

ATTRIBUTES

48       See attributes(5) for descriptions of the following attributes:
49
50
51
52
53       ┌─────────────────────────────┬─────────────────────────────┐
54       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
55       ├─────────────────────────────┼─────────────────────────────┤
56       │Interface Stability          │Standard                     │
57       ├─────────────────────────────┼─────────────────────────────┤
58       │MT-Level                     │MT-Safe with exceptions      │
59       └─────────────────────────────┴─────────────────────────────┘
60

SEE ALSO

62       mbrlen(3C),  mbrtowc(3C),  mbsrtowcs(3C),  setlocale(3C),  wcrtomb(3C),
63       wcsrtombs(3C), attributes(5), environ(5), standards(5)
64

NOTES

66       The  mbsinit()  function  can  be used safely in multithreaded applica‐
67       tions, as long as setlocale(3C) is  not  being  called  to  change  the
68       locale.
69
70
71
72SunOS 5.11                        24 Jul 2002                      mbsinit(3C)
Impressum