diff options
Diffstat (limited to 'doc/GetOpnFl.3')
-rw-r--r-- | doc/GetOpnFl.3 | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/doc/GetOpnFl.3 b/doc/GetOpnFl.3 index e914b8f..38aa976 100644 --- a/doc/GetOpnFl.3 +++ b/doc/GetOpnFl.3 @@ -8,29 +8,29 @@ .TH Tcl_GetOpenFile 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_GetOpenFile \- Get a standard IO File * handle from a channel. (Unix only) +Tcl_GetOpenFile \- Return a FILE* for a channel registered in the given interpreter (Unix only) .SH SYNOPSIS .nf \fB#include <tcl.h>\fR .sp int -\fBTcl_GetOpenFile\fR(\fIinterp, string, write, checkUsage, filePtr\fR) +\fBTcl_GetOpenFile\fR(\fIinterp, chanID, write, checkUsage, filePtr\fR) .sp .SH ARGUMENTS -.AS Tcl_Interp checkUsage +.AS Tcl_Interp checkUsage out .AP Tcl_Interp *interp in Tcl interpreter from which file handle is to be obtained. -.AP "CONST char" *string in +.AP "const char" *chanID in String identifying channel, such as \fBstdin\fR or \fBfile4\fR. .AP int write in Non-zero means the file will be used for writing, zero means it will be used for reading. .AP int checkUsage in -If non-zero, then an error will be generated if the file wasn't opened +If non-zero, then an error will be generated if the file was not opened for the access indicated by \fIwrite\fR. .AP ClientData *filePtr out Points to word in which to store pointer to FILE structure for -the file given by \fIstring\fR. +the file given by \fIchanID\fR. .BE .SH DESCRIPTION @@ -44,17 +44,15 @@ be used for reading or writing. In some cases, such as a channel that connects to a pipeline of subprocesses, different FILE pointers will be returned for reading and writing. -\fBTcl_GetOpenFile\fR normally returns TCL_OK. -If an error occurs in \fBTcl_GetOpenFile\fR (e.g. \fIstring\fR didn't -make any sense or \fIcheckUsage\fR was set and the file wasn't opened -for the access specified by \fIwrite\fR) then TCL_ERROR is returned +\fBTcl_GetOpenFile\fR normally returns \fBTCL_OK\fR. +If an error occurs in \fBTcl_GetOpenFile\fR (e.g. \fIchanID\fR did not +make any sense or \fIcheckUsage\fR was set and the file was not opened +for the access specified by \fIwrite\fR) then \fBTCL_ERROR\fR is returned and the interpreter's result will contain an error message. In the current implementation \fIcheckUsage\fR is ignored and consistency checks are always performed. -.VS .PP Note that this interface is only supported on the Unix platform. -.VE .SH KEYWORDS channel, file handle, permissions, pipeline, read, write |