#!/usr/local/bin/tclsh8.4
#!/usr/local/bin/tclsh8.4

# JStrack:  copyright 1997/2008 by Jim Graham, N5IAL, all rights reserved.

# CONFIGURATION ITEMS:

if {[string compare [file tail [info nameofexecutable]] "jstrack.exe"] == 0} {
   cd [file dirname [info nameofexecutable]]
} else {
   cd [file dirname $argv0]
}
source ../paths.tcl

# On Unix, check path in first line (#! ...) and make sure it points to
# Tclsh

# END OF CONFIGURATION ITEMS (much easier!)

# This filter is not what I really had in mind...but it works for now.
# There are two big problems (compared to what I want):
#
#    * It does not sort the advisories by the actual timestamp (this
#      is important for corrections and when they arrive out of order)
#    * It should do everything internally, instead of using a temporary
#      file and calling the old filter.
#
# For now, though, I'll take it.  If anyone wants to improve on it
# before I eventually get around to it, be my guest...just please send
# me any updates you make!

source $rfcdir/filtlib.tcl

if {[llength $argv] == 0} {
   filt_read_advisories
} else {
   if {[string compare [lindex $argv 0] "-stormdir"] == 0} {
      set storms [lindex $argv 1]
      if {[llength $argv] > 2} {
         filt_read_advisories [lindex $argv 2]
      }
   } else {
      filt_read_advisories [lindex $argv 0]
   }
}


