diff options
Diffstat (limited to 'doc/SetErrno.3')
| -rw-r--r-- | doc/SetErrno.3 | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/doc/SetErrno.3 b/doc/SetErrno.3 index 78adebd..21648b1 100644 --- a/doc/SetErrno.3 +++ b/doc/SetErrno.3 @@ -4,9 +4,8 @@ '\" 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.3 2000/01/26 21:36:35 ericm Exp $ -.so man.macros .TH Tcl_SetErrno 3 8.3 Tcl "Tcl Library Procedures" +.so man.macros .BS .SH NAME Tcl_SetErrno, Tcl_GetErrno, Tcl_ErrnoId, Tcl_ErrnoMsg \- manipulate errno to store and retrieve error codes @@ -20,14 +19,14 @@ void int \fBTcl_GetErrno\fR() .sp -char * +const char * \fBTcl_ErrnoId\fR() .sp -char * -\fBTcl_ErrnoMsg\fR() +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 @@ -50,11 +49,17 @@ via \fBerrno\fR should call \fBTcl_SetErrno\fR rather than setting 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 a string -representation of the current \fBerrno\fR value. \fBTcl_ErrnoId\fR +\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 -"EACCES". \fBTcl_ErrnoMsg\fR returns a human-readable string such as -"permission denied". The strings returned by these functions are +.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 |
