From 7254c63954b7246c72af5beac2a609326d82e460 Mon Sep 17 00:00:00 2001 From: William Joye Date: Wed, 6 Jun 2018 15:25:14 -0400 Subject: update ds9 parsers --- ds9/library/nameres.tcl | 11 ----------- ds9/parsers/nresparser.tac | 14 +++++++------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/ds9/library/nameres.tcl b/ds9/library/nameres.tcl index 63fc3c8..5c5c2c6 100644 --- a/ds9/library/nameres.tcl +++ b/ds9/library/nameres.tcl @@ -186,23 +186,12 @@ proc ProcessNRESCmd {varname iname} { NRESDialog - global cvarname - set cvarname dnres - nres::YY_FLUSH_BUFFER nres::yy_scan_string [lrange $var $i end] nres::yyparse incr i [expr $nres::yycnt-1] } -proc NRESCmdName {value} { - global cvarname - upvar #0 $cvarname cvar - - set cvar(name) $value - NRESApply $cvarname 1 -} - proc ProcessSendNRESCmd {proc id param {sock {}} {fn {}}} { global nres global pnres diff --git a/ds9/parsers/nresparser.tac b/ds9/parsers/nresparser.tac index ecc42dd..7bf80b4 100644 --- a/ds9/parsers/nresparser.tac +++ b/ds9/parsers/nresparser.tac @@ -32,13 +32,13 @@ command : nres ; nres : OPEN_ - | CLOSE_ {global cvarname; ARDestroy $cvarname} - | SERVER_ server {global pnres; set pnres(server) $2} - | PAN_ {global cvarname; NRESPan $cvarname} - | CROSSHAIR_ {global cvarname; NRESCrosshair $cvarname} - | SKYFORMAT_ skyformat {ProcessCmdCVAR skyformat $2; ProcessCmdCVAR skyformat,msg $2} - | NAME_ STRING_ {NRESCmdName $2} - | STRING_ {NRESCmdName $1} + | CLOSE_ {ARDestroy dnres} + | SERVER_ server {ProcessCmdSet pnres server $2} + | PAN_ {NRESPan dnres} + | CROSSHAIR_ {NRESCrosshair dnres} + | SKYFORMAT_ skyformat {ProcessCmdSet2 dnres skyformat $2 format,msg $2} + | NAME_ STRING_ {ProcessCmdSet dnres name $2 "NRESApply dnres 1"} + | STRING_ {ProcessCmdSet dnres name $1 "NRESApply dnres 1"} ; server : NEDSAO_ {set _ ned-sao} -- cgit v0.12