URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [tcl/] [doc/] [SetErrno.3] - Blame information for rev 578
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1996 Sun Microsystems, Inc.
|
3 |
|
|
'\"
|
4 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
5 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
6 |
|
|
'\"
|
7 |
|
|
'\" RCS: @(#) $Id: SetErrno.3,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
|
8 |
|
|
.so man.macros
|
9 |
|
|
.TH Tcl_SetErrno 3 7.5 Tcl "Tcl Library Procedures"
|
10 |
|
|
.BS
|
11 |
|
|
.SH NAME
|
12 |
|
|
Tcl_SetErrno, Tcl_GetErrno \- manipulate errno to store and retrieve error codes
|
13 |
|
|
.SH SYNOPSIS
|
14 |
|
|
.nf
|
15 |
|
|
\fB#include \fR
|
16 |
|
|
.sp
|
17 |
|
|
void
|
18 |
|
|
\fBTcl_SetErrno\fR(\fIerrorCode\fR)
|
19 |
|
|
.sp
|
20 |
|
|
int
|
21 |
|
|
\fBTcl_GetErrno\fR()
|
22 |
|
|
.sp
|
23 |
|
|
.SH ARGUMENTS
|
24 |
|
|
.AS Tcl_Interp *errorCode in
|
25 |
|
|
.AP int errorCode in
|
26 |
|
|
A POSIX error code such as \fBENOENT\fR.
|
27 |
|
|
.BE
|
28 |
|
|
|
29 |
|
|
.SH DESCRIPTION
|
30 |
|
|
.PP
|
31 |
|
|
\fBTcl_SetErrno\fR and \fBTcl_GetErrno\fR provide portable access
|
32 |
|
|
to the \fBerrno\fR variable, which is used to record a POSIX error
|
33 |
|
|
code after system calls and other operations such as \fBTcl_Gets\fR.
|
34 |
|
|
These procedures are necessary because global variable accesses cannot
|
35 |
|
|
be made across module boundaries on some platforms.
|
36 |
|
|
.PP
|
37 |
|
|
\fBTcl_SetErrno\fR sets the \fBerrno\fR variable to the value of the
|
38 |
|
|
\fIerrorCode\fR argument
|
39 |
|
|
C procedures that wish to return error information to their callers
|
40 |
|
|
via \fBerrno\fR should call \fBTcl_SetErrno\fR rather than setting
|
41 |
|
|
\fBerrno\fR directly.
|
42 |
|
|
.PP
|
43 |
|
|
\fBTcl_GetErrno\fR returns the current value of \fBerrno\fR.
|
44 |
|
|
Procedures wishing to access \fBerrno\fR should call this procedure
|
45 |
|
|
instead of accessing \fBerrno\fR directly.
|
46 |
|
|
|
47 |
|
|
.SH KEYWORDS
|
48 |
|
|
errno, error code, global variables
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.