summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-04-14 15:48:30 (GMT)
committervincentdarley <vincentdarley>2003-04-14 15:48:30 (GMT)
commit490e91fb79a23c76883f37ec8930de79aeaf734e (patch)
tree99a4f05e89735a7dcae8e27a518e3e75baa19b8a
parent0642c2ce3305c22c76c707fe3a2b4adc74c36c72 (diff)
downloadtcl-490e91fb79a23c76883f37ec8930de79aeaf734e.zip
tcl-490e91fb79a23c76883f37ec8930de79aeaf734e.tar.gz
tcl-490e91fb79a23c76883f37ec8930de79aeaf734e.tar.bz2
shared filesystem function
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclFileSystem.h4
-rw-r--r--generic/tclIOUtil.c10
-rw-r--r--generic/tclPathObj.c11
4 files changed, 19 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 75b4ade..fc2b4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-04-14 Vince Darley <vincentdarley@users.sourceforge.net>
+
+ * generic/tclIOUtil.c:
+ * generic/tclPathObj.c:
+ * generic/tclFileSystem.h: overlooked one function which
+ was duplicated, so this is now shared between modules.
+
2003-04-13 Mo DeJong <mdejong@users.sourceforge.net>
* win/configure: Regen.
diff --git a/generic/tclFileSystem.h b/generic/tclFileSystem.h
index 30a6399..966f221 100644
--- a/generic/tclFileSystem.h
+++ b/generic/tclFileSystem.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclFileSystem.h,v 1.1 2003/04/11 15:59:54 vincentdarley Exp $
+ * RCS: @(#) $Id: tclFileSystem.h,v 1.2 2003/04/14 15:48:35 vincentdarley Exp $
*/
/*
@@ -56,6 +56,8 @@ int TclFSEnsureEpochOk _ANSI_ARGS_((Tcl_Obj* pathObjPtr, int theEpoch,
void TclFSSetPathDetails _ANSI_ARGS_((Tcl_Obj *pathObjPtr,
FilesystemRecord *fsRecPtr, ClientData clientData,
int theEpoch));
+Tcl_Obj* TclFSNormalizeAbsolutePath _ANSI_ARGS_((Tcl_Interp* interp,
+ Tcl_Obj *pathPtr, ClientData *clientDataPtr));
/*
* Private shared variables for use by tclIOUtil.c and tclPathObj.c
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index f27fff9..d4f34d0 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.78 2003/04/11 15:59:54 vincentdarley Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.79 2003/04/14 15:48:35 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -1000,7 +1000,7 @@ Tcl_FSData(fsPtr)
/*
*---------------------------------------------------------------------------
*
- * FSNormalizeAbsolutePath --
+ * TclFSNormalizeAbsolutePath --
*
* Description:
* Takes an absolute path specification and computes a 'normalized'
@@ -1032,7 +1032,7 @@ Tcl_FSData(fsPtr)
*---------------------------------------------------------------------------
*/
static Tcl_Obj*
-FSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr)
+TclFSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr)
Tcl_Interp* interp; /* Interpreter to use */
Tcl_Obj *pathPtr; /* Absolute path to normalize */
ClientData *clientDataPtr;
@@ -2204,7 +2204,7 @@ Tcl_FSGetCwd(interp)
* could be problematic.
*/
if (retVal != NULL) {
- Tcl_Obj *norm = FSNormalizeAbsolutePath(interp, retVal, NULL);
+ Tcl_Obj *norm = TclFSNormalizeAbsolutePath(interp, retVal, NULL);
if (norm != NULL) {
/*
* We found a cwd, which is now in our global storage.
@@ -2253,7 +2253,7 @@ Tcl_FSGetCwd(interp)
if (proc != NULL) {
Tcl_Obj *retVal = (*proc)(interp);
if (retVal != NULL) {
- Tcl_Obj *norm = FSNormalizeAbsolutePath(interp, retVal, NULL);
+ Tcl_Obj *norm = TclFSNormalizeAbsolutePath(interp, retVal, NULL);
/*
* Check whether cwd has changed from the value
* previously stored in cwdPathPtr. Really 'norm'
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 9dcde63..4f2aa25 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.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: tclPathObj.c,v 1.1 2003/04/11 15:59:58 vincentdarley Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.2 2003/04/14 15:48:38 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -30,9 +30,6 @@ static void FreeFsPathInternalRep _ANSI_ARGS_((Tcl_Obj *listPtr));
static void UpdateStringOfFsPath _ANSI_ARGS_((Tcl_Obj *objPtr));
static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
-static Tcl_Obj* FSNormalizeAbsolutePath
- _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr,
- ClientData *clientDataPtr));
static int FindSplitPos _ANSI_ARGS_((char *path, char *separator));
@@ -104,7 +101,7 @@ typedef struct FsPath {
/*
*---------------------------------------------------------------------------
*
- * FSNormalizeAbsolutePath --
+ * TclFSNormalizeAbsolutePath --
*
* Description:
* Takes an absolute path specification and computes a 'normalized'
@@ -136,7 +133,7 @@ typedef struct FsPath {
*---------------------------------------------------------------------------
*/
static Tcl_Obj*
-FSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr)
+TclFSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr)
Tcl_Interp* interp; /* Interpreter to use */
Tcl_Obj *pathPtr; /* Absolute path to normalize */
ClientData *clientDataPtr;
@@ -1185,7 +1182,7 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
/* We have a refCount on the cwd */
}
/* Already has refCount incremented */
- fsPathPtr->normPathPtr = FSNormalizeAbsolutePath(interp, absolutePath,
+ fsPathPtr->normPathPtr = TclFSNormalizeAbsolutePath(interp, absolutePath,
(fsPathPtr->nativePathPtr == NULL ? &clientData : NULL));
if (0 && (clientData != NULL)) {
fsPathPtr->nativePathPtr =