Index: mttroot/mtt/bin/trans/mtt_header ================================================================== --- mttroot/mtt/bin/trans/mtt_header +++ mttroot/mtt/bin/trans/mtt_header @@ -10,10 +10,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.20 2000/12/04 08:19:27 peterg +## Added switch declarations - in logic.cc +## ## Revision 1.19 2000/12/03 16:11:43 peterg ## Corrected bug in logic declatations ## ## Revision 1.18 2000/12/03 16:06:22 peterg ## Fixed bug in generating dummies @@ -273,11 +276,12 @@ if [ "$rep" = "simpar" ]; then output=${output}${map} # Output is simpar_map in this case fi -function zero_matrices(){ +function zero_matrices +{ ## Set matrices to zero echo ## echo '## Set matrices to zero' for name in $zeromatrices; do case $name in @@ -301,11 +305,12 @@ esac echo " mtt$name = zeros($N,$M);" done } -function declare_dummies(){ +function declare_dummies +{ # Get the dummies dummies="mtt_tmp" rm -f mtt_dummies for dummy in $dummies; do grep "${dummy}[0-9]* " < ${fun_name}.m |\ @@ -326,19 +331,22 @@ for dummy in $dummy_list; do echo ' ' $var_declaration $dummy';' done } # declare_dummies -function declare_switches { +function declare_switches +{ cat < #include @@ -536,11 +545,11 @@ EOF } -function map_DLD_inputs () +function map_DLD_inputs { s=${1:-""} # comma separated input list if [ -z ${s} ];then return; fi c=$(get_field ${s} 0) # count of inputs i=0 @@ -561,11 +570,11 @@ done printf "\n" } -function declare_DLD_outputs () +function declare_DLD_outputs { s=${1:-""} # comma separated output list c=$(get_field ${s} 0) # count of outputs i=0 while [ ${i} -lt ${c} ]; do @@ -575,11 +584,11 @@ printf " ${arg_type}\t${w}\t${arg_size};\n" done } -function return_DLD_outputs () +function return_DLD_outputs { s=${1:-""} # comma separated output list c=$(get_field ${s} 0) # count of outputs i=0 cat <