]> pd.if.org Git - pdclib/blob - man3/mbsinit.3
dos2unix
[pdclib] / man3 / mbsinit.3
1 .\" This file is part of the Public Domain C Library (PDCLib).
2 .\" Permission is granted to use, modify, and / or redistribute at will.
3 .\"
4 .Dd
5 .Dt MBSINIT 3
6 .Os
7 .\"
8 .Sh NAME
9 .Nm mbsinit
10 .Nd determines multibyte conversion state
11 .\"
12 .Sh SYNOPSIS
13 .In wchar.h
14 .Fn "int mbsinit" "const mbstate_t *ps"
15 .In xlocale.h
16 .Fn "int mbsinit_l" "const mbstate_t *ps" "locale_t loc"
17 .\"
18 .Sh DESCRIPTION
19 .Fn mbsinit 
20 and
21 .Fn mbsinit_l 
22 shall return a nonzero value if the multibyte converison state pointed to by
23 .Va ps
24 corresponds to an initial conversion state. The interpretation of 
25 .Va *ps
26 is locale dependent; the only guarantee is that an
27 .Vt mbstate_t
28 object initialized to zero shall correspond to an initial conversion state. If
29 .Va ps
30 is
31 .Dv NULL ,
32 then a nonzero value shall be returned.
33 .\"
34 .Pp
35 The locale used for 
36 .Fn mbsinit
37 shall be the currently active locale; either the current thread locale as set by
38 .Xr uselocale 3
39 if one has been specified, or otherwise the global locale controlled by
40 .Xr setlocale 3 .
41 The locale used by 
42 .Fn mbsinit_l
43 is that specified by
44 .Va loc .
45 .\"
46 .Sh SEE ALSO
47 .Xr mbrtowc 3
48 .Xr wcrtomb 3
49 .Xr setlocale 3
50 .Xr uselocale 3
51 .\"
52 .Sh STANDARDS
53 .Fn mbsinit
54 is first defined in
55 .St -isoC-amd1 ;
56 .Fn mbsinit_l
57 is a nonstandard extension originating in Darwin. See
58 .Xr xlocale.h 3