summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2019-05-16 12:36:11 +0530
committerSunil Shetye2019-05-29 11:08:03 +0530
commit5808c44e344c3f80504ec93d2bb588e83d0170b8 (patch)
tree6dad3b3663903bad863721a28a39b6d79f942d4c
parent26b77d7593b5ee0792b6b556f5569ea4227c2b02 (diff)
downloadscilab2c-5808c44e344c3f80504ec93d2bb588e83d0170b8.tar.gz
scilab2c-5808c44e344c3f80504ec93d2bb588e83d0170b8.tar.bz2
scilab2c-5808c44e344c3f80504ec93d2bb588e83d0170b8.zip
replace SCI2Cerror
-rw-r--r--macros/ASTManagement/AST_CheckLineLength.sci2
-rw-r--r--macros/ASTManagement/Operator2FunName.sci2
-rw-r--r--macros/CCodeGeneration/C_ForExpression.sci2
-rw-r--r--macros/CCodeGeneration/C_Funcall.sci8
-rw-r--r--macros/CCodeGeneration/GetWhileCondVariable.sci3
-rw-r--r--macros/CCodeGeneration/JoinDeclarAndCcode.sci3
-rw-r--r--macros/ErrorMessages/EM_NanSize.sci2
-rw-r--r--macros/GeneralFunctions/SCI2COpenFileRead.sci2
-rw-r--r--macros/GeneralFunctions/SCI2Ccopyfile.sci2
-rw-r--r--macros/GeneralFunctions/SCI2Cfileexist.sci2
-rw-r--r--macros/SymbolTable/ST_Save.sci4
-rw-r--r--macros/ToolInitialization/INIT_RemoveDirs.sci8
12 files changed, 21 insertions, 19 deletions
diff --git a/macros/ASTManagement/AST_CheckLineLength.sci b/macros/ASTManagement/AST_CheckLineLength.sci
index 3973b188..78205f09 100644
--- a/macros/ASTManagement/AST_CheckLineLength.sci
+++ b/macros/ASTManagement/AST_CheckLineLength.sci
@@ -25,7 +25,7 @@ SCI2CNInArgCheck(argn(2),1,1);
// TODO : Remove me
//if length(instring) > 77
-// SCI2Cerror('Line too long: please reduce the length of the current line.');
+// error(9999, 'Line too long: please reduce the length of the current line.');
//end
endfunction
diff --git a/macros/ASTManagement/Operator2FunName.sci b/macros/ASTManagement/Operator2FunName.sci
index 18878ebf..eb1a0ee9 100644
--- a/macros/ASTManagement/Operator2FunName.sci
+++ b/macros/ASTManagement/Operator2FunName.sci
@@ -59,7 +59,7 @@ elseif (OperatorName == '.\')
FunName = FuncPrefix+'DotBackSlash'+FuncSuffix;
elseif (OperatorName == '\')
//PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
- //SCI2Cerror(' ');
+ //error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
FunName = FuncPrefix+'BackSlash'+FuncSuffix;
elseif (OperatorName == '.\')
PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
diff --git a/macros/CCodeGeneration/C_ForExpression.sci b/macros/CCodeGeneration/C_ForExpression.sci
index 383d53ea..38ace3fd 100644
--- a/macros/CCodeGeneration/C_ForExpression.sci
+++ b/macros/CCodeGeneration/C_ForExpression.sci
@@ -211,7 +211,7 @@ else
// --- Case 5. ---
// ---------------
- SCI2Cerror('Could not manage the for expression.');
+ error(9999, 'Could not manage the for expression.');
end
endfunction
diff --git a/macros/CCodeGeneration/C_Funcall.sci b/macros/CCodeGeneration/C_Funcall.sci
index 450ad088..8d60b7eb 100644
--- a/macros/CCodeGeneration/C_Funcall.sci
+++ b/macros/CCodeGeneration/C_Funcall.sci
@@ -127,7 +127,7 @@ end
// // #RNU_RES_E
// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y');
// else
-// SCI2Cerror('Don''t know how to manage size function with number of output args different from 1 and 2.');
+// error(9999, 'Don''t know how to manage size function with number of output args different from 1 and 2.');
// end
// elseif (NInArg == 2)
// if (NOutArg == 1)
@@ -144,13 +144,13 @@ end
// // #RNU_RES_E
// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y');
// else
-// SCI2Cerror('Not known the value of the second input arg for the size function.');
+// error(9999, 'Not known the value of the second input arg for the size function.');
// end
// else
-// SCI2Cerror('Don''t know how to manage size function with number of output args different from 1.');
+// error(9999, 'Don''t know how to manage size function with number of output args different from 1.');
// end
// else
-// SCI2Cerror('Don''t know how to manage size function with number of input args different from 1 and 2.');
+// error(9999, 'Don''t know how to manage size function with number of input args different from 1 and 2.');
// end
// return;
// end
diff --git a/macros/CCodeGeneration/GetWhileCondVariable.sci b/macros/CCodeGeneration/GetWhileCondVariable.sci
index ba4c7e92..4a207ae1 100644
--- a/macros/CCodeGeneration/GetWhileCondVariable.sci
+++ b/macros/CCodeGeneration/GetWhileCondVariable.sci
@@ -61,7 +61,8 @@ if ((SharedInfo.WhileExpr.OnExec > 0) & (NOutArg==1))
//RNU: secondo me la matrice finale non e' supportata dalla while, ma while(det(M)>0)
//RNU: puo' essere benissimo supportato.
// if (OutArg.Dimension > 0)
- // SCI2CerrorFile('Cannot manage while with matrix conditions',ReportFileName);
+ // PrintStringInfo('Cannot manage while with matrix conditions',ReportFileName,'file','y');
+ // error(9999, 'Cannot manage while with matrix conditions');
// SharedInfo.SkipNextFun = 0; //NUT verifica se serve
// end
// #RNU_RES_E
diff --git a/macros/CCodeGeneration/JoinDeclarAndCcode.sci b/macros/CCodeGeneration/JoinDeclarAndCcode.sci
index 35607f6d..76ee0a22 100644
--- a/macros/CCodeGeneration/JoinDeclarAndCcode.sci
+++ b/macros/CCodeGeneration/JoinDeclarAndCcode.sci
@@ -100,7 +100,8 @@ while ((~meof(CPass1V1FileFid)) & (FoundCurlyBracket == 0))
end
if (FoundCurlyBracket == 0)
- SCI2CerrorFile('""{"" char not found in:'+CPass1FileName,ReportFileName);
+ PrintStringInfo('""{"" char not found in:'+CPass1FileName,ReportFileName,'file','y');
+ error(9999, '""{"" char not found in:'+CPass1FileName);
end
PrintStringInfo('/*',CPass2FileName,'file','y');
diff --git a/macros/ErrorMessages/EM_NanSize.sci b/macros/ErrorMessages/EM_NanSize.sci
index 156bb9a0..a081fea8 100644
--- a/macros/ErrorMessages/EM_NanSize.sci
+++ b/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(9999, 'SCI2CERROR: Cannot initialize a local or global variable with a variable value coming from a function or an operation.');
+error(9999, 'SCI2CERROR: Cannot initialize a local or global variable with a variable value coming from a function or an operation.');
endfunction
diff --git a/macros/GeneralFunctions/SCI2COpenFileRead.sci b/macros/GeneralFunctions/SCI2COpenFileRead.sci
index 1132a507..fec1090b 100644
--- a/macros/GeneralFunctions/SCI2COpenFileRead.sci
+++ b/macros/GeneralFunctions/SCI2COpenFileRead.sci
@@ -24,7 +24,7 @@ SCI2CNInArgCheck(argn(2),1,1);
// --- Open the .sci file (read only). ---
[fidnumber,fiderror] = mopen(filename,'r');
if (fiderror < 0)
- SCI2Cerror(['Cannot open (in read mode): '+filename]);
+ error(9999, 'Cannot open (in read mode): '+filename);
end
endfunction
diff --git a/macros/GeneralFunctions/SCI2Ccopyfile.sci b/macros/GeneralFunctions/SCI2Ccopyfile.sci
index 40d43f40..7c459b56 100644
--- a/macros/GeneralFunctions/SCI2Ccopyfile.sci
+++ b/macros/GeneralFunctions/SCI2Ccopyfile.sci
@@ -43,7 +43,7 @@ elseif (CopyMode == 'overwrite')
PrintStringInfo(' ', OutFileName, 'file', 'y'); // Cannot use scilab copyfile when the directory is empty!.
copyfile(InFileName,OutFileName);
else
- SCI2Cerror('Unknown CopyMode: ""'+CopyMode+'""');
+ error(9999, 'Unknown CopyMode: ""'+CopyMode+'""');
end
endfunction
diff --git a/macros/GeneralFunctions/SCI2Cfileexist.sci b/macros/GeneralFunctions/SCI2Cfileexist.sci
index d01a283d..d3122054 100644
--- a/macros/GeneralFunctions/SCI2Cfileexist.sci
+++ b/macros/GeneralFunctions/SCI2Cfileexist.sci
@@ -32,7 +32,7 @@ if (size(allfiles,1) == 0)
elseif (size(allfiles,1) == 1)
ExistTest = %T;
else
- SCI2Cerror('Very Strange! Found more than one file with the same name.');
+ error(9999, 'Very Strange! Found more than one file with the same name.');
end
endfunction
diff --git a/macros/SymbolTable/ST_Save.sci b/macros/SymbolTable/ST_Save.sci
index a925bbe9..be92ba46 100644
--- a/macros/SymbolTable/ST_Save.sci
+++ b/macros/SymbolTable/ST_Save.sci
@@ -24,7 +24,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
// Identifies the Table name and save it into the .dat file.
@@ -38,7 +38,7 @@ elseif (mtlb_strcmp(tmpnams,'TempVars'))
TempVars = SCI2CSymbolTable;
save(SymbolTableFileName, "TempVars");
else
- SCI2Cerror('Unknow table: ""'+tmpnams+'"".');
+ error(9999, 'Unknown table: ""'+tmpnams+'"".');
end
endfunction
diff --git a/macros/ToolInitialization/INIT_RemoveDirs.sci b/macros/ToolInitialization/INIT_RemoveDirs.sci
index 2e88caea..a70f4f18 100644
--- a/macros/ToolInitialization/INIT_RemoveDirs.sci
+++ b/macros/ToolInitialization/INIT_RemoveDirs.sci
@@ -46,8 +46,8 @@ if (SharedInfoRunMode == 'GenLibraryStructure' | SharedInfoRunMode == 'All')
// a new translation is launched. I only delete source files generated by user.
else
- SCI2Cerror('Cannot continue, because you don''t want to delete: '+FileInfo.WorkingDir);
- SCI2Cerror('Cannot continue, because you don''t want to delete: '+FileInfo.OutCCCodeDir);
+ error(9999, 'Cannot continue, because you don''t want to delete: '+FileInfo.WorkingDir);
+ error(9999, 'Cannot continue, because you don''t want to delete: '+FileInfo.OutCCCodeDir);
end
elseif (SharedInfoRunMode == 'Translate')
// #RNU_RES_B
@@ -61,14 +61,14 @@ elseif (SharedInfoRunMode == 'Translate')
if (yesno=='y')
rmdir(FileInfo.OutCCCodeDir,'s');
else
- SCI2Cerror('Cannot continue, because you don''t want to delete: '+FileInfo.OutCCCodeDir);
+ error(9999, 'Cannot continue, because you don''t want to delete: '+FileInfo.OutCCCodeDir);
end
elseif (SharedInfoRunMode == 'FunCall')
//Do nothing
else
disp('Unknown RunMode: ""'+SharedInfoRunMode+'"".');
disp('Please check RunMode parameter in the SCI2CInputParameters.sce file');
- SCI2Cerror(' ');
+ error(9999, 'Unknown RunMode: ""'+SharedInfoRunMode+'"". Please check RunMode parameter in the SCI2CInputParameters.sce file');
end
endfunction