File mttroot/mtt/bin/trans/simpar_txt2h artifact a1e5b7a064 part of check-in 33407c7629


#! /bin/sh

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

# Bourne shell script: simpar_txt2h

# Numerical parameters to c format
# P.J.Gawthrop May 1997
# Copyright (c) P.J.Gawthrop, 1997.

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


system=$1


# Inform user
echo "Creating $1_simpar.h"

rm -f mtt_error

#Write some file headers
echo '/*' > $1_simpar.h
echo "Simulation parameter file for system $1 ($1_simpar.h)"   >> $1_simpar.h
echo "This file provides the system simulation parameters in c form"  >> $1_simpar.h
echo "Generated by MTT at `date`"  >> $1_simpar.h
echo "from $1_simpar.txt"  >> $1_simpar.h
echo '*/' >> $1_simpar.h
echo  >> $1_simpar.h

# Now do the parameters

sed 's/ //g' $1_simpar.txt |\
 awk -F '=' '/=/ {print "#define", $1, $2}'   >> $1_simpar.h








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