1MBSINIT(3P)                POSIX Programmer's Manual               MBSINIT(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       mbsinit — determine conversion object status
13

SYNOPSIS

15       #include <wchar.h>
16
17       int mbsinit(const mbstate_t *ps);
18

DESCRIPTION

20       The functionality described on this reference page is aligned with  the
21       ISO C  standard.  Any  conflict between the requirements described here
22       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2017
23       defers to the ISO C standard.
24
25       If  ps  is  not  a null pointer, the mbsinit() function shall determine
26       whether the object pointed to by ps  describes  an  initial  conversion
27       state.
28

RETURN VALUE

30       The  mbsinit()  function shall return non-zero if ps is a null pointer,
31       or if the pointed-to object describes an initial conversion state; oth‐
32       erwise, it shall return zero.
33
34       If  an mbstate_t object is altered by any of the functions described as
35       ``restartable'', and is then used with a different character  sequence,
36       or in the other conversion direction, or with a different LC_CTYPE cat‐
37       egory setting than on earlier function calls,  the  behavior  is  unde‐
38       fined.
39

ERRORS

41       No errors are defined.
42
43       The following sections are informative.
44

EXAMPLES

46       None.
47

APPLICATION USAGE

49       The  mbstate_t  object is used to describe the current conversion state
50       from a particular character sequence to a wide-character  sequence  (or
51       vice  versa)  under  the  rules of a particular setting of the LC_CTYPE
52       category of the current locale.
53
54       The initial conversion state corresponds, for a  conversion  in  either
55       direction,  to the beginning of a new character sequence in the initial
56       shift state. A zero valued mbstate_t object is  at  least  one  way  to
57       describe  an  initial  conversion state. A zero valued mbstate_t object
58       can be used to initiate conversion involving any character sequence, in
59       any LC_CTYPE category setting.
60

RATIONALE

62       None.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

68       mbrlen(), mbrtowc(), mbsrtowcs(), wcrtomb(), wcsrtombs()
69
70       The Base Definitions volume of POSIX.1‐2017, <wchar.h>
71
73       Portions  of  this text are reprinted and reproduced in electronic form
74       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
75       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
76       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
77       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
78       event of any discrepancy between this version and the original IEEE and
79       The  Open Group Standard, the original IEEE and The Open Group Standard
80       is the referee document. The original Standard can be  obtained  online
81       at http://www.opengroup.org/unix/online.html .
82
83       Any  typographical  or  formatting  errors that appear in this page are
84       most likely to have been introduced during the conversion of the source
85       files  to  man page format. To report such errors, see https://www.ker
86       nel.org/doc/man-pages/reporting_bugs.html .
87
88
89
90IEEE/The Open Group                  2017                          MBSINIT(3P)
Impressum