diff options
Diffstat (limited to 'ds9/library/mosaicwcs.tcl')
-rw-r--r-- | ds9/library/mosaicwcs.tcl | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/ds9/library/mosaicwcs.tcl b/ds9/library/mosaicwcs.tcl index 3e4b604..65e16b0 100644 --- a/ds9/library/mosaicwcs.tcl +++ b/ds9/library/mosaicwcs.tcl @@ -83,11 +83,19 @@ proc ProcessMosaicWCSCmd {varname iname sock fn} { upvar $varname var upvar $iname i - global loadParam - global current + global debug + if {$debug(tcl,parser)} { + global parse + set parse(sock) $sock + set parse(fn) $fn + + mosaicwcs::YY_FLUSH_BUFFER + mosaicwcs::yy_scan_string [lrange $var $i end] + mosaicwcs::yyparse + incr i [expr $mosaicwcs::yycnt-1] + } else { set layer {} - switch -- [string tolower [lindex $var $i]] { new { incr i @@ -127,6 +135,27 @@ proc ProcessMosaicWCSCmd {varname iname sock fn} { } FinishLoad } +} + +proc MosaicWCSCmdLoad {param layer sys} { + global parse + + if {$parse(sock) != {}} { + # xpa + if {![LoadMosaicWCSSocket $parse(sock) $param $layer $sys]} { + InitError xpa + LoadMosaicWCSFile $param $layer $sys + } + } else { + # comm + if {$parse(fn) != {}} { + LoadMosaicWCSAlloc $parse(fn) $param $layer $sys + } else { + LoadMosaicWCSFile $param $layer $sys + } + } + FinishLoad +} proc ProcessSendMosaicWCSCmd {proc id param sock fn} { global current |