diff options
author | suresh <suresh@noemail.net> | 1998-07-01 14:54:47 (GMT) |
---|---|---|
committer | suresh <suresh@noemail.net> | 1998-07-01 14:54:47 (GMT) |
commit | 38dcc5745da159f5a0017c3269767e76b48911b0 (patch) | |
tree | 0501abb127a1a7a6ff2cfd9b82d681e8af74ae43 /win/tclWinInit.c | |
parent | a0760dd2a01c538245cd11c54c2144cc1d9e8002 (diff) | |
download | tcl-38dcc5745da159f5a0017c3269767e76b48911b0.zip tcl-38dcc5745da159f5a0017c3269767e76b48911b0.tar.gz tcl-38dcc5745da159f5a0017c3269767e76b48911b0.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").
FossilOrigin-Name: a2052492c096691a9478562da3058762dbc9de8d
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r-- | win/tclWinInit.c | 15 |
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)); } /* |