X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=formats%2Fmedium.tcl;h=5f3aa335e231cfd71cbb752c5093da3dee983b4d;hb=0d087b0c2c1f3eff36fad7f1e78e2b8438ea7258;hp=e2e3248b9659e3b914cb0662e3f0e66c4ef320e3;hpb=4196c86ac7f87f85aa20ca83dd1557ca2961fd39;p=ir-tcl-moved-to-github.git diff --git a/formats/medium.tcl b/formats/medium.tcl index e2e3248..5f3aa33 100644 --- a/formats/medium.tcl +++ b/formats/medium.tcl @@ -4,7 +4,14 @@ # Sebastian Hammer, Adam Dickmeiss # # $Log: medium.tcl,v $ -# Revision 1.12 1996-03-29 16:05:36 adam +# Revision 1.14 1996-04-12 13:45:49 adam +# Minor changes. +# +# Revision 1.13 1996/04/12 12:25:27 adam +# Modified display of GRS-1 records to include headings for standard +# tag sets. +# +# Revision 1.12 1996/03/29 16:05:36 adam # Bug fix: GRS records wasn't recognized. # # Revision 1.11 1996/01/23 15:24:23 adam @@ -43,28 +50,42 @@ # proc display-grs-medium {w r i} { global tagSet - + foreach e $r { - for {set j 0} {$j < $i} {incr j} { - insertWithTags $w " " marc-tag + if {[tk4]} { + set start [$w index insert] + } else { + for {set j 0} {$j < $i} {incr j} { + insertWithTags $w " " marc-tag + } } set ttype [lindex $e 0] set tval [lindex $e 2] - if {[info exists tagSet($ttype,$tval)]} { - insertWithTags $w "$tagSet($ttype,$tval) " marc-tag + if {$ttype == 3} { + insertWithTags $w "$tval " marc-pref + } elseif {[info exists tagSet($ttype,$tval)]} { + insertWithTags $w "$tagSet($ttype,$tval) " marc-pref } else { - insertWithTags $w "$tval " marc-tag + insertWithTags $w "($ttype,$tval) " marc-tag } if {[lindex $e 3] == "string"} { - insertWithTags $w [lindex $e 4] {} + insertWithTags $w [lindex $e 4] marc-text insertWithTags $w "\n" } elseif {[lindex $e 3] == "subtree"} { insertWithTags $w "\n" - display-grs-medium $w [lindex $e 4] [expr $i+1] } else { insertWithTags $w [lindex $e 4] {} insertWithTags $w " ?\n" {} } + if {[tk4]} { + $w tag configure indent$i \ + -lmargin1 [expr $i * 16] \ + -lmargin2 [expr $i * 16 + 8] + $w tag add indent$i $start insert + } + if {[lindex $e 3] == "subtree"} { + display-grs-medium $w [lindex $e 4] [expr $i+1] + } } } @@ -96,7 +117,6 @@ proc display-medium {sno no w hflag} { return } set rtype [z39.$sno recordType $no] - puts $rtype if {$rtype == "SUTRS"} { insertWithTags $w [join [z39.$sno getSutrs $no]] {} $w insert end "\n"