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 @@ -11,10 +11,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.24 1998/04/03 14:02:50 peterg +## Added 0 and 1 to list of possible ports +## ## Revision 1.23 1998/02/01 18:37:41 peterg ## Don't print irritating warnings about ports listed in lbl files. ## # Revision 1.22 1997/08/09 14:42:39 peterg # Added underscore to port regexp @@ -213,10 +216,11 @@ if (match(str, delimiter)) { split(str,a,delimiter); isa_port_component = (match(a[1], port_component_regexp))&& (match(a[2], port_regexp)>0) } + # It must also be specified at depth 0 isa_port_component = isa_port_component && (depth==0); # A component is a plain or a port component isa_component = isa_plain_component||isa_port_component; @@ -233,16 +237,18 @@ } # Do the port components if (isa_port_component) { i_port_component++; - # Port number is the bit between the [] + type = a[1]; + # Port name is the bit between the [] port_label = substr(a[2],2,length(a[2])-2); x_port[i_port_component] = x_coord; y_port[i_port_component] = y_coord; info_port[i_port_component] = fig_info(); port_labels[i_port_component] = port_label; + comp_type[port_label] = type; } # Do the plain components if (isa_plain_component) { i_text++; @@ -564,12 +570,13 @@ j = 0; # Do the port components, in order of appearance, first for (i = 1; i <= i_port_component; i++) { - port_type = "SS"; name = sprintf("[%s]", port_labels[i]); + port_type = comp_type[port_labels[i]]; +print i, port_labels[i], name, port_type cr = "MTT_port"; arg = i; if (length(x_port[i])==0) printf(warning_p);