1 |
< |
# SCCSid "$SunId$ LBL" |
1 |
> |
# RCSid: $Id$ |
2 |
|
# |
3 |
|
# Action screen for trad |
4 |
|
# |
8 |
|
|
9 |
|
proc make_script {} { # make run script |
10 |
|
global scname rpview curmess |
11 |
< |
set rfn /usr/tmp/rf[pid] |
11 |
> |
set rfn /tmp/rf[pid] |
12 |
|
if {! [save_vars $rfn]} { |
13 |
|
beep |
14 |
|
set curmess "Cannot save variables to temporary file!" |
19 |
|
lappend radcom -v $rpview |
20 |
|
} |
21 |
|
if {"$scname" == {}} { |
22 |
< |
set rof /usr/tmp/ro[pid] |
22 |
> |
set rof /tmp/ro[pid] |
23 |
|
} else { |
24 |
|
set rof $scname |
25 |
|
} |
50 |
|
|
51 |
|
proc run_rad args { # Run rad command with given arguments |
52 |
|
global curmess |
53 |
< |
set rfn /usr/tmp/rf[pid] |
53 |
> |
set rfn /tmp/rf[pid] |
54 |
|
if {! [save_vars $rfn]} { |
55 |
|
beep |
56 |
|
set curmess "Cannot save variables to temporary file!" |
174 |
|
global rifname rvview rpview radvar bfname batch_pid \ |
175 |
|
curmess scname mywin alldone batch_fmt hostname |
176 |
|
if {"$w" == "done"} { |
177 |
< |
unset rpview bfname batch_pid mywin |
177 |
> |
unset rvview rpview bfname batch_pid mywin |
178 |
|
return |
179 |
|
} |
180 |
|
set bfname [file rootname [file tail $rifname]].err |
196 |
|
# Render interactively |
197 |
|
label $w.ril -text {Render interactively} |
198 |
|
place $w.ril -relx .1429 -rely .2439 |
199 |
< |
button $w.rirv -text rview -relief raised \ |
199 |
> |
button $w.rirv -text rvu -relief raised \ |
200 |
|
-command {run_rad -v $rvview -o x11} |
201 |
|
place $w.rirv -relwidth .1071 -relheight .0610 -relx .4643 -rely .2439 |
202 |
< |
helplink $w.rirv trad action rview |
202 |
> |
helplink $w.rirv trad action rvu |
203 |
|
label $w.rivl -text View: |
204 |
|
place $w.rivl -relx .6072 -rely .2439 |
205 |
|
menubutton $w.rivmb -textvariable rvview -anchor w -relief raised |
223 |
|
-command {view_txt $bfname} |
224 |
|
place $w.rbce -relwidth .1786 -relheight .0610 -relx .6429 -rely .5488 |
225 |
|
helplink $w.rbce trad action checkerr |
226 |
< |
if [file exists $bfname] { |
226 |
> |
if [file isfile $bfname] { |
227 |
|
set fi [open $bfname r] |
228 |
< |
scan [gets $fi] $batch_fmt batch_pid batch_host |
229 |
< |
gets $fi radcom |
228 |
> |
if {[scan [gets $fi] $batch_fmt batch_pid batch_host] != 2} { |
229 |
> |
set batch_host unknown |
230 |
> |
set radcom {} |
231 |
> |
} else { |
232 |
> |
gets $fi radcom |
233 |
> |
} |
234 |
|
close $fi |
235 |
|
if [string match "rad -v *" $radcom] { |
236 |
|
set rpview [lindex $radcom 2] |