Artifact 4208fabefb45df95e67431c446c77bfbfe1ab99008440e3e0182364b47648aa0:


#! /bin/sh

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

# Bourne shell script: sympar2params_txt2c

# Symbolic parameters to default paramers (c)
# P.J.Gawthrop March 1997
# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################



# Inform user
echo "Creating $1_params.c"

rm -f mtt_error

#Write some file headers
echo '/*' > $1_params.c
echo "Parameter file for system $1 ($1_params.c)"   >> $1_params.c
echo "This file provides the system params for simulation:"  >> $1_params.c
echo "Generated by MTT at `date`"  >> $1_params.c
echo "These default parameters should be changed by the user"  >> $1_params.c
echo '*/' >> $1_params.c
echo  >> $1_params.c


cat $MTTPATH/trans/rcs_header.c >> $1_params.c
echo  >> $1_params.c


echo "#include \"$1_sympar.c\""  >> $1_params.c
echo "$1_params()" >> $1_params.c
echo '{' >> $1_params.c

#Write out the variables in c format.
awk '{i++; print $1 " = \t1.0;"}' $1_sympar.txt  >> $1_params.c
echo '}' >> $1_params.c

# Now invoke the standard error handling.
# mtt_error mtt_error.txt




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