summaryrefslogtreecommitdiffstats
path: root/ds9/library/print.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-04-18 19:16:03 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-04-18 19:16:03 (GMT)
commitdfe055b55cdcd990b3bfb3d821ebf9e785a90b98 (patch)
treed71a4cac11fee453b70634dfc694f088bc07297f /ds9/library/print.tcl
parent1eba7f5d0646558a5f31b04c77f939cfa8821a3b (diff)
downloadblt-dfe055b55cdcd990b3bfb3d821ebf9e785a90b98.zip
blt-dfe055b55cdcd990b3bfb3d821ebf9e785a90b98.tar.gz
blt-dfe055b55cdcd990b3bfb3d821ebf9e785a90b98.tar.bz2
add ds9 print parser
Diffstat (limited to 'ds9/library/print.tcl')
-rw-r--r--ds9/library/print.tcl19
1 files changed, 19 insertions, 0 deletions
diff --git a/ds9/library/print.tcl b/ds9/library/print.tcl
index c0dcebb..5496cee 100644
--- a/ds9/library/print.tcl
+++ b/ds9/library/print.tcl
@@ -556,6 +556,7 @@ proc PrefsDialogPrint {} {
proc ProcessPrintCmd {varname iname} {
upvar $varname var
upvar $iname i
+
global ds9
switch $ds9(wm) {
@@ -579,6 +580,14 @@ proc ProcessPSPrintCmd {varname iname} {
upvar $varname var
upvar $iname i
+ global debug
+ if {$debug(tcl,parser)} {
+ ps::YY_FLUSH_BUFFER
+ ps::yy_scan_string [lrange $var $i end]
+ ps::yyparse
+ incr i [expr $ps::yycnt-1]
+ } else {
+
global ps
switch -- [string tolower [lindex $var $i]] {
@@ -595,6 +604,16 @@ proc ProcessPSPrintCmd {varname iname} {
default {incr i -1; PostScript}
}
}
+}
+
+proc PSCmdSet {which value {cmd {}}} {
+ global ps
+
+ set ps($which) $value
+ if {$cmd != {}} {
+ eval $cmd
+ }
+}
proc ProcessSendPSPrintCmd {proc id param} {
global ps