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,15 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.37 2000/09/14 08:43:32 peterg +## Add additional directional informatiuon to rbonds: +## cols 7-8 Arrow end directional bond +## cols 9-10 Arrow end directional bond +## ## Revision 1.36 1999/11/19 04:00:26 peterg ## Changed a comment to be more accurate. ## ## Revision 1.35 1999/07/25 22:19:45 peterg ## Fixed bug with false objects when compound objects present. @@ -477,22 +482,26 @@ } else { field_1 = $1 } - printf field_1 >> fig_file + printf("%s",field_1) >> fig_file for (i=2; i<=NF; i++) printf(" %s", $i) >> fig_file; + if (NF==1) + printf(" ") >> fig_file; # Put space after header fields printf("\n") >> fig_file } # Header if ( NF<3 ) { printf("%s", $1) >> head_file; for (i=2; i<=NF; i++) printf(" %s", $i) >> head_file; - printf("\n") >> head_file + if (NF==1) + printf(" ") >> head_file; # Put space after header fields + printf("\n") >> head_file } # Bonds if (isa_bond) { #Replace the data_symbol @@ -509,13 +518,20 @@ printf("\n") >> bnd_file } # Components & ports if ( isa_component||isa_port ) { - for (i=1; i<=NF; i++) - printf(" %s", $i) >> cmp_file; - printf("\n") >> cmp_file + for (i=1; i<=NF; i++) + printf(" %s", $i) >> cmp_file; + printf("\n") >> cmp_file + } + +# Ports + if ( isa_port_component ||isa_port) { + for (i=1; i<=NF; i++) + printf(" %s", $i) >> port_file; + printf("\n") >> port_file } } function process_fig() { # Test for the fig format first line and data line @@ -564,10 +580,11 @@ b_file = sprintf("%s_rbg.m", sys_name); c_file = sprintf("%s_cmp.m", sys_name); fig_file = sprintf("%s_fig.fig", sys_name); cmp_file = sprintf("%s_cmp.fig", sys_name); + port_file = sprintf("%s_port.fig", sys_name); bnd_file = sprintf("%s_bnd.fig", sys_name); head_file = sprintf("%s_head.fig", sys_name); warning_f = "WARNING %s \t in fig file but not lbl file - using\n"; warning_l = "WARNING %s \t in lbl file but not fig file - ignoring\n";