2 # $Id: z39util.tcl,v 1.26 1996/01/26 15:50:11 adam Exp $
6 set f [open "tcl.state.${sessionId}" w]
7 foreach var [info globals] {
8 if {$var == "f"} continue
9 if {$var == "sessionId"} continue
10 if {$var == "errorInfo"} continue
11 if {[catch {set names [array names $var]}]} {
13 puts $f "set ${var} \{$v\}"
16 eval "set v \$${var}(\$n)"
17 puts $f "set ${var}($n) \{$v\}"
21 puts $f "set ${var} \{$v\}"
29 proc search-response {zz} {
32 set status [$zz responseStatus]
33 if {[lindex $status 0] == "NSD"} {
34 $zz nextResultSetPosition 0
35 set code [lindex $status 1]
36 set msg [lindex $status 2]
37 set addinfo [lindex $status 3]
38 displayError "Diagnostic message" \
39 "$msg: $addinfo<br>\n(error code $code)"
46 proc scan-response {zz} {
49 set status [$zz scanStatus]
51 displayError "Scan fail" ""
63 proc fail-response {} {
68 proc display-brief {zset no tno} {
75 set type [$zset type $no]
77 set err [lindex [$zset diag $no] 1]
78 set add [lindex [$zset diag $no] 2]
82 html "${no} Error ${err}${add} <br>\n"
88 set rtype [$zset recordType $no]
89 if {$rtype == "SUTRS"} {
90 html [join [$zset getSutrs $no]]
95 set author [$zset getMarc $no field 100 * a]
96 set corp [$zset getMarc $no field 110 * a]
97 set meet [$zset getMarc $no field 111 * a]
98 set title [$zset getMarc $no field 245 * a]
99 if {[llength $author] == 0} {
100 set cover [$zset getMarc $no field 245 * {[bc]}]
102 set cover [$zset getMarc $no field 245 * b]
104 set location [$zset getMarc $no field 260 * a]
105 set publisher [$zset getMarc $no field 260 * b]
106 set year [$zset getMarc $no field 260 * c]
108 html { <a href="http:} $env(SCRIPT_NAME) /
109 html $sessionId {/showfull.egw/} $setNo + $tno + $no + full {">}
141 set v [join $cover ""]
142 if {[string length $v] > 40} {
143 html [string range $v 0 38] "..."
153 proc display-raw {zset no tno} {
154 set type [$zset type $no]
156 set err [lindex [$zset diag $no] 1]
157 set add [lindex [$zset diag $no] 2]
161 html "<h3>${no}</h3>\n"
162 html "Error ${err}${add} <br>\n"
168 set rtype [$zset recordType $no]
169 if {$rtype == "SUTRS"} {
170 html [join [$zset getSutrs $no]] "<br>\n"
173 if {[catch {set r [$zset getMarc $no line * * *]}]} {
174 html "Unknown record type: $rtype <br>\n"
178 set tag [lindex $line 0]
179 set indicator [lindex $line 1]
180 set fields [lindex $line 2]
181 set l [string length $indicator]
184 for {set i 0} {$i < $l} {incr i} {
185 if {[string index $indicator $i] == " "} {
188 html [string index $tag $i]
193 foreach field $fields {
194 set id [lindex $field 0]
195 set data [lindex $field 1]
197 html " <b>\$$id</b> "
205 proc put-marc-contents {cc} {
207 if {[string first :// $cc] > 0} {
208 foreach urltype {gopher http ftp mailto} {
209 if {[string first ${urltype}:// $cc] == 0} {
224 proc dl-marc-field {zset no tag id la lb sep} {
226 set c [$zset getMarc $no field $tag * $id]
231 if {$len > 1 && "x$lb" != "x"} {
232 html "<dt><b>$lb</b>\n<dd>"
234 html "<dt><b>$la</b>\n<dd>"
240 put-marc-contents $cc
246 proc dd-marc-field {zset no tag id start stop} {
248 set c [$zset getMarc $no field $tag * $id]
255 put-marc-contents $cc
262 proc dl-marc-field-rec {zset no tag lead start stop startid sep} {
264 set lines [$zset getMarc $no line $tag * *]
265 foreach line $lines {
266 foreach field [lindex $line 2] {
268 html "<dt><b>$lead</b>"
271 set id [lindex $field 0]
272 if {$id == $startid} {
278 html [lindex $field 1]
281 html [lindex $field 1]
290 proc display-full {zset no tno} {
291 set type [$zset type $no]
293 set err [lindex [$zset diag $no] 1]
294 set add [lindex [$zset diag $no] 2]
298 html "Error ${err}${add} <br>\n"
304 set rtype [$zset recordType $no]
305 if {$rtype == "SUTRS"} {
306 html [join [$zset getSutrs $no]] "<br>\n"
309 if {[catch {set r [$zset getMarc $no line * * *]}]} {
310 html "Unknown record type: $rtype <br>\n"
314 set n [dl-marc-field $zset $no 700 a "Author" "Authors" "<br>\n"]
316 set n [dl-marc-field $zset $no 100 a "Author" "Authors" "<br>\n"]
318 set n [dl-marc-field $zset $no 710 a "Corporate Name" {} ", "]
320 set n [dl-marc-field $zset $no 110 a "Corporate Name" {} ", "]
322 set n [dl-marc-field $zset $no 711 a "Meeting Name" {} ", "]
324 dd-marc-field $zset $no 711 {[bndc]} " " ""
326 set n [dl-marc-field $zset $no 111 a "Meeting Name" {} ", "]
328 dd-marc-field $zset $no 111 {[bndc]} " " " "
331 set n [dl-marc-field $zset $no 245 {a} "Title" {} " "]
333 dd-marc-field $zset $no 245 b "<em>" "</em>"
334 dd-marc-field $zset $no 245 c " " ""
336 dl-marc-field $zset $no 245 {[ab]} "Title" {} " "
338 dl-marc-field $zset $no 520 a "Abstract" {} ", "
339 dl-marc-field $zset $no 072 * "Subject code" "Subject codes" ", "
340 dl-marc-field $zset $no 650 * "Subject" {} ", "
341 dl-marc-field $zset $no 260 * "Publisher" {} " "
342 dl-marc-field $zset $no 300 * "Physical Description" {} " "
344 dl-marc-field-rec $zset $no 500 "Notes" "" "<br>\n" "a" ", "
346 dl-marc-field-rec $zset $no 510 "References" "" "<br>\n" "a" ", "
348 dl-marc-field-rec $zset $no 511 "Participant note" "" "<br>\n" "a" ", "
350 dl-marc-field $zset $no 513 a "Report type" {} ", "
351 dl-marc-field $zset $no 513 b "Period covered" {} ", "
352 dl-marc-field-rec $zset $no 515 "Numbering notes" "" "<br>\n" "a" ", "
353 dl-marc-field-rec $zset $no 516 "Data notes" "" "<br>\n" "a" ", "
354 dl-marc-field-rec $zset $no 518 "Date/time notes" "" "<br>\n" "a" ", "
356 dl-marc-field $zset $no 350 a "Price" {} ", "
357 dl-marc-field $zset $no 362 a "Dates of publication" {} ", "
358 dl-marc-field $zset $no 850 a "Holdings" {} ", "
360 dl-marc-field-rec $zset $no 270 "Contact name" "" "<br>\n" p ", "
362 set n [dl-marc-field $zset $no 270 p "Contact name" {} ", "]
367 dl-marc-field $zset $no 270 a "Street" {} ", "
368 dl-marc-field $zset $no 270 b "City" {} ", "
369 dl-marc-field $zset $no 270 c "State" {} ", "
370 dl-marc-field $zset $no 270 e "Zip code" {} ", "
371 dl-marc-field $zset $no 270 d "Country" {} ", "
372 dl-marc-field $zset $no 270 m "Network address" {} ", "
373 dl-marc-field $zset $no 301 a "Service hours" {} ", "
374 dl-marc-field $zset $no 270 k "Phone" {} ", "
375 dl-marc-field $zset $no 270 l "Fax" {} ", "
377 dl-marc-field $zset $no 270 {[abcedmakl]} "Address" {} "<br>\n"
383 dl-marc-field $zset $no 010 a "LC control number" {} ", "
384 dl-marc-field $zset $no 010 b "NUCMC control number" {} ", "
385 dl-marc-field $zset $no 020 a "ISBN" {} ", "
386 dl-marc-field $zset $no 022 a "ISSN" {} ", "
387 set url [$zset getMarc $no field 856 * u]
388 set sp [$zset getMarc $no field 856 * 3]
389 if {"x$url" != "x"} {
390 html "<dt><b>URL</b>\n"
394 html {<dd><a href="} $url {">} [join $sp] "</a>\n"
396 dl-marc-field $zset $no 037 {[abc]} "Acquisition" {} "<br>\n"
397 dl-marc-field $zset $no 037 {[f6]} "Form of issue" {} "<br>\n"
398 dl-marc-field $zset $no 537 * "Source of data" {} "<br>\n"
399 dl-marc-field $zset $no 538 * "System details" {} "<br>\n"
400 dl-marc-field $zset $no 787 {[rstw6]} "Related information" {} "<br>\n"
401 dl-marc-field $zset $no 001 * "Local control number" {} ", "
406 proc display-rec {from to dfunc tno} {
410 while {$from <= $to} {
411 eval "$dfunc z39${tno}.${setNo} $from $tno"
415 while {$from <= $to} {
416 eval "$dfunc z39.${setNo} $from 0"
422 proc build-scan {t i} {
425 set term [egw_form entry$i]
427 set field [join [egw_form menu$i]]
429 foreach x [lindex $targets($t) 2] {
430 if {[lindex $x 0] == $field} {
431 set attr [lindex $x 1]
434 return [list $term $attr]
439 proc build-query {t ilines} {
444 for {set i 1} {$i <= $ilines} {incr i} {
445 set term [join [egw_form entry$i]]
446 if {[string length $term] > 0} {
447 set field [join [egw_form menu$i]]
448 foreach x [lindex $targets($t) 2] {
449 if {[lindex $x 0] == $field} {
450 set attr [lindex $x 1]
455 { set q "@and $q ${attr} \"${term}\"" }
457 { set q "@or $q ${attr} \"${term}\"" }
459 { set q "@not $q ${attr} \"${term}\"" }
461 { set q "${attr} \"${term}\"" }
463 set op [egw_form logic$i]
469 proc z39scan {setNo scanNo tno scanLines scanPos cache} {
476 set host $hist($setNo,$tno,host)
477 set idAuth $hist($setNo,$tno,idAuthentication)
478 set database $hist($setNo,$tno,database)
479 set scanAttr $hist($setNo,$tno,scanAttr)
480 set scanTerm $hist($setNo,$tno,$scanNo,scanTerm)
483 set host $hist($setNo,host)
484 set idAuth $hist($setNo,idAuthentication)
485 set database $hist($setNo,database)
486 set scanAttr $hist($setNo,scanAttr)
487 set scanTerm $hist($setNo,$scanNo,scanTerm)
489 if {[catch [list $zz failback fail-response]]} {
492 if {[catch [list set oldHost [$zz connect]]]} {
495 set zs $zz.s$scanNo.$setNo
496 $zz callback ok-response
497 $zz failback fail-response
498 set thisHost [splitHostSpec $host]
499 if {$oldHost != $thisHost} {
500 catch [list $zz disconnect]
503 if {[catch [list $zz connect $thisHost]]} {
504 displayError "Cannot connect to target" $thisHost
506 } elseif {$sessionWait == 0} {
507 if {[catch {egw_wait sessionWait 300}]} {
509 displayError "Cannot connect to target" $thisHost
512 if {$sessionWait != 1} {
513 displayError "Cannot connect to target" $thisHost
517 $zz idAuthentication $idAuth
519 if {[catch {$zz init}]} {
520 displayError "Cannot initialize target" $thisHost
524 if {[catch {egw_wait sessionWait 60}]} {
525 displayError "Cannot initialize target" $thisHost
529 if {$sessionWait != "1"} {
530 displayError "Cannot initialize target" $thisHost
534 if {![$zz initResult]} {
535 set u [$zz userInformationField]
537 displayError "Cannot initialize target $thisHost" $u
541 if {$cache && ![catch [list $zs numberOfTermsRequested 5]]} {
545 eval $zz databaseNames $database
549 $zs numberOfTermsRequested $scanLines
550 $zs preferredPositionInResponse $scanPos
552 $zz callback [list scan-response $zs]
554 egw_log debug "scan: ${scanAttr} ${scanTerm}"
556 $zs scan "${scanAttr} ${scanTerm}"
558 if {[catch {egw_wait sessionWait 60}]} {
559 egw_log debug "timeout/cancel in scan"
560 displayError "Timeout in scan" {}
561 html "</body></html>\n"
565 if {$sessionWait == -1} {
566 displayError "Scan fail" "Connection closed"
567 html "</body></html>\n"
570 if {$sessionWait != 1} {
576 proc display-scan {setNo scanNo tno} {
587 set zs $zz.s$scanNo.$setNo
588 set m [$zs numberOfEntriesReturned]
591 set t [lindex [$zs scanLine 0] 1]
593 set hist($setNo,$tno,[expr $scanNo - 1],scanTerm) $t
595 set hist($setNo,[expr $scanNo - 1],scanTerm) $t
597 set t [lindex [$zs scanLine [expr $m - 1]] 1]
599 set hist($setNo,$tno,[expr $scanNo + 1],scanTerm) $t
601 set hist($setNo,[expr $scanNo + 1],scanTerm) $t
604 html {<table border=0><tr>}
605 html {<td align=left><b>Scan term</b>}
606 html {<td align=right><b>Hits</b>}
609 for {set i 0} {$i < $m} {incr i} {
610 html {<td align=left>}
612 regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm
613 html {<a href="http:} $env(SCRIPT_NAME)
614 html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo +
615 html $hist($setNo,scan) + $tterm {">}
617 regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm
618 html {<a href="http:} $env(SCRIPT_NAME)
619 html / $sessionId {/search.egw/} $setNo +
620 html hyper + $tterm {">}
622 html [lindex [$zs scanLine $i] 1]
624 html {<td align=right>}
625 html [lindex [$zs scanLine $i] 2]
631 proc z39search {setNo piggy tno elements} {
638 set host $hist($setNo,$tno,host)
639 set idAuth $hist($setNo,$tno,idAuthentication)
640 set database $hist($setNo,$tno,database)
641 set query $hist($setNo,$tno,query)
644 set host $hist($setNo,host)
645 set idAuth $hist($setNo,idAuthentication)
646 set database $hist($setNo,database)
647 set query $hist($setNo,query)
649 if {[catch [list $zz failback fail-response]]} {
652 if {[catch [list set oldHost [$zz connect]]]} {
655 $zz callback ok-response
656 $zz failback fail-response
657 set thisHost [splitHostSpec $host]
658 if {$oldHost != $thisHost} {
659 catch [list $zz disconnect]
662 if {[catch [list $zz connect $thisHost]]} {
663 displayError "Cannot connect to target" $thisHost
665 } elseif {$sessionWait == 0} {
666 if {[catch {egw_wait sessionWait 300}]} {
668 displayError "Cannot connect to target" $thisHost
671 if {$sessionWait != 1} {
672 displayError "Cannot connect to target" $thisHost
676 $zz idAuthentication $idAuth
678 if {[catch {$zz init}]} {
679 displayError "Cannot initialize target" $thisHost
683 if {[catch {egw_wait sessionWait 60}]} {
684 displayError "Cannot initialize target" $thisHost
688 if {$sessionWait != "1"} {
689 displayError "Cannot initialize target" $thisHost
693 if {![$zz initResult]} {
694 set u [$zz userInformationField]
696 displayError "Cannot initialize target $thisHost" $u
700 if {[info exists hist($setNo,hits)] && \
701 ![catch [list $zz.$setNo smallSetUpperBound 0]]} {
706 ir-set $zz.$setNo $zz
708 if {![lindex $targets($host) 5]} {
711 $zz.$setNo smallSetElementSetNames $elements
712 $zz.$setNo mediumSetElementSetNames $elements
713 $zz.$setNo recordElements $elements
715 egw_log debug "database=$database"
716 eval $zz.$setNo databaseNames $database
718 $zz.$setNo preferredRecordSyntax USMARC
720 $zz callback [list search-response $zz.$setNo]
722 $zz.$setNo largeSetLowerBound 999999
723 $zz.$setNo smallSetUpperBound 0
724 $zz.$setNo mediumSetPresentNumber $hist($setNo,maxPresent)
726 $zz.$setNo largeSetLowerBound 2
727 $zz.$setNo smallSetUpperBound 0
728 $zz.$setNo mediumSetPresentNumber 0
731 egw_log debug "search: $query"
732 $zz.$setNo search $query
734 if {[catch {egw_wait sessionWait 600}]} {
735 egw_log debug "timeout/cancel in search"
736 displayError "Timeout in search" {}
737 html "</body></html>\n"
742 if {$sessionWait == -1} {
743 displayError "Search fail" "Connection closed"
744 html "</body></html>\n"
747 if {$sessionWait != 1} {
750 set hist($setNo,hits) [$zz.$setNo resultCount]
754 proc init-m-response {i} {
758 egw_log debug "init-m-response"
764 proc connect-m-response {i} {
768 egw_log debug "connect-m-response"
769 z39$i callback [list init-m-response $i]
770 if {[catch {z39$i init}]} {
776 proc fail-m-response {i} {
780 egw_log debug "fail-m-response"
785 proc search-m-response {setNo i} {
793 proc z39msearch {setNo piggy elements} {
799 set not $hist($setNo,0,host)
801 for {set i 1} {$i <= $not} {incr i} {
802 set host $hist($setNo,$i,host)
803 if {[catch {z39 failback fail-response}]} {
806 if {[catch {set oldHost [z39$i connect]}]} {
809 set thisHost [splitHostSpec $host]
810 if {$oldHost != $thisHost} {
811 catch {z39$i disconnect}
813 z39$i callback [list connect-m-response $i]
814 z39$i failback [list fail-m-response $i]
817 for {set i 1} {$i <= $not} {incr i} {
818 set oldHost [z39$i connect]
819 set host $hist($setNo,$i,host)
820 set thisHost [splitHostSpec $host]
821 if {$oldHost == $thisHost} {
825 z39$i idAuthentication $hist($setNo,$i,idAuthentication)
826 html "Connecting to target " $thisHost " <br>\n"
828 if {![catch {z39$i connect $thisHost}]} {
833 egw_log debug "Waiting for init response"
834 if {[catch {egw_wait zleft 10}]} {
839 for {set i 1} {$i <= $not} {incr i} {
840 html "host " [splitHostSpec $hist($setNo,$i,host)] ": "
841 if {$zstatus($i) >= 1} {
843 ir-set z39$i.$setNo z39$i
844 set hist($setNo,$i,offset) 0
845 eval z39$i.$setNo databaseNames $hist($setNo,$i,database)
847 if {![lindex $targets($hist($setNo,$i,host)) 5]} {
850 set thisElements $elements
852 z39$i.$setNo smallSetElementSetNames $thisElements
853 z39$i.$setNo mediumSetElementSetNames $thisElements
854 z39$i.$setNo recordElements $thisElements
856 z39$i.$setNo preferredRecordSyntax USMARC
857 z39$i callback [list search-m-response $setNo $i]
860 z39$i.$setNo largeSetLowerBound 999999
861 z39$i.$setNo smallSetUpperBound 0
862 z39$i.$setNo mediumSetPresentNumber $hist($setNo,maxPresent)
864 z39$i.$setNo largeSetLowerBound 2
865 z39$i.$setNo smallSetUpperBound 0
866 z39$i.$setNo mediumSetPresentNumber 0
869 egw_log debug "search " $hist($setNo,$i,query)
870 z39$i.$setNo search $hist($setNo,$i,query)
877 egw_log debug "Waiting for search response"
878 if {[catch {egw_wait zleft 30}]} {
882 for {set i 1} {$i <= $not} {incr i} {
883 if {$zstatus($i) != 2} continue
884 set status [z39$i.$setNo responseStatus]
885 if {[lindex $status 0] != "NSD"} {
886 set hist($setNo,$i,offset) [z39$i.$setNo numberOfRecordsReturned]
891 proc z39present {setNo tno setOffset setMax dfunc elements} {
898 set host $hist($setNo,$tno,host)
901 set host $hist($setNo,host)
904 if {![lindex $targets($host) 5]} {
908 $zz.$setNo elementSetNames $elements
909 $zz.$setNo recordElements $elements
910 set toGet [expr 1 + $setMax - $setOffset]
912 $zz callback [list search-response $zz.$setNo]
914 while {$setMax > 0 && $toGet > 0} {
915 for {set got 0} {$got < $toGet} {incr got} {
916 if {[$zz.$setNo type [expr $setOffset + $got]] == ""} {
922 $zz.$setNo present $setOffset $toGet
923 if {[catch {egw_wait sessionWait 300}]} {
924 egw_log debug "timeout/cancel in present"
928 if {$sessionWait == "0"} {
931 if {$sessionWait != "1"} {
934 set got [$zz.$setNo numberOfRecordsReturned]
939 display-rec $setOffset [expr $got + $setOffset - 1] $dfunc $tno
940 set setOffset [expr $got + $setOffset]
941 set toGet [expr 1 + $setMax - $setOffset]
953 if {![info exists nextSetNo]} {
956 html "<h2>History</h2><dl><br>\n"
957 for {set setNo 1} {$setNo < $nextSetNo} {incr setNo} {
958 if {$hist($setNo,scan) > 0} continue
959 set host $hist($setNo,host)
960 html {<dt> } [lindex $targets($host) 0]
961 if {[llength [lindex $targets($host) 1]] > 1} {
963 foreach b $hist($setNo,database) {
969 if {[info exists hist($setNo,hits)]} {
970 html { <a href="http:} $env(SCRIPT_NAME)
971 html / $sessionId {/search.egw/} $setNo + 1
972 html + $hist($setNo,maxPresent)
973 html {">Result</a>: } $hist($setNo,hits) { hits.}
975 html {Search failed.}
978 html { <a href="http:} $env(SCRIPT_NAME)
979 html / $sessionId {/query.egw/} $host + $setNo
982 for {set i 1} {$i <= 3} {incr i} {
983 if {[string length $hist($setNo,form,entry$i)] > 0} {
984 html " <b>" [join $op " "] "</b> "
985 html [join $hist($setNo,form,menu$i)] "="
986 html $hist($setNo,form,entry$i)
987 set op $hist($setNo,form,logic$i)
994 proc displayError {msga msgb} {
996 html {<img src="/egwgif/noway.gif" alt="Error">}
997 html "<h2>" $msga "</h2>\n"
999 html "<h3>" $msgb "</h3>\n"
1001 html "</center><p>\n"
1004 proc button-europagate {} {
1007 html {<img src="/egwgif/button-egw.gif" alt="Europagate" border=0></a>}
1009 html {Europagate | }
1013 proc button-define-target {more} {
1018 html {<a href="http:} $env(SCRIPT_NAME)
1019 html / $sessionId {/tform.egw}
1021 html {"><img src="/egwgif/button-define-target.gif" }
1022 html {alt="Define Target" border=0></a>}
1024 html {">Define Target</a>}
1033 proc button-new-target {more} {
1039 html {<a href="http:} $env(SCRIPT_NAME)
1042 html {/mtargets.egw}
1047 html {"><img src="/egwgif/button-new-target.gif" }
1048 html {alt="New Target" border=0></a>}
1050 html {">New Target</a>}
1059 proc button-view-history {more} {
1065 html {<a href="http:} $env(SCRIPT_NAME)
1066 html / $sessionId {/history.egw;}
1067 catch { html "/" $nextSetNo}
1069 html {"><img src="/egwgif/button-view-history.gif" alt="View History" }
1070 html {border=0></a>}
1072 html {">View History</a>}
1081 proc button-new-query {more setNo} {
1088 html {<a href="http:} $env(SCRIPT_NAME)
1091 html {/mquery.egw/} $setNo
1093 html {/query.egw/} $hist($setNo,host) + $setNo
1097 html {<img src="/egwgif/button-new-query.gif" }
1098 html {alt="New Query" border=0></a>}
1100 html {New Query</a>}
1109 proc button-scan-window {more setNo} {
1115 html {<a href="http:} $env(SCRIPT_NAME)
1116 html / $sessionId {/search.egw/} $setNo + {scan} {">}
1118 html {<img src="/egwgif/button-scan-window.gif" }
1119 html {alt="Scan" border=0></a>}
1130 proc maintenance {} {
1131 html {<hr>This page is maintained by }
1132 html {<a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.}
1133 html {Last modified 26. january 1996. <br>}
1134 html {<em> This and the following pages are under construction and }
1135 html {will continue to be so until the end of January 1996.</em>}
1138 proc splitHostSpec {host} {
1139 set i [string last . $host]
1142 return [string range $host 0 $i]
1147 proc mergeHostSpec {host databases} {
1148 return ${host}.[join $databases -]