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

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

# This is the standalone version.  It can be either the windows EXE or
# normal copy.  It doesn't care, either way.  :-)


# Windows-EXE-specific stuff
if {[string compare -nocase [file tail [info nameofexecutable]] "get_http.exe"] == 0} {
   lappend auto_path get_http.exe/lib
   set topdir $starkit::topdir
   regsub {/get_http.exe.*$} $topdir {} t
   cd $t
   source ../paths.tcl.winexe
} else {
   source ../paths.tcl
}

# cd $httpfilt_path
source httplib.tcl

wm protocol . WM_DELETE_WINDOW { exit }
wm geometry . +200+200

pack [label .msg1 -text "HTTP Update In Progress...." -background black \
   -foreground yellow -font {Courier 20}] -side top -expand y -fill x
pack [label .msg2 -text "" -background black \
   -foreground yellow -font {Courier 20}] -side top -expand y -fill x
pack [button .end -text "Exit" -command { exit } -font {Courier 20 bold} \
   -foreground red -background black] -side top -expand y -fill x


.msg2 configure -text "Checking for updates in TCMAT (Forecast/Advisory)"
update
set processed [process_newdata TCMAT]
set s1 "Processed  $processed updates for FORECAST"


.msg2 configure -text "Checking for updates in TCPAT (Public Advisory)"
update
set processed [process_newdata TCPAT]
set s2 "Processed  $processed updates for ADVISORY"

.msg2 configure -text "Checking for updates in TCDAT (Discussion)"
update
set processed [process_newdata TCDAT]
set s3 "Processed  $processed updates for DISCUSSION"

tk_messageBox -type ok -message "HTTP Updates:

$s1
$s2
$s3
"

exit 0


