# Europagate, 1995
#
# $Log: Makefile,v $
-# Revision 1.15 1995/11/13 18:17:46 adam
+# Revision 1.16 1995/11/14 16:01:50 adam
+# Bug fix: didn't use correct database(s) when 'all' checkbox was selected.
+#
+# Revision 1.15 1995/11/13 18:17:46 adam
# Better error handling.
#
# Revision 1.14 1995/11/13 15:41:40 adam
ZDEFS=
ZINC=-I../../yaz/include
ZLIB=../../yaz/lib/libyaz.a
-MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
+#MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
LIBIRTCL=/usr/local/lib/libirtcl.a $(ZLIB) $(MOSILIB)
+#NETLIB=-lnsl -lsocket
#
OLIB=../lib/util.a ../lib/libres+log.a
-TCLLIB=/usr/local/lib/libtcl7.4.a
+TCLLIB=/usr/local/lib/libtcl.a
#
WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
mtargets.egw mquery.egw msearch.egw
</head>
<body>
{
-# $Id: query.egw,v 1.16 1995/11/13 18:17:47 adam Exp $
+# $Id: query.egw,v 1.17 1995/11/14 16:01:50 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
}
html "<br>\n"
if {$nodb > 2} {
- html {<input type="checkbox" name="base" value="}
+ html {<input type="checkbox" name="baseall" value="}
html [concat $databases] {"> All <br>} \n
}
}
<html>
{
-# $Id: search.egw,v 1.16 1995/11/13 18:17:48 adam Exp $
+# $Id: search.egw,v 1.17 1995/11/14 16:01:51 adam Exp $
proc buttons {setNo setMax startPos after} {
global sessionId
set hist($setNo,form,logic2) [wform logic2]
incr nextSetNo
+
+ set host $hist($setNo,host)
+ set databases [lindex $targets($host) 1]
+
set b [wform base]
- if {$b == ""} {
+ if {[wform baseall] != ""} {
+ set hist($setNo,database) $databases
+ } elseif {$b == ""} {
set hist($setNo,database) $databases
} else {
set hist($setNo,database) $b
#
-# $Id: z39util.tcl,v 1.10 1995/11/14 09:53:16 adam Exp $
+# $Id: z39util.tcl,v 1.11 1995/11/14 16:01:52 adam Exp $
#
proc saveState {} {
uplevel #0 {
displayError "Cannot connect to target" $host
return 0
} elseif {$sessionWait == 0} {
- zwait sessionWait
+ if {[catch {zwait sessionWait 300}]} {
+ $zz disconnect
+ displayError "Cannot connect to target" $host
+ return 0
+ }
if {$sessionWait != 1} {
displayError "Cannot connect to target" $host
return 0
set sessionWait 0
if {[catch {$zz init}]} {
displayError "Cannot initialize target" $host
+ $zz disconnect
return 0
}
if {[catch {zwait sessionWait 60}]} {
$zz.$setNo mediumSetElementSetNames $elements
$zz.$setNo recordElements $elements
+ wlog debug "database=$database"
eval $zz.$setNo databaseNames $database
$zz.$setNo preferredRecordSyntax USMARC
$zz.$setNo search $query
if {[catch {zwait sessionWait 600}]} {
- wlog debug "timeout/cancel in present"
+ wlog debug "timeout/cancel in search"
displayError "Timeout in search" {}
html "</body></html>\n"
$zz disconnect
return 0
}
- if {$sessionWait != 1} {
+ if {$sessionWait == -1} {
displayError "Search fail" "Connection closed"
html "</body></html>\n"
$zz disconnect
- return 0
}
- set status [$zz.$setNo responseStatus]
- if {[lindex $status 0] == "NSD"} {
- set code [lindex $status 1]
- set msg [lindex $status 2]
- set addinfo [lindex $status 3]
- displayError "Diagnostic message" \
- "$msg: $addinfo\n<br>(error code $code)"
- return 0
+ if {$sessionWait != 1} {
+ return 0
}
set hist($setNo,hits) [$zz.$setNo resultCount]
return 1
-# $Id: ztargets.conf,v 1.11 1995/11/14 09:53:17 adam Exp $
+# $Id: ztargets.conf,v 1.12 1995/11/14 16:01:53 adam Exp $
set commonFields {
{ Title {@attr 1=4} }
{ Author {@attr 1=1003} }
set targets(dtbsun.dtv.dk:9999) {
Zserver
- {usgs esdd cd_rom iah unknown}
+ {usgs esdd cd_rom iah}
{
{ Title {@attr 1=4} }
{ Author {@attr 1=1003} }