diff options
Diffstat (limited to 'usr/src/man/man3c/wctomb.3c')
-rw-r--r-- | usr/src/man/man3c/wctomb.3c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/usr/src/man/man3c/wctomb.3c b/usr/src/man/man3c/wctomb.3c index 813907e9f5..f499f80fdb 100644 --- a/usr/src/man/man3c/wctomb.3c +++ b/usr/src/man/man3c/wctomb.3c @@ -1,4 +1,5 @@ '\" te +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved .\" 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 .\" http://www.opengroup.org/bookstore/. @@ -7,9 +8,9 @@ .\" 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. .\" 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. .\" 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] -.TH WCTOMB 3C "Aug 14, 2002" +.TH WCTOMB 3C "Jun 25, 2014" .SH NAME -wctomb \- convert a wide-character code to a character +wctomb, wctomb_l \- convert a wide-character code to a character .SH SYNOPSIS .LP .nf @@ -17,47 +18,43 @@ wctomb \- convert a wide-character code to a character \fBint\fR \fBwctomb\fR(\fBchar *\fR\fIs\fR, \fBwchar_t\fR \fIwchar\fR); .fi +.LP +.nf +#include <stdlib.h> +#include <xlocale.h> +\fBint\fR \fBwctomb_l\fR(\fBchar *\fR\fIs\fR, \fBwchar_t\fR \fIwchar\fR, \fBlocale_t\fR \fIloc\fR); +.fi .SH DESCRIPTION -.sp .LP The \fBwctomb()\fR function determines the number of bytes needed to represent the character corresponding to the wide-character code whose value is \fIwchar\fR. It stores the character representation (possibly multiple bytes) in the array object pointed to by \fIs\fR (if \fIs\fR is not a null pointer). At most \fBMB_CUR_MAX\fR bytes are stored. -.sp .LP A call with \fIs\fR as a null pointer causes this function to return \fB0\fR. The behavior of this function is affected by the \fBLC_CTYPE\fR category of the current locale. +.LP +The function \fBwctomb_l()\fR behaves identically to \fBwctomb()\fR, except +instead of operating in the current locale, it operates in the locale +specified by \fIloc\fR. .SH RETURN VALUES -.sp .LP If \fIs\fR is a null pointer, \fBwctomb()\fR returns \fB0\fR value. If \fIs\fR is not a null pointer, \fBwctomb()\fR returns \fB\(mi1\fR if the value of \fIwchar\fR does not correspond to a valid character, or returns the number of bytes that constitute the character corresponding to the value of \fIwchar\fR. -.sp .LP In no case will the value returned be greater than the value of the \fBMB_CUR_MAX\fR macro. .SH ERRORS -.sp .LP No errors are defined. -.SH USAGE -.sp -.LP -The \fBwctomb()\fR function can be used safely in a multithreaded application, -as long as \fBsetlocale\fR(3C) is not being called to change the locale. .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp .TS box; c | c @@ -66,13 +63,16 @@ ATTRIBUTE TYPE ATTRIBUTE VALUE _ CSI Enabled _ -Interface Stability Standard +Interface Stability See below. _ -MT-Level MT-Safe with exceptions +MT-Level MT-Safe .TE +.LP +The \fBwctomb()\fR function is Standard. The \fBwctomb_l()\fR function +is Uncommitted. .SH SEE ALSO -.sp .LP -\fBmblen\fR(3C), \fBmbstowcs\fR(3C), \fBmbtowc\fR(3C), \fBsetlocale\fR(3C), +\fBmblen\fR(3C), \fBmbstowcs\fR(3C), \fBmbtowc\fR(3C), +\fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBuselocale\fR(3C), \fBwcstombs\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5) |