Overview
Comment:Fixed bug with printing a blank line.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 2466289e97ea07a28fc19316249cd29ab86fe37352c5662ac341b2ac3a35efb0
User & Date: gawthrop@users.sourceforge.net on 2000-10-16 09:41:29
Other Links: branch diff | manifest | tags
Context
2000-10-17
08:36:56
Included logic rep. check-in: ba787ed7b5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2000-10-16
09:41:29
Fixed bug with printing a blank line. check-in: 2466289e97 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:15:41
Now uses new mtt_strip_cr in common with mtt_make_sympar check-in: fee4e44094 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_make_sympar from [c113383267] to [6c0fdb6743].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25







+
+
+







# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  2000/10/16 09:10:08  peterg
## Now strips out "unwanted" bits frome the _aliased.txt file
##
## Revision 1.1  2000/10/12 19:24:28  peterg
## Initial revision
##
##
###############################################################


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






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







-
+








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
















+
+
+
+
+
+
sh | sort -u > mtt_all_sympar.txt

# Sort the aliased list
mtt_strip_args < $1_aliased.txt | sort -u  > mtt_aliased_sort.txt

# Compare it with the aliased list and show the differences
diff mtt_all_sympar.txt mtt_aliased_sort.txt |\
grep '<' | awk '{printf("%s\t%s\n", $2,$3)}' > mtt_sympar.txt
awk '{if ($1=="<") printf("%s\t%s\n", $2,$3)}' > mtt_sympar.txt

# Assume same name in different system is the same
awk '{
    if ($1==name){
	sysname[i++]=$2
    }
    
    if ($1!=name){
        if (length(name)>0){
        printf("%s\t",name)
        comma="";
        for (j=1;j<=i;j++){
          printf("%s%s", comma, sysname[j]);
          comma=",";
        }
        printf("\n")
          printf("%s\t",name)
          comma="";
          for (j=1;j<=i;j++){
            printf("%s%s", comma, sysname[j]);
            comma=",";
          }
          printf("\n")
        }
        i=1;
        sysname[1]=$2;
    }
    name = $1
}
END{
        printf("%s\t",name)
        comma="";
        for (j=1;j<=i;j++){
          printf("%s%s", comma, sysname[j]);
          comma=",";
        }
        printf("\n")

}' < mtt_sympar.txt >$filename








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