summaryrefslogtreecommitdiff
path: root/2.3-1/macros
diff options
context:
space:
mode:
authorJorawar Singh2017-06-30 11:54:22 +0530
committerJorawar Singh2017-06-30 11:54:22 +0530
commit4c6f1a8cced5610ab5075ea61c507c1dbc25f520 (patch)
tree798ae26a88891509424f8ade489b87cbf2af2093 /2.3-1/macros
parent815306982a4ea8eaaa2106fadcd1472aa2a9dcd5 (diff)
parentf805bc9553b3d88d7c9e7dbf59486c5da490231e (diff)
downloadScilab2C-4c6f1a8cced5610ab5075ea61c507c1dbc25f520.tar.gz
Scilab2C-4c6f1a8cced5610ab5075ea61c507c1dbc25f520.tar.bz2
Scilab2C-4c6f1a8cced5610ab5075ea61c507c1dbc25f520.zip
merged main repo with local
Diffstat (limited to '2.3-1/macros')
-rw-r--r--2.3-1/macros/ASTManagement/%equal_string.sci2
-rw-r--r--2.3-1/macros/ASTManagement/%funcall_string.sci9
-rw-r--r--2.3-1/macros/ASTManagement/%operatio_string.sci14
-rw-r--r--2.3-1/macros/ASTManagement/%operation_string.sci2
-rw-r--r--2.3-1/macros/ASTManagement/AST2Ccode.sci90
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleCC.sci69
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci45
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleFunCC.sci176
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleFunRC.sci178
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleIfElse.sci6
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleRC.sci88
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci60
-rw-r--r--2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci2
-rw-r--r--2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci4
-rw-r--r--2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci51
-rw-r--r--2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci11
-rw-r--r--2.3-1/macros/ASTManagement/GenOutArgNames.sci110
-rw-r--r--2.3-1/macros/ASTManagement/_funcall_string.sci9
-rw-r--r--2.3-1/macros/ASTManagement/_operatio_string.sci2
-rw-r--r--2.3-1/macros/ASTManagement/_operation_string.sci2
-rw-r--r--2.3-1/macros/ASTManagement/libbin1864 -> 4861 bytes
-rw-r--r--2.3-1/macros/ASTManagement/names4
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci187
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci19
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci12
-rw-r--r--2.3-1/macros/CCodeGeneration/C_IfExpression.sci31
-rw-r--r--2.3-1/macros/CCodeGeneration/C_WhileExpression.sci28
-rw-r--r--2.3-1/macros/CCodeGeneration/GetClsFileName.sci4
-rw-r--r--2.3-1/macros/CCodeGeneration/libbin1008 -> 2449 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/names2
-rw-r--r--2.3-1/macros/ErrorMessages/libbin436 -> 379 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_FSFIRLIN_SZ.sci9
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci3
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_SZ_MODSN.sci11
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_SZ_U_SVA.sci39
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_TP_ASCII.sci10
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_TP_MODSN.sci10
-rw-r--r--2.3-1/macros/FunctionAnnotation/libbin2268 -> 7053 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/names5
-rw-r--r--2.3-1/macros/FunctionList/libbin504 -> 741 bytes
-rw-r--r--2.3-1/macros/GeneralFunctions/libbin1132 -> 2809 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/libbin972 -> 2265 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/libbin892 -> 2037 bytes
-rw-r--r--2.3-1/macros/ImageProcessing/core/libbin524 -> 293 bytes
-rw-r--r--2.3-1/macros/ImageProcessing/highgui/libbin584 -> 471 bytes
-rw-r--r--2.3-1/macros/ImageProcessing/imgproc/libbin752 -> 1145 bytes
-rw-r--r--2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci3
-rw-r--r--2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci4
-rw-r--r--2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/cmd_i2c_dev.sci3
-rw-r--r--2.3-1/macros/Scilab-Arduino/cmd_i2c_read.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/cmd_i2c_read_register.sci3
-rw-r--r--2.3-1/macros/Scilab-Arduino/cmd_i2c_write.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/cmd_i2c_write_register.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/libbin512 -> 759 bytes
-rw-r--r--2.3-1/macros/Scilab-Arduino/names5
-rw-r--r--2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci15
-rw-r--r--2.3-1/macros/SymbolTable/ST_InsOutArg.sci2
-rw-r--r--2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci195
-rw-r--r--2.3-1/macros/SymbolTable/libbin728 -> 1199 bytes
-rw-r--r--2.3-1/macros/SymbolTable/names1
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci1355
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci4
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.sci4
-rw-r--r--2.3-1/macros/ToolInitialization/ManageNextConversion.sci2
-rw-r--r--2.3-1/macros/ToolInitialization/libbin804 -> 1543 bytes
-rw-r--r--2.3-1/macros/cb_sci2c_gui.sci73
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.sci53
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.sci49
-rw-r--r--2.3-1/macros/findDeps/getAllSources.sci75
-rw-r--r--2.3-1/macros/findDeps/getArduinoFiles.sci1
-rw-r--r--2.3-1/macros/findDeps/libbin596 -> 679 bytes
-rw-r--r--2.3-1/macros/libbin536 -> 649 bytes
-rw-r--r--2.3-1/macros/runsci2c.sci6
-rw-r--r--2.3-1/macros/sci2c_gui.sci38
-rw-r--r--2.3-1/macros/scilab2c.sci42
76 files changed, 3085 insertions, 160 deletions
diff --git a/2.3-1/macros/ASTManagement/%equal_string.sci b/2.3-1/macros/ASTManagement/%equal_string.sci
index 9678f0e0..041fb84a 100644
--- a/2.3-1/macros/ASTManagement/%equal_string.sci
+++ b/2.3-1/macros/ASTManagement/%equal_string.sci
@@ -13,4 +13,4 @@ function txt=%equal_string(e)
' '+objectlist2string(e.lhs)
'EndEqual'
]
-endfunction \ No newline at end of file
+endfunction
diff --git a/2.3-1/macros/ASTManagement/%funcall_string.sci b/2.3-1/macros/ASTManagement/%funcall_string.sci
index faeb81d9..0ee97016 100644
--- a/2.3-1/macros/ASTManagement/%funcall_string.sci
+++ b/2.3-1/macros/ASTManagement/%funcall_string.sci
@@ -6,10 +6,19 @@ function txt=%funcall_string(F)
// name : string, the name of the function
// lhsnb: number, the number of function lhs
+if F.name <> 'disp'
txt=['Funcall : '+F.name
' #lhs : '+string(F.lhsnb)
' Rhs : '
' '+objectlist2string(F.rhs)
'EndFuncall'
]
+else
+txt=['Funcall : '+F.name
+ ' #lhs : '+'0'
+ ' Rhs : '
+ ' '+objectlist2string(F.rhs)
+ 'EndFuncall'
+ ]
+end
endfunction
diff --git a/2.3-1/macros/ASTManagement/%operatio_string.sci b/2.3-1/macros/ASTManagement/%operatio_string.sci
index 8421a3f4..cc18e919 100644
--- a/2.3-1/macros/ASTManagement/%operatio_string.sci
+++ b/2.3-1/macros/ASTManagement/%operatio_string.sci
@@ -4,10 +4,22 @@ function txt=%operatio_string(O)
//fields:
// operands: a list
// operator: a string
+if O.operator <> 'rc' & O.operator <> 'cc'
txt=['Operation'
' Operands:'
' '+objectlist2string(O.operands)
' Operator: '+O.operator
'EndOperation'
]
-endfunction \ No newline at end of file
+elseif O.operator == 'rc'
+ txt=[' Operands:'
+ ' '+objectlist2string(O.operands)
+ 'Endrc'
+ ]
+elseif O.operator == 'cc'
+ txt=[' Begin:'
+ ' '+objectlist2string(O.operands)
+ 'Endcc'
+ ]
+end
+endfunction
diff --git a/2.3-1/macros/ASTManagement/%operation_string.sci b/2.3-1/macros/ASTManagement/%operation_string.sci
index 84f5ce3c..c9282f67 100644
--- a/2.3-1/macros/ASTManagement/%operation_string.sci
+++ b/2.3-1/macros/ASTManagement/%operation_string.sci
@@ -10,4 +10,4 @@ function txt=%operation_string(O)
' Operator: '+O.operator
'EndOperation'
]
-endfunction \ No newline at end of file
+endfunction
diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci
index 8076d7e2..563f3133 100644
--- a/2.3-1/macros/ASTManagement/AST2Ccode.sci
+++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci
@@ -46,6 +46,13 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
// ---------------------------------
// --- Parameter Initialization. ---
// ---------------------------------
+
+global cc_count
+cc_count = 0;
+
+global rc_count
+rc_count = 0;
+
global SCI2CSTACK
SCI2CSTACK = ['EMPTYSTACK'];
@@ -54,6 +61,9 @@ StackPosition = 1;
global STACKDEDUG
STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen.
+
+global disp_isthere
+disp_isthere = 0;
// -------------------------------------
// --- End parameter Initialization. ---
// -------------------------------------
@@ -132,9 +142,10 @@ while ~meof(fidAST)
//NUT: qui puoi anche aggiunger piu' case per specificare meglio la struttura della funcall
//NUT: i case aggiunti ovviamente faranno solo il push della treeline.
case 'EndOperation' then
- [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Operation');
+ [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Operation');
case 'EndFuncall' then
- [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Funcall');
+ [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Funcall');
+ disp(disp_isthere);
// --------------
// --- Equal. ---
@@ -144,25 +155,60 @@ while ~meof(fidAST)
//NUT: per fare in modo di coprire le ins, anche se ci puo' essere qualche rischio quando
//NUT: ho miste ins e variabili, per esempio [c(1,1), a] = twooutfun();
//NUT: in questo caso solo una delle due equal va scartata.
- [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal');
- SharedInfo = INIT_SharedInfoEqual(SharedInfo);
+ if rc_count > 0 & cc_count == 0
+ [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo);
+ rc_count = 0;
+ elseif cc_count > 0
+ [FileInfo,SharedInfo] = AST_HandleFunCC(cc_count,FileInfo,SharedInfo);
+ rc_count = 0;
+ cc_count = 0;
+ else
+ if disp_isthere == 0
+ [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Equal');
+ SharedInfo = INIT_SharedInfoEqual(SharedInfo);
+ end
+ end
+ disp_isthere = 0;
+
case 'Equal' then
SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block.
AST_PushASTStack(treeline);
case 'Lhs :' then
- SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal
- [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo);
-
- // lengthNumber = length('Number_');
- // if (part(EqualInArgScope,1:lengthNumber) == 'Number_')
- // SharedInfo.SkipNextEqual = 1
- // end
- SharedInfo.Equal.NInArg = EqualNInArg;
- for tmpcnt = 1:SharedInfo.Equal.NInArg
- SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt);
- SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt);
- end
- AST_PushASTStack(treeline);
+ disp(disp_isthere);
+ if rc_count > 0 & cc_count == 0
+ SharedInfo.Equal.Lhs = 1;
+ [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo);
+ SharedInfo.Equal.NInArg = EqualNInArg - rc_count -1;
+ AST_PushASTStack(treeline);
+ for tmpcnt = 1:SharedInfo.Equal.NInArg
+ SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt);
+ SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt);
+ end
+ elseif cc_count > 0
+ SharedInfo.Equal.Lhs = 1;
+ [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleCC(FileInfo,SharedInfo);
+ AST_PushASTStack(treeline);
+ else
+ SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal
+ //if SharedInfo.Equal.NOutArg > 0
+ if disp_isthere == 0
+ [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo);
+ SharedInfo.Equal.NInArg = EqualNInArg;
+ //end
+
+ // lengthNumber = length('Number_');
+ // if (part(EqualInArgScope,1:lengthNumber) == 'Number_')
+ // SharedInfo.SkipNextEqual = 1
+ // end
+
+ for tmpcnt = 1:SharedInfo.Equal.NInArg
+ SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt);
+ SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt);
+ end
+ //end
+ end
+ AST_PushASTStack(treeline);
+ end
// ----------------
// --- If/Else. ---
@@ -196,6 +242,7 @@ while ~meof(fidAST)
// -----------------
case 'EndProgram'
SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo);
+ disp_isthere = 0;
//NUT: per essere precisi si puo' pensare di mettere un check
//NUT: alla fine dell'albero per accertarsi che c'e' end program li' dove ce lo aspettiamo
@@ -229,6 +276,15 @@ while ~meof(fidAST)
SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo);
SharedInfo.While.Level = SharedInfo.While.Level - 1;
+
+ case 'Endrc' then
+ rc_count = rc_count + 1;
+
+ case 'Endcc' then
+ cc_count = cc_count + 1;
+
+ //[FileInfo,SharedInfo] = AST_HandleRC(FileInfo,SharedInfo);
+
// ----------------
// --- Default. ---
// ----------------
diff --git a/2.3-1/macros/ASTManagement/AST_HandleCC.sci b/2.3-1/macros/ASTManagement/AST_HandleCC.sci
new file mode 100644
index 00000000..cc411549
--- /dev/null
+++ b/2.3-1/macros/ASTManagement/AST_HandleCC.sci
@@ -0,0 +1,69 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Ukasha Noor
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function [RhsNames,RhsScope,NRhs] = AST_HandleCC(FileInfo,SharedInfo)
+
+SCI2CNInArgCheck(argn(2),2,2)
+
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+
+
+global SCI2CSTACK
+global StackPosition;
+global STACKDEDUG
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+// ------------------------------
+// --- Read input parameters. ---
+// ------------------------------
+cntpop = 1;
+NRhs = 0;
+RhsField(cntpop) = AST_PopASTStack();
+RhsNames = [];
+while (RhsField(cntpop) ~= 'Expression:')
+ if RhsField(cntpop) <> 'Operands:' & RhsField(cntpop) <> 'Begin:'
+ NRhs = NRhs + 1;
+
+ [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop));
+ end
+ cntpop = cntpop + 1;
+ RhsField(cntpop) = AST_PopASTStack();
+end
+RhsNames = SCI2Cflipud(RhsNames);
+RhsScope = SCI2Cflipud(RhsScope);
+
+// --- Repush everything into the stack. ---
+for cntpush = cntpop:-1:1
+ if RhsField(cntpush) <> 'Operands:' & RhsField(cntpush) <> 'Begin:'
+ PrintStringInfo(' ' + RhsField(cntpush),ReportFileName,'file','y');
+ AST_PushASTStack(RhsField(cntpush));
+ end
+end
+
+
+//for counterinputargs = 1:NRhs
+ //#RNU_RES_B
+ //disp(counterinputargs);
+ //PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+RhsNames(counterinputargs).Name,...
+ // ReportFileName,'file','y');
+ //PrintStringInfo(' Scope: '+RhsNames(counterinputargs).Scope,...
+ // ReportFileName,'file','y');
+ //#RNU_RES_E
+//end
+
+endfunction
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
index 26d6cb13..96830aa9 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
+++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
@@ -1,5 +1,5 @@
-function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType)
+function [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,ASTFunType)
// function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType)
// -----------------------------------------------------------------
// #RNU_RES_B
@@ -36,7 +36,7 @@ function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunT
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
-SCI2CNInArgCheck(argn(2),3,3);
+SCI2CNInArgCheck(argn(2),4,4);
// -----------------------
// --- Initialization. ---
@@ -61,6 +61,8 @@ PrintStepInfo('Handling Funcall/Operation/Equal',FileInfo.Funct(nxtscifunnumber)
global SCI2CSTACK
global StackPosition;
global STACKDEDUG
+
+disp_isthere = 0;
// ---------------------------
// --- End Initialization. ---
// ---------------------------
@@ -73,6 +75,19 @@ global STACKDEDUG
// #RNU_RES_E
[ASTFunName,InArg,NInArg,OutArg,NOutArg] = AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType);
NOutArg_mod = NOutArg
+ if ASTFunName == 'OpLogAnd'
+ AST_PushASTStack('&&');
+ return ;
+ end
+ if ASTFunName == 'OpLogOr'
+ AST_PushASTStack('||');
+ return;
+ end
+
+ if ASTFunName == 'disp'
+ disp_isthere = 1;
+ end
+
if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T)
SharedInfo.OpenCVUsed = %T;
end
@@ -121,6 +136,13 @@ NOutArg_mod = NOutArg
// --- Read the function annotations. ---
// --------------------------------------
// #RNU_RES_E
+ if ASTFunName == '%k'
+ ASTFunName='modk';
+ end
+
+ if ASTFunName == '%sn'
+ ASTFunName='modsn';
+ end
if (ASTFunName == 'OpEqual')
FunTypeAnnot = '';
@@ -134,6 +156,7 @@ NOutArg_mod = NOutArg
// --- Search for Equal Lhs and precision specifier to be applied to the current function. ---
// -------------------------------------------------------------------------------------------
// #RNU_RES_E
+ PrintStringInfo(' no of out arguments' + string(NOutArg),ReportFileName,'file','y');
[LhsArg,NLhsArg,FunPrecSpecifier,SharedInfo] = AST_GetPrecAndLhsArg(OutArg,NOutArg,ASTFunName,FunTypeAnnot,FunSizeAnnot,ASTFunType,FileInfo,SharedInfo);
//NUT: questa funzione contiene troppi parametri e mi sembra disordinata.
@@ -331,8 +354,13 @@ NOutArg_mod = NOutArg
OutArg(1).Name = string(OutArg(1).Value);
elseif ((ASTFunName == 'double') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
OutArg(1).Name = string(OutArg(1).Value);
+ //elseif ASTFunName == 'disp'
else
[OutArg,SharedInfo] = GenOutArgNames(ASTFunName,InArg,NInArg,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo);
+ if ( ASTFunName == 'OpLogGt' | ASTFunName == 'OpLogLt' | ASTFunName == 'OpLogLe' | ASTFunName == 'OpLogGe' | ASTFunName == 'OpLogNe' | ASTFunName == 'OpLogEq')
+ PrintStringInfo(' returning back due logical function',ReportFileName,'file','y');
+ return;
+ end
end
if ((ASTFunName == 'uint8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
@@ -376,6 +404,8 @@ NOutArg_mod = NOutArg
// Scope already set above.
elseif (ASTFunName == 'double' & NInArg == 1 & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
// Scope already set above.
+ //elseif ASTFunName == 'disp'
+ //do nothing
else
OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo);
end
@@ -394,6 +424,8 @@ NOutArg_mod = NOutArg
//#RNUREM_ME A number is not inserted in the symbol table.
elseif ((ASTFunName == 'double') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
//#RNUREM_ME A number is not inserted in the symbol table.
+ //elseif ASTFunName == 'disp'
+ //do nothing
else
ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,'all');
end
@@ -426,8 +458,10 @@ NOutArg_mod = NOutArg
// --------------------------------------------
//#RNU_RES_E
//disp(OutArg,InArg,ASTFunName)
+
+
CFunName = C_GenerateFunName(ASTFunName,InArg,NInArg,OutArg,NOutArg_mod);
-
+
//#RNU_RES_B
PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y');
if(IsArduinoFunction(ASTFunName))
@@ -451,7 +485,8 @@ NOutArg_mod = NOutArg
else
LibTypeInfo = 'USER2C';
end
-
+
+
//#RNU_RES_B
// ------------------------------------------------------------------------------------
// --- Check whether the function has been already called in the current .sci file. ---
@@ -498,6 +533,8 @@ NOutArg_mod = NOutArg
SharedInfo.SkipNextFun > 0 | ...
((sum(mtlb_strcmp(ASTFunName,SharedInfo.Annotations.DataPrec)) > 0) & (SharedInfo.SkipNextPrec == 1)))
// Do nothing
+ //elseif ASTFunName == 'disp'
+ // Do nothing
else
AST_CheckCommonInOutArgs(InArg,NInArg,OutArg,NOutArg,ReportFileName);
end
diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci
new file mode 100644
index 00000000..1942c749
--- /dev/null
+++ b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci
@@ -0,0 +1,176 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Ukasha Noor
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+
+function [FileInfo,SharedInfo] = AST_HandleFunCC(NCol,FileInfo,SharedInfo)
+
+SCI2CNInArgCheck(argn(2),3,3)
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+global SCI2CSTACK
+global StackPosition;
+global STACKDEDUG
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// ------------------------------
+// --- Read output parameters. --
+// ------------------------------
+LhsField = AST_PopASTStack();
+NOutArg = 0;
+OutputArgumentNames = [];
+OutputArgumentScope = [];
+while (LhsField ~= 'Lhs :')
+ NOutArg = NOutArg + 1;
+ [OutputArgumentNames(NOutArg),OutputArgumentScope(NOutArg)] = AST_ExtractNameAndScope(LhsField);
+ LhsField = AST_PopASTStack();
+ if (LhsField == 'Expression:')
+ error(9999, 'Found Expression: before Lhs');
+ elseif (LhsField == 'Equal')
+ error(9999, 'Found Equal before Lhs');
+ end
+end
+
+// ------------------------------
+// --- Read input parameters. ---
+// ------------------------------
+
+
+RhsField = AST_PopASTStack();
+InputArgumentNames = [];
+InputArgumentScope = [];
+NInArg = 0;
+InArg = [];
+while (RhsField ~= 'Expression:')
+ NInArg = NInArg + 1;
+ if RhsField <> 'Operands:'
+ [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField);
+ end
+ //InArg(NInArg) = RhsField;
+ RhsField = AST_PopASTStack();
+end
+InputArgumentNames = SCI2Cflipud(InputArgumentNames);
+InputArgumentScope = SCI2Cflipud(InputArgumentScope);
+
+
+// -------------------------------------
+// --- Generate the InArg structure. ---
+// -------------------------------------
+//#RNU_RES_E
+for counterinputargs = 1:NInArg
+ InArg(counterinputargs).Name=InputArgumentNames(counterinputargs);
+ InArg(counterinputargs).Scope=InputArgumentScope(counterinputargs);
+end
+
+//#RNU_RES_B
+// -------------------------------------
+// --- Generate the InArg structure. ---
+// -------------------------------------
+//#RNU_RES_E
+OutArg = [];
+for counteroutputargs = 1:NOutArg
+ OutArg(counteroutputargs).Name=OutputArgumentNames(counteroutputargs);
+ OutArg(counteroutputargs).Scope=OutputArgumentScope(counteroutputargs);
+end
+
+// ------------------------
+// --- Print Some Info. ---
+// ------------------------
+
+PrintStringInfo('N Input Arguments: '+string(NInArg),ReportFileName,'file','y','n');
+PrintStringInfo('N Output Arguments: '+string(NOutArg),ReportFileName,'file','y');
+ //#RNU_RES_E
+ for counterinputargs = 1:NInArg
+ //#RNU_RES_B
+ PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+InArg(counterinputargs).Name,...
+ ReportFileName,'file','y','n');
+ PrintStringInfo(' Scope: '+InArg(counterinputargs).Scope,...
+ ReportFileName,'file','y','n');
+ //#RNU_RES_E
+ end
+ for counteroutputargs = 1:NOutArg
+ //#RNU_RES_B
+ PrintStringInfo('Output Argument Number '+string(counteroutputargs)+': '+OutArg(counteroutputargs).Name,...
+ ReportFileName,'file','y','n');
+ //PrintStringInfo(' Scope: '+ OutArg(counterinputargs).Scope,ReportFileName,'file','y','n');
+ //#RNU_RES_E
+ end
+
+NOutArg_mod = NOutArg;
+
+FunTypeAnnot = '';
+FunSizeAnnot = '';
+NLhsArg = 0;
+LhsArg = [];
+PrintStringInfo('...Equal not found.',ReportFileName,'file','y');
+
+PrintStringInfo('***Analyzing Input Arguments***',ReportFileName,'file','y');
+UpdatedInArg = InArg;
+[InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,'OpEqual');
+
+NCol = NCol + 1;
+NRow = NInArg/NCol;
+
+com_type = 0;
+for i = 1:NInArg
+ if InArg(i).Type == 'z'
+ com_type = 1;
+ elseif InArg(i).Type == 'c'
+ com_type = 2;
+ end
+end
+
+
+if com_type == 0
+ PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
+ OutArg(1).Type = InArg(1).Type;
+ OutArg(1).Size(1) = string(NCol);
+ OutArg(1).Size(2) = string(NRow);
+ OutArg(1).Dimension = 2;
+ OutArg(1).Value = InArg(1).Value;
+ OutArg(1).FindLike = InArg(1).FindLike;
+elseif com_type == 1
+ PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
+ OutArg(1).Type = 'z';
+ OutArg(1).Size(1) = string(NCol);
+ OutArg(1).Size(2) = string(NRow);
+ OutArg(1).Dimension = 2;
+ OutArg(1).Value = InArg(1).Value;
+ OutArg(1).FindLike = InArg(1).FindLike;
+else
+ PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
+ OutArg(1).Type = 'c';
+ OutArg(1).Size(1) = string(NCol);
+ OutArg(1).Size(2) = string(NRow);
+ OutArg(1).Dimension = 2;
+ OutArg(1).Value = InArg(1).Value;
+ OutArg(1).FindLike = InArg(1).FindLike;
+end
+
+//--- Check for output Argument in symbol table ---//
+OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo);
+
+//--- Put the output Argument in symbol table ---//
+ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedInfo,'all');
+
+
+endfunction
diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci
new file mode 100644
index 00000000..d3169249
--- /dev/null
+++ b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci
@@ -0,0 +1,178 @@
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Ukasha Noor
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+
+function [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo)
+
+SCI2CNInArgCheck(argn(2),2,2)
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+global SCI2CSTACK
+global StackPosition;
+global STACKDEDUG
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// ------------------------------
+// --- Read output parameters. --
+// ------------------------------
+LhsField = AST_PopASTStack();
+NOutArg = 0;
+OutputArgumentNames = [];
+OutputArgumentScope = [];
+while (LhsField ~= 'Lhs :')
+ NOutArg = NOutArg + 1;
+ [OutputArgumentNames(NOutArg),OutputArgumentScope(NOutArg)] = AST_ExtractNameAndScope(LhsField);
+ LhsField = AST_PopASTStack();
+ if (LhsField == 'Expression:')
+ error(9999, 'Found Expression: before Lhs');
+ elseif (LhsField == 'Equal')
+ error(9999, 'Found Equal before Lhs');
+ end
+end
+
+// ------------------------------
+// --- Read input parameters. ---
+// ------------------------------
+
+
+RhsField = AST_PopASTStack();
+InputArgumentNames = [];
+InputArgumentScope = [];
+NInArg = 0;
+InArg = [];
+while (RhsField ~= 'Expression:')
+ NInArg = NInArg + 1;
+ if RhsField <> 'Operands:'
+ [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField);
+ end
+ //InArg(NInArg) = RhsField;
+ RhsField = AST_PopASTStack();
+end
+InputArgumentNames = SCI2Cflipud(InputArgumentNames);
+InputArgumentScope = SCI2Cflipud(InputArgumentScope);
+
+
+// -------------------------------------
+// --- Generate the InArg structure. ---
+// -------------------------------------
+//#RNU_RES_E
+for counterinputargs = 1:NInArg
+ InArg(counterinputargs).Name=InputArgumentNames(counterinputargs);
+ InArg(counterinputargs).Scope=InputArgumentScope(counterinputargs);
+end
+
+//#RNU_RES_B
+// -------------------------------------
+// --- Generate the InArg structure. ---
+// -------------------------------------
+//#RNU_RES_E
+OutArg = [];
+for counteroutputargs = 1:NOutArg
+ OutArg(counteroutputargs).Name=OutputArgumentNames(counteroutputargs);
+ OutArg(counteroutputargs).Scope=OutputArgumentScope(counteroutputargs);
+end
+
+
+// ------------------------
+// --- Print Some Info. ---
+// ------------------------
+
+PrintStringInfo('N Input Arguments: '+string(NInArg),ReportFileName,'file','y','n');
+PrintStringInfo('N Output Arguments: '+string(NOutArg),ReportFileName,'file','y');
+ //#RNU_RES_E
+ for counterinputargs = 1:NInArg
+ //#RNU_RES_B
+ PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+InArg(counterinputargs).Name,...
+ ReportFileName,'file','y','n');
+ PrintStringInfo(' Scope: '+InArg(counterinputargs).Scope,...
+ ReportFileName,'file','y','n');
+ //#RNU_RES_E
+ end
+ for counteroutputargs = 1:NOutArg
+ //#RNU_RES_B
+ PrintStringInfo('Output Argument Number '+string(counteroutputargs)+': '+OutArg(counteroutputargs).Name,...
+ ReportFileName,'file','y','n');
+ //PrintStringInfo(' Scope: '+ OutArg(counterinputargs).Scope,ReportFileName,'file','y','n');
+ //#RNU_RES_E
+ end
+
+NOutArg_mod = NOutArg;
+
+FunTypeAnnot = '';
+FunSizeAnnot = '';
+NLhsArg = 0;
+LhsArg = [];
+PrintStringInfo('...Equal not found.',ReportFileName,'file','y');
+
+PrintStringInfo('***Analyzing Input Arguments***',ReportFileName,'file','y');
+UpdatedInArg = InArg;
+[InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,'OpEqual');
+
+size_count = 0;
+for i = 1:NInArg
+ size_count = size_count + eval(InArg(i).Size(2));
+end
+
+com_type = 0;
+for i = 1:NInArg
+ if InArg(i).Type == 'z'
+ com_type = 1;
+ elseif InArg(i).Type == 'c'
+ com_type = 2;
+ end
+end
+
+
+if com_type == 0
+ PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
+ OutArg(1).Type = InArg(1).Type;
+ OutArg(1).Size(1) = '1'
+ OutArg(1).Size(2) = string(size_count);
+ OutArg(1).Dimension = 2;
+ OutArg(1).Value = InArg(1).Value;
+ OutArg(1).FindLike = InArg(1).FindLike;
+elseif com_type == 1
+ PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
+ OutArg(1).Type = 'z';
+ OutArg(1).Size(1) = '1'
+ OutArg(1).Size(2) = string(size_count);
+ OutArg(1).Dimension = 2;
+ OutArg(1).Value = InArg(1).Value;
+ OutArg(1).FindLike = InArg(1).FindLike;
+else
+ PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
+ OutArg(1).Type = 'c';
+ OutArg(1).Size(1) = '1'
+ OutArg(1).Size(2) = string(size_count);
+ OutArg(1).Dimension = 2;
+ OutArg(1).Value = InArg(1).Value;
+ OutArg(1).FindLike = InArg(1).FindLike;
+end
+
+//--- Check for output Argument in symbol table ---//
+OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo);
+
+//--- Put the output Argument in symbol table ---//
+ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedInfo,'all');
+
+
+endfunction
diff --git a/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci b/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci
index 5373adf6..2b549ed6 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci
+++ b/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci
@@ -74,11 +74,13 @@ global STACKDEDUG
// ---------------------------------------------------
//#RNU_RES_E
if (ASTIfExpType~='else')
- [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType);
+ [IfCondArg,NIfCondArg,Op,NOp] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType);
else
// "else" type doesn't contain any condition to test.
IfCondArg = '';
NIfCondArg = 0;
+ Op = '';
+ NOp = 0;
end
//#RNU_RES_B
@@ -87,6 +89,6 @@ end
// -----------------------------
// --- Generate the C code for if/elseif Expression. ---
//#RNU_RES_E
-SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo);
+SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,Op,NOp,ASTIfExpType,FileInfo,SharedInfo);
endfunction
diff --git a/2.3-1/macros/ASTManagement/AST_HandleRC.sci b/2.3-1/macros/ASTManagement/AST_HandleRC.sci
new file mode 100644
index 00000000..2a6cbc3f
--- /dev/null
+++ b/2.3-1/macros/ASTManagement/AST_HandleRC.sci
@@ -0,0 +1,88 @@
+function [RhsNames,RhsScope,NRhs] = AST_HandleRC(FileInfo,SharedInfo)
+// function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Handles the EndFuncall, EndOperation and EndEqual tags of the AST.
+// ASTFunType can be 'Funcall', 'Operation', 'Equal'
+// Structure of Funcall:
+// overloading function for "funcall" type tlist string function
+// this is a node of the AST
+// fields:
+// rhs : a list
+// name : string, the name of the function
+// lhsnb: number, the number of function lhs
+// txt=['Funcall : '+F.name
+// ' #lhs : '+string(F.lhsnb)
+// ' Rhs : '
+// ' '+objectlist2string(F.rhs)
+// 'EndFuncall'
+// ]
+// #RNU_RES_E
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 11-Apr-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+SCI2CNInArgCheck(argn(2),2,2)
+
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+
+
+global SCI2CSTACK
+global StackPosition;
+global STACKDEDUG
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+// ------------------------------
+// --- Read input parameters. ---
+// ------------------------------
+cntpop = 1;
+NRhs = 0;
+RhsField(cntpop) = AST_PopASTStack();
+RhsNames = [];
+while (RhsField(cntpop) ~= 'Expression:')
+ NRhs = NRhs + 1;
+ if RhsField(cntpop) <> 'Operands:'
+ [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop));
+ end
+ cntpop = cntpop + 1;
+ RhsField(cntpop) = AST_PopASTStack();
+end
+RhsNames = SCI2Cflipud(RhsNames);
+RhsScope = SCI2Cflipud(RhsScope);
+
+// --- Repush everything into the stack. ---
+for cntpush = cntpop:-1:1
+ if RhsField(cntpush) <> 'Operands:'
+ AST_PushASTStack(RhsField(cntpush));
+ end
+end
+
+
+//for counterinputargs = 1:NRhs
+ //#RNU_RES_B
+ //disp(counterinputargs);
+ // PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+RhsNames(counterinputargs).Name,...
+ // ReportFileName,'file','y');
+ //PrintStringInfo(' Scope: '+RhsNames(counterinputargs).Scope,...
+ // ReportFileName,'file','y');
+ //#RNU_RES_E
+//end
+
+endfunction
diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci
index 79fb516d..d8c2f73c 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci
+++ b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci
@@ -36,6 +36,8 @@ global SCI2CSTACK
global StackPosition;
global STACKDEDUG
+IfCondArg = [];
+NIfCondArg = 0;
// ------------------------------
// --- Check input arguments. ---
@@ -70,36 +72,40 @@ PrintStringInfo(' Redirecting C code to: '+FileInfo.Funct(nxtscifunnumber).CPa
// --- Generate C code. ---
// ------------------------
//#RNU_RES_E
-if(SharedInfo.WhileExpr.CondVar == '')
- //#RNU_RES_B
- // It means that we are handling something like while(a) or while(1)
- // The while condition variable is generated by the HandleEndGenFun.
- //#RNU_RES_E
-
- // --- Pop the name of the condition variable or number. ---
- Pop1 = AST_PopASTStack();
-
- [ArgName,ArgScope] = AST_ExtractNameAndScope(Pop1);
- if (length(ArgName) == 0)
- PrintStringInfo(' ',ReportFileName,'both','y');
- PrintStringInfo('SCI2CERROR: Expected while(variable) or while(number).','','stdout','y');
- PrintStringInfo('SCI2CERROR: Expected a variable or number in the AST while expression.','','stdout','y');
- PrintStringInfo('SCI2CERROR: Report this error to http://forge.scilab.org/index.php/p/scilab2c/issues/.','','stdout','y');
- PrintStringInfo(' ',ReportFileName,'both','y');
- error(9999, 'Expected a conditional variable in the while expression');
+flagendpop = 0;
+IfExprField = AST_PopASTStack();
+
+NOp=0;
+Op=[];
+while (flagendpop == 0)
+ if (IfExprField~='<EOL>')
+ if (IfExprField=='WhileExpression:')
+ flagendpop = 1;
+ // Pop Again the If tag from the AST.
+ IfExprField = AST_PopASTStack();
+ elseif (IfExprField=='Operands:')
+ flagendpop = 0;
+ g = AST_PopASTStack();
+ else
+ if (IfExprField=='&&' | IfExprField=='||')
+ NOp = NOp + 1;
+ Op(NOp) = IfExprField;
+ //PrintStringInfo('operators are '+Op(NOp),ReportFileName,'file','y');
+ else
+ NIfCondArg = NIfCondArg + 1;
+ IfCondArg(NIfCondArg) = IfExprField;
+ end
+ //[IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField);
+ //[IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField);
+ end
end
+ IfExprField = AST_PopASTStack();
+ PrintStringInfo('operators are '+IfExprField,ReportFileName,'file','y');
+end
- SharedInfo.WhileExpr.CondVar = ArgName;
- //#RNU_RES_B
- // --- Repush strings into the AST stack. ---
- //#RNU_RES_E
-
- AST_PushASTStack(Pop1);
+IfCondArg = SCI2Cflipud(IfCondArg);
-elseif (SharedInfo.WhileExpr.DimCondVar > 0)
- error(9999, 'Cannot manage while with matrix conditions');
-end
-SharedInfo = C_WhileExpression(FileInfo,SharedInfo);
+SharedInfo = C_WhileExpression(IfCondArg,NIfCondArg,Op,NOp,FileInfo,SharedInfo);
// --------------------------
// --- Update SharedInfo. ---
diff --git a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci
index fa76a01d..68bc3da7 100644
--- a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci
+++ b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci
@@ -123,7 +123,7 @@ end
// ------------------------
//#RNU_RES_B
PrintStringInfo('Function Name: '+FunctionName,ReportFileName,'file','y','n');
-PrintStringInfo('N Intput Arguments: '+string(NInArg),ReportFileName,'file','y','n');
+PrintStringInfo('N Input Arguments: '+string(NInArg),ReportFileName,'file','y','n');
//#RNU_RES_E
if (SharedInfo.Equal.Nins > 0)
//#RNU_RES_B
diff --git a/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci
index 647a70d7..3c322dd5 100644
--- a/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci
+++ b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci
@@ -87,6 +87,10 @@ NOutArg = eval(stripblanks(part(buffstring,10:length(buffstring))));
buffstring = AST_PopASTStack();
FunctionName = stripblanks(part(buffstring,12:length(buffstring)));
+//if (FunctionName == 'disp')
+ // NOutArg = 0;
+//end
+
// -------------------------------------
// --- Generate the InArg structure. ---
// -------------------------------------
diff --git a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci
index a7da0128..2bfb08dd 100644
--- a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci
+++ b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci
@@ -1,4 +1,4 @@
-function [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType)
+function [IfCondArg,NIfCondArg,Op,NOp] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType)
// function [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType)
// -----------------------------------------------------------------
//#RNU_RES_B
@@ -63,13 +63,26 @@ global STACKDEDUG
// ------------------------------------
// --- Read if condition variables. ---
// ------------------------------------
+//OutArgOld=[];
+//OutArgNew=[];
+
+//for i = 1:3
+ // OutArgOld(i)=AST_PopASTStack();
+ //PrintStringInfo(' '+OutArgOld(i),ReportFileName,'file','y');
+//end
+//x = AST_PopASTStack();
+
+//OutArgNew = SCI2Cflipud(OutArgOld);
+
flagendpop = 0;
IfExprField = AST_PopASTStack();
+PrintStringInfo(' '+IfExprField+' '+ASTIfExpType,ReportFileName,'file','y');
if (ASTIfExpType=='if')
if (IfExprField=='Expression:')
flagendpop = 1;
// Pop Again the If tag from the AST.
IfExprField = AST_PopASTStack();
+ PrintStringInfo(' '+IfExprField,ReportFileName,'file','y');
end
elseif (ASTIfExpType=='elseif')
if (IfExprField=='Else If Expression')
@@ -78,31 +91,57 @@ elseif (ASTIfExpType=='elseif')
else
error(9999, 'Unknown ASTIfExpType ""'+ASTIfExpType+'"".');
end
-
+NOp=0;
+Op=[];
while (flagendpop == 0)
if (IfExprField~='<EOL>')
if (ASTIfExpType=='if')
if (IfExprField=='Expression:')
flagendpop = 1;
+ //PrintStringInfo('hello dere '+IfExprField,ReportFileName,'file','y');
// Pop Again the If tag from the AST.
IfExprField = AST_PopASTStack();
+ elseif (IfExprField=='Operands:')
+ flagendpop = 0;
+ g = AST_PopASTStack();
else
+ if (IfExprField=='&&' | IfExprField=='||')
+ NOp = NOp + 1;
+ Op(NOp) = IfExprField;
+ //PrintStringInfo('operators are '+Op(NOp),ReportFileName,'file','y');
+ else
NIfCondArg = NIfCondArg + 1;
- [IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField);
+ IfCondArg(NIfCondArg) = IfExprField;
+ end
+ //[IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField);
end
elseif (ASTIfExpType=='elseif')
if (IfExprField=='Else If Expression')
flagendpop = 1;
+ //IfExprField = AST_PopASTStack();
else
- NIfCondArg = NIfCondArg + 1;
- IfCondArg(NIfCondArg) = IfExprField;
- [IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField);
+ if (IfExprField=='&&' | IfExprField=='||')
+ NOp = NOp + 1;
+ Op(NOp) = IfExprField;
+ elseif (IfExprField=='Operands:')
+ flagendpop = 0;
+ g = AST_PopASTStack();
+ else
+ NIfCondArg = NIfCondArg + 1;
+ IfCondArg(NIfCondArg) = IfExprField;
+ end
+ //[IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField);
end
end
end
+ if flagendpop == 0
IfExprField = AST_PopASTStack();
+ end
+ PrintStringInfo('operators are '+IfExprField,ReportFileName,'file','y');
end
+IfCondArg = SCI2Cflipud(IfCondArg);
+
//#RNU_RES_B
// -------------------------------------------
// --- Print some info in the report file. ---
diff --git a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci
index a77317bd..903f0958 100644
--- a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci
+++ b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci
@@ -61,6 +61,17 @@ LabelFunctName = 'Operator: ';
FunctionName = stripblanks(part(buffstring,length(LabelFunctName)+1:length(buffstring)));
// Generate the proper function name.
FunctionName = Operator2FunName(FunctionName);
+PrintStringInfo(' '+FunctionName,ReportFileName,'file','y');
+
+if (FunctionName == 'OpLogAnd' | FunctionName=='OpLogOr')
+ NInArg = 0;
+ NOutArg = 0;
+ InArg=[];
+ //RhsField = AST_PopASTStack();
+ //PrintStringInfo('hello'+RhsField,ReportFileName,'file','y');
+ //RhsField = AST_PopASTStack();
+ return ;
+end
// ------------------------------
// --- Read input parameters. ---
diff --git a/2.3-1/macros/ASTManagement/GenOutArgNames.sci b/2.3-1/macros/ASTManagement/GenOutArgNames.sci
index 0e683835..7b62c794 100644
--- a/2.3-1/macros/ASTManagement/GenOutArgNames.sci
+++ b/2.3-1/macros/ASTManagement/GenOutArgNames.sci
@@ -32,6 +32,12 @@ SCI2CNInArgCheck(argn(2),9,9);
nxtscifunname = SharedInfo.NextSCIFunName;
nxtscifunnumber = SharedInfo.NextSCIFunNumber;
ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+
+global SCI2CSTACK
+global StackPosition;
+global STACKDEDUG
+
// #RNU_RES_B
PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y');
// #RNU_RES_E
@@ -43,47 +49,69 @@ OutArg = OldOutArg;
// ---------------------------------------------------------------------------------------
// At this step only the name of the output arguments can be generated. ---
//#RNU_RES_E
-if (NLhsArg > 0)
- //#RNU_RES_B
- // Use the equal Lhs names.
- PrintStringInfo('Using Equal Lhs names.',ReportFileName,'file','y');
- //#RNU_RES_E
- if (NLhsArg ~= NOutArg)
- error(9999, 'NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.');
- end
- for counteroutputargs = 1:NOutArg
- OutArg(counteroutputargs).Name=LhsArg(counteroutputargs).Name;
- OutArg(counteroutputargs).Scope=LhsArg(counteroutputargs).Scope;
- end
+if (FunctionName ~= 'OpLogGt' & FunctionName ~= 'OpLogLt' & FunctionName ~= 'OpLogGe' & FunctionName ~= 'OpLogLe' & FunctionName ~= 'OpLogNe' & FunctionName ~= 'OpLogEq')
+ if (NLhsArg > 0)
+ //#RNU_RES_B
+ // Use the equal Lhs names.
+ PrintStringInfo('Using Equal Lhs names.',ReportFileName,'file','y');
+ //#RNU_RES_E
+ if (NLhsArg ~= NOutArg)
+ error(9999, 'NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.');
+ end
+ for counteroutputargs = 1:NOutArg
+ OutArg(counteroutputargs).Name=LhsArg(counteroutputargs).Name;
+ OutArg(counteroutputargs).Scope=LhsArg(counteroutputargs).Scope;
+ end
+ else
+ //#RNU_RES_B
+ // Generate temporary variables.
+ PrintStringInfo('Generating temporary variables.',ReportFileName,'file','y');
+ //#RNU_RES_E
+ if ((sum(mtlb_strcmp(FunctionName,SharedInfo.Annotations.DataPrec)) > 0) & ...
+ (SharedInfo.SkipNextPrec == 1))
+ //#RNU_RES_B
+ PrintStringInfo(' Skipping code generating because already generated in the previous function.',ReportFileName,'file','y');
+ //#RNU_RES_E
+ for counteroutputargs = 1:NOutArg
+ OutArg(counteroutputargs).Name = InArg(counteroutputargs).Name;
+ end
+ elseif (mtlb_strcmp(FunctionName,'OpEqual'))
+ // do nothing.
+ //NUT: verifica questa parte di codice. e' sicuro che se ho equal gli oldoutarg contengono gia' il nome?
+ else
+ for counteroutputargs = 1:NOutArg
+ if ((SharedInfo.ASTReader.EnableTempVarsReuse == 1) & ...
+ (length(SharedInfo.ASTReader.ReusableTempVars) > 0))
+ TmpOutArgName = strcat([SharedInfo.ASTReader.TempVarsName,string(SharedInfo.ASTReader.ReusableTempVars(1))]);
+ SharedInfo.ASTReader.ReusableTempVars = SharedInfo.ASTReader.ReusableTempVars(2:$);
+ else
+ SharedInfo.ASTReader.UsedTempVars = SharedInfo.ASTReader.UsedTempVars + 1;
+ TmpOutArgName = strcat([SharedInfo.ASTReader.TempVarsName,string(SharedInfo.ASTReader.UsedTempVars)]);
+ end
+ OutArg(counteroutputargs).Name=TmpOutArgName;
+ end
+ end
+ end
else
- //#RNU_RES_B
- // Generate temporary variables.
- PrintStringInfo('Generating temporary variables.',ReportFileName,'file','y');
- //#RNU_RES_E
- if ((sum(mtlb_strcmp(FunctionName,SharedInfo.Annotations.DataPrec)) > 0) & ...
- (SharedInfo.SkipNextPrec == 1))
- //#RNU_RES_B
- PrintStringInfo(' Skipping code generating because already generated in the previous function.',ReportFileName,'file','y');
- //#RNU_RES_E
- for counteroutputargs = 1:NOutArg
- OutArg(counteroutputargs).Name = InArg(counteroutputargs).Name;
- end
- elseif (mtlb_strcmp(FunctionName,'OpEqual'))
- // do nothing.
- //NUT: verifica questa parte di codice. e' sicuro che se ho equal gli oldoutarg contengono gia' il nome?
- else
- for counteroutputargs = 1:NOutArg
- if ((SharedInfo.ASTReader.EnableTempVarsReuse == 1) & ...
- (length(SharedInfo.ASTReader.ReusableTempVars) > 0))
- TmpOutArgName = strcat([SharedInfo.ASTReader.TempVarsName,string(SharedInfo.ASTReader.ReusableTempVars(1))]);
- SharedInfo.ASTReader.ReusableTempVars = SharedInfo.ASTReader.ReusableTempVars(2:$);
- else
- SharedInfo.ASTReader.UsedTempVars = SharedInfo.ASTReader.UsedTempVars + 1;
- TmpOutArgName = strcat([SharedInfo.ASTReader.TempVarsName,string(SharedInfo.ASTReader.UsedTempVars)]);
- end
- OutArg(counteroutputargs).Name=TmpOutArgName;
- end
- end
+ for counterinputargs = 1:NInArg
+ tmppushstack=InArg(counterinputargs).Name;
+ PrintStringInfo(' Pushing in the AST stack: ""'+tmppushstack+'"".',ReportFileName,'file','y');
+ AST_PushASTStack(tmppushstack);
+ if FunctionName=='OpLogGt'
+ AST_PushASTStack('>');
+ elseif FunctionName=='OpLogGe'
+ AST_PushASTStack('>=');
+ elseif FunctionName=='OpLogLt'
+ AST_PushASTStack('<');
+ elseif FunctionName=='OpLogLe'
+ AST_PushASTStack('<=');
+ elseif FunctionName=='OpLogEq'
+ AST_PushASTStack('==');
+ elseif FunctionName=='OpLogNe'
+ AST_PushASTStack('!=');
+ end
+ end
+ s = AST_PopASTStack();
+ PrintStringInfo(' Pushing in the AST stack: ""'+s+'"".',ReportFileName,'file','y');
end
-
endfunction
diff --git a/2.3-1/macros/ASTManagement/_funcall_string.sci b/2.3-1/macros/ASTManagement/_funcall_string.sci
index faeb81d9..0ee97016 100644
--- a/2.3-1/macros/ASTManagement/_funcall_string.sci
+++ b/2.3-1/macros/ASTManagement/_funcall_string.sci
@@ -6,10 +6,19 @@ function txt=%funcall_string(F)
// name : string, the name of the function
// lhsnb: number, the number of function lhs
+if F.name <> 'disp'
txt=['Funcall : '+F.name
' #lhs : '+string(F.lhsnb)
' Rhs : '
' '+objectlist2string(F.rhs)
'EndFuncall'
]
+else
+txt=['Funcall : '+F.name
+ ' #lhs : '+'0'
+ ' Rhs : '
+ ' '+objectlist2string(F.rhs)
+ 'EndFuncall'
+ ]
+end
endfunction
diff --git a/2.3-1/macros/ASTManagement/_operatio_string.sci b/2.3-1/macros/ASTManagement/_operatio_string.sci
index 8421a3f4..e9332337 100644
--- a/2.3-1/macros/ASTManagement/_operatio_string.sci
+++ b/2.3-1/macros/ASTManagement/_operatio_string.sci
@@ -10,4 +10,4 @@ function txt=%operatio_string(O)
' Operator: '+O.operator
'EndOperation'
]
-endfunction \ No newline at end of file
+endfunction
diff --git a/2.3-1/macros/ASTManagement/_operation_string.sci b/2.3-1/macros/ASTManagement/_operation_string.sci
index 84f5ce3c..c9282f67 100644
--- a/2.3-1/macros/ASTManagement/_operation_string.sci
+++ b/2.3-1/macros/ASTManagement/_operation_string.sci
@@ -10,4 +10,4 @@ function txt=%operation_string(O)
' Operator: '+O.operator
'EndOperation'
]
-endfunction \ No newline at end of file
+endfunction
diff --git a/2.3-1/macros/ASTManagement/lib b/2.3-1/macros/ASTManagement/lib
index 80a0b24d..67ea09be 100644
--- a/2.3-1/macros/ASTManagement/lib
+++ b/2.3-1/macros/ASTManagement/lib
Binary files differ
diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names
index a1aafbc1..6deb883d 100644
--- a/2.3-1/macros/ASTManagement/names
+++ b/2.3-1/macros/ASTManagement/names
@@ -21,6 +21,7 @@ AST_ExtractNameAndScope
AST_GetASTFile
AST_GetFuncallPrm
AST_GetPrecAndLhsArg
+AST_HandleCC
AST_HandleEOL
AST_HandleEndFor
AST_HandleEndGenFun
@@ -28,8 +29,11 @@ AST_HandleEndProgram
AST_HandleEndWhile
AST_HandleFor
AST_HandleForStatem
+AST_HandleFunCC
+AST_HandleFunRC
AST_HandleHeader
AST_HandleIfElse
+AST_HandleRC
AST_HandleWhileExpr
AST_HandleWhileStatem
AST_ParseEqualStruct
diff --git a/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci b/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci
new file mode 100644
index 00000000..475e2e0c
--- /dev/null
+++ b/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci
@@ -0,0 +1,187 @@
+function Cdeclaration = C_GenDeclarations_Dup(InArg,NInArg,com_type,ArgStruct,CDeclarationFileName,IndentLevel,ReportFileName,FlagExt,ResizeApproach)
+// function Cdeclaration = C_GenDeclarations(ArgStruct,CDeclarationFileName,IndentLevel,ReportFileName,FlagExt,ResizeApproach)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+// 10-Jun-2008 -- Raffaele Nutricato: adapted to work with realloc function.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// Generate C corresponding declaration given some information in ArgStruct
+//
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),9,9);
+// #RNU_RES_B
+//NUT: ilnome di questa funzione va cambiato perche' le dichiarazioni le fanno anche i for e i while.
+
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Generating C declaration***',ReportFileName,'file','y');
+// #RNU_RES_E
+
+Cdeclaration = '';
+if (ArgStruct.Dimension > 0)
+ if (FlagExt == 1)
+ Cdeclaration(1) = 'extern ';
+ Cdeclaration(2) = 'extern ';
+ else
+ Cdeclaration(1) = '';
+ Cdeclaration(2) = '';
+ end
+// #RNU_RES_B
+//NUT: vedi Mem_Alloc_Out per maggiori info sulla rimozione della temp nella if
+// if ((ArgStruct.Scope=='Temp') | (ArgStruct.FindLike == -1) | (isnum(ArgStruct.Size(1))==%F) | (isnum(ArgStruct.Size(2))==%F))
+// #RNU_RES_E
+ if (ArgStruct.Type=='g')
+// if (isnan(ArgStruct.Value) )
+ if ((isnum(ArgStruct.Size(1))==%F) | (isnum(ArgStruct.Size(2))==%F) )
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+...
+ ' * '+ArgStruct.Name+';';
+ else
+ if ((FlagExt == 1) | (isnan(ArgStruct.Value)))
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+...
+ ' '+ArgStruct.Name+'['+ArgStruct.Size(1)+'*'+ArgStruct.Size(2)+'];';
+ else
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+...
+ ' '+ArgStruct.Name+'['+ArgStruct.Size(1)+'*'+ArgStruct.Size(2)+'] = {'+ArgStruct.Value+'};';
+ end
+ end
+ Cdeclaration(2) = Cdeclaration(2)+C_Type('i')+' __'+ArgStruct.Name+'Size[2] = {'+ArgStruct.Size(1)+','+ArgStruct.Size(2)+'};';
+ elseif ((ArgStruct.FindLike == -1) | ...
+ (isnum(ArgStruct.Size(1))==%F) | (isnum(ArgStruct.Size(2))==%F) | ...
+ (ResizeApproach=='REALLOC_ALL_RESIZE_ALL' & ArgStruct.Type~='g'))
+// #RNU_RES_B
+//RNU sulle stringhe non ho ancora deciso se applicare la realloc.
+// Generate only the pointer that will be used by the malloc function.
+// #RNU_RES_E
+ if (FlagExt == 1)
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+'* '+...
+ ArgStruct.Name+';';
+ else
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+'* '+...
+ ArgStruct.Name+' = NULL;';
+ end
+// Declare the Size array
+ Cdeclaration(2) = Cdeclaration(2)+C_Type('i')+' __'+ArgStruct.Name+'Size[2];';
+ else
+// Declare the array with its size.
+ computedSize = ArgStruct.Size(1);
+ computedSizeLength = size(ArgStruct.Size, '*');
+ computedSizeField = ArgStruct.Size(1);
+ for sizeIterator = 2:computedSizeLength;
+ computedSize = computedSize + ' * ' + ArgStruct.Size(sizeIterator);
+ computedSizeField = computedSizeField + ', ' + ArgStruct.Size(sizeIterator);
+ end
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+' '+ArgStruct.Name+'['+computedSize+']={';
+ row = eval(ArgStruct.Size(1))
+ col = eval(ArgStruct.Size(2))
+ if row == 1
+ if com_type == 0
+ for i = 1:NInArg-1
+ Cdeclaration(1) = Cdeclaration(1)+InArg(i).Name+',';
+ end
+ Cdeclaration(1) = Cdeclaration(1)+InArg(NInArg).Name+'};';
+ else
+ for i=1:NInArg-1
+ if InArg(i).Type <> 'z' & InArg(i).Type <> 'c'
+ Cdeclaration(1) = Cdeclaration(1)+InArg(i).Name+',0,';
+ else
+ Cdeclaration(1) = Cdeclaration(1)+InArg(i).Name+',';
+ end
+ end
+ if InArg(NInArg).Type <> 'z' & InArg(NInArg).Type <> 'c'
+ Cdeclaration(1) = Cdeclaration(1) + InArg(NInArg).Name + ',0};'
+ else
+ Cdeclaration(1) = Cdeclaration(1) + InArg(NInArg).Name + '};'
+ end
+ end
+ else
+ if com_type == 0
+ for i = 1:col
+ for j = 0:row-1
+ if (j*col)+i ~= row*col
+ Cdeclaration(1) = Cdeclaration(1) + InArg(((j*col)+i)).Name + ',';
+ end
+ end
+ end
+ Cdeclaration(1) = Cdeclaration(1) + InArg(NInArg).Name + '};';
+ else
+ for i = 1:col
+ for j = 0:row-1
+ if (j*col)+i ~= row*col
+ if InArg(((j*col)+i)).Type <> 'z' & InArg(((j*col)+i)).Type <> 'c'
+ Cdeclaration(1) = Cdeclaration(1) + InArg(((j*col)+i)).Name + ',0,';
+ else
+ Cdeclaration(1) = Cdeclaration(1) + InArg(((j*col)+i)).Name + ',';
+ end
+ end
+ end
+ end
+ if InArg(NInArg).Type <> 'z' & InArg(NInArg).Type <> 'c'
+ Cdeclaration(1) = Cdeclaration(1) + InArg(NInArg).Name + ',0};';
+ else
+ Cdeclaration(1) = Cdeclaration(1) + InArg(NInArg).Name + '};';
+ end
+ end
+ end
+ Cdeclaration(2) = Cdeclaration(2)+C_Type('i')+' __'+ArgStruct.Name+'Size['+string(computedSizeLength)+']';
+ if (FlagExt <> 1)
+ Cdeclaration(2) = Cdeclaration(2)+' = {'+computedSizeField+'}';
+ end
+ Cdeclaration(2) = Cdeclaration(2)+';';
+ end
+else
+ if (ArgStruct.Type == 'fn')
+ //do nothing. This is a function name. Will be declared in header file.
+ else
+ if (FlagExt == 1)
+ Cdeclaration(1) = 'extern ';
+ else
+ Cdeclaration(1) = '';
+ end
+ Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+' '+ArgStruct.Name;
+ if (~isnan(ArgStruct.Value) & (FlagExt == 0))
+ if isreal(ArgStruct.Value)
+ Cdeclaration(1) = Cdeclaration(1)+' = '+SCI2Cstring(ArgStruct.Value);
+ else
+ if (ArgStruct.Type == 'z')
+ Cdeclaration(1) = Cdeclaration(1)+' = DoubleComplex('+SCI2Cstring(real(ArgStruct.Value))+','+SCI2Cstring(imag(ArgStruct.Value))+')';
+ else
+ Cdeclaration(1) = Cdeclaration(1)+' = FloatComplex('+SCI2Cstring(real(ArgStruct.Value))+','+SCI2Cstring(imag(ArgStruct.Value))+')';
+ end
+ end
+ end
+ Cdeclaration(1) = Cdeclaration(1)+';';
+ end
+end
+
+
+// --------------------------------------------
+// --- Write C declaration into the C file. ---
+// --------------------------------------------
+PrintStringInfo(' ',CDeclarationFileName,'file','y');
+for cntdecl = 1:size(Cdeclaration, '*')
+ PrintStringInfo(' '+Cdeclaration(cntdecl),ReportFileName,'file','y');
+ PrintStringInfo(C_IndentBlanks(IndentLevel)+Cdeclaration(cntdecl),CDeclarationFileName,'file','y');
+end
+
+PrintStringInfo(' Writing C declaration in: '+CDeclarationFileName,ReportFileName,'file','y');
+PrintStringInfo(' ',CDeclarationFileName,'file','y');
+
+endfunction
+// #RNU_RES_B
+//NUT: dove sta il controllo che verifica se dopo aver dichiarato una local A[10] essa viene utilizzata
+//NUT: per memorizzare un A = sin(B) dove B[11]??
+// #RNU_RES_E
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
index f209b382..3b977bd6 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
@@ -78,6 +78,25 @@ else
PrintStringInfo('CXXFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('LDFLAGS = -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y');
end
+
+ //If ode function is used, add libgsl.
+ if(size(SharedInfo.Includelist) <> 0)
+ if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T))
+ if(target == 'RPi')
+ PrintStringInfo('LDFLAGS = -lgsl -lcblas',FileInfo.MakefileFilename,'file','y','y');
+ else
+ PrintStringInfo('LDFLAGS = -lgsl',FileInfo.MakefileFilename,'file','y','y');
+ end
+
+ end
+ end
+
+ if (target == 'RPi')
+ PrintStringInfo('LDFLAGS += -llapack -lrefblas -lgfortran -lwiringPi',FileInfo.MakefileFilename,'file','y','y');
+ else
+ PrintStringInfo('LDFLAGS += -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y');
+ end
+
if(SharedInfo.OpenCVUsed == %T)
PrintStringInfo('LDFLAGS += -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_gpu',FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('LDFLAGS += -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree',FileInfo.MakefileFilename,'file','y','y');
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci b/2.3-1/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci
new file mode 100644
index 00000000..b43eb442
--- /dev/null
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci
@@ -0,0 +1,12 @@
+function C_GenerateMkfle_arduino(FileInfo,SharedInfo)
+
+ PrintStringInfo('ARDUINO_DIR = /usr/share/arduino',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('ARDMK_DIR = /usr/share/arduino',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('AVR_TOOLS_DIR = /usr',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('BOARD_TAG = ' + SharedInfo.Board_name ,FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('USER_LIB_PATH = ../',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('ARDUINO_LIBS = ../src/c ../includes ../interfaces ../ Wire',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('ARDUINO_PORT = /dev/ttyACM0',FileInfo.MakefileFilename,'file','y','y');
+ PrintStringInfo('include /usr/share/arduino/Arduino.mk',FileInfo.MakefileFilename,'file','y','y');
+
+endfunction
diff --git a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci
index 48a05383..359b7882 100644
--- a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci
+++ b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci
@@ -1,4 +1,4 @@
-function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo)
+function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,Op,NOp,ASTIfExpType,FileInfo,SharedInfo)
// function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo)
// -----------------------------------------------------------------
// //NUT: add description here
@@ -19,12 +19,16 @@ function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
-SCI2CNInArgCheck(argn(2),5,5);
+SCI2CNInArgCheck(argn(2),7,7);
+
+//global SCI2CSTACK
+//global StackPosition;
+//global STACKDEDUG
// --- Check NIfCondArg value. ---
-if ((NIfCondArg ~= 1) & (ASTIfExpType~='else'))
- error(9999, 'Cannot manage ""if/elseif"" with a number of condition variables not equal to 1.');
-end
+//if ((NIfCondArg ~= 1) & (ASTIfExpType~='else'))
+ // error(9999, 'Cannot manage ""if/elseif"" with a number of condition variables not equal to 1.');
+//end
// -----------------------
// --- Initialization. ---
@@ -37,7 +41,7 @@ CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName;
// #RNU_RES_B
PrintStringInfo(' ',ReportFileName,'file','y');
-PrintStringInfo('***Generating C code***',ReportFileName,'file','y');
+PrintStringInfo('***Generating C code***'+ string(NIfCondArg),ReportFileName,'file','y');
// #RNU_RES_E
// ---------------------------
// --- End Initialization. ---
@@ -66,10 +70,23 @@ if SCI2Cstrncmps1size(ASTIfExpType,'else')
SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out');
end
+i=1;
+k=1;
CCall ='';
CCall = CCall+CFunName;
if (ASTIfExpType~='else')
- CCall = CCall+'('+IfCondArg(1)+')';
+ CCall = CCall+'(';
+ while i <= NIfCondArg
+ CCall = CCall + IfCondArg(i) + ' ';
+ //d = modulo(i,3);
+ //PrintStringInfo(' '+string(i)+string(d),'file','y');
+ if (modulo(i,3)==0 & i<>NIfCondArg)
+ CCall = CCall + Op(k) + ' ';
+ k = k + 1;
+ end
+ i = i + 1;
+ end
+ CCall = CCall+')';
end
PrintStringInfo(' '+CCall,ReportFileName,'file','y');
PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y');
diff --git a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci
index edd2830e..368ccffa 100644
--- a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci
+++ b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci
@@ -1,4 +1,4 @@
-function SharedInfo = C_WhileExpression(FileInfo,SharedInfo)
+function SharedInfo = C_WhileExpression(IfCondArg,NIfCondArg,Op,NOp,FileInfo,SharedInfo)
// function SharedInfo = C_WhileExpression(FileInfo,SharedInfo)
// -----------------------------------------------------------------
// //NUT: add description here
@@ -19,7 +19,7 @@ function SharedInfo = C_WhileExpression(FileInfo,SharedInfo)
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
-SCI2CNInArgCheck(argn(2),2,2);
+SCI2CNInArgCheck(argn(2),6,6);
// -----------------------
// --- Initialization. ---
@@ -63,7 +63,7 @@ for cntstr = 1:NumCStrings
// Epilogue
if (length(C_Strings(cntstr)) == 0)
C_Strings(cntstr) = ' '; // RNU for Bruno: If I don't do that I get a PrintStringInfo error related to mputstr.
- // Function not defined for given argument type(s),
+ // Function not defined for given argument type(s),
// check arguments or define function %0_mputstr for overloading.
end
PrintStringInfo(C_Strings(cntstr),CPass1WhileEpilFileName ,'file','y','n');
@@ -76,7 +76,27 @@ PrintStringInfo('}',CPass1WhileEpilFileName ,'file','y');
// ------------------------------
// --- Insert for expression. ---
// ------------------------------
-CCall = 'while('+SharedInfo.WhileExpr.CondVar+')';
+//CCall = 'while('+SharedInfo.WhileExpr.CondVar+')';
+//PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y');
+
+i=1;
+k=1;
+CCall ='';
+CCall = CCall+'while';
+ CCall = CCall+'(';
+ while i <= NIfCondArg
+ CCall = CCall + IfCondArg(i) + ' ';
+ //d = modulo(i,3);
+ //PrintStringInfo(' '+string(i)+string(d),'file','y');
+ if (modulo(i,3)==0 & i<>NIfCondArg)
+ CCall = CCall + Op(k) + ' ';
+ k = k + 1;
+ end
+ i = i + 1;
+ end
+ CCall = CCall+')';
+
+PrintStringInfo(' '+CCall,ReportFileName,'file','y');
PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y');
// -------------------
diff --git a/2.3-1/macros/CCodeGeneration/GetClsFileName.sci b/2.3-1/macros/CCodeGeneration/GetClsFileName.sci
index 46f08201..d92a431c 100644
--- a/2.3-1/macros/CCodeGeneration/GetClsFileName.sci
+++ b/2.3-1/macros/CCodeGeneration/GetClsFileName.sci
@@ -45,6 +45,7 @@ if SCI2Cfileexist(FileInfo.USER2CLibCAnnFun,tmpannfilename)
// #RNU_RES_B
// It is a C function of the USER2C library.
// #RNU_RES_E
+ PrintStringInfo('cUser2c',ReportFileName,'file','y');
FlagFoundAnnFile = 1;
AnnFileName = fullfile(FileInfo.USER2CLibCAnnFun,tmpannfilename);
SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName);
@@ -53,6 +54,7 @@ elseif SCI2Cfileexist(FileInfo.USER2CLibSCIAnnFun,tmpannfilename)
// #RNU_RES_B
// It is a scilab function of the USER2C library.
// #RNU_RES_E
+ PrintStringInfo('fUser2c',ReportFileName,'file','y');
FlagFoundAnnFile = 1;
AnnFileName = fullfile(FileInfo.USER2CLibSCIAnnFun,tmpannfilename);
SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName);
@@ -61,6 +63,7 @@ elseif (SCI2Cfileexist(FileInfo.SCI2CLibCAnnFun,tmpannfilename))
// #RNU_RES_B
// It is a C function of the SCI2C library.
// #RNU_RES_E
+ PrintStringInfo('csci2c',ReportFileName,'file','y');
FlagFoundAnnFile = 1;
AnnFileName = fullfile(FileInfo.SCI2CLibCAnnFun,tmpannfilename);
SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName);
@@ -69,6 +72,7 @@ elseif (SCI2Cfileexist(FileInfo.SCI2CLibSCIAnnFun,tmpannfilename))
// #RNU_RES_B
// It is a scilab function of the SCI2C library.
// #RNU_RES_E
+ PrintStringInfo('fsci2c',ReportFileName,'file','y');
FlagFoundAnnFile = 1;
AnnFileName = fullfile(FileInfo.SCI2CLibSCIAnnFun,tmpannfilename);
SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName);
diff --git a/2.3-1/macros/CCodeGeneration/lib b/2.3-1/macros/CCodeGeneration/lib
index edcb004d..2db4b8c8 100644
--- a/2.3-1/macros/CCodeGeneration/lib
+++ b/2.3-1/macros/CCodeGeneration/lib
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/names b/2.3-1/macros/CCodeGeneration/names
index efbb400a..56caa81d 100644
--- a/2.3-1/macros/CCodeGeneration/names
+++ b/2.3-1/macros/CCodeGeneration/names
@@ -2,10 +2,12 @@ C_FinalizeCode
C_ForExpression
C_Funcall
C_GenDeclarations
+C_GenDeclarations_Dup
C_GenerateFunName
C_GenerateLaunchScript
C_GenerateMakefile
C_GenerateMakefile_msvc
+C_GenerateMkfle_arduino
C_GenerateSCI2CHeader
C_IfElseBlocks
C_IfExpression
diff --git a/2.3-1/macros/ErrorMessages/lib b/2.3-1/macros/ErrorMessages/lib
index 3630f722..0a9f8913 100644
--- a/2.3-1/macros/ErrorMessages/lib
+++ b/2.3-1/macros/ErrorMessages/lib
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/FA_FSFIRLIN_SZ.sci b/2.3-1/macros/FunctionAnnotation/FA_FSFIRLIN_SZ.sci
new file mode 100644
index 00000000..c1dc9e50
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_FSFIRLIN_SZ.sci
@@ -0,0 +1,9 @@
+function outp=FA_FSFIRLIN_SZ(in1sz2)
+ in1sz2=string(in1sz2);
+ in1sz=eval(in1sz2);
+ if(int(in1sz/2)==in1sz/2) then
+ outp=string(4*in1sz+1);
+ else
+ outp=string(4*in1sz+3);
+ end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci
index d11e3cee..3fadd1f2 100644
--- a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci
+++ b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci
@@ -52,7 +52,7 @@ FunSizeAnnot = '';
// ---------------------------------------------
// --- Open the .sci file (read only). ---
inclsfid = SCI2COpenFileRead(SCI2CClassFileName);
-
+PrintStringInfo(' '+string(inclsfid),ReportFileName,'file','y');
// #RNU_RES_B
// --- Loop over the lines of the input file. ---
// Position file pointer to the desired NInArg/NOutArg section,
@@ -212,5 +212,6 @@ mclose(inclsfid);
// -------------------------------------------------
// --- End Read the annotations of the function. ---
// -------------------------------------------------
+PrintStringInfo(' end of annotation '+string(NOutArg_mod),ReportFileName,'file','y');
endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_MODSN.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_MODSN.sci
new file mode 100644
index 00000000..4a58e644
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_MODSN.sci
@@ -0,0 +1,11 @@
+function outt=FA_SZ_MODSN(in1sz)
+
+in1sz=string(in1sz);
+in1s=eval(in1sz)
+if(in1s>1) then
+ outt=string(in1s);
+else
+ outt=string(1);
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_U_SVA.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_U_SVA.sci
new file mode 100644
index 00000000..3b8b25c5
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_U_SVA.sci
@@ -0,0 +1,39 @@
+function opout = FA_SZ_U_SVA(in1,in2)
+
+// function opout = FA_SZ_U_SVA(in1,in2)
+// -----------------------------------------------------------------
+// Determines the number of rows of the output arguments
+// according to the second input argument.
+//
+// Input data:
+// in1: specifying a matrix or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed size of U matrix.
+//
+// Copyright (C) 2017 - IIT Bombay - FOSSEE
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author: Sandeep Gupta
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+//
+// -----------------------------------------------------------------
+
+//in1 = string(in1);
+// disp(in1)
+// disp(in2)
+//in1 = eval(in1);
+//in2 = string(in2);
+//in2 = eval(in2);
+//[U,S,V] = sva(in1,in2);
+//outsize = size(U)
+//opout = outsize(2)
+opout = string(in2)
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_ASCII.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_ASCII.sci
new file mode 100644
index 00000000..e05dd7ae
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_TP_ASCII.sci
@@ -0,0 +1,10 @@
+function outtp=FA_TP_ASCII(in1tp)
+
+in1tp=string(in1tp);
+if(in1tp=='g') then
+ outtp='u8';
+else
+ outtp='g';
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_MODSN.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_MODSN.sci
new file mode 100644
index 00000000..f766b4e7
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_TP_MODSN.sci
@@ -0,0 +1,10 @@
+function outtp=FA_TP_MODSN(in1tp)
+
+in1tp=string(in1tp);
+if(in1tp=='d') then
+ outtp='d';
+else
+ outtp='z';
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/lib b/2.3-1/macros/FunctionAnnotation/lib
index a605af93..f02997b0 100644
--- a/2.3-1/macros/FunctionAnnotation/lib
+++ b/2.3-1/macros/FunctionAnnotation/lib
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/names b/2.3-1/macros/FunctionAnnotation/names
index 2ffbab1a..a558e8d9 100644
--- a/2.3-1/macros/FunctionAnnotation/names
+++ b/2.3-1/macros/FunctionAnnotation/names
@@ -1,5 +1,6 @@
FA_ADD
FA_DIV
+FA_FSFIRLIN_SZ
FA_GetDefaultPrecision
FA_GetFunAnn
FA_GetOutArgInfo
@@ -27,6 +28,7 @@ FA_SZ_FROM_VAL
FA_SZ_LINSPACE_ROW
FA_SZ_LQE
FA_SZ_LQR
+FA_SZ_MODSN
FA_SZ_OBSCNT
FA_SZ_OPAPEX
FA_SZ_OPBACKSLASH
@@ -58,6 +60,8 @@ FA_SZ_ROW_DIAG
FA_SZ_ROW_DIAG_INS_EXT
FA_SZ_SEL1
FA_SZ_SEL2
+FA_SZ_U_SVA
+FA_TP_ASCII
FA_TP_C
FA_TP_COMPLEX
FA_TP_CVIMAGE
@@ -67,6 +71,7 @@ FA_TP_INT16
FA_TP_INT8
FA_TP_MAX
FA_TP_MIN_REAL
+FA_TP_MODSN
FA_TP_REAL
FA_TP_S
FA_TP_UINT16
diff --git a/2.3-1/macros/FunctionList/lib b/2.3-1/macros/FunctionList/lib
index 7aaf8224..2bbf0cbe 100644
--- a/2.3-1/macros/FunctionList/lib
+++ b/2.3-1/macros/FunctionList/lib
Binary files differ
diff --git a/2.3-1/macros/GeneralFunctions/lib b/2.3-1/macros/GeneralFunctions/lib
index a141419f..e1d6f0fb 100644
--- a/2.3-1/macros/GeneralFunctions/lib
+++ b/2.3-1/macros/GeneralFunctions/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib
index 7ca99340..5c8f0da2 100644
--- a/2.3-1/macros/Hardware/AVR/lib
+++ b/2.3-1/macros/Hardware/AVR/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/lib b/2.3-1/macros/Hardware/RasberryPi/lib
index ef9e942d..9afd77da 100644
--- a/2.3-1/macros/Hardware/RasberryPi/lib
+++ b/2.3-1/macros/Hardware/RasberryPi/lib
Binary files differ
diff --git a/2.3-1/macros/ImageProcessing/core/lib b/2.3-1/macros/ImageProcessing/core/lib
index d109e50d..56053510 100644
--- a/2.3-1/macros/ImageProcessing/core/lib
+++ b/2.3-1/macros/ImageProcessing/core/lib
Binary files differ
diff --git a/2.3-1/macros/ImageProcessing/highgui/lib b/2.3-1/macros/ImageProcessing/highgui/lib
index 8e900fee..a46d5d87 100644
--- a/2.3-1/macros/ImageProcessing/highgui/lib
+++ b/2.3-1/macros/ImageProcessing/highgui/lib
Binary files differ
diff --git a/2.3-1/macros/ImageProcessing/imgproc/lib b/2.3-1/macros/ImageProcessing/imgproc/lib
index cef8f9b8..4863059b 100644
--- a/2.3-1/macros/ImageProcessing/imgproc/lib
+++ b/2.3-1/macros/ImageProcessing/imgproc/lib
Binary files differ
diff --git a/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci b/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci
index a112fe6a..eff61fe6 100644
--- a/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci
+++ b/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci
@@ -30,6 +30,7 @@ ArduinoFunctions = [
"cmd_dcmotor_run"
"cmd_servo_attach"
"cmd_servo_detach"
- "cmd_servo_move"];
+ "cmd_servo_move"
+ "i2c_dev"];
endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci b/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
index d2cd0c74..d310648e 100644
--- a/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
+++ b/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
@@ -24,6 +24,8 @@ function ArduinoSetupFunctions = GetArduinoSetupFunctions()
ArduinoSetupFunctions = [
"cmd_dcmotor_setup"
"cmd_servo_attach"
- "cmd_servo_detach"];
+ "cmd_servo_detach"
+ "i2c_dev"];
+
endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci b/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci
index 3e1c18fb..4afceca8 100644
--- a/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci
+++ b/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci
@@ -9,6 +9,7 @@
// Email: toolbox@scilab.in
function Output = IsArduinoSetupFunction(FunName)
+disp(FunName)
// -----------------------------------------------------------------
// Check whether input function name is an Arduino setup function or not.
//
@@ -25,6 +26,7 @@ function Output = IsArduinoSetupFunction(FunName)
//Get list of supported functions for Arduino
ArduinoSetupFunctions = GetArduinoSetupFunctions();
+
//Check whether input function is present in above list or not
FunNameInArduinoSetup = members(FunName,ArduinoSetupFunctions);
Output = bool2s(FunNameInArduinoSetup~=0);
diff --git a/2.3-1/macros/Scilab-Arduino/cmd_i2c_dev.sci b/2.3-1/macros/Scilab-Arduino/cmd_i2c_dev.sci
new file mode 100644
index 00000000..37854cf3
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/cmd_i2c_dev.sci
@@ -0,0 +1,3 @@
+function z = cmd_i2c_dev(address)
+ z = 0
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/cmd_i2c_read.sci b/2.3-1/macros/Scilab-Arduino/cmd_i2c_read.sci
new file mode 100644
index 00000000..1edc1aae
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/cmd_i2c_read.sci
@@ -0,0 +1,2 @@
+function y = cmd_i2c_read(address,bytes)
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/cmd_i2c_read_register.sci b/2.3-1/macros/Scilab-Arduino/cmd_i2c_read_register.sci
new file mode 100644
index 00000000..f5394a66
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/cmd_i2c_read_register.sci
@@ -0,0 +1,3 @@
+function x = cmd_i2c_read_register(address,reg_adrs)
+ x = 0;
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/cmd_i2c_write.sci b/2.3-1/macros/Scilab-Arduino/cmd_i2c_write.sci
new file mode 100644
index 00000000..8ed8eb4e
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/cmd_i2c_write.sci
@@ -0,0 +1,2 @@
+function cmd_i2c_write(address,data)
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/cmd_i2c_write_register.sci b/2.3-1/macros/Scilab-Arduino/cmd_i2c_write_register.sci
new file mode 100644
index 00000000..02c48393
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/cmd_i2c_write_register.sci
@@ -0,0 +1,2 @@
+function cmd_i2c_write_register(address, reg_adrs, data)
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/lib b/2.3-1/macros/Scilab-Arduino/lib
index 75e5b330..0304cade 100644
--- a/2.3-1/macros/Scilab-Arduino/lib
+++ b/2.3-1/macros/Scilab-Arduino/lib
Binary files differ
diff --git a/2.3-1/macros/Scilab-Arduino/names b/2.3-1/macros/Scilab-Arduino/names
index 55eb6fef..8b8d7c48 100644
--- a/2.3-1/macros/Scilab-Arduino/names
+++ b/2.3-1/macros/Scilab-Arduino/names
@@ -4,3 +4,8 @@ GetArduinoSetupFunctions
InsertSetupInList
IsArduinoFunction
IsArduinoSetupFunction
+cmd_i2c_dev
+cmd_i2c_read
+cmd_i2c_read_register
+cmd_i2c_write
+cmd_i2c_write_register
diff --git a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
index 9f5cbd4e..4c85408c 100644
--- a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
+++ b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
@@ -49,13 +49,13 @@ for cntinarg = 1:NInArg
tmpname = InArg(cntinarg).Name;
tmpscope = InArg(cntinarg).Scope;
lengthNumber = length('Number_');
- if (part(tmpscope,1:lengthNumber) == 'Number_')
+ if (part(tmpscope,1:lengthNumber) == 'Number_')
// #RNU_RES_B
PrintStringInfo('Input Argument '+string(cntinarg)+' is a number: '+tmpname+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
// #RNU_RES_E
UpdatedInArg(cntinarg).Type = part(tmpscope,lengthNumber+1:lengthNumber+1);
if (UpdatedInArg(cntinarg).Type == 'x')
- UpdatedInArg(cntinarg).Type = SharedInfo.DefaultPrecision; // It is the default.
+ UpdatedInArg(cntinarg).Type = SharedInfo.DefaultPrecision; // It is the default
elseif (UpdatedInArg(cntinarg).Type == 'X')
if (SharedInfo.DefaultPrecision == 's')
UpdatedInArg(cntinarg).Type = 'c'; // It is the default.
@@ -101,6 +101,17 @@ for cntinarg = 1:NInArg
UpdatedInArg(cntinarg).FindLike = 0;
UpdatedInArg(cntinarg).Dimension = 0;
UpdatedInArg(cntinarg).Scope = 'Number';
+ if((ASTFunName == 'cmd_analog_in' | ASTFunName == 'cmd_analog_in_volt' ) & cntinarg == 2)
+ numvalue = eval(tmpname);
+ if (SharedInfo.Board_name == 'mega' | SharedInfo.Board_name == 'mega2560') then
+ tmpname = string(numvalue + 54)
+ UpdatedInArg(cntinarg).Value = 54 + numvalue;
+ else
+ tmpname = string(numvalue + 14)
+ UpdatedInArg(cntinarg).Value = 14 + numvalue;
+ end
+ UpdatedInArg(cntinarg).Name = tmpname; // Change the name.
+ end
elseif (tmpscope == 'String')
// #RNU_RES_B
diff --git a/2.3-1/macros/SymbolTable/ST_InsOutArg.sci b/2.3-1/macros/SymbolTable/ST_InsOutArg.sci
index f4958ff7..fd6b426c 100644
--- a/2.3-1/macros/SymbolTable/ST_InsOutArg.sci
+++ b/2.3-1/macros/SymbolTable/ST_InsOutArg.sci
@@ -47,8 +47,6 @@ PrintStringInfo('***Putting output arguments in the symbol table***',ReportFileN
// ---------------------------
// --- End Initialization. ---
// ---------------------------
-
-
for counteroutput = 1:NOutArg
// #RNU_RES_B
PrintStringInfo(' Symbol ""'+OutArg(counteroutput).Name+'""',ReportFileName,'file','y','n');
diff --git a/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci b/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci
new file mode 100644
index 00000000..bca66235
--- /dev/null
+++ b/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci
@@ -0,0 +1,195 @@
+function ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedInfo,MatchRule)
+// function ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,MatchRule)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+// 26-Oct-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+SCI2CNInArgCheck(argn(2),8,8)
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+//SCI2CNInArgCheck(argn(2),5,5);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName;
+CGblDeclarFileName = FileInfo.Funct(nxtscifunnumber).CGblDeclarFileName;
+
+GlobalVarsFileName = FileInfo.GlobalVarFileName;
+LocalVarsFileName = FileInfo.Funct(nxtscifunnumber).LocalVarFileName;
+TempVarsFileName = FileInfo.Funct(nxtscifunnumber).TempVarFileName;
+
+CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName;
+CPass1FreeFileName = FileInfo.Funct(nxtscifunnumber).CPass1FreeFileName;
+
+
+// #RNU_RES_B
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Putting output arguments in the symbol table***',ReportFileName,'file','y','n');
+// #RNU_RES_E
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+for counteroutput = 1:NOutArg
+ // #RNU_RES_B
+ PrintStringInfo(' Symbol ""'+OutArg(counteroutput).Name+'""',ReportFileName,'file','y','n');
+ PrintStringInfo(' Type: '+OutArg(counteroutput).Type,ReportFileName,'file','y','n');
+ PrintStringInfo(' Size(1): '+string(OutArg(counteroutput).Size(1)),ReportFileName,'file','y','n');
+ PrintStringInfo(' Size(2): '+string(OutArg(counteroutput).Size(2)),ReportFileName,'file','y','n');
+ PrintStringInfo(' Value: '+string(OutArg(counteroutput).Value),ReportFileName,'file','y','n');
+ PrintStringInfo(' FindLike: '+string(OutArg(counteroutput).FindLike),ReportFileName,'file','y','n');
+ PrintStringInfo(' Dimension: '+string(OutArg(counteroutput).Dimension),ReportFileName,'file','y','n');
+ PrintStringInfo(' Scope: '+string(OutArg(counteroutput).Scope),ReportFileName,'file','y','n');
+ PrintStringInfo(' ',ReportFileName,'file','y','n');
+ // #RNU_RES_E
+ if (OutArg(counteroutput).Scope == 'Temp')
+ SymbTableFileName = TempVarsFileName;
+ elseif (OutArg(counteroutput).Scope == 'Local')
+ SymbTableFileName = LocalVarsFileName;
+ elseif (OutArg(counteroutput).Scope == 'Global')
+ SymbTableFileName = GlobalVarsFileName;
+ else
+ 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');
+ // #RNU_RES_E
+
+ // #RNU_RES_B
+ // Check existence and conflicts in the symbol table.
+ // Here we have four possibilities:
+ // 1. the symbol is a global variable not initialized yet -> we have to initialize it.
+ // 2. the symbol already exists with different settings -> we have to issue an error.
+ // 3. the symbol already exists with the same settings -> ok, we don't have to do nothing.
+ // 4. the symbol doesn't exist -> we have to insert it into the table.
+ // #RNU_RES_E
+ [TBFlagfound,TBFlagEqualSymbols] = ...
+ ST_MatchSymbol(OutArg(counteroutput).Name,...
+ OutArg(counteroutput).Type,...
+ OutArg(counteroutput).Size,...
+ OutArg(counteroutput).Value,...
+ OutArg(counteroutput).FindLike,...
+ OutArg(counteroutput).Dimension,...
+ SymbTableFileName,MatchRule);
+
+ if (TBFlagfound == 1)
+ if (TBFlagEqualSymbols == 0)
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Symbol Table Conflict. Trying to insert again symbol ""'+...
+ OutArg(counteroutput).Name+'"" with different settings',ReportFileName,'both','y');
+ 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');
+ 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.
+ //NUT: forse occorre un altro check sulla size per capire se occore fare il malloc.
+ //NUT: qui entro anche quando ho una variabile global gia' dichiarata tale in un altro
+ //NUT: per cui devo dichiararala come external.
+ //RNU qui ci puoi mettere una warning quando stai riallocando uno stesso simbolo con size simbolica.
+ //RNU puoi anche aggiungere del codice in c o un semplice commento. per esempio una funzione c del tipo checksize che controlla il valore
+ //RNU prima dopo delle size di una data variabile. Cosa succede se cambio la size anche nel caso di array e approccio
+ //RNU di resize non attivo? L'unica cosa e' che molte size numeriche scompaiono e incomincio a creare numerose variabili
+ //RNU con size simbolica.
+
+ // If the symbol is scalar we update its value if it is an array we update its size
+ // only in case we are using the 'REALLOC_ALL_RESIZE_ALL' resize approach
+ // #RNU_RES_E
+ if ((GetSymbolDimension(OutArg(counteroutput).Size)) == 0 | (SharedInfo.ResizeApproach=='REALLOC_ALL_RESIZE_ALL'))
+ ST_Set(OutArg(counteroutput).Name,...
+ OutArg(counteroutput).Type,...
+ OutArg(counteroutput).Size,...
+ OutArg(counteroutput).Value,...
+ OutArg(counteroutput).FindLike,...
+ OutArg(counteroutput).Dimension,...
+ SymbTableFileName);
+ end
+
+ // IndentLevelDeclaration = 1; //NUT: per ora lo forzo sempre a 1
+ // IndentLevelMalloc = SharedInfo.NIndent;
+ // FlagExt = 0;
+ // C_GenDeclarations(OutArg(counteroutput),CDeclarationFileName,IndentLevelDeclaration,ReportFileName,FlagExt,SharedInfo.ResizeApproach);
+
+
+ end
+ elseif (TBFlagfound == 2)
+ // #RNU_RES_B
+ // We have a non-initialized global variable.
+ // Set the non-initialized global variable.
+ PrintStringInfo(' Found a non-initialized global variable.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ ST_Set(OutArg(counteroutput).Name,...
+ OutArg(counteroutput).Type,...
+ OutArg(counteroutput).Size,...
+ OutArg(counteroutput).Value,...
+ OutArg(counteroutput).FindLike,...
+ OutArg(counteroutput).Dimension,...
+ SymbTableFileName);
+ IndentLevel = 0; //NUT: forced always to 1
+ FlagExt = 0;
+ C_GenDeclarations(OutArg(counteroutput),CGblDeclarFileName,IndentLevel,ReportFileName,FlagExt,SharedInfo.ResizeApproach);
+ IndentLevelMalloc = SharedInfo.NIndent;
+ // #RNU_RES_B
+ //RNU da verificare bene qui. Cio' che si verifica e' che se la size della globale e' simbolica
+ //RNU allora si assume che essa sia da allocare come puntatore e poi realloc.
+ // #RNU_RES_E
+ C_MemAllocOutTempVars(OutArg(counteroutput),1,CPass1FileName,CPass1FreeFileName,IndentLevelMalloc,ReportFileName,SharedInfo.ResizeApproach);
+ else
+ if (OutArg(counteroutput).FindLike == 1)
+ // #RNU_RES_B
+ // In presence of find-like functions the size must be always symbolic.
+ // Don't change here the value of OutArg.Size because the first time
+ // I need them to declare the OutArg variable with the values assumed by OutArg.Size.
+ // #RNU_RES_E
+ TmpOutArgSize(1) = '__'+OutArg(counteroutput).Name+'Size[0]';
+ TmpOutArgSize(2) = '__'+OutArg(counteroutput).Name+'Size[1]';
+ else
+ TmpOutArgSize(1) = OutArg(counteroutput).Size(1);
+ TmpOutArgSize(2) = OutArg(counteroutput).Size(2);
+ end
+ // #RNU_RES_B
+ // Set a new symbol.
+ // #RNU_RES_E
+ ST_Set(OutArg(counteroutput).Name,...
+ OutArg(counteroutput).Type,...
+ TmpOutArgSize,...
+ OutArg(counteroutput).Value,...
+ OutArg(counteroutput).FindLike,...
+ OutArg(counteroutput).Dimension,...
+ SymbTableFileName);
+ IndentLevelDeclaration = 1; //NUT: per ora lo forzo sempre a 1
+ IndentLevelMalloc = SharedInfo.NIndent;
+ FlagExt = 0;
+ C_GenDeclarations_Dup(InArg,NInArg,com_type,OutArg(counteroutput),CPass1FileName,IndentLevelDeclaration,ReportFileName,FlagExt,SharedInfo.ResizeApproach);
+ // #RNU_RES_B
+ //RNU aggiunta qui in modo che le malloc saranno fatte una sola volta:
+ //RNU verifica che tutto funzioni e chi altro usa la C_MemAlloc per capire se si puo' ottimizzare per questo stadio.
+ // #RNU_RES_E
+ C_MemAllocOutTempVars(OutArg(counteroutput),1,CPass1FileName,CPass1FreeFileName,IndentLevelMalloc,ReportFileName,SharedInfo.ResizeApproach);
+ end
+
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/lib b/2.3-1/macros/SymbolTable/lib
index 3b60d2d4..dbc603e2 100644
--- a/2.3-1/macros/SymbolTable/lib
+++ b/2.3-1/macros/SymbolTable/lib
Binary files differ
diff --git a/2.3-1/macros/SymbolTable/names b/2.3-1/macros/SymbolTable/names
index b5a7d65f..c2efc843 100644
--- a/2.3-1/macros/SymbolTable/names
+++ b/2.3-1/macros/SymbolTable/names
@@ -6,6 +6,7 @@ ST_GetInArgInfo
ST_GetSymbolInfo
ST_InsForCntVars
ST_InsOutArg
+ST_InsOutArg_Dup
ST_Load
ST_MatchSymbol
ST_Save
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index ffc7d482..78c48ec2 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -920,6 +920,212 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
// -------------------
+// --- Class Isreal. ---
+// -------------------
+ClassName = 'Isreal';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+//---Function list class. ----
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'isreal';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+ClassName = 'gcd';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+//---Function list class. ----
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'gcd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+ClassName = 'nextpow2';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'nextpow2';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+ClassName = 'interp1';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(3).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+//---Function list class. ----
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2s2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'interp1';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// -------------------
+// --- Class DCT. ---
+// -------------------
+ClassName = 'dct';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'dct';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class IDCT. ---
+// -------------------
+ClassName = 'idct';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+//Was FA_TP_USER
+//Cause some trouble if user specify some precision and if input(and also output) is complex.
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y'); //FOR INRIA changed from IN(1).TP to FA_TP_USER
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'idct';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// -------------------
// --- Class Sqrt. ---
// -------------------
ClassName = 'Sqrt';
@@ -1279,7 +1485,9 @@ ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
PrintStringInfo('d0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
PrintStringInfo('d2d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
@@ -4340,6 +4548,49 @@ PrintStringInfo('OUT(2).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y'
PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
PrintStringInfo('OUT(2).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+// Edited by Sandeep Gupta, IITB FOSSEE Project.
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= IN(1).SZ(1)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 4',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).SZ(2)= IN(1).SZ(1)',ClassFileName,'file','y');
+
// --- Function List Class. ---
//NUT: no mixed data types
ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
@@ -4368,6 +4619,12 @@ PrintStringInfo('d2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
PrintStringInfo('c2'+ArgSeparator+'c2c2',ClassFileName,'file','y');
PrintStringInfo('z2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'z2d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'z2d2z2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'z2d2z2z2',ClassFileName,'file','y');
+
+
// --- Annotation Function And Function List Function. ---
FunctionName = 'spec'; // AS : Done AS : Float_Done
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
@@ -4712,6 +4969,165 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
//------------------------------------
+//---- Class cmd_analog_in_volt -----------
+//------------------------------------
+ClassName = 'cmd_analog_in_volt';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''s''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_analog_in_volt';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class cmd_i2c_dev -----------
+//------------------------------------
+ClassName = 'cmd_i2c_dev';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_i2c_dev';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class cmd_i2c_write -----------
+//------------------------------------
+ClassName = 'cmd_i2c_write';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''s''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_i2c_write';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class cmd_i2c_read -----------
+//------------------------------------
+ClassName = 'cmd_i2c_read';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''s''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_i2c_read';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class cmd_i2c_read_register -----------
+//------------------------------------
+ClassName = 'cmd_i2c_read_register';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_i2c_read_register';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
+//---- Class cmd_i2c_write_register -----------
+//------------------------------------
+ClassName = 'cmd_i2c_write_register';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''s''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u80d0d0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_i2c_write_register';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
//---- Class Sleep -------------------
//------------------------------------
@@ -4738,6 +5154,57 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
//------------------------------------
+//---- Class cmd_analog_out_volt ----------
+//------------------------------------
+ClassName = 'cmd_analog_out_volt';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('d0d0s0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_analog_out_volt';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_dcmotor_release -------
+//------------------------------------
+ClassName = 'cmd_dcmotor_release';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_dcmotor_release';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
//---Functions for AVR ---------------
//------------------------------------
@@ -7194,15 +7661,34 @@ ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
PrintStringInfo('NIN= 1',ClassFileName,'file','y');
PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
-PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_2(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(2)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
PrintStringInfo('OUT(2).TP= ''d''',ClassFileName,'file','y');
-PrintStringInfo('OUT(2).SZ(1)= FA_SZ_2(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_2(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_2(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
PrintStringInfo('OUT(2).SZ(2)= FA_SZ_1(FA_SZ_LQR(IN(1).VAL))',ClassFileName,'file','y');
ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
PrintStringInfo('ss2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
-
+PrintStringInfo('ss2d2d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('ss2d2d2d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
FunctionName = 'lqr';
PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
@@ -7270,6 +7756,168 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---- Class svd ---------------------
+//------------------------------------
+ClassName = 'SVD';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d2d2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2g2'+ArgSeparator+'z2z2z2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2z2z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'svd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class HESS ---------------------
+//------------------------------------
+ClassName = 'HESS';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'hess';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class SVA ---------------------
+//------------------------------------
+ClassName = 'SVA';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_U_SVA(IN(1),IN(2).VAL)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= FA_MIN(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2d2d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sva';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
//------------------------------------
//---- Class balanc ------------------
@@ -7496,6 +8144,153 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---- Class STRCHR --------------------
+//------------------------------------
+ClassName = 'STRCHR';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strchr';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class STRNCPY --------------------
+//------------------------------------
+ClassName = 'STRNCPY';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''g''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strncpy';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class STRSPN --------------------
+//------------------------------------
+ClassName = 'STRSPN';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strspn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class STRCSPN --------------------
+//------------------------------------
+ClassName = 'STRCSPN';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strcspn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+//------------------------------------
+//---- Class ASCII --------------------
+//------------------------------------
+ClassName = 'ASCII';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_ASCII(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SUB(IN(1).SZ(2),''1'')',ClassFileName,'file','y');
+
+//PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+//PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).TP= FA_TP_ASCII(IN(1).TP)',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= FA_SUB(IN(1).SZ(2),''1'')',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'ascii';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
//------------------------------------
@@ -8122,6 +8917,7 @@ PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
// --- Function List Class. ---
ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2d2d2'+ArgSeparator+'d0',ClassFileName,'file','y');
PrintStringInfo('d2d2d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
//PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
//PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
@@ -8139,6 +8935,36 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,E
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+// --- Class Modk. ---
+// ------------------
+ClassName = 'Modk';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+//PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+//PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+//PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'modk';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
//------------------------------------
//---- Class PRIMES --------------------
@@ -8169,6 +8995,66 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
//------------------------------------
+//---- Class GCD --------------------
+//------------------------------------
+ClassName = 'GCD';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'gcd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class LCM --------------------
+//------------------------------------
+ClassName = 'LCM';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'lcm';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+
+
+//------------------------------------
//---- Class FACTOR --------------------
//------------------------------------
ClassName = 'FACTOR';
@@ -8197,6 +9083,469 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex
+//------------------------------------
+//---- Class GCD --------------------
+//------------------------------------
+ClassName = 'GCD';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'gcd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class ZPBUTT --------------------
+//------------------------------------
+ClassName = 'ZPBUTT';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''z''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).VAL',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'z2d0',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'zpbutt';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class ZPCH1 --------------------
+//------------------------------------
+ClassName = 'ZPCH1';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''z''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).VAL',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0'+ArgSeparator+'z2d0',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'zpch1';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class ZPCH2 --------------------
+//------------------------------------
+ClassName = 'ZPCH2';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 3',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''z''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).VAL',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= ''z''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(1).VAL',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= ''1''',ClassFileName,'file','y');
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0'+ArgSeparator+'z2z2d0',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'zpch2';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class BUTTMAG --------------------
+//------------------------------------
+ClassName = 'BUTTMAG';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(3).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80u80d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'buttmag';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class CHEB1MAG --------------------
+//------------------------------------
+ClassName = 'CHEB1MAG';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(4).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(4).SZ(2)',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('u80u80d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cheb1mag';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CHEB2MAG --------------------
+//------------------------------------
+ClassName = 'CHEB2MAG';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(4).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(4).SZ(2)',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('u80u80d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cheb2mag';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+//------------------------------------
+//---- Class SINC --------------------
+//------------------------------------
+ClassName = 'SINC';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sinc';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
+//---- Class SINCD --------------------
+//------------------------------------
+ClassName = 'SINCD';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_ADD(FA_MUL(''8'',IN(1).VAL),''1'')',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sincd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
+//---- Class FSFIRLIN --------------------
+//------------------------------------
+ClassName = 'FSFIRLIN';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_FSFIRLIN_SZ(IN(1).SZ(2))',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'fsfirlin';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
+//---- Class %K --------------------
+//------------------------------------
+ClassName = 'modk';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'modk';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class FILT_SINC --------------------
+//------------------------------------
+ClassName = 'FILT_SINC';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).VAL',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'filt_sinc';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class FFILT --------------------
+//------------------------------------
+ClassName = 'FFILT';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2d0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'ffilt';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class %SN --------------------
+//------------------------------------
+ClassName = 'modsn';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+
+//PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+//PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).TP= FA_TP_MODSN(IN(1).TP)',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+//PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+//PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).TP= FA_TP_MODSN(IN(1).TP',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MODSN(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_MODSN(IN(1).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_MODSN(IN(1).SZ(2))',ClassFileName,'file','y');
+
+
+
+
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'modsn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
// ////////////////////////////////////////////
// /////PARTE INTRODOTTA DA ALBERTO MOREA
// /////////////////////////////////////////////
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci
index abe813cc..3c682bf8 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci
@@ -1,4 +1,4 @@
-function SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName,CopySciCodeIntoCCode,Target)
+function SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName,CopySciCodeIntoCCode,Target,Board_name)
// function SharedInfo = INIT_GenSharedInfo(WorkingDir,OutCCCodeDir,UserSciFilesPaths,...
// RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName)
// -----------------------------------------------------------------
@@ -132,4 +132,6 @@ SharedInfo.Includelist = list(); //Maintains list of functions being used in cod
// to add their header files to main function.
SharedInfo.OpenCVUsed = %F; // Specifies if opencv library is used or not
+SharedInfo.Board_name = Board_name; //Specifies Name of Arduino board
+
endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
index 82533022..b6da9bd1 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
@@ -1,5 +1,5 @@
function [FileInfoDatFile,SharedInfoDatFile] = ...
- INIT_SCI2C(UserScilabMainFile, UserSciFilesPaths, SCI2COutputDir, RunMode,Target)
+ INIT_SCI2C(UserScilabMainFile, UserSciFilesPaths, SCI2COutputDir, RunMode,Target,Board_name)
// function [FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(SCI2CInputPrmFile)
// -----------------------------------------------------------------
// #RNU_RES_B
@@ -68,7 +68,7 @@ OutCCCodeDir = SCI2CResultDir;
//-- FIXME : MainLibHeader and Verbose mode are (?) configurable
SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile, ...
- TotTempScalarVars,EnableTempVarsReuse,"sci2clib.h", %t,Target);
+ TotTempScalarVars,EnableTempVarsReuse,"sci2clib.h", %t,Target,Board_name);
// ----------------------------
// --- Initialize FileInfo. ---
diff --git a/2.3-1/macros/ToolInitialization/ManageNextConversion.sci b/2.3-1/macros/ToolInitialization/ManageNextConversion.sci
index a1524766..b0d4337b 100644
--- a/2.3-1/macros/ToolInitialization/ManageNextConversion.sci
+++ b/2.3-1/macros/ToolInitialization/ManageNextConversion.sci
@@ -44,6 +44,8 @@ FlagContinueTranslation = 0;
// --- Finalize the current C code. ---
// ------------------------------------
C_FinalizeCode(FileInfo,SharedInfo);
+//PrintStringInfo(' hello',ReportFileName,'file','y');
+
// ------------------------------------------------
// --- Identify the next function to translate. ---
diff --git a/2.3-1/macros/ToolInitialization/lib b/2.3-1/macros/ToolInitialization/lib
index b4603969..4d03bdc5 100644
--- a/2.3-1/macros/ToolInitialization/lib
+++ b/2.3-1/macros/ToolInitialization/lib
Binary files differ
diff --git a/2.3-1/macros/cb_sci2c_gui.sci b/2.3-1/macros/cb_sci2c_gui.sci
index 62424b3d..2267c6cc 100644
--- a/2.3-1/macros/cb_sci2c_gui.sci
+++ b/2.3-1/macros/cb_sci2c_gui.sci
@@ -64,8 +64,13 @@ elseif or(get(gcbo, "tag")==["outformatradiostalone","outformatradioarduino","ou
set(findobj("tag", "outformatradioavr"), "value", 0);
set(findobj("tag", "outformatradiorpi"), "value", 0);
set(gcbo, "value", 1);
-
-
+ if get(findobj("tag", "outformatradioarduino"), "value") == 1 then
+ set(findobj("tag", "brdnmType"), "enable", "on");
+ else
+ set(findobj("tag", "brdnmType"), "enable", "off");
+ end
+ //disp("YES")
+ //disp(get(findobj("tag", "brdnmType"), "value"))
//
// --- Copy Scilab code into C option ---
//
@@ -121,6 +126,66 @@ elseif get(gcbo, "tag")=="convertbtn" then
elseif get(findobj("tag", "outformatradiorpi"), "value") == 1 then
Target = "RPi";
end
+ if get(findobj("tag", "brdnmType"), "value") == 2 then
+ Board_name = "uno"
+ elseif get(findobj("tag", "brdnmType"), "value") == 3 then
+ Board_name = "mega"
+ elseif get(findobj("tag", "brdnmType"), "value") == 4 then
+ Board_name = "mega2560"
+ elseif get(findobj("tag", "brdnmType"), "value") == 5 then
+ Board_name = "nano"
+ elseif get(findobj("tag", "brdnmType"), "value") == 6 then
+ Board_name = "nano328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 7 then
+ Board_name = "micro"
+ elseif get(findobj("tag", "brdnmType"), "value") == 8 then
+ Board_name = "mini"
+ elseif get(findobj("tag", "brdnmType"), "value") == 9 then
+ Board_name = "mini328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 10 then
+ Board_name = "pro328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 11 then
+ Board_name = "pro"
+ elseif get(findobj("tag", "brdnmType"), "value") == 12 then
+ Board_name = "pro5v328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 13 then
+ Board_name = "pro5v"
+ elseif get(findobj("tag", "brdnmType"), "value") == 14 then
+ Board_name = "atmega168"
+ elseif get(findobj("tag", "brdnmType"), "value") == 15 then
+ Board_name = "atmega8"
+ elseif get(findobj("tag", "brdnmType"), "value") == 16 then
+ Board_name = "atmega328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 17 then
+ Board_name = "bt328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 18 then
+ Board_name = "bt"
+ elseif get(findobj("tag", "brdnmType"), "value") == 19 then
+ Board_name = "diecimila"
+ elseif get(findobj("tag", "brdnmType"), "value") == 20 then
+ Board_name = "esplora"
+ elseif get(findobj("tag", "brdnmType"), "value") == 21 then
+ Board_name = "ethernet"
+ elseif get(findobj("tag", "brdnmType"), "value") == 22 then
+ Board_name = "fio"
+ elseif get(findobj("tag", "brdnmType"), "value") == 23 then
+ Board_name = "leonardo"
+ elseif get(findobj("tag", "brdnmType"), "value") == 24 then
+ Board_name = "robotControl"
+ elseif get(findobj("tag", "brdnmType"), "value") == 25 then
+ Board_name = "robotMotor"
+ elseif get(findobj("tag", "brdnmType"), "value") == 26 then
+ Board_name = "lilypad328"
+ elseif get(findobj("tag", "brdnmType"), "value") == 27 then
+ Board_name = "lilypad"
+ elseif get(findobj("tag", "brdnmType"), "value") == 28 then
+ Board_name = "lilyPadUSB"
+ else
+ Board_name = "uno"
+
+ //elseif get(findobj("tag", "brdnmType"), "value") == [1 0 0 0 0 0] then
+ //Board_name = "none"
+ end
CopySciCodeIntoCCode = get(findobj("tag", "sciintocradioyes"), "value") == 1;
@@ -132,6 +197,7 @@ elseif get(gcbo, "tag")=="convertbtn" then
// CCompilerPathStyle = "cygwin";
end
+
// -*- DEBUG ONLY -*-
//mprintf("UserScilabMainFile = {%s}\n", UserScilabMainFile);
@@ -140,8 +206,7 @@ elseif get(gcbo, "tag")=="convertbtn" then
//mprintf("RunMode = {%s}\n", RunMode);
//mprintf("CopySciCodeIntoCCode = {%d}\n", bool2s(CopySciCodeIntoCCode));
//mprintf("NativeBuild = {%s}\n", NativeBuild);
-
- scilab2c(UserScilabMainFile, UserSciCodeMainDir, UserSciFilesPaths, RunMode, NativeBuild,Target);
+ scilab2c(UserScilabMainFile, UserSciCodeMainDir, UserSciFilesPaths, RunMode, NativeBuild,Target,Board_name);
//
// --- sci2c help ---
//
diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci
index 2c9d3196..762c9a32 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.sci
+++ b/2.3-1/macros/findDeps/getAllHeaders.sci
@@ -60,7 +60,7 @@ function allHeaders = getAllHeaders(SharedInfo)
"src/c/matrixOperations/includes/logm.h"
"src/c/matrixOperations/includes/ones.h"
"src/c/matrixOperations/includes/matrixSquaredMagnitude.h"
- "src/c/matrixOperations/includes/spec.h"
+ "src/c/linearAlgebra/includes/spec.h"
"src/c/matrixOperations/includes/matrixTranspose.h"
"src/c/matrixOperations/includes/determ.h"
"src/c/matrixOperations/includes/matrixMultiplication.h"
@@ -72,6 +72,10 @@ function allHeaders = getAllHeaders(SharedInfo)
"src/c/matrixOperations/includes/kron.h"
"src/c/matrixOperations/includes/flipdim.h"
"src/c/matrixOperations/includes/norm.h"
+ "src/c/interpolation/includes/interp1.h"
+ "src/c/elementaryFunctions/includes/nextpow2.h"
+ "src/c/elementaryFunctions/includes/gcd.h"
+ "src/c/elementaryFunctions/includes/isreal.h"
"src/c/elementaryFunctions/includes/cos.h"
"src/c/elementaryFunctions/includes/fix.h"
"src/c/elementaryFunctions/includes/exp.h"
@@ -142,6 +146,9 @@ function allHeaders = getAllHeaders(SharedInfo)
"src/c/string/includes/dynlib_string.h"
"src/c/string/includes/disp.h"
"src/c/string/includes/str.h"
+ "src/c/signalProcessing/includes/modk.h"
+ "src/c/signalProcessing/includes/idct.h"
+ "src/c/signalProcessing/includes/dct.h"
"src/c/signalProcessing/fft/fft_internal.h"
"src/c/signalProcessing/ifft/ifft_internal.h"
"src/c/signalProcessing/levin/levinUtils.h"
@@ -156,6 +163,18 @@ function allHeaders = getAllHeaders(SharedInfo)
"src/c/signalProcessing/includes/lpc2cep.h"
"src/c/signalProcessing/includes/dynlib_signalprocessing.h"
"src/c/signalProcessing/includes/crossCorr.h"
+ "src/c/signalProcessing/includes/zpbutt.h"
+ "src/c/signalProcessing/includes/zpch1.h"
+ "src/c/signalProcessing/includes/zpch2.h"
+ "src/c/signalProcessing/includes/buttmag.h"
+ "src/c/signalProcessing/includes/cheb1mag.h"
+ "src/c/signalProcessing/includes/cheb2mag.h"
+ "src/c/signalProcessing/includes/sincd.h"
+ "src/c/signalProcessing/includes/fsfirlin.h"
+ "src/c/signalProcessing/includes/modk.h"
+ "src/c/signalProcessing/includes/filt_sinc.h"
+ "src/c/signalProcessing/includes/ffilt.h"
+ "src/c/signalProcessing/includes/modsn.h"
"src/c/implicitList/dynlib_implicitlist.h"
"src/c/implicitList/implicitList.h"
"src/c/differential_calculus/includes/ode.h"
@@ -166,6 +185,11 @@ function allHeaders = getAllHeaders(SharedInfo)
//"src/c/string/includes/strcmp.h"
"src/c/string/includes/strrev.h"
"src/c/string/includes/strrchr.h"
+ "src/c/string/includes/strchr.h"
+ "src/c/string/includes/ascii.h"
+ "src/c/string/includes/strspn.h"
+ "src/c/string/includes/strcspn.h"
+ "src/c/string/includes/strncpy.h"
"src/c/elementaryFunctions/includes/dec2bin.h"
"src/c/elementaryFunctions/includes/dec2hex.h"
"src/c/elementaryFunctions/includes/dec2oct.h"
@@ -187,14 +211,20 @@ function allHeaders = getAllHeaders(SharedInfo)
"src/c/elementaryFunctions/includes/factorial.h"
"src/c/elementaryFunctions/includes/primes.h"
"src/c/elementaryFunctions/includes/factor.h"
+ "src/c/elementaryFunctions/includes/gcd.h"
+ "src/c/elementaryFunctions/includes/lcm.h"
+ "src/c/elementaryFunctions/includes/sinc.h"
"src/c/CACSD/includes/syslin.h"
"src/c/CACSD/includes/lqr.h"
"src/c/CACSD/includes/lqe.h"
"src/c/CACSD/includes/obscont.h"
"src/c/linearAlgebra/includes/schur.h"
"src/c/linearAlgebra/includes/balanc.h"
+ "src/c/linearAlgebra/includes/svd.h"
+ "src/c/linearAlgebra/includes/hess.h"
+ "src/c/linearAlgebra/includes/sva.h"
"src/c/linearAlgebra/includes/rcond.h"];
-
+
//Header files required for "Arduino" output
Arduino_headers = [
@@ -207,7 +237,15 @@ function allHeaders = getAllHeaders(SharedInfo)
//"src/c/scilab-arduino/includes/cmd_servo_attach.h"
//"src/c/scilab-arduino/includes/cmd_servo_detach.h"
//"src/c/scilab-arduino/includes/cmd_servo_move.h"
- "src/c/scilab-arduino/includes/sleep.h"];
+ "src/c/scilab-arduino/includes/sleep.h"
+ "src/c/scilab-arduino/includes/cmd_analog_in_volt.h"
+ "src/c/scilab-arduino/includes/cmd_analog_out_volt.h"
+ "src/c/scilab-arduino/includes/cmd_dcmotor_release.h"
+ "src/c/scilab-arduino/includes/cmd_i2c_dev.h"
+ "src/c/scilab-arduino/includes/cmd_i2c_write.h"
+ "src/c/scilab-arduino/includes/cmd_i2c_read.h"
+ "src/c/scilab-arduino/includes/cmd_i2c_read_register.h"
+ "src/c/scilab-arduino/includes/cmd_i2c_write_register.h"];
AVR_headers = [
"src/c/hardware/avr/includes/AVRPeripheralGPIO.h"
@@ -216,8 +254,8 @@ function allHeaders = getAllHeaders(SharedInfo)
"src/c/hardware/avr/includes/AVRUtil.h"
"src/c/hardware/avr/includes/AVRPeripheralTimer.h"
"src/c/hardware/avr/includes/AVRPeripheralUART.h"
- ];
-
+ ];
+
RPi_headers = [
"thirdparty/includes/WiringPi/wiringPi.h"
"thirdparty/includes/WiringPi/wiringSerial.h"
@@ -275,4 +313,9 @@ function allHeaders = getAllHeaders(SharedInfo)
allHeaders = cat(1,allHeaders,OpenCV_headers);
end
+ if(size(SharedInfo.Includelist) <> 0 & (mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T))
+ disp("Hi")
+ allHeaders = cat(1,allHeaders,"thirdparty/includes/GSL");
+ end
+
endfunction
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci
index 885fa8aa..ecc102f1 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.sci
+++ b/2.3-1/macros/findDeps/getAllInterfaces.sci
@@ -32,7 +32,7 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/type/int_real.h"
"src/c/matrixOperations/interfaces/int_vmagn.h"
"src/c/matrixOperations/interfaces/int_ones.h"
- "src/c/matrixOperations/interfaces/int_spec.h"
+ "src/c/linearAlgebra/interfaces/int_spec.h"
"src/c/matrixOperations/interfaces/int_cat.h"
"src/c/matrixOperations/interfaces/int_zeros.h"
"src/c/matrixOperations/interfaces/int_OpBackSlash.h"
@@ -61,6 +61,10 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/matrixOperations/interfaces/int_flipdim.h"
"src/c/matrixOperations/interfaces/int_permute.h"
"src/c/matrixOperations/interfaces/int_norm.h"
+ "src/c/interpolation/interfaces/int_interp1.h"
+ "src/c/elementaryFunctions/interfaces/int_nextpow2.h"
+ "src/c/elementaryFunctions/interfaces/int_gcd.h"
+ "src/c/elementaryFunctions/interfaces/int_isreal.h"
"src/c/elementaryFunctions/interfaces/int_asinh.h"
"src/c/elementaryFunctions/interfaces/int_atanh.h"
"src/c/elementaryFunctions/interfaces/int_sinh.h"
@@ -90,11 +94,11 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/elementaryFunctions/interfaces/int_bitand.h"
"src/c/elementaryFunctions/interfaces/int_bitor.h"
"src/c/elementaryFunctions/interfaces/int_bitxor.h"
- "src/c/elementaryFunctions/interfaces/int_bitcmp.h"
- "src/c/elementaryFunctions/interfaces/int_bitset.h"
- "src/c/elementaryFunctions/interfaces/int_bitget.h"
+ "src/c/elementaryFunctions/interfaces/int_bitcmp.h"
+ "src/c/elementaryFunctions/interfaces/int_bitset.h"
+ "src/c/elementaryFunctions/interfaces/int_bitget.h"
"src/c/elementaryFunctions/interfaces/int_linspace.h"
- "src/c/elementaryFunctions/interfaces/int_logspace.h"
+ "src/c/elementaryFunctions/interfaces/int_logspace.h"
"src/c/elementaryFunctions/interfaces/int_cosh.h"
"src/c/elementaryFunctions/interfaces/int_uint8.h"
"src/c/elementaryFunctions/interfaces/int_int8.h"
@@ -114,6 +118,8 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/elementaryFunctions/interfaces/int_asech.h"
"src/c/elementaryFunctions/interfaces/int_asind.h"
"src/c/elementaryFunctions/interfaces/int_atand.h"
+ "src/c/elementaryFunctions/interfaces/int_gcd.h"
+ "src/c/elementaryFunctions/interfaces/int_lcm.h"
"src/c/statisticsFunctions/interfaces/int_mean.h"
"src/c/statisticsFunctions/interfaces/int_meanf.h"
"src/c/statisticsFunctions/interfaces/int_stdevf.h"
@@ -142,6 +148,9 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/operations/interfaces/int_OpIns.h"
"src/c/string/interfaces/int_disp.h"
"src/c/string/interfaces/int_string.h"
+ "src/c/signalProcessing/interfaces/int_modk.h"
+ "src/c/signalProcessing/interfaces/int_idct.h"
+ "src/c/signalProcessing/interfaces/int_dct.h"
"src/c/signalProcessing/interfaces/int_ifft.h"
"src/c/signalProcessing/interfaces/int_lpc2cep.h"
"src/c/signalProcessing/interfaces/int_cepstrum.h"
@@ -152,6 +161,18 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/signalProcessing/interfaces/int_fftshift.h"
"src/c/signalProcessing/interfaces/int_fft.h"
"src/c/signalProcessing/interfaces/int_lev.h"
+ "src/c/signalProcessing/interfaces/int_zpbutt.h"
+ "src/c/signalProcessing/interfaces/int_zpch1.h"
+ "src/c/signalProcessing/interfaces/int_zpch2.h"
+ "src/c/signalProcessing/interfaces/int_buttmag.h"
+ "src/c/signalProcessing/interfaces/int_cheb1mag.h"
+ "src/c/signalProcessing/interfaces/int_cheb2mag.h"
+ "src/c/signalProcessing/interfaces/int_sincd.h"
+ "src/c/signalProcessing/interfaces/int_fsfirlin.h"
+ "src/c/signalProcessing/interfaces/int_modk.h"
+ "src/c/signalProcessing/interfaces/int_filt_sinc.h"
+ "src/c/signalProcessing/interfaces/int_ffilt.h"
+ "src/c/signalProcessing/interfaces/int_modsn.h"
"src/c/implicitList/int_OpColon.h"
"src/c/differential_calculus/interfaces/int_ode.h"
"src/c/differential_calculus/interfaces/int_diffc.h"
@@ -161,6 +182,11 @@ function allInterfaces = getAllInterfaces(SharedInfo)
//"src/c/string/interfaces/int_strcmp.h"
"src/c/string/interfaces/int_strrev.h"
"src/c/string/interfaces/int_strrchr.h"
+ "src/c/string/interfaces/int_strchr.h"
+ "src/c/string/interfaces/int_ascii.h"
+ "src/c/string/interfaces/int_strspn.h"
+ "src/c/string/interfaces/int_strcspn.h"
+ "src/c/string/interfaces/int_strncpy.h"
"src/c/elementaryFunctions/interfaces/int_dec2base.h"
"src/c/elementaryFunctions/interfaces/int_base2dec.h"
"src/c/elementaryFunctions/interfaces/int_dec2bin.h"
@@ -182,12 +208,16 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/elementaryFunctions/interfaces/int_factorial.h"
"src/c/elementaryFunctions/interfaces/int_primes.h"
"src/c/elementaryFunctions/interfaces/int_factor.h"
+ "src/c/elementaryFunctions/interfaces/int_sinc.h"
"src/c/CACSD/interfaces/int_syslin.h"
"src/c/CACSD/interfaces/int_lqr.h"
"src/c/CACSD/interfaces/int_lqe.h"
"src/c/CACSD/interfaces/int_obscont.h"
"src/c/linearAlgebra/interfaces/int_schur.h"
"src/c/linearAlgebra/interfaces/int_balanc.h"
+ "src/c/linearAlgebra/interfaces/int_svd.h"
+ "src/c/linearAlgebra/interfaces/int_hess.h"
+ "src/c/linearAlgebra/interfaces/int_sva.h"
"src/c/linearAlgebra/interfaces/int_rcond.h"];
@@ -199,7 +229,14 @@ function allInterfaces = getAllInterfaces(SharedInfo)
"src/c/scilab-arduino/interfaces/int_cmd_analog_in.h"
"src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h"
"src/c/scilab-arduino/interfaces/int_cmd_servo.h"
- "src/c/scilab-arduino/interfaces/int_sleep.h"];
+ "src/c/scilab-arduino/interfaces/int_sleep.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_analog_in_volt.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_analog_out_volt.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_i2c_dev.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_i2c_write.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_i2c_read.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_i2c_write_register.h"
+ "src/c/scilab-arduino/interfaces/int_cmd_i2c_read_register.h"];
//Interface files required for "AVR" output
AVR_interfaces = [
diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci
index 6daef0b9..8b513ea5 100644
--- a/2.3-1/macros/findDeps/getAllSources.sci
+++ b/2.3-1/macros/findDeps/getAllSources.sci
@@ -155,18 +155,18 @@ function allSources = getAllSources(SharedInfo)
"src/c/matrixOperations/powm/spowma.c"
"src/c/matrixOperations/powm/zpowma.c"
"src/c/matrixOperations/powm/cpowma.c"
- "src/c/matrixOperations/spec/cspeca.c"
- "src/c/matrixOperations/spec/dspeca.c"
- "src/c/matrixOperations/spec/sspeca.c"
- "src/c/matrixOperations/spec/zspeca.c"
+ "src/c/linearAlgebra/spec/cspeca.c"
+ "src/c/linearAlgebra/spec/dspeca.c"
+ "src/c/linearAlgebra/spec/sspeca.c"
+ "src/c/linearAlgebra/spec/zspeca.c"
"src/c/matrixOperations/transpose/ztransposea.c"
"src/c/matrixOperations/transpose/stransposea.c"
"src/c/matrixOperations/transpose/ctransposea.c"
"src/c/matrixOperations/transpose/dtransposea.c"
- "src/c/matrixOperations/spec2/zspec2a.c"
- "src/c/matrixOperations/spec2/sspec2a.c"
- "src/c/matrixOperations/spec2/dspec2a.c"
- "src/c/matrixOperations/spec2/cspec2a.c"
+ "src/c/linearAlgebra/spec2/zspec2a.c"
+ "src/c/linearAlgebra/spec2/sspec2a.c"
+ "src/c/linearAlgebra/spec2/dspec2a.c"
+ "src/c/linearAlgebra/spec2/cspec2a.c"
"src/c/matrixOperations/trace/stracea.c"
"src/c/matrixOperations/trace/dtracea.c"
"src/c/matrixOperations/trace/ctracea.c"
@@ -334,6 +334,9 @@ function allSources = getAllSources(SharedInfo)
"src/c/matrixOperations/kron/skrona.c"
"src/c/matrixOperations/norm/dnormv.c"
"src/c/matrixOperations/norm/dnorma.c"
+ "src/c/elementaryFunctions/nextpow2/dnextpow2a.c"
+ "src/c/elementaryFunctions/isreal/sisreals.c"
+ "src/c/elementaryFunctions/isreal/disreals.c"
"src/c/elementaryFunctions/cos/dcosa.c"
"src/c/elementaryFunctions/cos/dcoss.c"
"src/c/elementaryFunctions/cos/scosa.c"
@@ -723,6 +726,8 @@ function allSources = getAllSources(SharedInfo)
"src/c/elementaryFunctions/bitset/u16bitsets.c"
"src/c/elementaryFunctions/bitget/u8bitgets.c"
"src/c/elementaryFunctions/bitget/u16bitgets.c"
+ "src/c/elementaryFunctions/linspace/slinspacea.c"
+ "src/c/elementaryFunctions/linspace/slinspaces.c"
"src/c/elementaryFunctions/linspace/dlinspaces.c"
"src/c/elementaryFunctions/linspace/dlinspacea.c"
"src/c/elementaryFunctions/logspace/dlogspaces.c"
@@ -787,6 +792,8 @@ function allSources = getAllSources(SharedInfo)
"src/c/elementaryFunctions/atand/datands.c"
"src/c/elementaryFunctions/atand/satanda.c"
"src/c/elementaryFunctions/atand/satands.c"
+ "src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c"
+ "src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c"
"src/c/statisticsFunctions/max/dmaxa.c"
"src/c/statisticsFunctions/max/smaxa.c"
"src/c/statisticsFunctions/max/srowmaxa.c"
@@ -992,6 +999,15 @@ function allSources = getAllSources(SharedInfo)
"src/c/string/string/u16strings.c"
"src/c/string/string/i16stringa.c"
"src/c/string/string/i16strings.c"
+ "src/c/signalProcessing/modk/dmodka.c"
+ "src/c/signalProcessing/transforms/idct/sidcta.c"
+ "src/c/signalProcessing/transforms/idct/cidcta.c"
+ "src/c/signalProcessing/transforms/idct/zidcta.c"
+ "src/c/signalProcessing/transforms/idct/didcta.c"
+ "src/c/signalProcessing/transforms/dct/sdcta.c"
+ "src/c/signalProcessing/transforms/dct/cdcta.c"
+ "src/c/signalProcessing/transforms/dct/zdcta.c"
+ "src/c/signalProcessing/transforms/dct/ddcta.c"
"src/c/signalProcessing/fft/dfft2.c"
"src/c/signalProcessing/fft/cfftma.c"
"src/c/signalProcessing/fft/r2tx.c"
@@ -1057,6 +1073,22 @@ function allSources = getAllSources(SharedInfo)
"src/c/signalProcessing/hilbert/shilberts.c"
"src/c/signalProcessing/hilbert/dhilberta.c"
"src/c/signalProcessing/hilbert/dhilberts.c"
+ "src/c/signalProcessing/zpbutt/dzpbutts.c"
+ "src/c/signalProcessing/zpch1/dzpch1s.c"
+ "src/c/signalProcessing/zpch2/dzpch2s.c"
+ "src/c/signalProcessing/buttmag/dbuttmags.c"
+ "src/c/signalProcessing/cheb1mag/dcheb1mags.c"
+ "src/c/signalProcessing/cheb2mag/dcheb2mags.c"
+ "src/c/signalProcessing/sincd/dsincds.c"
+ "src/c/signalProcessing/sincd/u8sincds.c"
+ "src/c/signalProcessing/fsfirlin/dfsfirlina.c"
+ "src/c/signalProcessing/%k/dmodka.c"
+ "src/c/signalProcessing/filt_sinc/dfilt_sincs.c"
+ "src/c/signalProcessing/ffilt/gffilts.c"
+ "src/c/signalProcessing/%sn/dmodsns.c"
+ "src/c/signalProcessing/%sn/zmodsns.c"
+ "src/c/signalProcessing/%sn/dmodsna.c"
+ "src/c/signalProcessing/%sn/zmodsna.c"
"src/c/implicitList/zimplicitLists.c"
"src/c/implicitList/dimplicitLists.c"
"src/c/implicitList/cimplicitLists.c"
@@ -1085,6 +1117,12 @@ function allSources = getAllSources(SharedInfo)
//"src/c/string/strcmp/gstrcmps.c"
"src/c/string/strrev/gstrreva.c"
"src/c/string/strrchr/gstrrchra.c"
+ "src/c/string/strchr/gstrchra.c"
+ "src/c/string/ascii/gasciia.c"
+ "src/c/string/ascii/dasciia.c"
+ "src/c/string/strspn/gstrspna.c"
+ "src/c/string/strcspn/gstrcspna.c"
+ "src/c/string/strncpy/gstrncpya.c"
"src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c"
"src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c"
"src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c"
@@ -1203,6 +1241,12 @@ function allSources = getAllSources(SharedInfo)
"src/c/elementaryFunctions/Trigonometry/sech/zsechs.c"
"src/c/elementaryFunctions/Trigonometry/sech/csecha.c"
"src/c/elementaryFunctions/Trigonometry/sech/csechs.c"
+ "src/c/interpolation/interp1/sinterp13a.c"
+ "src/c/interpolation/interp1/dinterp13a.c"
+ "src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcds.c"
+ "src/c/elementaryFunctions/Trigonometry/sinc/dsinca.c"
+ "src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c"
+ "src/c/elementaryFunctions/discrete_mathematics/gcd/dgcda.c"
"src/c/elementaryFunctions/discrete_mathematics/factorial/dfactorials.c"
"src/c/elementaryFunctions/discrete_mathematics/factorial/dfactoriala.c"
"src/c/elementaryFunctions/discrete_mathematics/factorial/sfactorials.c"
@@ -1218,6 +1262,11 @@ function allSources = getAllSources(SharedInfo)
"src/c/linearAlgebra/schur/dschura.c"
"src/c/linearAlgebra/schur/dgschura.c"
"src/c/linearAlgebra/balanc/dbalanca.c"
+ "src/c/linearAlgebra/svd/dsvda.c"
+ "src/c/linearAlgebra/svd/zsvda.c"
+ "src/c/linearAlgebra/hess/dhessa.c"
+ "src/c/linearAlgebra/sva/dsvaa.c"
+ "src/c/linearAlgebra/spec/dspec1a.c"
"src/c/linearAlgebra/rcond/drconda.c"];
//Files to be inserted only if output format selected is 'Arduino'.
@@ -1230,7 +1279,15 @@ function allSources = getAllSources(SharedInfo)
//"src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp"
//"src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp"
//"src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp"
- "src/c/scilab-arduino/sleep/u16sleeps.c"];
+ "src/c/scilab-arduino/sleep/u16sleeps.c"
+ "src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c"
+ "src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c"
+ "src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c"
+ "src/c/scilab-arduino/cmd_i2c_dev/u8cmd_i2c_devs.cpp"
+ "src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp"
+ "src/c/scilab-arduino/cmd_i2c_read/u8cmd_i2c_reads.cpp"
+ "src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp"
+ "src/c/scilab-arduino/cmd_i2c_read_register/u8cmd_i2c_read_registers.cpp"];
//Files to be inserted only if output format selected is 'AVR'.
AVR_files = [
diff --git a/2.3-1/macros/findDeps/getArduinoFiles.sci b/2.3-1/macros/findDeps/getArduinoFiles.sci
index aae8e500..97264575 100644
--- a/2.3-1/macros/findDeps/getArduinoFiles.sci
+++ b/2.3-1/macros/findDeps/getArduinoFiles.sci
@@ -23,6 +23,5 @@ function arduinoFiles = getArduinoFiles()
arduinoFiles = [
"src/c/scilab-arduino/default_files/setup_arduino.h"
- "src/c/scilab-arduino/default_files/Makefile"
"src/c/scilab-arduino/default_files/sci2c_arduino.ino"];
endfunction
diff --git a/2.3-1/macros/findDeps/lib b/2.3-1/macros/findDeps/lib
index 89bb5b29..a49dc793 100644
--- a/2.3-1/macros/findDeps/lib
+++ b/2.3-1/macros/findDeps/lib
Binary files differ
diff --git a/2.3-1/macros/lib b/2.3-1/macros/lib
index 3b1ed213..d818e184 100644
--- a/2.3-1/macros/lib
+++ b/2.3-1/macros/lib
Binary files differ
diff --git a/2.3-1/macros/runsci2c.sci b/2.3-1/macros/runsci2c.sci
index cefc0acd..2fc66be8 100644
--- a/2.3-1/macros/runsci2c.sci
+++ b/2.3-1/macros/runsci2c.sci
@@ -1,4 +1,4 @@
-function runsci2c(UserScilabMainFile, UserSciFilesPaths, SCI2COutputPath, Runmode, BuildTool,Target)
+function runsci2c(UserScilabMainFile, UserSciFilesPaths, SCI2COutputPath, Runmode, BuildTool,Target,Board_name)
// function runsci2c(SCI2CInputPrmFile)
// -----------------------------------------------------------------
// === hArtes/PoliBa/GAP SCI2C tool ===
@@ -51,7 +51,7 @@ disp(RunSci2CMainDir);
// --- Initialize the SCI2C tool directories and files. ---
[FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(UserScilabMainFile, ...
- UserSciFilesPaths, SCI2COutputPath, RunMode, Target);
+ UserSciFilesPaths, SCI2COutputPath, RunMode, Target,Board_name);
// -- Load FileInfo and SharedInfo
@@ -176,6 +176,8 @@ if (Target == 'Arduino')
//disp("Copying "+arduinoFiles(i)+" in "+SCI2COutputPath+"/arduino/sci2carduino");
copyfile(arduinoFiles(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
end
+ C_GenerateMkfle_arduino(FileInfo,SharedInfo);
+ movefile(FileInfo.MakefileFilename, SCI2COutputPath+"/arduino/sci2c_arduino/");
elseif (Target == 'AVR')
AVRFile = SCI2CHOME + "/" + "src/c/hardware/avr/default_files/Makefile";
copyfile(AVRFile, SCI2COutputPath);
diff --git a/2.3-1/macros/sci2c_gui.sci b/2.3-1/macros/sci2c_gui.sci
index 6dbd4628..bee6fe43 100644
--- a/2.3-1/macros/sci2c_gui.sci
+++ b/2.3-1/macros/sci2c_gui.sci
@@ -38,7 +38,7 @@ uimenu("parent", h, "label", gettext("Sci2c help page"), "callback", "cb_sci2c_g
uimenu("parent", h, "label", gettext("About SCI2C tools..."), "callback", "cb_sci2c_gui", "tag", "about_sci2c_menu");
figw = 800;
-figh = 15*margin + btnh + 9*widgeth;
+figh = 16*margin + btnh + 10*widgeth;
sci2cfig.axes_size = [figw figh];
sci2cfig.auto_resize = "on";
//sci2cfig.visible = "off"; // to be sure that no plot can appear in the window
@@ -79,7 +79,7 @@ optframe = uicontrol("parent", sci2cfig,...
"relief", "groove",...
"style", "frame",...
"units", "pixels",...
- "position", [margin 2*margin+btnh figw-2*margin 4*margin+6*widgeth],...
+ "position", [margin 2*margin+btnh figw-2*margin 7*margin+6*widgeth],...
"fontname", defaultfont,...
"fontunits", "points",...
"fontsize", 12,...
@@ -90,7 +90,7 @@ opttitle = uicontrol("parent", sci2cfig,...
"style", "text",...
"string", gettext("Options"),...
"units", "pixels",...
- "position", [2*margin 2*margin+btnh+4*margin+6*widgeth-8 50 18],...
+ "position", [2*margin 5*margin+btnh+4*margin+6*widgeth-8 50 18],...
"fontname", defaultfont,...
"fontunits", "points",...
"fontsize", 11,...
@@ -175,6 +175,33 @@ sciintocradiono = uicontrol("parent", sci2cfig,...
"callback", "cb_sci2c_gui",...
"tag", "sciintocradiono");
+// --- Board Name ----
+brdnmy = sciintocy + margin + btnh ;
+brdnmlabel = uicontrol("parent", sci2cfig,...
+ "style", "text",...
+ "string", gettext("Board Name: "),...
+ "position",[2*margin brdnmy widgetLabelWidth widgeth],...
+ "horizontalalignment", "left",...
+ "fontname", defaultfont,...
+ "fontunits", "points",...
+ "fontsize", 12);
+
+brdnmType = uicontrol("parent", sci2cfig,...
+ "style", "popupmenu",...
+ "string", ["";"Uno";"Mega-ATmega1280";"Mega-2560 or Mega ADK";"Nano - ATmega168";"Nano - ATmega328";"Micro";"Mini - Atmega168";"Mini - Atmega328";"Pro Mini (3.3V, 8MHz) - ATmega328";"Pro Mini (3.3V, 8MHz) - ATmega168";"Pro Mini (5V, 16MHz) - ATmega328";"Pro Mini (5V, 16MHz) - ATmega168";"NG or older - ATmega168";"NG or older - ATmega8";"Duemilanove - ATmega328";"BT - ATmega328";"BT - ATmega 168";"Diecimila/Duemilanove - ATmega168";"Esplora";"Ethernet";"Fio";"Leonardo";"Robot Control";"Robot Motor";"LilyPad Arduino - ATmega328";"LilyPad Arduino - ATmega168";"LilyPad Arduino USB"],...
+ "position",[2*margin+widgetLabelWidth brdnmy 3*radiow widgeth],...
+ "horizontalalignment", "left",...
+ "fontname", defaultfont,...
+ "enable", "off",...
+ "fontunits", "points",...
+ "fontsize", 12,...
+ "min", 0, ...
+ "max", 1, ...
+ "value", [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0],...
+ "callback", "cb_sci2c_gui",...
+ "tag", "brdnmType");
+
+sciintocy = brdnmy
// --- Output format: Standalone or Arduino
outformaty = sciintocy + margin + btnh ;
outformatlabel = uicontrol("parent", sci2cfig,...
@@ -240,7 +267,8 @@ outformatradiorpi = uicontrol("parent", sci2cfig,...
"max", 1, ...
"value", 0,...
"callback", "cb_sci2c_gui",...
- "tag", "outformatradiorpi");
+ "tag", "outformatradiorpi");
+
// --- Run mode option ---
runy = outformaty + margin + widgeth;
@@ -296,7 +324,7 @@ runradiogenlib = uicontrol("parent", sci2cfig,...
// --- Output directory ---
// ------------------------
// Frame
-optframemaxy = 2*margin+btnh + 4*margin+6*widgeth;
+optframemaxy = 5*margin+btnh + 4*margin+6*widgeth;
outframe = uicontrol("parent", sci2cfig,...
"relief", "groove",...
"style", "frame",...
diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci
index 89dcd730..197c88b0 100644
--- a/2.3-1/macros/scilab2c.sci
+++ b/2.3-1/macros/scilab2c.sci
@@ -12,6 +12,7 @@
function scilab2c(varargin)
[lhs, rhs] = argn();
+
select rhs
//
// scilab2c()
@@ -35,6 +36,7 @@ function scilab2c(varargin)
RunMode = 'All';
BuildTool = getNativeBuildTool();
Target = "StandAlone"
+ //Board_name = "uno"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths)
//
@@ -55,6 +57,7 @@ function scilab2c(varargin)
RunMode = "All";
BuildTool = getNativeBuildTool();
Target = "StandAlone"
+ //Board_name = "uno"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths, RunMode)
//
@@ -79,6 +82,7 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = getNativeBuildTool();
Target = "StandAlone"
+ //Board_name = "uno"
case 5
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -104,6 +108,7 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = varargin(5);
Target = "StandAlone"
+ //Board_name = "uno"
case 6
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -133,6 +138,41 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = varargin(5);
Target = varargin(6);
+ //Board_name = "uno";
+ case 7
+ for i = 1:4
+ if typeof(varargin(i)) <> "string"
+ error(msprintf(gettext("%s: Wrong type for input argument #%d: String expected.\n"),"scilab2c",i));
+ return
+ end
+ end
+ if varargin(4) <> "All" & varargin(4) <> "Translate" & varargin(4) <> "GenLibraryStructure" & varargin(4) <> "FunCall"
+ error(msprintf(gettext("%s: argument #%d must be: ""All"", ""Translate"" ,""GenLibraryStructure"" or ""FunCall"".\n"),"scilab2c",4));
+ return
+ end
+ if varargin(5) <> "make" & varargin(5) <> "nmake"
+ error(msprintf(gettext("%s: argument #%d must be: ""make"" or ""nmake"".\n"),"scilab2c",5));
+ return
+ end
+ if varargin(6) <> "StandAlone" & varargin(6) <> "Arduino" & varargin(6) <> "AVR" & varargin(6) <> "RPi"
+ error(msprintf(gettext("%s: argument #%d must be: ""StandAlone"" or ""Arduino"" or ""AVR"" or ""RPi"".\n"),"scilab2c",5));
+ return
+ end
+ //if varargin(7) <> "uno" & varargin(7) <> "mega" & varargin(7) <> "mega2560" & varargin(7) <> "micro" & varargin(7) <> "nano" & varargin(7) <> "mini"
+ // error(msprintf(gettext("%s: argument #%d must be: ""uno"" or ""mega"" or ""micro"" or ""nano"" or ""mini"".\n"),"scilab2c",7));
+ //return
+ //end
+ UserScilabMainFile = varargin(1);
+ CCodeOutputDir = varargin(2);
+ if varargin(3) == ""
+ UserSciFilesPaths = [];
+ else
+ UserSciFilesPaths = varargin(3);
+ end
+ RunMode = varargin(4);
+ BuildTool = varargin(5);
+ Target = varargin(6);
+ Board_name = varargin(7);
else
//
// Calling scilab2c with more than understood values
@@ -160,7 +200,7 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
if (userchoice == 1)
// --- LAUNCH SCI2C ---
- runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,Target);
+ runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,Target,Board_name);
end
endfunction