X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=shell.tcl;fp=shell.tcl;h=30fe687ccbe44b246a0ef2e9246b2030fb6f603c;hb=977f685c8392f79dc529a9b71c42c7dcf9f9e245;hp=a6a1c926bca101539e5efcfdb04ec4266464a171;hpb=49a3b631296db13894696e30b918f3543c16b2ab;p=ir-tcl-moved-to-github.git diff --git a/shell.tcl b/shell.tcl index a6a1c92..30fe687 100644 --- a/shell.tcl +++ b/shell.tcl @@ -1,8 +1,13 @@ -# $Id: shell.tcl,v 1.3 1996-08-21 11:24:03 adam Exp $ +# $Id: shell.tcl,v 1.4 1998-01-30 13:30:50 adam Exp $ # source display.tcl -ir z +if {[catch {ir z}]} { + set e [info sharedlibextension] + puts "Loading irtcl$e ..." + load ./irtcl$e irtcl + ir z +} set pref(base) Default set pref(format) usmarc @@ -29,9 +34,14 @@ proc target {name} { z callback {connect-response} if [catch "z connect $name"] { fail-response - } else { + } elseif {$ok == 0} { vwait ok } + if {$ok == 1} { + puts "Connected and initialized." + } else { + puts "Failed." + } return {} } @@ -54,7 +64,6 @@ proc init-response {} { global ok pref set ok 1 - puts "Connected and initialized." ir-set z.1 z }