Index: mttroot/mtt/bin/trans/mtt_getsize ================================================================== --- mttroot/mtt/bin/trans/mtt_getsize +++ mttroot/mtt/bin/trans/mtt_getsize @@ -2,18 +2,36 @@ ###################################### ##### Model Transformation Tools ##### ###################################### -# Bourne shell script: p2C +# Bourne shell script: mtt_getsize # Gets array sizes for the def.r file # P.J.Gawthrop Feb 2000 # Copyright (C) 2000 by Peter J. Gawthrop #$Id$ +while [ -n "`echo $1 | grep '^-'`" ]; do + case $1 in + -internal ) + internal=yes; + ;; + *) + echo "$1 is an invalid argument - ignoring"; + exit ;; + esac + shift +done + +if [ -n "$internal" ]; then + grep "MTT$2[^(]" $1_ese.r | wc -l + exit +fi + +## The original version for external sizes. if [ "$2" = "xx" ]; then n=`mtt_getsize $1 x` N=`echo "$n * $n" | bc` else N=`grep "MTTN$2 " <$1_def.r | awk '{print $3}' | sed 's/;//'`