X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fz39util.tcl;h=19c75f3e4681c26f36fb594a98940d88b1009d53;hb=8475d385a59bc414a07804de7de9692edc022364;hp=e50db2ba3809ed080d704b73c4af72579eee1701;hpb=a4571caef991e968e3c20b515490b7923306a1cf;p=egate.git
diff --git a/www/z39util.tcl b/www/z39util.tcl
index e50db2b..19c75f3 100644
--- a/www/z39util.tcl
+++ b/www/z39util.tcl
@@ -1,5 +1,5 @@
#
-# $Id: z39util.tcl,v 1.39 1996/03/12 16:30:30 adam Exp $
+# $Id: z39util.tcl,v 1.46 1996/08/28 09:36:03 adam Exp $
#
proc saveState {} {
uplevel #0 {
@@ -92,20 +92,6 @@ proc display-medium {zset no setNo targetNo} {
html "
\n"
return
}
- WAIS {
- html { }
- html [join [$zset getWAIS $no headline]]
- html {}
- html "
\n"
- html {Score: } [$zset getWAIS $no score]
- set lines [$zset getWAIS $no lines]
- if {$lines > 0} {
- html {, } $lines { lines}
- }
- html "
\n"
- return
- }
}
if {![catch {
set author [$zset getMarc $no field 100 * a]
@@ -120,6 +106,7 @@ proc display-medium {zset no setNo targetNo} {
set location [$zset getMarc $no field 260 * a]
set publisher [$zset getMarc $no field 260 * b]
set year [$zset getMarc $no field 260 * c]
+ set score [$zset getMarc $no field 999 * r]
} dispError ] } {
html { }
@@ -161,6 +148,9 @@ proc display-medium {zset no setNo targetNo} {
html "No Title"
}
html { }
+ if {[scan $score %d nscore] == 1} {
+ html "; Score " $nscore
+ }
} else {
html { }
@@ -198,17 +188,6 @@ proc display-brief {zset no setNo targetNo} {
html "
\n"
return
}
- WAIS {
- html { }
- html [string range [join [$zset getWAIS $no headline]] 0 70]
-
- html {}
- set score [$zset getWAIS $no score]
- html { Score } $score
- html "
\n"
- return
- }
}
if {![catch {
set author [$zset getMarc $no field 100 * a]
@@ -306,10 +285,6 @@ proc display-raw {zset no setNo targetNo} {
html "
\n" [join [$zset getWAIS $no text]] "\n\n" - return - } - if {[info exists data(bytes)]} { - html {
" [join [$zset getSutrs $no]] "
\n"
}
@@ -1365,35 +1239,46 @@ proc display-result-set-m-score {setNo} {
if {$zstatus($i) != 2} continue
set status [z39$i.$setNo responseStatus]
if {[lindex $status 0] != "DBOSD"} continue
- if {$hist($setNo,$i,offset) > $hist($setNo,maxPresent)} {
- set nor $hist($setNo,maxPresent)
- } else {
- set nor $hist($setNo,$i,offset)
- }
+ set nor $hist($setNo,$i,offset)
for {set j 1} {$j <= $nor} {incr j} {
- if {![string compare [z39$i.$setNo recordType $j] WAIS]} {
- set score [z39$i.$setNo getWAIS $j score]
- if {$score > 0} {
- lappend scoreArray [list $score $i $j]
+ if {![string compare [z39$i.$setNo recordType $j] USmarc]} {
+ set score [z39$i.$setNo getMarc $j field 999 * r]
+ if {[scan $score %d score] != 1} {
+ set score 10
}
} else {
- lappend scoreArray [list 10 $i $j]
+ set score 10
+ }
+ if {$score > 0} {
+ lappend scoreArray [list $score $i $j]
}
}
}
if {![info exists scoreArray]} {
html "