summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-29 20:00:43 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-29 20:00:43 (GMT)
commit503ed168603b213005c246edecfdfe77eefcc981 (patch)
tree43f87078278b13bff9240dd6c41f5024aac6e620 /ds9/library
parent669a10073068cf4c1366befcd2ebb0261eeff529 (diff)
downloadblt-503ed168603b213005c246edecfdfe77eefcc981.zip
blt-503ed168603b213005c246edecfdfe77eefcc981.tar.gz
blt-503ed168603b213005c246edecfdfe77eefcc981.tar.bz2
cleanup ProcessCmd code
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/2mass.tcl13
-rw-r--r--ds9/library/eso.tcl13
-rw-r--r--ds9/library/imgsvr.tcl85
-rw-r--r--ds9/library/nvss.tcl13
-rw-r--r--ds9/library/sao.tcl13
-rw-r--r--ds9/library/skyview.tcl13
-rw-r--r--ds9/library/stsci.tcl13
-rw-r--r--ds9/library/vla.tcl13
-rw-r--r--ds9/library/vlss.tcl13
9 files changed, 32 insertions, 157 deletions
diff --git a/ds9/library/2mass.tcl b/ds9/library/2mass.tcl
index aaf315f..cb2fa23 100644
--- a/ds9/library/2mass.tcl
+++ b/ds9/library/2mass.tcl
@@ -133,15 +133,10 @@ proc Process2MASSCmd {varname iname} {
2MASSDialog
- global debug
- if {$debug(tcl,parser)} {
- twomass::YY_FLUSH_BUFFER
- twomass::yy_scan_string [lrange $var $i end]
- twomass::yyparse
- incr i [expr $twomass::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dtwomass
- }
+ twomass::YY_FLUSH_BUFFER
+ twomass::yy_scan_string [lrange $var $i end]
+ twomass::yyparse
+ incr i [expr $twomass::yycnt-1]
}
proc ProcessSend2MASSCmd {proc id param} {
diff --git a/ds9/library/eso.tcl b/ds9/library/eso.tcl
index b7b7c6a..ab7c199 100644
--- a/ds9/library/eso.tcl
+++ b/ds9/library/eso.tcl
@@ -162,15 +162,10 @@ proc ProcessESOCmd {varname iname} {
ESODialog
- global debug
- if {$debug(tcl,parser)} {
- dsseso::YY_FLUSH_BUFFER
- dsseso::yy_scan_string [lrange $var $i end]
- dsseso::yyparse
- incr i [expr $dsseso::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname deso
- }
+ dsseso::YY_FLUSH_BUFFER
+ dsseso::yy_scan_string [lrange $var $i end]
+ dsseso::yyparse
+ incr i [expr $dsseso::yycnt-1]
}
proc ProcessSendESOCmd {proc id param} {
diff --git a/ds9/library/imgsvr.tcl b/ds9/library/imgsvr.tcl
index 2375731..6ebec9d 100644
--- a/ds9/library/imgsvr.tcl
+++ b/ds9/library/imgsvr.tcl
@@ -483,91 +483,6 @@ proc IMGSVRProgress {varname token totalsize currentsize} {
}
}
-proc IMGSVRProcessCmd {varname iname vvarname} {
- upvar 2 $varname var
- upvar 2 $iname i
-
- upvar #0 $vvarname vvar
-
- switch -- [string tolower [lindex $var $i]] {
- {} {
- if {$vvar(name) != {} || ($vvar(x) != {} && $vvar(y) != {})} {
- IMGSVRApply $vvarname 1
- }
- }
- open {}
- close {ARDestroy $vvarname}
- save {
- incr i
- set vvar(save) [FromYesNo [lindex $var $i]]
- }
- frame {
- incr i
- set vvar(mode) [string tolower [lindex $var $i]]
- }
- survey {
- incr i
- set vvar(survey) [lindex $var $i]
- }
- size {
- incr i
- set vvar(width) [lindex $var $i]
- incr i
- set vvar(height) [lindex $var $i]
- incr i
- if {[lindex $var $i] != {} && \
- [string range [lindex $var $i] 0 0] != {-}} {
- set vvar(rformat) [lindex $var $i]
- set vvar(rformat,msg) $vvar(rformat)
- } else {
- incr i -1
- }
- }
- pixels {
- incr i
- set vvar(width,pixels) [lindex $var $i]
- incr i
- set vvar(height,pixels) [lindex $var $i]
- }
- update {
- incr i
- switch [string tolower [lindex $var $i]] {
- frame {IMGSVRUpdate $vvarname}
- crosshair {IMGSVRCrosshair $vvarname}
- }
- IMGSVRApply $vvarname 1
- }
- coord {
- incr i
- set vvar(x) [lindex $var $i]
- incr i
- set vvar(y) [lindex $var $i]
- incr i
- if {[lindex $var $i] != {} && \
- [string range [lindex $var $i] 0 0] != {-}} {
- set vvar(skyformat) [lindex $var $i]
- set vvar(skyformat,msg) $vvar(skyformat)
- } else {
- incr i -1
- }
- IMGSVRApply $vvarname 1
- }
- name {
- incr i
- set vvar(name) [lindex $var $i]
- if {$vvar(name) != {}} {
- IMGSVRApply $vvarname 1
- }
- }
- default {
- set vvar(name) [lindex $var $i]
- if {$vvar(name) != {}} {
- IMGSVRApply $vvarname 1
- }
- }
- }
-}
-
proc IMGSVRCmd {varname which value} {
upvar #0 $varname var
global $varname
diff --git a/ds9/library/nvss.tcl b/ds9/library/nvss.tcl
index ba2c019..8496cad 100644
--- a/ds9/library/nvss.tcl
+++ b/ds9/library/nvss.tcl
@@ -154,15 +154,10 @@ proc ProcessNVSSCmd {varname iname} {
NVSSDialog
- global debug
- if {$debug(tcl,parser)} {
- nvss::YY_FLUSH_BUFFER
- nvss::yy_scan_string [lrange $var $i end]
- nvss::yyparse
- incr i [expr $nvss::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dnvss
- }
+ nvss::YY_FLUSH_BUFFER
+ nvss::yy_scan_string [lrange $var $i end]
+ nvss::yyparse
+ incr i [expr $nvss::yycnt-1]
}
proc ProcessSendNVSSCmd {proc id param} {
diff --git a/ds9/library/sao.tcl b/ds9/library/sao.tcl
index ebb79fe..4889df2 100644
--- a/ds9/library/sao.tcl
+++ b/ds9/library/sao.tcl
@@ -149,15 +149,10 @@ proc ProcessSAOCmd {varname iname} {
SAODialog
- global debug
- if {$debug(tcl,parser)} {
- dsssao::YY_FLUSH_BUFFER
- dsssao::yy_scan_string [lrange $var $i end]
- dsssao::yyparse
- incr i [expr $dsssao::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dsao
- }
+ dsssao::YY_FLUSH_BUFFER
+ dsssao::yy_scan_string [lrange $var $i end]
+ dsssao::yyparse
+ incr i [expr $dsssao::yycnt-1]
}
proc ProcessSendSAOCmd {proc id param} {
diff --git a/ds9/library/skyview.tcl b/ds9/library/skyview.tcl
index ecfe17c..81ac65f 100644
--- a/ds9/library/skyview.tcl
+++ b/ds9/library/skyview.tcl
@@ -610,15 +610,10 @@ proc ProcessSkyViewCmd {varname iname} {
SkyViewDialog
- global debug
- if {$debug(tcl,parser)} {
- skyview::YY_FLUSH_BUFFER
- skyview::yy_scan_string [lrange $var $i end]
- skyview::yyparse
- incr i [expr $skyview::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dskyview
- }
+ skyview::YY_FLUSH_BUFFER
+ skyview::yy_scan_string [lrange $var $i end]
+ skyview::yyparse
+ incr i [expr $skyview::yycnt-1]
}
proc ProcessSendSkyViewCmd {proc id param} {
diff --git a/ds9/library/stsci.tcl b/ds9/library/stsci.tcl
index c42e362..8126689 100644
--- a/ds9/library/stsci.tcl
+++ b/ds9/library/stsci.tcl
@@ -174,15 +174,10 @@ proc ProcessSTSCICmd {varname iname} {
STSCIDialog
- global debug
- if {$debug(tcl,parser)} {
- dssstsci::YY_FLUSH_BUFFER
- dssstsci::yy_scan_string [lrange $var $i end]
- dssstsci::yyparse
- incr i [expr $dssstsci::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dstsci
- }
+ dssstsci::YY_FLUSH_BUFFER
+ dssstsci::yy_scan_string [lrange $var $i end]
+ dssstsci::yyparse
+ incr i [expr $dssstsci::yycnt-1]
}
proc ProcessSendSTSCICmd {proc id param} {
diff --git a/ds9/library/vla.tcl b/ds9/library/vla.tcl
index d568a20..129a03e 100644
--- a/ds9/library/vla.tcl
+++ b/ds9/library/vla.tcl
@@ -165,15 +165,10 @@ proc ProcessVLACmd {varname iname} {
VLADialog
- global debug
- if {$debug(tcl,parser)} {
- vla::YY_FLUSH_BUFFER
- vla::yy_scan_string [lrange $var $i end]
- vla::yyparse
- incr i [expr $vla::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dvla
- }
+ vla::YY_FLUSH_BUFFER
+ vla::yy_scan_string [lrange $var $i end]
+ vla::yyparse
+ incr i [expr $vla::yycnt-1]
}
proc ProcessSendVLACmd {proc id param} {
diff --git a/ds9/library/vlss.tcl b/ds9/library/vlss.tcl
index e0e45d6..1d85c3e 100644
--- a/ds9/library/vlss.tcl
+++ b/ds9/library/vlss.tcl
@@ -124,15 +124,10 @@ proc ProcessVLSSCmd {varname iname} {
VLSSDialog
- global debug
- if {$debug(tcl,parser)} {
- vlss::YY_FLUSH_BUFFER
- vlss::yy_scan_string [lrange $var $i end]
- vlss::yyparse
- incr i [expr $vlss::yycnt-1]
- } else {
- IMGSVRProcessCmd $varname $iname dvlss
- }
+ vlss::YY_FLUSH_BUFFER
+ vlss::yy_scan_string [lrange $var $i end]
+ vlss::yyparse
+ incr i [expr $vlss::yycnt-1]
}
proc ProcessSendVLSSCmd {proc id param} {