Gateway uses record element set names B(rief) and F(ull).
Bug fix. Didn't save idAuthentication correctly.
# Europagate, 1995
#
# $Log: Makefile,v $
-# Revision 1.13 1995/11/08 18:07:22 adam
+# Revision 1.14 1995/11/13 15:41:40 adam
+# Arrow gifs.
+# Gateway uses record element set names B(rief) and F(ull).
+# Bug fix. Didn't save idAuthentication correctly.
+#
+# Revision 1.13 1995/11/08 18:07:22 adam
# Minor changes.
#
# Revision 1.12 1995/11/08 16:14:32 adam
mtargets.egw mquery.egw msearch.egw
HSCRIPTS=egwindex.html
CONFFILES=ztargets.conf
-GIFFILES=webgate.gif
+GIFFILES=webgate.gif darrw.gif uarrw.gif
TPROG1=egwcgi
TPROG2=egwsh
TPROG3=wtest
</head>
<body>
{
-# $Id: mquery.egw,v 1.4 1995/11/10 14:47:31 adam Exp $
+# $Id: mquery.egw,v 1.5 1995/11/13 15:41:41 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
global setNo
global nextSetNo
global hist
+ global targets
if {[catch {set setNo $nextSetNo}]} {
set nextSetNo 1
<html>
{
-# $Id: msearch.egw,v 1.4 1995/11/10 14:47:31 adam Exp $
+# $Id: msearch.egw,v 1.5 1995/11/13 15:41:42 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
set hist($nextSetNo,$i,idAuthentication) \
- hist($setNo,$i,idAuthentication)
+ $hist($setNo,$i,idAuthentication)
}
set setNo $nextSetNo
incr nextSetNo
set hist($setNo,maxPresent) 30
}
}
- z39msearch $setNo 1
+ z39msearch $setNo 1 B
html "<dl>\n"
set not $hist($setNo,0,host)
for {set i 1} {$i <= $not} {incr i} {
if {$zstatus($i) != 2} continue
- html "<dt> " $hist($setNo,$i,host) ": "
+ html "<dt> " [lindex $targets($hist($setNo,$i,host)) 0] ": "
set status [z39$i.$setNo responseStatus]
if {[lindex $status 0] == "NSD"} {
z39$i.$setNo nextResultSetPosition 0
</head>
<body>
{
-# $Id: query.egw,v 1.14 1995/11/10 14:47:31 adam Exp $
+# $Id: query.egw,v 1.15 1995/11/13 15:41:42 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
<hr>
<input type=submit value="Search"><input type=reset value="Reset">
<h3> Various technical parameters: </h3> <br>
-Max hits: <input type="text" name="hits" value="10" size=3>
+Max hits: <input type="text" name="hits" value="20" size=3>
Records are shown in:
<select name="format">
<option> Long format
<html>
{
-# $Id: search.egw,v 1.14 1995/11/10 14:47:32 adam Exp $
+# $Id: search.egw,v 1.15 1995/11/13 15:41:44 adam Exp $
-proc buttons {setNo setMax startPos} {
+proc buttons {setNo setMax startPos after} {
global sessionId
global env
global hist
+ if {$after && $setMax < [z39.$setNo resultCount]} {
+ html "<p>\n"
+ html "<center>\n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
+ html + [expr $setMax + $hist($setNo,maxPresent)]
+ html {"><img src="/gif/darrw.gif"></a>}
+ html "</center>\n"
+ }
+
html "<p>\n"
if {$setMax < [z39.$setNo resultCount]} {
html {<a href="http:} $env(SCRIPT_NAME)
if {$startPos != "" && $startPos != "1"} {
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo
- if {[expr $startPos - $hist($setNo,maxPresent)] > 1} {
- html + [expr $startPos - $hist($setNo,maxPresent)]
- html + [expr $startPos - 1]
- }
+ html + [expr $startPos - $hist($setNo,maxPresent)]
+ html + [expr $startPos - 1]
html {">Previous records</a>} " | \n"
}
html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw">New target</a>} " | \n"
- html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
- html {">New query</a>} "\n<p>\n"
+ html {">New query</a>} " | \n"
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/targets.egw">New target</a>} "<p>\n"
+
+ if {!$after && $startPos != "" && $startPos != "1"} {
+ html "<center>\n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo
+ html + [expr $startPos - $hist($setNo,maxPresent)]
+ html + [expr $startPos - 1]
+ html {"><img src="/gif/uarrw.gif"></a>}
+ html "</center><p>\n"
+ }
+
}
if {[info commands saveState] == ""} {
set setMax 0
set setOffset 0
if {$startPos == ""} {
- if {[z39search $setNo 1 0] != "1"} {
+ if {[z39search $setNo 1 0 B] != "1"} {
return
}
set r [z39.$setNo resultCount]
set setMax $hist($setNo,maxPresent)
}
} else {
- if {[z39search $setNo 0 0] != "1"} {
+ if {[z39search $setNo 0 0 B] != "1"} {
return
}
set r [z39.$setNo resultCount]
set setMax $endPos
}
if {$setMax > 0} {
- buttons $setNo $setMax $startPos
+ buttons $setNo $setMax $startPos 0
}
}
if {$setMax > 0} {
- z39present $setNo 0 $setOffset $setMax display-brief
+ z39present $setNo 0 $setOffset $setMax display-brief B
}
- buttons $setNo $setMax $startPos
+ buttons $setNo $setMax $startPos 1
}
{
<html>
{
-# $Id: showfull.egw,v 1.9 1995/11/10 14:47:32 adam Exp $
+# $Id: showfull.egw,v 1.10 1995/11/13 15:41:44 adam Exp $
-proc buttons {setNo tno no format count host} {
+proc buttons {setNo tno no format count host after} {
global sessionId
global env
global hist
+ if {$after && $no < $count} {
+ html "<p><center>\n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/showfull.egw/} $setNo + $tno +
+ html [expr $no + 1] + $format
+ html {"><img src="/gif/darrw.gif"></a>}
+ html "</center>\n"
+ }
html "<p>\n"
if {$no < $count} {
html {<a href="http:} $env(SCRIPT_NAME)
}
html $setNo + 1
html + $hist($setNo,maxPresent)
- html {">Result</a>} " | \n"
+ html {">Result set</a>} " | \n"
html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
if {$tno > 0} {
- html {/mtargets.egw}
+ html {/mquery.egw/}
} else {
- html {/targets.egw}
+ html {/query.egw/}
}
- html {">New target</a>} " | \n"
+ html $host + $setNo
+ html {">New query</a>} " | \n"
html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
if {$tno > 0} {
- html {/mquery.egw/}
+ html {/mtargets.egw}
} else {
- html {/query.egw/}
+ html {/targets.egw}
}
- html $host + $setNo
- html {">New query</a>} "<p>\n"
+ html {">New target</a>} "<p>\n"
+ if {!$after && $no > 1} {
+ html "<p><center>\n"
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/showfull.egw/} $setNo + $tno +
+ html [expr $no - 1] + $format
+ html {"><img src="/gif/uarrw.gif"></a>}
+ html "</center>\n"
+ }
}
if {[info commands saveState] == ""} {
set host $hist($setNo,$tno,host)
} else {
set zz z39
- set host $hist($setNo,$0,host)
+ set host $hist($setNo,host)
}
- if {[z39search $setNo 0 $tno] != "1"} {
+ if {[z39search $setNo 0 $tno F] != "1"} {
return
}
set count [$zz.$setNo resultCount]
html "<h2>Record \#$no out of $count </h2><br>\n"
- buttons $setNo $tno $no $format $count $host
+ buttons $setNo $tno $no $format $count $host 0
- eval {z39present $setNo $tno $no $no display-$format}
- buttons $setNo $tno $no $format $count $host
+ eval {z39present $setNo $tno $no $no display-$format F}
+ buttons $setNo $tno $no $format $count $host 1
}
</body>
</html>
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Log: wproto.c,v $
- * Revision 1.7 1995/11/10 14:47:32 adam
+ * Revision 1.8 1995/11/13 15:41:45 adam
+ * Arrow gifs.
+ * Gateway uses record element set names B(rief) and F(ull).
+ * Bug fix. Didn't save idAuthentication correctly.
+ *
+ * Revision 1.7 1995/11/10 14:47:32 adam
* Plus (+) characters automatically converted to space in forms.
* Work on search in multiple targets. Doesn't work well - yet.
* Presentation formats enhanced.
new->id = atoi (val);
sprintf(new->path, "%s/%s/clt%d", FIFOROOT, FIFODIR, new->id);
if (mkfifo(new->path, 0666 | S_IFIFO) < 0)
- {
- gw_log (GW_LOG_FATAL|GW_LOG_ERRNO, mod, "mkfifo(%s)", new->path);
- exit(1);
- }
+ gw_log (GW_LOG_WARN|GW_LOG_ERRNO, mod, "mkfifo(%s)", new->path);
gw_log (GW_LOG_DEBUG, mod, "Synchronizing with server.");
sprintf(path2, "%s/%s/srv%d", FIFOROOT, FIFODIR, getppid());
if ((new->lineout = open(path2, O_WRONLY)) < 0)
#
-# $Id: z39util.tcl,v 1.7 1995/11/10 14:47:32 adam Exp $
+# $Id: z39util.tcl,v 1.8 1995/11/13 15:41:46 adam Exp $
#
proc saveState {} {
uplevel #0 {
return $q
}
-proc z39search {setNo piggy tno} {
+proc z39search {setNo piggy tno elements} {
global hist
global sessionWait
if {$oldHost != $host} {
catch [list $zz disconnect]
- html "Connecting to target " $host " <br>\n"
set sessionWait 0
if {[catch [list $zz connect $host]]} {
html "Cannot connect to target ${host} <br>\n"
return 1
}
ir-set $zz.$setNo $zz
+ $zz.$setNo smallSetElementSetNames $elements
+ $zz.$setNo mediumSetElementSetNames $elements
+ $zz.$setNo recordElements $elements
eval $zz.$setNo databaseNames $database
+
$zz.$setNo preferredRecordSyntax USMARC
$zz callback search-response $setNo
set zstatus($i) 2
}
-proc z39msearch {setNo piggy} {
+proc z39msearch {setNo piggy elements} {
global zleft
global zstatus
global hist
set zstatus($i) 1
continue
}
+ z39$i idAuthentication $hist($setNo,$i,idAuthentication)
html "Connecting to target " $host " <br>\n"
set zstatus($i) -1
if {![catch {z39$i connect $host}]} {
ir-set z39$i.$setNo z39$i
set hist($setNo,$i,offset) 0
eval z39$i.$setNo databaseNames $hist($setNo,$i,database)
+
+ z39$i.$setNo smallSetElementSetNames $elements
+ z39$i.$setNo mediumSetElementSetNames $elements
+ z39$i.$setNo recordElements $elements
+
z39$i.$setNo preferredRecordSyntax USMARC
z39$i callback [list search-m-response $setNo $i]
}
}
-proc z39present {setNo tno setOffset setMax dfunc} {
+proc z39present {setNo tno setOffset setMax dfunc elements} {
global hist
global sessionWait
set zz z39
}
+ $zz.$setNo elementSetNames $elements
+ $zz.$setNo recordElements $elements
set toGet [expr 1 + $setMax - $setOffset]
while {$setMax > 0 && $toGet > 0} {
for {set got 0} {$got < $toGet} {incr got} {