Index: mttroot/mtt/bin/trans/sympar2global_txt2m ================================================================== --- mttroot/mtt/bin/trans/sympar2global_txt2m +++ mttroot/mtt/bin/trans/sympar2global_txt2m @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.4 1998/07/26 10:44:08 peterg +## Now strips comment lines first +## ## Revision 1.3 1998/07/25 18:27:45 peterg ## now uses the (extended with switch) sympars.txt file ## ## Revision 1.2 1998/03/22 11:13:27 peterg ## Back under RCS @@ -28,18 +31,22 @@ #Write out the variables in matlab global format strip_comments <$1_sympars.txt |\ awk ' -BEGIN{ - var = "foobar"; - print "global ..." +{i++; + if ((i==1)&&(NF>0)) { + printf ("global"); + globals_exist=1 + } + if (NF>0) + printf (" ...\n %s", tolower($1)); } -{i++; print tolower($1), "..."; var = $1} END{ - print var ";" # Repeat the last variable to avoid the trailing ... + if (globals_exist) + print ";" }' # Now invoke the standard error handling. # mtt_error mtt_error.txt