From b7a3951c0046491a62399fc51fe809e24e5eb8b7 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Wed, 3 Nov 2010 20:52:27 +1000 Subject: Don't hardcode /lib/jim Instead, set TCL_LIBRARY based on where jim is installed. This defaults to /usr/local (thus /usr/local/lib/jim), or can be modified with either configure or make. e.g. ./configure --prefix=/usr or make prefix=/usr install Now auto_path is initialised only to TCL_LIBRARY, and doesn't include "." which could be undesirable. At the same time, simplify jimsh initialisation using a script instead of C code. Add the path to the executable to auto_path. Also, no longer use JIM_TCL_COMPAT. Always use the tcl-compatible names, $auto_path and $tcl_interactive. Signed-off-by: Steve Bennett --- tclcompat.tcl | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'tclcompat.tcl') diff --git a/tclcompat.tcl b/tclcompat.tcl index aa4907e..4589f56 100644 --- a/tclcompat.tcl +++ b/tclcompat.tcl @@ -101,21 +101,6 @@ proc parray {arrayname {pattern *} {puts puts}} { } } -proc {info nameofexecutable} {} { - if {[info exists ::jim_argv0]} { - if {[string first "/" $::jim_argv0] >= 0} { - return $::jim_argv0 - } - foreach path [split [env PATH ""] :] { - set exec [file join $path $::jim_argv0] - if {[file executable $exec]} { - return $exec - } - } - } - return "" -} - # Implements 'file copy' - single file mode only proc {file copy} {{force {}} source target} { try { -- cgit v1.1