Overview
| Comment: | Now ignores SS lines. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
6b4b9e949ac4fac962029a59e5d19772 |
| User & Date: | gawthrop@users.sourceforge.net on 1996-11-02 10:22:22.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1996-11-02
| ||
| 10:22:54 | Now browses crs. check-in: acead5e810 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 10:22:22 | Now ignores SS lines. check-in: 6b4b9e949a user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 10:20:53 | Created from lbl2sympar check-in: f99cbfde86 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/awk/lbl2cr.awk
from [4ac4dee5d4]
to [7eeeb5d468].
1 2 3 4 | ###################################### ##### Model Transformation Tools ##### ###################################### | | < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
######################################
##### Model Transformation Tools #####
######################################
# gawk script: lbl2cr.awk
# Label file to symbolic parameters conversion
# P.J.Gawthrop August 1996
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
###############################################################
function exact_match(name1, name2) {
return ((match(name1,name2)>0)&&(length(name1)==length(name2)))
}
function matches(names, name) {
|
| ︙ | ︙ | |||
44 45 46 47 48 49 50 |
return matched;
}
BEGIN {
comment = "%";
arg_delimiter = ",";
| | | < < | | > | | | | | < < | < < > > > > | | | | | > > > > | 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 |
return matched;
}
BEGIN {
comment = "%";
arg_delimiter = ",";
not_a_cr = "effort flow state internal external zero";
numeric = "[0-9]";
symbol_count = 0;
symbols = "";
}
{
if ( (match($1,comment)==0) && (NF>=3) ) {
cr = $2;
first_char = substr(cr,1,1);
if ( (matches(not_a_cr,cr )==0) \
&& (match(not_a_cr,$3)==0) \
&& (match(first_char,numeric)==0) \
&& (length(cr )>0) \
&& (matches(symbols,cr ) ==0) ) {
symbol_count++;
symbols = sprintf("%s %s", symbols, cr );
}
}
}
END {
# create the _cr file
if (symbol_count>0) {
split(symbols,symbol);
printf("cat ");
for (i = 1; i <= symbol_count; i++) {
printf("$MTTPATH/cr/r/%s.cr ", symbol[i]);
}
}
}
|