diff options
author | suresh <suresh@noemail.net> | 1998-07-01 15:45:21 (GMT) |
---|---|---|
committer | suresh <suresh@noemail.net> | 1998-07-01 15:45:21 (GMT) |
commit | 19906ff2467c0b8978292681fb7159c93e496874 (patch) | |
tree | 55b80b6a1177d737a0d99cc30fa686cf2f636d7e /win | |
parent | fd09dcb15aa3e27dce3b45223361eb12c6d2d0af (diff) | |
download | tcl-19906ff2467c0b8978292681fb7159c93e496874.zip tcl-19906ff2467c0b8978292681fb7159c93e496874.tar.gz tcl-19906ff2467c0b8978292681fb7159c93e496874.tar.bz2 |
Changed variable name "tclAlternateInitScript" to "tclPreInitScript".
Added error-checking for pre-initialization script.
FossilOrigin-Name: d6a0499853647ca2f585c2f2e411d1dc6d195304
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)); } |