summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
authorsuresh <suresh>1998-07-01 15:45:02 (GMT)
committersuresh <suresh>1998-07-01 15:45:02 (GMT)
commited563f37858510a76dd6cdea3c1865966cb7dcd0 (patch)
tree23cfbf0aaec3bf53d05a1e4ef439b28749fd4a2c /unix/tclUnixInit.c
parentbf13c9923baee2a979c7550cdfd91002b909ef1c (diff)
downloadtcl-ed563f37858510a76dd6cdea3c1865966cb7dcd0.zip
tcl-ed563f37858510a76dd6cdea3c1865966cb7dcd0.tar.gz
tcl-ed563f37858510a76dd6cdea3c1865966cb7dcd0.tar.bz2
Changed variable name "tclAlternateInitScript" to "tclPreInitScript".
Added error checking in in Tcl_Init() for pre-initialization script.
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c17
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));
}
/*