diff options
Diffstat (limited to 'doc/SetErrno.3')
| -rw-r--r-- | doc/SetErrno.3 | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/doc/SetErrno.3 b/doc/SetErrno.3 index d57263b..21648b1 100644 --- a/doc/SetErrno.3 +++ b/doc/SetErrno.3 @@ -4,12 +4,11 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetErrno.3,v 1.2 1998/09/14 18:39:50 stanton Exp $ +.TH Tcl_SetErrno 3 8.3 Tcl "Tcl Library Procedures" .so man.macros -.TH Tcl_SetErrno 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_SetErrno, Tcl_GetErrno \- manipulate errno to store and retrieve error codes +Tcl_SetErrno, Tcl_GetErrno, Tcl_ErrnoId, Tcl_ErrnoMsg \- manipulate errno to store and retrieve error codes .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -20,8 +19,14 @@ void int \fBTcl_GetErrno\fR() .sp +const char * +\fBTcl_ErrnoId\fR() +.sp +const char * +\fBTcl_ErrnoMsg\fR(\fIerrorCode\fR) +.sp .SH ARGUMENTS -.AS Tcl_Interp *errorCode in +.AS int errorCode .AP int errorCode in A POSIX error code such as \fBENOENT\fR. .BE @@ -43,6 +48,19 @@ via \fBerrno\fR should call \fBTcl_SetErrno\fR rather than setting \fBTcl_GetErrno\fR returns the current value of \fBerrno\fR. Procedures wishing to access \fBerrno\fR should call this procedure instead of accessing \fBerrno\fR directly. +.PP +\fBTcl_ErrnoId\fR and \fBTcl_ErrnoMsg\fR return string +representations of \fBerrno\fR values. \fBTcl_ErrnoId\fR +returns a machine-readable textual identifier such as +.QW EACCES +that corresponds to the current value of \fBerrno\fR. +\fBTcl_ErrnoMsg\fR returns a human-readable string such as +.QW "permission denied" +that corresponds to the value of its +\fIerrorCode\fR argument. The \fIerrorCode\fR argument is +typically the value returned by \fBTcl_GetErrno\fR. +The strings returned by these functions are +statically allocated and the caller must not free or modify them. .SH KEYWORDS errno, error code, global variables |
