#!/bin/sh
# The next line restarts using nxlc \
exec %%PREFIX%%/share/abacus/tcl_interf/nxlc -f $0 ${1+"$@"}
# $Id: abacus,v 1.2 1998/08/31 16:53:38 cthulhu Exp $

global env

proc getVersion {} {
    set f [open [xxl_library]/version]
    gets  $f s
    close $f
    return $s
}

if [info exists env(ABACUS_HOME)] {
    set home $env(ABACUS_HOME)
} else {
    set home "%%PREFIX%%/share/abacus"
}

wm withdraw .
source $home/runlib/globals.tcl
source [xxl_home]/display/display.tcl
set xxlVersion [getVersion]
puts "Abacus Version $xxlVersion"
createPixmaps

toplevel .title
label .title.message -image xxl_im -relief raised -borderwidth 8
pack .title.message
dpos .title 300 200
wm overrideredirect .title true
update
after 1000 {
  set sheetCnt 1
  if {$argc == 1} {
    set s [lindex $argv 0]
    newSpreadsheet [getRadix $s]
    loadSheet $s
    after 600 {catch {destroy .title}}
  } else {
    newSpreadsheet example
    after 600 {catch {destroy .title}}
  }
}

# 
# $Log: abacus,v $
# Revision 1.2  1998/08/31 16:53:38  cthulhu
# Fixed splash screen timeout.
#
# Revision 1.1  1998/08/17 19:43:08  cthulhu
# Initial revision
#
