Index: mttroot/mtt/bin/trans/cbg2ese_m2r ================================================================== --- mttroot/mtt/bin/trans/cbg2ese_m2r +++ mttroot/mtt/bin/trans/cbg2ese_m2r @@ -14,10 +14,13 @@ ## Version control history ############################################################### ## $Id$ ## ## $Log$ +# Revision 1.9 1996/12/07 18:21:25 peterg +# Now uses fopen + file number +# ## Revision 1.8 1996/12/05 10:05:28 peterg ## Removed the Octave switch: empty_list_elements_ok = 1; ## This is now in .octaverc ## # Revision 1.7 1996/08/30 11:29:49 peter @@ -43,26 +46,30 @@ ## Initial revision ## ############################################################### infofile='mtt_info.txt'; +structurefile="$1_struc.txt"; eqnfile="$1_ese.r"; deffile="$1_def.r"; # Remove the old log file rm -f cbg2ese_m.log rm -f $1_ese.r #Inform user echo Creating $eqnfile -echo Creating $1_def.r +echo Creating $deffile +echo Creating $structurefile # Use matrix manipulation to accomplish the transformation $RMATRIX > cbg2ese_m2r.log 2>mtt_error.txt << EOF infofile = '$infofile';; infofilenum = fopen(infofile,'w'); +structurefile = '$structurefile';; +structurefilenum = fopen(structurefile,'w'); deffile = '$1_def.r'; deffilenum = fopen(deffile,'w'); system_name = '$1'; system_type = ''; @@ -76,11 +83,11 @@ structure = zeros(1,5); structure = cbg2ese(system_name, system_type, system_cr, ... system_args, full_name, full_name_repetition, ... - 1, structure, infofilenum); + 1, structure, structurefilenum, infofilenum); makedef(structure,deffilenum); EOF cat $infofile @@ -88,11 +95,14 @@ cat $1*ese.r - > $1_ese.tmp 2>> mtt_error.txt <$structurefile # Now invoke the standard error handling. mtt_error mtt_error.txt