# Makefile for www gateway utility
# Europagate, 1995
#
-# $Id: Makefile,v 1.32 1996/02/29 15:41:38 adam Exp $
+# $Id: Makefile,v 1.33 1996/03/05 18:50:24 adam Exp $
#
SHELL=/bin/sh
WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a
$(TPROG4): $(P4) $(OLIB)
- $(CC) $(CFLAGS) -o $(TPROG4) $(P4) $(OLIB) $(IRTCLLIB) \
+ $(CC) $(CFLAGS) -o $(TPROG4) $(P4) \
+ $(OLIB) $(IRTCLLIB) \
$(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
install: install.prog install.script install.gif
rm -f $(EGWDIR)/$$p; \
ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \
done
+ @if [ -x $(TPROG4) ]; then \
+ echo Installing $(TPROG4); \
+ cp $(TPROG4) $(EGWDIR)/$(TPROG4); \
+ chmod a+x $(EGWDIR)/$(TPROG4); \
+ fi
install.script:
@if [ ! -d $(EGWDIR) ]; then \
<title>Europagate WWW index</title>
</head>
<body>
-<h2>Europagate WWW index, $Id: egwindex.html,v 1.9 1996/01/29 17:31:45 adam Exp $</h2>
+<h2>Europagate WWW index, $Id: egwindex.html,v 1.10 1996/03/05 18:50:24 adam Exp $</h2>
<p>
<ul>
<li>
<li>
<a href="http:/cgi-bin/egwcgi/egwirtcl/targets.egw/0+1">
single target with debug and html2</a>
+</ul>
+<ul>
<li>
<a href="http:/cgi-bin/egwcgi/egwirtcl/mtargets.egw">
multiple targets</a>
<a href="http:/cgi-bin/egwcgi/egwirtcl/mtargets.egw/1+1">
multiple targets with debug and html2</a>
</ul>
+<ul>
+<li>
+ <a href="http:/cgi-bin/egwcgi/egwwais/targets.egw/1+1">
+ single wais/z39.50 target with debug and html3</a>
+<li>
+ <a href="http:/cgi-bin/egwcgi/egwwais/mtargets.egw/1+1">
+ multiple wais/z39.50 targets with debug and html3</a>
+</ul>
</body>
</html>
#
-# $Id: z39util.tcl,v 1.34 1996/02/29 15:41:40 adam Exp $
+# $Id: z39util.tcl,v 1.35 1996/03/05 18:50:26 adam Exp $
#
proc saveState {} {
uplevel #0 {
}
proc display-full-wais {zset no} {
- set i0 0
- set i1 0
- set refNo 0
- set body [$zset getWAIS $no text]
-
- while {[string length [set c [string index $body $i1]]]} {
- if {[string compare $c \n]} {
- incr i1
- continue
- }
- set l [string trim [string range $body $i0 $i1]]
- egw_log debug "line=$l"
- incr i1
- set i0 $i1
+ set i 0
+ set element junk
+ htmlToken l [join [$zset getWAIS $no text]] {
if {[string compare [string index $l 0] {<}]} {
- egw_log "xxxxxxxxxxxxxxxx"
+ set data($element) $l
continue
}
- if {[set mark [string first > $l ]] < 1} {
- egw_log "yyyyyyyyyyyyyyyy"
- continue
- }
- set data [string trim [string range $l [expr $mark +1] end]]
- incr mark -1
- set sw [string range $l 1 $mark]
- egw_log debug "sw=$sw"
- egw_log debug "data=$data"
- switch -exact $sw {
- ti {
- set title $data
+ switch -exact $l {
+ <ti> {
+ set element title
+ }
+ <dm> {
+ set element dateOfLastModification
}
- dm {
- set dateOfLastModification $data
+ <ci> {
+ set element controlIdentifier
}
- ci {
- set controlIdentifier $data
+ <lc> {
+ set element lastChecked
}
- lc {
- set lastChecked $data
+ <by> {
+ set element bytes
}
- by {
- set bytes $data
+ <avli> {
+ set element linkage
}
- avli {
- set linkage $data
+ <cr> {
+ incr i
}
- cr {
- incr refNo
+ <li> {
+ set element "$i,linkage"
}
- li {
- set crossRef($refNo,linkage) $data
+ <cp> {
+ set element "$i,title"
}
- cp {
- set crossRef($refNo,title) $data
+ default {
+ set element junk
}
}
}
- html {Title: } {<a href="} $linkage {">} $title "</a><br>\n"
- html {URL: } $linkage "<br>\n"
- if {[info exists bytes]} {
- html {Bytes: } $bytes "<br>\n"
+ html {Title: } {<a href="} $data(linkage) {">} $data(title) "</a><br>\n"
+ html {URL: } $data(linkage) "<br>\n"
+ html {Score: } [$zset getWAIS $no score] "<br>\n"
+ html {Lines: } [$zset getWAIS $no lines] "<br>\n"
+ if {[info exists data(bytes)]} {
+ html {Bytes: } $data(bytes) "<br>\n"
}
- if {[info exists dateOfLastModification]} {
- html {Last modified: } $dateOfLastModification "<br>\n"
+ if {[info exists data(dateOfLastModification)]} {
+ html {Last modified: } $data(dateOfLastModification) "<br>\n"
}
- if {[info exists lastChecked]} {
- html {Last checked: } $lastChecked "<br>\n"
+ if {[info exists data(lastChecked)]} {
+ html {Last checked: } $data(lastChecked) "<br>\n"
}
html "<ul>\n"
- for {set i 1} {$i <= $refNo} {incr i} {
- html {<li><a href="} $crossRef($i,linkage) {">}
- html $crossRef($i,title) "</a><br>\n"
- html "URL: " $crossRef($i,linkage)
+ for {set i 1} {[info exists data($i,linkage)]} {incr i} {
+ html {<li><a href="} $data($i,linkage) {">}
+ html $data($i,title) "</a><br>\n"
+ html "URL: " $data($i,linkage)
}
html "</ul>\n"
}
}
set sessionWait 0
egw_log debug "search: $query"
- $zz.$setNo search $query
+ if {[catch {$zz.$setNo search $query}]} {
+ displayError "Search fail" "Connection closed"
+ html "</body></html>\n"
+ $zz disconnect
+ return 0
+ }
if {[catch {egw_wait sessionWait 60}]} {
egw_log debug "timeout/cancel in search"