Index: mttroot/mtt/bin/trans/awk/rbg_fig2m.awk ================================================================== --- mttroot/mtt/bin/trans/awk/rbg_fig2m.awk +++ mttroot/mtt/bin/trans/awk/rbg_fig2m.awk @@ -10,10 +10,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.43 2002/05/22 10:33:18 gawthrop +## Nameless components are now named according to type - replaces old +## mtt1 etc style. +## ## Revision 1.42 2002/03/26 12:05:27 geraint ## Escaped characters to eliminate awk warnings. ## ## Revision 1.41 2001/06/13 10:41:06 gawthrop ## Further changes towards aouto creation of lbl files. @@ -270,18 +274,19 @@ $1, $2, $3, $4, $5, $6, $7, \ $8, $9, $10, $11)) } function type_name(type) { - if (type==1) - return "one" - else { - if (type==0) - return "zero" - else - return type - } +# if (type==1) +# return "one" +# else { +# if (type==0) +# return "zero" +# else +# return type +# } + return sprintf("mtt%s", type); } function process_text() { # The text string is field 14 onwards str = $14; @@ -430,11 +435,11 @@ name_index[type] = 1; if (name_index[type]==1) name = sprintf("%s", type_name(type)) else - name = sprintf("%s%i", type_name(type), name_index[type]); + name = sprintf("%s_%i", type_name(type), name_index[type]); i_label++; label[i_label,1] = name; label[i_label,2] = default_cr; label[i_label,3] = default_args