diff options
author | suresh <suresh> | 1998-07-01 15:45:21 (GMT) |
---|---|---|
committer | suresh <suresh> | 1998-07-01 15:45:21 (GMT) |
commit | bdcb01fdbbf8ef9ab2d58b43e835aad189f02843 (patch) | |
tree | 55b80b6a1177d737a0d99cc30fa686cf2f636d7e /win | |
parent | ed563f37858510a76dd6cdea3c1865966cb7dcd0 (diff) | |
download | tcl-bdcb01fdbbf8ef9ab2d58b43e835aad189f02843.zip tcl-bdcb01fdbbf8ef9ab2d58b43e835aad189f02843.tar.gz tcl-bdcb01fdbbf8ef9ab2d58b43e835aad189f02843.tar.bz2 |
Changed variable name "tclAlternateInitScript" to "tclPreInitScript".
Added error-checking for pre-initialization script.
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinInit.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c index f64fa89..484abd7 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -73,13 +73,12 @@ 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. + * 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; /* @@ -246,8 +245,10 @@ 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)); } |