From: Jeff Hobbs Date: Sat, 19 Oct 2002 02:44:34 +0000 (+0000) Subject: * library/pkgIndex.tcl: remove 8.4 alpha checks, use vfs::dll var X-Git-Tag: vfs-1-2~28 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=f38c52b8537fbe3d4fc3dc94395e4612e35c19ad;p=tclvfs * library/pkgIndex.tcl: remove 8.4 alpha checks, use vfs::dll var to store library name. --- diff --git a/library/pkgIndex.tcl b/library/pkgIndex.tcl index 33c7bd8..7d8bcf8 100644 --- a/library/pkgIndex.tcl +++ b/library/pkgIndex.tcl @@ -12,42 +12,31 @@ if {[package provide Tcl] < 8.4} { return } - package require Tcl 8.4 -if {[info tclversion] == 8.4} { - if {[regexp {8.4a(1|2|3|4)} [info patchlevel]]} { - error "Tcl 8.4a5 (March 20th 2002) or newer is required" - } -} + +namespace eval ::vfs {} +variable vfs::dll if {$tcl_platform(platform) eq "unix"} { - set file libvfs1.0 + set dll libvfs1.0 } elseif {[info exists tcl_platform(debug)]} { - set file vfs10d + set dll vfs10d } else { - set file vfs10 -} - -set file [file join $dir $file[info sharedlibextension]] - -# Don't do anything if our shared lib doesn't exist. This should -# help stop a crash on pre-release MacOS X. -if {![file exists $file]} { - unset file - return + set dll vfs10 } +set dll [file join $dir $dll[info sharedlibextension]] -proc loadvfs {file} { +proc loadvfs {dll} { global auto_path - set dir [file dirname $file] + if {![file exists $dll]} { return } + set dir [file dirname $dll] if {[lsearch -exact $auto_path $dir] == -1} { lappend auto_path $dir } - load $file + load $dll } -package ifneeded vfs 1.0 [list loadvfs $file] -unset file +package ifneeded vfs 1.0 [list loadvfs $dll] package ifneeded mk4vfs 1.5 [list source [file join $dir mk4vfs.tcl]] package ifneeded starkit 1.0 [list source [file join $dir starkit.tcl]]