Index: mttroot/mtt/bin/trans/sympar_txt2r ================================================================== --- mttroot/mtt/bin/trans/sympar_txt2r +++ mttroot/mtt/bin/trans/sympar_txt2r @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +# Revision 1.3 1997/03/19 16:39:12 peterg +# Put in the correct date. +# # Revision 1.2 1997/03/18 17:56:35 peterg # Cosmetic changes. # ############################################################### @@ -31,12 +34,15 @@ echo "%% Generated by MTT at `date`" >> $1_sympar.r echo >> $1_sympar.r #Count the lines in the file lines=`grep -c '.' $1_sympar.txt` -echo "MATRIX MTTVAR($lines,1);" >> $1_sympar.r -echo "MTTNVAR = $lines;" >> $1_sympar.r + +if [ -z "$lines" ]; then + echo "MATRIX MTTVAR($lines,1);" >> $1_sympar.r +fi +echo "MTTNVAR := $lines;" >> $1_sympar.r echo >> $1_sympar.r #Write out the variables in reduce format. awk '{i++; print "MTTVAR(" i ",1) := " $1 ";"}' $1_sympar.txt >> $1_sympar.r