Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / share / tcl / el_init.tcl
1 # $LAAS: init.tcl,v 1.7 2003/10/23 17:31:23 mallet Exp $
2
3 #
4 # Copyright (c) 2001-2003 LAAS/CNRS -- Sat Oct 6 2001
5 # All rights reserved. Anthony Mallet
6 #
7 #
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are
10 # met:
11 #
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in
16 # the documentation and/or other materials provided with the
17 # distribution.
18 #
19 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
23 # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
26 # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #
31
32 # Require command-line completion
33 catch {
34 package require el::tools
35 package require el::complete
36 }
37
38 # Preload packages
39 while {[set i [lsearch -exact $argv -package]] >= 0} {
40 set pkgname [lindex $argv [expr $i+1]]
41 if {[catch {package require $pkgname} m]} {
42 puts "$m"
43 puts "cannot load $pkgname"
44 } else {
45 puts "loaded $pkgname package"
46 }
47 set argv [lreplace $argv $i [expr $i+1]]
48 }
49 unset i
50 catch { unset pkgname }