diff options
-rw-r--r-- | ds9/library/crop.tcl | 9 | ||||
-rw-r--r-- | ds9/library/crosshair.tcl | 9 | ||||
-rw-r--r-- | ds9/library/cube.tcl | 9 | ||||
-rw-r--r-- | ds9/library/export.tcl | 9 | ||||
-rw-r--r-- | ds9/parsers/cropparser.tac | 2 | ||||
-rw-r--r-- | ds9/parsers/crosshairparser.tac | 2 | ||||
-rw-r--r-- | ds9/parsers/cubeparser.tac | 10 | ||||
-rw-r--r-- | ds9/parsers/exportparser.tac | 16 |
8 files changed, 15 insertions, 51 deletions
diff --git a/ds9/library/crop.tcl b/ds9/library/crop.tcl index b418922..7ca5779 100644 --- a/ds9/library/crop.tcl +++ b/ds9/library/crop.tcl @@ -399,15 +399,6 @@ proc ProcessCropCmd {varname iname} { incr i [expr $crop::yycnt-1] } -proc CropCmdSet {which value {cmd {}}} { - global crop - - set crop($which) $value - if {$cmd != {}} { - eval $cmd - } -} - proc ProcessSendCropCmd {proc id param {sock {}} {fn {}}} { global crop global current diff --git a/ds9/library/crosshair.tcl b/ds9/library/crosshair.tcl index 8a259e0..c74c659 100644 --- a/ds9/library/crosshair.tcl +++ b/ds9/library/crosshair.tcl @@ -269,15 +269,6 @@ proc ProcessCrosshairCmd {varname iname} { incr i [expr $crosshair::yycnt-1] } -proc CrosshairCmdSet {which value {cmd {}}} { - global crosshair - - set crosshair($which) $value - if {$cmd != {}} { - eval $cmd - } -} - proc ProcessSendCrosshairCmd {proc id param {sock {}} {fn {}}} { global crosshair global current diff --git a/ds9/library/cube.tcl b/ds9/library/cube.tcl index 920bf66..de4beca 100644 --- a/ds9/library/cube.tcl +++ b/ds9/library/cube.tcl @@ -726,15 +726,6 @@ proc CubeCmdCoord {ss sys axis} { CubeApply $cube(axis) } -proc CubeCmdSet {which value {cmd {}}} { - global cube - - set cube($which) $value - if {$cmd != {}} { - eval $cmd - } -} - proc ProcessSendCubeCmd {proc id param {sock {}} {fn {}}} { global cube global current diff --git a/ds9/library/export.tcl b/ds9/library/export.tcl index 0188f1e..9c1a6b0 100644 --- a/ds9/library/export.tcl +++ b/ds9/library/export.tcl @@ -42,15 +42,6 @@ proc ProcessExportCmd {varname iname} { incr i [expr $export::yycnt-1] } -proc ExportCmdSet {which value {cmd {}}} { - global export - - set export($which) $value - if {$cmd != {}} { - eval $cmd - } -} - proc ExportCmdSave {format fn {fn2 {}}} { switch -- $format { array {FileLast arrayfbox $fn} diff --git a/ds9/parsers/cropparser.tac b/ds9/parsers/cropparser.tac index 7d44496..e5fb51f 100644 --- a/ds9/parsers/cropparser.tac +++ b/ds9/parsers/cropparser.tac @@ -26,7 +26,7 @@ command : crop crop : OPEN_ {CropDialog} | CLOSE_ {CropDestroyDialog} | MATCH_ match {MatchCropCurrent $2} - | LOCK_ lock {CropCmdSet lock $2 LockCropCurrent} + | LOCK_ lock {ProcessCmdSet crop lock $2 LockCropCurrent} | RESET_ {CropReset} | 3D_ 3d diff --git a/ds9/parsers/crosshairparser.tac b/ds9/parsers/crosshairparser.tac index d6885a7..2985582 100644 --- a/ds9/parsers/crosshairparser.tac +++ b/ds9/parsers/crosshairparser.tac @@ -19,7 +19,7 @@ command : crosshair ; crosshair : MATCH_ match {MatchCrosshairCurrent $2} - | LOCK_ lock {CrosshairCmdSet lock $2 LockCrosshairCurrent} + | LOCK_ lock {ProcessCmdSet crosshair lock $2 LockCrosshairCurrent} | numeric numeric {CrosshairTo $1 $2 physical fk5} | numeric numeric coordsys {CrosshairTo $1 $2 $3 fk5} | numeric numeric wcssys {CrosshairTo $1 $2 $3 fk5} diff --git a/ds9/parsers/cubeparser.tac b/ds9/parsers/cubeparser.tac index d3b60cf..a9573d9 100644 --- a/ds9/parsers/cubeparser.tac +++ b/ds9/parsers/cubeparser.tac @@ -43,13 +43,13 @@ command : cube cube : OPEN_ | CLOSE_ {CubeDestroyDialog} | MATCH_ matchslice {MatchCubeCurrent $2} - | LOCK_ lockslice {CubeCmdSet lock $2 LockCubeCurrent} + | LOCK_ lockslice {ProcessCmdSet cube lock $2 LockCubeCurrent} | PLAY_ {CubePlay} | STOP_ {CubeStop} | NEXT_ {CubeNext} | PREV_ {CubePrev} - | INTERVAL_ numeric {CubeCmdSet interval [expr int($2*1000)]} - | AXIS_ INT_ {CubeCmdSet axis [expr $2-1]} + | INTERVAL_ numeric {ProcessCmdSet cube interval [expr int($2*1000)]} + | AXIS_ INT_ {ProcessCmdSet cube axis [expr $2-1]} | AXES_ order | ORDER_ order | INT_ {CubeCmdCoord $1 image 2} @@ -57,8 +57,8 @@ cube : OPEN_ | numeric wcssys INT_ {CubeCmdCoord $1 $2 [expr $3-1]} ; -order : LOCK_ yesno {CubeCmdSet lock,axes $2 LockAxesCurrent} - | orderAxes {CubeCmdSet axes $1} +order : LOCK_ yesno {ProcessCmdSet cube lock,axes $2 LockAxesCurrent} + | orderAxes {ProcessCmdSet cube axes $1} ; orderAxes : 123_ {set _ 123} diff --git a/ds9/parsers/exportparser.tac b/ds9/parsers/exportparser.tac index 5232eab..4506d37 100644 --- a/ds9/parsers/exportparser.tac +++ b/ds9/parsers/exportparser.tac @@ -57,16 +57,16 @@ ext2 : ARRAY_ {set _ array} | ENVI_ {set _ envi} ; -opts : NONE_ {ExportCmdSet tiff,compress none} - | JPEG_ {ExportCmdSet tiff,compress jpeg} - | PACKBITS_ {ExportCmdSet tiff,compress packbits} - | DEFLATE_ {ExportCmdSet tiff,compress deflate} - | numeric {ExportCmdSet jpeg,quality $1} +opts : NONE_ {ProcessCmdSet export tiff,compress none} + | JPEG_ {ProcessCmdSet export tiff,compress jpeg} + | PACKBITS_ {ProcessCmdSet export tiff,compress packbits} + | DEFLATE_ {ProcessCmdSet export tiff,compress deflate} + | numeric {ProcessCmdSet export jpeg,quality $1} ; -endian : BIG_ {ExportCmdSet endian big} - | LITTLE_ {ExportCmdSet endian little} - | NATIVE_ {ExportCmdSet endian native} +endian : BIG_ {ProcessCmdSet export endian big} + | LITTLE_ {ProcessCmdSet export endian little} + | NATIVE_ {ProcessCmdSet export endian native} ; %% |