diff options
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r-- | unix/tclUnixInit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index baff098..7d71544 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -52,6 +52,15 @@ static int initialized = 0; #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; + +/* * Static routines in this file: */ @@ -211,6 +220,9 @@ int Tcl_Init(interp) Tcl_Interp *interp; /* Interpreter to initialize. */ { + if (tclAlternateInitScript != NULL) { + Tcl_Eval(interp, tclAlternateInitScript); + } return Tcl_Eval(interp, initScript); } |