diff options
author | dgp <dgp@users.sourceforge.net> | 2002-01-03 21:52:15 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-01-03 21:52:15 (GMT) |
commit | 272faa763c52da3f47a7dfaa6a9c04046d375964 (patch) | |
tree | cd9247dabd5260b3d72e8e84e35ab84b5caec856 | |
parent | e9733d7e31787203d2e1ca47c8c05cc6669e2ad9 (diff) | |
download | tcl-272faa763c52da3f47a7dfaa6a9c04046d375964.zip tcl-272faa763c52da3f47a7dfaa6a9c04046d375964.tar.gz tcl-272faa763c52da3f47a7dfaa6a9c04046d375964.tar.bz2 |
* doc/FileSystem.3:
* generic/tclIOUtil.c: Updated some old uses of "fileName" to
new VFS terminology, "pathPtr".
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | doc/FileSystem.3 | 6 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 38 |
3 files changed, 28 insertions, 22 deletions
@@ -1,3 +1,9 @@ +2002-01-03 Don Porter <dgp@users.sourceforge.net> + + * doc/FileSystem.3: + * generic/tclIOUtil.c: Updated some old uses of "fileName" to + new VFS terminology, "pathPtr". + 2002-01-03 Donal K. Fellows <fellowsd@cs.man.ac.uk> * tests/basic.test (basic-39.4): Greatly simplified test while diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index 7e2ee6f..3f43a6d 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.13 2001/12/10 15:50:46 dgp Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.14 2002/01/03 21:52:15 dgp Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -46,7 +46,7 @@ Tcl_Obj* \fBTcl_FSListVolumes\fR(\fIvoid\fR) .sp int -\fBTcl_FSEvalFile\fR(\fIinterp, fileName\fR) +\fBTcl_FSEvalFile\fR(\fIinterp, pathPtr\fR) .sp int \fBTcl_FSLoadFile\fR(\fIinterp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, clientDataPtr, unloadProcPtr\fR) @@ -401,7 +401,7 @@ If \fIpath\fR exists, \fBTcl_FSStat\fR returns 0 and the stat structure is filled with data. Otherwise, -1 is returned, and no stat info is given. .PP -\fBTcl_FSOpenFileChannel\fR opens a file specified by \fIfileName\fR and +\fBTcl_FSOpenFileChannel\fR opens a file specified by \fIpathPtr\fR and returns a channel handle that can be used to perform input and output on the file. This API is modeled after the \fBfopen\fR procedure of the Unix standard I/O library. diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 4ac9a84..ac02ecb 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.26 2001/11/23 01:27:00 das Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.27 2002/01/03 21:52:15 dgp Exp $ */ #include "tclInt.h" @@ -1137,16 +1137,16 @@ TclGetOpenMode(interp, string, seekFlagPtr) * Side effects: * Depends on the commands in the file. During the evaluation * of the contents of the file, iPtr->scriptFile is made to - * point to fileName (the old value is cached and replaced when + * point to pathPtr (the old value is cached and replaced when * this function returns). * *---------------------------------------------------------------------- */ int -Tcl_FSEvalFile(interp, fileName) +Tcl_FSEvalFile(interp, pathPtr) Tcl_Interp *interp; /* Interpreter in which to process file. */ - Tcl_Obj *fileName; /* Name of file to process. Tilde-substitution + Tcl_Obj *pathPtr; /* Path of file to process. Tilde-substitution * will be performed on this name. */ { int result, length; @@ -1157,25 +1157,25 @@ Tcl_FSEvalFile(interp, fileName) Tcl_Channel chan; Tcl_Obj *objPtr; - if (Tcl_FSGetTranslatedPath(interp, fileName) == NULL) { + if (Tcl_FSGetTranslatedPath(interp, pathPtr) == NULL) { return TCL_ERROR; } result = TCL_ERROR; objPtr = Tcl_NewObj(); - if (Tcl_FSStat(fileName, &statBuf) == -1) { + if (Tcl_FSStat(pathPtr, &statBuf) == -1) { Tcl_SetErrno(errno); Tcl_AppendResult(interp, "couldn't read file \"", - Tcl_GetString(fileName), + Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), (char *) NULL); goto end; } - chan = Tcl_FSOpenFileChannel(interp, fileName, "r", 0644); + chan = Tcl_FSOpenFileChannel(interp, pathPtr, "r", 0644); if (chan == (Tcl_Channel) NULL) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "couldn't read file \"", - Tcl_GetString(fileName), + Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), (char *) NULL); goto end; } @@ -1188,7 +1188,7 @@ Tcl_FSEvalFile(interp, fileName) if (Tcl_ReadChars(chan, objPtr, -1, 0) < 0) { Tcl_Close(interp, chan); Tcl_AppendResult(interp, "couldn't read file \"", - Tcl_GetString(fileName), + Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), (char *) NULL); goto end; } @@ -1198,14 +1198,14 @@ Tcl_FSEvalFile(interp, fileName) iPtr = (Interp *) interp; oldScriptFile = iPtr->scriptFile; - iPtr->scriptFile = fileName; + iPtr->scriptFile = pathPtr; Tcl_IncrRefCount(iPtr->scriptFile); string = Tcl_GetStringFromObj(objPtr, &length); result = Tcl_EvalEx(interp, string, length, 0); /* * Now we have to be careful; the script may have changed the * iPtr->scriptFile value, so we must reset it without - * assuming it still points to 'fileName'. + * assuming it still points to 'pathPtr'. */ if (iPtr->scriptFile != NULL) { Tcl_DecrRefCount(iPtr->scriptFile); @@ -1221,7 +1221,7 @@ Tcl_FSEvalFile(interp, fileName) * Record information telling where the error occurred. */ - sprintf(msg, "\n (file \"%.150s\" line %d)", Tcl_GetString(fileName), + sprintf(msg, "\n (file \"%.150s\" line %d)", Tcl_GetString(pathPtr), interp->errorLine); Tcl_AddErrorInfo(interp, msg); } @@ -1970,14 +1970,14 @@ NativeFileAttrStrings(pathPtr, objPtrRef) */ static int -NativeFileAttrsGet(interp, index, fileName, objPtrRef) +NativeFileAttrsGet(interp, index, pathPtr, objPtrRef) Tcl_Interp *interp; /* The interpreter for error reporting. */ int index; /* index of the attribute command. */ - Tcl_Obj *fileName; /* filename we are operating on. */ + Tcl_Obj *pathPtr; /* path of file we are operating on. */ Tcl_Obj **objPtrRef; /* for output. */ { return (*tclpFileAttrProcs[index].getProc)(interp, index, - fileName, objPtrRef); + pathPtr, objPtrRef); } /* @@ -2001,14 +2001,14 @@ NativeFileAttrsGet(interp, index, fileName, objPtrRef) */ static int -NativeFileAttrsSet(interp, index, fileName, objPtr) +NativeFileAttrsSet(interp, index, pathPtr, objPtr) Tcl_Interp *interp; /* The interpreter for error reporting. */ int index; /* index of the attribute command. */ - Tcl_Obj *fileName; /* filename we are operating on. */ + Tcl_Obj *pathPtr; /* path of file we are operating on. */ Tcl_Obj *objPtr; /* set to this value. */ { return (*tclpFileAttrProcs[index].setProc)(interp, index, - fileName, objPtr); + pathPtr, objPtr); } /* |