Overview
| Comment: | Checks levels in fig file to extract genuine components Puts comments at top of cmp.txt file |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
af8910cc216742853beb429375eb74b8 |
| User & Date: | gawthrop@users.sourceforge.net on 2002-12-06 11:47:49.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2002-12-06
| ||
| 12:26:34 | Strips comments from cmp.txt file check-in: 67ccdc3757 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 11:47:49 |
Checks levels in fig file to extract genuine components Puts comments at top of cmp.txt file check-in: af8910cc21 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 11:45:57 | Strips comments from _cmp.txt before processing check-in: fc25717e96 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/abg2cmp_fig2txt
from [cb66a7f672]
to [c2cc49d035].
| ︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
##### Model Transformation Tools #####
######################################
###############################################################
## Version control history
###############################################################
## $Log$
##
###############################################################
system=$1
infile=${system}_abg.fig
outfile=${system}_cmp.txt
echo Creating ${outfile}
| > > > > > > > > > > > > | | > | > > > > > > > > | > > > > > > > > | | | > > > | > > > | > > > > > > > > | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 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 |
##### Model Transformation Tools #####
######################################
###############################################################
## Version control history
###############################################################
## $Log$
## Revision 1.1 2002/12/01 14:54:39 gawthrop
## Replaces defunct abg2lbl_fig2txt
##
##
###############################################################
system=$1
infile=${system}_abg.fig
outfile=${system}_cmp.txt
date=`date`
echo Creating ${outfile}
header() {
cat <<EOF
## List of components contained in system ${system}
## File ${outfile}
## Created by mtt on ${date}
EOF
}
get_valid_components()
{
gawk '
function modulo10(x) {
return x-int(x/10)*10
}
BEGIN{
polyline = 2;
text = 4;
compound_object = 6;
length_terminator=4;
}
{
object = $1;
zero_depth = (modulo10($4)==0)&&(object==text);
if (zero_depth) {
print substr($NF,1,length($NF)-length_terminator)
}
}'
}
remove_port_labels() {
grep -v '^\[.*\]$'
}
remove_junctions() {
grep -v '^[01]$'
}
## Create header
header > ${outfile}
## Make list of components
get_valid_components < ${infile} |\
remove_port_labels |\
remove_junctions |\
sort -u >> ${outfile}
|