Merge commit 'b31ca922c7346747131aed07c0c171ec2f573aac' into merges
[unleashed.git] / share / man / man3nsl / t_strerror.3nsl
blob015d50cbb327aa033c800df3f7543a258f0c870b
1 '\" te
2 .\"  Copyright 1994, The X/Open Company Ltd.  All Rights Reserved  Portions Copyright 1989 AT&T  Portions Copyright (c) 1998, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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 .\" http://www.opengroup.org/bookstore/.
5 .\" 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 .\"  This notice shall appear on any product containing this material.
7 .\" 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 .\" 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 .\" 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 T_STRERROR 3NSL "May 7, 1998"
11 .SH NAME
12 t_strerror \- produce an error message string
13 .SH SYNOPSIS
14 .LP
15 .nf
16 #include <xti.h>
21 \fBconst char *\fR\fBt_strerror\fR(\fBint\fR \fIerrnum\fR);
22 .fi
24 .SH DESCRIPTION
25 .sp
26 .LP
27 This routine is part of the \fBXTI\fR interfaces which evolved from the
28 \fBTLI\fR interfaces. \fBXTI\fR represents the future evolution of these
29 interfaces. However, \fBTLI\fR interfaces are supported for compatibility. When
30 using a \fBTLI\fR routine that has the same name as an \fBXTI\fR routine, the
31 \fBtiuser.h\fR header file must be used.  Refer to the  \fBTLI\fR
32 \fBCOMPATIBILITY\fR section for a description of differences between the two
33 interfaces.
34 .sp
35 .LP
36 The \fBt_strerror()\fR function maps the error number in \fIerrnum\fR that
37 corresponds to an XTI error to a language-dependent error message string and
38 returns a pointer to the string. The string pointed to will not be modified by
39 the program, but may be overwritten by a subsequent call to the
40 \fIt_strerror\fR function. The string is not terminated by a newline character.
41 The language for error message strings written by \fBt_strerror()\fR is that of
42 the current locale. If it is English, the error message string describing the
43 value in \fBt_errno\fR may be derived from the comments following the
44 \fBt_errno\fR codes defined in \fB<xti.h>\fR\&. If an error code is unknown,
45 and the language is English, \fBt_strerror()\fR returns the string:
46 .sp
47 .in +2
48 .nf
49 "<error>: error unknown"
50 .fi
51 .in -2
53 .sp
54 .LP
55 where <error> is the error number supplied as input.  In other languages, an
56 equivalent text is provided.
57 .SH VALID STATES
58 .sp
59 .LP
60 ALL - apart from \fBT_UNINIT\fR.
61 .SH RETURN VALUES
62 .sp
63 .LP
64 The function \fBt_strerror()\fR returns a pointer to the generated message
65 string.
66 .SH TLI COMPATIBILITY
67 .sp
68 .LP
69 The \fBXTI\fR and \fBTLI\fR interface definitions have common names but use
70 different header files. This, and other semantic differences between the two
71 interfaces are described in the subsections below.
72 .SS "Interface Header"
73 .sp
74 .LP
75 The \fBXTI\fR interfaces use the header file, \fBxti.h\fR. \fBTLI\fR interfaces
76 should \fInot\fR use this header.  They should use the header:
77 .br
78 .in +2
79 #include <tiuser.h>
80 .in -2
81 .SH ATTRIBUTES
82 .sp
83 .LP
84 See \fBattributes\fR(5)  for descriptions of the following attributes:
85 .sp
87 .sp
88 .TS
89 box;
90 c | c
91 l | l .
92 ATTRIBUTE TYPE  ATTRIBUTE VALUE
94 MT Level        Safe
95 .TE
97 .SH SEE ALSO
98 .sp
99 .LP
100 \fBt_errno\fR(3NSL), \fBt_error\fR(3NSL), \fBattributes\fR(5)