xref: /openbsd-src/lib/libc/locale/mbsinit.3 (revision 4bc2832d0a071121eb4e4834063fc282081657a1)
1*4bc2832dSnaddy.\" $OpenBSD: mbsinit.3,v 1.4 2022/03/29 18:15:52 naddy Exp $
2561d433dSespie.\" $NetBSD: mbsinit.3,v 1.4 2003/04/16 13:34:40 wiz Exp $
3561d433dSespie.\"
4561d433dSespie.\" Copyright (c)2002 Citrus Project,
5561d433dSespie.\" All rights reserved.
6561d433dSespie.\"
7561d433dSespie.\" Redistribution and use in source and binary forms, with or without
8561d433dSespie.\" modification, are permitted provided that the following conditions
9561d433dSespie.\" are met:
10561d433dSespie.\" 1. Redistributions of source code must retain the above copyright
11561d433dSespie.\"    notice, this list of conditions and the following disclaimer.
12561d433dSespie.\" 2. Redistributions in binary form must reproduce the above copyright
13561d433dSespie.\"    notice, this list of conditions and the following disclaimer in the
14561d433dSespie.\"    documentation and/or other materials provided with the distribution.
15561d433dSespie.\"
16561d433dSespie.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17561d433dSespie.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18561d433dSespie.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19561d433dSespie.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20561d433dSespie.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21561d433dSespie.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22561d433dSespie.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23561d433dSespie.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24561d433dSespie.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25561d433dSespie.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26561d433dSespie.\" SUCH DAMAGE.
27561d433dSespie.\"
28*4bc2832dSnaddy.Dd $Mdocdate: March 29 2022 $
29561d433dSespie.Dt MBSINIT 3
30561d433dSespie.Os
31561d433dSespie.\" ----------------------------------------------------------------------
32561d433dSespie.Sh NAME
33561d433dSespie.Nm mbsinit
34561d433dSespie.Nd determines whether the state object is in initial state
35561d433dSespie.\" ----------------------------------------------------------------------
36561d433dSespie.Sh SYNOPSIS
3764d4e987Stedu.In wchar.h
38561d433dSespie.Ft int
39561d433dSespie.Fn mbsinit "const mbstate_t *ps"
40561d433dSespie.\" ----------------------------------------------------------------------
41561d433dSespie.Sh DESCRIPTION
42561d433dSespie.Fn mbsinit
43561d433dSespiedetermines whether the state object pointed to by
44561d433dSespie.Fa ps
45561d433dSespieis in initial conversion state, or not.
46561d433dSespie.Pp
47561d433dSespie.Fa ps
48561d433dSespiemay be a
49561d433dSespie.Dv NULL
50561d433dSespiepointer.
51561d433dSespieIn this case,
52561d433dSespie.Fn mbsinit
53561d433dSespiewill always return non-zero.
54561d433dSespie.\" ----------------------------------------------------------------------
55561d433dSespie.Sh RETURN VALUES
56561d433dSespie.Fn mbsinit
57561d433dSespiereturns:
58561d433dSespie.Bl -tag -width 0123456789
59561d433dSespie.It 0
60561d433dSespieThe current state is not in initial state.
61561d433dSespie.It non-zero
62561d433dSespieThe current state is in initial state or
63561d433dSespie.Fa ps
64561d433dSespieis a
65561d433dSespie.Dv NULL
66561d433dSespiepointer.
67561d433dSespie.El
68561d433dSespie.\" ----------------------------------------------------------------------
69561d433dSespie.Sh ERRORS
70561d433dSespieNo errors are defined.
71561d433dSespie.\" ----------------------------------------------------------------------
72561d433dSespie.Sh STANDARDS
73561d433dSespieThe
74561d433dSespie.Fn mbsinit
75*4bc2832dSnaddyfunction conforms to
76561d433dSespie.\" .St -isoC-amd1 .
77561d433dSespieISO/IEC 9899/AMD1:1995
78561d433dSespie.Pq Dq ISO C90, Amendment 1 .
79