diff options
Diffstat (limited to 'ds9/library/mosaicimagewcs.tcl')
-rw-r--r-- | ds9/library/mosaicimagewcs.tcl | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/ds9/library/mosaicimagewcs.tcl b/ds9/library/mosaicimagewcs.tcl index 3f59eb6..89411b3 100644 --- a/ds9/library/mosaicimagewcs.tcl +++ b/ds9/library/mosaicimagewcs.tcl @@ -75,11 +75,20 @@ proc ProcessMosaicImageWCSCmd {varname iname sock fn} { upvar $varname var upvar $iname i - global loadParam - global current + global debug + if {$debug(tcl,parser)} { + global mosaicimagewcs + set mosaicimagewcs(load,sock) $sock + set mosaicimagewcs(load,fn) $fn + set mosaicimagewcs(load,layer) {} + + mosaicimagewcs::YY_FLUSH_BUFFER + mosaicimagewcs::yy_scan_string [lrange $var $i end] + mosaicimagewcs::yyparse + incr i [expr $mosaicimagewcs::yycnt-1] + } else { set layer {} - switch -- [string tolower [lindex $var $i]] { new { incr i @@ -119,6 +128,27 @@ proc ProcessMosaicImageWCSCmd {varname iname sock fn} { } FinishLoad } +} + +proc MosaicImageWCSCmdLoad {param layer sys} { + global mosaicimagewcs + + if {$mosaicimagewcs(load,sock) != {}} { + # xpa + if {![LoadMosaicImageWCSSocket $mosaicimagewcs(load,sock) $param $layer $sys]} { + InitError xpa + LoadMosaicImageWCSFile $param $layer $sys + } + } else { + # comm + if {$mosaicimagewcs(load,fn) != {}} { + LoadMosaicImageWCSAlloc $mosaicimagewcs(load,fn) $param $layer $sys + } else { + LoadMosaicImageWCSFile $param $layer $sys + } + } + FinishLoad +} proc ProcessSendMosaicImageWCSCmd {proc id param sock fn} { global current |