summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorwelch <welch>1998-06-27 18:09:53 (GMT)
committerwelch <welch>1998-06-27 18:09:53 (GMT)
commite49b28cf440752d763d488c4673d081883e93033 (patch)
tree1215c0959e90294b37bd360985895f49e8cbea9f /unix
parent32e60ee1bab18f9b5441eeb97eadcf604af608ef (diff)
downloadtcl-e49b28cf440752d763d488c4673d081883e93033.zip
tcl-e49b28cf440752d763d488c4673d081883e93033.tar.gz
tcl-e49b28cf440752d763d488c4673d081883e93033.tar.bz2
plugin updates
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c50
1 files changed, 3 insertions, 47 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 56df95d..baff098 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -45,55 +45,11 @@ static char pkgPath[sizeof(TCL_PACKAGE_PATH)+200] = TCL_PACKAGE_PATH;
static int initialized = 0;
/*
- * The following string is the startup script executed in new
- * interpreters. It looks on disk in several different directories
- * for a script "init.tcl" that is compatible with this version
- * of Tcl. The init.tcl script does all of the real work of
- * initialization.
+ * The Init script (common to Windows and Unix platforms) is
+ * defined in tclInitScript.h
*/
-static char initScript[] =
-"proc tclInit {} {\n\
- global tcl_library tcl_version tcl_patchLevel env errorInfo\n\
- global tcl_pkgPath\n\
- rename tclInit {}\n\
- set errors {}\n\
- set dirs {}\n\
- if {[info exists env(tcl_pkgLibrary)]} {\n\
- lappend dirs $env(tcl_pkgLibrary)\n\
- }\n\
- if [info exists env(TCL_LIBRARY)] {\n\
- lappend dirs $env(TCL_LIBRARY)\n\
- }\n\
- lappend dirs [info library]\n\
- set parentDir [file dirname [file dirname [info nameofexecutable]]]\n\
- lappend dirs $parentDir/lib/tcl$tcl_version\n\
- if [string match {*[ab]*} $tcl_patchLevel] {\n\
- set lib tcl$tcl_patchLevel\n\
- } else {\n\
- set lib tcl$tcl_version\n\
- }\n\
- lappend dirs [file dirname $parentDir]/$lib/library\n\
- lappend dirs $parentDir/library\n\
- foreach i $dirs {\n\
- set tcl_library $i\n\
- set tclfile [file join $i init.tcl]\n\
- if {[file exists $tclfile]} {\n\
- lappend tcl_pkgPath [file dirname $i]\n\
- if ![catch {uplevel #0 [list source $tclfile]} msg] {\n\
- return\n\
- } else {\n\
- append errors \"$tclfile: $msg\n$errorInfo\n\"\n\
- }\n\
- }\n\
- }\n\
- set msg \"Can't find a usable init.tcl in the following directories: \n\"\n\
- append msg \" $dirs\n\n\"\n\
- append msg \"$errors\n\n\"\n\
- append msg \"This probably means that Tcl wasn't installed properly.\n\"\n\
- error $msg\n\
-}\n\
-tclInit";
+#include "tclInitScript.h"
/*
* Static routines in this file: