Index: openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl,v diff -u -r1.12.4.6 -r1.12.4.7 --- openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 28 Sep 2013 12:10:00 -0000 1.12.4.6 +++ openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 2 Oct 2013 08:56:25 -0000 1.12.4.7 @@ -38,7 +38,7 @@ lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \ $package(embeds) $package(extends) $package(provides) $package(requires) ""] - if { [lsearch -exact $install $package(package.key)] != -1 } { + if {$package(package.key) in $install} { # This is a package which we should install lappend install_spec_files $spec_file } Index: openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl,v diff -u -r1.16.10.2 -r1.16.10.3 --- openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 28 Sep 2013 18:17:36 -0000 1.16.10.2 +++ openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 2 Oct 2013 08:56:25 -0000 1.16.10.3 @@ -78,7 +78,7 @@ # Install the packages. ns_log Debug "APM: Installing package at $package_path." - set enable_p [expr {[lsearch -exact $pkg_enable_list $package_key] != -1}] + set enable_p [expr {$package_key in $pkg_enable_list}] set version_id [apm_package_install \ -enable=$enable_p \ Index: openacs-4/packages/acs-admin/www/auth/authority-parameters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority-parameters.tcl,v diff -u -r1.4 -r1.4.22.1 --- openacs-4/packages/acs-admin/www/auth/authority-parameters.tcl 8 Oct 2003 09:58:01 -0000 1.4 +++ openacs-4/packages/acs-admin/www/auth/authority-parameters.tcl 2 Oct 2013 08:56:25 -0000 1.4.22.1 @@ -39,7 +39,7 @@ } -set has_parameters_p [expr [llength [array names parameters]] > 0] +set has_parameters_p [expr {[llength [array names parameters]] > 0}] set first_param_name "" if { $has_parameters_p } { Index: openacs-4/packages/acs-admin/www/install/install-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install-2.tcl,v diff -u -r1.2 -r1.2.10.1 --- openacs-4/packages/acs-admin/www/install/install-2.tcl 10 Jan 2007 21:22:00 -0000 1.2 +++ openacs-4/packages/acs-admin/www/install/install-2.tcl 2 Oct 2013 08:56:25 -0000 1.2.10.1 @@ -63,7 +63,7 @@ multirow create install package_key version_name package_name comment extra_p foreach key $result(packages) { - set extra_p [expr {[lsearch $package_key $key] == -1}] + set extra_p [expr {$key ni $package_key}] if { $extra_p } { set extras_p 1 } Index: openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl,v diff -u -r1.27.8.8 -r1.27.8.9 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 2 Oct 2013 07:55:04 -0000 1.27.8.8 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 2 Oct 2013 08:56:25 -0000 1.27.8.9 @@ -1093,9 +1093,7 @@ if {[regexp {^\}(\s*)(else|elseif)(\s*\{)} [string range $data $i end] match pre els post]} { append html "${pre}$HTML(procs)${els}$HTML(/procs)${post}" set proc_ok 1 - incr i [expr [string length $pre] + \ - [string length $els] + \ - [string length $post]] + incr i [expr {[string length $pre] + [string length $els] + [string length $post]}] } } Index: openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl,v diff -u -r1.42.8.2 -r1.42.8.3 --- openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl 2 Oct 2013 08:29:06 -0000 1.42.8.2 +++ openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl 2 Oct 2013 08:56:26 -0000 1.42.8.3 @@ -659,7 +659,7 @@ } array unset retrieved_value $parameter } - aa_true "Only the right parameters were retrieved" [expr [llength [array names retrieved_value]] == 0] + aa_true "Only the right parameters were retrieved" [expr {[llength [array names retrieved_value]] == 0}] } } Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v diff -u -r1.41.2.6 -r1.41.2.7 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 2 Oct 2013 08:03:14 -0000 1.41.2.6 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 2 Oct 2013 08:56:26 -0000 1.41.2.7 @@ -86,7 +86,7 @@ } proc ad_proc_valid_switch_p {str} { - return [expr [string equal "-" [string index $str 0]] && ![number_p $str]] + return [expr {[string index $str 0] eq "-" && ![number_p $str]}] } proc ad_proc args { Index: openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl,v diff -u -r1.41.2.4 -r1.41.2.5 --- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 2 Oct 2013 08:29:06 -0000 1.41.2.4 +++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 2 Oct 2013 08:56:26 -0000 1.41.2.5 @@ -372,7 +372,7 @@ # We need to add that information back into the .info files. set package_path [acs_package_root_dir $package_key] - return [expr ![file exists "${package_path}/sql"] || [file exists "${package_path}/sql/[db_type]"]] + return [expr {![file exists "${package_path}/sql"] || [file exists "${package_path}/sql/[db_type]"]}] } ad_proc -private apm_source { __file } { Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl,v diff -u -r1.42.6.2 -r1.42.6.3 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 1 Oct 2013 08:36:53 -0000 1.42.6.2 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 2 Oct 2013 08:56:26 -0000 1.42.6.3 @@ -215,7 +215,7 @@ # Count the num of events at the hours of operations for {set i 0} {$i <= $hours_diff} {incr i} { set the_hour [expr {$hour + $i}] - set n_events($the_hour) [expr $n_events([expr {$the_hour - $i}]) + 1] + set n_events($the_hour) [expr {$n_events([expr {$the_hour - $i}]) + 1}] } } } Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v diff -u -r1.24.6.2 -r1.24.6.3 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 1 Oct 2013 08:36:53 -0000 1.24.6.2 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 2 Oct 2013 08:56:26 -0000 1.24.6.3 @@ -484,7 +484,7 @@ string. } { # Return immediately of the current view isn't month or year - if {[lsearch -exact [list month year] $view] == -1} { + if {$view ni [list month year]} { return "" } @@ -679,7 +679,7 @@ set months_list [dt_month_names] set now [clock scan $date] - set curr_month [expr [dt_trim_leading_zeros [clock format $now -format "%m"]]-1] + set curr_month [expr {[dt_trim_leading_zeros [clock format $now -format "%m"]] - 1}] for {set i 0} {$i < 12} {incr i} { Index: openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl,v diff -u -r1.12.14.1 -r1.12.14.2 --- openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 1 Oct 2013 08:36:53 -0000 1.12.14.1 +++ openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 2 Oct 2013 08:56:26 -0000 1.12.14.2 @@ -102,14 +102,14 @@ set julian_date [dt_ansi_to_julian 1582 10 15 CE] } else { if {$era eq "BCE"} { - set year [expr -$year + 1] + set year [expr {-$year + 1}] } if {$month > 2} { set year_n $year set month_n [expr {$month + 1}] } else { - set year_n [expr {$year - 1}] + set year_n [expr {$year - 1}] set month_n [expr {$month + 13}] } @@ -232,7 +232,7 @@ Returns the weekday number of the first day for the given month/year } { # calendar widgets are expecting integers 1-7, so we must adjust - return [expr [clock format [clock scan $year-$month-01] -format %w] + 1] + return [expr {[clock format [clock scan $year-$month-01] -format %w] + 1}] } ad_proc -public dt_next_month { @@ -531,7 +531,7 @@ Input variables can be any strings that can be converted to times using clock scan. } { - return [expr [clock scan $end]-[clock scan $start]] + return [expr {[clock scan $end] - [clock scan $start]}] } ad_proc -private dt_trim_leading_zeros {