Index: mttroot/mtt/bin/trans/awk/lbl2cr.awk ================================================================== --- mttroot/mtt/bin/trans/awk/lbl2cr.awk +++ mttroot/mtt/bin/trans/awk/lbl2cr.awk @@ -10,10 +10,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.8 1998/03/06 09:15:28 peterg +## Ignores SS fields (assumes that if first field is a symbol then other +## field is and SS-style field. +## ## Revision 1.7 1997/04/22 12:50:15 peterg ## New much simpler version -- does not check for multiple crs -- these ## are removed later anyway. ## # Revision 1.6 1997/03/22 15:15:44 peterg @@ -51,11 +55,11 @@ } BEGIN { comment = "%"; -arg_delimiter = ","; +cr_delimiter = ";"; not_a_cr = "effort flow state internal external zero none"; is_a_SS = "internal external zero"; numeric = "[0-9]"; symbolic = "\044"; # Ascii $ symbol_count = 0; @@ -63,13 +67,16 @@ print "lin" } { if ( (match($1,comment)==0) && (NF>=3) ) { - cr = $2 - first_char = substr(cr,1,1); - if ( (matches(not_a_cr,cr)==0) && + crs = $2 + n_crs = split(crs,cr,cr_delimiter); + for (i = 1; i <= n_crs; i++) { + first_char = substr(cr[i],1,1); + if ( (matches(not_a_cr,cr[i])==0) && (match(numeric,first_char)==0) && (matches(is_a_SS,$3)==0)) - print cr; + print cr[i]; + } } }