X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=snit%2Fsnit.tcl;fp=snit%2Fsnit.tcl;h=375e51a1f5cb0bb62b9460089c978b1ba60d73f3;hb=d4567ecb6ca5553f47cd984a8f0a584d8251731b;hp=0000000000000000000000000000000000000000;hpb=1a2f3e8bb2fe99dc014aa55ceb9e1ac68296d6af;p=scpubgit%2FTenDotTcl.git diff --git a/snit/snit.tcl b/snit/snit.tcl new file mode 100644 index 0000000..375e51a --- /dev/null +++ b/snit/snit.tcl @@ -0,0 +1,41 @@ +#----------------------------------------------------------------------- +# TITLE: +# snit.tcl +# +# AUTHOR: +# Will Duquette +# +# DESCRIPTION: +# Snit's Not Incr Tcl, a simple object system in Pure Tcl. +# +# Snit 1.x Loader +# +# Copyright (C) 2003-2006 by William H. Duquette +# This code is licensed as described in license.txt. +# +#----------------------------------------------------------------------- + +package require Tcl 8.3 + +# Define the snit namespace and save the library directory + +namespace eval ::snit:: { + set library [file dirname [info script]] +} + +# Select the implementation based on the version of the Tcl core +# executing this code. For 8.3 we use a backport emulating various +# 8.4 features + +if {[package vsatisfies [package provide Tcl] 8.4]} { + source [file join $::snit::library main1.tcl] +} else { + source [file join $::snit::library main1_83.tcl] + source [file join $::snit::library snit_tcl83_utils.tcl] +} + +# Load the library of Snit validation types. + +source [file join $::snit::library validate.tcl] + +package provide snit 1.4.2