12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
+
+
+
|
###############################################################
## Version control history
###############################################################
## $Id$
##
## $Log$
## Revision 1.27 2000/12/05 12:09:56 peterg
## Changed function name to name()
##
## Revision 1.26 2000/12/05 09:04:54 peterg
## *** empty log message ***
##
## Revision 1.25 2000/12/01 14:51:26 peterg
## Major changes towards partioning
##
## - generates sub ese, def and struc
|
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
|
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
touch mtt_aliased.txt
echo Creating $1_aliased.txt
mv mtt_aliased.txt $1_aliased.txt
# Sort the struc file
mv $structurefile junk
sort -k 1,1 -k 2,2n junk >$structurefile
# Relabel states with multiple ports
mv $structurefile junk
awk '
BEGIN{
state_index=1;
oldname="";
}
{
name=$4;
newname=name;
if ($1=="state") {
if (name==oldname)
newname = sprintf("%s_%i",name, ++state_index);
else
state_index=1;
}
$4 = newname
for (i=1;i<NF;i++) printf("%s\t",$i);
printf("%s\n", $NF)
oldname = name;
'} < junk > $structurefile
# Now invoke the standard error handling.
mtt_error mtt_error.txt
|