Jim Tcl
Check-in [a2b3125017]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:bootstrap package support

Allow minimal command "package" to take additional arguments, but ignore them.

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a2b31250172f1c392f5b3cdea7182f2dd52e431b
User & Date: steveb@workware.net.au 2018-09-03 22:00:23
Context
2018-09-21
02:57
file: Add microsecond resolution for mtime: mtimeus

Note that actual support is dependent upon the underlying operating system and filesystem.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: f11e879168 user: steveb@workware.net.au tags: trunk

2018-09-03
22:00
bootstrap package support

Allow minimal command "package" to take additional arguments, but ignore them.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: a2b3125017 user: steveb@workware.net.au tags: trunk

22:00
Tidy some signed/unsigned comparisons

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: a25ba46aa3 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bootstrap.tcl.

1
2
3
4
5




6
7
8
9
10
11
12
# Minimal support for package require
# No error on failure since C extensions aren't handled
proc package {cmd pkg} {
	if {$cmd eq "require"} {
		foreach path $::auto_path {




			if {[file exists $path/$pkg.tcl]} {
				uplevel #0 [list source $path/$pkg.tcl]
				return
			}
		}
	}
}


|


>
>
>
>
|
|





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Minimal support for package require
# No error on failure since C extensions aren't handled
proc package {cmd pkg args} {
	if {$cmd eq "require"} {
		foreach path $::auto_path {
			set pkgpath $path/$pkg.tcl
			if {$path eq "."} {
				set pkgpath $pkg.tcl
			}
			if {[file exists $pkgpath]} {
				uplevel #0 [list source $pkgpath]
				return
			}
		}
	}
}