Index: mttroot/mtt/bin/trans/mtt_m2p ================================================================== --- mttroot/mtt/bin/trans/mtt_m2p +++ mttroot/mtt/bin/trans/mtt_m2p @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.64 2001/02/03 14:00:01 gawthrop +## Geraint's temp. variable patch applied +## ## Revision 1.63 2000/12/04 08:24:29 peterg ## Added swithc logic declarations ## ## Revision 1.62 2000/12/03 17:15:18 peterg ## *** empty log message *** @@ -403,10 +406,25 @@ spaces="[ $tab][ $tab]*" non_space="[^ ]*" args='[a-zA-Z0-9,._"]*' # Body +fix_operators () +{ + m_neq="(\!\=)|(\~\=)" + m_not="\!" + m__eq="\=\=" + + p_neq="\<\>" + p_not="NOT\ " + p__eq="\=" + + sed "s/$m_neq/$p_neq/g" |\ + sed "s/$m_not/$p_not/g" |\ + sed "s/$m__eq/$p__eq/g" +} + cat $Sys_rep.m |\ grep -v 'Remove in mtt_m2p' |\ grep -v '^[ ]*function' |\ grep -v '^[ ]*endfunction' |\ grep -v 'MTT_data' |\ @@ -419,10 +437,11 @@ sed "s/$space\[\($non_space\)\]$spaces=$spaces\($mttfun_name\)(\($args\))/\2(\1,\3)/" |\ sed "s/$space\[\($non_space\)\]$spaces=$spaces\($mttfun_name\)/\2(\1)/" |\ sed "s/$space\[\($non_space\)\]$spaces=$spaces\(zeros\)(\($args\))/\2(\1,\3)/" |\ sed "s/$space\($non_space\)$spaces=$spaces\($fun_name\)(\($args\))/\2(\1,\3)/" |\ sed "s/,)/)/" |\ +fix_operators |\ awk ' function printvar(Name,N) { if (N<1) return; width = 10; kk = 0;