📄 getopnfl.3
字号:
'\"'\" Copyright (c) 1996-1997 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) GetOpnFl.3 1.3 97/04/23 16:14:43.so man.macros.TH Tcl_GetOpenFile 3 8.0 Tcl "Tcl Library Procedures".BS.SH NAMETcl_GetOpenFile \- Get a standard IO File * handle from a channel. (Unix only).SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spint\fBTcl_GetOpenFile\fR(\fIinterp, string, write, checkUsage, filePtr\fR).sp.SH ARGUMENTS.AS Tcl_Interp checkUsage.AP Tcl_Interp *interp inTcl interpreter from which file handle is to be obtained..AP char *string inString identifying channel, such as \fBstdin\fR or \fBfile4\fR..AP int write inNon-zero means the file will be used for writing, zero means it willbe used for reading..AP int checkUsage inIf non-zero, then an error will be generated if the file wasn't openedfor the access indicated by \fIwrite\fR..AP ClientData *filePtr outPoints to word in which to store pointer to FILE structure forthe file given by \fIstring\fR..BE.SH DESCRIPTION.PP\fBTcl_GetOpenFile\fR takes as argument a file identifier of the formreturned by the \fBopen\fR command andreturns at \fI*filePtr\fR a pointer to the FILE structure forthe file.The \fIwrite\fR argument indicates whether the FILE pointer willbe used for reading or writing.In some cases, such as a channel that connects to a pipeline ofsubprocesses, different FILE pointers will be returned for readingand writing.\fBTcl_GetOpenFile\fR normally returns TCL_OK.If an error occurs in \fBTcl_GetOpenFile\fR (e.g. \fIstring\fR didn'tmake any sense or \fIcheckUsage\fR was set and the file wasn't openedfor the access specified by \fIwrite\fR) then TCL_ERROR is returnedand \fIinterp->result\fR will contain an error message.In the current implementation \fIcheckUsage\fR is ignored and consistencychecks are always performed..VS.PPNote that this interface is only supported on the Unix platform..VE.SH KEYWORDSchannel, file handle, permissions, pipeline, read, write
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -