Overview
Comment:Fixed a bash-sim: replaced let with $(( ))
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 9b647af872aa3e6ca1d05ffb106281f5849f42f1acc1ab50860351223884e7ab
User & Date: geraint@users.sourceforge.net on 2005-02-17 18:54:23
Other Links: branch diff | manifest | tags
Context
2005-02-17
22:15:35
Added missing quotes to conditional expression. check-in: afaf42444a user: geraint@users.sourceforge.net tags: origin/master, trunk
18:54:23
Fixed a bash-sim: replaced let with $(( )) check-in: 9b647af872 user: geraint@users.sourceforge.net tags: origin/master, trunk
18:36:38
Removed a bash-ism: replaced [[ conditional ]] with [ conditional ] check-in: 250ff46156 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_header from [3ad8306a05] to [2b6f388347].

8
9
10
11
12
13
14



15
16
17
18
19
20
21
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.65  2004/08/29 13:14:29  geraint
## Added rule to make header for sae (sorted algebraic equations).
##
## Revision 1.64  2004/08/29 01:48:46  geraint
## Added rules to create headers for sorted systems: sesx and sesy.
##
## Revision 1.63  2004/08/28 22:08:41  geraint
## Fixed zeromatrices statements: spaces instead of commas
##
## Revision 1.62  2004/07/19 22:22:25  geraint
600
601
602
603
604
605
606
607

608
609
610
611
612
613
614
603
604
605
606
607
608
609

610
611
612
613
614
615
616
617







-
+







    Nxx=`mtt_getsize $system xx` # States x States
    Nu=`mtt_getsize $system u` # Inputs 
    Ny=`mtt_getsize $system y` # Outputs 
    Nyz=`mtt_getsize $system yz` # Zero outputs

    case ${rep} in
	dm)
	let Nx=Nx+2*Nz+Nyz # Matrices not usual size
	Nx=$(( $Nx + 2 * $Nz + $Nyz )) # Matrices not usual size
	;;
	*)
	
    esac
    Npar=`wc -l $system\_sympar.txt | gawk '{print $1}'`
    }

Modified mttroot/mtt/bin/trans/mtt_update from [12b2c25398] to [444ef9d57a].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25







+
+
+







# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.22  2003/08/19 13:08:44  gawthrop
## Ingnore if/endif
##
## Revision 1.21  2003/08/14 10:33:46  gawthrop
## Ignore if and endif
##
## Revision 1.20  2003/08/13 15:49:39  gawthrop
## Don't sort the states when defaulting - leave in implied order
##
## Revision 1.19  2003/08/05 15:29:36  gawthrop
185
186
187
188
189
190
191
192

193
194
195
196
197
198
199
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202







-
+







     if [ "${rep}" = "state" ]; then
	 info=`cut -f1 $infofile` # No sort
     else
	 info=`cut -f1 $infofile | sort` # Sort
     fi
   i=0;
   for new in $info; do
     let i=$i+1;
     i=$(( $i + 1 ));
     initial_value $i ${default}
     echo $new $value  |\
     gawk '{printf("%s\t= %s; # Default\n",$1,$2)}' >> $textfile
   done
   exit    
 fi

Modified mttroot/mtt/bin/trans/sub_sh2tex from [dc7875384c] to [664edf4220].

10
11
12
13
14
15
16



17
18
19
20
21
22
23
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26







+
+
+







# Copyright (c) P.J.Gawthrop, 1997.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  2004/08/26 16:15:40  geraint
## Counts abg.m instead of fig files so that dia models are also included.
##
## Revision 1.5  2004/02/10 16:11:01  gawthrop
## Removed debug
##
## Revision 1.4  2004/02/10 10:22:10  gawthrop
## Do proper arithmetic via let
## Three levels of output
## enumerate, not itemize
80
81
82
83
84
85
86
87

88
89

90
91
92
93
94
95
96
83
84
85
86
87
88
89

90
91

92
93
94
95
96
97
98
99







-
+

-
+









system=$1
filename=$2 


if [ -z "$3" ]; then
    let level=0;
    level=0;
else
    let level=$4;
    level=$4;
fi
echo "level: $level"
#Top-level commands
if [ -z "$2" ]; then
  filename="$1_sub.tex"

  # Inform user
133
134
135
136
137
138
139
140

141
142
143
144
145
146
147
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







    n_subsystems=`grep -c '$1' $1_sub.sh`

    if [ "$n_subsystems" != "0" ]; then
	cat <<EOF >> $filename
	    \begin{$listtype}
EOF
	# Recursively generate the subsystems
        let level1="$level+1"
        level1=$(( $level + 1 ))
	sh $system\_sub.sh "sub_sh2tex $arg " " $filename $system $level1" 
	cat <<EOF >> $filename
	    \end{$listtype}
EOF
#else
#    cat  <<EOF >> $filename
#         No subsystems.


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