Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.143 -r1.144 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 13 Sep 2017 16:50:35 -0000 1.143 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 1 Oct 2017 12:16:05 -0000 1.144 @@ -56,7 +56,7 @@ error "zip command not found on the system." } set cmd [list exec] - switch $::tcl_platform(platform) { + switch -- $::tcl_platform(platform) { windows {lappend cmd cmd.exe /c} default {lappend cmd bash -c} } @@ -998,7 +998,7 @@ set secret [ns_config "ns/server/[ns_info server]/acs" parametersecret ""] foreach def [split $params &] { lassign [split $def =] key val - switch $key { + switch -- $key { max_age - secret {set $key [ad_urldecode_query $val]} } @@ -1188,7 +1188,7 @@ lassign [split $var_spec ":"] var type upvar 1 $var value if { [info exists value] } { - switch $type { + switch -- $type { multiple { foreach item $value { append hidden "\n" @@ -1327,7 +1327,7 @@ lassign [split $var_spec ":"] var type upvar 1 $var upvar_value if { [info exists upvar_value] } { - switch $type { + switch -- $type { multiple { foreach item $upvar_value { lappend params "[ns_urlencode $var]=[ns_urlencode $item]" @@ -2955,7 +2955,7 @@ set varname [ns_set key $set_id $i] upvar $level $varname var if { [info exists var] } { - switch $duplicates { + switch -- $duplicates { fail { return -code error "ad_ns_set_to_tcl_vars tried to set the var $varname which is already set" } @@ -3867,7 +3867,7 @@ # stuff like break or continue, the result is undefined. uplevel $finally - switch $return_code { + switch -- $return_code { 0 { # CODE executed without a non-local exit -- return what it # evaluated to. @@ -4503,19 +4503,19 @@ set hours [expr {abs($age_seconds / 3600)}] set minutes [expr {round(($age_seconds% 3600)/60.0)}] if {$hours < 24} { - switch $hours { + switch -- $hours { 0 { set result "" } 1 { set result "One hour " } default { set result "$hours hours "} } - switch $minutes { + switch -- $minutes { 0 {} 1 { append result "$minutes minute " } default { append result "$minutes minutes " } } } else { set days [expr {abs($hours / 24)}] - switch $days { + switch -- $days { 1 { set result "One day " } default { set result "$days days "} } @@ -4779,7 +4779,7 @@ @author Gustaf Neumann } { - switch $::tcl_platform(platform) { + switch -- $::tcl_platform(platform) { windows { # # Notice: Windows has an alternative search environment