tclIO.c File Reference#include "tclInt.h"
#include "tclIO.h"
#include <assert.h>
Go to the source code of this file.
|
Data Structures |
struct | ThreadSpecificData |
Defines |
#define | BytesLeft(bufPtr) ((bufPtr)->nextAdded - (bufPtr)->nextRemoved) |
#define | SpaceLeft(bufPtr) ((bufPtr)->bufLength - (bufPtr)->nextAdded) |
#define | IsBufferReady(bufPtr) ((bufPtr)->nextAdded > (bufPtr)->nextRemoved) |
#define | IsBufferEmpty(bufPtr) ((bufPtr)->nextAdded == (bufPtr)->nextRemoved) |
#define | IsBufferFull(bufPtr) ((bufPtr)->nextAdded >= (bufPtr)->bufLength) |
#define | IsBufferOverflowing(bufPtr) ((bufPtr)->nextAdded > (bufPtr)->bufLength) |
#define | InsertPoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextAdded) |
#define | RemovePoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextRemoved) |
#define | SetFlag(statePtr, flag) ((statePtr)->flags |= (flag)) |
#define | ResetFlag(statePtr, flag) ((statePtr)->flags &= ~(flag)) |
#define | HaveOpt(minLength, nameString) |
#define | GET_CHANNELSTATE(objPtr) ((ChannelState *) (objPtr)->internalRep.otherValuePtr) |
#define | SET_CHANNELSTATE(objPtr, storePtr) ((objPtr)->internalRep.otherValuePtr = (void *) (storePtr)) |
#define | ENCODING_LINESIZE 20 |
#define | UTF_EXPANSION_FACTOR 1024 |
Functions |
void | TclInitIOSubsystem (void) |
void | TclFinalizeIOSubsystem (void) |
void | Tcl_SetStdChannel (Tcl_Channel channel, int type) |
Tcl_Channel | Tcl_GetStdChannel (int type) |
void | Tcl_CreateCloseHandler (Tcl_Channel chan, Tcl_CloseProc *proc, ClientData clientData) |
void | Tcl_DeleteCloseHandler (Tcl_Channel chan, Tcl_CloseProc *proc, ClientData clientData) |
int | Tcl_IsStandardChannel (Tcl_Channel chan) |
void | Tcl_RegisterChannel (Tcl_Interp *interp, Tcl_Channel chan) |
int | Tcl_UnregisterChannel (Tcl_Interp *interp, Tcl_Channel chan) |
int | Tcl_DetachChannel (Tcl_Interp *interp, Tcl_Channel chan) |
Tcl_Channel | Tcl_GetChannel (Tcl_Interp *interp, const char *chanName, int *modePtr) |
int | TclGetChannelFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Channel *channelPtr, int *modePtr, int flags) |
Tcl_Channel | Tcl_CreateChannel (Tcl_ChannelType *typePtr, const char *chanName, ClientData instanceData, int mask) |
Tcl_Channel | Tcl_StackChannel (Tcl_Interp *interp, Tcl_ChannelType *typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan) |
int | Tcl_UnstackChannel (Tcl_Interp *interp, Tcl_Channel chan) |
Tcl_Channel | Tcl_GetStackedChannel (Tcl_Channel chan) |
Tcl_Channel | Tcl_GetTopChannel (Tcl_Channel chan) |
ClientData | Tcl_GetChannelInstanceData (Tcl_Channel chan) |
Tcl_ThreadId | Tcl_GetChannelThread (Tcl_Channel chan) |
Tcl_ChannelType * | Tcl_GetChannelType (Tcl_Channel chan) |
int | Tcl_GetChannelMode (Tcl_Channel chan) |
const char * | Tcl_GetChannelName (Tcl_Channel chan) |
int | Tcl_GetChannelHandle (Tcl_Channel chan, int direction, ClientData *handlePtr) |
void | Tcl_CutChannel (Tcl_Channel chan) |
void | Tcl_SpliceChannel (Tcl_Channel chan) |
int | Tcl_Close (Tcl_Interp *interp, Tcl_Channel chan) |
void | Tcl_ClearChannelHandlers (Tcl_Channel channel) |
int | Tcl_Write (Tcl_Channel chan, const char *src, int srcLen) |
int | Tcl_WriteRaw (Tcl_Channel chan, const char *src, int srcLen) |
int | Tcl_WriteChars (Tcl_Channel chan, const char *src, int len) |
int | Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj *objPtr) |
int | Tcl_Gets (Tcl_Channel chan, Tcl_DString *lineRead) |
int | Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj *objPtr) |
int | Tcl_Read (Tcl_Channel chan, char *dst, int bytesToRead) |
int | Tcl_ReadRaw (Tcl_Channel chan, char *bufPtr, int bytesToRead) |
int | Tcl_ReadChars (Tcl_Channel chan, Tcl_Obj *objPtr, int toRead, int appendFlag) |
int | Tcl_Ungets (Tcl_Channel chan, const char *str, int len, int atEnd) |
int | Tcl_Flush (Tcl_Channel chan) |
Tcl_WideInt | Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, int mode) |
Tcl_WideInt | Tcl_Tell (Tcl_Channel chan) |
int | Tcl_SeekOld (Tcl_Channel chan, int offset, int mode) |
int | Tcl_TellOld (Tcl_Channel chan) |
int | Tcl_TruncateChannel (Tcl_Channel chan, Tcl_WideInt length) |
int | Tcl_Eof (Tcl_Channel chan) |
int | Tcl_InputBlocked (Tcl_Channel chan) |
int | Tcl_InputBuffered (Tcl_Channel chan) |
int | Tcl_OutputBuffered (Tcl_Channel chan) |
int | Tcl_ChannelBuffered (Tcl_Channel chan) |
void | Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz) |
int | Tcl_GetChannelBufferSize (Tcl_Channel chan) |
int | Tcl_BadChannelOption (Tcl_Interp *interp, const char *optionName, const char *optionList) |
int | Tcl_GetChannelOption (Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, Tcl_DString *dsPtr) |
int | Tcl_SetChannelOption (Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, const char *newValue) |
void | Tcl_NotifyChannel (Tcl_Channel channel, int mask) |
void | Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, Tcl_ChannelProc *proc, ClientData clientData) |
void | Tcl_DeleteChannelHandler (Tcl_Channel chan, Tcl_ChannelProc *proc, ClientData clientData) |
void | TclChannelEventScriptInvoker (ClientData clientData, int mask) |
int | Tcl_FileEventObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
int | TclCopyChannel (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr) |
int | Tcl_GetChannelNames (Tcl_Interp *interp) |
int | Tcl_GetChannelNamesEx (Tcl_Interp *interp, const char *pattern) |
int | Tcl_IsChannelRegistered (Tcl_Interp *interp, Tcl_Channel chan) |
int | Tcl_IsChannelShared (Tcl_Channel chan) |
int | Tcl_IsChannelExisting (const char *chanName) |
const char * | Tcl_ChannelName (const Tcl_ChannelType *chanTypePtr) |
Tcl_ChannelTypeVersion | Tcl_ChannelVersion (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverBlockModeProc * | Tcl_ChannelBlockModeProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverCloseProc * | Tcl_ChannelCloseProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverClose2Proc * | Tcl_ChannelClose2Proc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverInputProc * | Tcl_ChannelInputProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverOutputProc * | Tcl_ChannelOutputProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverSeekProc * | Tcl_ChannelSeekProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverSetOptionProc * | Tcl_ChannelSetOptionProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverGetOptionProc * | Tcl_ChannelGetOptionProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverWatchProc * | Tcl_ChannelWatchProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverGetHandleProc * | Tcl_ChannelGetHandleProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverFlushProc * | Tcl_ChannelFlushProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverHandlerProc * | Tcl_ChannelHandlerProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverWideSeekProc * | Tcl_ChannelWideSeekProc (const Tcl_ChannelType *chanTypePtr) |
Tcl_DriverThreadActionProc * | Tcl_ChannelThreadActionProc (const Tcl_ChannelType *chanTypePtr) |
void | Tcl_SetChannelErrorInterp (Tcl_Interp *interp, Tcl_Obj *msg) |
void | Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj *msg) |
void | Tcl_GetChannelErrorInterp (Tcl_Interp *interp, Tcl_Obj **msg) |
void | Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj **msg) |
Tcl_DriverTruncateProc * | Tcl_ChannelTruncateProc (const Tcl_ChannelType *chanTypePtr) |
Define Documentation
#define BytesLeft |
( |
bufPtr |
|
) |
((bufPtr)->nextAdded - (bufPtr)->nextRemoved) |
#define ENCODING_LINESIZE 20 |
#define HaveOpt |
( |
minLength, |
|
|
nameString |
|
) |
|
#define InsertPoint |
( |
bufPtr |
|
) |
((bufPtr)->buf + (bufPtr)->nextAdded) |
#define IsBufferEmpty |
( |
bufPtr |
|
) |
((bufPtr)->nextAdded == (bufPtr)->nextRemoved) |
#define IsBufferFull |
( |
bufPtr |
|
) |
((bufPtr)->nextAdded >= (bufPtr)->bufLength) |
#define IsBufferOverflowing |
( |
bufPtr |
|
) |
((bufPtr)->nextAdded > (bufPtr)->bufLength) |
#define IsBufferReady |
( |
bufPtr |
|
) |
((bufPtr)->nextAdded > (bufPtr)->nextRemoved) |
#define RemovePoint |
( |
bufPtr |
|
) |
((bufPtr)->buf + (bufPtr)->nextRemoved) |
#define SET_CHANNELSTATE |
( |
objPtr, |
|
|
storePtr |
|
) |
((objPtr)->internalRep.otherValuePtr = (void *) (storePtr)) |
#define SpaceLeft |
( |
bufPtr |
|
) |
((bufPtr)->bufLength - (bufPtr)->nextAdded) |
#define UTF_EXPANSION_FACTOR 1024 |
Function Documentation
int Tcl_BadChannelOption |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
optionName, |
|
|
const char * |
optionList | |
|
) |
| | |
Definition at line 7001 of file tclIO.c.
References ckfree, EINVAL, Tcl_AppendResult(), Tcl_DStringAppend(), Tcl_DStringFree(), Tcl_DStringInit(), Tcl_DStringValue, TCL_ERROR, TCL_OK, Tcl_Panic(), Tcl_ResetResult(), Tcl_SetErrno(), and Tcl_SplitList().
Tcl_DriverBlockModeProc* Tcl_ChannelBlockModeProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
int Tcl_ChannelBuffered |
( |
Tcl_Channel |
chan |
) |
|
Tcl_DriverClose2Proc* Tcl_ChannelClose2Proc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverCloseProc* Tcl_ChannelCloseProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverFlushProc* Tcl_ChannelFlushProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverGetHandleProc* Tcl_ChannelGetHandleProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverGetOptionProc* Tcl_ChannelGetOptionProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverHandlerProc* Tcl_ChannelHandlerProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverInputProc* Tcl_ChannelInputProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverOutputProc* Tcl_ChannelOutputProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverSeekProc* Tcl_ChannelSeekProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverSetOptionProc* Tcl_ChannelSetOptionProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverThreadActionProc* Tcl_ChannelThreadActionProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverTruncateProc* Tcl_ChannelTruncateProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverWatchProc* Tcl_ChannelWatchProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
Tcl_DriverWideSeekProc* Tcl_ChannelWideSeekProc |
( |
const Tcl_ChannelType * |
chanTypePtr |
) |
|
void Tcl_ClearChannelHandlers |
( |
Tcl_Channel |
channel |
) |
|
Definition at line 3039 of file tclIO.c.
References ChannelHandler::chanPtr, ckfree, NextChannelHandler::nestedHandlerPtr, ThreadSpecificData::nestedHandlerPtr, NextChannelHandler::nextHandlerPtr, EventScriptRecord::nextPtr, ChannelHandler::nextPtr, EventScriptRecord::scriptPtr, Channel::state, Tcl_DeleteTimerHandler(), TCL_TSD_INIT, and TclDecrRefCount.
Referenced by Tcl_Close().
int Tcl_Close |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan | |
|
) |
| | |
Definition at line 2880 of file tclIO.c.
References BUFFER_READY, CHANNEL_CLOSED, CHANNEL_INCLOSE, ckfree, CloseCallback::clientData, Tcl_ChannelType::close2Proc, Tcl_ChannelType::closeProc, EINVAL, Channel::instanceData, IsBufferReady, CloseCallback::nextPtr, CloseCallback::proc, ResetFlag, SetFlag, Channel::state, Tcl_AppendResult(), Tcl_ClearChannelHandlers(), TCL_CLOSE2PROC, TCL_CLOSE_READ, TCL_ENCODING_END, TCL_ERROR, TCL_OK, Tcl_Panic(), Tcl_SetChannelErrorInterp(), TCL_WRITABLE, TclChanCaughtErrorBypass(), TclDecrRefCount, and Channel::typePtr.
Referenced by Tcl_ExecObjCmd(), Tcl_FSEvalFileEx(), Tcl_FSOpenFileChannel(), Tcl_OpenTcpClient(), Tcl_SourceRCFile(), Tcl_UnregisterChannel(), Tcl_UnstackChannel(), TclChanCreateObjCmd(), TclCleanupChildren(), TclCrossFilesystemCopy(), TclFinalizeIOSubsystem(), TclLoadFile(), and TclpOpenFileChannel().
Tcl_Channel Tcl_CreateChannel |
( |
Tcl_ChannelType * |
typePtr, |
|
|
const char * |
chanName, |
|
|
ClientData |
instanceData, |
|
|
int |
mask | |
|
) |
| | |
Definition at line 1216 of file tclIO.c.
References CHANNELBUFFER_DEFAULT_SIZE, ckalloc, Channel::downChanPtr, Channel::inQueueHead, Channel::inQueueTail, Channel::instanceData, Channel::state, ThreadSpecificData::stderrChannel, ThreadSpecificData::stderrInitialized, ThreadSpecificData::stdinChannel, ThreadSpecificData::stdinInitialized, ThreadSpecificData::stdoutChannel, ThreadSpecificData::stdoutInitialized, TCL_ENCODING_START, Tcl_GetEncoding(), Tcl_GetEncodingName(), Tcl_Panic(), TCL_PLATFORM_TRANSLATION, Tcl_RegisterChannel(), Tcl_SetStdChannel(), TCL_STDERR, TCL_STDIN, TCL_STDOUT, TCL_TRANSLATE_AUTO, TCL_TSD_INIT, TCL_WRITABLE, Channel::typePtr, and Channel::upChanPtr.
void Tcl_CreateChannelHandler |
( |
Tcl_Channel |
chan, |
|
|
int |
mask, |
|
|
Tcl_ChannelProc * |
proc, |
|
|
ClientData |
clientData | |
|
) |
| | |
void Tcl_CreateCloseHandler |
( |
Tcl_Channel |
chan, |
|
|
Tcl_CloseProc * |
proc, |
|
|
ClientData |
clientData | |
|
) |
| | |
void Tcl_CutChannel |
( |
Tcl_Channel |
chan |
) |
|
Definition at line 2706 of file tclIO.c.
References ChannelState::bottomChanPtr, ThreadSpecificData::firstCSPtr, Channel::instanceData, ChannelState::nextCSPtr, Channel::state, TCL_CHANNEL_THREAD_REMOVE, Tcl_ChannelThreadActionProc(), Tcl_Panic(), TCL_TSD_INIT, Channel::typePtr, and Channel::upChanPtr.
void Tcl_DeleteChannelHandler |
( |
Tcl_Channel |
chan, |
|
|
Tcl_ChannelProc * |
proc, |
|
|
ClientData |
clientData | |
|
) |
| | |
void Tcl_DeleteCloseHandler |
( |
Tcl_Channel |
chan, |
|
|
Tcl_CloseProc * |
proc, |
|
|
ClientData |
clientData | |
|
) |
| | |
int Tcl_DetachChannel |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan | |
|
) |
| | |
int Tcl_Eof |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_FileEventObjCmd |
( |
ClientData |
clientData, |
|
|
Tcl_Interp * |
interp, |
|
|
int |
objc, |
|
|
Tcl_Obj *const |
objv[] | |
|
) |
| | |
Definition at line 8318 of file tclIO.c.
References EventScriptRecord::interp, EventScriptRecord::mask, EventScriptRecord::nextPtr, EventScriptRecord::scriptPtr, Channel::state, Tcl_AppendResult(), TCL_ERROR, Tcl_GetChannel(), Tcl_GetIndexFromObj(), TCL_OK, Tcl_SetObjResult(), TCL_WRITABLE, Tcl_WrongNumArgs(), and TclGetString.
Referenced by TclInitChanCmd().
int Tcl_Flush |
( |
Tcl_Channel |
chan |
) |
|
Definition at line 5948 of file tclIO.c.
References BUFFER_READY, IsBufferReady, SetFlag, Channel::state, TCL_ERROR, TCL_OK, and TCL_WRITABLE.
Referenced by TCL_DECLARE_MUTEX(), Tcl_FlushObjCmd(), Tcl_StackChannel(), Tcl_UnstackChannel(), TclDefaultBgErrorHandlerObjCmd(), and TclFinalizeIOSubsystem().
Tcl_Channel Tcl_GetChannel |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
chanName, |
|
|
int * |
modePtr | |
|
) |
| | |
Definition at line 1090 of file tclIO.c.
References ChannelState::bottomChanPtr, ChannelState::channelName, ChannelState::flags, Channel::state, Tcl_AppendResult(), Tcl_FindHashEntry, Tcl_GetHashValue, Tcl_GetStdChannel(), TCL_READABLE, Tcl_SetErrorCode(), TCL_STDERR, TCL_STDIN, TCL_STDOUT, and TCL_WRITABLE.
int Tcl_GetChannelBufferSize |
( |
Tcl_Channel |
chan |
) |
|
void Tcl_GetChannelError |
( |
Tcl_Channel |
chan, |
|
|
Tcl_Obj ** |
msg | |
|
) |
| | |
int Tcl_GetChannelHandle |
( |
Tcl_Channel |
chan, |
|
|
int |
direction, |
|
|
ClientData * |
handlePtr | |
|
) |
| | |
ClientData Tcl_GetChannelInstanceData |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_GetChannelMode |
( |
Tcl_Channel |
chan |
) |
|
const char* Tcl_GetChannelName |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_GetChannelNamesEx |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
pattern | |
|
) |
| | |
Definition at line 9600 of file tclIO.c.
References ThreadSpecificData::stderrChannel, ThreadSpecificData::stdinChannel, ThreadSpecificData::stdoutChannel, TCL_ERROR, Tcl_FindHashEntry, Tcl_FirstHashEntry(), Tcl_GetHashValue, Tcl_ListObjAppendElement(), Tcl_NewStringObj(), Tcl_NextHashEntry(), TCL_OK, Tcl_SetObjResult(), Tcl_StringMatch(), TCL_TSD_INIT, TclDecrRefCount, TclMatchIsTrivial, and TclNewObj.
int Tcl_GetChannelOption |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan, |
|
|
const char * |
optionName, |
|
|
Tcl_DString * |
dsPtr | |
|
) |
| | |
Definition at line 7061 of file tclIO.c.
References CHANNEL_LINEBUFFERED, CHANNEL_NONBLOCKING, CHANNEL_UNBUFFERED, Tcl_ChannelType::getOptionProc, HaveOpt, Channel::instanceData, Channel::state, Tcl_BadChannelOption(), Tcl_DStringAppendElement(), Tcl_DStringEndSublist(), Tcl_DStringStartSublist(), TCL_ERROR, Tcl_GetEncodingName(), TCL_OK, TCL_READABLE, TCL_TRANSLATE_AUTO, TCL_TRANSLATE_CR, TCL_TRANSLATE_CRLF, TCL_WRITABLE, TclFormatInt, and Channel::typePtr.
int Tcl_Gets |
( |
Tcl_Channel |
chan, |
|
|
Tcl_DString * |
lineRead | |
|
) |
| | |
int Tcl_GetsObj |
( |
Tcl_Channel |
chan, |
|
|
Tcl_Obj * |
objPtr | |
|
) |
| | |
Definition at line 3941 of file tclIO.c.
References ThreadSpecificData::binaryEncoding, GetsState::bufPtr, Tcl_Obj::bytes, GetsState::bytesWrote, GetsState::charsWrote, GetsState::dstPtr, GetsState::encoding, INPUT_SAW_CR, ChannelBuffer::nextRemoved, GetsState::objPtr, GetsState::rawRead, RemovePoint, ResetFlag, SetFlag, GetsState::state, Channel::state, Tcl_CreateThreadExitHandler(), Tcl_ExternalToUtf(), Tcl_GetEncoding(), Tcl_Panic(), TCL_READABLE, TCL_TRANSLATE_AUTO, TCL_TRANSLATE_CR, TCL_TRANSLATE_CRLF, TCL_TRANSLATE_LF, TCL_TSD_INIT, TCL_UTF_MAX, TclGetStringFromObj, and GetsState::totalChars.
Referenced by Tcl_Gets(), Tcl_GetsObjCmd(), and Tcl_Main().
Tcl_Channel Tcl_GetStackedChannel |
( |
Tcl_Channel |
chan |
) |
|
Tcl_Channel Tcl_GetStdChannel |
( |
int |
type |
) |
|
Definition at line 427 of file tclIO.c.
References ThreadSpecificData::stderrChannel, ThreadSpecificData::stderrInitialized, ThreadSpecificData::stdinChannel, ThreadSpecificData::stdinInitialized, ThreadSpecificData::stdoutChannel, ThreadSpecificData::stdoutInitialized, Tcl_RegisterChannel(), TCL_STDERR, TCL_STDIN, TCL_STDOUT, TCL_TSD_INIT, and TclpGetDefaultStdChannel().
Referenced by Tcl_GetChannel(), Tcl_Main(), Tcl_MakeSafe(), Tcl_SourceRCFile(), TclCreatePipeline(), TclDefaultBgErrorHandlerObjCmd(), and TclpCreateProcess().
Tcl_Channel Tcl_GetTopChannel |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_InputBlocked |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_InputBuffered |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_IsChannelExisting |
( |
const char * |
chanName |
) |
|
int Tcl_IsChannelRegistered |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan | |
|
) |
| | |
int Tcl_IsChannelShared |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_IsStandardChannel |
( |
Tcl_Channel |
chan |
) |
|
void Tcl_NotifyChannel |
( |
Tcl_Channel |
channel, |
|
|
int |
mask | |
|
) |
| | |
Definition at line 7671 of file tclIO.c.
References BG_FLUSH_SCHEDULED, CHANNEL_NONBLOCKING, ChannelHandler::clientData, Channel::instanceData, ChannelHandler::mask, ThreadSpecificData::nestedHandlerPtr, NextChannelHandler::nestedHandlerPtr, NextChannelHandler::nextHandlerPtr, ChannelHandler::nextPtr, ChannelHandler::proc, SetFlag, Channel::state, Tcl_ChannelBlockModeProc(), Tcl_ChannelHandlerProc(), Tcl_Preserve(), TCL_READABLE, Tcl_Release(), TCL_TSD_INIT, TCL_WRITABLE, Channel::typePtr, and Channel::upChanPtr.
Referenced by TclChanPostEventObjCmd().
int Tcl_OutputBuffered |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_Read |
( |
Tcl_Channel |
chan, |
|
|
char * |
dst, |
|
|
int |
bytesToRead | |
|
) |
| | |
int Tcl_ReadChars |
( |
Tcl_Channel |
chan, |
|
|
Tcl_Obj * |
objPtr, |
|
|
int |
toRead, |
|
|
int |
appendFlag | |
|
) |
| | |
int Tcl_ReadRaw |
( |
Tcl_Channel |
chan, |
|
|
char * |
bufPtr, |
|
|
int |
bytesToRead | |
|
) |
| | |
void Tcl_RegisterChannel |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan | |
|
) |
| | |
Definition at line 819 of file tclIO.c.
References ChannelState::bottomChanPtr, Channel::state, Tcl_CreateHashEntry, Tcl_GetHashValue, Tcl_Panic(), and Tcl_SetHashValue.
Referenced by Tcl_CreateChannel(), Tcl_GetStdChannel(), Tcl_InterpObjCmd(), Tcl_OpenObjCmd(), Tcl_SocketObjCmd(), and TclChanCreateObjCmd().
Tcl_WideInt Tcl_Seek |
( |
Tcl_Channel |
chan, |
|
|
Tcl_WideInt |
offset, |
|
|
int |
mode | |
|
) |
| | |
Definition at line 6245 of file tclIO.c.
References BG_FLUSH_SCHEDULED, BUFFER_READY, CHANNEL_EOF, CHANNEL_NONBLOCKING, CHANNEL_STICKY_EOF, EINVAL, EOVERFLOW, INPUT_SAW_CR, Channel::instanceData, IsBufferReady, ResetFlag, SEEK_CUR, Tcl_ChannelType::seekProc, SetFlag, Channel::state, TCL_CHANNEL_VERSION_3, Tcl_InputBuffered(), Tcl_LongAsWide, TCL_MODE_BLOCKING, TCL_MODE_NONBLOCKING, Tcl_OutputBuffered(), TCL_READABLE, Tcl_SetErrno(), Tcl_WideAsLong, TCL_WRITABLE, Channel::typePtr, and Tcl_ChannelType::wideSeekProc.
Referenced by Tcl_FSOpenFileChannel(), Tcl_SeekObjCmd(), Tcl_SeekOld(), Tcl_TruncateChannel(), and TclCleanupChildren().
int Tcl_SeekOld |
( |
Tcl_Channel |
chan, |
|
|
int |
offset, |
|
|
int |
mode | |
|
) |
| | |
void Tcl_SetChannelBufferSize |
( |
Tcl_Channel |
chan, |
|
|
int |
sz | |
|
) |
| | |
void Tcl_SetChannelError |
( |
Tcl_Channel |
chan, |
|
|
Tcl_Obj * |
msg | |
|
) |
| | |
int Tcl_SetChannelOption |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan, |
|
|
const char * |
optionName, |
|
|
const char * |
newValue | |
|
) |
| | |
Definition at line 7292 of file tclIO.c.
References CHANNEL_EOF, CHANNEL_LINEBUFFERED, CHANNEL_NEED_MORE_DATA, CHANNEL_STICKY_EOF, CHANNEL_UNBUFFERED, ckalloc, ckfree, HaveOpt, INPUT_SAW_CR, Channel::instanceData, IsBufferEmpty, ResetFlag, SetFlag, Tcl_ChannelType::setOptionProc, Channel::state, Tcl_AppendResult(), Tcl_BadChannelOption(), Tcl_ChannelName(), TCL_ENCODING_END, TCL_ENCODING_START, TCL_ERROR, Tcl_FreeEncoding(), Tcl_GetBoolean(), Tcl_GetEncoding(), Tcl_GetInt(), TCL_MODE_BLOCKING, TCL_MODE_NONBLOCKING, TCL_OK, TCL_PLATFORM_TRANSLATION, TCL_READABLE, Tcl_SetChannelBufferSize(), Tcl_SplitList(), TCL_TRANSLATE_AUTO, TCL_TRANSLATE_CR, TCL_TRANSLATE_CRLF, TCL_TRANSLATE_LF, TCL_WRITABLE, and Channel::typePtr.
void Tcl_SetStdChannel |
( |
Tcl_Channel |
channel, |
|
|
int |
type | |
|
) |
| | |
void Tcl_SpliceChannel |
( |
Tcl_Channel |
chan |
) |
|
Definition at line 2817 of file tclIO.c.
References ChannelState::bottomChanPtr, ThreadSpecificData::firstCSPtr, Channel::instanceData, Channel::state, TCL_CHANNEL_THREAD_INSERT, Tcl_ChannelThreadActionProc(), Tcl_GetCurrentThread(), Tcl_Panic(), TCL_TSD_INIT, Channel::typePtr, and Channel::upChanPtr.
Tcl_Channel Tcl_StackChannel |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_ChannelType * |
typePtr, |
|
|
ClientData |
instanceData, |
|
|
int |
mask, |
|
|
Tcl_Channel |
prevChan | |
|
) |
| | |
Definition at line 1410 of file tclIO.c.
References ckalloc, Channel::downChanPtr, ThreadSpecificData::firstCSPtr, Channel::inQueueHead, Channel::inQueueTail, Channel::instanceData, Channel::state, Tcl_AppendResult(), TCL_CHANNEL_THREAD_INSERT, Tcl_ChannelThreadActionProc(), Tcl_Flush(), Tcl_GetChannelName(), TCL_OK, TCL_READABLE, TCL_TSD_INIT, TCL_WRITABLE, ChannelState::topChanPtr, Channel::typePtr, and Channel::upChanPtr.
Referenced by TclChannelTransform().
Tcl_WideInt Tcl_Tell |
( |
Tcl_Channel |
chan |
) |
|
Definition at line 6432 of file tclIO.c.
References EINVAL, Channel::instanceData, SEEK_CUR, Tcl_ChannelType::seekProc, Channel::state, TCL_CHANNEL_VERSION_3, Tcl_InputBuffered(), Tcl_LongAsWide, Tcl_OutputBuffered(), TCL_READABLE, Tcl_SetErrno(), TCL_WRITABLE, Channel::typePtr, and Tcl_ChannelType::wideSeekProc.
Referenced by Tcl_TellObjCmd(), and Tcl_TellOld().
int Tcl_TellOld |
( |
Tcl_Channel |
chan |
) |
|
int Tcl_TruncateChannel |
( |
Tcl_Channel |
chan, |
|
|
Tcl_WideInt |
length | |
|
) |
| | |
Definition at line 6573 of file tclIO.c.
References EINVAL, ChannelState::flags, Channel::instanceData, SEEK_CUR, Channel::state, Tcl_ChannelTruncateProc(), TCL_ERROR, Tcl_LongAsWide, TCL_OK, Tcl_Seek(), Tcl_SetErrno(), TCL_WRITABLE, and Channel::typePtr.
int Tcl_Ungets |
( |
Tcl_Channel |
chan, |
|
|
const char * |
str, |
|
|
int |
len, |
|
|
int |
atEnd | |
|
) |
| | |
int Tcl_UnregisterChannel |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan | |
|
) |
| | |
Definition at line 884 of file tclIO.c.
References BG_FLUSH_SCHEDULED, BUFFER_READY, CHANNEL_CLOSED, CHANNEL_INCLOSE, IsBufferReady, SetFlag, Tcl_AppendResult(), Tcl_Close(), TCL_ERROR, TCL_OK, Tcl_Preserve(), and Tcl_Release().
Referenced by Tcl_CloseObjCmd(), Tcl_InterpObjCmd(), Tcl_MakeSafe(), and Tcltest_Init().
int Tcl_UnstackChannel |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
chan | |
|
) |
| | |
Definition at line 1589 of file tclIO.c.
References Tcl_ChannelType::close2Proc, Tcl_ChannelType::closeProc, Channel::downChanPtr, Channel::inQueueHead, Channel::inQueueTail, Channel::instanceData, Channel::state, Tcl_AppendResult(), TCL_CHANNEL_THREAD_REMOVE, Tcl_ChannelThreadActionProc(), Tcl_Close(), TCL_CLOSE2PROC, TCL_DYNAMIC, TCL_ERROR, Tcl_EventuallyFree(), Tcl_Flush(), Tcl_GetChannelName(), TCL_OK, TCL_READABLE, Tcl_SetErrno(), TCL_WRITABLE, TclChanCaughtErrorBypass(), Channel::typePtr, and Channel::upChanPtr.
Referenced by TclChannelTransform().
int Tcl_Write |
( |
Tcl_Channel |
chan, |
|
|
const char * |
src, |
|
|
int |
srcLen | |
|
) |
| | |
int Tcl_WriteChars |
( |
Tcl_Channel |
chan, |
|
|
const char * |
src, |
|
|
int |
len | |
|
) |
| | |
int Tcl_WriteObj |
( |
Tcl_Channel |
chan, |
|
|
Tcl_Obj * |
objPtr | |
|
) |
| | |
int Tcl_WriteRaw |
( |
Tcl_Channel |
chan, |
|
|
const char * |
src, |
|
|
int |
srcLen | |
|
) |
| | |
void TclChannelEventScriptInvoker |
( |
ClientData |
clientData, |
|
|
int |
mask | |
|
) |
| | |
Definition at line 8255 of file tclIO.c.
References EventScriptRecord::chanPtr, EventScriptRecord::interp, EventScriptRecord::mask, EventScriptRecord::scriptPtr, TCL_EVAL_GLOBAL, Tcl_EvalObjEx(), TCL_OK, Tcl_Preserve(), Tcl_Release(), TclBackgroundException(), and Channel::typePtr.
int TclCopyChannel |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Channel |
inChan, |
|
|
Tcl_Channel |
outChan, |
|
|
int |
toRead, |
|
|
Tcl_Obj * |
cmdPtr | |
|
) |
| | |
Definition at line 8415 of file tclIO.c.
References CopyState::bufSize, ChannelState::bufSize, CHANNEL_LINEBUFFERED, CHANNEL_NONBLOCKING, CHANNEL_UNBUFFERED, ckalloc, CopyState::cmdPtr, ChannelState::csPtr, ChannelState::flags, CopyState::interp, CopyState::readFlags, CopyState::readPtr, Channel::state, Tcl_AppendResult(), TCL_ERROR, Tcl_GetChannelName(), Tcl_IncrRefCount, TCL_MODE_BLOCKING, TCL_MODE_NONBLOCKING, TCL_OK, CopyState::toRead, CopyState::total, CopyState::writeFlags, and CopyState::writePtr.
Referenced by Tcl_FcopyObjCmd(), and TclCrossFilesystemCopy().
void TclFinalizeIOSubsystem |
( |
void |
|
) |
|
Definition at line 273 of file tclIO.c.
References CHANNEL_DEAD, ThreadSpecificData::firstCSPtr, SetFlag, ThreadSpecificData::stderrChannel, ThreadSpecificData::stdinChannel, ThreadSpecificData::stdoutChannel, Tcl_Close(), TCL_CLOSE2PROC, Tcl_Flush(), Tcl_SetChannelOption(), TCL_TSD_INIT, TclpFinalizePipes(), and TclpFinalizeSockets().
Referenced by Tcl_FinalizeThread().
int TclGetChannelFromObj |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Obj * |
objPtr, |
|
|
Tcl_Channel * |
channelPtr, |
|
|
int * |
modePtr, |
|
|
int |
flags | |
|
) |
| | |
Definition at line 1172 of file tclIO.c.
References GET_CHANNELSTATE, TCL_ERROR, TCL_OK, TCL_READABLE, and TCL_WRITABLE.
Referenced by Tcl_CloseObjCmd(), Tcl_EofObjCmd(), Tcl_FblockedObjCmd(), Tcl_FconfigureObjCmd(), Tcl_FcopyObjCmd(), Tcl_FlushObjCmd(), Tcl_GetsObjCmd(), Tcl_PutsObjCmd(), Tcl_ReadObjCmd(), Tcl_SeekObjCmd(), and Tcl_TellObjCmd().
void TclInitIOSubsystem |
( |
void |
|
) |
|
Generated on Wed Mar 12 12:18:32 2008 by
1.5.1
|