diff options
author | jofret | 2010-06-23 19:44:55 +0000 |
---|---|---|
committer | jofret | 2010-06-23 19:44:55 +0000 |
commit | 7801bedd53f3a43702941766663f7cff24b8fb76 (patch) | |
tree | 427f077be7558671fde55da664e9ba43f6582db0 | |
parent | 592a9e6042b7f7349479943a4b55e1bd2769319d (diff) | |
download | scilab2c-7801bedd53f3a43702941766663f7cff24b8fb76.tar.gz scilab2c-7801bedd53f3a43702941766663f7cff24b8fb76.tar.bz2 scilab2c-7801bedd53f3a43702941766663f7cff24b8fb76.zip |
Remove SCI2Cerror wrapping call
48 files changed, 90 insertions, 94 deletions
diff --git a/scilab2c/macros/ASTManagement/AST_CheckCommonInOutArgs.sci b/scilab2c/macros/ASTManagement/AST_CheckCommonInOutArgs.sci index 952514cc..8e3afdcf 100644 --- a/scilab2c/macros/ASTManagement/AST_CheckCommonInOutArgs.sci +++ b/scilab2c/macros/ASTManagement/AST_CheckCommonInOutArgs.sci @@ -82,7 +82,7 @@ if (ncommonstrings > 0) PrintStringInfo('SCI2CERROR: // The previous line must be rewritten as:',ReportFileName,'both','y'); PrintStringInfo('SCI2CERROR: function e = myfun(a,b,c,d) // Not Allowed',ReportFileName,'both','y'); PrintStringInfo(' ',ReportFileName,'both','y'); - SCI2Cerror(' '); + error(9999, 'SCI2CERROR: Found '+string(ncommonstrings)+' input/output 2-D arguments with the same name.'); end endfunction diff --git a/scilab2c/macros/ASTManagement/AST_CheckLastFunc.sci b/scilab2c/macros/ASTManagement/AST_CheckLastFunc.sci index 0fff6b22..508435b7 100644 --- a/scilab2c/macros/ASTManagement/AST_CheckLastFunc.sci +++ b/scilab2c/macros/ASTManagement/AST_CheckLastFunc.sci @@ -53,9 +53,9 @@ if ((SearchLevel == 0) & (LhsField == 'Lhs :')) while(LhsField ~= 'EndEqual') NLhsArg = NLhsArg + 1; if (LhsField == '<EOL>') - SCI2Cerror('Found <EOL> before EndEqual'); + error(9999, 'Found <EOL> before EndEqual'); elseif (LhsField == 'EndProgram') - SCI2Cerror('Found EndProgram before EndEqual'); + error(9999, 'Found EndProgram before EndEqual'); end if (LhsField == 'Operation') // if (LhsField == 'Operator: ins') diff --git a/scilab2c/macros/ASTManagement/AST_CheckLineLength.sci b/scilab2c/macros/ASTManagement/AST_CheckLineLength.sci index d74cf26b..3973b188 100644 --- a/scilab2c/macros/ASTManagement/AST_CheckLineLength.sci +++ b/scilab2c/macros/ASTManagement/AST_CheckLineLength.sci @@ -22,6 +22,8 @@ function AST_CheckLineLength(instring) // ------------------------------ SCI2CNInArgCheck(argn(2),1,1); +// TODO : Remove me + //if length(instring) > 77 // SCI2Cerror('Line too long: please reduce the length of the current line.'); //end diff --git a/scilab2c/macros/ASTManagement/AST_ExtractNameAndScope.sci b/scilab2c/macros/ASTManagement/AST_ExtractNameAndScope.sci index 7e71f75a..53830cfc 100644 --- a/scilab2c/macros/ASTManagement/AST_ExtractNameAndScope.sci +++ b/scilab2c/macros/ASTManagement/AST_ExtractNameAndScope.sci @@ -87,7 +87,7 @@ elseif (SCI2Cstrncmps1size(tagname(7),ASTField)) ArgName = '<empty>'; ArgScope = 'None'; else - SCI2Cerror('Argument specifier not found in the AST field: '+ASTField); + error(9999, 'Argument specifier not found in the AST field: '+ASTField); end endfunction diff --git a/scilab2c/macros/ASTManagement/AST_GetFuncallPrm.sci b/scilab2c/macros/ASTManagement/AST_GetFuncallPrm.sci index aa5ab62c..e7c1581c 100644 --- a/scilab2c/macros/ASTManagement/AST_GetFuncallPrm.sci +++ b/scilab2c/macros/ASTManagement/AST_GetFuncallPrm.sci @@ -48,7 +48,7 @@ elseif (ASTFunType=='Operation') elseif (ASTFunType=='Equal') [FunctionName,InArg,NInArg,OutArg,NOutArg] = AST_ParseEqualStruct(FileInfo,SharedInfo); else - SCI2CerrorFile('Unknown Function type: '+ASTFunType+'.',ReportFileName); + error(9999, 'Unknown Function type: '+ASTFunType+'.'); end endfunction diff --git a/scilab2c/macros/ASTManagement/AST_GetPrecAndLhsArg.sci b/scilab2c/macros/ASTManagement/AST_GetPrecAndLhsArg.sci index feb8a6ec..07ad3b0a 100644 --- a/scilab2c/macros/ASTManagement/AST_GetPrecAndLhsArg.sci +++ b/scilab2c/macros/ASTManagement/AST_GetPrecAndLhsArg.sci @@ -88,7 +88,7 @@ if (NLhsArg > 0) // #RNU_RES_E SharedInfo.SkipNextEqual = 1; // 1 = the next equal in the AST will not produce C code. if (NLhsArg ~= NOutArg) - SCI2CerrorFile('NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.',ReportFileName); + error(9999, 'NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.'); end else // #RNU_RES_B diff --git a/scilab2c/macros/ASTManagement/AST_HandleEndGenFun.sci b/scilab2c/macros/ASTManagement/AST_HandleEndGenFun.sci index 2c3bbfb9..69fbb82e 100644 --- a/scilab2c/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/scilab2c/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -92,14 +92,14 @@ elseif (ASTFunName == 'global') PrintStringInfo('SCI2CERROR: global var1; //ALLOWED',ReportFileName,'both','y'); PrintStringInfo('SCI2CERROR: global var2; //ALLOWED',ReportFileName,'both','y'); PrintStringInfo(' ',ReportFileName,'both','y'); - SCI2Cerror(' '); + error(9999, 'SCI2CERROR: Multiple declaration of global variables is not allowed.'); end if (NOutArg ~= 1) PrintStringInfo(' ',ReportFileName,'both','y'); PrintStringInfo('SCI2CERROR: Unexpected number of output arguments for global function.',ReportFileName,'both','y'); PrintStringInfo('SCI2CERROR: Please report this error to: http://forge.scilab.org/index.php/p/scilab2c/issues/',ReportFileName,'both','y'); PrintStringInfo(' ',ReportFileName,'both','y'); - SCI2Cerror(' '); + error(9999, 'SCI2CERROR: Unexpected number of output arguments for global function.'); end end diff --git a/scilab2c/macros/ASTManagement/AST_HandleHeader.sci b/scilab2c/macros/ASTManagement/AST_HandleHeader.sci index 7439b784..661c740f 100644 --- a/scilab2c/macros/ASTManagement/AST_HandleHeader.sci +++ b/scilab2c/macros/ASTManagement/AST_HandleHeader.sci @@ -30,8 +30,8 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; FunctionName = ASTHeader.Name; if (mtlb_strcmp(ASTHeader.Name,SharedInfo.NextSCIFunName) == %F) - SCI2CerrorFile('Very strange! AST Name field ""'+ASTHeader.Name+... - '""is different from function name ""'+SharedInfo.NextSCIFunName+'"".',ReportFileName); + error(9999, 'Very strange! AST Name field ""'+ASTHeader.Name+... + '""is different from function name ""'+SharedInfo.NextSCIFunName+'"".'); end // --------------------------- // --- End Initialization. --- @@ -136,7 +136,7 @@ if (NInArgDat == NInArg) end end else - SCI2CerrorFile('Number of input arguments specified in AST is different from the number specified in .dat file.',ReportFileName); + error(9999, 'Number of input arguments specified in AST is different from the number specified in .dat file.'); end @@ -149,7 +149,7 @@ else PrintStringInfo('N. of output arguments found in the AST: '+string(NOutArg),ReportFileName,'both','y'); PrintStringInfo('N. of output arguments found in the call (FunInfo structure): '+string(SharedInfo.CurrentFunInfo.NOutArg),ReportFileName,'both','y'); //#RNU_RES_E - SCI2CerrorFile('Number of output arguments specified in AST is different from the number specified in .dat file.',ReportFileName); + error(9999, 'Number of output arguments specified in AST is different from the number specified in .dat file.'); end //#RNU_RES_B //NUT: using approach 1: Setting for input and output arguments symbolic sizes. diff --git a/scilab2c/macros/ASTManagement/AST_HandleWhileStatem.sci b/scilab2c/macros/ASTManagement/AST_HandleWhileStatem.sci index 45d434f0..79fb516d 100644 --- a/scilab2c/macros/ASTManagement/AST_HandleWhileStatem.sci +++ b/scilab2c/macros/ASTManagement/AST_HandleWhileStatem.sci @@ -86,8 +86,7 @@ if(SharedInfo.WhileExpr.CondVar == '') PrintStringInfo('SCI2CERROR: Expected a variable or number in the AST while expression.','','stdout','y'); PrintStringInfo('SCI2CERROR: Report this error to http://forge.scilab.org/index.php/p/scilab2c/issues/.','','stdout','y'); PrintStringInfo(' ',ReportFileName,'both','y'); - SCI2Cerror(' '); - SCI2Cerror('Expected a conditional variable in the while expression'); + error(9999, 'Expected a conditional variable in the while expression'); end SharedInfo.WhileExpr.CondVar = ArgName; @@ -98,7 +97,7 @@ if(SharedInfo.WhileExpr.CondVar == '') AST_PushASTStack(Pop1); elseif (SharedInfo.WhileExpr.DimCondVar > 0) - SCI2CerrorFile('Cannot manage while with matrix conditions',ReportFileName); + error(9999, 'Cannot manage while with matrix conditions'); end SharedInfo = C_WhileExpression(FileInfo,SharedInfo); diff --git a/scilab2c/macros/ASTManagement/AST_ParseEqualStruct.sci b/scilab2c/macros/ASTManagement/AST_ParseEqualStruct.sci index 3d917682..fa76a01d 100644 --- a/scilab2c/macros/ASTManagement/AST_ParseEqualStruct.sci +++ b/scilab2c/macros/ASTManagement/AST_ParseEqualStruct.sci @@ -60,9 +60,9 @@ while (LhsField ~= 'Lhs :') [OutputArgumentNames(NOutArg),OutputArgumentScope(NOutArg)] = AST_ExtractNameAndScope(LhsField); LhsField = AST_PopASTStack(); if (LhsField == 'Expression:') - SCI2Cerror('Found Expression: before Lhs'); + error(9999, 'Found Expression: before Lhs'); elseif (LhsField == 'Equal') - SCI2Cerror('Found Equal before Lhs'); + error(9999, 'Found Equal before Lhs'); end end OutputArgumentNames = SCI2Cflipud(OutputArgumentNames); @@ -79,7 +79,7 @@ while (ExprField ~= 'Expression:') [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(ExprField); ExprField = AST_PopASTStack(); if (ExprField == 'Equal') - SCI2Cerror('Found Equal before Lhs'); + error(9999, 'Found Equal before Lhs'); end end InputArgumentNames = SCI2Cflipud(InputArgumentNames); @@ -92,7 +92,7 @@ InputArgumentScope = SCI2Cflipud(InputArgumentScope); //#RNU_RES_E FunctionName = AST_PopASTStack(); if (FunctionName ~= 'Equal') then - SCI2Cerror('Problems with Equal, Expected Equal tag.'); + error(9999, 'Problems with Equal, Expected Equal tag.'); end FunctionName = 'OpEqual'; @@ -138,7 +138,7 @@ if (SharedInfo.Equal.Nins > 0) //#RNU_RES_E end if (NInArg ~= SharedInfo.Equal.Nins) - SCI2CerrorFile('Number of input arguments must be equal to number of ins functions.',ReportFileName); + error(9999, 'Number of input arguments must be equal to number of ins functions.'); end else //#RNU_RES_B @@ -161,7 +161,7 @@ else //#RNU_RES_E end if (NInArg ~= NOutArg) - SCI2CerrorFile('Number of input arguments must be equal to number of output arguments.',ReportFileName); + error(9999, 'Number of input arguments must be equal to number of output arguments.'); end end diff --git a/scilab2c/macros/ASTManagement/AST_ParseFuncallStruct.sci b/scilab2c/macros/ASTManagement/AST_ParseFuncallStruct.sci index 5840c05e..647a70d7 100644 --- a/scilab2c/macros/ASTManagement/AST_ParseFuncallStruct.sci +++ b/scilab2c/macros/ASTManagement/AST_ParseFuncallStruct.sci @@ -62,9 +62,9 @@ while (RhsField ~= 'Rhs :') [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField); RhsField = AST_PopASTStack(); if (RhsField == '#lhs :') - SCI2Cerror('Found #lhs before Rhs'); + error(9999, 'Found #lhs before Rhs'); elseif (RhsField == 'Funcall :') - SCI2Cerror('Found Funcall before Rhs'); + error(9999, 'Found Funcall before Rhs'); end end if (stripblanks(InputArgumentNames(NInArg)) == '<empty>') diff --git a/scilab2c/macros/ASTManagement/AST_ParseIfExprStruct.sci b/scilab2c/macros/ASTManagement/AST_ParseIfExprStruct.sci index 12ad077a..a7da0128 100644 --- a/scilab2c/macros/ASTManagement/AST_ParseIfExprStruct.sci +++ b/scilab2c/macros/ASTManagement/AST_ParseIfExprStruct.sci @@ -76,7 +76,7 @@ elseif (ASTIfExpType=='elseif') flagendpop = 1; end else - SCI2CerrorFile('Unknown ASTIfExpType ""'+ASTIfExpType+'"".',ReportFileName); + error(9999, 'Unknown ASTIfExpType ""'+ASTIfExpType+'"".'); end while (flagendpop == 0) diff --git a/scilab2c/macros/ASTManagement/AST_ParseOperStruct.sci b/scilab2c/macros/ASTManagement/AST_ParseOperStruct.sci index 179c5578..a77317bd 100644 --- a/scilab2c/macros/ASTManagement/AST_ParseOperStruct.sci +++ b/scilab2c/macros/ASTManagement/AST_ParseOperStruct.sci @@ -72,7 +72,7 @@ while (RhsField ~= 'Operands:') [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField); RhsField = AST_PopASTStack(); if (RhsField == 'Operation') - SCI2Cerror('Found Operation before Rhs'); + error(9999, 'Found Operation before Rhs'); end end @@ -90,7 +90,7 @@ InputArgumentScope = SCI2Cflipud(InputArgumentScope); //#RNU_RES_E OperationField = AST_PopASTStack(); if (OperationField ~= 'Operation') then - SCI2Cerror('Problems with Operation, Expected Operation tag.'); + error(9999, 'Problems with Operation, Expected Operation tag.'); end // -------------------------------------------- diff --git a/scilab2c/macros/ASTManagement/AST_PopASTStack.sci b/scilab2c/macros/ASTManagement/AST_PopASTStack.sci index bff1d9fa..34857499 100644 --- a/scilab2c/macros/ASTManagement/AST_PopASTStack.sci +++ b/scilab2c/macros/ASTManagement/AST_PopASTStack.sci @@ -26,7 +26,7 @@ global StackPosition; global STACKDEDUG; if StackPosition == 1 - SCI2Cerror('Stack empty. Cannot pop from stack.'); + error(9999, 'Stack empty. Cannot pop from stack.'); end stackelement = SCI2CSTACK(StackPosition,1); diff --git a/scilab2c/macros/ASTManagement/AST_ReadASTHeader.sci b/scilab2c/macros/ASTManagement/AST_ReadASTHeader.sci index 3df6cd28..7a52b1f2 100644 --- a/scilab2c/macros/ASTManagement/AST_ReadASTHeader.sci +++ b/scilab2c/macros/ASTManagement/AST_ReadASTHeader.sci @@ -38,7 +38,7 @@ if STACKDEDUG == 1 disp('Read AST Line: '+treeline); end if (SCI2Cstrncmps1size('Program',treeline) == %F) - SCI2CerrorFile('Expected ""Program"" label in the AST',ReportFileName); + error(9999, 'Expected ""Program"" label in the AST'); end tline = mgetl(fidAST,1); @@ -48,7 +48,7 @@ if STACKDEDUG == 1 disp('Read AST Line: '+treeline); end if (SCI2Cstrncmps1size('Name : ',treeline) == %F) - SCI2CerrorFile('Expected ""Name : "" label in the AST',ReportFileName); + error(9999, 'Expected ""Name : "" label in the AST'); else ASTHeader.Name = stripblanks(part(treeline,length('Name : ')+1:length(treeline))); end @@ -60,7 +60,7 @@ if STACKDEDUG == 1 disp('Read AST Line: '+treeline); end if (SCI2Cstrncmps1size('Outputs: ',treeline) == %F) - SCI2CerrorFile('Expected ""Outputs: "" label in the AST',ReportFileName); + error(9999, 'Expected ""Outputs: "" label in the AST'); else ASTHeader.Outputs = stripblanks(part(treeline,length('Outputs: ')+1:length(treeline))); end @@ -72,7 +72,7 @@ if STACKDEDUG == 1 disp('Read AST Line: '+treeline); end if (SCI2Cstrncmps1size('Inputs : ',treeline) == %F) - SCI2CerrorFile('Expected ""Inputs : "" label in the AST',ReportFileName); + error(9999, 'Expected ""Inputs : "" label in the AST'); else ASTHeader.Inputs = stripblanks(part(treeline,length('Inputs : ')+1:length(treeline))); end @@ -84,7 +84,7 @@ if STACKDEDUG == 1 disp('Read AST Line: '+treeline); end if (SCI2Cstrncmps1size('Statements ',treeline) == %F) - SCI2CerrorFile('Expected ""Statements "" label in the AST',ReportFileName); + error(9999, 'Expected ""Statements "" label in the AST'); end endfunction diff --git a/scilab2c/macros/ASTManagement/GenOutArgNames.sci b/scilab2c/macros/ASTManagement/GenOutArgNames.sci index d31d4ca5..0e683835 100644 --- a/scilab2c/macros/ASTManagement/GenOutArgNames.sci +++ b/scilab2c/macros/ASTManagement/GenOutArgNames.sci @@ -49,7 +49,7 @@ if (NLhsArg > 0) PrintStringInfo('Using Equal Lhs names.',ReportFileName,'file','y'); //#RNU_RES_E if (NLhsArg ~= NOutArg) - SCI2CerrorFile('NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.',ReportFileName); + error(9999, 'NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.'); end for counteroutputargs = 1:NOutArg OutArg(counteroutputargs).Name=LhsArg(counteroutputargs).Name; diff --git a/scilab2c/macros/ASTManagement/Operator2FunName.sci b/scilab2c/macros/ASTManagement/Operator2FunName.sci index 1ca5825b..1aa934cb 100644 --- a/scilab2c/macros/ASTManagement/Operator2FunName.sci +++ b/scilab2c/macros/ASTManagement/Operator2FunName.sci @@ -41,20 +41,20 @@ elseif (OperatorName == '.*') FunName = FuncPrefix+'DotStar'+FuncSuffix;
elseif (OperatorName == '*.')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == '.*.')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == '/')
FunName = FuncPrefix+'Slash'+FuncSuffix;
elseif (OperatorName == './')
FunName = FuncPrefix+'DotSlash'+FuncSuffix;
elseif (OperatorName == '/.')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == './.')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == '.\')
FunName = FuncPrefix+'DotBackSlash'+FuncSuffix;
elseif (OperatorName == '\')
@@ -63,13 +63,13 @@ elseif (OperatorName == '\') FunName = FuncPrefix+'BackSlash'+FuncSuffix;
elseif (OperatorName == '.\')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == '\.')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == '.\.')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
elseif (OperatorName == '^')
FunName = FuncPrefix+'Hat'+FuncSuffix;
elseif (OperatorName == '.^')
@@ -110,10 +110,10 @@ elseif (OperatorName == 'ext') FunName = 'OpExt';
elseif (OperatorName == 'cceol')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
else
PrintStringInfo('SCI2CERROR: Unknown Operator ""'+OperatorName+'.','','stout','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Unknown Operator ""'+OperatorName+'.');
end
endfunction
diff --git a/scilab2c/macros/CCodeGeneration/C_Funcall.sci b/scilab2c/macros/CCodeGeneration/C_Funcall.sci index 456fe1e4..65aad5e2 100644 --- a/scilab2c/macros/CCodeGeneration/C_Funcall.sci +++ b/scilab2c/macros/CCodeGeneration/C_Funcall.sci @@ -176,7 +176,7 @@ end CCall =''; if (FunInfo.CFunctionName == SharedInfo.CMainFunName) if (FlagCall == 1) - SCI2Cerror('main function called in a source code!'); + error(9999, 'main function called in a source code!'); else CCall =CCall+'SCI2Cint '; end diff --git a/scilab2c/macros/CCodeGeneration/C_IfElseBlocks.sci b/scilab2c/macros/CCodeGeneration/C_IfElseBlocks.sci index 71b45966..92ac94f7 100644 --- a/scilab2c/macros/CCodeGeneration/C_IfElseBlocks.sci +++ b/scilab2c/macros/CCodeGeneration/C_IfElseBlocks.sci @@ -57,7 +57,7 @@ elseif (InOutStatements=='out') PrintStringInfo(' '+CCall,ReportFileName,'file','y'); PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); else - SCI2CerrorFile('Unknown setting for InOutStatements: '+InOutStatements'.',ReportFileName); + error(9999, 'Unknown setting for InOutStatements: '+InOutStatements+'.'); end // #RNU_RES_B diff --git a/scilab2c/macros/CCodeGeneration/C_IfExpression.sci b/scilab2c/macros/CCodeGeneration/C_IfExpression.sci index 772f24ff..48a05383 100644 --- a/scilab2c/macros/CCodeGeneration/C_IfExpression.sci +++ b/scilab2c/macros/CCodeGeneration/C_IfExpression.sci @@ -23,7 +23,7 @@ SCI2CNInArgCheck(argn(2),5,5); // --- Check NIfCondArg value. --- if ((NIfCondArg ~= 1) & (ASTIfExpType~='else')) - SCI2CerrorFile('Cannot manage ""if/elseif"" with a number of condition variables not equal to 1.',ReportFileName); + error(9999, 'Cannot manage ""if/elseif"" with a number of condition variables not equal to 1.'); end // ----------------------- @@ -53,7 +53,7 @@ elseif (ASTIfExpType=='elseif') elseif (ASTIfExpType=='else') CFunName = 'else'; else - SCI2CerrorFile('Unknown ASTIfExpType ""'+ASTIfExpType+'"".',ReportFileName); + error(9999, 'Unknown ASTIfExpType ""'+ASTIfExpType+'"".'); end // ---------------------------- diff --git a/scilab2c/macros/CCodeGeneration/C_Type.sci b/scilab2c/macros/CCodeGeneration/C_Type.sci index f49dd9b1..5fc94f98 100644 --- a/scilab2c/macros/CCodeGeneration/C_Type.sci +++ b/scilab2c/macros/CCodeGeneration/C_Type.sci @@ -36,6 +36,6 @@ elseif (ArgType == 'g') elseif (ArgType == 'f') OutC_Type = 'SCI2CFILEID'; else - SCI2Cerror('Unknown Argument Type: ""'+ArgType+'"".'); + error(9999, 'Unknown Argument Type: ""'+ArgType+'"".'); end endfunction diff --git a/scilab2c/macros/CCodeGeneration/GetClsFileName.sci b/scilab2c/macros/CCodeGeneration/GetClsFileName.sci index ec9ce5b9..46f08201 100644 --- a/scilab2c/macros/CCodeGeneration/GetClsFileName.sci +++ b/scilab2c/macros/CCodeGeneration/GetClsFileName.sci @@ -84,7 +84,7 @@ if (FlagFoundAnnFile == 0) PrintStringInfo('SCI2CERROR: an associated .sci or .ann file for function: '+FunName,ReportFileName,'both','y'); PrintStringInfo(' ',ReportFileName,'both','y'); // #RNU_RES_E - SCI2Cerror(' '); + error(9999, 'SCI2CERROR: Missing function annotation. Could not find an associated .sci or .ann file for function: '+FunName); end AnnFileName = fullfile(FileInfo.USER2CLibSCIAnnFun,tmpannfilename); SCI2CClassName = FunName; diff --git a/scilab2c/macros/CCodeGeneration/GetSymbolDimension.sci b/scilab2c/macros/CCodeGeneration/GetSymbolDimension.sci index bb6045a2..5828e0ae 100644 --- a/scilab2c/macros/CCodeGeneration/GetSymbolDimension.sci +++ b/scilab2c/macros/CCodeGeneration/GetSymbolDimension.sci @@ -30,7 +30,7 @@ function symboldimension = GetSymbolDimension(Field_Size) // Size is expressed as an array of two strings. Nelem = max(size(Field_Size)); if (Nelem < 2) - SCI2Cerror('The size of a symbol cannot be expressed with one or zero numbers.'); + error(9999, 'The size of a symbol cannot be expressed with one or zero numbers.'); end for countersize = 1:Nelem @@ -45,7 +45,7 @@ function symboldimension = GetSymbolDimension(Field_Size) if (isnum(Field_Size(countersize))) tmpnum = eval(Field_Size(countersize)); if (tmpnum == 0) - SCI2Cerror('Found a symbol that has zeros elements. 0xN or Nx0 matrices are not allowed.'); + error(9999, 'Found a symbol that has zeros elements. 0xN or Nx0 matrices are not allowed.'); elseif (tmpnum == 1) Field_Type(countersize) = 0; else diff --git a/scilab2c/macros/ErrorMessages/EM_NanSize.sci b/scilab2c/macros/ErrorMessages/EM_NanSize.sci index 2595a32b..60877389 100644 --- a/scilab2c/macros/ErrorMessages/EM_NanSize.sci +++ b/scilab2c/macros/ErrorMessages/EM_NanSize.sci @@ -78,5 +78,5 @@ PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y'); PrintStringInfo('SCI2CERROR: }',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Of course it is not optimized C code.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
-SCI2Cerror(' ');
+SCI2Cerror(9999, 'SCI2CERROR: Cannot initialize a local or global variable with a variable value coming from a function or an operation.');
endfunction
diff --git a/scilab2c/macros/ErrorMessages/EM_UnknownStep.sci b/scilab2c/macros/ErrorMessages/EM_UnknownStep.sci index 9f8d39e7..e9e37c2d 100644 --- a/scilab2c/macros/ErrorMessages/EM_UnknownStep.sci +++ b/scilab2c/macros/ErrorMessages/EM_UnknownStep.sci @@ -66,5 +66,5 @@ PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y'); PrintStringInfo('SCI2CERROR: }',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Of course it is not optimized C code.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
-SCI2Cerror(' ');
+error(9999, 'SCI2C forbids use of step values in ""for"" loops which come from a function or an operation.');
endfunction
diff --git a/scilab2c/macros/ErrorMessages/EM_ZeroSize.sci b/scilab2c/macros/ErrorMessages/EM_ZeroSize.sci index fede8f0d..7cee5b9f 100644 --- a/scilab2c/macros/ErrorMessages/EM_ZeroSize.sci +++ b/scilab2c/macros/ErrorMessages/EM_ZeroSize.sci @@ -22,6 +22,6 @@ SCI2CNInArgCheck(argn(2),1,1); PrintStringInfo('SCI2CERROR: Cannot handle zero-size arrays.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
-SCI2Cerror(' ');
+error(9999, 'SCI2CERROR: Cannot handle zero-size arrays.');
endfunction
diff --git a/scilab2c/macros/FunctionAnnotation/FA_GetFunAnn.sci b/scilab2c/macros/FunctionAnnotation/FA_GetFunAnn.sci index 98956785..86b99328 100644 --- a/scilab2c/macros/FunctionAnnotation/FA_GetFunAnn.sci +++ b/scilab2c/macros/FunctionAnnotation/FA_GetFunAnn.sci @@ -107,14 +107,14 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0)) PrintStringInfo('SCI2CERROR: Incorrect format for function annotation.',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Expected '+SharedInfo.Annotations.FUNNIN+' field in the annotations of the function.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Incorrect format for function annotation.');
end
else
PrintStringInfo(' ',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Incorrect format for function annotation.',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Expected '+SharedInfo.Annotations.FUNNIN+' field in the annotations of the function.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Incorrect format for function annotation.');
end
end
end
@@ -129,7 +129,7 @@ if (FoundNOut*FoundNIn == 0) PrintStringInfo('SCI2CERROR: 1. Syntax error in function annotations.',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: 2. Missing the right combination of NIN/NOUT annotations: ""'+SharedInfo.Annotations.FUNNIN+string(NInArg)+','+SharedInfo.Annotations.FUNNOUT+' '+string(NOutArg)+'"".',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Incorrect function annotation.');
else
for cntout = 1:NOutArg
SCI2C_nout=cntout; // Useful for eval.
@@ -153,7 +153,7 @@ else PrintStringInfo(' ',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function type annotation not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Line '+string(line_position)+' Function type annotation not found in file: '+SCI2CClassFileName);
end
// #RNU_RES_B
@@ -178,7 +178,7 @@ else PrintStringInfo(' ',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function size annotation not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Line '+string(line_position)+' Function size annotation not found in file: '+SCI2CClassFileName);
end
end
end
diff --git a/scilab2c/macros/FunctionAnnotation/FA_MAX.sci b/scilab2c/macros/FunctionAnnotation/FA_MAX.sci index c725dd23..c5406f14 100644 --- a/scilab2c/macros/FunctionAnnotation/FA_MAX.sci +++ b/scilab2c/macros/FunctionAnnotation/FA_MAX.sci @@ -25,8 +25,6 @@ function opout = FA_MAX(in1,in2) // ------------------------------ SCI2CNInArgCheck(argn(2),2,2); -//SCI2Cerror('Not allowed to use FA_MAX in this release.'); - // ------------------------ // --- Generate Output. --- // ------------------------ diff --git a/scilab2c/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci b/scilab2c/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci index aae50af6..f439e23e 100644 --- a/scilab2c/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci +++ b/scilab2c/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci @@ -67,7 +67,7 @@ elseif ((in1type == 'g') & (in2type == 'g')) in1num = eval(in1size(1));
in2num = eval(in2size(1));
if (in1num > 1 | in2num > 1)
- SCI2Cerror('String catenation can be performed only on strings of 1 x N size not N x 1 size');
+ error(9999, 'String catenation can be performed only on strings of 1 x N size not N x 1 size');
//NUT: mi pare che non possano proprio esistere stringe di dimensione Nx1 perche' in
//NUT: scilab esiste il tipo string che e' di size 1x1 e sono io a trasformarlo in
//NUT: 1xN per cui se uso sempre questa convenzione non sbaglio mai.
@@ -87,7 +87,7 @@ elseif ((in1type == 'g') & (in2type == 'g')) opoutsize(2) = '('+string(in1size(2))+'+'+string(in2size(2))+'-1)';
end
else
- SCI2Cerror('Unexpected type combination for ""+"" operator (type1,type2): ('+in1type+in2type+').');
+ error(9999, 'Unexpected type combination for ""+"" operator (type1,type2): ('+in1type+in2type+').');
end
endfunction
diff --git a/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL1.sci b/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL1.sci index ccafe2d9..6071e960 100644 --- a/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL1.sci +++ b/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL1.sci @@ -43,6 +43,6 @@ else PrintStringInfo('SCI2CERROR: Please rearrange your code by using one of the following specifiers:',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: 1 or 2.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Cannot associate the second input argument to a known specifier.');
end
endfunction
diff --git a/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL2.sci b/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL2.sci index 69b38fd1..b0be739f 100644 --- a/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL2.sci +++ b/scilab2c/macros/FunctionAnnotation/FA_SZ_SEL2.sci @@ -39,6 +39,6 @@ else PrintStringInfo('SCI2CERROR: Please rearrange your code by using one of the following specifiers:',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: 1 or 2.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Cannot associate the second input argument to a known specifier.');
end
endfunction
diff --git a/scilab2c/macros/FunctionAnnotation/FA_TP_USER.sci b/scilab2c/macros/FunctionAnnotation/FA_TP_USER.sci index 3b306a9f..e60a8ce8 100644 --- a/scilab2c/macros/FunctionAnnotation/FA_TP_USER.sci +++ b/scilab2c/macros/FunctionAnnotation/FA_TP_USER.sci @@ -33,6 +33,6 @@ elseif (mtlb_strcmp(PrecisionSpecifier,'double')) elseif (mtlb_strcmp(PrecisionSpecifier,'default'))
type_out = DefaultType;
else
- SCI2Cerror('Unknown precision function: ""'+AnnotationFnc+'"".');
+ error(9999, 'Unknown precision function: ""'+AnnotationFnc+'"".');
end
endfunction
diff --git a/scilab2c/macros/FunctionList/FL_GetFunctionClass.sci b/scilab2c/macros/FunctionList/FL_GetFunctionClass.sci index 41ec2ea4..09fad929 100644 --- a/scilab2c/macros/FunctionList/FL_GetFunctionClass.sci +++ b/scilab2c/macros/FunctionList/FL_GetFunctionClass.sci @@ -38,13 +38,13 @@ if (meof(inannfid) == 0) // #RNU_RES_E
FoundClass = 1;
else
- SCI2CerrorFile('Could not find ""'+SCI2CClassSpecifier+'"" in '+FunFileName+'.',ReportFileName);
+ error(9999, 'Could not find ""'+SCI2CClassSpecifier+'"" in '+FunFileName+'.');
end
end
end
mclose(inannfid);
if (FoundClass == 0)
- SCI2CerrorFile('Could not find ""'+SCI2CClassSpecifier+'"" specifier.',ReportFileName);
+ error(9999, 'Could not find ""'+SCI2CClassSpecifier+'"" specifier.');
end
// -------------------------------------------
diff --git a/scilab2c/macros/FunctionList/FL_InOutArgs2CFunNames.sci b/scilab2c/macros/FunctionList/FL_InOutArgs2CFunNames.sci index 9305c48e..e559f385 100644 --- a/scilab2c/macros/FunctionList/FL_InOutArgs2CFunNames.sci +++ b/scilab2c/macros/FunctionList/FL_InOutArgs2CFunNames.sci @@ -44,8 +44,7 @@ for cntelem = 1:CFuncListNElem FunNameCFuncList(cntelem) = tmptokens(1)+FunctionName+tmptokens(2);
else
disp('Incorrect format for the function list class.');
- disp('Check the following function list class item: ""'+CommaSepCFuncList(cntelem)+'"".');
- SCI2Cerror(' ');
+ error(9999, 'Check the following function list class item: ""'+CommaSepCFuncList(cntelem)+'"".');
end
end
diff --git a/scilab2c/macros/GeneralFunctions/FunName2SciFileName.sci b/scilab2c/macros/GeneralFunctions/FunName2SciFileName.sci index 8c473001..39ff5b21 100644 --- a/scilab2c/macros/GeneralFunctions/FunName2SciFileName.sci +++ b/scilab2c/macros/GeneralFunctions/FunName2SciFileName.sci @@ -27,11 +27,11 @@ function ScilabFileName = FunName2SciFileName(DirList,InFunName); SCI2CNInArgCheck(argn(2),2,2);
if (prod(size(DirList)) == 0)
- SCI2Cerror('Incorrect DirList parameter.');
+ error(9999, 'Incorrect DirList parameter.');
end
if (prod(size(InFunName)) == 0)
- SCI2Cerror('Incorrect InFunName parameter.');
+ error(9999, 'Incorrect InFunName parameter.');
end
// --- Generate the PathList. ---
@@ -45,12 +45,12 @@ ScilabFileName = listfiles(PathList); // --- Check on the number of .sci files found. ---
if ((prod(size(ScilabFileName))) > 1)
disp(ScilabFileName);
- SCI2Cerror('Found more than one scilab file.');
+ error(9999, 'Found more than one scilab file.');
end
if ((prod(size(ScilabFileName))) < 1)
disp(ScilabFileName);
- SCI2Cerror('Scilab file ""'+InFunName+'.sci"", not found');
+ error(9999, 'Scilab file ""'+InFunName+'.sci"", not found');
end
endfunction
diff --git a/scilab2c/macros/GeneralFunctions/ReadStringCard.sci b/scilab2c/macros/GeneralFunctions/ReadStringCard.sci index 5d9358ba..a4525d90 100644 --- a/scilab2c/macros/GeneralFunctions/ReadStringCard.sci +++ b/scilab2c/macros/GeneralFunctions/ReadStringCard.sci @@ -52,7 +52,7 @@ clear requested_line dummy2 if (flag_found == 0) then
if (enableerror == 'y') then
- SCI2Cerror([cardname,' not found']);
+ error(9999, cardname+' not found');
else
warning([cardname,' not found']);
end
diff --git a/scilab2c/macros/GeneralFunctions/SCI2CCreateDir.sci b/scilab2c/macros/GeneralFunctions/SCI2CCreateDir.sci index cc152462..dcc39c3e 100644 --- a/scilab2c/macros/GeneralFunctions/SCI2CCreateDir.sci +++ b/scilab2c/macros/GeneralFunctions/SCI2CCreateDir.sci @@ -25,7 +25,7 @@ SCI2CNInArgCheck(argn(2),1,1); status_dir = mkdir(tmppath,tmpfname+tmpextension) ;
if (status_dir == 0)
- SCI2Cerror('Cannot create: '+OutDir);
+ error(9999, 'Cannot create: '+OutDir);
end
endfunction
diff --git a/scilab2c/macros/GeneralFunctions/SCI2CNInArgCheck.sci b/scilab2c/macros/GeneralFunctions/SCI2CNInArgCheck.sci index 23886fed..71b93328 100644 --- a/scilab2c/macros/GeneralFunctions/SCI2CNInArgCheck.sci +++ b/scilab2c/macros/GeneralFunctions/SCI2CNInArgCheck.sci @@ -21,8 +21,6 @@ function SCI2CNInArgCheck(NInArgs,MinNArgs,MaxNArgs) // -----------------------------------------------------------------
if ((NInArgs < MinNArgs) | (NInArgs > MaxNArgs))
- SCI2Cerror('Incorrect number of input arguments.');
+ error(9999, 'Incorrect number of input arguments.');
end
-
-
endfunction
diff --git a/scilab2c/macros/GeneralFunctions/SCI2COpenFileWrite.sci b/scilab2c/macros/GeneralFunctions/SCI2COpenFileWrite.sci index 8a816b92..f87aef87 100644 --- a/scilab2c/macros/GeneralFunctions/SCI2COpenFileWrite.sci +++ b/scilab2c/macros/GeneralFunctions/SCI2COpenFileWrite.sci @@ -24,7 +24,7 @@ SCI2CNInArgCheck(argn(2),1,1); // --- Open the .sci file (write mode). ---
[fidnumber,fiderror] = mopen(filename,'w');
if (fiderror < 0)
- SCI2Cerror(['Cannot open (in write mode): '+filename]);
+ error(9999, 'Cannot open (in write mode): '+filename);
end
endfunction
diff --git a/scilab2c/macros/GeneralFunctions/filenamefprintf.sci b/scilab2c/macros/GeneralFunctions/filenamefprintf.sci index 0b64bd88..99ddcea4 100644 --- a/scilab2c/macros/GeneralFunctions/filenamefprintf.sci +++ b/scilab2c/macros/GeneralFunctions/filenamefprintf.sci @@ -33,7 +33,7 @@ SCI2CNInArgCheck(argn(2),4,4); // [FidReportFile, mess] = mopen(deblank(filename),'at+');
[FidReportFile, mess] = mopen(filename,'a+');
if (FidReportFile == -1) then
- SCI2Cerror(mess);
+ error(9999, mess);
end
if formattedstring == 'n'
mputstr(str,FidReportFile);
diff --git a/scilab2c/macros/SymbolTable/ST_AnalyzeScope.sci b/scilab2c/macros/SymbolTable/ST_AnalyzeScope.sci index bb38ea73..c89c359a 100644 --- a/scilab2c/macros/SymbolTable/ST_AnalyzeScope.sci +++ b/scilab2c/macros/SymbolTable/ST_AnalyzeScope.sci @@ -63,8 +63,8 @@ for cntout = 1:NOutArg PrintStringInfo(' ...not found in: '+SymbolTableFileName+'.',ReportFileName,'file','y');
// #RNU_RES_E
else
- SCI2CerrorFile('Found a temp symbol in '+SymbolTableFileName+...
- ' with the same name of the equal output argument ""'+TBName+'"".',ReportFileName);
+ error(9999, 'Found a temp symbol in '+SymbolTableFileName+...
+ ' with the same name of the equal output argument ""'+TBName+'"".');
end
// #RNU_RES_B
diff --git a/scilab2c/macros/SymbolTable/ST_Del.sci b/scilab2c/macros/SymbolTable/ST_Del.sci index 6401a2b5..7eda874d 100644 --- a/scilab2c/macros/SymbolTable/ST_Del.sci +++ b/scilab2c/macros/SymbolTable/ST_Del.sci @@ -29,7 +29,7 @@ SCI2CSymbolTable = ST_Load(SymbolTableFileName); [TBFlagfound,TBPosition] = ST_FindPos(TBName,SymbolTableFileName);
if (TBFlagfound == 0)
- SCI2Cerror('Missing symbol: trying to del a non existing symbol ""'+TBName+'"".');
+ error(9999, 'Missing symbol: trying to del a non existing symbol ""'+TBName+'"".');
elseif (TBFlagfound == 1)
// --- Update symbol table. ---
SCI2CSymbolTable(TBPosition) = [];
diff --git a/scilab2c/macros/SymbolTable/ST_FindPos.sci b/scilab2c/macros/SymbolTable/ST_FindPos.sci index bfba11d1..737b7de4 100644 --- a/scilab2c/macros/SymbolTable/ST_FindPos.sci +++ b/scilab2c/macros/SymbolTable/ST_FindPos.sci @@ -40,7 +40,7 @@ for countertable = 1:NEntries end
if (TBFlagfound > 1)
- SCI2Cerror('Symbol table conflict: found two symbols with the same name ""'+TBName+'"".');
+ error(9999, 'Symbol table conflict: found two symbols with the same name ""'+TBName+'"".');
end
endfunction
diff --git a/scilab2c/macros/SymbolTable/ST_Get.sci b/scilab2c/macros/SymbolTable/ST_Get.sci index b702cacf..636a873a 100644 --- a/scilab2c/macros/SymbolTable/ST_Get.sci +++ b/scilab2c/macros/SymbolTable/ST_Get.sci @@ -31,7 +31,7 @@ SCI2CNInArgCheck(argn(2),2,2); // --------------------------
[tmpnams,tmptyps,tmpdims,tmpvols]=listvarinfile(SymbolTableFileName);
if (max(size(tmpnams)) > 1)
- SCI2Cerror('More than one variable found in ""'+SymbolTableFileName+'"".');
+ error(9999, 'More than one variable found in ""'+SymbolTableFileName+'"".');
end
load(SymbolTableFileName,tmpnams);
SCI2CSymbolTable = eval(tmpnams);
@@ -59,6 +59,6 @@ for countertable = 1:NEntries end
if (TBFlagfound > 1)
- SCI2Cerror('Symbol table conflict: found two symbols with the same name ""'+TBName+'"".');
+ error(9999, 'Symbol table conflict: found two symbols with the same name ""'+TBName+'"".');
end
endfunction
diff --git a/scilab2c/macros/SymbolTable/ST_GetInArgInfo.sci b/scilab2c/macros/SymbolTable/ST_GetInArgInfo.sci index 56997e54..1fe060a5 100644 --- a/scilab2c/macros/SymbolTable/ST_GetInArgInfo.sci +++ b/scilab2c/macros/SymbolTable/ST_GetInArgInfo.sci @@ -62,7 +62,7 @@ for cntinarg = 1:NInArg elseif (SharedInfo.DefaultPrecision == 'd')
UpdatedInArg(cntinarg).Type = 'z'; // It is the default.
else
- SCI2Cerror('Unexpected value for SharedInfo.DefaultPrecision: ""'+SharedInfo.DefaultPrecision+'""');
+ error(9999, 'Unexpected value for SharedInfo.DefaultPrecision: ""'+SharedInfo.DefaultPrecision+'""');
end
end
if (tmpname == '%pi')
@@ -136,7 +136,7 @@ for cntinarg = 1:NInArg PrintStringInfo('SCI2CERROR: Before running the SCI2C translator, remember to run the code you are trying',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: to translate in order to check syntax errors.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Unknown symbol ""'+tmpname+'"".');
end
UpdatedInArg(cntinarg).Type = TBType;
UpdatedInArg(cntinarg).Size = TBSize;
@@ -146,7 +146,7 @@ for cntinarg = 1:NInArg UpdatedInArg(cntinarg).Scope = TBScope;
else
- SCI2Cerror('Unknown scope identifier ""'+tmpscope+'"" for variable ""'+tmpname+'"".');
+ error(9999, 'Unknown scope identifier ""'+tmpscope+'"" for variable ""'+tmpname+'"".');
end
// #RNU_RES_B
PrintStringInfo(' Type: '+UpdatedInArg(cntinarg).Type,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
diff --git a/scilab2c/macros/SymbolTable/ST_InsOutArg.sci b/scilab2c/macros/SymbolTable/ST_InsOutArg.sci index c6051772..f10548fc 100644 --- a/scilab2c/macros/SymbolTable/ST_InsOutArg.sci +++ b/scilab2c/macros/SymbolTable/ST_InsOutArg.sci @@ -69,7 +69,7 @@ for counteroutput = 1:NOutArg elseif mtlb_strcmp(OutArg(counteroutput).Scope,'Global')
SymbTableFileName = GlobalVarsFileName;
else
- SCI2Cerror('Unknown scope ""'+OutArg(counteroutput).Scope+'"" for symbol: '+OutArg(counteroutput).Name);
+ error(9999, 'Unknown scope ""'+OutArg(counteroutput).Scope+'"" for symbol: '+OutArg(counteroutput).Name);
end
// #RNU_RES_B
PrintStringInfo(' Setting symbol ""'+OutArg(counteroutput).Name+'"" in '+SymbTableFileName+'.',ReportFileName,'file','y');
@@ -100,7 +100,8 @@ for counteroutput = 1:NOutArg PrintStringInfo('SCI2CERROR: Please check that you are not using variable ""'+OutArg(counteroutput).Name+'""',ReportFileName,'both','y');
PrintStringInfo('SCI2CERROR: with different sizes and/or types.',ReportFileName,'both','y');
PrintStringInfo(' ',ReportFileName,'both','y');
- SCI2Cerror(' ');
+ error(9999, 'SCI2CERROR: Symbol Table Conflict. Trying to insert again symbol ""'+...
+ OutArg(counteroutput).Name+'"" with different settings');
else
// #RNU_RES_B
// It's ok symbols do match.
diff --git a/scilab2c/macros/SymbolTable/ST_Load.sci b/scilab2c/macros/SymbolTable/ST_Load.sci index fc99ff3c..dbe53456 100644 --- a/scilab2c/macros/SymbolTable/ST_Load.sci +++ b/scilab2c/macros/SymbolTable/ST_Load.sci @@ -25,7 +25,7 @@ function SCI2CSymbolTable = ST_Load(SymbolTableFileName) // --------------------------
[tmpnams,tmptyps,tmpdims,tmpvols]=listvarinfile(SymbolTableFileName);
if (max(size(tmpnams)) > 1)
- SCI2Cerror('More than one variable found in ""'+SymbolTableFileName+'"".');
+ error(9999, 'More than one variable found in ""'+SymbolTableFileName+'"".');
end
load(SymbolTableFileName,tmpnams);
SCI2CSymbolTable = eval(tmpnams);
diff --git a/scilab2c/macros/ToolInitialization/ManageNextConversion.sci b/scilab2c/macros/ToolInitialization/ManageNextConversion.sci index 8b2546bf..68604213 100644 --- a/scilab2c/macros/ToolInitialization/ManageNextConversion.sci +++ b/scilab2c/macros/ToolInitialization/ManageNextConversion.sci @@ -59,8 +59,7 @@ if (SharedInfo.NFilesToTranslate >= 1) [FlagFound,SharedInfo.NextSCIFileName] = ...
SCI2CFindFile(FileInfo.UserSciFilesPaths,SharedInfo.NextSCIFunName+'.sci');
if (FlagFound == 0)
- SCI2CerrorFile('Cannot find a scilab file to generate ""'+SharedInfo.NextCFunName+'"".',...
- FileInfo.GeneralReport);
+ error(9999, 'Cannot find a scilab file to generate ""'+SharedInfo.NextCFunName+'"".');
end
end
// ----------------------------------------------------
|