Overview
Comment:Reduced length of parameter names: stripped leading top-level name.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 05b94328ac0a326c8f624a43d367669435f6b01e8cc7e2cf25bdf964d968678a
User & Date: geraint@users.sourceforge.net on 2004-01-26 10:43:35
Other Links: branch diff | manifest | tags
Context
2004-01-26
10:51:27
Add name of system to plot window. check-in: 276d928686 user: geraint@users.sourceforge.net tags: origin/master, trunk
10:43:35
Reduced length of parameter names: stripped leading top-level name. check-in: 05b94328ac user: geraint@users.sourceforge.net tags: origin/master, trunk
09:50:10
In correct row dimension for D fixed check-in: eca6b86835 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/struc2gnuplot_txt2wish from [b464ba8f0b] to [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 ]