Index: mttroot/mtt/bin/trans/m/cbg2ese.m ================================================================== --- mttroot/mtt/bin/trans/m/cbg2ese.m +++ mttroot/mtt/bin/trans/m/cbg2ese.m @@ -21,10 +21,13 @@ # ############################################################### # ## Version control history # ############################################################### # ## $Id$ # ## $Log$ +# ## Revision 1.30 1998/09/02 11:14:23 peterg +# ## Revised to use ordered lists of subsystems and ports +# ## # ## Revision 1.29 1998/08/25 09:22:34 peterg # ## Correctely recognises port SSs its now easy -- they are in there own # ## field # ## # ## Revision 1.28 1998/08/25 08:31:42 peterg @@ -190,16 +193,21 @@ local_y_index = 0; if (length(system_args)==0) mtt_info(sprintf("No arguments given so no argument aliasing done for system %s(%s)",\ system_name,system_type), infofilenum); + AliasingArguments=0; + else + AliasingArguments=1; endif; if (length(system_cr)==0) mtt_info(sprintf("No cr given so no cr aliasing done for system %s(%s)",\ system_name,system_type), infofilenum); - endif; + AliasingCRs=0; + else + AliasingCRs=1; endif; fields=["ports";"subsystems"]; # Do for both ports and subsystems - # ports first lists=["portlist";"subsystemlist"]; @@ -218,18 +226,25 @@ # Convert from arrow orientated to component orientated causality comp_bonds = CBG.bonds(bond_list,:).*direction; disp(["---- ", field, " ---"]); - # Alias the args list -- if not at top level - message = sprintf("\tfor component %s (%s) within %s",\ - comp_name,subsystem.type,full_name); - if struct_contains(CBG,"alias") - subsystem.arg = alias_args(subsystem.arg,CBG.alias,";",message,infofilenum) - subsystem.cr = alias_args(subsystem.cr,CBG.alias,";",message,infofilenum) - endif; - + if AliasingArguments # Alias the args list if appropriate + message = sprintf("\tfor component %s (%s) within %s",\ + comp_name,subsystem.type,full_name); + if struct_contains(CBG,"alias") + subsystem.arg = alias_args(subsystem.arg,CBG.alias,";",message,infofilenum) + endif; + endif; + + if AliasingCRs # Alias the CR list if appropriate + message = sprintf("\tfor component %s (%s) within %s",\ + comp_name,subsystem.type,full_name); + if struct_contains(CBG,"alias") + subsystem.cr = alias_args(subsystem.cr,CBG.alias,";",message,infofilenum) + endif; + endif; # Substitute positional ($1 etc) arguments subsystem.cr = subs_arg(subsystem.cr,system_cr, ... "lin",full_name,subsystem.type,comp_name,infofilenum); subsystem.arg = subs_arg(subsystem.arg,system_args, ...