From 2db244d8b36c27ed7af8591fe334869fef60c57b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 29 Feb 1996 15:41:38 +0000 Subject: [PATCH] Incorporated WAIS functionality. --- www/Makefile | 43 ++++++++------ www/msearch.egw | 8 ++- www/query.egw | 8 +-- www/search.egw | 4 +- www/z39util.tcl | 160 ++++++++++++++++++++++++++++++++++++++++++++++------- www/ztargets.conf | 11 +++- 6 files changed, 189 insertions(+), 45 deletions(-) diff --git a/www/Makefile b/www/Makefile index e473d74..11d3b94 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,22 +1,23 @@ # Makefile for www gateway utility # Europagate, 1995 # -# $Id: Makefile,v 1.31 1996/02/20 16:07:39 adam Exp $ +# $Id: Makefile,v 1.32 1996/02/29 15:41:38 adam Exp $ # SHELL=/bin/sh -# -ZDEFS= -#ZINC=-I../../yaz/include + ZLIB=../../yaz/lib/libyaz.a -#ZLIB=-lyaz + +IRTCLDIR=../../ir-tcl +IRTCLLIB=$(IRTCLDIR)/libirtcl.a +IRTCLINC=-I$(IRTCLDIR) + #MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a -LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB) #NETLIB=-lnsl -lsocket -# + OLIB=../lib/util.a ../lib/libres+log.a TCLLIB=/usr/local/lib/libtcl7.5.a -TCLINC=-I../../ir-tcl -# +TCLINC= + WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \ mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw HSCRIPTS=egwindex.html @@ -24,9 +25,11 @@ CONFFILES=egw.res ztargets.conf TPROG1=egwcgi TPROG2=egwsh TPROG3=wtest +TPROG4=egwwais P1=wcgi.o -P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o +P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o wshmain.o P3=wproto.o wtest.o +P4=wproto.o winterp.o waissh.o wtcl.o wirtcl.o wshmain.o wwaistcl.o CPP=$(CC) -E HTTPDDIR=/usr/local/etc/httpd @@ -43,20 +46,28 @@ GIFDIR=$(HTDOCS)/egwgif #LOGDIR=/data2/html/egw/logs #GIFDIR=/data2/html/egw/gif -INCLUDE=-I../include $(ZINC) $(TCLINC) -DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\" +INCLUDE=-I../include $(TCLINC) $(IRTCLINC) +DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\" all: $(TPROG1) $(TPROG2) $(TPROG1): $(P1) $(OLIB) - $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB) $(ZLIB) + $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB) $(TPROG2): $(P2) $(OLIB) - $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(LIBIRTCL) \ - $(NETLIB) $(TCLLIB) -lm + $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(IRTCLLIB) \ + $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm $(TPROG3): $(P3) $(OLIB) - $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) $(ZLIB) + $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) + + +WAISDIR=../../freeWAIS-sf-2.0 +WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a + +$(TPROG4): $(P4) $(OLIB) + $(CC) $(CFLAGS) -o $(TPROG4) $(P4) $(OLIB) $(IRTCLLIB) \ + $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm install: install.prog install.script install.gif diff --git a/www/msearch.egw b/www/msearch.egw index f6defa0..a86d918 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,6 +1,6 @@ { -# $Id: msearch.egw,v 1.14 1996/01/29 17:31:47 adam Exp $ +# $Id: msearch.egw,v 1.15 1996/02/29 15:41:38 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -60,7 +60,11 @@ set r [z39$i.$setNo resultCount] html "$r hits\n
\n" } html "\n" diff --git a/www/query.egw b/www/query.egw index 1d339f2..fec5af1 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.33 1996/02/21 16:57:38 adam Exp $ +# $Id: query.egw,v 1.34 1996/02/29 15:41:39 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -40,9 +40,7 @@ proc ok-response {} { set hist($setNo,host) $host set hist($setNo,idAuthentication) [lindex $targets($host) 3] - if {[catch {z39 failback fail-response}]} { - ir z39 - } + mkAssoc z39 $host z39 callback ok-response z39 failback fail-response @@ -77,7 +75,7 @@ proc ok-response {} { html "\n" egw_abort } - if {[catch {egw_wait sessionWait 60}]} { + if {$sessionWait == 0 && [catch {egw_wait sessionWait 60}]} { displayError "Cannot initialize target ${thisHost}" {} html "\n" egw_abort diff --git a/www/search.egw b/www/search.egw index eabe4b9..9263dfa 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $Id: search.egw,v 1.32 1996/02/12 13:39:40 adam Exp $ +# $Id: search.egw,v 1.33 1996/02/29 15:41:39 adam Exp $ proc start-scan {scanNo cache dir initSet} { global sessionId @@ -350,7 +350,7 @@ proc buttons {setNo setMax startPos after} { } egw_flush html "