1MBSINIT(3P) POSIX Programmer's Manual MBSINIT(3P)
2
3
4
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
11
13 mbsinit — determine conversion object status
14
16 #include <wchar.h>
17
18 int mbsinit(const mbstate_t *ps);
19
21 The functionality described on this reference page is aligned with the
22 ISO C standard. Any conflict between the requirements described here
23 and the ISO C standard is unintentional. This volume of POSIX.1‐2008
24 defers to the ISO C standard.
25
26 If ps is not a null pointer, the mbsinit() function shall determine
27 whether the object pointed to by ps describes an initial conversion
28 state.
29
31 The mbsinit() function shall return non-zero if ps is a null pointer,
32 or if the pointed-to object describes an initial conversion state; oth‐
33 erwise, it shall return zero.
34
35 If an mbstate_t object is altered by any of the functions described as
36 ``restartable'', and is then used with a different character sequence,
37 or in the other conversion direction, or with a different LC_CTYPE cat‐
38 egory setting than on earlier function calls, the behavior is unde‐
39 fined.
40
42 No errors are defined.
43
44 The following sections are informative.
45
47 None.
48
50 The mbstate_t object is used to describe the current conversion state
51 from a particular character sequence to a wide-character sequence (or
52 vice versa) under the rules of a particular setting of the LC_CTYPE
53 category of the current locale.
54
55 The initial conversion state corresponds, for a conversion in either
56 direction, to the beginning of a new character sequence in the initial
57 shift state. A zero valued mbstate_t object is at least one way to
58 describe an initial conversion state. A zero valued mbstate_t object
59 can be used to initiate conversion involving any character sequence, in
60 any LC_CTYPE category setting.
61
63 None.
64
66 None.
67
69 mbrlen(), mbrtowc(), mbsrtowcs(), wcrtomb(), wcsrtombs()
70
71 The Base Definitions volume of POSIX.1‐2008, <wchar.h>
72
74 Portions of this text are reprinted and reproduced in electronic form
75 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
76 -- Portable Operating System Interface (POSIX), The Open Group Base
77 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
78 cal and Electronics Engineers, Inc and The Open Group. (This is
79 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
80 event of any discrepancy between this version and the original IEEE and
81 The Open Group Standard, the original IEEE and The Open Group Standard
82 is the referee document. The original Standard can be obtained online
83 at http://www.unix.org/online.html .
84
85 Any typographical or formatting errors that appear in this page are
86 most likely to have been introduced during the conversion of the source
87 files to man page format. To report such errors, see https://www.ker‐
88 nel.org/doc/man-pages/reporting_bugs.html .
89
90
91
92IEEE/The Open Group 2013 MBSINIT(3P)