diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-04-18 19:16:03 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-04-18 19:16:03 (GMT) |
commit | dfe055b55cdcd990b3bfb3d821ebf9e785a90b98 (patch) | |
tree | d71a4cac11fee453b70634dfc694f088bc07297f /ds9/library/print.tcl | |
parent | 1eba7f5d0646558a5f31b04c77f939cfa8821a3b (diff) | |
download | blt-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.tcl | 19 |
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 |