Overview
Comment: | Declare dummy variables (mtt_s1 etc) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
bd23fffb08e7d7f07c0c92c11f8823cc |
User & Date: | gawthrop@users.sourceforge.net on 2000-11-09 16:09:46 |
Other Links: | branch diff | manifest | tags |
Context
2000-11-09
| ||
16:23:46 | Redocumented check-in: 09a67e8576 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
16:09:46 | Declare dummy variables (mtt_s1 etc) check-in: bd23fffb08 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
15:29:35 | lower-case declarations check-in: 66de85792d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/mtt_header from [7145292f9f] to [6c55bf9b18].
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.10 2000/11/07 17:20:51 peterg ## useful-functions.hh now included locally ## ## Revision 1.9 2000/11/07 16:56:24 peterg ## Version from Geraint ## ## Revision 1.2 2000/11/03 00:55:42 geraint | > > > | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.11 2000/11/09 15:29:35 peterg ## lower-case declarations ## ## Revision 1.10 2000/11/07 17:20:51 peterg ## useful-functions.hh now included locally ## ## Revision 1.9 2000/11/07 16:56:24 peterg ## Version from Geraint ## ## Revision 1.2 2000/11/03 00:55:42 geraint |
︙ | ︙ | |||
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | modeline="// -*-c++-*- Put Emacs into c++-mode"; Lc='//'; oct_header=yes; constant_declaration="const double " var_declaration="double " minusone="-1" map="_map" ;; *) echo Language $language not supported - sorry; exit 1 esac if [ "$rep" = "simpar" ]; then output=${output}${map} # Output is simpar_map in this case fi function declare_vars(){ # Grab the names names=`awk '{if ($1==var_type) print tolower($4)}' var_type=$1 ${system}_struc.txt` # Comments cat <<EOF | > > > > > > > > > > > > > > > > > > > > > > > > | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | modeline="// -*-c++-*- Put Emacs into c++-mode"; Lc='//'; oct_header=yes; constant_declaration="const double " var_declaration="double " minusone="-1" map="_map" declaredummies=yes ;; *) echo Language $language not supported - sorry; exit 1 esac if [ "$rep" = "simpar" ]; then output=${output}${map} # Output is simpar_map in this case fi function declare_dummies(){ # Get the dummies dummies="mtt_s" rm -f mtt_dummies for dummy in $dummies; do awk '{ if (match($1,dummy)==1) print $1 }' dummy=$dummy < ${fun_name}.m >> mtt_dummies done dummy_list=`sort -u mtt_dummies` # Comments cat <<EOF $Lc Declarations of dummies $Rc EOF for dummy in $dummy_list; do echo ' ' $var_declaration $dummy';' done } # declare_dummies function declare_vars(){ # Grab the names names=`awk '{if ($1==var_type) print tolower($4)}' var_type=$1 ${system}_struc.txt` # Comments cat <<EOF |
︙ | ︙ | |||
288 289 290 291 292 293 294 295 296 297 298 299 300 301 | echo $constant_declaration 'mttu'$i' = mttu('$i$minusone');' done fi if [ "$declareinputs" = "yes" ]; then declare_vars input fi } # Argument specific stuff function get_arg_specific_stuff () { arg_name=${1:-""} | > > > > | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | echo $constant_declaration 'mttu'$i' = mttu('$i$minusone');' done fi if [ "$declareinputs" = "yes" ]; then declare_vars input fi if [ "$declaredummies" = "yes" ]; then declare_dummies fi } # Argument specific stuff function get_arg_specific_stuff () { arg_name=${1:-""} |
︙ | ︙ |