diff options
author | jofret | 2010-06-23 19:44:55 +0000 |
---|---|---|
committer | jofret | 2010-06-23 19:44:55 +0000 |
commit | dafe68b1f05c3d1d288e7435b3f146326ea4eebc (patch) | |
tree | 441af19e42a3f486f2348ca1fd1824e7c9f3ff20 /macros/SymbolTable | |
parent | 43f050700865808bde98b87129070ded818961f1 (diff) | |
download | scilab2c-dafe68b1f05c3d1d288e7435b3f146326ea4eebc.tar.gz scilab2c-dafe68b1f05c3d1d288e7435b3f146326ea4eebc.tar.bz2 scilab2c-dafe68b1f05c3d1d288e7435b3f146326ea4eebc.zip |
Remove SCI2Cerror wrapping call
Diffstat (limited to 'macros/SymbolTable')
-rw-r--r-- | macros/SymbolTable/ST_AnalyzeScope.sci | 4 | ||||
-rw-r--r-- | macros/SymbolTable/ST_Del.sci | 2 | ||||
-rw-r--r-- | macros/SymbolTable/ST_FindPos.sci | 2 | ||||
-rw-r--r-- | macros/SymbolTable/ST_Get.sci | 4 | ||||
-rw-r--r-- | macros/SymbolTable/ST_GetInArgInfo.sci | 6 | ||||
-rw-r--r-- | macros/SymbolTable/ST_InsOutArg.sci | 5 | ||||
-rw-r--r-- | macros/SymbolTable/ST_Load.sci | 2 |
7 files changed, 13 insertions, 12 deletions
diff --git a/macros/SymbolTable/ST_AnalyzeScope.sci b/macros/SymbolTable/ST_AnalyzeScope.sci index bb38ea73..c89c359a 100644 --- a/macros/SymbolTable/ST_AnalyzeScope.sci +++ b/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/macros/SymbolTable/ST_Del.sci b/macros/SymbolTable/ST_Del.sci index 6401a2b5..7eda874d 100644 --- a/macros/SymbolTable/ST_Del.sci +++ b/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/macros/SymbolTable/ST_FindPos.sci b/macros/SymbolTable/ST_FindPos.sci index bfba11d1..737b7de4 100644 --- a/macros/SymbolTable/ST_FindPos.sci +++ b/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/macros/SymbolTable/ST_Get.sci b/macros/SymbolTable/ST_Get.sci index b702cacf..636a873a 100644 --- a/macros/SymbolTable/ST_Get.sci +++ b/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/macros/SymbolTable/ST_GetInArgInfo.sci b/macros/SymbolTable/ST_GetInArgInfo.sci index 56997e54..1fe060a5 100644 --- a/macros/SymbolTable/ST_GetInArgInfo.sci +++ b/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/macros/SymbolTable/ST_InsOutArg.sci b/macros/SymbolTable/ST_InsOutArg.sci index c6051772..f10548fc 100644 --- a/macros/SymbolTable/ST_InsOutArg.sci +++ b/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/macros/SymbolTable/ST_Load.sci b/macros/SymbolTable/ST_Load.sci index fc99ff3c..dbe53456 100644 --- a/macros/SymbolTable/ST_Load.sci +++ b/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);
|