diff options
author | hobbs <hobbs> | 2000-07-27 00:38:57 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-07-27 00:38:57 (GMT) |
commit | b27e37f784171db26b94f83d4ad68392351dace3 (patch) | |
tree | 00fd51cdc5570a90cae89c19a33351a1d2809754 | |
parent | 619ab717f62b2d18deaf53f5351340223d855dc7 (diff) | |
download | tcl-core_8_3_1_io_rewrite.zip tcl-core_8_3_1_io_rewrite.tar.gz tcl-core_8_3_1_io_rewrite.tar.bz2 |
* generic/tclStubInit.c:
merge_8_3_1_io_rewrite_07_26_00core_8_3_1_io_rewrite
* generic/tclDecls.h:
* generic/tcl.decls:
* generic/tcl.h:
* generic/tclIO.c: moved the Tcl_Channel* macros from tcl.h to
tclIO.c and made them proper stubbed functions. These are:
Tcl_ChannelName, Tcl_ChannelVersion, Tcl_ChannelBlockModeProc,
Tcl_ChannelCloseProc, Tcl_ChannelClose2Proc, Tcl_ChannelInputProc,
Tcl_ChannelOutputProc, Tcl_ChannelSeekProc, Tcl_ChannelSetOptionProc,
Tcl_ChannelGetOptionProc, Tcl_ChannelWatchProc,
Tcl_ChannelGetHandleProc, Tcl_ChannelFlushProc,
and Tcl_ChannelHandlerProc. These should be used to access the
Tcl_ChannelType structure instead of direct pointer dereferencing.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | generic/tcl.decls | 49 | ||||
-rw-r--r-- | generic/tcl.h | 38 | ||||
-rw-r--r-- | generic/tclDecls.h | 114 | ||||
-rw-r--r-- | generic/tclIO.c | 338 | ||||
-rw-r--r-- | generic/tclStubInit.c | 16 |
6 files changed, 534 insertions, 35 deletions
@@ -1,5 +1,19 @@ 2000-07-26 Jeff Hobbs <hobbs@scriptics.com> + * generic/tclStubInit.c: + * generic/tclDecls.h: + * generic/tcl.decls: + * generic/tcl.h: + * generic/tclIO.c: moved the Tcl_Channel* macros from tcl.h to + tclIO.c and made them proper stubbed functions. These are: + Tcl_ChannelName, Tcl_ChannelVersion, Tcl_ChannelBlockModeProc, + Tcl_ChannelCloseProc, Tcl_ChannelClose2Proc, Tcl_ChannelInputProc, + Tcl_ChannelOutputProc, Tcl_ChannelSeekProc, Tcl_ChannelSetOptionProc, + Tcl_ChannelGetOptionProc, Tcl_ChannelWatchProc, + Tcl_ChannelGetHandleProc, Tcl_ChannelFlushProc, + and Tcl_ChannelHandlerProc. These should be used to access the + Tcl_ChannelType structure instead of direct pointer dereferencing. + * unix/Makefile.in: undid 07-25 Makefile.in changes because we don't really want to force all private makefiles on everyone. This needs to be addressed again in the future. Best possible diff --git a/generic/tcl.decls b/generic/tcl.decls index 63fa08b..0c521e0 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.33.4.3 2000/07/25 16:54:47 kupries Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.33.4.4 2000/07/27 00:38:58 hobbs Exp $ library tcl @@ -1370,6 +1370,53 @@ declare 396 generic { declare 397 generic { int Tcl_ChannelBuffered (Tcl_Channel chan) } +declare 398 generic { + char * Tcl_ChannelName(Tcl_ChannelType *chanTypePtr) +} +declare 399 generic { + Tcl_ChannelTypeVersion Tcl_ChannelVersion(Tcl_ChannelType *chanTypePtr) +} +declare 400 generic { + Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc(Tcl_ChannelType \ + *chanTypePtr) +} +declare 401 generic { + Tcl_DriverCloseProc * Tcl_ChannelCloseProc(Tcl_ChannelType *chanTypePtr) +} +declare 402 generic { + Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc(Tcl_ChannelType *chanTypePtr) +} +declare 403 generic { + Tcl_DriverInputProc * Tcl_ChannelInputProc(Tcl_ChannelType *chanTypePtr) +} +declare 404 generic { + Tcl_DriverOutputProc * Tcl_ChannelOutputProc(Tcl_ChannelType *chanTypePtr) +} +declare 405 generic { + Tcl_DriverSeekProc * Tcl_ChannelSeekProc(Tcl_ChannelType *chanTypePtr) +} +declare 406 generic { + Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc(Tcl_ChannelType \ + *chanTypePtr) +} +declare 407 generic { + Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc(Tcl_ChannelType \ + *chanTypePtr) +} +declare 408 generic { + Tcl_DriverWatchProc * Tcl_ChannelWatchProc(Tcl_ChannelType *chanTypePtr) +} +declare 409 generic { + Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc(Tcl_ChannelType \ + *chanTypePtr) +} +declare 410 generic { + Tcl_DriverFlushProc * Tcl_ChannelFlushProc(Tcl_ChannelType *chanTypePtr) +} +declare 411 generic { + Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc(Tcl_ChannelType \ + *chanTypePtr) +} ############################################################################## diff --git a/generic/tcl.h b/generic/tcl.h index 7055abf..db46318 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.70.4.2 2000/07/17 23:09:54 hobbs Exp $ + * RCS: @(#) $Id: tcl.h,v 1.70.4.3 2000/07/27 00:38:58 hobbs Exp $ */ #ifndef _TCL @@ -386,7 +386,7 @@ typedef struct Tcl_ThreadId_ *Tcl_ThreadId; typedef struct Tcl_TimerToken_ *Tcl_TimerToken; typedef struct Tcl_Trace_ *Tcl_Trace; typedef struct Tcl_Var_ *Tcl_Var; -typedef struct Tcl_ChannelVersion_ *Tcl_ChannelVersion; +typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion; /* * Definition of the interface to procedures implementing threads. @@ -1154,8 +1154,8 @@ typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((Tcl_Time *timePtr)); * Channel version tag. This was introduced in 8.3.2/8.4. */ -#define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelVersion) 0x1) -#define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelVersion) 0x2) +#define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelTypeVersion) 0x1) +#define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2) /* * Typedefs for the various operations in a channel type: @@ -1236,13 +1236,16 @@ typedef enum Tcl_EolTranslation { * One such structure exists for each type (kind) of channel. * It collects together in one place all the functions that are * part of the specific channel type. + * + * It is recommend that the Tcl_Channel* functions are used to access + * elements of this structure, instead of direct accessing. */ typedef struct Tcl_ChannelType { char *typeName; /* The name of the channel type in Tcl * commands. This storage is owned by * channel type. */ - Tcl_ChannelVersion version; /* Version of the channel. */ + Tcl_ChannelTypeVersion version; /* Version of the channel type. */ Tcl_DriverCloseProc *closeProc; /* Procedure to call to close the * channel, or TCL_CLOSE2PROC if the * close2Proc should be used @@ -1280,31 +1283,6 @@ typedef struct Tcl_ChannelType { } Tcl_ChannelType; /* - * The following macros are provided as convenience functions - * for accessing the internals of the Tcl_ChannelType - */ - -#define Tcl_ChannelName(chanTypePtr) ((chanTypePtr)->typeName) -#define Tcl_ChannelVersion(chanTypePtr) \ - (((chanTypePtr)->version == TCL_CHANNEL_VERSION_2) ? \ - TCL_CHANNEL_VERSION_2 : TCL_CHANNEL_VERSION_1) -#define Tcl_ChannelBlockModeProc(chanTypePtr) \ - (((chanTypePtr)->version == TCL_CHANNEL_VERSION_2) ? \ - (chanTypePtr)->blockModeProc : \ - (Tcl_DriverBlockModeProc *) (chanTypePtr)->version) -#define Tcl_ChannelCloseProc(chanTypePtr) ((chanTypePtr)->closeProc) -#define Tcl_ChannelClose2Proc(chanTypePtr) ((chanTypePtr)->close2Proc) -#define Tcl_ChannelInputProc(chanTypePtr) ((chanTypePtr)->inputProc) -#define Tcl_ChannelOutputProc(chanTypePtr) ((chanTypePtr)->outputProc) -#define Tcl_ChannelSeekProc(chanTypePtr) ((chanTypePtr)->seekProc) -#define Tcl_ChannelSetOptionProc(chanTypePtr) ((chanTypePtr)->setOptionProc) -#define Tcl_ChannelGetOptionProc(chanTypePtr) ((chanTypePtr)->getOptionProc) -#define Tcl_ChannelWatchProc(chanTypePtr) ((chanTypePtr)->watchProc) -#define Tcl_ChannelGetHandleProc(chanTypePtr) ((chanTypePtr)->getHandleProc) -#define Tcl_ChannelFlushProc(chanTypePtr) ((chanTypePtr)->flushProc) -#define Tcl_ChannelHandlerProc(chanTypePtr) ((chanTypePtr)->handlerProc) - -/* * The following flags determine whether the blockModeProc above should * set the channel into blocking or nonblocking mode. They are passed * as arguments to the blockModeProc procedure in the above structure. diff --git a/generic/tclDecls.h b/generic/tclDecls.h index f61b350..8c7abf5 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.34.4.3 2000/07/25 16:54:48 kupries Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.34.4.4 2000/07/27 00:38:59 hobbs Exp $ */ #ifndef _TCLDECLS @@ -1238,6 +1238,48 @@ EXTERN int Tcl_WriteRaw _ANSI_ARGS_((Tcl_Channel chan, EXTERN Tcl_Channel Tcl_GetTopChannel _ANSI_ARGS_((Tcl_Channel chan)); /* 397 */ EXTERN int Tcl_ChannelBuffered _ANSI_ARGS_((Tcl_Channel chan)); +/* 398 */ +EXTERN char * Tcl_ChannelName _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 399 */ +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 400 */ +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 401 */ +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 402 */ +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 403 */ +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 404 */ +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 405 */ +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 406 */ +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 407 */ +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 408 */ +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 409 */ +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 410 */ +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); +/* 411 */ +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc _ANSI_ARGS_(( + Tcl_ChannelType * chanTypePtr)); typedef struct TclStubHooks { struct TclPlatStubs *tclPlatStubs; @@ -1703,6 +1745,20 @@ typedef struct TclStubs { int (*tcl_WriteRaw) _ANSI_ARGS_((Tcl_Channel chan, char * src, int srcLen)); /* 395 */ Tcl_Channel (*tcl_GetTopChannel) _ANSI_ARGS_((Tcl_Channel chan)); /* 396 */ int (*tcl_ChannelBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 397 */ + char * (*tcl_ChannelName) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 411 */ } TclStubs; #ifdef __cplusplus @@ -3340,6 +3396,62 @@ extern TclStubs *tclStubsPtr; #define Tcl_ChannelBuffered \ (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ #endif +#ifndef Tcl_ChannelName +#define Tcl_ChannelName \ + (tclStubsPtr->tcl_ChannelName) /* 398 */ +#endif +#ifndef Tcl_ChannelVersion +#define Tcl_ChannelVersion \ + (tclStubsPtr->tcl_ChannelVersion) /* 399 */ +#endif +#ifndef Tcl_ChannelBlockModeProc +#define Tcl_ChannelBlockModeProc \ + (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ +#endif +#ifndef Tcl_ChannelCloseProc +#define Tcl_ChannelCloseProc \ + (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ +#endif +#ifndef Tcl_ChannelClose2Proc +#define Tcl_ChannelClose2Proc \ + (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ +#endif +#ifndef Tcl_ChannelInputProc +#define Tcl_ChannelInputProc \ + (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ +#endif +#ifndef Tcl_ChannelOutputProc +#define Tcl_ChannelOutputProc \ + (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ +#endif +#ifndef Tcl_ChannelSeekProc +#define Tcl_ChannelSeekProc \ + (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ +#endif +#ifndef Tcl_ChannelSetOptionProc +#define Tcl_ChannelSetOptionProc \ + (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ +#endif +#ifndef Tcl_ChannelGetOptionProc +#define Tcl_ChannelGetOptionProc \ + (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ +#endif +#ifndef Tcl_ChannelWatchProc +#define Tcl_ChannelWatchProc \ + (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ +#endif +#ifndef Tcl_ChannelGetHandleProc +#define Tcl_ChannelGetHandleProc \ + (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ +#endif +#ifndef Tcl_ChannelFlushProc +#define Tcl_ChannelFlushProc \ + (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ +#endif +#ifndef Tcl_ChannelHandlerProc +#define Tcl_ChannelHandlerProc \ + (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclIO.c b/generic/tclIO.c index f1a6220..8f6e5e2 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.20.2.3.2.6 2000/07/25 16:54:49 kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.20.2.3.2.7 2000/07/27 00:39:00 hobbs Exp $ */ #include "tclInt.h" @@ -5298,7 +5298,7 @@ Tcl_ChannelBuffered(chan) Tcl_Channel chan; /* The channel to query. */ { Channel *chanPtr = (Channel *) chan; - /* State of real channel structure. */ + /* real channel structure. */ ChannelBuffer *bufPtr; int bytesBuffered; @@ -7942,3 +7942,337 @@ Tcl_GetChannelNamesEx(interp, pattern) } return TCL_OK; } + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelName -- + * + * Return the name of the channel type. + * + * Results: + * A pointer the name of the channel type. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +char * +Tcl_ChannelName(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->typeName); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelVersion -- + * + * Return the of version of the channel type. + * + * Results: + * TCL_CHANNEL_VERSION_2 or TCL_CHANNEL_VERSION_1. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_ChannelTypeVersion +Tcl_ChannelVersion(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + if (chanTypePtr->version == TCL_CHANNEL_VERSION_2) { + return TCL_CHANNEL_VERSION_2; + } else { + /* + * In <v2 channel versions, the version field is occupied + * by the Tcl_DriverBlockModeProc + */ + return TCL_CHANNEL_VERSION_1; + } +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelBlockModeProc -- + * + * Return the Tcl_DriverBlockModeProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverBlockModeProc * +Tcl_ChannelBlockModeProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + if (chanTypePtr->version == TCL_CHANNEL_VERSION_2) { + return (chanTypePtr->blockModeProc); + } else { + return (Tcl_DriverBlockModeProc *) (chanTypePtr->version); + } +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelCloseProc -- + * + * Return the Tcl_DriverCloseProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverCloseProc * +Tcl_ChannelCloseProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->closeProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelClose2Proc -- + * + * Return the Tcl_DriverClose2Proc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverClose2Proc * +Tcl_ChannelClose2Proc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->close2Proc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelInputProc -- + * + * Return the Tcl_DriverInputProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverInputProc * +Tcl_ChannelInputProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->inputProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelOutputProc -- + * + * Return the Tcl_DriverOutputProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverOutputProc * +Tcl_ChannelOutputProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->outputProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelSeekProc -- + * + * Return the Tcl_DriverSeekProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverSeekProc * +Tcl_ChannelSeekProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->seekProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelSetOptionProc -- + * + * Return the Tcl_DriverSetOptionProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverSetOptionProc * +Tcl_ChannelSetOptionProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->setOptionProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelGetOptionProc -- + * + * Return the Tcl_DriverGetOptionProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverGetOptionProc * +Tcl_ChannelGetOptionProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->getOptionProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelWatchProc -- + * + * Return the Tcl_DriverWatchProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverWatchProc * +Tcl_ChannelWatchProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->watchProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelGetHandleProc -- + * + * Return the Tcl_DriverGetHandleProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverGetHandleProc * +Tcl_ChannelGetHandleProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->getHandleProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelFlushProc -- + * + * Return the Tcl_DriverFlushProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverFlushProc * +Tcl_ChannelFlushProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->flushProc); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelHandlerProc -- + * + * Return the Tcl_DriverHandlerProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_DriverHandlerProc * +Tcl_ChannelHandlerProc(chanTypePtr) + Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ +{ + return (chanTypePtr->handlerProc); +} diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 3dc72df..ccf7451 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.35.4.4 2000/07/25 16:54:52 kupries Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.35.4.5 2000/07/27 00:39:03 hobbs Exp $ */ #include "tclInt.h" @@ -797,6 +797,20 @@ TclStubs tclStubs = { Tcl_WriteRaw, /* 395 */ Tcl_GetTopChannel, /* 396 */ Tcl_ChannelBuffered, /* 397 */ + Tcl_ChannelName, /* 398 */ + Tcl_ChannelVersion, /* 399 */ + Tcl_ChannelBlockModeProc, /* 400 */ + Tcl_ChannelCloseProc, /* 401 */ + Tcl_ChannelClose2Proc, /* 402 */ + Tcl_ChannelInputProc, /* 403 */ + Tcl_ChannelOutputProc, /* 404 */ + Tcl_ChannelSeekProc, /* 405 */ + Tcl_ChannelSetOptionProc, /* 406 */ + Tcl_ChannelGetOptionProc, /* 407 */ + Tcl_ChannelWatchProc, /* 408 */ + Tcl_ChannelGetHandleProc, /* 409 */ + Tcl_ChannelFlushProc, /* 410 */ + Tcl_ChannelHandlerProc, /* 411 */ }; /* !END!: Do not edit above this line. */ |