diff options
Diffstat (limited to 'ds9/library/mosaiciraf.tcl')
-rw-r--r-- | ds9/library/mosaiciraf.tcl | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/ds9/library/mosaiciraf.tcl b/ds9/library/mosaiciraf.tcl index be91595..c2a3656 100644 --- a/ds9/library/mosaiciraf.tcl +++ b/ds9/library/mosaiciraf.tcl @@ -47,11 +47,19 @@ proc ProcessMosaicIRAFCmd {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 - set layer {} + mosaiciraf::YY_FLUSH_BUFFER + mosaiciraf::yy_scan_string [lrange $var $i end] + mosaiciraf::yyparse + incr i [expr $mosaiciraf::yycnt-1] + } else { + set layer {} switch -- [string tolower [lindex $var $i]] { new { incr i @@ -84,3 +92,24 @@ proc ProcessMosaicIRAFCmd {varname iname sock fn} { } FinishLoad } +} + +proc MosaicIRAFCmdLoad {param layer} { + global parse + + if {$parse(sock) != {}} { + # xpa + if {![LoadMosaicIRAFSocket $parse(sock) $param $layer]} { + InitError xpa + LoadMosaicIRAFFile $param $layer + } + } else { + # comm + if {$parse(fn) != {}} { + LoadMosaicIRAFAlloc $parse(fn) $param $layer + } else { + LoadMosaicIRAFFile $param $layer + } + } + FinishLoad +} |