summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/array.tcl20
-rw-r--r--ds9/library/photo.tcl50
-rw-r--r--ds9/library/rgbarray.tcl20
-rw-r--r--ds9/library/source.tcl2
4 files changed, 70 insertions, 22 deletions
diff --git a/ds9/library/array.tcl b/ds9/library/array.tcl
index 08b7a92..3f95167 100644
--- a/ds9/library/array.tcl
+++ b/ds9/library/array.tcl
@@ -158,26 +158,6 @@ proc ArrayCmdLoad {param} {
FinishLoad
}
-proc ArrayCmdLoadRGB {param} {
- global array
-
- if {$array(load,sock) != {}} {
- # xpa
- if {![ImportRGBArraySocket $array(load,sock) $param]} {
- InitError xpa
- ImportRGBArrayFile $param
- }
- } else {
- # comm
- if {$array(load,fn) != {}} {
- ImportRGBArrayAlloc $array(load,fn) $param
- } else {
- ImportRGBArrayFile $param
- }
- }
- FinishLoad
-}
-
proc ProcessSendArrayCmd {proc id param sock fn} {
global current
diff --git a/ds9/library/photo.tcl b/ds9/library/photo.tcl
index 60d5557..5fc43f1 100644
--- a/ds9/library/photo.tcl
+++ b/ds9/library/photo.tcl
@@ -203,11 +203,22 @@ proc ProcessPhotoCmd {varname iname ch fn} {
upvar 2 $varname var
upvar 2 $iname i
+ global debug
+ if {$debug(tcl,parser)} {
+ global photo
+ set photo(load,ch) $ch
+ set photo(load,fn) $fn
+ set photo(load,mode) {}
+
+ photo::YY_FLUSH_BUFFER
+ photo::yy_scan_string [lrange $var $i end]
+ photo::yyparse
+ incr i [expr $photo::yycnt-1]
+ } else {
+
global loadParam
global current
-
set mode {}
-
switch -- [string tolower [lindex $var $i]] {
new {
incr i
@@ -248,6 +259,41 @@ proc ProcessPhotoCmd {varname iname ch fn} {
}
FinishLoad
}
+}
+
+proc PhotoCmdLoad {param} {
+ global photo
+
+ if {$photo(load,ch) != {}} {
+ # xpa
+ global tcl_platform
+ switch $tcl_platform(os) {
+ Linux -
+ Darwin -
+ SunOS {
+ if {![ImportPhotoSocket $photo(load,ch) $param $photo(load,mode)]} {
+ InitError xpa
+ ImportPhotoFile $param $photo(load,mode)
+ }
+ }
+ {Windows NT} {ImportPhotoFile $param $photo(load,mode)}
+ }
+ } else {
+ # comm
+ if {$photo(load,fn) != {}} {
+ ImportPhotoAlloc $photo(load,fn) $param $photo(load,mode)
+ } else {
+ ImportPhotoFile $param $phto(load,mode)
+ }
+ }
+ FinishLoad
+}
+
+proc PhotoCmdSet {which value} {
+ global photo
+
+ set photo($which) $value
+}
proc ProcessSendGIFCmd {proc id param ch fn} {
global current
diff --git a/ds9/library/rgbarray.tcl b/ds9/library/rgbarray.tcl
index 44054bb..1bcccc1 100644
--- a/ds9/library/rgbarray.tcl
+++ b/ds9/library/rgbarray.tcl
@@ -163,6 +163,26 @@ proc ProcessRGBArrayCmd {varname iname sock fn} {
FinishLoad
}
+proc RGBArrayCmdLoad {param} {
+ global array
+
+ if {$array(load,sock) != {}} {
+ # xpa
+ if {![ImportRGBArraySocket $array(load,sock) $param]} {
+ InitError xpa
+ ImportRGBArrayFile $param
+ }
+ } else {
+ # comm
+ if {$array(load,fn) != {}} {
+ ImportRGBArrayAlloc $array(load,fn) $param
+ } else {
+ ImportRGBArrayFile $param
+ }
+ }
+ FinishLoad
+}
+
proc ProcessSendRGBArrayCmd {proc id param sock fn} {
global current
diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl
index b7b76c1..1f1204f 100644
--- a/ds9/library/source.tcl
+++ b/ds9/library/source.tcl
@@ -264,6 +264,8 @@ source $ds9(root)/library/pagesetupparser.tcl
source $ds9(root)/library/pagesetuplex.tcl
source $ds9(root)/library/panparser.tcl
source $ds9(root)/library/panlex.tcl
+source $ds9(root)/library/photoparser.tcl
+source $ds9(root)/library/photolex.tcl
source $ds9(root)/library/pixeltableparser.tcl
source $ds9(root)/library/pixeltablelex.tcl
source $ds9(root)/library/plotparser.tcl