summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authornutricato2009-07-07 14:41:59 +0000
committernutricato2009-07-07 14:41:59 +0000
commit0b992f0195b8d0abe9f74ac3d9294d1b1c14c44b (patch)
tree8987ca0c33af5eabaea9bd5f317413557c617954 /macros
parenta484e92e9ca595b25036c11d6b259ba98ee1765c (diff)
downloadscilab2c-0b992f0195b8d0abe9f74ac3d9294d1b1c14c44b.tar.gz
scilab2c-0b992f0195b8d0abe9f74ac3d9294d1b1c14c44b.tar.bz2
scilab2c-0b992f0195b8d0abe9f74ac3d9294d1b1c14c44b.zip
Diffstat (limited to 'macros')
-rw-r--r--macros/CCodeGeneration/C_ForExpression.sci4
-rw-r--r--macros/CCodeGeneration/C_WhileExpression.sci11
2 files changed, 7 insertions, 8 deletions
diff --git a/macros/CCodeGeneration/C_ForExpression.sci b/macros/CCodeGeneration/C_ForExpression.sci
index fb3a8b39..4e75c066 100644
--- a/macros/CCodeGeneration/C_ForExpression.sci
+++ b/macros/CCodeGeneration/C_ForExpression.sci
@@ -101,10 +101,6 @@ elseif (SharedInfo.ForExpr.AssignmentFun == SharedInfo.CFunId.OpColon)
// #RNU_RES_B
// Epilogue
// #RNU_RES_E
- disp('C_Strings(cntstr)')
- disp(C_Strings(cntstr))
- disp('CPass1ForEpilFileName')
- disp(CPass1ForEpilFileName)
if (length(C_Strings(cntstr)) == 0)
C_Strings(cntstr) = ' '; // RNU for Bruno: If I don't do that I get a PrintStringInfo error related to mputstr.
// Function not defined for given argument type(s),
diff --git a/macros/CCodeGeneration/C_WhileExpression.sci b/macros/CCodeGeneration/C_WhileExpression.sci
index 24898a1b..edd2830e 100644
--- a/macros/CCodeGeneration/C_WhileExpression.sci
+++ b/macros/CCodeGeneration/C_WhileExpression.sci
@@ -52,18 +52,21 @@ CCall ='';
// -------------------------
PrintStringInfo(' Handling While Expression with OpColon.',ReportFileName,'file','y'); //NUT: sistema il commento.
-// #RNU_RES_B
// -------------------------------------------------------------------------------------
// --- Generate Prologue and Epilogue -> Copy the first N-1 lines of the for.c code. ---
// -------------------------------------------------------------------------------------
-// #RNU_RES_E
[C_Strings,NumCStrings] = File2StringArray(CPass1WhileProlFileName);
C_Strings = stripblanks(C_Strings);
for cntstr = 1:NumCStrings
// Prologue
- PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+C_Strings(cntstr),CPass1FileName,'file','y');
+ PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+C_Strings(cntstr),CPass1FileName,'file','y','n');
// Epilogue
- PrintStringInfo(C_Strings(cntstr),CPass1WhileEpilFileName ,'file','y');
+ if (length(C_Strings(cntstr)) == 0)
+ C_Strings(cntstr) = ' '; // RNU for Bruno: If I don't do that I get a PrintStringInfo error related to mputstr.
+ // Function not defined for given argument type(s),
+ // check arguments or define function %0_mputstr for overloading.
+ end
+ PrintStringInfo(C_Strings(cntstr),CPass1WhileEpilFileName ,'file','y','n');
end
// ----------------------------------------
// --- Insert "}" in the epilogue file. ---