summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h8
-rw-r--r--generic/tclIO.c21
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;