Index: mttroot/mtt/bin/trans/rbg2abg_m ================================================================== --- mttroot/mtt/bin/trans/rbg2abg_m +++ mttroot/mtt/bin/trans/rbg2abg_m @@ -9,10 +9,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.16 2000/12/05 09:04:08 peterg +## Fixed function () compatibility problem. +## ## Revision 1.15 2000/11/03 14:53:33 peterg ## Copy NOTPAR as well ## ## Revision 1.14 2000/09/14 08:41:35 peterg ## Strip off the additional direction info from rbonds @@ -150,11 +153,11 @@ %Write the function m-file for the causal bond graph write_abg(name,bonds,components,n_vector_bonds); EOF ## Sets the units for the abg file -function test_units +test_units() { grep '^[\s]*[#|%]UNITS' < ${lbl_file} >/dev/null if [ $? = "0" ]; then grep '^[\s]*[#|%]UNITS' < ${lbl_file} |\ awk '{ @@ -169,11 +172,11 @@ else echo " no domains or units declared" fi } -function check_ports_exist +check_ports_exist() { declared_ports=`grep '^[\s]*[#|%]UNITS' < ${lbl_file} | awk '{print $2}'` for declared_port in $declared_ports; do grep "${sys}\.ports\.${declared_port}\.type" ${abg_file} >/dev/null if [ $? = "1" ]; then @@ -181,11 +184,11 @@ exit 1 fi done } -function set_units +set_units() { grep '^[\s]*[#|%]UNITS' < ${lbl_file} |\ awk '{ printf(" %s.ports.%s.domain = \"%s\";\n", sys, $2, $3); printf(" %s.ports.%s.units.effort = \"%s\";\n", sys, $2, $4);