# Regexp chapter
proc ReadAttrs {} {
    global attr
    set in [open ATTRS]
    while {[gets $in line] >= 0} {
	set attr($line) {}
    }
    close $in
}

proc CrossRef2 {  } {
    global attr
    set in [open CROSSREF]
    while {[gets $in line] >= 0} {
	if {[llength $line] == 2} {
	    lappend attr([lindex $line 1]) [lindex $line 0]
	}
    }
    close $in
}
ReadAttrs
CrossRef2
foreach f [lsort [array names attr]] {
    puts stdout [format "%-15s %s" $f $attr($f)]
}
