Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/mbsinit.3c
+++ new/usr/src/man/man3c/mbsinit.3c
1 1 '\" te
2 +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
2 3 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
3 4 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 5 .\" http://www.opengroup.org/bookstore/.
5 6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 7 .\" This notice shall appear on any product containing this material.
7 8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
8 9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
9 10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 -.TH MBSINIT 3C "Jul 24, 2002"
11 +.TH MBSINIT 3C "Jun 23, 2014"
11 12 .SH NAME
12 -mbsinit \- determine conversion object status
13 +mbsinit,mbsinit_l \- determine conversion object status
13 14 .SH SYNOPSIS
14 15 .LP
15 16 .nf
16 17 #include <wchar.h>
17 18
18 19 \fBint\fR \fBmbsinit\fR(\fBconst mbstate_t *\fR\fIps\fR);
19 20 .fi
21 +.LP
22 +.nf
23 +#include <wchar.h>
24 +#include <xlocale.h>
20 25
26 +\fBint\fR \fBmbsinit_l\fR(\fBconst mbstate_t *\fR\fIps\fR, \fBlocale_t\fR \fIloc\fR);
27 +.fi
21 28 .SH DESCRIPTION
22 -.sp
23 29 .LP
24 30 If \fBps\fR is not a null pointer, the \fBmbsinit()\fR function determines
25 -whether the object pointed to by \fBps\fR describes an initial conversion
26 -state.
31 +whether the object pointed to by \fBps\fR describes an initial conversion state.
32 +.LP
33 +The function \fBmbsinit_l()\fR behaves identically to \fBmbsinit()\fR except the
34 +current locale is ignored and the locale \fIloc\fR is used instead.
27 35 .SH RETURN VALUES
28 -.sp
29 36 .LP
30 37 The \fBmbsinit()\fR function returns non-zero if \fBps\fR is a null pointer,
31 38 or if the pointed-to object describes an initial conversion state; otherwise,
32 39 it returns \fB0\fR.
33 -.sp
34 40 .LP
35 41 If an \fBmbstate_t\fR object is altered by any of the functions described as
36 42 "restartable", and is then used with a different character sequence, or in the
37 43 other conversion direction, or with a different \fBLC_CTYPE\fR category setting
38 44 than on earlier function calls, the behavior is undefined. See
39 45 \fBenviron\fR(5).
40 46 .SH ERRORS
41 -.sp
42 47 .LP
43 48 No errors are defined.
44 49 .SH USAGE
45 -.sp
46 50 .LP
47 51 The \fBmbstate_t\fR object is used to describe the current conversion state
48 52 from a particular character sequence to a wide-character sequence (or vice
49 53 versa) under the rules of a particular setting of the \fBLC_CTYPE\fR category
50 54 of the current locale.
51 -.sp
52 55 .LP
53 56 The initial conversion state corresponds, for a conversion in either direction,
54 57 to the beginning of a new character sequence in the initial shift state. A
55 58 zero-valued \fBmbstate_t\fR object is at least one way to describe an initial
56 59 conversion state. A zero-valued \fBmbstate_t\fR object can be used to initiate
57 60 conversion involving any character sequence, in any \fBLC_CTYPE\fR category
58 61 setting.
59 62 .SH ATTRIBUTES
60 -.sp
61 63 .LP
62 64 See \fBattributes\fR(5) for descriptions of the following attributes:
63 -.sp
64 -
65 -.sp
66 65 .TS
67 66 box;
68 67 c | c
69 68 l | l .
70 69 ATTRIBUTE TYPE ATTRIBUTE VALUE
71 70 _
72 -Interface Stability Standard
71 +Interface Stability See below.
73 72 _
74 -MT-Level MT-Safe with exceptions
73 +MT-Level MT-Safe
75 74 .TE
76 75
76 +.LP
77 +The
78 +.B mbsinit()
79 +function is Standard. The
80 +.B mbsinit_l()
81 +function is Uncommitted.
77 82 .SH SEE ALSO
78 -.sp
79 83 .LP
80 -\fBmbrlen\fR(3C), \fBmbrtowc\fR(3C), \fBmbsrtowcs\fR(3C), \fBsetlocale\fR(3C),
81 -\fBwcrtomb\fR(3C), \fBwcsrtombs\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
84 +\fBmbrlen\fR(3C), \fBmbrtowc\fR(3C), \fBmbsrtowcs\fR(3C),
85 +\fBnewlocale\fR(3C), \fBsetlocale\fR(3C),
86 +\fBwcrtomb\fR(3C), \fBwcsrtombs\fR(3C), \fBuselocale\fR(), \fBattributes\fR(5), \fBenviron\fR(5),
82 87 \fBstandards\fR(5)
83 -.SH NOTES
84 -.sp
85 -.LP
86 -The \fBmbsinit()\fR function can be used safely in multithreaded applications,
87 -as long as \fBsetlocale\fR(3C) is not being called to change the locale.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX