Differences From Artifact [b464ba8f0b]:

To Artifact [1d1598cc62]:


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## write header
cat <<EOF > ${out}
#!/bin/sh
# -*-tcl-*- Next line replaces shell with wish\\
exec wish "\$0" "\$@"

## main window
wm title . "MTT Viewer: ${sys}"

# menu bar
canvas .menubar

menubutton .menubar.file -text "File" -underline 0 -menu .menubar.file.menu
menu .menubar.file.menu
.menubar.file.menu add command -label "Open    (Gnuplot template)" -underline 0   -command open_plotfile







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## write header
cat <<EOF > ${out}
#!/bin/sh
# -*-tcl-*- Next line replaces shell with wish\\
exec wish "\$0" "\$@"

## main window
wm title . "MTT: ${sys}"

# menu bar
canvas .menubar

menubutton .menubar.file -text "File" -underline 0 -menu .menubar.file.menu
menu .menubar.file.menu
.menubar.file.menu add command -label "Open    (Gnuplot template)" -underline 0   -command open_plotfile
231
232
233
234
235
236
237



238
239
240



241
242
243
244
245
246
247
248
249
}

EOF

## create states and outputs lists
gawk '
($1 == "state") {



    printf "lappend xl %s\n", $4
}
($1 == "output") {



    printf "lappend yl %s\n", $4
}' ${struc} >> ${out}

cat <<EOF >> ${out}
lappend xl Time
lappend yl Time
.parameters.list configure -listvar yl

pack .menubar			-expand false -fill x    -side top







>
>
>
|


>
>
>
|
|







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
}

EOF

## create states and outputs lists
gawk '
($1 == "state") {
    name=sys"__";
    label=$4;
    sub (name, "", label);
    printf "lappend xl %s\n", label
}
($1 == "output") {
    name=sys"__";
    label=$4;
    sub (name, "", label);
    printf "lappend yl %s\n", label
}' sys=${sys} ${struc} >> ${out}

cat <<EOF >> ${out}
lappend xl Time
lappend yl Time
.parameters.list configure -listvar yl

pack .menubar			-expand false -fill x    -side top
257
258
259
260
261
262
263



264
265
266
267
268
269
270
271
272
273
274
275
276



277
278
279
280
281
282
283
284
285
286

## map names to column numbers
proc "get_state_column" "title" {
    switch -- \$title {
EOF

	gawk '($1 == "state") {



	    printf "\t\t%s\t{ return %d }\n", $4, $2+2+Ny;
	}
	' Ny=${Ny} ${struc} >> ${out}
	
cat <<EOF >> ${out}
    }
}
    
proc "get_output_column" "title" {
    switch -- \$title {
EOF

	gawk '($1 == "output") {



	    printf "\t\t%s\t{ return %d }\n", $4, $2+1;
	}    
	' Title=\$title Ny=${Ny} ${struc} >> ${out}

cat <<EOF >> ${out}
    }
}

proc "plot" "title" {
    global dimension







>
>
>
|

|










>
>
>
|

|







263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298

## map names to column numbers
proc "get_state_column" "title" {
    switch -- \$title {
EOF

	gawk '($1 == "state") {
	    name=sys"__";
	    label=$4;
	    sub (name, "", label);
	    printf "\t\t%s\t{ return %d }\n", label, $2+2+Ny;
	}
	' Ny=${Ny} sys=${sys} ${struc} >> ${out}
	
cat <<EOF >> ${out}
    }
}
    
proc "get_output_column" "title" {
    switch -- \$title {
EOF

	gawk '($1 == "output") {
	    name=sys"__";
	    label=$4;
	    sub (name, "", label);
	    printf "\t\t%s\t{ return %d }\n", label, $2+1;
	}    
	' Ny=${Ny} sys=${sys} ${struc} >> ${out}

cat <<EOF >> ${out}
    }
}

proc "plot" "title" {
    global dimension

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]