GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TCL_GETOPENFILE (3)

NAME

Tcl_GetOpenFile - Return a FILE* for a channel registered in the given interpreter (Unix only)

CONTENTS

Synopsis
Arguments
Description
Keywords

SYNOPSIS

#include <tcl.h>

int Tcl_GetOpenFile(interp, chanID, write, checkUsage, filePtr)

ARGUMENTS


.TP 15 Tcl_Interp *interp (in)
Tcl_Interp*interp Tcl_Interp Tcl interpreter from which file handle is to be obtained.
.TP 15 const char *chanID (in)
const char*chanID const char String identifying channel, such as stdin or file4.
.TP 15 int write (in)
int       write int Non-zero means the file will be used for writing, zero means it will be used for reading.
.TP 15 int checkUsage (in)
int       checkUsage int If non-zero, then an error will be generated if the file was not opened for the access indicated by write.
.TP 15 ClientData *filePtr (out)
ClientData*filePtr ClientData Points to word in which to store pointer to FILE structure for the file given by chanID.

   








\L’|0u-1v’\l’75u+3n_’\L’0u+1v-0u’\l’|0u-1.5n_’



\L’|0u-1v’\L’0u+1v-0u’\l’|0u-1.5n_’





DESCRIPTION

Tcl_GetOpenFile takes as argument a file identifier of the form returned by the open command and returns at *filePtr a pointer to the FILE structure for the file. The write argument indicates whether the FILE pointer will 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. Tcl_GetOpenFile normally returns TCL_OK. If an error occurs in Tcl_GetOpenFile (e.g. chanID did not make any sense or checkUsage was set and the file was not opened for the access specified by write) then TCL_ERROR is returned and the interpreter’s result will contain an error message. In the current implementation checkUsage is ignored and consistency checks are always performed.

Note that this interface is only supported on the Unix platform.

KEYWORDS

channel, file handle, permissions, pipeline, read, write
Search for    or go to Top of page |  Section 3 |  Main Index


Tcl TCL_GETOPENFILE (3) 8.0

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.