summaryrefslogtreecommitdiff
path: root/macros/FunctionAnnotation/FA_GetFunAnn.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/FunctionAnnotation/FA_GetFunAnn.sci')
-rw-r--r--macros/FunctionAnnotation/FA_GetFunAnn.sci15
1 files changed, 13 insertions, 2 deletions
diff --git a/macros/FunctionAnnotation/FA_GetFunAnn.sci b/macros/FunctionAnnotation/FA_GetFunAnn.sci
index 912d099..d11e3ce 100644
--- a/macros/FunctionAnnotation/FA_GetFunAnn.sci
+++ b/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;