summaryrefslogtreecommitdiffstats
path: root/ds9/library/crosshair.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-07 18:57:14 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-07 18:57:14 (GMT)
commit4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399 (patch)
tree8aca19febd6de529d6ec366eee60ee229277a927 /ds9/library/crosshair.tcl
parent0f031457dc54364fd58dcecc3c635e5b5c727c73 (diff)
downloadblt-4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399.zip
blt-4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399.tar.gz
blt-4fc3cdba34e1f5656fd0ecd62dbd10d3f608a399.tar.bz2
add ds9 crosshair send parser
Diffstat (limited to 'ds9/library/crosshair.tcl')
-rw-r--r--ds9/library/crosshair.tcl21
1 files changed, 6 insertions, 15 deletions
diff --git a/ds9/library/crosshair.tcl b/ds9/library/crosshair.tcl
index c74c659..d2fca4b 100644
--- a/ds9/library/crosshair.tcl
+++ b/ds9/library/crosshair.tcl
@@ -270,21 +270,12 @@ proc ProcessCrosshairCmd {varname iname} {
}
proc ProcessSendCrosshairCmd {proc id param {sock {}} {fn {}}} {
- global crosshair
- global current
-
- switch -- [string tolower $param] {
- lock {$proc $id "$crosshair(lock)\n"}
- default {
- set sys [lindex $param 0]
- set sky [lindex $param 1]
- set format [lindex $param 2]
- FixSpec sys sky format physical fk5 degrees
+ global parse
+ set parse(proc) $proc
+ set parse(id) $id
- if {$current(frame) != {}} {
- $proc $id "[$current(frame) get crosshair $sys $sky $format]\n"
- }
- }
- }
+ crosshairsend::YY_FLUSH_BUFFER
+ crosshairsend::yy_scan_string $param
+ crosshairsend::yyparse
}