diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-06-07 20:37:26 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-06-07 20:37:26 (GMT) |
commit | fd60ef760f6d2e1800d6ea0b34d2d8e238cee1d2 (patch) | |
tree | e639a60fa99d0af99c8c9f30f63cb2a7e3b5e79b /generic | |
parent | 39afde6df737407f9cf37c924c6f7cd43bf6ad32 (diff) | |
download | tcl-fd60ef760f6d2e1800d6ea0b34d2d8e238cee1d2.zip tcl-fd60ef760f6d2e1800d6ea0b34d2d8e238cee1d2.tar.gz tcl-fd60ef760f6d2e1800d6ea0b34d2d8e238cee1d2.tar.bz2 |
Stick to TCL_CHANNEL_VERSION_4; it's all in alpha anyway!
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 8 | ||||
-rw-r--r-- | generic/tclIO.c | 21 |
2 files changed, 21 insertions, 8 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 5bfd72b..040143a 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,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.200 2005/06/07 14:03:49 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.201 2005/06/07 20:37:40 dkf Exp $ */ #ifndef _TCL @@ -1461,7 +1461,6 @@ typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_ ((Tcl_Time* timebuf, ClientData cli #define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2) #define TCL_CHANNEL_VERSION_3 ((Tcl_ChannelTypeVersion) 0x3) #define TCL_CHANNEL_VERSION_4 ((Tcl_ChannelTypeVersion) 0x4) -#define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5) /* * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc @@ -1603,16 +1602,13 @@ typedef struct Tcl_ChannelType { /* * Only valid in TCL_CHANNEL_VERSION_4 channels or later * TIP #218, Channel Thread Actions + * TIP #208 (part relating to truncation) */ Tcl_DriverThreadActionProc *threadActionProc; /* Procedure to call to notify * the driver of thread specific * activity for a channel. * May be NULL. */ - /* - * Only valid TCL_CHANNEL_VERSION_5 channels or later - * TIP#208 (part relating to truncation) - */ Tcl_DriverTruncateProc *truncateProc; /* Procedure to call to truncate the * underlying file to a particular diff --git a/generic/tclIO.c b/generic/tclIO.c index cea38a2..0aeb6b8 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.88 2005/06/07 02:10:21 dgp Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.89 2005/06/07 20:37:40 dkf Exp $ */ #include "tclInt.h" @@ -9438,11 +9438,28 @@ Tcl_ChannelThreadActionProc(chanTypePtr) } } +/* + *---------------------------------------------------------------------- + * + * Tcl_ChannelTruncateProc -- + * + * TIP #208 (subsection relating to truncation, based on TIP #206). + * Return the Tcl_DriverTruncateProc of the channel type. + * + * Results: + * A pointer to the proc. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc(chanTypePtr) Tcl_ChannelType *chanTypePtr; /* Pointer to channel type. */ { - if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_5)) { + if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_4)) { return chanTypePtr->truncateProc; } else { return NULL; |