File mttroot/mtt/bin/trans/mtt_getsize artifact b103a18170 part of check-in 33407c7629


#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# 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/;//'`
fi

echo $N


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]