Overview
Comment:Handles unnamed components & ingnores artwork
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: acd7c3e50e36d198f5a643ac9b01fd1a59bdb9d3d25ed99c76c687ccad6d4fa8
User & Date: gawthrop@users.sourceforge.net on 2002-04-22 10:25:47
Other Links: branch diff | manifest | tags
Context
2002-04-23
09:51:54
Changed incorrect statement about searching for components. check-in: aba4b01506 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-04-22
10:25:47
Handles unnamed components & ingnores artwork check-in: acd7c3e50e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:28:46
Changed regexp again. Fixes problem with name starting at beginning of line check-in: 56cfeb8f63 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/abg2sub_fig2sh from [9598bba015] to [a2d914eff3].

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
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
76
77
78
79
80







+
+
+










-
+

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








-





-
-
+
+

-
+

+







  ######################################
  
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id$
  ## $Log$
  ## Revision 1.3  2001/10/15 14:27:34  gawthrop
  ## Now handles [1:N] style port labels
  ##
  ## Revision 1.2  2001/07/23 23:26:23  gawthrop
  ## Removed some boring user feedback
  ##
  ## Revision 1.1  2001/06/11 19:47:49  gawthrop
  ## Makes the sub.sh file directly from the abg.fig file
  ## Used for making lbl files (abg2lbl_fig2txt)
  ##
  ##
  ###############################################################

# Copyright (C) 1996--2001 by Peter J. Gawthrop
# Copyright (C) 1996--2002 by Peter J. Gawthrop



get_valid_components()

{
awk '
function modulo10(x) {
  return x-int(x/10)*10
    }
BEGIN{
  polyline = 2;
  text = 4;
  compound_object = 6;

}
{
object = $1;
zero_depth =  (modulo10($4)==0)&&(object==text);
if (zero_depth) print $0

}' < $1_abg.fig

}
#if [ -f "$1_sub.sh" ]; then
#    echo Using "$1_sub.sh"
#    exit
#else
    #Inform user
    echo Creating $1_sub.sh    
#fi


echo '# Commands to generate subsystem representations'>  $1_sub.sh
echo "# File $1_sub.sh"			>> $1_sub.sh
echo "# Generated by MTT on `date`."	>> $1_sub.sh
echo					>> $1_sub.sh

# Get a list of all components for the _abg file
cat $1_abg.fig |\
# Get a list of all components from the _abg file
get_valid_components $1 |\
grep -v '\[[0-9]*:[0-9]*\]' |\
grep ':' |\
grep -v '\[.*\]' |\
awk '{if ($1==4) split($14,a,":"); print a[1]}'  |\
sed 's/\\001//' |\
sort -u > mtt_tmp1

# Remove all components starting with 0 or 1
grep -v '^[01]' < mtt_tmp1 > mtt_tmp4

# Get a list of all standard simple components
ls $MTT_LIB/comp/simple |\


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