Overview
Comment:Do proper arithmetic via let
Three levels of output
enumerate, not itemize
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: ece62a894469d4a20000ab99d3218359e597011183433eb58f906c62497f2324
User & Date: gawthrop@users.sourceforge.net on 2004-02-10 10:22:10
Other Links: branch diff | manifest | tags
Context
2004-02-10
11:42:05
Defined pi to be 3.1416 if M_PI is not defined. check-in: 858295a4d4 user: geraint@users.sourceforge.net tags: origin/master, trunk
10:22:10
Do proper arithmetic via let
Three levels of output
enumerate, not itemize
check-in: ece62a8944 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:13:05
Handles #SUMMARY correctely
Refined count of subsystems within fig file (avoilds ports with same
name as system
check-in: 93b98c41cf user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/sub_sh2tex from [6934f464e2] to [6327bedd40].

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
27
28







+
+
+
+
+







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  2004/02/10 10:13:05  gawthrop
## Handles #SUMMARY correctely
## Refined count of subsystems within fig file (avoilds ports with same
## name as system
##
## Revision 1.2  2004/02/10 09:51:07  gawthrop
## Updated obsolete path name.
##
## Revision 1.1  2000/12/27 16:04:08  peterg
## Initial revision
##
## Revision 1.7  1998/02/04 10:59:37  peterg
43
44
45
46
47
48
49
50

51
52
53
54



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

75
76

77
78

79
80
81
82
83
84
85
48
49
50
51
52
53
54

55
56



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

79
80

81
82

83
84
85
86
87
88
89
90







-
+

-
-
-
+
+
+



















-
+

-
+

-
+







# Initial revision
#
###############################################################


#Useful strings
quote="'";
listtype="itemize"
listtype="enumerate"

# Maximum list depth - maybe I should learn sh arithmetic!!
# Just go to two levels
maxlevel='0+1+1'; 
# Maximum list depth 
# Just go to 3 levels
maxlevel=3; 

#Look for a command line argument
labels=''; arg='';
while [ -n "`echo $1 | grep '-'`" ]; do
  case $1 in
	-l )
		labels='yes'; arg='-l' ;;
	*)
		echo "$1 is an invalid argument - ignoring" ;;
  esac
  shift
done


system=$1
filename=$2 


if [ -z "$3" ]; then
    level=0;
    let level=0;
else
    level=$4;
    let level=$4;
fi

echo "level: $level"
#Top-level commands
if [ -z "$2" ]; then
  filename="$1_sub.tex"

  # Inform user
  echo "Creating $filename"

120
121
122
123
124
125
126
127

128
129
130
131
132
133
134
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139







-
+







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

    if [ "$n_subsystems" != "0" ]; then
	cat <<EOF >> $filename
	    \begin{$listtype}
EOF
	# Recursively generate the subsystems
        level1="$level+1"
        let 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 ]