From bdcb01fdbbf8ef9ab2d58b43e835aad189f02843 Mon Sep 17 00:00:00 2001 From: suresh Date: Wed, 1 Jul 1998 15:45:21 +0000 Subject: Changed variable name "tclAlternateInitScript" to "tclPreInitScript". Added error-checking for pre-initialization script. --- win/tclWinInit.c | 15 ++++++++------- 1 file 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)); } -- cgit v0.12