diff options
author | jofret | 2010-06-24 15:28:58 +0000 |
---|---|---|
committer | jofret | 2010-06-24 15:28:58 +0000 |
commit | 86135083830632eb092e6117bf546fcf8d4cb88e (patch) | |
tree | 332521b33b02ef20abf0ab4a028ab127ed2d9fb1 | |
parent | 0bf49554e5b138fb0ed9584d5d7a5fe9c024c95b (diff) | |
download | scilab2c-86135083830632eb092e6117bf546fcf8d4cb88e.tar.gz scilab2c-86135083830632eb092e6117bf546fcf8d4cb88e.tar.bz2 scilab2c-86135083830632eb092e6117bf546fcf8d4cb88e.zip |
Remove empty lines in report.
-rw-r--r-- | scilab2c/macros/ASTManagement/AST_GetASTFile.sci | 3 | ||||
-rw-r--r-- | scilab2c/macros/GeneralFunctions/PrintStepInfo.sci | 125 |
2 files changed, 56 insertions, 72 deletions
diff --git a/scilab2c/macros/ASTManagement/AST_GetASTFile.sci b/scilab2c/macros/ASTManagement/AST_GetASTFile.sci index 025aca74..6fb0f76e 100644 --- a/scilab2c/macros/ASTManagement/AST_GetASTFile.sci +++ b/scilab2c/macros/ASTManagement/AST_GetASTFile.sci @@ -40,8 +40,7 @@ load(FileInfo.SharedInfoDatFile,'SharedInfo'); funname = SharedInfo.NextSCIFunName; funnumber = SharedInfo.NextSCIFunNumber; -PrintStepInfo('Generate the AST in '+FileInfo.Funct(funnumber).ASTFileName,... - FileInfo.GeneralReport,'both'); +PrintStepInfo('Generate the AST.', FileInfo.GeneralReport,'both'); // --- Generation of the AST file. --- SciFile2ASTFile(FileInfo.Funct(funnumber).SCIFileName,... diff --git a/scilab2c/macros/GeneralFunctions/PrintStepInfo.sci b/scilab2c/macros/GeneralFunctions/PrintStepInfo.sci index 2550e327..8e1c1d02 100644 --- a/scilab2c/macros/GeneralFunctions/PrintStepInfo.sci +++ b/scilab2c/macros/GeneralFunctions/PrintStepInfo.sci @@ -1,71 +1,56 @@ -function PrintStepInfo(inputstring,filename,outputtype,formattedstring)
-// function PrintStepInfo(inputstring,filename,outputtype,formattedstring)
-// -----------------------------------------------------------------
-// #RNU_RES_B
-// Prints a string by using a predefined format into a file or on
-// the stdout.
-//
-// Input data:
-// filename: optional parameter, that specifies the output file.
-// If filename is '' or it is not provided to the function,
-// the string will be printed on the stdout.
-// outputtype: 'file' -> prints only on file.
-// 'stdout' -> prints only on the stdout.
-// 'both' -> prints on both file and stdoud.
-// Default is 'stdout'.
-// formattedstring: if 'n' (default) it means that str is considered as a simple string (mputstr).
-// if 'y' then str is considered formatted according to mfprint syntax
-// Output data:
-//
-// #RNU_RES_E
-// Status:
-// 02-Jan-2006 -- Nutricato Raffaele: Author.
-// 02-Jan-2006 -- Nutricato Raffaele: TEST OK.
-//
-// Copyright 2007 Raffaele Nutricato.
-// Contact: raffaele.nutricato@tiscali.it
-// -----------------------------------------------------------------
+function PrintStepInfo(inputstring,filename,outputtype,formattedstring) +// function PrintStepInfo(inputstring,filename,outputtype,formattedstring) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Prints a string by using a predefined format into a file or on +// the stdout. +// +// Input data: +// filename: optional parameter, that specifies the output file. +// If filename is '' or it is not provided to the function, +// the string will be printed on the stdout. +// outputtype: 'file' -> prints only on file. +// 'stdout' -> prints only on the stdout. +// 'both' -> prints on both file and stdoud. +// Default is 'stdout'. +// formattedstring: if 'n' (default) it means that str is considered as a simple string (mputstr). +// if 'y' then str is considered formatted according to mfprint syntax +// Output data: +// +// #RNU_RES_E +// Status: +// 02-Jan-2006 -- Nutricato Raffaele: Author. +// 02-Jan-2006 -- Nutricato Raffaele: TEST OK. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- -// ------------------------------
-// --- Check input arguments. ---
-// ------------------------------
-SCI2CNInArgCheck(argn(2),1,4);
-
-if argn(2) < 4
- formattedstring = 'n';
- if argn(2) < 3
- bothout = 'n';
- if argn(2) < 2
- filename = '';
- end
- end
-end
-if (length(filename) == 0)
- outputtype = 'stdout'; // Prints only on the stdout.
-end
-
-Nstars = length(inputstring);
-starstring = [];
-for counterstars = 1:Nstars
- starstring = starstring+'*';
-end
-blankstring = [' '];
-
-if ((outputtype=='both') | (outputtype=='stdout'))
- // disp(' ')
- // disp(' ')
- disp(blankstring+' '+starstring);
- disp(blankstring+'==> '+inputstring);
- disp(blankstring+' '+starstring);
- // disp(' ')
-end
-
-if ((outputtype=='both') | (outputtype=='file'))
- filenamefprintf(filename,'y',' ',formattedstring);
- filenamefprintf(filename,'y',' ',formattedstring);
- filenamefprintf(filename,'y',blankstring+' '+starstring,formattedstring);
- filenamefprintf(filename,'y',blankstring+'==> '+inputstring,formattedstring);
- filenamefprintf(filename,'y',blankstring+' '+starstring,formattedstring);
- filenamefprintf(filename,'y',' ',formattedstring);
-end
-endfunction
+// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,4); + +if argn(2) < 4 + formattedstring = 'n'; + if argn(2) < 3 + bothout = 'n'; + if argn(2) < 2 + filename = ''; + end + end +end +if (length(filename) == 0) + outputtype = 'stdout'; // Prints only on the stdout. +end + +blankstring = [' ']; + +if ((outputtype=='both') | (outputtype=='stdout')) + disp(blankstring+'==> '+inputstring); +end + +if ((outputtype=='both') | (outputtype=='file')) + filenamefprintf(filename,'y',blankstring+'==> '+inputstring,formattedstring); +end +endfunction |