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.16 1998/08/19 08:46:00 peterg +## Now translates ; % to # +## ## Revision 1.15 1998/08/15 13:46:01 peterg ## Included new sparse update routines ## ## Revision 1.14 1998/08/12 15:21:12 peterg ## Added type definition for the SVD procedures @@ -163,16 +166,17 @@ #Regexps name="[a-zA-Z0-9_]*" fun_name="$Sys\_$name" mttfun_name=$name - space="[ \t]*" - spaces="[ \t][ \t]*" + tab=' ' + space="[ $tab]*" + spaces="[ $tab][ $tab]*" non_space="[^ ]*" # Body -grep -v '^[ ]*function' < $Sys_rep.m | sed "s/^$space%/#/" | sed "s/;$space%/#/" |\ +grep -v '^[ ]*function' < $Sys_rep.m | sed "s/^$space%/#/" | sed "s/\(;$space\)%/\1#/" |\ awk -F# '{printf("%s",$1) if (NF>1) printf("{* %s *}", $2) printf("\n") }' |\ sed "s/$space\[\($non_space\)\]$spaces=$spaces\($fun_name\)(\([a-zA-Z0-9,]*\))/\2(\1,\3)/" |\