#!/usr/bin/tclsh

#
# pui-dbinfo: dump the "dbinfo" fields from a .pui file
#
# THIS IS SAMPLE CODE ONLY
#
# Copyright (c) 1996, Scotter <scotter@iname.com>
#
# This is free software, licensed under the GNU Public License V2.
#

if [llength $argv] {

  set filename [lindex $argv 0]

  load tclpui.so

  set puidb [puiOpen $filename]

  puiRead $puidb DBInfo info
  foreach elem [array names info] {
    puts "$elem: $info($elem)"
  }
  puiClose $puidb

}

exit 0
