Index: modules/base64/uuencode.tcl ================================================================== --- modules/base64/uuencode.tcl +++ modules/base64/uuencode.tcl @@ -159,11 +159,11 @@ # ------------------------------------------------------------------------- # If the Trf package is available then we shall use this by default but the # Tcllib implementations are always visible if needed (ie: for testing) -if {[info command ::uuencode::CDecode] != {}} { +if {[info commands ::uuencode::CDecode] != {}} { # tcllib critcl package interp alias {} ::uuencode::encode {} ::uuencode::CEncode interp alias {} ::uuencode::decode {} ::uuencode::CDecode } elseif {[package provide Trf] != {}} { proc ::uuencode::encode {s} { Index: modules/base64/yencode.tcl ================================================================== --- modules/base64/yencode.tcl +++ modules/base64/yencode.tcl @@ -139,11 +139,11 @@ return TCL_OK; } } } -if {[info command ::yencode::CEncode] != {}} { +if {[info commands ::yencode::CEncode] != {}} { interp alias {} ::yencode::encode {} ::yencode::CEncode interp alias {} ::yencode::decode {} ::yencode::CDecode } else { interp alias {} ::yencode::encode {} ::yencode::Encode interp alias {} ::yencode::decode {} ::yencode::Decode Index: modules/crc/crc32.tcl ================================================================== --- modules/crc/crc32.tcl +++ modules/crc/crc32.tcl @@ -261,11 +261,11 @@ set r 0 switch -exact -- $name { critcl { if {![catch {package require tcllibc}] || ![catch {package require crcc}]} { - set r [expr {[info command ::crc::Crc32_c] != {}}] + set r [expr {[info commands ::crc::Crc32_c] != {}}] } } trf { if {![catch {package require Trf}]} { set r [expr {![catch {::crc-zlib aa} msg]}] Index: modules/crc/sum.tcl ================================================================== --- modules/crc/sum.tcl +++ modules/crc/sum.tcl @@ -128,17 +128,17 @@ } # ------------------------------------------------------------------------- # Switch from pure tcl to compiled if available. # -if {[info command ::crc::SumBsd_c] == {}} { +if {[info commands ::crc::SumBsd_c] == {}} { interp alias {} ::crc::sum-bsd {} ::crc::SumBsd } else { interp alias {} ::crc::sum-bsd {} ::crc::SumBsd_c } -if {[info command ::crc::SumSysV_c] == {}} { +if {[info commands ::crc::SumSysV_c] == {}} { interp alias {} ::crc::sum-sysv {} ::crc::SumSysV } else { interp alias {} ::crc::sum-sysv {} ::crc::SumSysV_c } Index: modules/crc/sum.test ================================================================== --- modules/crc/sum.test +++ modules/crc/sum.test @@ -21,11 +21,11 @@ useLocal sum.tcl sum ::crc } # ------------------------------------------------------------------------- -if {[info command ::crc::SumBsd_c] == {}} { +if {[info commands ::crc::SumBsd_c] == {}} { puts "> pure tcl" } else { puts "> critcl based" } Index: modules/dns/spf.tcl ================================================================== --- modules/dns/spf.tcl +++ modules/dns/spf.tcl @@ -102,11 +102,11 @@ } set cmd [string tolower [lindex [split $directive {:/=}] 0]] set param [string range $directive [string length $cmd] end] - if {[info command ::spf::_$cmd] == {}} { + if {[info commands ::spf::_$cmd] == {}} { # 6.1 Unrecognised directives terminate processing # but unknown modifiers are ignored. if {[string match "=*" $param]} { continue } else { @@ -443,11 +443,11 @@ # DNS helper procedures. # # ------------------------------------------------------------------------- proc ::spf::Resolve {domain type resultproc} { - if {[info command $resultproc] == {}} { + if {[info commands $resultproc] == {}} { return -code error "invalid arg: \"$resultproc\" must be a command" } set tok [dns::resolve $domain -type $type] dns::wait $tok set errorcode NONE Index: modules/ftp/ftp_geturl.tcl ================================================================== --- modules/ftp/ftp_geturl.tcl +++ modules/ftp/ftp_geturl.tcl @@ -54,11 +54,11 @@ return -code error "Cannot reach directory of url \"$url\"" } # Fix for the tkcon List enhancements in ftp.tcl set List ::ftp::List_org - if {[info command $List] == {}} { + if {[info commands $List] == {}} { set List ::ftp::List } # The result of List is a list of entries in the given directory. # Note that it is in 'ls -l format. We parse that into a more Index: modules/ftpd/ftpd.tcl ================================================================== --- modules/ftpd/ftpd.tcl +++ modules/ftpd/ftpd.tcl @@ -556,11 +556,11 @@ } } elseif {($data(access) == 0) && (![string equal $cmd "PASS"]) \ && (![string equal $cmd "USER"]) \ && (![string equal $cmd "QUIT"])} { puts $sock "530 Please login with USER and PASS." - } elseif {[info command ::ftpd::command::$cmd] != ""} { + } elseif {[info commands ::ftpd::command::$cmd] != ""} { Log debug $command ::ftpd::command::$cmd $sock $argument catch {flush $sock} } else { Log error "Unknown command: $cmd" Index: modules/md4/md4.tcl ================================================================== --- modules/md4/md4.tcl +++ modules/md4/md4.tcl @@ -375,11 +375,11 @@ set r 0 switch -exact -- $name { critcl { if {![catch {package require tcllibc}] || ![catch {package require md4c}]} { - set r [expr {[info command ::md4::md4c] != {}}] + set r [expr {[info commands ::md4::md4c] != {}}] } } cryptkit { if {![catch {package require cryptkit}]} { set r [expr {![catch {cryptkit::cryptInit}]}] Index: modules/md5/md5x.tcl ================================================================== --- modules/md5/md5x.tcl +++ modules/md5/md5x.tcl @@ -519,11 +519,11 @@ set r 0 switch -exact -- $name { critcl { if {![catch {package require tcllibc}] || ![catch {package require md5c}]} { - set r [expr {[info command ::md5::md5c] != {}}] + set r [expr {[info commands ::md5::md5c] != {}}] } } cryptkit { if {![catch {package require cryptkit}]} { set r [expr {![catch {cryptkit::cryptInit}]}] Index: modules/md5crypt/md5crypt.test ================================================================== --- modules/md5crypt/md5crypt.test +++ modules/md5crypt/md5crypt.test @@ -26,15 +26,15 @@ # Setup any constraints # Set this true if we have the critcl version. ::tcltest::testConstraint md5crypt_c \ - [llength [info command ::md5crypt::md5crypt_c]] + [llength [info commands ::md5crypt::md5crypt_c]] # ------------------------------------------------------------------------- -if {[llength [info command ::md5crypt::md5crypt_c]]} { +if {[llength [info commands ::md5crypt::md5crypt_c]]} { puts "> critcl based" set impl critcl } else { puts "> pure Tcl" set impl tcl Index: modules/nettool/nettool.tcl ================================================================== --- modules/nettool/nettool.tcl +++ modules/nettool/nettool.tcl @@ -6,11 +6,11 @@ package require platform # Uses the "ip" package from tcllib package require ip -if {[info command ::ladd] eq {}} { +if {[info commands ::ladd] eq {}} { proc ::ladd {varname args} { upvar 1 $varname var if ![info exists var] { set var {} } @@ -19,20 +19,20 @@ lappend var $item } return $var } } -if {[info command ::get] eq {}} { +if {[info commands ::get] eq {}} { proc ::get varname { upvar 1 $varname var if {[info exists var]} { return [set var] } return {} } } -if {[info command ::cat] eq {}} { +if {[info commands ::cat] eq {}} { proc ::cat filename { set fin [open $filename r] set dat [read $fin] close $fin return $dat Index: modules/nettool/platform_windows.tcl ================================================================== --- modules/nettool/platform_windows.tcl +++ modules/nettool/platform_windows.tcl @@ -71,11 +71,11 @@ set body { set result [::twapi::get_ip_addresses] ldelete result 127.0.0.1 return $result } -} elseif {[info command ::twapi::get_system_ipaddrs] ne {}} { +} elseif {[info commands ::twapi::get_system_ipaddrs] ne {}} { # They changed commands names on me... set body { set result [::twapi::get_system_ipaddrs] ldelete result 127.0.0.1 return $result Index: modules/processman/pkgIndex.tcl ================================================================== --- modules/processman/pkgIndex.tcl +++ modules/processman/pkgIndex.tcl @@ -7,5 +7,6 @@ # in response to "package require" commands. When this # script is sourced, the variable $dir must contain the # full path name of this file's directory. package ifneeded odie::processman 0.3 [list source [file join $dir processman.tcl]] +package ifneeded processman 0.3 [list source [file join $dir processman.tcl]] Index: modules/processman/processman.tcl ================================================================== --- modules/processman/processman.tcl +++ modules/processman/processman.tcl @@ -1,10 +1,9 @@ ### # IRM External Process Manager ### -package provide odie::processman 0.3 package require cron 1.1 ::namespace eval ::processman {} if { $::tcl_platform(platform) eq "windows" } { @@ -15,11 +14,11 @@ # with either TclX or Odielib ### if [catch {package require odielib}] { catch {package require Tclx} } - if {[info command subprocess_exists] eq {}} { + if {[info commands subprocess_exists] eq {}} { proc ::processman::subprocess_exists pid { set dat [exec ps] foreach line [split $dat \n] { if {![scan $line "%d %s" thispid rest]} continue if { $thispid eq $pid} { @@ -27,17 +26,17 @@ } } return 0 } } - if {[info command kill_subprocess] eq {}} { + if {[info commands kill_subprocess] eq {}} { proc ::processman::kill_subprocess pid { catch {exec kill $pid} } } } -if {[info command harvest_zombies] eq {}} { +if {[info commands harvest_zombies] eq {}} { proc ::processman::harvest_zombies args { } } ### @@ -265,5 +264,7 @@ } } ::cron::every processman 60 ::processman::events +package provide odie::processman 0.3 +package provide processman 0.3 Index: modules/ripemd/ripemd128.tcl ================================================================== --- modules/ripemd/ripemd128.tcl +++ modules/ripemd/ripemd128.tcl @@ -524,11 +524,11 @@ set r 0 switch -exact -- $name { #critcl { # if {![catch {package require tcllibc}] # || ![catch {package require sha1c}]} { - # set r [expr {[info command ::sha1::sha1c] != {}}] + # set r [expr {[info commands ::sha1::sha1c] != {}}] # } #} #cryptkit { # if {![catch {package require cryptkit}]} { # set r [expr {![catch {cryptkit::cryptInit}]}] Index: modules/ripemd/ripemd160.tcl ================================================================== --- modules/ripemd/ripemd160.tcl +++ modules/ripemd/ripemd160.tcl @@ -657,11 +657,11 @@ set r 0 switch -exact -- $name { #critcl { # if {![catch {package require tcllibc}] # || ![catch {package require sha1c}]} { - # set r [expr {[info command ::sha1::sha1c] != {}}] + # set r [expr {[info commands ::sha1::sha1c] != {}}] # } #} cryptkit { if {![catch {package require cryptkit}]} { set r [expr {![catch {cryptkit::cryptInit}]}] Index: modules/sha1/sha1.tcl ================================================================== --- modules/sha1/sha1.tcl +++ modules/sha1/sha1.tcl @@ -60,11 +60,11 @@ set r 1 } critcl { if {![catch {package require tcllibc}] || ![catch {package require sha1c}]} { - set r [expr {[info command ::sha1::sha1c] != {}}] + set r [expr {[info commands ::sha1::sha1c] != {}}] } } cryptkit { if {![catch {package require cryptkit}]} { set r [expr {![catch {cryptkit::cryptInit}]}] Index: modules/sha1/sha1v1.tcl ================================================================== --- modules/sha1/sha1v1.tcl +++ modules/sha1/sha1v1.tcl @@ -502,11 +502,11 @@ set r 0 switch -exact -- $name { critcl { if {![catch {package require tcllibc}] || ![catch {package require sha1c}]} { - set r [expr {[info command ::sha1::sha1c] != {}}] + set r [expr {[info commands ::sha1::sha1c] != {}}] } } cryptkit { if {![catch {package require cryptkit}]} { set r [expr {![catch {cryptkit::cryptInit}]}] Index: modules/sha1/sha256.tcl ================================================================== --- modules/sha1/sha256.tcl +++ modules/sha1/sha256.tcl @@ -82,11 +82,11 @@ set r 1 } critcl { if {![catch {package require tcllibc}] || ![catch {package require sha256c}]} { - set r [expr {[info command ::sha2::sha256c_update] != {}}] + set r [expr {[info commands ::sha2::sha256c_update] != {}}] } } default { return -code error "invalid accelerator $key:\ must be one of [join [KnownImplementations] {, }]" Index: modules/snit/snit.test ================================================================== --- modules/snit/snit.test +++ modules/snit/snit.test @@ -331,11 +331,11 @@ test typedestruction-1.4 {type proc is destroyed on error} -body { catch {type dog { error "Error creating dog" }} result - list [namespace exists ::dog] [info command ::dog] + list [namespace exists ::dog] [info commands ::dog] } -result {0 {}} test typedestruction-1.5 {unrelated namespaces are deleted, bug 2898640} -body { type dog {} namespace eval dog::unrelated {} @@ -448,11 +448,11 @@ error "Error creating dog" } } } result - list [namespace exists ::dog] [info command ::dog] + list [namespace exists ::dog] [info commands ::dog] } -result {0 {}} #----------------------------------------------------------------------- # Type components Index: modules/textutil/expander.tcl ================================================================== --- modules/textutil/expander.tcl +++ modules/textutil/expander.tcl @@ -85,11 +85,11 @@ set name "$ns$name" } # NEXT, Check the name - if {"" != [info command $name]} { + if {"" != [info commands $name]} { return -code error "command name \"$name\" already exists" } # NEXT, Create the object. proc $name {method args} [format { Index: modules/uuid/uuid.tcl ================================================================== --- modules/uuid/uuid.tcl +++ modules/uuid/uuid.tcl @@ -201,11 +201,11 @@ variable accel set r 0 switch -exact -- $name { critcl { if {![catch {package require tcllibc}]} { - set r [expr {[info command ::uuid::generate_c] != {}}] + set r [expr {[info commands ::uuid::generate_c] != {}}] } } default { return -code error "invalid accelerator package:\ must be one of [join [array names accel] {, }]"