Index: openacs-4/packages/xml-rpc/tcl/validator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xml-rpc/tcl/validator-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xml-rpc/tcl/validator-procs.tcl 24 Feb 2005 22:00:50 -0000 1.2 +++ openacs-4/packages/xml-rpc/tcl/validator-procs.tcl 10 Apr 2008 15:29:34 -0000 1.3 @@ -107,7 +107,7 @@ # while {[info exists bigArray($counter)]} { # incr counter # } -# set counter [expr $counter - 1] +# set counter [expr {$counter - 1}] # return "-string [list "$bigArray(0)$bigArray($counter)"]" return "-string \"[lindex $array 0][lindex $array end]\"" } @@ -118,14 +118,14 @@ array set 2000 $bigStruct(2000) array set April $2000(04) array set first $April(01) - return "-int [expr $first(larry) + $first(curly) + $first(moe)]" + return "-int [expr {$first(larry) + $first(curly) + $first(moe)}]" } proc validator1.simpleStructReturnTest {number} { - set struct(times10) [list -int [expr $number * 10]] - set struct(times100) [list -int [expr $number * 100]] - set struct(times1000) [list -int [expr $number * 1000]] + set struct(times10) [list -int [expr {$number * 10}]] + set struct(times100) [list -int [expr {$number * 100}]] + set struct(times1000) [list -int [expr {$number * 1000}]] return "-struct [list [array get struct]]" } @@ -140,7 +140,7 @@ {url http://www.theashergroup.com/RPC2} {array ""} } { - if {[string equal "" $array]} { + if {$array eq ""} { set array [list \ [list -struct [list moe [list -int 1] \ curly [list -int 2] \ @@ -159,7 +159,7 @@ {url http://www.theashergroup.com/RPC2} {string ""} } { - if {[string equal "" $string]} { + if {$string eq ""} { set string "l'&d>&f&x'>jsua\"&'wmq&'nk'i'" } @@ -170,7 +170,7 @@ {url "http://www.theashergroup.com/RPC2"} {struct ""} } { - if {[string equal "" $struct]} { + if {$struct eq ""} { set struct \ [list moe [list -int 1] \ curly [list -int 2] \ @@ -184,7 +184,7 @@ {url "http://www.theashergroup.com/RPC2"} {struct ""} } { - if {[string equal $struct ""]} { + if {$struct eq ""} { set struct [list bob [list -int 5]] } return [xmlrpc::remote_call $url validator1.echoStructTest -struct $struct] @@ -208,7 +208,7 @@ {url http://www.theashergroup.com/RPC2} {array ""} } { - if {[string equal "" $array]} { + if {$array eq ""} { set array [list Wisconsin Vermont Utah Idaho Kansas California \ Virginia Iowa {New York} Mississippi Maine Delaware \ Ohio Washington {West Virginia} Delaware Kentucky \ @@ -267,12 +267,12 @@ # exit test (to find end of month) set date \ [clock format \ - [clock scan "[expr $d - 1] day" \ + [clock scan "[expr {$d - 1}] day" \ -base [clock scan "$y-${mstr}-01"]] \ -format "%y:%m:%d"] set date [split $date :] set reald [lindex $date 2] - if {![string equal $reald $dstr]} { + if {$reald ne $dstr } { break } @@ -285,7 +285,7 @@ } else { set dayta \ [list -struct \ - [list moe [list -int [expr 2 * $moe]]]] + [list moe [list -int [expr {2 * $moe}]]]] } set month [concat $month [list $dstr $dayta]] } Index: openacs-4/packages/xml-rpc/tcl/xml-rpc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xml-rpc/tcl/xml-rpc-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/xml-rpc/tcl/xml-rpc-procs.tcl 8 Apr 2008 18:05:05 -0000 1.5 +++ openacs-4/packages/xml-rpc/tcl/xml-rpc-procs.tcl 10 Apr 2008 15:29:34 -0000 1.6 @@ -58,7 +58,7 @@ # ns_openexcl can fail, since tmpnam is known not to # be thread/process safe. Hence spin till success set fp "" - while {$fp == ""} { + while {$fp eq ""} { set filename "[ns_tmpnam][clock clicks -milliseconds].xmlrpc2" set fp [ns_openexcl $filename] } @@ -555,20 +555,20 @@ # follow 302 if {$status == 302} { set location [ns_set iget $headers location] - if {$location != ""} { + if {$location ne ""} { ns_set free $headers close $rfd set page [xmlrpc::httppost -url $location \ -timeout $timeout -depth $depth -content $content] } } else { set length [ns_set iget $headers content-length] - if [string match "" $length] {set length -1} + if {$length eq ""} {set length -1} set err [catch { - while 1 { + while {1} { set buf [_ns_http_read $timeout $rfd $length] append page $buf - if [string match "" $buf] break + if {$buf eq ""} break if {$length > 0} { incr length -[string length $buf] if {$length <= 0} break @@ -577,7 +577,7 @@ } errMsg] ns_set free $headers close $rfd - if $err { + if {$err} { global errorInfo return -code error -errorinfo $errorInfo $errMsg } @@ -594,7 +594,7 @@ set doc [xml_parse -persist $xml] set root [xml_doc_get_first_node $doc] - if { ![string equal [xml_node_get_name $root] "methodResponse"] } { + if { [xml_node_get_name $root] ne "methodResponse" } { set root_name [xml_node_get_name $root] xml_doc_free $doc return -code error "xmlrpc::parse_response: invalid server reponse - root node is not methodResponse. it's $root_name" Index: openacs-4/packages/xml-rpc/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xml-rpc/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xml-rpc/www/index.tcl 26 Nov 2003 02:59:14 -0000 1.1 +++ openacs-4/packages/xml-rpc/www/index.tcl 10 Apr 2008 15:29:35 -0000 1.2 @@ -9,7 +9,7 @@ } { } -if {[string equal [ns_conn method] POST]} { +if {[ns_conn method] eq "POST"} { set content [xmlrpc::get_content] ns_return 200 text/xml [xmlrpc::invoke $content] return