#!/bin/tclsh
#
#  Display (with tk) all the various zeb guys, in alpha order
#
#
#  First thing is to get a list of all the zeb banks we know anything
#  about.
#
proc get_sorted_zeb_list {} {
  catch {unset tlist}

  set list [glob {d0$zeb$root:[000000...]*.zeb}]

  foreach i $list {

    if {[regexp {\]([a-zA-z0-9\_\$]*)\.zeb} $i wholematch bankName]} {
      set temp_list [list $bankName $i]
      lappend tlist $temp_list
    }
  }

  set tlist [lsort $tlist]

  unset list
  set oldBank " "
  foreach i $tlist {
    set name [lindex $i 0]
    if {$name != $oldBank} {
      lappend list $i
    }
    set oldBank $name
  }
  return $list
}
#
#  get_zeb_names -- return a string of all the zeb names, one to a line,
#  given the list of zeb stuff return from get_sorted_zeb
#
proc get_zeb_names {zebList} {
  foreach zebDesc $zebList {
    set zebName [lindex $zebDesc 0]

    lappend listOfNames $zebName
  }
  return $listOfNames
}