summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-01 18:15:41 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-01 18:15:41 (GMT)
commit15bd8441b3977ccd664fdbc4a8d07e8931be480a (patch)
tree5adeafbad450db1c655a35ac12cf529f31a3e6df /ds9/library
parent8e8bd1009288bdd7b174c9d2da42bbd4681bc6d2 (diff)
downloadblt-15bd8441b3977ccd664fdbc4a8d07e8931be480a.zip
blt-15bd8441b3977ccd664fdbc4a8d07e8931be480a.tar.gz
blt-15bd8441b3977ccd664fdbc4a8d07e8931be480a.tar.bz2
update ds9 send parsers
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/crop.tcl74
-rw-r--r--ds9/library/source.tcl2
2 files changed, 8 insertions, 68 deletions
diff --git a/ds9/library/crop.tcl b/ds9/library/crop.tcl
index b505b18..3082a4a 100644
--- a/ds9/library/crop.tcl
+++ b/ds9/library/crop.tcl
@@ -400,73 +400,11 @@ proc ProcessCropCmd {varname iname} {
}
proc ProcessSendCropCmd {proc id param {sock {}} {fn {}}} {
- global crop
- global current
- switch -- [string tolower [lindex $param 0]] {
- lock {$proc $id "$crop(lock)\n"}
- 3d {
- set sys [lindex $param 1]
- FixSpecSystem sys physical
-
- if {$current(frame) != {}} {
- $proc $id "[$current(frame) get crop 3d $sys]\n"
- }
- }
- default {
- set sys [lindex $param 0]
- set sky [lindex $param 1]
- set format [lindex $param 2]
- set dformat [lindex $param 3]
- FixSpec sys sky format physical fk5 degrees
-
- if {$current(frame) != {}} {
- $proc $id "[$current(frame) get crop center $sys $sky $format $sys $dformat]\n"
- }
- }
- }
-}
-
-proc FixSpecSystem {sysname defsys} {
- upvar $sysname sys
-
- set rr 0
-
- switch -- $sys {
- image -
- physical -
- detector -
- amplifier -
- wcs -
- wcsa -
- wcsb -
- wcsc -
- wcsd -
- wcse -
- wcsf -
- wcsg -
- wcsh -
- wcsi -
- wcsj -
- wcsk -
- wcsl -
- wcsm -
- wcsn -
- wcso -
- wcsp -
- wcsq -
- wcsr -
- wcss -
- wcst -
- wcsu -
- wcsv -
- wcsw -
- wcsx -
- wcsy -
- wcsz {incr rr}
- default {
- set sys $defsys
- }
- }
+ global parse
+ set parse(proc) $proc
+ set parse(id) $id
- return $rr
+ cropsend::YY_FLUSH_BUFFER
+ cropsend::yy_scan_string $param
+ cropsend::yyparse
}
diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl
index 581b9a7..60862b5 100644
--- a/ds9/library/source.tcl
+++ b/ds9/library/source.tcl
@@ -218,6 +218,8 @@ source $ds9(root)/library/contourparser.tcl
source $ds9(root)/library/contourlex.tcl
source $ds9(root)/library/cropparser.tcl
source $ds9(root)/library/croplex.tcl
+source $ds9(root)/library/cropsendparser.tcl
+source $ds9(root)/library/cropsendlex.tcl
source $ds9(root)/library/crosshairparser.tcl
source $ds9(root)/library/crosshairlex.tcl
source $ds9(root)/library/cubeparser.tcl