From: Adam Dickmeiss Date: Sun, 13 Apr 1997 19:00:34 +0000 (+0000) Subject: Added support for Tcl8.0/Tk8.0. X-Git-Tag: IRTCL.1.4~82 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=9229a060e7934ce5b090d1d2fce9e6c151f9e4d3;p=ir-tcl-moved-to-github.git Added support for Tcl8.0/Tk8.0. New command ir-log-init to setup yaz logging facilities. --- diff --git a/CHANGELOG b/CHANGELOG index e2b0249..44268f0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.29 1996-11-14 17:11:03 adam Exp $ +$Id: CHANGELOG,v 1.30 1997-04-13 19:00:34 adam Exp $ 06/19/95 Release of ir-tcl-1.0b ------------------------------------------------------ @@ -114,3 +114,7 @@ $Id: CHANGELOG,v 1.29 1996-11-14 17:11:03 adam Exp $ 11/14/96 Added some Explain documentation. +04/13/96 Added support for Tcl8.0/Tk8.0. + +04/13/96 Added ir-log-init command. + diff --git a/client.tcl b/client.tcl index 08f84a9..9bc242f 100644 --- a/client.tcl +++ b/client.tcl @@ -4,7 +4,11 @@ # Sebastian Hammer, Adam Dickmeiss # # $Log: client.tcl,v $ -# Revision 1.98 1996-11-14 17:11:04 adam +# Revision 1.99 1997-04-13 19:00:37 adam +# Added support for Tcl8.0/Tk8.0. +# New command ir-log-init to setup yaz logging facilities. +# +# Revision 1.98 1996/11/14 17:11:04 adam # Added Explain documentaion. # # Revision 1.97 1996/09/13 10:54:22 adam @@ -4123,7 +4127,7 @@ if {[file exists ${libdir}/setup.tcl]} { } # Init: Uncomment this line if you wan't to enable logging. -#z39 logLevel all +ir-log-init all # Init: If hostid is a valid target, a new connection will be established # immediately. diff --git a/clientrc.tcl b/clientrc.tcl index e7cadb6..4732a29 100644 --- a/clientrc.tcl +++ b/clientrc.tcl @@ -1,4 +1,6 @@ # Setup file +set {profile(io)} {IO io.dtv.dk 9999 {} 50000 30000 tcpip Default 1 {} {} Z39 34 2 0 0 4 851083005 {} {} {} {} {} {} {} {} {} {} {}} + set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} Z39 2 {} {} {} {} {} 847978115 {} {} {} {} {} {} {} {} {} {}} set {profile(DanBib, SR)} {{SR Target DANBIB} 0103/find2.denet.dk 4500 {} 8192 8192 mosi danbib 1 {} 1 SR 8 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}} @@ -9,11 +11,11 @@ set {profile(madison)} {{University of Wisconsin-Madison} z3950.adp.wisc.edu 210 set {profile(bibsys)} {{BIBSYS Target (YAZ-based)} z3950.bibsys.no 2100 {} 16384 8192 tcpip BIBSYS 1 {} 1 Z39 27 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}} -set {profile(Default)} {{} {} {210} {} 50000 30000 tcpip {} 1 {} {} Z39 34 2 0 0 4 {} {} {} {} {} {} {} {} {} {} {} {}} +set {profile(Default)} {{} {} {210} {} 50000 30000 tcpip {} 1 {} {} Z39 35 2 0 0 4 {} {} {} {} {} {} {} {} {} {} {} {}} set {profile(RLG)} {{Research Libraries group} rlg.stanford.edu 210 {} 32768 32768 tcpip {DEM} 1 {} 1 Z39 5 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}} -set {profile(ztest9999)} {{YAZ server on localhost} localhost 9999 {} 50000 30000 tcpip Default {} {} {} Z39 33 2 0 0 4 842607655 844779204 842611107 {} {} {} {} {} {} {} {} {}} +set {profile(ztest9999)} {{YAZ server on localhost} localhost 9999 {} 50000 30000 tcpip Default {} {} {} Z39 33 2 0 0 4 842607655 858590340 842611107 {} {} {} {} {} {} {} {} {}} set {profile(AT&T server)} {{AT&T Z39 Server} z3950.research.att.com 210 {} 90000 90000 tcpip {explain books gils netlib ftp z39dbs ahd books books books factbook russian outside-marc} 1 {} {} Z39 21 {} {} {} {} {} 842605350 842605239 {Lucent Technologies Research Server} {} 100 600000 {} {} 0 {Salutations - this is Lucent Technologies experimental Z39.50 server. No guarentees, but free and unlimited access!} {}} diff --git a/configure.in b/configure.in index 277a6f9..a113902 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl IR toolkit for tcl/tk dnl (c) Index Data 1996 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.19 1996-09-03 13:52:09 adam Exp $ +dnl $Id: configure.in,v 1.20 1997-04-13 19:00:42 adam Exp $ AC_INIT(ir-tcl.h) CC=${CC-cc} dnl ------ Substitutions @@ -94,7 +94,7 @@ else AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) AC_MSG_CHECKING(for Tcl) TCL_VERSION=nope - for i in "" 7.4 7.5 7.6 7.7; do + for i in "" 7.4 7.5 7.6 8.0; do if test -r ${tryprefix}/lib/libtcl${i}.a; then TCL_VERSION=$i fi @@ -126,7 +126,7 @@ if test -r ${tryprefix}/lib/tkConfig.sh; then else AC_MSG_CHECKING(for Tk) TK_VERSION=nope - for i in "" 4.0 4.1 4.2 4.3; do + for i in "" 4.0 4.1 4.2 8.0; do if test -r ${tryprefix}/lib/libtk${i}.a; then TK_VERSION=$i fi diff --git a/display.tcl b/display.tcl index 69b1445..ae3148f 100644 --- a/display.tcl +++ b/display.tcl @@ -1,4 +1,4 @@ -# $Id: display.tcl,v 1.2 1995-08-28 12:21:21 adam Exp $ +# $Id: display.tcl,v 1.3 1997-04-13 19:00:42 adam Exp $ # # Record display proc display {zset no} { @@ -19,7 +19,12 @@ proc display {zset no} { if {$rtype == "SUTRS"} { puts [join [$zset getSutrs $no]] return - } + } + if {$rtype == "GRS-1"} { + set r [$zset getGrs $no] + puts $r + return + } if {[catch {set r [$zset getMarc $no line * * *]}]} { puts "Unknown record type: $rtype" return diff --git a/doc/ir-set.n b/doc/ir-set.n index 9359d7d..2e10d3c 100644 --- a/doc/ir-set.n +++ b/doc/ir-set.n @@ -1,6 +1,6 @@ .\" Copyright (c) 1995, 1996 Index Data .\" All rights reserved. -.\" $Id: ir-set.n,v 1.3 1996-11-14 17:11:13 adam Exp $ +.\" $Id: ir-set.n,v 1.4 1997-04-13 19:01:44 adam Exp $ .TH ir-set N "24 June 1996" "IrTcl" "IR Set" .SH NAME ir-set \- IR set @@ -25,7 +25,8 @@ Operations that are used to search a target: Sets the database(s) to be used in the following search request(s). .TP .BI "" zs " setName [" name "]" -Sets/gets the name of the result-set to be (re)searched. +Sets/gets the name of the result-set to be (re)searched. default name +of result-set is \fBdefault\fR. .TP .BI "" zs " replaceIndicator [" b "]" Sets/gets the replace-indicator as 0 (false) or 1 (true); default is @@ -139,7 +140,7 @@ Two special operators are supported: the \fB?\fR operator matches exactly one character; the \fB*\fR operator matches the whole item (don't care). The format of the data returned is determined by the \fItype\fR argument. -If \fItype\fR is \fBfield\fR the matcing part of the record is returned +If \fItype\fR is \fBline\fR the matcing part of the record is returned as a list of MARC tag specifications. Each MARC tag specification item consists of three elements: tag, indicator and field-list. The field-list part is a list of field specifications. Each field specification is a tuple diff --git a/doc/ir-tcl.sgml b/doc/ir-tcl.sgml index 3608b4c..e053776 100644 --- a/doc/ir-tcl.sgml +++ b/doc/ir-tcl.sgml @@ -1,14 +1,14 @@
IrTcl User's Guide and Reference <author><htmlurl url="http://www.indexdata.dk/" name="Index Data">, <tt><htmlurl url="mailto:info@index.ping.dk" name="info@index.ping.dk"></tt> -<date>$Revision: 1.22 $ +<date>$Revision: 1.23 $ <abstract> This document describes IrTcl -- an information retrieval toolkit for Tcl and Tk that provides access to the Z39.50/SR protocol. @@ -653,7 +653,7 @@ The settings that affect the search are listed below: <tag><tt>replaceIndicator </tt><em>boolean</em></tag> Replace-indicator. Default true (1). <tag><tt>setName </tt><em>string</em></tag> - Name of result set. + Name of result set. Default name of set is <tt/default/. <tag><tt>queryType rpn|ccl</tt></tag> Query type-1 or query type-2. Default rpn (type-1). <tag><tt>preferredRecordSyntax </tt><em>string</em></tag> diff --git a/iterate.tcl b/iterate.tcl index f95ece7..0a8c4c1 100644 --- a/iterate.tcl +++ b/iterate.tcl @@ -1,4 +1,4 @@ -# $Id: iterate.tcl,v 1.5 1996-08-21 11:24:01 adam Exp $ +# $Id: iterate.tcl,v 1.6 1997-04-13 19:00:43 adam Exp $ # # Small test script which searches for science ... proc fail-back {} { @@ -7,7 +7,6 @@ proc fail-back {} { proc connect-response {} { z callback {init-response} - ir-set z.1 z z init } proc init-response {} { @@ -23,20 +22,24 @@ proc do-search {} { incr count puts $count + catch {rename z.1 {}} + ir-set z.1 z z callback {search-response} - z.1 search science + z.1 preferredRecordSyntax sutrs + z.1 search the } proc search-response {} { set hits [z.1 resultCount] if {$hits <= 0} { do-search + return } z callback {present-response} - if {$hits < 10} { + if {$hits < 20} { z.1 present 1 $hits } else { - z.1 present 1 10 + z.1 present 1 20 } } @@ -46,7 +49,7 @@ proc present-response {} { ir z z failback {fail-back} -z databaseNames dummy +z databaseNames Default z callback {connect-response} z connect localhost:9999 vwait forever