Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.613
diff -u -r1.613 ChangeLog
--- ChangeLog	2001/09/14 09:10:47	1.613
+++ ChangeLog	2001/09/14 14:24:09
@@ -1,3 +1,27 @@
+2001-09-14  Donal K. Fellows  <fellowsd@cs.man.ac.uk>
+
+	* generic/tclIOCmd.c (Tcl_SeekObjCmd, Tcl_TellObjCmd): These now
+	manipulate long Tcl_Objs.
+
+	* doc/CrtChannel.3 (SEEKPROC): 
+	* generic/tcl.h (Tcl_DriverSeekProc): 
+	* generic/tclIOGT.c (TransformSeekProc): 
+	* mac/tclMacChan.c (StdIOSeek, FileSeek): 
+	* unix/tclUnixChan.c (FileSeekProc): 
+	* win/tclWinChan.c (FileSeekProc): Changed the type declaration of
+	Tcl_DriverSeekProc to refer to a long-returning function; all
+	other changes ensue from this.
+
+	* generic/tclIO.c (Tcl_Seek, Tcl_Tell): Rewritten to use long
+	instead of int for file offsets.
+	* generic/tclIO.c (Tcl_SeekBackwardCompat, Tcl_TellBackwardCompat):
+	New backward compatability interfaces to preserve exact backward
+	compatability on systems where sizeof(int)!=sizeof(long) where
+	stubs are being used; NOT DOCUMENTED, AS NOT TO BE USED IN USER
+	CODE and the documented interface with the changed type is
+	preferred for all new code.
+	* doc/OpenFileChnl.3: Matching documentation update.
+
 2001-09-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
 
 	* win/Makefile.in:
Index: doc/CrtChannel.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/CrtChannel.3,v
retrieving revision 1.11
diff -u -r1.11 CrtChannel.3
--- doc/CrtChannel.3	2001/09/11 18:29:56	1.11
+++ doc/CrtChannel.3	2001/09/14 14:24:10
@@ -568,7 +568,7 @@
 prototype:
 .PP
 .CS
-typedef int Tcl_DriverSeekProc(
+typedef long Tcl_DriverSeekProc(
 	ClientData \fIinstanceData\fR,
 	long \fIoffset\fR,
 	int \fIseekMode\fR,
Index: doc/OpenFileChnl.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/OpenFileChnl.3,v
retrieving revision 1.12
diff -u -r1.12 OpenFileChnl.3
--- doc/OpenFileChnl.3	2001/09/11 18:29:56	1.12
+++ doc/OpenFileChnl.3	2001/09/14 14:24:10
@@ -100,10 +100,10 @@
 int
 \fBTcl_InputBuffered\fR(\fIchannel\fR)
 .sp
-int
+long
 \fBTcl_Seek\fR(\fIchannel, offset, seekMode\fR)
 .sp
-int
+long
 \fBTcl_Tell\fR(\fIchannel\fR)
 .sp
 int
@@ -191,7 +191,7 @@
 The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
 output to the channel.
 .VE
-.AP int offset in
+.AP long offset in
 How far to move the access point in the channel at which the next input or
 output operation will be applied, measured in bytes from the position
 given by \fIseekMode\fR.  May be either positive or negative.
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.58
diff -u -r1.58 tcl.decls
--- generic/tcl.decls	2001/09/13 11:56:19	1.58
+++ generic/tcl.decls	2001/09/14 14:24:10
@@ -772,8 +772,9 @@
 declare 219 generic {
     int Tcl_ScanCountedElement(CONST char *str, int length, int *flagPtr)
 }
+# REMOVE Tcl_SeekBackwardCompat AT MAJOR VERSION CHANGE
 declare 220 generic {
-    int Tcl_Seek(Tcl_Channel chan, int offset, int mode)
+    int Tcl_SeekBackwardCompat(Tcl_Channel chan, int offset, int mode)
 }
 declare 221 generic {
     int Tcl_ServiceAll(void)
@@ -859,8 +860,9 @@
 declare 245 generic {
     int Tcl_StringMatch(CONST char *str, CONST char *pattern)
 }
+# REMOVE Tcl_TellBackwardCompat AT MAJOR VERSION CHANGE
 declare 246 generic {
-    int Tcl_Tell(Tcl_Channel chan)
+    int Tcl_TellBackwardCompat(Tcl_Channel chan)
 }
 declare 247 generic {
     int Tcl_TraceVar(Tcl_Interp *interp, char *varName, int flags, \
@@ -1685,7 +1687,14 @@
 declare 481 generic {
     int Tcl_EvalTokensStandard(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count)
 }
- 
+# These are type-improved versions of the functions in slots 220 and 246
+declare 482 generic {
+    long Tcl_Seek(Tcl_Channel chan, long offset, int mode)
+}
+declare 483 generic {
+    long Tcl_Tell(Tcl_Channel chan)
+}
+
 ##############################################################################
 
 # Define the platform specific public Tcl interface.  These functions are
Index: generic/tcl.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
retrieving revision 1.101
diff -u -r1.101 tcl.h
--- generic/tcl.h	2001/09/09 22:45:13	1.101
+++ generic/tcl.h	2001/09/14 14:24:11
@@ -1340,7 +1340,7 @@
 		    char *buf, int toRead, int *errorCodePtr));
 typedef int	(Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
 		    char *buf, int toWrite, int *errorCodePtr));
-typedef int	(Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
+typedef long	(Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
 		    long offset, int mode, int *errorCodePtr));
 typedef int	(Tcl_DriverSetOptionProc) _ANSI_ARGS_((
 		    ClientData instanceData, Tcl_Interp *interp,
Index: generic/tclDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclDecls.h,v
retrieving revision 1.58
diff -u -r1.58 tclDecls.h
--- generic/tclDecls.h	2001/09/13 11:56:19	1.58
+++ generic/tclDecls.h	2001/09/14 14:24:12
@@ -711,8 +711,8 @@
 EXTERN int		Tcl_ScanCountedElement _ANSI_ARGS_((CONST char * str, 
 				int length, int * flagPtr));
 /* 220 */
-EXTERN int		Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan, int offset, 
-				int mode));
+EXTERN int		Tcl_SeekBackwardCompat _ANSI_ARGS_((Tcl_Channel chan, 
+				int offset, int mode));
 /* 221 */
 EXTERN int		Tcl_ServiceAll _ANSI_ARGS_((void));
 /* 222 */
@@ -787,7 +787,7 @@
 EXTERN int		Tcl_StringMatch _ANSI_ARGS_((CONST char * str, 
 				CONST char * pattern));
 /* 246 */
-EXTERN int		Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
+EXTERN int		Tcl_TellBackwardCompat _ANSI_ARGS_((Tcl_Channel chan));
 /* 247 */
 EXTERN int		Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp * interp, 
 				char * varName, int flags, 
@@ -1504,6 +1504,11 @@
 EXTERN int		Tcl_EvalTokensStandard _ANSI_ARGS_((
 				Tcl_Interp * interp, Tcl_Token * tokenPtr, 
 				int count));
+/* 482 */
+EXTERN long		Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan, long offset, 
+				int mode));
+/* 483 */
+EXTERN long		Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
 
 typedef struct TclStubHooks {
     struct TclPlatStubs *tclPlatStubs;
@@ -1783,7 +1788,7 @@
     void (*tcl_ResetResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 217 */
     int (*tcl_ScanElement) _ANSI_ARGS_((CONST char * str, int * flagPtr)); /* 218 */
     int (*tcl_ScanCountedElement) _ANSI_ARGS_((CONST char * str, int length, int * flagPtr)); /* 219 */
-    int (*tcl_Seek) _ANSI_ARGS_((Tcl_Channel chan, int offset, int mode)); /* 220 */
+    int (*tcl_SeekBackwardCompat) _ANSI_ARGS_((Tcl_Channel chan, int offset, int mode)); /* 220 */
     int (*tcl_ServiceAll) _ANSI_ARGS_((void)); /* 221 */
     int (*tcl_ServiceEvent) _ANSI_ARGS_((int flags)); /* 222 */
     void (*tcl_SetAssocData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 223 */
@@ -1809,7 +1814,7 @@
     void (*tcl_SplitPath) _ANSI_ARGS_((CONST char * path, int * argcPtr, char *** argvPtr)); /* 243 */
     void (*tcl_StaticPackage) _ANSI_ARGS_((Tcl_Interp * interp, char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc)); /* 244 */
     int (*tcl_StringMatch) _ANSI_ARGS_((CONST char * str, CONST char * pattern)); /* 245 */
-    int (*tcl_Tell) _ANSI_ARGS_((Tcl_Channel chan)); /* 246 */
+    int (*tcl_TellBackwardCompat) _ANSI_ARGS_((Tcl_Channel chan)); /* 246 */
     int (*tcl_TraceVar) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 247 */
     int (*tcl_TraceVar2) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 248 */
     char * (*tcl_TranslateFileName) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_DString * bufferPtr)); /* 249 */
@@ -2045,6 +2050,8 @@
     int (*tcl_OutputBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 479 */
     void (*tcl_FSMountsChanged) _ANSI_ARGS_((Tcl_Filesystem * fsPtr)); /* 480 */
     int (*tcl_EvalTokensStandard) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Token * tokenPtr, int count)); /* 481 */
+    long (*tcl_Seek) _ANSI_ARGS_((Tcl_Channel chan, long offset, int mode)); /* 482 */
+    long (*tcl_Tell) _ANSI_ARGS_((Tcl_Channel chan)); /* 483 */
 } TclStubs;
 
 #ifdef __cplusplus
@@ -2968,9 +2975,9 @@
 #define Tcl_ScanCountedElement \
 	(tclStubsPtr->tcl_ScanCountedElement) /* 219 */
 #endif
-#ifndef Tcl_Seek
-#define Tcl_Seek \
-	(tclStubsPtr->tcl_Seek) /* 220 */
+#ifndef Tcl_SeekBackwardCompat
+#define Tcl_SeekBackwardCompat \
+	(tclStubsPtr->tcl_SeekBackwardCompat) /* 220 */
 #endif
 #ifndef Tcl_ServiceAll
 #define Tcl_ServiceAll \
@@ -3072,9 +3079,9 @@
 #define Tcl_StringMatch \
 	(tclStubsPtr->tcl_StringMatch) /* 245 */
 #endif
-#ifndef Tcl_Tell
-#define Tcl_Tell \
-	(tclStubsPtr->tcl_Tell) /* 246 */
+#ifndef Tcl_TellBackwardCompat
+#define Tcl_TellBackwardCompat \
+	(tclStubsPtr->tcl_TellBackwardCompat) /* 246 */
 #endif
 #ifndef Tcl_TraceVar
 #define Tcl_TraceVar \
@@ -4012,6 +4019,14 @@
 #ifndef Tcl_EvalTokensStandard
 #define Tcl_EvalTokensStandard \
 	(tclStubsPtr->tcl_EvalTokensStandard) /* 481 */
+#endif
+#ifndef Tcl_Seek
+#define Tcl_Seek \
+	(tclStubsPtr->tcl_Seek) /* 482 */
+#endif
+#ifndef Tcl_Tell
+#define Tcl_Tell \
+	(tclStubsPtr->tcl_Tell) /* 483 */
 #endif
 
 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
Index: generic/tclIO.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIO.c,v
retrieving revision 1.35
diff -u -r1.35 tclIO.c
--- generic/tclIO.c	2001/09/06 09:35:39	1.35
+++ generic/tclIO.c	2001/09/14 14:24:13
@@ -5243,23 +5243,23 @@
  *----------------------------------------------------------------------
  */
 
-int
+long
 Tcl_Seek(chan, offset, mode)
     Tcl_Channel chan;		/* The channel on which to seek. */
-    int offset;			/* Offset to seek to. */
+    long offset;		/* Offset to seek to. */
     int mode;			/* Relative to which location to seek? */
 {
     Channel *chanPtr = (Channel *) chan;	/* The real IO channel. */
     ChannelState *statePtr = chanPtr->state;	/* state info for channel */
     int inputBuffered, outputBuffered;
     int result;			/* Of device driver operations. */
-    int curPos;			/* Position on the device. */
+    long curPos;		/* Position on the device. */
     int wasAsync;		/* Was the channel nonblocking before the
                                  * seek operation? If so, must restore to
                                  * nonblocking mode after the seek. */
 
     if (CheckChannelErrors(statePtr, TCL_WRITABLE | TCL_READABLE) != 0) {
-	return -1;
+	return -1L;
     }
 
     /*
@@ -5269,7 +5269,7 @@
      * registered in an interpreter.
      */
 
-    if (CheckForDeadChannel(NULL, statePtr)) return -1;
+    if (CheckForDeadChannel(NULL, statePtr)) return -1L;
 
     /*
      * This operation should occur at the top of a channel stack.
@@ -5284,7 +5284,7 @@
 
     if (chanPtr->typePtr->seekProc == (Tcl_DriverSeekProc *) NULL) {
         Tcl_SetErrno(EINVAL);
-        return -1;
+        return -1L;
     }
 
     /*
@@ -5297,7 +5297,7 @@
 
     if ((inputBuffered != 0) && (outputBuffered != 0)) {
         Tcl_SetErrno(EFAULT);
-        return -1;
+        return -1L;
     }
 
     /*
@@ -5336,7 +5336,7 @@
         wasAsync = 1;
         result = StackSetBlockMode(chanPtr, TCL_MODE_BLOCKING);
 	if (result != 0) {
-	    return -1;
+	    return -1L;
 	}
         statePtr->flags &= (~(CHANNEL_NONBLOCKING));
         if (statePtr->flags & BG_FLUSH_SCHEDULED) {
@@ -5353,7 +5353,7 @@
      */
     
     if (FlushChannel(NULL, chanPtr, 0) != 0) {
-        curPos = -1;
+        curPos = -1L;
     } else {
 
         /*
@@ -5362,8 +5362,8 @@
          */
 
         curPos = (chanPtr->typePtr->seekProc) (chanPtr->instanceData,
-                (long) offset, mode, &result);
-        if (curPos == -1) {
+					       offset, mode, &result);
+        if (curPos == -1L) {
             Tcl_SetErrno(result);
         }
     }
@@ -5379,7 +5379,7 @@
         statePtr->flags |= CHANNEL_NONBLOCKING;
         result = StackSetBlockMode(chanPtr, TCL_MODE_NONBLOCKING);
 	if (result != 0) {
-	    return -1;
+	    return -1L;
 	}
     }
 
@@ -5405,7 +5405,7 @@
  *----------------------------------------------------------------------
  */
 
-int
+long
 Tcl_Tell(chan)
     Tcl_Channel chan;			/* The channel to return pos for. */
 {
@@ -5413,10 +5413,10 @@
     ChannelState *statePtr = chanPtr->state;	/* state info for channel */
     int inputBuffered, outputBuffered;
     int result;				/* Of calling device driver. */
-    int curPos;				/* Position on device. */
+    long curPos;			/* Position on device. */
 
     if (CheckChannelErrors(statePtr, TCL_WRITABLE | TCL_READABLE) != 0) {
-	return -1;
+	return -1L;
     }
 
     /*
@@ -5427,7 +5427,7 @@
      */
 
     if (CheckForDeadChannel(NULL, statePtr)) {
-	return -1;
+	return -1L;
     }
 
     /*
@@ -5443,7 +5443,7 @@
 
     if (chanPtr->typePtr->seekProc == (Tcl_DriverSeekProc *) NULL) {
         Tcl_SetErrno(EINVAL);
-        return -1;
+        return -1L;
     }
 
     /*
@@ -5456,7 +5456,7 @@
 
     if ((inputBuffered != 0) && (outputBuffered != 0)) {
         Tcl_SetErrno(EFAULT);
-        return -1;
+        return -1L;
     }
 
     /*
@@ -5465,15 +5465,71 @@
      */
 
     curPos = (chanPtr->typePtr->seekProc) (chanPtr->instanceData,
-            (long) 0, SEEK_CUR, &result);
+					   0L, SEEK_CUR, &result);
     if (curPos == -1) {
         Tcl_SetErrno(result);
-        return -1;
+        return -1L;
     }
     if (inputBuffered != 0) {
         return (curPos - inputBuffered);
     }
     return (curPos + outputBuffered);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_SeekBackwardCompat --
+ *
+ *	Implements seeking on Tcl Channels. This function only exists
+ *	for backward compatability on systems where the sizes of int
+ *	and long are different, and should not be called by new code.
+ *
+ * Results:
+ *	The new access point or -1 on error. If error, use Tcl_GetErrno()
+ *	to retrieve the POSIX error code for the error that occurred.
+ *
+ * Side effects:
+ *	May flush output on the channel. May discard queued input.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_SeekBackwardCompat(chan, offset, mode)
+    Tcl_Channel chan;		/* The channel on which to seek. */
+    int offset;			/* Offset to seek to. */
+    int mode;			/* Relative to which location to seek? */
+{
+    return (int)Tcl_Seek(chan, (long)offset, mode);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_TellBackwardCompat --
+ *
+ *	Returns the position of the next character to be read/written on
+ *	this channel. This function only exists for backward compatability
+ *	on systems where the sizes of int and long are different, and
+ *	should not be called by new code.
+ *
+ * Results:
+ *	A nonnegative integer on success, -1 on failure. If failed,
+ *	use Tcl_GetErrno() to retrieve the POSIX error code for the
+ *	error that occurred.
+ *
+ * Side effects:
+ *	None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_TellBackwardCompat(chan)
+    Tcl_Channel chan;			/* The channel to return pos for. */
+{
+    return (int)Tcl_Tell(chan);
 }
 
 /*
Index: generic/tclIOCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIOCmd.c,v
retrieving revision 1.9
diff -u -r1.9 tclIOCmd.c
--- generic/tclIOCmd.c	2001/08/06 22:17:58	1.9
+++ generic/tclIOCmd.c	2001/09/14 14:24:14
@@ -408,8 +408,9 @@
     Tcl_Obj *CONST objv[];		/* Argument objects. */
 {
     Tcl_Channel chan;			/* The channel to tell on. */
-    int offset, mode;			/* Where to seek? */
-    int result;				/* Of calling Tcl_Seek. */
+    long offset;			/* Where to seek? */
+    int mode;				/* How to seek? */
+    long result;			/* Of calling Tcl_Seek. */
     char *chanName;
     int optionIndex;
     static char *originOptions[] = {"start", "current", "end", (char *) NULL};
@@ -424,7 +425,7 @@
     if (chan == (Tcl_Channel) NULL) {
 	return TCL_ERROR;
     }
-    if (Tcl_GetIntFromObj(interp, objv[2], &offset) != TCL_OK) {
+    if (Tcl_GetLongFromObj(interp, objv[2], &offset) != TCL_OK) {
 	return TCL_ERROR;
     }
     mode = SEEK_SET;
@@ -437,7 +438,7 @@
     }
 
     result = Tcl_Seek(chan, offset, mode);
-    if (result == -1) {
+    if (result == -1L) {
         Tcl_AppendResult(interp, "error during seek on \"", 
 		chanName, "\": ", Tcl_PosixError(interp), (char *) NULL);
         return TCL_ERROR;
@@ -487,7 +488,7 @@
     if (chan == (Tcl_Channel) NULL) {
 	return TCL_ERROR;
     }
-    Tcl_SetIntObj(Tcl_GetObjResult(interp), Tcl_Tell(chan));
+    Tcl_SetLongObj(Tcl_GetObjResult(interp), Tcl_Tell(chan));
     return TCL_OK;
 }
 
Index: generic/tclIOGT.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIOGT.c,v
retrieving revision 1.3
diff -u -r1.3 tclIOGT.c
--- generic/tclIOGT.c	2000/09/29 21:42:19	1.3
+++ generic/tclIOGT.c	2001/09/14 14:24:14
@@ -33,7 +33,7 @@
 static int		TransformOutputProc _ANSI_ARGS_ ((
 				ClientData instanceData,
 				char*  buf, int toWrite, int* errorCodePtr));
-static int		TransformSeekProc _ANSI_ARGS_ ((
+static long		TransformSeekProc _ANSI_ARGS_ ((
 				ClientData instanceData, long offset,
 				int mode, int* errorCodePtr));
 static int		TransformSetOptionProc _ANSI_ARGS_((
@@ -846,14 +846,14 @@
  *------------------------------------------------------*
  */
 
-static int
+static long
 TransformSeekProc (instanceData, offset, mode, errorCodePtr)
     ClientData instanceData;	/* The channel to manipulate */
     long       offset;		/* Size of movement. */
     int        mode;		/* How to move */
     int*       errorCodePtr;	/* Location of error flag. */
 {
-    int result;
+    long result;
     TransformChannelData* dataPtr	= (TransformChannelData*) instanceData;
     Tcl_Channel           parent        = Tcl_GetStackedChannel(dataPtr->self);
     Tcl_ChannelType*      parentType	= Tcl_GetChannelType(parent);
Index: generic/tclStubInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclStubInit.c,v
retrieving revision 1.61
diff -u -r1.61 tclStubInit.c
--- generic/tclStubInit.c	2001/09/13 11:56:20	1.61
+++ generic/tclStubInit.c	2001/09/14 14:24:15
@@ -617,7 +617,7 @@
     Tcl_ResetResult, /* 217 */
     Tcl_ScanElement, /* 218 */
     Tcl_ScanCountedElement, /* 219 */
-    Tcl_Seek, /* 220 */
+    Tcl_SeekBackwardCompat, /* 220 */
     Tcl_ServiceAll, /* 221 */
     Tcl_ServiceEvent, /* 222 */
     Tcl_SetAssocData, /* 223 */
@@ -643,7 +643,7 @@
     Tcl_SplitPath, /* 243 */
     Tcl_StaticPackage, /* 244 */
     Tcl_StringMatch, /* 245 */
-    Tcl_Tell, /* 246 */
+    Tcl_TellBackwardCompat, /* 246 */
     Tcl_TraceVar, /* 247 */
     Tcl_TraceVar2, /* 248 */
     Tcl_TranslateFileName, /* 249 */
@@ -879,6 +879,8 @@
     Tcl_OutputBuffered, /* 479 */
     Tcl_FSMountsChanged, /* 480 */
     Tcl_EvalTokensStandard, /* 481 */
+    Tcl_Seek, /* 482 */
+    Tcl_Tell, /* 483 */
 };
 
 /* !END!: Do not edit above this line. */
Index: mac/tclMacChan.c
===================================================================
RCS file: /cvsroot/tcl/tcl/mac/tclMacChan.c,v
retrieving revision 1.7
diff -u -r1.7 tclMacChan.c
--- mac/tclMacChan.c	2001/08/30 08:53:15	1.7
+++ mac/tclMacChan.c	2001/09/14 14:24:15
@@ -109,7 +109,7 @@
 			    char *buf, int toRead, int *errorCode));
 static int		FileOutput _ANSI_ARGS_((ClientData instanceData,
 			    char *buf, int toWrite, int *errorCode));
-static int		FileSeek _ANSI_ARGS_((ClientData instanceData,
+static long		FileSeek _ANSI_ARGS_((ClientData instanceData,
 			    long offset, int mode, int *errorCode));
 static void		FileSetupProc _ANSI_ARGS_((ClientData clientData,
 			    int flags));
@@ -125,7 +125,7 @@
 			    char *buf, int toRead, int *errorCode));
 static int		StdIOOutput _ANSI_ARGS_((ClientData instanceData,
 			    char *buf, int toWrite, int *errorCode));
-static int		StdIOSeek _ANSI_ARGS_((ClientData instanceData,
+static long		StdIOSeek _ANSI_ARGS_((ClientData instanceData,
 			    long offset, int mode, int *errorCode));
 static int		StdReady _ANSI_ARGS_((ClientData instanceData,
 		            int mask));
@@ -584,7 +584,7 @@
  *----------------------------------------------------------------------
  */
 
-static int
+static long
 StdIOSeek(
     ClientData instanceData,			/* Unused. */
     long offset,				/* Offset to seek to. */
@@ -592,7 +592,7 @@
                                                  * should we seek? */
     int *errorCodePtr)				/* To store error code. */
 {
-    int newLoc;
+    long newLoc;
     int fd;
 
     *errorCodePtr = 0;
@@ -602,7 +602,7 @@
         return newLoc;
     }
     *errorCodePtr = errno;
-    return -1;
+    return -1L;
 }
 
 /*
@@ -1126,7 +1126,7 @@
  *----------------------------------------------------------------------
  */
 
-static int
+static long
 FileSeek(
     ClientData instanceData,	/* Unused. */
     long offset,				/* Offset to seek to. */
@@ -1191,7 +1191,7 @@
 	}
     }
     *errorCodePtr = errno = TclMacOSErrorToPosixError(err);
-    return -1;
+    return -1L;
 }
 
 /*
Index: unix/tclUnixChan.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixChan.c,v
retrieving revision 1.21
diff -u -r1.21 tclUnixChan.c
--- unix/tclUnixChan.c	2001/08/30 08:53:15	1.21
+++ unix/tclUnixChan.c	2001/09/14 14:24:15
@@ -189,7 +189,7 @@
 static int		FileOutputProc _ANSI_ARGS_((
 			    ClientData instanceData, char *buf, int toWrite,
                             int *errorCode));
-static int		FileSeekProc _ANSI_ARGS_((ClientData instanceData,
+static long		FileSeekProc _ANSI_ARGS_((ClientData instanceData,
 			    long offset, int mode, int *errorCode));
 static void		FileWatchProc _ANSI_ARGS_((ClientData instanceData,
 		            int mask));
@@ -510,7 +510,7 @@
  *----------------------------------------------------------------------
  */
 
-static int
+static long
 FileSeekProc(instanceData, offset, mode, errorCodePtr)
     ClientData instanceData;			/* File state. */
     long offset;				/* Offset to seek to. */
@@ -521,7 +521,7 @@
     int *errorCodePtr;				/* To store error code. */
 {
     FileState *fsPtr = (FileState *) instanceData;
-    int newLoc;
+    long newLoc;
 
     newLoc = lseek(fsPtr->fd, (off_t) offset, mode);
 
Index: win/tclWinChan.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinChan.c,v
retrieving revision 1.15
diff -u -r1.15 tclWinChan.c
--- win/tclWinChan.c	2001/09/07 17:08:50	1.15
+++ win/tclWinChan.c	2001/09/14 14:24:15
@@ -89,7 +89,7 @@
 	            	    char *buf, int toRead, int *errorCode));
 static int		FileOutputProc _ANSI_ARGS_((ClientData instanceData,
 			    char *buf, int toWrite, int *errorCode));
-static int		FileSeekProc _ANSI_ARGS_((ClientData instanceData,
+static long		FileSeekProc _ANSI_ARGS_((ClientData instanceData,
 			    long offset, int mode, int *errorCode));
 static void		FileSetupProc _ANSI_ARGS_((ClientData clientData,
 			    int flags));
@@ -431,7 +431,7 @@
  *----------------------------------------------------------------------
  */
 
-static int
+static long
 FileSeekProc(instanceData, offset, mode, errorCodePtr)
     ClientData instanceData;			/* File state. */
     long offset;				/* Offset to seek to. */
