diff options
-rw-r--r-- | unix/tclUnixInit.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 7d71544..091d287 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -52,13 +52,12 @@ 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. + * A pointer to a string that holds an initialization script that if non-NULL + * is evaluated in Tcl_Init() prior to the the built-in initialization script + * that is defined in the file "generic/tclInitScript.h". */ -char * tclAlternateInitScript = NULL; +char * tclPreInitScript = NULL; /* * Static routines in this file: @@ -220,10 +219,12 @@ int Tcl_Init(interp) Tcl_Interp *interp; /* Interpreter to initialize. */ { - if (tclAlternateInitScript != NULL) { - Tcl_Eval(interp, tclAlternateInitScript); + if (tclPreInitScript != NULL) { + if (Tcl_Eval(interp, tclPreInitScript) == TCL_ERROR) { + return (TCL_ERROR); + }; } - return Tcl_Eval(interp, initScript); + return(Tcl_Eval(interp, initScript)); } /* |