summaryrefslogtreecommitdiffstats
path: root/ds9/library/samp.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-29 21:27:31 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-29 21:27:31 (GMT)
commitb8395e8e32cccb75565a170160772857087901de (patch)
tree2494425c02897874ba1a957a51224522c4a2e10a /ds9/library/samp.tcl
parent41505b4129a005e96c6afc3344ccf61097884fbd (diff)
downloadblt-b8395e8e32cccb75565a170160772857087901de.zip
blt-b8395e8e32cccb75565a170160772857087901de.tar.gz
blt-b8395e8e32cccb75565a170160772857087901de.tar.bz2
update parsers
Diffstat (limited to 'ds9/library/samp.tcl')
-rw-r--r--ds9/library/samp.tcl91
1 files changed, 4 insertions, 87 deletions
diff --git a/ds9/library/samp.tcl b/ds9/library/samp.tcl
index 9af0e1d..d126c02 100644
--- a/ds9/library/samp.tcl
+++ b/ds9/library/samp.tcl
@@ -1707,95 +1707,12 @@ proc ProcessSAMPCmd {varname iname} {
# we need to be realized
ProcessRealizeDS9
-
SAMPUpdate
- global debug
- if {$debug(tcl,parser)} {
- samp::YY_FLUSH_BUFFER
- samp::yy_scan_string [lrange $var $i end]
- samp::yyparse
- incr i [expr $samp::yycnt-1]
- } else {
-
- global samp
- global ds9
- global env
- switch -- [string tolower [lindex $var $i]] {
- send {
- incr i
- switch -- [string tolower [lindex $var $i]] {
- image {
- incr i
- set name [string tolower [lindex $var $i]]
- if {[info exists samp]} {
- foreach arg $samp(apps,image) {
- foreach {key val} $arg {
- if {[string tolower $val] == $name} {
- SAMPSendImageLoadFits $key
- break
- }
- }
- }
- } else {
- Error "SAMP: [msgcat::mc {not connected}]"
- }
- }
- table {
- incr i
- set name [string tolower [lindex $var $i]]
- if {[info exists samp]} {
- foreach arg $samp(apps,table) {
- foreach {key val} $arg {
- if {[string tolower $val] == $name} {
- SAMPSendTableLoadFits $key
- break
- }
- }
- }
- } else {
- Error "SAMP: [msgcat::mc {not connected}]"
- }
- }
- default {
- set name [string tolower [lindex $var $i]]
- if {[info exists samp]} {
- foreach arg $samp(apps,image) {
- foreach {key val} $arg {
- if {[string tolower $val] == $name} {
- SAMPSendImageLoadFits $key
- break
- }
- }
- }
- } else {
- Error "SAMP: [msgcat::mc {not connected}]"
- }
- }
- }
- }
- broadcast {
- incr i
- switch -- [string tolower [lindex $var $i]] {
- image {SAMPSendImageLoadFits {}}
- table {SAMPSendTableLoadFits {}}
- default {
- incr i -1
- SAMPSendImageLoadFits {}
- }
- }
- }
- connect {SAMPConnect}
- disconnect {SAMPDisconnect}
- default {
- if {[FromYesNo [lindex $var $i]]} {
- SAMPConnect
- } else {
- SAMPDisconnect
- }
- }
- }
-}
+ samp::YY_FLUSH_BUFFER
+ samp::yy_scan_string [lrange $var $i end]
+ samp::yyparse
+ incr i [expr $samp::yycnt-1]
}
proc SAMPCmdSendImage {name} {