summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authorsuresh <suresh>1998-06-12 16:48:11 (GMT)
committersuresh <suresh>1998-06-12 16:48:11 (GMT)
commite7fef6f610fcd771b4294eac1faed99e6f9d841d (patch)
tree4ba990ba568df0a775171d567e31312b7dfcefb4 /generic/tclCmdIL.c
parent83dec88f960b16de53195cdc8c0fb4cbd3de01e5 (diff)
downloadtcl-e7fef6f610fcd771b4294eac1faed99e6f9d841d.zip
tcl-e7fef6f610fcd771b4294eac1faed99e6f9d841d.tar.gz
tcl-e7fef6f610fcd771b4294eac1faed99e6f9d841d.tar.bz2
Moved the definition of 'char *tclExecutableName' to the file 'tclUtil.c'
and revised the routine 'InfoNameOfExecutableCmd()' to use the new public routine 'Tcl_GetNameOfExecutable(...)'.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 44e4270..3d06267 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -20,15 +20,6 @@
#include "tclPort.h"
/*
- * The following variable holds the full path name of the binary
- * from which this application was executed, or NULL if it isn't
- * know. The value of the variable is set by the procedure
- * Tcl_FindExecutable. The storage space is dynamically allocated.
- */
-
-char *tclExecutableName = NULL;
-
-/*
* During execution of the "lsort" command, structures of the following
* type are used to arrange the objects being sorted into a collection
* of linked lists.
@@ -1287,13 +1278,17 @@ InfoNameOfExecutableCmd(dummy, interp, objc, objv)
int objc; /* Number of arguments. */
Tcl_Obj *CONST objv[]; /* Argument objects. */
{
+ CONST char *nameOfExecutable;
+
if (objc != 2) {
Tcl_WrongNumArgs(interp, 2, objv, NULL);
return TCL_ERROR;
}
+
+ nameOfExecutable = Tcl_GetNameOfExecutable();
- if (tclExecutableName != NULL) {
- Tcl_SetStringObj(Tcl_GetObjResult(interp), tclExecutableName, -1);
+ if (nameOfExecutable != NULL) {
+ Tcl_SetStringObj(Tcl_GetObjResult(interp), (char *)nameOfExecutable, -1);
}
return TCL_OK;
}