From 3871eda3b3a1518d4d18c1ffc0ed0375cb88bdf5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 21 Feb 1996 16:57:38 +0000 Subject: [PATCH] Uses string compare instead of !=/== when possible. --- www/query.egw | 4 ++-- www/z39util.tcl | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/www/query.egw b/www/query.egw index f68a696..1d339f2 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.32 1996/01/26 15:50:08 adam Exp $ +# $Id: query.egw,v 1.33 1996/02/21 16:57:38 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -47,7 +47,7 @@ proc ok-response {} { z39 callback ok-response z39 failback fail-response set thisHost [splitHostSpec $host] - if {$thisHost != $oldHost} { + if {[string compare $thisHost $oldHost]} { catch {z39 disconnect} set sessionWait 0 diff --git a/www/z39util.tcl b/www/z39util.tcl index ffdb837..8553519 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.32 1996/02/21 14:58:35 adam Exp $ +# $Id: z39util.tcl,v 1.33 1996/02/21 16:57:39 adam Exp $ # proc saveState {} { uplevel #0 { @@ -506,7 +506,7 @@ proc z39scan {setNo scanNo tno scanLines scanPos cache} { $zz callback ok-response $zz failback fail-response set thisHost [splitHostSpec $host] - if {$oldHost != $thisHost} { + if {[string compare $oldHost $thisHost]} { catch [list $zz disconnect] set sessionWait 0 @@ -665,7 +665,7 @@ proc z39search {setNo piggy tno elements} { $zz callback ok-response $zz failback fail-response set thisHost [splitHostSpec $host] - if {$oldHost != $thisHost} { + if {[string compare $oldHost $thisHost]} { catch [list $zz disconnect] set sessionWait 0 @@ -863,7 +863,7 @@ proc z39msearch {setNo elements start number cache} { } set oldHost [z39$i connect] set thisHost [splitHostSpec $host] - if {$oldHost != $thisHost} { + if {[string compare $oldHost $thisHost]} { catch {z39$i disconnect} } z39$i callback [list connect-m-response $i] @@ -874,7 +874,7 @@ proc z39msearch {setNo elements start number cache} { set oldHost [z39$i connect] set host $hist($setNo,$i,host) set thisHost [splitHostSpec $host] - if {$oldHost == $thisHost} { + if {![string compare $oldhost $thisHost]} { continue } egw_log debug "old=$oldHost this=$thisHost" -- 1.7.10.4