summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorwelch <welch@noemail.net>1998-06-27 18:09:53 (GMT)
committerwelch <welch@noemail.net>1998-06-27 18:09:53 (GMT)
commitbad23c30f183e85acf85ab5c18da435fbf5c8fc2 (patch)
tree1215c0959e90294b37bd360985895f49e8cbea9f /unix
parentc95abd5e8369461af64d0bdd12781fd7edd702af (diff)
downloadtcl-bad23c30f183e85acf85ab5c18da435fbf5c8fc2.zip
tcl-bad23c30f183e85acf85ab5c18da435fbf5c8fc2.tar.gz
tcl-bad23c30f183e85acf85ab5c18da435fbf5c8fc2.tar.bz2
plugin updates
FossilOrigin-Name: 594ce53543ab0e1e09fe7eabec3e198a06256812
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: