summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--doc/CrtChannel.310
-rw-r--r--generic/tcl.h8
-rw-r--r--generic/tclIO.c21
4 files changed, 31 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e336c0..6f35d6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-07 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclIO.c (Tcl_ChannelTruncateProc): Stop proliferation of
+ * generic/tcl.h: channel type versions
+ * doc/CrtChannel.3: following advice from AKu
+
2005-06-07 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
Bump patchlevel to a4 to distinguish from a3 release.
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index 570cd2d..f4751b5 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: CrtChannel.3,v 1.30 2005/06/06 23:45:42 dkf Exp $
+'\" RCS: @(#) $Id: CrtChannel.3,v 1.31 2005/06/07 20:37:40 dkf Exp $
.so man.macros
.TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures"
.BS
@@ -384,10 +384,8 @@ that you require. \fBTCL_CHANNEL_VERSION_2\fR is the minimum recommended.
\fBTCL_CHANNEL_VERSION_3\fR must be set to specifiy the \fIwideSeekProc\fR member.
.VS 8.5
\fBTCL_CHANNEL_VERSION_4\fR must be set to specifiy the
-\fIthreadActionProc\fR member (includes \fIwideSeekProc\fR), and
-\fBTCL_CHANNEL_VERSION_5\fR must be set to specify the
-\fItruncateProc\fR member (includes \fIwideSeekProc\fR and
-\fIthreadActionProc\fR).
+\fIthreadActionProc\fR and \fItruncateProc\fR members (includes
+\fIwideSeekProc\fR).
.VE 8.5
If it is not set to any of these, then this
\fBTcl_ChannelType\fR is assumed to have the original structure. See
@@ -398,7 +396,7 @@ least \fBTCL_CHANNEL_VERSION_2\fR to function correctly.
This value can be retrieved with \fBTcl_ChannelVersion\fR, which returns
one of
.VS 8.5
-\fBTCL_CHANNEL_VERSION_5\fR, \fBTCL_CHANNEL_VERSION_4\fR,
+\fBTCL_CHANNEL_VERSION_4\fR,
.VE 8.5
\fBTCL_CHANNEL_VERSION_3\fR,
\fBTCL_CHANNEL_VERSION_2\fR or \fBTCL_CHANNEL_VERSION_1\fR.
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;