11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
+
+
+
|
# Copyright (c) P.J.Gawthrop 1998
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.60 2000/11/10 09:38:30 peterg
## Got rid of sys_name functions with no ()
##
## Revision 1.59 2000/11/10 09:29:31 peterg
## Changed the name regexp to be at least 3 characters long
## - avoids problem translating som state files - but needs more work
##
## Revision 1.58 2000/10/17 09:54:29 peterg
## replaced switchopen by logic
##
|
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
-
+
|
echo "PROCEDURE $Sys_rep(VAR mttu : InputVector;"
echo " mttx : StateVector;"
echo " mtty : OutputVector;"
echo " mttt : REAL;"
echo " mttpar : ParameterVector);"
;;
logic)
echo "PROCEDURE $Sys_rep(VAR open : StateVector;"
echo "PROCEDURE $Sys_rep(VAR mttopen : StateVector;"
echo " mttx : StateVector;"
echo " mttu : InputVector;"
echo " mttt : REAL;"
echo " mttpar : ParameterVector);"
;;
ode)
echo "PROCEDURE $Sys_rep(VAR mttdx: StateVector;"
|
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
+
|
printf("\n")
}' |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($fun_name\)(\($args\))/\2(\1,\3)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($mttfun_name\)(\($args\))/\2(\1,\3)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\($mttfun_name\)/\2(\1)/" |\
sed "s/$space\[\($non_space\)\]$spaces=$spaces\(zeros\)(\($args\))/\2(\1,\3)/" |\
sed "s/$space\($non_space\)$spaces=$spaces\($fun_name\)(\($args\))/\2(\1,\3)/" |\
sed "s/,)/)/" |\
awk '
function printvar(Name,N) {
if (N<1) return;
width = 10;
kk = 0;
for (k=1;k<=N;k++) {
printf("mtt%s%i", Name, k);
|