Overview
Comment: | dia2abg.pl now has option abg_file which default to $sys_abg.m instead of stdout. Made appropriate changes in abg2cmp_dia2txt and abg_dia2m. dia usage() now print usage without error message. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7f738ab7c6cbecd9b6fe75ef6884e2c3 |
User & Date: | david-hoover@users.sourceforge.net on 2002-12-04 12:22:53 |
Other Links: | branch diff | manifest | tags |
Context
2002-12-04
| ||
13:24:16 | Added code to distinguish Ports from Components. check-in: df16b82bfb user: david-hoover@users.sourceforge.net tags: origin/master, trunk | |
12:22:53 |
dia2abg.pl now has option abg_file which default to $sys_abg.m instead of stdout. Made appropriate changes in abg2cmp_dia2txt and abg_dia2m. dia usage() now print usage without error message. check-in: 7f738ab7c6 user: david-hoover@users.sourceforge.net tags: origin/master, trunk | |
2002-12-03
| ||
23:28:44 | Added dependencies for bond graphs built with dia. check-in: 5080aeba87 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/abg2cmp_dia2txt from [87b5a9d05c] to [b2b4a9d48e].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | #! /bin/sh ### abg2cmp_dia2txt ## Creates list of components contained in _abg.dia ## Copyright (C) 2002 by Geraint Paul Bevan ###################################### ##### Model Transformation Tools ##### ###################################### set -e # set LANG until fixed bug [647664] |
Modified mttroot/mtt/bin/trans/abg_dia2m from [a6b9f536bc] to [e4b5ac8666].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | #! /bin/sh ### abg2cmp_dia2txt ## Creates _abg.m from _abg.dia ## Copyright (C) 2002 by Geraint Paul Bevan ###################################### ##### Model Transformation Tools ##### ###################################### set -e # set LANG until fixed bug [647664] |
Modified mttroot/mtt/bin/trans/dia2abg.pl from [e68e309d17] to [d84745ea9f].
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | + + + + + + - + | my $diagram_name = ''; my $dia_file = ''; my $label_file = ''; my $component_list_file = ''; my $debug = 0; my $create_component_list = 0; my $create_abg = 0; my $abg_file = ''; GetOptions ('diagram_name=s' => \$diagram_name, 'dia_file=s' => \$dia_file, 'label_file=s' => \$label_file, 'component_list_file=s' => \$component_list_file, 'debug' => \$debug, 'create_component_list' => \$create_component_list, 'create_abg' => \$create_abg, 'abg_file=s' => \$abg_file, ); die usage() if $diagram_name eq ''; # Use defaults if necessary: $dia_file = $diagram_name . "_abg.dia" if ($dia_file eq ''); $label_file = $diagram_name . "_lbl.txt" if ($label_file eq ''); $abg_file = $diagram_name . "_abg.m" if ($abg_file eq ''); $component_list_file = $diagram_name . "_cmp.txt" if ($component_list_file eq ''); # Start Parsing XML, and creating files: my $dom = new XML::DOM::Parser; my ($doc); $doc = $dom->parsefile($dia_file); $objects = get_objects_node($doc,"Bond Graph"); get_component_data($objects); get_bond_data($objects); create_component_list() if ($create_component_list); if ($create_abg) { open (OUT,">$abg_file") || die "Cannot open $abg_file for writing.\n"; # Don't update the label file unless we are creating component list and abg simultaneously... if ($create_component_list) { #system("abg2lbl_fig2txt -c $component_list_file $diagram_name") && system("abg2lbl_fig2txt -x $diagram_name") && die "abg2lbl_fig2txt failed."; } get_label_data(); output_abg(); output_bond_causality(); parse_aliases(); |
︙ | |||
184 185 186 187 188 189 190 | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - - + + - + - - + + | } close(LBL); } sub parse_aliases { my ($name,@line,$alias); |
︙ | |||
264 265 266 267 268 269 270 | 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 | - + - + | return 0; } sub output_abg_header { my ($date); $date = `date`; chomp($date); |
︙ | |||
335 336 337 338 339 340 341 | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | - + - + - + - - + + - - - - - + - + | } $connections = join(" ",@clist); output_component($NM,$type,$cr,$arg,$rep,$stat,$connections); } |
︙ | |||
575 576 577 578 579 580 581 | 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | + - - - - - - - - - - + + + + + + + + + + + | } sub print_debug { print STDERR $_[0] if ($debug); } sub usage { return |