Index: mttroot/mtt/bin/trans/mtt_r2m ================================================================== --- mttroot/mtt/bin/trans/mtt_r2m +++ mttroot/mtt/bin/trans/mtt_r2m @@ -16,10 +16,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.25 2000/10/14 08:50:07 peterg +## Use new mtt_header +## ## Revision 1.24 2000/10/11 09:07:53 peterg ## Vectorisation ## csex rep. ## ## Revision 1.23 2000/10/10 21:00:43 peterg @@ -137,27 +140,32 @@ mtt_header $1 $rep $ext > mtt_junk #Convert from the (optimised) r file echo >> mtt_junk echo '## Code' >> mtt_junk -grep 'mtt' $1_$2.r |\ +strip_comments<$1_$2.r | tr [A-Z] [a-z] |\ +grep -vi 'MATRIX ' |\ +grep -vi 'END;' |\ +grep -v '^off' |\ +grep -v '^in' |\ sed \ -e "s/^mtt/ mtt/" \ -e "s/:=/=/" \ -e "s/\\$/;/" \ >> mtt_junk - - +echo '## END Code' >> mtt_junk echo endfunction >> mtt_junk +# Mend broken lines +mtt_mend_lines < mtt_junk > mtt_junk_mended # Vectorise (n,1) arrays when appropriate if [ -n "$vectorise" ]; then - mtt_vectorise $out + mtt_vectorise $out else - mv mtt_junk $out + mv mtt_junk_mended $out fi # Now invoke the standard error handling. #mtt_error_r mtt_r2m.log