summaryrefslogtreecommitdiff
path: root/2.3-1/macros/FunctionAnnotation
diff options
context:
space:
mode:
authorsiddhu89902016-10-18 10:31:23 +0530
committersiddhu89902016-10-18 10:31:23 +0530
commitcdd9bf519d594b87c07193d2770b81a07829a50c (patch)
treec8985f43c314cafcfa04053a821116424d54c2a1 /2.3-1/macros/FunctionAnnotation
parentf0ef5a2d4560f166751b58020ee5a2bc70904611 (diff)
downloadScilab2C-cdd9bf519d594b87c07193d2770b81a07829a50c.tar.gz
Scilab2C-cdd9bf519d594b87c07193d2770b81a07829a50c.tar.bz2
Scilab2C-cdd9bf519d594b87c07193d2770b81a07829a50c.zip
Suppressed declaration of not required variables and functions
Diffstat (limited to '2.3-1/macros/FunctionAnnotation')
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.binbin30680 -> 31780 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci15
2 files changed, 13 insertions, 2 deletions
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.bin b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.bin
index 3c2f9d4c..b38770ee 100644
--- a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.bin
+++ b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.bin
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci
index 912d099a..d11e3cee 100644
--- a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci
+++ b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci
@@ -1,4 +1,4 @@
-function [FunTypeAnnot,FunSizeAnnot] = ...
+function [FunTypeAnnot,FunSizeAnnot,NOutArg_mod] = ...
FA_GetFunAnn(NInArg,NOutArg,FunName,FileInfo,SharedInfo)
// function [FunTypeAnnot,FunSizeAnnot] = ...
// FA_GetFunAnn(NInArg,NOutArg,FunName,FileInfo,SharedInfo)
@@ -71,6 +71,7 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0))
// #RNU_RES_E
if (SCI2Cstrncmps1size(SharedInfo.Annotations.FUNNIN,check_string))
FUNNINAnnot = part(check_string,length(SharedInfo.Annotations.FUNNIN)+1:length(check_string));
+
// #RNU_RES_B
// --- Check NIN value. ---
// #RNU_RES_E
@@ -89,7 +90,6 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0))
// #RNU_RES_E
if (SCI2Cstrncmps1size(SharedInfo.Annotations.FUNNOUT,check_string))
FUNNOUTAnnot = part(check_string,length(SharedInfo.Annotations.FUNNOUT)+1:length(check_string));
-
// #RNU_RES_B
// --- Check NOUT value. ---
// #RNU_RES_E
@@ -99,6 +99,8 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0))
ReportFileName,'file','y');
// #RNU_RES_E
FoundNOut = 1;
+ elseif(eval(FUNNOUTAnnot) == 0)
+ FoundNOut = 1
else
FoundNIn = 0;
end
@@ -131,6 +133,15 @@ if (FoundNOut*FoundNIn == 0)
PrintStringInfo(' ',ReportFileName,'both','y');
error(9999, 'SCI2CERROR: Incorrect function annotation.');
else
+ //This change has been made in order to supress the generation
+ //of output variables in case of functions which do not return
+ //anything.
+ if(eval(FUNNOUTAnnot) == 0)
+ NOutArg_mod = 0;
+ else
+ NOutArg_mod = NOutArg
+ end
+
// In case we are reading to much informations
readNewLine = %t;