Index: mttroot/mtt/bin/trans/abg2lbl_fig2txt ================================================================== --- mttroot/mtt/bin/trans/abg2lbl_fig2txt +++ mttroot/mtt/bin/trans/abg2lbl_fig2txt @@ -11,10 +11,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.13 2001/06/04 08:13:37 gawthrop +## Various changes to support PPP +## ## Revision 1.12 2001/05/08 15:18:10 gawthrop ## Added trig and hyperbolic functions to argument exclusion list ## ## Revision 1.11 2000/09/19 11:14:30 peterg ## Now writes the first component type header correctely @@ -156,16 +159,32 @@ cr["AE"] = "lin"; arg["AE"] = sprintf("%s%s", $2, s_arg); cr["AF"] = "lin"; arg["AF"] = sprintf("%s%s", $2, s_arg); cr["CDx"] = "lin"; arg["CDx"] = sprintf("%s%s", $2, s_arg); + + + cr["RS"] = lin; arg["RS"] = sprintf("flow,%s%s", $2, s_arg); + ## Heading if (Component !~ OldComponent) print "\n% Component type", Component ## Component - print "\t" $2 "\t" cr[Component] "\t\t" arg[Component]; + printf("\t%s\t", Component); + if (Component in cr) + printf("%s\t\t", cr[Component]) + else + printf("none\t\t"); + + if (Component in arg) + printf("%s\t\t\n", arg[Component]) + else { + print "lbl2args_txt2out", Component | "/bin/sh"; close("/bin/sh") + } + + ##print "\t" $2 "\t" cr[Component] "\t\t" arg[Component]; OldComponent=Component; } END{ print "\n% Port aliases" >> "mtt_junk_alias.txt"; for (k=1;k<=j;k++){ ADDED mttroot/mtt/bin/trans/lbl2args_txt2out Index: mttroot/mtt/bin/trans/lbl2args_txt2out ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/lbl2args_txt2out @@ -0,0 +1,39 @@ +#!/bin/sh +# Writes argument list to standard output ready for use in calling lbl file + + ###################################### + ##### Model Transformation Tools ##### + ###################################### + + ############################################################### + ## Version control history + ############################################################### + ## $Id$ + ## $Log$ + ############################################################### + +# Copyright (C) 2001 by Peter J. Gawthrop + +if [ -f "$1_lbl.txt" ]; then +grep '[#%]ALIAS' $1_lbl.txt |\ + +awk '{ + if (match($2,"\\$")==1){ + i = substr($2,2); + arg[i] = $3 + N++ + } +} +END{ + for (j=1;j<=N;j++){ + if (length(arg[j])==0) + arg[j] = "??"; + } + for (j=1;j