diff options
-rw-r--r-- | doc/FileSystem.3 | 8 | ||||
-rw-r--r-- | doc/source.n | 2 | ||||
-rw-r--r-- | generic/tcl.decls | 2 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 6 | ||||
-rw-r--r-- | generic/tclDecls.h | 4 | ||||
-rw-r--r-- | generic/tclEncoding.c | 8 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 12 | ||||
-rw-r--r-- | generic/tclInt.decls | 4 | ||||
-rw-r--r-- | generic/tclInt.h | 2 | ||||
-rw-r--r-- | generic/tclIntDecls.h | 8 | ||||
-rw-r--r-- | generic/tclMain.c | 8 |
11 files changed, 32 insertions, 32 deletions
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index 2db2485..7ac93c8 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -54,7 +54,7 @@ Tcl_Obj * \fBTcl_FSListVolumes\fR(\fIvoid\fR) .sp int -\fBTcl_FSEvalFileEx\fR(\fIinterp, pathPtr, encoding\fR) +\fBTcl_FSEvalFileEx\fR(\fIinterp, pathPtr, encodingName\fR) .sp int \fBTcl_FSEvalFile\fR(\fIinterp, pathPtr\fR) @@ -201,7 +201,7 @@ rename operation. .AP Tcl_Obj *destPathPtr in As for \fIpathPtr\fR, but used for the destination filename for a copy or rename operation. -.AP "const char" *encoding in +.AP "const char" *encodingName in The encoding of the data stored in the file identified by \fIpathPtr\fR and to be evaluated. .AP "const char" *pattern in @@ -415,10 +415,10 @@ accumulates the return values in a list which is returned to the caller (with a reference count of 0). .PP \fBTcl_FSEvalFileEx\fR reads the file given by \fIpathPtr\fR using -the encoding identified by \fIencoding\fR and evaluates +the encoding identified by \fIencodingName\fR and evaluates its contents as a Tcl script. It returns the same information as \fBTcl_EvalObjEx\fR. -If \fIencoding\fR is NULL, the system encoding is used for +If \fIencodingName\fR is NULL, the system encoding is used for reading the file contents. If the file could not be read then a Tcl error is returned to describe why the file could not be read. diff --git a/doc/source.n b/doc/source.n index d306765..82fefa6 100644 --- a/doc/source.n +++ b/doc/source.n @@ -15,7 +15,7 @@ source \- Evaluate a file or resource as a Tcl script .SH SYNOPSIS \fBsource \fIfileName\fR .sp -\fBsource\fR \fB\-encoding \fIencoding fileName\fR +\fBsource\fR \fB\-encoding \fIencodingName fileName\fR .BE .SH DESCRIPTION .PP diff --git a/generic/tcl.decls b/generic/tcl.decls index 72c30be..2f21fa5 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1867,7 +1867,7 @@ declare 517 { # TIP#137 (encoding-aware source command) dgp for Anton Kovalenko declare 518 { int Tcl_FSEvalFileEx(Tcl_Interp *interp, Tcl_Obj *fileName, - const char *encoding) + const char *encodingName) } # TIP#121 (exit handler) dkf for Joe Mistachkin diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 2c0c27b..41782b0 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -988,7 +988,7 @@ TclNRSourceObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - const char *encoding = NULL; + const char *encodingName = NULL; Tcl_Obj *fileName; if (objc != 2 && objc !=4) { @@ -1008,10 +1008,10 @@ TclNRSourceObjCmd( "option", TCL_EXACT, &index)) { return TCL_ERROR; } - encoding = TclGetString(objv[2]); + encodingName = TclGetString(objv[2]); } - return TclNREvalFile(interp, fileName, encoding); + return TclNREvalFile(interp, fileName, encodingName); } /* diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 801dcc7..a91f718 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1497,7 +1497,7 @@ EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 518 */ EXTERN int Tcl_FSEvalFileEx(Tcl_Interp *interp, - Tcl_Obj *fileName, const char *encoding); + Tcl_Obj *fileName, const char *encodingName); /* 519 */ EXTERN Tcl_ExitProc * Tcl_SetExitProc(TCL_NORETURN1 Tcl_ExitProc *proc); /* 520 */ @@ -2427,7 +2427,7 @@ typedef struct TclStubs { Tcl_Command (*tcl_FindCommand) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 515 */ Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 516 */ void (*tcl_GetCommandFullName) (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp *interp, Tcl_Obj *fileName, const char *encoding); /* 518 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp *interp, Tcl_Obj *fileName, const char *encodingName); /* 518 */ Tcl_ExitProc * (*tcl_SetExitProc) (TCL_NORETURN1 Tcl_ExitProc *proc); /* 519 */ void (*tcl_LimitAddHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc *deleteProc); /* 520 */ void (*tcl_LimitRemoveHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData); /* 521 */ diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 3e9bd24..ba9f811 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -496,13 +496,13 @@ FillEncodingFileMap(void) TclListObjGetElements(NULL, matchFileList, &numFiles, &filev); for (j=0; j<numFiles; j++) { - Tcl_Obj *encoding, *fileObj; + Tcl_Obj *encodingName, *fileObj; fileObj = TclPathPart(NULL, filev[j], TCL_PATH_TAIL); - encoding = TclPathPart(NULL, fileObj, TCL_PATH_ROOT); - Tcl_DictObjPut(NULL, map, encoding, directory); + encodingName = TclPathPart(NULL, fileObj, TCL_PATH_ROOT); + Tcl_DictObjPut(NULL, map, encodingName, directory); Tcl_DecrRefCount(fileObj); - Tcl_DecrRefCount(encoding); + Tcl_DecrRefCount(encodingName); } Tcl_DecrRefCount(matchFileList); Tcl_DecrRefCount(directory); diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 5e5a1e4..921714e 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1725,7 +1725,7 @@ Tcl_FSEvalFileEx( Tcl_Interp *interp, /* Interpreter in which to process file. */ Tcl_Obj *pathPtr, /* Path of file to process. Tilde-substitution * will be performed on this name. */ - const char *encoding) /* If non-NULL, then use this encoding for the + const char *encodingName) /* If non-NULL, then use this encoding for the * file. NULL means use the system encoding. */ { int length, result = TCL_ERROR; @@ -1767,8 +1767,8 @@ Tcl_FSEvalFileEx( * it (and use the system encoding) Report error on unknown encoding. */ - if (encoding != NULL) { - if (Tcl_SetChannelOption(interp, chan, "-encoding", encoding) + if (encodingName != NULL) { + if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) != TCL_OK) { Tcl_Close(interp,chan); return result; @@ -1861,7 +1861,7 @@ TclNREvalFile( Tcl_Interp *interp, /* Interpreter in which to process file. */ Tcl_Obj *pathPtr, /* Path of file to process. Tilde-substitution * will be performed on this name. */ - const char *encoding) /* If non-NULL, then use this encoding for the + const char *encodingName) /* If non-NULL, then use this encoding for the * file. NULL means use the system encoding. */ { Tcl_StatBuf statBuf; @@ -1901,8 +1901,8 @@ TclNREvalFile( * it (and use the system encoding) Report error on unknown encoding. */ - if (encoding != NULL) { - if (Tcl_SetChannelOption(interp, chan, "-encoding", encoding) + if (encodingName != NULL) { + if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) != TCL_OK) { Tcl_Close(interp,chan); return TCL_ERROR; diff --git a/generic/tclInt.decls b/generic/tclInt.decls index dc9af54..700311f 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -467,10 +467,10 @@ declare 177 { } # TIP 338 made these public - now declared in tcl.h too declare 178 { - void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char *encoding) + void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char *encodingName) } declare 179 { - Tcl_Obj *Tcl_GetStartupScript(const char **encodingPtr) + Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr) } declare 182 { struct tm *TclpLocaltime(const time_t *clock) diff --git a/generic/tclInt.h b/generic/tclInt.h index b9ffeb5..a6e8dfd 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2974,7 +2974,7 @@ MODULE_SCOPE Tcl_Command TclNRCreateCommandInNs(Tcl_Interp *interp, Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); MODULE_SCOPE int TclNREvalFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, - const char *encoding); + const char *encodingName); MODULE_SCOPE int * TclGetAsyncReadyPtr(void); MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp); MODULE_SCOPE int TclGetChannelFromObj(Tcl_Interp *interp, diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 4c9c2d7..cb13327 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -457,9 +457,9 @@ EXTERN void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *reason); /* 178 */ EXTERN void Tcl_SetStartupScript(Tcl_Obj *pathPtr, - const char *encoding); + const char *encodingName); /* 179 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingPtr); +EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingNamePtr); /* Slot 180 is reserved */ /* Slot 181 is reserved */ /* 182 */ @@ -831,8 +831,8 @@ typedef struct TclIntStubs { int (*tclCallVarTraces) (Interp *iPtr, Var *arrayPtr, Var *varPtr, const char *part1, const char *part2, int flags, int leaveErrMsg); /* 175 */ void (*tclCleanupVar) (Var *varPtr, Var *arrayPtr); /* 176 */ void (*tclVarErrMsg) (Tcl_Interp *interp, const char *part1, const char *part2, const char *operation, const char *reason); /* 177 */ - void (*tcl_SetStartupScript) (Tcl_Obj *pathPtr, const char *encoding); /* 178 */ - Tcl_Obj * (*tcl_GetStartupScript) (const char **encodingPtr); /* 179 */ + void (*tcl_SetStartupScript) (Tcl_Obj *pathPtr, const char *encodingName); /* 178 */ + Tcl_Obj * (*tcl_GetStartupScript) (const char **encodingNamePtr); /* 179 */ void (*reserved180)(void); void (*reserved181)(void); struct tm * (*tclpLocaltime) (const time_t *clock); /* 182 */ diff --git a/generic/tclMain.c b/generic/tclMain.c index 725b567..3e89664 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -287,7 +287,7 @@ Tcl_MainEx( { int i=0; /* argv[i] index */ Tcl_Obj *path, *resultPtr, *argvPtr, *appName; - const char *encoding = NULL; + const char *encodingName = NULL; int code, exitCode = 0; Tcl_MainLoopProc *mainLoopProc; Tcl_Channel chan; @@ -337,7 +337,7 @@ Tcl_MainEx( } } - path = Tcl_GetStartupScript(&encoding); + path = Tcl_GetStartupScript(&encodingName); if (path != NULL) { appName = path; } else if (argv[0]) { @@ -397,10 +397,10 @@ Tcl_MainEx( * again, as the appInitProc might have reset it. */ - path = Tcl_GetStartupScript(&encoding); + path = Tcl_GetStartupScript(&encodingName); if (path != NULL) { Tcl_ResetResult(interp); - code = Tcl_FSEvalFileEx(interp, path, encoding); + code = Tcl_FSEvalFileEx(interp, path, encodingName); if (code != TCL_OK) { chan = Tcl_GetStdChannel(TCL_STDERR); if (chan) { |