summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorsuresh <suresh>1998-07-01 14:54:47 (GMT)
committersuresh <suresh>1998-07-01 14:54:47 (GMT)
commit969c2a47808f413a0176ba35f4df4ff3325e6feb (patch)
tree0501abb127a1a7a6ff2cfd9b82d681e8af74ae43 /win/tclWinInit.c
parente00df2e46ecfb6872608e2cb3d482fb10d4e32ef (diff)
downloadtcl-969c2a47808f413a0176ba35f4df4ff3325e6feb.zip
tcl-969c2a47808f413a0176ba35f4df4ff3325e6feb.tar.gz
tcl-969c2a47808f413a0176ba35f4df4ff3325e6feb.tar.bz2
Added definition of variable "tclAlternateInitScript" which is a globabl var-
iable and if set to a non-NULL value, will be evaluated just before the built-in script given in the file (variable) "generic/tclInitScript.h" ("initScript").
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 6f7425c..f64fa89 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -72,6 +72,15 @@ static char* processors[NUMPROCESSORS] = {
#include "tclInitScript.h"
+/*
+ * A pointer to a string that holds an alternate initialization script to the
+ * built-in initialization script defined in the file "generic/tclInitScript.h".
+ * The Tcl_Init() routine will evaluate this script if it contains a non-NULL
+ * value.
+ */
+
+char * tclAlternateInitScript = NULL;
+
/*
*----------------------------------------------------------------------
@@ -237,8 +246,10 @@ int
Tcl_Init(interp)
Tcl_Interp *interp; /* Interpreter to initialize. */
{
- return Tcl_Eval(interp, initScript);
-
+ if (tclAlternateInitScript != NULL) {
+ Tcl_Eval(interp, tclAlternateInitScript);
+ }
+ return(Tcl_Eval(interp, initScript));
}
/*