summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 20:48:23 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 20:48:23 (GMT)
commit3e121d75852a441cb087ae5225fe9ef7d363173b (patch)
treed7c4db55c19de8c3628edf77fe2689deae3fe5d2 /ds9/library
parent2a2c1efa881b41e32e272b3686b8102a9ec6d234 (diff)
downloadblt-3e121d75852a441cb087ae5225fe9ef7d363173b.zip
blt-3e121d75852a441cb087ae5225fe9ef7d363173b.tar.gz
blt-3e121d75852a441cb087ae5225fe9ef7d363173b.tar.bz2
add ds9 preserve send parser
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/load.tcl9
-rw-r--r--ds9/library/source.tcl2
-rw-r--r--ds9/library/util.tcl10
3 files changed, 21 insertions, 0 deletions
diff --git a/ds9/library/load.tcl b/ds9/library/load.tcl
index 22d76b6..f07f405 100644
--- a/ds9/library/load.tcl
+++ b/ds9/library/load.tcl
@@ -421,6 +421,15 @@ proc ProcessPreserveCmd {varname iname} {
}
proc ProcessSendPreserveCmd {proc id param {sock {}} {fn {}}} {
+ global parse
+ set parse(proc) $proc
+ set parse(id) $id
+
+ preservesend::YY_FLUSH_BUFFER
+ preservesend::yy_scan_string $param
+ preservesend::yyparse
+ return
+
global scale
global panzoom
global marker
diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl
index fc55f64..4492bbe 100644
--- a/ds9/library/source.tcl
+++ b/ds9/library/source.tcl
@@ -344,6 +344,8 @@ source $ds9(root)/library/prefssendparser.tcl
source $ds9(root)/library/prefssendlex.tcl
source $ds9(root)/library/preserveparser.tcl
source $ds9(root)/library/preservelex.tcl
+source $ds9(root)/library/preservesendparser.tcl
+source $ds9(root)/library/preservesendlex.tcl
source $ds9(root)/library/psparser.tcl
source $ds9(root)/library/pslex.tcl
source $ds9(root)/library/pssendparser.tcl
diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl
index 98d8d2c..1f937c3 100644
--- a/ds9/library/util.tcl
+++ b/ds9/library/util.tcl
@@ -299,6 +299,16 @@ proc ProcessCmdCVAR4 {key value key2 value2 key3 value3 key4 value4 {cmd {}}} {
}
}
+proc ProcessSendCmd {cmd} {
+ global parse
+ $parse(proc) $parse(id) "[$cmd]"
+}
+
+proc ProcessSendCmdTxt {rr} {
+ global parse
+ $parse(proc) $parse(id) "$rr\n"
+}
+
proc ProcessSendCmdGet {varname key} {
upvar #0 $varname var
global $varname