Overview
Comment:Included PAR and UNITS declarations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: b1b80ff2c00670bddf640b422bfc81219f3e0b369e65cf1bf2a88bd1b11a097a
User & Date: gawthrop@users.sourceforge.net on 2000-11-16 13:11:06
Other Links: branch diff | manifest | tags
Context
2000-11-16
13:51:15
Added units stuff check-in: e878a0994c user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:11:06
Included PAR and UNITS declarations check-in: b1b80ff2c0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
12:54:14
Added checking of unit consistency at ports check-in: 288900023b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/lbl_txt2tex from [86e277e3c2] to [b15ec7c7b3].

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 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.8  1999/02/17 21:42:19  peterg
## Replaced print by printf to avoid extra nl in paragraph command.
##
## Revision 1.7  1998/07/27 12:56:26  peterg
## Splits up | separated expressions.
##
## Revision 1.6  1998/07/27 10:56:31  peterg
## Cosmetics.
##
## Revision 1.5  1998/07/27 08:29:44  peterg
77
78
79
80
81
82
83
84
















85
86
87
88
89



















90
91
92
93
94
95
96
97
98
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135







-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+





+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+









        }
        printf("\\textbf{%s}",$3)
        if (match($4,"[\#\%]")==1) printf(" -- ");
        for (j=5;j<=NF;j++) printf(" %s", $j)
        printf("\n");
        }
      }
    END{if (NR==0) print "\\item This component has no aliases"
    END{if (NR==0) print "\\item This component has no ALIAS declarations"
}'  | sort >> $1_lbl.tex
cat <<EOF >> $1_lbl.tex
\end{description}
EOF

#Write out the VARS
cat <<EOF >> $1_lbl.tex
\paragraph{Variable declarations:}
\begin{description}
EOF
    grep '[%|#][V|P]AR' $1_lbl.txt | sed 's/_/\\_/g' |\
    awk '{
        printf("\\item %s\n",$2)
      }
    END{if (NR==0) print "\\item This component has no PAR declarations"
}'  | sort >> $1_lbl.tex
cat <<EOF >> $1_lbl.tex
\end{description}
EOF


#Write out the UNITS
cat <<EOF >> $1_lbl.tex
\paragraph{Units declarations:}
\begin{description}
EOF
    grep '[%|#]UNITS' $1_lbl.txt | sed 's/_/\\_/g' |\
    awk '{
        printf("\\item [Port %s] has domain %s\n",$2, $3)
	printf("\\begin{description}\n")
        printf("\\item [Effort units] %s\n",$4)
        printf("\\item [Flow units] %s\n",$5)
	printf("\\end{description}\n")
      }
    END{if (NR==0) print "\\item This component has no UNITs declarations"
}' >> $1_lbl.tex
cat <<EOF >> $1_lbl.tex
\end{description}
EOF










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