diff options
Diffstat (limited to '2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci')
-rw-r--r-- | 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci index e191f106..fad638a3 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -1,4 +1,7 @@ + function [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,ASTFunType) +function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) + // function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) // ----------------------------------------------------------------- // #RNU_RES_B @@ -37,6 +40,7 @@ function [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,F // ------------------------------ // --- Check input arguments. --- // ------------------------------ + SCI2CNInArgCheck(argn(2),4,4); // ----------------------- @@ -89,6 +93,11 @@ NOutArg_mod = NOutArg disp_isthere = 1; end +if (ASTFunType=='Funcall') +SharedInfo.Function_list(SharedInfo.Function_list_index) = ASTFunName; +SharedInfo.Function_list_index = SharedInfo.Function_list_index + 1; +end +NOutArg_mod = NOutArg if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T) SharedInfo.OpenCVUsed = %T; end @@ -364,6 +373,10 @@ NOutArg_mod = NOutArg PrintStringInfo(' returning back due logical function',ReportFileName,'file','y'); return; end + + else + [OutArg,SharedInfo] = GenOutArgNames(ASTFunName,InArg,NInArg,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo); + end if ((ASTFunName == 'uint8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) @@ -468,6 +481,14 @@ NOutArg_mod = NOutArg //#RNU_RES_B PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y'); if(IsArduinoFunction(ASTFunName)) + + CFunName = C_GenerateFunName(ASTFunName,InArg,NInArg,OutArg,NOutArg_mod); + + //#RNU_RES_B + PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y'); + if(IsArduinoFunction(ASTFunName)) + //disp(ASTFunName) + if(IsArduinoSetupFunction(ASTFunName)) //If current function is an arduino setup function (like 'dc_motor_setup'), it //should not be converted and inserted here. It is inserted in a list now and |