diff options
author | yash1112 | 2017-07-07 21:20:49 +0530 |
---|---|---|
committer | yash1112 | 2017-07-07 21:20:49 +0530 |
commit | 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 (patch) | |
tree | f50d6e06d8fe6bc1a9053ef10d4b4d857800ab51 /2.3-1/macros | |
download | Scilab2C-9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0.tar.gz Scilab2C-9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0.tar.bz2 Scilab2C-9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0.zip |
sci2c arduino updated
Diffstat (limited to '2.3-1/macros')
389 files changed, 32448 insertions, 0 deletions
diff --git a/2.3-1/macros/ASTManagement/%comment_string.sci b/2.3-1/macros/ASTManagement/%comment_string.sci new file mode 100644 index 00000000..a963507d --- /dev/null +++ b/2.3-1/macros/ASTManagement/%comment_string.sci @@ -0,0 +1,7 @@ +function txt=%comment_string(e) +//overloading function for "comment" type tlist string function +//fields: +// text: a string +//this is a leaf of the AST + txt=['Comment : '+e.text] +endfunction diff --git a/2.3-1/macros/ASTManagement/%cste_string.sci b/2.3-1/macros/ASTManagement/%cste_string.sci new file mode 100644 index 00000000..ba9971d2 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%cste_string.sci @@ -0,0 +1,26 @@ +function txt=%cste_string(c) +//overloading function for "cste" type tlist string function +//this is a leaf of the AST +//fields: +// value : a number or a string +//NUT: added cste I also need "" for strings in order to be sure that the blanks are +//NUT: correctly considered and not mistaken with additional blanks present in the ast text file. + stringcvalue = string(c.value); + if (stringcvalue == "%T" | ... + stringcvalue == "%t" | ... + stringcvalue == "%F" | ... + stringcvalue == "%f" | ... + stringcvalue == "%nan" | ... + stringcvalue == "%inf" | ... + stringcvalue == "%e" | ... + stringcvalue == "%pi") + txt=['Number_x: '+stringcvalue]; + elseif (isnum(stringcvalue)) + //NUT needed to convert format 1D-14 into 1d-14 + txt=['Number_x: '+strsubst(stringcvalue,'D','e')]; + elseif (stringcvalue == "%i") + txt=['Number_X: '+stringcvalue]; + else + txt=['String: ""'+stringcvalue+'""']; + end +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/%equal_string.sci b/2.3-1/macros/ASTManagement/%equal_string.sci new file mode 100644 index 00000000..9678f0e0 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%equal_string.sci @@ -0,0 +1,16 @@ +function txt=%equal_string(e) +//overloading function for "equal" type tlist string function +//this is a node of the AST + +//fields: +// expression: "expression" type tlist (the right hand side) +// lhs : list of "variable" type tlist and "operation" type tlist // (the assignment) +// endsymbol : string (the orginal end-of-instruction symbol (, ; <CR>)) + txt=['Equal' + ' Expression: ' + ' '+string(e.expression) + ' Lhs : ' + ' '+objectlist2string(e.lhs) + 'EndEqual' + ] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/%for_string.sci b/2.3-1/macros/ASTManagement/%for_string.sci new file mode 100644 index 00000000..0ed9ca28 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%for_string.sci @@ -0,0 +1,15 @@ +function txt=%for_string(F) +//overloading function for "for" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// for instructions list) +//NUT: raf cambiato ForExpression e ForStatements + txt=['For' + ' ForExpression:' + ' '+string(F.expression) + ' ForStatements:' + ' '+objectlist2string(F.statements) + 'EndFor'] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/%funcall_string.sci b/2.3-1/macros/ASTManagement/%funcall_string.sci new file mode 100644 index 00000000..faeb81d9 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%funcall_string.sci @@ -0,0 +1,15 @@ +function txt=%funcall_string(F) +//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' + ] +endfunction diff --git a/2.3-1/macros/ASTManagement/%ifthenel_string.sci b/2.3-1/macros/ASTManagement/%ifthenel_string.sci new file mode 100644 index 00000000..6787a87c --- /dev/null +++ b/2.3-1/macros/ASTManagement/%ifthenel_string.sci @@ -0,0 +1,27 @@ +function txt=%ifthenel_string(I) +//overloading function for "ifthenel" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) + txt=['If ' + ' Expression:' + ' '+string(I.expression) + ' If Statements' + ' '+objectlist2string(I.then)] + for e=I.elseifs + txt=[txt; + ' Else If Expression' + ' '+string(e.expression) + ' Else If Statements' + ' '+objectlist2string(e.then)] + end + txt=[txt; + ' Else Statements' + ' '+objectlist2string(I.else) + 'EndIf'] +endfunction diff --git a/2.3-1/macros/ASTManagement/%ifthenelse_string.sci b/2.3-1/macros/ASTManagement/%ifthenelse_string.sci new file mode 100644 index 00000000..ef588c56 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%ifthenelse_string.sci @@ -0,0 +1,27 @@ +function txt=%ifthenelse_string(I) +//overloading function for "ifthenel" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) + txt=['If ' + ' Expression:' + ' '+string(I.expression) + ' If Statements' + ' '+objectlist2string(I.then)] + for e=I.elseifs + txt=[txt; + ' Else If Expression' + ' '+string(e.expression) + ' Else If Statements' + ' '+objectlist2string(e.then)] + end + txt=[txt; + ' Else Statements' + ' '+objectlist2string(I.else) + 'EndIf'] +endfunction diff --git a/2.3-1/macros/ASTManagement/%operatio_string.sci b/2.3-1/macros/ASTManagement/%operatio_string.sci new file mode 100644 index 00000000..8421a3f4 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%operatio_string.sci @@ -0,0 +1,13 @@ +function txt=%operatio_string(O) +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string + txt=['Operation' + ' Operands:' + ' '+objectlist2string(O.operands) + ' Operator: '+O.operator + 'EndOperation' + ] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/%operation_string.sci b/2.3-1/macros/ASTManagement/%operation_string.sci new file mode 100644 index 00000000..84f5ce3c --- /dev/null +++ b/2.3-1/macros/ASTManagement/%operation_string.sci @@ -0,0 +1,13 @@ +function txt=%operation_string(O) +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string + txt=['Operation' + ' Operands:' + ' '+objectlist2string(O.operands) + ' Operator: '+O.operator + 'EndOperation' + ] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/%program_p.sci b/2.3-1/macros/ASTManagement/%program_p.sci new file mode 100644 index 00000000..f45ed69a --- /dev/null +++ b/2.3-1/macros/ASTManagement/%program_p.sci @@ -0,0 +1,4 @@ +function %program_p(p) + //overloading function for "program" type tlist display + mprintf("%s\n",string(p)) +endfunction diff --git a/2.3-1/macros/ASTManagement/%program_string.sci b/2.3-1/macros/ASTManagement/%program_string.sci new file mode 100644 index 00000000..93486992 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%program_string.sci @@ -0,0 +1,19 @@ +function txt=%program_string(p) +//overloading function for "program" type tlist string function +//main (root) node of the Abstract Formal Tree +//fields: +// name : string (the function name) +// outputs : list of "variable" type tlist (the output arg names) +// inputs : list of "variable" type tlist (the intput arg names) +// statements: list of "equal" type tlist and list('EOL') (the +// instructions list) +// nblines : number (the number of lines in the scilab function) + txt=['Program' + 'Name : '+p.name + 'Outputs: '+strcat(objectlist2string(p.outputs),' ') + 'Inputs : '+strcat(objectlist2string(p.inputs),' ') + 'Statements ' + ' '+objectlist2string(p.statements) + 'EndProgram' + ] +endfunction diff --git a/2.3-1/macros/ASTManagement/%variable_string.sci b/2.3-1/macros/ASTManagement/%variable_string.sci new file mode 100644 index 00000000..86507957 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%variable_string.sci @@ -0,0 +1,26 @@ +function txt=%variable_string(v) + global anscounter; //NUT: just to fix problem with ans variables. +//overloading function for "variable" type tlist string function +//fields: name +//this is a leaf of the AST +//NUT: changed here. For me %i is a number not a variable. + if (v.name == "%T" | ... + v.name == "%t" | ... + v.name == "%F"| ... + v.name == "%f"| ... + v.name == "%nan"| ... + v.name == "%inf"| ... + v.name == "%e" | ... + v.name == "%pi") + txt=['Number_x: '+v.name]; + elseif (v.name == "%i") + txt=['Number_X: '+v.name]; + else + if (v.name == 'ans') + anscounter = anscounter + 1; + txt=['Variable: '+v.name+string(anscounter)]; + else + txt=['Variable: '+v.name]; + end + end +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/%while_string.sci b/2.3-1/macros/ASTManagement/%while_string.sci new file mode 100644 index 00000000..7d5e6223 --- /dev/null +++ b/2.3-1/macros/ASTManagement/%while_string.sci @@ -0,0 +1,14 @@ +function txt=%while_string(W) +//overloading function for "while" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// while instructions list) + txt=['While' + ' WhileExpression:' + ' '+string(W.expression) + ' WhileStatements:' + ' '+objectlist2string(W.statements) + 'EndWhile'] +endfunction diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci new file mode 100644 index 00000000..409eaab1 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci @@ -0,0 +1,268 @@ +function AST2Ccode(FileInfoDatFile) +// function AST2Ccode(FileInfoDatFile) +// ----------------------------------------------------------------- +// Read the AST and call the corresponding handlers. +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-May-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + + +//NUT: questa funzione e' da sistemare meglio + +// --------------------- +// --- Load section. --- +// --------------------- +// --- Load File Info Structure. --- +load(FileInfoDatFile,'FileInfo'); + +// --- Load Shared Info Structure. --- +load(FileInfo.SharedInfoDatFile,'SharedInfo'); +// ------------------------- +// --- End load section. --- +// ------------------------- + +// --------------------------------------------------- +// --- Extraction of the function name and number. --- +// --------------------------------------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +SharedInfo.Function_list = []; +SharedInfo.Function_list_index = 1; + +// --------------------------------- +// --- Parameter Initialization. --- +// --------------------------------- +global SCI2CSTACK +SCI2CSTACK = ['EMPTYSTACK']; + +global StackPosition; +StackPosition = 1; + +global STACKDEDUG +STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. +// ------------------------------------- +// --- End parameter Initialization. --- +// ------------------------------------- + +ASTFileName = FileInfo.Funct(nxtscifunnumber).ASTFileName; + + +// ----------------------- +// --- Initialization. --- +// ----------------------- +// --- Open AST file. --- +SharedInfo.ASTReader.fidAST = SCI2COpenFileRead(ASTFileName); +fidAST = SharedInfo.ASTReader.fidAST; + +OrigWorkAreaUsedBytes = SharedInfo.WorkAreaUsedBytes; +OrigUsedTempScalarVars = SharedInfo.UsedTempScalarVars; + +PrintStepInfo('Generate C code in '+FileInfo.Funct(nxtscifunnumber).FinalCFileName,... + FileInfo.GeneralReport,'both'); +// --------------------------- +// --- End initialization. --- +// --------------------------- + +// ------------------------ +// --- Parse AST header. --- +// ------------------------ +ASTHeader = AST_ReadASTHeader(fidAST,ReportFileName); +SharedInfo = AST_HandleHeader(ASTHeader,FileInfo,SharedInfo); +//NUT: le metto per ora perche' quando provo a cercare lo specifier di precisione al termine +//NUT: del programma non ho piu' nulla da poppare se lo specifier e' assente. Al limite posso mettere la program e i nomi +//NUT: al posto di dummy. +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +//NUT: Se ne tolgo qualcuno ottengo errori +// ---------------------------- +// --- End Parse AST header. --- +// ---------------------------- + //NUT: better to have a function. + + // --- Reset TempVars Structure. --- + TempVars = []; + // Reset info related to temp variables used in the C code. + SharedInfo.WorkAreaUsedBytes = OrigWorkAreaUsedBytes; + SharedInfo.UsedTempScalarVars = OrigUsedTempScalarVars; + //NUT: put here a manageeol so that you can have all the save and load you want. + SharedInfo.ASTReader.UsedTempVars = 0; + +// ---------------------------------- +// --- Main loop to read the AST. --- +// ---------------------------------- +//NUT: file ottenuto con m2sci se hai tempo prova a vedere se ci sono inesattezze. +//NUT: inoltre per maggiore eleganza si puo' pensare di introdurre piu' funzioni + +while ~meof(fidAST) + // Read a line from the AST + tline = mgetl(fidAST,1); + AST_CheckLineLength(tline); + treeline = stripblanks(tline); + + if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); + end + + // Analyze line. + select treeline + + // ------------------ + // --- Functions. --- + // ------------------ + //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'); + case 'EndFuncall' then + [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Funcall'); + + // -------------- + // --- Equal. --- + // -------------- + case 'EndEqual' then + //NUT: prima di lanciare l'analisi della equal puoi mettere degli argomenti dummy + //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); + 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); + + // ---------------- + // --- If/Else. --- + // ---------------- + //NUT: da verificare la gestione dello stack + case 'If Statements' then + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'if'); + case 'Else If Expression' then + AST_PushASTStack(treeline); + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'else'); + case 'Else If Statements' then + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'elseif'); + case 'Else Statements' then + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'else'); + case 'EndIf' then + for counter=1:SharedInfo.CountNestedIf+1 + SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out'); + end + SharedInfo.CountNestedIf = 0; + + // -------------- + // --- Dummy. --- + // -------------- + case 'Comment :' then + AST_HandleEOL(FileInfo,SharedInfo); //NUT: si potrebbe differenziare comment da EOL + case '<EOL>' then + AST_HandleEOL(FileInfo,SharedInfo); + + // ----------------- + // --- Epilogue. --- + // ----------------- + case 'EndProgram' + SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo); + //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 + + // ------------ + // --- For. --- + // ------------ + case 'For' then + SharedInfo.For.Level = SharedInfo.For.Level + 1; + FileInfo = AST_HandleFor(FileInfo,SharedInfo); + case 'ForExpression:' + AST_PushASTStack(treeline); + SharedInfo.ForExpr.OnExec = SharedInfo.ForExpr.OnExec + 1; + case 'ForStatements:' + [FileInfo,SharedInfo] = AST_HandleForStatem(FileInfo,SharedInfo); + case 'EndFor' then + SharedInfo = AST_HandleEndFor(FileInfo,SharedInfo); + SharedInfo.For.Level = SharedInfo.For.Level - 1; + + // -------------- + // --- While. --- + // -------------- + case 'While' then + AST_PushASTStack(treeline); + SharedInfo.While.Level = SharedInfo.While.Level + 1; + case 'WhileExpression:' + AST_PushASTStack(treeline); + [FileInfo,SharedInfo] = AST_HandleWhileExpr(FileInfo,SharedInfo); + case 'WhileStatements:' + [FileInfo,SharedInfo] = AST_HandleWhileStatem(FileInfo,SharedInfo); + case 'EndWhile' then + SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo); + SharedInfo.While.Level = SharedInfo.While.Level - 1; + + // ---------------- + // --- Default. --- + // ---------------- + else + AST_PushASTStack(treeline); + end +end + +// ------------------------------------ +// -----List of functions Used-------- +// ------------------------------------- + +SharedInfo.Function_list_index = SharedInfo.Function_list_index - 2; +SharedInfo.Function_list = SharedInfo.Function_list(1:SharedInfo.Function_list_index); +//To remove function repeatedly used---------- +x = size(unique(SharedInfo.Function_list)); +SharedInfo.Function_list_index = x(1); +SharedInfo.Function_list = unique(SharedInfo.Function_list); + +SharedInfo.Function_list = SharedInfo.Function_list(1:SharedInfo.Function_list_index); + +// -------------------------------------- +// --- End main loop to read the AST. --- +// -------------------------------------- + +mclose(fidAST); +// --------------------- +// --- Save section. --- +// --------------------- +// --- Save Shared Info Structure. --- +save(SharedInfoDatFile, "SharedInfo"); +// ------------------------- +// --- End save section. --- +// ------------------------- +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.sci b/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.sci new file mode 100644 index 00000000..8e3afdcf --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.sci @@ -0,0 +1,88 @@ +function AST_CheckCommonInOutArgs(InArg,NInArg,OutArg,NOutArg,ReportFileName) +// function AST_CheckCommonInOutArgs(InArg,NInArg,OutArg,NOutArg,ReportFileName) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Compares input and output arguments names and issues and error +// when at least one output argument is equal to the one of the +// input arguments. The error is issued only when the common argument +// is not a scalar value. This is a safe approach that prevents error +// when the same matrix is used as both input and output argument of +// a function. +// #RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 08-Jan-2008 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),5,5); + +ncommonstrings = 0; +commonstrings = ''; + +//RNU non mi ricordo per quale motivo avevo commentato il seguente codice +//RNU e decommentato l'altro a seguire. Sembra che avessi deciso che anche +//RNU le variabili scalari non potessero essere usate nella stessa expr +//RNU contemporaneamente come input e come output +for cnt1 = 1:NInArg + for cnt2 = 1:NOutArg + if ((InArg(cnt1).Name == OutArg(cnt2).Name) & ... + (InArg(cnt1).Dimension > 0)) + ncommonstrings = ncommonstrings + 1; + commonstrings(ncommonstrings) = InArg(cnt1).Name; + end + end +end + +// for cnt1 = 1:NInArg +// for cnt2 = 1:NOutArg +// if ((InArg(cnt1).Name == OutArg(cnt2).Name)) +// ncommonstrings = ncommonstrings + 1; +// commonstrings(ncommonstrings) = InArg(cnt1).Name; +// end +// end +// end + +if (ncommonstrings > 0) + PrintStringInfo(' ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Found '+string(ncommonstrings)+' input/output 2-D arguments',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: with the same name: ',ReportFileName,'both','y'); + for cntstr = 1:ncommonstrings + PrintStringInfo('SCI2CERROR: Arg('+string(cntstr)+'): '+commonstrings(cntstr),ReportFileName,'both','y'); + end + PrintStringInfo(' ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: This approach is not allowed because it is not safe',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: due to the fact that arrays are passed by reference to functions.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: For example if A is a squared matrix then the following code,',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: A = A'';',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: could generate incorrect results.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Please consider renaming input or output arguments.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: See examples below:',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: // Example 1: Function call.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: A = zeros(10,9);',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: A = sin(A); // Not Allowed',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: // The previous line must be rewritten as:',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: MYTMP = A; // Allowed',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: A = sin(MYTMP); // Allowed',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: // Example 2: Function definition.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: function d = myfun(a,b,c,d) // Not Allowed',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: // The previous line must be rewritten as:',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: function e = myfun(a,b,c,d) // Not Allowed',ReportFileName,'both','y'); + PrintStringInfo(' ',ReportFileName,'both','y'); + error(9999, 'SCI2CERROR: Found '+string(ncommonstrings)+' input/output 2-D arguments with the same name.'); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_CheckLastFunc.sci b/2.3-1/macros/ASTManagement/AST_CheckLastFunc.sci new file mode 100644 index 00000000..508435b7 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_CheckLastFunc.sci @@ -0,0 +1,77 @@ +function [LhsArgNames,LhsArgScope,NLhsArg] = AST_CheckLastFunc(fidAST,SearchLevel) +// function [LhsArgNames,LhsArgScope,NLhsArg] = AST_CheckLastFunc(fidAST,SearchLevel) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// 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 +// ----------------------------------------------------------------- + + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +astfilepos = mtell(fidAST); +NLhsArg = 0; +LhsArgNames = ''; +LhsArgScope = ''; +FlagLastFunc = 0; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//NUT: non capisco come mai tu non faccia il flipud degli argometi letti. +//NUT: Level 1 e' quando abbiamo una equal float fun +//NUT: level 0 quando abbiamo equal fun +tline = mgetl(fidAST,1); +AST_CheckLineLength(tline); +LhsField = stripblanks(tline); +if ((SearchLevel == 1) & (LhsField == 'EndFuncall')) + SearchLevel = 0; + tline = mgetl(fidAST,1); + AST_CheckLineLength(tline); + LhsField = stripblanks(tline); +end +if ((SearchLevel == 0) & (LhsField == 'Lhs :')) + tline = mgetl(fidAST,1); + AST_CheckLineLength(tline); + LhsField = stripblanks(tline); + while(LhsField ~= 'EndEqual') + NLhsArg = NLhsArg + 1; + if (LhsField == '<EOL>') + error(9999, 'Found <EOL> before EndEqual'); + elseif (LhsField == 'EndProgram') + error(9999, 'Found EndProgram before EndEqual'); + end + if (LhsField == 'Operation') + // if (LhsField == 'Operator: ins') + // It means that we have to store the results of the function in temp vars. + LhsField = 'EndEqual'; // Force the exit from the while. + NLhsArg = 0; + LhsArgNames = ''; + LhsArgScope = ''; + else + [LhsArgNames(NLhsArg),LhsArgScope(NLhsArg)] = AST_ExtractNameAndScope(LhsField); + tline = mgetl(fidAST,1); + AST_CheckLineLength(tline); + LhsField = stripblanks(tline); + end + end +end +mseek(astfilepos,fidAST,'set'); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_CheckLineLength.sci b/2.3-1/macros/ASTManagement/AST_CheckLineLength.sci new file mode 100644 index 00000000..3973b188 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_CheckLineLength.sci @@ -0,0 +1,31 @@ +function AST_CheckLineLength(instring) +// function AST_CheckLineLength(instring) +// ----------------------------------------------------------------- +// "Fixes" the AST generator bug. When a line of code is greater +// than 80 chars the generated AST is wrong. +// +// Input data: +// instring: string read from the AST. +// +// Output data: +// --- +// +// Status: +// 15-May-2008 -- Raffaele Nutricato: Author. +// +// Copyright 2008 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// TODO : Remove me + +//if length(instring) > 77 +// SCI2Cerror('Line too long: please reduce the length of the current line.'); +//end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.sci b/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.sci new file mode 100644 index 00000000..e8ffbf1f --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.sci @@ -0,0 +1,82 @@ +function AnnotationFnc = AST_CheckPrecSpecifier(FunctionName,FileInfo,SharedInfo); +// function AnnotationFnc = AST_CheckPrecSpecifier(FunctionName,FileInfo,SharedInfo); +// ----------------------------------------------------------------- +// #RNU_RES_B +// Searches for one of the following data annotation functions: +// Funcall : int +// Funcall : float +// Funcall : double +// Note: remember to execute this function before pushing the output +// argument names into the stack. +// #RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 13-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +PrintStringInfo(' ',ReportFileName,'file','y'); +// #RNU_RES_B +PrintStringInfo(' Checking presence of precision specifier',ReportFileName,'file','y'); +//NUT: da sistemare senza le global +// #RNU_RES_E +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + +AnnotationFnc = 'default'; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +Pop1 = AST_PopASTStack(); // Rhs : +if (mtlb_strcmp(stripblanks(Pop1),'Rhs :')) + Pop2 = AST_PopASTStack(); // #lhs : 1 + if (mtlb_strcmp(stripblanks(Pop2),'#lhs : 1')) + Pop3 = AST_PopASTStack(); // Funcall : double + FunctionName = stripblanks(part(Pop3,12:length(Pop3))); + for counterdataprec = 1:max(size(SharedInfo.Annotations.DataPrec)) + if (mtlb_strcmp(FunctionName,SharedInfo.Annotations.DataPrec(counterdataprec))) + AnnotationFnc = FunctionName; + end + end + // --- Repush strings into the AST stack. --- + AST_PushASTStack(Pop3); + end + // --- Repush strings into the AST stack. --- + AST_PushASTStack(Pop2); +end +// --- Repush strings into the AST stack. --- +AST_PushASTStack(Pop1); + +if mtlb_strcmp(AnnotationFnc,'default') + // #RNU_RES_B + PrintStringInfo('Function is not annotated',ReportFileName,'file','y'); + PrintStringInfo('The ""'+SharedInfo.DefaultPrecision+'"" default precision will be used.',ReportFileName,'file','y'); + // #RNU_RES_E +else + // #RNU_RES_B + PrintStringInfo('Function is annotated with ""'+AnnotationFnc+'"" specifier',ReportFileName,'file','y'); + // #RNU_RES_E +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_DisplayStack.sci b/2.3-1/macros/ASTManagement/AST_DisplayStack.sci new file mode 100644 index 00000000..8543e2e0 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_DisplayStack.sci @@ -0,0 +1,42 @@ +function AST_DisplayStack() +// function AST_DisplayStack() +// ----------------------------------------------------------------- +// Displays the AST stack content. The AST stack is used to read the +// AST. +// +// Input data: +// --- +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + +disp('*********************') +disp('*********************') + +if (STACKDEDUG == 1) + for counterposition = 1:StackPosition + disp(SCI2CSTACK(counterposition,1)) + end +end +disp('---------------------') +disp('---------------------') +disp(' ');disp(' ');disp('Press return to continue'); halt; + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci new file mode 100644 index 00000000..1dbaaad7 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci @@ -0,0 +1,107 @@ +function [ArgName,ArgScope] = AST_ExtractNameAndScope(ASTField) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Dec-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +ArgName = ''; +ArgScope = ''; + +cnttag = 0; +cnttag = cnttag + 1; +tagname(cnttag) = 'Number_'; +taglength(cnttag) = length(tagname(cnttag)); + +cnttag = cnttag + 1; +tagname(cnttag) = 'String:'; +taglength(cnttag) = length(tagname(cnttag)); + +cnttag = cnttag + 1; +tagname(cnttag) = 'Variable:'; +taglength(cnttag) = length(tagname(cnttag)); + +cnttag = cnttag + 1; +tagname(cnttag) = 'Global:'; +taglength(cnttag) = length(tagname(cnttag)); + +cnttag = cnttag + 1; +tagname(cnttag) = 'Local:'; +taglength(cnttag) = length(tagname(cnttag)); + +cnttag = cnttag + 1; +tagname(cnttag) = 'Temp:'; +taglength(cnttag) = length(tagname(cnttag)); + +cnttag = cnttag + 1; +tagname(cnttag) = '<empty>'; +taglength(cnttag) = length(tagname(cnttag)); + +fieldlength = length(ASTField); + + +//NUT: il seguente codice e' poco elegante. +if (SCI2Cstrncmps1size(tagname(1),ASTField)) + // Here we can have: + // Number_x: it means default precision. + // Number_s: it means float real type. + // Number_d: it means double real type. + // Number_c: it means float complex type. + // Number_z: it means double complex type. + + // If ArgName is i, make it string + if(mtlb_strcmp(ASTField,"Number_x: i") == %T) + ArgName = stripblanks(part(ASTField,taglength(1)+3:fieldlength)); + ArgScope = 'String'; + else + ArgName = stripblanks(part(ASTField,taglength(1)+3:fieldlength)); + ArgScope = stripblanks(part(ASTField,1:taglength(1)+1)); + end + +elseif (SCI2Cstrncmps1size(tagname(2),ASTField)) + ArgName = stripblanks(part(ASTField,taglength(2)+1:fieldlength)); + ArgName = part(ArgName,2:length(ArgName)-1); // I remove also the first and the last " + ArgScope = 'String'; + +elseif (SCI2Cstrncmps1size(tagname(3),ASTField)) + ArgName = stripblanks(part(ASTField,taglength(3)+1:fieldlength)); + ArgScope = 'Variable'; + +elseif (SCI2Cstrncmps1size(tagname(4),ASTField)) + ArgName = stripblanks(part(ASTField,taglength(4)+1:fieldlength)); + ArgScope = 'Global'; + +elseif (SCI2Cstrncmps1size(tagname(5),ASTField)) + ArgName = stripblanks(part(ASTField,taglength(5)+1:fieldlength)); + ArgScope = 'Local'; + +elseif (SCI2Cstrncmps1size(tagname(6),ASTField)) + ArgName = stripblanks(part(ASTField,taglength(6)+1:fieldlength)); + ArgScope = 'Temp'; + +elseif (SCI2Cstrncmps1size(tagname(7),ASTField)) + ArgName = '<empty>'; + ArgScope = 'None'; +else + error(9999, 'Argument specifier not found in the AST field: '+ASTField); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_GetASTFile.sci b/2.3-1/macros/ASTManagement/AST_GetASTFile.sci new file mode 100644 index 00000000..16fbbbac --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_GetASTFile.sci @@ -0,0 +1,58 @@ +function AST_GetASTFile(FileInfoDatFile) +// function AST_GetASTFile(FileInfoDatFile) +// ----------------------------------------------------------------- +// Generates the AST file starting from the .sci file specified +// in SharedInfo.NextSCIFileName. +// +// Input data: +// FileInfoDatFile: name of the .dat file containing the FileInfo structure. +// +// Output data: +// --- +// +// Status: +// 11-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// --------------------------------- +// --- Load File Info Structure. --- +// --------------------------------- +clear FileInfo +load(FileInfoDatFile,'FileInfo'); + +// ----------------------------------- +// --- Load Shared Info Structure. --- +// ----------------------------------- +clear SharedInfo +load(FileInfo.SharedInfoDatFile,'SharedInfo'); + +// --------------------------------------------------- +// --- Extraction of the function name and number. --- +// --------------------------------------------------- +funname = SharedInfo.NextSCIFunName; +funnumber = SharedInfo.NextSCIFunNumber; + +PrintStepInfo('Generate the AST.', FileInfo.GeneralReport,'both'); + +// --- Generation of the AST file. --- +SciFile2ASTFile(FileInfo.Funct(funnumber).SCIFileName,... + FileInfo.Funct(funnumber).ASTFileName); + +// --------------------- +// --- Save section. --- +// --------------------- +// --- Save File Info Structure. --- +// save(FileInfoDatFile, "FileInfo"); +// ------------------------- +// --- End save section. --- +// ------------------------- + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.sci b/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.sci new file mode 100644 index 00000000..e7c1581c --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.sci @@ -0,0 +1,54 @@ +function [FunctionName,InArg,NInArg,OutArg,NOutArg] = ... + AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType) +// function [FunctionName,InArg,NInArg,NOutArg] = ... +// AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +//#RNU_RES_B +PrintStringInfo('***Retrieving '+ASTFunType+' Parameters from AST***',ReportFileName,'file','y'); +//#RNU_RES_E +OutArg = []; +NOutArg = 0; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ------------------------------------------------------ +// --- Get Parameters from the AST Funcall structure. --- +// ------------------------------------------------------ +if (ASTFunType=='Funcall') + [FunctionName,InArg,NInArg,NOutArg] = AST_ParseFuncallStruct(FileInfo,SharedInfo); +elseif (ASTFunType=='Operation') + [FunctionName,InArg,NInArg,NOutArg] = AST_ParseOperStruct(FileInfo,SharedInfo); +elseif (ASTFunType=='Equal') + [FunctionName,InArg,NInArg,OutArg,NOutArg] = AST_ParseEqualStruct(FileInfo,SharedInfo); +else + error(9999, 'Unknown Function type: '+ASTFunType+'.'); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.sci b/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.sci new file mode 100644 index 00000000..f45c29e5 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.sci @@ -0,0 +1,99 @@ +function [LhsArg,NLhsArg,PrecisionSpecifier,SharedInfo] = AST_GetPrecAndLhsArg(OutArg,NOutArg,FunctionName,FunTypeAnnot,FunSizeAnnot,ASTFunType,FileInfo,SharedInfo); +// function [LhsArg,NLhsArg,PrecisionSpecifier,SharedInfo] = AST_GetPrecAndLhsArg(OutArg,NOutArg,FunctionName,FunTypeAnnot,FunSizeAnnot,ASTFunType,FileInfo,SharedInfo); +// ----------------------------------------------------------------- +// //NUT: add description here +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),8,8); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +// #RNU_RES_B +PrintStringInfo('***Search for Equal Lhs and precision specifier to be applied to the current function.***',ReportFileName,'file','y'); +// #RNU_RES_E +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// #RNU_RES_B +// --------------------------------------- +// --- Search for Precision Specifier. --- +// --------------------------------------- +// #RNU_RES_E +if (NOutArg == 1 & FunTypeAnnot == 'FA_TP_USER') + PrecisionSpecifier = AST_CheckPrecSpecifier(FunctionName,FileInfo,SharedInfo); + if (PrecisionSpecifier == 'default') + SearchLevel = 0; + else + SearchLevel = 1; + SharedInfo.SkipNextPrec = 1; + end +else + PrecisionSpecifier = ''; + SearchLevel = 0; +end + +// #RNU_RES_B +// ------------------------------------------------------------- +// --- Check Last Function Condition and update LhsArg info. --- +// ------------------------------------------------------------- +// #RNU_RES_E +if ((ASTFunType~='Equal')& (NOutArg ~= 0)) + //If NOutArg = 0, bypass. + // #RNU_RES_B + PrintStringInfo(' ',ReportFileName,'file','y'); + PrintStringInfo(' Checking presence of Equal after the current function...',ReportFileName,'file','y'); + // #RNU_RES_E + [LhsArgNames,LhsArgScope,NLhsArg] = AST_CheckLastFunc(SharedInfo.ASTReader.fidAST,SearchLevel); +else + LhsArgNames = ''; + LhsArgScope = ''; + NLhsArg = 0; +end +// --- Generate the LhsArg structure. --- +LhsArg = []; +for cntarg = 1:NLhsArg + LhsArg(cntarg).Name = LhsArgNames(cntarg); + LhsArg(cntarg).Scope = LhsArgScope(cntarg); +end + +// #RNU_RES_B +// ------------------------- +// --- Check on NLhsArg. --- +// ------------------------- +// #RNU_RES_E +if (NLhsArg > 0) + // #RNU_RES_B + PrintStringInfo('...Found Equal.',ReportFileName,'file','y'); + PrintStringInfo('OutArg Names will be replaced with Lhs Names of the Equal.',ReportFileName,'file','y'); + // #RNU_RES_E + SharedInfo.SkipNextEqual = 1; // 1 = the next equal in the AST will not produce C code. + if (NLhsArg ~= NOutArg) + error(9999, 'NLhsArg='+string(NLhsArg)+' must be equal to NOutArg='+string(NOutArg)+'.'); + end +else + // #RNU_RES_B + PrintStringInfo('...Equal not found.',ReportFileName,'file','y'); + // #RNU_RES_E +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEOL.sci b/2.3-1/macros/ASTManagement/AST_HandleEOL.sci new file mode 100644 index 00000000..4b287283 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleEOL.sci @@ -0,0 +1,65 @@ +function AST_HandleEOL(FileInfo,SharedInfo) +// function AST_HandleEOL(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// Handles the EOL tag of the AST. +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + + +//#RNU_RES_B +//NUT: questa parte e' molto interessante perche' ti puo' aiutare per fare confronti +//NUT: incrociati tra le annotazioni della funzione e gli argomenti in uscita. +//NUT: in particolare una volta messi nella tabella dei simboli anche gli argomenti +//NUT: di uscita puoi benissimo verificare che li stai utilizzando bene nel corpo della funzione stessa. +//#RNU_RES_E + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +SciFileFid = FileInfo.Funct(nxtscifunnumber).SCICopyFileFid; +IndentLevel = SharedInfo.NIndent; + +PrintStepInfo('Handling EOL',ReportFileName,'file'); +sciline = mgetl(SciFileFid,1); + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y','n'); +PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); +PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); +//PrintStringInfo('### Scilab code: '+sciline+' ###',ReportFileName,'file','y','n'); +PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); +PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); +// #RNU_RES_E +PrintStringInfo(' ',CPass1FileName,'file','y'); +// RNU BRUNO modeprintstringinfo MUST BE AN EXTERNAL PARAMETER! +//modeprintstringinfo = 'both'; +if (SharedInfo.CopySciCodeIntoCCode == 1) + modeprintstringinfo = 'file'; +else + modeprintstringinfo = 'stdout'; +end +PrintStringInfo(C_IndentBlanks(IndentLevel)+'/*SCI2C: #############'+'############'+'##############'+'###############'+'############',CPass1FileName,modeprintstringinfo,'y','n'); +PrintStringInfo(C_IndentBlanks(IndentLevel)+' SCI2C: '+sciline,CPass1FileName,modeprintstringinfo,'y','n'); +PrintStringInfo(C_IndentBlanks(IndentLevel)+' SCI2C: #############'+'############'+'##############'+'###############'+'############*/',CPass1FileName,modeprintstringinfo,'y','n'); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndFor.sci b/2.3-1/macros/ASTManagement/AST_HandleEndFor.sci new file mode 100644 index 00000000..dc6c4126 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleEndFor.sci @@ -0,0 +1,78 @@ +function SharedInfo = AST_HandleEndFor(FileInfo,SharedInfo) +// function SharedInfo = AST_HandleEndFor(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Handles the EndFor tag of the AST. +// overloading function for "for" type tlist string function +// this is a node of the AST +// fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// for instructions list) +// txt=['For' +// ' ForExpression:' +// ' '+string(F.expression) +// ' ForStatements:' +// ' '+objectlist2string(F.statements) +// 'EndFor'] +// +// #RNU_RES_E +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 15-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +CPass1ForProlFileName = FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level); +CPass1ForEpilFileName = FileInfo.Funct(nxtscifunnumber).CPass1ForEpilFileName(SharedInfo.For.Level); + +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Handling EndFor***',ReportFileName,'file','y'); +CCall =''; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ---------------------------- +// --- Generate the C code. --- +// ---------------------------- +// --- Copy Epilogue into C code (Pass1) file. --- +[CLinesArray,N_Lines] = File2StringArray(CPass1ForEpilFileName); +CLinesArray = stripblanks(CLinesArray); + +for tmpcnt = 1:N_Lines-1 + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CLinesArray(tmpcnt),CPass1FileName,'file','y'); +end +PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent-1)+CLinesArray(N_Lines),CPass1FileName,'file','y'); + +// -------------------------- +// --- Update SharedInfo. --- +// -------------------------- +SharedInfo.NIndent = SharedInfo.NIndent - 1; + +// ------------------------------- +// --- Delete temporary files. --- +// ------------------------------- +SCI2Cmdelete(FileInfo.Funct(nxtscifunnumber).CPass1ForEpilFileName(SharedInfo.For.Level)); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci new file mode 100644 index 00000000..fec79532 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -0,0 +1,564 @@ + +function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +Pass1HeaderFileName = FileInfo.Funct(nxtscifunnumber).Pass1HeaderFileName; +FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir; +CGblDeclarFileName = FileInfo.Funct(nxtscifunnumber).CGblDeclarFileName; +if(SharedInfo.Target == 'AVR') + PeripheralInitListFile = FileInfo.PeripheralInitListFile; +elseif (SharedInfo.Target == 'Arduino') + SetupListFile = FileInfo.SetupListFile; +end + +Flag_FunAlreadyCalled = 0; +// #RNU_RES_B +PrintStepInfo('Handling Funcall/Operation/Equal',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); +// #RNU_RES_E +//NUT: da sistemare senza le global +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// #RNU_RES_B +// --------------------------------------------- +// --- Retrieve FunCall Parameters from AST. --- +// --------------------------------------------- +//NUT: verifica se ASTFunType e' veramente importante +// #RNU_RES_E +[ASTFunName,InArg,NInArg,OutArg,NOutArg] = AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType); +if (ASTFunType=='Funcall') +SharedInfo.Function_list(SharedInfo.Function_list_index) = ASTFunName; +SharedInfo.Function_list_index = SharedInfo.Function_list_index + 1; +end +NOutArg_mod = NOutArg + if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T) + SharedInfo.OpenCVUsed = %T; + end + + if (ASTFunName == 'OpIns') + SharedInfo.SkipNextEqual = 1; + SharedInfo.Equal.Nins = SharedInfo.Equal.Nins + 1; + //NUT: Force ins to have 0 args. Double check it. + NOutArg = 0; + // #RNU_RES_B + //NUT: io aumenterei qui gli argomenti in ingresso della ins cosi qui vengono fatte tutte le modifiche del + //NUT: caso e la C_FunCall non se ne deve preoccupare, vedi se lo stesso vale per le altre funzioni + //NUT: speciali presenti nell C_FunCall. + + // 1 more input argument containing the values to be inserted in the matrix. + // #RNU_RES_E + NInArg = NInArg + 1; + InArg(NInArg).Name = SharedInfo.Equal.InArg(SharedInfo.Equal.Nins).Name; + InArg(NInArg).Scope = SharedInfo.Equal.InArg(SharedInfo.Equal.Nins).Scope; + elseif (ASTFunName == 'global') + SharedInfo.SkipNextEqual = 1; + SharedInfo.SkipNextFun = 1; + if (NInArg ~= 1) + PrintStringInfo(' ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Multiple declaration of global variables is not allowed.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: See example below:',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: global var1 var2; //NOT ALLOWED',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: global var1; //ALLOWED',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: global var2; //ALLOWED',ReportFileName,'both','y'); + PrintStringInfo(' ',ReportFileName,'both','y'); + error(9999, 'SCI2CERROR: Multiple declaration of global variables is not allowed.'); + end + if (NOutArg ~= 1) + PrintStringInfo(' ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Unexpected number of output arguments for global function.',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Please report this error to: http://forge.scilab.org/index.php/p/scilab2c/issues/',ReportFileName,'both','y'); + PrintStringInfo(' ',ReportFileName,'both','y'); + error(9999, 'SCI2CERROR: Unexpected number of output arguments for global function.'); + end + end + + // #RNU_RES_B + // -------------------------------------- + // --- Read the function annotations. --- + // -------------------------------------- + // #RNU_RES_E + + if (ASTFunName == 'OpEqual') + FunTypeAnnot = ''; + FunSizeAnnot = ''; + else + [FunTypeAnnot,FunSizeAnnot,NOutArg_mod] = FA_GetFunAnn(NInArg,NOutArg,ASTFunName,FileInfo,SharedInfo); + end + + // #RNU_RES_B + // ------------------------------------------------------------------------------------------- + // --- Search for Equal Lhs and precision specifier to be applied to the current function. --- + // ------------------------------------------------------------------------------------------- + // #RNU_RES_E + [LhsArg,NLhsArg,FunPrecSpecifier,SharedInfo] = AST_GetPrecAndLhsArg(OutArg,NOutArg,ASTFunName,FunTypeAnnot,FunSizeAnnot,ASTFunType,FileInfo,SharedInfo); + //NUT: questa funzione contiene troppi parametri e mi sembra disordinata. + + // #RNU_RES_B + // -------------------------------- + // --- Input Arguments Section. --- + // -------------------------------- + // --- Get Input Arguments info from their numerical value or from the symbol table. --- + // #RNU_RES_E + if (ASTFunName == 'global') + [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension,TBScope] = ... + ST_GetSymbolInfo(InArg(1).Name,FileInfo,SharedInfo); + if (TBFlagfound == 1) + InArg(1).Type = TBType; + InArg(1).Size = TBSize; + InArg(1).Value = TBValue; + InArg(1).FindLike = TBFindLike; + InArg(1).Dimension = TBDimension; + InArg(1).Scope = TBScope; + IndentLevelGlobal = 0; //NUT: forced always to 1 + FlagExt = 1; + C_GenDeclarations(InArg(1),CGblDeclarFileName,IndentLevelGlobal,ReportFileName,FlagExt,SharedInfo.ResizeApproach); + else + // #RNU_RES_B + // That means it is the first time we encounter + // this global variable and in C this means that + // we don't have to do nothing. + // #RNU_RES_E + // SharedInfo.SkipNextFun = SharedInfo.SkipNextFun + 1; + SharedInfo.SkipNextFun = 1; + + InArg(1).Type = 'GBLToBeDefined'; + InArg(1).Size(1) = 'GBLToBeDefined'; + InArg(1).Size(2) = 'GBLToBeDefined'; + InArg(1).Value = %nan; + InArg(1).FindLike = %nan; + InArg(1).Dimension = %nan; + InArg(1).Scope = 'Global'; + + // #RNU_RES_B + PrintStringInfo('***Putting global variable in the symbol table***',ReportFileName,'file','y'); + PrintStringInfo(' Symbol ""'+InArg(1).Name+'""',ReportFileName,'file','y'); + + PrintStringInfo(' Type: '+InArg(1).Type,ReportFileName,'file','y'); + PrintStringInfo(' Size(1): '+string(InArg(1).Size(1)),ReportFileName,'file','y'); + PrintStringInfo(' Size(2): '+string(InArg(1).Size(2)),ReportFileName,'file','y'); + PrintStringInfo(' Value: '+string(InArg(1).Value),ReportFileName,'file','y'); + PrintStringInfo(' FindLike: '+string(InArg(1).FindLike),ReportFileName,'file','y'); + PrintStringInfo(' Dimension: '+string(InArg(1).Dimension),ReportFileName,'file','y'); + PrintStringInfo(' Scope: '+string(InArg(1).Scope),ReportFileName,'file','y'); + PrintStringInfo(' ',ReportFileName,'file','y'); + // #RNU_RES_E + + ST_Set(InArg(1).Name,... + InArg(1).Type,... + InArg(1).Size,... + InArg(1).Value,... + InArg(1).FindLike,... + InArg(1).Dimension,... + FileInfo.GlobalVarFileName); + end + else + if(ASTFunName == 'ode') + //Differnt handling of ode function is required as one of its input + // is a name of a function + if NInArg == 4 + ODEFunName = InArg(4).Name; + //To differentiate functions containing differential equations, + //'odefn' is added at the beginning of the function name. + InArg(4).Name = 'odefn'+ InArg(4).Name + SharedInfo.Includelist($+1) = InArg(4).Name; + //Add ode function in list. this will be used to add corresponding + //header file in main function. + elseif NInArg == 5 + ODEFunName = InArg(5).Name; + InArg(5).Name = 'odefn'+ InArg(5).Name + SharedInfo.Includelist($+1) = InArg(5).Name; + elseif NInArg == 6 + ODEFunName = InArg(6).Name; + InArg(6).Name = 'odefn'+ InArg(6).Name + SharedInfo.Includelist($+1) = InArg(6).Name; + end + + + elseif(ASTFunName == 'RPI_ThreadCreate') + PI_thread_FunName = InArg(1).Name; + InArg(1).Name = 'PI_thread_'+PI_thread_FunName; + SharedInfo.Includelist($+1) = InArg(1).Name; + elseif(ASTFunName == 'RPI_PinISR') + PI_ISR_FunName = InArg(3).Name; + InArg(3).Name = 'ISR_'+PI_ISR_FunName; + SharedInfo.Includelist($+1) = InArg(3).Name; + end + [InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,ASTFunName); + + end + + // #RNU_RES_B + // ------------------------------------------------------------------- + // --- Change info of Input Argument according to resize approach. --- + // ------------------------------------------------------------------- + //RNU toglimi nella versione da dare ad hartes. + //RNU per ora gestisco solo la resize all con tutte realloc. + //RNU global variables are still coded with fixed size. + // #RNU_RES_E + if (SharedInfo.ResizeApproach=='REALLOC_ALL_RESIZE_ALL') + for cntin = 1:NInArg + if ((InArg(cntin).Dimension > 0)) + // if ((InArg(cntin).Dimension > 0) & (InArg(cntin).Scope ~= 'Global')) + InArg(cntin).Size(1) = '__'+InArg(cntin).Name+'Size[0]'; + InArg(cntin).Size(2) = '__'+InArg(cntin).Name+'Size[1]';s + end + //#RNUREM_MERNU vedi se la seguente fa casino l'ho aggiunta in modo che agia=ones(1,3) sia generata come realloc ma non ho verificato. + tmpscope = InArg(cntin).Scope; + lengthNumber = length('Number_'); + if (part(tmpscope,1:lengthNumber) == 'Number_') + //#RNUREM_ME RNU il problema e' che ones(3,1) allora l'output e' 3,1 e come faccio a trasformare 3 e 1 in simboli in modo tale che realloco anziche' allocare + InArg(cntin).Value = %nan; //RNU non va bene dove per esempio hai problemi di 1:3:4 se al posto dei numeri metti nan ti impalli + //#RNUREM_ME Credo che dove c'e' uan allocazione secca ones(3,1) non vada lasciata cosi' ma tutto vada ricondotto a realloc + //#RNUREM_ME quindi devo vedere nella dichiarazione delle variabili come forzare la dichiarazione dei null pointer. + //#RNUREM_ME successivamente devo vedere come fare a riscrivere la size dell'output. + else + end + end + end + + // #RNU_RES_B + // --------------------------------- + // --- Output Arguments Section. --- + // --------------------------------- + // --- Update Out arg structure with info stored in the function annotations. --- + // #RNU_RES_E + if (ASTFunName == 'OpEqual') + for cntin = 1:NInArg + OutArg(cntin).Type = InArg(cntin).Type; + OutArg(cntin).Size = InArg(cntin).Size; + OutArg(cntin).Dimension = InArg(cntin).Dimension; + OutArg(cntin).Value = InArg(cntin).Value; + OutArg(cntin).FindLike = InArg(cntin).FindLike; + //NUT: forse qui occorre aggiungere lo scope che dovrebbe essere local or global. + //NUT: per ora lo scope viene settato da AST_ParseEqualStruct + end + elseif ((ASTFunName == 'OpMinus') & (NInArg == 1) & (InArg(1).Dimension == 0)&(InArg(1).Scope == 'Number')) + // #RNU_RES_B + // --- Manage OpMinus when applied to scalars. --- + // -1 is not translated as tmp = OpMinus(1), but + // it is considered as a single entity "-1" + // #RNU_RES_E + SharedInfo.SkipNextFun = 1; //RN: SISTEMAMI + OutArg(1).Type = InArg(1).Type; + OutArg(1).Size = InArg(1).Size; + OutArg(1).Dimension = InArg(1).Dimension; + OutArg(1).Value = -InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + OutArg(1).Scope = 'Number_'+InArg(1).Type; + elseif ((ASTFunName == 'float') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + // #RNU_RES_B + // --- Manage OpMinus when applied to scalars. --- + // -1 is not translated as tmp = OpMinus(1), but + // it is considered as a single entity "-1" + // #RNU_RES_E + SharedInfo.SkipNextFun = 1; //RN: SISTEMAMI + OutArg(1).Type = InArg(1).Type; + OutArg(1).Size = InArg(1).Size; + OutArg(1).Dimension = InArg(1).Dimension; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + OutArg(1).Scope = 'Number_s'; + elseif ((ASTFunName == 'double') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + // #RNU_RES_B + // --- Manage OpMinus when applied to scalars. --- + // -1 is not translated as tmp = OpMinus(1), but + // it is considered as a single entity "-1" + // #RNU_RES_E + SharedInfo.SkipNextFun = 1; + //RN: SISTEMAMI + SharedInfo.SkipNextFun = 1; //RN: SISTEMAMI + OutArg(1).Type = InArg(1).Type; + OutArg(1).Size = InArg(1).Size; + OutArg(1).Dimension = InArg(1).Dimension; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + OutArg(1).Scope = 'Number_d'; + else + OutArg = FA_GetOutArgInfo(InArg,NInArg,OutArg,NOutArg,SharedInfo,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,ReportFileName,ASTFunName); + end + + // #RNU_RES_B + // --- Generate the names for the output arguments. --- + // Update of OutArg.Name and OutArg.Scope fields. + // #RNU_RES_E + if ((ASTFunName == 'OpMinus') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Name = string(OutArg(1).Value); + elseif ((ASTFunName == 'float') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + 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); + else + [OutArg,SharedInfo] = GenOutArgNames(ASTFunName,InArg,NInArg,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo); + end + + if ((ASTFunName == 'uint8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + elseif ((ASTFunName == 'int8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + elseif ((ASTFunName == 'uint16') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + elseif ((ASTFunName == 'int16') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + end + + // #RNU_RES_B + // --- Push in the AST stack the Output arguments. --- + // #RNU_RES_E + if (ASTFunName == 'OpEqual') + // Do nothing + else + for counteroutargs = 1:NOutArg + tmppushstack = OutArg(counteroutargs).Scope+': '+OutArg(counteroutargs).Name; + // #RNU_RES_B + PrintStringInfo(' Pushing in the AST stack: ""'+tmppushstack+'"".',ReportFileName,'file','y'); + // #RNU_RES_E + AST_PushASTStack(tmppushstack); + end + end + + + // #RNU_RES_B + //NUT: verificare se si puo' accorpare qualcosa qui sotto + //RN: non capisco come mai analizzo lo scope dopo che faccio il push nello stack dove lo utilizzo!!! + // --- Scope analysis of the output arguments. --- + // #RNU_RES_E + if (ASTFunName == 'OpMinus' & NInArg == 1 & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + // Scope already set above. + elseif (ASTFunName == 'float' & NInArg == 1 & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + // Scope already set above. + elseif (ASTFunName == 'double' & NInArg == 1 & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + // Scope already set above. + else + OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo); + end + + //#RNUREM_ME --- Check if the current function is handling for counter variables. --- + [OutArg,SharedInfo] = ST_InsForCntVars(InArg,NInArg,OutArg,NOutArg,ASTFunName,FileInfo,SharedInfo); + + //#RNUREM_ME --- Store the while condition variable (if any). --- + SharedInfo = GetWhileCondVariable(OutArg,NOutArg,ASTFunName,FileInfo,SharedInfo); + + + //#RNUREM_ME --- Update Symbol Table with output arguments. --- + if ((ASTFunName == 'OpMinus') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + //#RNUREM_ME A number is not inserted in the symbol table. + elseif ((ASTFunName == 'float') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + //#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. + else + ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,'all'); + end + if ASTFunName == 'ode' then + if ((NInArg == 4) | (NInArg == 6)) + ODE_InArg(1) = InArg(3) + ODE_InArg(2) = InArg(1) + ODE_OutArg(1) = OutArg(1) + elseif NInArg == 5 then + ODE_InArg(1) = InArg(4) + ODE_InArg(2) = InArg(2) + ODE_OutArg(1) = OutArg(1) + end + ODE_CFunName = C_GenerateFunName('odefn'+ODEFunName,ODE_InArg,2,ODE_OutArg,1); + //Functions containing differential equations that are used with 'ode' + //function need to be handled differently. + + [FunFound, FunType, FunSize, FunValue, FunFindLike, FunDimension] = ... + ST_Get(InArg(4).Name,FileInfo.GlobalVarFileName); + //ST_Del(InArg(4).Name,FileInfo.GlobalVarFileName); + //ST_Set(ODE_CFunName, FunType, FunSize, FunValue, FunFindLike, FunDimension); + end + + //#RNUREM_ME NUT: per risparmiare tempo di esecuzione puoi mettere delle if sulle funzioni che devono + //#RNUREM_ME NUT: essere skippate. + + //#RNU_RES_B + // -------------------------------------------- + // --- Generate the C name of the function. --- + // -------------------------------------------- + //#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)) + //disp(ASTFunName) + if(IsArduinoSetupFunction(ASTFunName)) + //If current function is an arduino setup function (like 'dc_motor_setup'), it + //should not be converted and inserted here. It is inserted in a list now and + //added to 'setup_arduino.c' later + InsertSetupInList(CFunName,InArg,NInArg,SetupListFile,'Setup'); + SharedInfo.SkipNextFun = SharedInfo.SkipNextFun + 1; + else //Currnet arduino function is not a setup function, so init function must be added + InsertSetupInList(ASTFunName,InArg,NInArg,SetupListFile,'Init'); + end + end + + // ------------------------------------------------------------------------- + // --- Determine which library the function belongs to: USER2C or SCI2C. --- + // ------------------------------------------------------------------------- + //#RNU_RES_E + if SCI2Cfileexist(FileInfo.SCI2CLibCAnnFun,ASTFunName+'.ann') + LibTypeInfo = 'SCI2C'; + else + LibTypeInfo = 'USER2C'; + end + + //#RNU_RES_B + // ------------------------------------------------------------------------------------ + // --- Check whether the function has been already called in the current .sci file. --- + // ------------------------------------------------------------------------------------ + //#RNU_RES_E + if (sum(SharedInfo.CFunctsAlreadyCalled == CFunName) == 1) + Flag_FunAlreadyCalled = 1; + else + + //#RNUREM_ME Add the C function name to the list of C functions called in the current .sci file. + SharedInfo.CFunctsAlreadyCalled(size(SharedInfo.CFunctsAlreadyCalled,1)+1) = CFunName; + end + + //#RNU_RES_B + // ---------------------------------- + // --- Generate FunInfo dat file. --- + // ---------------------------------- + //NUT: questo .dat deve essere generato sempre perche' cambiano i nomi degli argomenti mentre il resto dovrebbe + //NUT: essere tutto uguale + //NUT: magari posso fare una funzione che inserisce solo i campi diversi e fa un check su quelli che + //NUT: dovrebbero essere identici. + //#RNU_RES_E + GenCFunDatFiles(ASTFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg_mod,CFunName,LibTypeInfo,FunInfoDatDir); + + //#RNU_RES_B + // ----------------------------------- + // --- Update SCI2C Function List. --- + // ----------------------------------- + // Functions that are not already available in C are stored + // in the SCI2C Function List and converted in C at the end of + // the translation of the current .sci file. + //NUT: il problema della d0d0OpEqual dovrebbe essere legato al fatto che cerco di fare la opequal legata alla ins... + //NUT: devo evitare di scriveral dentro la lsista delle funzioni da tradurre. + //#RNU_RES_E + + SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo); + + //#RNU_RES_B + // ----------------------------------------------- + // --- Check on common input/output arguments. --- + // ----------------------------------------------- + //#RNU_RES_E + if (((ASTFunName=='OpEqual') & (SharedInfo.SkipNextEqual == 1)) | ... + SharedInfo.SkipNextFun > 0 | ... + ((sum(mtlb_strcmp(ASTFunName,SharedInfo.Annotations.DataPrec)) > 0) & (SharedInfo.SkipNextPrec == 1))) + // Do nothing + else + AST_CheckCommonInOutArgs(InArg,NInArg,OutArg,NOutArg,ReportFileName); + end + + //#RNU_RES_B + // ----------------------------- + // --- C Generation Section. --- + // ----------------------------- + // --- Load FunInfo structure. --- + //#RNU_RES_E + FunInfoDatFileName = fullfile(FunInfoDatDir,CFunName+'.dat'); + load(FunInfoDatFileName,'FunInfo'); + + //#RNU_RES_B + // --- Generate include. --- + //#RNU_RES_E + if ((Flag_FunAlreadyCalled == 0) & (FunInfo.LibTypeInfo == 'USER2C') & (SharedInfo.NextCFunName ~= CFunName)) + // (SharedInfo.NextCFunName ~= CFunName) I don't want an include in the same file. Ex. in main.h I don't want include "main.h" + // #RNU_RES_B + PrintStringInfo('Adding include',ReportFileName,'file','y'); + PrintStringInfo('#include ""'+CFunName+'.h""',... + ReportFileName,'file','y'); + // #RNU_RES_E + PrintStringInfo('#include ""'+CFunName+'.h""',... + Pass1HeaderFileName,'file','y'); + end + + //#RNU_RES_B + // --- Generate the C code for the current function. --- + //#RNU_RES_E + FlagCall = 1; + SharedInfo = C_Funcall(FunInfo,FileInfo,SharedInfo,FlagCall); + //#RNU_RES_B + //NUT: anziche farla fare alla cfuncall l'aggiornamento delle skip metti qui una funzione dedicata a cio' + //NUT: e' piu' ordinato. + //#RNU_RES_E + + //If current function being converted is 'ode', insert function containing + //in list of functions to be converted + if ASTFunName == 'ode' then + //ODE_InArg(1) = InArg(3) + //ODE_InArg(2) = InArg(1) + //ODE_OutArg(1) = OutArg(1) + //ODE_CFunName = C_GenerateFunName(ODEFunName,ODE_InArg,2,ODE_OutArg,1); + GenCFunDatFiles(ODEFunName,%t,FunTypeAnnot,['IN(2).SZ(1)' 'IN(2).SZ(2)'],ODE_InArg,2,ODE_OutArg,1,ODE_CFunName,LibTypeInfo,FunInfoDatDir); + SharedInfo = FL_UpdateToBeConv(ODEFunName,ODE_CFunName,%t,FunTypeAnnot,FunSizeAnnot,ODE_InArg,2,ODE_OutArg,1,FileInfo,SharedInfo); + elseif ASTFunName == 'RPI_ThreadCreate' then + temp_InArg = InArg; + temp_InArg(1).Name = "" + PI_thread_CFunName = C_GenerateFunName(InArg(1).Name,temp_InArg,0,%t,0); + GenCFunDatFiles(PI_thread_FunName,%t,[],%t,temp_InArg,0,%t,0,PI_thread_CFunName,LibTypeInfo,FunInfoDatDir); + SharedInfo = FL_UpdateToBeConv(PI_thread_FunName,PI_thread_CFunName,%t,FunTypeAnnot,[],%t,0,%t,0,FileInfo,SharedInfo); + elseif ASTFunName == 'RPI_PinISR' then + temp_InArg = InArg; + temp_InArg(1).Name = "" + PI_ISR_CFunName = C_GenerateFunName(InArg(3).Name,temp_InArg,0,%t,0); + GenCFunDatFiles(PI_ISR_FunName,%t,[],%t,temp_InArg,0,%t,0,PI_ISR_CFunName,LibTypeInfo,FunInfoDatDir); + SharedInfo = FL_UpdateToBeConv(PI_ISR_FunName,PI_ISR_CFunName,%t,FunTypeAnnot,[],%t,0,%t,0,FileInfo,SharedInfo); + end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndProgram.sci b/2.3-1/macros/ASTManagement/AST_HandleEndProgram.sci new file mode 100644 index 00000000..2d6d77a9 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleEndProgram.sci @@ -0,0 +1,62 @@ +function SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo) +// function SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// Handles the EndProgram tag of the AST. +// +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 12-Jun-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName + +IndentLevel = SharedInfo.NIndent; +CCall = ''; +PrintStepInfo('Handling EndProgram',ReportFileName,'file'); +tmpposfirstscalar = SharedInfo.CurrentFunInfo.PosFirstOutScalar; + +if (1==2) + //NUT: disabled because at the moment I am able to decode the return instruction. + if (SharedInfo.CurrentFunInfo.CFunctionName == SharedInfo.CMainFunName) + CCall = CCall+'return(0);'; + else + if (SharedInfo.CurrentFunInfo.PosFirstOutScalar > 0) + CCall = CCall+'return('+SharedInfo.CurrentFunInfo.OutArg(tmpposfirstscalar).Name+');' + end + end + + PrintStringInfo(' '+CCall,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +end + + +SharedInfo.NIndent = SharedInfo.NIndent - 1; +IndentLevel = SharedInfo.NIndent; +PrintStringInfo(' }',ReportFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(IndentLevel)+'}',CPass1FileName,'file','y'); + +// --- Close the copy of the scilab file. --- +PrintStringInfo(' Closing: '+FileInfo.Funct(nxtscifunnumber).SCICopyFileName,ReportFileName,'file','y'); +mclose(FileInfo.Funct(nxtscifunnumber).SCICopyFileFid); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndWhile.sci b/2.3-1/macros/ASTManagement/AST_HandleEndWhile.sci new file mode 100644 index 00000000..94649b10 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleEndWhile.sci @@ -0,0 +1,76 @@ +function SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo) +// function SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Handles the EndWhile tag of the AST. +// +// txt=['While' +// ' WhileExpression:' +// ' '+string(W.expression) +// ' WhileStatements:' +// ' '+objectlist2string(W.statements) +// 'EndWhile'] +//#RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 15-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +CPass1WhileEpilFileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileEpilFileName(SharedInfo.While.Level); + +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Handling EndWhile***',ReportFileName,'file','y'); +CCall =''; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//#RNU_RES_B +// ---------------------------- +// --- Generate the C code. --- +// ---------------------------- +// --- Copy Epilogue into C code (Pass1) file. --- +//#RNU_RES_E +[CLinesArray,N_Lines] = File2StringArray(CPass1WhileEpilFileName); +CLinesArray = stripblanks(CLinesArray); + +for tmpcnt = 1:N_Lines-1 + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CLinesArray(tmpcnt),CPass1FileName,'file','y'); +end +PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent-1)+CLinesArray(N_Lines),CPass1FileName,'file','y'); + +//#RNU_RES_B +// -------------------------- +// --- Update SharedInfo. --- +// -------------------------- +//#RNU_RES_E +SharedInfo.NIndent = SharedInfo.NIndent - 1; + +// ------------------------------- +// --- Delete temporary files. --- +// ------------------------------- +SCI2Cmdelete(CPass1WhileEpilFileName); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleFor.sci b/2.3-1/macros/ASTManagement/AST_HandleFor.sci new file mode 100644 index 00000000..e96edd4c --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleFor.sci @@ -0,0 +1,84 @@ +function FileInfo = AST_HandleFor(FileInfo,SharedInfo) +// function FileInfo = AST_HandleFor(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Handles the For tag of the AST. +// +// overloading function for "for" type tlist string function +// this is a node of the AST +// fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// for instructions list) +// txt=['For' +// ' Expression:' +// ' '+string(F.expression) +// ' Statements:' +// ' '+objectlist2string(F.statements) +// 'EndFor'] +// +//#RNU_RES_E +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 10-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +PfxP1ForProlFileName = FileInfo.Funct(nxtscifunnumber).PfxP1ForProlFileName; +PfxP1ForEpilFileName = FileInfo.Funct(nxtscifunnumber).PfxP1ForEpilFileName; +PrintStepInfo('Handling For',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//#RNU_RES_B +// --- Signal the entrance in a for expression. --- +//#RNU_RES_E +SharedInfo.ForExpr.OnExec = SharedInfo.ForExpr.OnExec + 1; + +//#RNU_RES_B +// --- Generate the file names for the prologue and epilogue files. --- +//#RNU_RES_E +FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level) = ... + PfxP1ForProlFileName+string(SharedInfo.For.Level)+'.c'; +FileInfo.Funct(nxtscifunnumber).CPass1ForEpilFileName(SharedInfo.For.Level) = ... + PfxP1ForEpilFileName+string(SharedInfo.For.Level)+'.c'; + +//#RNU_RES_B +// --------------------------------------------------------- +// --- Create a copy of the For Prologue/Epilogue Files. --- +// --------------------------------------------------------- +//#RNU_RES_E +PrintStringInfo(' ',FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level),'file'); +PrintStringInfo(' ',FileInfo.Funct(nxtscifunnumber).CPass1ForEpilFileName(SharedInfo.For.Level),'file'); + +//#RNU_RES_B +// ------------------------------------------------------ +// --- Replace the CPass1V1 file with a temp ForFile. --- +// ------------------------------------------------------ +// From now up to Expression: all the C code will be written in a for temporary file. +//#RNU_RES_E +tmpfilename = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +FileInfo.Funct(nxtscifunnumber).CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level); +FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level) = tmpfilename; +PrintStringInfo('Redirecting C code to: '+FileInfo.Funct(nxtscifunnumber).CPass1FileName,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleForStatem.sci b/2.3-1/macros/ASTManagement/AST_HandleForStatem.sci new file mode 100644 index 00000000..f47538a6 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleForStatem.sci @@ -0,0 +1,87 @@ +function [FileInfo,SharedInfo] = AST_HandleForStatem(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Handles the ForStatements tag of the AST. +// overloading function for "for" type tlist string function +// this is a node of the AST +// fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// for instructions list) +// txt=['For' +// ' ForExpression:' +// ' '+string(F.expression) +// ' ForStatements:' +// ' '+objectlist2string(F.statements) +// 'EndFor'] +// +//#RNU_RES_E +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 15-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(2,2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +PrintStepInfo('Handling ForStatements',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//#RNU_RES_B +// --------------------------------------------- +// --- Resume the correct name for CPass1V1. --- +// --------------------------------------------- +//#RNU_RES_E +tmpfilename = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +FileInfo.Funct(nxtscifunnumber).CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level); +FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level) = tmpfilename; +PrintStringInfo(' Redirecting C code to: '+FileInfo.Funct(nxtscifunnumber).CPass1FileName,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); + +//#RNU_RES_B +// ------------------------ +// --- Generate C code. --- +// ------------------------ +//#RNU_RES_E +SharedInfo = C_ForExpression(FileInfo,SharedInfo); + +//#RNU_RES_B +// -------------------------- +// --- Update SharedInfo. --- +// -------------------------- +// Signal the exit from a for expression. +//#RNU_RES_E +SharedInfo.ForExpr.OnExec = SharedInfo.ForExpr.OnExec - 1; +SharedInfo.ForExpr.IntCntArg = []; +SharedInfo.ForExpr.MtxValCntArg = []; +SharedInfo.ForExpr.SclValCntArg = []; +SharedInfo.ForExpr.OpColonInfoIn1 = ''; +SharedInfo.ForExpr.OpColonInfoIn2 = ''; +SharedInfo.ForExpr.OpColonInfoIn3 = ''; + + +SharedInfo.ForExpr.AssignmentFun = 0; + +// ------------------------------- +// --- Delete temporary files. --- +// ------------------------------- +SCI2Cmdelete(FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level)); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleHeader.sci b/2.3-1/macros/ASTManagement/AST_HandleHeader.sci new file mode 100644 index 00000000..0237bd5f --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleHeader.sci @@ -0,0 +1,249 @@ +function SharedInfo = AST_HandleHeader(ASTHeader,FileInfo,SharedInfo) +// function SharedInfo = AST_HandleHeader(ASTHeader,FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// Handles the Header of the AST. +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +FunctionName = ASTHeader.Name; +if (mtlb_strcmp(ASTHeader.Name,SharedInfo.NextSCIFunName) == %F) + error(9999, 'Very strange! AST Name field ""'+ASTHeader.Name+... + '""is different from function name ""'+SharedInfo.NextSCIFunName+'"".'); +end +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ------------------------------------- +// --- Extract info from AST header. --- +// ------------------------------------- +TmpInNames = tokens(ASTHeader.Inputs,' '); +TmpOutNames = tokens(ASTHeader.Outputs,' '); + +//#RNU_RES_B +// Remove Variable: Number: or String: specifier. +//#RNU_RES_E +NInArg = 0; +for tmpcnt = 1:size(TmpInNames,1) + TmpSingleName = TmpInNames(tmpcnt); + if ((TmpSingleName == 'Variable:') | ... + (TmpSingleName == 'String:') | ... + (TmpSingleName == 'Number:')) + // Skip the specifier. + else + NInArg = NInArg + 1; + InNames(NInArg) = TmpSingleName; + end +end + +//#RNU_RES_B +// Remove Variable: Number: or String: specifier. +//#RNU_RES_E +NOutArg = 0; +for tmpcnt = 1:size(TmpOutNames,1) + TmpSingleName = TmpOutNames(tmpcnt); + if ((TmpSingleName == 'Variable:') | ... + (TmpSingleName == 'String:') | ... + (TmpSingleName == 'Number_x:') | ... + (TmpSingleName == 'Number_s:') | ... + (TmpSingleName == 'Number_d:') | ... + (TmpSingleName == 'Number_c:') | ... + (TmpSingleName == 'Number_z:')) + // Skip the specifier. + else + NOutArg = NOutArg + 1; + OutNames(NOutArg) = TmpSingleName; + end +end + +if (mtlb_strcmp(InNames(1),'<empty>')) + NInArg = 0; +else + NInArg = size(InNames,1); +end + +if ((OutNames(1)=='<empty>') | (FunctionName == 'ins')) + //#RNU_RES_B + //NUT: Force ins to have 0 args. Double check it. + //#RNU_RES_E + + NOutArg = 0; +else + NOutArg = size(OutNames,1); +end + +//#RNU_RES_B +// ------------------------------------- +// --- Load the C function dat file. --- +// ------------------------------------- +//NUT: This load is useful expecially for the second approach. In this case we are not using +//NUT: the size info. +//#RNU_RES_E +load(fullfile(FileInfo.FunctionList.FunInfoDatDir,SharedInfo.NextCFunName+'.dat'),'FunInfo'); + +SharedInfo.CurrentFunInfo = FunInfo; +clear FunInfo + +//#RNU_RES_B +// ----------------------------------------------------------------------------- +// --- Check coherence between In/Out names and In/Out Arg structure loaded. --- +// ----------------------------------------------------------------------------- +//#RNU_RES_E +if (~isempty(SharedInfo.CurrentFunInfo.InArg)) + + if (length(SharedInfo.CurrentFunInfo.InArg(1).Name) > 0) + NInArgDat = size(SharedInfo.CurrentFunInfo.InArg,1); + else + NInArgDat = 0; + end +else + NInArgDat = 0; +end + + +if ((NInArgDat == NInArg)|(nxtscifunname == SharedInfo.SCIMainFunName)) + for tmpcnt = 1:NInArg + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Name = InNames(tmpcnt); + if (SharedInfo.CurrentFunInfo.InArg(tmpcnt).Dimension == 0) + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size(1) = '1'; + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size(2) = '1'; + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Value = %nan; + SharedInfo.CurrentFunInfo.InArg(tmpcnt).FindLike = 0; + else + //#RNU_RES_B + //NUT: using approach 1: Setting for input and output arguments symbolic sizes. + //#RNU_RES_E + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size(1) = '__'+SharedInfo.CurrentFunInfo.InArg(tmpcnt).Name+'Size[0]'; + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size(2) = '__'+SharedInfo.CurrentFunInfo.InArg(tmpcnt).Name+'Size[1]'; + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Value = %nan; + SharedInfo.CurrentFunInfo.InArg(tmpcnt).FindLike = 0; + end + end +else + error(9999, 'Number of input arguments specified in AST is different from the number specified in .dat file.'); +end + +if ((SharedInfo.CurrentFunInfo.NOutArg == NOutArg)|(nxtscifunname == SharedInfo.SCIMainFunName)) + for tmpcnt = 1:NOutArg + SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Name = OutNames(tmpcnt); + end +else + //#RNU_RES_B + PrintStringInfo('N. of output arguments found in the AST: '+string(NOutArg),ReportFileName,'both','y'); + PrintStringInfo('N. of output arguments found in the call (FunInfo structure): '+string(SharedInfo.CurrentFunInfo.NOutArg),ReportFileName,'both','y'); + //#RNU_RES_E + error(9999, 'Number of output arguments specified in AST is different from the number specified in .dat file.'); +end +//#RNU_RES_B +//NUT: using approach 1: Setting for input and output arguments symbolic sizes. +//#RNU_RES_E +SharedInfo.CurrentFunInfo.OutArg = ... + FA_GetOutArgInfo(SharedInfo.CurrentFunInfo.InArg,NInArg,... + SharedInfo.CurrentFunInfo.OutArg,NOutArg,... + SharedInfo,... + SharedInfo.CurrentFunInfo.FunPrecSpecifier,... + SharedInfo.CurrentFunInfo.FunTypeAnnot,SharedInfo.CurrentFunInfo.FunSizeAnnot,ReportFileName,''); +//#RNU_RES_B +// ------------------------------------------------------------------------- +// --- Stores InArg structure into the temporary variables symbol table. --- +// ------------------------------------------------------------------------- +//#RNU_RES_E +SymbTableFileName = FileInfo.Funct(nxtscifunnumber).LocalVarFileName; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Putting Input and Output arguments in the local symbol table***',ReportFileName,'file','y'); +// #RNU_RES_E +for tmpcnt = 1:NInArg + //#RNU_RES_B + PrintStringInfo(' Symbol ""'+SharedInfo.CurrentFunInfo.InArg(tmpcnt).Name+'""',ReportFileName,'file','y'); + PrintStringInfo(' Setting symbol ""'+SharedInfo.CurrentFunInfo.InArg(tmpcnt).Name+'"" in '+SymbTableFileName+'.',ReportFileName,'file','y'); + //#RNU_RES_E + + ST_Set(SharedInfo.CurrentFunInfo.InArg(tmpcnt).Name,... + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Type,... + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size,... + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Value,... + SharedInfo.CurrentFunInfo.InArg(tmpcnt).FindLike,... + SharedInfo.CurrentFunInfo.InArg(tmpcnt).Dimension,... + SymbTableFileName); + //#RNU_RES_B + PrintStringInfo(' Type: '+SharedInfo.CurrentFunInfo.InArg(tmpcnt).Type,ReportFileName,'file','y'); + PrintStringInfo(' Size(1): '+string(SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size(1)),ReportFileName,'file','y'); + PrintStringInfo(' Size(2): '+string(SharedInfo.CurrentFunInfo.InArg(tmpcnt).Size(2)),ReportFileName,'file','y'); + PrintStringInfo(' Value: '+string(SharedInfo.CurrentFunInfo.InArg(tmpcnt).Value),ReportFileName,'file','y'); + PrintStringInfo(' FindLike: '+string(SharedInfo.CurrentFunInfo.InArg(tmpcnt).FindLike),ReportFileName,'file','y'); + PrintStringInfo(' Dimension: '+string(SharedInfo.CurrentFunInfo.InArg(tmpcnt).Dimension),ReportFileName,'file','y'); + PrintStringInfo(' ',ReportFileName,'file','y'); + //#RNU_RES_E +end + +// -------------------------------------------------------------------------- +// --- Stores OutArg structure into the temporary variables symbol table. --- +// -------------------------------------------------------------------------- +//NUT: verifica se puoi usare l'outarg2symboltable qui. +for tmpcnt = 1:NOutArg + //#RNU_RES_B + PrintStringInfo(' Symbol ""'+SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Name+'""',ReportFileName,'file','y'); + + PrintStringInfo(' Setting symbol ""'+SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Name+'"" in '+SymbTableFileName+'.',ReportFileName,'file','y'); + //#RNU_RES_E + ST_Set(SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Name,... + SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Type,... + SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Size,... + SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Value,... + SharedInfo.CurrentFunInfo.OutArg(tmpcnt).FindLike,... + SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Dimension,... + SymbTableFileName); + //#RNU_RES_B + PrintStringInfo(' Type: '+SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Type,ReportFileName,'file','y'); + PrintStringInfo(' Size(1): '+string(SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Size(1)),ReportFileName,'file','y'); + PrintStringInfo(' Size(2): '+string(SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Size(2)),ReportFileName,'file','y'); + PrintStringInfo(' Value: '+string(SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Value),ReportFileName,'file','y'); + PrintStringInfo(' FindLike: '+string(SharedInfo.CurrentFunInfo.OutArg(tmpcnt).FindLike),ReportFileName,'file','y'); + PrintStringInfo(' Dimension: '+string(SharedInfo.CurrentFunInfo.OutArg(tmpcnt).Dimension),ReportFileName,'file','y'); + PrintStringInfo(' ',ReportFileName,'file','y'); + //#RNU_RES_E + +end + +//#RNU_RES_B +// ----------------------------------------------- +// --- Check on common input/output arguments. --- +// ----------------------------------------------- +//#RNU_RES_E +AST_CheckCommonInOutArgs(SharedInfo.CurrentFunInfo.InArg,NInArg,SharedInfo.CurrentFunInfo.OutArg,NOutArg,ReportFileName); + +//#RNU_RES_B +// ------------------------ +// --- Generate C code. --- +// ------------------------ +//#RNU_RES_E +FlagCall = 0; +SharedInfo = C_Funcall(SharedInfo.CurrentFunInfo,FileInfo,SharedInfo,FlagCall); +SharedInfo.NIndent = SharedInfo.NIndent+1; // Increase indentation level. + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci b/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci new file mode 100644 index 00000000..5373adf6 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleIfElse.sci @@ -0,0 +1,92 @@ +function [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,ASTIfExpType) +// function [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,ASTIfExpType) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Handles the Else If tag of the AST. +// +// overloading function for "ifthenel" type tlist string function +// this is a node of the AST +// fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) +// txt=['If ' +// ' Expression:' +// ' '+string(I.expression) +// ' If Statements' +// ' '+objectlist2string(I.then)] +// for e=I.elseifs +// txt=[txt; +// ' Else If Expression' +// ' '+string(e.expression) +// ' Else If Statements' +// ' '+objectlist2string(e.then)] +// end +// txt=[txt; +// ' Else Statements' +// ' '+objectlist2string(I.else) +// 'EndIf'] +// +// Input data: +// ASTIfExpType: it specifies if we are handling a if condition (ASTIfExpType='if') +// or an elseif condition (ASTIfExpType='elseif') or else statement (ASTIfExpType='else') +//#RNU_RES_E +// //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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +PrintStepInfo('Handling If Statements',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//#RNU_RES_B +// --------------------------------------------------- +// --- Retrieve If Expression Parameters from AST. --- +// --------------------------------------------------- +//#RNU_RES_E +if (ASTIfExpType~='else') + [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType); +else + // "else" type doesn't contain any condition to test. + IfCondArg = ''; + NIfCondArg = 0; +end + +//#RNU_RES_B +// ----------------------------- +// --- C Generation Section. --- +// ----------------------------- +// --- Generate the C code for if/elseif Expression. --- +//#RNU_RES_E +SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.sci b/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.sci new file mode 100644 index 00000000..ffcf2f45 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.sci @@ -0,0 +1,80 @@ +function [FileInfo,SharedInfo] = AST_HandleWhileExpr(FileInfo,SharedInfo) +// function [FileInfo,SharedInfo] = AST_HandleWhileExpr(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Handles the WhileExpression tag of the AST. +// +// txt=['While' +// ' WhileExpression:' +// ' '+string(W.expression) +// ' WhileStatements:' +// ' '+objectlist2string(W.statements) +// 'EndWhile'] +// +//#RNU_RES_E +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 29-Dec-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +PfxP1WhileProlFileName = FileInfo.Funct(nxtscifunnumber).PfxP1WhileProlFileName; +PfxP1WhileEpilFileName = FileInfo.Funct(nxtscifunnumber).PfxP1WhileEpilFileName; +PrintStepInfo('Handling While',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//#RNU_RES_B +// --- Signal the entrance in a while expression. --- +//#RNU_RES_E +SharedInfo.WhileExpr.OnExec = SharedInfo.WhileExpr.OnExec + 1; + +//#RNU_RES_B +// --- Generate the file names for the prologue and epilogue files. --- +//#RNU_RES_E +FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level) = ... + PfxP1WhileProlFileName+string(SharedInfo.While.Level)+'.c'; +FileInfo.Funct(nxtscifunnumber).CPass1WhileEpilFileName(SharedInfo.While.Level) = ... + PfxP1WhileEpilFileName+string(SharedInfo.While.Level)+'.c'; + +//#RNU_RES_B +// ----------------------------------------------------------- +// --- Create a copy of the While Prologue/Epilogue Files. --- +// ----------------------------------------------------------- +//#RNU_RES_E +PrintStringInfo(' ',FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level),'file'); +PrintStringInfo(' ',FileInfo.Funct(nxtscifunnumber).CPass1WhileEpilFileName(SharedInfo.While.Level),'file'); + +//#RNU_RES_B +// -------------------------------------------------------- +// --- Replace the CPass1V1 file with a temp WhileFile. --- +// -------------------------------------------------------- +// From now up to Expression: all the C code will be written in a while temporary file. +//#RNU_RES_E +tmpfilename = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +FileInfo.Funct(nxtscifunnumber).CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level); +FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level) = tmpfilename; +//#RNU_RES_B +PrintStringInfo('Redirecting C code to: '+FileInfo.Funct(nxtscifunnumber).CPass1FileName,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); +//#RNU_RES_E + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci new file mode 100644 index 00000000..79fb516d --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.sci @@ -0,0 +1,118 @@ +function [FileInfo,SharedInfo] = AST_HandleWhileStatem(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Handles the WhileStatements tag of the AST. +// +// txt=['While' +// ' WhileExpression:' +// ' '+string(W.expression) +// ' WhileStatements:' +// ' '+objectlist2string(W.statements) +// 'EndWhile'] +// +//#RNU_RES_E +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 20-Jan-2008 -- Edoardo Nutricato: Author. +// 20-Jan-2008 -- Rubby Nutricato: Minor Changes. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +//#RNU_RES_B + +//NUT: accertati che l'epilogo e il prologo del while siano effettivamente differenti o se +//NUT: si puo' avere un solo file utilizzato sia per il prologo che per l'epilogo. + +//NUT: da sistemare senza le global +//#RNU_RES_E +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1WhileProlFileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level); +PrintStepInfo('Handling WhileStatements',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +//#RNU_RES_B +// ----------------------------------------------- +// --- Resume the correct name while CPass1V1. --- +// ----------------------------------------------- +//#RNU_RES_E +tmpfilename = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +FileInfo.Funct(nxtscifunnumber).CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level); +FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level) = tmpfilename; +CPass1WhileProlFileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level); +PrintStringInfo(' Redirecting C code to: '+FileInfo.Funct(nxtscifunnumber).CPass1FileName,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); + +//#RNU_RES_B +// ------------------------ +// --- 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'); + end + + SharedInfo.WhileExpr.CondVar = ArgName; + //#RNU_RES_B + // --- Repush strings into the AST stack. --- + //#RNU_RES_E + + AST_PushASTStack(Pop1); + +elseif (SharedInfo.WhileExpr.DimCondVar > 0) + error(9999, 'Cannot manage while with matrix conditions'); +end +SharedInfo = C_WhileExpression(FileInfo,SharedInfo); + +// -------------------------- +// --- Update SharedInfo. --- +// -------------------------- +// Signal the exit from a while expression. +SharedInfo.WhileExpr.OnExec = SharedInfo.WhileExpr.OnExec - 1; +SharedInfo.WhileExpr.CondVar = ''; +SharedInfo.WhileExpr.DimCondVar = -1; +SharedInfo.WhileExpr.AssignmentFun = 0; //NUT: siamo sicuri che serva? + +// ------------------------------- +// --- Delete temporary files. --- +// ------------------------------- +SCI2Cmdelete(CPass1WhileProlFileName); + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci new file mode 100644 index 00000000..fa76a01d --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci @@ -0,0 +1,168 @@ +function [FunctionName,InArg,NInArg,OutArg,NOutArg] = AST_ParseEqualStruct(FileInfo,SharedInfo) +// function [FunctionName,InArg,NInArg,OutArg,NOutArg] = AST_ParseEqualStruct(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Parses the Equal structure of the AST. +// Structure of Equal: +// txt=['Equal' +// ' Expression: ' +// ' '+string(e.expression) +// ' Lhs : ' +// ' '+objectlist2string(e.lhs) +// 'EndEqual' +// ] +//#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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + +//#RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y','n'); +PrintStringInfo('***Reading AST***',ReportFileName,'file','y','n'); +//#RNU_RES_E + +// ------------------------------- +// --- 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 +OutputArgumentNames = SCI2Cflipud(OutputArgumentNames); +OutputArgumentScope = SCI2Cflipud(OutputArgumentScope); + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ +ExprField = AST_PopASTStack(); +NInArg = 0; +InputArgumentNames = []; +while (ExprField ~= 'Expression:') + NInArg = NInArg + 1; + [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(ExprField); + ExprField = AST_PopASTStack(); + if (ExprField == 'Equal') + error(9999, 'Found Equal before Lhs'); + end +end +InputArgumentNames = SCI2Cflipud(InputArgumentNames); +InputArgumentScope = SCI2Cflipud(InputArgumentScope); + +//#RNU_RES_B +// ------------------------------ +// --- Extract function name. --- +// ------------------------------ +//#RNU_RES_E +FunctionName = AST_PopASTStack(); +if (FunctionName ~= 'Equal') then + error(9999, 'Problems with Equal, Expected Equal tag.'); +end +FunctionName = 'OpEqual'; + +//#RNU_RES_B +// ------------------------------------- +// --- Generate the InArg structure. --- +// ------------------------------------- +//#RNU_RES_E +InArg = []; +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. --- +// ------------------------ +//#RNU_RES_B +PrintStringInfo('Function Name: '+FunctionName,ReportFileName,'file','y','n'); +PrintStringInfo('N Intput Arguments: '+string(NInArg),ReportFileName,'file','y','n'); +//#RNU_RES_E +if (SharedInfo.Equal.Nins > 0) + //#RNU_RES_B + PrintStringInfo('N ins functions: '+string(SharedInfo.Equal.Nins),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'); + PrintStringInfo(' Scope: '+InArg(counterinputargs).Scope,... + ReportFileName,'file','y'); + //#RNU_RES_E + end + if (NInArg ~= SharedInfo.Equal.Nins) + error(9999, 'Number of input arguments must be equal to number of ins functions.'); + end +else + //#RNU_RES_B + 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 + if (NInArg ~= NOutArg) + error(9999, 'Number of input arguments must be equal to number of output arguments.'); + end +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci new file mode 100644 index 00000000..647a70d7 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.sci @@ -0,0 +1,116 @@ +function [FunctionName,InArg,NInArg,NOutArg] = AST_ParseFuncallStruct(FileInfo,SharedInfo) +// function [FunctionName,InArg,NInArg,NOutArg] = AST_ParseFuncallStruct(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Extracts Input Arguments, Output Arguments and Function Name +// from the AST. +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +// #RNU_RES_B +PrintStringInfo(' Parsing Funcall structure',ReportFileName,'file','y'); +// #RNU_RES_E +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ +RhsField = AST_PopASTStack(); +NInArg = 0; +while (RhsField ~= 'Rhs :') + NInArg = NInArg + 1; + [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField); + RhsField = AST_PopASTStack(); + if (RhsField == '#lhs :') + error(9999, 'Found #lhs before Rhs'); + elseif (RhsField == 'Funcall :') + error(9999, 'Found Funcall before Rhs'); + end +end +if (stripblanks(InputArgumentNames(NInArg)) == '<empty>') + NInArg = 0; + InputArgumentNames = []; + InputArgumentScope = []; +end +InputArgumentNames = SCI2Cflipud(InputArgumentNames); +InputArgumentScope = SCI2Cflipud(InputArgumentScope); + +// -------------------------------------------- +// --- Extract number of output parameters. --- +// -------------------------------------------- +buffstring = AST_PopASTStack(); +NOutArg = eval(stripblanks(part(buffstring,10:length(buffstring)))); + +// ------------------------------ +// --- Extract function name. --- +// ------------------------------ +buffstring = AST_PopASTStack(); +FunctionName = stripblanks(part(buffstring,12:length(buffstring))); + +// ------------------------------------- +// --- Generate the InArg structure. --- +// ------------------------------------- +InArg = []; +for counterinputargs = 1:NInArg + if (InputArgumentNames(counterinputargs) == 'r') + InputArgumentNames(counterinputargs) = 'rr'; //NUT: per ora cerco di risolvere cosi' il baco sulla 'r' + end + InArg(counterinputargs).Name=InputArgumentNames(counterinputargs); + InArg(counterinputargs).Scope=InputArgumentScope(counterinputargs); +end + +//#RNU_RES_B +PrintStringInfo('Function Name: '+FunctionName,ReportFileName,'file','y','n'); +PrintStringInfo('N Intput Arguments: '+string(NInArg),ReportFileName,'file','y','n'); +PrintStringInfo('N Output Arguments: '+string(NOutArg),ReportFileName,'file','y','n'); +//#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 + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci new file mode 100644 index 00000000..a7da0128 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci @@ -0,0 +1,119 @@ +function [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType) +// function [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTIfExpType) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Parses the IfExpression structure of the AST. +// +// txt=['If ' +// ' Expression:' +// ' '+string(I.expression) +// ' If Statements' +// ' '+objectlist2string(I.then)] +// for e=I.elseifs +// txt=[txt; +// ' Else If Expression' +// ' '+string(e.expression) +// ' Else If Statements' +// ' '+objectlist2string(e.then)] +// end +// txt=[txt; +// ' Else Statements' +// ' '+objectlist2string(I.else) +// 'EndIf'] +// +//#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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +//#RNU_RES_B +PrintStringInfo('***Retrieving '+ASTIfExpType+' expression parameters from AST***',ReportFileName,'file','y'); +//#RNU_RES_E +IfCondArg = []; +NIfCondArg = 0; + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ------------------------------------ +// --- Read if condition variables. --- +// ------------------------------------ +flagendpop = 0; +IfExprField = AST_PopASTStack(); +if (ASTIfExpType=='if') + if (IfExprField=='Expression:') + flagendpop = 1; + // Pop Again the If tag from the AST. + IfExprField = AST_PopASTStack(); + end +elseif (ASTIfExpType=='elseif') + if (IfExprField=='Else If Expression') + flagendpop = 1; + end +else + error(9999, 'Unknown ASTIfExpType ""'+ASTIfExpType+'"".'); +end + +while (flagendpop == 0) + if (IfExprField~='<EOL>') + if (ASTIfExpType=='if') + if (IfExprField=='Expression:') + flagendpop = 1; + // Pop Again the If tag from the AST. + IfExprField = AST_PopASTStack(); + else + NIfCondArg = NIfCondArg + 1; + [IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField); + end + elseif (ASTIfExpType=='elseif') + if (IfExprField=='Else If Expression') + flagendpop = 1; + else + NIfCondArg = NIfCondArg + 1; + IfCondArg(NIfCondArg) = IfExprField; + [IfCondArg(NIfCondArg),tmpscope] = AST_ExtractNameAndScope(IfExprField); + end + end + end + IfExprField = AST_PopASTStack(); +end + +//#RNU_RES_B +// ------------------------------------------- +// --- Print some info in the report file. --- +// ------------------------------------------- +PrintStringInfo('N '+ASTIfExpType+' Condition Arguments: '+string(NIfCondArg),ReportFileName,'file','y'); +//#RNU_RES_E +for counterifcondargs = 1:NIfCondArg + //#RNU_RES_B + PrintStringInfo(ASTIfExpType+' Condition Argument Number '+string(counterifcondargs)+': '+IfCondArg(counterifcondargs),... + ReportFileName,'file','y'); + //#RNU_RES_E +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci new file mode 100644 index 00000000..a77317bd --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci @@ -0,0 +1,127 @@ +function [FunctionName,InArg,NInArg,NOutArg] = AST_ParseOperStruct(FileInfo,SharedInfo) +// function [FunctionName,InArg,NInArg,NOutArg] = AST_ParseOperStruct(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Parses the Operation structure of the AST. +// +// Structure of Operation: +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string +// txt=['Operation' +// ' Operands:' +// ' '+objectlist2string(O.operands) +// ' Operator: '+O.operator +// 'EndOperation' +// ] +// +//#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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Reading AST***',ReportFileName,'file','y'); + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +// ------------------------------ +// --- Extract function name. --- +// ------------------------------ +buffstring = AST_PopASTStack(); +LabelFunctName = 'Operator: '; +FunctionName = stripblanks(part(buffstring,length(LabelFunctName)+1:length(buffstring))); +// Generate the proper function name. +FunctionName = Operator2FunName(FunctionName); + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ +RhsField = AST_PopASTStack(); +NInArg = 0; +while (RhsField ~= 'Operands:') + NInArg = NInArg + 1; + [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField); + RhsField = AST_PopASTStack(); + if (RhsField == 'Operation') + error(9999, 'Found Operation before Rhs'); + end +end + +if (stripblanks(InputArgumentNames(NInArg)) == '<empty>') + //NUT: forse non serve per l'operation + NInArg = 0; + InputArgumentNames = []; + InputArgumentScope = []; +end +InputArgumentNames = SCI2Cflipud(InputArgumentNames); +InputArgumentScope = SCI2Cflipud(InputArgumentScope); + +//#RNU_RES_B +// Remove tag "Operation" from the stack. +//#RNU_RES_E +OperationField = AST_PopASTStack(); +if (OperationField ~= 'Operation') then + error(9999, 'Problems with Operation, Expected Operation tag.'); +end + +// -------------------------------------------- +// --- Extract number of output parameters. --- +// -------------------------------------------- +if (FunctionName == 'ins') + NOutArg = 0; // It is always 1. Double check it! +else + NOutArg = 1; // It is always 1. Double check it! +end +// ------------------------------------- +// --- Generate the InArg structure. --- +// ------------------------------------- +InArg = []; +for counterinputargs = 1:NInArg + InArg(counterinputargs).Name=InputArgumentNames(counterinputargs); + InArg(counterinputargs).Scope=InputArgumentScope(counterinputargs); +end + +//#RNU_RES_B +PrintStringInfo('Operation Name: '+FunctionName,ReportFileName,'file','y'); +PrintStringInfo('N Intput Arguments: '+string(NInArg),ReportFileName,'file','y'); +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'); + PrintStringInfo(' Scope: '+InArg(counterinputargs).Scope,... + ReportFileName,'file','y'); + //#RNU_RES_E +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_PopASTStack.sci b/2.3-1/macros/ASTManagement/AST_PopASTStack.sci new file mode 100644 index 00000000..34857499 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_PopASTStack.sci @@ -0,0 +1,40 @@ +function stackelement = AST_PopASTStack() +// function stackelement = AST_PopASTStack() +// ----------------------------------------------------------------- +// Pop the AST stack. +// +// Input data: +// --- +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-Aug-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + +global SCI2CSTACK; +global StackPosition; +global STACKDEDUG; + +if StackPosition == 1 + error(9999, 'Stack empty. Cannot pop from stack.'); +end + +stackelement = SCI2CSTACK(StackPosition,1); +SCI2CSTACK = SCI2CSTACK(1:StackPosition-1); +StackPosition = StackPosition - 1; + +if (STACKDEDUG == 1) + AST_DisplayStack(); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_PushASTStack.sci b/2.3-1/macros/ASTManagement/AST_PushASTStack.sci new file mode 100644 index 00000000..34cd883b --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_PushASTStack.sci @@ -0,0 +1,36 @@ +function AST_PushASTStack(stackelement) +// function AST_PushASTStack(stackelement) +// ----------------------------------------------------------------- +// Push the AST stack. +// +// Input data: +// --- +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-Aug-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + +StackPosition = StackPosition + 1; +SCI2CSTACK(StackPosition,1) = stackelement; + +if (STACKDEDUG == 1) + AST_DisplayStack(); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ReadASTHeader.sci b/2.3-1/macros/ASTManagement/AST_ReadASTHeader.sci new file mode 100644 index 00000000..7a52b1f2 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ReadASTHeader.sci @@ -0,0 +1,90 @@ +function ASTHeader = AST_ReadASTHeader(fidAST,ReportFileName) +// function ASTHeader = AST_ReadASTHeader(fidAST,ReportFileName) +// ----------------------------------------------------------------- +// Reads the AST header +// txt=['Program' +// 'Name : '+p.name +// 'Outputs: '+strcat(objectlist2string(p.outputs),' ') +// 'Inputs : '+strcat(objectlist2string(p.inputs),' ') +// 'Statements ' +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + + +ASTHeader = []; + +tline = mgetl(fidAST,1); +AST_CheckLineLength(tline); +treeline = stripblanks(tline); +if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); +end +if (SCI2Cstrncmps1size('Program',treeline) == %F) + error(9999, 'Expected ""Program"" label in the AST'); +end + +tline = mgetl(fidAST,1); +AST_CheckLineLength(tline); +treeline = stripblanks(tline); +if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); +end +if (SCI2Cstrncmps1size('Name : ',treeline) == %F) + error(9999, 'Expected ""Name : "" label in the AST'); +else + ASTHeader.Name = stripblanks(part(treeline,length('Name : ')+1:length(treeline))); +end + +tline = mgetl(fidAST,1); +AST_CheckLineLength(tline); +treeline = stripblanks(tline); +if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); +end +if (SCI2Cstrncmps1size('Outputs: ',treeline) == %F) + error(9999, 'Expected ""Outputs: "" label in the AST'); +else + ASTHeader.Outputs = stripblanks(part(treeline,length('Outputs: ')+1:length(treeline))); +end + +tline = mgetl(fidAST,1); +AST_CheckLineLength(tline); +treeline = stripblanks(tline); +if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); +end +if (SCI2Cstrncmps1size('Inputs : ',treeline) == %F) + error(9999, 'Expected ""Inputs : "" label in the AST'); +else + ASTHeader.Inputs = stripblanks(part(treeline,length('Inputs : ')+1:length(treeline))); +end + +tline = mgetl(fidAST,1); +AST_CheckLineLength(tline); +treeline = stripblanks(tline); +if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); +end +if (SCI2Cstrncmps1size('Statements ',treeline) == %F) + error(9999, 'Expected ""Statements "" label in the AST'); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.sci b/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.sci new file mode 100644 index 00000000..96ec3ebe --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.sci @@ -0,0 +1,61 @@ +function [RhsNames,RhsScope,NRhs] = AST_ReadEqualRhsNames(FileInfo,SharedInfo) +// function [RhsNames,RhsScope,NRhs] = AST_ReadEqualRhsNames(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// 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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG + +//#RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Reading Equal Rhs Names***',ReportFileName,'file','y'); +//#RNU_RES_E + +// ------------------------------- +// --- Read Output parameters. --- +// ------------------------------- +cntpop = 1; +NRhs = 0; +RhsField(cntpop) = AST_PopASTStack(); +RhsNames = []; +while (RhsField(cntpop) ~= 'Expression:') + NRhs = NRhs + 1; + [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop)); + cntpop = cntpop + 1; + RhsField(cntpop) = AST_PopASTStack(); +end +RhsNames = SCI2Cflipud(RhsNames); +RhsScope = SCI2Cflipud(RhsScope); + +// --- Repush everything into the stack. --- +for cntpush = cntpop:-1:1 + AST_PushASTStack(RhsField(cntpush)); +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/GenOutArgNames.sci b/2.3-1/macros/ASTManagement/GenOutArgNames.sci new file mode 100644 index 00000000..0e683835 --- /dev/null +++ b/2.3-1/macros/ASTManagement/GenOutArgNames.sci @@ -0,0 +1,89 @@ +function [OutArg,SharedInfo] = GenOutArgNames(FunctionName,InArg,NInArg,OldOutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo) +// function [OutArg,SharedInfo] = GenOutArgNames(FunctionName,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo) +// ----------------------------------------------------------------- +//#RNU_RES_B +// Generate the names for the temporary variables that store the +// output arguments. +//#RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// OutArg: is the Output arguments structure containing the field +// name that specifies the output argument names. +// //NUT: add description here +// +// Status: +// 11-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),9,9); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +// #RNU_RES_B +PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); +// #RNU_RES_E +OutArg = OldOutArg; + +//#RNU_RES_B +// --------------------------------------------------------------------------------------- +// --- Generate the names for the temporary variables that store the output arguments. --- +// --------------------------------------------------------------------------------------- +// 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 +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 + +endfunction diff --git a/2.3-1/macros/ASTManagement/Operator2FunName.sci b/2.3-1/macros/ASTManagement/Operator2FunName.sci new file mode 100644 index 00000000..1aa934cb --- /dev/null +++ b/2.3-1/macros/ASTManagement/Operator2FunName.sci @@ -0,0 +1,119 @@ +function FunName = Operator2FunName(OperatorName); +// -----------------------------------------------------------------
+// Returns the function name corresponding to the input operator.
+// From intmacr2tree.c we have:
+// char *operators[]={"+","-","*",".*","*.",".*.","/","./","/.","./.",
+// "\\",".\\","\\.",".\\.","^","==","<",">","<=",">=","~=",
+// ":","rc","ins","ext","'","cc","|","&","~",".^",".'","cceol"};
+// I also added "<>".
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 29-May-2007 -- Nutricato Raffaele: Changed code into a function.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+//NUT: non e' inserito il "\" verifica come mai.
+//NUT: il ".\" l'ho inserito io
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+FuncPrefix = 'Op';
+FuncSuffix = '';
+
+if (OperatorName == '+')
+ FunName = FuncPrefix+'Plus'+FuncSuffix;
+elseif (OperatorName == '-')
+ FunName = FuncPrefix+'Minus'+FuncSuffix;
+elseif (OperatorName == '*')
+ FunName = FuncPrefix+'Star'+FuncSuffix;
+elseif (OperatorName == '.*')
+ FunName = FuncPrefix+'DotStar'+FuncSuffix;
+elseif (OperatorName == '*.')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == '.*.')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == '/')
+ FunName = FuncPrefix+'Slash'+FuncSuffix;
+elseif (OperatorName == './')
+ FunName = FuncPrefix+'DotSlash'+FuncSuffix;
+elseif (OperatorName == '/.')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == './.')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == '.\')
+ FunName = FuncPrefix+'DotBackSlash'+FuncSuffix;
+elseif (OperatorName == '\')
+ //PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ //SCI2Cerror(' '); + FunName = FuncPrefix+'BackSlash'+FuncSuffix;
+elseif (OperatorName == '.\')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == '\.')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == '.\.')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+elseif (OperatorName == '^')
+ FunName = FuncPrefix+'Hat'+FuncSuffix;
+elseif (OperatorName == '.^')
+ FunName = FuncPrefix+'DotHat'+FuncSuffix;
+elseif (OperatorName == '''')
+ FunName = FuncPrefix+'Apex'+FuncSuffix;
+elseif (OperatorName == '.''')
+ FunName = FuncPrefix+'DotApex'+FuncSuffix;
+elseif (OperatorName == '==')
+ FunName = FuncPrefix+'LogEq'+FuncSuffix;
+elseif (OperatorName == '<')
+ FunName = FuncPrefix+'LogLt'+FuncSuffix;
+elseif (OperatorName == '>')
+ FunName = FuncPrefix+'LogGt'+FuncSuffix;
+elseif (OperatorName == '<=')
+ FunName = FuncPrefix+'LogLe'+FuncSuffix;
+elseif (OperatorName == '>=')
+ FunName = FuncPrefix+'LogGe'+FuncSuffix;
+elseif (OperatorName == '~=')
+ FunName = FuncPrefix+'LogNe'+FuncSuffix;
+elseif (OperatorName == '<>')
+ FunName = FuncPrefix+'LogNe'+FuncSuffix;
+elseif (OperatorName == '|')
+ FunName = FuncPrefix+'LogOr'+FuncSuffix;
+elseif (OperatorName == '&')
+ FunName = FuncPrefix+'LogAnd'+FuncSuffix;
+elseif (OperatorName == '~')
+ FunName = FuncPrefix+'LogNot'+FuncSuffix;
+elseif (OperatorName == ':')
+ FunName = FuncPrefix+'Colon'+FuncSuffix;
+elseif (OperatorName == 'rc')
+ FunName = 'OpRc';
+elseif (OperatorName == 'cc')
+ FunName = 'OpCc';
+elseif (OperatorName == 'ins')
+ FunName = 'OpIns';
+elseif (OperatorName == 'ext')
+ FunName = 'OpExt';
+elseif (OperatorName == 'cceol')
+ PrintStringInfo('SCI2CERROR: Operator ""'+OperatorName+'"" not supported.','','stout','y');
+ error(9999, 'SCI2CERROR: Operator ""'+OperatorName+'"" not supported.');
+else
+ PrintStringInfo('SCI2CERROR: Unknown Operator ""'+OperatorName+'.','','stout','y');
+ error(9999, 'SCI2CERROR: Unknown Operator ""'+OperatorName+'.');
+end
+
+endfunction
diff --git a/2.3-1/macros/ASTManagement/SciFile2ASTFile.sci b/2.3-1/macros/ASTManagement/SciFile2ASTFile.sci new file mode 100644 index 00000000..be978c57 --- /dev/null +++ b/2.3-1/macros/ASTManagement/SciFile2ASTFile.sci @@ -0,0 +1,36 @@ +function SciFile2ASTFile(SciFile,ASTFile); +// function SciFile2ASTFile(SciFile,ASTFile); +// ----------------------------------------------------------------- +// This function makes use of the macr2tree function to generate +// the ASTFile containing the AST (Abstract Syntactic Tree) of the +// input Scilab function (SciFile). +// +// Input data: +// SciFile: full path of the input function. +// ASTFile: full path of the file that will store the AST. +// +// Output data: +// --- +// +// Status: +// 12-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +exec(SciFile); +[tmppath,ScilabFunName,tmpext] = fileparts(SciFile); +AST=eval('macr2tree('+ScilabFunName+')'); + + +[ASTx,ASTierr]=fileinfo(ASTFile); +if ASTierr == 0 + mdelete(ASTFile); +end + +fd = mopen(ASTFile, "wt"); +mputl(string(AST), fd); +mclose(fd); + +endfunction diff --git a/2.3-1/macros/ASTManagement/_comment_string.sci b/2.3-1/macros/ASTManagement/_comment_string.sci new file mode 100644 index 00000000..a963507d --- /dev/null +++ b/2.3-1/macros/ASTManagement/_comment_string.sci @@ -0,0 +1,7 @@ +function txt=%comment_string(e) +//overloading function for "comment" type tlist string function +//fields: +// text: a string +//this is a leaf of the AST + txt=['Comment : '+e.text] +endfunction diff --git a/2.3-1/macros/ASTManagement/_cste_string.sci b/2.3-1/macros/ASTManagement/_cste_string.sci new file mode 100644 index 00000000..ba9971d2 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_cste_string.sci @@ -0,0 +1,26 @@ +function txt=%cste_string(c) +//overloading function for "cste" type tlist string function +//this is a leaf of the AST +//fields: +// value : a number or a string +//NUT: added cste I also need "" for strings in order to be sure that the blanks are +//NUT: correctly considered and not mistaken with additional blanks present in the ast text file. + stringcvalue = string(c.value); + if (stringcvalue == "%T" | ... + stringcvalue == "%t" | ... + stringcvalue == "%F" | ... + stringcvalue == "%f" | ... + stringcvalue == "%nan" | ... + stringcvalue == "%inf" | ... + stringcvalue == "%e" | ... + stringcvalue == "%pi") + txt=['Number_x: '+stringcvalue]; + elseif (isnum(stringcvalue)) + //NUT needed to convert format 1D-14 into 1d-14 + txt=['Number_x: '+strsubst(stringcvalue,'D','e')]; + elseif (stringcvalue == "%i") + txt=['Number_X: '+stringcvalue]; + else + txt=['String: ""'+stringcvalue+'""']; + end +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/_equal_string.sci b/2.3-1/macros/ASTManagement/_equal_string.sci new file mode 100644 index 00000000..9678f0e0 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_equal_string.sci @@ -0,0 +1,16 @@ +function txt=%equal_string(e) +//overloading function for "equal" type tlist string function +//this is a node of the AST + +//fields: +// expression: "expression" type tlist (the right hand side) +// lhs : list of "variable" type tlist and "operation" type tlist // (the assignment) +// endsymbol : string (the orginal end-of-instruction symbol (, ; <CR>)) + txt=['Equal' + ' Expression: ' + ' '+string(e.expression) + ' Lhs : ' + ' '+objectlist2string(e.lhs) + 'EndEqual' + ] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/_for_string.sci b/2.3-1/macros/ASTManagement/_for_string.sci new file mode 100644 index 00000000..0ed9ca28 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_for_string.sci @@ -0,0 +1,15 @@ +function txt=%for_string(F) +//overloading function for "for" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// for instructions list) +//NUT: raf cambiato ForExpression e ForStatements + txt=['For' + ' ForExpression:' + ' '+string(F.expression) + ' ForStatements:' + ' '+objectlist2string(F.statements) + 'EndFor'] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/_funcall_string.sci b/2.3-1/macros/ASTManagement/_funcall_string.sci new file mode 100644 index 00000000..faeb81d9 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_funcall_string.sci @@ -0,0 +1,15 @@ +function txt=%funcall_string(F) +//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' + ] +endfunction diff --git a/2.3-1/macros/ASTManagement/_ifthenel_string.sci b/2.3-1/macros/ASTManagement/_ifthenel_string.sci new file mode 100644 index 00000000..6787a87c --- /dev/null +++ b/2.3-1/macros/ASTManagement/_ifthenel_string.sci @@ -0,0 +1,27 @@ +function txt=%ifthenel_string(I) +//overloading function for "ifthenel" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) + txt=['If ' + ' Expression:' + ' '+string(I.expression) + ' If Statements' + ' '+objectlist2string(I.then)] + for e=I.elseifs + txt=[txt; + ' Else If Expression' + ' '+string(e.expression) + ' Else If Statements' + ' '+objectlist2string(e.then)] + end + txt=[txt; + ' Else Statements' + ' '+objectlist2string(I.else) + 'EndIf'] +endfunction diff --git a/2.3-1/macros/ASTManagement/_ifthenelse_string.sci b/2.3-1/macros/ASTManagement/_ifthenelse_string.sci new file mode 100644 index 00000000..ef588c56 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_ifthenelse_string.sci @@ -0,0 +1,27 @@ +function txt=%ifthenelse_string(I) +//overloading function for "ifthenel" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) + txt=['If ' + ' Expression:' + ' '+string(I.expression) + ' If Statements' + ' '+objectlist2string(I.then)] + for e=I.elseifs + txt=[txt; + ' Else If Expression' + ' '+string(e.expression) + ' Else If Statements' + ' '+objectlist2string(e.then)] + end + txt=[txt; + ' Else Statements' + ' '+objectlist2string(I.else) + 'EndIf'] +endfunction diff --git a/2.3-1/macros/ASTManagement/_operatio_string.sci b/2.3-1/macros/ASTManagement/_operatio_string.sci new file mode 100644 index 00000000..8421a3f4 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_operatio_string.sci @@ -0,0 +1,13 @@ +function txt=%operatio_string(O) +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string + txt=['Operation' + ' Operands:' + ' '+objectlist2string(O.operands) + ' Operator: '+O.operator + 'EndOperation' + ] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/_operation_string.sci b/2.3-1/macros/ASTManagement/_operation_string.sci new file mode 100644 index 00000000..84f5ce3c --- /dev/null +++ b/2.3-1/macros/ASTManagement/_operation_string.sci @@ -0,0 +1,13 @@ +function txt=%operation_string(O) +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string + txt=['Operation' + ' Operands:' + ' '+objectlist2string(O.operands) + ' Operator: '+O.operator + 'EndOperation' + ] +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/_program_p.sci b/2.3-1/macros/ASTManagement/_program_p.sci new file mode 100644 index 00000000..f45ed69a --- /dev/null +++ b/2.3-1/macros/ASTManagement/_program_p.sci @@ -0,0 +1,4 @@ +function %program_p(p) + //overloading function for "program" type tlist display + mprintf("%s\n",string(p)) +endfunction diff --git a/2.3-1/macros/ASTManagement/_program_string.sci b/2.3-1/macros/ASTManagement/_program_string.sci new file mode 100644 index 00000000..93486992 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_program_string.sci @@ -0,0 +1,19 @@ +function txt=%program_string(p) +//overloading function for "program" type tlist string function +//main (root) node of the Abstract Formal Tree +//fields: +// name : string (the function name) +// outputs : list of "variable" type tlist (the output arg names) +// inputs : list of "variable" type tlist (the intput arg names) +// statements: list of "equal" type tlist and list('EOL') (the +// instructions list) +// nblines : number (the number of lines in the scilab function) + txt=['Program' + 'Name : '+p.name + 'Outputs: '+strcat(objectlist2string(p.outputs),' ') + 'Inputs : '+strcat(objectlist2string(p.inputs),' ') + 'Statements ' + ' '+objectlist2string(p.statements) + 'EndProgram' + ] +endfunction diff --git a/2.3-1/macros/ASTManagement/_variable_string.sci b/2.3-1/macros/ASTManagement/_variable_string.sci new file mode 100644 index 00000000..86507957 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_variable_string.sci @@ -0,0 +1,26 @@ +function txt=%variable_string(v) + global anscounter; //NUT: just to fix problem with ans variables. +//overloading function for "variable" type tlist string function +//fields: name +//this is a leaf of the AST +//NUT: changed here. For me %i is a number not a variable. + if (v.name == "%T" | ... + v.name == "%t" | ... + v.name == "%F"| ... + v.name == "%f"| ... + v.name == "%nan"| ... + v.name == "%inf"| ... + v.name == "%e" | ... + v.name == "%pi") + txt=['Number_x: '+v.name]; + elseif (v.name == "%i") + txt=['Number_X: '+v.name]; + else + if (v.name == 'ans') + anscounter = anscounter + 1; + txt=['Variable: '+v.name+string(anscounter)]; + else + txt=['Variable: '+v.name]; + end + end +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ASTManagement/_while_string.sci b/2.3-1/macros/ASTManagement/_while_string.sci new file mode 100644 index 00000000..7d5e6223 --- /dev/null +++ b/2.3-1/macros/ASTManagement/_while_string.sci @@ -0,0 +1,14 @@ +function txt=%while_string(W) +//overloading function for "while" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the loop expression) +// statements : list of "equal" type tlist and list('EOL') (the +// while instructions list) + txt=['While' + ' WhileExpression:' + ' '+string(W.expression) + ' WhileStatements:' + ' '+objectlist2string(W.statements) + 'EndWhile'] +endfunction diff --git a/2.3-1/macros/ASTManagement/buildmacros.sce b/2.3-1/macros/ASTManagement/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/ASTManagement/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/ASTManagement/lib b/2.3-1/macros/ASTManagement/lib Binary files differnew file mode 100644 index 00000000..5d98a03d --- /dev/null +++ b/2.3-1/macros/ASTManagement/lib diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names new file mode 100644 index 00000000..a1aafbc1 --- /dev/null +++ b/2.3-1/macros/ASTManagement/names @@ -0,0 +1,59 @@ +%comment_string +%cste_string +%equal_string +%for_string +%funcall_string +%ifthenel_string +%ifthenelse_string +%operatio_string +%operation_string +%program_p +%program_string +%variable_string +%while_string +AST2Ccode +AST_CheckCommonInOutArgs +AST_CheckLastFunc +AST_CheckLineLength +AST_CheckPrecSpecifier +AST_DisplayStack +AST_ExtractNameAndScope +AST_GetASTFile +AST_GetFuncallPrm +AST_GetPrecAndLhsArg +AST_HandleEOL +AST_HandleEndFor +AST_HandleEndGenFun +AST_HandleEndProgram +AST_HandleEndWhile +AST_HandleFor +AST_HandleForStatem +AST_HandleHeader +AST_HandleIfElse +AST_HandleWhileExpr +AST_HandleWhileStatem +AST_ParseEqualStruct +AST_ParseFuncallStruct +AST_ParseIfExprStruct +AST_ParseOperStruct +AST_PopASTStack +AST_PushASTStack +AST_ReadASTHeader +AST_ReadEqualRhsNames +GenOutArgNames +Operator2FunName +SciFile2ASTFile +_comment_string +_cste_string +_equal_string +_for_string +_funcall_string +_ifthenel_string +_ifthenelse_string +_operatio_string +_operation_string +_program_p +_program_string +_variable_string +_while_string +objectlist2string diff --git a/2.3-1/macros/ASTManagement/objectlist2string.sci b/2.3-1/macros/ASTManagement/objectlist2string.sci new file mode 100644 index 00000000..26a38962 --- /dev/null +++ b/2.3-1/macros/ASTManagement/objectlist2string.sci @@ -0,0 +1,13 @@ +function txt=objectlist2string(L) +//auxiliary function for conversion of a list of objects +//into a string vector + txt=[]; + for o=L, + if type(o)==15 then //EOL case + txt=[txt;'<'+o(1)+'>'], + else + txt=[txt; string(o)], + end + end + if txt==[] then txt='<empty>',end +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci new file mode 100644 index 00000000..33a1d791 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_FinalizeCode.sci @@ -0,0 +1,116 @@ +function C_FinalizeCode(FileInfo,SharedInfo) +// function C_FinalizeCode(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +// --- Load File Info Structure. --- +load(FileInfoDatFile,'FileInfo'); + +// --- Load Shared Info Structure. --- +load(FileInfo.SharedInfoDatFile,'SharedInfo'); + +CPass2FileName = FileInfo.Funct(SharedInfo.NextSCIFunNumber).CPass2FileName; +FinalCFileName = FileInfo.Funct(SharedInfo.NextSCIFunNumber).FinalCFileName; +Pass1HeaderFileName = FileInfo.Funct(SharedInfo.NextSCIFunNumber).Pass1HeaderFileName; +FinalHeaderFileName = FileInfo.Funct(SharedInfo.NextSCIFunNumber).FinalHeaderFileName; +// #RNU_RES_B +PrintStringInfo('Generating the final C code in:'+FinalCFileName,... + FileInfo.Funct(SharedInfo.NextSCIFunNumber).ReportFileName,'file','y'); +// #RNU_RES_E +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// --------------------------------- +// --- Finalize the header file. --- +// --------------------------------- +if(SharedInfo.OpenCVUsed) + PrintStringInfo('#include ""cvcore.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""int_cvcore.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""cvhighgui.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""int_cvhighgui.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""cvimgproc.hpp""',Pass1HeaderFileName,'file','y'); + PrintStringInfo('#include ""int_cvimgproc.hpp""',Pass1HeaderFileName,'file','y'); +end +PrintStringInfo('/*',Pass1HeaderFileName,'file','y'); +PrintStringInfo('** ---------------------------- ',Pass1HeaderFileName,'file','y'); +PrintStringInfo('** --- End USER2C Includes. --- ',Pass1HeaderFileName,'file','y'); +PrintStringInfo('** ---------------------------- ',Pass1HeaderFileName,'file','y'); +PrintStringInfo('*/',Pass1HeaderFileName,'file','y'); +//PrintStringInfo('#ifdef __cplusplus',Pass1HeaderFileName,'file','y'); +//PrintStringInfo('} /* extern ""C"" */',Pass1HeaderFileName,'file','y'); +//PrintStringInfo('#endif',Pass1HeaderFileName,'file','y'); +PrintStringInfo('#endif',Pass1HeaderFileName,'file','y'); +// ------------------------------------- +// --- End Finalize the header file. --- +// ------------------------------------- + +[tmphdrpath,tmphdrname,tmphdrext] = fileparts(Pass1HeaderFileName); + +// #RNU_RES_B +// -------------------------------------------------- +// --- Copy the C code into the C code directory. --- +// -------------------------------------------------- +// #RNU_RES_E +C_SCI2CHeader(FinalCFileName); +PrintStringInfo('/*',FinalCFileName,'file','y'); +PrintStringInfo('** ----------------- ',FinalCFileName,'file','y'); +PrintStringInfo('** --- Includes. --- ',FinalCFileName,'file','y'); +PrintStringInfo('** ----------------- ',FinalCFileName,'file','y'); +PrintStringInfo('*/',FinalCFileName,'file','y'); +PrintStringInfo('#include ""'+tmphdrname+tmphdrext+'""',... + FinalCFileName,'file','y'); +//If current file is main C file, include header files corresponding to ODE +//functions, if any. +if(SharedInfo.NextSCIFunName == SharedInfo.SCIMainFunName) + if(size(SharedInfo.Includelist) <> 0) //check if list is empty + //If not empty, add those header files here. + for cntlist = 1:size(SharedInfo.Includelist) + PrintStringInfo('#include ""'+SharedInfo.Includelist(cntlist)+'.h""',... + FinalCFileName,'file','y'); + end + + end +end + +//If current function contains ODEs, add gsl/gsl_errno.h. +if (mtlb_strcmp(part(SharedInfo.CurrentFunInfo.CFunctionName,1:5),'odefn') == %T) + PrintStringInfo('#include <gsl/gsl_errno.h>',... + FinalCFileName,'file','y'); +end +PrintStringInfo('/*',FinalCFileName,'file','y'); +PrintStringInfo('** --------------------- ',FinalCFileName,'file','y'); +PrintStringInfo('** --- End Includes. --- ',FinalCFileName,'file','y'); +PrintStringInfo('** --------------------- ',FinalCFileName,'file','y'); +PrintStringInfo('*/',FinalCFileName,'file','y'); +PrintStringInfo(' ',FinalCFileName,'file','y'); +PrintStringInfo(' ',FinalCFileName,'file','y'); +PrintStringInfo(' ',FinalCFileName,'file','y'); +SCI2Ccopyfile(CPass2FileName,... + FinalCFileName,'append'); +SCI2Ccopyfile(Pass1HeaderFileName,... + FinalHeaderFileName,'append'); + + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_ForExpression.sci b/2.3-1/macros/CCodeGeneration/C_ForExpression.sci new file mode 100644 index 00000000..4e75c066 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_ForExpression.sci @@ -0,0 +1,217 @@ +function SharedInfo = C_ForExpression(FileInfo,SharedInfo) +// function SharedInfo = C_ForExpression(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// Get function for a generic SCI2C table. +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 15-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +CPass1ForProlFileName = FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level); +CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName; +CPass1ForEpilFileName = FileInfo.Funct(nxtscifunnumber).CPass1ForEpilFileName(SharedInfo.For.Level); + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Generating C code***',ReportFileName,'file','y','n'); +// #RNU_RES_E +CCall =''; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ---------------------------- +// --- Generate the C call. --- +// ---------------------------- + +// ------------------------- +// --- Manage all cases. --- +// ------------------------- +if (SharedInfo.ForExpr.AssignmentFun == SharedInfo.CFunId.EqScalar) + // #RNU_RES_B + // --------------- + // --- Case 1. --- + // --------------- + PrintStringInfo(' Handling For Expression with scalar equal.',ReportFileName,'file','y'); + + // for a = 10 or for a = sin(tan(b)) where b is scalar: + // In this case non for loops are needed.--> Do nothing! + + // ------------------------------------------------------------------------------------- + // --- Generate Prologue and Epilogue -> Copy the first N-1 lines of the for.c code. --- + // ------------------------------------------------------------------------------------- + // #RNU_RES_E + [C_Strings,NumCStrings] = File2StringArray(FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level)); + C_Strings = stripblanks(C_Strings); + + for cntstr = 1:NumCStrings + // #RNU_RES_B + // Prologue + // #RNU_RES_E + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+C_Strings(cntstr),CPass1FileName,'file','y'); + end + // #RNU_RES_B + // Epilogue + // #RNU_RES_E + PrintStringInfo(' ',CPass1ForEpilFileName ,'file','y'); + +elseif (SharedInfo.ForExpr.AssignmentFun == SharedInfo.CFunId.OpColon) + // #RNU_RES_B + // --------------- + // --- Case 2. --- + // --------------- + // for a = 1:10 + PrintStringInfo(' Handling For Expression with OpColon.',ReportFileName,'file','y'); + // #RNU_RES_E + + // #RNU_RES_B + // ------------------------------------------------------------------------------------- + // --- Generate Prologue and Epilogue -> Copy the first N-1 lines of the for.c code. --- + // ------------------------------------------------------------------------------------- + // #RNU_RES_E + [C_Strings,NumCStrings] = File2StringArray(FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level)); + C_Strings = stripblanks(C_Strings); + for cntstr = 1:NumCStrings + // #RNU_RES_B + // Prologue + // #RNU_RES_E + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+C_Strings(cntstr),CPass1FileName,'file','y','n'); + // #RNU_RES_B + // Epilogue + // #RNU_RES_E + 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),
+ // check arguments or define function %0_mputstr for overloading. + end + PrintStringInfo(string(C_Strings(cntstr)),CPass1ForEpilFileName ,'file','y','n'); + end + // #RNU_RES_B + // ---------------------------------------- + // --- Insert "}" in the epilogue file. --- + // ---------------------------------------- + // #RNU_RES_E + PrintStringInfo('}',CPass1ForEpilFileName ,'file','y'); + + // #RNU_RES_B + // ------------------------------ + // --- Insert for expression. --- + // ------------------------------ + // #RNU_RES_E + CCall = 'for('+SharedInfo.ForExpr.SclValCntArg.Name+' = '+SharedInfo.ForExpr.OpColonInfoIn1+'; '... + +SharedInfo.ForExpr.SclValCntArg.Name+' <= '+SharedInfo.ForExpr.OpColonInfoIn3+'; '... + +SharedInfo.ForExpr.SclValCntArg.Name+' += '+SharedInfo.ForExpr.OpColonInfoIn2+')'; + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + + // #RNU_RES_B + // ------------------- + // --- Insert "{". --- + // ------------------- + // #RNU_RES_E + CCall = '{'; + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + + // --------------------------------- + // --- Update Indentation Level. --- + // --------------------------------- + SharedInfo.NIndent = SharedInfo.NIndent + 1; + +elseif (SharedInfo.ForExpr.AssignmentFun == SharedInfo.CFunId.EqMatrix | ... + SharedInfo.ForExpr.AssignmentFun == SharedInfo.CFunId.GenFunMtx) + // #RNU_RES_B + // --------------- + // --- Case 3. --- + // --------------- + PrintStringInfo(' Handling For Expression with Matrix Equal/Function.',ReportFileName,'file','y'); + + // for cnt = TMP where TMP is a matrix + // for cnt = fun(TMP) where TMP is a matrix + // Conversion is performed as shown in the following example: + // init code for temp vars --> copy all for.c code (up to last-1 line) into C pass1 code. + // intSCI2C __forcnt1; --> declaration file. + // replace in the last C line CntArg.Name with '__TmpVal'+CntArg.Name + // for (__forcnt1 = 0; __forcnt1 < CntArg.Size(1)*CntArg.Size(2); __forcnt1++) + // { + // CntArg.Name = '__TmpVal'+CntArg.Name[__forcnt1]; + // init code for temp vars + // } + + // ------------------------------------------------------------------------------------- + // --- Generate Prologue and Epilogue -> Copy the first N-1 lines of the for.c code. --- + // ------------------------------------------------------------------------------------- + // #RNU_RES_E + [C_Strings,NumCStrings] = File2StringArray(FileInfo.Funct(nxtscifunnumber).CPass1ForProlFileName(SharedInfo.For.Level)); + C_Strings = stripblanks(C_Strings); + + for cntstr = 1:NumCStrings + // Prologue + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+C_Strings(cntstr),CPass1FileName,'file','y'); + // Epilogue + PrintStringInfo(C_Strings(cntstr),CPass1ForEpilFileName ,'file','y'); + end + + // #RNU_RES_B + // ---------------------------------------- + // --- Insert "}" in the epilogue file. --- + // ---------------------------------------- + // #RNU_RES_E + PrintStringInfo('}',CPass1ForEpilFileName ,'file','y'); + + // ------------------------------ + // --- Insert for expression. --- + // ------------------------------ + CCall = 'for('+SharedInfo.ForExpr.IntCntArg.Name+' = 0'+'; '+... + SharedInfo.ForExpr.IntCntArg.Name+' < '+SharedInfo.ForExpr.MtxValCntArg.Size(1)+'*'+SharedInfo.ForExpr.MtxValCntArg.Size(2)+'; '+... + SharedInfo.ForExpr.IntCntArg.Name+'++)'; + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + + // ------------------- + // --- Insert "{". --- + // ------------------- + CCall = '{'; + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + + // --------------------------------- + // --- Update Indentation Level. --- + // --------------------------------- + SharedInfo.NIndent = SharedInfo.NIndent + 1; + + // #RNU_RES_B + // ---------------------------------------------------- + // --- Add code to read the element of CntArg.Name. --- + // ---------------------------------------------------- + // #RNU_RES_E + CCall = SharedInfo.ForExpr.SclValCntArg.Name+' = '+SharedInfo.ForExpr.MtxValCntArg.Name+'['+SharedInfo.ForExpr.IntCntArg.Name+'];'; + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + +else + // --------------- + // --- Case 5. --- + // --------------- + + SCI2Cerror('Could not manage the for expression.'); +end + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_Funcall.sci b/2.3-1/macros/CCodeGeneration/C_Funcall.sci new file mode 100644 index 00000000..450ad088 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_Funcall.sci @@ -0,0 +1,467 @@ +function SharedInfo = C_Funcall(FunInfo,FileInfo,SharedInfo,FlagCall) +// function SharedInfo = C_Funcall(FunInfo,FileInfo,SharedInfo,FlagCall) +// ----------------------------------------------------------------- +// Get function for a generic SCI2C table. +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),4,4); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +CPass1FreeFileName = FileInfo.Funct(nxtscifunnumber).CPass1FreeFileName; +HeaderFileName = FileInfo.Funct(nxtscifunnumber).Pass1HeaderFileName; +CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName; +CInitVarsFileName = FileInfo.Funct(nxtscifunnumber).CInitVarsFileName; +IndentLevel = SharedInfo.NIndent; +CCall = ''; +Target = SharedInfo.Target; +// --- Extract Function Info. --- +FunctionName = FunInfo.SCIFunctionName; +CFunName = FunInfo.CFunctionName; +InArg = FunInfo.InArg; +NInArg = FunInfo.NInArg; +OutArg = FunInfo.OutArg; +NOutArg = FunInfo.NOutArg; +PosFirstOutScalar = FunInfo.PosFirstOutScalar; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Generating C code***',ReportFileName,'file','y'); +// #RNU_RES_E +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +// -------------------------------------------------- +// --- Manage anticipated exit from the function. --- +// -------------------------------------------------- +if (SharedInfo.SkipNextFun > 0) + SharedInfo.SkipNextFun = SharedInfo.SkipNextFun - 1; + return; +end + +// #RNU_RES_B +// Exit if the function is a precision specifier and the corresponding flag is 1. +// #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 + SharedInfo.SkipNextPrec = SharedInfo.SkipNextPrec - 1; + return; +end + +// #RNU_RES_B +// Exit if the function is OpEqual and the corresponding skip flag is enabled. +// #RNU_RES_E +if ((mtlb_strcmp(FunctionName,'OpEqual')) & ... + (SharedInfo.SkipNextEqual == 1)) + // #RNU_RES_B + PrintStringInfo(' Skipping code generating because already generated in the previous function.',ReportFileName,'file','y'); + // #RNU_RES_E + SharedInfo.SkipNextEqual = SharedInfo.SkipNextEqual - 1; + return; +end + +// #BJ +// size should be managed as other functions +// otherwise size(4) will lead to a C variable __4Size reference +// wich will never exists + +// #RNU_RES_B +// Exit if the function is size. +// #RNU_RES_E +// if ((mtlb_strcmp(FunctionName,'size'))) +// // #RNU_RES_B +// PrintStringInfo(' Anticipated exit for the size function.',ReportFileName,'file','y'); +// // #RNU_RES_E +// CCall =''; +// if (NInArg == 1) +// if (NOutArg == 1) +// CCall = CCall+OutArg(1).Name+'[0] = __'+InArg(1).Name+'Size[0];'; +// // #RNU_RES_B +// PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +// // #RNU_RES_E +// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); + +// CCall =''; +// CCall = CCall+OutArg(1).Name+'[1] = __'+InArg(1).Name+'Size[1];'; +// // #RNU_RES_B +// PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +// // #RNU_RES_E +// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +// elseif (NOutArg == 2) +// CCall = CCall+OutArg(1).Name+' = __'+InArg(1).Name+'Size[0];'; +// // #RNU_RES_B +// PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +// // #RNU_RES_E +// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); + +// CCall =''; +// CCall = CCall+OutArg(2).Name+' = __'+InArg(1).Name+'Size[1];'; +// // #RNU_RES_B +// PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +// // #RNU_RES_E +// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +// else +// SCI2Cerror('Don''t know how to manage size function with number of output args different from 1 and 2.'); +// end +// elseif (NInArg == 2) +// if (NOutArg == 1) +// if (InArg(2).Value == 1) +// CCall = CCall+OutArg(1).Name+' = __'+InArg(1).Name+'Size[0];'; +// // #RNU_RES_B +// PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +// // #RNU_RES_E +// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +// elseif (InArg(2).Value == 2) +// CCall = CCall+OutArg(1).Name+' = __'+InArg(1).Name+'Size[1];'; +// // #RNU_RES_B +// PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +// // #RNU_RES_E +// PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +// else +// SCI2Cerror('Not known the value of the second input arg for the size function.'); +// end +// else +// SCI2Cerror('Don''t know how to manage size function with number of output args different from 1.'); +// end +// else +// SCI2Cerror('Don''t know how to manage size function with number of input args different from 1 and 2.'); +// end +// return; +// end +// ------------------------------------------------------ +// --- End Manage anticipated exit from the function. --- +// ------------------------------------------------------ + +// #RNU_RES_B +// ------------------------------------------------------------ +// --- Allocate memory and size array for output arguments. --- +// ------------------------------------------------------------ +// #RNU_RES_E +if (FlagCall == 1) +// #RNU_RES_B +//RNU qui va tolto tutto una volta sicuri che la memallocout puo' essere fatta dentro la st_insoutarg +// C_MemAllocOutTempVars(OutArg,NOutArg,CPass1FileName,CPass1FreeFileName,IndentLevel,ReportFileName); +// #RNU_RES_E +end + +// ---------------------------- +// --- Generate the C call. --- +// ---------------------------- +CCall =''; +if(mtlb_strcmp(part(CFunName,1:9),'PI_thread') == %T) +//Functions that are to be ru in separate thread in case of RPi target, +//need to have specific name which is PI_THREAD(functionname) + +CCall = CCall + 'PI_THREAD('+CFunName+')' +else + + if (FunInfo.CFunctionName == SharedInfo.CMainFunName) + if (FlagCall == 1) + error(9999, 'main function called in a source code!'); + else + CCall =CCall+'int '; + end + elseif ((mtlb_strcmp(part(CFunName,1:5),'odefn') == %T)) + //Return type of function containing ODEs must be int. + CCall = CCall + 'int '; + else + if (PosFirstOutScalar >= 1) + if (FlagCall == 1) + CCall = CCall+OutArg(PosFirstOutScalar).Name+' = '; + else + CCall = CCall+C_Type(OutArg(PosFirstOutScalar).Type)+' '; + end + else + if (FlagCall == 0) + CCall = CCall+'void '; + end + end + end + + + // FIXME : Wrap library function call with prefixed name + + //if CFunName == "main" + CCall = CCall + CFunName + "("; + //else + // CCall = CCall+"SCI2C("+CFunName+")("; + //end + + // #RNU_RES_B + PrintStringInfo(' C call after output scalar args check: '+CCall,ReportFileName,'file','y'); + // #RNU_RES_E + clear counterin + if(mtlb_strcmp(part(CFunName,1:5),'odefn') == %F) + for counterin = 1:NInArg + + if (InArg(counterin).Type == 'g' & InArg(counterin).Scope == 'String') + TmpInArgName = '""'+InArg(counterin).Name+'""'; + elseif (InArg(counterin).Type == 'z' & (InArg(counterin).Scope == 'Number')) + TmpInArgName = 'DoubleComplex('+SCI2Cstring(real(InArg(counterin).Value))+','+SCI2Cstring(imag(InArg(counterin).Value))+')'; + elseif (InArg(counterin).Type == 'c' & (InArg(counterin).Scope == 'Number')) + TmpInArgName = 'FloatComplex('+SCI2Cstring(real(InArg(counterin).Value))+','+SCI2Cstring(imag(InArg(counterin).Value))+')'; + else + TmpInArgName = InArg(counterin).Name; + end + TmpInArgType = C_Type(InArg(counterin).Type); + + //if (FunctionName == 'OpEqual') + // TmpInArgSizeVar = '__'+OutArg(counterin).Name+'Size'; + // else + TmpInArgSizeVar = '__'+InArg(counterin).Name+'Size'; + //end + + if (InArg(counterin).Dimension == 0) + if (FlagCall == 0) + CCall = CCall+TmpInArgType+' '; + end + CCall = CCall+TmpInArgName+','; + else + if (FlagCall == 0) + CCall = CCall+TmpInArgType+'* '+TmpInArgName+', int* __'+TmpInArgName+'Size,'; + else + CCall = CCall+TmpInArgName+', '+TmpInArgSizeVar+','; + end + end + end + else + //If current function contains 'odefn' at the beginning, then it contains + //differnetial equations and its function call need to be differnt than + //other function call. GSL library being used for solving ODEs, requires + //function containing odes in specific format which is differnt than generated + //above. + for counterin = 1:NInArg + + //if((NInArg == 4 & counterin <> 3) | (NInArg == 5 & counterin <> 4)) //Skip third argument + if (InArg(counterin).Type == 'g' & InArg(counterin).Scope == 'String') + TmpInArgName = '""'+InArg(counterin).Name+'""'; + elseif (InArg(counterin).Type == 'z' & (InArg(counterin).Scope == 'Number')) + TmpInArgName = 'DoubleComplex('+SCI2Cstring(real(InArg(counterin).Value))+','+SCI2Cstring(imag(InArg(counterin).Value))+')'; + elseif (InArg(counterin).Type == 'c' & (InArg(counterin).Scope == 'Number')) + TmpInArgName = 'FloatComplex('+SCI2Cstring(real(InArg(counterin).Value))+','+SCI2Cstring(imag(InArg(counterin).Value))+')'; + else + TmpInArgName = InArg(counterin).Name; + end + + TmpInArgType = C_Type(InArg(counterin).Type); + + //if (FunctionName == 'OpEqual') + // TmpInArgSizeVar = '__'+OutArg(counterin).Name+'Size'; + // else + TmpInArgSizeVar = '__'+InArg(counterin).Name+'Size'; + //end + + if (InArg(counterin).Dimension == 0) + if (FlagCall == 0) + CCall = CCall+TmpInArgType+' '; + end + CCall = CCall+TmpInArgName+','; + else + if (FlagCall == 0) + CCall = CCall+TmpInArgType+'* '+TmpInArgName+', ';//int* __'+TmpInArgName+'Size,'; + else + CCall = CCall+TmpInArgName+', ';//+TmpInArgSizeVar+','; + end + end + //end + end + + end + + // #RNU_RES_B + PrintStringInfo(' C call after input args analysis: '+CCall,ReportFileName,'file','y'); + // #RNU_RES_E + for counterout = 1:NOutArg + TmpOutArgName = OutArg(counterout).Name; + TmpOutArgType = C_Type(OutArg(counterout).Type); + if (counterout == PosFirstOutScalar) + if (FlagCall == 0) + // #RNU_RES_B + // --- Write in the declaration file the returned output scalar (if any). --- + // #RNU_RES_E + outscalardeclaration = TmpOutArgType+' '+TmpOutArgName+';'; + // #RNU_RES_B + PrintStringInfo(outscalardeclaration,ReportFileName,'file','y'); + // #RNU_RES_E + PrintStringInfo(C_IndentBlanks(1)+outscalardeclaration,CDeclarationFileName,'file','y'); + PrintStringInfo(' ',CDeclarationFileName,'file','y'); + end + else + if (OutArg(counterout).Dimension == 0) + if (FlagCall == 0) + // --- Write in the declaration file the returned output scalar (if any). --- + outscalardeclaration = TmpOutArgType+' '+TmpOutArgName+';'; + PrintStringInfo(outscalardeclaration,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+outscalardeclaration,CDeclarationFileName,'file','y'); + PrintStringInfo(' ',CDeclarationFileName,'file','y'); + CCall = CCall+TmpOutArgType+'* __ptr'+TmpOutArgName+', '; + else + CCall = CCall+'&'+TmpOutArgName+', ';//NUT: verifica se ci vuole l'& + end + else + if (FlagCall == 0) + CCall = CCall+TmpOutArgType+'* '+TmpOutArgName+','; + if (OutArg(counterout).FindLike == 1) + CCall = CCall+'int* __'+TmpOutArgName+'Size'+','; + end + // #RNU_RES_B + //NUT prova a sostituire le variabili strutture con variabili dichiarate all'inizio del codice. + // --- Declare the size of the output arguments. --- + // #RNU_RES_E + outscalardeclaration = 'int __'+TmpOutArgName+'Size[2];'; + PrintStringInfo(outscalardeclaration,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+outscalardeclaration,CDeclarationFileName,'file','y'); + outscalardeclaration = '__'+TmpOutArgName+'Size[0] = '+(OutArg(counterout).Size(1))+';'; + PrintStringInfo(outscalardeclaration,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+outscalardeclaration,CInitVarsFileName,'file','y'); + outscalardeclaration = '__'+TmpOutArgName+'Size[1] = '+(OutArg(counterout).Size(2))+';'; + PrintStringInfo(outscalardeclaration,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+outscalardeclaration,CInitVarsFileName,'file','y'); + PrintStringInfo(' ',CInitVarsFileName,'file','y'); + else + CCall = CCall+OutArg(counterout).Name+','; + if (OutArg(counterout).FindLike == 1) + CCall = CCall+'(int* ) __'+TmpOutArgName+'Size'+','; + end + end + end + end + end + PrintStringInfo(' C call after output args analysis: '+CCall,ReportFileName,'file','y'); + // Remove the last " " and "," + if (part(CCall,length(CCall):length(CCall)) == ' ') + CCall = part(CCall,1:length(CCall)-1); + end + if (part(CCall,length(CCall):length(CCall)) == ',') + CCall = part(CCall,1:length(CCall)-1); + end + + //__ysize is added to input arguments at last to comply with form required by GSL + if(mtlb_strcmp(part(CFunName,1:5),'odefn') == %T) + CCall = CCall + ', int* '+TmpInArgSizeVar; + end + + CCall = CCall+')'; + if (FlagCall == 1) + CCall = CCall+';'; + end + +end +//NUT: la parte di generazione della C call va inserita in una funzione a parte. +//NUT: tale funzione deve avere anche uno switch che consenta di generare differenti versioni +//NUT: delle chiamate C in accordo con la libreria disponibile, fermo restando che +//NUT: e' sempre possibile fornire la lista delle macro. +if mtlb_strcmp(FunctionName,'return') + // Here I introduce the pointer assignment for output scalar arguments. + for cntout = 1:SharedInfo.CurrentFunInfo.NOutArg + if (cntout ~= SharedInfo.CurrentFunInfo.PosFirstOutScalar & ... + SharedInfo.CurrentFunInfo.OutArg(cntout).Dimension == 0) + CCall = ''; + CCall = CCall+'*__ptr'+SharedInfo.CurrentFunInfo.OutArg(cntout).Name+' = '+... + SharedInfo.CurrentFunInfo.OutArg(cntout).Name+';'; + PrintStringInfo(' '+CCall,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); + end + end + // --- Then I free the memory dinamically allocated. --- + // ---------------------------- + // --- Handle Free section. --- + // ---------------------------- + PrintStringInfo(C_IndentBlanks(1)+'/*',CPass1FreeFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+'** ------------------------- ',CPass1FreeFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+'** --- End Free Section. --- ',CPass1FreeFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+'** ------------------------- ',CPass1FreeFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+'*/',CPass1FreeFileName,'file','y'); + PrintStringInfo(' ',CPass1FreeFileName,'file','y'); + SCI2Ccopyfile(CPass1FreeFileName,... + CPass1FileName,'append'); + // -------------------------------- + // --- End Handle Free section. --- + // -------------------------------- + + // --- Then I introduce the return to the first scalar output arguments. --- + CCall = ''; + // #RNU_RES_B + //NUT: non capisco questo skip a questo punto. + //NUT: perche' la return finale la sto gestendo nella AST_HandleEndProgram. + PrintStringInfo(' return function of the AST is skipped.',ReportFileName,'file','y'); + //RN provo a non skippare e a mettere la return. + // #RNU_RES_E + + if (SharedInfo.CurrentFunInfo.CFunctionName == SharedInfo.CMainFunName) + CCall = CCall+'return(0);'; + elseif (mtlb_strcmp(part(SharedInfo.CurrentFunInfo.CFunctionName,1:5),'odefn') == %T) + //For GSL library, function containing ODEs must return GSL_SUCCESS + CCall = CCall + 'return GSL_SUCCESS;' + else + if (SharedInfo.CurrentFunInfo.PosFirstOutScalar > 0) + CCall = CCall+'return('+SharedInfo.CurrentFunInfo.OutArg(SharedInfo.CurrentFunInfo.PosFirstOutScalar).Name+');' + end + end + // #RNU_RES_B + PrintStringInfo(' '+CCall,ReportFileName,'file','y'); + // #RNU_RES_E + PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +else + // #RNU_RES_B + PrintStringInfo(' '+CCall,ReportFileName,'file','y'); + // #RNU_RES_E + PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); + if (FlagCall == 0) + // Add prototype to the header file + + C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName,Target,SharedInfo.OpenCVUsed); + + // Add { at the beginning of the function. + PrintStringInfo(' {',ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(IndentLevel)+'{',CPass1FileName,'file','y'); + + end +end + +// #RNU_RES_B +// Add in the C code the new size of the output argument when SCI2Cresize function is called. +// #RNU_RES_E +if (FunctionName == 'SCI2Cresize') + // #RNU_RES_B + PrintStringInfo(' Found SCI2Cresize -> Changing the size of the output argument.',ReportFileName,'file','y'); + // #RNU_RES_E + OutArgName = OutArg(counterout).Name; + tmpcode = '__'+OutArgName+'Size[0]='+OutArg(counterout).Size(1)+';'; + PrintStringInfo(C_IndentBlanks(IndentLevel)+tmpcode,CPass1FileName,'file','y'); + // #RNU_RES_B + PrintStringInfo(' '+tmpcode,ReportFileName,'file','y'); + // #RNU_RES_E + tmpcode = '__'+OutArgName+'Size[1]='+OutArg(counterout).Size(2)+';'; + PrintStringInfo(C_IndentBlanks(IndentLevel)+tmpcode,CPass1FileName,'file','y'); + // #RNU_RES_B + PrintStringInfo(' '+tmpcode,ReportFileName,'file','y'); + // #RNU_RES_E +end +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_GenDeclarations.sci b/2.3-1/macros/CCodeGeneration/C_GenDeclarations.sci new file mode 100644 index 00000000..41ba3a91 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenDeclarations.sci @@ -0,0 +1,135 @@ +function Cdeclaration = C_GenDeclarations(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),6,6); +// #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+'];'; + 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. --- +// -------------------------------------------- +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_GenerateFunName.sci b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci new file mode 100644 index 00000000..a1373ded --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci @@ -0,0 +1,56 @@ +function CFunName = C_GenerateFunName(FunctionName,InArg,NInArg,OutArg,NOutArg) +// function CFunName = C_GenerateFunName(FunctionName,InArg,NInArg,OutArg,NOutArg) +// ----------------------------------------------------------------- +// //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. +// 11-Nov-2007 -- Raffaele Nutricato: changed naming rule. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),5,5); +CFunName = ''; +if((IsAVRSupportFunction(FunctionName)) | (IsRPISupportFunction(FunctionName)) | ... + (mtlb_strcmp(part(FunctionName,1:5),'odefn') == %T) |... + (mtlb_strcmp(part(FunctionName,1:9),'PI_thread') == %T)| ... + (mtlb_strcmp(part(FunctionName,1:4),'ISR_') == %T)) +//If current function is an AVR or RPi function, then function name can be just +//plain function name without any input/output arguments types +//Slimilarly for functions conataining ode functions and functions to be called in +//separate thread in RPi + CFunName = CFunName+FunctionName; + +else + for tmpcnt = 1:NInArg + if (InArg(tmpcnt).Dimension == 1) + CFunName = CFunName+InArg(tmpcnt).Type+'2'; + else + CFunName = CFunName+InArg(tmpcnt).Type+SCI2Cstring(InArg(tmpcnt).Dimension); + end + end + + CFunName = CFunName+FunctionName; + + for tmpcnt = 1:NOutArg + if (OutArg(tmpcnt).Dimension == 1) + CFunName = CFunName+OutArg(tmpcnt).Type+'2'; + else + CFunName = CFunName+OutArg(tmpcnt).Type+SCI2Cstring(OutArg(tmpcnt).Dimension); + end + end + +end +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateLaunchScript.sci b/2.3-1/macros/CCodeGeneration/C_GenerateLaunchScript.sci new file mode 100644 index 00000000..027d4c70 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenerateLaunchScript.sci @@ -0,0 +1,86 @@ +function C_GenerateLaunchScript(OutDir,ListSCI2CInputPrmFiles) +// function C_GenerateLaunchScript(OutDir,ListSCI2CInputPrmFiles) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Generate the script that can be used to compile all the regression +// tests and to run them and finally to write results in the report +// file. +// #RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 26-Jan-2008 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +ScriptFileName = fullfile(OutDir,'LaunchRegressionTests.rc'); +NTranslations = size(ListSCI2CInputPrmFiles,1); +// --------------------------- +// --- End Initialization. --- +// --------------------------- +SCI2Cmdelete(ScriptFileName); +PrintStringInfo('#! /bin/bash ',ScriptFileName,'file','y'); +PrintStringInfo(' ',ScriptFileName,'file','y'); +PrintStringInfo('maindir=$PWD',ScriptFileName,'file','y'); +PrintStringInfo(' ',ScriptFileName,'file','y'); +PrintStringInfo('INTIALIZE()',ScriptFileName,'file','y'); +PrintStringInfo('{',ScriptFileName,'file','y'); +PrintStringInfo(' reportfile=$maindir/RegressionTestsReport.txt',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""#############'+'#################"" > $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""REPORT OF THE REGRESSION TESTS"" > $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""#############'+'#################"" > $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""Author: Raffaele Nutricato"" > $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""Copyright 2008 Raffaele Nutricato"" > $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" > $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' cd $maindir ',ScriptFileName,'file','y'); +PrintStringInfo('}',ScriptFileName,'file','y'); +PrintStringInfo(' ',ScriptFileName,'file','y'); +PrintStringInfo('EXECUTE()',ScriptFileName,'file','y'); +PrintStringInfo('{',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""xxxxxxxxxxxxxx'+'xxxxxxxxxxxxxxxxxx'+'xxxxxxxxxxxx""',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""xxxxxxxxxxxxxx'+'xxxxxxxxxxxxxxxxxxxxxxx'+'xxxxxxx"" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo $testname ',ScriptFileName,'file','y'); +PrintStringInfo(' echo $testname >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""xxxxxxxxxxxxxxx'+'xxxxxxxxxxxxxxxxx'+'xxxxxxxxxxxx"" ',ScriptFileName,'file','y'); +PrintStringInfo(' echo ""xxxxxxxxxxxxxxxx'+'xxxxxxxxxxxxxxxxxxxx'+'xxxxxxxx"" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' cd $testname/C_Code',ScriptFileName,'file','y'); +PrintStringInfo(' make >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' cd $maindir',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo(' echo "" "" >> $reportfile',ScriptFileName,'file','y'); +PrintStringInfo('}',ScriptFileName,'file','y'); +PrintStringInfo(' ',ScriptFileName,'file','y'); +PrintStringInfo('#############'+'##############',ScriptFileName,'file','y'); +PrintStringInfo('### ADD YOUR TESTS HERE ###',ScriptFileName,'file','y'); +PrintStringInfo('##############'+'#############',ScriptFileName,'file','y'); +PrintStringInfo('INTIALIZE',ScriptFileName,'file','y'); +PrintStringInfo(' ',ScriptFileName,'file','y'); + +for cnttransl = 1:NTranslations + [testpath,tmpname,tmpext] = fileparts(ListSCI2CInputPrmFiles(cnttransl)); + testpath = ConvertPathMat2C(testpath,'cygwin'); + PrintStringInfo('testname=""'+testpath+'""',ScriptFileName,'file','y'); + PrintStringInfo('EXECUTE $testname',ScriptFileName,'file','y'); + PrintStringInfo(' ',ScriptFileName,'file','y'); +end + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci new file mode 100644 index 00000000..7dfb4da4 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci @@ -0,0 +1,146 @@ +//Removed 4 lines code from end that causes ot generate the Makefile.mak file that is not needed with cygwin +//Changed at line 52 +function C_GenerateMakefile(FileInfo,SharedInfo) +// function C_GenerateMakefile(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// Generate the makefile. +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 26-Jan-2008 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +PrintStepInfo('Generating Builder '+FileInfo.MakefileFilename,... + FileInfo.GeneralReport,'both'); + +target = SharedInfo.Target; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +PrintStringInfo('# SCI2C Makefile',FileInfo.MakefileFilename,'file','y'); +PrintStringInfo('# hArtes EU Project.',FileInfo.MakefileFilename,'file','y'); +PrintStringInfo('# Authors: PoliBa & Inria',FileInfo.MakefileFilename,'file','y'); +PrintStringInfo('# -----------------------',FileInfo.MakefileFilename,'file','y'); +PrintStringInfo('# --- USER PARAMETERS ---',FileInfo.MakefileFilename,'file','y'); +PrintStringInfo('# -----------------------',FileInfo.MakefileFilename,'file','y'); +PrintStringInfo('# --- DIRECTORIES AND FILES ---',FileInfo.MakefileFilename,'file','y'); + +makecsrcdir = pathconvert('src/c', %f, %f, 'u'); +makehsrcdir = pathconvert('includes', %f, %f, 'u'); +makeisrcdir = pathconvert('interfaces', %f, %f, 'u'); +makelibdir = pathconvert('libraries', %f, %f, 'u'); +makesci2cdir = FileInfo.CStyleOutCCCodeDir; + + +PrintStringInfo('CSRCDIR = '+makecsrcdir,FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('HSRCDIR = '+makehsrcdir,FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('ISRCDIR = '+makeisrcdir,FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('LIBDIR = '+makelibdir,FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('SCI2CDIR = .',FileInfo.MakefileFilename,'file','y','y'); + +if getos() == 'Windows' then + + // Compiler definition + PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CXX = g++',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR)',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CXXFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR)',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('LDFLAGS = -L./ -lblasplus -llapack -lm',FileInfo.MakefileFilename,'file','y','y'); //Added -L./ and -lblasplus(previously it was -lblas) + +else + if (target == 'RPi') + PrintStringInfo('CC = arm-linux-gnueabihf-gcc ',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CXX = arm-linux-gnueabihf-g++ ',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CXXFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('LDFLAGS = -llapack -lrefblas -lgfortran -lwiringPi',FileInfo.MakefileFilename,'file','y','y'); + else + PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CXX = g++',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y'); + 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(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'); + PrintStringInfo('LDFLAGS += -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('LDFLAGS += -lopencv_ts -lopencv_video -lopencv_videostab -lopencv_core -lrt -lpthread -lm -ldl', FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('LDFLAGS += -lIlmImf -ljpeg -ljasper -ltiff -lpng -lzlib -lstdc++',FileInfo.MakefileFilename,'file','y','y'); + end +end +//If ode function is used, add libgsl. +if(size(SharedInfo.Includelist) <> 0) + if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T)) + PrintStringInfo('LDFLAGS += -lgsl',FileInfo.MakefileFilename,'file','y','y'); + end +end + +// Binary definition +PrintStringInfo('EXEFILENAME = '+SharedInfo.SCIMainFunName,FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)', FileInfo.MakefileFilename,'file','y','y'); + +// Sources +//Check the output format selected and insert files according to it +PrintStringInfo('SRC = $(wildcard $(CSRCDIR)/*.c)', FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('SRCC = $(wildcard $(CSRCDIR)/*.cpp)', FileInfo.MakefileFilename,'file','y','y'); + +// Objects +PrintStringInfo('OBJ = $(SRC:.c=.o)', FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('OBJC = $(SRCC:.cpp=.o)', FileInfo.MakefileFilename,'file','y','y'); + +// Rules +PrintStringInfo('# ---------------',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('# --- TARGETS ---',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('# ---------------',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('compileexecute: $(OBJ) $(OBJC)',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""============================""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""Generation of the executable""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""============================""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t$(CXX) $(CFLAGS) $(OBJ) $(OBJC) *.c $(LDFLAGS) -o $(EXEFILE)',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',FileInfo.MakefileFilename,'file','y','y'); +if(target == "StandAlone") + PrintStringInfo('\t@echo ""==============""',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('\t@echo ""Executing code""',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('\t@echo ""==============""',FileInfo.MakefileFilename,'file','y','y'); + PrintStringInfo('\t$(EXEFILE)',FileInfo.MakefileFilename,'file','y','y'); +end +PrintStringInfo('clean:',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""=============================""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""Removing only exe + obj files""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""=============================""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\trm -rf $(EXEFILE)',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\trm -rf $(OBJ)',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\trm -rf $(OBJC)',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',FileInfo.MakefileFilename,'file','y','y'); + +PrintStringInfo('distclean: clean',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""==========================""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""Removing only the exe file""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""==========================""',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\trm -rf $(EXEFILE)',FileInfo.MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',FileInfo.MakefileFilename,'file','y','y'); + + + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile_msvc.sci b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile_msvc.sci new file mode 100644 index 00000000..00ffb63c --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile_msvc.sci @@ -0,0 +1,131 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Allan CORNET +// +// 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 +// +// + +function C_GenerateMakefile_msvc(FileInfo, SharedInfo) +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +MakefileFilename = FileInfo.MakefileFilename + '.mak'; + +// ----------------------- +// --- Initialization. --- +// ----------------------- +PrintStepInfo('Generating Builder '+MakefileFilename,... + FileInfo.GeneralReport,'both'); + +target = SharedInfo.Target; + +PrintStringInfo('# SCI2C Makefile (Visual Studio 2008)',MakefileFilename,'file','y','y'); +PrintStringInfo('# hArtes EU Project.',MakefileFilename,'file','y','y'); +PrintStringInfo('# Authors: PoliBa & Inria & DIGITEO',MakefileFilename,'file','y','y'); +PrintStringInfo('# -----------------------',MakefileFilename,'file','y','y'); +PrintStringInfo('# --- USER PARAMETERS ---',MakefileFilename,'file','y','y'); +PrintStringInfo('# -----------------------',MakefileFilename,'file','y','y'); +PrintStringInfo('# --- DIRECTORIES AND FILES ---',MakefileFilename,'file','y','y'); + +makecsrcdir = pathconvert('src/c', %f, %f, 'u'); +makehsrcdir = pathconvert('includes', %f, %f, 'u'); +makeisrcdir = pathconvert('interfaces', %f, %f, 'u'); +makelibdir = pathconvert('libraries', %f, %f, 'u'); +makesci2cdir = FileInfo.CStyleOutCCCodeDir; + +PrintStringInfo('CSRCDIR = '+makecsrcdir,MakefileFilename,'file','y','y'); +PrintStringInfo('HSRCDIR = '+makehsrcdir,MakefileFilename,'file','y','y'); +PrintStringInfo('ISRCDIR = '+makeisrcdir,MakefileFilename,'file','y','y'); +PrintStringInfo('SCI2CDIR = .',MakefileFilename,'file','y','y'); + +PrintStringInfo('DIR_OBJ=Release',MakefileFilename,'file','y','y'); +//PrintStringInfo('LAPACK_LIB =$(SCI2CDIR)/libraries/lapack.lib',MakefileFilename,'file','y','y'); +//PrintStringInfo('BLAS_LIB = $(SCI2CDIR)/libraries/blasplus.lib',MakefileFilename,'file','y','y'); +PrintStringInfo('LIB_PATH = $(SCI2CDIR)/libraries',MakefileFilename,'file','y','y'); +PrintStringInfo('LIBS = lapack.lib blasplus.lib',MakefileFilename,'file','y','y'); +PrintStringInfo('LIBS = $(LIBS) kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib',MakefileFilename,'file','y','y'); +PrintStringInfo('CC = cl',MakefileFilename,'file','y','y'); +PrintStringInfo('LINKER = link',MakefileFilename,'file','y','y'); +PrintStringInfo('LINKER_OPTIMISATION_MODE=/RELEASE ',MakefileFilename,'file','y','y'); +PrintStringInfo('CC__OPTIMISATION_MODE=-Z7 -O2 -MT',MakefileFilename,'file','y','y'); +PrintStringInfo('CC_OPTIONS = $(CC_COMMON) -W3 -Gd $(CC__OPTIMISATION_MODE) /Fo""$(DIR_OBJ)/"" /Fd""$(DIR_OBJ)/"" ',MakefileFilename,'file','y','y'); +PrintStringInfo('CFLAGS = $(CC_OPTIONS) -I""$(HSRCDIR)"" -I""$(ISRCDIR)"" /EHsc /TP ',MakefileFilename,'file','y','y'); +PrintStringInfo('EXEFILENAME = '+SharedInfo.SCIMainFunName,MakefileFilename,'file','y','y'); +PrintStringInfo('EXEFILE = $(SCI2CDIR)\\$(EXEFILENAME)',MakefileFilename,'file','y','y'); +PrintStringInfo('MAIN_SRC = $(SCI2CDIR)/main.c',MakefileFilename,'file','y','y'); + +if(SharedInfo.OpenCVUsed == %T) + PrintStringInfo('LIBS = $(LIBS) opencv_calib3d2413.lib opencv_contrib2413.lib opencv_features2d2413.lib',MakefileFilename,'file','y','y'); + PrintStringInfo('LIBS = $(LIBS) opencv_flann2413.lib opencv_gpu2413.lib opencv_highgui2413.lib ',MakefileFilename,'file','y','y'); + PrintStringInfo('LIBS = $(LIBS) opencv_imgproc2413.lib opencv_legacy2413.lib opencv_ml2413.lib opencv_nonfree2413.lib',MakefileFilename,'file','y','y'); + PrintStringInfo('LIBS = $(LIBS) opencv_objdetect2413.lib opencv_ocl2413.lib opencv_photo2413.lib opencv_stitching2413.lib',MakefileFilename,'file','y','y'); + PrintStringInfo('LIBS = $(LIBS) opencv_superres2413.lib opencv_ts2413.lib opencv_video2413.lib opencv_videostab2413.lib opencv_core2413.lib',MakefileFilename,'file','y','y'); + PrintStringInfo('LIBS = $(LIBS) IlmImf.lib libjpeg.lib libjasper.lib libtiff.lib libpng.lib zlib.lib',MakefileFilename,'file','y','y'); +end +// Sources +PrintStringInfo('SRC = $(CSRCDIR)/*.c', MakefileFilename,'file','y','y'); +PrintStringInfo('SRCC = $(CSRCDIR)/*.cpp', MakefileFilename,'file','y','y'); + +//PrintStringInfo('SRC = \\', MakefileFilename,'file','y','y'); +//allSources = getAllSources(); +//nbSources = size(allSources); +//for i = 1:(nbSources(1) - 1) +// [tmppath,tmpfile,tmpext] = fileparts(allSources(i)); +// PrintStringInfo(' $(CSRCDIR)/'+tmpfile+tmpext+' \\', MakefileFilename,'file','y','y'); +//end +//[tmppath,tmpfile,tmpext] = fileparts(allSources(nbSources(1))); +//PrintStringInfo(' $(CSRCDIR)/'+tmpfile+tmpext, MakefileFilename,'file','y','y'); + +PrintStringInfo('OBJ = $(SRC:.c=.obj) $(MAIN_SRC:.c=.obj)',MakefileFilename,'file','y','y'); +PrintStringInfo('OBJC = $(SRCC:.cpp=.o)', MakefileFilename,'file','y','y'); +PrintStringInfo('# ---------------',MakefileFilename,'file','y','y'); +PrintStringInfo('# --- TARGETS ---',MakefileFilename,'file','y','y'); +PrintStringInfo('# ---------------',MakefileFilename,'file','y','y'); +PrintStringInfo('compileexecute: ',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""============================""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""Generation of the executable""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""============================""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-IF NOT EXIST $(DIR_OBJ) mkdir $(DIR_OBJ)',MakefileFilename,'file','y','y'); +PrintStringInfo('\t$(CC) $(CFLAGS) $(SRC) $(SRCC) $(MAIN_SRC) /link /LIBPATH:$(LIB_PATH) $(LIBS) /out:$(EXEFILE).exe',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',MakefileFilename,'file','y','y'); +if(target == "StandAlone") + PrintStringInfo('\t@echo ""==============""',MakefileFilename,'file','y','y'); + PrintStringInfo('\t@echo ""Executing code""',MakefileFilename,'file','y','y'); + PrintStringInfo('\t@echo ""==============""',MakefileFilename,'file','y','y'); + PrintStringInfo('\t$(EXEFILE).exe',MakefileFilename,'file','y','y'); +end +PrintStringInfo('clean:',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""=============================""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""Removing only exe + obj files""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""=============================""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del ""$(DIR_OBJ)\*.obj""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-rmdir ""$(DIR_OBJ)""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).exe',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).exp',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).lib',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).pdb',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).ilk',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',MakefileFilename,'file','y','y'); +PrintStringInfo('distclean: clean',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""==========================""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""Removing only the exe file""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo ""==========================""',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).exe',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).exp',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).lib',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).pdb',MakefileFilename,'file','y','y'); +PrintStringInfo('\t-del $(EXEFILE).ilk',MakefileFilename,'file','y','y'); +PrintStringInfo('\t@echo "" ""',MakefileFilename,'file','y','y'); + + +endfunction
\ No newline at end of file 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..c66b9764 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenerateMkfle_arduino.sci @@ -0,0 +1,24 @@ +// 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: Yash Pratap Singh Tomar +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +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_GenerateSCI2CHeader.sci b/2.3-1/macros/CCodeGeneration/C_GenerateSCI2CHeader.sci new file mode 100644 index 00000000..bced7243 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_GenerateSCI2CHeader.sci @@ -0,0 +1,21 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET +// +// 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 +// +// +function C_GenerateSCI2CHeader(OutputPath, FunctionPrefix) + FileName = OutputPath+"scilab2c.h" + C_SCI2CHeader(FileName); + PrintStringInfo('#ifndef __SCILAB2C_H__',FileName,'file','y'); + PrintStringInfo('#define __SCILAB2C_H__',FileName,'file','y'); + PrintStringInfo('',FileName,'file','y'); + PrintStringInfo('#define SCI2C(Name) '+FunctionPrefix+'_##Name',FileName,'file','y'); + PrintStringInfo('',FileName,'file','y'); + PrintStringInfo('#endif /* !__SCILAB2C_H__ */',FileName,'file','y'); +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_IfElseBlocks.sci b/2.3-1/macros/CCodeGeneration/C_IfElseBlocks.sci new file mode 100644 index 00000000..92ac94f7 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_IfElseBlocks.sci @@ -0,0 +1,68 @@ +function SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,InOutStatements) +// function SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,InOutStatements) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; + +IndentLevel = SharedInfo.NIndent; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo(' Generate ""{"" or ""}"" code for if/else statement',ReportFileName,'file','y'); +// #RNU_RES_E +CCall = ''; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// #RNU_RES_B +// ----------------------------------------------------- +// --- Generate the C call/Update indentation level. --- +// ----------------------------------------------------- +// #RNU_RES_E +if (InOutStatements=='in') + CCall = CCall+'{'; + PrintStringInfo(' '+CCall,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); + IndentLevel = IndentLevel + 1; +elseif (InOutStatements=='out') + CCall = CCall+'}'; + IndentLevel = IndentLevel - 1; + PrintStringInfo(' '+CCall,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(IndentLevel)+CCall,CPass1FileName,'file','y'); +else + error(9999, 'Unknown setting for InOutStatements: '+InOutStatements+'.'); +end + +// #RNU_RES_B +PrintStringInfo(' Updating indentation level to:'+string(IndentLevel),ReportFileName,'file','y'); +// #RNU_RES_E +SharedInfo.NIndent = IndentLevel; + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci new file mode 100644 index 00000000..48a05383 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci @@ -0,0 +1,91 @@ +function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo) +// function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),5,5); + +// --- 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 + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Generating C code***',ReportFileName,'file','y'); +// #RNU_RES_E +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// -------------------------------------------- +// --- Generate the C name of the function. --- +// -------------------------------------------- +if (ASTIfExpType=='if') + CFunName = 'if'; +elseif (ASTIfExpType=='elseif') + CFunName = 'if'; +elseif (ASTIfExpType=='else') + CFunName = 'else'; +else + error(9999, 'Unknown ASTIfExpType ""'+ASTIfExpType+'"".'); +end + +// ---------------------------- +// --- Generate the C call. --- +// ---------------------------- +if SCI2Cstrncmps1size(ASTIfExpType,'else') + // #RNU_RES_B + // before opening a new C block, closes the previous one. + // #RNU_RES_E + SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out'); +end + +CCall =''; +CCall = CCall+CFunName; +if (ASTIfExpType~='else') + CCall = CCall+'('+IfCondArg(1)+')'; +end +PrintStringInfo(' '+CCall,ReportFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + +SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'in'); + +// #RNU_RES_B +// --------------------------------- +// --- Update counter nested if. --- +// --------------------------------- +// #RNU_RES_E +if (ASTIfExpType=='elseif') + // #RNU_RES_B + // every elseif statement a new } is required. + // #RNU_RES_E + SharedInfo.CountNestedIf = SharedInfo.CountNestedIf + 1; +end + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_IndentBlanks.sci b/2.3-1/macros/CCodeGeneration/C_IndentBlanks.sci new file mode 100644 index 00000000..9304aefb --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_IndentBlanks.sci @@ -0,0 +1,31 @@ +function OutBlanksString = C_IndentBlanks(IndentLevel) +// function OutBlanksString = C_IndentBlanks(IndentLevel) +// ----------------------------------------------------------------- +// Delete function for a generic SCI2C table. +// +// 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. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +OutBlanksString = ''; +BlanksPerLevel = ' '; +for cntind = 1:IndentLevel + OutBlanksString = OutBlanksString + BlanksPerLevel; +end + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci new file mode 100644 index 00000000..97dcf0d6 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci @@ -0,0 +1,77 @@ +function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,Target,OpenCVUsed) +// function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),5,5); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +C_SCI2CHeader(HeaderFileName); +[tmppath,tmpfname,tmpextension]=fileparts(HeaderFileName); +PrintStringInfo('#ifndef '+tmpfname+'_h',HeaderFileName,'file','y'); +PrintStringInfo('#define '+tmpfname+'_h',HeaderFileName,'file','y'); +PrintStringInfo('/*',HeaderFileName,'file','y'); +PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y'); +PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('*/',HeaderFileName,'file','y'); +PrintStringInfo('#define ' + Target + '1 1' ,HeaderFileName,'file','y'); +PrintStringInfo('/*',HeaderFileName,'file','y'); +PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('** --- SCI2C Includes. --- ',HeaderFileName,'file','y'); +PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('*/',HeaderFileName,'file','y'); +PrintStringInfo('#include ""'+Sci2CLibMainHeaderFName+'""',HeaderFileName,'file','y'); +PrintStringInfo('/*',HeaderFileName,'file','y'); +PrintStringInfo('** --------------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('** --- End SCI2C Includes. --- ',HeaderFileName,'file','y'); +PrintStringInfo('** --------------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('*/',HeaderFileName,'file','y'); +PrintStringInfo(' ',HeaderFileName,'file','y'); +PrintStringInfo(' ',HeaderFileName,'file','y'); +//PrintStringInfo('#ifdef __cplusplus',HeaderFileName,'file','y'); +//PrintStringInfo('extern ""C"" {',HeaderFileName,'file','y'); +//PrintStringInfo('#endif',HeaderFileName,'file','y'); +PrintStringInfo('/*',HeaderFileName,'file','y'); +PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('** --- Prototypes. --- ',HeaderFileName,'file','y'); +PrintStringInfo('** ------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('*/',HeaderFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(0)+C_Prototype,HeaderFileName,'file','y'); +PrintStringInfo('/*',HeaderFileName,'file','y'); +PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('** --- End Prototypes. --- ',HeaderFileName,'file','y'); +PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y'); +PrintStringInfo('*/',HeaderFileName,'file','y'); +PrintStringInfo(' ',HeaderFileName,'file','y'); +PrintStringInfo(' ',HeaderFileName,'file','y'); +PrintStringInfo('/*',HeaderFileName,'file','y'); +PrintStringInfo('** ------------------------ ',HeaderFileName,'file','y'); +PrintStringInfo('** --- USER2C Includes. --- ',HeaderFileName,'file','y'); +PrintStringInfo('** ------------------------ ',HeaderFileName,'file','y'); +PrintStringInfo('*/',HeaderFileName,'file','y'); + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_MemAllocOutTempVars.sci b/2.3-1/macros/CCodeGeneration/C_MemAllocOutTempVars.sci new file mode 100644 index 00000000..dedcfd33 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_MemAllocOutTempVars.sci @@ -0,0 +1,64 @@ +function C_MemAllocOutTempVars(OutArg,NOutArg,CPass1FileName,CPass1FreeFileName,IndentLevel,ReportFileName,ResizeApproach) +// function C_MemAllocOutTempVars(OutArg,NOutArg,CPass1FileName,CPass1FreeFileName,IndentLevel,ReportFileName,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: replaced malloc with realloc. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),7,7); + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Allocating memory for temp variables***',ReportFileName,'file','y'); +// #RNU_RES_E + +// #RNU_RES_B +// --- Allocate memory and size array for output arguments. --- +// #RNU_RES_E +for counterout = 1:NOutArg + if (OutArg(counterout).Dimension > 0) + // #RNU_RES_B + // if ((OutArg(counterout).Scope == 'Temp') | (OutArg(counterout).FindLike == -1) | ... + // (isnum(OutArg(counterout).Size(1))==%F) | (isnum(OutArg(counterout).Size(2))==%F)) + //NUT: qui forse ci vuole un check per verificare se per caso la variabile e' globale e non se ne conosce la size numerica. + //NUT infatti. Per ora se la size numerica assumo che la variabile globale e' da reallocare. Secondo me occorre aggiungere + //NUT un campo negli argomenti che specifichi la presenza di realloc da fare. + //NUT: ho tolto il check sulle temp perche' se una temp ha size numerica non voglio fare malloc. + //RNU sulle stringhe ancora non applico realloc + // #RNU_RES_E + if ((OutArg(counterout).FindLike == -1) | ... + (isnum(OutArg(counterout).Size(1))==%F) | (isnum(OutArg(counterout).Size(2))==%F)| ... + (ResizeApproach=='REALLOC_ALL_RESIZE_ALL' & OutArg(counterout).Type ~= 'g')) + OutArgName = OutArg(counterout).Name; + tmpcode = '__'+OutArgName+'Size[0]='+OutArg(counterout).Size(1)+';'; + PrintStringInfo(C_IndentBlanks(IndentLevel)+tmpcode,CPass1FileName,'file','y'); + PrintStringInfo(' '+tmpcode,ReportFileName,'file','y'); + tmpcode = '__'+OutArgName+'Size[1]='+OutArg(counterout).Size(2)+';'; + PrintStringInfo(C_IndentBlanks(IndentLevel)+tmpcode,CPass1FileName,'file','y'); + PrintStringInfo(' '+tmpcode,ReportFileName,'file','y'); + //a->val = (double *) malloc(nnz * sizeof(double)); + // numbers = (int*) realloc (numbers, count * sizeof(int)); + tmpcode = OutArgName+' = ('+C_Type(OutArg(counterout).Type)+'*) realloc('+OutArgName+',('+OutArg(counterout).Size(1)+')*('+OutArg(counterout).Size(2)+')*sizeof('+C_Type(OutArg(counterout).Type)+'));'; + PrintStringInfo(C_IndentBlanks(IndentLevel)+tmpcode,CPass1FileName,'file','y'); + PrintStringInfo(' '+tmpcode,ReportFileName,'file','y'); + PrintStringInfo(C_IndentBlanks(1)+'free('+OutArgName+');',CPass1FreeFileName,'file','y'); + end + end +end + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_SCI2CHeader.sci b/2.3-1/macros/CCodeGeneration/C_SCI2CHeader.sci new file mode 100644 index 00000000..42c25a4c --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_SCI2CHeader.sci @@ -0,0 +1,46 @@ +function C_SCI2CHeader(FileName) +// function C_SCI2CHeader(FileName) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 21-Dec-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +PrintStringInfo('/*',FileName,'file','y'); +PrintStringInfo('** ************************************************',FileName,'file','y'); +PrintStringInfo('** This file has been generated using',FileName,'file','y'); +PrintStringInfo('** Scilab2C (Version '+getScilab2cVersion()+')',FileName,'file','y'); +PrintStringInfo('**',FileName,'file','y'); +PrintStringInfo('** Please visit following links for more informations:',FileName,'file','y'); +PrintStringInfo('** Atoms Module: http://atoms.scilab.org/toolboxes/scilab2c',FileName,'file','y'); +PrintStringInfo('** Scilab2C Forge: http://forge.scilab.org/index.php/p/scilab2c/',FileName,'file','y'); +PrintStringInfo('** Scilab2C ML: http://forge.scilab.org/index.php/p/scilab2c/',FileName,'file','y'); +PrintStringInfo('** ************************************************',FileName,'file','y'); +PrintStringInfo('*/',FileName,'file','y'); +PrintStringInfo(' ',FileName,'file','y'); +PrintStringInfo(' ',FileName,'file','y'); + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_Type.sci b/2.3-1/macros/CCodeGeneration/C_Type.sci new file mode 100644 index 00000000..d296c5c6 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_Type.sci @@ -0,0 +1,66 @@ +function OutC_Type = C_Type(ArgType) +// function OutC_Type = C_Type(ArgType) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +if (ArgType == 's') + OutC_Type = 'float'; +elseif (ArgType == 'd') + OutC_Type = 'double'; +elseif (ArgType == 'c') + OutC_Type = 'floatComplex'; +elseif (ArgType == 'z') + OutC_Type = 'doubleComplex'; +elseif (ArgType == 'i') + OutC_Type = 'int'; +elseif (ArgType == 'g') + OutC_Type = 'char'; +elseif (ArgType == 'f') + OutC_Type = 'FILE *'; +elseif (ArgType == 'u8') + OutC_Type = 'uint8'; +elseif (ArgType == 'i8') + OutC_Type = 'int8'; +elseif (ArgType == 'u16') + OutC_Type = 'uint16'; +elseif (ArgType == 'i16') + OutC_Type = 'int16'; +elseif (ArgType == 'u32') + OutC_Type = 'uint32'; +elseif (ArgType == 'i32') + OutC_Type = 'int32'; +elseif (ArgType == 'fn') //This type introduced for ODE function, + // as it's one of the inout argument is name of the other function + OutC_Type = ''; +elseif (ArgType == 'mt') + OutC_Type = 'Mat' +elseif (ArgType == 'ss') + OutC_Type = 'double' + //This type is introduced for storing state space systems. + //It is a matrix of size (n+k)*(n+m+1), for n states, m inputs, + //k outputs. It stores matrices A,B,C,D and initial state in following form + // | A B X0 | + // | C D 0 | + +else + error(9999, 'Unknown Argument Type: ""'+ArgType+'"".'); +end +endfunction diff --git a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci new file mode 100644 index 00000000..edd2830e --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci @@ -0,0 +1,93 @@ +function SharedInfo = C_WhileExpression(FileInfo,SharedInfo) +// function SharedInfo = C_WhileExpression(FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 15-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; + +CPass1WhileProlFileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileProlFileName(SharedInfo.While.Level); +CPass1WhileEpilFileName = FileInfo.Funct(nxtscifunnumber).CPass1WhileEpilFileName(SharedInfo.While.Level); +CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Generating C code***',ReportFileName,'file','y'); +// #RNU_RES_E +CCall =''; +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ---------------------------- +// --- Generate the C call. --- +// ---------------------------- + +// ------------------------- +// --- Manage all cases. --- +// ------------------------- +PrintStringInfo(' Handling While Expression with OpColon.',ReportFileName,'file','y'); //NUT: sistema il commento. + +// ------------------------------------------------------------------------------------- +// --- Generate Prologue and Epilogue -> Copy the first N-1 lines of the for.c code. --- +// ------------------------------------------------------------------------------------- +[C_Strings,NumCStrings] = File2StringArray(CPass1WhileProlFileName); +C_Strings = stripblanks(C_Strings); +for cntstr = 1:NumCStrings + // Prologue + PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+C_Strings(cntstr),CPass1FileName,'file','y','n'); + // 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),
+ // check arguments or define function %0_mputstr for overloading. + end + PrintStringInfo(C_Strings(cntstr),CPass1WhileEpilFileName ,'file','y','n'); +end +// ---------------------------------------- +// --- Insert "}" in the epilogue file. --- +// ---------------------------------------- +PrintStringInfo('}',CPass1WhileEpilFileName ,'file','y'); + +// ------------------------------ +// --- Insert for expression. --- +// ------------------------------ +CCall = 'while('+SharedInfo.WhileExpr.CondVar+')'; +PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + +// ------------------- +// --- Insert "{". --- +// ------------------- +CCall = '{'; +PrintStringInfo(C_IndentBlanks(SharedInfo.NIndent)+CCall,CPass1FileName,'file','y'); + +// --------------------------------- +// --- Update Indentation Level. --- +// --------------------------------- +SharedInfo.NIndent = SharedInfo.NIndent + 1; + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/GenCFunDatFiles.sci b/2.3-1/macros/CCodeGeneration/GenCFunDatFiles.sci new file mode 100644 index 00000000..9af858c7 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/GenCFunDatFiles.sci @@ -0,0 +1,73 @@ +function GenCFunDatFiles(FunctionName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,CFunName,LibTypeInfo,FunInfoDatDir) +// function GenCFunDatFiles(FunctionName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,CFunName,LibTypeInfo,FunInfoDatDir) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 30-Oct-2007 -- Raffaele Nutricato: Author. +// 30-Oct-2007 -- Alberto Morea: Test Ok. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// #RNU_RES_B +//NUT Nella fun info posso mettere le size simboliche per out arg e non quelle numeriche +//NUT che non usero' mai, anche perche' se un giorno decidero' di cambiare approccio e usero' funzioni +//NUT differenti per size differenti allora dovro' cambiare anche il loro nome per distinguerle +//NUT e di conseguenza avro' funinfo differenti. +// #RNU_RES_E +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),11,11); + + +// ----------------------- +// --- Initialization. --- +// ----------------------- +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// #RNU_RES_B +// ---------------------------------------------------------- +// --- Find Position of the first output scalar argument. --- +// ---------------------------------------------------------- +// #RNU_RES_E +PosFirstOutScalar = 0; +FoundOutScalar = 0; +for counterout = 1:NOutArg + if (OutArg(counterout).Dimension == 0) + if (FoundOutScalar==0) + PosFirstOutScalar = counterout; + FoundOutScalar = 1; + end + end +end + +// ------------------------------------ +// --- Update C function dat files. --- +// ------------------------------------ +clear FunInfo +FunInfo.SCIFunctionName = FunctionName; +FunInfo.CFunctionName = CFunName; +FunInfo.FunPrecSpecifier = FunPrecSpecifier; +FunInfo.FunTypeAnnot = FunTypeAnnot; +FunInfo.FunSizeAnnot = FunSizeAnnot; +FunInfo.InArg = InArg; +FunInfo.NInArg = NInArg; +FunInfo.OutArg = OutArg; +FunInfo.NOutArg = NOutArg; +FunInfo.PosFirstOutScalar = PosFirstOutScalar; +FunInfo.LibTypeInfo = LibTypeInfo; +save(fullfile(FunInfoDatDir,CFunName+'.dat'), "FunInfo"); +clear FunInfo + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/GetClsFileName.sci b/2.3-1/macros/CCodeGeneration/GetClsFileName.sci new file mode 100644 index 00000000..46f08201 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/GetClsFileName.sci @@ -0,0 +1,95 @@ +function SCI2CClassFileName = GetClsFileName(FunName,FileInfo,SharedInfo) +// function SCI2CClassFileName = GetClsFileName(FunName,FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-Jul-2007 -- Nutricato Raffaele: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),3,3); + +// //NUT: verifica che il nome sia accettabile e che non +// //NUT: occorra spezzettarla in piu funzioni. + +// --- Extraction of the function name and number. --- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +// --- Initialization. --- +tmpannfilename = FunName+'.ann'; +tmpscifilename = FunName+'.sci'; +AnnFileName = ''; +ClsFileName = '' + +SCI2CClassSpecifier = SharedInfo.Annotations.FUNCLASS; +FlagFoundAnnFile = 0; +// #RNU_RES_B +//NUT: qui e' presente la lista delle priorita' di accesso alle annotazioni. +// #RNU_RES_E +if SCI2Cfileexist(FileInfo.USER2CLibCAnnFun,tmpannfilename) + // #RNU_RES_B + // It is a C function of the USER2C library. + // #RNU_RES_E + FlagFoundAnnFile = 1; + AnnFileName = fullfile(FileInfo.USER2CLibCAnnFun,tmpannfilename); + SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName); + SCI2CClassFileName = fullfile(FileInfo.USER2CLibCAnnCls,SCI2CClassName+'.acls'); +elseif SCI2Cfileexist(FileInfo.USER2CLibSCIAnnFun,tmpannfilename) + // #RNU_RES_B + // It is a scilab function of the USER2C library. + // #RNU_RES_E + FlagFoundAnnFile = 1; + AnnFileName = fullfile(FileInfo.USER2CLibSCIAnnFun,tmpannfilename); + SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName); + SCI2CClassFileName = fullfile(FileInfo.USER2CLibSCIAnnCls,SCI2CClassName+'.acls'); +elseif (SCI2Cfileexist(FileInfo.SCI2CLibCAnnFun,tmpannfilename)) + // #RNU_RES_B + // It is a C function of the SCI2C library. + // #RNU_RES_E + FlagFoundAnnFile = 1; + AnnFileName = fullfile(FileInfo.SCI2CLibCAnnFun,tmpannfilename); + SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName); + SCI2CClassFileName = fullfile(FileInfo.SCI2CLibCAnnCls,SCI2CClassName+'.acls'); +elseif (SCI2Cfileexist(FileInfo.SCI2CLibSCIAnnFun,tmpannfilename)) + // #RNU_RES_B + // It is a scilab function of the SCI2C library. + // #RNU_RES_E + FlagFoundAnnFile = 1; + AnnFileName = fullfile(FileInfo.SCI2CLibSCIAnnFun,tmpannfilename); + SCI2CClassName = FL_GetFunctionClass(AnnFileName,SCI2CClassSpecifier,ReportFileName); + SCI2CClassFileName = fullfile(FileInfo.SCI2CLibSCIAnnCls,SCI2CClassName+'.acls'); +end + +if (FlagFoundAnnFile == 0) + [FlagFoundAnnFile,fullpathscifilename] = SCI2CFindFile(FileInfo.UserSciFilesPaths,FunName+'.sci'); + if (FlagFoundAnnFile == 0) + // #RNU_RES_B + PrintStringInfo(' ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Missing function annotation. Could not find',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: an associated .sci or .ann file for function: '+FunName,ReportFileName,'both','y'); + PrintStringInfo(' ',ReportFileName,'both','y'); + // #RNU_RES_E + error(9999, 'SCI2CERROR: Missing function annotation. Could not find an associated .sci or .ann file for function: '+FunName); + end + AnnFileName = fullfile(FileInfo.USER2CLibSCIAnnFun,tmpannfilename); + SCI2CClassName = FunName; + SCI2CClassFileName = fullfile(FileInfo.USER2CLibSCIAnnCls,SCI2CClassName+'.acls'); + Sci2AnnotationFile(fullpathscifilename,SCI2CClassFileName,AnnFileName,... + SharedInfo.Annotations.USERFUN,ReportFileName); +end +endfunction diff --git a/2.3-1/macros/CCodeGeneration/GetSymbolDimension.sci b/2.3-1/macros/CCodeGeneration/GetSymbolDimension.sci new file mode 100644 index 00000000..5828e0ae --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/GetSymbolDimension.sci @@ -0,0 +1,68 @@ +function symboldimension = GetSymbolDimension(Field_Size) +// function symboldimension = GetSymbolDimension(Field_Size) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Get the dimesion (0D,1D,2D) of a symbol given its size. +// +// Input data: +// Field_Size: it is the Size field of the InArg or OutArg structures. +// It is a 2-element array. N-dim array are not supported +// in this release. +// +// Output data: +// symboldimension: number specifying the dimension of the symbol. +// 0 = scalar; 1 = column or row; 2 = matrix; 3 = hypermatrix. +// +// #RNU_RES_E +// Status: +// 26-Oct-2007 -- Raffaele Nutricato: Author. +// 26-Oct-2007 -- Alberto Morea: Test Ok. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ + SCI2CNInArgCheck(argn(2),1,1); + +// Size is expressed as an array of two strings. + Nelem = max(size(Field_Size)); + if (Nelem < 2) + error(9999, 'The size of a symbol cannot be expressed with one or zero numbers.'); + end + + for countersize = 1:Nelem +// #RNU_RES_B +// Field_Type = 1; if Size is Symbol or a number > 1 +// Field_Type = 0; if Size is a number == 1 +// error if Size is 0. +// A symbol is scalar if the sum of the Field_Type elements is zero. +// A symbol is column or row if the sum of the Field_Type elements is one. +// A symbol is a matrix if the sum of the Field_Type elements is > 1. +// #RNU_RES_E + if (isnum(Field_Size(countersize))) + tmpnum = eval(Field_Size(countersize)); + if (tmpnum == 0) + error(9999, 'Found a symbol that has zeros elements. 0xN or Nx0 matrices are not allowed.'); + elseif (tmpnum == 1) + Field_Type(countersize) = 0; + else + Field_Type(countersize) = 1; + end + else + Field_Type(countersize) = 1; + end + end + + // The symbol global dimension is the count of all >1 dimension. + symboldimension = sum(Field_Type); + + if (symboldimension == 1) +// #RNU_RES_B +// symboldimension = 1; //NUT for this release there will not be difference between vectors and matrices. +// #RNU_RES_E + symboldimension = 2; + end +endfunction diff --git a/2.3-1/macros/CCodeGeneration/GetWhileCondVariable.sci b/2.3-1/macros/CCodeGeneration/GetWhileCondVariable.sci new file mode 100644 index 00000000..ba4c7e92 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/GetWhileCondVariable.sci @@ -0,0 +1,72 @@ +function SharedInfo = GetWhileCondVariable(OutArg,NOutArg,FunctionName,FileInfo,SharedInfo) +// function SharedInfo = GetWhileCondVariable(OutArg,NOutArg,FunctionName,FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //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. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +//NUT: secondo me questa funzione non serve a nulla + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),5,5); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Checking if the current function is handling while counter variables.***',ReportFileName,'file','y'); +// #RNU_RES_E + +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// #RNU_RES_B +// ----------------------------------------------- +// --- Initial Check on While counter variables. --- +// ----------------------------------------------- +// #RNU_RES_E +if ((SharedInfo.WhileExpr.OnExec > 0) & (NOutArg==1)) + // #RNU_RES_B + //NUT: se sono in una while expression devo memorizzarmi l'ultima variabile di output + //NUT: perche' e' quella che contiene la condizione da testare, + //NUT: allora io me le salvo tutte e l'ultima salvata sara' quella che andra' a finire + //NUT: nella while. + // #RNU_RES_E + SharedInfo.WhileExpr.CondVar = OutArg(1).Name; + // #RNU_RES_B + //if (SharedInfo.WhileExpr.AssignmentFun == 0) + //NUT: Test also that SharedInfo.WhileExpr.AssignmentFun because sometimes Equal are dummy! + //NUT: verifica se e' giusta questa mia affermazione. + //RNU il seguente test e' stato spostato nella AST_HandleWhileStatem.c perche' + //RNU: secondo me la matrice finale non e' supportata dalla while, ma while(det(M)>0) + //RNU: puo' essere benissimo supportato. + // if (OutArg.Dimension > 0) + // SCI2CerrorFile('Cannot manage while with matrix conditions',ReportFileName); + // SharedInfo.SkipNextFun = 0; //NUT verifica se serve + // end + // #RNU_RES_E + SharedInfo.WhileExpr.DimCondVar = OutArg(1).Dimension; + ///end +end + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/JoinDeclarAndCcode.sci b/2.3-1/macros/CCodeGeneration/JoinDeclarAndCcode.sci new file mode 100644 index 00000000..2c69f46e --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/JoinDeclarAndCcode.sci @@ -0,0 +1,173 @@ +function JoinDeclarAndCcode(FileInfoDatFile) +// function JoinDeclarAndCcode(FileInfoDatFile) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 07-Nov-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// --------------------- +// --- Load section. --- +// --------------------- +// --- Load File Info Structure. --- +load(FileInfoDatFile,'FileInfo'); + +// --- Load Shared Info Structure. --- +load(FileInfo.SharedInfoDatFile,'SharedInfo'); +// ------------------------- +// --- End load section. --- +// ------------------------- + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +funnumber = SharedInfo.NextSCIFunNumber; + +CPass1FileName = FileInfo.Funct(funnumber).CPass1FileName; +CPass2FileName = FileInfo.Funct(funnumber).CPass2FileName; +CDeclarationFileName = FileInfo.Funct(funnumber).CDeclarationFileName; +CGblDeclarFileName = FileInfo.Funct(funnumber).CGblDeclarFileName; +CInitVarsFileName = FileInfo.Funct(funnumber).CInitVarsFileName; +ReportFileName = FileInfo.Funct(funnumber).ReportFileName; + +CPass1V1FileFid = SCI2COpenFileRead(CPass1FileName); +CDeclarationFileFid = SCI2COpenFileRead(CDeclarationFileName); +CGblDeclarFileFid = SCI2COpenFileRead(CGblDeclarFileName); +CInitVarsFileFid = SCI2COpenFileRead(CInitVarsFileName); +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +PrintStepInfo('Joining declaration and C-call files',ReportFileName,'file'); + +PrintStringInfo('/*',CPass2FileName,'file','y'); +PrintStringInfo('** -------------------------------------',CPass2FileName,'file','y'); +PrintStringInfo('** --- Global Variables Declaration. ---',CPass2FileName,'file','y'); +PrintStringInfo('** -------------------------------------',CPass2FileName,'file','y'); +PrintStringInfo('*/',CPass2FileName,'file','y'); +// #RNU_RES_B +// --- Copy in V2 the global declaration file. --- +// #RNU_RES_E +while (~meof(CGblDeclarFileFid)) + // Read a line from C Global Declaration file. + tmpcline = mgetl(CGblDeclarFileFid,1); + if (length(tmpcline) == 0) + tmpcline = ' '; + end + + noblkstmpcline = stripblanks(tmpcline); + PrintStringInfo(tmpcline,CPass2FileName,'file','y'); +end +PrintStringInfo('/*',CPass2FileName,'file','y'); +PrintStringInfo('** -----------------------------------------',CPass2FileName,'file','y'); +PrintStringInfo('** --- End Global Variables Declaration. ---',CPass2FileName,'file','y'); +PrintStringInfo('** -----------------------------------------',CPass2FileName,'file','y'); +PrintStringInfo('*/',CPass2FileName,'file','y'); +PrintStringInfo(' ',CPass2FileName,'file','y'); + +// #RNU_RES_B +// --- Copy in V2 the first part of V1 up to "{". --- +// #RNU_RES_E +FoundCurlyBracket = 0; +while ((~meof(CPass1V1FileFid)) & (FoundCurlyBracket == 0)) + // Read a line from C Pass1 file. + tmpcline = mgetl(CPass1V1FileFid,1); + noblkstmpcline = stripblanks(tmpcline); + if (length(noblkstmpcline) > 0) + if (SCI2Cstrncmps1size('{',noblkstmpcline)) + FoundCurlyBracket = 1; + end + else + tmpcline = ' '; + end + PrintStringInfo(tmpcline,CPass2FileName,'file','y'); +end + +if (FoundCurlyBracket == 0) + SCI2CerrorFile('""{"" char not found in:'+CPass1FileName,ReportFileName); +end + +PrintStringInfo('/*',CPass2FileName,'file','y'); +PrintStringInfo('** -----------------------------',CPass2FileName,'file','y'); +PrintStringInfo('** --- Variable Declaration. ---',CPass2FileName,'file','y'); +PrintStringInfo('** -----------------------------',CPass2FileName,'file','y'); +PrintStringInfo('*/',CPass2FileName,'file','y'); +// --- Copy in V2 the declaration file. --- +while (~meof(CDeclarationFileFid)) + // Read a line from C Declaration file. + tmpcline = mgetl(CDeclarationFileFid,1); + if (length(tmpcline) == 0) + tmpcline = ' '; + end + + noblkstmpcline = stripblanks(tmpcline); + PrintStringInfo(tmpcline,CPass2FileName,'file','y'); +end + +// #RNU_RES_B +// --- Copy in V2 the variable initialization file. --- +// #RNU_RES_E +while (~meof(CInitVarsFileFid)) + // Read a line from C Declaration file. + tmpcline = mgetl(CInitVarsFileFid,1); + if (length(tmpcline) == 0) + tmpcline = ' '; + end + + noblkstmpcline = stripblanks(tmpcline); + PrintStringInfo(tmpcline,CPass2FileName,'file','y'); +end +PrintStringInfo('/*',CPass2FileName,'file','y'); +PrintStringInfo('** ---------------------------------',CPass2FileName,'file','y'); +PrintStringInfo('** --- End Variable Declaration. ---',CPass2FileName,'file','y'); +PrintStringInfo('** ---------------------------------',CPass2FileName,'file','y'); +PrintStringInfo('*/',CPass2FileName,'file','y'); + + +PrintStringInfo('/*',CPass2FileName,'file','y'); +PrintStringInfo('** ---------------',CPass2FileName,'file','y'); +PrintStringInfo('** --- C code. ---',CPass2FileName,'file','y'); +PrintStringInfo('** ---------------',CPass2FileName,'file','y'); +PrintStringInfo('*/',CPass2FileName,'file','y'); + +if((SharedInfo.Target == "RPi") & (nxtscifunname == SharedInfo.SCIMainFunName)) + //Add wiringPiSetup() function as it is required + PrintStringInfo('wiringPiSetup();',CPass2FileName,'file','y'); +end +// --- Copy the remaining part of V1 in V2. --- +while (~meof(CPass1V1FileFid)) + // #RNU_RES_B + // Read a line from C Pass1 file. + // #RNU_RES_E + tmpcline = mgetl(CPass1V1FileFid,1); + if (length(tmpcline) == 0) + tmpcline = ' '; + end + PrintStringInfo(tmpcline,CPass2FileName,'file','y'); +end + +// -------------------- +// --- Close Files. --- +// -------------------- +mclose(CPass1V1FileFid); +mclose(CDeclarationFileFid); +mclose(CGblDeclarFileFid); +mclose(CInitVarsFileFid); + +endfunction diff --git a/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp b/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp new file mode 100644 index 00000000..65184df1 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp @@ -0,0 +1,230 @@ +
+# --- C COMPILER ---
+CC = gcc
+CFLAGS = -Wall -pedantic -O3 -I $(HSRCDIR)
+# ---------------------------
+# --- END USER PARAMETERS ---
+# ---------------------------
+
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# DON'T TOUCH ANYTHING BELOW THIS LINE
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+
+ELEMENTARY_FUNCTIONS_DIR = $(CSRCDIR)/src/elementaryFunctions
+CFLAGS_ELEMENTARY_FUNCTIONS = -I $(ELEMENTARY_FUNCTIONS_DIR)/includes -I $(ELEMENTARY_FUNCTIONS_DIR)/interfaces
+
+
+EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)
+
+objects = \
+ $(OBJDIR)/doubleComplex.o \
+ $(OBJDIR)/floatComplex.o \
+ $(OBJDIR)/RealToComplex.o \
+ $(OBJDIR)/conj.o \
+ $(OBJDIR)/disp.o \
+ $(OBJDIR)/ones.o \
+ $(OBJDIR)/zeros.o \
+ $(OBJDIR)/OpApex.o \
+ $(OBJDIR)/OpColon.o \
+ $(OBJDIR)/OpDotStar.o \
+ $(OBJDIR)/OpDotHat.o \
+ $(OBJDIR)/OpDotSlash.o \
+ $(OBJDIR)/OpEqual.o \
+ $(OBJDIR)/OpPlus.o \
+ $(OBJDIR)/OpMinus.o \
+ $(OBJDIR)/OpStar.o \
+ $(OBJDIR)/OpIns.o \
+ $(OBJDIR)/OpExt.o \
+ $(OBJDIR)/OpRc.o \
+ $(OBJDIR)/OpCc.o \
+ $(OBJDIR)/cos.o \
+ $(OBJDIR)/cosh.o \
+ $(OBJDIR)/sin.o \
+ $(OBJDIR)/sinh.o \
+ $(OBJDIR)/FileManagement.o \
+ $(OBJDIR)/OpLogLt.o \
+ $(OBJDIR)/OpLogGt.o \
+ $(OBJDIR)/OpLogGe.o \
+ $(OBJDIR)/OpLogLe.o \
+ $(OBJDIR)/OpLogEq.o \
+ $(OBJDIR)/Find.o \
+ $(OBJDIR)/ConvertPrecision.o \
+ $(OBJDIR)/SCI2Cfft.o \
+ $(OBJDIR)/SCI2Cconvol.o \
+ $(OBJDIR)/ssqrts.o \
+ $(OBJDIR)/dsqrts.o \
+ $(OBJDIR)/csqrts.o \
+ $(OBJDIR)/zsqrts.o \
+ $(OBJDIR)/ssqrta.o \
+ $(OBJDIR)/dsqrta.o \
+ $(OBJDIR)/csqrta.o \
+ $(OBJDIR)/zsqrta.o
+
+# ---------------
+# --- TARGETS ---
+# ---------------
+compileexecute: $(objects)
+ @echo " "
+ @echo "============================"
+ @echo "Generation of the executable"
+ @echo "============================"
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) $(objects) $(SCI2CDIR)/*.c -o $(EXEFILE)
+ @echo " "
+ @echo "=============="
+ @echo "Executing code"
+ @echo "=============="
+ $(EXEFILE)
+
+clean:
+ @echo " "
+ @echo "============================="
+ @echo "Removing only exe + obj files"
+ @echo "============================="
+ rm -rf $(EXEFILE)
+ rm -rf $(objects)
+ @echo " "
+
+cleanexe:
+ @echo " "
+ @echo "=========================="
+ @echo "Removing only the exe file"
+ @echo "=========================="
+ rm -rf $(EXEFILE)
+ @echo " "
+
+$(OBJDIR)/doubleComplex.o: $(CSRCDIR)/doubleComplex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/doubleComplex.c -o $(OBJDIR)/doubleComplex.o
+
+$(OBJDIR)/floatComplex.o: $(CSRCDIR)/floatComplex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/floatComplex.c -o $(OBJDIR)/floatComplex.o
+
+$(OBJDIR)/RealToComplex.o: $(CSRCDIR)/RealToComplex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/RealToComplex.c -o $(OBJDIR)/RealToComplex.o
+
+$(OBJDIR)/conj.o: $(CSRCDIR)/conj.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/conj.c -o $(OBJDIR)/conj.o
+
+$(OBJDIR)/disp.o: $(CSRCDIR)/disp.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/disp.c -o $(OBJDIR)/disp.o
+
+$(OBJDIR)/zeros.o: $(CSRCDIR)/zeros.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/zeros.c -o $(OBJDIR)/zeros.o
+
+$(OBJDIR)/ones.o: $(CSRCDIR)/ones.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/ones.c -o $(OBJDIR)/ones.o
+
+$(OBJDIR)/OpApex.o: $(CSRCDIR)/OpApex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpApex.c -o $(OBJDIR)/OpApex.o
+
+$(OBJDIR)/OpColon.o: $(CSRCDIR)/OpColon.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpColon.c -o $(OBJDIR)/OpColon.o
+
+$(OBJDIR)/OpDotStar.o: $(CSRCDIR)/OpDotStar.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpDotStar.c -o $(OBJDIR)/OpDotStar.o
+
+$(OBJDIR)/OpDotHat.o: $(CSRCDIR)/OpDotHat.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpDotHat.c -o $(OBJDIR)/OpDotHat.o
+
+$(OBJDIR)/OpDotSlash.o: $(CSRCDIR)/OpDotSlash.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpDotSlash.c -o $(OBJDIR)/OpDotSlash.o
+
+$(OBJDIR)/OpEqual.o: $(CSRCDIR)/OpEqual.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpEqual.c -o $(OBJDIR)/OpEqual.o
+
+$(OBJDIR)/OpPlus.o: $(CSRCDIR)/OpPlus.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpPlus.c -o $(OBJDIR)/OpPlus.o
+
+$(OBJDIR)/OpMinus.o: $(CSRCDIR)/OpMinus.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpMinus.c -o $(OBJDIR)/OpMinus.o
+
+$(OBJDIR)/OpStar.o: $(CSRCDIR)/OpStar.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpStar.c -o $(OBJDIR)/OpStar.o
+
+$(OBJDIR)/OpIns.o: $(CSRCDIR)/OpIns.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpIns.c -o $(OBJDIR)/OpIns.o
+
+$(OBJDIR)/OpExt.o: $(CSRCDIR)/OpExt.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpExt.c -o $(OBJDIR)/OpExt.o
+
+$(OBJDIR)/OpRc.o: $(CSRCDIR)/OpRc.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpRc.c -o $(OBJDIR)/OpRc.o
+
+$(OBJDIR)/OpCc.o: $(CSRCDIR)/OpCc.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpCc.c -o $(OBJDIR)/OpCc.o
+
+$(OBJDIR)/cos.o: $(CSRCDIR)/cos.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/cos.c -o $(OBJDIR)/cos.o
+
+$(OBJDIR)/cosh.o: $(CSRCDIR)/cosh.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/cosh.c -o $(OBJDIR)/cosh.o
+
+$(OBJDIR)/sin.o: $(CSRCDIR)/sin.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/sin.c -o $(OBJDIR)/sin.o
+
+$(OBJDIR)/sinh.o: $(CSRCDIR)/sinh.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/sinh.c -o $(OBJDIR)/sinh.o
+
+$(OBJDIR)/FileManagement.o: $(CSRCDIR)/FileManagement.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/FileManagement.c -o $(OBJDIR)/FileManagement.o
+
+$(OBJDIR)/OpLogLt.o: $(CSRCDIR)/OpLogLt.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogLt.c -o $(OBJDIR)/OpLogLt.o
+
+$(OBJDIR)/OpLogGt.o: $(CSRCDIR)/OpLogGt.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogGt.c -o $(OBJDIR)/OpLogGt.o
+
+$(OBJDIR)/OpLogLe.o: $(CSRCDIR)/OpLogLe.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogLe.c -o $(OBJDIR)/OpLogLe.o
+
+$(OBJDIR)/OpLogGe.o: $(CSRCDIR)/OpLogGe.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogGe.c -o $(OBJDIR)/OpLogGe.o
+
+$(OBJDIR)/OpLogEq.o: $(CSRCDIR)/OpLogEq.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogEq.c -o $(OBJDIR)/OpLogEq.o
+
+$(OBJDIR)/Find.o: $(CSRCDIR)/Find.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/Find.c -o $(OBJDIR)/Find.o
+
+$(OBJDIR)/ConvertPrecision.o: $(CSRCDIR)/ConvertPrecision.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/ConvertPrecision.c -o $(OBJDIR)/ConvertPrecision.o
+
+$(OBJDIR)/SCI2Cfft.o: $(CSRCDIR)/SCI2Cfft.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/SCI2Cfft.c -o $(OBJDIR)/SCI2Cfft.o
+
+$(OBJDIR)/SCI2Cconvol.o: $(CSRCDIR)/SCI2Cconvol.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/SCI2Cconvol.c -o $(OBJDIR)/SCI2Cconvol.o
+
+$(OBJDIR)/sqrt.o: $(CSRCELEMFUNDIR)/sqrt/*sqrt*.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCELEMFUNDIR)/sqrt/*sqrt*.c -o $(OBJDIR)/sqrt.o
+
+$(OBJDIR)/ssqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/ssqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/ssqrts.c -o $(OBJDIR)/ssqrts.o
+
+$(OBJDIR)/dsqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/dsqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/dsqrts.c -o $(OBJDIR)/dsqrts.o
+
+$(OBJDIR)/csqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/csqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/csqrts.c -o $(OBJDIR)/csqrts.o
+
+$(OBJDIR)/zsqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/zsqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/zsqrts.c -o $(OBJDIR)/zsqrts.o
+
+$(OBJDIR)/ssqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/ssqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/ssqrta.c -o $(OBJDIR)/ssqrta.o
+
+$(OBJDIR)/dsqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/dsqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/dsqrta.c -o $(OBJDIR)/dsqrta.o
+
+$(OBJDIR)/csqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/csqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/csqrta.c -o $(OBJDIR)/csqrta.o
+
+$(OBJDIR)/zsqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/zsqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/zsqrta.c -o $(OBJDIR)/zsqrta.o
diff --git a/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp1 b/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp1 new file mode 100644 index 00000000..65184df1 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp1 @@ -0,0 +1,230 @@ +
+# --- C COMPILER ---
+CC = gcc
+CFLAGS = -Wall -pedantic -O3 -I $(HSRCDIR)
+# ---------------------------
+# --- END USER PARAMETERS ---
+# ---------------------------
+
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# DON'T TOUCH ANYTHING BELOW THIS LINE
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+
+ELEMENTARY_FUNCTIONS_DIR = $(CSRCDIR)/src/elementaryFunctions
+CFLAGS_ELEMENTARY_FUNCTIONS = -I $(ELEMENTARY_FUNCTIONS_DIR)/includes -I $(ELEMENTARY_FUNCTIONS_DIR)/interfaces
+
+
+EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)
+
+objects = \
+ $(OBJDIR)/doubleComplex.o \
+ $(OBJDIR)/floatComplex.o \
+ $(OBJDIR)/RealToComplex.o \
+ $(OBJDIR)/conj.o \
+ $(OBJDIR)/disp.o \
+ $(OBJDIR)/ones.o \
+ $(OBJDIR)/zeros.o \
+ $(OBJDIR)/OpApex.o \
+ $(OBJDIR)/OpColon.o \
+ $(OBJDIR)/OpDotStar.o \
+ $(OBJDIR)/OpDotHat.o \
+ $(OBJDIR)/OpDotSlash.o \
+ $(OBJDIR)/OpEqual.o \
+ $(OBJDIR)/OpPlus.o \
+ $(OBJDIR)/OpMinus.o \
+ $(OBJDIR)/OpStar.o \
+ $(OBJDIR)/OpIns.o \
+ $(OBJDIR)/OpExt.o \
+ $(OBJDIR)/OpRc.o \
+ $(OBJDIR)/OpCc.o \
+ $(OBJDIR)/cos.o \
+ $(OBJDIR)/cosh.o \
+ $(OBJDIR)/sin.o \
+ $(OBJDIR)/sinh.o \
+ $(OBJDIR)/FileManagement.o \
+ $(OBJDIR)/OpLogLt.o \
+ $(OBJDIR)/OpLogGt.o \
+ $(OBJDIR)/OpLogGe.o \
+ $(OBJDIR)/OpLogLe.o \
+ $(OBJDIR)/OpLogEq.o \
+ $(OBJDIR)/Find.o \
+ $(OBJDIR)/ConvertPrecision.o \
+ $(OBJDIR)/SCI2Cfft.o \
+ $(OBJDIR)/SCI2Cconvol.o \
+ $(OBJDIR)/ssqrts.o \
+ $(OBJDIR)/dsqrts.o \
+ $(OBJDIR)/csqrts.o \
+ $(OBJDIR)/zsqrts.o \
+ $(OBJDIR)/ssqrta.o \
+ $(OBJDIR)/dsqrta.o \
+ $(OBJDIR)/csqrta.o \
+ $(OBJDIR)/zsqrta.o
+
+# ---------------
+# --- TARGETS ---
+# ---------------
+compileexecute: $(objects)
+ @echo " "
+ @echo "============================"
+ @echo "Generation of the executable"
+ @echo "============================"
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) $(objects) $(SCI2CDIR)/*.c -o $(EXEFILE)
+ @echo " "
+ @echo "=============="
+ @echo "Executing code"
+ @echo "=============="
+ $(EXEFILE)
+
+clean:
+ @echo " "
+ @echo "============================="
+ @echo "Removing only exe + obj files"
+ @echo "============================="
+ rm -rf $(EXEFILE)
+ rm -rf $(objects)
+ @echo " "
+
+cleanexe:
+ @echo " "
+ @echo "=========================="
+ @echo "Removing only the exe file"
+ @echo "=========================="
+ rm -rf $(EXEFILE)
+ @echo " "
+
+$(OBJDIR)/doubleComplex.o: $(CSRCDIR)/doubleComplex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/doubleComplex.c -o $(OBJDIR)/doubleComplex.o
+
+$(OBJDIR)/floatComplex.o: $(CSRCDIR)/floatComplex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/floatComplex.c -o $(OBJDIR)/floatComplex.o
+
+$(OBJDIR)/RealToComplex.o: $(CSRCDIR)/RealToComplex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/RealToComplex.c -o $(OBJDIR)/RealToComplex.o
+
+$(OBJDIR)/conj.o: $(CSRCDIR)/conj.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/conj.c -o $(OBJDIR)/conj.o
+
+$(OBJDIR)/disp.o: $(CSRCDIR)/disp.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/disp.c -o $(OBJDIR)/disp.o
+
+$(OBJDIR)/zeros.o: $(CSRCDIR)/zeros.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/zeros.c -o $(OBJDIR)/zeros.o
+
+$(OBJDIR)/ones.o: $(CSRCDIR)/ones.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/ones.c -o $(OBJDIR)/ones.o
+
+$(OBJDIR)/OpApex.o: $(CSRCDIR)/OpApex.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpApex.c -o $(OBJDIR)/OpApex.o
+
+$(OBJDIR)/OpColon.o: $(CSRCDIR)/OpColon.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpColon.c -o $(OBJDIR)/OpColon.o
+
+$(OBJDIR)/OpDotStar.o: $(CSRCDIR)/OpDotStar.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpDotStar.c -o $(OBJDIR)/OpDotStar.o
+
+$(OBJDIR)/OpDotHat.o: $(CSRCDIR)/OpDotHat.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpDotHat.c -o $(OBJDIR)/OpDotHat.o
+
+$(OBJDIR)/OpDotSlash.o: $(CSRCDIR)/OpDotSlash.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpDotSlash.c -o $(OBJDIR)/OpDotSlash.o
+
+$(OBJDIR)/OpEqual.o: $(CSRCDIR)/OpEqual.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpEqual.c -o $(OBJDIR)/OpEqual.o
+
+$(OBJDIR)/OpPlus.o: $(CSRCDIR)/OpPlus.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpPlus.c -o $(OBJDIR)/OpPlus.o
+
+$(OBJDIR)/OpMinus.o: $(CSRCDIR)/OpMinus.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpMinus.c -o $(OBJDIR)/OpMinus.o
+
+$(OBJDIR)/OpStar.o: $(CSRCDIR)/OpStar.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpStar.c -o $(OBJDIR)/OpStar.o
+
+$(OBJDIR)/OpIns.o: $(CSRCDIR)/OpIns.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpIns.c -o $(OBJDIR)/OpIns.o
+
+$(OBJDIR)/OpExt.o: $(CSRCDIR)/OpExt.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpExt.c -o $(OBJDIR)/OpExt.o
+
+$(OBJDIR)/OpRc.o: $(CSRCDIR)/OpRc.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpRc.c -o $(OBJDIR)/OpRc.o
+
+$(OBJDIR)/OpCc.o: $(CSRCDIR)/OpCc.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpCc.c -o $(OBJDIR)/OpCc.o
+
+$(OBJDIR)/cos.o: $(CSRCDIR)/cos.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/cos.c -o $(OBJDIR)/cos.o
+
+$(OBJDIR)/cosh.o: $(CSRCDIR)/cosh.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/cosh.c -o $(OBJDIR)/cosh.o
+
+$(OBJDIR)/sin.o: $(CSRCDIR)/sin.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/sin.c -o $(OBJDIR)/sin.o
+
+$(OBJDIR)/sinh.o: $(CSRCDIR)/sinh.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/sinh.c -o $(OBJDIR)/sinh.o
+
+$(OBJDIR)/FileManagement.o: $(CSRCDIR)/FileManagement.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/FileManagement.c -o $(OBJDIR)/FileManagement.o
+
+$(OBJDIR)/OpLogLt.o: $(CSRCDIR)/OpLogLt.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogLt.c -o $(OBJDIR)/OpLogLt.o
+
+$(OBJDIR)/OpLogGt.o: $(CSRCDIR)/OpLogGt.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogGt.c -o $(OBJDIR)/OpLogGt.o
+
+$(OBJDIR)/OpLogLe.o: $(CSRCDIR)/OpLogLe.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogLe.c -o $(OBJDIR)/OpLogLe.o
+
+$(OBJDIR)/OpLogGe.o: $(CSRCDIR)/OpLogGe.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogGe.c -o $(OBJDIR)/OpLogGe.o
+
+$(OBJDIR)/OpLogEq.o: $(CSRCDIR)/OpLogEq.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/OpLogEq.c -o $(OBJDIR)/OpLogEq.o
+
+$(OBJDIR)/Find.o: $(CSRCDIR)/Find.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/Find.c -o $(OBJDIR)/Find.o
+
+$(OBJDIR)/ConvertPrecision.o: $(CSRCDIR)/ConvertPrecision.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/ConvertPrecision.c -o $(OBJDIR)/ConvertPrecision.o
+
+$(OBJDIR)/SCI2Cfft.o: $(CSRCDIR)/SCI2Cfft.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/SCI2Cfft.c -o $(OBJDIR)/SCI2Cfft.o
+
+$(OBJDIR)/SCI2Cconvol.o: $(CSRCDIR)/SCI2Cconvol.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCDIR)/SCI2Cconvol.c -o $(OBJDIR)/SCI2Cconvol.o
+
+$(OBJDIR)/sqrt.o: $(CSRCELEMFUNDIR)/sqrt/*sqrt*.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) -c $(CSRCELEMFUNDIR)/sqrt/*sqrt*.c -o $(OBJDIR)/sqrt.o
+
+$(OBJDIR)/ssqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/ssqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/ssqrts.c -o $(OBJDIR)/ssqrts.o
+
+$(OBJDIR)/dsqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/dsqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/dsqrts.c -o $(OBJDIR)/dsqrts.o
+
+$(OBJDIR)/csqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/csqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/csqrts.c -o $(OBJDIR)/csqrts.o
+
+$(OBJDIR)/zsqrts.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/zsqrts.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/zsqrts.c -o $(OBJDIR)/zsqrts.o
+
+$(OBJDIR)/ssqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/ssqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/ssqrta.c -o $(OBJDIR)/ssqrta.o
+
+$(OBJDIR)/dsqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/dsqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/dsqrta.c -o $(OBJDIR)/dsqrta.o
+
+$(OBJDIR)/csqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/csqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/csqrta.c -o $(OBJDIR)/csqrta.o
+
+$(OBJDIR)/zsqrta.o: $(CSRCDIR)/src/elementaryFunctions/sqrt/zsqrta.c $(HSRCDIR)/*.h
+ $(CC) $(CFLAGS) $(CFLAGS_ELEMENTARY_FUNCTIONS) -c $(ELEMENTARY_FUNCTIONS_DIR)/sqrt/zsqrta.c -o $(OBJDIR)/zsqrta.o
diff --git a/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp2 b/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp2 new file mode 100644 index 00000000..c6ba2a9c --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/SCI2CMakefileTemplate.bkp2 @@ -0,0 +1,126 @@ +
+# --- C COMPILER ---
+CC = gcc
+CFLAGS = -Wall -pedantic -O3 -I $(HSRCDIR) -I $(ISRCDIR)
+# ---------------------------
+# --- END USER PARAMETERS ---
+# ---------------------------
+
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# DON'T TOUCH ANYTHING BELOW THIS LINE
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+# ------------------------------------
+
+EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)
+
+SWSRCS = \
+ $(CSRCDIR)/doubleComplex.c \
+ $(CSRCDIR)/floatComplex.c \
+ $(CSRCDIR)/RealToComplex.c \
+ $(CSRCDIR)/conj.c \
+ $(CSRCDIR)/disp.c \
+ $(CSRCDIR)/ones.c \
+ $(CSRCDIR)/zeros.c \
+ $(CSRCDIR)/OpApex.c \
+ $(CSRCDIR)/OpColon.c \
+ $(CSRCDIR)/OpDotStar.c \
+ $(CSRCDIR)/OpDotHat.c \
+ $(CSRCDIR)/OpDotSlash.c \
+ $(CSRCDIR)/OpEqual.c \
+ $(CSRCDIR)/OpPlus.c \
+ $(CSRCDIR)/OpMinus.c \
+ $(CSRCDIR)/OpStar.c \
+ $(CSRCDIR)/OpIns.c \
+ $(CSRCDIR)/OpExt.c \
+ $(CSRCDIR)/OpRc.c \
+ $(CSRCDIR)/OpCc.c \
+ $(CSRCDIR)/cos.c \
+ $(CSRCDIR)/cosh.c \
+ $(CSRCDIR)/sin.c \
+ $(CSRCDIR)/sinh.c \
+ $(CSRCDIR)/FileManagement.c \
+ $(CSRCDIR)/OpLogLt.c \
+ $(CSRCDIR)/OpLogGt.c \
+ $(CSRCDIR)/OpLogGe.c \
+ $(CSRCDIR)/OpLogLe.c \
+ $(CSRCDIR)/OpLogEq.c \
+ $(CSRCDIR)/OpLogOr.c \
+ $(CSRCDIR)/OpLogAnd.c \
+ $(CSRCDIR)/Find.c \
+ $(CSRCDIR)/ConvertPrecision.c \
+ $(CSRCDIR)/SCI2Cfft.c \
+ $(CSRCDIR)/SCI2Cconvol.c \
+ $(CSRCDIR)/ssqrts.c \
+ $(CSRCDIR)/dsqrts.c \
+ $(CSRCDIR)/csqrts.c \
+ $(CSRCDIR)/zsqrts.c \
+ $(CSRCDIR)/ssqrta.c \
+ $(CSRCDIR)/dsqrta.c \
+ $(CSRCDIR)/csqrta.c \
+ $(CSRCDIR)/zsqrta.c \
+ $(CSRCDIR)/sabss.c \ + $(CSRCDIR)/dabss.c \ + $(CSRCDIR)/cabss.c \ + $(CSRCDIR)/zabss.c \ + $(CSRCDIR)/sabsa.c \ + $(CSRCDIR)/dabsa.c \ + $(CSRCDIR)/cabsa.c \ + $(CSRCDIR)/zabsa.c \ + $(CSRCDIR)/sexps.c \ + $(CSRCDIR)/dexps.c \ + $(CSRCDIR)/cexps.c \ + $(CSRCDIR)/zexps.c \ + $(CSRCDIR)/sexpa.c \ + $(CSRCDIR)/dexpa.c \ + $(CSRCDIR)/cexpa.c \ + $(CSRCDIR)/zexpa.c +
+SWOBJS = $(SWSRCS:.c=.o) +
+# ---------------
+# --- TARGETS ---
+# ---------------
+compileexecute: $(SWOBJS)
+ @echo " "
+ @echo "============================"
+ @echo "Generation of the executable"
+ @echo "============================"
+ $(CC) $(CFLAGS) $(SWOBJS) $(SCI2CDIR)/*.c -o $(EXEFILE)
+ @echo " "
+ @echo "=============="
+ @echo "Executing code"
+ @echo "=============="
+ $(EXEFILE)
+
+clean:
+ @echo " "
+ @echo "============================="
+ @echo "Removing only exe + obj files"
+ @echo "============================="
+ rm -rf $(EXEFILE)
+ rm -rf $(SWOBJS)
+ @echo " "
+
+cleanexe:
+ @echo " "
+ @echo "=========================="
+ @echo "Removing only the exe file"
+ @echo "=========================="
+ rm -rf $(EXEFILE)
+ @echo " "
+
+# how to compile object code .o from C source files .c (general rule) +# space between -o and filename for SUN make +.c.o: + $(CC) $(CFLAGS) -c -o $(@) $<
+
+# Make object code from source +swobjs: $(SWOBJS) +
diff --git a/2.3-1/macros/CCodeGeneration/Sci2AnnotationFile.sci b/2.3-1/macros/CCodeGeneration/Sci2AnnotationFile.sci new file mode 100644 index 00000000..001ed250 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/Sci2AnnotationFile.sci @@ -0,0 +1,55 @@ +function Sci2AnnotationFile(SciFileName,ClsFileName,AnnFileName,AnnSpecifier,ReportFileName) +// function Sci2AnnotationFile(SciFileName,ClsFileName,AnnFileName,AnnSpecifier,ReportFileName) +// -------------------------------------------------------------------------------- +// #RNU_RES_B +// This function reads the .sci input file and generates the correspondig .ann +// and .acls files. +// #RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 25-Jun-2007 -- Nutricato Raffaele: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),5,5); + +[tmppath,tmpfunname,tmpext] = fileparts(SciFileName); + +// --------------------------------------- +// --- Open the .sci file (read only). --- +// --------------------------------------- +inscifid = SCI2COpenFileRead(SciFileName); + +// ---------------------------------------------- +// --- Loop over the lines of the input file. --- +// ---------------------------------------------- +line_position = 0; +L_AnnSpecifierP1 = length(AnnSpecifier)+1; +while (meof(inscifid) == 0) + check_string = stripblanks(mgetl(inscifid,1)); + line_position = line_position + 1; + L_string = length(check_string); + if (L_string >= 1) + if (SCI2Cstrncmps1size(AnnSpecifier,check_string)) + tmpannotation = stripblanks(part(check_string,L_AnnSpecifierP1:L_string)); + PrintStringInfo(tmpannotation,ClsFileName,'file','y'); + end + end +end +mclose(inscifid); +// -------------------------------------------------- +// --- End loop over the lines of the input file. --- +// -------------------------------------------------- +PrintStringInfo('CLASS: '+tmpfunname,AnnFileName,'file','y'); +endfunction diff --git a/2.3-1/macros/CCodeGeneration/buildmacros.sce b/2.3-1/macros/CCodeGeneration/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/CCodeGeneration/lib b/2.3-1/macros/CCodeGeneration/lib Binary files differnew file mode 100644 index 00000000..8316c669 --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/lib diff --git a/2.3-1/macros/CCodeGeneration/names b/2.3-1/macros/CCodeGeneration/names new file mode 100644 index 00000000..5311c7fd --- /dev/null +++ b/2.3-1/macros/CCodeGeneration/names @@ -0,0 +1,24 @@ +C_FinalizeCode +C_ForExpression +C_Funcall +C_GenDeclarations +C_GenerateFunName +C_GenerateLaunchScript +C_GenerateMakefile +C_GenerateMakefile_msvc +C_GenerateMkfle_arduino +C_GenerateSCI2CHeader +C_IfElseBlocks +C_IfExpression +C_IndentBlanks +C_InitHeader +C_MemAllocOutTempVars +C_SCI2CHeader +C_Type +C_WhileExpression +GenCFunDatFiles +GetClsFileName +GetSymbolDimension +GetWhileCondVariable +JoinDeclarAndCcode +Sci2AnnotationFile diff --git a/2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c b/2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c new file mode 100644 index 00000000..ee3ecc3a --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/ConvertPrecision.c @@ -0,0 +1,41 @@ +/* +** -*- C -*- +** +** ConvertPrecision.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** Copyright Raffaele Nutricato 2008 +*/ + + +double s0doubled0(float in) +{ + double out; + out = (double) in; + return (out); +} + +void s2doubled2(float* in, int* inSize, double* out) +{ + int i; + for (i=0; i<inSize[0]*inSize[1]; i++) + { + out[i] = (double) in[i]; + } +} + +float d0floats0(double in) +{ + float out; + out = (float) in; + return (out); +} + +void d2floats2(double* in, int* inSize, float* out) +{ + int i; + for (i=0; i<inSize[0]*inSize[1]; i++) + { + out[i] = (float) in[i]; + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/FileManagement.c b/2.3-1/macros/CFiles/sci2ccode/FileManagement.c new file mode 100644 index 00000000..427b3551 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/FileManagement.c @@ -0,0 +1,12 @@ +/* +** -*- C -*- +** +** FileManagement.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Rubby Nutricato 2007 +*/ + +#include "FileManagement.h" + diff --git a/2.3-1/macros/CFiles/sci2ccode/OpEqual.c b/2.3-1/macros/CFiles/sci2ccode/OpEqual.c new file mode 100644 index 00000000..70f3d504 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpEqual.c @@ -0,0 +1,90 @@ +/* +** -*- C -*- +** +** OpEqual.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpEqual.h" + +float sOpEquals1(float x) +{ + return (x); +} + +double dOpEquals1(double x) +{ + return x; +} + +floatComplex c0OpEqualc0(floatComplex x) +{ + return x; +} + +doubleComplex z0OpEqualz0(doubleComplex x) +{ + return x; +} + +char g0OpEqualg0(char x) +{ + return x; +} + +void sOpEquala1(float* x, int size, float* y) +{ + int i = 0; + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void dOpEquala1(double* x, int size, double* y) +{ + int i = 0; + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void c2OpEqualc2(floatComplex* x, int* xSize, floatComplex* y) +{ + int i = 0; + int size; + size = xSize[0]*xSize[1]; + + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void z2OpEqualz2(doubleComplex* x, int* xSize, doubleComplex* y) +{ + int i = 0; + int size; + size = xSize[0]*xSize[1]; + + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} + +void g2OpEqualg2(char* x, int* xSize, char* y) +{ + int i = 0; + int size; + size = xSize[0]*xSize[1]; + + for (i = 0; i < size; ++i) + { + y[i] = x[i]; + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/OpExt.c b/2.3-1/macros/CFiles/sci2ccode/OpExt.c new file mode 100644 index 00000000..0b137b14 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpExt.c @@ -0,0 +1,11 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#include "OpExt.h" + diff --git a/2.3-1/macros/CFiles/sci2ccode/OpIns.c b/2.3-1/macros/CFiles/sci2ccode/OpIns.c new file mode 100644 index 00000000..df386894 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpIns.c @@ -0,0 +1,11 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#include "OpIns.h" + diff --git a/2.3-1/macros/CFiles/sci2ccode/OpLogAnd.c b/2.3-1/macros/CFiles/sci2ccode/OpLogAnd.c new file mode 100644 index 00000000..86deee72 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpLogAnd.c @@ -0,0 +1,38 @@ +/* +** -*- C -*- +** +** OpLogAnd.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogAnd.h" + +void s2s0OpLogAnds2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] && in2); + } + } +} + +void d2d0OpLogAndd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] && in2); + } + } +} + diff --git a/2.3-1/macros/CFiles/sci2ccode/OpLogGe.c b/2.3-1/macros/CFiles/sci2ccode/OpLogGe.c new file mode 100644 index 00000000..3664f2e1 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpLogGe.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogGe.h" + +void s2s0OpLogGes2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] >= in2); + } + } +} + +void d2d0OpLogGed2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] >= in2); + } + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/OpLogGt.c b/2.3-1/macros/CFiles/sci2ccode/OpLogGt.c new file mode 100644 index 00000000..25e4bd96 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpLogGt.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogGt.h" + +void s2s0OpLogGts2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] > in2); + } + } +} + +void d2d0OpLogGtd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] > in2); + } + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/OpLogLe.c b/2.3-1/macros/CFiles/sci2ccode/OpLogLe.c new file mode 100644 index 00000000..a1544489 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpLogLe.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogLe.h" + +void s2s0OpLogLes2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] <= in2); + } + } +} + +void d2d0OpLogLed2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] <= in2); + } + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/OpLogLt.c b/2.3-1/macros/CFiles/sci2ccode/OpLogLt.c new file mode 100644 index 00000000..a7e6d774 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpLogLt.c @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogLt.h" + +void s2s0OpLogLts2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] < in2); + } + } +} + +void d2d0OpLogLtd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] < in2); + } + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/OpLogOr.c b/2.3-1/macros/CFiles/sci2ccode/OpLogOr.c new file mode 100644 index 00000000..eb553b33 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/OpLogOr.c @@ -0,0 +1,38 @@ +/* +** -*- C -*- +** +** OpLogOr.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "OpLogOr.h" + +void s2s0OpLogOrs2(float* in1, int* in1Size, float in2, float* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (float) (in1[rows*in1Size[1]+cols] || in2); + } + } +} + +void d2d0OpLogOrd2(double* in1, int* in1Size, double in2, double* out) +{ + int rows = 0; + int cols = 0; + for (rows = 0; rows < in1Size[0];rows++) + { + for (cols = 0; cols < in1Size[1];cols++) + { + out[rows*in1Size[1]+cols] = (double) (in1[rows*in1Size[1]+cols] || in2); + } + } +} + diff --git a/2.3-1/macros/CFiles/sci2ccode/RealToComplex.c b/2.3-1/macros/CFiles/sci2ccode/RealToComplex.c new file mode 100644 index 00000000..dd7b5ecf --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/RealToComplex.c @@ -0,0 +1,134 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#include "RealToComplex.h" + +floatComplex s0floatcomplexc0(float in) +{ + floatComplex out; + out = FloatComplex(in,0); + return out; +} + +floatComplex d0floatcomplexc0(double in) +{ + floatComplex out; + out = FloatComplex(in,0); + return out; +} + +floatComplex c0floatcomplexc0(floatComplex in) +{ + return in; +} + +floatComplex z0floatcomplexc0(doubleComplex in) +{ + floatComplex out; + out = FloatComplex((float)zreals(in),(float)zimags(in)); + return out; +} + +void s2floatcomplexc2(float* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = s0floatcomplexc0(in[i]); + } +} + +void d2floatcomplexc2(double* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = d0floatcomplexc0(in[i]); + } +} + +void c2floatcomplexc2(floatComplex* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = c0floatcomplexc0(in[i]); + } +} + +void z2floatcomplexc2(doubleComplex* in, int* inSize, floatComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = z0floatcomplexc0(in[i]); + } +} + +doubleComplex s0doublecomplexz0(float in) +{ + doubleComplex out; + out = DoubleComplex((double)(in),0); + return out; +} + +doubleComplex d0doublecomplexz0(double in) +{ + doubleComplex out; + out = DoubleComplex(in,0); + return out; +} + +doubleComplex c0doublecomplexz0(floatComplex in) +{ + doubleComplex out; + out = DoubleComplex((double) creals(in),(double) cimags(in)); + return out; +} + +doubleComplex z0doublecomplexz0(doubleComplex in) +{ + return in; +} + +void s2doublecomplexz2(float* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = s0doublecomplexz0(in[i]); + } +} + +void d2doublecomplexz2(double* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = d0doublecomplexz0(in[i]); + } +} + +void c2doublecomplexz2(floatComplex* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = c0doublecomplexz0(in[i]); + } +} + +void z2doublecomplexz2(doubleComplex* in, int* inSize, doubleComplex* out) +{ + int i = 0; + for (i=0;i<inSize[0]*inSize[1];i++) + { + out[i] = z0doublecomplexz0(in[i]); + } +} diff --git a/2.3-1/macros/CFiles/sci2ccode/SCI2Cconvol.c b/2.3-1/macros/CFiles/sci2ccode/SCI2Cconvol.c new file mode 100644 index 00000000..989cb9de --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/SCI2Cconvol.c @@ -0,0 +1,2 @@ +#include "SCI2Cconvol.h" +
diff --git a/2.3-1/macros/CFiles/sci2ccode/SCI2Cfft.c b/2.3-1/macros/CFiles/sci2ccode/SCI2Cfft.c new file mode 100644 index 00000000..9cced2e1 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2ccode/SCI2Cfft.c @@ -0,0 +1,13 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#include "SCI2Cfft.h" + + diff --git a/2.3-1/macros/CFiles/sci2cincludes/ConvertPrecision.h b/2.3-1/macros/CFiles/sci2cincludes/ConvertPrecision.h new file mode 100644 index 00000000..0546432d --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/ConvertPrecision.h @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** ConvertPrecision.h +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** Copyright Raffaele Nutricato 2008 +*/ + +#ifndef __ConvertPrecision_H__ +#define __ConvertPrecision_H__ + + +double s0doubled0(float in); +void s2doubled2(float* in, int* inSize, double* out); +float d0floats0(double in); +void d2floats2(double* in, int* inSize, float* out); +#endif /* !__ConvertPrecision_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/FileManagement.h b/2.3-1/macros/CFiles/sci2cincludes/FileManagement.h new file mode 100644 index 00000000..937a66ef --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/FileManagement.h @@ -0,0 +1,13 @@ +/* +** -*- C -*- +** +** FileManagement.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Rubby Nutricato 2007 +** 31-dec-2007 +*/ + +#include <stdio.h> +#include <stdlib.h> diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpEqual.h b/2.3-1/macros/CFiles/sci2cincludes/OpEqual.h new file mode 100644 index 00000000..da36059a --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpEqual.h @@ -0,0 +1,33 @@ +/* +** -*- C -*- +** +** OpEqual.h +** Made by Raffaele Nutricato +** +** +*/ + +#ifndef __OPEQUAL_H__ +#define __OPEQUAL_H__ + +#include <string.h> +#include "floatComplex.h" +#include "doubleComplex.h" + +/* +** Compute Opequal for different types . +*/ + +float sOpEquals1(float x); +double dOpEquals1(double x); +floatComplex c0OpEqualc0(floatComplex x); +doubleComplex z0OpEqualz0(doubleComplex x); +char g0OpEqualg0(char x); + +void sOpEquala1(float* x, int size, float* y); +void dOpEquala1(double* x, int size, double* y); +void c2OpEqualc2(floatComplex* x, int* xSize, floatComplex* y); +void z2OpEqualz2(doubleComplex* x, int* xSize, doubleComplex* y); +void g2OpEqualg2(char* x, int* xSize, char* y); + +#endif /* !__OPEQUAL_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpExt.h b/2.3-1/macros/CFiles/sci2cincludes/OpExt.h new file mode 100644 index 00000000..7d8a77f7 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpExt.h @@ -0,0 +1,108 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +/* + Modify by Arnaud Torset : 20/02/09 +*/ + +#ifndef __OPEXT_H__ +#define __OPEXT_H__ + +#define s2s0OpExts0(in1,size,in2) in1[in2-1]; +#define d2d0OpExtd0(in1,size,in2) in1[in2-1]; +#define c2s0OpExtc0(in1,size,in2) in1[in2-1]; +#define z2d0OpExtz0(in1,size,in2) in1[in2-1]; + + +#define s2s0s0OpExts0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; +#define d2d0d0OpExtd0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; +#define c2s0s0OpExtc0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; +#define z2d0d0OpExtz0(in1,size,row,col) in1[(col-1)*size[0]+row-1]; + + +#define s2s2OpExts2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];\ + } + +#define d2d2OpExtd2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];\ + } + +#define c2s2OpExtc2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1;i++]) out[i]=in1[(int)in2[i]-1];\ + } + +#define z2d2OpExtz2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];\ + } + + + +#define s2s2s0OpExts2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=s2s0s0OpExts0(in1,size1,(int)rows[i],col);\ + } + +#define d2d2d0OpExtd2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=d2d0d0OpExtd0(in1,size1,(int)rows[i],col);\ + } + +#define c2s2s0OpExtc2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=c2s0s0OpExtc0(in1,size1,(int)rows[i],col);\ + } + +#define z2d2d0OpExtz2(in1,size1,rows,size2,col,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=z2d0d0OpExtz0(in1,size1,(int)rows[i],col);\ + } + +#define s2s0s2OpExts2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=s2s0s0OpExts0(in1,size1,row,(int)cols[i]);\ + } + +#define d2d0d2OpExtd2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=d2d0d0OpExtd0(in1,size1,row,(int)cols[i]);\ + } + +#define c2s0s2OpExtc2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=c2s0s0OpExtc0(in1,size1,row,(int)cols[i]);\ + } + +#define z2d0d2OpExtz2(in1,size1,row,cols,size2,out) {int i;\ + for (i=0;i<size2[0]*size2[1];i++) out[i]=z2d0d0OpExtz0(in1,size1,row,(int)cols[i]);\ + } + + +#define s2s2s2OpExts2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + +#define d2d2d2OpExtd2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + +#define c2s2s2OpExtc2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + +#define z2d2d2OpExtz2(in1,size1,rows,size2,cols,size3,out) {int i,j;\ + for (i=0;i<size2[0]*size2[1];i++) \ + for (j=0;j<size3[0]*size3[1];j++) \ + out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];\ + } + + + + + +#endif /* !__OPEXT_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpLogAnd.h b/2.3-1/macros/CFiles/sci2cincludes/OpLogAnd.h new file mode 100644 index 00000000..8d61a59c --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpLogAnd.h @@ -0,0 +1,23 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#ifndef __OPLOGAND_H__ +#define __OPLOGAND_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +#define s0s0OpLogAnds0(in1,in2) \
+ (float) (in1 && in2) +void s2s0OpLogAnds2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogAndd0(in1,in2) \
+ (double) (in1 && in2) +void d2d0OpLogAndd2(double* in1, int* in1Size, double in2, double* out); +#endif /* !__OPLOGAND_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpLogGe.h b/2.3-1/macros/CFiles/sci2cincludes/OpLogGe.h new file mode 100644 index 00000000..ddc9631f --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpLogGe.h @@ -0,0 +1,36 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Started on Tue Dec 5 15:49:18 2006 jofret +** Last update Mon Oct 22 10:01:54 2007 bruno +** +** Copyright INRIA 2006 +*/ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ +#ifndef __OPLOGGE_H__ +#define __OPLOGGE_H__ + + +#define s0s0OpLogGes0(in1,in2) \
+ (float) (in1 >= in2) +void s2s0OpLogGes2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogGed0(in1,in2) \
+ (double) (in1 >= in2) +void d2d0OpLogGed2(double* in1, int* in1Size, double in2, double* out); + +/* we must have size1=size2 */ + +#define s2s2OpLogGes2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = s0s0OpLogGes0(in1[i],in2[i]);\ + } +#define d2d2OpLogGed2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = d0d0OpLogGed0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLE_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpLogLe.h b/2.3-1/macros/CFiles/sci2cincludes/OpLogLe.h new file mode 100644 index 00000000..7bc0c3af --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpLogLe.h @@ -0,0 +1,37 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Started on Tue Dec 5 15:49:18 2006 jofret +** Last update Mon Oct 22 10:01:54 2007 bruno +** +** Copyright INRIA 2006 +*/ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ + +#ifndef __OPLOGLE_H__ +#define __OPLOGLE_H__ + + +#define s0s0OpLogLes0(in1,in2) \
+ (float) (in1 <= in2) +void s2s0OpLogLes2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogLed0(in1,in2) \
+ (double) (in1 <= in2) +void d2d0OpLogLed2(double* in1, int* in1Size, double in2, double* out); + +/* we must have size1=size2 */ + +#define s2s2OpLogLes2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = s0s0OpLogLes0(in1[i],in2[i]);\ + } +#define d2d2OpLogLed2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = d0d0OpLogLed0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLE_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpLogLt.h b/2.3-1/macros/CFiles/sci2cincludes/OpLogLt.h new file mode 100644 index 00000000..2962f151 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpLogLt.h @@ -0,0 +1,35 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Started on Tue Dec 5 15:49:18 2006 jofret +** Last update Mon Oct 22 10:01:54 2007 bruno +** +** Copyright INRIA 2006 +*/ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ +#ifndef __OPLOGLT_H__ +#define __OPLOGLT_H__ + +#define s0s0OpLogLts0(in1,in2) \
+ (float) (in1 < in2) +void s2s0OpLogLts2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogLtd0(in1,in2) \
+ (double) (in1 < in2) +void d2d0OpLogLtd2(double* in1, int* in1Size, double in2, double* out); + +/* we must have size1=size2 */ + +#define s2s2OpLogLts2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = s0s0OpLogLts0(in1[i],in2[i]);\ + } +#define d2d2OpLogLtd2(in1,size1,in2,size2,out) {int i;\ + for (i=0;i<size1[0]*size2[1]) out[i] = d0d0OpLogLtd0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLT_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/OpLogOr.h b/2.3-1/macros/CFiles/sci2cincludes/OpLogOr.h new file mode 100644 index 00000000..331cae78 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/OpLogOr.h @@ -0,0 +1,23 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#ifndef __OPLOGOR_H__ +#define __OPLOGOR_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +#define s0s0OpLogOrs0(in1,in2) \
+ (float) (in1 || in2) +void s2s0OpLogOrs2(float* in1, int* in1Size, float in2, float* out); + +#define d0d0OpLogOrd0(in1,in2) \
+ (double) (in1 || in2) +void d2d0OpLogOrd2(double* in1, int* in1Size, double in2, double* out); +#endif /* !__OPLOGOR_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/RealToComplex.h b/2.3-1/macros/CFiles/sci2cincludes/RealToComplex.h new file mode 100644 index 00000000..6de98be2 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/RealToComplex.h @@ -0,0 +1,33 @@ +/* +** -*- C -*- +** +** +** Made by Raffaele.Nutricato@tiscali.it +** +** Copyright Raffaele Nutricato +*/ + +#ifndef __REALTOCOMPLEX_H__ +#define __REALTOCOMPLEX_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +floatComplex s0floatcomplexc0(float in); +floatComplex d0floatcomplexc0(double in); +floatComplex c0floatcomplexc0(floatComplex in); +floatComplex z0floatcomplexc0(doubleComplex in); +void s2floatcomplexc2(float* in, int* inSize, floatComplex* out); +void d2floatcomplexc2(double* in, int* inSize, floatComplex* out); +void c2floatcomplexc2(floatComplex* in, int* inSize, floatComplex* out); +void z2floatcomplexc2(doubleComplex* in, int* inSize, floatComplex* out); + +doubleComplex s0doublecomplexz0(float in); +doubleComplex d0doublecomplexz0(double in); +doubleComplex c0doublecomplexz0(floatComplex in); +doubleComplex z0doublecomplexz0(doubleComplex in); +void s2doublecomplexz2(float* in, int* inSize, doubleComplex* out); +void d2doublecomplexz2(double* in, int* inSize, doubleComplex* out); +void c2doublecomplexz2(floatComplex* in, int* inSize, doubleComplex* out); +void z2doublecomplexz2(doubleComplex* in, int* inSize, doubleComplex* out); +#endif /* !__REALTOCOMPLEX_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/SCI2CMacroInterface.h b/2.3-1/macros/CFiles/sci2cincludes/SCI2CMacroInterface.h new file mode 100644 index 00000000..4e129a76 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/SCI2CMacroInterface.h @@ -0,0 +1,281 @@ +/*
+** ----------------------
+** --- Class OPEQUAL. ---
+** ----------------------
+*/
+/* --- Equal. --- */
+#define s0OpEquals0(in) \
+sOpEquals1(in); +
+#define s2OpEquals2(inptr,insizeptr,outptr) \
+sOpEquala1(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d0OpEquald0(in) \
+dOpEquals1(in); +
+#define d2OpEquald2(inptr,insizeptr,outptr) \
+dOpEquala1(inptr, insizeptr[0]*insizeptr[1], outptr); +
+/*
+// ---------------------
+// --- Class OPSTAR. ---
+// ---------------------
+*/
+/* --- OpStar. ---
+#define s0s0OpStars0(in1,in2) \
+ssOpStarss1(in1,in2);
+ +#define s0s2OpStars2(in1,inptr2,insizeptr2,outptr) \
+ssOpStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +
+#define s2s0OpStars2(inptr2,insizeptr2,in1,outptr) \
+ssOpStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr);*/ +/*questa su e' una macro
+
+#define s2s2OpStars2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ssOpStaraa1(inptr1,insizeptr1[0],insizeptr1[1], inptr2, insizeptr2[1], outptr);
+
+#define d0d0OpStard0(in1,in2) \
+ddOpStarss1(in1,in2);
+
+#define d0d2OpStard2(in1,inptr2,insizeptr2,outptr) \
+ddOpStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +
+#define d2d0OpStard2(inptr2,insizeptr2,in1,outptr) \
+ddOpStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr)*/ +/*questa su e' una macro
+
+#define d2d2OpStard2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ddOpStaraa1(inptr1,insizeptr1[0],insizeptr1[1], inptr2, insizeptr2[1], outptr);*/
+
+/*
+// ---------------------
+// --- Class OPPLUS. ---
+// ---------------------
+*/
+/* --- OpPlus. ---*/
+/*RN volendo puoi fare una sola macro del tipo sa1() che serve per tutte le operazioni
+#define s0s0OpPluss0(in1,in2) \
+ssOpPlusss1(in1,in2);
+ +#define s0s2OpPluss2(in1,inptr2,insizeptr2,outptr) \
+ssOpPlussa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +
+#define s2s2OpPluss2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ssOpPlusaa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr) + +#define s2s0OpPluss2(inptr2,insizeptr2,in1,outptr) \
+ssOpPlussa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr);*/ +/*questa su e' una macro
+
+#define d0d0OpPlusd0(in1,in2) \
+ddOpPlusss1(in1,in2);
+
+#define d2d2OpPlusd2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ddOpPlusaa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr); +
+#define d0d2OpPlusd2(in1,inptr2,insizeptr2,outptr) \
+ddOpPlussa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +
+#define d2d0OpPlusd2(inptr2,insizeptr2,in1,outptr) \
+ddOpPlussa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr)*/ +/*questa su e' una macro */
+
+
+/* --- OpDotStar. ---*/
+/*#define s0s0OpDotStars0(in1,in2) \
+ssOpDotStarss1(in1,in2);
+ +#define s0s2OpDotStars2(in1,inptr2,insizeptr2,outptr) \
+ssOpDotStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +
+#define s2s2OpDotStars2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ssOpDotStaraa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr) + +#define s2s0OpDotStars2(inptr2,insizeptr2,in1,outptr) \
+ssOpDotStarsa1(in1,inptr2, insizeptr2[0]*insizeptr2[1], outptr); +questa su e' una macro */
+
+/*#define d0d0OpDotStard0(in1,in2) \
+ddOpDotStarss1(in1,in2);
+
+#define d2d2OpDotStard2(inptr1,insizeptr1,inptr2,insizeptr2,outptr) \
+ddOpDotStaraa1(inptr1,inptr2, insizeptr1[0]*insizeptr1[1], outptr); +
+#define d0d2OpDotStard2(in1,inptr2,insizeptr2,outptr) \
+ddOpDotStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +
+#define d2d0OpDotStard2(inptr2,insizeptr2,in1,outptr) \
+ddOpDotStarsa1(in1,inptr2, (insizeptr2[0]) * (insizeptr2[1]), outptr) +questa su e' una macro */
+
+/*
+// ---------------------
+// --- Class ^. ---
+// ---------------------
+*/
+/*RN DA FARE ANCORA forse la si puo' integrare dentro le operazioni OPPLUS*/
+
+/*
+// ---------------------
+// --- Class OPAPEX. ---
+// ---------------------
+*/
+/* --- OpApex. ---
+#define s0OpApexs0(in) \
+sOpApexs(in);
+
+#define d0OpApexd0(in) \
+dOpApexs(in);
+
+#define s2OpApexs2(inptr,insizeptr,outptr) \
+sOpApexa(inptr, insizeptr[0],insizeptr[1], outptr); + +#define d2OpApexd2(inptr,insizeptr,outptr) \
+dOpApexa(inptr, insizeptr[0],insizeptr[1], outptr); +*/
+/*
+// ---------------------
+// --- Class SIN. ---
+// ---------------------
+*/
+/* --- sin. ---*/
/* +#define s0sins0(inptr) \
+ssins(inptr); +
+#define d0sind0(inptr) \
+dsins(inptr); +
+#define c0sinc0(inptr) \
+csins(inptr); +
+#define z0sinz0(inptr) \
+zsins(inptr); +
+#define s2sins2(inptr,insizeptr,outptr) \
+ssina(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d2sind2(inptr,insizeptr,outptr) \
+dsina(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define c2sinc2(inptr,insizeptr,outptr) \
+csina(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define z2sinz2(inptr,insizeptr,outptr) \
+zsina(inptr, insizeptr[0]*insizeptr[1], outptr);
+
*/ +/* --- cos. ---*/
/* +#define s0coss0(inptr) \
+scoss(inptr); +
+#define d0cosd0(inptr) \
+dcoss(inptr); +
+#define c0cosc0(inptr) \
+ccoss(inptr); +
+#define z0cosz0(inptr) \
+zcoss(inptr); +
+#define s2coss2(inptr,insizeptr,outptr) \
+scosa(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d2cosd2(inptr,insizeptr,outptr) \
+dcosa(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define c2cosc2(inptr,insizeptr,outptr) \
+ccosa(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define z2cosz2(inptr,insizeptr,outptr) \
+zcosa(inptr, insizeptr[0]*insizeptr[1], outptr); +
*/ +/* --- sinh. ---*/
/* +#define s0sinhs0(inptr) \
+ssinhs(inptr); +
+#define d0sinhd0(inptr) \
+dsinhs(inptr); +
+#define c0sinhc0(inptr) \
+csinhs(inptr); +
+#define z0sinhz0(inptr) \
+zsins(inptr); +
+#define s2sinhs2(inptr,insizeptr,outptr) \
+ssinha(inptr, insizeptr[0]*insizeptr[1], outptr); + +#define d2sinhd2(inptr,insizeptr,outptr) \
+dsinha(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define c2sinhc2(inptr,insizeptr,outptr) \
+csinha(inptr, insizeptr[0]*insizeptr[1], outptr); +
+#define z2sinhz2(inptr,insizeptr,outptr) \
+zsinha(inptr, insizeptr[0]*insizeptr[1], outptr);
+
+*/ +/*
+// ---------------------
+// --- Class DISP. ---
+// ---------------------
+*//*
+#define s0dispd0(invar) \
+sdisps2 (invar, #invar );
+
+#define d0dispd0(invar) \
+ddisps2 (invar, #invar );
+
+#define c0dispd0(invar) \
+cdisps2 (invar, #invar );
+
+#define z0dispd0(invar) \
+zdisps2 (invar, #invar );
+
+#define s2dispd0(invar,insize) \
+sdispa2 (invar, insize, #invar );
+
+#define d2dispd0(invar,insize) \
+ddispa2 (invar, insize, #invar );
+
+#define c2dispd0(invar,insize) \
+cdispa2 (invar, insize, #invar );
+
+#define z2dispd0(invar,insize) \
+zdispa2 (invar, insize, #invar );
+
+#define i2dispd0(invar,insize) \
+idispa2 (invar, insize, #invar );*/
+/*
+// --------------------
+// --- Class ZEROS. ---
+// --------------------
+*/
+/* --- ones. ---*/
/* +#define d0d0onesd2(inptr1,inptr2,outptr) \
+ddonesss1(inptr1, inptr2, outptr);
+ +#define onesd0() \
+1
+
+#define d0onesd0(in1) \
+1
+
+#define d2onesd2(inptr,insizeptr,outptr) \
+ddonesss1(insizeptr[0], insizeptr[1], outptr);
+
+#define d0d0onesd2(inptr1,inptr2,outptr) \
+ddonesss1(inptr1, inptr2, outptr);
+
+#define s0s0oness2(inptr1,inptr2,outptr) \
+ssonesss1(inptr1, inptr2, outptr);
+ +#define oness0() \
+1
+
+#define s0oness0(in1) \
+1
+
+#define s2oness2(inptr,insizeptr,outptr) \
+ssonesss1(insizeptr[0], insizeptr[1], outptr); +*/ diff --git a/2.3-1/macros/CFiles/sci2cincludes/SCI2Cconvol.h b/2.3-1/macros/CFiles/sci2cincludes/SCI2Cconvol.h new file mode 100644 index 00000000..3fb3b9e9 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/SCI2Cconvol.h @@ -0,0 +1,15 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ +
+#ifndef __CONVOL_H__ +#define __CONVOL_H__ + +#include "SCI2CMacroInterface.h"
+#endif /* !__CONVOL_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/SCI2Cfft.h b/2.3-1/macros/CFiles/sci2cincludes/SCI2Cfft.h new file mode 100644 index 00000000..f82b74b4 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/SCI2Cfft.h @@ -0,0 +1,16 @@ +/* +** -*- C -*- +** +** OpDotSlash.c +** Made by Raffaele Nutricato <raffaele.nutricato@tiscali.it> +** +** +** Copyright Raffaele Nutricato 2007 +*/ + +#ifndef __SCI2CFFT_H__ +#define __SCI2CFFT_H__ + +#include "SCI2CMacroInterface.h"
+ +#endif /* !__SCI2CFFT_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cincludes/notFound.h b/2.3-1/macros/CFiles/sci2cincludes/notFound.h new file mode 100644 index 00000000..59d8c2fe --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cincludes/notFound.h @@ -0,0 +1,18 @@ +/* +** -*- C -*- +** +** notFound.h +** Made by Bruno JOFRET <bruno.jofret@inria.fr> +** +** Started on Thu Feb 8 10:12:17 2007 jofret +** Last update Tue Feb 13 17:16:47 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#ifndef __NOT_FOUND_H__ +#define __NOT_FOUND_H__ + +#define NOT_FOUND -1 + +#endif /* !__NOT_FOUND_H__ */ diff --git a/2.3-1/macros/CFiles/sci2cobj/readme.txt b/2.3-1/macros/CFiles/sci2cobj/readme.txt new file mode 100644 index 00000000..54f467f7 --- /dev/null +++ b/2.3-1/macros/CFiles/sci2cobj/readme.txt @@ -0,0 +1,2 @@ +for the moment the makefile generates the obj files in
+the source directory where .c files are stored.
\ No newline at end of file diff --git a/2.3-1/macros/ErrorMessages/EM_NanSize.sci b/2.3-1/macros/ErrorMessages/EM_NanSize.sci new file mode 100644 index 00000000..60877389 --- /dev/null +++ b/2.3-1/macros/ErrorMessages/EM_NanSize.sci @@ -0,0 +1,82 @@ +function EM_NanSize(ReportFileName)
+// function EM_NanSize(ReportFileName)
+// -----------------------------------------------------------------
+//
+// Input data:
+// //NUT: Add description here
+//
+// Output data:
+// //NUT: Add description here
+//
+// Status:
+// 13-Feb-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+PrintStringInfo(' ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Cannot initialize a local or global variable with a variable value',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: coming from a function or an operation.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: See code below:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: a = 10;',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: b = 10;',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: c = a+b;',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: D = zeros(a,b); // Allowed',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: E = zeros(10,b); // Allowed',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: F = zeros(10,5); // Allowed',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: G = zeros(10,c); // Not Allowed because c value is not known at transation time.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: H = 10:c:9;// Not Allowed because c value is not known at transation time.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: The same problem arises in for loops.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: SCI2C forbids use of step values in ""for"" loops which come from ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: a function or an operation.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Always specify its value.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Example: ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Scilab Code:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: unkstep = 2*cos(0); // It means that unkstep is not known at translation time.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for cnt=10:unkstep:1',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: end',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: The code above is not allowed. You can change it as shown below:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: unkstep = 2; // This time the value of unkstep is known at translation time.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for cnt=10:unkstep:1',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: end',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: The reason for this limitation is related to the impossibility to generate optimized C code.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: when the step is unknown.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Look at the following example for more details,',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Scilab Code:;',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for cnt=10:unkstep:1',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: end',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: If unkstep variable value is unkwnown it is not possible to generate',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: optimized C code.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Infact, if unkstep is >= 0, the correct C code is:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10;cnt<=1;cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: If unkstep is < 0 the correct C code is:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10; cnt>=1; cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Note how the condition cnt<=1 changes to cnt>=1.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: In order to take into account of this possibility ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: SCI2C translator should generate both codes and then ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: insert them into an if/else block as shown here: ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: if (unkstep >= 0)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: {',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10;cnt<=1;cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: }',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: else{',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: {',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10;cnt<=1;cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: }',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Of course it is not optimized C code.',ReportFileName,'both','y');
+PrintStringInfo(' ',ReportFileName,'both','y');
+SCI2Cerror(9999, 'SCI2CERROR: Cannot initialize a local or global variable with a variable value coming from a function or an operation.');
+endfunction
diff --git a/2.3-1/macros/ErrorMessages/EM_UnknownStep.sci b/2.3-1/macros/ErrorMessages/EM_UnknownStep.sci new file mode 100644 index 00000000..e9e37c2d --- /dev/null +++ b/2.3-1/macros/ErrorMessages/EM_UnknownStep.sci @@ -0,0 +1,70 @@ +function EM_UnknownStep(ReportFileName)
+// function EM_UnknownStep(ReportFileName)
+// -----------------------------------------------------------------
+//
+// Input data:
+// //NUT: Add description here
+//
+// Output data:
+// //NUT: Add description here
+//
+// Status:
+// 13-Feb-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+PrintStringInfo(' ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: SCI2C forbids use of step values in ""for"" loops which come from ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: a function or an operation.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Always specify its value.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Example: ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Scilab Code:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: unkstep = 2*cos(0); // It means that unkstep is not known at translation time.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for cnt=10:unkstep:1',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: end',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: The code above is not allowed. You can change it as shown below:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: unkstep = 2; // This time the value of unkstep is known at translation time.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for cnt=10:unkstep:1',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: end',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: The reason for this limitation is related to the impossibility to generate optimized C code.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: when the step is unknown.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Look at the following example for more details,',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Scilab Code:;',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for cnt=10:unkstep:1',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: end',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: If unkstep variable value is unkwnown it is not possible to generate',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: optimized C code.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Infact, if unkstep is >= 0, the correct C code is:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10;cnt<=1;cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: If unkstep is < 0 the correct C code is:',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10; cnt>=1; cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Note how the condition cnt<=1 changes to cnt>=1.',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: In order to take into account of this possibility ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: SCI2C translator should generate both codes and then ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: insert them into an if/else block as shown here: ',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: if (unkstep >= 0)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: {',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10;cnt<=1;cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: }',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: else{',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: {',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: for (cnt=10;cnt<=1;cnt+=unkstep)',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: disp(cnt);',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: }',ReportFileName,'both','y');
+PrintStringInfo('SCI2CERROR: Of course it is not optimized C code.',ReportFileName,'both','y');
+PrintStringInfo(' ',ReportFileName,'both','y');
+error(9999, 'SCI2C forbids use of step values in ""for"" loops which come from a function or an operation.');
+endfunction
diff --git a/2.3-1/macros/ErrorMessages/EM_ZeroSize.sci b/2.3-1/macros/ErrorMessages/EM_ZeroSize.sci new file mode 100644 index 00000000..7cee5b9f --- /dev/null +++ b/2.3-1/macros/ErrorMessages/EM_ZeroSize.sci @@ -0,0 +1,27 @@ +function EM_ZeroSize(ReportFileName)
+// function EM_ZeroSize(ReportFileName)
+// -----------------------------------------------------------------
+//
+// Input data:
+// //NUT: Add description here
+//
+// Output data:
+// //NUT: Add description here
+//
+// Status:
+// 13-Feb-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+PrintStringInfo('SCI2CERROR: Cannot handle zero-size arrays.',ReportFileName,'both','y');
+PrintStringInfo(' ',ReportFileName,'both','y');
+error(9999, 'SCI2CERROR: Cannot handle zero-size arrays.');
+
+endfunction
diff --git a/2.3-1/macros/ErrorMessages/buildmacros.sce b/2.3-1/macros/ErrorMessages/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/ErrorMessages/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/ErrorMessages/lib b/2.3-1/macros/ErrorMessages/lib Binary files differnew file mode 100644 index 00000000..5370e124 --- /dev/null +++ b/2.3-1/macros/ErrorMessages/lib diff --git a/2.3-1/macros/ErrorMessages/names b/2.3-1/macros/ErrorMessages/names new file mode 100644 index 00000000..f55e8f8b --- /dev/null +++ b/2.3-1/macros/ErrorMessages/names @@ -0,0 +1,3 @@ +EM_NanSize +EM_UnknownStep +EM_ZeroSize diff --git a/2.3-1/macros/FunctionAnnotation/FA_ADD.sci b/2.3-1/macros/FunctionAnnotation/FA_ADD.sci new file mode 100644 index 00000000..4193422b --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_ADD.sci @@ -0,0 +1,43 @@ +function opout = FA_ADD(in1,in2)
+// function opout = FA_ADD(in1,in2)
+// -----------------------------------------------------------------
+// Addition function for Function Annotations.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (isnum(in1) & isnum(in2))
+ in1num = eval(in1);
+ in2num = eval(in2);
+ outnum = in1num+in2num;
+ if isnan(outnum)
+ opout = '__SCI2CNANSIZE';
+ else
+ opout = string(outnum);
+ end
+else
+ opout = string('('+in1+'+'+in2+')');
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_DIV.sci b/2.3-1/macros/FunctionAnnotation/FA_DIV.sci new file mode 100644 index 00000000..d4ec0ccd --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_DIV.sci @@ -0,0 +1,41 @@ +function opout = FA_DIV(in1,in2)
+// function opout = FA_DIV(in1,in2)
+// -----------------------------------------------------------------
+// Division function for Function Annotations.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+// 26-Oct-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (isnum(in1) & isnum(in2))
+ in1num = eval(in1);
+ in2num = eval(in2);
+ outnum = in1num/in2num;
+ if isnan(outnum)
+ opout = '__SCI2CNANSIZE';
+ else
+ opout = string(outnum);
+ end
+else
+ opout = '('+string(in1)+'/'+string(in2)+')';
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci b/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci new file mode 100644 index 00000000..3603c572 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_GetDefaultPrecision.sci @@ -0,0 +1,97 @@ +function defaultprecision = FA_GetDefaultPrecision(scifilename,ReportFileName)
+// function defaultprecision = FA_GetDefaultPrecision(scifilename,ReportFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Extracts the default precision for the file .sci passed in input.
+// The following annotation will be searched in the scilab code:
+// //SCI2C: DEFAULT_PRECISION= FLOAT
+// //SCI2C: DEFAULT_PRECISION= DOUBLE
+// If the annotation is missing the default DOUBLE precision will be
+// implicitly used.
+// #RNU_RES_E
+//
+// Input data:
+// ---
+//
+// Output data:
+// defaultprecision: string which specifies the default precision to be
+// used in the translation of scifilename.
+//
+// Status:
+// 12-Feb-2008 -- Raffaele Nutricato: Author.
+// 12-Feb-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+defaultprecision = 'd';
+annotationstring = '//SCI2C: DEFAULT_PRECISION='
+// #RNU_RES_B
+PrintStringInfo('***Get default precision from: '+scifilename,ReportFileName,'file','y');
+// #RNU_RES_E
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// --- Open the .sci file (read only). ---
+scifid = SCI2COpenFileRead(scifilename);
+
+// #RNU_RES_B
+// --- Loop over the lines of the input file. ---
+// Position file pointer to the desired NInArg/NOutArg section,
+// and read the NOutArg annotation.
+// #RNU_RES_E
+foundannotation = 0;
+line_position = 0;
+while ((meof(scifid) == 0) & (foundannotation == 0))
+ check_string = stripblanks(mgetl(scifid,1));
+ line_position = line_position + 1;
+ if (~isempty(check_string))
+
+ if (SCI2Cstrncmps1size(annotationstring,check_string))
+ tmpprecision = stripblanks(part(check_string,length(annotationstring)+1:length(check_string)));
+ // #RNU_RES_B
+ PrintStringInfo(' Line '+string(line_position)+...
+ ' - Found annotation for default precision'+' ""'+check_string+' ""',...
+ ReportFileName,'file','y');
+ // #RNU_RES_E
+ foundannotation = 1;
+ end
+ end
+end
+
+if (foundannotation == 0)
+ // #RNU_RES_B
+ PrintStringInfo('Annotation for default precision not found.',ReportFileName,'file','y');
+ PrintStringInfo('Using the ""DOUBLE"" default precision.',ReportFileName,'file','y');
+ // #RNU_RES_E
+else
+ if (tmpprecision == 'FLOAT')
+ defaultprecision = 's';
+ elseif (tmpprecision == 'DOUBLE')
+ defaultprecision = 'd';
+ elseif (tmpprecision == 'UINT8')
+ defaultprecision = 'u8';
+ elseif (tmpprecision == 'INT8')
+ defaultprecision = 'i8';
+ elseif (tmpprecision == 'UINT16')
+ defaultprecision = 'u16';
+ elseif (tmpprecision == 'INT16')
+ defaultprecision = 'i16';
+ elseif (tmpprecision == 'CVIMAGE')
+ defaultprecision = 'IplImage'
+
+ end
+end
+
+mclose(scifid);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci new file mode 100644 index 00000000..d11e3cee --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_GetFunAnn.sci @@ -0,0 +1,216 @@ +function [FunTypeAnnot,FunSizeAnnot,NOutArg_mod] = ...
+ FA_GetFunAnn(NInArg,NOutArg,FunName,FileInfo,SharedInfo)
+// function [FunTypeAnnot,FunSizeAnnot] = ...
+// FA_GetFunAnn(NInArg,NOutArg,FunName,FileInfo,SharedInfo)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function extracts the TYPE and SIZE annotations from the
+// input .ann file.
+// No blank lines are allowed between function annotations.
+//
+// #RNU_RES_E
+// Input data:
+// //NUT: Add description here
+//
+// Output data:
+// //NUT: Add description here
+//
+// Status:
+// 11-Jul-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+//NUT: consider the possibility to split this function into more functions.
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),5,5);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+// #RNU_RES_B
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Reading function annotations***',ReportFileName,'file','y');
+// #RNU_RES_E
+SCI2CClassFileName = GetClsFileName(FunName,FileInfo,SharedInfo);
+FunTypeAnnot = '';
+FunSizeAnnot = '';
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+// ---------------------------------------------
+// --- Read the annotations of the function. ---
+// ---------------------------------------------
+// --- Open the .sci file (read only). ---
+inclsfid = SCI2COpenFileRead(SCI2CClassFileName);
+
+// #RNU_RES_B
+// --- Loop over the lines of the input file. ---
+// Position file pointer to the desired NInArg/NOutArg section,
+// and read the NOutArg annotation.
+// #RNU_RES_E
+FoundNIn = 0;
+FoundNOut = 0;
+line_position = 0;
+while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0))
+ check_string = stripblanks(mgetl(inclsfid,1));
+ line_position = line_position + 1;
+ if (~isempty(check_string))
+
+// #RNU_RES_B
+// --- Search for the NIN annotation. ---
+// #RNU_RES_E
+ if (SCI2Cstrncmps1size(SharedInfo.Annotations.FUNNIN,check_string))
+ FUNNINAnnot = part(check_string,length(SharedInfo.Annotations.FUNNIN)+1:length(check_string));
+
+// #RNU_RES_B
+// --- Check NIN value. ---
+// #RNU_RES_E
+ if (eval(FUNNINAnnot) == NInArg)
+// #RNU_RES_B
+ PrintStringInfo(' Line '+string(line_position)+' - Function NInArg Annotation: '+' ""'+check_string+' ""',...
+ ReportFileName,'file','y');
+// #RNU_RES_E
+ FoundNIn = 1;
+ check_string = stripblanks(mgetl(inclsfid,1));
+ line_position = line_position + 1;
+ if (~isempty(check_string))
+
+// #RNU_RES_B
+// --- Search for the NOUT annotation. ---
+// #RNU_RES_E
+ if (SCI2Cstrncmps1size(SharedInfo.Annotations.FUNNOUT,check_string))
+ FUNNOUTAnnot = part(check_string,length(SharedInfo.Annotations.FUNNOUT)+1:length(check_string));
+// #RNU_RES_B
+// --- Check NOUT value. ---
+// #RNU_RES_E
+ if (eval(FUNNOUTAnnot) == NOutArg)
+// #RNU_RES_B
+ PrintStringInfo(' Line '+string(line_position)+' - Function NOutArg Annotation: '+' ""'+check_string+' ""',...
+ ReportFileName,'file','y');
+// #RNU_RES_E
+ FoundNOut = 1;
+ elseif(eval(FUNNOUTAnnot) == 0)
+ FoundNOut = 1
+ else
+ FoundNIn = 0;
+ end
+ else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Incorrect format for function annotation.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Expected '+SharedInfo.Annotations.FUNNIN+' field in the annotations of the function.',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Incorrect format for function annotation.');
+ end
+ else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Incorrect format for function annotation.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Expected '+SharedInfo.Annotations.FUNNIN+' field in the annotations of the function.',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Incorrect format for function annotation.');
+ end
+ end
+ end
+ end
+end
+
+if (FoundNOut*FoundNIn == 0)
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Please check file: '+SCI2CClassFileName,ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Incorrect function annotation.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: There are two possibilities:',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: 1. Syntax error in function annotations.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: 2. Missing the right combination of NIN/NOUT annotations: ""'+SharedInfo.Annotations.FUNNIN+string(NInArg)+','+SharedInfo.Annotations.FUNNOUT+' '+string(NOutArg)+'"".',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Incorrect function annotation.');
+else
+ //This change has been made in order to supress the generation
+ //of output variables in case of functions which do not return
+ //anything.
+ if(eval(FUNNOUTAnnot) == 0)
+ NOutArg_mod = 0;
+ else
+ NOutArg_mod = NOutArg
+ end
+
+ // In case we are reading to much informations
+ readNewLine = %t;
+
+ for cntout = 1:NOutArg
+ SCI2C_nout=cntout; // Useful for eval.
+
+// #RNU_RES_B
+// Read the Fun type annotation.
+// #RNU_RES_E
+ if (readNewLine == %t)
+ check_string = stripblanks(mgetl(inclsfid,1));
+ line_position = line_position + 1;
+ else
+ // reset state
+ readNewLine = %t;
+ end
+ if (isempty(check_string) == %F)
+ tmpannstring = eval(SharedInfo.Annotations.FUNTYPE);
+ if (SCI2Cstrncmps1size(tmpannstring,check_string))
+// #RNU_RES_B
+ PrintStringInfo(' Line '+string(line_position)+' - Function Type Annotation: '+' ""'+check_string+' ""',...
+ ReportFileName,'file','y');
+// #RNU_RES_E
+ FunTypeAnnot(cntout) = ...
+ stripblanks(part(check_string,length(tmpannstring)+1:length(check_string)));
+ end
+ else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function type annotation not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Line '+string(line_position)+' Function type annotation not found in file: '+SCI2CClassFileName);
+ end
+
+// #RNU_RES_B
+// --- Read the Fun size annotation. ---
+// #RNU_RES_E
+ SCI2C_nelem = 0; // Useful for eval.
+// while(SCI2C_nelem < 2 & isempty(check_string) == %F)
+ while(SCI2C_nelem < 3 & isempty(check_string) == %F)
+ line_position = line_position + 1;
+// #RNU_RES_B
+ PrintStringInfo(' Line '+string(line_position)+' - Function Size Annotation: '+' ""'+check_string+' ""',...
+ ReportFileName,'file','y');
+ if (isempty(check_string) == %F)
+ SCI2C_nelem = SCI2C_nelem + 1
+ tmpannstring = eval(SharedInfo.Annotations.FUNSIZE);
+ check_string = stripblanks(mgetl(inclsfid,1));
+ if (SCI2Cstrncmps1size(tmpannstring,check_string))
+// #RNU_RES_E
+ FunSizeAnnot(cntout,SCI2C_nelem) = ...
+ stripblanks(part(check_string,length(tmpannstring)+1:length(check_string)));
+ else
+ readNewLine = %f;
+ end
+ else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Line '+string(line_position)+' Function size annotation not found in file: '+SCI2CClassFileName,ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Line '+string(line_position)+' Function size annotation not found in file: '+SCI2CClassFileName);
+ end
+ end
+ end
+
+
+end
+// --- End loop over the lines of the input file. ---
+mclose(inclsfid);
+// -------------------------------------------------
+// --- End Read the annotations of the function. ---
+// -------------------------------------------------
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci new file mode 100644 index 00000000..99eaaa5f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci @@ -0,0 +1,133 @@ +function UpdatedOutArg = ...
+ FA_GetOutArgInfo(InArg,NInArg,OutArg,NOutArg,SharedInfo,FunPrecSpecifier, ...
+ FunTypeAnnot,FunSizeAnnot,ReportFileName,ASTFunName)
+// function UpdatedOutArg = ...
+// FA_GetOutArgInfo(InArg,NInArg,OutArg,NOutArg,SharedInfo,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,ReportFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// InArg is used by eval don't remove it from the function call.
+//
+// #RNU_RES_E
+// Input data:
+// //NUT: Add description here
+//
+// Output data:
+// //NUT: Add description here
+//
+// Status:
+// 25-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),10,10);
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+
+UpdatedOutArg = OutArg;
+for cntin = 1:NInArg
+ IN(cntin).TP = InArg(cntin).Type;
+ for _InArgSize=1:size(InArg(cntin).Size, '*')
+ IN(cntin).SZ(_InArgSize) = InArg(cntin).Size(_InArgSize);
+ end
+ if ((isnan(InArg(cntin).Value)) & (GetSymbolDimension(InArg(cntin).Size) == 0))
+ // #RNU_RES_B
+ // IN(cntin).VAL = '__SCI2CNANSIZE'; //RNU: toglimi
+ //RNU: Replace the value of the variable with its name, in case it is a scalar variable.
+ // #RNU_RES_E
+ IN(cntin).VAL = InArg(cntin).Name;
+ else
+ IN(cntin).VAL = string(InArg(cntin).Value);
+ end
+end
+DefaultPrecision = SharedInfo.DefaultPrecision;
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+if (FunTypeAnnot(1) == '')
+ NOutArg = 0;
+
+else
+ NOutArg = max(size(FunTypeAnnot));
+end
+
+flagfindlike = 0;
+
+for counterin = 1:NInArg
+ if (InArg(counterin).FindLike == 1 | InArg(counterin).FindLike == -1)
+ // #RNU_RES_B
+ // Then we must assume that the output will be findlike
+ // 0 = no find-like
+ // 1 = pure find-like
+ //-1 = similar to find-like (out=fun(in)) where in is find-like.
+ // #RNU_RES_E
+ flagfindlike = -1;
+ end
+end
+
+for counterout = 1:NOutArg
+ if(FunTypeAnnot == 'FA_TP_USER')
+ UpdatedOutArg(counterout).Type = FA_TP_USER(FunPrecSpecifier,DefaultPrecision);
+ else
+ UpdatedOutArg(counterout).Type = eval(FunTypeAnnot(counterout));
+ end
+ UpdatedOutArg(counterout).FindLike = 0;
+
+ // This is just to remove the FA_SZ_RTMAX tag ???
+ lengthFA_SZ_RTMAX = length('FA_SZ_RTMAX');
+ if (SCI2Cstrncmps1size('FA_SZ_RTMAX',FunSizeAnnot(counterout,1)))
+ UpdatedOutArg(counterout).FindLike = 1;
+ FunSizeAnnot(counterout,1) = part(FunSizeAnnot(counterout,1),lengthFA_SZ_RTMAX+1:length(FunSizeAnnot(counterout,1)));
+ end
+
+ if (SCI2Cstrncmps1size('FA_SZ_RTMAX',FunSizeAnnot(counterout,2)))
+ UpdatedOutArg(counterout).FindLike = 1;
+ FunSizeAnnot(counterout,2) = part(FunSizeAnnot(counterout,2),lengthFA_SZ_RTMAX+1:length(FunSizeAnnot(counterout,2)));
+ end
+
+ if (flagfindlike == -1)
+ UpdatedOutArg(counterout).FindLike = -1;
+ end
+
+ // #RNU_RES_B
+ // When the size is given by e IN(x).VAL annotation we can have two cases:
+ // IN(x).VAL is a number or IN(x).VAL is %nan. When it is %nan the
+ // size is equal to the name of IN(x).
+ // This is a dynamic memory extension of a local variable and for the moment
+ // we issue an error according to SCI2C specifications
+ // #RNU_RES_E
+ //disp(FunSizeAnnot)
+ for iterOutputPosition=1:size(FunSizeAnnot, 'c')
+ tmpeval = eval(FunSizeAnnot(counterout, iterOutputPosition));
+ if (IsNanSize(tmpeval))
+ if SharedInfo.ForExpr.OnExec == 0
+ EM_NanSize(ReportFileName);
+ else
+ UpdatedOutArg(counterout).Size(iterOutputPosition) = string(tmpeval);
+ end
+ elseif(isnum(tmpeval))
+ if (eval(tmpeval) <= 0)
+ EM_ZeroSize(ReportFileName);
+ else
+ UpdatedOutArg(counterout).Size(iterOutputPosition) = string(tmpeval);
+ end
+ else
+ UpdatedOutArg(counterout).Size(iterOutputPosition) = string(tmpeval);
+ end
+ end
+ if(ASTFunName == 'syslin')
+ no_of_st = eval(InArg(2).Size(1))
+ no_of_ip = eval(InArg(3).Size(2))
+ UpdatedOutArg(counterout).Value = no_of_st+no_of_ip*0.1;
+ else
+ UpdatedOutArg(counterout).Value = %nan;
+ end
+ UpdatedOutArg(counterout).Dimension = GetSymbolDimension(UpdatedOutArg(counterout).Size);
+ UpdatedOutArg(counterout).Scope = 'Temp';//NUT anche su questo si puo' ragionare verifica anche la handleoperation.
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetResizeApproach.sci b/2.3-1/macros/FunctionAnnotation/FA_GetResizeApproach.sci new file mode 100644 index 00000000..95427001 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_GetResizeApproach.sci @@ -0,0 +1,79 @@ +function ResizeApproach = FA_GetResizeApproach(scifilename,ReportFileName)
+
+// function ResizeApproach = FA_GetResizeApproach(scifilename,ReportFileName)
+// -----------------------------------------------------------------
+// Extracts the resize approach from the file .sci passed in input.
+// The following annotation will be searched in the scilab code:
+// //SCI2C: RESIZE_APPROACH= NO_RESIZE
+// //SCI2C: RESIZE_APPROACH= RESIZE_ALL
+// //SCI2C: RESIZE_APPROACH= REALLOC_ALL_RESIZE_ALL
+// //SCI2C: RESIZE_APPROACH= RESIZE_TEMP
+// //SCI2C: RESIZE_APPROACH= RESIZE_LOCAL
+// //SCI2C: RESIZE_APPROACH= RESIZE_GLOBAL
+// If the annotation is missing the default NO_RESIZE approach will be
+// implicitly used.
+//
+// Input data:
+// ---
+//
+// Output data:
+// ResizeApproach: string which specifies the resize approach
+// used in the translation of scifilename.
+//
+// Status:
+// 12-Jul-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+ResizeApproach = 'NO_RESIZE';
+annotationstring = '//SCI2C: RESIZE_APPROACH='
+PrintStringInfo('***Get resize approach from: '+scifilename,ReportFileName,'file','y'); // #RNUREM_ME
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// --- Open the .sci file (read only). ---
+scifid = SCI2COpenFileRead(scifilename);
+
+// --- Loop over the lines of the input file. ---
+// Position file pointer to the desired NInArg/NOutArg section,
+// and read the NOutArg annotation.
+foundannotation = 0;
+line_position = 0;
+
+while ((meof(scifid) == 0) & (foundannotation == 0))
+ check_string = stripblanks(mgetl(scifid,1));
+ line_position = line_position + 1;
+ if (~isempty(check_string))
+ if (SCI2Cstrncmps1size(annotationstring,check_string))
+ tmpresize = stripblanks(part(check_string,length(annotationstring)+1:length(check_string)));
+ // #RNU_RES_B
+ PrintStringInfo(' Line '+string(line_position)+...
+ ' - Found annotation for resize approach'+' ""'+check_string+' ""',...
+ ReportFileName,'file','y');
+ // #RNU_RES_E
+ foundannotation = 1;
+ end
+ end
+end
+
+if (foundannotation == 0)
+ // #RNU_RES_B
+ PrintStringInfo('Annotation for resize approach not found.',ReportFileName,'file','y');
+ PrintStringInfo('Using the ''NO_RESIZE'' resize approach.',ReportFileName,'file','y');
+ // #RNU_RES_E
+else
+ ResizeApproach = tmpresize;
+end
+mclose(scifid);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_INT.sci b/2.3-1/macros/FunctionAnnotation/FA_INT.sci new file mode 100644 index 00000000..e1bdba33 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_INT.sci @@ -0,0 +1,40 @@ +function opout = FA_INT(in1)
+// function opout = FA_INT(in1)
+// -----------------------------------------------------------------
+// Int function for Function Annotations.
+// When in1 is a number opout = int(in1); where int truncates in1
+// to integer. If in1 is string opout = in1.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+// 26-Oct-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (isnum(in1))
+ outnum = int(eval(in1));
+ if isnan(outnum)
+ opout = '__SCI2CNANSIZE';
+ else
+ opout = string(outnum);
+ end
+else
+ opout = in1;
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_MAX.sci b/2.3-1/macros/FunctionAnnotation/FA_MAX.sci new file mode 100644 index 00000000..c5406f14 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_MAX.sci @@ -0,0 +1,50 @@ +function opout = FA_MAX(in1,in2) +// function opout = FA_MAX(in1,in2) +// ----------------------------------------------------------------- +// Maximum function for Function Annotations. +// When in1 and in2 are both symbols this function returns +// in1. +// +// Input data: +// in1: string specifying a number or a symbol. +// in2: string specifying a number or a symbol. +// +// Output data: +// opout: string containing the computed result. +// +// Status: +// 26-Oct-2007 -- Raffaele Nutricato: Author. +// 26-Oct-2007 -- Alberto Morea: Test Ok. +// +// Copyright 2008 Raffaele Nutricato & Alberto Morea. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +if (isnum(in1)) + in1num = eval(in1); + if (isnum(in2)) + in2num = eval(in2); + outnum = max(in1num,in2num); + if isnan(outnum) + opout = '__SCI2CNANSIZE'; + else + opout = string(outnum); + end + else + if (in1num == 1) + opout = string(in2); + end + end +else + opout = string(in1); +end + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_MIN.sci b/2.3-1/macros/FunctionAnnotation/FA_MIN.sci new file mode 100644 index 00000000..e1539103 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_MIN.sci @@ -0,0 +1,45 @@ +function opout = FA_MIN(in1,in2) +// function opout = FA_MIN(in1,in2) +// ----------------------------------------------------------------- +// Minimum function for Function Annotations. +// When in1 and in2 are both symbols this function returns +// in1. +// +// Input data: +// in1: string specifying a number or a symbol. +// in2: string specifying a number or a symbol. +// +// Output data: +// opout: string containing the computed result. + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +if (isnum(in1)) + in1num = eval(in1); + if (isnum(in2)) + in2num = eval(in2); + outnum = min(in1num,in2num); + if isnan(outnum) + opout = '__SCI2CNANSIZE'; + else + opout = string(outnum); + end + else + if (in1num == 1) + opout = string(in2); + end + end +else + opout = string(in1); +end + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_MUL.sci b/2.3-1/macros/FunctionAnnotation/FA_MUL.sci new file mode 100644 index 00000000..8c9a930a --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_MUL.sci @@ -0,0 +1,42 @@ +function opout = FA_MUL(in1,in2)
+// function opout = FA_MUL(in1,in2)
+// -----------------------------------------------------------------
+// Multiplication function for Function Annotations.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (isnum(in1) & isnum(in2))
+ in1num = eval(in1);
+ in2num = eval(in2);
+ outnum = in1num*in2num;
+ if isnan(outnum)
+ opout = '__SCI2CNANSIZE';
+ else
+ opout = string(outnum);
+ end
+else
+ opout = '('+string(in1)+'*'+string(in2)+')';
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_REAL.sci b/2.3-1/macros/FunctionAnnotation/FA_REAL.sci new file mode 100644 index 00000000..7b8c0fda --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_REAL.sci @@ -0,0 +1,50 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// +function opout = FA_REAL(in1, in2) +// function opout = FA_REAL(in1, in2) +// ----------------------------------------------------------------- +// Real function for Function Annotations. +// When in1 is a number opout = real(in1); where real returns in1 +// real part. If in1 is string opout = in1. +// +// Input data: +// in1: string specifying a number or a symbol. +// in2: string specifying in1 type +// +// Output data: +// opout: string containing the computed result. +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +if (isnum(in1)) + outnum = real(eval(in1)); + if isnan(outnum) + opout = '__SCI2CNANSIZE'; + else + opout = string(outnum); + end +else + if (in1 == "%i") + opout = " 0 "; + else + opout = in2+"0real"+FA_TP_REAL(in2)+"0"+"("+in1+")"; + end +end +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SCHUR_SZ.sci b/2.3-1/macros/FunctionAnnotation/FA_SCHUR_SZ.sci new file mode 100644 index 00000000..7b426e1c --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SCHUR_SZ.sci @@ -0,0 +1,42 @@ +function out2sz = FA_SCHUR_SZ(in2tp,in1sz) +//function out2sz = FA_SCHUR_SZ(in2tp,in1sz) +// ----------------------------------------------------------------- +// Get size of output for Schur function +// +// Input data: +// in2tp: string specifying the type of second input argument. +// in1sz: string specifying the size of first input argument. +// +// Output data: +// out2sz: string containing the size for second output argument. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +in2type = string(in2tp); +in1sz = string(in1sz); +in1dim = eval(in1sz); + +if(in2type == 'g') + out2sz = '1' +else + out2sz = string(in1dim) +end + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SCHUR_TP.sci b/2.3-1/macros/FunctionAnnotation/FA_SCHUR_TP.sci new file mode 100644 index 00000000..828ea1e5 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SCHUR_TP.sci @@ -0,0 +1,38 @@ +function out2tp = FA_SCHUR_TP(in2tp) +// function out2tp = FA_SCHUR_TP(in2tp) +// ----------------------------------------------------------------- +// Get type of output for Schur function +// +// Input data: +// in2tp: string specifying the type of second input argument. +// +// Output data: +// out2tp: string containing the type for second output argument. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + +in2type = string(in2tp); + +if(in2type == 'g') + out2tp = 'd' +else + out2tp = in2type +end +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SUB.sci b/2.3-1/macros/FunctionAnnotation/FA_SUB.sci new file mode 100644 index 00000000..1ef0ad46 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SUB.sci @@ -0,0 +1,41 @@ +function opout = FA_SUB(in1,in2)
+// function opout = FA_SUB(in1,in2)
+// -----------------------------------------------------------------
+// Subtraction function for Function Annotations.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (isnum(in1) & isnum(in2))
+ in1num = eval(in1);
+ in2num = eval(in2);
+ outnum = in1num-in2num;
+ if isnan(outnum)
+ opout = '__SCI2CNANSIZE';
+ else
+ opout = string(outnum);
+ end
+else
+ opout = '('+string(in1)+'-'+string(in2)+')';
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_1.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_1.sci new file mode 100644 index 00000000..3d20b992 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_1.sci @@ -0,0 +1,21 @@ +function outsize = FA_SZ_1(insize)
+// function outsize = FA_SZ_1(insize)
+// -----------------------------------------------------------------
+// Returns the first element of the size array.
+//
+// Input data:
+// insize: size of input argument. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// outsize: first element of the insize array.
+//
+// Status:
+// 08-Dec-2007 -- Raffaele Nutricato: Author.
+// 08-Dec-2007 -- Alberto Morea: Test Ok.
+// -----------------------------------------------------------------
+
+outsize = insize(1);
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_2.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_2.sci new file mode 100644 index 00000000..164cab3f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_2.sci @@ -0,0 +1,21 @@ +function outsize = FA_SZ_2(insize)
+// function outsize = FA_SZ_2(insize)
+// -----------------------------------------------------------------
+// Returns the second element of the size array.
+//
+// Input data:
+// insize: size of input argument. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// outsize: second element of the insize array.
+//
+// Status:
+// 08-Dec-2007 -- Raffaele Nutricato: Author.
+// 08-Dec-2007 -- Alberto Morea: Test Ok.
+// -----------------------------------------------------------------
+
+outsize = insize(2);
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci new file mode 100644 index 00000000..3aea8397 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_COLUMN_DIAG.sci @@ -0,0 +1,40 @@ +function outsize = FA_SZ_COLUMN_DIAG(insize) +//function outsize = FA_SZ_COLUMN_DIAG(insize) +// ----------------------------------------------------------------- +// Get size of column of the output for diag function +// +// Input data: +// insize: string specifying the size of input argument. +// +// Output data: +// outsize: string containing the column size for output argument. +// +// 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: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + + if(insize(2)=='1') then + outsize = insize(1); + + elseif(insize(1) == insize(2)) + outsize = '1'; + else + outsize = insize(2); + + end +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci new file mode 100644 index 00000000..8a313fee --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_COL_DIAG_IN_EX.sci @@ -0,0 +1,61 @@ +function outsize =FA_SZ_COL_DIAG_IN_EX(insize,val) +//function outsize =FA_SZ_COL_DIAG_IN_EX(insize,val) +// ----------------------------------------------------------------- +// Get size of column of the output for diag(insert) function +// +// Input data: +// insize: string specifying the size of input argument. +// val: string containing value of second input +// +// Output data: +// outsize: string containing the column size for output argument. +// +// 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: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + +///////////////////////////////COLUMN SIZE FOR INSERT POSITION//////////////// + + + + if((insize(1) == '1')) // If ROW size is 1 + if(val == '0') then //For Oth position + outsize = insize(2); //COLUMN size is equal to COLUMN size + else // For ...-2,-1,1,2... position + outsize = string(eval(insize(2))+abs(eval(val))); + // COLUMN size is equal to COLUMN size + absolute value of position(for 1*3 matrix and 2nd postion COLUMN size is (3+2)=5 + end + elseif((insize(2) == '1')) // If COLUMN size is 1 + if(val == '0') then //For Oth position + outsize = insize(1); //COLUMNS size is equal to ROW size + else // For ...-2,-1,1,2.... position + outsize = string(eval(insize(1))+abs(eval(val))); + // COLUMN size is equal to ROW size + absolute value of position(for 3*1 matrix and 1st postion COLUMN size is (3+1)=4 + end +//////////////////////////////////////////////////////////////////////////////// + + +////////////////////////////COLUMN SIZE FOR EXTRACT POSITION//////////////////// + + else + outsize = '1'; // For extract condition COLUMN size is always ONE. + end + +//////////////////////////////////////////////////////////////////////////////// + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2BASE.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2BASE.sci new file mode 100644 index 00000000..4cd6467d --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2BASE.sci @@ -0,0 +1,30 @@ +function opout = FA_SZ_DEC2BASE(in1val,in2val) + +// 07-Sep-2016 -- Author : Shamik Guha + + +in1val=string(in1val); +in2val=string(in2val); +if (isnum(in1val)) then + in1_num = eval(in1val) ; + in2_num = eval(in2val) ; + out=dec2base(in1_num,in2_num); + //disp(out); + +else + error(36, "Wrong input argument "+in1val+"."); + +end +if (in2_num>10) then + out=sci2exp(out); + opout=string(length(out)-2); + //disp(opout); + out=string(out); +else + out=eval(out); + //disp(out); + opout=string(floor(log10(abs(out)+1))+1); + //disp(opout); + out=string(out); +end +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2BIN.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2BIN.sci new file mode 100644 index 00000000..75d0cb07 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2BIN.sci @@ -0,0 +1,20 @@ +function opout = FA_SZ_DEC2BIN(inval) + +// 07-Sep-2016 -- Author : Shamik Guha + +inval=string(inval); +if (isnum(inval)) then + in_num = eval(inval) ; + out=dec2bin(in_num); + //disp(out); + +else + error(36, "Wrong input argument "+inval+"."); + +end + +out=eval(out); + +opout=string(floor(log10(abs(out)+1))+1); +out=string(out); +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2HEX.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2HEX.sci new file mode 100644 index 00000000..c1e07773 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2HEX.sci @@ -0,0 +1,21 @@ +function opout = FA_SZ_DEC2HEX(inval) + +// 07-Sep-2016 -- Author : Shamik Guha + +inval=string(inval); +if (isnum(inval)) then + in_num = eval(inval) ; + out=dec2hex(in_num); + //disp(out); + +else + error(36, "Wrong input argument "+inval+"."); + +end + +out=sci2exp(out); + +opout=string(length(out)-2); +//disp(opout); +out=string(out); +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2OCT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2OCT.sci new file mode 100644 index 00000000..056d333d --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_DEC2OCT.sci @@ -0,0 +1,20 @@ +function opout = FA_SZ_DEC2OCT(inval) + +// 07-Sep-2016 -- Author : Shamik Guha + +inval=string(inval); +if (isnum(inval)) then + in_num = eval(inval) ; + out=dec2oct(in_num); + //disp(out); + +else + error(36, "Wrong input argument "+inval+"."); + +end + +out=eval(out); + +opout=string(floor(log10(abs(out)+1))+1); +out=string(out); +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_DIFF.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_DIFF.sci new file mode 100644 index 00000000..5639ce77 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_DIFF.sci @@ -0,0 +1,58 @@ +function outsize = FA_SZ_DIFF(in1size, in2val, in3val) +//function outsize = FA_SZ_DIFF(in1size, in2val, in3val) +// ----------------------------------------------------------------- +// Get size of output for diff function +// +// Input data: +// in1size: string specifying the size of first input argument. +// in2val: string specifying the value of second input argument. +// in3val: string specifying the value of third input argument. +// +// Output data: +// outsize: string containing the size for output argument. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(3),3,3); + + in1size = string(in1size); + in1row = eval(in1size(1)); + in1col = eval(in1size(2)); + in2val = string(in2val); + in2num = eval(in2val); + in3num = eval(in3val); + +if(in3num == 0) + if((in1row == 1) & (in1col <> 1)) //input is row vector + outsize(1) = '1'; + outsize(2) = string (in1col - in2num); + elseif((in1col == 1) & (in1row <> 1)) //input is column vector + outsize(1) = string(in1row - in2num); + outsize(2) = '1'; + else // input is matrix. output is a column matrix + outsize(1) = string((in1row * in1col)- in2num); + outsize(2) = '1'; + end +elseif (in3num == 1) //Difference along rows + outsize(1) = string(in1row - in2num); + outsize(2) = string(in1col); +elseif (in3num == 2) //Difference along columns + outsize(1) = string(in1row); + outsize(2) = string(in1col - in2num); +end +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_FACTOR.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_FACTOR.sci new file mode 100644 index 00000000..d816ff75 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_FACTOR.sci @@ -0,0 +1,20 @@ +function opout = FA_SZ_FACTOR(inval) + +// 17-Dec-2016 -- Author : Shamik Guha + +inval=string(inval); +if (isnum(inval)) then + in_num = eval(inval) ; + out=factor(in_num); + //disp(out); + +else + error(36, "Wrong input argument "+inval+"."); + +end + + +out=(length(out)); +opout=string(out); + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci new file mode 100644 index 00000000..5ff03a60 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_FROM_VAL.sci @@ -0,0 +1,36 @@ +function opout = FA_SZ_FROM_VAL(in1,in2) +// function opout = FA_SZ_FROM_VAL(in1,in2) +// ----------------------------------------------------------------- +// Return a size according to the floored value of the first argument +// +// Input data: +// in1: string specifying a number . +// +// Output data: +// opout: string containing the computed result. +// +// ----------------------------------------------------------------- + +SCI2CNInArgCheck(argn(2),2,2); + + +if (isnum(in1)) + in1num = eval(in1) ; + if isnan(in1num) + opout = '__SCI2CNANSIZE'; + elseif ( in1num < 0 ) + opout= '0' ; + else + opout = string ( floor (abs(in1num))) ; + + end + +else + opout = in2+"0floor"+in2+"0"+"("+in1+")"; + opout = in2+"0abs"+in2+"0"+"("+opout+")"; + + +end + + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci new file mode 100644 index 00000000..86f2aa7d --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_LINSPACE_ROW.sci @@ -0,0 +1,33 @@ +function outsize = FA_SZ_LINSPACE_ROW(insize) +//function outsize = FA_SZ_LINSPACE_ROW(insize) +// ----------------------------------------------------------------- +// Get size of row for output for linspace function +// +// Input data: +// insize: string specifying the size of first input argument. +// +// Output data: +// outsize: string containing the row size of output argument. +// +// 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: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + + in1num = string(eval(insize(1))); + outsize = in1num; +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_LQE.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_LQE.sci new file mode 100644 index 00000000..6ddd1988 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_LQE.sci @@ -0,0 +1,37 @@ +function outsize = FA_SZ_LQE(inval,insz) +//function outsize = FA_SZ_LQE(inval,insz) +// ----------------------------------------------------------------- +// Get size of output for lqe function +// +// Input data: +// inval: string specifying the value of input argument. +// insz: string specifying the size of input argument. +// +// Output data: +// outsize: string containing the size for second output argument. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + + inval = eval(inval) + insz = eval(insz) + outsize(1) = string(int(inval)); + outsize(2) = string(insz-int(inval)); + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_LQR.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_LQR.sci new file mode 100644 index 00000000..cf1884aa --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_LQR.sci @@ -0,0 +1,34 @@ +function outsize = FA_SZ_LQR(inval) +//function outsize = FA_SZ_LQR(inval) +// ----------------------------------------------------------------- +// Get size of output for lqr function +// +// Input data: +// inval: string specifying the value of input argument. +// +// Output data: +// outsize: string containing the size for output argument. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + + inval = eval(inval) + outsize(1) = string(int(inval)); + outsize(2) = string(modulo(inval*10,10)); + endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci new file mode 100644 index 00000000..a7cb85b9 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OBSCNT.sci @@ -0,0 +1,48 @@ +function outsize = FA_SZ_OBSCNT(inval,insz1,insz2,nout) +//function outsize = FA_SZ_OBSCNT(inval,insz1,insz2,nout) +// ----------------------------------------------------------------- +// Get size of output for obscont function +// +// Input data: +// inval: string specifying the value of first input argument. +// insz1: string specifying the row size of first input argument. +// insz2: string specifying the col size of first input argument. +// nout: string specifying number of output arguments +// +// Output data: +// outsize: string containing the size for output argument. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(4),4,4); + + inval = eval(inval); + insz1 = eval(insz1); + insz2 = eval(insz2); + //nout = eval(nout); + no_of_st = int(inval); + no_of_in = insz2 - no_of_st; + no_of_op = insz1 - no_of_st; + if(nout == 1) + outsize(1) = string(no_of_st+no_of_op+2); + outsize(2) = string(no_of_st+no_of_in); + else + outsize(1) = string(no_of_st+no_of_in+no_of_op+2); + outsize(2) = string(no_of_st+no_of_in+no_of_op); + end +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPAPEX.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPAPEX.sci new file mode 100644 index 00000000..a93e8c50 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPAPEX.sci @@ -0,0 +1,26 @@ +function opoutsize = FA_SZ_OPAPEX(in1size)
+// function opoutsize = FA_SZ_OPAPEX(in1size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPAPEX operator.
+//
+//
+// Status:
+// 08-Jan-2008 -- Raffaele Nutricato: Author.
+// 08-Jan-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+opoutsize(1) = string(in1size(2));
+opoutsize(2) = string(in1size(1));
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPBACKSLASH.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPBACKSLASH.sci new file mode 100644 index 00000000..9d0625bd --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPBACKSLASH.sci @@ -0,0 +1,39 @@ +function opoutsize = FA_SZ_OPBACKSLASH(in1size,in2size)
+// function opoutsize = FA_SZ_OPBACKSLASH(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPBACKSLASH operator.
+//
+//
+// Status:
+// 08-Mar-2008 -- Alberto Morea: Author.
+// 08-Mar-2008 -- Raffaele Nutricato: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+in1size=string(in1size);
+in2size=string(in2size);
+
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+
+if (in1dim == 0)
+ opoutsize = in2size;
+elseif (in2dim == 0)
+ opoutsize = in1size;
+else
+ opoutsize(1) = in1size(2);
+ opoutsize(2) = in2size(2);
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci new file mode 100644 index 00000000..50527771 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPCC.sci @@ -0,0 +1,40 @@ +function opoutsize = FA_SZ_OPCC(in1size,in2size)
+// function opoutsize = FA_SZ_OPCC(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPCC operator.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+in1size = string(in1size);
+in2size = string(in2size);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+
+if (isnum(in1size(1)) & isnum(in2size(1)))
+ in1num = eval(in1size(1));
+ in2num = eval(in2size(1));
+ opoutsize(1) = string(in1num+in2num);
+else
+ opoutsize(1) = '('+string(in1size(1))+'+'+string(in2size(1))+')';
+end
+
+opoutsize(2) = in1size(2);
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTAPEX.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTAPEX.sci new file mode 100644 index 00000000..64e8030e --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTAPEX.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPDOTAPEX(in1size)
+// function opoutsize = FA_SZ_OPDOTAPEX(in1size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTAPEX.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTAPEX(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTBACKSLASH.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTBACKSLASH.sci new file mode 100644 index 00000000..75f4d5c3 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTBACKSLASH.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPDOTBACKSLASH(in1size,in2size)
+// function opoutsize = FA_SZ_OPDOTBACKSLASH(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTHAT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTHAT.sci new file mode 100644 index 00000000..af522bac --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTHAT.sci @@ -0,0 +1,43 @@ +function opoutsize = FA_SZ_OPDOTHAT(in1size,in2size)
+// function opoutsize = FA_SZ_OPDOTHAT(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPDOTHAT operator.
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in1c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 10-Dec-2007 -- Raffaele Nutricato: Author.
+// 10-Dec-2007 -- Alberto Morea: Test Ok.
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTSLASH.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTSLASH.sci new file mode 100644 index 00000000..2a071f27 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTSLASH.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPDOTSLASH(in1size,in2size)
+// function opoutsize = FA_SZ_OPDOTSLASH(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTSTAR.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTSTAR.sci new file mode 100644 index 00000000..3fbae19a --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPDOTSTAR.sci @@ -0,0 +1,32 @@ +function opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size)
+// function opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPDOTSTAR operator.
+//
+//
+// Status:
+// 08-Jan-2008 -- Raffaele Nutricato: Author.
+// 08-Jan-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+
+if (in1dim == 0)
+ opoutsize = string(in2size);
+else
+ opoutsize = string(in1size);
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPHAT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPHAT.sci new file mode 100644 index 00000000..31174511 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPHAT.sci @@ -0,0 +1,43 @@ +function opoutsize = FA_SZ_OPHAT(in1size,in2size)
+// function opoutsize = FA_SZ_OPHAT(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPHAT operator.
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in1c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 10-Dec-2007 -- Raffaele Nutricato: Author.
+// 10-Dec-2007 -- Alberto Morea: Test Ok.
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGAND.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGAND.sci new file mode 100644 index 00000000..099bb9ac --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGAND.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGAND(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGAND(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGEQ.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGEQ.sci new file mode 100644 index 00000000..4ade6a0f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGEQ.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGEQ(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGEQ(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGGE.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGGE.sci new file mode 100644 index 00000000..c6d6ee3f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGGE.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGGE(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGGE(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGGT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGGT.sci new file mode 100644 index 00000000..0f6493c9 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGGT.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGGT(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGGT(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGLE.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGLE.sci new file mode 100644 index 00000000..edda359f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGLE.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGLE(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGLE(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGLT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGLT.sci new file mode 100644 index 00000000..81b1b256 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGLT.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGLT(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGLT(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGNE.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGNE.sci new file mode 100644 index 00000000..ff62abbf --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGNE.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGNE(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGNE(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGNOT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGNOT.sci new file mode 100644 index 00000000..3b0c6549 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGNOT.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGNOT(in1size)
+// function opoutsize = FA_SZ_OPLOGNOT(in1size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTAPEX.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTAPEX(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGOR.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGOR.sci new file mode 100644 index 00000000..f28eec2f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPLOGOR.sci @@ -0,0 +1,16 @@ +function opoutsize = FA_SZ_OPLOGOR(in1size,in2size)
+// function opoutsize = FA_SZ_OPLOGOR(in1size,in2size)
+// -----------------------------------------------------------------
+// Alias of FA_SZ_OPDOTSTAR.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+opoutsize = FA_SZ_OPDOTSTAR(in1size,in2size);
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPMINUS.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPMINUS.sci new file mode 100644 index 00000000..5f7fc96a --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPMINUS.sci @@ -0,0 +1,51 @@ +function opoutsize = FA_SZ_OPMINUS(in1size,in2size)
+// function opoutsize = FA_SZ_OPMINUS(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPMINUS operator.
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in1c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 08-Dec-2007 -- Raffaele Nutricato: Author.
+// 08-Dec-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+opoutsize = FA_SZ_OPPLUSA(in1size,in2size);
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci new file mode 100644 index 00000000..f439e23e --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPPLUS.sci @@ -0,0 +1,93 @@ +function opoutsize = FA_SZ_OPPLUS(in1size,in2size,in1type,in2type)
+// function opoutsize = FA_SZ_OPPLUS(in1size,in2size,in1type,in2type)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPPLUS operator,
+// including the string operations.
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in1c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+// There is also the case related to the string catenation!
+// This is the main difference between - and + operators.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 08-Dec-2007 -- Raffaele Nutricato: Author.
+// 08-Dec-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),4,4);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1size = string(in1size);
+in2size = string(in2size);
+in1type = string(in1type);
+in2type = string(in2type);
+in1dim = GetSymbolDimension(in1size);
+
+if ((in1type ~= 'g') & (in2type ~= 'g'))
+ opoutsize = FA_SZ_OPPLUSA(in1size,in2size);
+elseif ((in1type == 'g') & (in2type == 'g'))
+ opoutsize(1) = '1';
+ if (isnum(in1size(1)) & isnum(in2size(1)))
+ in1num = eval(in1size(1));
+ in2num = eval(in2size(1));
+ if (in1num > 1 | in2num > 1)
+ error(9999, 'String catenation can be performed only on strings of 1 x N size not N x 1 size');
+ //NUT: mi pare che non possano proprio esistere stringe di dimensione Nx1 perche' in
+ //NUT: scilab esiste il tipo string che e' di size 1x1 e sono io a trasformarlo in
+ //NUT: 1xN per cui se uso sempre questa convenzione non sbaglio mai.
+ //NUT: ho provato in scilab a fare la trasposta di una stringa e ottengo sempre 1x1.
+ end
+ end
+ if (isnum(in1size(2)) & isnum(in2size(2)))
+ in1num = eval(in1size(2));
+ in2num = eval(in2size(2));
+ opoutsize(2) = string(in1num+in2num-1);
+ if isnan(opoutsize(2))
+ opoutsize(2) = '__SCI2CNANSIZE';
+ else
+ opoutsize(2) = string(opoutsize(2));
+ end
+ else
+ opoutsize(2) = '('+string(in1size(2))+'+'+string(in2size(2))+'-1)';
+ end
+else
+ error(9999, 'Unexpected type combination for ""+"" operator (type1,type2): ('+in1type+in2type+').');
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPPLUSA.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPPLUSA.sci new file mode 100644 index 00000000..42ba90d5 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPPLUSA.sci @@ -0,0 +1,66 @@ +function opoutsize = FA_SZ_OPPLUSA(in1size,in2size)
+// function opoutsize = FA_SZ_OPPLUSA(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPPLUS operator
+// restricted to arithmetic operations (string operations not supported.)
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in1c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+// There is also the case related to the string catenation!
+// This is the main difference between - and + operators.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 18-Mar-2008 -- Raffaele Nutricato: Author.
+// 18-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1size = string(in1size);
+in2size = string(in2size);
+in1dim = GetSymbolDimension(in1size);
+
+if (in1dim == 0)
+ opoutsize = in2size;
+else
+ opoutsize = in1size;
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPRC.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPRC.sci new file mode 100644 index 00000000..c4da4a0f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPRC.sci @@ -0,0 +1,40 @@ +function opoutsize = FA_SZ_OPRC(in1size,in2size)
+// function opoutsize = FA_SZ_OPRC(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPRC operator.
+//
+//
+// Status:
+// 08-Mar-2008 -- Raffaele Nutricato: Author.
+// 08-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+in1size = string(in1size);
+in2size = string(in2size);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+
+opoutsize(1) = in1size(1);
+
+if (isnum(in1size(2)) & isnum(in2size(2)))
+ in1num = eval(in1size(2));
+ in2num = eval(in2size(2));
+ opoutsize(2) = string(in1num+in2num);
+else
+ opoutsize(2) = '('+string(in1size(2))+'+'+string(in2size(2))+')';
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPSLASH.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPSLASH.sci new file mode 100644 index 00000000..a44057d9 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPSLASH.sci @@ -0,0 +1,37 @@ +function opoutsize = FA_SZ_OPSLASH(in1size,in2size)
+// function opoutsize = FA_SZ_OPSLASH(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPSLASH operator.
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+in1size = string(in1size);
+in2size = string(in2size);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+
+if (in1dim == 0)
+ opoutsize = in2size;
+elseif (in2dim == 0)
+ opoutsize = in1size;
+else
+ opoutsize(1) = in1size(1);
+ opoutsize(2) = in2size(1);
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_OPSTAR.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPSTAR.sci new file mode 100644 index 00000000..12190d38 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_OPSTAR.sci @@ -0,0 +1,68 @@ +function opoutsize = FA_SZ_OPSTAR(in1size,in2size)
+// function opoutsize = FA_SZ_OPSTAR(in1size,in2size)
+// -----------------------------------------------------------------
+// Returns the size of the output computed by OPSTAR operator.
+//
+// Assuming:
+// size(in1) = [in1r,in1c]
+// size(in2) = [in2r,in2c]
+// size(out) = [outr,outc]
+//
+// we have the following combinations:
+// in1 in2 outr outc
+// -----------------------
+// S S in2r in2c
+// S M in2r in2c
+// M S in1r in1c
+// M M in1r in2c
+//
+// Where S means that the input is a scalar
+// and M means that the input is a matrix.
+//
+// Input data:
+// in1size: size of input number 1. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// in2size: size of input number 2. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Output data:
+// opoutsize: size of output. It is an array of 2 strings.
+// The first string specifies the number of rows.
+// The second string specifies the number of columns.
+//
+// Status:
+// 08-Dec-2007 -- Raffaele Nutricato: Author.
+// 08-Dec-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+in1size = string(in1size);
+in2size = string(in2size);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+// --- Get dimensions of input arguments. ---
+in1dim = GetSymbolDimension(in1size);
+in2dim = GetSymbolDimension(in2size);
+
+if (in1dim == 0)
+ opoutsize = in2size;
+elseif (in2dim == 0)
+ opoutsize = in1size;
+else
+ opoutsize(1) = in1size(1);
+ opoutsize(2) = in2size(2);
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_PRIMES.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_PRIMES.sci new file mode 100644 index 00000000..5a450686 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_PRIMES.sci @@ -0,0 +1,21 @@ +function opout = FA_SZ_PRIMES(inval) + +// 17-Dec-2016 -- Author : Shamik Guha + +inval=string(inval); +if (isnum(inval)) then + in_num = eval(inval) ; + out=primes(in_num); + //disp(out); + +else + error(36, "Wrong input argument "+inval+"."); + +end + + +out=(length(out)); +opout=string(out); +//disp(opout); + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci new file mode 100644 index 00000000..527217a5 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.sci @@ -0,0 +1,50 @@ +function outsize = FA_SZ_ROW_COLUMN_CAT(inval,in1size,in2size)
+//function outsize = FA_SZ_ROW_COLUMN_CAT(inval,in1size,in2size)
+// -----------------------------------------------------------------
+// Get size of row (col) of the output for cat function
+//
+// Input data:
+// inval: string specifying the value of input argument.
+// in1size: string specifying the row (col) of second input
+// in3size: string specifying the row (col) of third input
+// Output data:
+// outsize: string containing the column size for output argument.
+//
+// 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: Mushir
+// Organization: FOSSEE, IIT Bombay
+// Email: toolbox@scilab.in
+//
+
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+
+in1size = string(in1size);
+in2size = string(in2size);
+inval = string(inval);
+if(inval == '1') then
+ in1num_r = eval(in1size);
+ in2num_r = eval(in2size);
+ outsize(1) = string(in1num_r + in2num_r);
+ outsize(2) = string(in2num_r);
+elseif(inval == '2') then
+ in1num_c = eval(in1size);
+ in2num_c = eval(in2size);
+ outsize(1) = string(in1num_c);
+ outsize(2) = string(in1num_c + in2num_c);
+else
+ error(36, "Wrong input argument "+inval+". Use 1 or 2 as first argument in cat command.");
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci new file mode 100644 index 00000000..1417b42b --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_DIAG.sci @@ -0,0 +1,38 @@ +function outsize = FA_SZ_ROW_DIAG(insize) +//function outsize = FA_SZ_ROW_DIAG(insize) +// ----------------------------------------------------------------- +// Get size of row of the output for diag function +// +// Input data: +// insize: string specifying the size of input argument. +// +// Output data: +// outsize: string containing the row size for output argument. +// +// 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: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(1),1,1); + +if(insize(1)=='1') then + outsize = insize(2); +elseif(insize(1) == insize(2)) + outsize = insize(1); +else + outsize = insize(1); +end +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci new file mode 100644 index 00000000..1dddfb77 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_DIAG_INS_EXT.sci @@ -0,0 +1,103 @@ +function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) +//function outsize = FA_SZ_ROW_DIAG_INS_EXT(insize,val) +// ----------------------------------------------------------------- +// Get row size of output for diag(insert) function +// +// Input data: +// insize: string specifying the size of first input argument. +// val: string specifying the value of second input argument. +// +// Output data: +// outsize: string containing the size for output argument. +// +// 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: Mushir +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),2,2); + + // val ==> Position value ...,-2,-1,0,1,2.... + //insize ==> insize(1) will give ROW size and insize(2) will give COLUMN size. + insize = string(insize); + row_num = eval(insize(1)); + col_num = eval(insize(2)); + val_num = eval(val); + ///////////////////// FOR INSERT CONDITION ////////////////////////////// + + + + if(row_num == 1) + if(val_num == 0) then // For 0th position + outsize = string(col_num);// ROW size is equal to COLUMN size + + else // For ....-2,-1,1,2... positions + outsize = string(col_num+abs(val_num)); + //ROW is equal to COLUMN SIZE + position value (i.e for 1*4 matrix and insert position 1 then ROW size is 4+1 = 5 ) + + end + elseif(col_num == 1) // if Column size is one + if(val_num == 0) then // For Oth position + outsize = string(row_num); // ROW size is equal to ROW size + + else // ....-2,-1,1,2... positions. + outsize = string(row_num + abs(val_num)); + //ROW is equal to ROW SIZE + position value (i.e for 4*1 matrix and insert position 1 then ROW size is 4+1 = 5 ) + + end + + ///////////////////////////////////////////////////////////////////////////// + + + //////////////////////////// FOR EXTRACT CONDITION ///////////////////////// + + elseif(row_num == col_num) // For no. of rows equal to no. of column (R == C) + if(val_num == 0) then //For 0th position + outsize = string(col_num); // No. of row is equal to column size + else //For ....-2,-1,1,2... Positions + outsize = string(col_num-abs(val_num)); //row value is equal to subtraction of column size and absolute value of position (i.e +ve and -ve both position values) + end + elseif(row_num > col_num) // for no. of rows greater than no. of column (R > C) + if(val_num == 0) then // if 0th position + outsize = string(col_num); // No. of row is equal to column size + elseif(val_num > 0) then // For +ve positions i.e 1,2,3..... + outsize = string(col_num-abs(val_num)); // No. of row is equal to subtraction of column size and absolute value of +ve postion + + elseif(val_num < 0 ) then // For -ve positions i.e -1,-2,-3 + temp_outsize1 = row_num-abs(val_num); //In this row values are varying for 4*3 matrix there is no repetition of same row values,for 5*3 matrix there is (5-3 = 2) two same row size(i.e 3 and 3) for -1,-2 position and for 6*3 matrix there is (6-3 = 3) three same row size(i.e 3 ,3,3) for -1,-2,-3 position + if(temp_outsize1 >= col_num) // if temp_outsize1 is greater than equal to column size then + outsize = string(col_num); // row size is equal to column + else + outsize = string(row_num-abs(val_num)); // else row size is substractio of row and abosulte value of position(i.e -1,-2,-3) + end + end + elseif(row_num < col_num) // for no. of rows less than no. of column size + if(val_num == 0) then // if 0th position + outsize = string(row_num); // No. of row is equal to row size + elseif(val_num > 0) then // for +ve positions i.e 1,2 3..... + temp_outsize2 = col_num-abs(val_num);// In this column values are varying for 3*4 matrix there is no repetition of same row values,for 3*5 matrix there is (5-3 =2) two same row size (i.e 3, 3 ) for 1 ,2 position and for 3*6 matrix there is (6-3 = 3) three row size (i.e 3 ,3 ,3) for 1,2 3 position + if(temp_outsize2 >= row_num) // if temp_outsize2 is greater than equal to row size then + outsize = string(row_num); // row size is equal to row size + else + outsize = string(col_num-abs(val_num)); // else row size substractio of column and absolute value + end + elseif(val_num < 0) then // for -ve positions i.e -1,-2,-3 .. positions + outsize = string(row_num-abs(val_num)); // row size is substraction of row size and absolute value of position values(-1,-2,-3) + end + + ////////////////////////////////////////////////////////////////////////////////////// + end + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_SEL1.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_SEL1.sci new file mode 100644 index 00000000..6071e960 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_SEL1.sci @@ -0,0 +1,48 @@ +function opout = FA_SZ_SEL1(in1,in2)
+// function opout = FA_SZ_SEL1(in1,in2)
+// -----------------------------------------------------------------
+// Determines the number of rows of the output arguments
+// according to the number of rows of the first input argument and
+// the specifier in2 which can be 1,2 or 'r','c' and 'm'.
+// In this release the 'm' specifier is not supported so when it is
+// used SCI2C will issue an error.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// Status:
+// 16-Mar-2008 -- Raffaele Nutricato: Author.
+// 16-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------ + +
+SCI2CNInArgCheck(argn(2),2,2);
+ReportFileName = '';
+in2 = string(in2);
+
+if (in2 == '1' | in2 == '""rr""' ) // Where can r become rr ???
+ opout = '1';
+elseif (in2 == '2' | in2 == '""c""' )
+ opout = in1; + +
+else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Cannot associate the second input argument to a known specifier.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Please rearrange your code by using one of the following specifiers:',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: 1 or 2.',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Cannot associate the second input argument to a known specifier.');
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_SEL2.sci b/2.3-1/macros/FunctionAnnotation/FA_SZ_SEL2.sci new file mode 100644 index 00000000..b0be739f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_SEL2.sci @@ -0,0 +1,44 @@ +function opout = FA_SZ_SEL2(in1,in2)
+// function opout = FA_SZ_SEL2(in1,in2)
+// -----------------------------------------------------------------
+// Determines the number of columns of the output arguments
+// according to the number of columns of the first input argument and
+// the specifier in2 which can be 1,2 or 'r','c' and 'm'.
+// In this release the 'm' specifier is not supported so when it is
+// used SCI2C will issue an error.
+//
+// Input data:
+// in1: string specifying a number or a symbol.
+// in2: string specifying a number or a symbol.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// Status:
+// 16-Mar-2008 -- Raffaele Nutricato: Author.
+// 16-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+ReportFileName = '';
+in2 = string(in2);
+
+if (in2 == '1'| in2 == '""rr""')
+ opout = in1;
+elseif (in2 == '2'| in2 == '""c""')
+ opout = '1';
+else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Cannot associate the second input argument to a known specifier.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Please rearrange your code by using one of the following specifiers:',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: 1 or 2.',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Cannot associate the second input argument to a known specifier.');
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_C.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_C.sci new file mode 100644 index 00000000..b383b5ac --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_C.sci @@ -0,0 +1,32 @@ +function typeout = FA_TP_C()
+// function typeout = FA_TP_C()
+// -----------------------------------------------------------------
+// Returns the "single complex" type specifier
+// for Function Annotations.
+//
+// Input data:
+// ---
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,0);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+typeout = 'c';
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_COMPLEX.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_COMPLEX.sci new file mode 100644 index 00000000..bf3f2f9f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_COMPLEX.sci @@ -0,0 +1,42 @@ +function typeout = FA_TP_COMPLEX(in1)
+// function typeout = FA_TP_COMPLEX(in1)
+// -----------------------------------------------------------------
+// Converts into complex data type the input argument, by preserving
+// the precision of the input argument.
+// See following examples:
+// FA_TP_COMPLEX('s') = 'c'
+// FA_TP_COMPLEX('d') = 'z'
+// FA_TP_COMPLEX('c') = 'c'
+// FA_TP_COMPLEX('z') = 'z'
+//
+// Input data:
+// in1: string specifying the data type number 1.
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// Status:
+// 26-Jan-2008 -- Raffaele Nutricato: Author.
+// 26-Jan-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+if (in1 == 's')
+ typeout = 'c';
+elseif (in1 == 'd')
+ typeout = 'z';
+else
+ typeout = in1;
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci new file mode 100644 index 00000000..5e87ab81 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_CVIMAGE.sci @@ -0,0 +1,37 @@ +function typeout = FA_TP_CVIMAGE() +// function typeout = FA_TP_INT16() +// ----------------------------------------------------------------- +// Returns the OpenCV image type specifier (im) +// for Function Annotations. +// +// Input data: +// --- +// +// Output data: +// typeout: string containing the type specifier. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +typeout = 'im'; + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_D.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_D.sci new file mode 100644 index 00000000..788a03fe --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_D.sci @@ -0,0 +1,32 @@ +function typeout = FA_TP_D()
+// function typeout = FA_TP_D()
+// -----------------------------------------------------------------
+// Returns the "double" type specifier
+// for Function Annotations.
+//
+// Input data:
+// ---
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,0);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+typeout = 'd';
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_I.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_I.sci new file mode 100644 index 00000000..94f383f4 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_I.sci @@ -0,0 +1,32 @@ +function typeout = FA_TP_I()
+// function typeout = FA_TP_I()
+// -----------------------------------------------------------------
+// Returns the "int" type specifier
+// for Function Annotations.
+//
+// Input data:
+// ---
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,0);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+typeout = 'i';
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_INT16.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_INT16.sci new file mode 100644 index 00000000..b7e25cad --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_INT16.sci @@ -0,0 +1,37 @@ +function typeout = FA_TP_INT16() +// function typeout = FA_TP_INT16() +// ----------------------------------------------------------------- +// Returns the "int16" type specifier +// for Function Annotations. +// +// Input data: +// --- +// +// Output data: +// typeout: string containing the type specifier. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +typeout = 'i16'; + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_INT8.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_INT8.sci new file mode 100644 index 00000000..f1e2bf26 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_INT8.sci @@ -0,0 +1,37 @@ +function typeout = FA_TP_INT8() +// function typeout = FA_TP_INT8() +// ----------------------------------------------------------------- +// Returns the "int8" type specifier +// for Function Annotations. +// +// Input data: +// --- +// +// Output data: +// typeout: string containing the type specifier. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +typeout = 'i8'; + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_MAX.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_MAX.sci new file mode 100644 index 00000000..0b78f9e3 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_MAX.sci @@ -0,0 +1,45 @@ +function opout = FA_TP_MAX(in1,in2)
+// function opout = FA_TP_MAX(in1,in2)
+// -----------------------------------------------------------------
+// Type-Maximum function for Function Annotations.
+// Returns the maximum between the two data types in input according
+// to a predefined priority. For example z(double complex) is
+// greater that c(single complex).
+//
+// Input data:
+// in1: string specifying the data type number 1.
+// in2: string specifying the data type number 2.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+in1Pin2 = in1+in2;
+opout = in1;
+
+if (in2 == 'z')
+ opout = 'z';
+elseif (in1Pin2 == 'sd')
+ opout = 'd';
+elseif (in1Pin2 == 'sc')
+ opout = 'c';
+elseif (in1Pin2 == 'dc')
+ opout = 'z';
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_MIN_REAL.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_MIN_REAL.sci new file mode 100644 index 00000000..43fc7926 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_MIN_REAL.sci @@ -0,0 +1,35 @@ +function opout = FA_TP_MIN_REAL(in1,in2) +// Status: +// 2009 -- Arnaud Torset: Author. +// +// ----------------------------------------------------------------- +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) INRIA +// +// 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 + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +//SCI2CNInArgCheck(argn(2),2,2); + +in1Pin2 = in1+in2; +opout = in1; + +if (opout == 'c') + opout = 's'; +elseif (opout == 'z') + opout = 'd'; +end + +if (in2 == 'c') + opout = 's'; +elseif (in2 == 's') + opout = 's'; +end + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_REAL.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_REAL.sci new file mode 100644 index 00000000..67a946dc --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_REAL.sci @@ -0,0 +1,38 @@ +function opout = FA_TP_REAL(in1)
+// function opout = FA_TP_REAL(in1)
+// -----------------------------------------------------------------
+// Type-Real function for Function Annotations.
+// Returns the real precision corresponding to the precision of
+// the input operand.
+//
+// Input data:
+// in1: string specifying the data type number 1.
+//
+// Output data:
+// opout: string containing the computed result.
+//
+// Status:
+// 26-Mar-2008 -- Raffaele Nutricato: Author.
+// 26-Mar-2008 -- Alberto Morea: Test Ok.
+//
+// Copyright 2008 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+opout = in1;
+
+if (in1 == 'c')
+ opout = 's';
+elseif (in1 == 'z')
+ opout = 'd';
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_S.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_S.sci new file mode 100644 index 00000000..3de4c20c --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_S.sci @@ -0,0 +1,32 @@ +function typeout = FA_TP_S()
+// function typeout = FA_TP_S()
+// -----------------------------------------------------------------
+// Returns the "float" type specifier
+// for Function Annotations.
+//
+// Input data:
+// ---
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,0);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+typeout = 's';
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_UINT16.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_UINT16.sci new file mode 100644 index 00000000..b77d7751 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_UINT16.sci @@ -0,0 +1,37 @@ +function typeout = FA_TP_UINT16() +// function typeout = FA_TP_UINT16() +// ----------------------------------------------------------------- +// Returns the "uint16" type specifier +// for Function Annotations. +// +// Input data: +// --- +// +// Output data: +// typeout: string containing the type specifier. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +typeout = 'u16'; + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_UINT8.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_UINT8.sci new file mode 100644 index 00000000..f31cde0f --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_UINT8.sci @@ -0,0 +1,37 @@ +function typeout = FA_TP_UINT8() +// function typeout = FA_TP_UINT8() +// ----------------------------------------------------------------- +// Returns the "uint8" type specifier +// for Function Annotations. +// +// Input data: +// --- +// +// Output data: +// typeout: string containing the type specifier. +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),0,0); + + +// ------------------------ +// --- Generate Output. --- +// ------------------------ +typeout = 'u8'; + +endfunction diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_USER.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_USER.sci new file mode 100644 index 00000000..e60a8ce8 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_USER.sci @@ -0,0 +1,38 @@ +function type_out = FA_TP_USER(PrecisionSpecifier,DefaultType)
+// function type_out = FA_TP_USER(PrecisionSpecifier,DefaultType)
+// -----------------------------------------------------------------
+// Generate the output type of the output argument by using the
+// output (AnnotationFnc) generated by CheckAnnotationFunction.
+// double and float functions can be used to specify the type
+// of the output argument. They are typically used in combination
+// with zeros-like function.
+//
+// Input data:
+// PrecisionSpecifier: it can be 'double' or 'float'.
+//
+// Output data:
+// type_out: specifies the type of the output argument. It can be
+// 's' for float precision or 'd' for double precision.
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+// 26-Oct-2007 -- Alberto Morea: Test Ok.
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+if (mtlb_strcmp(PrecisionSpecifier,'int'))
+ type_out = 'i';
+elseif (mtlb_strcmp(PrecisionSpecifier,'float'))
+ type_out = 's';
+elseif (mtlb_strcmp(PrecisionSpecifier,'double'))
+ type_out = 'd';
+elseif (mtlb_strcmp(PrecisionSpecifier,'default'))
+ type_out = DefaultType;
+else
+ error(9999, 'Unknown precision function: ""'+AnnotationFnc+'"".');
+end
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/FA_TP_Z.sci b/2.3-1/macros/FunctionAnnotation/FA_TP_Z.sci new file mode 100644 index 00000000..2ac18dea --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/FA_TP_Z.sci @@ -0,0 +1,32 @@ +function typeout = FA_TP_Z()
+// function typeout = FA_TP_Z()
+// -----------------------------------------------------------------
+// Returns the "double complex" type specifier
+// for Function Annotations.
+//
+// Input data:
+// ---
+//
+// Output data:
+// typeout: string containing the type specifier.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,0);
+
+
+// ------------------------
+// --- Generate Output. ---
+// ------------------------
+typeout = 'z';
+
+endfunction
diff --git a/2.3-1/macros/FunctionAnnotation/buildmacros.sce b/2.3-1/macros/FunctionAnnotation/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/FunctionAnnotation/lib b/2.3-1/macros/FunctionAnnotation/lib Binary files differnew file mode 100644 index 00000000..005780a4 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/lib diff --git a/2.3-1/macros/FunctionAnnotation/names b/2.3-1/macros/FunctionAnnotation/names new file mode 100644 index 00000000..8962de09 --- /dev/null +++ b/2.3-1/macros/FunctionAnnotation/names @@ -0,0 +1,74 @@ +FA_ADD +FA_DIV +FA_GetDefaultPrecision +FA_GetFunAnn +FA_GetOutArgInfo +FA_GetResizeApproach +FA_INT +FA_MAX +FA_MIN +FA_MUL +FA_REAL +FA_SCHUR_SZ +FA_SCHUR_TP +FA_SUB +FA_SZ_1 +FA_SZ_2 +FA_SZ_COLUMN_DIAG +FA_SZ_COL_DIAG_IN_EX +FA_SZ_DEC2BASE +FA_SZ_DEC2BIN +FA_SZ_DEC2HEX +FA_SZ_DEC2OCT +FA_SZ_DIFF +FA_SZ_FACTOR +FA_SZ_FROM_VAL +FA_SZ_LINSPACE_ROW +FA_SZ_LQE +FA_SZ_LQR +FA_SZ_OBSCNT +FA_SZ_OPAPEX +FA_SZ_OPBACKSLASH +FA_SZ_OPCC +FA_SZ_OPDOTAPEX +FA_SZ_OPDOTBACKSLASH +FA_SZ_OPDOTHAT +FA_SZ_OPDOTSLASH +FA_SZ_OPDOTSTAR +FA_SZ_OPHAT +FA_SZ_OPLOGAND +FA_SZ_OPLOGEQ +FA_SZ_OPLOGGE +FA_SZ_OPLOGGT +FA_SZ_OPLOGLE +FA_SZ_OPLOGLT +FA_SZ_OPLOGNE +FA_SZ_OPLOGNOT +FA_SZ_OPLOGOR +FA_SZ_OPMINUS +FA_SZ_OPPLUS +FA_SZ_OPPLUSA +FA_SZ_OPRC +FA_SZ_OPSLASH +FA_SZ_OPSTAR +FA_SZ_PRIMES +FA_SZ_ROW_COLUMN_CAT +FA_SZ_ROW_DIAG +FA_SZ_ROW_DIAG_INS_EXT +FA_SZ_SEL1 +FA_SZ_SEL2 +FA_TP_C +FA_TP_COMPLEX +FA_TP_CVIMAGE +FA_TP_D +FA_TP_I +FA_TP_INT16 +FA_TP_INT8 +FA_TP_MAX +FA_TP_MIN_REAL +FA_TP_REAL +FA_TP_S +FA_TP_UINT16 +FA_TP_UINT8 +FA_TP_USER +FA_TP_Z diff --git a/2.3-1/macros/FunctionList/FL_ExistCFunction.sci b/2.3-1/macros/FunctionList/FL_ExistCFunction.sci new file mode 100644 index 00000000..5b63ec5b --- /dev/null +++ b/2.3-1/macros/FunctionList/FL_ExistCFunction.sci @@ -0,0 +1,106 @@ +function flagexist = FL_ExistCFunction(CFunName,USER2CAvailableCDat,SCI2CAvailableCDat,ConvertedDat,ToBeConvertedDat,ReportFileName)
+// function flagexist = FL_ExistCFunction(CFunName,USER2CAvailableCDat,SCI2CAvailableCDat,ConvertedDat,ToBeConvertedDat,ReportFileName)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 30-Oct-2007 -- Raffaele Nutricato: Author.
+// 30-Oct-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),6,6);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+flagexist = %F;
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+AvailableDat = USER2CAvailableCDat;
+load(AvailableDat,'Available');
+NAvail = size(Available,1);
+
+tmpcnt = 1;
+while ((tmpcnt <=NAvail) & (flagexist == %F))
+ if mtlb_strcmp(Available(tmpcnt),CFunName)
+ flagexist = %T;
+ // #RNU_RES_B
+ PrintStringInfo(' Found C Function Name in : '+AvailableDat,ReportFileName,'file','y');
+ // #RNU_RES_E
+ end
+ tmpcnt = tmpcnt + 1;
+end
+clear Available
+
+if (flagexist == %F)
+ AvailableDat = SCI2CAvailableCDat;
+ load(AvailableDat,'Available');
+ NAvail = size(Available,1);
+
+ tmpcnt = 1;
+ while ((tmpcnt <=NAvail) & (flagexist == %F))
+ if mtlb_strcmp(Available(tmpcnt),CFunName)
+ flagexist = %T;
+ // #RNU_RES_B
+ PrintStringInfo(' Found C Function Name in : '+AvailableDat,ReportFileName,'file','y');
+ // #RNU_RES_E
+ end
+ tmpcnt = tmpcnt + 1;
+ end
+ clear Available
+end
+
+if (flagexist == %F)
+ load(ConvertedDat,'Converted');
+ NConv = size(Converted,1);
+ tmpcnt = 1;
+ while ((tmpcnt <=NConv) & (flagexist == %F))
+ if mtlb_strcmp(Converted(tmpcnt),CFunName)
+ flagexist = %T;
+ // #RNU_RES_B
+ PrintStringInfo(' Found C Function Name in : '+ConvertedDat,ReportFileName,'file','y');
+ // #RNU_RES_E
+ end
+ tmpcnt = tmpcnt + 1;
+ end
+ clear Converted
+end
+
+if (flagexist == %F)
+ load(ToBeConvertedDat,'ToBeConverted');
+ NToBeConv = size(ToBeConverted,1);
+ tmpcnt = 1;
+ while ((tmpcnt <=NToBeConv) & (flagexist == %F))
+ if mtlb_strcmp(ToBeConverted(tmpcnt).CFunctionName,CFunName)
+ flagexist = %T;
+ // #RNU_RES_B
+ PrintStringInfo(' Found C Function Name in : '+ToBeConvertedDat,ReportFileName,'file','y');
+ // #RNU_RES_E
+ end
+ tmpcnt = tmpcnt + 1;
+ end
+ clear ToBeConverted
+end
+
+if (flagexist == %F)
+ // #RNU_RES_B
+ PrintStringInfo(' C Function Name not found in the ""Available"" , ""Converted"" and ""ToBeConverted"" function lists.',ReportFileName,'file','y');
+ // #RNU_RES_E
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionList/FL_ExtractFuncList.sci b/2.3-1/macros/FunctionList/FL_ExtractFuncList.sci new file mode 100644 index 00000000..cbc14655 --- /dev/null +++ b/2.3-1/macros/FunctionList/FL_ExtractFuncList.sci @@ -0,0 +1,62 @@ +function [CFuncList,NElements] = FL_ExtractFuncList(FunctionDir,ClassDir,SCI2CClassSpecifier,ExtFLCls,ReportFileName)
+// function [CFuncList,NElements] = FL_ExtractFuncList(FunctionDir,ClassDir,SCI2CClassSpecifier,ExtFLCls,ReportFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Extracts the list of the C functions available. To do that
+// this function enters in the directories where the .clst and
+// .lst files are stored.
+// #RNU_RES_E
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 05-Jan-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),5,5);
+
+// #RNU_RES_B
+// ---------------------------------------------------------
+// --- Extract the list of files in Functions directory. ---
+// ---------------------------------------------------------
+// #RNU_RES_E
+tmppwd = pwd();
+cd(FunctionDir);
+// funfiles = ls();
+funfiles = listfiles();
+cd(tmppwd);
+NFunFiles = size(funfiles,1);
+
+// #RNU_RES_B
+// -----------------------------------------------------------
+// --- Extract the C function list from Classes directory. ---
+// -----------------------------------------------------------
+// #RNU_RES_E
+CFuncList = '';
+NElements = 0;
+
+for cntfun = 1:NFunFiles
+ FunFileName = fullfile(FunctionDir,funfiles(cntfun));
+ ClassName = FL_GetFunctionClass(FunFileName,SCI2CClassSpecifier,ReportFileName);
+ ClassFileName = fullfile(ClassDir,ClassName);
+ [tmpfunlist,tmpnelem] = File2StringArray(ClassFileName+ExtFLCls);
+ [tmppath,tmpfunname,tmpext] = fileparts(FunFileName);
+ tmpfunlist = FL_InOutArgs2CFunNames(tmpfunname,tmpfunlist,tmpnelem);
+ for cnttmpfun = 1:tmpnelem
+ NElements = NElements + 1;
+ CFuncList(NElements) = tmpfunlist(cnttmpfun);
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionList/FL_GetFunctionClass.sci b/2.3-1/macros/FunctionList/FL_GetFunctionClass.sci new file mode 100644 index 00000000..09fad929 --- /dev/null +++ b/2.3-1/macros/FunctionList/FL_GetFunctionClass.sci @@ -0,0 +1,54 @@ +function SCI2CClassName = FL_GetFunctionClass(FunFileName,SCI2CClassSpecifier,ReportFileName)
+// function SCI2CClassName = FL_GetFunctionClass(FunFileName,SCI2CClassSpecifier,ReportFileName)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 11-Jul-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+// ---------------------------------------
+// --- Read the class of the function. ---
+// ---------------------------------------
+// --- Open the .sci file (read only). ---
+inannfid = SCI2COpenFileRead(FunFileName);
+
+FoundClass = 0;
+if (meof(inannfid) == 0)
+ check_string = stripblanks(mgetl(inannfid,1));
+ if (~isempty(check_string))
+ if (SCI2Cstrncmps1size(SCI2CClassSpecifier,check_string))
+ SCI2CClassName = part(check_string,length(SCI2CClassSpecifier)+1:length(check_string));
+ // #RNU_RES_B
+ PrintStringInfo(' Function belongs to class: '+SCI2CClassName+'.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ FoundClass = 1;
+ else
+ error(9999, 'Could not find ""'+SCI2CClassSpecifier+'"" in '+FunFileName+'.');
+ end
+ end
+end
+mclose(inannfid);
+if (FoundClass == 0)
+ error(9999, 'Could not find ""'+SCI2CClassSpecifier+'"" specifier.');
+end
+
+// -------------------------------------------
+// --- End read the class of the function. ---
+// -------------------------------------------
+endfunction
+
\ No newline at end of file diff --git a/2.3-1/macros/FunctionList/FL_InOutArgs2CFunNames.sci b/2.3-1/macros/FunctionList/FL_InOutArgs2CFunNames.sci new file mode 100644 index 00000000..e559f385 --- /dev/null +++ b/2.3-1/macros/FunctionList/FL_InOutArgs2CFunNames.sci @@ -0,0 +1,51 @@ +function FunNameCFuncList = FL_InOutArgs2CFunNames(FunctionName,CommaSepCFuncList,CFuncListNElem)
+// function FunNameCFuncList = FL_InOutArgs2CFunNames(FunctionName,CommaSepCFuncList,CFuncListNElem)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Reads a Comma Separated Function List and converts it into the
+// corresponding list of C function. In the Comma Separated
+// Function List only input and output arguments are specified
+// and they are separated by a comma.
+// #RNU_RES_E
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 05-Jan-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+
+FunNameCFuncList = '';
+SepChar = ',';
+for cntelem = 1:CFuncListNElem
+ tmptokens = tokens(CommaSepCFuncList(cntelem),SepChar);
+ if (size(tmptokens,1) == 0)
+ FunNameCFuncList(cntelem) = FunctionName;
+ elseif (size(tmptokens,1) == 1)
+ if part(tmptokens,1:1) == ','
+ FunNameCFuncList(cntelem) = FunctionName+tmptokens(2);
+ else
+ FunNameCFuncList(cntelem) = tmptokens(1)+FunctionName;
+ end
+ elseif (size(tmptokens,1) == 2)
+ FunNameCFuncList(cntelem) = tmptokens(1)+FunctionName+tmptokens(2);
+ else
+ disp('Incorrect format for the function list class.');
+ error(9999, 'Check the following function list class item: ""'+CommaSepCFuncList(cntelem)+'"".');
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionList/FL_UpdateConverted.sci b/2.3-1/macros/FunctionList/FL_UpdateConverted.sci new file mode 100644 index 00000000..5f4637e8 --- /dev/null +++ b/2.3-1/macros/FunctionList/FL_UpdateConverted.sci @@ -0,0 +1,46 @@ +function Converted = FL_UpdateConverted(NFilesToTranslate,ConvertedDatFile)
+// function Converted = FL_UpdateConverted(NFilesToTranslate,ConvertedDatFile)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+// --- Load Converted .dat file. ---
+load(ConvertedDatFile,'Converted');
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+if (NFilesToTranslate >= 1)
+ // ---------------------------------------
+ // --- Update Converted Function List. ---
+ // ---------------------------------------
+ // --- Insert the current function into the converted function list. ---
+ NConvP1 = size(Converted,1)+1;
+ Converted(NConvP1) = SharedInfo.NextCFunName;
+ // -------------------------------------------
+ // --- End Update Converted Function List. ---
+ // -------------------------------------------
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionList/FL_UpdateToBeConv.sci b/2.3-1/macros/FunctionList/FL_UpdateToBeConv.sci new file mode 100644 index 00000000..1ee2e15d --- /dev/null +++ b/2.3-1/macros/FunctionList/FL_UpdateToBeConv.sci @@ -0,0 +1,114 @@ +function SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo)
+// function SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),11,11);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+SCI2CAvailableCDat = FileInfo.FunctionList.SCI2CAvailableCDat;
+USER2CAvailableCDat = FileInfo.FunctionList.USER2CAvailableCDat;
+ConvertedDat = FileInfo.FunctionList.ConvertedDat;
+ToBeConvertedDat = FileInfo.FunctionList.ToBeConvertedDat;
+FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir;
+
+// #RNU_RES_B
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Updating C Function List***',ReportFileName,'file','y');
+PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y');
+// #RNU_RES_E
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// #RNU_RES_B
+// --------------------------------------------------
+// --- Manage anticipated exit from the function. ---
+// --------------------------------------------------
+//NUT: questo codice e' identico quasi a quello della CFunCall, si pu0 pensare di
+//NUT: di fare un'unica funzione.
+// #RNU_RES_E
+
+if (SharedInfo.SkipNextFun > 0)
+ // #RNU_RES_B
+ PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ return;
+end
+
+// #RNU_RES_B
+// Exit if the function is a precision specifier and the corresponding flag is 1.
+// #RNU_RES_E
+if ((sum(mtlb_strcmp(ASTFunName,SharedInfo.Annotations.DataPrec)) > 0) & ...
+ (SharedInfo.SkipNextPrec == 1))
+ // #RNU_RES_B
+ PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ return;
+end
+
+// #RNU_RES_B
+// Exit if the function is OpEqual and the corresponding skip flag is enabled.
+// #RNU_RES_E
+if ((mtlb_strcmp(ASTFunName,'OpEqual')) & ...
+ (SharedInfo.SkipNextEqual == 1))
+ // #RNU_RES_B
+ PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ return;
+end
+
+// #RNU_RES_B
+// ---------------------------------------
+// --- If the function is not skipped. ---
+// ---------------------------------------
+// --- Check existence of the C function. ---
+// #RNU_RES_E
+flagexist = FL_ExistCFunction(CFunName,USER2CAvailableCDat,SCI2CAvailableCDat,ConvertedDat,ToBeConvertedDat,ReportFileName);
+
+// #RNU_RES_B
+// --- Update C function list and dat files. ---
+// #RNU_RES_E
+if (flagexist == %F)
+
+ // #RNU_RES_B
+ // --- Add C function to the "ToBeConverted" function list. ---
+ // #RNU_RES_E
+ load(ToBeConvertedDat,'ToBeConverted');
+
+ NToConvP1 = size(ToBeConverted,1)+1;
+ ToBeConverted(NToConvP1).SCIFunctionName = ASTFunName;
+ ToBeConverted(NToConvP1).CFunctionName = CFunName;
+
+ save(ToBeConvertedDat, "ToBeConverted");
+ SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate + 1;
+
+ // #RNU_RES_B
+ // --- Generate C Function dat file. ---
+ PrintStringInfo(' Add C Function ""'+CFunName+'"" to: '+ToBeConvertedDat,ReportFileName,'file','y');
+ // #RNU_RES_E
+end
+
+endfunction
diff --git a/2.3-1/macros/FunctionList/buildmacros.sce b/2.3-1/macros/FunctionList/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/FunctionList/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/FunctionList/lib b/2.3-1/macros/FunctionList/lib Binary files differnew file mode 100644 index 00000000..f5a84d5f --- /dev/null +++ b/2.3-1/macros/FunctionList/lib diff --git a/2.3-1/macros/FunctionList/names b/2.3-1/macros/FunctionList/names new file mode 100644 index 00000000..c40e30ca --- /dev/null +++ b/2.3-1/macros/FunctionList/names @@ -0,0 +1,6 @@ +FL_ExistCFunction +FL_ExtractFuncList +FL_GetFunctionClass +FL_InOutArgs2CFunNames +FL_UpdateConverted +FL_UpdateToBeConv diff --git a/2.3-1/macros/GeneralFunctions/Array2String.sci b/2.3-1/macros/GeneralFunctions/Array2String.sci new file mode 100644 index 00000000..27e9aa15 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/Array2String.sci @@ -0,0 +1,40 @@ +function [StringArray] = Array2String(InArray);
+// function [StringArray] = Array2String(InArray);
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Converts an input array into a string. Maximum 2D array are allowed.
+// Ex.: InArray = [10, 4];
+// StringArray = "[10, 4]";
+// #RNU_RES_E
+//
+// Input data:
+// InArray: Input array.
+//
+// Output data:
+// StringArray: array converted into a string.
+//
+// Status:
+// 13-May-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+[Nrows,Ncols] = size(InArray);
+
+StringArray = '[';
+for counterrows = 1:Nrows
+ for countercols = 1:Ncols
+ StringArray = StringArray + string(InArray(counterrows,countercols)) + ',';
+ end
+ StringArray = part(StringArray,1:(length(StringArray)-1)); // Remove the last ','
+ StringArray = StringArray+';';
+end
+StringArray = part(StringArray,1:(length(StringArray)-1)); // Remove the last ';'
+StringArray = StringArray+']';
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/ConvertPathMat2C.sci b/2.3-1/macros/GeneralFunctions/ConvertPathMat2C.sci new file mode 100644 index 00000000..d73d22c7 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/ConvertPathMat2C.sci @@ -0,0 +1,61 @@ +function OutPath = ConvertPathMat2C(InPath,CPathStyle)
+// function OutPath = ConvertPathMat2C(InPath,CPathStyle)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Converts the input path InPath into a path by using the path
+// style specified by CPathStyle.
+// #RNU_RES_E
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 26-Jan-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+if (CPathStyle == 'windows')
+ OutPath=strsubst(InPath,'/','\');
+elseif (CPathStyle == 'unix')
+ OutPath=strsubst(InPath,'\','/');
+elseif (CPathStyle == 'cygwin')
+ OutPath=strsubst(InPath,'\','/');
+ OutPath=strsubst(OutPath,'A:','/cygdrive/a');
+ OutPath=strsubst(OutPath,'B:','/cygdrive/b');
+ OutPath=strsubst(OutPath,'C:','/cygdrive/c');
+ OutPath=strsubst(OutPath,'D:','/cygdrive/d');
+ OutPath=strsubst(OutPath,'E:','/cygdrive/e');
+ OutPath=strsubst(OutPath,'F:','/cygdrive/f');
+ OutPath=strsubst(OutPath,'G:','/cygdrive/g');
+ OutPath=strsubst(OutPath,'H:','/cygdrive/h');
+ OutPath=strsubst(OutPath,'I:','/cygdrive/i');
+ OutPath=strsubst(OutPath,'J:','/cygdrive/j');
+ OutPath=strsubst(OutPath,'K:','/cygdrive/k');
+ OutPath=strsubst(OutPath,'L:','/cygdrive/l');
+ OutPath=strsubst(OutPath,'M:','/cygdrive/m');
+ OutPath=strsubst(OutPath,'N:','/cygdrive/n');
+ OutPath=strsubst(OutPath,'O:','/cygdrive/o');
+ OutPath=strsubst(OutPath,'P:','/cygdrive/p');
+ OutPath=strsubst(OutPath,'Q:','/cygdrive/q');
+ OutPath=strsubst(OutPath,'R:','/cygdrive/r');
+ OutPath=strsubst(OutPath,'S:','/cygdrive/s');
+ OutPath=strsubst(OutPath,'T:','/cygdrive/t');
+ OutPath=strsubst(OutPath,'U:','/cygdrive/u');
+ OutPath=strsubst(OutPath,'V:','/cygdrive/v');
+ OutPath=strsubst(OutPath,'W:','/cygdrive/w');
+ OutPath=strsubst(OutPath,'X:','/cygdrive/x');
+ OutPath=strsubst(OutPath,'Y:','/cygdrive/y');
+ OutPath=strsubst(OutPath,'Z:','/cygdrive/z');
+else
+ OutPath = InPath;
+end
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/File2StringArray.sci b/2.3-1/macros/GeneralFunctions/File2StringArray.sci new file mode 100644 index 00000000..626cb6ce --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/File2StringArray.sci @@ -0,0 +1,54 @@ +function [String_Array,N_Strings] = File2StringArray(InFileName)
+// function [String_Array,N_Strings] = File2StringArray(InFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Reads a text file and stores every line into a string array.
+// #RNU_RES_E
+//
+// Input data:
+// InFileName: path+filename of the input file.
+//
+// Output data:
+// String_Array: array of strings containing the lines of the input
+// text file.
+// N_Strings: number of strings stored in String_Array.
+//
+// Status:
+// 10-Nov-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+N_Strings = 0;
+String_Array = '';
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// --------------------
+// --- Open C file. ---
+// --------------------
+fidfile = SCI2COpenFileRead(InFileName);
+
+// -------------------
+// --- Read lines. ---
+// -------------------
+tmpline = mgetl(fidfile,1);
+while (meof(fidfile) == 0)
+ N_Strings = N_Strings + 1;
+ String_Array(N_Strings) = tmpline;
+ tmpline = mgetl(fidfile,1);
+end
+
+mclose(fidfile);
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/FunName2SciFileName.sci b/2.3-1/macros/GeneralFunctions/FunName2SciFileName.sci new file mode 100644 index 00000000..39ff5b21 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/FunName2SciFileName.sci @@ -0,0 +1,56 @@ +function ScilabFileName = FunName2SciFileName(DirList,InFunName);
+// function ScilabFileName = FunName2SciFileName(DirList,InFunName);
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function generates the full path of the scilab file
+// related to the function name (InFunName) specified.
+// In more detail the file "eval(InFunName).sci" file is searched
+// in the directories specified in DirList.
+// #RNU_RES_E
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 16-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+if (prod(size(DirList)) == 0)
+ error(9999, 'Incorrect DirList parameter.');
+end
+
+if (prod(size(InFunName)) == 0)
+ error(9999, 'Incorrect InFunName parameter.');
+end
+
+// --- Generate the PathList. ---
+for tmpcounter = 1:max(size(DirList))
+ PathList(tmpcounter) = fullfile(DirList(tmpcounter),(InFunName+'.sci'));
+end
+
+// --- Search the .sci file. ---
+ScilabFileName = listfiles(PathList);
+
+// --- Check on the number of .sci files found. ---
+if ((prod(size(ScilabFileName))) > 1)
+ disp(ScilabFileName);
+ error(9999, 'Found more than one scilab file.');
+end
+
+if ((prod(size(ScilabFileName))) < 1)
+ disp(ScilabFileName);
+ error(9999, 'Scilab file ""'+InFunName+'.sci"", not found');
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/IsNanSize.sci b/2.3-1/macros/GeneralFunctions/IsNanSize.sci new file mode 100644 index 00000000..486f6fcc --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/IsNanSize.sci @@ -0,0 +1,39 @@ +function outbool = IsNanSize(instring)
+// function outbool = IsNanSize(instring)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// It searches for __SCI2CNANSIZE string in the string which specifies the
+// size of the argument. Useful to find if a given size contains
+// a nan value. In this case an error is issued.
+// IsNanSize = '__SCI2CNANSIZE' -> True
+// IsNanSize = 'c*__SCI2CNANSIZE' -> True
+// IsNanSize = 'c+b' -> False
+// #RNU_RES_E
+//
+// Input data:
+// instring: string to analyze.
+//
+// Output data:
+// outbool: %T if nan string has been found.
+//
+// Status:
+// 11-Feb-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+
+outbool = %F;
+indexval = strindex(instring,'__SCI2CNANSIZE');
+
+if(length(indexval)>=1)
+ outbool = %T;
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/KeyStr2FileStrPos.sci b/2.3-1/macros/GeneralFunctions/KeyStr2FileStrPos.sci new file mode 100644 index 00000000..e9fb1c48 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/KeyStr2FileStrPos.sci @@ -0,0 +1,83 @@ +function [flag_found,requested_line,line_position] = KeyStr2FileStrPos(filename,key_string,method)
+// function [flag_found,requested_line,line_position] = KeyStr2FileStrPos(filename,key_string,method)
+// --------------------------------------------------------------------------------
+// #RNU_RES_B
+// This function returns a line and its position from a specified ASCII file.
+// The line and the position returned starts with a key string specified in the
+// input parameters.
+//
+// Input data:
+// filename: path + name of the ASCII file.
+// key_string: string that specifies the initial portion of the line to return.
+// method: 'cut': in the returned line will be removed the key_string
+// 'no_cut': (default), in the returned line will not be removed the key_string
+//
+// Output data:
+// flag_found: 0 if the line is not found or an error occured.
+// 1 if the search succeed.
+// requested_line: is the line in the file which contains as first characters those
+// specified in the key_string.
+// line_position: position of the line in the file; the first line in the file
+// is the line number 1.
+// #RNU_RES_E
+//
+//
+// Status:
+// 08-Jul-2002 -- Author: Raffaele Nutricato
+// 08-Jul-2002 -- Raffaele Nutricato: Revision OK
+// 23-Nov-2004 -- Raffaele Nutricato: Changed disp to warning in if (flag_found == 0).
+// It allows to disable the message it generates
+// by using warning off.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,3);
+
+
+if (argn(2) == 2)
+ method = 'no_cut';
+end
+method = convstr(method, 'u');
+
+// Initialize output parameters
+flag_found = 0;
+requested_line = '';
+line_position = 0;
+
+// Open the text file (read only)
+[fid,mess] = mopen(filename,'r');
+if ( fid == -1 )
+ disp(['Cannot open: '+filename])
+ disp(mess);
+ flag_found = 0;
+ return;
+end
+
+// loop on the lines of the file
+num_chars = length(key_string);
+while (meof(fid) == 0)
+ check_string = fgetl(fid);
+ line_position = line_position + 1;
+ if (key_string == check_string) & (key_string == num_chars) then
+ flag_found = 1;
+ requested_line = check_string;
+ if (method =='cut') then
+ requested_line(1:num_chars) = [];
+ end
+ mclose(fid);
+ return;
+ end
+end
+
+if (flag_found == 0)
+ warning('Warning: string ' + key_string + ' not found in file: ' + filename);
+ mclose(fid);
+end
+
+mclose(fid);
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/PrintStepInfo.sci b/2.3-1/macros/GeneralFunctions/PrintStepInfo.sci new file mode 100644 index 00000000..8e1c1d02 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/PrintStepInfo.sci @@ -0,0 +1,56 @@ +function PrintStepInfo(inputstring,filename,outputtype,formattedstring) +// function PrintStepInfo(inputstring,filename,outputtype,formattedstring) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Prints a string by using a predefined format into a file or on +// the stdout. +// +// Input data: +// filename: optional parameter, that specifies the output file. +// If filename is '' or it is not provided to the function, +// the string will be printed on the stdout. +// outputtype: 'file' -> prints only on file. +// 'stdout' -> prints only on the stdout. +// 'both' -> prints on both file and stdoud. +// Default is 'stdout'. +// formattedstring: if 'n' (default) it means that str is considered as a simple string (mputstr). +// if 'y' then str is considered formatted according to mfprint syntax +// Output data: +// +// #RNU_RES_E +// Status: +// 02-Jan-2006 -- Nutricato Raffaele: Author. +// 02-Jan-2006 -- Nutricato Raffaele: TEST OK. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,4); + +if argn(2) < 4 + formattedstring = 'n'; + if argn(2) < 3 + bothout = 'n'; + if argn(2) < 2 + filename = ''; + end + end +end +if (length(filename) == 0) + outputtype = 'stdout'; // Prints only on the stdout. +end + +blankstring = [' ']; + +if ((outputtype=='both') | (outputtype=='stdout')) + disp(blankstring+'==> '+inputstring); +end + +if ((outputtype=='both') | (outputtype=='file')) + filenamefprintf(filename,'y',blankstring+'==> '+inputstring,formattedstring); +end +endfunction diff --git a/2.3-1/macros/GeneralFunctions/PrintStringInfo.sci b/2.3-1/macros/GeneralFunctions/PrintStringInfo.sci new file mode 100644 index 00000000..a554d122 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/PrintStringInfo.sci @@ -0,0 +1,69 @@ +function PrintStringInfo(str, filename, outputtype, ennewline,formattedstring)
+// function PrintStringInfo(str,filename,outputtype,ennewline,formattedstring)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Prints a string into a file or on the stdout or on both.
+//
+// Input data:
+// filename: optional parameter, that specifies the output file.
+// If filename is '' or it is not provided to the function,
+// the string will be printed on the stdout.
+// outputtype: 'file' -> prints only on file.
+// 'stdout' -> prints only on the stdout.
+// 'both' -> prints on both file and stdout.
+// Default is 'stdout'.
+// ennewline: optional (default = 'y'); If y adds a newline character
+// at the end of the input string.
+// formattedstring: if 'n' (default) it means that str is considered as a simple string (mputstr).
+// if 'y' then str is considered formatted according to mfprint syntax
+//
+// Output data:
+// ---
+// #RNU_RES_E
+//
+// Status:
+// 02-Jan-2006 -- Nutricato Raffaele: Author.
+// 02-Jan-2006 -- Nutricato Raffaele: TEST OK.
+// 02-May-2006 -- Nutricato Raffaele: Added ennewline.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),0,5);
+
+if argn(2) < 5
+ formattedstring = 'n';
+ if argn(2) < 4
+ ennewline = 'y';
+ if argn(2) < 3
+ outputtype = 'stdout';
+ if argn(2) < 2
+ filename = '';
+ if argn(2) < 1
+ str = '';
+ end
+ end
+ end
+ end
+end
+if (length(filename) == 0) then
+ outputtype = 'stdout'; // Prints only on the stdout.
+end
+
+if (outputtype=='both') | (outputtype=='stdout')
+ disp(str)
+end
+
+if (outputtype=='both') | (outputtype=='file')
+ if (ennewline=='y')
+ filenamefprintf(filename,'y',str,formattedstring);
+ else
+ filenamefprintf(filename,'n',str,formattedstring);
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/ReadStringCard.sci b/2.3-1/macros/GeneralFunctions/ReadStringCard.sci new file mode 100644 index 00000000..a4525d90 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/ReadStringCard.sci @@ -0,0 +1,61 @@ +function cardvalue = ReadStringCard(filename,cardname,commentdelim,enableerror)
+// function cardvalue = ReadStringCard(filename,cardname,commentdelim,enableerror)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Reads the string associated to the card cardname placed
+// in filename.
+// The value of cardname is assumed to be a string.
+// If the card is not found an error will occur.
+//
+// Input data:
+// filename: full path + name of the file where the card
+// is being searched.
+// cardname: string with the name of the card.
+// commentdelim: specifies a character for an eventual comment
+// (to be discarded) after the card value.
+// enableerror: 'y' enable error message.
+// 'n' enable warning message.
+//
+// Output data:
+// cardvalue: string associated to the card. Blanks characters
+// are discarded.
+// #RNU_RES_E
+//
+// Status:
+// 06-Feb-2004 -- Nutricato Raffaele: Author.
+// 06-Feb-2004 -- Nutricato Raffaele: TEST OK.
+// 25-Jun-2004 -- Nutricato Raffaele: Added Comment delimiter
+// and enableerror as input parameter.
+// 13-Apr-2007 -- Intelligente Fabio: Rewritten from Matlab to Scilab.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,3);
+
+if argn(2) == 2 then
+ commentdelim = ' ';
+ enableerror = 'y';
+
+elseif argn(2) == 3 then
+ enableerror = 'y';
+end
+
+[flag_found,requested_line,dummy2] = ...
+ KeyString2FileStringPos(filename,cardname,'cut');
+cardvalue = stripblanks(strtok(requested_line,commentdelim));
+clear requested_line dummy2
+
+if (flag_found == 0) then
+ if (enableerror == 'y') then
+ error(9999, cardname+' not found');
+ else
+ warning([cardname,' not found']);
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2CCreateDir.sci b/2.3-1/macros/GeneralFunctions/SCI2CCreateDir.sci new file mode 100644 index 00000000..dcc39c3e --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2CCreateDir.sci @@ -0,0 +1,31 @@ +function SCI2CCreateDir(OutDir)
+// function SCI2CCreateDir(OutDir)
+// -----------------------------------------------------------------
+// Create the dir OutDir.
+//
+// Input data:
+// OutDir: full path (absolute or relative) of the directory to be created.
+//
+// Output data:
+// ---
+//
+// Status:
+// 25-Jun-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+[tmppath,tmpfname,tmpextension]=fileparts(OutDir) ;
+
+status_dir = mkdir(tmppath,tmpfname+tmpextension) ;
+if (status_dir == 0)
+ error(9999, 'Cannot create: '+OutDir);
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2CFindFile.sci b/2.3-1/macros/GeneralFunctions/SCI2CFindFile.sci new file mode 100644 index 00000000..912a72a8 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2CFindFile.sci @@ -0,0 +1,41 @@ +function [FlagFound,SCIFileName] = SCI2CFindFile(PathList,FileName)
+// function [FlagFound,SCIFileName] = SCI2CFindFile(PathList,FileName)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 11-Jul-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+FlagFound = 0;
+SCIFileName = '';
+
+// Perform the search in the user .sci files.
+Nscipaths = size(PathList,1);
+counterscipaths = 1;
+while ((FlagFound == 0) & (counterscipaths <= Nscipaths))
+ dirscifilename = PathList(counterscipaths);
+ fullpathscifilename = fullfile(dirscifilename,FileName);
+ if (SCI2Cfileexist(dirscifilename,FileName))
+ // It is a function of the USER2C library.
+ FlagFound = 1;
+ SCIFileName = fullpathscifilename;
+ end
+ counterscipaths = counterscipaths + 1;
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci b/2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci new file mode 100644 index 00000000..71b93328 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2CNInArgCheck.sci @@ -0,0 +1,26 @@ +function SCI2CNInArgCheck(NInArgs,MinNArgs,MaxNArgs)
+// function SCI2CNInArgCheck(NInArgs,MinNArgs,MaxNArgs)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Check that NInArgs is in the range specified by MinNArgs and
+// MaxNArgs.
+//
+// Input data:
+// NInArgs: number of input arguments of the function under test.
+// MinNArgs: minimum number of input arguments allowed.
+// MaxNArgs: maximum number of input arguments allowed.
+//
+// Output data:
+// ---
+// #RNU_RES_E
+//
+// Status:
+// 23-Nov-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato
+// -----------------------------------------------------------------
+
+if ((NInArgs < MinNArgs) | (NInArgs > MaxNArgs))
+ error(9999, 'Incorrect number of input arguments.');
+end
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2COpenFileRead.sci b/2.3-1/macros/GeneralFunctions/SCI2COpenFileRead.sci new file mode 100644 index 00000000..8e54738c --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2COpenFileRead.sci @@ -0,0 +1,30 @@ +function fidnumber = SCI2COpenFileRead(filename)
+// function fidnumber = SCI2COpenFileRead(filename)
+// --------------------------------------------------------------------------------
+// Open a file in read mode.
+//
+// Input data:
+// filename: path + name of the file to read.
+//
+// Output data:
+// fidnumber: file identifier.
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// --- Open the .sci file (read only). ---
+[fidnumber,fiderror] = mopen(filename,'r');
+if (fiderror < 0)
+ error(['Cannot open (in read mode): '+filename]);
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2COpenFileWrite.sci b/2.3-1/macros/GeneralFunctions/SCI2COpenFileWrite.sci new file mode 100644 index 00000000..f87aef87 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2COpenFileWrite.sci @@ -0,0 +1,30 @@ +function fidnumber = SCI2COpenFileWrite(filename)
+// function fidnumber = SCI2COpenFileWrite(filename)
+// --------------------------------------------------------------------------------
+// Open a file in write mode.
+//
+// Input data:
+// filename: path + name of the file to be written.
+//
+// Output data:
+// fidnumber: file identifier.
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// --- Open the .sci file (write mode). ---
+[fidnumber,fiderror] = mopen(filename,'w');
+if (fiderror < 0)
+ error(9999, 'Cannot open (in write mode): '+filename);
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2CTemplate.sci b/2.3-1/macros/GeneralFunctions/SCI2CTemplate.sci new file mode 100644 index 00000000..e47bdd00 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2CTemplate.sci @@ -0,0 +1,32 @@ +function out = SCI2CTemplate(in1,in2)
+// function out = SCI2CTemplate(in1,in2)
+// -----------------------------------------------------------------
+// This is a template function which shows how to comment functions.
+//
+// Input data:
+// in1: input argument number 1
+// in2: input argument number 2
+//
+// Output data:
+// out: output argument number 1
+//
+// Status:
+// 03-Jan-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Ccopyfile.sci b/2.3-1/macros/GeneralFunctions/SCI2Ccopyfile.sci new file mode 100644 index 00000000..f95c29ef --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Ccopyfile.sci @@ -0,0 +1,49 @@ +function SCI2Ccopyfile(InFileName,OutFileName,CopyMode)
+// function SCI2Ccopyfile(InFileName,OutFileName,CopyMode)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Copy the contents of infile into outfile. Append mode is used.
+//
+// Input data:
+// InFileName: path+filename of the input file.
+// OutFileName: path+filename of the input file.
+// CopyMode: 'append' or 'overwrite'
+// #RNU_RES_E
+//
+// Output data:
+// ---
+//
+// Status:
+// 23-Nov-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+if (CopyMode == 'append')
+ // ------------------------
+ // --- Open Input file. ---
+ // ------------------------
+ fidIn = SCI2COpenFileRead(InFileName);
+
+ // -------------------
+ // --- Read lines. ---
+ // -------------------
+ tmpline = mgetl(fidIn,1);
+ while (meof(fidIn) == 0)
+ PrintStringInfo(tmpline, OutFileName, 'file', 'y');
+ tmpline = mgetl(fidIn,1);
+ end
+ mclose(fidIn);
+elseif (CopyMode == 'overwrite')
+ PrintStringInfo(' ', OutFileName, 'file', 'y'); // Cannot use scilab copyfile when the directory is empty!.
+ copyfile(InFileName,OutFileName);
+else
+ SCI2Cerror('Unknown CopyMode: ""'+CopyMode+'""');
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cfileexist.sci b/2.3-1/macros/GeneralFunctions/SCI2Cfileexist.sci new file mode 100644 index 00000000..05dbf590 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cfileexist.sci @@ -0,0 +1,38 @@ +function ExistTest = SCI2Cfileexist(InDir,FileName)
+// function ExistTest = SCI2Cfileexist(InDir,FileName)
+// -----------------------------------------------------------------
+// Searches for the file FileName in the directory InDir.
+// Return %F if it doesn't exist.
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 12-Jun-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+tmppwd = pwd();
+cd(InDir);
+allfiles = ls(FileName);
+cd(tmppwd);
+
+if (size(allfiles,1) == 0)
+ ExistTest = %F;
+elseif (size(allfiles,1) == 1)
+ ExistTest = %T;
+else
+ SCI2Cerror('Very Strange! Found more than one file with the same name.');
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cflipud.sci b/2.3-1/macros/GeneralFunctions/SCI2Cflipud.sci new file mode 100644 index 00000000..2e988c1b --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cflipud.sci @@ -0,0 +1,40 @@ +function OutputData = SCI2Cflipud(InputData)
+// function OutputData = SCI2Cflipud(InputData)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Inverts (flips) the position of the arguments of InputData.
+// Input data can be a struct or an array.
+// Ex.:
+// A(1) = 'one';
+// A(2) = 'two';
+// A(3) = 'three';
+// B = SCI2Cflipud(A);
+// B(1) = 'three';
+// B(2) = 'two';
+// B(3) = 'one';
+//
+// Input data:
+// InputData: input array or structure.
+//
+// Output data:
+// OutputData: flipped version of the input array.
+//
+// #RNU_RES_E
+// Status:
+// 12-May-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+NInputs = size(InputData,1);
+OutputData = InputData; // To be sure that they will have the same structure.
+for cnt = 1:NInputs
+ OutputData(cnt) = InputData(NInputs-cnt+1);
+end
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cmdelete.sci b/2.3-1/macros/GeneralFunctions/SCI2Cmdelete.sci new file mode 100644 index 00000000..d19233dc --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cmdelete.sci @@ -0,0 +1,33 @@ +function SCI2Cmdelete(InFile)
+// function SCI2Cmdelete(InFile)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Deletes the input files only if the file really exists.
+// This avoids the issuing of the error generated by mdelete.
+//
+// Input data:
+// InFile: full path of the file to be deleted.
+//
+// Output data:
+// #RNU_RES_E
+//
+// Status:
+// 12-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+[Inx,Inierr]=fileinfo(InFile);
+if Inierr == 0
+ mdelete(InFile);//NUT: questa stampa a video il file che sta cancellando.
+ //NUT ho fatto delle altre prove e mi funzionava tutto. solo che quando
+ //NUT eseguo il codice scilab to c mi stampa a video tutto il nome del file.
+end
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cresize.sci b/2.3-1/macros/GeneralFunctions/SCI2Cresize.sci new file mode 100644 index 00000000..ba78fde0 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cresize.sci @@ -0,0 +1,33 @@ +function out = SCI2Cresize(in)
+// function out = SCI2Cresize(in)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// It is a dummy function used by the programmer to specify at a given
+// point that a variable is changing its size. This will be translated
+// into C code by re-assigning the size array.
+// Next releases of this function will include check to avoid
+// increment of the size outside the limits specified by the first
+// initialization of the variable.
+//
+// Input data:
+// in: input variable to be resized
+//
+// Output data:
+// out: resized variable
+//
+// #RNU_RES_E
+// Status:
+// 10-Jun-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+out = in;
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cstring.sci b/2.3-1/macros/GeneralFunctions/SCI2Cstring.sci new file mode 100644 index 00000000..cf6d4370 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cstring.sci @@ -0,0 +1,34 @@ +function outstring = SCI2Cstring(innum)
+// function outstring = SCI2Cstring(innum)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// It fixes the bug of string function when applied to
+// exponential formats:
+// Example:
+// -->string(10e-10)
+// ans =
+// 1.000D-09
+// Note how the "D" is syntactically wrong.
+//
+// Input data:
+// innnum: input number to be converted into string.
+//
+// Output data:
+// outstring: string containing the conversion.
+// #RNU_RES_E
+//
+// Status:
+// 07-May-2008 -- Nutricato Raffaele: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+outstring=strsubst(string(innum),'D','e');
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cstrncmp.sci b/2.3-1/macros/GeneralFunctions/SCI2Cstrncmp.sci new file mode 100644 index 00000000..54a5e148 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cstrncmp.sci @@ -0,0 +1,27 @@ +function res = SCI2Cstrncmp(s1,s2,n)
+// function res = SCI2Cstrncmp(s1,s2,n)
+// -----------------------------------------------------------------
+// This function compares first n characters of strings s1 and s2.
+// SCI2Cstrncmp(s1,s2,n) returns 1logical T (true) if the first n characters of
+// the strings s1 and s2 are the same and logical 0 (false) otherwise.
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 16-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+res = (part(s1,1:n) == part(s2,1:n));
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SCI2Cstrncmps1size.sci b/2.3-1/macros/GeneralFunctions/SCI2Cstrncmps1size.sci new file mode 100644 index 00000000..38e8c371 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SCI2Cstrncmps1size.sci @@ -0,0 +1,32 @@ +function res = SCI2Cstrncmps1size(s1,s2);
+// function res = SCI2Cstrncmps1size(s1,s2);
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function compares first n characters of strings s1 and s2.
+// n is the size of the string s1.
+// SCI2Cstrncmps1size returns logical T (true) if the first n characters of
+// the strings s1 and s2 are the same and logical 0 (false) otherwise.
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// #RNU_RES_E
+// Status:
+// 16-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+n = length(s1);
+res = (part(s1,1:n) == part(s2,1:n));
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/SizeInByte.sci b/2.3-1/macros/GeneralFunctions/SizeInByte.sci new file mode 100644 index 00000000..fa2d4f94 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/SizeInByte.sci @@ -0,0 +1,41 @@ +function SizeIn = SizeInByte(InDataType)
+// function SizeIn = SizeInByte(InDataType)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Returns the size in bytes of the input data type.
+//
+// Input data:
+// InDataType: input data type. It can be:
+// 'float'
+// 'double'
+// 'floatComplex*'
+// 'doubleComplex*'
+//
+// Output data:
+// SizeIn: size in bytes of the input data type.
+//
+// #RNU_RES_E
+// Status:
+// 12-May-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+if (InDataType == 'float')
+ SizeIn = 4;
+elseif (InDataType == 'double')
+ SizeIn = 8;
+elseif (InDataType == 'floatComplex*')
+ SizeIn = 8;
+elseif (InDataType == 'doubleComplex*')
+ SizeIn = 16;
+else
+ error('Unknown data type: '+InDataType);
+end
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/buildmacros.sce b/2.3-1/macros/GeneralFunctions/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/GeneralFunctions/dispina.sci b/2.3-1/macros/GeneralFunctions/dispina.sci new file mode 100644 index 00000000..dc07cddc --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/dispina.sci @@ -0,0 +1,31 @@ +function dispina(instring);
+// function dispina(instring);
+// -----------------------------------------------------------------
+// Quista sacciu sulu iou comu funziona e a ce me serve.
+//
+// Input data:
+//
+// Output data:
+//
+// Status:
+// 12-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp(instring);
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+disp('++++++++++++++++++++++++++++++++++++++++++++++++++')
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/filenamefprintf.sci b/2.3-1/macros/GeneralFunctions/filenamefprintf.sci new file mode 100644 index 00000000..f25e603e --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/filenamefprintf.sci @@ -0,0 +1,48 @@ +function filenamefprintf(filename,ennewline,str,formattedstring)
+// function filenamefprintf(filename,ennewline,str,formattedstring)
+// --------------------------------------------------------------------------------
+// Uses the printf to print the string specified by varargin. filenamefprintf
+// uses the filename instead of the fid parameter used by fprintf.
+// Everytime filenamefprintf is called it
+// opens the file, prints the string in it and then closes it.
+// Opening is performed in read/append mode (at+).
+//
+// Input data:
+// filename: string that specifies the name of the file.
+// varargin are the input arguments for the printf.
+// formattedstring: if 'n' (default) it means that str is considered as a simple string (mputstr).
+// if 'y' then str is considered formatted according to mfprint syntax
+//
+// Output data:
+// ---
+//
+// Status:
+// 31-Jan-2006 -- Nutricato Raffaele: Author.
+// 31-Jan-2006 -- Nutricato Raffaele: TEST OK.
+//
+// Copyright 2006 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),4,4);
+
+
+// [FidReportFile, mess] = mopen(deblank(filename),'at+');
+ [FidReportFile, mess] = mopen(filename,'a+');
+ if (FidReportFile == -1) then
+ error(9999, mess);
+ end
+ if formattedstring == 'n'
+ mputstr(str,FidReportFile);
+ else
+ mfprintf(FidReportFile, str);
+ end
+ if ennewline=='y' then
+ mfprintf(FidReportFile,'\n');
+ end
+ mclose(FidReportFile);
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/float.sci b/2.3-1/macros/GeneralFunctions/float.sci new file mode 100644 index 00000000..634950b1 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/float.sci @@ -0,0 +1,26 @@ +function y = float(x)
+// -----------------------------------------------------------------
+// Dummy function for float precision specifier.
+//
+// Input data:
+// x: input array or scalar.
+//
+// Output data:
+// y: output array or scalar.
+//
+// Status:
+// 12-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+ +// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+
+y = x;
+
+endfunction
diff --git a/2.3-1/macros/GeneralFunctions/lib b/2.3-1/macros/GeneralFunctions/lib Binary files differnew file mode 100644 index 00000000..9d57416d --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/lib diff --git a/2.3-1/macros/GeneralFunctions/names b/2.3-1/macros/GeneralFunctions/names new file mode 100644 index 00000000..eb8300a1 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/names @@ -0,0 +1,28 @@ +Array2String +ConvertPathMat2C +File2StringArray +FunName2SciFileName +IsNanSize +KeyStr2FileStrPos +PrintStepInfo +PrintStringInfo +ReadStringCard +SCI2CCreateDir +SCI2CFindFile +SCI2CNInArgCheck +SCI2COpenFileRead +SCI2COpenFileWrite +SCI2CTemplate +SCI2Ccopyfile +SCI2Cfileexist +SCI2Cflipud +SCI2Cmdelete +SCI2Cresize +SCI2Cstring +SCI2Cstrncmp +SCI2Cstrncmps1size +SizeInByte +dispina +filenamefprintf +float +squeezestrings diff --git a/2.3-1/macros/GeneralFunctions/squeezestrings.sci b/2.3-1/macros/GeneralFunctions/squeezestrings.sci new file mode 100644 index 00000000..049476d1 --- /dev/null +++ b/2.3-1/macros/GeneralFunctions/squeezestrings.sci @@ -0,0 +1,31 @@ +function OutString = squeezestrings(InStringArray)
+// function OutString = squeezestrings(InStringArray)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Converts an array of strings into a single string.
+//
+// Input data:
+// InStringArray: Array of strings.
+//
+// Output data:
+// OutString: Output string.
+//
+// #RNU_RES_E
+// Status:
+// 12-Apr-2007 -- Nutricato Raffaele: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+OutString = [];
+for counterstrings = 1:max(size(InStringArray))
+ OutString = OutString+InStringArray(counterstrings);
+end
+
+endfunction
diff --git a/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci new file mode 100644 index 00000000..264062bc --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRADCSetup.sci @@ -0,0 +1,47 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRADCSetup(prescaler,adc_ref) +// Function to initialise ADC of AVR +// +// Calling Sequence +// AVRADCSetup(uint8 prescaler, uint8 adc_ref) +// +// Parameters +// prescaler: prescaler to be used for generating ADC clock (0-7) +// adc_ref : reference voltage to be used for ADC conversion +// 0 -> Voltage on VREF pin +// 1 -> Voltage on AVCC pin +// 2 -> Internal 2.56 reference voltage +// +// Description +// This function initialises ADc of AVR with given parameters. 'prescaler' is +// needed for deciding ADC clock. ADC clock should be between 50KHz and 200KHz +// and it given as (MCU clock/2^prescaler). Select appropriate prescaler depending +// on MCU clock. 'adc_ref' selects one of the available reference voltage sources +// available +// Examples +// AVRADCSetup(128,0) +// See also +// AVRReadADC +// +// Authors +// Siddhesh Wani Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(prescaler>=8) +disp("Error : Invalid input argument ''prescaler'' in AVRADCSetup function."); +end +if(adc_ref>=3) then +disp("Error : Invalid input argument ''adc_ref'' in AVRADCSetup function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalIn.sci b/2.3-1/macros/Hardware/AVR/AVRDigitalIn.sci new file mode 100644 index 00000000..54eb327b --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRDigitalIn.sci @@ -0,0 +1,50 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +function state = AVRDigitalIn(port,pin) +// Function to get state (high\low) of a digital input pin on AVR +// +// Calling Sequence +// state=AVRDigitalIn(port,pin) +// +// Parameters +// port : port of microcontroller to be used +// pin : pin of port (mentioned above) to be used +// Returns +// state : state of an input pin (HIGH\LOW) +// +// Description +// Each AVR microcontroller has pins which can be configured as digital +// inputs. These are normally divided among some 'ports' (group of pins). +// User has to select one of these port and which pin of that port as +// digital input. +// +// Examples +// pinA0 = AVRDigitalIn(1,0) //To read state on pin 0 of port A +// +// See also +// AVRDigitalOut AVRDigitalSetup +// +// +// Authors +// Siddhesh Wani Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if((port==0)|(port>=5)) then +disp("Error : Inavalid input argument ''port'' in AVRDigitalIn function."); +end +if(pin>=8) then +disp("Error : Inavalid input argument ''pin'' in AVRDigitalIn function."); +end +state = 0; +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci b/2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci new file mode 100644 index 00000000..a86a5aa9 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRDigitalOut.sci @@ -0,0 +1,51 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRDigitalOut(port,pin,state) +// Function to change state (high\low) of a digital output pin on AVR +// +// Calling Sequence +// AVRDigitalOut(port,pin,state) +// +// Parameters +// port : port of microcontroller to be used +// pin : pin of port (mentioned above) to be used +// state : state to be outputed on pin (HIGH\LOW) +// +// Description +// Each AVR microcontroller has pins which can be configured as digital +// outputs. These are normally divided among some 'ports' (group of pins). +// User has to select one of these port and which pin of that port as +// digital output. Also, desired output state must be specified as +// 'HIGH' or 'LOW'. +// +// Examples +// AVRDigitalOut('A',0,HIGH) +// +// See also +// AVRDigitalIn +// +// +// Authors +// Siddhesh Wani Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if((port==0)|(port>=8)) then +disp("Error : Inavalid input argument ''port'' in AVRDigitalOut function."); +end +if(pin>=8) then +disp("Error : Invalid input argument ''pin'' in AVRDigitalOut function."); +end +if(state>=2) then +disp("Error : Invalid input argument ''state'' in AVRDigitalOut function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalPortSetup.sci b/2.3-1/macros/Hardware/AVR/AVRDigitalPortSetup.sci new file mode 100644 index 00000000..5f0b9671 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRDigitalPortSetup.sci @@ -0,0 +1,47 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRDigitalPortSetup(port,direction) +// Function to decide direction of port on AVR +// +// Calling Sequence +// AVRDigitalPortSetup(port,direction) +// +// Parameters +// port : port of microcontroller to be used(1 for PORTA, 2 for PORTB,...) +// direction : direction to be set for pin (0 for INPUT, 1 for OUTPUT) +// +// Description +// Each AVR microcontroller has pins which can be configured as digital +// outputs/inputs. These are normally divided among some 'ports' (group of pins). +// User has to select one of these port and which pin of that port to be +// used as digital output/input. Also, desired direction must be specified as +// 'INPUT' or 'OUTPUT'. +// +// Examples +// AVRDigitalPortSetup(1,0); //This function will make PortA as input port +// +// See also +// AVRDigitalIn AVRDigitalOut +// +// +// Authors +// Siddhesh Wani Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if((port==0)|(port>=5)) then +disp("Error : Invalid input argument ''port'' in AVRDigitalPortSetup function."); +end +if(direction>=2) then +disp("Error : Invalid input argument ''direction'' in AVRDigitalPortSetup function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci b/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci new file mode 100644 index 00000000..e707d4fa --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRDigitalSetup.sci @@ -0,0 +1,51 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRDigitalSetup(port,pin,direction) +// Function to decide direction of a digital pin on AVR +// +// Calling Sequence +// AVRDigitalSetup(port,pin,direction) +// +// Parameters +// port : port of microcontroller to be used +// pin : pin of port (mentioned above) to be used +// direction : direction to be set for pin (INPUT\OUTPUT) +// +// Description +// Each AVR microcontroller has pins which can be configured as digital +// outputs/inputs. These are normally divided among some 'ports' (group of pins). +// User has to select one of these port and which pin of that port to be +// used as digital output/input. Also, desired direction must be specified as +// 'INPUT' or 'OUTPUT'. +// +// Examples +// AVRDigitalSetup('A',0,OUTPUT) +// +// See also +// AVRDigitalIn AVRDigitalOut +// +// +// Authors +// Siddhesh Wani Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if((port==0)|(port>=5)) then +disp("Error : Invalid input argument ''port'' in AVRDigitalSetup function."); +end +if(pin>=8) then +disp("Error : Invalid input argument ''pin'' in AVRDigitalSetup function."); +end +if(direction>=2) then +disp("Error : Invalid input argument ''direction'' in AVRDigitalSetup function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci new file mode 100644 index 00000000..afb47ac8 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRGetTimerValue.sci @@ -0,0 +1,40 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function count = AVRGetTimerValue(timer) +// Function to get timer count +// +// Parameters +// timer : timer whose current count is to be returned +// 0 for timer0 +// 1 for timer1 +// 2 for timer2 +// +// Description +// This function returns the count value of a desired timer.By knowing the count value +// certain interrupt action can be taken. +// +// Examples +// AVRGetTimerValue(0); //returns present count of the TCNT0 counter +// +// See also +// AVRTimerSetup +// +// Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(timer>=3) then +disp("Error : Invalid input argument ''timer'' in AVRGetTimerValue function."); +end +count = 0; +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRPWM0SetDuty.sci b/2.3-1/macros/Hardware/AVR/AVRPWM0SetDuty.sci new file mode 100644 index 00000000..604d2f40 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWM0SetDuty.sci @@ -0,0 +1,35 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRPWM0SetDuty(duty) +//Function to Set Duty cycle of PWM Output generated by Timer0 at OC0 pin. +//Parameters +// duty : It holds an integer value from 0 to 100 which sets the percentage +// of time for which signal is active. +//Description +// Each Micro controller has PWM output pins which can generate varying voltage +// from 0V-5V.In this function by varying the duty cycle, varying voltage can be +// produced. +//Example +// AVRPWM0SetDuty(50); //Produces 2.5V at OC0 pin +// AVRPWM0SetDuty(0); //Produces 0V at OC0 pin +//See also +// AVRPWM0Setup +// +//Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(duty>100) then +disp("Error : Invalid input argument ''duty'' in AVRPWM0SetDuty function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRPWM0Setup.sci b/2.3-1/macros/Hardware/AVR/AVRPWM0Setup.sci new file mode 100644 index 00000000..39861c86 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWM0Setup.sci @@ -0,0 +1,68 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRPWM0Setup(waveform_mode,output_mode) +//Function to Setup OC0 pin for required PWM mode +//Description +// Every Micro controller has PWM pins which can generate varying voltages +// from 0V-5V.This function helps to use OC0 pin to produce required +// output waveform by setting the waveform mode and otput mode. +// +//Parameters +// waveform_mode: +// 0 for Phase correct PWM Mode +// 1 for Fast PWM Mode +// 2 for CTC Mode +// output_mode: +// For Phase Correct PWM Mode: +// 0 for Clear OC0 on compare match when up-counting. Set OC0 on compare +// match when down-counting. +// 1 for Set OC0 on compare match when up-counting. Clear OC0 on compare +// match when down-counting. +// +// For Fast PWM Mode: +// 0 for non-inverted output i.e Clear OC0 on compare match, set OC0 at BOTTOM. +// 1 for inverted output i.e Set OC0 on compare match, clear OC0 at BOTTOM. +// +// For CTC Mode: +// 0 to Clear OC0 on compare match +// 1 to Set OC0 on compare match +// 2 to toggle OC0 on compare match +// +//Example +// AVRPWM0Setup(2,0); //This function will select CTC waveform mode and will clear OC0 on +// compare match +//See also +// AVRPWM0SetDuty +// +//Authors +// Ashish Kamble +// +//This is curretly dummy function. It provides no functionality but is required +//for providing support for generating C code for AVR. + +if(waveform_mode>=3) then +disp("Error : Invalid input argument ''waveform_mode'' in AVRPWM0Setup function."); +end + +if((waveform_mode==0)|(waveform_mode==1)) then + if(output_mode>=2) then + disp("Error : Invalid input argument ''output_mode'' in AVRPWM0Setup function."); + end +end + + +if(waveform_mode==2) then + if(output_mode>=3) then + disp("Error : Invalid input argument ''output_mode'' in AVRPWM0Setup function."); + end +end + +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRPWM1SetDuty.sci b/2.3-1/macros/Hardware/AVR/AVRPWM1SetDuty.sci new file mode 100644 index 00000000..60dc0a9f --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWM1SetDuty.sci @@ -0,0 +1,52 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRPWM1SetDuty(output_pin,duty,Top_Value) +//Function to Set Duty cycle of PWM Output generated by Timer1 at OC1A or OC1B pin. +//Parameters +// ouput_pin: +// 0 for selecting OC1A as output pin +// 1 for selecting OC1B as output pin +// +// duty: It holds an integer value from 0 to 100 which sets the percentage +// of time for which signal is active. +// +// Top_Value: It holds an integer value from 0 to 65535.This value sets the Top +// value of the counter TCNT1 i.e ICR.(for more info refer datasheet) +// +//Description +// Each Micro controller has PWM output pins which can generate varying voltage +// from 0V-5V.This function Sets the duty cycle of output PWM signal.Also this function +// decides the Top Vale of TCNT1 and the output pin to output PWM signal. +// +//Example +// AVRPWM1SetDuty(0,50,40000); //This function will produce PWM signal of 50% duty +// cycle on OC1A pin and TCNT1 will reset at 40000 instead +// at 65535. +// +//See also +// AVRPWM1Setup +// +//Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(output_pin>=2) then +disp("Error : Invalid input argument ''output_pin'' in AVRPWM1SetDuty function."); +end +if(duty>100) then +disp("Error : Invalid input argument ''duty'' in AVRPWM1SetDuty function."); +end +if(Top_Value>65535) then +disp("Error : Invalid input argument ''Top_Value'' in AVRPWM1Setduty function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRPWM1Setup.sci b/2.3-1/macros/Hardware/AVR/AVRPWM1Setup.sci new file mode 100644 index 00000000..51aa25b1 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWM1Setup.sci @@ -0,0 +1,79 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRPWM1Setup(waveform_mode,output_mode,output_pin) +//Function to Setup OC1A or OC1B pin for required PWM mode +//Description +// Every Micro controller has PWM pins which can generate varying voltages +// from 0V-5V.This function helps to use OC1A or OC1B pin to produces required +// output waveform by setting the waveform mode and otput mode. +// +//Parameters +// waveform_mode: +// 0 for Phase correct PWM Mode +// 1 for Fast PWM Mode +// 2 for CTC Mode +// +// output_mode: +// For Phase Correct PWM Mode: +// 0 for Clear OC1A or OC1B on compare match when up-counting. Set OC1A or OC1B +// on compare match when down-counting. +// 1 for Set OC1A or OC1B on compare match when up-counting. Clear OC1A or OC1B +// on compare match when down-counting. +// +// For Fast PWM Mode: +// 0 for non-inverted output i.e Clear OC1A or OC1B on compare match, set OC1A +// OC1B at BOTTOM. +// 1 for inverted output i.e Set OC1A or OC1B on compare match, clear OC1A or OC1B +// at BOTTOM. +// +// For CTC Mode: +// 0 to Clear OC1A or OC1B on compare match +// 1 to Set OC1A or OC1B on compare match +// 2 to toggle OC1A or OC1B on compare match +// +// output_pin: +// 0 for selecting OC1A as output pin +// 1 for selecting OC1B as output pin +// +//Example +// AVRPWM1Setup(2,0,0); //This function will select CTC mode and will clear OC1A or OC1B +// on compare match.Also as defined the output will be produced at +// 0C1A pin. +//See also +// AVRPWM1SetDuty +// +//Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(waveform_mode>=3) then +disp("Error : Invalid input argument ''waveform_mode'' in AVRPWM1Setup function."); +end +if(waveform_mode==0|waveform_mode==1) then +{ + //if((type(output_mode)~=8)|(output_mode>=2)) then + //disp("Error : Invalid input argument ''output_mode'' in AVRPWM1Setup function."); + //end +} +end +if(waveform_mode==2) then +{ + if((type(output_mode)~=8)|(output_mode>=3)) then + disp("Error : Invalid input argument ''output_mode'' in AVRPWM1Setup function."); + end +} +end +if(output_pin>=2) then +disp("Error : Invalid input argument ''output_pin'' in AVRPWM1Setup function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRPWM2SetDuty.sci b/2.3-1/macros/Hardware/AVR/AVRPWM2SetDuty.sci new file mode 100644 index 00000000..929c1a0a --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWM2SetDuty.sci @@ -0,0 +1,38 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRPWM2SetDuty(duty) +//Function to Set Duty cycle of PWM Output generated by Timer2 at OC2 pin. +//Description +// Each Micro controller has PWM output pins which can generate varying voltage +// from 0V-5V.In this function by varying the duty cycle, varying voltage can be +// produced. +// +//Parameters +// duty : It holds an integer value from 0 to 100 which sets the percentage +// of time for which signal is active. +// +//Example +// AVRPWM2SetDuty(50); //Produces 2.5V at OC2 pin +// AVRPWM2SetDuty(0); //Produces 0V at OC2 pin +// +//See also +// AVRPWM2Setup +// +//Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(duty>100) then +disp("Error : Invalid input argument ''duty'' in AVRPWM2SetDuty function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRPWM2Setup.sci b/2.3-1/macros/Hardware/AVR/AVRPWM2Setup.sci new file mode 100644 index 00000000..d4bc74a6 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRPWM2Setup.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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRPWM2Setup(waveform_mode,output_mode) +//Function to Setup OC2 pin for required PWM mode +//Description +// Every Micro controller has PWM pins which can generate varying voltages +// from 0V-5V.This function helps to use OC2 pin to produces required +// output waveform by setting the waveform mode and otput mode. +// +//Parameters +// waveform_mode: +// 0 for Phase correct PWM Mode +// 1 for Fast PWM Mode +// 2 for CTC Mode +//output_mode: +// For Phase Correct PWM Mode: +// 0 for Clear OC2 on compare match when up-counting. Set OC2 on compare +// match when down-counting. +// 1 for Set OC2 on compare match when up-counting. Clear OC2 on compare +// match when down-counting. +// +// For Fast PWM Mode: +// 0 for non-inverted output i.e Clear OC2 on compare match, set OC2 at BOTTOM. +// 1 for inverted output i.e Set OC2 on compare match, clear OC2 at BOTTOM. +// +// For CTC Mode: +// 0 to Clear OC2 on compare match +// 1 to Set OC2 on compare match +// 2 to toggle OC2 on compare match +// +//Example +// AVRPWM2Setup(2,0); //This function will select CTC waveform mode and will clear OC2 on +// compare match +//See also +// AVRPWM2SetDuty +// +//Authors +// Ashish Kamble +// +//This is curretly dummy function. It provides no functionality but is required +//for providing support for generating C code for AVR. + +if(waveform_mode>=3) then +disp("Error : Invalid input argument ''waveform_mode'' in AVRPWM2Setup function."); +end +if((waveform_mode==0)|(waveform_mode==1)) then +{ + //if((type(output_mode)~=8)|(output_mode>=2)) then + //disp("Error : Invalid input argument ''output_mode'' in AVRPWM2Setup function."); + //end +} +end +if(waveform_mode==2) then +{ + if((type(output_mode)~=8)|(output_mode>=3)) then + disp("Error : Invalid input argument ''output_mode'' in AVRPWM2Setup function."); + end +} +end + +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRReadADC.sci b/2.3-1/macros/Hardware/AVR/AVRReadADC.sci new file mode 100644 index 00000000..7fd3e67e --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRReadADC.sci @@ -0,0 +1,44 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function adc_result = AVRReadADC(channel) +// Function to get voltage on analog pin on AVR +// +// Calling Sequence +// u8AVRReadADCs(channel) +// +// Parameters +// channel : Select which channel is to be read. Values from 0-7 select one +// of the pins ADC0-ADC7. For other possible channel values refer +// datasheet +// Returns-> +// result : Digital value for the voltage present on channel selected +// +// Description +// This function returns digital value for present on adc pins. 'channel' +// selects which of the ADC0-ADC7 is to be used for reading analog value. +// Apart from reading just ADC0-ADC7 other it can also read differential +// voltages between some pins. For channel values for those options, please +// refer datasheet. +// +// Examples +// adc_result = u8AVRReadADC(0) //Read ADC0 +// +// Authors +// Siddhesh Wani Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. + +if(channel>=8) then +disp("Error : Inavlid input argument ''channel'' in AVRReadADC function."); +end +adc_result = 0; //adc_result has been initialised to avoid runtime error. +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRSleep.sci b/2.3-1/macros/Hardware/AVR/AVRSleep.sci new file mode 100644 index 00000000..a1b6add2 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRSleep.sci @@ -0,0 +1,4 @@ +function AVRSleep(delay) + + +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci new file mode 100644 index 00000000..7c5dd1da --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRTimerSetup.sci @@ -0,0 +1,56 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRTimerSetup(timer,prescaler,clock_source) +//Function to setup Timers in ATmega16 +//Descrpition: +// This function tells the micro controller which clock source you will be using. +// The timer value and prescaler value passed in this function setup the timer as per +// your requirement. +// +//Parameters: +// timer : It is an integer value. +// 0 to setup timer0 +// 1 to setup timer1 +// 2 to setup timer2 +// prescaler : It is an integer value. +// 1 for no prescaling i.e clock will run at max 16Hz frequency +// 8 for prescaling clock by 8 i.e new clock frequency will be (clk/8) +// 64 for prescaling clock by 64 i.e new clock frequency will be (clk/64) +// 256 for prescaling clock by 256 i.e new clock frequency will be (clk/256) +// 1024 for prescaling clock by 1024 i.e new clock frequency will be (clk/1024) +// clock_source : It is an integer value. +// 0 if you are using internal clock source +// 1 if you are using external clock source +//Example +// AVRTimerSetup(0,64,0); //This function will select timer0 with timer running as per +// internal clock source and prescaled by 64. +// +//See also +// AVRGetTimerValues +// +//Authors +// Ashish Kamble +// +//This is curretly dummy function. It provides no functionality but is required +//for providing support for generating C code for AVR. + +if(timer>=3) then +disp("Error : Invalid input argument ''timer'' in AVRTimerSetup function."); +end + +if(~((prescaler==1)|(prescaler==8)|(prescaler==64)|(prescaler==256)|(prescaler==1024))) then +disp("Error : Invalid input argument ''prescaler'' in AVRTimerSetup function."); +end + +if(clock_source>=2) then +disp("Error : Invalid input argument ''clock_source'' in AVRTimerSetup function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRUARTReceive.sci b/2.3-1/macros/Hardware/AVR/AVRUARTReceive.sci new file mode 100644 index 00000000..790894fb --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRUARTReceive.sci @@ -0,0 +1,30 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function received = AVRUARTReceive() +// Function to Receive Char value send to ATmega16 using UART or USART. +// Description +// This function Receives Char as 8 bit value.This value is stored in UDR at receiving +// end. +// +//Examples +// state = AVRUARTReceive(); //This function will Receive char and return the entire value +// +//See also +// AVRUARTSetup +// AVRUARTTransmit +// +// Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. +received = 0; // received has been initialised to avoid runtime error. +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRUARTSetup.sci b/2.3-1/macros/Hardware/AVR/AVRUARTSetup.sci new file mode 100644 index 00000000..32e5db86 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRUARTSetup.sci @@ -0,0 +1,61 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRUARTSetup(mode, baudrate, stopbits, parity) +// Function to Setup Serial Communication i.e UART or USART in ATmega16. +// Description +// This function Setup the UART or USART for Serial Communicaion between ATmega16 +// and different micro controllers or between ATmega16 and Computer. +// +// Parameters +// mode : +// 0 for Asynchronous Normal mode +// 1 for Asynchronous Double Speed mode +// 2 for Synchronous mode +// +// baudrate : Enter one of the following available baudrates +// 2400 , 4800 , 9600 , 14400 , 19200 , 28800 , 38400 , 57600 , +// 768000 , 115200 , 230400 , 250000 , 1000000 . +// +// stopbits : +// 0 for one stopbit +// 1 for two stopbits +// +// parity : +// 0 for parity disabled +// 1 for even parity +// 2 for odd parity +// +//Examples +// AVRUARTSetup(0,9600,0,0); //This function will enable UART Communication for ATmega16 +// with 9600 as baudrate,one stop bit and parity disabled +// See also +// AVRUARTTransmit +// AVRUARTReceive +// +// Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. +if(mode>=3) then +disp("Error : Invalid input argument ''mode'' in AVRUARTSetup function."); +end + +if((baudrate <> 2400)&(baudrate <> 4800)&(baudrate <> 9600)&(baudrate <> 14400)&(baudrate <> 28800)&(baudrate <> 38400)&(baudrate <> 57600)&(baudrate <> 768000)&(baudrate <> 115200)&(baudrate <> 230400)&(baudrate <> 250000)& (baudrate <> 1000000)) then +disp("Error : Invalid input argument ''baudrate'' in AVRUARTSetup function."); +end +if(stopbits>=2) then +disp("Error : Invalid input argument ''stopbits'' in AVRUARTSetup function."); +end +if(parity>=3) then +disp("Error : Invalid input argument ''parity'' in AVRUARTSetup function."); +end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/AVRUARTTransmit.sci b/2.3-1/macros/Hardware/AVR/AVRUARTTransmit.sci new file mode 100644 index 00000000..eb358499 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/AVRUARTTransmit.sci @@ -0,0 +1,33 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRUARTTransmit(data) +// Function to Transmit data using UART or USART. +// Description +// This function Tranmits data over UART or USART.The data to be transmitted can +// be a Char , String , Unsigned Int, Signed Int. +// +// Parameter +// data : +// The data to be transmitted can be a Char,String,Unsigned Int,Signed Int. +// +//Examples +// AVRUARTTransmit("This is example"); //This function will transmit the entered string. +// +//See also +// AVRUARTSetup +// AVRUARTReceive +// +// Authors +// Ashish Kamble +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. +endfunction diff --git a/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci b/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci new file mode 100644 index 00000000..99c6242f --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/GetAVRSupportFunctions.sci @@ -0,0 +1,43 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function AVRSupportFunctions = GetAVRSupportFunctions() +// ----------------------------------------------------------------- +// Get list of AVR peripherals supported +// +// Input data: +// None +// +// Output data: +// None +// +// Author: Siddhesh Wani Ashish Kamble +// ----------------------------------------------------------------- + +AVRSupportFunctions = [ + "AVRADCSetup" + "AVRDigitalIn" + "AVRDigitalOut" + "AVRDigitalSetup" + "AVRDigitalPortSetup" + "AVRTimerSetup" + "AVRGetTimerValue" + "AVRPWM0Setup" + "AVRPWM0SetDuty" + "AVRPWM1Setup" + "AVRPWM1SetDuty" + "AVRPWM2Setup" + "AVRPWM2SetDuty" + "AVRReadADC" + "AVRSleep" + "AVRUARTSetup" + ]; + +endfunction diff --git a/2.3-1/macros/Hardware/AVR/GetPeripheral.sci b/2.3-1/macros/Hardware/AVR/GetPeripheral.sci new file mode 100644 index 00000000..ac909deb --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/GetPeripheral.sci @@ -0,0 +1,31 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function Peripheral = GetPeripheral(FunName,InArg) +// ----------------------------------------------------------------- +// Get an acronym for peripheral being used to be inserted in list of +// used peripherals +// +// Input data: +// FunName: Name of the function to be checked +// InArg:Input arguements passed to function 'FunName' +// +// Output data: +// Peripheral: Acronym for peripheral to be initialised +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +//select FunName + +//case AVRDigitalOut: +// Peripheral = list('PORT', InArg(1),InArg(2)]; +//end +endfunction diff --git a/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci b/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci new file mode 100644 index 00000000..198ea1da --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/InsertPeripheralInList.sci @@ -0,0 +1,27 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function InsertPeripheralInList(Peripheral,PeripheralListFile) +// ----------------------------------------------------------------- +// Insert input peripheral in peripherals' list +// +// Input data: +// Peripheral: Peripheral of type 'list' to be instertd in list +// PeripheralListFile: Name of file containing list of peripheral used +// +// Output data: +// None +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +load(PeripheralListFile,'PheripheralList'); + +endfunction diff --git a/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci b/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci new file mode 100644 index 00000000..94f4af7c --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/IsAVRSupportFunction.sci @@ -0,0 +1,32 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function Output = IsAVRSupportFunction(FunName) +// ----------------------------------------------------------------- +// Check whether input function name is an AVR support function or not. +// +// Input data: +// FunName: Name of the function to be checked +// +// Output data: +// Output: True or False depending whether given function is an AVR +// support functions or not +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +//Get list of supported functions for AVR +AVRSupportFunctions = GetAVRSupportFunctions(); + +//Check whether input function is present in above list or not +FunNameInAVRSupport = members(FunName,AVRSupportFunctions); +Output = bool2s(FunNameInAVRSupport~=0); + +endfunction diff --git a/2.3-1/macros/Hardware/AVR/buildmacros.sce b/2.3-1/macros/Hardware/AVR/buildmacros.sce new file mode 100644 index 00000000..2954a424 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/buildmacros.sce @@ -0,0 +1,4 @@ + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib Binary files differnew file mode 100644 index 00000000..7631c354 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/lib diff --git a/2.3-1/macros/Hardware/AVR/names b/2.3-1/macros/Hardware/AVR/names new file mode 100644 index 00000000..8fcfdb75 --- /dev/null +++ b/2.3-1/macros/Hardware/AVR/names @@ -0,0 +1,22 @@ +AVRADCSetup +AVRDigitalIn +AVRDigitalOut +AVRDigitalPortSetup +AVRDigitalSetup +AVRGetTimerValue +AVRPWM0SetDuty +AVRPWM0Setup +AVRPWM1SetDuty +AVRPWM1Setup +AVRPWM2SetDuty +AVRPWM2Setup +AVRReadADC +AVRSleep +AVRTimerSetup +AVRUARTReceive +AVRUARTSetup +AVRUARTTransmit +GetAVRSupportFunctions +GetPeripheral +InsertPeripheralInList +IsAVRSupportFunction diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci new file mode 100644 index 00000000..3e6397b2 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci @@ -0,0 +1,48 @@ +function RPiSupportFunctions = GetRPISupportFunctions() +// ----------------------------------------------------------------- +// Get list of RPI peripherals supported +// +// Input data: +// None +// +// Output data: +// None +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +RPiSupportFunctions = [ + "RPI_DigitalIn" + "RPI_DigitalOut" + "RPI_DigitalSetup" + "RPI_DelayMilli" + "RPI_DelayMicro" + "RPI_GetMillis" + "RPI_GetMicros" + "RPI_SerialSetup" + "RPI_SerialClose" + "RPI_SerialSendChar" + "RPI_SerialFlush" + "RPI_SerialGetChar" + "RPI_ThreadCreate" + "RPI_PinISR" + "RPI_HardPWMWrite" + "RPI_HardPWMSetRange" + "RPI_HardPWMSetClock" + "RPI_HardPWMSetMode" + ]; + +//Note: "RPI_SerialSendData" is removed since distinction between input data +//types is required + + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci new file mode 100644 index 00000000..c6a2c365 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci @@ -0,0 +1,32 @@ +function Output = IsRPISupportFunction(FunName) +// ----------------------------------------------------------------- +// Check whether input function name is a RPi support function or not. +// +// Input data: +// FunName: Name of the function to be checked +// +// Output data: +// Output: True or False depending whether given function is a RPi +// support functions or not +// +// 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// +// ----------------------------------------------------------------- + +//Get list of supported functions for AVR +RPISupportFunctions = GetRPISupportFunctions(); + +//Check whether input function is present in above list or not +FunNameInRPISupport = members(FunName,RPISupportFunctions); +Output = bool2s(FunNameInRPISupport~=0); + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci new file mode 100644 index 00000000..bbb0bb3b --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci @@ -0,0 +1,38 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_DelayMicro(time) +// Function to insert some delay in code execution. +// +// Calling Sequence +// RPI_DelayMicro(time) +// +// Parameters +// time: time(microseconds) for which execution is to be delayed +// +// Description +// this function can be used for insertig execution delays. 'time' should be +// specified in microseconds.'time' should be between (1-65536). +// Note: Delay inserted by this function is not accurate, but depedent on +// operating system, other running tasks etc. +// +// Examples +// RPI_DelayMilli(100) //This will delay the execution of next code by 100 ms. +// +// See also +// RPI_DelayMicro +// +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci new file mode 100644 index 00000000..13b79625 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci @@ -0,0 +1,39 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_DelayMilli(time) +// Function to insert some delay in milli seconds in code execution. +// +// Calling Sequence +// RPI_DelayMilli(time) +// +// Parameters +// time: time(milliseconds) for which execution is to be delayed +// +// Description +// This function can be used for insertig execution delays. 'time' should be +// specified in milliseconds. If more resolution is required, use 'RPI_DelayMicro' +// for inserting delay in microseconds. +// Note: Delay inserted by this function is not accurate, but depedent on +// operating system, other running tasks etc. +// +// Examples +// RPI_DelayMilli(100) //This will delay the execution of next code by 100 ms. +// +// See also +// RPI_DelayMicro +// +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci new file mode 100644 index 00000000..781c49c8 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci @@ -0,0 +1,43 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function state = RPI_DigitalIn(pin) +// Function to read current state on digital pins. +// +// Calling Sequence +// state = RPI_DigitalIn(pin) +// +// Parameters +// pin : pin of RPi to be used +// state : current state of the pin (0 -> LOW, 1 -> HIGH) +// +// Description +// This fucntion is used for reading the current state on gpio pins of RPi. 'RPI_DigitalSetup' function must be called before this for setting up pin as input. 'pin' must be specified from list given. 'state' specifies the input state (0 -> Low, 1-> High) +// Examples +// RPI_DigitalIn(RPI_GPIO_P1_03) //Reads the state of pin 3 of header P1. +// +// See also +// RPI_DigitalSetup RPI_DigitalOut +// +// +// Authors +// Siddhesh Wani +// +// ----------------------------------------------------------------- +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; + +PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO + +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +state = 1; +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci new file mode 100644 index 00000000..dde3c934 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci @@ -0,0 +1,44 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_DigitalOut(pin, state) +// Function to output desired state on digital pins. +// +// Calling Sequence +// RPI_DigitalOut(pin, state) +// +// Parameters +// pin : pin of RPi to be used +// state : desired state of the pin (0 -> LOW, 1 -> HIGH) +// +// Description +// This fucntion is used for outputting the desired state on gpio pins of RPi. 'RPI_DigitalSetup' function must be called before this for setting up pin as output. 'pin' must be specified from list given. 'state' specifies the output state (0 -> Low, 1-> High) +// Examples +// RPI_DigitalOut(RPI_GPIO_P1_03,0) //Changes the state of pin 3 of header P1 as 'Low'. +// +// See also +// RPI_DigitalSetup RPI_DigitalIn +// +// +// Authors +// Siddhesh Wani +// +// ----------------------------------------------------------------- +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; + +PinIsGPIO = members(pin, supported_pins); //Check if output pin supports GPIO + +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +state = 1; + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci new file mode 100644 index 00000000..01d6e07d --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci @@ -0,0 +1,36 @@ +function RPI_DigitalSetup(pin, direction) +// Function to setup digital pins. +// +// Calling Sequence +// RPI_DigitalSetup(pin,direction) +// +// Parameters +// pin : pin of RPi to be used +// direction : direction to be set for pin +// 0 -> INPUT, 1 -> OUTPUT, 2->PWM Output +// +// Description +// There are few pins available on RPi as Gpio or digital io. These pins can be used as digital output or input. Pin name must be provided from list provided. Please refer '' for complete list of pins. Direction can be 0 or 1 depending upon desired function (Input/output) +// Examples +// RPI_DigitalSetup(3,0) //Sets pin 3 of header P1 as input +// +// See also +// RPI_DigitalIn RPI_DigitalOut +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; + +PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO + +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +state = 1; + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci new file mode 100644 index 00000000..6c4db57a --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci @@ -0,0 +1,39 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function Micros = RPI_GetMicros() +// Function to get time in Microsecond since first setup function called. +// +// Calling Sequence +// Micros = RPI_GetMicros() +// +// Parameters +// Micros: time in Microseconds since first setup function called +// +// Description +// This function can be used to get time since first setup function called. +// Note: To use this function atleast one setup function must be called. +// +// Examples +// start = RPI_GetMicros() +// RPI_DelayMicro(1000) //This will delay the execution of next code by 100 ms. +// end = RPI_GetMicros() +// delay = end- start //This should be approximately 1000 us. +// +// See also +// RPI_GetMillis RPI_DelayMilli RPI_DelayMicro +// +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +Micros = 0; +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci new file mode 100644 index 00000000..c034a705 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci @@ -0,0 +1,39 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function Millis = RPI_GetMillis() +// Function to get time in millisecond since first setup function called. +// +// Calling Sequence +// Millis = RPI_GetMillis() +// +// Parameters +// Millis: time in milliseconds since first setup function called +// +// Description +// This function can be used to get time since first setup function called. +// Note: To use this function atleast one setup function must be called. +// +// Examples +// start = RPI_GetMillis() +// RPI_DelayMilli(100) //This will delay the execution of next code by 100 ms. +// end = RPI_GetMillis() +// delay = end- start //This should be approximately 100ms. +// +// See also +// RPI_GetMicros RPI_DelayMilli RPI_DelayMicro +// +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +Millis = 0; +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci new file mode 100644 index 00000000..8448d364 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci @@ -0,0 +1,35 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_HardPWMSetClock(clock_divisor) +// Function to set PWM clock. PWM clock frequency is 19.2MHz, which can be reduced +// using suitable clock_divisor (1 to 2048, powers of 2) +// +// Calling Sequence +// RPI_HardPWMSetClock(clock_divisor) +// +// Parameters +// clock_divisor: Value can be from 1 to 2048, powers of 2. +// Description +// This function decides pwm clock. +// PWM frequency = (PWM Clock frequency/Clock divisor/range) +// PWM clock frequency = 19.2 MHz +// clock divisor is setup using RPI_HardPWMSetClock +// range is setup using RPI_HardPWMSetRange +// Examples +// +// See also +// RPI_HardPWMSetWrite RPI_HardPWMSetRange +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci new file mode 100644 index 00000000..57b82601 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci @@ -0,0 +1,32 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_HardPWMSetMode(pwm_mode) +// Function to set PWM mode. Two modes are available - balanced and mark/space +// +// Calling Sequence +// RPI_HardPWMSetMode(pwm_mode) +// +// Parameters +// pwm_mode: decides pwm mode +// 0 -> balanced +// 1 -> mark/space +// Description +// This function decides pwm mode +// Examples +// +// See also +// RPI_HardPWMSetWrite RPI_HardPWMSetRange +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci new file mode 100644 index 00000000..c2075e2d --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci @@ -0,0 +1,35 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_HardPWMSetRange(range_val) +// Function to set range value for PWM. Range value along with clock divisor +// decides pwm frequency. Range value must be less than 1024 +// +// Calling Sequence +// RPI_HardPWMSetRange(range_val) +// +// Parameters +// range_val: range for pwm +// Description +// This function decides range for pwm. +// PWM frequency = (PWM Clock frequency/Clock divisor/range) +// PWM clock frequency = 19.2 MHz +// clock divisor is setup using RPI_HardPWMSetClock +// range is setup using RPI_HardPWMSetRange +// Examples +// +// See also +// RPI_HardPWMSetClock RPI_HardPWMWrite +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci new file mode 100644 index 00000000..dba5e674 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci @@ -0,0 +1,39 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_HardPWMWrite(pin,value) +// Function to change pwm duty on specified pin. Hardware PWM is available +// only on pin 12. So, only '12' should be provided as pin +// +// Calling Sequence +// RPI_HardPWMWrite(12,512) //Value must be smaller than the range set +// using RPI_HARDPWMSetRange +// +// Parameters +// pin: pin no on which pwm value is to be changed. Currently only 12 is allowed +// value: pwm value for given pin. This must be less than range value set +// Description +// This function changes pwm duty on specified pin. As for RPi, only one pin +// (pin 12) is available for hardware PWM. +// PWM frequency = (PWM Clock frequency/Clock divisor/range) +// PWM clock frequency = 19.2 MHz +// clock divisor is setup using RPI_HardPWMSetClock +// range is setup using RPI_HardPWMSetRange +// Actual PWM duty = value/range +// Examples +// +// See also +// RPI_HardPWMSetClock RPI_HardPWMSetRange +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci new file mode 100644 index 00000000..c2354c1f --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci @@ -0,0 +1,56 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_PinISR(pin, edgetype, fn) +// Function to assign a function to be run when an interrupt occurs on +// specified pin. +// +// Calling Sequence +// RPI_PinISR(pin, edgetype, fn) +// +// Parameters +// pin : pin whose interrupt is to be configured +// edgetype: edge on which interrupt is to be monitored +// 1 -> Falling egde +// 2 -> Rising egde +// 3 -> Both egde +// fn: name of the function to be executed on interrupt occurance +// Description +// This functions monitors interrupt on specified pin for specified edge, +// When that interrupt occurs, function specified by 'fn' is executed. +// Examples +// RPI_PinISR(12, 0, Pin12ISR) //executes 'Pin12ISR' on falling edge on +// pin 12 +// See also +// RPI_ThreadCreate RPI_DigitalSetup +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; + +PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO + +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +EdgeTypeSupported = members(edgetype,[1 2 3]); + +if(EdgeTypeSupported == 0) + error(9999, 'SCI2CERROR: Given edgetype is incorrect. Please specify correct edgetype from [1,2,3]') +end + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci new file mode 100644 index 00000000..f27dd432 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci @@ -0,0 +1,33 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_SerialClose(fd) +// Function to close serial port specified by file descriptor. +// +// Calling Sequence +// RPI_SerialClose(fd) +// +// Parameters +// fd : file descriptor for opened port +// Description +// This functions closes the specified serial port +// Examples +// serial1 = RPI_SerialSetup('/dev/ttyAMA0',9600) //opens port 'USBtty0' +// RPI_SerialClose(serial1) +// See also +// RPI_SerialOpen RPI_SerialSendChar +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci new file mode 100644 index 00000000..9bab386f --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci @@ -0,0 +1,34 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function data = RPI_SerialGetChar(fd) +// Function to read data from specified serial port +// +// Calling Sequence +// RPI_SerialGetCharfd) +// +// Parameters +// fd: file descriptor returned when serial port was opened +// Description +// This functions reads character form specified port. In case no +// character is available, -1 is returned after 10 sec. +// Examples +// serial = RPI_SetupSerial("/dev/ttyAMA0", 9600); +// RPI_SerialFlush(serial); +// bytes = RPI_SerialDataAvail(serial); +// +// See also +// RPI_SetupSerial RPI_SendData +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci new file mode 100644 index 00000000..a26e5b97 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci @@ -0,0 +1,36 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function data = RPI_SerialGetChar(fd) +// Function to read data from specified serial port +// +// Calling Sequence +// RPI_SerialGetChar(fd) +// +// Parameters +// fd: file descriptor returned when serial port was opened +// Description +// This functions reads character form specified port. In case no +// character is available, -1 is returned after 10 sec. +// Examples +// serial = RPI_SetupSerial("/dev/ttyAMA0", 9600); +// bytes = RPI_SerialDataAvail(serial); +// if(bytes>0) +// data = RPI_SerialGetChar(serial) //Reads single character +// end +// See also +// RPI_SetupSerial RPI_SendData +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +data = 0; +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci new file mode 100644 index 00000000..769b21d2 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci @@ -0,0 +1,37 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_SerialSendChar(fd, data) +// Function to send 8-bit char through serial port. +// +// Calling Sequence +// RPI_SerialSendChar(fd, data) +// +// Parameters +// fd : file descriptor for opened port +// data: 8-bit character data to be sent +// Description +// This functions sends input 8-bit character data on specified serial port +// Examples +// serial1 = RPI_SerialSetup('/dev/ttyAMA0',9600) //opens port 'USBtty0' +// RPI_SerialSendChar(serial1, 'H'); +// RPI_SerialSendChar(serial1, 'i'); +// RPI_SerialClose(serial1); +// +// See also +// RPI_SerialOpen RPI_SerialClose +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci new file mode 100644 index 00000000..c05852b1 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci @@ -0,0 +1,38 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function RPI_SerialSendData(fd, data) +// Function to send data through serial port. Data can be of any datatype and +// can be scalar or matrix +// +// Calling Sequence +// RPI_SerialSendData(fd, data) +// +// Parameters +// fd : file descriptor for opened port +// data: data to be sent +// Description +// This functions sends input data on specified serial port +// Examples +// A = [2 3; 4 5] +// serial1 = RPI_SerialSetup('/dev/ttyAMA0',9600) //opens port 'USBtty0' +// RPI_SerialSendData(serial1, A); +// RPI_SerialClose(serial1); +// +// See also +// RPI_SerialOpen RPI_SerialClose +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci new file mode 100644 index 00000000..0f266610 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci @@ -0,0 +1,36 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function fd = RPI_SerialSetup(port, baudrate) +// Function to setup serial port. +// +// Calling Sequence +// RPI_SerialSetup(port, baudrate) +// +// Parameters +// port : port of RPi to be used (eg. ) +// direction : direction to be set for pin (0 -> INPUT, 1 -> OUTPUT) +// fd : file descriptor for opened port, -1 for error +// Description +// This functions opens the specified serial port and returns file descriptor +// for the same +// Examples +// serial1 = RPI_SerialSetup('/dev/ttyAMA0',9600) //opens port 'USBtty0' +// +// See also +// RPI_SerialClose RPI_SerialSendChar +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. +fd = 0; +endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/buildmacros.sce b/2.3-1/macros/Hardware/RasberryPi/buildmacros.sce new file mode 100644 index 00000000..2954a424 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/buildmacros.sce @@ -0,0 +1,4 @@ + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/Hardware/RasberryPi/lib b/2.3-1/macros/Hardware/RasberryPi/lib Binary files differnew file mode 100644 index 00000000..c238317e --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/lib diff --git a/2.3-1/macros/Hardware/RasberryPi/names b/2.3-1/macros/Hardware/RasberryPi/names new file mode 100644 index 00000000..fa647761 --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/names @@ -0,0 +1,21 @@ +GetRPISupportFunctions +IsRPISupportFunction +RPI_DelayMicro +RPI_DelayMilli +RPI_DigitalIn +RPI_DigitalOut +RPI_DigitalSetup +RPI_GetMicros +RPI_GetMillis +RPI_HardPWMSetClock +RPI_HardPWMSetMode +RPI_HardPWMSetRange +RPI_HardPWMWrite +RPI_PinISR +RPI_SerialClose +RPI_SerialFlush +RPI_SerialGetChar +RPI_SerialSendChar +RPI_SerialSendData +RPI_SerialSetup +u16RPISerialDataAvail diff --git a/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci b/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci new file mode 100644 index 00000000..6eb29a1c --- /dev/null +++ b/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci @@ -0,0 +1,37 @@ +// 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function bytes = RPI_SerialDataAvail(fd) +// Function to get number of data bytes available on serial port specified by +// file descriptor +// Calling Sequence +// RPI_SerialDataAvail(fd) +// +// Parameters +// fd : file descriptor for already opened serial port +// Description +// This functions returns number of characters available to read, +// otherwise reads -1 in case of error. This function can be used to check +// new data is available on serial port +// Examples +// serial = RPI_SerialOpen("/dev/ttyAMA0", 9600); +// charsToRead = RPI_SerialDataAvail(serial); +// See also +// RPI_SerialOpen RPI_SerialGetChar +// +// +// Authors +// Siddhesh Wani +// ----------------------------------------------------------------- + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for RPi. + +bytes = 0; + +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ImageProcessing/buildmacros.sce b/2.3-1/macros/ImageProcessing/buildmacros.sce new file mode 100644 index 00000000..6431a7df --- /dev/null +++ b/2.3-1/macros/ImageProcessing/buildmacros.sce @@ -0,0 +1,26 @@ +// Copyright (C) 2016 - 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +OpencvDirs = [ "core", ... + "highgui", ... + "imgproc"]; + + + current_path = get_absolute_file_path("buildmacros.sce"); + + for L=1:size(OpencvDirs,"*") + myfile = current_path + filesep() + OpencvDirs(L) + filesep() + "buildmacros.sce"; + if isfile(myfile) then + exec(myfile); + end +end + +clear current_path; diff --git a/2.3-1/macros/ImageProcessing/core/CV_CreateImage.sci b/2.3-1/macros/ImageProcessing/core/CV_CreateImage.sci new file mode 100644 index 00000000..02758154 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/core/CV_CreateImage.sci @@ -0,0 +1,41 @@ +// Copyright (C) 2016 - 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: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function img = CV_CreateImage(width,height,bit_depth,no_of_channels) +// function to create an image object of given size and type +// +// Calling Sequence +// CV_CreateImage(image_size,bit_depth,no_of_channels) +// +// Parameters +// image_size: width and height of image +// bit_depth: Bit depth of image elements +// no_of_channels: no of channels per pixels +// +// Description +// This function can be used to create opencv image object. For more info +// about bit depth and channels,please refer to OpenCV documentation +// Examples +// CV_CreateImage([320 240], "IPL_DEPTH_8U", 1) //to create image of the size 320*240 +// pixels with 8 bit unsigned each pixels and gray scale image +// +// See also +// CV_LoadImage +// +// +// Authors +// Siddhesh Wani +// +img = 0; +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/core/CV_GetImgSize.sci b/2.3-1/macros/ImageProcessing/core/CV_GetImgSize.sci new file mode 100644 index 00000000..02e018a7 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/core/CV_GetImgSize.sci @@ -0,0 +1,37 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function imgsize = CV_GetImgSize(img) +// function to get size of the image (width*height) +// +// Calling Sequence +// CV_GetImgSize(img) +// +// Parameters +// img: image whose size is to be returned +// +// Description +// This function can be used for retriving size information of the image. +// It returs an array with first image element as width and second as height +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// size = CV_GetImgSize(img) +// +// See also +// CV_LoadImage CV_CreateImage +// +// Authors +// Siddhesh Wani +// +imgsize = [0 0]; +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/core/buildmacros.sce b/2.3-1/macros/ImageProcessing/core/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/core/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/ImageProcessing/core/lib b/2.3-1/macros/ImageProcessing/core/lib Binary files differnew file mode 100644 index 00000000..fedf05e1 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/core/lib diff --git a/2.3-1/macros/ImageProcessing/core/names b/2.3-1/macros/ImageProcessing/core/names new file mode 100644 index 00000000..f56c951c --- /dev/null +++ b/2.3-1/macros/ImageProcessing/core/names @@ -0,0 +1,2 @@ +CV_CreateImage +CV_GetImgSize diff --git a/2.3-1/macros/ImageProcessing/highgui/CV_LoadImage.sci b/2.3-1/macros/ImageProcessing/highgui/CV_LoadImage.sci new file mode 100644 index 00000000..01dda125 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/CV_LoadImage.sci @@ -0,0 +1,40 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function img = CV_LoadImage(filename,loadtype) +// function to load an image object from given filename +// +// Calling Sequence +// CV_LoadImage(filename,loadtype) +// +// Parameters +// filename: name of file to be opened +// loadtype: desired load method +// <0 --> image is loaded as is (with alpha channel) +// =0 --> image is loaded as greyscale +// >0 --> 3 channel color image is loaded +// +// Description +// This function can be used for loading a previously stored image +// Examples +// CV_LoadImage('~/test.jpg',0) +// +// See also +// CV_CreateImage +// +// +// Authors +// Siddhesh Wani +// +img = 0; +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/highgui/CV_SaveImage.sci b/2.3-1/macros/ImageProcessing/highgui/CV_SaveImage.sci new file mode 100644 index 00000000..708edff0 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/CV_SaveImage.sci @@ -0,0 +1,38 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function status = CV_SaveImage(filename,img) +// function to save an image object as a given filename +// +// Calling Sequence +// CV_SaveImage(filename,img) +// +// Parameters +// filename: name of file image to be saved as +// img: image to be saved +// +// Description +// This function can be used for saving image. File format is detected +// from file extension +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// CV_SaveImage('test1.png',img) +// +// See also +// CV_LoadImage CV_CreateImage +// +// Authors +// Siddhesh Wani +// +status = 0; +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/highgui/CV_ShowImage.sci b/2.3-1/macros/ImageProcessing/highgui/CV_ShowImage.sci new file mode 100644 index 00000000..4bfe5913 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/CV_ShowImage.sci @@ -0,0 +1,39 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function CV_ShowImage(winname,img) +// function to show an image +// +// Calling Sequence +// CV_ShowImage(img) +// CV_ShowImage(winname,img) +// +// Parameters +// winname: name of window in which img is to be shown +// img: image to be shown already acquired (from file/camera) +// +// Description +// This function can be used for showing images +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// CV_ShowImage(img) +// +// See also +// CV_CreateImage CV_LoadImage +// +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/highgui/CV_WaitKey.sci b/2.3-1/macros/ImageProcessing/highgui/CV_WaitKey.sci new file mode 100644 index 00000000..0facaafe --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/CV_WaitKey.sci @@ -0,0 +1,39 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function CV_WaitKey(delay) +// function similar to cvWaitKey +// +// Calling Sequence +// CV_WaitKey(delay) +// +// Parameters +// delay: waiting delay, if 0 then wait till keypress +// +// Description +// This function can be used for inseting some delay. This function must +// follow CV_ShowImage to display image. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// CV_ShowImage('',img) +// CV_WaitKey(0); +// +// See also +// CV_LoadImage CV_ShowImage +// +// +// Authors +// Siddhesh Wani +// + +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/highgui/buildmacros.sce b/2.3-1/macros/ImageProcessing/highgui/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/ImageProcessing/highgui/lib b/2.3-1/macros/ImageProcessing/highgui/lib Binary files differnew file mode 100644 index 00000000..30217607 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/lib diff --git a/2.3-1/macros/ImageProcessing/highgui/names b/2.3-1/macros/ImageProcessing/highgui/names new file mode 100644 index 00000000..a717164a --- /dev/null +++ b/2.3-1/macros/ImageProcessing/highgui/names @@ -0,0 +1,4 @@ +CV_LoadImage +CV_SaveImage +CV_ShowImage +CV_WaitKey diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci new file mode 100644 index 00000000..a922d798 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_AdaptiveThreshold.sci @@ -0,0 +1,48 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_AdaptiveThreshold(srcimg,max_value,adaptive_method, ... + thresh_type, block_size, C) +// function to adaptively threshold input image +// +// Calling Sequence +// dst = CV_AdaptiveThreshold(srcimg,max_value,adaptive_method, ... +// thresh_type,blk_size,c) +// +// Parameters +// src -> Source 8-bit single-channel image. +// max_value -> Non-zero value assigned to the pixels for which the +// condition is satisfied. See the details below. +// adaptive_method -> Adaptive thresholding algorithm to use, +// ADAPTIVE_THRESH_MEAN_C or ADAPTIVE_THRESH_GAUSSIAN_C . +// thresh_type -> Thresholding type that must be either THRESH_BINARY +// or THRESH_BINARY_INV . +// blockSize -> Size of a pixel neighborhood that is used to calculate +// a threshold value for the pixel: 3, 5, 7, and so on. +// C -> Constant subtracted from the mean or weighted mean.Normally, +// it is positive but may be zero or negative as well. +// Description +// This function can be used for adaptively threshold given image +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_AdaptiveThreshold(img,255,"ADAPTIVE_THRESH_MEAN_C", ... +// "THRESH_BINARY",5,0) +// +// See also +// CV_LoadImage CV_CreateImage +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_Blur.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_Blur.sci new file mode 100644 index 00000000..b81df491 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_Blur.sci @@ -0,0 +1,47 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_Blur(srcimg,ksize_width,ksize_height,anchor_x,anchor_y, ... + border_type) +// function to blur image using normalised box filter +// +// Calling Sequence +// dst = CV_Blur(srcimg,ksize_width,ksize_height,anchor_x,anchor_y, ... +// border_type) +// +// Parameters +// srcimg -> Source image. +// ksize_width, ksize_height -> blurring kernel size. +// anchor_x, anchor_y -> x,y coordinates of anchor point +// borderType -> border mode used to extrapolate pixels outside of the +// image. Can be : +// BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh +// BORDER_REFLECT: fedcba|abcdefgh|hgfedcb +// BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba +// BORDER_WRAP: cdefgh|abcdefgh|abcdefg +// BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii +// Description +// This function can be used for blurring image using normalised box +// filter. Image can be of any depth and have any no of channels. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_Blur(img,3,3,-1,-1,"BORDER_CONSTANT") +// +// See also +// CV_LoadImage CV_Threshold, CV_CvtColor +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_Canny.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_Canny.sci new file mode 100644 index 00000000..b21028a0 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_Canny.sci @@ -0,0 +1,47 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function edges = CV_Canny(srcimg,threhold1,threshold2,aperture_size,L2gradient) +//Finds edges in image using Canny algorithm +// +// Calling Sequence +// edges = CV_Canny(srcimg,threhold1,threshold2,aperture_size,L2gradient) +// +// Parameters +// srcimg -> single-channel 8-bit input image. +// threshold1 -> first threshold for the hysteresis procedure. +// threshold2 -> second threshold for the hysteresis procedure. +// aperture_size -> aperture size for the Sobel() operator. +// L2gradient -> a flag, indicating whether a more accurate +// L_2 norm =sqrt{(dI/dx)^2 + (dI/dy)^2} should be used to +// calculate the image gradient magnitude ( L2gradient=1 ), +// or whether the default L_1 norm =|dI/dx|+|dI/dy| is enough +// ( L2gradient=0). +// Description +// This function can be used for finding edes in single channel 8 bit +// image. 'aperture_size' and 'L2gradient' are optionals. By default, +// aperture_size is 3 and L2gradient is false. +// +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_CvtColor(img,"CV_RGB2GRAY"); +// edge = CV_Canny(dst,50,100,3,0); +// +// See also +// CV_LoadImage CV_CvtColor +// +// Authors +// Siddhesh Wani +// +edges = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_CornerHarris.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_CornerHarris.sci new file mode 100644 index 00000000..fb25612b --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_CornerHarris.sci @@ -0,0 +1,53 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function edges = CV_CornerHarris(srcimg,blocksize,ksize,k,border_type) +//Finds edges in image using Harris algorithm +// +// Calling Sequence +// edges = CV_CornerHarris(srcimg,blocksize,ksize,k,border_type) +// +// Parameters +// srcimg -> Input single-channel 8-bit or floating-point image. +// blockSize -> Neighborhood size +// ksize -> Aperture parameter for the Sobel() operator. +// k -> Harris detector free parameter. +// borderType -> border mode used to extrapolate pixels outside of the +// image. It can be : +// BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh +// BORDER_REFLECT: fedcba|abcdefgh|hgfedcb +// BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba +// BORDER_WRAP: cdefgh|abcdefgh|abcdefg +// BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii +// Description +// The function runs the Harris edge detector on the image. For each +// pixel (x, y) it calculates a 2 * 2 gradient covariance matrix M(x,y) +// over a blockSize * blockSize neighborhood. Then, it computes the +// following characteristic: +// dst(x,y) = det(M(x,y)) - k .tr(M(x,y))^2 +// Corners in the image can be found as the local maxima of this +// response map +// +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_CvtColor(img,"CV_RGB2GRAY"); +// edge = CV_CornerHarris(dst,5,3,1,"BORDER_REPLICATE"); +// +// See also +// CV_LoadImage CV_CvtColor +// +// Authors +// Siddhesh Wani +// +edges = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_CvtColor.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_CvtColor.sci new file mode 100644 index 00000000..766844bf --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_CvtColor.sci @@ -0,0 +1,41 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_CvtColor(srcimg,code) +// function to convert image from one colorspace to other colorspace +// +// Calling Sequence +// CV_CvtColor(srcimg,code) +// +// Parameters +// srcimg: source image to be converted +// dstimg: destination image in which to store converted image +// code: String specifying conversion type. Same as defined in OpenCV +// for eg. 'CV_RGB2GRAY' for conversion from RGB image to grayscale image +// dstCn: no of channels in destination image (0 by default) +// +// Description +// This function can be used for converting an image to other colorspace. +// Refer OpenCV documentation for list of available conversions +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_CvtColor(img,'CV_RGB2GRAY') +// +// See also +// CV_LoadImage CV_CreateImage +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_Dilate.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_Dilate.sci new file mode 100644 index 00000000..196cab85 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_Dilate.sci @@ -0,0 +1,52 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_Dilate(srcimg,dilation_type,dilation_size,iterations, ... + border_type,border_value) +// dilates an image by using a specific structuring element. +// +// Calling Sequence +// cvtimg = CV_Dilate(srcimg,dilation_type,dilation_size,[iterations, ... +// border_type,border_value]) +// Parameters +// src -> input image; the number of channels can be arbitrary, but the +// depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. +// dilation_type -> can be one of : MORPH_RECT, MORPH_CROSS, +// MORPH_ELLIPSE +// dilation_size -> size of kernel to be used for erosion. Must be odd +// iterations -> number of times erosion is applied. +// border_type -> pixel extrapolation method. It can be: +// BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh +// BORDER_REFLECT: fedcba|abcdefgh|hgfedcb +// BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba +// BORDER_WRAP: cdefgh|abcdefgh|abcdefg +// BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii +// border_value -> border value in case of a constant border +// Description +// This function can be used for eroding an image. Kernel used for erosion +// is decided by type and size. Size must always be odd. Anchor pint of +// kernel is always center of kernel. Input arguements 'iterations(1), +// border_type(BORDER_CONSTANT) and border_value' are optionals. Whwn not +// specified, default values as as mentioned in brackets. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_Erode(img,"MORPH_RECT",3,1,"BORDER_CONSTANT",0); +// +// See also +// CV_LoadImage CV_Erode +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci new file mode 100644 index 00000000..e8772958 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_DistanceTransform.sci @@ -0,0 +1,40 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function dstimg = CV_DistanceTransform(srcimg,distance_type,mask_size) +// function to calculate distance to closest zero pixels for each pixel +// +// Calling Sequence +// dst = CV_DistanceTransform(srcimg,distance_type,mask_size) +// +// Parameters +// srcimg -> Source 8-bit single-channel image. +// distance_type -> Type of distance. It can be +// CV_DIST_L1, CV_DIST_L2 , or CV_DIST_C +// mask_size -> Size of the distance transform mask +// Description +// This function can be used to calculate distance to closest zero +// pixel for each pixel of the source image. Output is 32 bit floating +// point, single channel image of the same size as that of source image. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_DistanceTransform(img,"CV_DIST_L1",3) +// +// See also +// CV_LoadImage CV_CreateImage CV_CvtColor +// +// Authors +// Siddhesh Wani +// +dstimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_Erode.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_Erode.sci new file mode 100644 index 00000000..d77e9e69 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_Erode.sci @@ -0,0 +1,51 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_Erode(srcimg,erosion_type,erosion_size,iterations, ... + border_type,border_value) +// Erodes an image by using a specific structuring element. +// +// Calling Sequence +// cvtimg = CV_Erode(srcimg,erosion_type,erosion_size,[iterations, ... +// border_type,border_value]) +// Parameters +// src -> input image; the number of channels can be arbitrary, but the +// depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F. +// erosion_type -> can be one of : MORPH_RECT, MORPH_CROSS, MORPH_ELLIPSE +// erosion_size -> size of kernel to be used for erosion. Must be odd +// iterations -> number of times erosion is applied. +// border_type -> pixel extrapolation method. It can be: +// BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh +// BORDER_REFLECT: fedcba|abcdefgh|hgfedcb +// BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba +// BORDER_WRAP: cdefgh|abcdefgh|abcdefg +// BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii +// border_value -> border value in case of a constant border +// Description +// This function can be used for eroding an image. Kernel used for erosion +// is decided by type and size. Size must always be odd. Anchor pint of +// kernel is always center of kernel. Input arguements 'iterations(1), +// border_type(BORDER_CONSTANT) and border_value' are optionals. Whwn not +// specified, default values as as mentioned in brackets. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_Erode(img,"MORPH_RECT",3,1,"BORDER_CONSTANT",0); +// +// See also +// CV_LoadImage CV_Dilate +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci new file mode 100644 index 00000000..0799c4dd --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_GaussianBlur.sci @@ -0,0 +1,51 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_GaussianBlur(srcimg,ksize_width,ksize_height,sigma_x,sigma_y, ... + border_type) +// function to blur image using gaussian filter +// +// Calling Sequence +// dst = CV_Blur(srcimg,ksize_width,ksize_height,anchor_x,anchor_y, ... +// border_type) +// +// Parameters +// srcimg -> Source image. +// ksize_width, ksize_height -> blurring kernel size. must be odd. +// sigmaX -> Gaussian kernel standard deviation in X direction. +// sigmaY -> Gaussian kernel standard deviation in Y direction; +// if sigmaY is zero, it is set to be equal to sigmaX, +// if both sigmas are zeros, they are computed from +// ksize.width and ksize.height , respectively +// borderType -> border mode used to extrapolate pixels outside of the +// image. Can be : +// BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh +// BORDER_REFLECT: fedcba|abcdefgh|hgfedcb +// BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba +// BORDER_WRAP: cdefgh|abcdefgh|abcdefg +// BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii +// Description +// This function can be used for blurring image using gaussian +// filter. Image can be of any depth and have any no of channels. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_GaussianBlur(img,3,3,0,0,"BORDER_CONSTANT") +// +// See also +// CV_LoadImage CV_Blur, CV_CvtColor +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_MedianBlur.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_MedianBlur.sci new file mode 100644 index 00000000..d8f9a900 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_MedianBlur.sci @@ -0,0 +1,41 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_MedianBlur(srcimg,ksize) +// function to blur image using median filter +// +// Calling Sequence +// dst = CV_Blur(srcimg,ksize_width,ksize_height,anchor_x,anchor_y, ... +// border_type) +// +// Parameters +// srcimg -> input 1-, 3-, or 4-channel image; when ksize is 3 or 5, +// the image depth should be CV_8U, CV_16U, or CV_32F, for +// larger aperture sizes, it can only be CV_8U. +// ksize_width -> aperture linear size; it must be odd and greater than 1, +// for example: 3, 5, 7 ... +// Description +// This function can be used for blurring image using median +// filter. Image can be of any depth and have any no of channels. +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_MedianBlur(img,3) +// +// See also +// CV_GaussianBlur CV_Blur, CV_CvtColor +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/CV_Threshold.sci b/2.3-1/macros/ImageProcessing/imgproc/CV_Threshold.sci new file mode 100644 index 00000000..823a5768 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/CV_Threshold.sci @@ -0,0 +1,41 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function cvtimg = CV_Threshold(srcimg,threshold,max_value,thresh_type) +// function to threshold input image +// +// Calling Sequence +// dst = CV_Threshold(srcimg,code,threshold,max_value,thresh_type) +// +// Parameters +// srcimg: source image to be converted +// threshold: threshold value +// max_value: maximum value to be used with THRESH_BINARY and THRESH_BINARY_INV +// thresh_type: Type for threshold. It can one of the following: +// THRESH_BINARY, THRESH_BINARY_INV, THRESH_TRUNC, +// THRESH_TOZERO, THRESH_TOZERO_INV +// Description +// This function can be used for converting an image to other colorspace. +// Refer OpenCV documentation for list of available conversions +// Examples +// img = CV_LoadImage('~/test.jpg',0) +// dst = CV_Threshold(img,100,255,'THRESH_BINARY') +// +// See also +// CV_LoadImage CV_CreateImage +// +// Authors +// Siddhesh Wani +// +cvtimg = 0 +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for OpenCV + +endfunction diff --git a/2.3-1/macros/ImageProcessing/imgproc/buildmacros.sce b/2.3-1/macros/ImageProcessing/imgproc/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/ImageProcessing/imgproc/lib b/2.3-1/macros/ImageProcessing/imgproc/lib Binary files differnew file mode 100644 index 00000000..ac605c04 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/lib diff --git a/2.3-1/macros/ImageProcessing/imgproc/names b/2.3-1/macros/ImageProcessing/imgproc/names new file mode 100644 index 00000000..16240f53 --- /dev/null +++ b/2.3-1/macros/ImageProcessing/imgproc/names @@ -0,0 +1,11 @@ +CV_AdaptiveThreshold +CV_Blur +CV_Canny +CV_CornerHarris +CV_CvtColor +CV_Dilate +CV_DistanceTransform +CV_Erode +CV_GaussianBlur +CV_MedianBlur +CV_Threshold diff --git a/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.sci b/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.sci new file mode 100644 index 00000000..19cf4b88 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.sci @@ -0,0 +1,56 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function GenerateSetupFunction(FileInfo) +// ----------------------------------------------------------------- +// Generate setup functions for Arduino peripherals according to +// entries in given input file +// +// Input data: +// File containing required peripheral initialisation +// +// Output data: +// generates file with setup functions +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + + +SetupListFile = FileInfo.SetupListFile; +load(SetupListFile,'SetupList'); + +SetupArduinoFile = fullfile(FileInfo.CStyleOutCCCodeDir,'setup_arduino.c'); +SetupArduinoFile = fullfile(FileInfo.CStyleOutCCCodeDir,'setup_arduino.cpp'); +C_SCI2CHeader(SetupArduinoFile); + +PrintStringInfo('#include ""setup_arduino.h""',SetupArduinoFile,'file','y'); +PrintStringInfo(' ',SetupArduinoFile,'file','y'); +PrintStringInfo('int setup_arduino()',SetupArduinoFile,'file','y'); +PrintStringInfo('{',SetupArduinoFile,'file','y'); + +nelements=size(SetupList); +for i=1:nelements + funcall = ' '; + funcall = funcall + SetupList(i)(1); + funcall = funcall + '('; + NInArg = size(SetupList(i))-1; + for j=1:NInArg-1 + funcall = funcall + SetupList(i)(j+1); + funcall = funcall + ', '; + end + funcall = funcall + SetupList(i)(NInArg+1); + funcall = funcall + ');'; + PrintStringInfo(funcall,SetupArduinoFile,'file','y'); +end +PrintStringInfo(' ',SetupArduinoFile,'file','y'); +PrintStringInfo(' return (0); ',SetupArduinoFile,'file','y'); +PrintStringInfo('}',SetupArduinoFile,'file','y'); + +endfunction diff --git a/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci b/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci new file mode 100644 index 00000000..69c4ab37 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci @@ -0,0 +1,36 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function ArduinoFunctions = GetArduinoFunctions() +// ----------------------------------------------------------------- +// Get list of Arduino functions supported +// +// Input data: +// None +// +// Output data: +// List of Arduino functions supported +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +ArduinoFunctions = [ + "cmd_digital_out" + "cmd_digital_in" + "cmd_analog_out" + "cmd_analog_in" + "cmd_dcmotor_setup" + "cmd_dcmotor_run" + "cmd_servo_attach" + "cmd_servo_detach" + "cmd_servo_move" + "cmd_i2c_dev"]; + +endfunction diff --git a/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci b/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci new file mode 100644 index 00000000..78bda033 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci @@ -0,0 +1,31 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function ArduinoSetupFunctions = GetArduinoSetupFunctions() +// ----------------------------------------------------------------- +// Get list of Arduino setup functions supported +// +// Input data: +// None +// +// Output data: +// List of Arduino setup functions supported +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +ArduinoSetupFunctions = [ + "cmd_dcmotor_setup" + "cmd_servo_attach" + "cmd_servo_detach" + "cmd_i2c_dev"]; + + +endfunction diff --git a/2.3-1/macros/Scilab-Arduino/InsertSetupInList.sci b/2.3-1/macros/Scilab-Arduino/InsertSetupInList.sci new file mode 100644 index 00000000..6584f293 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/InsertSetupInList.sci @@ -0,0 +1,91 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function InsertSetupInList(FunName,InArg,NInArg,SetupListFile,FunType) +// ----------------------------------------------------------------- +// Generate list of setup functions required acorginto peripherals used +// +// Input data: +// FunName: scilab-arduino toolbox function +// InArg: input arguments for above mentioned function +// NInArg: no of input arguments for above mentioned function +// SetupListFile: file containing list of setup functions +// FunType: Gpio function or initialisation function for any other perpheral +// +// Output data: +// List of setup functions for Arduino +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + + load(SetupListFile,'SetupList'); + + //Check first if current input function already exists in the list + nelements = size(SetupList); + + found=%F; + if(FunType=='Setup') + for i=1:nelements + if(SetupList(i)(1) == FunName) + for j=1:NInArg + if(SetupList(i)(j+1) ~= InArg(j).Name) + found = %F + break; + else + found = %T; + end + end + end + if (found == %T) + break; //One match found. No need to check further. + end + end + + if(found == %F) + temp = list(FunName); + for i=1:NInArg + temp($+1) = InArg(i).Name; + end + end + SetupList($+1) = temp; + elseif((FunType=='Init')&((FunName=='cmd_digital_out')|(FunName=='cmd_analog_out')|(FunName=='cmd_digital_in'))) + for i=1:nelements + if(SetupList(i)(1) == "pinMode") + if(SetupList(i)(2) == InArg(2).Name) + found = %T + break; + else + found = %F; + end + else + + found = %F; + + end + + end + + if(found == %F) + temp = list('pinMode'); + temp($+1) = InArg(2).Name; + if ((FunName=='cmd_digital_out')|(FunName=='cmd_analog_out')) + temp($+1) = 'OUTPUT'; + elseif ((FunName == 'cmd_digital_in') | (FunName=='cmd_analog_in')) + temp($+1) = 'INPUT'; + end + SetupList($+1) = temp; + + end + + + end + save(SetupListFile,'SetupList'); + +endfunction diff --git a/2.3-1/macros/Scilab-Arduino/IsArduinoFunction.sci b/2.3-1/macros/Scilab-Arduino/IsArduinoFunction.sci new file mode 100644 index 00000000..d98f5cd5 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/IsArduinoFunction.sci @@ -0,0 +1,32 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function Output = IsArduinoFunction(FunName) +// ----------------------------------------------------------------- +// Check whether input function name is an Arduino function or not. +// +// Input data: +// FunName: Name of the function to be checked +// +// Output data: +// Output: True or False depending whether given function is an +// Arduino function or not +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +//Get list of supported functions for Arduino +ArduinoFunctions = GetArduinoFunctions(); + +//Check whether input function is present in above list or not +FunNameInArduino = members(FunName,ArduinoFunctions); +Output = bool2s(FunNameInArduino~=0); + +endfunction diff --git a/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci b/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci new file mode 100644 index 00000000..4afceca8 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci @@ -0,0 +1,34 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function Output = IsArduinoSetupFunction(FunName) +disp(FunName) +// ----------------------------------------------------------------- +// Check whether input function name is an Arduino setup function or not. +// +// Input data: +// FunName: Name of the function to be checked +// +// Output data: +// Output: True or False depending whether given function is an +// Arduino setup function or not +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + +//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); + +endfunction diff --git a/2.3-1/macros/Scilab-Arduino/buildmacros.sce b/2.3-1/macros/Scilab-Arduino/buildmacros.sce new file mode 100644 index 00000000..dfeb4755 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/buildmacros.sce @@ -0,0 +1,29 @@ +// This file is released into the public domain + +Directories = [ "ASTManagement", ... + "CCodeGeneration", ... + "ErrorMessages", ... + "findDeps", ... + "FunctionAnnotation", ... + "FunctionList", ... + "GeneralFunctions", ... + "SymbolTable", ... + "ToolInitialization"... + "Hardware/AVR"... + "Scilab-Arduino" ]; + + +current_path_buildmacros = get_absolute_file_path("buildmacros.sce"); + +for K=1:size(Directories,"*") + myfile = current_path_buildmacros + filesep() + Directories(K) + filesep() + "buildmacros.sce"; + if isfile(myfile) then + exec(myfile); + end +end + +clear current_path_buildmacros; + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; 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 Binary files differnew file mode 100644 index 00000000..18879110 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/lib diff --git a/2.3-1/macros/Scilab-Arduino/names b/2.3-1/macros/Scilab-Arduino/names new file mode 100644 index 00000000..8b8d7c48 --- /dev/null +++ b/2.3-1/macros/Scilab-Arduino/names @@ -0,0 +1,11 @@ +GenerateSetupFunction +GetArduinoFunctions +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_AnalyzeScope.sci b/2.3-1/macros/SymbolTable/ST_AnalyzeScope.sci new file mode 100644 index 00000000..6ce94820 --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_AnalyzeScope.sci @@ -0,0 +1,125 @@ +function OutArg = ST_AnalyzeScope(OldOutArg,NOutArg,FileInfo,SharedInfo);
+// function OutArg = ST_AnalyzeScope(OldOutArg,NOutArg,FileInfo,SharedInfo);
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),4,4);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+// #RNU_RES_B
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Getting output arguments info from the symbol table***',ReportFileName,'file','y');
+// #RNU_RES_E
+
+OutArg = OldOutArg;
+GlobalVarsFileName = FileInfo.GlobalVarFileName;
+LocalVarsFileName = FileInfo.Funct(nxtscifunnumber).LocalVarFileName;
+TempVarsFileName = FileInfo.Funct(nxtscifunnumber).TempVarFileName;
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// #RNU_RES_B
+// ------------------------------------------------------------------
+// --- Check if the out variables already exist in symbol tables. ---
+// ------------------------------------------------------------------
+// #RNU_RES_E
+for cntout = 1:NOutArg
+
+ // #RNU_RES_B
+ PrintStringInfo(' Symbol ""'+OutArg(cntout).Name+'""',ReportFileName,'file','y');
+ // #RNU_RES_E
+ TBName = OutArg(cntout).Name;
+
+ // #RNU_RES_B
+ // --- Check in temporary symbol table. ---
+ // #RNU_RES_E
+ SymbolTableFileName = TempVarsFileName;
+ [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(TBName,SymbolTableFileName);
+ if (TBFlagfound == 0)
+ // #RNU_RES_B
+ PrintStringInfo(' ...not found in: '+SymbolTableFileName+'.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ else
+ error(9999, 'Found a temp symbol in '+SymbolTableFileName+...
+ ' with the same name of the equal output argument ""'+TBName+'"".');
+ end
+
+ // #RNU_RES_B
+ // --- Check in local symbol table. ---
+ // #RNU_RES_E
+ SymbolTableFileName = LocalVarsFileName;
+ [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(TBName,SymbolTableFileName);
+ if (TBFlagfound == 0)
+ // #RNU_RES_B
+ PrintStringInfo(' ...not found in: '+SymbolTableFileName+'.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ else
+ // #RNU_RES_B
+ PrintStringInfo(' ...found in: '+SymbolTableFileName+'.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ OutArg(cntout).Scope = 'Local';
+ end
+
+ // #RNU_RES_B
+ // --- Check in global symbol table. ---
+ // #RNU_RES_E
+ if (TBFlagfound == 0)
+ // Local wins over global.
+ SymbolTableFileName = GlobalVarsFileName;
+ [TBFlagfound2,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(TBName,SymbolTableFileName);
+ if (TBFlagfound2 == 0)
+ // #RNU_RES_B
+ PrintStringInfo(' ...not found in: '+SymbolTableFileName+'.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ if SCI2Cstrncmps1size(SharedInfo.ASTReader.TempVarsName,OutArg(cntout).Name)
+ OutArg(cntout).Scope = 'Temp';
+ else
+ OutArg(cntout).Scope = 'Local';
+ end
+ else
+ // #RNU_RES_B
+ PrintStringInfo(' ...found in: '+SymbolTableFileName+'.',ReportFileName,'file','y');
+ // #RNU_RES_E
+ OutArg(cntout).Scope = 'Global';
+ end
+ end
+
+ // #RNU_RES_B
+ PrintStringInfo(' Type: '+OutArg(cntout).Type,ReportFileName,'file','y');
+ PrintStringInfo(' Size(1): '+string(OutArg(cntout).Size(1)),ReportFileName,'file','y');
+ PrintStringInfo(' Size(2): '+string(OutArg(cntout).Size(2)),ReportFileName,'file','y');
+ PrintStringInfo(' Value: '+string(OutArg(cntout).Value),ReportFileName,'file','y');
+ PrintStringInfo(' FindLike: '+string(OutArg(cntout).FindLike),ReportFileName,'file','y');
+ PrintStringInfo(' Dimension: '+string(OutArg(cntout).Dimension),ReportFileName,'file','y');
+ PrintStringInfo(' Scope: '+string(OutArg(cntout).Scope),ReportFileName,'file','y');
+ PrintStringInfo(' ',ReportFileName,'file','y');
+ // #RNU_RES_E
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_Del.sci b/2.3-1/macros/SymbolTable/ST_Del.sci new file mode 100644 index 00000000..7eda874d --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_Del.sci @@ -0,0 +1,41 @@ +function ST_Del(TBName,SymbolTableFileName)
+// function ST_Del(TBName,SymbolTableFileName)
+// -----------------------------------------------------------------
+// Delete function for the symbol table.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// --- Load symbol table. ---
+SCI2CSymbolTable = ST_Load(SymbolTableFileName);
+
+// --- Find symbol position. ---
+[TBFlagfound,TBPosition] = ST_FindPos(TBName,SymbolTableFileName);
+
+if (TBFlagfound == 0)
+ error(9999, 'Missing symbol: trying to del a non existing symbol ""'+TBName+'"".');
+elseif (TBFlagfound == 1)
+ // --- Update symbol table. ---
+ SCI2CSymbolTable(TBPosition) = [];
+
+ // --- Save symbol table. ---
+ ST_Save(SymbolTableFileName,SCI2CSymbolTable);
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_FindPos.sci b/2.3-1/macros/SymbolTable/ST_FindPos.sci new file mode 100644 index 00000000..737b7de4 --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_FindPos.sci @@ -0,0 +1,46 @@ +function [TBFlagfound,TBPosition] = ST_FindPos(TBName,SymbolTableFileName)
+// function [TBFlagfound,TBPosition] = ST_FindPos(TBName,SymbolTableFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Finds position of symbol TBName in the symbol table.
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// #RNU_RES_E
+// 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
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// --- Load symbol table. ---
+SCI2CSymbolTable = ST_Load(SymbolTableFileName);
+
+// --- Find position of the line to be removed. ---
+TBFlagfound = 0;
+TBPosition = 0;
+NEntries = max(size(SCI2CSymbolTable));
+for countertable = 1:NEntries
+ if (mtlb_strcmp(TBName,SCI2CSymbolTable(countertable).Name))
+ TBFlagfound = TBFlagfound + 1;
+ TBPosition = countertable;
+ end
+end
+
+if (TBFlagfound > 1)
+ error(9999, 'Symbol table conflict: found two symbols with the same name ""'+TBName+'"".');
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_Get.sci b/2.3-1/macros/SymbolTable/ST_Get.sci new file mode 100644 index 00000000..636a873a --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_Get.sci @@ -0,0 +1,64 @@ +function [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(Field_Name,SymbolTableFileName)
+// function [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+// ST_Get(Field_Name,SymbolTableFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Get function for the symbol table.
+//
+// #RNU_RES_E
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// --------------------------
+// --- Load Symbol Table. ---
+// --------------------------
+[tmpnams,tmptyps,tmpdims,tmpvols]=listvarinfile(SymbolTableFileName);
+if (max(size(tmpnams)) > 1)
+ error(9999, 'More than one variable found in ""'+SymbolTableFileName+'"".');
+end
+load(SymbolTableFileName,tmpnams);
+SCI2CSymbolTable = eval(tmpnams);
+// ------------------------------
+// --- End Load Symbol Table. ---
+// ------------------------------
+
+TBFlagfound = 0;
+TBType = '';
+TBSize(1) = '';
+TBSize(2) = '';
+TBValue = %nan;
+TBFindLike = %nan;
+TBDimension = %nan;
+NEntries = max(size(SCI2CSymbolTable));
+for countertable = 1:NEntries
+ if (mtlb_strcmp(Field_Name,SCI2CSymbolTable(countertable).Name))
+ TBFlagfound = TBFlagfound + 1;
+ TBType = SCI2CSymbolTable(countertable).Type; // String
+ TBSize = SCI2CSymbolTable(countertable).Size; // String
+ TBValue = SCI2CSymbolTable(countertable).Value;
+ TBFindLike = SCI2CSymbolTable(countertable).FindLike; // Number: 0 or 1.
+ TBDimension = SCI2CSymbolTable(countertable).Dimension; // Number: 0 or 1 or 2.
+ end
+end
+
+if (TBFlagfound > 1)
+ error(9999, 'Symbol table conflict: found two symbols with the same name ""'+TBName+'"".');
+end
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci new file mode 100644 index 00000000..4c85408c --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci @@ -0,0 +1,220 @@ +function [UpdatedInArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,ASTFunName)
+// function UpdatedInArg = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Generate all the info concerning the input arguments.
+//
+// Input data:
+// InArg: InArg structure containing only the names of the input
+// arguments.
+// //NUT: add description here
+//
+// Output data:
+// UpdatedInArg: InArg structure with all the info on the input
+// arguments.
+// FileInfoDatFile: name of the .dat file containing the FileInfo
+// structure.
+// #RNU_RES_E
+//
+// Status:
+// 26-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),5,5);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+// #RNU_RES_B
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Analyzing Input Arguments***',ReportFileName,'file','y');
+// #RNU_RES_E
+
+UpdatedInArg = InArg;
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+for cntinarg = 1:NInArg
+ tmpname = InArg(cntinarg).Name;
+ tmpscope = InArg(cntinarg).Scope;
+ lengthNumber = length('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
+ elseif (UpdatedInArg(cntinarg).Type == 'X')
+ if (SharedInfo.DefaultPrecision == 's')
+ UpdatedInArg(cntinarg).Type = 'c'; // It is the default.
+ elseif (SharedInfo.DefaultPrecision == 'd')
+ UpdatedInArg(cntinarg).Type = 'z'; // It is the default.
+ else
+ error(9999, 'Unexpected value for SharedInfo.DefaultPrecision: ""'+SharedInfo.DefaultPrecision+'""');
+ end
+ end
+ if (tmpname == '%pi')
+ UpdatedInArg(cntinarg).Name = 'SCI2C_PI';
+ numvalue = %pi;
+ elseif (tmpname == '%e')
+ UpdatedInArg(cntinarg).Name = 'SCI2C_E';
+ numvalue = %e;
+ elseif (tmpname == '%T' | tmpname == '%t')
+ UpdatedInArg(cntinarg).Name = 'SCI2C_T';
+ numvalue = 1;
+ elseif (tmpname == '%F' | tmpname == '%f')
+ UpdatedInArg(cntinarg).Name = 'SCI2C_F';
+ numvalue = 0;
+ elseif (tmpname == '%nan')
+ UpdatedInArg(cntinarg).Name = 'SCI2C_NAN';
+ numvalue = %nan;
+ elseif (tmpname == '%inf')
+ UpdatedInArg(cntinarg).Name = 'SCI2C_INF';
+ numvalue = %nan; // Otherwise it will put in the C code Inf value.
+ elseif (tmpname == '%i')
+ // #RNU_RES_B
+ //NUT: Other complex numbers are always
+ //NUT: stored in variables, and don't appear as immediate numbers.
+ // #RNU_RES_E
+ UpdatedInArg(cntinarg).Name = 'SCI2C_IMG_'+convstr(UpdatedInArg(cntinarg).Type,'u');
+ numvalue = %i;
+ else
+ numvalue = eval(tmpname);
+ //UpdatedInArg(cntinarg).Type = 'd'; // it is the default.
+ end
+
+ UpdatedInArg(cntinarg).Size(1) = '1';
+ UpdatedInArg(cntinarg).Size(2) = '1';
+ UpdatedInArg(cntinarg).Value = numvalue;
+ 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
+ PrintStringInfo('Input Argument '+string(cntinarg)+' is a string: '+tmpname+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ SharedInfo.ASTReader.UsedTempVars = SharedInfo.ASTReader.UsedTempVars + 1;
+ TmpOutArgName = strcat([SharedInfo.ASTReader.TempVarsName,string(SharedInfo.ASTReader.UsedTempVars)]);
+
+ UpdatedInArg(cntinarg).Name = TmpOutArgName; // Change the name.
+ UpdatedInArg(cntinarg).Type = 'g'; // it is the default.
+ UpdatedInArg(cntinarg).Size(1) = '1';
+ UpdatedInArg(cntinarg).Size(2) = string(length(tmpname)+1); //+1 = (\0)
+ UpdatedInArg(cntinarg).Value = '""'+tmpname+'""';
+ UpdatedInArg(cntinarg).FindLike = 0;
+ UpdatedInArg(cntinarg).Dimension = 2; //Keep it zero to avoid extra argument 'funcnameSize'.
+ UpdatedInArg(cntinarg).Scope = 'Temp';
+
+ // #RNU_RES_B
+ // Add the new symbol in the symbol table.
+ // #RNU_RES_E
+ ST_InsOutArg(UpdatedInArg(cntinarg),1,FileInfo,SharedInfo,'all');
+
+ elseif (tmpscope == 'Variable' | tmpscope == 'Global' | tmpscope == 'Local' | tmpscope == 'Temp')
+ // #RNU_RES_B
+ //NUT: nelle future versioni qui si puo' fare una utile differenziazione per rendere piu' intelligente il tutto.
+ PrintStringInfo('Input Argument '+string(cntinarg)+' is a symbol: '+tmpname+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension,TBScope] = ST_GetSymbolInfo(tmpname,FileInfo,SharedInfo);
+
+ if (TBFlagfound == 0)
+ if(ASTFunName == 'ode')
+ if((NInArg == 4 & cntinarg == 4) | (NInArg == 6 & cntinarg == 6))
+ //incase of 4 arguments, fourth argument is function name
+ UpdatedInArg(cntinarg).Name = tmpname; // Change the name.
+ UpdatedInArg(cntinarg).Type = 'fn'; //it is a function name
+ UpdatedInArg(cntinarg).Size(1) = '1';
+ UpdatedInArg(cntinarg).Size(2) = '1'; //+1 = (\0)
+ UpdatedInArg(cntinarg).Value = '&'+tmpname;
+ UpdatedInArg(cntinarg).FindLike = 0;
+ UpdatedInArg(cntinarg).Dimension = 0; //NUT: in future releases you can set this field to 1.
+ UpdatedInArg(cntinarg).Scope = 'Temp';
+ ST_InsOutArg(UpdatedInArg(cntinarg),1,FileInfo,SharedInfo,'all');
+ elseif (NInArg == 5 & cntinarg == 5) then
+ //incase of 5 arguments, fifth argument is function name
+ UpdatedInArg(cntinarg).Name = tmpname; // Change the name.
+ UpdatedInArg(cntinarg).Type = 'fn'; //it is a function name
+ UpdatedInArg(cntinarg).Size(1) = '1';
+ UpdatedInArg(cntinarg).Size(2) = '1'; //+1 = (\0)
+ UpdatedInArg(cntinarg).Value = '&'+tmpname;
+ UpdatedInArg(cntinarg).FindLike = 0;
+ UpdatedInArg(cntinarg).Dimension = 0; //NUT: in future releases you can set this field to 1.
+ UpdatedInArg(cntinarg).Scope = 'Temp';
+ ST_InsOutArg(UpdatedInArg(cntinarg),1,FileInfo,SharedInfo,'all');
+ end
+ elseif (ASTFunName == 'RPI_ThreadCreate')
+ UpdatedInArg(cntinarg).Name = tmpname; // Change the name.
+ UpdatedInArg(cntinarg).Type = 'fn'; //it is a function name
+ UpdatedInArg(cntinarg).Size(1) = '1';
+ UpdatedInArg(cntinarg).Size(2) = '1'; //+1 = (\0)
+ UpdatedInArg(cntinarg).Value = '&'+tmpname;
+ UpdatedInArg(cntinarg).FindLike = 0;
+ UpdatedInArg(cntinarg).Dimension = 0; //NUT: in future releases you can set this field to 1.
+ UpdatedInArg(cntinarg).Scope = 'Temp';
+ ST_InsOutArg(UpdatedInArg(cntinarg),1,FileInfo,SharedInfo,'all');
+ elseif (ASTFunName == 'RPI_PinISR')
+ UpdatedInArg(cntinarg).Name = tmpname; // Change the name.
+ UpdatedInArg(cntinarg).Type = 'fn'; //it is a function name
+ UpdatedInArg(cntinarg).Size(1) = '1';
+ UpdatedInArg(cntinarg).Size(2) = '1'; //+1 = (\0)
+ UpdatedInArg(cntinarg).Value = '&'+tmpname;
+ UpdatedInArg(cntinarg).FindLike = 0;
+ UpdatedInArg(cntinarg).Dimension = 0; //NUT: in future releases you can set this field to 1.
+ UpdatedInArg(cntinarg).Scope = 'Temp';
+ ST_InsOutArg(UpdatedInArg(cntinarg),1,FileInfo,SharedInfo,'all');
+ else
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Unknown symbol ""'+tmpname+'"".',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Be sure to initialize every symbol you are using.',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: Before running the SCI2C translator, remember to run the code you are trying',ReportFileName,'both','y');
+ PrintStringInfo('SCI2CERROR: to translate in order to check syntax errors.',ReportFileName,'both','y');
+ PrintStringInfo(' ',ReportFileName,'both','y');
+ error(9999, 'SCI2CERROR: Unknown symbol ""'+tmpname+'"".');
+ end
+ else
+ UpdatedInArg(cntinarg).Type = TBType;
+ UpdatedInArg(cntinarg).Size = TBSize;
+ UpdatedInArg(cntinarg).Value = TBValue;
+ UpdatedInArg(cntinarg).FindLike = TBFindLike;
+ UpdatedInArg(cntinarg).Dimension = TBDimension;
+ UpdatedInArg(cntinarg).Scope = TBScope;
+ end
+ else
+ error(9999, 'Unknown scope identifier ""'+tmpscope+'"" for variable ""'+tmpname+'"".');
+ end
+ // #RNU_RES_B
+ PrintStringInfo(' Type: '+UpdatedInArg(cntinarg).Type,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ PrintStringInfo(' Size(1): '+string(UpdatedInArg(cntinarg).Size(1)),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ PrintStringInfo(' Size(2): '+string(UpdatedInArg(cntinarg).Size(2)),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ PrintStringInfo(' Value: '+string(UpdatedInArg(cntinarg).Value),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ PrintStringInfo(' FindLike: '+string(UpdatedInArg(cntinarg).FindLike),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ PrintStringInfo(' Dimension: '+string(UpdatedInArg(cntinarg).Dimension),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ PrintStringInfo(' Scope: '+UpdatedInArg(cntinarg).Scope,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_GetSymbolInfo.sci b/2.3-1/macros/SymbolTable/ST_GetSymbolInfo.sci new file mode 100644 index 00000000..1fb2f3de --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_GetSymbolInfo.sci @@ -0,0 +1,99 @@ +function [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension,TBScope] = ST_GetSymbolInfo(TBName,FileInfo,SharedInfo)
+// function [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension,TBScope] = ST_GetSymbolInfo(TBName,FileInfo,SharedInfo)
+// -----------------------------------------------------------------
+// //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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+// --- Extraction of the function name and number. ---
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+
+GlobalVarsFileName = FileInfo.GlobalVarFileName;
+LocalVarsFileName = FileInfo.Funct(nxtscifunnumber).LocalVarFileName;
+TempVarsFileName = FileInfo.Funct(nxtscifunnumber).TempVarFileName;
+
+TBFlagfound = 0;
+TBType = '';
+TBSize(1) = '';
+TBSize(2) = '';
+TBValue = %nan
+TBFindLike = %nan
+TBDimension = %nan;
+TBScope = '';
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// #RNU_RES_B
+// ------------------------------------------------
+// --- Search in the temporary variables table. ---
+// ------------------------------------------------
+PrintStringInfo('Searching ""'+TBName+'"" in '+FileInfo.Funct(nxtscifunnumber).TempVarFileName+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+// #RNU_RES_E
+[TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(TBName,TempVarsFileName);
+if (TBFlagfound == 1);
+ // #RNU_RES_B
+ PrintStringInfo('...Found in: ""'+FileInfo.Funct(nxtscifunnumber).TempVarFileName+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ TBScope = 'Temp';
+end
+
+// --------------------------------------------
+// --- Search in the local variables table. ---
+// --------------------------------------------
+if (TBFlagfound == 0);
+ // #RNU_RES_B
+ PrintStringInfo('Searching ""'+TBName+'"" in '+FileInfo.Funct(nxtscifunnumber).LocalVarFileName+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(TBName,LocalVarsFileName);
+ if (TBFlagfound == 1);
+ // #RNU_RES_B
+ PrintStringInfo('...Found in: ""'+FileInfo.Funct(nxtscifunnumber).LocalVarFileName+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ TBScope = 'Local';
+ end
+end
+
+// #RNU_RES_B
+// ---------------------------------------------
+// --- Search in the global variables table. ---
+// ---------------------------------------------
+// #RNU_RES_E
+if (TBFlagfound == 0);
+ // #RNU_RES_B
+ PrintStringInfo('Searching ""'+TBName+'"" in '+FileInfo.GlobalVarFileName+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ [TBFlagfound,TBType,TBSize,TBValue,TBFindLike,TBDimension] = ...
+ ST_Get(TBName,GlobalVarsFileName);
+ if (TBFlagfound == 1);
+ // #RNU_RES_B
+ PrintStringInfo('...Found in: ""'+FileInfo.GlobalVarFileName+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ // #RNU_RES_E
+ TBScope = 'Global';
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_InsForCntVars.sci b/2.3-1/macros/SymbolTable/ST_InsForCntVars.sci new file mode 100644 index 00000000..b0e6f356 --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_InsForCntVars.sci @@ -0,0 +1,191 @@ +function [OutArg,SharedInfo] = ST_InsForCntVars(InArg,NInArg,OutArg,NOutArg,FunctionName,FileInfo,SharedInfo)
+// function [OutArg,SharedInfo] = ST_InsForCntVars(InArg,NInArg,OutArg,NOutArg,FunctionName,FileInfo,SharedInfo)
+// -----------------------------------------------------------------
+// //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
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),7,7);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+nxtscifunname = SharedInfo.NextSCIFunName;
+nxtscifunnumber = SharedInfo.NextSCIFunNumber;
+ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
+
+// #RNU_RES_B
+PrintStringInfo(' ',ReportFileName,'file','y');
+PrintStringInfo('***Checking if the current function is handling for counter variables.***',ReportFileName,'file','y');
+// #RNU_RES_E
+
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// -----------------------------------------------
+// --- Initial Check on For counter variables. ---
+// -----------------------------------------------
+if ((SharedInfo.ForExpr.OnExec > 0) & (NOutArg==1) & (OutArg.Scope~='Temp'))
+ // #RNU_RES_B
+ // If we are here, for sure we are in the last assignment of a for loop expression.
+ //
+ // All the following cases must be handled:
+ // OpColon (1,10,cnt) or Opcolon (1,1,10,cnt) --> cnt must be redefined to dim=0
+ // cnt = a; where a is scalar
+ // OpEqual(TMP,cnt); where TMP is matrix --> cnt must be redefined to dim=0, a SCI2Cint counter must be generated
+ // Fun(TMP,cnt); where TMP is matrix.--> cnt must be redefined to dim=0, a SCI2Cint counter must be generated, CNT must be generated where CNT is a Matrix
+ // #RNU_RES_E
+ if (FunctionName == 'OpColon')
+ // #RNU_RES_B
+ PrintStringInfo(' The for expression is using an OpColon-based assignment',ReportFileName,'file','y');
+ // #RNU_RES_E
+ SharedInfo.SkipNextFun = 1;
+
+ OutArg.Size(1) = '1';
+ OutArg.Size(2) = '1';
+ OutArg.Value = %nan;
+ OutArg.FindLike = 0;
+ OutArg.Dimension = 0;
+ SharedInfo.ForExpr.OpColonInfoIn1 = InArg(1).Name;
+
+ if (NInArg == 2)
+ SharedInfo.ForExpr.OpColonInfoIn2 = '1';
+ SharedInfo.ForExpr.OpColonInfoIn3 = InArg(2).Name;
+ else
+ SharedInfo.ForExpr.OpColonInfoIn2 = InArg(2).Name;
+ if isnan(InArg(2).Value)
+ EM_UnknownStep(ReportFileName);
+ end
+
+ SharedInfo.ForExpr.OpColonInfoIn3 = InArg(3).Name;
+ end
+
+ // #RNU_RES_B
+ // Generate all info to generate the C for expression
+ // #RNU_RES_E
+ SharedInfo.ForExpr.AssignmentFun = SharedInfo.CFunId.OpColon;
+ SharedInfo.ForExpr.IntCntArg = [];
+ SharedInfo.ForExpr.MtxValCntArg = [];
+ SharedInfo.ForExpr.SclValCntArg = OutArg;
+
+ elseif ((FunctionName == 'OpEqual') & (SharedInfo.ForExpr.AssignmentFun == 0))
+ // #RNU_RES_B
+ //NUT: Test also that SharedInfo.ForExpr.AssignmentFun because sometimes Equal are dummy!
+ //NUT: verifica se e' giusta questa mia affermazione.
+ // #RNU_RES_E
+ if (OutArg.Dimension > 0)
+ // #RNU_RES_B
+ PrintStringInfo(' The for expression is using a Matrix-Equal-based assignment',ReportFileName,'file','y');
+ // #RNU_RES_E
+ SharedInfo.SkipNextFun = 1; //NUT: forse qui sarebbe meglio mettere uno skipnextequal per precisione.
+ // #RNU_RES_B
+ //NUT: a dire il vero occorre capire se c'e' differenza tra i vari skip.
+ // #RNU_RES_E
+ OutArg.Size(1) = '1';
+ OutArg.Size(2) = '1';
+ OutArg.Value = %nan;
+ OutArg.FindLike = 0;
+ OutArg.Dimension = 0;
+
+ // #RNU_RES_B
+ // Introduce the int counter variable.
+ // #RNU_RES_E
+ NNewArg = 1;
+ NewArg(NNewArg).Name = SharedInfo.ASTReader.TempForCntVarsName+string(SharedInfo.CountForTempVars);
+ SharedInfo.CountForTempVars = SharedInfo.CountForTempVars + 1;
+ NewArg(NNewArg).Size(1) = '1';
+ NewArg(NNewArg).Size(2) = '1';
+ NewArg(NNewArg).Type = 'i';
+ NewArg(NNewArg).Value = 0;
+ NewArg(NNewArg).FindLike = 0;
+ NewArg(NNewArg).Dimension = 0;
+ NewArg(NNewArg).Scope = 'Temp';
+
+ // #RNU_RES_B
+ // Insert New Arguments in the symbol table.
+ // #RNU_RES_E
+ NNewArg = 1;
+ ST_InsOutArg(NewArg,NNewArg,FileInfo,SharedInfo,'all');
+
+ // #RNU_RES_B
+ // Generate all info to generate the C for expression
+ // #RNU_RES_E
+ SharedInfo.ForExpr.AssignmentFun = SharedInfo.CFunId.EqMatrix;
+ SharedInfo.ForExpr.IntCntArg = NewArg(1);
+ SharedInfo.ForExpr.MtxValCntArg = InArg(1);
+ SharedInfo.ForExpr.SclValCntArg = OutArg;
+ else
+ // #RNU_RES_B
+ PrintStringInfo(' The for expression is using a Scalar-Equal-based assignment',ReportFileName,'file','y');
+ // #RNU_RES_E
+ SharedInfo.ForExpr.AssignmentFun = SharedInfo.CFunId.EqScalar;
+ end
+ else
+ if (OutArg.Dimension > 0)
+ // #RNU_RES_B
+ PrintStringInfo(' The for expression is using a Matrix-Function-based assignment',ReportFileName,'file','y');
+
+ // Introduce the val counter variable.
+ // #RNU_RES_E
+ NewArg = OutArg;
+ OutArg.Name = SharedInfo.ASTReader.TempForValVarsName+OutArg.Name;
+
+ // #RNU_RES_B
+ // Set the counter variable to scalar.
+ // #RNU_RES_E
+ NNewArg = 1;
+ NewArg(NNewArg).Size(1) = '1';
+ NewArg(NNewArg).Size(2) = '1';
+ NewArg(NNewArg).Value = %nan;
+ NewArg(NNewArg).FindLike = 0;
+ NewArg(NNewArg).Dimension = 0;
+
+ // #RNU_RES_B
+ // Introduce the int counter variable.
+ // #RNU_RES_E
+ NNewArg = 2;
+ NewArg(NNewArg).Name = SharedInfo.ASTReader.TempForCntVarsName+string(SharedInfo.CountForTempVars);
+ SharedInfo.CountForTempVars = SharedInfo.CountForTempVars + 1;
+ NewArg(NNewArg).Size(1) = '1';
+ NewArg(NNewArg).Size(2) = '1';
+ NewArg(NNewArg).Type = 'i';
+ NewArg(NNewArg).Value = 0;
+ NewArg(NNewArg).FindLike = 0;
+ NewArg(NNewArg).Dimension = 0;
+ NewArg(NNewArg).Scope = 'Temp';
+
+ // #RNU_RES_B
+ // Insert New Arguments in the symbol table.
+ // #RNU_RES_E
+ NNewArg = 2;
+ ST_InsOutArg(NewArg,NNewArg,FileInfo,SharedInfo,'all');
+
+ // #RNU_RES_B
+ // Generate all info to generate the C for expression
+ // #RNU_RES_E
+ SharedInfo.ForExpr.AssignmentFun = SharedInfo.CFunId.GenFunMtx;
+ SharedInfo.ForExpr.IntCntArg = NewArg(2);
+ SharedInfo.ForExpr.MtxValCntArg = OutArg(1);
+ SharedInfo.ForExpr.SclValCntArg = NewArg(1);
+ end
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_InsOutArg.sci b/2.3-1/macros/SymbolTable/ST_InsOutArg.sci new file mode 100644 index 00000000..fd6b426c --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_InsOutArg.sci @@ -0,0 +1,192 @@ +function ST_InsOutArg(OutArg,NOutArg,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
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- 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(OutArg(counteroutput),CDeclarationFileName,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/ST_Load.sci b/2.3-1/macros/SymbolTable/ST_Load.sci new file mode 100644 index 00000000..dbe53456 --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_Load.sci @@ -0,0 +1,36 @@ +function SCI2CSymbolTable = ST_Load(SymbolTableFileName)
+// function SCI2CSymbolTable = ST_Load(SymbolTableFileName)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Load a symbol table stored into a .dat file.
+// #RNU_RES_E
+//
+// 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
+// -----------------------------------------------------------------
+
+// --------------------------
+// --- Load Symbol Table. ---
+// --------------------------
+[tmpnams,tmptyps,tmpdims,tmpvols]=listvarinfile(SymbolTableFileName);
+if (max(size(tmpnams)) > 1)
+ error(9999, 'More than one variable found in ""'+SymbolTableFileName+'"".');
+end
+load(SymbolTableFileName,tmpnams);
+SCI2CSymbolTable = eval(tmpnams);
+// ------------------------------
+// --- End Load Symbol Table. ---
+// ------------------------------
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_MatchSymbol.sci b/2.3-1/macros/SymbolTable/ST_MatchSymbol.sci new file mode 100644 index 00000000..504379c2 --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_MatchSymbol.sci @@ -0,0 +1,69 @@ +function [TBFlagfound,TBFlagEqualSymbols] = ST_MatchSymbol(TBName,TBType,TBSize,TBValue,TBFindLike,TBDimension,SymbolTableFileName,MatchRule)
+// function [TBFlagfound,TBFlagEqualSymbols] = ST_MatchSymbol(TBName,TBType,TBSize,TBValue,TBFindLike,TBDimension,SymbolTableFileName,MatchRule)
+// -----------------------------------------------------------------
+// Match function for the symbol table.
+//
+// Input data:
+// MatchRule: can be 'all','type','size','none'
+// //NUT: add description here
+//
+// Output data:
+// TBFlagfound: 0 = if the symbol doesn't exits.
+// 1 = the symbol exits.
+// 2 = the symbol exists but it is a non-initialized global variable.
+// TBFlagEqualSymbols: 0 if the two symbols don't have the same settings,
+// 1 if the two symbols have the same settings.
+//
+// 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
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),8,8);
+
+TBFlagfound = 0;
+TBFlagEqualSymbols = 0;
+
+// --- Find symbol (If exists). ---
+[TBFlagfound,tmpType,tmpSize,tmpValue,tmpFindLike,tmpDimension] = ...
+ ST_Get(TBName,SymbolTableFileName);
+if (TBFlagfound == 1)
+ if (tmpType == 'GBLToBeDefined')
+ TBFlagfound = 2;
+ TBFlagEqualSymbols = 0; // I don't want to force the error issue in ST_InsOutArg.sci
+ else
+ // Symbol already exists. Check that it has the same settings of the current output argument.
+ TBFlagEqualSymbols = 1;
+ if (MatchRule == 'type' | MatchRule == 'all')
+ if (mtlb_strcmp(tmpType,TBType) == %F)
+ TBFlagEqualSymbols = 0;
+ end
+ end
+ if (MatchRule == 'size' | MatchRule == 'all')
+ // First check the dimension.
+ if (tmpDimension ~= TBDimension)
+ TBFlagEqualSymbols = 0;
+ end
+ // Then if the size is a number also its value is compared.
+ if (isnum(tmpSize(1))) & (isnum(TBSize(1)))
+ if (mtlb_strcmp(tmpSize(1),TBSize(1)) == %F)
+ TBFlagEqualSymbols = 0;
+ end
+ end
+ if (isnum(tmpSize(2))) & (isnum(TBSize(2)))
+ if (mtlb_strcmp(tmpSize(2),TBSize(2)) == %F)
+ TBFlagEqualSymbols = 0;
+ end
+ end
+ end
+ end
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_Save.sci b/2.3-1/macros/SymbolTable/ST_Save.sci new file mode 100644 index 00000000..44e6e868 --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_Save.sci @@ -0,0 +1,44 @@ +function ST_Save(SymbolTableFileName,SCI2CSymbolTable)
+// function ST_Save(SymbolTableFileName,SCI2CSymbolTable)
+// -----------------------------------------------------------------
+// Save into a .dat file a symbol table.
+//
+// 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
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+[tmpnams,tmptyps,tmpdims,tmpvols]=listvarinfile(SymbolTableFileName);
+if (max(size(tmpnams)) > 1)
+ SCI2Cerror('More than one variable found in ""'+SymbolTableFileName+'"".');
+end
+
+// Identifies the Table name and save it into the .dat file.
+if (mtlb_strcmp(tmpnams,'GlobalVars'))
+ GlobalVars = SCI2CSymbolTable;
+ save(SymbolTableFileName, "GlobalVars");
+elseif (mtlb_strcmp(tmpnams,'LocalVars'))
+ LocalVars = SCI2CSymbolTable;
+ save(SymbolTableFileName, "LocalVars");
+elseif (mtlb_strcmp(tmpnams,'TempVars'))
+ TempVars = SCI2CSymbolTable;
+ save(SymbolTableFileName, "TempVars");
+else
+ SCI2Cerror('Unknow table: ""'+tmpnams+'"".');
+end
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/ST_Set.sci b/2.3-1/macros/SymbolTable/ST_Set.sci new file mode 100644 index 00000000..778f91aa --- /dev/null +++ b/2.3-1/macros/SymbolTable/ST_Set.sci @@ -0,0 +1,49 @@ +function ST_Set(TBName,TBType,TBSize,TBValue,TBFindLike,TBDimension,SymbolTableFileName)
+// function ST_Set(TBName,TBType,TBSize,TBValue,TBFindLike,TBDimension,SymbolTableFileName)
+// -----------------------------------------------------------------
+// Set function for the symbol table.
+//
+// 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
+// -----------------------------------------------------------------
+
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),7,7);
+
+// --- Load symbol table. ---
+SCI2CSymbolTable = ST_Load(SymbolTableFileName);
+
+// --- Find symbol position (If exists). ---
+[TBFlagfound,TBPosition] = ST_FindPos(TBName,SymbolTableFileName);
+
+if (TBFlagfound == 0)
+ TBPosition = max(size(SCI2CSymbolTable))+1;
+end
+
+// --- Update symbol table. ---
+SCI2CSymbolTable(TBPosition).Name = TBName; // string.
+SCI2CSymbolTable(TBPosition).Type = TBType; // char.
+SCI2CSymbolTable(TBPosition).Size = TBSize; // structure of two strings (Size(1) and Size(2)).
+SCI2CSymbolTable(TBPosition).Value = TBValue; // int/real/complex number. %nan when the value is not available or isn't a scalar.
+SCI2CSymbolTable(TBPosition).FindLike = TBFindLike; // int number. FindLike = 1, when the symbol comes from a find-like function.
+ // FindLike = -1 when the function is not find-like but it is making use of input arguments that are find-like.
+ // FindLike = 0 in all other cases.
+SCI2CSymbolTable(TBPosition).Dimension = TBDimension; // int number.
+
+// --- Save symbol table. ---
+ST_Save(SymbolTableFileName,SCI2CSymbolTable);
+
+endfunction
diff --git a/2.3-1/macros/SymbolTable/buildmacros.sce b/2.3-1/macros/SymbolTable/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/SymbolTable/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/SymbolTable/lib b/2.3-1/macros/SymbolTable/lib Binary files differnew file mode 100644 index 00000000..59ce4653 --- /dev/null +++ b/2.3-1/macros/SymbolTable/lib diff --git a/2.3-1/macros/SymbolTable/names b/2.3-1/macros/SymbolTable/names new file mode 100644 index 00000000..b5a7d65f --- /dev/null +++ b/2.3-1/macros/SymbolTable/names @@ -0,0 +1,12 @@ +ST_AnalyzeScope +ST_Del +ST_FindPos +ST_Get +ST_GetInArgInfo +ST_GetSymbolInfo +ST_InsForCntVars +ST_InsOutArg +ST_Load +ST_MatchSymbol +ST_Save +ST_Set diff --git a/2.3-1/macros/ToolInitialization/INIT_CreateDirs.sci b/2.3-1/macros/ToolInitialization/INIT_CreateDirs.sci new file mode 100644 index 00000000..e6ef184e --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_CreateDirs.sci @@ -0,0 +1,65 @@ +function INIT_CreateDirs(FileInfo)
+// function INIT_CreateDirs(FileInfo)
+// -----------------------------------------------------------------
+// Create directories.
+//
+// Input data:
+// FileInfo: structure containing all info about SCI2C files.
+//
+// Output data:
+// ---
+//
+// Status:
+// 03-Jan-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// ---------------------------
+// --- Create Directories. ---
+// ---------------------------
+// --- Main directories. ---
+SCI2CCreateDir(FileInfo.WorkingDir);
+SCI2CCreateDir(FileInfo.OutCCCodeDir);
+
+// --- SCI2C Library. ---
+SCI2CCreateDir(FileInfo.SCI2CLibDir);
+SCI2CCreateDir(FileInfo.SCI2CLibSCIAnnDir);
+SCI2CCreateDir(FileInfo.SCI2CLibSCIAnnFun);
+SCI2CCreateDir(FileInfo.SCI2CLibSCIAnnCls);
+SCI2CCreateDir(FileInfo.SCI2CLibSCIFunListDir);
+SCI2CCreateDir(FileInfo.SCI2CLibSCIFLFun);
+SCI2CCreateDir(FileInfo.SCI2CLibSCIFLCls);
+SCI2CCreateDir(FileInfo.SCI2CLibCAnnDir);
+SCI2CCreateDir(FileInfo.SCI2CLibCAnnFun);
+SCI2CCreateDir(FileInfo.SCI2CLibCAnnCls);
+SCI2CCreateDir(FileInfo.SCI2CLibCFunListDir);
+SCI2CCreateDir(FileInfo.SCI2CLibCFLFun);
+SCI2CCreateDir(FileInfo.SCI2CLibCFLCls);
+
+// --- USER2C Library. ---
+SCI2CCreateDir(FileInfo.USER2CLibDir);
+SCI2CCreateDir(FileInfo.USER2CLibSCIAnnDir);
+SCI2CCreateDir(FileInfo.USER2CLibSCIAnnFun);
+SCI2CCreateDir(FileInfo.USER2CLibSCIAnnCls);
+SCI2CCreateDir(FileInfo.USER2CLibSCIFunListDir);
+SCI2CCreateDir(FileInfo.USER2CLibSCIFLFun);
+SCI2CCreateDir(FileInfo.USER2CLibSCIFLCls);
+SCI2CCreateDir(FileInfo.USER2CLibCAnnDir);
+SCI2CCreateDir(FileInfo.USER2CLibCAnnFun);
+SCI2CCreateDir(FileInfo.USER2CLibCAnnCls);
+SCI2CCreateDir(FileInfo.USER2CLibCFunListDir);
+SCI2CCreateDir(FileInfo.USER2CLibCFLFun);
+SCI2CCreateDir(FileInfo.USER2CLibCFLCls);
+
+// --- Function List. ---
+SCI2CCreateDir(FileInfo.FunctionList.MainDir);
+SCI2CCreateDir(FileInfo.FunctionList.FunInfoDatDir);
+
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci new file mode 100644 index 00000000..ba313b03 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -0,0 +1,8290 @@ +function INIT_FillSCI2LibCDirs(FileInfo,SharedInfoExtension)
+// function INIT_FillSCI2LibCDirs(FileInfo,SharedInfoExtension)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Generates files for the SCI2CLib CFunctionList and CAnnotations
+// directories.
+//
+// Input data:
+// FileInfo: structure containing all info about SCI2C files.
+// SharedInfoExtension: structure containing the file extensions.
+//
+// Output data:
+// ---
+//
+// #RNU_RES_E
+// Status:
+// 24-Dec-2007 -- Raffaele Nutricato: Author.
+// 24-Dec-2007 -- Alberto Morea: Test Ok.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+SCI2CLibCAnnClsDir = FileInfo.SCI2CLibCAnnCls;
+ExtensionCAnnCls = SharedInfoExtension.AnnotationClasses;
+
+SCI2CLibCAnnFunDir = FileInfo.SCI2CLibCAnnFun;
+ExtensionCAnnFun = SharedInfoExtension.AnnotationFunctions;
+
+SCI2CLibCFLClsDir = FileInfo.SCI2CLibCFLCls;
+ExtensionCFuncListCls = SharedInfoExtension.FuncListClasses;
+
+SCI2CLibCFLFunDir = FileInfo.SCI2CLibCFLFun;
+ExtensionCFuncListFun = SharedInfoExtension.FuncListFunctions;
+
+GeneralReport = FileInfo.GeneralReport;
+ArgSeparator = ',';
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// --------------------------------------------------------------------------------
+// --- Generate Function List class files for C functions of the SCI2C library. ---
+// --------------------------------------------------------------------------------
+//NUT old call to INIT_GenSCI2CLibCFLCls
+// INIT_GenSCI2CLibCFLCls(SCI2CLibCFLClsDir,ExtensionCFuncListCls,GeneralReport)
+// SCI2CLibCFLClsDir,ExtensionCFLCls,GeneralReport
+
+//NUT verifica le annotazioni di tutte le classi.
+
+// -----------------------------------------------------------------------------------------
+// --- Generate Function List and Annotation files for C functions of the SCI2C library. ---
+// -----------------------------------------------------------------------------------------
+
+
+// ---------------------
+// --- Class Global. ---
+// ---------------------
+ClassName = 'Global';
+// #RNU_RES_B
+//NUT: global function can work with a generic number of input arguments.
+//NUT: we force the global function to work with one input argument only.
+// --- Class Annotation. ---
+// #RNU_RES_E
+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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'global';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Float. ---
+// ---------------------
+ClassName = 'Float';
+
+// --- 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= ''s''',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('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+//PrintStringInfo('c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'s2',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'float';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Double. ---
+// ---------------------
+ClassName = 'Double';
+
+// --- 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('s0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('c0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'double';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ----------------------------
+// --- Class FloatComplex. ---
+// ----------------------------
+//NUT sulla complex c'e' da capire se servono due o un solo argomento.
+//NUT secondo me ne va bene uno perche' serve per fare il casting di una variabile
+//NUT reale in una variabile complessa
+ClassName = 'FloatComplex';
+
+// --- 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= ''c''',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('s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'c0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'floatcomplex';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ----------------------------
+// --- Class DoubleComplex. ---
+// ----------------------------
+//NUT sulla complex c'e' da capire se servono due o un solo argomento.
+//NUT secondo me ne va bene uno perche' serve per fare il casting di una variabile
+//NUT reale in una variabile complessa
+ClassName = 'DoubleComplex';
+
+// --- 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= ''z''',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('s0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'doublecomplex';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Uint8. ---
+// ---------------------
+ClassName = 'Uint8';
+
+// --- 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)= 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+'u80',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('c0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'u82',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'uint8';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ---------------------
+// --- Class Float. ---
+// ---------------------
+ClassName = 'Float';
+
+// --- 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= ''s''',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('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'s2',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'float';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ---------------------
+// --- Class Int8. ---
+// ---------------------
+ClassName = 'Int8';
+
+// --- 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= ''i8''',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('s0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i80',ClassFileName,'file','y');
+//PrintStringInfo('c0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i82',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'int8';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ---------------------
+// --- Class Uint16. ---
+// ---------------------
+ClassName = 'Uint16';
+
+// --- 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= ''u16''',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('s0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'u160',ClassFileName,'file','y');
+//PrintStringInfo('c0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'u162',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'uint16';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ---------------------
+// --- Class Int16. ---
+// ---------------------
+ClassName = 'Int16';
+
+// --- 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= ''i16''',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('s0'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+//PrintStringInfo('c0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+//PrintStringInfo('c2'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'int16';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ------------------
+// --- Class Sin. ---
+// ------------------
+ClassName = 'Sin';
+
+// --- 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= FA_TP_USER',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('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sin'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'sinh'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'asinh'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'cos'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'cosh'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'tan'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'tanh'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'exp'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'conj'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//NUT verifica
+FunctionName = 'inv'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'int'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'SCI2Cresize';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'chol'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ------------------
+// --- Class OpLogNot
+// ------------------
+ClassName = 'OpLogNot';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+FunctionName = 'OpLogNot'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'ceil'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'fix'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'floor'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'round'; //BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+// -------------------
+// --- Class bitand. ---
+// -------------------
+ClassName = 'bitand';
+
+// --- 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= 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bitand';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bitor';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bitxor';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+// -------------------
+// --- Class bitcmp. ---
+// -------------------
+ClassName = 'bitcmp';
+
+// --- 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= 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bitcmp';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class bitset. ---
+// -------------------
+ClassName = 'bitset';
+
+// --- 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= 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+PrintStringInfo('u80d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160d0d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bitset';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// -------------------
+// --- Class bitget. ---
+// -------------------
+ClassName = 'bitget';
+
+// --- 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= 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bitget';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+// ------------------
+// --- Class Sign ---
+// ------------------
+ClassName = 'Sign';
+
+// --- 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= FA_TP_USER',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('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+// -------------------
+// --- Class Atan. ---
+// -------------------
+ClassName = 'Atan';
+
+// --- 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= 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+// PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+// PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+// PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+// PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'atan'; //BJ : atan AS : Float_Done
+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';
+
+// --- 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('s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'c0',ClassFileName,'file','y');
+
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'asin'; //BJ : Works but not able to generate all cases , AS : same for float
+ //--> asin(%pi).
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'acos'; //BJ : Works but not able to generate all cases , AS : same for float
+ //--> acos(%pi)
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'acosd'; //BJ : Works but not able to generate all cases , AS : same for float
+ //--> acosd(%pi)
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'acosh'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'atanh'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+FunctionName = 'acot'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+FunctionName = 'acotd'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+FunctionName = 'acoth'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'acsc'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'asec'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'asech'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'asind'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'atand'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+FunctionName = 'asecd'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'acscd'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'acsch'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+FunctionName = 'sqrt'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'log'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'log10'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'log1p'; // BJ : Ok AS : Float_Done
+ //--> log1p(%i) Not implemented in Scilab.
+ //WARNING z0log1pz0 will never happened.
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --------------------
+// --- Class Zeros. ---
+// --------------------
+ClassName = 'Zeros';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',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');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+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');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(IN(1).SZ)',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');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_FROM_VAL(IN(1).VAL,IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(IN(2).VAL,IN(2).TP)',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');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_FROM_VAL(IN(1).VAL,IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(IN(2).VAL,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(3)= FA_SZ_FROM_VAL(IN(3).VAL,IN(3).TP)',ClassFileName,'file','y');
+
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo(ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo(ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo(ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo(ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo(ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+
+//NUT: no mixed input types are allowed.
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0d0'+ArgSeparator+'d3',ClassFileName,'file','y');
+
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'zeros'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'ones'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'eye'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// --------------------
+// --- Class Diag. ---
+// --------------------
+ClassName = 'diag';
+
+// --- 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)= FA_SZ_ROW_DIAG(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_COLUMN_DIAG(IN(1).SZ)',ClassFileName,'file','y');
+
+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)= FA_SZ_ROW_DIAG_INS_EXT(IN(1).SZ,IN(2).VAL)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_COL_DIAG_IN_EX(IN(1).SZ,IN(2).VAL)',ClassFileName,'file','y');
+
+// ---Function List Class.----
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'diag'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// --------------------
+// --- Class linspace & logspace ---
+// --------------------
+ClassName = 'linspace';
+
+// --- 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= IN(1).TP',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_LINSPACE_ROW(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).VAL',ClassFileName,'file','y');
+
+
+// ---Function List Class.----
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+PrintStringInfo('d0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'linspace'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'logspace'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//---------------------
+//-----Class Rand.------
+//---------------------
+ ClassName = 'rand'
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',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= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+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= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(IN(1).SZ)',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= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_FROM_VAL(IN(1).VAL,IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(IN(2).VAL,IN(2).TP)',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= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_FROM_VAL(IN(1).VAL,IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(IN(2).VAL,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(3)= FA_SZ_FROM_VAL(IN(3).VAL,IN(3).TP)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+
+//For rand operator
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+//NUT rand function doesn't behave like zeros and ones functions.
+FunctionName = 'rand'; // BJ : Done => rien pour f loat
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --------------------
+// --- Class Sum. ---
+// --------------------
+ClassName = 'Sum';
+
+// --- 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)= ''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= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_SEL1(IN(1).SZ(1),IN(2).VAL)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_SEL2(IN(1).SZ(2),IN(2).VAL)',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s0',ClassFileName,'file','y'); //* possible ? */
+PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y'); //* possible ? */
+PrintStringInfo('c2s0'+ArgSeparator+'c0',ClassFileName,'file','y'); //* possible ? */
+PrintStringInfo('z2d0'+ArgSeparator+'z0',ClassFileName,'file','y'); //* possible ? */
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('s0g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0g2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0g2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2g2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z2g2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2g2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2g2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('u80g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82g2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80g2'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82g2'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82g2'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160g2'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162g2'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162g2'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160g2'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162g2'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162g2'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sum'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'prod'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'mean'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'st_deviation'; // BJ : Not implemented
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'variance'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// --------------------
+// --- Class Max. ---
+// --------------------
+ClassName = 'Max';
+
+
+// --- 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)= ''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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPPLUS(IN(1).SZ,IN(2).SZ,IN(1).TP,IN(2).TP))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPPLUS(IN(1).SZ,IN(2).SZ,IN(1).TP,IN(2).TP))',ClassFileName,'file','y');
+
+
+//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)= FA_SZ_SEL1(IN(1).SZ(1),IN(2).VAL)',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= FA_SZ_SEL2(IN(1).SZ(2),IN(2).VAL)',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('s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82g2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80g2'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82g2'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160g2'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162g2'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160g2'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162g2'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+FunctionName = 'max'; // BJ : Done AS : Float_Done
+ // WARNING : Complex case will never be
+ // WARNING : max(x, 2) <=> max(x, 2 * ones(x)) nothing to do with 'r' nor 'c'
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+FunctionName = 'min'; // BJ : Done AS : Float_Done
+ // WARNING : Complex case will never be
+ // WARNING : max(x, 2) <=> max(x, 2 * ones(x)) nothing to do with 'r' nor 'c'
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+// --------------------
+// --- Class Abs. ---
+// --------------------
+ClassName = 'Abs';
+
+// --- 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= FA_TP_REAL(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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'abs'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'real'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+FunctionName = 'imag'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ------------------------
+// --- Class OpDotStar. ---
+// ------------------------
+ClassName = 'OpDotStar';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPDOTSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPDOTSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i160i60'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpDotStar'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpDotSlash'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ------------------------
+// --- Class OpDotHat. ---
+// ------------------------
+ClassName = 'OpDotHat';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPDOTSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPDOTSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpDotHat'; // BJ : Done AS : Float_Done but poor precision
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//NUT verifica l'hat se e' ben annotato. L'input deve essere una matrice quadrata
+FunctionName = 'OpHat'; // BJ : Done AS : Float_Done but poor precision
+ // WARNING : d2d2 / z2z2 / d2z2 / z2d2 Not implemented in Scilab ...
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpDotBackSlash'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogLt'; // BJ : Done AS : Float_Done
+ // WARNING : Complex cases are useless.
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogLe'; // BJ : Done AS : Float_Done
+ // WARNING : Complex cases are useless.
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogGt'; // BJ : Done AS : Float_Done
+ // WARNING : Complex cases are useless.
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogGe'; // BJ : Done AS : Float_Done
+ // WARNING : Complex cases are useless.
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// ----------------------
+// --- Class OpLogEq. ---
+// ----------------------
+ClassName = 'OpLogEq';
+
+// --- 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_MIN_REAL(IN(1).TP,IN(2).TP)',ClassFileName,'file','y'); //RNU
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPDOTSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPDOTSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('g0g0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('g0g0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('g2g0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('g2g0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('g0g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('g0g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+//mixed types
+PrintStringInfo('c2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('c0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('c2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('d0i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('d0u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('d0i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpLogEq'; // BJ : Done AS : Float_Done
+ // WARNING : Unable to generate g2 nor g0 code ...
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogNe'; // BJ : Done AS : Float_Done
+ // WARNING : Unable to generate g2 nor g0 code ...
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogAnd'; // AS : Double and Float_Done
+ // ERROR : z0z0OpLogAndz0 -> z0z0OpLogAndd0
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpLogOr'; // AS : Double and Float_Done
+ // ERROR : z0z0OpLogAndz0 -> z0z0OpLogAndd0
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class OpStar. ---
+// ---------------------
+ClassName = 'OpStar';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPSTAR(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u80i80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u80u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u80i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i80u80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80u80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i80u160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i80i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u160u80'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160i80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160u80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160i80'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160u160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u82u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u82i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i82u80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82u160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i82i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u162u80'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162i80'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162u80'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i80'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162u160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u80u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u80i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i80u82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i80u162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i80i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u160u82'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u160i82'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u82u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u82i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i82u82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82u162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i82i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u162u82'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162i82'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162u82'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i82'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162u162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82i82'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u82u162'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u82i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i82u82'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82u162'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i82i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u162u82'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162i82'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162u82'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162i82'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162u162'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpStar'; // BJ : Done AS : Float_Done
+
+
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//NUT vedi che la opstar non funziona quando faccio scalare*matrice. o matrice*scalare.
+//NUT la lista delle funzioni disponibili e' identica a quella della classe 3.
+
+
+// ---------------------
+// --- Class OpSlash. ---
+// ---------------------
+ClassName = 'OpSlash';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPSLASH(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPSLASH(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+
+FunctionName = 'OpSlash'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class OpApex. ---
+// ---------------------
+ClassName = 'OpApex';
+
+// --- 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(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(1)',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpApex'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'OpDotApex'; // BJ : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ---------------------
+// --- Class IsNan. ---
+// ---------------------
+ClassName = 'IsNan';
+
+// --- 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= FA_TP_REAL(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(1)',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+FunctionName = 'isnan'; // BJ : Done AS : Float_Done
+ // ERROR : z2isnanz2 must be z2isnand2 // z0isnanz0 must be z0isnand0
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class OpPlus. ---
+// ---------------------
+ClassName = 'OpPlus';
+
+// --- 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= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPPLUS(IN(1).SZ,IN(2).SZ,IN(1).TP,IN(2).TP))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPPLUS(IN(1).SZ,IN(2).SZ,IN(1).TP,IN(2).TP))',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('g0g0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('g2g0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('g0g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpPlus'; // BJ : Done AS : Float_Done
+ // ERROR : Strings are not correctly allowed.
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+// ----------------------
+// --- Class OpMinus. ---
+// ----------------------
+ClassName = 'OpMinus';
+
+// --- 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= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPMINUS(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPMINUS(IN(1).SZ,IN(2).SZ))',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+
+FunctionName = 'OpMinus'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class OpRc. ---
+// -------------------
+ClassName = 'OpRc';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_ADD(IN(1).SZ(2),IN(2).SZ(2))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types considered
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('c0c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('z0z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('z0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpRc'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class OpCc. ---
+// -------------------
+ClassName = 'OpCc';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_ADD(IN(1).SZ(1),IN(2).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types considered
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('c0c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('z0z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('z0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpCc'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// -------------------
+// --- Class cat. ---
+// -------------------
+ClassName = 'cat';
+
+// --- 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= FA_TP_MAX(IN(2).TP,IN(3).TP)',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= FA_ADD(IN(2).SZ(1),IN(3).SZ(1))',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= FA_ADD(IN(2).SZ(2),IN(3).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_ROW_COLUMN_CAT(IN(1).VAL,IN(2).SZ(1),IN(3).SZ(1)))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_ROW_COLUMN_CAT(IN(1).VAL,IN(2).SZ(2),IN(3).SZ(2)))',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= FA_SZ_ROW_COLUMN_CAT(IN(1).VAL,IN(2).SZ(1),IN(3).SZ(1))',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= FA_SZ_ROW_COLUMN_CAT(IN(1).VAL,IN(2).SZ(2),IN(3).SZ(2))',ClassFileName,'file','y');
+
+
+// --- Function List Class. ---
+//NUT: no mixed data types considered
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d2d2' +ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0u82u82' +ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('d0u162u162' +ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('d0i82i82' +ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('d0i162i162' +ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+
+PrintStringInfo('c0c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('z0z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('u80u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('z0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cat'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Find. ---
+// -------------------
+ClassName = 'Find';
+
+// --- 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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(IN(1).SZ(1),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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MAX(FA_MUL(IN(1).SZ(1),IN(1).SZ(2)),''1'')',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_MAX(FA_MUL(IN(1).SZ(1),IN(1).SZ(2)),''1'')',ClassFileName,'file','y');
+
+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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(FA_MIN( IN(2).VAL ,FA_MUL(IN(1).SZ(1),IN(1).SZ(2))) ,IN(2).TP)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2 ',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)= FA_SZ_FROM_VAL(FA_MIN( IN(2).VAL ,FA_MUL(IN(1).SZ(1),IN(1).SZ(2))) ,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SZ_FROM_VAL(FA_MIN( IN(2).VAL ,FA_MUL(IN(1).SZ(1),IN(1).SZ(2))) ,IN(2).TP)',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('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160u160',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80i80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i60i60',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80u80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160u160',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80i80',ClassFileName,'file','y');
+PrintStringInfo('i160i60'+ArgSeparator+'i60i60',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'find'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Length. ---
+// ---------------------
+ClassName = 'Length';
+
+// --- 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= FA_TP_USER',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('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('g0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('g0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'length'; // AS : done AS : Float_Done
+ // warning for string input , the length is +1 than scilab because
+ // in C we must take in account the ending '\0'
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'type'; // AS : done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Size. ---
+// -------------------
+ClassName = 'Size';
+
+// --- 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= FA_TP_REAL(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''2''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_REAL(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('OUT(2).TP= FA_TP_REAL(IN(1).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_REAL(IN(1).TP)',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('s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('d2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'size'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Return. ---
+// ---------------------
+ClassName = 'Return';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo(ArgSeparator,ClassFileName,'file','y');
+
+//NUT anche se metto Return funziona bene comunque! cerca di capire il motivo.
+//NUT limited use to zero in and out args only.
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'return';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ----------------------
+// --- Class OpColon. ---
+// ----------------------
+ClassName = 'OpColon';
+
+// --- 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_MIN_REAL(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+
+
+
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(FA_ADD(FA_SUB(FA_REAL(IN(2).VAL,IN(2).TP),FA_REAL(IN(1).VAL,IN(1).TP)),''1''),FA_TP_REAL(IN(2).TP))',ClassFileName,'file','y');
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MIN_REAL(IN(1).TP,FA_TP_MIN_REAL(IN(2).TP,IN(3).TP))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_FROM_VAL(FA_ADD(FA_DIV(FA_SUB(FA_REAL(IN(3).VAL,IN(3).TP),FA_REAL(IN(1).VAL, IN(1).TP)),FA_REAL(IN(2).VAL,IN(2).TP)),''1''),FA_TP_REAL(IN(3).TP))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+
+
+PrintStringInfo('s0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0z0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0c0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('c0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('c0c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('c0s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('d0z0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('z0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('z0z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('z0d0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0c0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z0z0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0s0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0c0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0c0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('c0s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('c0c0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('c0s0c0'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0z0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0z0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('z0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('z0z0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('z0d0z0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpColon'; // AS : done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ----------------------
+// --- Class IsEmpty. ---
+// ----------------------
+ClassName = 'IsEmpty';
+
+// --- 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= FA_TP_USER',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('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'isempty';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ----------------------
+// --- Class Trace. ---
+// ----------------------
+ClassName = 'Trace';
+
+// --- 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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'trace'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//NUT det is a little bit complex but for the moment we assume that
+//NUT that det works as trace function.
+FunctionName = 'det'; // AS : Done AS : Float_Done
+
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --------------------
+// --- Class OpIns. ---
+// --------------------
+ClassName = 'OpIns';
+
+// --- 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('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s2s0s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s0s0s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s0s2s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s0s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s2s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s0s2s2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s0s2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s2s2'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('d2d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d0d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d0d2d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d2d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d0d2d2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d0d2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d2d2'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('c2s0c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2c2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s0s0c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s0s2c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s0c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s2c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s0s2c2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s0c2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s2c2'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('z2d0z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2z2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d0d0z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d0d2z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d0z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d2z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d0d2z2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d0z2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d2z2'+ArgSeparator,ClassFileName,'file','y');
+
+//Mixed input arguments
+PrintStringInfo('s2s0c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2c2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s0s0c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s0s2c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s0c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s2c0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s0s2c2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s0c2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2s2s2c2'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('d2d0z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2z2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d0d0z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d0d2z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d0z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d2z0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d0d2z2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d0z2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2d2d2z2'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('c2s0s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s0s0s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s0s2s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s0s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s2s0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s0s2s2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s0s2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('c2s2s2s2'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('z2d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d0d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d0d2d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d2d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d0d2d2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d0d2'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('z2d2d2d2'+ArgSeparator,ClassFileName,'file','y');
+
+// Hypermatrix management
+PrintStringInfo('d3d0d0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d3d0d0d0d0'+ArgSeparator,ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpIns'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --------------------
+// --- Class OpExt. ---
+// --------------------
+ClassName = 'OpExt';
+
+// --- 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= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_MUL(IN(2).SZ(1),IN(2).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',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_MUL(IN(2).SZ(1),IN(2).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(IN(3).SZ(1),IN(3).SZ(2))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 4',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_MUL(IN(2).SZ(1),IN(2).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(IN(3).SZ(1),IN(3).SZ(2))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s2s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('c2s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c2s2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('z2d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z2d2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// Hypermatrix Management
+PrintStringInfo('s3s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d3d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d3d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d3s0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpExt'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Disp. ---
+// -------------------
+ClassName = 'Disp';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''d''',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('s0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('g0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'',ClassFileName,'file','y');
+
+PrintStringInfo('d3'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'disp'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class String ---
+// -------------------
+ClassName = 'String';
+
+// --- 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= ''g''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(IN.SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(IN.SZ)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('g0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'g0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'string'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ----------------------
+// --- Class OpEqual. ---
+// ----------------------
+ClassName = 'OpEqual';
+
+// --- 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)= FA_SZ_1(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(IN(1).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= IN(2).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_SZ_1(IN(2).SZ)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SZ_2(IN(2).SZ)',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('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('g0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+//NUT per ora non considero le equal con nin != 1
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpEqual'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// --------------------
+// --- Class Mopen. ---
+// --------------------
+ClassName = 'Mopen';
+
+// --- 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= ''f''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''f''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_USER',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''f''',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= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''f''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_USER',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''f''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''f''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_USER',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2'+ArgSeparator+'f0',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'f0s0',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'f0d0',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'f0',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'f0s0',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'f0d0',ClassFileName,'file','y');
+PrintStringInfo('g2g2s0'+ArgSeparator+'f0s0',ClassFileName,'file','y');
+PrintStringInfo('g2g2s0'+ArgSeparator+'f0d0',ClassFileName,'file','y');
+PrintStringInfo('g2g2d0'+ArgSeparator+'f0s0',ClassFileName,'file','y');
+PrintStringInfo('g2g2d0'+ArgSeparator+'f0d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'mopen';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Mput. ---
+// -------------------
+ClassName = 'Mput';
+
+// --- 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('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''i''',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('s0g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('s2g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d0g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('d2g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('u80g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('u82g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('i80g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('i82g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('u160g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('u162g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('i160g2f0'+ArgSeparator,ClassFileName,'file','y');
+PrintStringInfo('i162g2f0'+ArgSeparator,ClassFileName,'file','y');
+
+PrintStringInfo('s0g2f0'+ArgSeparator+'i0',ClassFileName,'file','y'); //NUT la mput e' strana
+PrintStringInfo('s2g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('d0g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('d2g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('u80g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('u82g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('i80g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('i82g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('u160g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('u162g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('i160g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+PrintStringInfo('i162g2f0'+ArgSeparator+'i0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'mput';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Mget. ---
+// -------------------
+ClassName = 'Mget';
+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= FA_TP_USER',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(FA_SZ_FROM_VAL(IN(1).VAL,IN(1).TP))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0g2f0'+ArgSeparator+'s0',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('s0g2f0'+ArgSeparator+'d0',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('d0g2f0'+ArgSeparator+'s0',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('d0g2f0'+ArgSeparator+'d0',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('s0g2f0'+ArgSeparator+'s2',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('s0g2f0'+ArgSeparator+'d2',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('d0g2f0'+ArgSeparator+'s2',ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('d0g2f0'+ArgSeparator+'d2',ClassFileName,'file','y'); //NUT da chiarire
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'mget';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Mclose. ---
+// ---------------------
+ClassName = 'Mclose';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''i''',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('f0'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('f0'+ArgSeparator+'i0',ClassFileName,'file','y'); //NUT da chiarire
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'mclose';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Mseek. ---
+// ---------------------
+ClassName = 'Mseek';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('s0f0'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('s0f0g2'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+
+PrintStringInfo('d0'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+PrintStringInfo('d0f0'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+
+
+PrintStringInfo('d0f0g2'+ArgSeparator,ClassFileName,'file','y'); //NUT da chiarire
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'mseek';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ---------------------
+// --- Class Convol. ---
+// ---------------------
+ClassName = 'Convol';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SUB(FA_ADD(IN(1).SZ(2),IN(2).SZ(2)),''1'')',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SUB(FA_ADD(IN(1).SZ(2),IN(2).SZ(2)),''1'')',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(FA_TP_MAX(IN(1).TP,IN(2).TP),IN(3).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_MAX(FA_TP_MAX(IN(1).TP,IN(2).TP),IN(3).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SUB(FA_ADD(IN(1).SZ(2),IN(2).SZ(2)),''1'')',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0z0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2c2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2c2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0c0'+ArgSeparator+'c0c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0z0'+ArgSeparator+'z0z0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s2s0'+ArgSeparator+'s2s0',ClassFileName,'file','y');
+PrintStringInfo('d0d2d0'+ArgSeparator+'d2d0',ClassFileName,'file','y');
+PrintStringInfo('c0c2c0'+ArgSeparator+'c2c0',ClassFileName,'file','y');
+PrintStringInfo('z0z2z0'+ArgSeparator+'z2z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2s2'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2c2'+ArgSeparator+'c2c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2z2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+//added combination
+
+PrintStringInfo('d2d0'+ArgSeparator+'d0d2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z0z2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z0z2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z0z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'convol'; // AS : done except 2 ouputs cases and 3 inputs cases AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class IFFT. ---
+// -------------------
+ClassName = 'IFFT';
+
+// --- 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. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'ifft'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ------------------
+// --- Class FFT. ---
+// ------------------
+ClassName = 'FFT';
+
+// --- 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= 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');
+PrintStringInfo('NIN= 3',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= 4',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');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// scilab2c doesn't handle multidimensionnal Fft
+
+//PrintStringInfo('s0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+//PrintStringInfo('d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('s0s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+//PrintStringInfo('d0d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+//PrintStringInfo('c0s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+//PrintStringInfo('z0d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+//PrintStringInfo('s2s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+//PrintStringInfo('d2d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('s2s0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+//PrintStringInfo('d2d0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+//PrintStringInfo('c2s0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+//PrintStringInfo('z2d0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+//PrintStringInfo('s0s0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+//PrintStringInfo('d0d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('s0s0s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+//PrintStringInfo('d0d0d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+//PrintStringInfo('c0s0s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+//PrintStringInfo('z0d0d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+//PrintStringInfo('s2s0s0s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+//PrintStringInfo('d2d0d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+//PrintStringInfo('s2s0s0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+//PrintStringInfo('d2d0d0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+//PrintStringInfo('c2s0s0s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+//PrintStringInfo('z2d0d0d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+//NUT non metto tutte le combinazioni ma prima cerco di capire cosa mi offre INRIA
+//NUT come libreria a disposizione.
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'fft'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -----------------------
+// --- Class FFTShift. ---
+// -----------------------
+ClassName = 'FFTShift';
+
+// --- 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= 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');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0g2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0g2'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2g2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2g2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'fftshift'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// --------------------
+// --- Class Meanf. ---
+// --------------------
+ClassName = 'Meanf';
+
+// --- 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_MAX(IN(1).TP, IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP, IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_SEL1(IN(1).SZ(1),IN(3).VAL)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_SEL2(IN(1).SZ(2),IN(3).VAL)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2s2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2d2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+//
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('c2c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+//
+PrintStringInfo('s0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s0c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('d0z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('c0c0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('z0z0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2z2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2c2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('z2z2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'meanf'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'variancef';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'stdevf'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --------------------
+// --- Class Frmag. ---
+// --------------------
+ClassName = 'Frmag';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(2).VAL',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).VAL',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).VAL',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= FA_TP_MAX(IN(1).TP,IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(3).VAL',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2d0'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0d0'+ArgSeparator+'d0d0',ClassFileName,'file','y');
+
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+PrintStringInfo('s2s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2s0'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('s0s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0s0s0'+ArgSeparator+'s0s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'frmag';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// ------------------
+// --- Class Lev. ---
+// ------------------
+ClassName = 'Lev';
+
+// --- 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)= FA_SUB(FA_ADD(IN(1).SZ(1),IN(1).SZ(2)),''2'')',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',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)= FA_SUB(FA_ADD(IN(1).SZ(1),IN(1).SZ(2)),''2'')',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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',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)= FA_SUB(FA_ADD(IN(1).SZ(1),IN(1).SZ(2)),''2'')',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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(1)= FA_SUB(FA_ADD(IN(1).SZ(1),IN(1).SZ(2)),''2'')',ClassFileName,'file','y');
+PrintStringInfo('OUT(3).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2s0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2s0s2',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d0d2',ClassFileName,'file','y');
+
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2c0',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2c0c2',ClassFileName,'file','y');
+
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2z0',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2z0z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'lev'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// --------------------------
+// --- Class OpBackSlash. ---
+// --------------------------
+ClassName = 'OpBackSlash';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP) ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_SZ_1(FA_SZ_OPBACKSLASH(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OPBACKSLASH(IN(1).SZ,IN(2).SZ))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+PrintStringInfo('u80u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('u160u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i80i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('i160i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('c0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+
+PrintStringInfo('c0s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('s0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c0c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('c2s0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('s2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c0'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('z0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('z0d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z0z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('z2d0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('d2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z0'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'OpBackSlash';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -----------------------
+// --- Class Cepstrum. ---
+// -----------------------
+ClassName = 'Cepstrum';
+
+// --- 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_MAX(IN(1).TP,IN(2).TP) ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_MUL(IN(1).SZ(1),IN(1).SZ(2))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('s0s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('s0c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('s2c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'Cepstrum';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Spec. ---
+// -------------------
+ClassName = 'Spec';
+
+// --- 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= 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= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 2',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y'); //FOR INRIA FA_TP_MAX NEEDS 2 Input args
+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= FA_TP_COMPLEX(IN(1).TP)',ClassFileName,'file','y'); //FOR INRIA FA_TP_MAX NEEDS 2 Input args
+PrintStringInfo('OUT(2).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('s0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+PrintStringInfo('s0'+ArgSeparator+'c0c0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'z0z0',ClassFileName,'file','y');
+PrintStringInfo('c0'+ArgSeparator+'c0c0',ClassFileName,'file','y');
+PrintStringInfo('z0'+ArgSeparator+'z0z0',ClassFileName,'file','y');
+
+PrintStringInfo('s2'+ArgSeparator+'s2s2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'c2c2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'spec'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -------------------
+// --- Class Part. ---
+// -------------------
+ClassName = 'Part';
+
+// --- 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= ''g''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(IN(1).SZ(2))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('g2s0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g2d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g2s2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g2d2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'part'; // to code
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -----------------------
+// --- Class Strindex. ---
+// -----------------------
+ClassName = 'Strindex';
+
+// --- 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= ''g''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(IN(1).SZ(2))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+PrintStringInfo('g2g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strindex'; // to code
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+// -----------------------
+// --- Class StrSubSt. ---
+// -----------------------
+//ClassName = 'StrSubSt';
+
+// --- 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= ''g''',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+//PrintStringInfo('OUT(1).SZ(2)= FA_SZ_RTMAX(FA_MUL(IN(1).SZ(2),IN(3).SZ(2)))',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+//NUT: no mixed data types
+//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+
+//PrintStringInfo('g2g2g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+//FunctionName = 'strsubst'; // to code
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+// ------------------
+// --- Class Expm. ---
+// ------------------
+ClassName = 'Expm';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y');
+PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'expm'; // AS : Done AS : Float_Done
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---Functions for Scilab-arduino ----
+//------------------------------------
+
+
+//------------------------------------
+//---- Class cmd_digital_out ---------
+//------------------------------------
+ClassName = 'cmd_digital_out';
+
+// --- 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('d0d0u80'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_digital_out';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class cmd_digital_in ----------
+//------------------------------------
+ClassName = 'cmd_digital_in';
+
+// --- 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= ''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+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_digital_in';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_analog_out ----------
+//------------------------------------
+ClassName = 'cmd_analog_out';
+
+// --- 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('d0d0u80'+ArgSeparator+'',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_analog_out';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_analog_in -----------
+//------------------------------------
+ClassName = 'cmd_analog_in';
+
+// --- 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');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_analog_in';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class cmd_dcmotor_setup -------
+//------------------------------------
+ClassName = 'cmd_dcmotor_setup';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 5',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('d0d0d0d0d0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_dcmotor_setup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cmd_dcmotor_run -------
+//------------------------------------
+ClassName = 'cmd_dcmotor_run';
+
+// --- 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('d0d0i160'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_dcmotor_run';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//---Class cmd_servo_attach.---
+ClassName = 'cmd_servo_attach';
+
+//----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_servo_attach';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//---Class cmd_servo_detach.---
+ClassName = 'cmd_servo_detach';
+
+//----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_servo_detach';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//---Class cmd_servo_move.---
+ClassName = 'cmd_servo_move';
+
+//----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');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cmd_servo_move';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- 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 -------------------
+
+//------------------------------------
+ClassName = 'sleep';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',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('d0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'sleep';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- 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 ---------------
+//------------------------------------
+
+
+//------------------------------------
+//---- Class AVRDigitalSetup ---------
+//------------------------------------
+ClassName = 'AVRDigitalSetup';
+
+// --- 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+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class AVRDigitalPortSetup ---------
+//------------------------------------
+ClassName = 'AVRDigitalPortSetup';
+
+// --- 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= ''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+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalPortSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+
+//------------------------------------
+//---- Class AVRDigitalOut -----------
+//------------------------------------
+ClassName = 'AVRDigitalOut';
+
+// --- 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+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalOut';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class AVRDigitalOut -----------
+//------------------------------------
+ClassName = 'AVRDigitalIn';
+
+// --- 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= ''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+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRDigitalIn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class AVRADCSetup -----------
+//------------------------------------
+ClassName = 'AVRADCSetup';
+
+// --- 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+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRADCSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class AVRReadADC -----------
+//------------------------------------
+ClassName = 'AVRReadADC';
+
+// --- 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+'u160',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRReadADC';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class AVRPWM0Setup -------------
+//------------------------------------
+ClassName = 'AVRPWM0Setup';
+
+// --- 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= ''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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWM0Setup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class AVRPWM2Setup -------------
+//------------------------------------
+ClassName = 'AVRPWM2Setup';
+
+// --- 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= ''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('d0d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWM2Setup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class AVRPWM1Setup -------------
+//------------------------------------
+ClassName = 'AVRPWM1Setup';
+
+// --- 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= ''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('d0d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWM1Setup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
+//---- Class AVRPWM0SetDuty -----------
+//------------------------------------
+ClassName = 'AVRPWM0SetDuty';
+
+// --- 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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWM0SetDuty';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class AVRPWM2SetDuty -----------
+//------------------------------------
+ClassName = 'AVRPWM2SetDuty';
+
+// --- 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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWM2SetDuty';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class AVRPWM1SetDuty -----------
+//------------------------------------
+ClassName = 'AVRPWM1SetDuty';
+
+// --- 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= ''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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRPWM1SetDuty';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+//------------------------------------
+//---- Class AVRTimerInit -----------
+//------------------------------------
+ClassName = 'AVRTimerSetup';
+
+// --- 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= ''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+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRTimerSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+//------------------------------------
+//---- Class AVRGetTimerValue -----------
+//------------------------------------
+ClassName = 'AVRGetTimerValue';
+
+// --- 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= ''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('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRGetTimerValue';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class AVRSleep -----------
+//------------------------------------
+ClassName = 'AVRSleep';
+
+// --- 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= ''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('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRSleep';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+//------------------------------------
+//---- Class AVRUARTSetup -----------
+//------------------------------------
+ClassName = 'AVRUARTSetup';
+
+// --- 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= ''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+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRUARTSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class AVRUARTTransmit -----------
+//------------------------------------
+ClassName = 'AVRUARTTransmit';
+
+// --- 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');
+PrintStringInfo('s0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('g0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+//
+//PrintStringInfo('d2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRUARTTransmit';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+
+
+
+//------------------------------------
+//---- Class AVRUARTReceiveChar -----------
+//------------------------------------
+ClassName = 'AVRUARTReceiveChar';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',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('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+//PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'AVRUARTReceiveChar';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class RPI_DigitalSetup --------
+//------------------------------------
+ClassName = 'RPI_DigitalSetup';
+
+// --- 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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_DigitalOut';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMWrite';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_DigitalIn -----------
+//------------------------------------
+ClassName = 'RPI_DigitalIn';
+
+// --- 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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalIn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_DelayMilli ----------
+//------------------------------------
+ClassName = 'RPI_DelayMilli';
+
+//--- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DelayMilli';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_DelayMicro';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_SerialClose';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_SerialFlush';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetRange';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetClock';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_HardPWMSetMode';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_GetMilli ----------
+//------------------------------------
+ClassName = 'RPI_GetMilli';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 0',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u32''',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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_GetMillis';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_GetMicros';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SetupSerial ----------
+//------------------------------------
+ClassName = 'RPI_SetupSerial';
+
+// --- 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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_SerialSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SetupClose ----------
+//------------------------------------
+//ClassName = 'RPI_SetupClose';
+
+// --- 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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+//FunctionName = 'RPI_SerialClose';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//FunctionName = 'RPI_SerialFlush';
+//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SerialSendData ----------
+//------------------------------------
+ClassName = 'RPI_SerialSendData';
+
+// --- 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('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80u160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i160'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80s0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+PrintStringInfo('u80u82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i82'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80u162'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80i162'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80s2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80d2'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u80g2'+ArgSeparator+'u80',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_SerialSendData';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_SerialDataAvail ----------
+//------------------------------------
+ClassName = 'RPI_SerialDataAvail';
+
+// --- 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= ''i16''',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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_SerialDataAvail';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+FunctionName = 'RPI_SerialGetChar';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class RPI_ThreadCreate ----------
+//------------------------------------
+ClassName = 'RPI_ThreadCreate';
+
+// --- 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= ''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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_ThreadCreate';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_PinISR --------------
+//------------------------------------
+ClassName = 'RPI_PinISR';
+
+// --- 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= ''i16''',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(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_PinISR';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class ODE ---------------------
+//------------------------------------
+ClassName = 'ODE';
+
+// --- 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= 4',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)= FA_MUL(IN(1).SZ(2),IN(3).SZ(2))',ClassFileName,'file','y');
+
+//Arguements specified: initial value, start time, end time, ode function
+PrintStringInfo('NIN= 4',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(3).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y');
+
+//Arguements specified: solver type, initial value, start time, end time, ode function
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(2).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(IN(2).SZ(2),IN(4).SZ(2))',ClassFileName,'file','y');
+
+//Arguements specified: solver type, initial value, start time, end time, ode function
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(2).TP',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');
+
+//Arguements specified: initial value, start time, end time, relative tolerance,
+// absolute tolerance, ode function
+PrintStringInfo('NIN= 6',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)= FA_MUL(IN(1).SZ(2),IN(3).SZ(2))',ClassFileName,'file','y');
+
+//Arguements specified: initial value, start time, end time, relative tolerance,
+// absolute tolerance, ode function
+PrintStringInfo('NIN= 6',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(3).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0d0fn0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d0d0fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d0d2fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0d2fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('g2d0d0d0fn0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('g2d2d0d0fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d0d2fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('g2d2d0d2fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0d0d0d0fn0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d0d0d0d0fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0d0d2d0d0fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0d2d0d0fn0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'ode';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CUMSUM ---------------------
+//------------------------------------
+ClassName = 'CUMSUM';
+
+// --- 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)= 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');
+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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82g2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82g2'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162g2'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162g2'+ArgSeparator+'i162',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cumsum';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'cumprod';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class TRIU ---------------------
+//------------------------------------
+ClassName = 'TRIU';
+
+// --- 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)= 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');
+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('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'triu';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+FunctionName = 'tril';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class KRON --------------------
+//------------------------------------
+ClassName = 'KRON';
+
+// --- 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)= FA_MUL(IN(1).SZ(1),IN(2).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(IN(1).SZ(2),IN(2).SZ(2))',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+PrintStringInfo('d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'kron';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class FLIPDIM -----------------
+//------------------------------------
+ClassName = 'FLIPDIM';
+
+// --- 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');
+
+PrintStringInfo('NIN= 3',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('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0d0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82u80u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80u80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82d0d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82d0d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162d0d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162d0d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'flipdim';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class DIFF -----------------
+//------------------------------------
+ClassName = 'DIFF';
+
+// --- 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)= FA_SZ_1(FA_SZ_DIFF(IN(1).SZ,''1'',''0''))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_DIFF(IN(1).SZ,''1'',''0''))',ClassFileName,'file','y');
+
+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)= FA_SZ_1(FA_SZ_DIFF(IN(1).SZ,IN(2).VAL,''0''))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_DIFF(IN(1).SZ,IN(2).VAL,''0''))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',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_SZ_1(FA_SZ_DIFF(IN(1).SZ,IN(2).VAL, IN(3).VAL))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_DIFF(IN(1).SZ,IN(2).VAL, IN(3).VAL))',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2d0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82u80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162u160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2d0d0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s2s0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('u82d0d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u82u80d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82d0d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i82u80d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162d0d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('u162u160d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162d0d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('i162u160d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'diff';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class NORM --------------------
+//------------------------------------
+ClassName = 'NORM';
+
+// --- 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)= ''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= 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('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('s2d0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('d2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'norm';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CONVSTR --------------------
+//------------------------------------
+ClassName = 'CONVSTR';
+
+// --- 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= 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(1)',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g0g0'+ArgSeparator+'g0',ClassFileName,'file','y');
+PrintStringInfo('g2g0'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'convstr';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cvCreateImage --------------------
+//------------------------------------
+ClassName = 'CV_CreateImage';
+
+// --- 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= ''mt''',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('d0d0g2d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_CreateImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cvLoadImage --------------------
+//------------------------------------
+ClassName = 'CV_LoadImage';
+
+// --- 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= ''mt''',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('g2d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_LoadImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class cvShowImage -------------
+//------------------------------------
+ClassName = 'CV_ShowImage';
+
+// --- 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');
+
+PrintStringInfo('NIN= 1',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');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2mt0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('mt0'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_ShowImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'CV_SaveImage';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_WaitKey --------------
+//------------------------------------
+ClassName = 'CV_WaitKey';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 1',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');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_WaitKey';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_CvtColor -------------
+//------------------------------------
+ClassName = 'CV_CvtColor';
+
+// --- 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= ''mt''',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('mt0g2'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_CvtColor';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_GetImgSize -----------
+//------------------------------------
+ClassName = 'CV_GetImgSize';
+
+// --- 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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''2''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('mt0'+ArgSeparator+'d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_GetImgSize';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_Threshold -----------
+//------------------------------------
+ClassName = 'CV_Threshold';
+
+// --- 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= ''mt''',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('mt0d0d0g2'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_Threshold';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_AdaptiveThreshold -----------
+//------------------------------------
+ClassName = 'CV_AdaptiveThreshold';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 6',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',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('mt0d0g2g2d0d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_AdaptiveThreshold';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_DistanceTransform ----
+//------------------------------------
+ClassName = 'CV_DistanceTransform';
+
+// --- 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= ''mt''',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('mt0g2d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_DistanceTransform';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_Blur -----------------
+//------------------------------------
+ClassName = 'CV_Blur';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 6',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',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('mt0d0d0d0d0g2'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_Blur';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'CV_GaussianBlur';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_MedianBlur -----------------
+//------------------------------------
+ClassName = 'CV_MedianBlur';
+
+// --- 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= ''mt''',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('mt0d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_MedianBlur';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_Dilate ---------------
+//------------------------------------
+ClassName = 'CV_Dilate';
+
+// --- 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= ''mt''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 6',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',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('mt0g2d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+PrintStringInfo('mt0g2d0d0g2d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_Dilate';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'CV_Erode';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_Canny ----------------
+//------------------------------------
+ClassName = 'CV_Canny';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',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('mt0d0d0d0d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+PrintStringInfo('mt0d0d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_Canny';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CV_CornerHarris ----------------
+//------------------------------------
+ClassName = 'CV_CornerHarris';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 4',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''mt''',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('mt0d0d0d0g2'+ArgSeparator+'mt0',ClassFileName,'file','y');
+PrintStringInfo('mt0d0d0d0'+ArgSeparator+'mt0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'CV_CornerHarris';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class syslin ------------------
+//------------------------------------
+ClassName = 'SYSLIN';
+
+// --- 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= ''ss''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_ADD(IN(2).SZ(1),IN(4).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_ADD(FA_ADD(IN(2).SZ(2),IN(3).SZ(2)), ''2'')',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 5',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''ss''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_ADD(IN(2).SZ(1),IN(4).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_ADD(FA_ADD(IN(2).SZ(2),IN(3).SZ(2)), ''2'')',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 6',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''ss''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= FA_ADD(IN(2).SZ(1),IN(4).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_ADD(FA_ADD(IN(2).SZ(2),IN(3).SZ(2)), ''2'')',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('g2d2d2d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d2d2d2d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d2d2d2d2d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+
+PrintStringInfo('g2d0d0d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d2d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d0d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d2d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+
+PrintStringInfo('g2d0d0d0d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d2d0d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d0d2d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d2d2d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d2d2d2d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+
+PrintStringInfo('g2d0d0d0d0d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d2d0d2d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d0d2d2d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d0d2d2d2d0'+ArgSeparator+'ss2',ClassFileName,'file','y');
+PrintStringInfo('g2d2d2d2d0d2'+ArgSeparator+'ss2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'syslin';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class schur -------------------
+//------------------------------------
+ClassName = 'SCHUR';
+
+// --- 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');
+
+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');
+
+PrintStringInfo('NIN= 2',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= FA_SCHUR_TP(IN(2).TP)',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_SCHUR_SZ(IN(2).TP,IN(1).SZ(1))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SCHUR_SZ(IN(2).TP,IN(1).SZ(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)= IN(1).SZ(2)',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');
+PrintStringInfo('OUT(3).TP= 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(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 4',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');
+PrintStringInfo('OUT(3).TP= 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(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).TP= 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(2)',ClassFileName,'file','y');
+
+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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',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= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',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(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');
+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');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 4',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');
+PrintStringInfo('OUT(3).TP= 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(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).SZ(2)= ''1''',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 5',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');
+PrintStringInfo('OUT(3).TP= 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(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).TP= 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(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(5).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(5).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(5).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2d0',ClassFileName,'file','y');
+PrintStringInfo('d2g2'+ArgSeparator+'d2d0d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2d2d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2g2'+ArgSeparator+'d2d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2g2'+ArgSeparator+'d2d2d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2g2'+ArgSeparator+'d2d2d2d0',ClassFileName,'file','y');
+PrintStringInfo('d2d2g2'+ArgSeparator+'d2d2d2d2d0',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'schur';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class lqr ---------------------
+//------------------------------------
+ClassName = 'LQR';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+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(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(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');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'lqr';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class lqe ---------------------
+//------------------------------------
+ClassName = 'LQE';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+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_LQE(IN(1).VAL,IN(1).SZ(1)))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_1(FA_SZ_LQE(IN(1).VAL,IN(1).SZ(1)))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).TP= ''d''',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(1)= FA_SZ_1(FA_SZ_LQE(IN(1).VAL,IN(1).SZ(1)))',ClassFileName,'file','y');
+PrintStringInfo('OUT(2).SZ(2)= FA_SZ_2(FA_SZ_LQE(IN(1).VAL,IN(1).SZ(1)))',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('ss2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'lqe';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class obscont -----------------
+//------------------------------------
+ClassName = 'OBSCONT';
+
+// --- 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)= FA_SZ_1(FA_SZ_OBSCNT(IN(1).VAL,IN(1).SZ(1),IN(1).SZ(2),NOutArg))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OBSCNT(IN(1).VAL,IN(1).SZ(1),IN(1).SZ(2),NOutArg))',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_1(FA_SZ_OBSCNT(IN(1).VAL,IN(1).SZ(1),IN(1).SZ(2),NOutArg))',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_2(FA_SZ_OBSCNT(IN(1).VAL,IN(1).SZ(1),IN(1).SZ(2),NOutArg))',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)= ''2''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('ss2d2d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('ss2d2d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'obscont';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class balanc ------------------
+//------------------------------------
+ClassName = 'BALANC';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+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');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 4',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');
+PrintStringInfo('OUT(3).TP= 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(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(4).TP= 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(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2d2',ClassFileName,'file','y');
+PrintStringInfo('d2d2'+ArgSeparator+'d2d2d2d2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'balanc';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RCOND -------------------
+//------------------------------------
+ClassName = 'RCOND';
+
+// --- 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)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'rcond';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class CONVSTR --------------------
+//------------------------------------
+ClassName = 'CONVSTR';
+
+// --- 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');
+
+//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(1)',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'convstr';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class STRSUBST --------------------
+//------------------------------------
+ClassName = 'STRSUBST';
+
+// --- 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= 3',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= 4',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('g2g2g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('g2g2g2g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strsubst';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class STRCMP --------------------
+//------------------------------------
+ClassName = 'STRCMP';
+
+// --- 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');
+
+PrintStringInfo('NIN= 3',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(1)',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('g2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('g2g2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strcmp';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class STRREV --------------------
+//------------------------------------
+ClassName = 'STRREV';
+
+// --- 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)= 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('g2'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'strrev';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class STRRCHR --------------------
+//------------------------------------
+ClassName = 'STRRCHR';
+
+// --- 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 = 'strrchr';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class DEC2BIN --------------------
+//------------------------------------
+ClassName = 'DEC2BIN';
+
+// --- 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)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(FA_SZ_DEC2BIN(IN(1).VAL),IN(1).SZ(2))',ClassFileName,'file','y');
+
+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)= FA_MUL(IN(2).VAL,IN(1).SZ(2))',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'dec2bin';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class DEC2BASE --------------------
+//------------------------------------
+ClassName = 'DEC2BASE';
+
+// --- 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)= FA_MUL(FA_SZ_DEC2BASE(IN(1).VAL,IN(2).VAL),IN(1).SZ(2))',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 3',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)= FA_MUL(IN(2).VAL,IN(1).SZ(2))',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('d2d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('s0d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('s2d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('d2d0d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('s0d0d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('s2d0d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'dec2base';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class DEC2OCT --------------------
+//------------------------------------
+ClassName = 'DEC2OCT';
+
+// --- 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)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(FA_SZ_DEC2OCT(IN(1).VAL),IN(1).SZ(1))',ClassFileName,'file','y');
+
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'dec2oct';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class DEC2HEX --------------------
+//------------------------------------
+ClassName = 'DEC2HEX';
+
+// --- 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= ''g''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(FA_SZ_DEC2HEX(IN(1).VAL),IN(1).SZ(1))',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'g2',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'g2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'dec2hex';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class BIN2DEC --------------------
+//------------------------------------
+ClassName = 'BIN2DEC';
+
+// --- 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= ''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('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'bin2dec';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class OCT2DEC --------------------
+//------------------------------------
+ClassName = 'OCT2DEC';
+
+// --- 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= ''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('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'oct2dec';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class HEX2DEC --------------------
+//------------------------------------
+ClassName = 'HEX2DEC';
+
+// --- 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= ''d''',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('g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'hex2dec';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+//------------------------------------
+//---- Class BASE2DEC --------------------
+//------------------------------------
+ClassName = 'BASE2DEC';
+
+// --- 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= ''d''',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('g2d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+//PrintStringInfo('g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'base2dec';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ------------------
+// --- Class Cosd. ---
+// ------------------
+ClassName = 'Cosd';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cosd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ------------------
+// --- Class Cotd. ---
+// ------------------
+ClassName = 'Cotd';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cotd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ------------------
+// --- Class Coth. ---
+// ------------------
+ClassName = 'Coth';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',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 = 'coth';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ------------------
+// --- Class Csc. ---
+// ------------------
+ClassName = 'Csc';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+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 = 'csc';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// ------------------
+// --- Class Cscd. ---
+// ------------------
+ClassName = 'Cscd';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',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 = 'cscd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// ------------------
+// --- Class Csch. ---
+// ------------------
+ClassName = 'Csch';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+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 = 'csch';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// --- Class Sec. ---
+// ------------------
+ClassName = 'Sec';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+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 = 'sec';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// ------------------
+// --- Class Secd. ---
+// ------------------
+ClassName = 'Secd';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'secd';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+// --- Class Sech. ---
+// ------------------
+ClassName = 'Sech';
+
+// --- 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');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+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 = 'sech';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class FACTORIAL --------------------
+//------------------------------------
+ClassName = 'FACTORIAL';
+
+// --- 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)= 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('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'factorial';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+// --- Class Interp1. ---
+// ------------------
+ClassName = 'Interp1';
+
+// --- 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)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d2d2d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+//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 = 'interp1';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+
+
+//------------------------------------
+//---- Class PRIMES --------------------
+//------------------------------------
+ClassName = 'PRIMES';
+
+// --- 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)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_SZ_PRIMES(IN(1).VAL)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'primes';
+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';
+
+// --- 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)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(FA_SZ_FACTOR(IN(1).VAL),IN(1).SZ(1))',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'factor';
+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
+// /////////////////////////////////////////////
+// ///////////////////////////////////////////////
+
+// // DOMAINS DEFINITION FOR EVERY CLASS-LEADER IN SCI2C LIBRARY
+
+// // In the following lets:
+// // N,R ,C are the standard sets of integer,real ,complex numbers
+// // I,J c R are intervals of real numbers
+// // {} the empty set
+// // Sel={'r','c'} or {0,1} are the selection sets r=row,c=column
+// // B={T,F} is Boolean set
+// // F is the standard set of File IDentify files
+// // G is the standard alphanumeric string domain
+
+// // For every sci2c function library class we reported
+// // the domains , annotations only for the class-leader
+
+
+// // Example [y1,y2]=Fun(x1,x2,x3) : scilab library function call
+
+// // Domain RxNxSel->{R,R} :the first input element is real number ,the second is integer ,
+// // the last is in the selection set
+// // The first output and the second are real numbers
+
+// // Notice : only default (double) precision are considered for real and complex data
+// // The dimension of the input/output data are provided in the mapping schema
+
+// // d0 = double real scalar
+// // d2 = double real vector or matrix
+// // z0= double complex scalar
+// // z2= double complex vector or matrix
+
+// // ---------------------
+// // --- Class Global. ---
+// // ---------------------
+
+// // DOMAINS G -> R
+
+// //////////////////////////////////
+
+
+// // ---------------------
+// // --- Class Float. ---
+// // ---------------------
+
+// // DOMAINS R -> R
+
+// //////////////////////////////////
+
+
+// // ---------------------
+// // --- Class Double. ---
+// // ---------------------
+
+// // DOMAINS R -> R
+
+// //////////////////////////////////
+
+// // ----------------------------
+// // --- Class FloatComplex. ---
+// // ----------------------------
+
+// // DOMAINS 1)R -> C
+// // 2)C -> C
+
+// /////////////////////////////////
+
+// // ----------------------------
+// // --- Class DoubleComplex. ---
+// // ----------------------------
+
+// // DOMAINS 1) R -> C
+// // 2) C -> C
+
+// /////////////////////////////////
+
+// // ------------------
+// // --- Class Sin. ---
+// // ------------------
+
+// // DOMAINS 1) IcR -> JcR
+// // 2) C -> C
+
+// /////////////////////////////////
+
+// // -------------------
+// // --- Class Atan. ---
+// // -------------------
+
+// // DOMAINS 1) IcR -> JcR
+// // 2) C -> C
+// // 3) RxR -> JcR
+
+// /////////////////////////////////
+
+// // -------------------
+// // --- Class Sqrt. ---
+// // -------------------
+
+// // DOMAINS 1) IcR -> JcR
+// // 2) R -> R
+// // 3) C -> C
+
+ // /////////////////////////////////
+
+// // --------------------
+// // --- Class Zeros. ---
+// // --------------------
+
+// // DOMAINS 1) {}->R
+// // 2) NxN -> R
+// // 3) R -> R
+// // 4) C -> R
+
+// /////////////////////////////////
+
+// // --------------------
+// // --- Class Sum. ---
+// // --------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+// // 3) RxSel -> R
+// // 4) CxSel -> R
+
+ // /////////////////////////////////
+
+// // --------------------
+// // --- Class Abs. ---
+// // --------------------
+
+// // DOMAINS 1) R -> R+
+// // 2) C -> R+
+
+// /////////////////////////////////
+
+// // ------------------------
+// // --- Class OpDotStar. ---
+// // ------------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+// // 3) RxC -> C
+// // 4) CxR -> C
+
+// /////////////////////////////////
+
+// // ------------------------
+// // --- Class OpDotHat. ---
+// // ------------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+
+// /////////////////////////////////
+
+// // ----------------------
+// // --- Class OpLogEq. ---
+// // ----------------------
+
+// // DOMAINS 1) RxR -> B
+// // 2) CxC -> B
+// // 3) GxG -> B
+
+// /////////////////////////////////
+
+// // ---------------------
+// // --- Class OpStar. ---
+// // ---------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+// // 3) RxC -> C
+// // 4) CxR -> C
+
+// /////////////////////////////////
+
+// // ---------------------
+// // --- Class OpApex. ---
+// // ---------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+
+// /////////////////////////////////
+
+// // ---------------------
+// // --- Class OpPlus. ---
+// // ---------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+// // 3) RxR -> R
+// // 4) CxC -> C
+// // 5) RxC -> C
+// // 6) CxR -> C
+// // 7) GxG -> G
+
+// /////////////////////////////////
+
+// // ----------------------
+// // --- Class OpMinus. ---
+// // ----------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+// // 3) RxR -> R
+// // 4) CxC -> C
+// // 5) RxC -> C
+// // 6) CxR -> C
+
+
+// /////////////////////////////////
+
+// // -------------------
+// // --- Class OpRc. ---
+// // -------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+
+// /////////////////////////////////
+
+// // -------------------
+// // --- Class OpCc. ---
+// // -------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) CxC -> C
+
+// /////////////////////////////////
+
+// // -------------------
+// // --- Class Find. ---
+// // -------------------
+
+// // DOMAINS 1) R -> N
+// // 2) R -> {N,N}
+// // 3) RxN -> N
+// // 4) RxN ->{N,N}
+
+// /////////////////////////////////
+
+// // ---------------------
+// // --- Class Length. ---
+// // ---------------------
+
+// // DOMAINS 1) R -> N
+// // 2) C -> N
+// // 3) G -> N
+
+// /////////////////////////////////
+
+// // -------------------
+// // --- Class Size. ---
+// // -------------------
+
+// // DOMAINS 1) R -> {N,N}
+// // 2) C -> {N,N}
+// // 3) RxSel -> {N,N}
+// // 4) CxSel -> {N,N}
+
+// /////////////////////////////////
+
+// // ---------------------
+// // --- Class Return. ---
+// // ---------------------
+// // DOMAINS 1) {} -> {}
+
+// /////////////////////////////////
+
+// // ----------------------
+// // --- Class OpColon. ---
+// // ----------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) RxRxR -> R
+
+// /////////////////////////////////
+
+// // ----------------------
+// // --- Class IsEmpty. ---
+// // ----------------------
+
+// // DOMAINS 1) R -> B
+// // 2) C -> B
+
+// /////////////////////////////////
+
+// // ----------------------
+// // --- Class Trace. ---
+// // ----------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+
+// ////////////////////////////////
+
+// // --------------------
+// // --- Class OpIns. ---
+// // --------------------
+
+// // DOMAINS 1) RxRxR -> {}
+// // 2) RxRxRxR -> {}
+// // 3) CxRxR -> {}
+// // 4) CxRxRxC -> {}
+// // 5) CxRxC -> {}
+
+// ////////////////////////////////
+
+// // --------------------
+// // --- Class OpExt. ---
+// // --------------------
+
+// // DOMAINS 1) RxR -> R
+// // 2) CxR -> C
+// // 3) CxRxR -> C
+
+// ////////////////////////////////
+
+// // -------------------
+// // --- Class Disp. ---
+// // -------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> R
+// // 3) G -> R
+
+// ////////////////////////////////
+
+// // ----------------------
+// // --- Class OpEqual. ---
+// // ----------------------
+
+// // DOMAINS 1) R -> R
+// // 2) C -> C
+// // 3) G -> G
+
+// ////////////////////////////////
+
+// // --------------------
+// // --- Class Mopen. ---
+// // --------------------
+
+// // DOMAINS 1) G -> F
+// // 2) GxG -> F
+// // 3) GxGxR -> {F,R}
+// // 4) G -> {F,R}
+// // 5) GxG -> {F,R}
+
+// ////////////////////////////////
+
+// // -------------------
+// // --- Class Mput. ---
+// // -------------------
+
+// // DOMAINS 1) RxGxF -> {}
+// // 2) RxGxF -> N
+
+// ////////////////////////////////
+
+// // -------------------
+// // --- Class Mget. ---
+// // -------------------
+
+// // DOMAINS 1) RxGxF -> N
+
+// ////////////////////////////////
+
+// // ---------------------
+// // --- Class Mclose. ---
+// // ---------------------
+
+// // DOMAINS 1) {} -> N
+// // 2) F -> N
+
+// ////////////////////////////////
+
+// // ---------------------
+// // --- Class Mseek. ---
+// // ---------------------
+
+// // DOMAINS 1) R -> {}
+// // 2) RxF -> {}
+// // 3) RxFxG -> {}
+
+// ////////////////////////////////
+
+// // ---------------------
+// // --- Class Convol. ---
+// // ---------------------
+
+// // DOMAINS 1) RxR->R
+ // 2) CxC->C
+ // 3) RxC->C
+ // 4) CxR->C
+ // 5) RxR->{R,R}
+ // 6) CxC->{C,C}
+ // 7) RxC->{C,C}
+ // 8) CxR->{C,C}
+ // 9) CxC->{C,C}
+ // 10) RxRxR->{R,R}
+ // 11) RxCxC->{C,C}
+ // and so on \85..
+
+
+// ////////////////////////////////
+
+
+// // -------------------
+// // --- Class IFFT. ---
+// // -------------------
+
+// // DOMAINS 1) R->C
+ // 2) C->C
+
+ // ////////////////////////////////
+
+// // ------------------
+// // --- Class FFT. ---
+// // ------------------
+
+// // DOMAINS 1) R->C
+ // 2) RxN->C
+ // 3) C->C
+ // 4) CxN->C
+ // 5) RxNxN->C
+ // 6) CxNxN->C
+ // 7) RxNxNxN->C
+ // 8) CxNxNxN->C
+
+// ////////////////////////////////
+
+// // -----------------------
+// // --- Class FFTShift. ---
+// // -----------------------
+
+// // DOMAINS 1) R->R
+ // 2) C->C
+ // 3) RxR->R
+ // 4) RxG->R
+ // 5) CxR->C
+ // 6) CxG->C
+
+// ////////////////////////////////
+
+// // --------------------
+// // --- Class Meanf. ---
+// // --------------------
+
+// // DOMAINS 1) R->R
+ // 2) C->C
+ // 3) CxSel->C
+ // 4) RxSel->R
+
+// ////////////////////////////////
+
+// // --------------------
+// // --- Class Frmag. ---
+// // --------------------
+
+// // DOMAINS 1) RxN->R
+ // 2) RxN->{R,R}
+ // 3) RxRxN->R
+ // 4) RxRxN->{R,R}
+
+// ////////////////////////////////
+
+// // ------------------
+// // --- Class Lev. ---
+// // ------------------
+
+// // DOMAINS 1) R->R
+ // 2) R->{R,R}
+ // 3) R->{R,R,R}
+ // 4) C->C
+ // 5) C->{C,C}
+ // 6) C->{C,C,C}
+
+// ////////////////////////////////
+
+// // --------------------------
+// // --- Class OpBackSlash. ---
+// // --------------------------
+
+// // DOMAINS 1) RxR->R
+ // 2) CxC->C
+ // 3) RxC->C
+ // 4) CxR->C
+
+// ////////////////////////////////
+
+// // -----------------------
+// // --- Class Cepstrum. ---
+// // -----------------------
+
+// // DOMAINS 1) RxR->C
+ // 2) RxC->C
+
+// ////////////////////////////////
+
+// // -----------------------
+// // --- Class Spec. ---
+// // -----------------------
+
+// // DOMAINS 1) R->R
+ // 2) C->C
+ // 3) R->{R,R}
+ // 4) C->{C,C}
+
+// ////////////////////////////////
+
+// // -------------------
+// // --- Class Part. ---
+// // -------------------
+
+// // DOMAINS 1) GxN->G
+
+// ////////////////////////////////
+
+// // -----------------------
+// // --- Class Strindex. ---
+// // -----------------------
+
+// // DOMAINS 1) GxG->N
+
+// ////////////////////////////////
+
+// // -----------------------
+// // --- Class StrSubSt. ---
+// // -----------------------
+
+// // DOMAINS 1) GxGxG->G
+
+// ////////////////////////////////
+
+
+// ////////////////////////////////
+// ////////////////////////////////
+// // fine parte introdotta alberto
+// ////////////////////////////////
+// ////////////////////////////////
+
+// //RNU se puoi sistema meglio la parte introdotta da al.
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.sci b/2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.sci new file mode 100644 index 00000000..4f83814d --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_GenAnnFLFunctions.sci @@ -0,0 +1,28 @@ +function INIT_GenAnnFLFunctions(FunctionName,FunctionsOutDir,ClassName,ReportFile,ExtensionCAnnFun) +// function INIT_GenAnnFLFunctions(FunctionName,FunctionsOutDir,ClassName,ReportFile,ExtensionCAnnFun) +// -----------------------------------------------------------------
+// Generates annotation or file list files.
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 17-Jun-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),5,5);
+ +FunctionExtension = ExtensionCAnnFun; +FunctionFileName = fullfile(FunctionsOutDir,FunctionName+FunctionExtension); +PrintStringInfo('CLASS: '+ClassName,FunctionFileName,'file','y'); +
+endfunction diff --git a/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci new file mode 100644 index 00000000..21fe7a72 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_GenFileInfo.sci @@ -0,0 +1,117 @@ +function FileInfo = INIT_GenFileInfo(WorkingDir,OutCCCodeDir,UserSciFilesPaths)
+// function FileInfo = INIT_GenFileInfo(WorkingDir,OutCCCodeDir,UserSciFilesPaths)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function creates and initializes FileInfo structure.
+//
+// Input data:
+// WorkingDir: see description in the SCI2CInputParameters.sce file.
+// OutCCCodeDir: see description in the SCI2CInputParameters.sce file.
+// UserSciFilesPaths: see description in the SCI2CInputParameters.sce file.
+//
+// Output data:
+// FileInfo: structure containing all info about SCI2C files.
+//
+// #RNU_RES_E
+// Status:
+// 03-Jan-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),3,3);
+
+
+// -------------------------
+// --- Main directories. ---
+// -------------------------
+FileInfo.SCI2CMainDir = pwd();
+FileInfo.WorkingDir = WorkingDir;
+FileInfo.OutCCCodeDir = OutCCCodeDir;
+FileInfo.UserSciFilesPaths = UserSciFilesPaths;
+
+// -------------------
+// --- .dat Files. ---
+// -------------------
+FileInfo.FileInfoDatFile = fullfile(FileInfo.WorkingDir,'FileInfo.dat');
+FileInfo.SharedInfoDatFile = fullfile(FileInfo.WorkingDir,'SharedInfo.dat');
+FileInfo.GlobalVarFileName = fullfile(FileInfo.WorkingDir,'GBLVAR.dat');
+FileInfo.ASTStackDataFile = fullfile(FileInfo.WorkingDir,'ASTStack.dat');
+
+// ----------------------
+// --- SCI2C Library. ---
+// ----------------------
+FileInfo.SCI2CLibDir = fullfile(FileInfo.WorkingDir,'SCI2CLib');
+
+FileInfo.SCI2CLibSCIAnnDir = fullfile(FileInfo.SCI2CLibDir,'SCIAnnotations');
+FileInfo.SCI2CLibSCIAnnFun = fullfile(FileInfo.SCI2CLibSCIAnnDir,'Functions');
+FileInfo.SCI2CLibSCIAnnCls = fullfile(FileInfo.SCI2CLibSCIAnnDir,'Classes');
+
+FileInfo.SCI2CLibSCIFunListDir = fullfile(FileInfo.SCI2CLibDir,'SCIFunctionList');
+FileInfo.SCI2CLibSCIFLFun = fullfile(FileInfo.SCI2CLibSCIFunListDir,'Functions');
+FileInfo.SCI2CLibSCIFLCls = fullfile(FileInfo.SCI2CLibSCIFunListDir,'Classes');
+
+FileInfo.SCI2CLibCAnnDir = fullfile(FileInfo.SCI2CLibDir,'CAnnotations');
+FileInfo.SCI2CLibCAnnFun = fullfile(FileInfo.SCI2CLibCAnnDir,'Functions');
+FileInfo.SCI2CLibCAnnCls = fullfile(FileInfo.SCI2CLibCAnnDir,'Classes');
+
+FileInfo.SCI2CLibCFunListDir = fullfile(FileInfo.SCI2CLibDir,'CFunctionList');
+FileInfo.SCI2CLibCFLFun = fullfile(FileInfo.SCI2CLibCFunListDir,'Functions');
+FileInfo.SCI2CLibCFLCls = fullfile(FileInfo.SCI2CLibCFunListDir,'Classes');
+
+
+// -----------------------
+// --- USER2C Library. ---
+// -----------------------
+FileInfo.USER2CLibDir = fullfile(FileInfo.WorkingDir,'USER2CLib');
+
+FileInfo.USER2CLibSCIAnnDir = fullfile(FileInfo.USER2CLibDir,'SCIAnnotations');
+FileInfo.USER2CLibSCIAnnFun = fullfile(FileInfo.USER2CLibSCIAnnDir,'Functions');
+FileInfo.USER2CLibSCIAnnCls = fullfile(FileInfo.USER2CLibSCIAnnDir,'Classes');
+
+FileInfo.USER2CLibSCIFunListDir = fullfile(FileInfo.USER2CLibDir,'SCIFunctionList');
+FileInfo.USER2CLibSCIFLFun = fullfile(FileInfo.USER2CLibSCIFunListDir,'Functions');
+FileInfo.USER2CLibSCIFLCls = fullfile(FileInfo.USER2CLibSCIFunListDir,'Classes');
+
+FileInfo.USER2CLibCAnnDir = fullfile(FileInfo.USER2CLibDir,'CAnnotations');
+FileInfo.USER2CLibCAnnFun = fullfile(FileInfo.USER2CLibCAnnDir,'Functions');
+FileInfo.USER2CLibCAnnCls = fullfile(FileInfo.USER2CLibCAnnDir,'Classes');
+
+FileInfo.USER2CLibCFunListDir = fullfile(FileInfo.USER2CLibDir,'CFunctionList');
+FileInfo.USER2CLibCFLFun = fullfile(FileInfo.USER2CLibCFunListDir,'Functions');
+FileInfo.USER2CLibCFLCls = fullfile(FileInfo.USER2CLibCFunListDir,'Classes');
+
+// ----------------------
+// --- Function List. ---
+// ----------------------
+FileInfo.FunctionList.MainDir = fullfile(FileInfo.WorkingDir,'FunctionList');
+FileInfo.FunctionList.SCI2CAvailableCDat = fullfile(FileInfo.FunctionList.MainDir,'SCI2CAvailableC.dat');
+FileInfo.FunctionList.USER2CAvailableCDat = fullfile(FileInfo.FunctionList.MainDir,'USER2CAvailableC.dat');
+FileInfo.FunctionList.ConvertedDat = fullfile(FileInfo.FunctionList.MainDir,'Converted.dat');
+FileInfo.FunctionList.ToBeConvertedDat = fullfile(FileInfo.FunctionList.MainDir,'ToBeConverted.dat');
+FileInfo.FunctionList.FunInfoDatDir = fullfile(FileInfo.FunctionList.MainDir,'FunInfoDatFiles');
+
+// --------------------
+// --- Other Files. ---
+// --------------------
+FileInfo.GeneralReport = fullfile(FileInfo.WorkingDir,'SCI2CGeneralReport.txt');
+
+// -----------------------------------
+// --- C-Style paths and Makefile. ---
+// -----------------------------------
+//-- FileInfo.CStyleSCI2CMainDir = ConvertPathMat2C(FileInfo.SCI2CMainDir,SharedInfo.CCompilerPathStyle);
+//-- FileInfo.CStyleOutCCCodeDir = ConvertPathMat2C(OutCCCodeDir,SharedInfo.CCompilerPathStyle);
+FileInfo.CStyleSCI2CMainDir = pathconvert(FileInfo.SCI2CMainDir, %f, %f, 'u');
+FileInfo.CStyleOutCCCodeDir = pathconvert(OutCCCodeDir, %f, %f, 'u');
+FileInfo.MakefileFilename = fullfile(FileInfo.CStyleOutCCCodeDir,'Makefile');
+
+//-------------------------
+//----Hardware related-----
+//-------------------------
+FileInfo.PeripheralInitListFile = fullfile(FileInfo.WorkingDir,'PeripheralInit.dat');
+FileInfo.SetupListFile = fullfile(FileInfo.WorkingDir,'SetupList.dat');
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenLibraries.sci b/2.3-1/macros/ToolInitialization/INIT_GenLibraries.sci new file mode 100644 index 00000000..eb2c01b7 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_GenLibraries.sci @@ -0,0 +1,61 @@ +function INIT_GenLibraries(FileInfoDatFile)
+// function INIT_GenLibraries(FileInfoDatFile)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function initializes the SCI2C and USER libraries.
+// For each Scilab function a .ann file is created where the function
+// annotations are listed into it.
+// #RNU_RES_E
+//
+// Input data:
+// FileInfoDatFile: name of the .dat file containing the FileInfo structure.
+//
+// Output data:
+// ---
+//
+// Status:
+// 12-Jun-2007 -- Nutricato Raffaele: Author.
+// 03-Jan-2008 -- Nutricato Raffaele: Changed directory structure.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+// --- Load File Info Structure. ---
+clear FileInfo
+load(FileInfoDatFile,'FileInfo');
+
+// --- Load Shared Info Structure. ---
+clear SharedInfo
+load(FileInfo.SharedInfoDatFile,'SharedInfo');
+
+PrintStepInfo('Initialize SCI2C and USER2C Libraries.',...
+ FileInfo.GeneralReport,'both');
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// -----------------------------------------------------------
+// --- Fills SCI2C and USER2C libs with appropriate files. ---
+// -----------------------------------------------------------
+INIT_FillSCI2LibCDirs(FileInfo,SharedInfo.Extension);
+
+// #RNU_RES_B
+//NUT the following functions will be useful in next release
+//NUT for advanced use of SCI2C
+//INIT_FillSCI2LibSCIDirs(FileInfo,SharedInfo.Extension);
+//INIT_FillUSER2LibCDirs(FileInfo,SharedInfo.Extension);
+//INIT_FillUSER2LibSCIDirs(FileInfo,SharedInfo.Extension);
+// ---------------------------------------------------------------
+// --- End Fills SCI2C and USER2C libs with appropriate files. ---
+// ---------------------------------------------------------------
+// #RNU_RES_E
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci new file mode 100644 index 00000000..3c682bf8 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci @@ -0,0 +1,137 @@ +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)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function creates and initializes SharedInfo structure.
+//
+// Input data:
+// WorkingDir: see description in the SCI2CInputParameters.sce file.
+// OutCCCodeDir: see description in the SCI2CInputParameters.sce file.
+// UserSciFilesPaths: see description in the SCI2CInputParameters.sce file.
+// RunMode: see description in the SCI2CInputParameters.sce file.
+// UserScilabMainFile: see description in the SCI2CInputParameters.sce file.
+// TotTempScalarVars: see description in the SCI2CInputParameters.sce file.
+// EnableTempVarsReuse: see description in the SCI2CInputParameters.sce file.
+//
+// Output data:
+// SharedInfo: structure containing all info about general parameters
+// used by SCI2C.
+//
+// #RNU_RES_E
+// Status:
+// 03-Jan-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+
+//-- SCI2CNInArgCheck(argn(2),8,8);
+
+
+// ------------------------------
+// --- Initialize SharedInfo. ---
+// ------------------------------
+//-- SharedInfo.CCompilerPathStyle = CCompilerPathStyle;
+SharedInfo.RunMode = RunMode;
+SharedInfo.Sci2CLibMainHeaderFName = pathconvert(Sci2CLibMainHeaderFName, %f, %f, 'u');
+
+// #RNU_RES_B
+// File names of the next .sci files to be converted in AST and
+// successively into C.
+// #RNU_RES_E
+SharedInfo.NextSCIFileName = UserScilabMainFile;
+[scipath,funname,sciext] = fileparts(UserScilabMainFile);
+SharedInfo.SCIMainFunName = funname;
+if (Target == 'Arduino')
+ SharedInfo.CMainFunName = 'loop_arduino';
+elseif (RunMode == 'Translate')
+ SharedInfo.CMainFunName = funname;
+else
+ SharedInfo.CMainFunName = 'main';
+end
+SharedInfo.NextSCIFunName = SharedInfo.SCIMainFunName; //NUT: per ora no so cosa metter
+SharedInfo.NextCFunName = SharedInfo.CMainFunName; //NUT: per ora no so cosa metter //NUT: questo viene aggiornato dalla C_Funcall
+SharedInfo.NextSCIFunNumber = 1;
+SharedInfo.NFilesToTranslate = 1;
+
+
+// --- Annotations. ---
+SharedInfo.Annotations.GBLVAR = 'global';
+SharedInfo.Annotations.DataPrec = {'uint8','int8','uint16','int16','int','float','double','IplImage'};
+SharedInfo.Annotations.FUNNIN = 'NIN=';
+SharedInfo.Annotations.FUNNOUT = 'NOUT=';
+SharedInfo.Annotations.FUNTYPE = '''OUT(''+string(SCI2C_nout)+'').TP='''; // Type includes also precision.
+SharedInfo.Annotations.FUNSIZE = '''OUT(''+string(SCI2C_nout)+'').SZ(''+string(SCI2C_nelem)+'')= ''';
+SharedInfo.Annotations.FUNCLASS = 'CLASS: ';
+SharedInfo.Annotations.USERFUN = '//SCI2C: ';
+SharedInfo.Annotations.INTYPE = '''IN(''+string(SCI2C_nout)+'').TP='''; // Type includes also precision.
+SharedInfo.Annotations.INSIZE = '''IN(''+string(SCI2C_nout)+'').SZ(''+string(SCI2C_nelem)+'')= ''';
+
+
+// #RNU_RES_B
+// Note when you execute the following code:
+ // SCI2C_nout=1;
+ // SCI2C_nelem=0;
+ // eval(SharedInfo.Annotations.FUNSIZE)
+ // you get:
+ // O1SIZE[0] =
+
+// Info related to temp variables used in the C code.
+// #RNU_RES_E
+SharedInfo.TotTempScalarVars = TotTempScalarVars;
+SharedInfo.UsedTempScalarVars = 0;
+SharedInfo.TempScalarVarsName = '__Scalar';
+//NUT: verificare se le seguenti due variabili sono utili. Le sto usando in AST2Ccode
+SharedInfo.WorkAreaUsedBytes = WorkAreaSizeBytes;
+SharedInfo.UsedTempScalarVars = WorkAreaSizeBytes;
+// Info related to temp variables used in the AST reading phase.
+SharedInfo.ASTReader.fidAST = -1;
+SharedInfo.ASTReader.UsedTempVars = 0;
+SharedInfo.ASTReader.TempVarsName = '__temp';
+SharedInfo.ASTReader.TempForCntVarsName = '__tmpcnt';
+SharedInfo.ASTReader.TempForValVarsName = '__TmpVal';
+SharedInfo.ASTReader.TempWhileCntVarsName = '__tmpWhilecnt';//NUT: vedi se serve.
+SharedInfo.ASTReader.TempWhileValVarsName = '__TmpWhileVal'; //NUT: vedi se serve
+SharedInfo.ASTReader.EnableTempVarsReuse = EnableTempVarsReuse; //NUT: non so se la devo rimuovere.
+SharedInfo.ASTReader.ReusableTempVars = [];//NUT: to be removed
+
+SharedInfo.NIndent = 0; // Indentation Level.
+SharedInfo.SkipNextEqual = 0; // 1 = the next equal in the AST will not produce C code.
+SharedInfo.SkipNextPrec = 0; // 1 = the next precision specifier in the AST will not produce C code.
+SharedInfo.SkipNextFun = 0;
+SharedInfo.CopySciCodeIntoCCode = CopySciCodeIntoCCode;
+SharedInfo.CountNestedIf = 0; // Number of nested if.
+
+SharedInfo.CFunId.OpColon = 3;
+SharedInfo.CFunId.EqScalar = 4;
+SharedInfo.CFunId.EqMatrix = 5;
+SharedInfo.CFunId.GenFunMtx = 6; // (scalar functions are fall in the scalar equal category.)
+
+SharedInfo = INIT_SharedInfoEqual(SharedInfo);
+// ------------------------
+// --- File Extensions. ---
+// ------------------------
+SharedInfo.Extension.AnnotationFunctions = '.ann'; // Stands for annotation
+SharedInfo.Extension.AnnotationClasses = '.acls'; // Stands for annotation class.
+SharedInfo.Extension.FuncListFunctions = '.lst'; // Stands for list
+SharedInfo.Extension.FuncListClasses = '.lcls'; // Stands for list class
+
+// ------------------------
+// --- Resize Approach. ---
+// ------------------------
+SharedInfo.ResizeApproach = 'NO_RESIZE'; // 'NO_RESIZE', 'RESIZE_ALL', 'RESIZE_TEMP', 'RESIZE_LOCAL', 'RESIZE_GLOBAL', 'REALLOC_ALL_RESIZE_ALL'
+
+SharedInfo.Target = Target; // Specifies code generation target.
+
+SharedInfo.Includelist = list(); //Maintains list of functions being used in code
+ // 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_LoadLibraries.sci b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci new file mode 100644 index 00000000..28eb34f5 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_LoadLibraries.sci @@ -0,0 +1,64 @@ +function INIT_LoadLibraries(FileInfoDatFile)
+// function INIT_LoadLibraries(FileInfoDatFile)
+// -----------------------------------------------------------------
+// This function loads the SCI2C and USER libraries.
+//
+// Input data:
+// FileInfoDatFile: name of the .dat file containing the FileInfo structure.
+//
+// Output data:
+// ---
+//
+// Status:
+// 12-Jun-2007 -- Raffaele Nutricato: Author.
+// 03-Jan-2008 -- Raffaele Nutricato: Changed directory structure.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+// --- Load File Info Structure. ---
+clear FileInfo
+load(FileInfoDatFile,'FileInfo');
+
+// --- Load Shared Info Structure. ---
+clear SharedInfo
+load(FileInfo.SharedInfoDatFile,'SharedInfo');
+PrintStepInfo('Load SCI2C and USER2C Libraries.',FileInfo.GeneralReport,'both');
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+// ----------------------------------
+// --- Initialize Function Lists. ---
+// ----------------------------------
+SCI2CAvailableC = [];
+USER2CAvailableC = [];
+Converted = [];
+ToBeConverted(1).SCIFunctionName = SharedInfo.NextSCIFunName;
+ToBeConverted(1).CFunctionName = SharedInfo.NextCFunName;
+
+// --- Read the list of library functions available. ---
+[SCI2CAvailableC,SCI2CNElem] = FL_ExtractFuncList(FileInfo.SCI2CLibCFLFun,FileInfo.SCI2CLibCFLCls,...
+ SharedInfo.Annotations.FUNCLASS,SharedInfo.Extension.FuncListClasses,FileInfo.GeneralReport);
+//disp (SCI2CAvailable);
+[USER2CAvailableC,USER2CNElem] = FL_ExtractFuncList(FileInfo.USER2CLibCFLFun,FileInfo.USER2CLibCFLCls,...
+ SharedInfo.Annotations.FUNCLASS,SharedInfo.Extension.FuncListClasses,FileInfo.GeneralReport);
+
+// --- Save .dat files. ---
+Available = SCI2CAvailableC;
+save(FileInfo.FunctionList.SCI2CAvailableCDat, "Available");
+Available = USER2CAvailableC;
+save(FileInfo.FunctionList.USER2CAvailableCDat, "Available");
+save(FileInfo.FunctionList.ConvertedDat, "Converted");
+save(FileInfo.FunctionList.ToBeConvertedDat, "ToBeConverted");
+
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_RemoveDirs.sci b/2.3-1/macros/ToolInitialization/INIT_RemoveDirs.sci new file mode 100644 index 00000000..4d72ab78 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_RemoveDirs.sci @@ -0,0 +1,74 @@ +function INIT_RemoveDirs(FileInfo,SharedInfoRunMode)
+// function INIT_RemoveDirs(FileInfo,SharedInfoRunMode)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// Removes existing directories according to the RunMode
+// specified by the user.
+//
+// Input data:
+// FileInfo: structure containing all info about SCI2C files.
+// SharedInfoRunMode: execution mode specified by the user in
+// the SCI2CInputParameters.sce file.
+//
+// Output data:
+// ---
+//
+// #RNU_RES_E
+// Status:
+// 03-Jan-2008 -- Raffaele Nutricato: Author.
+//
+// Copyright 2008 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),2,2);
+
+// ----------------------------------------------------
+// --- Remove previous versions of SCI2C files/dir. ---
+// ----------------------------------------------------
+if (SharedInfoRunMode == 'GenLibraryStructure' | SharedInfoRunMode == 'All')
+ disp('Removing directory: '+FileInfo.WorkingDir);
+ disp('Removing directory: '+FileInfo.OutCCCodeDir);
+ // Remove software<->user interaction.
+ // yesno=input('Are you sure [y/n]?','string');
+ yesno = 'y';
+
+ if (yesno=='y')
+ rmdir(FileInfo.WorkingDir,'s'); // delete WorkingDir if it exists due to previous translations...
+ mdelete(FileInfo.OutCCCodeDir+'/*.h'); // delete .h files generated in previous translations (if any).
+ mdelete(FileInfo.OutCCCodeDir+'/*.c'); // delete .c files generated in previous translations (if any).
+ mdelete(FileInfo.OutCCCodeDir+'/*.cpp'); // delete .cpp files generated in previous translations (if any).
+ mdelete(FileInfo.OutCCCodeDir+'/Makefile'); // delete .h files generated in previous translations (if any).
+ // Note I don't delete includes, interfaces and and src directories to avoid recompiling them every time
+ // a new translation is launched. I only delete source files generated by user.
+
+ else
+ SCI2Cerror('Cannot continue, because you don''t want to delete: '+FileInfo.WorkingDir);
+ SCI2Cerror('Cannot continue, because you don''t want to delete: '+FileInfo.OutCCCodeDir);
+ end
+elseif (SharedInfoRunMode == 'Translate')
+ // #RNU_RES_B
+ //NUT: non cancella le cartelle dei file C creati nella iterazione precedente
+ //NUT: occorre specificarlo bene nel manuale.
+ // #RNU_RES_E
+ disp('Removing directory: '+FileInfo.OutCCCodeDir);
+ // Remove software<->user interaction.
+ // yesno=input('Are you sure [y/n]?','string');
+ yesno = 'y';
+ if (yesno=='y')
+ rmdir(FileInfo.OutCCCodeDir,'s');
+ else
+ SCI2Cerror('Cannot continue, because you don''t want to delete: '+FileInfo.OutCCCodeDir);
+ end
+elseif (SharedInfoRunMode == 'FunCall')
+ //Do nothing
+else
+ disp('Unknown RunMode: ""'+SharedInfoRunMode+'"".');
+ disp('Please check RunMode parameter in the SCI2CInputParameters.sce file');
+ SCI2Cerror(' ');
+end
+
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci new file mode 100644 index 00000000..b6da9bd1 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci @@ -0,0 +1,164 @@ +function [FileInfoDatFile,SharedInfoDatFile] = ...
+ INIT_SCI2C(UserScilabMainFile, UserSciFilesPaths, SCI2COutputDir, RunMode,Target,Board_name)
+// function [FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(SCI2CInputPrmFile)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function initializes the SCI2C tool according
+// to the input parameters recorded in the SCI2CParameters.
+// All info will be stored into FileInfoDatFile.
+//
+// Input data:
+// SCI2CInputPrmFile: name of the .sce file containing input parameters.
+//
+// Output data:
+// FileInfoDatFile: name of the .dat file containing the FileInfo structure.
+// SharedInfoDatFile: it is a buffer containing parameters that are exchanged by the
+// functions of the SCI2C tool.
+// #RNU_RES_E
+// Status:
+// 13-Apr-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// #RNU_RES_B
+//NUT: questo file e' da rivedere quando il tool funzionera al 50%
+// #RNU_RES_E
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+//SCI2CNInArgCheck(argn(2),1,1);
+
+// ------------------------------
+// --- Read Input Parameters. ---
+// ------------------------------
+//exec(SCI2CInputPrmFile);
+// #RNU_RES_B
+//NUT: queste variabili sono per usi futuri.
+//NUT: e saranno introdotti nel parameter file.
+// #RNU_RES_E
+WorkAreaSizeBytes = 2000*8; // 2000 locations of double
+// #RNU_RES_B
+// Maximum number of temporary scalar variables that can be used.
+// #RNU_RES_E
+TotTempScalarVars = 20;
+EnableTempVarsReuse = 0; // 0 = Disable; 1 = Enable.
+
+
+// #RNU_RES_B
+//NUT: I prefer to don't show this parameters to the user.
+// --- Directory where all the products of the SCI2C tool will be stored. ---
+// #RNU_RES_E
+//-- [SCI2CResultDir,tmpfile,tmpext] = fileparts(SCI2CInputPrmFile);
+SCI2CResultDir = SCI2COutputDir;
+
+
+WorkingDir = fullfile(SCI2CResultDir,'SCI2CTmpResultsReports');
+// #RNU_RES_B
+// --- Directory where the generated C code will be stored. ---
+// #RNU_RES_E
+OutCCCodeDir = SCI2CResultDir;
+
+// ------------------------------
+// --- Initialize SharedInfo. ---
+// ------------------------------
+//SharedInfo = INIT_GenSharedInfo(WorkingDir,OutCCCodeDir,UserSciFilesPaths,...
+// RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName);
+
+//-- FIXME : MainLibHeader and Verbose mode are (?) configurable
+SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile, ...
+ TotTempScalarVars,EnableTempVarsReuse,"sci2clib.h", %t,Target,Board_name);
+
+// ----------------------------
+// --- Initialize FileInfo. ---
+// ----------------------------
+FileInfo = INIT_GenFileInfo(WorkingDir,OutCCCodeDir,UserSciFilesPaths);
+
+
+PrintStepInfo('SCI2C hArtes/POLIBA Tool!!!',FileInfo.GeneralReport,'stdout');
+
+// ----------------------------------------------------
+// --- Remove previous versions of SCI2C files/dir. ---
+// ----------------------------------------------------
+INIT_RemoveDirs(FileInfo,SharedInfo.RunMode);
+
+// ---------------------------
+// --- Create Directories. ---
+// ---------------------------
+INIT_CreateDirs(FileInfo);
+PrintStepInfo('SCI2C hArtes/POLIBA Tool!!!',FileInfo.GeneralReport,'file');
+
+// ------------------------------
+// --- Initialize GlobalVars. ---
+// ------------------------------
+GlobalVars = [];
+save(FileInfo.GlobalVarFileName, "GlobalVars");
+
+// ----------------------------------
+// --- Initialize Main .dat file. ---
+// ----------------------------------
+//NUT: qui va sistemata.
+clear FunInfo
+//NUT: qua conviene fare una unica funzione.
+FunInfo.SCIFunctionName = SharedInfo.NextSCIFunName;
+FunInfo.CFunctionName = SharedInfo.NextCFunName;
+FunInfo.FunPrecSpecifier = ''; //NUT: si riferiscono al main verifica se sono corrette
+FunInfo.FunTypeAnnot = ''; //NUT: si riferiscono al main verifica se sono corrette
+FunInfo.FunSizeAnnot = ''; //NUT: si riferiscono al main verifica se sono corrette
+FunInfo.NInArg = 0;//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.InArg(1).Name = '';//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.InArg(1).Type = '';//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.InArg(1).Value = %nan;//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.InArg(1).Size(1) = '';//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.InArg(1).Dimension = '';//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.InArg(2).Size(2) = '';//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.NOutArg = 0;//NUT: si riferiscono al main verifica se sono corrette
+FunInfo.OutArg(1).Name = '';
+FunInfo.OutArg(1).Type = '';
+FunInfo.OutArg(1).Size(1) = '';
+FunInfo.OutArg(1).Size(2) = '';
+FunInfo.OutArg(1).Dimension = '';
+FunInfo.PosFirstOutScalar = 0;
+FunInfo.LibTypeInfo = 'USER2C';
+save(fullfile(FileInfo.FunctionList.FunInfoDatDir,FunInfo.CFunctionName+'.dat'), "FunInfo");
+clear FunInfo
+
+// -------------------------------------
+// --- Initialize ASTStack.dat file. ---
+// -------------------------------------
+//NUT: questa struttura deve sostituire le variabili global usate per lo stack
+clear ASTStack
+ASTStack.SCI2CSTACK = 'EMPTYSTACK';
+ASTStack.StackPosition = 1;
+ASTStack.STACKDEDUG = 0;
+save(FileInfo.ASTStackDataFile, "ASTStack");
+clear ASTStack
+
+// ---------------------------------------------
+// --- Generate new versions of SCI2C files. ---
+// ---------------------------------------------
+save(FileInfo.FileInfoDatFile, "FileInfo");
+save(FileInfo.SharedInfoDatFile, "SharedInfo");
+FileInfoDatFile = FileInfo.FileInfoDatFile;
+SharedInfoDatFile = FileInfo.SharedInfoDatFile;
+
+global anscounter; //NUT: just to fix problem with ans variables.
+anscounter = 0;
+
+//--------------------------------------------
+//---Hardware related initialisation----------
+//--------------------------------------------
+if (Target == 'AVR')
+ PeripheralList = list();
+ save(FileInfo.PeripheralInitListFile, 'PeripheralList');
+elseif (Target == 'Arduino')
+ SetupList = list();
+ save(FileInfo.SetupListFile, 'SetupList');
+end
+
+endfunction
+// #RNU_RES_B
+//NUT: quando genero il c della funzione utente devo anche generare il corrispondente file delle includes.
+//NUT: perche' la main non la devo annotare, secondo me occorre annotarla.?
+// #RNU_RES_E
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2CLoader.sce b/2.3-1/macros/ToolInitialization/INIT_SCI2CLoader.sce new file mode 100644 index 00000000..bd07f892 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_SCI2CLoader.sce @@ -0,0 +1,72 @@ +// -----------------------------------------------------------------
+// Load SCI2C directories and files.
+//
+// Input data:
+// SCI2CLoaderMainDir: path of the directory where this script (main.sce) is stored.
+//
+// Output data:
+// ---
+//
+// Status:
+// 11-Apr-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+SCI2CLoaderMainDir = '..';
+
+// ---------------------------
+// --- Define Directories. ---
+// ---------------------------
+// Directory containing functions related to the management of the Abstract Syntactic tree.
+ASTManagement = 'ASTManagement';
+
+// Directory containing functions that produce the C code.
+CCodeGeneration = 'CCodeGeneration';
+
+// Directory containing functions that perform general tasks.
+GeneralFunctions = 'GeneralFunctions';
+
+// Directory containing functions that perform the initialization of the SCI2C tool.
+ToolInitialization = 'ToolInitialization';
+
+// Directory containing functions that perform the function annotation.
+FunctionAnnotation = 'FunctionAnnotation';
+
+// Directory containing functions that handle symbol table.
+SymbolTable = 'SymbolTable';
+
+// Directory containing functions that handle function lists.
+FunctionList = 'FunctionList';
+
+// Directory containing functions that print SCI2C error messages.
+ErrorMessages = 'ErrorMessages';
+
+
+// -------------------------------
+// --- End Define Directories. ---
+// -------------------------------
+
+// -------------
+// --- getd. ---
+// -------------
+getd(fullfile(SCI2CLoaderMainDir,ASTManagement));
+getd(fullfile(SCI2CLoaderMainDir,CCodeGeneration));
+getd(fullfile(SCI2CLoaderMainDir,GeneralFunctions));
+getd(fullfile(SCI2CLoaderMainDir,ToolInitialization));
+getd(fullfile(SCI2CLoaderMainDir,FunctionAnnotation));
+getd(fullfile(SCI2CLoaderMainDir,SymbolTable));
+getd(fullfile(SCI2CLoaderMainDir,FunctionList));
+getd(fullfile(SCI2CLoaderMainDir,ErrorMessages));
+// -----------------
+// --- End getd. ---
+// -----------------
+
+// -------------
+// --- exec. ---
+// -------------
+exec(fullfile(SCI2CLoaderMainDir,ASTManagement,'%program_p.sci'));
+// -----------------
+// --- End exec. ---
+// -----------------
diff --git a/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.sci b/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.sci new file mode 100644 index 00000000..690a43f6 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/INIT_SharedInfoEqual.sci @@ -0,0 +1,43 @@ +function SharedInfo = INIT_SharedInfoEqual(SharedInfo)
+// function SharedInfo = INIT_SharedInfoEqual(SharedInfo)
+// -----------------------------------------------------------------
+// #RNU_RES_B
+// This function initializes the SCI2C tool according
+// to the input parameters recorded in the SCI2CParameters.
+// All info will be stored into FileInfoDatFile.
+//
+// Input data:
+// SCI2CInputPrmFile: name of the .sce file containing input parameters.
+//
+// Output data:
+// FileInfoDatFile: name of the .dat file containing the FileInfo structure.
+// SharedInfoDatFile: it is a buffer containing parameters that are exchanged by the
+// functions of the SCI2C tool.
+// #RNU_RES_E
+// Status:
+// 13-Apr-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// #RNU_RES_B
+//NUT: verifica se le variabili sotto elencate ti servono davvero.
+//NUT: Sarebbe interessante accorpare tutte le variabili usate per la equal sotto un'unica struttura
+//NUT: per esempio SharedInfo.SkipNextEqual
+// #RNU_RES_E
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+SharedInfo.Equal.Enabled = 0; // 1 means enabled -> we are inside an equal AST block.
+SharedInfo.Equal.NInArg = 0;
+SharedInfo.Equal.InArg(1).Name = '';
+SharedInfo.Equal.NOutArg = 0;
+SharedInfo.Equal.OutArg(1).Name = '';
+SharedInfo.Equal.Lhs = 0;
+SharedInfo.Equal.Nins = 0; // Counts the number of ins found in the lhs of the Equal.
+
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/ManageNextConversion.sci b/2.3-1/macros/ToolInitialization/ManageNextConversion.sci new file mode 100644 index 00000000..a1524766 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/ManageNextConversion.sci @@ -0,0 +1,87 @@ +function FlagContinueTranslation = ManageNextConversion(FileInfoDatFile)
+// function FlagContinueTranslation = ManageNextConversion(FileInfoDatFile)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+//NUT: verifica se update e managenexconversion possono essere integrate in un'unica funzione.
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// ---------------------
+// --- Load section. ---
+// ---------------------
+// --- Load File Info Structure. ---
+load(FileInfoDatFile,'FileInfo');
+
+// --- Load Shared Info Structure. ---
+load(FileInfo.SharedInfoDatFile,'SharedInfo');
+
+// --- Load ToBeConverted .dat file. ---
+load(FileInfo.FunctionList.ToBeConvertedDat,'ToBeConverted');
+// -------------------------
+// --- End load section. ---
+// -------------------------
+
+FlagContinueTranslation = 0;
+
+// ------------------------------------
+// --- Finalize the current C code. ---
+// ------------------------------------
+C_FinalizeCode(FileInfo,SharedInfo);
+
+// ------------------------------------------------
+// --- Identify the next function to translate. ---
+// ------------------------------------------------
+SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate - 1;
+
+if (SharedInfo.NFilesToTranslate >= 1)
+ // Remove the translated C function from the ToBeConverted list
+ ToBeConverted(1) = [];
+ FlagContinueTranslation = 1;
+ SharedInfo.NextSCIFunName = ToBeConverted(1).SCIFunctionName;
+ SharedInfo.NextCFunName = ToBeConverted(1).CFunctionName;
+ SharedInfo.NextSCIFunNumber = SharedInfo.NextSCIFunNumber + 1;
+ [FlagFound,SharedInfo.NextSCIFileName] = ...
+ SCI2CFindFile(FileInfo.UserSciFilesPaths,SharedInfo.NextSCIFunName+'.sci');
+ if (FlagFound == 0)
+ error(9999, 'Cannot find a scilab file to generate ""'+SharedInfo.NextCFunName+'"".');
+ end
+end
+// ----------------------------------------------------
+// --- End Identify the next function to translate. ---
+// ----------------------------------------------------
+
+
+// ---------------------
+// --- Save section. ---
+// ---------------------
+// --- Save Shared Info Structure. ---
+save(FileInfo.SharedInfoDatFile, "SharedInfo");
+clear SharedInfo
+
+// --- Save ToBeConverted .dat file. ---
+save(FileInfo.FunctionList.ToBeConvertedDat, "ToBeConverted");
+clear ToBeConverted
+
+clear FileInfo
+// -------------------------
+// --- End Save section. ---
+// -------------------------
+
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/SCI2CInputParameters.sce b/2.3-1/macros/ToolInitialization/SCI2CInputParameters.sce new file mode 100644 index 00000000..7af3343c --- /dev/null +++ b/2.3-1/macros/ToolInitialization/SCI2CInputParameters.sce @@ -0,0 +1,87 @@ +// -----------------------------------------------------------------
+// === hArtes/PoliBa/GAP SCI2C tool ===
+// === Authors: ===
+// === Raffaele Nutricato ===
+// === raffaele.nutricato@tiscali.it ===
+// === Alberto Morea ===
+// === ===
+// === *************** ===
+// === USER PARAMETERS ===
+// === *************** ===
+// === ===
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+
+// ------------------------------------------
+// --- Specify Paths of User Scilab code. ---
+// ------------------------------------------
+UserSciCodeMainDir = 'C:\SCI2CTests\RegressionTests\test999';
+
+// --- Path + filename of the .sci main file of the code to be translated. ---
+// It is the entry point.
+UserScilabMainFile = fullfile(UserSciCodeMainDir,'scilabcode\mainfun.sci');
+
+// --- List of the paths containing the .sci files written by the user. ---
+UserSciFilesPaths = ...
+ [...
+ fullfile(UserSciCodeMainDir,'scilabcode');...
+ ];
+
+// --------------------------
+// --- End Specify paths. ---
+// --------------------------
+
+
+// ----------------------------
+// --- Select the run mode. ---
+// ----------------------------
+//RunMode = 'GenLibraryStructure';
+//RunMode = 'Translate';
+RunMode = 'All';
+
+// --- Select one of the following options. ---
+
+// 'GenLibraryStructure';
+// Generates the library structure and exits. It is very
+// useful when the user wants to manually change the files stored in that structure
+// before running the translation. 'GenLibraryStructure' option forces SCI2C to remove
+// the already existing WorkingDir and OutCCCodeDir directories.
+
+// 'Translate';
+// Performs the translation without generating the library structure. It means that the library
+// structure must be already existing. This is useful when the user doesn't want to spend time
+// to generate again that structure or when he wants to force the SCI2C tool to access to
+// a manually-changed library structure. 'Translate' option forces SCI2C to don't remove
+// the already existing WorkingDir. Only OutCCCodeDir directory will be removed.
+
+// 'All';
+// Performs all the actions listed above.
+
+// --------------------------------
+// --- End Select the run mode. ---
+// --------------------------------
+
+
+// ----------------------------
+// --- Translation Options. ---
+// ----------------------------
+// --- Enable (1) / Disable (0) copy of Scilab code into C code. ---
+// If 1 the Scilab code will be copied into the C code in order to show
+// how each Scilab code line has been translated into C code.
+CopySciCodeIntoCCode = 1;
+
+// --- Select the path style for the C code. ---
+// It can be:
+// windows
+// unix
+// cygwin
+CCompilerPathStyle = 'cygwin';
+
+// --- Path + File name of the main SCI2C library header file.
+Sci2CLibMainHeaderFName = 'C:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\Scilab2C\CFiles\sci2cincludes\sci2clib.h';
+// --------------------------------
+// --- End Translation Options. ---
+// --------------------------------
diff --git a/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci new file mode 100644 index 00000000..ed07907f --- /dev/null +++ b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci @@ -0,0 +1,208 @@ +function UpdateSCI2CInfo(FileInfoDatFile) +// function UpdateSCI2CInfo(FileInfoDatFile) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Updates the FileInfo struct according to the new scilab function +// to be converted in C. +// +// Input data: +// FileInfoDatFile: name of the .dat file containing the FileInfo structure. +// +// Output data: +// --- +// +// #RNU_RES_E +// Status: +// 13-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + +// --------------------------------- +// --- Load File Info Structure. --- +// --------------------------------- +clear FileInfo +load(FileInfoDatFile,'FileInfo'); + +// ----------------------------------- +// --- Load Shared Info Structure. --- +// ----------------------------------- +clear SharedInfo +load(FileInfo.SharedInfoDatFile,'SharedInfo'); + +// --------------------------------------------------- +// --- Extraction of the function name and number. --- +// --------------------------------------------------- +funname = SharedInfo.NextSCIFunName; +funnumber = SharedInfo.NextSCIFunNumber; +// #RNU_RES_B +//NUT: sicuro che mi serve questa struttura? SharedInfo.NextSCIFunNumber cioe' il numero della funzione a che serve? +// #RNU_RES_E +PrintStepInfo('Start translation of function ""'+funname+'""',... + FileInfo.GeneralReport,'both'); + +// ----------------------------------- +// --- Update File Info structure. --- +// ----------------------------------- +FileInfo.Funct(funnumber).Name = funname; +FileInfo.Funct(funnumber).SCIFileName = SharedInfo.NextSCIFileName; +FileInfo.Funct(funnumber).ASTFileName = fullfile(FileInfo.WorkingDir,funname,funname+'.ast'); +FileInfo.Funct(funnumber).CPass1FileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1.c'); +FileInfo.Funct(funnumber).PfxP1ForProlFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1ProlFor'); +FileInfo.Funct(funnumber).PfxP1ForEpilFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1EpilFor'); +FileInfo.Funct(funnumber).PfxP1WhileProlFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1ProlWhile'); +FileInfo.Funct(funnumber).PfxP1WhileEpilFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1EpilWhile'); +FileInfo.Funct(funnumber).CPass1FreeFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1free.c'); +FileInfo.Funct(funnumber).CPass2FileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass2.c'); +FileInfo.Funct(funnumber).Pass1HeaderFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'.h'); +if (SharedInfo.Target == 'Arduino') +//In case of "Arduino" target, *.cpp files should be generated, not *.c files. + FileInfo.Funct(funnumber).FinalCFileName = fullfile(FileInfo.OutCCCodeDir,SharedInfo.NextCFunName+'.cpp'); +else + FileInfo.Funct(funnumber).FinalCFileName = fullfile(FileInfo.OutCCCodeDir,SharedInfo.NextCFunName+'.c'); +end +FileInfo.Funct(funnumber).FinalHeaderFileName = fullfile(FileInfo.OutCCCodeDir,SharedInfo.NextCFunName+'.h'); +FileInfo.Funct(funnumber).CInitVarsFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_initvars.c'); +FileInfo.Funct(funnumber).CDeclarationFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_declarations.c'); +FileInfo.Funct(funnumber).CGblDeclarFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_globaldeclarations.c'); +FileInfo.Funct(funnumber).ReportFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'.rpt'); +FileInfo.Funct(funnumber).LocalVarFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_LOCVAR.dat'); +FileInfo.Funct(funnumber).TempVarFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_TMPVAR.dat'); +FileInfo.Funct(funnumber).SCICopyFileName = fullfile(FileInfo.WorkingDir,funname,funname+'_copy.sci'); + + +// ------------------------------------- +// --- Update Shared Info structure. --- +// ------------------------------------- +SharedInfo.NIndent = 0; // Indentation Level. Useful to produce indentated C code. +SharedInfo.SkipNextEqual = 0; // 1 = the next equal in the AST will not produce C code. +SharedInfo.SkipNextPrec = 0; // 1 = the next precision specifier in the AST will not produce C code. +SharedInfo.SkipNextFun = 0; // 1 = the next function in the AST will not produce C code. +SharedInfo.ASTReader.fidAST = -1; +SharedInfo.CountNestedIf = 0; +SharedInfo.CountForTempVars = 0; +SharedInfo.For.Level = 0; +SharedInfo.ForExpr.OnExec = 0; +SharedInfo.ForExpr.IntCntArg = []; +SharedInfo.ForExpr.MtxValCntArg = []; +SharedInfo.ForExpr.SclValCntArg = []; +SharedInfo.ForExpr.OpColonInfoIn1 = ''; +SharedInfo.ForExpr.OpColonInfoIn2 = ''; +SharedInfo.ForExpr.OpColonInfoIn3 = ''; +SharedInfo.ForExpr.AssignmentFun = 0; + +SharedInfo.WhileExpr.OnExec = 0; +SharedInfo.WhileExpr.CondVar = ''; +SharedInfo.WhileExpr.DimCondVar = -1; +SharedInfo.While.Level = 0; +//NUT: anche questa sarebbe da inizializzare con una bella funzione. + + +SharedInfo.CFunId.OpColon = 3; +SharedInfo.CFunId.EqScalar = 4; +SharedInfo.CFunId.EqMatrix = 5; +SharedInfo.CFunId.GenFunMtx = 6; // (scalar functions are fall in the scalar equal category.) + +SharedInfo = INIT_SharedInfoEqual(SharedInfo); + +// Contains the list of the C calls calls made in the current .sci file. +SharedInfo.CFunctsAlreadyCalled = '_____________'; // Initialization with a dummy name + +// --------------------------------------- +// --- Update Converted Function List. --- +// --------------------------------------- +Converted = FL_UpdateConverted(SharedInfo.NFilesToTranslate,FileInfo.FunctionList.ConvertedDat); + +// -------------------------------------- +// --- Create the function directory. --- +// -------------------------------------- +rmdir(fullfile(FileInfo.WorkingDir,funname),'s'); +mkdir(FileInfo.WorkingDir,funname); + +// ----------------------------------------- +// --- Initialize Other FileInfo fields. --- +// ----------------------------------------- +PrintStringInfo(' ',FileInfo.Funct(funnumber).SCICopyFileName,'file','y'); // Cannot use copyfile when the directory is empty!. +SCI2Ccopyfile(FileInfo.Funct(funnumber).SCIFileName,FileInfo.Funct(funnumber).SCICopyFileName,'overwrite'); + +FileInfo.Funct(funnumber).SCICopyFileFid = SCI2COpenFileRead(FileInfo.Funct(funnumber).SCICopyFileName); +// Perform a dummy reading up to the function. +//NUT: mettimi in una funzione. +scicopyfid = FileInfo.Funct(funnumber).SCICopyFileFid; +CPass1FileName = FileInfo.Funct(funnumber).CPass1FileName; +IndentLevel = SharedInfo.NIndent; +FoundFunctionKey = 0; +PrintStringInfo(C_IndentBlanks(IndentLevel)+'/*',CPass1FileName,'file','y'); +PrintStringInfo(C_IndentBlanks(IndentLevel)+' SCI2C: ------------------------------------------------------------------',CPass1FileName,'file','y'); +while (~meof(scicopyfid) & (FoundFunctionKey==0)) + // Read a line from the scilab file + sciline = mgetl(scicopyfid,1); + noblkssciline = stripblanks(sciline); + if (SCI2Cstrncmps1size('function',noblkssciline)) + FoundFunctionKey = 1; + end + PrintStringInfo(C_IndentBlanks(IndentLevel)+' SCI2C: '+sciline,CPass1FileName,'file','y'); +end +PrintStringInfo(C_IndentBlanks(IndentLevel)+' SCI2C: ------------------------------------------------------------------',CPass1FileName,'file','y'); +PrintStringInfo(C_IndentBlanks(IndentLevel)+'*/',CPass1FileName,'file','y'); + +// ------------------------- +// --- Initialize Files. --- +// ------------------------- +PrintStringInfo(' ',FileInfo.Funct(funnumber).CDeclarationFileName,'file','y'); +PrintStringInfo(' ',FileInfo.Funct(funnumber).CGblDeclarFileName,'file','y'); +PrintStringInfo(' ',FileInfo.Funct(funnumber).CInitVarsFileName,'file','y'); +CPass1FreeFileName = FileInfo.Funct(funnumber).CPass1FreeFileName; +PrintStringInfo(' ',CPass1FreeFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(1)+'/*',CPass1FreeFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(1)+'** --------------------- ',CPass1FreeFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(1)+'** --- Free Section. --- ',CPass1FreeFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(1)+'** --------------------- ',CPass1FreeFileName,'file','y'); +PrintStringInfo(C_IndentBlanks(1)+'*/',CPass1FreeFileName,'file','y'); + +// ----------------------------------- +// --- Initialize Local/Temp Vars. --- +// ----------------------------------- +LocalVars = []; +TempVars = []; + +// ------------------------------------ +// --- Determine Default Precision. --- +// ------------------------------------ +// For the current release only the following approaches are available: +// 'NO_RESIZE' +// 'REALLOC_ALL_RESIZE_ALL' +SharedInfo.DefaultPrecision = ... + FA_GetDefaultPrecision(FileInfo.Funct(funnumber).SCICopyFileName,FileInfo.Funct(funnumber).ReportFileName); + +// ---------------------------------- +// --- Determine Resize Approach. --- +// ---------------------------------- +SharedInfo.ResizeApproach = FA_GetResizeApproach(FileInfo.Funct(funnumber).SCICopyFileName,FileInfo.Funct(funnumber).ReportFileName); + +// --------------------- +// --- Save section. --- +// --------------------- +// --- Save File Info Structure. --- +save(FileInfoDatFile, "FileInfo"); + +// --- Save File Info Structure. --- +save(FileInfo.SharedInfoDatFile, "SharedInfo"); + +// --- Save Local/Temp Vars. --- +save(FileInfo.Funct(funnumber).LocalVarFileName, "LocalVars"); +save(FileInfo.Funct(funnumber).TempVarFileName, "TempVars"); + +// --- Save Converted .dat file. --- +save(FileInfo.FunctionList.ConvertedDat, "Converted"); +// ------------------------- +// --- End save section. --- +// ------------------------- + +endfunction diff --git a/2.3-1/macros/ToolInitialization/buildmacros.sce b/2.3-1/macros/ToolInitialization/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/ToolInitialization/doublecomplex.sci b/2.3-1/macros/ToolInitialization/doublecomplex.sci new file mode 100644 index 00000000..ebeb883c --- /dev/null +++ b/2.3-1/macros/ToolInitialization/doublecomplex.sci @@ -0,0 +1,29 @@ +function y = doublecomplex(x)
+// function y = doublecomplex(x)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+if(x==0)
+y = 0*%i;
+else
+y=x+0*%i;
+end
+endfunction
diff --git a/2.3-1/macros/ToolInitialization/floatcomplex.sci b/2.3-1/macros/ToolInitialization/floatcomplex.sci new file mode 100644 index 00000000..eedae766 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/floatcomplex.sci @@ -0,0 +1,26 @@ +function y = floatcomplex(x)
+// function y = floatcomplex(x)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+y = x+0*%i;
+
+endfunction
\ No newline at end of file diff --git a/2.3-1/macros/ToolInitialization/lib b/2.3-1/macros/ToolInitialization/lib Binary files differnew file mode 100644 index 00000000..1e49bc31 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/lib diff --git a/2.3-1/macros/ToolInitialization/names b/2.3-1/macros/ToolInitialization/names new file mode 100644 index 00000000..71a724d3 --- /dev/null +++ b/2.3-1/macros/ToolInitialization/names @@ -0,0 +1,14 @@ +INIT_CreateDirs +INIT_FillSCI2LibCDirs +INIT_GenAnnFLFunctions +INIT_GenFileInfo +INIT_GenLibraries +INIT_GenSharedInfo +INIT_LoadLibraries +INIT_RemoveDirs +INIT_SCI2C +INIT_SharedInfoEqual +ManageNextConversion +UpdateSCI2CInfo +doublecomplex +floatcomplex diff --git a/2.3-1/macros/buildmacros.sce b/2.3-1/macros/buildmacros.sce new file mode 100644 index 00000000..f02096d9 --- /dev/null +++ b/2.3-1/macros/buildmacros.sce @@ -0,0 +1,31 @@ +// This file is released into the public domain + +Directories = [ "ASTManagement", ... + "CCodeGeneration", ... + "ErrorMessages", ... + "findDeps", ... + "FunctionAnnotation", ... + "FunctionList", ... + "GeneralFunctions", ... + "SymbolTable", ... + "ToolInitialization", ... + "Hardware/AVR", ... + "Hardware/RasberryPi", ... + "ImageProcessing", ... + "Scilab-Arduino"]; + + +current_path_buildmacros = get_absolute_file_path("buildmacros.sce"); + +for K=1:size(Directories,"*") + myfile = current_path_buildmacros + filesep() + Directories(K) + filesep() + "buildmacros.sce"; + if isfile(myfile) then + exec(myfile); + end +end + +clear current_path_buildmacros; + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/cb_sci2c_gui.sci b/2.3-1/macros/cb_sci2c_gui.sci new file mode 100644 index 00000000..7bb0e733 --- /dev/null +++ b/2.3-1/macros/cb_sci2c_gui.sci @@ -0,0 +1,223 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - INRIA - Vincent COUVERT +// +// 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 +// + +// Callback function for SCI2C GUI (See sci2c_gui.sci) + +function cb_sci2c_gui + +// +// --- File to convert --- +// +if get(gcbo,"tag")=="filebtn" then + + filename = uigetfile("*.sci", pwd(), gettext("Select the file to translate")); + if ~isempty(filename) then + set(findobj("tag", "fileedit"), "string", filename); + end + +// +// --- Sub-functions directory --- +// +elseif get(gcbo,"tag")=="subfunsbtn" then + + directory = uigetdir(pwd(), gettext("Select your sub-functions directory")); + if ~isempty(directory) then + set(findobj("tag", "subfunsedit"), "string", directory); + end + +// +// --- Output directory --- +// +elseif get(gcbo,"tag")=="outbtn" then + + directory = uigetdir(pwd(), gettext("Select the directory for generated files")); + if ~isempty(directory) then + set(findobj("tag", "outedit"), "string", directory); + end + +// +// --- Run mode option --- +// +elseif or(get(gcbo, "tag")==["runradioall","runradiotranslate","runradiogenlib"]) then + + set(findobj("tag", "runradioall"), "value", 0); + set(findobj("tag", "runradiotranslate"), "value", 0); + set(findobj("tag", "runradiogenlib"), "value", 0); + + set(gcbo, "value", 1); + + +// --- Output format option --- + +elseif or(get(gcbo, "tag")==["outformatradiostalone","outformatradioarduino","outformatradioavr","outformatradiorpi"]) then + + set(findobj("tag", "outformatradiostalone"), "value", 0); + set(findobj("tag", "outformatradioarduino"), "value", 0); + 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 --- +// +elseif or(get(gcbo, "tag")==["sciintocradioyes","sciintocradiono"]) then + + set(findobj("tag", "sciintocradioyes"), "value", 0); + set(findobj("tag", "sciintocradiono"), "value", 0); + + set(gcbo, "value", 1); + +// +// --- Build Tool option --- +// +elseif or(get(gcbo, "tag")==["buildtoolradiowin","buildtoolradiounix"]) then + + set(findobj("tag", "buildtoolradiowin"), "value", 0); + set(findobj("tag", "buildtoolradiounix"), "value", 0); + + set(gcbo, "value", 1); + +// +// --- Cancel conversion --- +// +elseif get(gcbo, "tag")=="cancelbtn" | get(gcbo, "tag")=="close_menu" then + delete(findobj("tag", "sci2cfig")); + +// +// --- Launch conversion --- +// +elseif get(gcbo, "tag")=="convertbtn" then + UserScilabMainFile = get(findobj("tag", "fileedit"), "string"); + + UserSciFilesPaths = get(findobj("tag", "subfunsedit"), "string"); + +// Sci2CLibMainHeaderFName = get(findobj("tag", "headeredit"), "string"); + + UserSciCodeMainDir = get(findobj("tag", "outedit"), "string"); + + if get(findobj("tag", "runradioall"), "value") == 1 then + RunMode = "All"; + elseif get(findobj("tag", "runradiotranslate"), "value") == 1 then + RunMode = "Translate"; + else + RunMode = "GenLibraryStructure"; + end + + if get(findobj("tag", "outformatradiostalone"), "value") == 1 then + Target = "StandAlone"; + elseif get(findobj("tag", "outformatradioarduino"), "value") == 1 then + Target = "Arduino"; + elseif get(findobj("tag", "outformatradioavr"), "value") == 1 then + Target = "AVR"; + 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; + + if get(findobj("tag", "buildtoolradiowin"), "value") == 1 then + NativeBuild = "nmake"; + elseif get(findobj("tag", "buildtoolradiounix"), "value") == 1 then + NativeBuild = "make"; +// else +// CCompilerPathStyle = "cygwin"; + end + + + // -*- DEBUG ONLY -*- + +// mprintf("UserScilabMainFile = {%s}\n", UserScilabMainFile); +// mprintf("UserSciFilesPaths = {%s}\n", UserSciFilesPaths); +// mprintf("UserSciCodeMainDir = {%s}\n", UserSciCodeMainDir); +// mprintf("RunMode = {%s}\n", RunMode); +// mprintf("CopySciCodeIntoCCode = {%d}\n", bool2s(CopySciCodeIntoCCode)); +// mprintf("NativeBuild = {%s}\n", NativeBuild); + scilab2c(UserScilabMainFile, UserSciCodeMainDir, UserSciFilesPaths, RunMode, NativeBuild,Target,Board_name); +// +// --- sci2c help --- +// +elseif get(gcbo, "tag")=="sci2c_help_menu" then + help sci2c + +// +// --- About SCI2C --- +// +elseif get(gcbo, "tag")=="about_sci2c_menu" then + help(gettext("About_SCI2C_tools")) +end + +endfunction diff --git a/2.3-1/macros/findDeps/Scilab2CDeps.sci b/2.3-1/macros/findDeps/Scilab2CDeps.sci new file mode 100644 index 00000000..b1b75c76 --- /dev/null +++ b/2.3-1/macros/findDeps/Scilab2CDeps.sci @@ -0,0 +1,1808 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - INRIA - Arnaud Torset +// +// 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 +// Edited by: Yash Pratap Singh Tomar + +function scilab2ccode = Scilab2CDeps() + + +///////////////////////////////// +////// AUXILIARY FUNCTIONS ////// +///////////////////////////////// + +//abs +scilab2ccode.deps.cabss=["ssqrts","sabss","creals","cimags"] +scilab2ccode.deps.cabsa=["cabss"] +scilab2ccode.deps.dabss=[] +scilab2ccode.deps.dabsa=["dabss"] +scilab2ccode.deps.sabss=[] +scilab2ccode.deps.sabsa=["sabss"] +scilab2ccode.deps.zabss=["dsqrts","dabss","zreals","zimags"] +scilab2ccode.deps.zabsa=["zabss"] +scilab2ccode.deps.u8absa=["u8abss"] +scilab2ccode.deps.u8abss=[] +scilab2ccode.deps.i8absa=["i8abss"] +scilab2ccode.deps.i8abss=[] +scilab2ccode.deps.u16absa=["u16abss"] +scilab2ccode.deps.u16abss=[] +scilab2ccode.deps.i16absa=["i16abss"] +scilab2ccode.deps.i16abss=[] +//conj +scilab2ccode.deps.cconjs=["FloatComplex","creals","cimags"] +scilab2ccode.deps.cconja=["cconjs"] +scilab2ccode.deps.zconjs=["DoubleComplex","zreals","zimags"] +scilab2ccode.deps.zconja=["zconjs"] + +//find +scilab2ccode.deps.cfinda=["creals","cimags"] +scilab2ccode.deps.dfinda=[] +scilab2ccode.deps.sfinda=[] +scilab2ccode.deps.zfinda=["zreals","zimags"] +scilab2ccode.deps.i8finda=[] +scilab2ccode.deps.i16finda=[] +scilab2ccode.deps.u8finda=[] +scilab2ccode.deps.u16finda=[] + +//float +scilab2ccode.deps.dfloats=[] +scilab2ccode.deps.dfloata=[] +scilab2ccode.deps.i8floats=[] +scilab2ccode.deps.i8floata=[] +scilab2ccode.deps.i16floats=[] +scilab2ccode.deps.i16floata=[] +scilab2ccode.deps.sfloats=[] +scilab2ccode.deps.sfloata=[] +scilab2ccode.deps.u8floats=[] +scilab2ccode.deps.u8floata=[] +scilab2ccode.deps.u16floats=[] +scilab2ccode.deps.u16floata=[] + +//find2d +scilab2ccode.deps.cfind2da=["creals","cimags"] +scilab2ccode.deps.dfind2da=[] +scilab2ccode.deps.sfind2da=[] +scilab2ccode.deps.zfind2da=["zreals","zimags"] + + +//frexp +scilab2ccode.deps.dfrexps=[] +scilab2ccode.deps.sfrexps=[] + +//isempty +scilab2ccode.deps.cisemptys=[] +scilab2ccode.deps.cisemptya=["cfinda"] +scilab2ccode.deps.disemptys=[] +scilab2ccode.deps.disemptya=["dfinda"] +scilab2ccode.deps.sisemptys=[] +scilab2ccode.deps.sisemptya=["sfinda"] +scilab2ccode.deps.zisemptys=[] +scilab2ccode.deps.zisemptya=["zfinda"] + +//isnan +scilab2ccode.deps.cisnans=["creals","cimags"] +scilab2ccode.deps.cisnana=["cisnans"] +scilab2ccode.deps.disnans=[] +scilab2ccode.deps.disnana=["disnans"] +scilab2ccode.deps.sisnans=[] +scilab2ccode.deps.sisnana=["sisnans"] +scilab2ccode.deps.zisnans=["zreals","zimags"] +scilab2ccode.deps.zisnana=["zisnans"] + +//length + +//pythag +scilab2ccode.deps.cpythags=["csqrts","cadds","cmuls"] +scilab2ccode.deps.dpythags=["dsqrts"] +scilab2ccode.deps.spythags=["ssqrts"] +scilab2ccode.deps.zpythags=["zsqrts","zadds","zmuls"] + +//rand +scilab2ccode.deps.cranda=["crands"] +scilab2ccode.deps.crands=["FloatComplex"] +scilab2ccode.deps.dranda=["drands"] +scilab2ccode.deps.drands=[] +scilab2ccode.deps.i8randa=["i8rands"] +scilab2ccode.deps.i8rands=[] +scilab2ccode.deps.i16randa=["i16rands"] +scilab2ccode.deps.i16rands=[] +scilab2ccode.deps.sranda=["srands"] +scilab2ccode.deps.srands=[] +scilab2ccode.deps.u8randa=["u8rands"] +scilab2ccode.deps.u8rands=[] +scilab2ccode.deps.u16randa=["u16rands"] +scilab2ccode.deps.u16rands=[] +scilab2ccode.deps.zranda=["drands","DoubleComplex","zreals",] +scilab2ccode.deps.zrands=["drands","DoubleComplex"] + +//sign +scilab2ccode.deps.csigns=["FloatComplex","cabss","creals","cimags"] +scilab2ccode.deps.csigna=["csigns"] +scilab2ccode.deps.dsigns=[] +scilab2ccode.deps.dsigna=["dsigns"] +scilab2ccode.deps.dsigns=[] +scilab2ccode.deps.dsigna=["ssigns"] +scilab2ccode.deps.zsigns=["DoubleComplex","zabss","zreals","zimags"] +scilab2ccode.deps.zsigna=["zsigns"] +scilab2ccode.deps.i8signa=["i8signs"] +scilab2ccode.deps.i8signs=[] +scilab2ccode.deps.i16signa=["i16signs"] +scilab2ccode.deps.i16signs=[] +scilab2ccode.deps.u8signa=["u8signs"] +scilab2ccode.deps.u8signs=[] +scilab2ccode.deps.u16signa=["u16signs"] +scilab2ccode.deps.u16signs=[] + +//size +scilab2ccode.deps.dallsizea=[] + +//type + +///////////////////////////////// +///// CACSD ///////////// +//////////////////////////////// + +//lqe +scilab2ccode.deps.dlqea=["dtransposea","dlqra"] + +//lqr +scilab2ccode.deps.dlqra=["dtransposea","dmulma","dinverma","ddiffa","dschura","drdivma","dadda","deyea","dgschura"] + +//obscont +scilab2ccode.deps.dobsconta=["dmulma","dadda"] + +//syslin +scilab2ccode.deps.dsyslina=[] + +///////////////////////////////// +///////DIFFERENTIAL CALCULUS///// +///////////////////////////////// + +//diff +scilab2ccode.deps.ddiffca=[] +scilab2ccode.deps.i8diffca=[] +scilab2ccode.deps.i16diffca=[] +scilab2ccode.deps.sdiffca=[] +scilab2ccode.deps.u8diffca=[] +scilab2ccode.deps.u16diffca=[] + +//ode +scilab2ccode.deps.dodea=[] +scilab2ccode.deps.dodes=[] + + + + +////////////////////////////////// +////// ELEMENTARY FUNCTIONS ////// +////////////////////////////////// + +//acos +scilab2ccode.deps.cacoss=["FloatComplex","ssqrts","sabss","sacoss","satans","slogs","slog1ps","creals","cimags"] +scilab2ccode.deps.cacosa=["cacoss"] +scilab2ccode.deps.dacoss=[] +scilab2ccode.deps.dacosa=["dacoss"] +scilab2ccode.deps.sacoss=[] +scilab2ccode.deps.sacosa=["sacoss"] +scilab2ccode.deps.zacoss=["DoubleComplex","dsqrts","dabss","dacoss","datans","dlogs","dlog1ps","zreals","zimags"] +scilab2ccode.deps.zacosa=["zacoss"] + +//acosd +scilab2ccode.deps.dacosda=["dacosds"] +scilab2ccode.deps.dacosds=[] +scilab2ccode.deps.sacosda=["sacosds"] +scilab2ccode.deps.sacosds=[] + +//acosh +scilab2ccode.deps.cacoshs=["FloatComplex","cacoss","creals","cimags"] +scilab2ccode.deps.cacosha=["cacoshs"] +scilab2ccode.deps.dacoshs=[] +scilab2ccode.deps.dacosha=["dacoshs"] +scilab2ccode.deps.sacoshs=[] +scilab2ccode.deps.sacosha=["sacoshs"] +scilab2ccode.deps.zacoshs=["DoubleComplex","zacoss","zreals","zimags"] +scilab2ccode.deps.zacosha=["zacoshs"] + +//acot +scilab2ccode.deps.cacota=["cacots"] +scilab2ccode.deps.cacots=["FloatComplex","crdivs","catans"] +scilab2ccode.deps.dacota=["dacots"] +scilab2ccode.deps.dacots=[] +scilab2ccode.deps.sacota=["sacots"] +scilab2ccode.deps.sacots=[] +scilab2ccode.deps.zacota=["zacots"] +scilab2ccode.deps.zacots=["DoubleComplex","zrdivs","zatans"] + +//acotd +scilab2ccode.deps.dacotda=["dacotds"] +scilab2ccode.deps.dacotds=[] +scilab2ccode.deps.sacotda=["sacotds"] +scilab2ccode.deps.sacotds=[] + +//acoth +scilab2ccode.deps.cacotha=["cacoths"] +scilab2ccode.deps.cacoths=["FloatComplex","crdivs","catanhs"] +scilab2ccode.deps.dacotha=["dacoths"] +scilab2ccode.deps.dacoths=[] +scilab2ccode.deps.sacotha=["sacoths"] +scilab2ccode.deps.sacoths=[] +scilab2ccode.deps.zacotha=["zacoths"] +scilab2ccode.deps.zacoths=["DoubleComplex","zrdivs","zatanhs"] + +//acsc +scilab2ccode.deps.cacsca=["cacscs"] +scilab2ccode.deps.cacscs=["FloatComplex","crdivs","casins"] +scilab2ccode.deps.dacsca=["dacscs"] +scilab2ccode.deps.dacscs=[] +scilab2ccode.deps.sacsca=["sacscs"] +scilab2ccode.deps.sacscs=[] +scilab2ccode.deps.zacsca=["zacscs"] +scilab2ccode.deps.zacscs=["DoubleComplex","zrdivs","zasins"] + +//acscd +scilab2ccode.deps.dacscda=["dacscds"] +scilab2ccode.deps.dacscds=[] +scilab2ccode.deps.sacscda=["sacscds"] +scilab2ccode.deps.sacscds=[] + +//acsch +scilab2ccode.deps.cacsca=["cacscs"] +scilab2ccode.deps.cacscs=["FloatComplex","crdivs","cmuls"] +scilab2ccode.deps.dacscha=["dacschs"] +scilab2ccode.deps.dacschs=[] +scilab2ccode.deps.sacscha=["sacschs"] +scilab2ccode.deps.sacschs=[] +scilab2ccode.deps.zacsca=["zacscs"] +scilab2ccode.deps.zacscs=["zrdivs","DoubleComplex","zasins"] + +//asec +scilab2ccode.deps.daseca=["dasecs"] +scilab2ccode.deps.dasecs=[] +scilab2ccode.deps.saseca=["sasecs"] +scilab2ccode.deps.sasecs=[] + +//asecd +scilab2ccode.deps.dasecda=["dasecds"] +scilab2ccode.deps.dasecds=[] +scilab2ccode.deps.sasecda=["sasecds"] +scilab2ccode.deps.sasecds=[] + +//asech +scilab2ccode.deps.dasecha=["dasechs"] +scilab2ccode.deps.dasechs=[] +scilab2ccode.deps.sasecha=["sasechs"] +scilab2ccode.deps.sasechs=[] + +//asin +scilab2ccode.deps.casins=["FloatComplex","ssqrts","sabss","sasins","satans","slogs","slog1ps","dabss","creals","cimags"] +scilab2ccode.deps.casina=["casins"] +scilab2ccode.deps.dasins=[] +scilab2ccode.deps.dasina=["dasins"] +scilab2ccode.deps.sasins=[] +scilab2ccode.deps.sasina=["sasins"] +scilab2ccode.deps.zasins=["DoubleComplex","dsqrts","dabss","dasins","datans","dlog1ps","dlogs","zreals","zimags"] +scilab2ccode.deps.zasina=["zasins"] + +//asind +scilab2ccode.deps.dasinda=["dasinds"] +scilab2ccode.deps.dasinds=[] +scilab2ccode.deps.sasinda=["sasinds"] +scilab2ccode.deps.sasinds=[] + + +//asinh +scilab2ccode.deps.casinhs=["FloatComplex","casins","creals","cimags"] +scilab2ccode.deps.casinha=["casinhs"] +scilab2ccode.deps.dasinhs=["DoubleComplex","zasins"] +scilab2ccode.deps.dasinha=["dasinhs"] +scilab2ccode.deps.sasinhs=["FloatComplex","casins"] +scilab2ccode.deps.sasinha=["sasinhs"] +scilab2ccode.deps.zasinhs=["DoubleComplex","zasins","zreals","zimags"] +scilab2ccode.deps.zasinha=["zasinhs"] + + +//atan +scilab2ccode.deps.catans=["satans","creals","cimags","dabss","slnp1m1s","sabss","FloatComplex"] +scilab2ccode.deps.catana=["catans"] +scilab2ccode.deps.datans=[] +scilab2ccode.deps.datana=["datans"] +scilab2ccode.deps.satans=[] +scilab2ccode.deps.satana=["satans"] +scilab2ccode.deps.zatans=["datans","zreals","zimags","dabss","dlnp1m1s","DoubleComplex"] +scilab2ccode.deps.zatana=["zatans"] + + +//atan2 +scilab2ccode.deps.datan2s=[] +scilab2ccode.deps.datan2a=["datan2s"] +scilab2ccode.deps.satan2s=[] +scilab2ccode.deps.satan2a=["satan2s"] + +//atand +scilab2ccode.deps.datanda=["datands"] +scilab2ccode.deps.datands=[] +scilab2ccode.deps.satanda=["satands"] +scilab2ccode.deps.satands=[] + +//atanh +scilab2ccode.deps.catanhs=["FloatComplex","creals","cimags","catans"] +scilab2ccode.deps.catanha=["catanhs"] +scilab2ccode.deps.datanhs=["zimags","zatans","DoubleComplex"] +scilab2ccode.deps.datanha=["datanhs"] +scilab2ccode.deps.satanhs=["cimags","catans","FloatComplex"] +scilab2ccode.deps.satanha=["satanhs"] +scilab2ccode.deps.zatanhs=["DoubleComplex","zreals","zimags","zatans"] +scilab2ccode.deps.zatanha=["zatanhs"] + +//bitand +scilab2ccode.deps.u8bitanda=["u8bitands"] +scilab2ccode.deps.u8bitands=[] +scilab2ccode.deps.u16bitanda=["u16bitands"] +scilab2ccode.deps.u16bitands=[] + +//bitcmp +scilab2ccode.deps.u8bitcmps=["u8bitcmps"] +scilab2ccode.deps.u8bitcmps=[] +scilab2ccode.deps.u16bitcmpa=["u16bitcmps"] +scilab2ccode.deps.u16bitcmps=[] + +//bitget +scilab2ccode.deps.u8bitgets=[] +scilab2ccode.deps.u16bitgets=[] + +//bitor +scilab2ccode.deps.u8bitora=["u8bitors"] +scilab2ccode.deps.u8bitors=[] +scilab2ccode.deps.u16bitora=["u16bitors"] +scilab2ccode.deps.u16bitors=[] + +//bitset +scilab2ccode.deps.u8bitsets=[] +scilab2ccode.deps.u16bitsets=[] + +//bitxor +scilab2ccode.deps.u8bitxora=["u8bitxors"] +scilab2ccode.deps.u8bitxors=[] +scilab2ccode.deps.u16bitxora=["u16bitxors"] +scilab2ccode.deps.u16bitxors=[] + +//ceil +scilab2ccode.deps.cceila=["cceils"] +scilab2ccode.deps.cceils=["creals","cimags","FloatComplex"] +scilab2ccode.deps.dceila=["dceils"] +scilab2ccode.deps.dceils=[] +scilab2ccode.deps.i8ceila=["i8ceils"] +scilab2ccode.deps.i8ceils=[] +scilab2ccode.deps.i16ceila=["i16ceils"] +scilab2ccode.deps.i16ceils=[] +scilab2ccode.deps.sceila=["sceils"] +scilab2ccode.deps.sceils=[] +scilab2ccode.deps.u8ceila=["u8ceils"] +scilab2ccode.deps.u8ceils=[] +scilab2ccode.deps.u16ceila=["u16ceils"] +scilab2ccode.deps.u16ceils=[] +scilab2ccode.deps.zceila=["zceils"] +scilab2ccode.deps.zceils=["zreals","zimags","DoubleComplex"] + +//cos +scilab2ccode.deps.ccoss=["creals","cimags","FloatComplex","scoss","scoshs","ssins","ssinhs"] +scilab2ccode.deps.ccosa=["ccoss"] +scilab2ccode.deps.dcoss=[] +scilab2ccode.deps.dcosa=["dcoss"] +scilab2ccode.deps.scoss=[] +scilab2ccode.deps.scosa=["scoss"] +scilab2ccode.deps.zcoss=["zreals","zimags","DoubleComplex","dcoss","dcoshs","dsins","dsinhs"] +scilab2ccode.deps.zcosa=["zcoss"] +scilab2ccode.deps.i8cosa=["i8coss"] +scilab2ccode.deps.i8coss=[] +scilab2ccode.deps.i16cosa=["i16coss"] +scilab2ccode.deps.i16coss=[] +scilab2ccode.deps.u8cosa=["u8coss"] +scilab2ccode.deps.u8coss=[] +scilab2ccode.deps.u16cosa=["u16coss"] +scilab2ccode.deps.u16coss=[] + +//cosh +scilab2ccode.deps.ccoshs=["ccoss","FloatComplex","creals","cimags"] +scilab2ccode.deps.ccosha=["ccoshs"] +scilab2ccode.deps.dcoshs=["dexps","dabss"] +scilab2ccode.deps.dcosha=["dcoshs"] +scilab2ccode.deps.scoshs=["sexps","sabss"] +scilab2ccode.deps.scosha=["scoshs"] +scilab2ccode.deps.zcoshs=["zcoss","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.zcosha=["zcoshs"] +scilab2ccode.deps.i8cosha=["i8coshs"] +scilab2ccode.deps.i8coshs=["i8abss","i8exps"] +scilab2ccode.deps.i16cosha=["i16coshs"] +scilab2ccode.deps.i16coshs=["i16abss","i16exps"] +scilab2ccode.deps.u8cosha=["u8coshs"] +scilab2ccode.deps.u8coshs=["u8abss","u8exps"] +scilab2ccode.deps.u16cosha=["u16coshs"] +scilab2ccode.deps.u16coshs=["u16abss","u16exps"] + + +//exp +scilab2ccode.deps.cexps=["creals","cimags","FloatComplex","sexps","scoss","ssins"] +scilab2ccode.deps.cexpa=["cexps"] +scilab2ccode.deps.dexps=[] +scilab2ccode.deps.dexpa=["dexps"] +scilab2ccode.deps.sexps=[] +scilab2ccode.deps.sexpa=["sexps"] +scilab2ccode.deps.zexps=["zreals","zimags","DoubleComplex","dexps","dcoss","dsins"] +scilab2ccode.deps.zexpa=["zexps"] +scilab2ccode.deps.i8expa=["i8exps"] +scilab2ccode.deps.i8exps=[] +scilab2ccode.deps.i16expa=["i16exps"] +scilab2ccode.deps.i16exps=[] +scilab2ccode.deps.u8expa=["u8exps"] +scilab2ccode.deps.u8exps=[] +scilab2ccode.deps.u16expa=["u16exps"] +scilab2ccode.deps.u16exps=[] + +//exp10 +scilab2ccode.deps.cexp10s=["cpows","FloatComplex"] +scilab2ccode.deps.cexp10a=["cexp10s"] +scilab2ccode.deps.dexp10s=[] +scilab2ccode.deps.dexp10a=["dexp10s"] +scilab2ccode.deps.sexp10s=[] +scilab2ccode.deps.sexp10a=["sexp10s"] +scilab2ccode.deps.zexp10s=["zpows","DoubleComplex"] +scilab2ccode.deps.zexp10a=["zexp10s"] + +//fix +scilab2ccode.deps.cfixa=["cfixs"] +scilab2ccode.deps.cfixs=["creals","cimags","FloatComplex"] +scilab2ccode.deps.dfixa=["dfixs"] +scilab2ccode.deps.dfixs=[] +scilab2ccode.deps.i8fixa=["i8fixs"] +scilab2ccode.deps.i8fixs=["i8floors","i8ceils"] +scilab2ccode.deps.i16fixa=["i16fixs"] +scilab2ccode.deps.i16fixs=["i16floors","i16ceils"] +scilab2ccode.deps.sfixa=["sfixs"] +scilab2ccode.deps.sfixs=[] +scilab2ccode.deps.u8fixa=["u8fixs"] +scilab2ccode.deps.u8fixs=["u8floors","u8ceils"] +scilab2ccode.deps.u16fixa=["u16fixs"] +scilab2ccode.deps.u16fixs=["u16floors","u16ceils"] +scilab2ccode.deps.zfixa=["zfixs"] +scilab2ccode.deps.zfixs=["zreals","zimags","DoubleComplex"] + +//floor +scilab2ccode.deps.cfloora=["cfloors"] +scilab2ccode.deps.cfloors=["creals","cimags","FloatComplex"] +scilab2ccode.deps.dfloora=["dfloors"] +scilab2ccode.deps.dfloors=[] +scilab2ccode.deps.i8floora=["i8floors"] +scilab2ccode.deps.i8floors=[] +scilab2ccode.deps.i16floora=["i16floors"] +scilab2ccode.deps.i16floors=[] +scilab2ccode.deps.sfloora=["sfloors"] +scilab2ccode.deps.sfloors=[] +scilab2ccode.deps.u8floora=["u8floors"] +scilab2ccode.deps.u8floors=[] +scilab2ccode.deps.u16floora=["u16floors"] +scilab2ccode.deps.u16floors=[] +scilab2ccode.deps.zfloors=["zfloors"] +scilab2ccode.deps.zfloors=["zreals","zimags","DoubleComplex"] + +//int +scilab2ccode.deps.cinta=["cfixa"] +scilab2ccode.deps.cints=["cfixs"] +scilab2ccode.deps.dinta=["dfixa"] +scilab2ccode.deps.dints=["dfixs"] +scilab2ccode.deps.sinta=["sfixa"] +scilab2ccode.deps.sints=["sfixs"] +scilab2ccode.deps.zinta=["zfixa"] +scilab2ccode.deps.zints=["zfixs"] + +//int8 +scilab2ccode.deps.dint8a=["dint8s"] +scilab2ccode.deps.dint8s=[] +scilab2ccode.deps.i16int8a=["i16int8s"] +scilab2ccode.deps.i16int8s=[] +scilab2ccode.deps.sint8a=["sint8s"] +scilab2ccode.deps.sint8s=[] +scilab2ccode.deps.u8int8a=["u8int8s"] +scilab2ccode.deps.u8int8s=[] +scilab2ccode.deps.u16int8a=["u16int8s"] +scilab2ccode.deps.u16int8s=[] + +//int16 +scilab2ccode.deps.dint16a=["dint16s"] +scilab2ccode.deps.dint16s=[] +scilab2ccode.deps.i8int16a=["i8int16s"] +scilab2ccode.deps.i8int16s=[] +scilab2ccode.deps.sint16a=["sint16s"] +scilab2ccode.deps.sint16s=[] +scilab2ccode.deps.u8int16a=["u8int16s"] +scilab2ccode.deps.u8int16s=[] +scilab2ccode.deps.u16int16a=["u16int16s"] +scilab2ccode.deps.u16int16s=[] + +//linspace +scilab2ccode.deps.dlinspacea=[] +scilab2ccode.deps.dlinspaces=[] + + +//lnp1m1 +scilab2ccode.deps.dlnp1m1s=["dabss"] +scilab2ccode.deps.slnp1m1s=["sabss"] + + +//log +scilab2ccode.deps.clogs=["creals","cimags","slog1ps","slogs","spythags","FloatComplex"] +scilab2ccode.deps.cloga=["clogs"] +scilab2ccode.deps.dlogs=[] +scilab2ccode.deps.dloga=["dlogs"] +scilab2ccode.deps.slogs=[] +scilab2ccode.deps.sloga=["slogs"] +scilab2ccode.deps.zlogs=["zreals","zimags","zlog1ps","zlogs","zpythags","DoubleComplex"] +scilab2ccode.deps.zloga=["zlogs"] + + +//log1p +scilab2ccode.deps.clog1ps=["clogs","FloatComplex","creals","cimags"] +scilab2ccode.deps.clog1pa=["clog1ps"] +scilab2ccode.deps.dlog1ps=["dlnp1m1s","dlogs"] +scilab2ccode.deps.dlog1pa=["dlog1ps"] +scilab2ccode.deps.slog1ps=["slnp1m1s","slogs"] +scilab2ccode.deps.slog1pa=["slog1ps"] +scilab2ccode.deps.zlog1ps=["zlogs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.zlog1pa=["zlog1ps"] + + +//log10 +scilab2ccode.deps.clog10s=["clogs","FloatComplex","creals","cimags","slogs"] +scilab2ccode.deps.clog10a=["clog10s"] +scilab2ccode.deps.dlog10s=[] +scilab2ccode.deps.dlog10a=["dlog10s"] +scilab2ccode.deps.slog10s=[] +scilab2ccode.deps.slog10a=["slog10s"] +scilab2ccode.deps.zlog10s=["zlogs","DoubleComplex","zreals","zimags","dlogs"] +scilab2ccode.deps.zlog10a=["zlog10s"] + +//logspace +scilab2ccode.deps.dlogspacea=[] +scilab2ccode.deps.dlogspaces=[] + +//pow +scilab2ccode.deps.cpows=["cexps","cmuls","clogs"] +scilab2ccode.deps.cpowa=["cpows"] +scilab2ccode.deps.dpows=[] +scilab2ccode.deps.dpowa=["dpows"] +scilab2ccode.deps.spows=[] +scilab2ccode.deps.spowa=["spows"] +scilab2ccode.deps.zpows=["zexps","zmuls","zlogs"] +scilab2ccode.deps.zpowa=["zpows"] +scilab2ccode.deps.i8powa=["i8pows"] +scilab2ccode.deps.i8pows=[] +scilab2ccode.deps.i16powa=["i16pows"] +scilab2ccode.deps.i16pows=[] +scilab2ccode.deps.u8powa=["u8pows"] +scilab2ccode.deps.u8pows=[] +scilab2ccode.deps.u16powa=["u16pows"] +scilab2ccode.deps.u16pows=[] + +//round +scilab2ccode.deps.crounda=["crounds"] +scilab2ccode.deps.crounds=["creals","cimags","FloatComplex"] +scilab2ccode.deps.drounda=["drounds"] +scilab2ccode.deps.drounds=[] +scilab2ccode.deps.i8rounda=["i8rounds"] +scilab2ccode.deps.i8rounds=[] +scilab2ccode.deps.i16rounda=["i16rounds"] +scilab2ccode.deps.i16rounds=[] +scilab2ccode.deps.srounda=["srounds"] +scilab2ccode.deps.srounds=[] +scilab2ccode.deps.u8rounda=["u8rounds"] +scilab2ccode.deps.u8rounds=[] +scilab2ccode.deps.u16rounda=["u16rounds"] +scilab2ccode.deps.u16rounds=[] +scilab2ccode.deps.zrounda=["zrounds"] +scilab2ccode.deps.zrounds=["zreals","zimags","DoubleComplex"] + +//sin +scilab2ccode.deps.csins=["creals","cimags","FloatComplex","ssins","scoshs","scoss","ssinhs"] +scilab2ccode.deps.csina=["csins"] +scilab2ccode.deps.dsins=[] +scilab2ccode.deps.dsina=["dsins"] +scilab2ccode.deps.ssins=[] +scilab2ccode.deps.ssina=["ssins"] +scilab2ccode.deps.zsins=["zreals","zimags","DoubleComplex","dsins","dcoshs","dcoss","dsinhs"] +scilab2ccode.deps.zsina=["zsins"] +scilab2ccode.deps.i8sina=["i8sins"] +scilab2ccode.deps.i8sins=[] +scilab2ccode.deps.i16sina=["i16sins"] +scilab2ccode.deps.i16sins=[] +scilab2ccode.deps.u8sina=["u8sins"] +scilab2ccode.deps.u8sins=[] +scilab2ccode.deps.u16sina=["u16sins"] +scilab2ccode.deps.u16sins=[] + + +//sinh +scilab2ccode.deps.csinhs=["creals","cimags","csins","FloatComplex"] +scilab2ccode.deps.csinha=["csinhs"] +scilab2ccode.deps.dsinhs=[] +scilab2ccode.deps.dsinha=["dsinhs"] +scilab2ccode.deps.ssinhs=[] +scilab2ccode.deps.ssinha=["ssinhs"] +scilab2ccode.deps.zsinhs=["zreals","zimags","zsins","DoubleComplex"] +scilab2ccode.deps.zsinha=["zsinhs"] +scilab2ccode.deps.i8sinha=["i8sinhs"] +scilab2ccode.deps.i8sinhs=[] +scilab2ccode.deps.i16sinha=["i16sinhs"] +scilab2ccode.deps.i16sinhs=[] +scilab2ccode.deps.u8sinha=["u8sinhs"] +scilab2ccode.deps.u8sinhs=[] +scilab2ccode.deps.u16sinha=["u16sinhs"] +scilab2ccode.deps.u16sinhs=[] + + +//sqrt +scilab2ccode.deps.csqrts=["creals","cimags","dabss","ssqrts","sabss","spythags","FloatComplex"] +scilab2ccode.deps.csqrta=["csqrts"] +scilab2ccode.deps.dsqrts=[] +scilab2ccode.deps.dsqrta=["dsqrts"] +scilab2ccode.deps.ssqrts=[] +scilab2ccode.deps.ssqrta=["ssqrts"] +scilab2ccode.deps.zsqrts=["zreals","zimags","dabss","dsqrts","dpythags","DoubleComplex"] +scilab2ccode.deps.zsqrta=["zsqrts"] + + +//tan +scilab2ccode.deps.ctans=["slogs","ssqrts","creals","cimags","scoss","ssinhs","ssins","sabss","FloatComplex"] +scilab2ccode.deps.ctana=["ctans"] +scilab2ccode.deps.dtans=[] +scilab2ccode.deps.dtana=["dtans"] +scilab2ccode.deps.stans=[] +scilab2ccode.deps.stana=["stans"] +scilab2ccode.deps.ztans=["dlogs","dsqrts","zreals","zimags","dcoss","dsinhs","dsins","dabss","DoubleComplex"] +scilab2ccode.deps.ztana=["ztans"] +scilab2ccode.deps.i8tana=["i8tans"] +scilab2ccode.deps.i8tans=[] +scilab2ccode.deps.i16tana=["i16tans"] +scilab2ccode.deps.i16tans=[] +scilab2ccode.deps.u8tana=["u8tans"] +scilab2ccode.deps.u8tans=[] +scilab2ccode.deps.u16tana=["u16tans"] +scilab2ccode.deps.u16tans=[] + + +//tanh +scilab2ccode.deps.ctanhs=["creals","cimags","ctans","FloatComplex"] +scilab2ccode.deps.ctanha=["ctanhs"] +scilab2ccode.deps.dtanhs=[] +scilab2ccode.deps.dtanha=["dtanhs"] +scilab2ccode.deps.stanhs=[] +scilab2ccode.deps.stanha=["stanhs"] +scilab2ccode.deps.ztanhs=["zreals","zimags","ztans","DoubleComplex"] +scilab2ccode.deps.ztanha=["ztanhs"] +scilab2ccode.deps.i8tanha=["i8tanhs"] +scilab2ccode.deps.i8tanhs=[] +scilab2ccode.deps.i16tanha=["i16tanhs"] +scilab2ccode.deps.i16tanhs=[] +scilab2ccode.deps.u8tanha=["u8tanhs"] +scilab2ccode.deps.u8tanhs=[] +scilab2ccode.deps.u16tanha=["u16tanhs"] +scilab2ccode.deps.u16tanhs=[] + +//uint8 +scilab2ccode.deps.duint8a=["duint8s"] +scilab2ccode.deps.duint8s=[] +scilab2ccode.deps.i8uint8a=["i8uint8s"] +scilab2ccode.deps.i8uint8s=[] +scilab2ccode.deps.i16uint8a=["i16uint8s"] +scilab2ccode.deps.i16uint8s=[] +scilab2ccode.deps.suint8a=["suint8s"] +scilab2ccode.deps.suint8s=[] +scilab2ccode.deps.u16uint8a=["u16uint8s"] +scilab2ccode.deps.u16uint8s=[] + +//uint16 +scilab2ccode.deps.duint16a=["duint16s"] +scilab2ccode.deps.duint16s=[] +scilab2ccode.deps.i8uint16a=["i8uint16s"] +scilab2ccode.deps.i8uint16s=[] +scilab2ccode.deps.i16uint16a=["i16uint16s"] +scilab2ccode.deps.i16uint16s=[] +scilab2ccode.deps.suint16a=["suint16s"] +scilab2ccode.deps.suint16s=[] +scilab2ccode.deps.u8uint16a=["u8uint16s"] +scilab2ccode.deps.u8uint16s=[] + +//////DISCRETE_MATHEMATICS///////// + +//factor +scilab2ccode.deps.dfactors=[] +scilab2ccode.deps.sfactors=[] + +//factorial +scilab2ccode.deps.dfactoriala=["dfactorials"] +scilab2ccode.deps.dfactorials=[] +scilab2ccode.deps.sfactoriala=["dfactorials"] +scilab2ccode.deps.sfactorials=[] + +//primes +scilab2ccode.deps.dprimess=[] +scilab2ccode.deps.sprimess=[] + + +////////RADIX_CONVERSION//////// + +//base2dec +scilab2ccode.deps.dbase2decs=[] +scilab2ccode.deps.gbase2decs=[] + +//bin2dec +scilab2ccode.deps.dbin2deca=["dbin2decs"] +scilab2ccode.deps.dbin2decs=[] +scilab2ccode.deps.i8bin2deca=["i8bin2decs"] +scilab2ccode.deps.i8bin2decs=[] +scilab2ccode.deps.i16bin2deca=["i16bin2decs"] +scilab2ccode.deps.i16bin2decs=[] +scilab2ccode.deps.u8bin2deca=["u8bin2decs"] +scilab2ccode.deps.u8bin2decs=[] +scilab2ccode.deps.u16bin2deca=["u16bin2decs"] +scilab2ccode.deps.u16bin2decs=[] + +//dec2base +scilab2ccode.deps.ddec2basea=["ddec2bases"] +scilab2ccode.deps.ddec2bases=[] +scilab2ccode.deps.sdec2basea=["sdec2bases"] +scilab2ccode.deps.sdec2bases=[] + +//dec2bin +scilab2ccode.deps.ddec2bina=["ddec2bins"] +scilab2ccode.deps.ddec2bins=[] +scilab2ccode.deps.i8dec2bina=["i8dec2bins"] +scilab2ccode.deps.i8dec2bins=[] +scilab2ccode.deps.i16dec2bina=["i16dec2bins"] +scilab2ccode.deps.i16dec2bins=[] +scilab2ccode.deps.u8dec2bina=["u8dec2bins"] +scilab2ccode.deps.u8dec2bins=[] +scilab2ccode.deps.u16dec2bina=["u16dec2bins"] +scilab2ccode.deps.u16dec2bins=[] + +//dec2hex +scilab2ccode.deps.ddec2hexa=["ddec2hexs"] +scilab2ccode.deps.ddec2hexs=[] +scilab2ccode.deps.i8dec2hexa=["i8dec2hexs"] +scilab2ccode.deps.i8dec2hexs=[] +scilab2ccode.deps.i16dec2hexa=["i16dec2hexs"] +scilab2ccode.deps.i16dec2hexs=[] +scilab2ccode.deps.u8dec2hexa=["u8dec2hexs"] +scilab2ccode.deps.u8dec2hexs=[] +scilab2ccode.deps.u16dec2hexa=["u16dec2hexs"] +scilab2ccode.deps.u16dec2hexs=[] + +//dec2oct +scilab2ccode.deps.ddec2octa=["ddec2octs"] +scilab2ccode.deps.ddec2octs=[] +scilab2ccode.deps.i8dec2octa=["i8dec2octs"] +scilab2ccode.deps.i8dec2octs=[] +scilab2ccode.deps.i16dec2octa=["i16dec2octs"] +scilab2ccode.deps.i16dec2octs=[] +scilab2ccode.deps.u8dec2octa=["u8dec2octs"] +scilab2ccode.deps.u8dec2octs=[] +scilab2ccode.deps.u16dec2octs=["u16dec2octs"] +scilab2ccode.deps.u16dec2octs=[] + +//hex2dec +scilab2ccode.deps.dhex2decs=[] +scilab2ccode.deps.ghex2decs=[] + +//oct2dec +scilab2ccode.deps.doct2deca=["doct2decs"] +scilab2ccode.deps.doct2decs=[] +scilab2ccode.deps.i8oct2deca=["i8oct2decs"] +scilab2ccode.deps.i8oct2decs=[] +scilab2ccode.deps.i16oct2deca=["i16oct2decs"] +scilab2ccode.deps.i16oct2decs=[] +scilab2ccode.deps.u8oct2deca=["u8oct2decs"] +scilab2ccode.deps.u8oct2decs=[] +scilab2ccode.deps.u16oct2deca=["u16oct2decs"] +scilab2ccode.deps.u16oct2decs=[] + +//////////Trigonometry///////// + +//cosd +scilab2ccode.deps.dcosda=["dcosds"] +scilab2ccode.deps.dcosds=[] +scilab2ccode.deps.scosda=["scosds"] +scilab2ccode.deps.scosds=[] + +//cotd +scilab2ccode.deps.dcotda=["dcotds"] +scilab2ccode.deps.dcotds=[] +scilab2ccode.deps.scotda=["scotds"] +scilab2ccode.deps.scotds=[] + +//coth +scilab2ccode.deps.ccotha=["ccoths"] +scilab2ccode.deps.ccoths=["ctanhs","FloatComplex","crdivs"] +scilab2ccode.deps.dcotha=[] +scilab2ccode.deps.dcoths=[] +scilab2ccode.deps.scotha=[] +scilab2ccode.deps.scoths=[] +scilab2ccode.deps.zcotha=["zcoths"] +scilab2ccode.deps.zcoths=["zrdivs","DoubleComplex","ztanhs"] + +//csc +scilab2ccode.deps.ccsca=["ccscs"] +scilab2ccode.deps.ccscs=["csins","FloatComplex","crdivs"] +scilab2ccode.deps.dcsca=["dcscs"] +scilab2ccode.deps.dcscs=[] +scilab2ccode.deps.scsca=["scscs"] +scilab2ccode.deps.scscs=[] +scilab2ccode.deps.zcsca=["zcscs"] +scilab2ccode.deps.zcscs=["DoubleComplex","zrdivs","dsins","dcoshs","dcoss","dsinhs","zreals","zimags"] + +//cscd +scilab2ccode.deps.ccscda=["ccscds"] +scilab2ccode.deps.ccscds=["csins","FloatComplex","crdivs"] +scilab2ccode.deps.dcscda=["dcscds"] +scilab2ccode.deps.dcscds=[] +scilab2ccode.deps.scscda=["scscds"] +scilab2ccode.deps.scscds=[] +scilab2ccode.deps.zcscda=["zcscds"] +scilab2ccode.deps.zcscds=["zrdivs","DoubleComplex","zsins"] + +//csch +scilab2ccode.deps.ccscha=["ccschs"] +scilab2ccode.deps.ccschs=["csinhs","FloatComplex","crdivs"] +scilab2ccode.deps.dcscha=["dcschs"] +scilab2ccode.deps.dcschs=[] +scilab2ccode.deps.scscha=["scschs"] +scilab2ccode.deps.scschs=[] +scilab2ccode.deps.zcscha=["zcschs"] +scilab2ccode.deps.zcschs=["zrdivs","DoubleComplex","zsinhs"] + +//sec +scilab2ccode.deps.cseca=["csecs"] +scilab2ccode.deps.csecs=["ccoss","FloatComplex","crdivs"] +scilab2ccode.deps.dseca=[] +scilab2ccode.deps.dsecs=[] +scilab2ccode.deps.sseca=["ssecs"] +scilab2ccode.deps.ssecs=[] +scilab2ccode.deps.zseca=["zsecs"] +scilab2ccode.deps.zsecs=["zrdivs","DoubleComplex","zcoss"] + +//secd +scilab2ccode.deps.dsecda=["dsecds"] +scilab2ccode.deps.dsecds=[] +scilab2ccode.deps.ssecda=["ssecds"] +scilab2ccode.deps.ssecds=[] + +//sech +scilab2ccode.deps.csecha=["csechs"] +scilab2ccode.deps.ccoths=["ccoshs","FloatComplex","crdivs"] +scilab2ccode.deps.dsecha=["dsechs"] +scilab2ccode.deps.dsechs=[] +scilab2ccode.deps.ssecha=["ssechs"] +scilab2ccode.deps.ssechs=[] +scilab2ccode.deps.zsecha=["zsechs"] +scilab2ccode.deps.zsechs=["zrdivs","DoubleComplex","zcoshs"] + +/////////////////////////////// +////// FILES ////// +/////////////////////////////// + + +//mclose +scilab2ccode.deps.mclose=[] + + +//mopen +scilab2ccode.deps.mopen=[] + + +//mput +scilab2ccode.deps.dmputa=[] +scilab2ccode.deps.dmputs=[] +scilab2ccode.deps.i8mputa=[] +scilab2ccode.deps.i8mputs=[] +scilab2ccode.deps.i16mputa=[] +scilab2ccode.deps.i16mputs=[] +scilab2ccode.deps.smputa=[] +scilab2ccode.deps.smputs=[] +scilab2ccode.deps.u8mputa=[] +scilab2ccode.deps.u8mputs=[] +scilab2ccode.deps.u16mputa=[] +scilab2ccode.deps.u16mputs=[] + + + +/////////////////////////////// +////// IMPLICITLIST ////// +/////////////////////////////// + +scilab2ccode.deps.cimplicitLists=["simplicitLists"] +scilab2ccode.deps.dimplicitLists=[] +scilab2ccode.deps.simplicitLists=[] +scilab2ccode.deps.zimplicitLists=["dimplicitLists"] + +/////////////////////////////// +/////// LINEARALGEBRA /////// +/////////////////////////////// + +//balanc +scilab2ccode.deps.dbalanca=["deyea"] + +//rcond +scilab2ccode.deps.drconda=[] + +//schur +scilab2ccode.deps.dgschura=[] +scilab2ccode.deps.dschura=[] + +/////////////////////////////// +////// MATRIX OPERATIONS ////// +/////////////////////////////// + +//cat +scilab2ccode.deps.ccata=[] +scilab2ccode.deps.ccats=[] +scilab2ccode.deps.dcata=[] +scilab2ccode.deps.dcatS=[] +scilab2ccode.deps.scata=[] +scilab2ccode.deps.scats=[] +scilab2ccode.deps.zcata=[] +scilab2ccode.deps.zcats=[] +scilab2ccode.deps.i8cata=[] +scilab2ccode.deps.i8cats=[] +scilab2ccode.deps.i16cata=[] +scilab2ccode.deps.i16catS=[] +scilab2ccode.deps.u8cata=[] +scilab2ccode.deps.u8cats=[] +scilab2ccode.deps.u16cata=[] +scilab2ccode.deps.u16cats=[] + +//OpRc +scilab2ccode.deps.crowcats=[] +scilab2ccode.deps.crowcata=[] +scilab2ccode.deps.drowcats=[] +scilab2ccode.deps.drowcata=[] +scilab2ccode.deps.srowcats=[] +scilab2ccode.deps.srowcata=[] +scilab2ccode.deps.zrowcats=[] +scilab2ccode.deps.zrowcata=[] + + +//OpCc +scilab2ccode.deps.ccolumncats=[] +scilab2ccode.deps.ccolumncata=[] +scilab2ccode.deps.dcolumncats=[] +scilab2ccode.deps.dcolumncata=[] +scilab2ccode.deps.scolumncats=[] +scilab2ccode.deps.scolumncata=[] +scilab2ccode.deps.zcolumncats=[] +scilab2ccode.deps.zcolumncata=[] + + +//chol +scilab2ccode.deps.cchola=["DoubleComplex","creals","cimags","FloatComplex","zreals","zimags","cdiffs","cmuls","crdivs","csqrts"] +scilab2ccode.deps.dchols=["dsqrts"] +scilab2ccode.deps.dchola=[] +scilab2ccode.deps.schols=["ssqrts"] +scilab2ccode.deps.schola=["ssqrts"] +scilab2ccode.deps.zchola=["DoubleComplex","zreals","zimags","zdiffs","zmuls","zrdivs","zsqrts"] +//cumprod +scilab2ccode.deps.dcolumncumproda=[] +scilab2ccode.deps.dcumproda=[] +scilab2ccode.deps.drowcumproda=[] +scilab2ccode.deps.i8columncumproda=[] +scilab2ccode.deps.i8cumproda=[] +scilab2ccode.deps.i8rowcumproda=[] +scilab2ccode.deps.i16columncumproda=[] +scilab2ccode.deps.i16cumproda=[] +scilab2ccode.deps.i16rowcumproda=[] +scilab2ccode.deps.scolumncumproda=[] +scilab2ccode.deps.scumproda=[] +scilab2ccode.deps.srowcumproda=[] +scilab2ccode.deps.u8columncumproda=[] +scilab2ccode.deps.u8cumproda=[] +scilab2ccode.deps.u8rowcumproda=[] +scilab2ccode.deps.u16columncumproda=[] +scilab2ccode.deps.u16cumproda=[] +scilab2ccode.deps.u16rowcumproda=[] + +//cumcum +scilab2ccode.deps.dcolumncumsuma=[] +scilab2ccode.deps.dcumsuma=[] +scilab2ccode.deps.drowcumsuma=[] +scilab2ccode.deps.i8columncumsuma=[] +scilab2ccode.deps.i8cumsuma=[] +scilab2ccode.deps.i8rowcumsuma=[] +scilab2ccode.deps.i16columncumsuma=[] +scilab2ccode.deps.i16cumsuma=[] +scilab2ccode.deps.i16rowcumsuma=[] +scilab2ccode.deps.scolumncumsuma=[] +scilab2ccode.deps.scumsuma=[] +scilab2ccode.deps.srowcumsuma=[] +scilab2ccode.deps.u8columncumsuma=[] +scilab2ccode.deps.u8cumsuma=[] +scilab2ccode.deps.u8rowcumsuma=[] +scilab2ccode.deps.u16columncumsuma=[] +scilab2ccode.deps.u16cumsuma=[] +scilab2ccode.deps.u16rowcumsuma=[] + +//determ +scilab2ccode.deps.cdeterma=["cdiffs","FloatComplex","cmuls","cadds","DoubleComplex","creals","cimags","zreals","zimags","zmuls","crdivs"] +scilab2ccode.deps.ddeterma=[] +scilab2ccode.deps.sdeterma=[] +scilab2ccode.deps.zdeterma=["zdiffs","zmuls","DoubleComplex","zadds","zreals","zimags","zrdivs"] +scilab2ccode.deps.i8determa=[] +scilab2ccode.deps.i16determa=[] +scilab2ccode.deps.u8determa=[] +scilab2ccode.deps.u16determa=[] + +//diag +scilab2ccode.deps.ddiaga=[] +scilab2ccode.deps.ddiagexa=[] +scilab2ccode.deps.ddiagexs=[] +scilab2ccode.deps.ddiagina=[] +scilab2ccode.deps.ddiagins=[] +scilab2ccode.deps.ddiags=[] +scilab2ccode.deps.i8diags=[] +scilab2ccode.deps.i8diagexa=[] +scilab2ccode.deps.i8diagexs=[] +scilab2ccode.deps.i8diagina=[] +scilab2ccode.deps.i8diagins=[] +scilab2ccode.deps.i8diags=[] +scilab2ccode.deps.i16diaga=[] +scilab2ccode.deps.i16diags=[] +scilab2ccode.deps.i16diagexa=[] +scilab2ccode.deps.i16diagexs=[] +scilab2ccode.deps.i16diagina=[] +scilab2ccode.deps.i16diagins=[] +scilab2ccode.deps.u8diaga=[] +scilab2ccode.deps.u8diags=[] +scilab2ccode.deps.u8diagexa=[] +scilab2ccode.deps.u8diagexs=[] +scilab2ccode.deps.u8diagina=[] +scilab2ccode.deps.u8diagins=[] +scilab2ccode.deps.u16diaga=[] +scilab2ccode.deps.u16diags=[] +scilab2ccode.deps.u16diagexa=[] +scilab2ccode.deps.u16diagexs=[] +scilab2ccode.deps.u16diagina=[] +scilab2ccode.deps.u16diagins=[] + +//dist +scilab2ccode.deps.cdists=["spows","creals","cimags","ssqrts"] +scilab2ccode.deps.cdista=["spows","creals","cimags","ssqrts"] +scilab2ccode.deps.ddists=["dpows","dsqrts"] +scilab2ccode.deps.ddista=["dpows","dsqrts"] +scilab2ccode.deps.sdists=["spows","ssqrts"] +scilab2ccode.deps.sdista=["spows","ssqrts"] +scilab2ccode.deps.zdists=["dpows","zreals","zimags","dsqrts"] +scilab2ccode.deps.zdista=["dpows","zreals","zimags","dsqrts"] + +//division +scilab2ccode.deps.crdivcsv=["crdivv"] +scilab2ccode.deps.crdivscv=["crdivv"] +scilab2ccode.deps.crdivv=["crdivma","FloatComplex"] +scilab2ccode.deps.drdivv=["drdivma"] +scilab2ccode.deps.i8rdivma=["dtransposea"] +scilab2ccode.deps.i8ldivma=[] +scilab2ccode.deps.i8rdivv=["i8rdivma"] +scilab2ccode.deps.i16ldivma=[] +scilab2ccode.deps.i16rdivma=["dtransposea"] +scilab2ccode.deps.i16rdivv=["i16rdivma"] +scilab2ccode.deps.srdivv=["srdivma"] +scilab2ccode.deps.u8rdivma=["dtransposea"] +scilab2ccode.deps.u8ldivma=[] +scilab2ccode.deps.u8rdivv=["u8rdivma"] +scilab2ccode.deps.u16ldivma=[] +scilab2ccode.deps.u16rdivma=["dtransposea"] +scilab2ccode.deps.u16rdivv=["u16rdivma"] +scilab2ccode.deps.zrdivdzv=["dzerosa","zrdivv"] +scilab2ccode.deps.zrdivv=["zrdivma","DoubleComplex"] +scilab2ccode.deps.zrdivzdv=["dzerosa","zrdivv"] + + +//OpSlash +scilab2ccode.deps.crdivma=["DoubleComplex","creals","cimags","zrdivma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.drdivma=["dtransposea"] +scilab2ccode.deps.srdivma=["drdivma"] +scilab2ccode.deps.zrdivma=["ztransposea","zconja","DoubleComplex","zreals","zimags"] + + +//OpBackSlash +scilab2ccode.deps.cldivma=["DoubleComplex","creals","cimags","zldivma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.dldivma=[] +scilab2ccode.deps.sldivma=["dldivma"] +scilab2ccode.deps.zldivma=[] + + +//expm +scilab2ccode.deps.cexpma=["sfrexps","cinfnorma","spows","crdivs","FloatComplex","ceyea","cmuls","cadda","cdiffa","cmulma","cldivma"] +scilab2ccode.deps.dexpma=["dfrexps","dinfnorma","dpows","deyea","dadda","ddiffa","dmulma","dldivma"] +scilab2ccode.deps.sexpma=["sfrexps","sinfnorma","spows","seyea","sadda","sdiffa","smulma","sldivma"] +scilab2ccode.deps.zexpma=["dfrexps","zinfnorma","zrdivs","DoubleComplex","zeyea","zmuls","zadda","zdiffa","zmulma","zldivma"] + + +//eye +scilab2ccode.deps.ceyea= ["FloatComplex"] +scilab2ccode.deps.deyea= [] +scilab2ccode.deps.seyea= [] +scilab2ccode.deps.zeyea= ["DoubleComplex"] +scilab2ccode.deps.i8eyea= [] +scilab2ccode.deps.i16eyea= [] +scilab2ccode.deps.u8eyea= [] +scilab2ccode.deps.u16eyea= [] + +//fill +scilab2ccode.deps.cfilla=["conesa","cmuls"] +scilab2ccode.deps.dfilla=["donesa"] +scilab2ccode.deps.sfilla=["sonesa"] +scilab2ccode.deps.zfilla=["zonesa","zmuls"] + +//flipdim +scilab2ccode.deps.dflipdima=[] +scilab2ccode.deps.i8flipdima=[] +scilab2ccode.deps.i16flipdima=[] +scilab2ccode.deps.sflipdima=[] +scilab2ccode.deps.u8flipdima=[] +scilab2ccode.deps.u16flipdima=[] + +//hilb +scilab2ccode.deps.dhilba=[] +scilab2ccode.deps.shilba=[] + + +//infinite norm +scilab2ccode.deps.cinfnorma=["spythags","creals","cimags"] +scilab2ccode.deps.dinfnorma=[] +scilab2ccode.deps.sinfnorma=[] +scilab2ccode.deps.zinfnorma=["dpythags","zreals","zimags"] + + +//inversion +scilab2ccode.deps.cinverma=["DoubleComplex","creals","cimags","zinverma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.dinverma=[] +scilab2ccode.deps.sinverma=["dinverma"] +scilab2ccode.deps.zinverma=[] +scilab2ccode.deps.i8inverma=[] +scilab2ccode.deps.i16inverma=[] +scilab2ccode.deps.u8inverma=[] +scilab2ccode.deps.u16inverma=[] + + +//jmat +scilab2ccode.deps.djmata=[] +scilab2ccode.deps.sjmata=[] + +//kron +scilab2ccode.deps.dkrona=[] +scilab2ccode.deps.skrona=[] + +//logm +scilab2ccode.deps.clogma=["DoubleComplex","creals","cimags","zlogma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.dlogma=["DoubleComplex","zlogma"] +scilab2ccode.deps.slogma=["DoubleComplex","zlogma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.zlogma=["ztransposea","zreals","zimags","zlogs","DoubleComplex","zmulma","zinverma"] + + +//magnitude +scilab2ccode.deps.cmagns=["creals","cimags","ssqrts"] +scilab2ccode.deps.cmagna=["cmagns"] +scilab2ccode.deps.dmagns=[] +scilab2ccode.deps.dmagna=["dmagns"] +scilab2ccode.deps.smagns=[] +scilab2ccode.deps.smagna=["smagns"] +scilab2ccode.deps.zmagns=["zreals","zimags","dsqrts"] +scilab2ccode.deps.zmagna=["zmagns"] +scilab2ccode.deps.i8magna=[] +scilab2ccode.deps.i8magns=["i8abss"] +scilab2ccode.deps.i16magna=["dmagns"] +scilab2ccode.deps.i16magns=["i16abss"] +scilab2ccode.deps.u8magna=["dmagns"] +scilab2ccode.deps.u8magns=["u8abss"] +scilab2ccode.deps.u16magna=["dmagns"] +scilab2ccode.deps.u16magns=["u16abss"] + +//OpStar +scilab2ccode.deps.cmulma=["FloatComplex","cadds","cmuls"] +scilab2ccode.deps.dmulma=[] +scilab2ccode.deps.smulma=[] +scilab2ccode.deps.zmulma=["zreala","zimaga","DoubleComplex","zadds","zmuls"] +scilab2ccode.deps.i8mulma=[] +scilab2ccode.deps.i16mulma=[] +scilab2ccode.deps.u8mulma=[] +scilab2ccode.deps.u16mulma=[] + +//norm +scilab2ccode.deps.dnorma=[] +scilab2ccode.deps.dnormv=[] +scilab2ccode.deps.snorma=[] +scilab2ccode.deps.snormv=[] + +//ones +scilab2ccode.deps.conesa=["FloatComplex"] +scilab2ccode.deps.donesa=[] +scilab2ccode.deps.sonesa=[] +scilab2ccode.deps.zonesa=["DoubleComplex"] +scilab2ccode.deps.i8onesa=[] +scilab2ccode.deps.i16onesa=[] +scilab2ccode.deps.u8onesa=[] +scilab2ccode.deps.u16onesa=[] + +//powm +scilab2ccode.deps.cpowma=["creals","cimags","cspec2a","cpows","cmulma","ctransposea","cconja","cinverma"] +scilab2ccode.deps.dpowma=["dzerosa","zspec2a","zpows","zmulma","ztransposea","zconja","zinverma","zreals","DoubleComplex"] +scilab2ccode.deps.spowma=["szerosa","cspec2a","cpows","FloatComplex","cmulma","ctransposea","cconja","cinverma","creals"] +scilab2ccode.deps.zpowma=["zreals","zimags","zspec2a","zpows","zmulma","ztransposea","zconja","zinverma"] + +//spec +scilab2ccode.deps.cspeca=["DoubleComplex","creals","cimags","zspeca","FloatComplex","zreals","zimags"] +scilab2ccode.deps.dspeca=[] +scilab2ccode.deps.sspeca=["dspeca"] +scilab2ccode.deps.zspeca=["DoubleComplex","zreals","zimags","zconjs","dzerosa"] + +//spec2 +scilab2ccode.deps.cspec2a=["DoubleComplex","creals","cimags","zspec2a","FloatComplex","zreals","zimags"] +scilab2ccode.deps.dspec2a=["dzerosa"] +scilab2ccode.deps.sspec2a=["dspec2a"] +scilab2ccode.deps.zspec2a=["DoubleComplex","zreals","zimags","dzerosa"] + +//Squared Magnitude +scilab2ccode.deps.csquMagns=["creals","cimags"] +scilab2ccode.deps.csquMagna=["cmagna"] +scilab2ccode.deps.dsquMagns=[] +scilab2ccode.deps.dsquMagna=["dmagna"] +scilab2ccode.deps.ssquMagns=[] +scilab2ccode.deps.ssquMagna=["smagna"] +scilab2ccode.deps.zsquMagns=["zreals","zimags"] +scilab2ccode.deps.zsquMagna=["zmagna"] + + +//trace +scilab2ccode.deps.ctracea=["creals","cimags","FloatComplex"] +scilab2ccode.deps.dtracea=[] +scilab2ccode.deps.stracea=[] +scilab2ccode.deps.ztracea=["zreals","zimags","DoubleComplex"] +scilab2ccode.deps.i8tracea=[] +scilab2ccode.deps.i16tracea=[] +scilab2ccode.deps.u8tracea=[] +scilab2ccode.deps.u16tracea=[] + + +//transpose +scilab2ccode.deps.ctransposea=["creals","cimags","FloatComplex"] +scilab2ccode.deps.dtransposea=[] +scilab2ccode.deps.stransposea=[] +scilab2ccode.deps.ztransposea=["zreals","zimags","DoubleComplex"] +scilab2ccode.deps.i8transposea=[] +scilab2ccode.deps.i16transposea=[] +scilab2ccode.deps.u8transposea=[] +scilab2ccode.deps.u16transposea=[] + +//tril +scilab2ccode.deps.dtrila=[] +scilab2ccode.deps.i8trila=[] +scilab2ccode.deps.i16trila=[] +scilab2ccode.deps.strila=[] +scilab2ccode.deps.u8trila=[] +scilab2ccode.deps.u16trila=[] + +//triu +scilab2ccode.deps.dtriua=[] +scilab2ccode.deps.i8triua=[] +scilab2ccode.deps.i16triua=[] +scilab2ccode.deps.striua=[] +scilab2ccode.deps.u8triua=[] +scilab2ccode.deps.u16triua=[] + +//zeros +scilab2ccode.deps.czerosa=["FloatComplex"] +scilab2ccode.deps.dzerosa=[] +scilab2ccode.deps.dzerosh=[] +scilab2ccode.deps.i8zerosa=[] +scilab2ccode.deps.i16zerosa=[] +scilab2ccode.deps.szerosa=[] +scilab2ccode.deps.u8zerosa=[] +scilab2ccode.deps.u16zerosa=[] +scilab2ccode.deps.zzerosa=["DoubleComplex"] + +//////////////////////// +////// OPERATIONS ////// +//////////////////////// + + +//addition +scilab2ccode.deps.cadds=["creals","cimags","FloatComplex"] +scilab2ccode.deps.cadda=["cadds"] +scilab2ccode.deps.dadds=[] +scilab2ccode.deps.dadda=["dadds"] +scilab2ccode.deps.sadds=[] +scilab2ccode.deps.sadda=["sadds"] +scilab2ccode.deps.zadds=["zreals","zimags","DoubleComplex"] +scilab2ccode.deps.zadda=["zadds"] +scilab2ccode.deps.i8adda=["i8adds"] +scilab2ccode.deps.i8adds=[] +scilab2ccode.deps.i16adda=["i16adds"] +scilab2ccode.deps.i16adds=[] +scilab2ccode.deps.u8adda=["u8adds"] +scilab2ccode.deps.u8adds=[] +scilab2ccode.deps.u16adda=["u16adds"] +scilab2ccode.deps.u16adds=[] + + +//division +scilab2ccode.deps.crdivs=["FloatComplex"] +scilab2ccode.deps.crdiva=["crdivs"] +scilab2ccode.deps.drdivs=[] +scilab2ccode.deps.drdiva=["drdivs"] +scilab2ccode.deps.srdivs=[] +scilab2ccode.deps.srdiva=["srdivs"] +scilab2ccode.deps.zrdivs=["DoubleComplex"] +scilab2ccode.deps.zrdiva=["zrdivs"] +scilab2ccode.deps.cldivs=["cmuls","cconjs","creals","cimags","FloatComplex","crdivs"] +scilab2ccode.deps.cldiva=["cldivs"] +scilab2ccode.deps.dldivs=[] +scilab2ccode.deps.dldiva=["dldivs"] +scilab2ccode.deps.sldivs=[] +scilab2ccode.deps.sldiva=["scldivs"] +scilab2ccode.deps.zldivs=["zmuls","zconjs","zreals","zimags","DoubleComplex","zrdivs"] +scilab2ccode.deps.zldiva=["zldivs"] +scilab2ccode.deps.i8ldiva=["i8ldivs"] +scilab2ccode.deps.i8ldivs=[] +scilab2ccode.deps.i8rdiva=["i8rdivs"] +scilab2ccode.deps.i8rdivs=[] +scilab2ccode.deps.i16ldiva=["i16ldivs"] +scilab2ccode.deps.i16ldivs=[] +scilab2ccode.deps.i16rdiva=["i16rdivs"] +scilab2ccode.deps.i16rdivs=[] +scilab2ccode.deps.u8ldiva=["u8ldivs"] +scilab2ccode.deps.u8ldivs=[] +scilab2ccode.deps.u8rdiva=["u8rdivs"] +scilab2ccode.deps.u8rdivs=[] +scilab2ccode.deps.u16ldiva=["u16ldivs"] +scilab2ccode.deps.u16ldivs=[] +scilab2ccode.deps.u16rdiva=["u16rdivs"] +scilab2ccode.deps.u16rdivs=[] + +//multiplication +scilab2ccode.deps.cmuls=["FloatComplex"] +scilab2ccode.deps.cmula=["cmuls"] +scilab2ccode.deps.dmuls=[] +scilab2ccode.deps.dmula=["dmuls"] +scilab2ccode.deps.smuls=[] +scilab2ccode.deps.smula=["smuls"] +scilab2ccode.deps.zmuls=["DoubleComplex"] +scilab2ccode.deps.zmula=["zmuls"] +scilab2ccode.deps.cmulcsv=["cmulv"] +scilab2ccode.deps.cmulscv=["cmulv"] +scilab2ccode.deps.cmulv=["cadds"] +scilab2ccode.deps.dmulv=["dmuls"] +scilab2ccode.deps.i8muls=[] +scilab2ccode.deps.i8mula=["i8muls"] +scilab2ccode.deps.i8mulv=["i8muls"] +scilab2ccode.deps.i16muls=[] +scilab2ccode.deps.i16mula=["i16muls"] +scilab2ccode.deps.i16mulv=["i16muls"] +scilab2ccode.deps.smulv=["smuls"] +scilab2ccode.deps.u8muls=[] +scilab2ccode.deps.u8mula=["u8muls"] +scilab2ccode.deps.u8mulv=["u8muls"] +scilab2ccode.deps.u16muls=[] +scilab2ccode.deps.u16mula=["u16muls"] +scilab2ccode.deps.u16mulv=["u16muls"] +scilab2ccode.deps.zmuldzv=["dzerosa","zmulv"] +scilab2ccode.deps.zmulzdv=["dzerosa","zmulv"] +scilab2ccode.deps.zmulv=["zadds"] + +//subtraction +scilab2ccode.deps.cdiffs=["creals","cimags","FloatComplex"] +scilab2ccode.deps.cdiffa=["cdiffs"] +scilab2ccode.deps.ddiffs=[] +scilab2ccode.deps.ddiffa=["ddiffs"] +scilab2ccode.deps.sdiffs=[] +scilab2ccode.deps.sdiffa=["sdiffs"] +scilab2ccode.deps.zdiffs=["zreals","zimags","DoubleComplex"] +scilab2ccode.deps.zdiffa=["zdiffs"] +scilab2ccode.deps.i8diffs=[] +scilab2ccode.deps.i8diffa=["i8diffs"] +scilab2ccode.deps.i16diffa=["i16diffs"] +scilab2ccode.deps.i16diffs=[] +scilab2ccode.deps.u8diffa=["u8diffs"] +scilab2ccode.deps.u8diffs=[] +scilab2ccode.deps.u16diffa=["u16diffs"] +scilab2ccode.deps.u16diffs=[] + + +/////////////////////////////// +////// SIGNAL PROCESSING ////// +/////////////////////////////// + + +//conv +scilab2ccode.deps.cconva=["FloatComplex","cfftma","cmula","cifftma"] +scilab2ccode.deps.dconva=["DoubleComplex","zconva","zreala"] +scilab2ccode.deps.sconva=["FloatComplex","cconva","creala"] +scilab2ccode.deps.zconva=["DoubleComplex","zfftma","zmula","zifftma"] + + +//conv2d +scilab2ccode.deps.cconv2da=["FloatComplex","cadds","cmuls"] +scilab2ccode.deps.dconv2da=[] +scilab2ccode.deps.sconv2da=[] +scilab2ccode.deps.zconv2da=["DoubleComplex","zadds","zmuls"] + + +//cross correlation +scilab2ccode.deps.ccrossCorra=["cconjs","cconv2da"] +scilab2ccode.deps.dcrossCorra=["dconv2da"] +scilab2ccode.deps.scrossCorra=["sconv2da"] +scilab2ccode.deps.zcrossCorra=["zconjs","zconv2da"] + + +//fft +scilab2ccode.deps.cfftma=["DoubleComplex","creals","cimags","zfftma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.dfft2=["dfftbi"] +scilab2ccode.deps.dfftbi=["dfftmx"] +scilab2ccode.deps.dfftmx=[] +scilab2ccode.deps.dfftma=["dzerosa","zfftma","zreala"] +scilab2ccode.deps.fft842=["r2tx","r4tx","r8tx","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.r2tx=["zadds","zdiffs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.r4tx=["zadds","zdiffs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.r8tx=["zadds","zdiffs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.zfftma=["zreala","zimaga","fft842","dfft2","DoubleComplexMatrix"] +scilab2ccode.deps.sfftma=["szerosa","cfftma","creala"] + +//hilbert +scilab2ccode.deps.dhilberts=[] +scilab2ccode.deps.dhilberta=["DoubleComplex","zfftma","zmuls","zifftma"] +scilab2ccode.deps.shilberts=[] +scilab2ccode.deps.shilberta=["FloatComplex","cfftma","cmuls","cifftma"] + +//fftshift +scilab2ccode.deps.ccolumnfftshifta=[] +scilab2ccode.deps.cfftshifta=["crowfftshifta","ccolumnfftshifta"] +scilab2ccode.deps.crowfftshifta=[] +scilab2ccode.deps.dcolumnfftshifta=[] +scilab2ccode.deps.dfftshifta=["drowfftshifta","dcolumnfftshifta"] +scilab2ccode.deps.drowfftshifta=[] +scilab2ccode.deps.scolumnfftshifta=[] +scilab2ccode.deps.sfftshifta=["srowfftshifta","scolumnfftshifta"] +scilab2ccode.deps.srowfftshifta=[] +scilab2ccode.deps.zcolumnfftshifta=[] +scilab2ccode.deps.zfftshifta=["zrowfftshifta","zcolumnfftshifta"] +scilab2ccode.deps.zrowfftshifta=[] + + +//ifft +scilab2ccode.deps.cifftma=["DoubleComplex","creals","cimags","zifftma","FloatComplex","zreals","zimags"] +scilab2ccode.deps.difft2=["difftbi"] +scilab2ccode.deps.difftbi=["difftmx"] +scilab2ccode.deps.difftmx=[] +scilab2ccode.deps.ifft842=["ir2tx","ir4tx","ir8tx","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.ir2tx=["zadds","zdiffs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.ir4tx=["zadds","zdiffs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.ir8tx=["zadds","zdiffs","DoubleComplex","zreals","zimags"] +scilab2ccode.deps.zifftma=["zreala","zimaga","ifft842","difft2","DoubleComplexMatrix"] +scilab2ccode.deps.diffbi_lavraie=[] +scilab2ccode.deps.difftma=["dzerosa","zifftma","zreala"] +scilab2ccode.deps.sifftma=["szerosa","cifftma","creala"] + +//lev +scilab2ccode.deps.cleva=["crdivs","FloatComplex","creals","cimags","cmuls","cconjs","cdiffs","cadds"] +scilab2ccode.deps.cleva2=["crdivs","FloatComplex","creals","cimags","cmuls","cconjs","cdiffs","cadds"] +scilab2ccode.deps.dleva=[] +scilab2ccode.deps.dleva2=[] +scilab2ccode.deps.sleva=[] +scilab2ccode.deps.sleva2=[] +scilab2ccode.deps.zleva=["zrdivs","DoubleComplex","zreals","zimags","zmuls","zdiffs","zconjs","zadds"] +scilab2ccode.deps.zleva2=["zrdivs","DoubleComplex","zreals","zimags","zmuls","zdiffs","zconjs","zadds"] + + +//levin +scilab2ccode.deps.dlevina=["dinitTab","dr1","dr2","dr3","dr4","dlevinmul","dinverma","dmulma","dlevinmul2","ddecalage","dlevinsub","dlevinsig"] +scilab2ccode.deps.slevina=["sinitTab","sr1","sr2","sr3","sr4","slevinmul","sinverma","smulma","slevinmul2","sdecalage","slevinsub","slevinsig"] +scilab2ccode.deps.dinitTab=[] +scilab2ccode.deps.dr1=[] +scilab2ccode.deps.dr2=[] +scilab2ccode.deps.dr3=[] +scilab2ccode.deps.dr4=[] +scilab2ccode.deps.dlevinmul=[] +scilab2ccode.deps.dlevinmul2=[] +scilab2ccode.deps.ddecalage=[] +scilab2ccode.deps.dlevinsub=[] +scilab2ccode.deps.dlevinsig=[] +scilab2ccode.deps.sinitTab=[] +scilab2ccode.deps.sr1=[] +scilab2ccode.deps.sr2=[] +scilab2ccode.deps.sr3=[] +scilab2ccode.deps.sr4=[] +scilab2ccode.deps.slevinmul=[] +scilab2ccode.deps.slevinmul2=[] +scilab2ccode.deps.sdecalage=[] +scilab2ccode.deps.slevinsub=[] +scilab2ccode.deps.slevinsig=[] +scilab2ccode.deps.levinUtils=[] + +//lpc2cep +scilab2ccode.deps.clpc2cepa=["cfftma","clogma","cifftma"] +scilab2ccode.deps.dlpc2cepa=["DoubleComplex","zfftma","zlogma","zifftma","zreala"] +scilab2ccode.deps.slpc2cepa=["FloatComplex","cfftma","clogma","cifftma","creala"] +scilab2ccode.deps.zlpc2cepa=["zfftma","zlogma","zifftma"] + + +///////////////////////////////// +////// STATISTIC FUNCTIONS ////// +///////////////////////////////// + +//max +scilab2ccode.deps.dcolumnmaxa=[] +scilab2ccode.deps.dmaxa=[] +scilab2ccode.deps.drowmaxa=[] +scilab2ccode.deps.i8columnmaxa=[] +scilab2ccode.deps.i8maxa=[] +scilab2ccode.deps.i8rowmaxa=[] +scilab2ccode.deps.i16columnmaxa=[] +scilab2ccode.deps.i16maxa=[] +scilab2ccode.deps.i16rowmaxa=[] +scilab2ccode.deps.scolumnmaxa=[] +scilab2ccode.deps.smaxa=[] +scilab2ccode.deps.srowmaxa=[] +scilab2ccode.deps.u8columnmaxa=[] +scilab2ccode.deps.u8maxa=[] +scilab2ccode.deps.u8rowmaxa=[] +scilab2ccode.deps.u16columnmaxa=[] +scilab2ccode.deps.u16maxa=[] +scilab2ccode.deps.u16rowmaxa=[] + +//mean +scilab2ccode.deps.cmeana=["FloatComplex","cadds","creals","cimags"] +scilab2ccode.deps.dmeana=[] +scilab2ccode.deps.smeana=[] +scilab2ccode.deps.zmeana=["DoubleComplex","zadds","zreals","zimags"] +scilab2ccode.deps.ccolumnmeana=["ccolumnsuma","crdivs","FloatComplex"] +scilab2ccode.deps.dcolumnmeana=["dcolumnsuma"] +scilab2ccode.deps.scolumnmeana=["scolumnsuma"] +scilab2ccode.deps.zcolumnmeana=["zcolumnsuma","zrdivs","DoubleComplex"] +scilab2ccode.deps.crowmeana=["crowsuma","crdivs","FloatComplex"] +scilab2ccode.deps.drowmeana=["drowsuma"] +scilab2ccode.deps.srowmeana=["srowsuma"] +scilab2ccode.deps.zrowmeana=["zrowsuma","zrdivs","DoubleComplex"] + +//meanf +scilab2ccode.deps.cmeanfa=["FloatComplex","cadds","crdivs"] +scilab2ccode.deps.dmeanfa=[] +scilab2ccode.deps.smeanfa=[] +scilab2ccode.deps.zmeanfa=["DoubleComplex","zadds","zmuls","zrdivs"] +scilab2ccode.deps.ccolumnmeanfa=["cadds","cmuls","FloatComplex","crdivs"] +scilab2ccode.deps.dcolumnmeanfa=[] +scilab2ccode.deps.scolumnmeanfa=[] +scilab2ccode.deps.zcolumnmeanfa=["zmuls","zrdivs","DoubleComplex","zadds"] +scilab2ccode.deps.crowmeanfa=["cmuls","crdivs","FloatComplex","cadds"] +scilab2ccode.deps.drowmeanfa=["drowsuma"] +scilab2ccode.deps.srowmeanfa=[] +scilab2ccode.deps.zrowmeanfa=["zmuls","zrdivs","DoubleComplex","zadds"] +scilab2ccode.deps.cmeanfcs=["szerosa","cmeanfa"] +scilab2ccode.deps.cmeanfsc=["szerosa","cmeanfa"] +scilab2ccode.deps.zmeanfdz=["dzerosa","zmeanfa"] +scilab2ccode.deps.zmeanfzd=["dzerosa","zmeanfa"] + +//min +scilab2ccode.deps.dcolumnmina=[] +scilab2ccode.deps.dmina=[] +scilab2ccode.deps.drowmina=[] +scilab2ccode.deps.i8columnmina=[] +scilab2ccode.deps.i8mina=[] +scilab2ccode.deps.i8rowmina=[] +scilab2ccode.deps.i16columnmina=[] +scilab2ccode.deps.i16mina=[] +scilab2ccode.deps.i16rowmina=[] +scilab2ccode.deps.scolumnmina=[] +scilab2ccode.deps.smina=[] +scilab2ccode.deps.srowmina=[] +scilab2ccode.deps.u8columnmina=[] +scilab2ccode.deps.u8mina=[] +scilab2ccode.deps.u8rowmina=[] +scilab2ccode.deps.u16columnmina=[] +scilab2ccode.deps.u16mina=[] +scilab2ccode.deps.u16rowmina=[] +//prod +scilab2ccode.deps.cproda=["cmuls"] +scilab2ccode.deps.dproda=[] +scilab2ccode.deps.sproda=[] +scilab2ccode.deps.zproda=["zmuls"] +scilab2ccode.deps.ccolumnproda=["cmuls"] +scilab2ccode.deps.dcolumnproda=[] +scilab2ccode.deps.scolumnproda=[] +scilab2ccode.deps.zcolumnproda=["zmuls"] +scilab2ccode.deps.crowproda=["cmuls"] +scilab2ccode.deps.drowproda=[] +scilab2ccode.deps.srowproda=[] +scilab2ccode.deps.zrowproda=["zmuls"] + +//stdevf +scilab2ccode.deps.ccolumnstdevfa=["FloatComplex","cpows","cdiffs","cmuls","cadds","sabss","creals","cimags","crdivs","csqrts"] +scilab2ccode.deps.cstdevfa=["FloatComplex","cmeanfa","cpows","cmuls","cadds","crdivs","csqrts","cdiffs"] +scilab2ccode.deps.crowstdevfa=["FloatComplex","crowmeanfa","cpows","cdiffs","cmuls","cadds""sabss","creals","cimags","crdivs","csqrts"] +scilab2ccode.deps.cstdevfcs=["FloatComplex","cmeanfcs","cpows","cdiffs","cmuls","cadds","creals","cimags","csqrts"] +scilab2ccode.deps.cstdevfsc=["szerosa","cstdevfa"] +scilab2ccode.deps.dcolumnstdevfa=["dcolumnmeanfa","dpows","dsqrts"] +scilab2ccode.deps.dstdevfa=[] +scilab2ccode.deps.drowstdevfa=[] +scilab2ccode.deps.i8columnmina=[] +scilab2ccode.deps.i8mina=[] +scilab2ccode.deps.i8rowmina=[] +scilab2ccode.deps.i16columnmina=[] +scilab2ccode.deps.i16mina=[] +scilab2ccode.deps.i16rowmina=[] +scilab2ccode.deps.scolumnmina=[] +scilab2ccode.deps.smina=[] +scilab2ccode.deps.srowmina=[] +scilab2ccode.deps.u8columnmina=[] +scilab2ccode.deps.u8mina=[] +scilab2ccode.deps.u8rowmina=[] +scilab2ccode.deps.u16columnmina=[] +scilab2ccode.deps.u16mina=[] +scilab2ccode.deps.u16rowmina=[] + +//sum +scilab2ccode.deps.csuma=["cadds"] +scilab2ccode.deps.dsuma=[] +scilab2ccode.deps.ssuma=[] +scilab2ccode.deps.zsuma=["zadds"] +scilab2ccode.deps.ccolumnsuma=["cadds"] +scilab2ccode.deps.dcolumnsuma=[] +scilab2ccode.deps.scolumnsuma=[] +scilab2ccode.deps.zcolumnsuma=["zadds"] +scilab2ccode.deps.crowsuma=["cadds"] +scilab2ccode.deps.drowsuma=[] +scilab2ccode.deps.srowsuma=[] +scilab2ccode.deps.zrowsuma=["zadds"] +scilab2ccode.deps.i8suma=["i8adds"] +scilab2ccode.deps.i8columnsuma=["i8adds"] +scilab2ccode.deps.i8rowsuma=["i8adds"] +scilab2ccode.deps.i16suma=["i16adds"] +scilab2ccode.deps.i16columnsuma=["i16adds"] +scilab2ccode.deps.i16rowsuma=["i16adds"] +scilab2ccode.deps.u8suma=["u8adds"] +scilab2ccode.deps.U8columnsuma=["u8adds"] +scilab2ccode.deps.u8rowsuma=["u8adds"] +scilab2ccode.deps.u16suma=["u16adds"] +scilab2ccode.deps.u16columnsuma=["u16adds"] +scilab2ccode.deps.u16rowsuma=["u16adds"] + +//variance +scilab2ccode.deps.cvariancea=["FloatComplex","cmeana","cdiffs","cadds","cpows","creals","cimags","crdivs"] +scilab2ccode.deps.dvariancea=["dmeana","dpows"] +scilab2ccode.deps.svariancea=["smeana","spows"] +scilab2ccode.deps.zvariancea=["DoubleComplex","zmeana","zdiffs","zadds","zpows","zreals","zimags","zrdivs"] +scilab2ccode.deps.ccolumnvariancea=["cvariancea"] +scilab2ccode.deps.dcolumnvariancea=["dvariancea"] +scilab2ccode.deps.scolumnvariancea=["svariancea"] +scilab2ccode.deps.zcolumnvariancea=["zvariancea"] +scilab2ccode.deps.crowvariancea=["ctransposea","FloatComplex","creals","cimags","cvariancea"] +scilab2ccode.deps.drowvariancea=["dtransposea","dvariancea"] +scilab2ccode.deps.srowvariancea=["stransposea","svariancea"] +scilab2ccode.deps.zrowvariancea=["ztransposea","DoubleComplex","zreals","zimags","zvariancea"] + +//variancef +scilab2ccode.deps.cvariancefa=["FloatComplex","cmeanfa","cdiffs","cadds","cpows","cmuls","crdivs"] +scilab2ccode.deps.dvariancefa=["dmeanfa","dpows"] +scilab2ccode.deps.svariancefa=["smeanfa","spows"] +scilab2ccode.deps.zvariancefa=["DoubleComplex","zmeanfa","zdiffs","zadds","zpows","zrdivs"] +scilab2ccode.deps.ccolumnvariancefa=["cvariancefa","ctransposea"] +scilab2ccode.deps.dcolumnvariancefa=["dvariancefa","dtransposea"] +scilab2ccode.deps.scolumnvariancefa=["scolumnmeanfa","spows"] +scilab2ccode.deps.zcolumnvariancefa=["zvariancefa","ztransposea"] +scilab2ccode.deps.crowvariancefa=["cvariancefa"] +scilab2ccode.deps.drowvariancefa=["dvariancefa"] +scilab2ccode.deps.srowvariancefa=["svariancefa"] +scilab2ccode.deps.zrowvariancefa=["zvariancefa"] + + +//////////////////// +////// STRING ////// +//////////////////// + +//convstr +scilab2ccode.deps.gconvstrs=[] + +//disp +scilab2ccode.deps.cdisps=["creals","cimags"] +scilab2ccode.deps.cdispa=["creals","cimags"] +scilab2ccode.deps.ddisps=[] +scilab2ccode.deps.ddispa=[] +scilab2ccode.deps.sdisps=[] +scilab2ccode.deps.sdispa=[] +scilab2ccode.deps.zdisps=["zreals","zimags"] +scilab2ccode.deps.zdispa=["zreals","zimags"] +scilab2ccode.deps.ddisph=[] +scilab2ccode.deps.i8disps=[] +scilab2ccode.deps.i8dispa=[] +scilab2ccode.deps.i16disps=[] +scilab2ccode.deps.i16dispa=[] +scilab2ccode.deps.u8disps=[] +scilab2ccode.deps.u8dispa=[] +scilab2ccode.deps.u16disps=[] +scilab2ccode.deps.u16dispa=[] + +//string +scilab2ccode.deps.cstringa=["cstrings"] +scilab2ccode.deps.cstrings=["creals","cimags"] +scilab2ccode.deps.dstringa=["dstrings"] +scilab2ccode.deps.dstrings=[] +scilab2ccode.deps.i8stringa=["i8strings"] +scilab2ccode.deps.i8strings=[] +scilab2ccode.deps.i16stringa=["i16strings"] +scilab2ccode.deps.i16strings=[] +scilab2ccode.deps.sstringa=["sstrings"] +scilab2ccode.deps.sstrings=[] +scilab2ccode.deps.u8stringa=["u8strings"] +scilab2ccode.deps.u8strings=[] +scilab2ccode.deps.u16stringa=["u16strings"] +scilab2ccode.deps.u16strings=[] +scilab2ccode.deps.zstringa=["zstrings"] +scilab2ccode.deps.zstrings=[] + +//strrchr +scilab2ccode.deps.gstrrchra=[] + +//strrev +scilab2ccode.deps.gstrreva=[] + +//strsubst +scilab2ccode.deps.gstrsubsta=[] + +/////////////////// +////// TYPES ////// +/////////////////// + +scilab2ccode.deps.floatComplex=["creals","cimags","FloatComplex","cisreals","cisimags"] +scilab2ccode.deps.doubleComplex=["zreals","zimags","DoubleComplex","zisreals","zisimags"] + +//floatComplex +scilab2ccode.deps.creals=[] +scilab2ccode.deps.cimags=[] +scilab2ccode.deps.creala=["creals"] +scilab2ccode.deps.cimaga=["cimags"] +scilab2ccode.deps.FloatComplex=[] +scilab2ccode.deps.FloatComplexMatrix=["FloatComplex"] +scilab2ccode.deps.cisreals=["cimags"] +scilab2ccode.deps.cisimags=["creals"] + + +//doubleComplex +scilab2ccode.deps.zreals=[] +scilab2ccode.deps.zimags=[] +scilab2ccode.deps.zreala=["zreals"] +scilab2ccode.deps.zimaga=["zimags"] +scilab2ccode.deps.DoubleComplex=[] +scilab2ccode.deps.DoubleComplexMatrix=["DoubleComplex"] +scilab2ccode.deps.zisreals=["zimags"] +scilab2ccode.deps.zisimags=["zreals"] + +//Arduino Functions +scilab2ccode.deps.u8cmd_analog_ins=["duint16a","duint16s","i8uint16a","i8uint16s","i16uint16a","i16uint16s","suint16a","suint16s","u8uint16a","u8uint16s"] +scilab2ccode.deps.u8cmd_analog_in_volts=["dfloats","dfloata","i8floats","i8floata","i16floats","i16floata","sfloats","sfloata","u8floats","u8floata","u16floats","u16floata"] +scilab2ccode.deps.u8cmd_analog_outs=[] +scilab2ccode.deps.u8cmd_analog_out_volts=[] +scilab2ccode.deps.u8cmd_dcmotor_releases=[] +scilab2ccode.deps.u8cmd_dcmotor_runs=[] +scilab2ccode.deps.u8cmd_dcmotor_setups=[] +scilab2ccode.deps.u8cmd_digital_ins=["duint8a","duint8s","i8uint8a","i8uint8s","i16uint8a","i16uint8s","suint8a","suint8s","u16uint8a","u16uint8s"] +scilab2ccode.deps.u8cmd_digital_outs=[] +scilab2ccode.deps.u8cmd_i2c_devs=["duint8a","duint8s","i8uint8a","i8uint8s","i16uint8a","i16uint8s","suint8a","suint8s","u16uint8a","u16uint8s"] +scilab2ccode.deps.u8cmd_i2c_reads=[] +scilab2ccode.deps.u8cmd_i2c_read_registers=[] +scilab2ccode.deps.u8cmd_i2c_writes=[] +scilab2ccode.deps.u8cmd_i2c_write_registers=[] +scilab2ccode.deps.u8cmd_servo_attach=[] +scilab2ccode.deps.u8cmd_servo_move=[] +scilab2ccode.deps.u8cmd_servo_detach=[] +scilab2ccode.deps.u16sleeps=[] + +endfunction diff --git a/2.3-1/macros/findDeps/buildmacros.sce b/2.3-1/macros/findDeps/buildmacros.sce new file mode 100644 index 00000000..60fd2843 --- /dev/null +++ b/2.3-1/macros/findDeps/buildmacros.sce @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce')); + +clear tbx_build_macros; diff --git a/2.3-1/macros/findDeps/findDeps.sci b/2.3-1/macros/findDeps/findDeps.sci new file mode 100644 index 00000000..965ae8e0 --- /dev/null +++ b/2.3-1/macros/findDeps/findDeps.sci @@ -0,0 +1,44 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) INRIA - 2009 - Arnaud TORSET +// +// 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 + + +function y=findDeps(x, deps) +//give the dependances of x +// + +nbArgsIn = size(deps.x,'c'); +//stocke deps.x dans y +y=deps.x; +for i=1:nbArgsIn, + //on boucle sur le nombre d'entrées afin de pouvoir extraire chaque éléments + //l'element est stockédans deps(deps.a(i)) + for j=1:size(deps(deps.a(i)),'c'), + //on boucle sur les dependances de cet element afin de savoir s'il faut rajoutere des dependances + nouveau = 0; + for k=1:size(y,'c'), + //on boucle sur le nombre d'elements de y afin de faire une comparaison entre les elements + //presents et absents de la liste. + //S'il est absent de la liste(nouveau=0), on le rajoute à y, sinon(nouveau=1) on fait rien + if (deps(deps.a(i))(j)==deps.y(k)) then nouveau=nouveau+1;end; + end; + if (nouveau==0) then y(1,size(y,'c')+1)=deps(deps.a(i))(j);end; + end; +end; + +//si le nb de parametres du début est égal à celui de la fin alors on arrete, sinon on continue +nbArgsOut = size(deps.y,'c'); +if (nbArgsOut>nbArgsIn) then findDeps(y, deps); +else if (nbArgsOut<nbArgsIn) then disp("error");end; +end; + +endfunction + + + + diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci new file mode 100644 index 00000000..85baef1a --- /dev/null +++ b/2.3-1/macros/findDeps/getAllHeaders.sci @@ -0,0 +1,258 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +function allHeaders = getAllHeaders(SharedInfo) + Target = SharedInfo.Target; + + //Header files common to all types of output format. + Standalone_headers = [ + "includes/blas.h" + "includes/lapack.h" + "includes/constant.h" + "includes/f2c.h" + "includes/notFound.h" + "includes/sci2clib.h" + "src/c/auxiliaryFunctions/includes/abs.h" + "src/c/auxiliaryFunctions/includes/max.h" + "src/c/auxiliaryFunctions/includes/min.h" + "src/c/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h" + "src/c/auxiliaryFunctions/includes/find2d.h" + "src/c/auxiliaryFunctions/includes/length.h" + "src/c/auxiliaryFunctions/includes/conj.h" + "src/c/auxiliaryFunctions/includes/find.h" + "src/c/auxiliaryFunctions/includes/frexp.h" + "src/c/auxiliaryFunctions/includes/rand.h" + "src/c/auxiliaryFunctions/includes/sign.h" + "src/c/auxiliaryFunctions/includes/size.h" + "src/c/auxiliaryFunctions/includes/type.h" + "src/c/auxiliaryFunctions/includes/pythag.h" + "src/c/auxiliaryFunctions/includes/isempty.h" + "src/c/auxiliaryFunctions/includes/isnan.h" + "src/c/type/doubleComplex.h" + "src/c/type/dynlib_type.h" + "src/c/type/floatComplex.h" + "src/c/type/types.h" + "src/c/matrixOperations/includes/cat.h" + "src/c/matrixOperations/includes/hilb.h" + "src/c/matrixOperations/includes/eye.h" + "src/c/matrixOperations/includes/matrixTrace.h" + "src/c/matrixOperations/includes/matrixExponential.h" + "src/c/matrixOperations/includes/matrixInversion.h" + "src/c/matrixOperations/includes/infiniteNorm.h" + "src/c/matrixOperations/includes/zeros.h" + "src/c/matrixOperations/includes/matrixMagnitude.h" + "src/c/matrixOperations/includes/chol.h" + "src/c/matrixOperations/includes/dist.h" + "src/c/matrixOperations/includes/fill.h" + "src/c/matrixOperations/includes/dynlib_matrixoperations.h" + "src/c/matrixOperations/includes/matrixPow.h" + "src/c/matrixOperations/includes/matrixDivision.h" + "src/c/matrixOperations/includes/jmat.h" + "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/matrixOperations/includes/matrixTranspose.h" + "src/c/matrixOperations/includes/determ.h" + "src/c/matrixOperations/includes/matrixMultiplication.h" + "src/c/matrixOperations/includes/diag.h" + "src/c/matrixOperations/includes/cumsum.h" + "src/c/matrixOperations/includes/cumprod.h" + "src/c/matrixOperations/includes/triu.h" + "src/c/matrixOperations/includes/tril.h" + "src/c/matrixOperations/includes/kron.h" + "src/c/matrixOperations/includes/flipdim.h" + "src/c/matrixOperations/includes/norm.h" + "src/c/elementaryFunctions/includes/cos.h" + "src/c/elementaryFunctions/includes/fix.h" + "src/c/elementaryFunctions/includes/exp.h" + "src/c/elementaryFunctions/includes/int.h" + "src/c/elementaryFunctions/includes/log.h" + "src/c/elementaryFunctions/includes/pow.h" + "src/c/elementaryFunctions/includes/sin.h" + "src/c/elementaryFunctions/includes/tan.h" + "src/c/elementaryFunctions/includes/round.h" + "src/c/elementaryFunctions/includes/log10.h" + "src/c/elementaryFunctions/includes/log1p.h" + "src/c/elementaryFunctions/includes/acos.h" + "src/c/elementaryFunctions/includes/asin.h" + "src/c/elementaryFunctions/includes/atan.h" + "src/c/elementaryFunctions/includes/floor.h" + "src/c/elementaryFunctions/includes/ceil.h" + "src/c/elementaryFunctions/includes/exp10.h" + "src/c/elementaryFunctions/includes/cosh.h" + "src/c/elementaryFunctions/includes/dynlib_elementaryfunctions.h" + "src/c/elementaryFunctions/includes/acosh.h" + "src/c/elementaryFunctions/includes/sinh.h" + "src/c/elementaryFunctions/includes/lnp1m1.h" + "src/c/elementaryFunctions/includes/tanh.h" + "src/c/elementaryFunctions/includes/sqrt.h" + "src/c/elementaryFunctions/includes/bitand.h" + "src/c/elementaryFunctions/includes/bitor.h" + "src/c/elementaryFunctions/includes/bitxor.h" + "src/c/elementaryFunctions/includes/bitcmp.h" + "src/c/elementaryFunctions/includes/bitset.h" + "src/c/elementaryFunctions/includes/bitget.h" + "src/c/elementaryFunctions/includes/linspace.h" + "src/c/elementaryFunctions/includes/logspace.h" + "src/c/elementaryFunctions/includes/asinh.h" + "src/c/elementaryFunctions/includes/atan2.h" + "src/c/elementaryFunctions/includes/atanh.h" + "src/c/elementaryFunctions/includes/uint8.h" + "src/c/elementaryFunctions/includes/int8.h" + "src/c/elementaryFunctions/includes/uint16.h" + "src/c/elementaryFunctions/includes/int16.h" + "src/c/elementaryFunctions/includes/acosd.h" + "src/c/elementaryFunctions/includes/acot.h" + "src/c/elementaryFunctions/includes/acotd.h" + "src/c/elementaryFunctions/includes/acoth.h" + "src/c/elementaryFunctions/includes/acsc.h" + "src/c/elementaryFunctions/includes/acscd.h" + "src/c/elementaryFunctions/includes/acsch.h" + "src/c/elementaryFunctions/includes/asec.h" + "src/c/elementaryFunctions/includes/asecd.h" + "src/c/elementaryFunctions/includes/asech.h" + "src/c/elementaryFunctions/includes/asind.h" + "src/c/elementaryFunctions/includes/atand.h" + "src/c/statisticsFunctions/includes/variance.h" + "src/c/statisticsFunctions/includes/sum.h" + "src/c/statisticsFunctions/includes/mean.h" + "src/c/statisticsFunctions/includes/meanf.h" + "src/c/statisticsFunctions/includes/stdevf.h" + "src/c/statisticsFunctions/includes/prod.h" + "src/c/statisticsFunctions/includes/dynlib_statisticsfunctions.h" + "src/c/statisticsFunctions/includes/statMax.h" + "src/c/statisticsFunctions/includes/statMin.h" + "src/c/operations/includes/subtraction.h" + "src/c/operations/includes/addition.h" + "src/c/operations/includes/dynlib_operations.h" + "src/c/operations/includes/division.h" + "src/c/operations/includes/multiplication.h" + "src/c/string/includes/dynlib_string.h" + "src/c/string/includes/disp.h" + "src/c/string/includes/str.h" + "src/c/signalProcessing/fft/fft_internal.h" + "src/c/signalProcessing/ifft/ifft_internal.h" + "src/c/signalProcessing/levin/levinUtils.h" + "src/c/signalProcessing/includes/hilbert.h" + "src/c/signalProcessing/includes/fft.h" + "src/c/signalProcessing/includes/lev.h" + "src/c/signalProcessing/includes/levin.h" + "src/c/signalProcessing/includes/conv.h" + "src/c/signalProcessing/includes/conv2d.h" + "src/c/signalProcessing/includes/ifft.h" + "src/c/signalProcessing/includes/fftshift.h" + "src/c/signalProcessing/includes/lpc2cep.h" + "src/c/signalProcessing/includes/dynlib_signalprocessing.h" + "src/c/signalProcessing/includes/crossCorr.h" + "src/c/implicitList/dynlib_implicitlist.h" + "src/c/implicitList/implicitList.h" + "src/c/differential_calculus/includes/ode.h" + "src/c/differential_calculus/includes/diffc.h" + "src/c/Files/includes/files.h" + "src/c/string/includes/convstr.h" + "src/c/string/includes/strsubst.h" + //"src/c/string/includes/strcmp.h" + "src/c/string/includes/strrev.h" + "src/c/string/includes/strrchr.h" + "src/c/elementaryFunctions/includes/dec2bin.h" + "src/c/elementaryFunctions/includes/dec2hex.h" + "src/c/elementaryFunctions/includes/dec2oct.h" + "src/c/elementaryFunctions/includes/oct2dec.h" + "src/c/elementaryFunctions/includes/hex2dec.h" + "src/c/elementaryFunctions/includes/bin2dec.h" + "src/c/elementaryFunctions/includes/dec2base.h" + "src/c/elementaryFunctions/includes/base2dec.h" + "src/c/elementaryFunctions/includes/cosd.h" + "src/c/elementaryFunctions/includes/cotd.h" + "src/c/elementaryFunctions/includes/coth.h" + "src/c/elementaryFunctions/includes/csc.h" + "src/c/elementaryFunctions/includes/cscd.h" + "src/c/elementaryFunctions/includes/csch.h" + "src/c/elementaryFunctions/includes/sec.h" + "src/c/elementaryFunctions/includes/secd.h" + "src/c/elementaryFunctions/includes/sech.h" + "src/c/elementaryFunctions/includes/get_float.h" + "src/c/elementaryFunctions/includes/factorial.h" + "src/c/elementaryFunctions/includes/primes.h" + "src/c/elementaryFunctions/includes/factor.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/rcond.h"]; + + + //Header files required for "Arduino" output + Arduino_headers = [ + "src/c/scilab-arduino/includes/cmd_digital_out.h" + "src/c/scilab-arduino/includes/cmd_digital_in.h" + "src/c/scilab-arduino/includes/cmd_analog_out.h" + "src/c/scilab-arduino/includes/cmd_analog_in.h" + "src/c/scilab-arduino/includes/cmd_dcmotor_setup.h" + "src/c/scilab-arduino/includes/cmd_dcmotor_run.h" + //"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/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" + "src/c/hardware/avr/includes/AVRPeripheralADC.h" + "src/c/hardware/avr/includes/AVRPeripheralPWM.h" + "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" + "src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h" + "src/c/hardware/rasberrypi/includes/RPIPeripheralTiming.h" + "src/c/hardware/rasberrypi/includes/RPIPeripheralSerial.h" + "src/c/hardware/rasberrypi/includes/RPIPeripheralThreading.h" + "src/c/hardware/rasberrypi/includes/RPIPeripheralPinISR.h" + "src/c/hardware/rasberrypi/includes/RPIPeripheralPWM.h" + ]; + + OpenCV_headers = [ + "src/c/imageProcessing/includes/cvcore.hpp" + "src/c/imageProcessing/includes/cvhighgui.hpp" + "src/c/imageProcessing/includes/cvimgproc.hpp" + "thirdparty/includes/OpenCV/"]; + + if Target == "StandAlone" + allHeaders = Standalone_headers; + elseif Target == "Arduino" + allHeaders = cat(1,Standalone_headers, Arduino_headers); + elseif Target == "AVR" + allHeaders = cat(1,Standalone_headers, AVR_headers); + elseif Target == "RPi" + allHeaders = cat(1,Standalone_headers, RPi_headers); + end + + if (SharedInfo.OpenCVUsed == %T) + allHeaders = cat(1,allHeaders,OpenCV_headers); + end + +endfunction diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci new file mode 100644 index 00000000..e5c7e0a5 --- /dev/null +++ b/2.3-1/macros/findDeps/getAllInterfaces.sci @@ -0,0 +1,247 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +function allInterfaces = getAllInterfaces(SharedInfo) + Target = SharedInfo.Target; + //Interface files common to all types of output format + Standalone_interfaces = [ + "src/c/auxiliaryFunctions/interfaces/int_rand.h" + "src/c/auxiliaryFunctions/interfaces/int_sign.h" + "src/c/auxiliaryFunctions/interfaces/int_size.h" + "src/c/auxiliaryFunctions/interfaces/int_length.h" + "src/c/auxiliaryFunctions/interfaces/int_type.h" + "src/c/auxiliaryFunctions/interfaces/int_isempty.h" + "src/c/auxiliaryFunctions/interfaces/int_isnan.h" + "src/c/auxiliaryFunctions/interfaces/int_pythag.h" + "src/c/auxiliaryFunctions/interfaces/int_frexp.h" + "src/c/auxiliaryFunctions/interfaces/int_abs.h" + "src/c/auxiliaryFunctions/interfaces/int_max.h" + "src/c/auxiliaryFunctions/interfaces/int_min.h" + "src/c/auxiliaryFunctions/interfaces/int_conj.h" + "src/c/auxiliaryFunctions/interfaces/int_find.h" + "src/c/type/int_imag.h" + "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/matrixOperations/interfaces/int_cat.h" + "src/c/matrixOperations/interfaces/int_zeros.h" + "src/c/matrixOperations/interfaces/int_OpBackSlash.h" + "src/c/matrixOperations/interfaces/int_OpApex.h" + "src/c/matrixOperations/interfaces/int_OpCc.h" + "src/c/matrixOperations/interfaces/int_OpRc.h" + "src/c/matrixOperations/interfaces/int_transpose.h" + "src/c/matrixOperations/interfaces/int_v2magn.h" + "src/c/matrixOperations/interfaces/int_invert.h" + "src/c/matrixOperations/interfaces/int_OpSlash.h" + "src/c/matrixOperations/interfaces/int_OpDotApex.h" + "src/c/matrixOperations/interfaces/int_trace.h" + "src/c/matrixOperations/interfaces/int_det.h" + "src/c/matrixOperations/interfaces/int_eye.h" + "src/c/matrixOperations/interfaces/int_OpStar.h" + "src/c/matrixOperations/interfaces/int_chol.h" + "src/c/matrixOperations/interfaces/int_dist.h" + "src/c/matrixOperations/interfaces/int_fill.h" + "src/c/matrixOperations/interfaces/int_expm.h" + "src/c/matrixOperations/interfaces/int_diag.h" + "src/c/matrixOperations/interfaces/int_cumsum.h" + "src/c/matrixOperations/interfaces/int_cumprod.h" + "src/c/matrixOperations/interfaces/int_triu.h" + "src/c/matrixOperations/interfaces/int_tril.h" + "src/c/matrixOperations/interfaces/int_kron.h" + "src/c/matrixOperations/interfaces/int_flipdim.h" + "src/c/matrixOperations/interfaces/int_permute.h" + "src/c/matrixOperations/interfaces/int_norm.h" + "src/c/elementaryFunctions/interfaces/int_asinh.h" + "src/c/elementaryFunctions/interfaces/int_atanh.h" + "src/c/elementaryFunctions/interfaces/int_sinh.h" + "src/c/elementaryFunctions/interfaces/int_tanh.h" + "src/c/elementaryFunctions/interfaces/int_sqrt.h" + "src/c/elementaryFunctions/interfaces/int_OpDotHat.h" + "src/c/elementaryFunctions/interfaces/int_OpHat.h" + "src/c/elementaryFunctions/interfaces/int_lnp1m1.h" + "src/c/elementaryFunctions/interfaces/int_round.h" + "src/c/elementaryFunctions/interfaces/int_log10.h" + "src/c/elementaryFunctions/interfaces/int_log1p.h" + "src/c/elementaryFunctions/interfaces/int_floor.h" + "src/c/elementaryFunctions/interfaces/int_exp10.h" + "src/c/elementaryFunctions/interfaces/int_cos.h" + "src/c/elementaryFunctions/interfaces/int_fix.h" + "src/c/elementaryFunctions/interfaces/int_exp.h" + "src/c/elementaryFunctions/interfaces/int_int.h" + "src/c/elementaryFunctions/interfaces/int_log.h" + "src/c/elementaryFunctions/interfaces/int_pow.h" + "src/c/elementaryFunctions/interfaces/int_sin.h" + "src/c/elementaryFunctions/interfaces/int_tan.h" + "src/c/elementaryFunctions/interfaces/int_acosh.h" + "src/c/elementaryFunctions/interfaces/int_acos.h" + "src/c/elementaryFunctions/interfaces/int_asin.h" + "src/c/elementaryFunctions/interfaces/int_atan.h" + "src/c/elementaryFunctions/interfaces/int_ceil.h" + "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_linspace.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" + "src/c/elementaryFunctions/interfaces/int_uint16.h" + "src/c/elementaryFunctions/interfaces/int_int16.h" + "src/c/elementaryFunctions/interfaces/int_acosd.h" + "src/c/elementaryFunctions/interfaces/int_acot.h" + "src/c/elementaryFunctions/interfaces/int_acotd.h" + "src/c/elementaryFunctions/interfaces/int_acoth.h" + "src/c/elementaryFunctions/interfaces/int_acsc.h" + "src/c/elementaryFunctions/interfaces/int_acscd.h" + "src/c/elementaryFunctions/interfaces/int_acsch.h" + "src/c/elementaryFunctions/interfaces/int_asec.h" + "src/c/elementaryFunctions/interfaces/int_asecd.h" + "src/c/elementaryFunctions/interfaces/int_asech.h" + "src/c/elementaryFunctions/interfaces/int_asind.h" + "src/c/elementaryFunctions/interfaces/int_atand.h" + "src/c/statisticsFunctions/interfaces/int_mean.h" + "src/c/statisticsFunctions/interfaces/int_meanf.h" + "src/c/statisticsFunctions/interfaces/int_stdevf.h" + "src/c/statisticsFunctions/interfaces/int_prod.h" + "src/c/statisticsFunctions/interfaces/int_variance.h" + "src/c/statisticsFunctions/interfaces/int_sum.h" + "src/c/operations/interfaces/int_OpEqual.h" + "src/c/operations/interfaces/int_OpLogNot.h" + "src/c/operations/interfaces/int_OpLogEq.h" + "src/c/operations/interfaces/int_OpLogNe.h" + "src/c/operations/interfaces/int_OpLogGt.h" + "src/c/operations/interfaces/int_OpLogGe.h" + "src/c/operations/interfaces/int_OpLogLt.h" + "src/c/operations/interfaces/int_OpLogLe.h" + "src/c/operations/interfaces/int_OpLogAnd.h" + "src/c/operations/interfaces/int_OpLogOr.h" + "src/c/operations/interfaces/int_OpDotStar.h" + "src/c/operations/interfaces/int_OpDotSlash.h" + "src/c/operations/interfaces/int_OpBackSlash.h" + "src/c/operations/interfaces/int_OpDotBackSlash.h" + "src/c/operations/interfaces/int_OpSlash.h" + "src/c/operations/interfaces/int_OpPlus.h" + "src/c/operations/interfaces/int_OpMinus.h" + "src/c/operations/interfaces/int_OpStar.h" + "src/c/operations/interfaces/int_OpExt.h" + "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_ifft.h" + "src/c/signalProcessing/interfaces/int_lpc2cep.h" + "src/c/signalProcessing/interfaces/int_cepstrum.h" + "src/c/signalProcessing/interfaces/int_xcorr.h" + "src/c/signalProcessing/interfaces/int_convol.h" + "src/c/signalProcessing/interfaces/int_hilbert.h" + "src/c/signalProcessing/interfaces/int_levin.h" + "src/c/signalProcessing/interfaces/int_fftshift.h" + "src/c/signalProcessing/interfaces/int_fft.h" + "src/c/signalProcessing/interfaces/int_lev.h" + "src/c/implicitList/int_OpColon.h" + "src/c/differential_calculus/interfaces/int_ode.h" + "src/c/differential_calculus/interfaces/int_diffc.h" + "src/c/Files/interfaces/int_files.h" + "src/c/string/interfaces/int_convstr.h" + "src/c/string/interfaces/int_strsubst.h" + //"src/c/string/interfaces/int_strcmp.h" + "src/c/string/interfaces/int_strrev.h" + "src/c/string/interfaces/int_strrchr.h" + "src/c/elementaryFunctions/interfaces/int_dec2base.h" + "src/c/elementaryFunctions/interfaces/int_base2dec.h" + "src/c/elementaryFunctions/interfaces/int_dec2bin.h" + "src/c/elementaryFunctions/interfaces/int_dec2hex.h" + "src/c/elementaryFunctions/interfaces/int_dec2oct.h" + "src/c/elementaryFunctions/interfaces/int_oct2dec.h" + "src/c/elementaryFunctions/interfaces/int_hex2dec.h" + "src/c/elementaryFunctions/interfaces/int_bin2dec.h" + "src/c/elementaryFunctions/interfaces/int_cosd.h" + "src/c/elementaryFunctions/interfaces/int_cotd.h" + "src/c/elementaryFunctions/interfaces/int_coth.h" + "src/c/elementaryFunctions/interfaces/int_csc.h" + "src/c/elementaryFunctions/interfaces/int_cscd.h" + "src/c/elementaryFunctions/interfaces/int_csch.h" + "src/c/elementaryFunctions/interfaces/int_sec.h" + "src/c/elementaryFunctions/interfaces/int_secd.h" + "src/c/elementaryFunctions/interfaces/int_sech.h" + "src/c/elementaryFunctions/interfaces/int_float.h" + "src/c/elementaryFunctions/interfaces/int_factorial.h" + "src/c/elementaryFunctions/interfaces/int_primes.h" + "src/c/elementaryFunctions/interfaces/int_factor.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_rcond.h"]; + + + //Interface files required for "Arduino" output + Arduino_interfaces = [ + "src/c/scilab-arduino/interfaces/int_cmd_digital_out.h" + "src/c/scilab-arduino/interfaces/int_cmd_digital_in.h" + "src/c/scilab-arduino/interfaces/int_cmd_analog_out.h" + "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_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 = [ + "src/c/hardware/avr/interfaces/int_AVRPeripheralGPIO.h" + "src/c/hardware/avr/interfaces/int_AVRPeripheralADC.h" + "src/c/hardware/avr/interfaces/int_AVRPeripheralPWM.h" + "src/c/hardware/avr/interfaces/int_AVRUtil.h" + "src/c/hardware/avr/interfaces/int_AVRPeripheralTimer.h" + "src/c/hardware/avr/interfaces/int_AVRPeripheralUART.h" + ]; + + RPI_interfaces = [ + "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h" + "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralTiming.h" + "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralSerial.h" + "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralThreading.h" + "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPinISR.h" + "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralPWM.h" + ]; + + OpenCV_interfaces = [ + "src/c/imageProcessing/interfaces/int_cvcore.hpp" + "src/c/imageProcessing/interfaces/int_cvhighgui.hpp" + "src/c/imageProcessing/interfaces/int_cvimgproc.hpp"]; + + if Target == "StandAlone" + allInterfaces = Standalone_interfaces; + elseif Target == "Arduino" + allInterfaces = cat(1,Standalone_interfaces, Arduino_interfaces); + elseif Target == "AVR" + allInterfaces = cat(1,Standalone_interfaces, AVR_interfaces); + elseif Target == "RPi" + allInterfaces = cat(1,Standalone_interfaces, RPI_interfaces); + end + + if (SharedInfo.OpenCVUsed == %T) + allInterfaces = cat(1,allInterfaces,OpenCV_interfaces) + end + +endfunction diff --git a/2.3-1/macros/findDeps/getAllLibraries.sci b/2.3-1/macros/findDeps/getAllLibraries.sci new file mode 100644 index 00000000..14fc020a --- /dev/null +++ b/2.3-1/macros/findDeps/getAllLibraries.sci @@ -0,0 +1,82 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function allLibraries = getAllLibraries(SharedInfo) +// ----------------------------------------------------------------- +// Select library files according to target specified +// +// Input data: +// scilab2c SharedInfo structure +// +// Output data: +// returns an array containing file paths for libraries +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + + Target = SharedInfo.Target; + //Library files required for "RasberryPi" target + RPi_libs = [ + "thirdparty/lib/raspberrypi/libwiringPi.so" + "thirdparty/lib/raspberrypi/libcblas.a" + "thirdparty/lib/raspberrypi/librefblas.a" + "thirdparty/lib/raspberrypi/liblapack.a" + "thirdparty/lib/raspberrypi/libgfortran.a" + "thirdparty/lib/raspberrypi/libgsl.a"]; + + RPi_cvlibs = [ + "thirdparty/lib/raspberrypi/libopencv_calib3d.a" + "thirdparty/lib/raspberrypi/libopencv_contrib.a" + "thirdparty/lib/raspberrypi/libopencv_core.a" + "thirdparty/lib/raspberrypi/libopencv_features2d.a" + "thirdparty/lib/raspberrypi/libopencv_flann.a" + "thirdparty/lib/raspberrypi/libopencv_gpu.a" + "thirdparty/lib/raspberrypi/libopencv_highgui.a" + "thirdparty/lib/raspberrypi/libopencv_imgproc.a" + "thirdparty/lib/raspberrypi/libopencv_legacy.a" + "thirdparty/lib/raspberrypi/libopencv_ml.a" + "thirdparty/lib/raspberrypi/libopencv_nonfree.a" + "thirdparty/lib/raspberrypi/libopencv_objdetect.a" + "thirdparty/lib/raspberrypi/libopencv_ocl.a" + "thirdparty/lib/raspberrypi/libopencv_photo.a" + "thirdparty/lib/raspberrypi/libopencv_stitching.a" + "thirdparty/lib/raspberrypi/libopencv_superres.a" + "thirdparty/lib/raspberrypi/libopencv_video.a" + "thirdparty/lib/raspberrypi/libopencv_videostab.a" + "thirdparty/lib/raspberrypi/libopencv_ts.a" + "thirdparty/lib/raspberrypi/libjpeg.a" + "thirdparty/lib/raspberrypi/libjasper.a" + "thirdparty/lib/raspberrypi/libpng.a" + "thirdparty/lib/raspberrypi/libIlmImf.a" + "thirdparty/lib/raspberrypi/libzlib.a" + "thirdparty/lib/raspberrypi/libtiff.a"]; + + + if Target == "RPi" + allLibraries = RPi_libs; + if (SharedInfo.OpenCVUsed == %T) + allLibraries = cat(1,allLibraries,RPi_cvlibs) + end + elseif Target == "StandAlone" + allLibraries =["thirdparty/lib/pc/windows/x64/Lapack"]; + if (SharedInfo.OpenCVUsed == %T) + os_arch = system_getproperty('os.arch'); + if(getos() == 'Linux' & os_arch == 'amd64') + allLibraries = cat(1,allLibraries,"thirdparty/lib/pc/linux/x64/OpenCV") + elseif(getos() == 'Windows' & os_arch == 'amd64') + allLibraries = cat(1,allLibraries,"thirdparty/lib/pc/windows/x64/OpenCV") + end + end + + else + allLibraries = []; + end + +endfunction diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci new file mode 100644 index 00000000..4da4a9c6 --- /dev/null +++ b/2.3-1/macros/findDeps/getAllSources.sci @@ -0,0 +1,1319 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +function allSources = getAllSources(SharedInfo,BuildTool) + Target = SharedInfo.Target; + + //Files common to types of output format + Standalone_files = [ "src/c/auxiliaryFunctions/abs/sabsa.c" + "src/c/auxiliaryFunctions/abs/sabss.c" + "src/c/auxiliaryFunctions/abs/zabsa.c" + "src/c/auxiliaryFunctions/abs/zabss.c" + "src/c/auxiliaryFunctions/abs/cabsa.c" + "src/c/auxiliaryFunctions/abs/cabss.c" + "src/c/auxiliaryFunctions/abs/dabsa.c" + "src/c/auxiliaryFunctions/abs/dabss.c" + "src/c/auxiliaryFunctions/abs/u8absa.c" + "src/c/auxiliaryFunctions/abs/u8abss.c" + "src/c/auxiliaryFunctions/abs/i8absa.c" + "src/c/auxiliaryFunctions/abs/i8abss.c" + "src/c/auxiliaryFunctions/abs/u16absa.c" + "src/c/auxiliaryFunctions/abs/u16abss.c" + "src/c/auxiliaryFunctions/abs/i16absa.c" + "src/c/auxiliaryFunctions/abs/i16abss.c" + "src/c/auxiliaryFunctions/conj/zconja.c" + "src/c/auxiliaryFunctions/conj/zconjs.c" + "src/c/auxiliaryFunctions/conj/cconja.c" + "src/c/auxiliaryFunctions/conj/cconjs.c" + "src/c/auxiliaryFunctions/find/cfinda.c" + "src/c/auxiliaryFunctions/find/dfinda.c" + "src/c/auxiliaryFunctions/find/sfinda.c" + "src/c/auxiliaryFunctions/find/zfinda.c" + "src/c/auxiliaryFunctions/rand/dranda.c" + "src/c/auxiliaryFunctions/rand/drands.c" + "src/c/auxiliaryFunctions/rand/sranda.c" + "src/c/auxiliaryFunctions/rand/srands.c" + "src/c/auxiliaryFunctions/rand/zranda.c" + "src/c/auxiliaryFunctions/rand/zrands.c" + "src/c/auxiliaryFunctions/rand/cranda.c" + "src/c/auxiliaryFunctions/rand/crands.c" + "src/c/auxiliaryFunctions/rand/u8randa.c" + "src/c/auxiliaryFunctions/rand/u8rands.c" + "src/c/auxiliaryFunctions/rand/u16randa.c" + "src/c/auxiliaryFunctions/rand/u16rands.c" + "src/c/auxiliaryFunctions/rand/i8randa.c" + "src/c/auxiliaryFunctions/rand/i8rands.c" + "src/c/auxiliaryFunctions/rand/i16randa.c" + "src/c/auxiliaryFunctions/rand/i16rands.c" + "src/c/auxiliaryFunctions/sign/csigna.c" + "src/c/auxiliaryFunctions/sign/csigns.c" + "src/c/auxiliaryFunctions/sign/dsigna.c" + "src/c/auxiliaryFunctions/sign/dsigns.c" + "src/c/auxiliaryFunctions/sign/ssigna.c" + "src/c/auxiliaryFunctions/sign/ssigns.c" + "src/c/auxiliaryFunctions/sign/zsigna.c" + "src/c/auxiliaryFunctions/sign/zsigns.c" + "src/c/auxiliaryFunctions/sign/u8signa.c" + "src/c/auxiliaryFunctions/sign/u8signs.c" + "src/c/auxiliaryFunctions/sign/i8signa.c" + "src/c/auxiliaryFunctions/sign/i8signs.c" + "src/c/auxiliaryFunctions/sign/u16signa.c" + "src/c/auxiliaryFunctions/sign/u16signs.c" + "src/c/auxiliaryFunctions/sign/i16signa.c" + "src/c/auxiliaryFunctions/sign/i16signs.c" + "src/c/auxiliaryFunctions/frexp/dfrexps.c" + "src/c/auxiliaryFunctions/frexp/sfrexps.c" + "src/c/auxiliaryFunctions/isnan/disnana.c" + "src/c/auxiliaryFunctions/isnan/disnans.c" + "src/c/auxiliaryFunctions/isnan/cisnana.c" + "src/c/auxiliaryFunctions/isnan/cisnans.c" + "src/c/auxiliaryFunctions/isnan/zisnana.c" + "src/c/auxiliaryFunctions/isnan/zisnans.c" + "src/c/auxiliaryFunctions/isnan/sisnana.c" + "src/c/auxiliaryFunctions/isnan/sisnans.c" + "src/c/auxiliaryFunctions/find2d/zfind2da.c" + "src/c/auxiliaryFunctions/find2d/cfind2da.c" + "src/c/auxiliaryFunctions/find2d/sfind2da.c" + "src/c/auxiliaryFunctions/find2d/dfind2da.c" + "src/c/auxiliaryFunctions/pythag/dpythags.c" + "src/c/auxiliaryFunctions/pythag/zpythags.c" + "src/c/auxiliaryFunctions/pythag/cpythags.c" + "src/c/auxiliaryFunctions/pythag/spythags.c" + "src/c/auxiliaryFunctions/size/dallsizea.c" + "src/c/type/doubleComplex.c" + "src/c/type/floatComplex.c" + "src/c/matrixOperations/cat/dcata.c" + "src/c/matrixOperations/cat/dcats.c" + "src/c/matrixOperations/cat/scata.c" + "src/c/matrixOperations/cat/scats.c" + "src/c/matrixOperations/cat/u8cats.c" + "src/c/matrixOperations/cat/u8cata.c" + "src/c/matrixOperations/cat/u16cats.c" + "src/c/matrixOperations/cat/u16cata.c" + "src/c/matrixOperations/cat/i8cats.c" + "src/c/matrixOperations/cat/i8cata.c" + "src/c/matrixOperations/cat/i16cats.c" + "src/c/matrixOperations/cat/i16cata.c" + "src/c/matrixOperations/eye/deyea.c" + "src/c/matrixOperations/eye/seyea.c" + "src/c/matrixOperations/eye/zeyea.c" + "src/c/matrixOperations/eye/ceyea.c" + "src/c/matrixOperations/eye/u8eyea.c" + "src/c/matrixOperations/eye/i8eyea.c" + "src/c/matrixOperations/eye/u16eyea.c" + "src/c/matrixOperations/eye/i16eyea.c" + "src/c/matrixOperations/chol/dchola.c" + "src/c/matrixOperations/chol/dchols.c" + "src/c/matrixOperations/chol/schola.c" + "src/c/matrixOperations/chol/schols.c" + "src/c/matrixOperations/chol/zchola.c" + "src/c/matrixOperations/chol/cchola.c" + "src/c/matrixOperations/dist/ddista.c" + "src/c/matrixOperations/dist/ddists.c" + "src/c/matrixOperations/dist/sdista.c" + "src/c/matrixOperations/dist/sdists.c" + "src/c/matrixOperations/dist/zdista.c" + "src/c/matrixOperations/dist/zdists.c" + "src/c/matrixOperations/dist/cdista.c" + "src/c/matrixOperations/dist/cdists.c" + "src/c/matrixOperations/fill/cfilla.c" + "src/c/matrixOperations/fill/dfilla.c" + "src/c/matrixOperations/fill/sfilla.c" + "src/c/matrixOperations/fill/zfilla.c" + "src/c/matrixOperations/expm/zexpma.c" + "src/c/matrixOperations/expm/cexpma.c" + "src/c/matrixOperations/expm/dexpma.c" + "src/c/matrixOperations/expm/sexpma.c" + "src/c/matrixOperations/jmat/djmata.c" + "src/c/matrixOperations/jmat/sjmata.c" + "src/c/matrixOperations/logm/clogma.c" + "src/c/matrixOperations/logm/dlogma.c" + "src/c/matrixOperations/logm/slogma.c" + "src/c/matrixOperations/logm/zlogma.c" + "src/c/matrixOperations/ones/donesa.c" + "src/c/matrixOperations/ones/sonesa.c" + "src/c/matrixOperations/ones/zonesa.c" + "src/c/matrixOperations/ones/conesa.c" + "src/c/matrixOperations/ones/u8onesa.c" + "src/c/matrixOperations/ones/i8onesa.c" + "src/c/matrixOperations/ones/u16onesa.c" + "src/c/matrixOperations/ones/i16onesa.c" + "src/c/matrixOperations/powm/dpowma.c" + "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/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/matrixOperations/trace/stracea.c" + "src/c/matrixOperations/trace/dtracea.c" + "src/c/matrixOperations/trace/ctracea.c" + "src/c/matrixOperations/trace/ztracea.c" + "src/c/matrixOperations/zeros/dzerosa.c" + "src/c/matrixOperations/zeros/czerosa.c" + "src/c/matrixOperations/zeros/zzerosa.c" + "src/c/matrixOperations/zeros/szerosa.c" + "src/c/matrixOperations/zeros/dzerosh.c" + "src/c/matrixOperations/zeros/u8zerosa.c" + "src/c/matrixOperations/zeros/i8zerosa.c" + "src/c/matrixOperations/zeros/u16zerosa.c" + "src/c/matrixOperations/zeros/i16zerosa.c" + "src/c/matrixOperations/inversion/zinverma.c" + "src/c/matrixOperations/inversion/cinverma.c" + "src/c/matrixOperations/inversion/sinverma.c" + "src/c/matrixOperations/inversion/dinverma.c" + "src/c/matrixOperations/inversion/u8inverma.c" + "src/c/matrixOperations/inversion/i8inverma.c" + "src/c/matrixOperations/inversion/u16inverma.c" + "src/c/matrixOperations/inversion/i16inverma.c" + "src/c/matrixOperations/infiniteNorm/sinfnorma.c" + "src/c/matrixOperations/infiniteNorm/dinfnorma.c" + "src/c/matrixOperations/infiniteNorm/zinfnorma.c" + "src/c/matrixOperations/infiniteNorm/cinfnorma.c" + "src/c/matrixOperations/multiplication/zmulma.c" + "src/c/matrixOperations/multiplication/cmulma.c" + "src/c/matrixOperations/multiplication/dmulma.c" + "src/c/matrixOperations/multiplication/smulma.c" + "src/c/matrixOperations/multiplication/u8mulma.c" + "src/c/matrixOperations/multiplication/u16mulma.c" + "src/c/matrixOperations/multiplication/i8mulma.c" + "src/c/matrixOperations/multiplication/i16mulma.c" + "src/c/matrixOperations/division/cldivma.c" + "src/c/matrixOperations/division/zldivma.c" + "src/c/matrixOperations/division/sldivma.c" + "src/c/matrixOperations/division/drdivma.c" + "src/c/matrixOperations/division/drdivv.c" + "src/c/matrixOperations/division/dldivma.c" + "src/c/matrixOperations/division/crdivma.c" + "src/c/matrixOperations/division/crdivv.c" + "src/c/matrixOperations/division/crdivscv.c" + "src/c/matrixOperations/division/crdivcsv.c" + "src/c/matrixOperations/division/zrdivma.c" + "src/c/matrixOperations/division/zrdivv.c" + "src/c/matrixOperations/division/zrdivzdv.c" + "src/c/matrixOperations/division/zrdivdzv.c" + "src/c/matrixOperations/division/srdivma.c" + "src/c/matrixOperations/division/srdivv.c" + "src/c/matrixOperations/determ/ddeterma.c" + "src/c/matrixOperations/determ/zdeterma.c" + "src/c/matrixOperations/determ/cdeterma.c" + "src/c/matrixOperations/determ/sdeterma.c" + "src/c/matrixOperations/magnitude/cmagna.c" + "src/c/matrixOperations/magnitude/cmagns.c" + "src/c/matrixOperations/magnitude/dmagna.c" + "src/c/matrixOperations/magnitude/dmagns.c" + "src/c/matrixOperations/magnitude/smagna.c" + "src/c/matrixOperations/magnitude/smagns.c" + "src/c/matrixOperations/magnitude/zmagna.c" + "src/c/matrixOperations/magnitude/zmagns.c" + "src/c/matrixOperations/magnitude/u8magna.c" + "src/c/matrixOperations/magnitude/u8magns.c" + "src/c/matrixOperations/magnitude/u16magna.c" + "src/c/matrixOperations/magnitude/u16magns.c" + "src/c/matrixOperations/magnitude/i8magna.c" + "src/c/matrixOperations/magnitude/i8magns.c" + "src/c/matrixOperations/magnitude/i16magna.c" + "src/c/matrixOperations/magnitude/i16magns.c" + "src/c/matrixOperations/hilb/shilba.c" + "src/c/matrixOperations/hilb/dhilba.c" + "src/c/matrixOperations/squaredMagnitude/ssquMagna.c" + "src/c/matrixOperations/squaredMagnitude/ssquMagns.c" + "src/c/matrixOperations/squaredMagnitude/dsquMagna.c" + "src/c/matrixOperations/squaredMagnitude/dsquMagns.c" + "src/c/matrixOperations/squaredMagnitude/zsquMagna.c" + "src/c/matrixOperations/squaredMagnitude/zsquMagns.c" + "src/c/matrixOperations/squaredMagnitude/csquMagna.c" + "src/c/matrixOperations/squaredMagnitude/csquMagns.c" + "src/c/matrixOperations/diag/ddiags.c" + "src/c/matrixOperations/diag/ddiaga.c" + "src/c/matrixOperations/diag/ddiagina.c" + "src/c/matrixOperations/diag/ddiagins.c" + "src/c/matrixOperations/diag/ddiagexa.c" + "src/c/matrixOperations/diag/ddiagexs.c" + "src/c/matrixOperations/diag/u8diags.c" + "src/c/matrixOperations/diag/u8diaga.c" + "src/c/matrixOperations/diag/u8diagina.c" + "src/c/matrixOperations/diag/u8diagins.c" + "src/c/matrixOperations/diag/u8diagexa.c" + "src/c/matrixOperations/diag/u8diagexs.c" + "src/c/matrixOperations/diag/u16diags.c" + "src/c/matrixOperations/diag/u16diaga.c" + "src/c/matrixOperations/diag/u16diagina.c" + "src/c/matrixOperations/diag/u16diagins.c" + "src/c/matrixOperations/diag/u16diagexa.c" + "src/c/matrixOperations/diag/u16diagexs.c" + "src/c/matrixOperations/diag/i8diags.c" + "src/c/matrixOperations/diag/i8diaga.c" + "src/c/matrixOperations/diag/i8diagina.c" + "src/c/matrixOperations/diag/i8diagins.c" + "src/c/matrixOperations/diag/i8diagexa.c" + "src/c/matrixOperations/diag/i8diagexs.c" + "src/c/matrixOperations/diag/i16diags.c" + "src/c/matrixOperations/diag/i16diaga.c" + "src/c/matrixOperations/diag/i16diagina.c" + "src/c/matrixOperations/diag/i16diagins.c" + "src/c/matrixOperations/diag/i16diagexa.c" + "src/c/matrixOperations/diag/i16diagexs.c" + "src/c/matrixOperations/cumsum/dcumsuma.c" + "src/c/matrixOperations/cumsum/drowcumsuma.c" + "src/c/matrixOperations/cumsum/dcolumncumsuma.c" + "src/c/matrixOperations/cumsum/scumsuma.c" + "src/c/matrixOperations/cumsum/srowcumsuma.c" + "src/c/matrixOperations/cumsum/scolumncumsuma.c" + "src/c/matrixOperations/cumsum/u8cumsuma.c" + "src/c/matrixOperations/cumsum/u8rowcumsuma.c" + "src/c/matrixOperations/cumsum/u8columncumsuma.c" + "src/c/matrixOperations/cumsum/i8cumsuma.c" + "src/c/matrixOperations/cumsum/i8rowcumsuma.c" + "src/c/matrixOperations/cumsum/i8columncumsuma.c" + "src/c/matrixOperations/cumsum/u16cumsuma.c" + "src/c/matrixOperations/cumsum/u16rowcumsuma.c" + "src/c/matrixOperations/cumsum/u16columncumsuma.c" + "src/c/matrixOperations/cumsum/i16cumsuma.c" + "src/c/matrixOperations/cumsum/i16rowcumsuma.c" + "src/c/matrixOperations/cumsum/i16columncumsuma.c" + "src/c/matrixOperations/cumprod/dcumproda.c" + "src/c/matrixOperations/cumprod/drowcumproda.c" + "src/c/matrixOperations/cumprod/dcolumncumproda.c" + "src/c/matrixOperations/cumprod/scumproda.c" + "src/c/matrixOperations/cumprod/srowcumproda.c" + "src/c/matrixOperations/cumprod/scolumncumproda.c" + "src/c/matrixOperations/cumprod/u8cumproda.c" + "src/c/matrixOperations/cumprod/u8rowcumproda.c" + "src/c/matrixOperations/cumprod/u8columncumproda.c" + "src/c/matrixOperations/cumprod/i8cumproda.c" + "src/c/matrixOperations/cumprod/i8rowcumproda.c" + "src/c/matrixOperations/cumprod/i8columncumproda.c" + "src/c/matrixOperations/cumprod/u16cumproda.c" + "src/c/matrixOperations/cumprod/u16rowcumproda.c" + "src/c/matrixOperations/cumprod/u16columncumproda.c" + "src/c/matrixOperations/cumprod/i16cumproda.c" + "src/c/matrixOperations/cumprod/i16rowcumproda.c" + "src/c/matrixOperations/cumprod/i16columncumproda.c" + "src/c/matrixOperations/triu/dtriua.c" + "src/c/matrixOperations/triu/striua.c" + "src/c/matrixOperations/triu/u8triua.c" + "src/c/matrixOperations/triu/i8triua.c" + "src/c/matrixOperations/triu/u16triua.c" + "src/c/matrixOperations/triu/i16triua.c" + "src/c/matrixOperations/flipdim/dflipdima.c" + "src/c/matrixOperations/flipdim/sflipdima.c" + "src/c/matrixOperations/flipdim/u8flipdima.c" + "src/c/matrixOperations/flipdim/i8flipdima.c" + "src/c/matrixOperations/flipdim/u16flipdima.c" + "src/c/matrixOperations/flipdim/i16flipdima.c" + "src/c/matrixOperations/tril/dtrila.c" + "src/c/matrixOperations/tril/strila.c" + "src/c/matrixOperations/tril/u8trila.c" + "src/c/matrixOperations/tril/i8trila.c" + "src/c/matrixOperations/tril/u16trila.c" + "src/c/matrixOperations/tril/i16trila.c" + "src/c/matrixOperations/kron/dkrona.c" + "src/c/matrixOperations/kron/skrona.c" + "src/c/matrixOperations/norm/dnormv.c" + "src/c/matrixOperations/norm/dnorma.c" + "src/c/elementaryFunctions/cos/dcosa.c" + "src/c/elementaryFunctions/cos/dcoss.c" + "src/c/elementaryFunctions/cos/scosa.c" + "src/c/elementaryFunctions/cos/scoss.c" + "src/c/elementaryFunctions/cos/zcosa.c" + "src/c/elementaryFunctions/cos/zcoss.c" + "src/c/elementaryFunctions/cos/ccosa.c" + "src/c/elementaryFunctions/cos/ccoss.c" + "src/c/elementaryFunctions/cos/u8cosa.c" + "src/c/elementaryFunctions/cos/u8coss.c" + "src/c/elementaryFunctions/cos/i8cosa.c" + "src/c/elementaryFunctions/cos/i8coss.c" + "src/c/elementaryFunctions/cos/u16cosa.c" + "src/c/elementaryFunctions/cos/u16coss.c" + "src/c/elementaryFunctions/cos/i16cosa.c" + "src/c/elementaryFunctions/cos/i16coss.c" + "src/c/elementaryFunctions/fix/dfixa.c" + "src/c/elementaryFunctions/fix/dfixs.c" + "src/c/elementaryFunctions/fix/sfixa.c" + "src/c/elementaryFunctions/fix/sfixs.c" + "src/c/elementaryFunctions/fix/zfixa.c" + "src/c/elementaryFunctions/fix/zfixs.c" + "src/c/elementaryFunctions/fix/cfixa.c" + "src/c/elementaryFunctions/fix/cfixs.c" + "src/c/elementaryFunctions/fix/u8fixa.c" + "src/c/elementaryFunctions/fix/u8fixs.c" + "src/c/elementaryFunctions/fix/i8fixa.c" + "src/c/elementaryFunctions/fix/i8fixs.c" + "src/c/elementaryFunctions/fix/u16fixa.c" + "src/c/elementaryFunctions/fix/u16fixs.c" + "src/c/elementaryFunctions/fix/i16fixa.c" + "src/c/elementaryFunctions/fix/i16fixs.c" + "src/c/elementaryFunctions/exp/dexpa.c" + "src/c/elementaryFunctions/exp/dexps.c" + "src/c/elementaryFunctions/exp/sexpa.c" + "src/c/elementaryFunctions/exp/sexps.c" + "src/c/elementaryFunctions/exp/zexpa.c" + "src/c/elementaryFunctions/exp/zexps.c" + "src/c/elementaryFunctions/exp/cexpa.c" + "src/c/elementaryFunctions/exp/cexps.c" + "src/c/elementaryFunctions/exp/u8expa.c" + "src/c/elementaryFunctions/exp/u8exps.c" + "src/c/elementaryFunctions/exp/i8expa.c" + "src/c/elementaryFunctions/exp/i8exps.c" + "src/c/elementaryFunctions/exp/u16expa.c" + "src/c/elementaryFunctions/exp/u16exps.c" + "src/c/elementaryFunctions/exp/i16expa.c" + "src/c/elementaryFunctions/exp/i16exps.c" + "src/c/elementaryFunctions/int/dinta.c" + "src/c/elementaryFunctions/int/dints.c" + "src/c/elementaryFunctions/int/sinta.c" + "src/c/elementaryFunctions/int/sints.c" + "src/c/elementaryFunctions/int/zinta.c" + "src/c/elementaryFunctions/int/zints.c" + "src/c/elementaryFunctions/int/cinta.c" + "src/c/elementaryFunctions/int/cints.c" + "src/c/elementaryFunctions/log/cloga.c" + "src/c/elementaryFunctions/log/clogs.c" + "src/c/elementaryFunctions/log/dloga.c" + "src/c/elementaryFunctions/log/dlogs.c" + "src/c/elementaryFunctions/log/sloga.c" + "src/c/elementaryFunctions/log/slogs.c" + "src/c/elementaryFunctions/log/zloga.c" + "src/c/elementaryFunctions/log/zlogs.c" + "src/c/elementaryFunctions/pow/cpowa.c" + "src/c/elementaryFunctions/pow/cpows.c" + "src/c/elementaryFunctions/pow/dpowa.c" + "src/c/elementaryFunctions/pow/dpows.c" + "src/c/elementaryFunctions/pow/spowa.c" + "src/c/elementaryFunctions/pow/spows.c" + "src/c/elementaryFunctions/pow/zpowa.c" + "src/c/elementaryFunctions/pow/zpows.c" + "src/c/elementaryFunctions/sin/csina.c" + "src/c/elementaryFunctions/sin/csins.c" + "src/c/elementaryFunctions/sin/dsina.c" + "src/c/elementaryFunctions/sin/dsins.c" + "src/c/elementaryFunctions/sin/ssina.c" + "src/c/elementaryFunctions/sin/ssins.c" + "src/c/elementaryFunctions/sin/zsina.c" + "src/c/elementaryFunctions/sin/zsins.c" + "src/c/elementaryFunctions/sin/u8sina.c" + "src/c/elementaryFunctions/sin/u8sins.c" + "src/c/elementaryFunctions/sin/i8sina.c" + "src/c/elementaryFunctions/sin/i8sins.c" + "src/c/elementaryFunctions/sin/u16sina.c" + "src/c/elementaryFunctions/sin/u16sins.c" + "src/c/elementaryFunctions/sin/i16sina.c" + "src/c/elementaryFunctions/sin/i16sins.c" + "src/c/elementaryFunctions/tan/ctana.c" + "src/c/elementaryFunctions/tan/ctans.c" + "src/c/elementaryFunctions/tan/dtana.c" + "src/c/elementaryFunctions/tan/dtans.c" + "src/c/elementaryFunctions/tan/stana.c" + "src/c/elementaryFunctions/tan/stans.c" + "src/c/elementaryFunctions/tan/ztana.c" + "src/c/elementaryFunctions/tan/ztans.c" + "src/c/elementaryFunctions/tan/u8tana.c" + "src/c/elementaryFunctions/tan/u8tans.c" + "src/c/elementaryFunctions/tan/i8tana.c" + "src/c/elementaryFunctions/tan/i8tans.c" + "src/c/elementaryFunctions/tan/u16tana.c" + "src/c/elementaryFunctions/tan/u16tans.c" + "src/c/elementaryFunctions/tan/i16tana.c" + "src/c/elementaryFunctions/tan/i16tans.c" + "src/c/elementaryFunctions/acos/zacosa.c" + "src/c/elementaryFunctions/acos/zacoss.c" + "src/c/elementaryFunctions/acos/cacosa.c" + "src/c/elementaryFunctions/acos/cacoss.c" + "src/c/elementaryFunctions/acos/dacosa.c" + "src/c/elementaryFunctions/acos/dacoss.c" + "src/c/elementaryFunctions/acos/sacosa.c" + "src/c/elementaryFunctions/acos/sacoss.c" + "src/c/elementaryFunctions/asin/dasina.c" + "src/c/elementaryFunctions/asin/dasins.c" + "src/c/elementaryFunctions/asin/sasina.c" + "src/c/elementaryFunctions/asin/sasins.c" + "src/c/elementaryFunctions/asin/zasina.c" + "src/c/elementaryFunctions/asin/zasins.c" + "src/c/elementaryFunctions/asin/casina.c" + "src/c/elementaryFunctions/asin/casins.c" + "src/c/elementaryFunctions/atan/datana.c" + "src/c/elementaryFunctions/atan/datans.c" + "src/c/elementaryFunctions/atan/satana.c" + "src/c/elementaryFunctions/atan/satans.c" + "src/c/elementaryFunctions/atan/zatana.c" + "src/c/elementaryFunctions/atan/zatans.c" + "src/c/elementaryFunctions/atan/catana.c" + "src/c/elementaryFunctions/atan/catans.c" + "src/c/elementaryFunctions/ceil/dceila.c" + "src/c/elementaryFunctions/ceil/dceils.c" + "src/c/elementaryFunctions/ceil/sceila.c" + "src/c/elementaryFunctions/ceil/sceils.c" + "src/c/elementaryFunctions/ceil/zceila.c" + "src/c/elementaryFunctions/ceil/zceils.c" + "src/c/elementaryFunctions/ceil/cceila.c" + "src/c/elementaryFunctions/ceil/cceils.c" + "src/c/elementaryFunctions/ceil/u8ceila.c" + "src/c/elementaryFunctions/ceil/u8ceils.c" + "src/c/elementaryFunctions/ceil/i8ceila.c" + "src/c/elementaryFunctions/ceil/i8ceils.c" + "src/c/elementaryFunctions/ceil/u16ceila.c" + "src/c/elementaryFunctions/ceil/u16ceils.c" + "src/c/elementaryFunctions/ceil/i16ceila.c" + "src/c/elementaryFunctions/ceil/i16ceils.c" + "src/c/elementaryFunctions/cosh/dcosha.c" + "src/c/elementaryFunctions/cosh/dcoshs.c" + "src/c/elementaryFunctions/cosh/scosha.c" + "src/c/elementaryFunctions/cosh/scoshs.c" + "src/c/elementaryFunctions/cosh/zcosha.c" + "src/c/elementaryFunctions/cosh/zcoshs.c" + "src/c/elementaryFunctions/cosh/ccosha.c" + "src/c/elementaryFunctions/cosh/ccoshs.c" + "src/c/elementaryFunctions/cosh/u8cosha.c" + "src/c/elementaryFunctions/cosh/u8coshs.c" + "src/c/elementaryFunctions/cosh/i8cosha.c" + "src/c/elementaryFunctions/cosh/i8coshs.c" + "src/c/elementaryFunctions/cosh/u16cosha.c" + "src/c/elementaryFunctions/cosh/u16coshs.c" + "src/c/elementaryFunctions/cosh/i16cosha.c" + "src/c/elementaryFunctions/cosh/i16coshs.c" + "src/c/elementaryFunctions/sinh/csinha.c" + "src/c/elementaryFunctions/sinh/csinhs.c" + "src/c/elementaryFunctions/sinh/dsinha.c" + "src/c/elementaryFunctions/sinh/dsinhs.c" + "src/c/elementaryFunctions/sinh/ssinha.c" + "src/c/elementaryFunctions/sinh/ssinhs.c" + "src/c/elementaryFunctions/sinh/zsinha.c" + "src/c/elementaryFunctions/sinh/zsinhs.c" + "src/c/elementaryFunctions/sinh/u8sinha.c" + "src/c/elementaryFunctions/sinh/u8sinhs.c" + "src/c/elementaryFunctions/sinh/i8sinha.c" + "src/c/elementaryFunctions/sinh/i8sinhs.c" + "src/c/elementaryFunctions/sinh/u16sinha.c" + "src/c/elementaryFunctions/sinh/u16sinhs.c" + "src/c/elementaryFunctions/sinh/i16sinha.c" + "src/c/elementaryFunctions/sinh/i16sinhs.c" + "src/c/elementaryFunctions/tanh/ctanha.c" + "src/c/elementaryFunctions/tanh/ctanhs.c" + "src/c/elementaryFunctions/tanh/dtanha.c" + "src/c/elementaryFunctions/tanh/dtanhs.c" + "src/c/elementaryFunctions/tanh/stanha.c" + "src/c/elementaryFunctions/tanh/stanhs.c" + "src/c/elementaryFunctions/tanh/ztanha.c" + "src/c/elementaryFunctions/tanh/ztanhs.c" + "src/c/elementaryFunctions/tanh/u8tanha.c" + "src/c/elementaryFunctions/tanh/u8tanhs.c" + "src/c/elementaryFunctions/tanh/i8tanha.c" + "src/c/elementaryFunctions/tanh/i8tanhs.c" + "src/c/elementaryFunctions/tanh/u16tanha.c" + "src/c/elementaryFunctions/tanh/u16tanhs.c" + "src/c/elementaryFunctions/tanh/i16tanha.c" + "src/c/elementaryFunctions/tanh/i16tanhs.c" + "src/c/elementaryFunctions/sqrt/csqrta.c" + "src/c/elementaryFunctions/sqrt/csqrts.c" + "src/c/elementaryFunctions/sqrt/dsqrta.c" + "src/c/elementaryFunctions/sqrt/dsqrts.c" + "src/c/elementaryFunctions/sqrt/ssqrta.c" + "src/c/elementaryFunctions/sqrt/ssqrts.c" + "src/c/elementaryFunctions/sqrt/zsqrta.c" + "src/c/elementaryFunctions/sqrt/zsqrts.c" + "src/c/elementaryFunctions/acosh/cacosha.c" + "src/c/elementaryFunctions/acosh/cacoshs.c" + "src/c/elementaryFunctions/acosh/zacosha.c" + "src/c/elementaryFunctions/acosh/zacoshs.c" + "src/c/elementaryFunctions/acosh/sacosha.c" + "src/c/elementaryFunctions/acosh/sacoshs.c" + "src/c/elementaryFunctions/acosh/dacosha.c" + "src/c/elementaryFunctions/acosh/dacoshs.c" + "src/c/elementaryFunctions/asinh/dasinha.c" + "src/c/elementaryFunctions/asinh/dasinhs.c" + "src/c/elementaryFunctions/asinh/casinha.c" + "src/c/elementaryFunctions/asinh/casinhs.c" + "src/c/elementaryFunctions/asinh/zasinha.c" + "src/c/elementaryFunctions/asinh/zasinhs.c" + "src/c/elementaryFunctions/asinh/sasinha.c" + "src/c/elementaryFunctions/asinh/sasinhs.c" + "src/c/elementaryFunctions/atan2/datan2a.c" + "src/c/elementaryFunctions/atan2/datan2s.c" + "src/c/elementaryFunctions/atan2/satan2a.c" + "src/c/elementaryFunctions/atan2/satan2s.c" + "src/c/elementaryFunctions/atanh/datanha.c" + "src/c/elementaryFunctions/atanh/datanhs.c" + "src/c/elementaryFunctions/atanh/catanha.c" + "src/c/elementaryFunctions/atanh/catanhs.c" + "src/c/elementaryFunctions/atanh/zatanha.c" + "src/c/elementaryFunctions/atanh/zatanhs.c" + "src/c/elementaryFunctions/atanh/satanha.c" + "src/c/elementaryFunctions/atanh/satanhs.c" + "src/c/elementaryFunctions/floor/dfloora.c" + "src/c/elementaryFunctions/floor/dfloors.c" + "src/c/elementaryFunctions/floor/cfloora.c" + "src/c/elementaryFunctions/floor/cfloors.c" + "src/c/elementaryFunctions/floor/zfloora.c" + "src/c/elementaryFunctions/floor/zfloors.c" + "src/c/elementaryFunctions/floor/sfloora.c" + "src/c/elementaryFunctions/floor/sfloors.c" + "src/c/elementaryFunctions/floor/u8floora.c" + "src/c/elementaryFunctions/floor/u8floors.c" + "src/c/elementaryFunctions/floor/i8floora.c" + "src/c/elementaryFunctions/floor/i8floors.c" + "src/c/elementaryFunctions/floor/u16floora.c" + "src/c/elementaryFunctions/floor/u16floors.c" + "src/c/elementaryFunctions/floor/i16floora.c" + "src/c/elementaryFunctions/floor/i16floors.c" + "src/c/elementaryFunctions/exp10/dexp10a.c" + "src/c/elementaryFunctions/exp10/dexp10s.c" + "src/c/elementaryFunctions/exp10/cexp10a.c" + "src/c/elementaryFunctions/exp10/cexp10s.c" + "src/c/elementaryFunctions/exp10/zexp10a.c" + "src/c/elementaryFunctions/exp10/zexp10s.c" + "src/c/elementaryFunctions/exp10/sexp10a.c" + "src/c/elementaryFunctions/exp10/sexp10s.c" + "src/c/elementaryFunctions/log10/dlog10a.c" + "src/c/elementaryFunctions/log10/dlog10s.c" + "src/c/elementaryFunctions/log10/clog10a.c" + "src/c/elementaryFunctions/log10/clog10s.c" + "src/c/elementaryFunctions/log10/zlog10a.c" + "src/c/elementaryFunctions/log10/zlog10s.c" + "src/c/elementaryFunctions/log10/slog10a.c" + "src/c/elementaryFunctions/log10/slog10s.c" + "src/c/elementaryFunctions/log1p/dlog1pa.c" + "src/c/elementaryFunctions/log1p/dlog1ps.c" + "src/c/elementaryFunctions/log1p/clog1pa.c" + "src/c/elementaryFunctions/log1p/clog1ps.c" + "src/c/elementaryFunctions/log1p/zlog1pa.c" + "src/c/elementaryFunctions/log1p/zlog1ps.c" + "src/c/elementaryFunctions/log1p/slog1pa.c" + "src/c/elementaryFunctions/log1p/slog1ps.c" + "src/c/elementaryFunctions/round/drounda.c" + "src/c/elementaryFunctions/round/drounds.c" + "src/c/elementaryFunctions/round/crounda.c" + "src/c/elementaryFunctions/round/crounds.c" + "src/c/elementaryFunctions/round/zrounda.c" + "src/c/elementaryFunctions/round/zrounds.c" + "src/c/elementaryFunctions/round/srounda.c" + "src/c/elementaryFunctions/round/srounds.c" + "src/c/elementaryFunctions/round/u8rounda.c" + "src/c/elementaryFunctions/round/u8rounds.c" + "src/c/elementaryFunctions/round/i8rounda.c" + "src/c/elementaryFunctions/round/i8rounds.c" + "src/c/elementaryFunctions/round/u16rounda.c" + "src/c/elementaryFunctions/round/u16rounds.c" + "src/c/elementaryFunctions/round/i16rounda.c" + "src/c/elementaryFunctions/round/i16rounds.c" + "src/c/elementaryFunctions/lnp1m1/slnp1m1s.c" + "src/c/elementaryFunctions/lnp1m1/dlnp1m1s.c" + "src/c/elementaryFunctions/uint8/duint8s.c" + "src/c/elementaryFunctions/uint8/duint8a.c" + "src/c/elementaryFunctions/uint8/suint8s.c" + "src/c/elementaryFunctions/uint8/suint8a.c" + "src/c/elementaryFunctions/uint8/i8uint8s.c" + "src/c/elementaryFunctions/uint8/i8uint8a.c" + "src/c/elementaryFunctions/uint8/u16uint8s.c" + "src/c/elementaryFunctions/uint8/u16uint8a.c" + "src/c/elementaryFunctions/uint8/i16uint8s.c" + "src/c/elementaryFunctions/uint8/i16uint8a.c" + "src/c/elementaryFunctions/float/dfloats.c" + "src/c/elementaryFunctions/float/dfloata.c" + "src/c/elementaryFunctions/float/sfloats.c" + "src/c/elementaryFunctions/float/sfloata.c" + "src/c/elementaryFunctions/float/u8floats.c" + "src/c/elementaryFunctions/float/u8floata.c" + "src/c/elementaryFunctions/float/i8floats.c" + "src/c/elementaryFunctions/float/i8floata.c" + "src/c/elementaryFunctions/float/u16floats.c" + "src/c/elementaryFunctions/float/u16floata.c" + "src/c/elementaryFunctions/float/i16floats.c" + "src/c/elementaryFunctions/float/i16floata.c" + "src/c/elementaryFunctions/int8/dint8s.c" + "src/c/elementaryFunctions/int8/dint8a.c" + "src/c/elementaryFunctions/int8/sint8s.c" + "src/c/elementaryFunctions/int8/sint8a.c" + "src/c/elementaryFunctions/int8/u8int8s.c" + "src/c/elementaryFunctions/int8/u8int8a.c" + "src/c/elementaryFunctions/int8/u16int8s.c" + "src/c/elementaryFunctions/int8/u16int8a.c" + "src/c/elementaryFunctions/int8/i16int8s.c" + "src/c/elementaryFunctions/int8/i16int8a.c" + "src/c/elementaryFunctions/uint16/duint16s.c" + "src/c/elementaryFunctions/uint16/duint16a.c" + "src/c/elementaryFunctions/uint16/suint16s.c" + "src/c/elementaryFunctions/uint16/suint16a.c" + "src/c/elementaryFunctions/uint16/u8uint16s.c" + "src/c/elementaryFunctions/uint16/u8uint16a.c" + "src/c/elementaryFunctions/uint16/i8uint16s.c" + "src/c/elementaryFunctions/uint16/i8uint16a.c" + "src/c/elementaryFunctions/uint16/i16uint16s.c" + "src/c/elementaryFunctions/uint16/i16uint16a.c" + "src/c/elementaryFunctions/int16/dint16s.c" + "src/c/elementaryFunctions/int16/dint16a.c" + "src/c/elementaryFunctions/int16/sint16s.c" + "src/c/elementaryFunctions/int16/sint16a.c" + "src/c/elementaryFunctions/int16/u8int16s.c" + "src/c/elementaryFunctions/int16/u8int16a.c" + "src/c/elementaryFunctions/int16/i8int16s.c" + "src/c/elementaryFunctions/int16/i8int16a.c" + "src/c/elementaryFunctions/int16/u16int16s.c" + "src/c/elementaryFunctions/int16/u16int16a.c" + "src/c/elementaryFunctions/bitand/u8bitands.c" + "src/c/elementaryFunctions/bitand/u8bitanda.c" + "src/c/elementaryFunctions/bitand/u16bitands.c" + "src/c/elementaryFunctions/bitand/u16bitanda.c" + "src/c/elementaryFunctions/bitor/u8bitors.c" + "src/c/elementaryFunctions/bitor/u8bitora.c" + "src/c/elementaryFunctions/bitor/u16bitors.c" + "src/c/elementaryFunctions/bitor/u16bitora.c" + "src/c/elementaryFunctions/bitxor/u8bitxors.c" + "src/c/elementaryFunctions/bitxor/u8bitxora.c" + "src/c/elementaryFunctions/bitxor/u16bitxors.c" + "src/c/elementaryFunctions/bitxor/u16bitxora.c" + "src/c/elementaryFunctions/bitcmp/u8bitcmps.c" + "src/c/elementaryFunctions/bitcmp/u8bitcmpa.c" + "src/c/elementaryFunctions/bitcmp/u16bitcmps.c" + "src/c/elementaryFunctions/bitcmp/u16bitcmpa.c" + "src/c/elementaryFunctions/bitset/u8bitsets.c" + "src/c/elementaryFunctions/bitset/u16bitsets.c" + "src/c/elementaryFunctions/bitget/u8bitgets.c" + "src/c/elementaryFunctions/bitget/u16bitgets.c" + "src/c/elementaryFunctions/linspace/dlinspaces.c" + "src/c/elementaryFunctions/linspace/dlinspacea.c" + "src/c/elementaryFunctions/logspace/dlogspaces.c" + "src/c/elementaryFunctions/logspace/dlogspacea.c" + "src/c/elementaryFunctions/acosd/dacosda.c" + "src/c/elementaryFunctions/acosd/dacosds.c" + "src/c/elementaryFunctions/acosd/sacosda.c" + "src/c/elementaryFunctions/acosd/sacosds.c" + "src/c/elementaryFunctions/acot/dacota.c" + "src/c/elementaryFunctions/acot/dacots.c" + "src/c/elementaryFunctions/acot/sacota.c" + "src/c/elementaryFunctions/acot/sacots.c" + "src/c/elementaryFunctions/acot/cacots.c" + "src/c/elementaryFunctions/acot/cacota.c" + "src/c/elementaryFunctions/acot/zacots.c" + "src/c/elementaryFunctions/acot/zacota.c" + "src/c/elementaryFunctions/acotd/dacotda.c" + "src/c/elementaryFunctions/acotd/dacotds.c" + "src/c/elementaryFunctions/acotd/sacotda.c" + "src/c/elementaryFunctions/acotd/sacotds.c" + "src/c/elementaryFunctions/acoth/dacotha.c" + "src/c/elementaryFunctions/acoth/dacoths.c" + "src/c/elementaryFunctions/acoth/sacotha.c" + "src/c/elementaryFunctions/acoth/sacoths.c" + "src/c/elementaryFunctions/acoth/cacoths.c" + "src/c/elementaryFunctions/acoth/cacotha.c" + "src/c/elementaryFunctions/acoth/zacoths.c" + "src/c/elementaryFunctions/acoth/zacotha.c" + "src/c/elementaryFunctions/acsc/dacsca.c" + "src/c/elementaryFunctions/acsc/dacscs.c" + "src/c/elementaryFunctions/acsc/sacsca.c" + "src/c/elementaryFunctions/acsc/sacscs.c" + "src/c/elementaryFunctions/acsc/cacscs.c" + "src/c/elementaryFunctions/acsc/cacsca.c" + "src/c/elementaryFunctions/acsc/zacscs.c" + "src/c/elementaryFunctions/acsc/zacsca.c" + "src/c/elementaryFunctions/acscd/dacscda.c" + "src/c/elementaryFunctions/acscd/dacscds.c" + "src/c/elementaryFunctions/acscd/sacscda.c" + "src/c/elementaryFunctions/acscd/sacscds.c" + "src/c/elementaryFunctions/acsch/dacscha.c" + "src/c/elementaryFunctions/acsch/dacschs.c" + "src/c/elementaryFunctions/acsch/sacscha.c" + "src/c/elementaryFunctions/acsch/sacschs.c" + "src/c/elementaryFunctions/asec/daseca.c" + "src/c/elementaryFunctions/asec/dasecs.c" + "src/c/elementaryFunctions/asec/saseca.c" + "src/c/elementaryFunctions/asec/sasecs.c" + "src/c/elementaryFunctions/asecd/dasecda.c" + "src/c/elementaryFunctions/asecd/dasecds.c" + "src/c/elementaryFunctions/asecd/sasecda.c" + "src/c/elementaryFunctions/asecd/sasecds.c" + "src/c/elementaryFunctions/asech/dasecha.c" + "src/c/elementaryFunctions/asech/dasechs.c" + "src/c/elementaryFunctions/asech/sasecha.c" + "src/c/elementaryFunctions/asech/sasechs.c" + "src/c/elementaryFunctions/asind/dasinda.c" + "src/c/elementaryFunctions/asind/dasinds.c" + "src/c/elementaryFunctions/asind/sasinda.c" + "src/c/elementaryFunctions/asind/sasinds.c" + "src/c/elementaryFunctions/atand/datanda.c" + "src/c/elementaryFunctions/atand/datands.c" + "src/c/elementaryFunctions/atand/satanda.c" + "src/c/elementaryFunctions/atand/satands.c" + "src/c/statisticsFunctions/max/dmaxa.c" + "src/c/statisticsFunctions/max/smaxa.c" + "src/c/statisticsFunctions/max/srowmaxa.c" + "src/c/statisticsFunctions/max/drowmaxa.c" + "src/c/statisticsFunctions/max/scolumnmaxa.c" + "src/c/statisticsFunctions/max/dcolumnmaxa.c" + "src/c/statisticsFunctions/min/dmina.c" + "src/c/statisticsFunctions/min/smina.c" + "src/c/statisticsFunctions/min/srowmina.c" + "src/c/statisticsFunctions/min/drowmina.c" + "src/c/statisticsFunctions/min/scolumnmina.c" + "src/c/statisticsFunctions/min/dcolumnmina.c" + "src/c/statisticsFunctions/sum/dcolumnsuma.c" + "src/c/statisticsFunctions/sum/csuma.c" + "src/c/statisticsFunctions/sum/dsuma.c" + "src/c/statisticsFunctions/sum/zrowsuma.c" + "src/c/statisticsFunctions/sum/ssuma.c" + "src/c/statisticsFunctions/sum/crowsuma.c" + "src/c/statisticsFunctions/sum/zsuma.c" + "src/c/statisticsFunctions/sum/zcolumnsuma.c" + "src/c/statisticsFunctions/sum/srowsuma.c" + "src/c/statisticsFunctions/sum/drowsuma.c" + "src/c/statisticsFunctions/sum/scolumnsuma.c" + "src/c/statisticsFunctions/sum/ccolumnsuma.c" + "src/c/statisticsFunctions/mean/cmeana.c" + "src/c/statisticsFunctions/mean/ccolumnmeana.c" + "src/c/statisticsFunctions/mean/srowmeana.c" + "src/c/statisticsFunctions/mean/drowmeana.c" + "src/c/statisticsFunctions/mean/dmeana.c" + "src/c/statisticsFunctions/mean/zrowmeana.c" + "src/c/statisticsFunctions/mean/smeana.c" + "src/c/statisticsFunctions/mean/scolumnmeana.c" + "src/c/statisticsFunctions/mean/crowmeana.c" + "src/c/statisticsFunctions/mean/dcolumnmeana.c" + "src/c/statisticsFunctions/mean/zmeana.c" + "src/c/statisticsFunctions/mean/zcolumnmeana.c" + "src/c/statisticsFunctions/meanf/cmeanfa.c" + "src/c/statisticsFunctions/meanf/ccolumnmeanfa.c" + "src/c/statisticsFunctions/meanf/srowmeanfa.c" + "src/c/statisticsFunctions/meanf/drowmeanfa.c" + "src/c/statisticsFunctions/meanf/dmeanfa.c" + "src/c/statisticsFunctions/meanf/zrowmeanfa.c" + "src/c/statisticsFunctions/meanf/smeanfa.c" + "src/c/statisticsFunctions/meanf/scolumnmeanfa.c" + "src/c/statisticsFunctions/meanf/crowmeanfa.c" + "src/c/statisticsFunctions/meanf/dcolumnmeanfa.c" + "src/c/statisticsFunctions/meanf/zmeanfa.c" + "src/c/statisticsFunctions/meanf/zmeanfzd.c" + "src/c/statisticsFunctions/meanf/cmeanfcs.c" + "src/c/statisticsFunctions/meanf/zmeanfdz.c" + "src/c/statisticsFunctions/meanf/cmeanfsc.c" + "src/c/statisticsFunctions/meanf/zcolumnmeanfa.c" + "src/c/statisticsFunctions/prod/srowproda.c" + "src/c/statisticsFunctions/prod/drowproda.c" + "src/c/statisticsFunctions/prod/dproda.c" + "src/c/statisticsFunctions/prod/zrowproda.c" + "src/c/statisticsFunctions/prod/sproda.c" + "src/c/statisticsFunctions/prod/scolumnproda.c" + "src/c/statisticsFunctions/prod/crowproda.c" + "src/c/statisticsFunctions/prod/dcolumnproda.c" + "src/c/statisticsFunctions/prod/zproda.c" + "src/c/statisticsFunctions/prod/zcolumnproda.c" + "src/c/statisticsFunctions/prod/cproda.c" + "src/c/statisticsFunctions/prod/ccolumnproda.c" + "src/c/statisticsFunctions/variance/cvariancea.c" + "src/c/statisticsFunctions/variance/zvariancea.c" + "src/c/statisticsFunctions/variance/dcolumnvariancea.c" + "src/c/statisticsFunctions/variance/dvariancea.c" + "src/c/statisticsFunctions/variance/crowvariancea.c" + "src/c/statisticsFunctions/variance/svariancea.c" + "src/c/statisticsFunctions/variance/drowvariancea.c" + "src/c/statisticsFunctions/variance/srowvariancea.c" + "src/c/statisticsFunctions/variance/zcolumnvariancea.c" + "src/c/statisticsFunctions/variance/zrowvariancea.c" + "src/c/statisticsFunctions/variance/ccolumnvariancea.c" + "src/c/statisticsFunctions/variance/scolumnvariancea.c" + "src/c/statisticsFunctions/stdevf/cstdevfa.c" + "src/c/statisticsFunctions/stdevf/zstdevfa.c" + "src/c/statisticsFunctions/stdevf/cstdevfcs.c" + "src/c/statisticsFunctions/stdevf/zstdevfzd.c" + "src/c/statisticsFunctions/stdevf/cstdevfsc.c" + "src/c/statisticsFunctions/stdevf/zstdevfdz.c" + "src/c/statisticsFunctions/stdevf/dcolumnstdevfa.c" + "src/c/statisticsFunctions/stdevf/dstdevfa.c" + "src/c/statisticsFunctions/stdevf/crowstdevfa.c" + "src/c/statisticsFunctions/stdevf/sstdevfa.c" + "src/c/statisticsFunctions/stdevf/drowstdevfa.c" + "src/c/statisticsFunctions/stdevf/srowstdevfa.c" + "src/c/statisticsFunctions/stdevf/zcolumnstdevfa.c" + "src/c/statisticsFunctions/stdevf/zrowstdevfa.c" + "src/c/statisticsFunctions/stdevf/ccolumnstdevfa.c" + "src/c/statisticsFunctions/stdevf/scolumnstdevfa.c" + "src/c/operations/multiplication/cmula.c" + "src/c/operations/multiplication/cmuls.c" + "src/c/operations/multiplication/cmulv.c" + "src/c/operations/multiplication/cmulcsv.c" + "src/c/operations/multiplication/cmulscv.c" + "src/c/operations/multiplication/dmula.c" + "src/c/operations/multiplication/dmuls.c" + "src/c/operations/multiplication/dmulv.c" + "src/c/operations/multiplication/smula.c" + "src/c/operations/multiplication/smuls.c" + "src/c/operations/multiplication/smulv.c" + "src/c/operations/multiplication/zmula.c" + "src/c/operations/multiplication/zmuls.c" + "src/c/operations/multiplication/zmulv.c" + "src/c/operations/multiplication/zmuldzv.c" + "src/c/operations/multiplication/zmulzdv.c" + "src/c/operations/multiplication/u8muls.c" + "src/c/operations/multiplication/u8mulv.c" + "src/c/operations/multiplication/i8muls.c" + "src/c/operations/multiplication/i8mulv.c" + "src/c/operations/multiplication/u16muls.c" + "src/c/operations/multiplication/u16mulv.c" + "src/c/operations/multiplication/i16muls.c" + "src/c/operations/multiplication/i16mulv.c" + "src/c/operations/division/drdiva.c" + "src/c/operations/division/drdivs.c" + "src/c/operations/division/srdiva.c" + "src/c/operations/division/srdivs.c" + "src/c/operations/division/dldiva.c" + "src/c/operations/division/dldivs.c" + "src/c/operations/division/sldiva.c" + "src/c/operations/division/sldivs.c" + "src/c/operations/division/zrdiva.c" + "src/c/operations/division/zrdivs.c" + "src/c/operations/division/zldiva.c" + "src/c/operations/division/zldivs.c" + "src/c/operations/division/crdiva.c" + "src/c/operations/division/crdivs.c" + "src/c/operations/division/cldiva.c" + "src/c/operations/division/cldivs.c" + "src/c/operations/division/u8ldivs.c" + "src/c/operations/division/u8rdivs.c" + "src/c/operations/division/i8ldivs.c" + "src/c/operations/division/i8rdivs.c" + "src/c/operations/division/u16ldivs.c" + "src/c/operations/division/u16rdivs.c" + "src/c/operations/division/i16ldivs.c" + "src/c/operations/division/i16rdivs.c" + "src/c/operations/addition/sadda.c" + "src/c/operations/addition/sadds.c" + "src/c/operations/addition/zadda.c" + "src/c/operations/addition/zadds.c" + "src/c/operations/addition/cadda.c" + "src/c/operations/addition/cadds.c" + "src/c/operations/addition/dadda.c" + "src/c/operations/addition/dadds.c" + "src/c/operations/addition/u8adds.c" + "src/c/operations/addition/u8adda.c" + "src/c/operations/addition/i8adds.c" + "src/c/operations/addition/i8adda.c" + "src/c/operations/addition/u16adds.c" + "src/c/operations/addition/u16adda.c" + "src/c/operations/addition/i16adds.c" + "src/c/operations/addition/i16adda.c" + "src/c/operations/subtraction/ddiffa.c" + "src/c/operations/subtraction/ddiffs.c" + "src/c/operations/subtraction/sdiffa.c" + "src/c/operations/subtraction/sdiffs.c" + "src/c/operations/subtraction/zdiffa.c" + "src/c/operations/subtraction/zdiffs.c" + "src/c/operations/subtraction/cdiffa.c" + "src/c/operations/subtraction/cdiffs.c" + "src/c/operations/subtraction/u8diffs.c" + "src/c/operations/subtraction/u8diffa.c" + "src/c/operations/subtraction/i8diffs.c" + "src/c/operations/subtraction/i8diffa.c" + "src/c/operations/subtraction/u16diffs.c" + "src/c/operations/subtraction/u16diffa.c" + "src/c/operations/subtraction/i16diffs.c" + "src/c/operations/subtraction/i16diffa.c" + "src/c/string/disp/ddispa.c" + "src/c/string/disp/ddisps.c" + "src/c/string/disp/sdispa.c" + "src/c/string/disp/sdisps.c" + "src/c/string/disp/zdispa.c" + "src/c/string/disp/zdisps.c" + "src/c/string/disp/cdispa.c" + "src/c/string/disp/cdisps.c" + "src/c/string/disp/u8dispa.c" + "src/c/string/disp/u8disps.c" + "src/c/string/disp/i8dispa.c" + "src/c/string/disp/i8disps.c" + "src/c/string/disp/u16dispa.c" + "src/c/string/disp/u16disps.c" + "src/c/string/disp/i16dispa.c" + "src/c/string/disp/i16disps.c" + "src/c/string/disp/ddisph.c" + "src/c/string/string/zstringa.c" + "src/c/string/string/zstrings.c" + "src/c/string/string/cstringa.c" + "src/c/string/string/cstrings.c" + "src/c/string/string/sstringa.c" + "src/c/string/string/sstrings.c" + "src/c/string/string/dstringa.c" + "src/c/string/string/dstrings.c" + "src/c/string/string/u8stringa.c" + "src/c/string/string/u8strings.c" + "src/c/string/string/i8stringa.c" + "src/c/string/string/i8strings.c" + "src/c/string/string/u16stringa.c" + "src/c/string/string/u16strings.c" + "src/c/string/string/i16stringa.c" + "src/c/string/string/i16strings.c" + "src/c/signalProcessing/fft/dfft2.c" + "src/c/signalProcessing/fft/cfftma.c" + "src/c/signalProcessing/fft/r2tx.c" + "src/c/signalProcessing/fft/r4tx.c" + "src/c/signalProcessing/fft/r8tx.c" + "src/c/signalProcessing/fft/dfftbi.c" + "src/c/signalProcessing/fft/dfftma.c" + "src/c/signalProcessing/fft/dfftmx.c" + "src/c/signalProcessing/fft/sfftma.c" + "src/c/signalProcessing/fft/zfftma.c" + "src/c/signalProcessing/fft/fft842.c" + "src/c/signalProcessing/lev/dleva.c" + "src/c/signalProcessing/lev/sleva.c" + "src/c/signalProcessing/lev/zleva.c" + "src/c/signalProcessing/lev/dleva2.c" + "src/c/signalProcessing/lev/sleva2.c" + "src/c/signalProcessing/lev/zleva2.c" + "src/c/signalProcessing/lev/cleva2.c" + "src/c/signalProcessing/lev/cleva.c" + "src/c/signalProcessing/conv/dconva.c" + "src/c/signalProcessing/conv/sconva.c" + "src/c/signalProcessing/conv/zconva.c" + "src/c/signalProcessing/conv/cconva.c" + "src/c/signalProcessing/ifft/difftbi.c" + "src/c/signalProcessing/ifft/difftma.c" + "src/c/signalProcessing/ifft/difftmx.c" + "src/c/signalProcessing/ifft/difft2.c" + "src/c/signalProcessing/ifft/ifft842.c" + "src/c/signalProcessing/ifft/cifftma.c" + "src/c/signalProcessing/ifft/zifftma.c" + "src/c/signalProcessing/ifft/sifftma.c" + "src/c/signalProcessing/ifft/ir2tx.c" + "src/c/signalProcessing/ifft/ir4tx.c" + "src/c/signalProcessing/ifft/ir8tx.c" + "src/c/signalProcessing/fftshift/crowfftshifta.c" + "src/c/signalProcessing/fftshift/sfftshifta.c" + "src/c/signalProcessing/fftshift/drowfftshifta.c" + "src/c/signalProcessing/fftshift/srowfftshifta.c" + "src/c/signalProcessing/fftshift/zcolumnfftshifta.c" + "src/c/signalProcessing/fftshift/zrowfftshifta.c" + "src/c/signalProcessing/fftshift/ccolumnfftshifta.c" + "src/c/signalProcessing/fftshift/scolumnfftshifta.c" + "src/c/signalProcessing/fftshift/cfftshifta.c" + "src/c/signalProcessing/fftshift/zfftshifta.c" + "src/c/signalProcessing/fftshift/dcolumnfftshifta.c" + "src/c/signalProcessing/fftshift/dfftshifta.c" + "src/c/signalProcessing/levin/levinUtils.c" + "src/c/signalProcessing/levin/slevina.c" + "src/c/signalProcessing/levin/dlevina.c" + "src/c/signalProcessing/lpc2cep/dlpc2cepa.c" + "src/c/signalProcessing/lpc2cep/zlpc2cepa.c" + "src/c/signalProcessing/lpc2cep/clpc2cepa.c" + "src/c/signalProcessing/lpc2cep/slpc2cepa.c" + "src/c/signalProcessing/crossCorr/dcrossCorra.c" + "src/c/signalProcessing/crossCorr/zcrossCorra.c" + "src/c/signalProcessing/crossCorr/scrossCorra.c" + "src/c/signalProcessing/crossCorr/ccrossCorra.c" + "src/c/signalProcessing/conv2d/zconv2da.c" + "src/c/signalProcessing/conv2d/cconv2da.c" + "src/c/signalProcessing/conv2d/sconv2da.c" + "src/c/signalProcessing/conv2d/dconv2da.c" + "src/c/signalProcessing/hilbert/shilberta.c" + "src/c/signalProcessing/hilbert/shilberts.c" + "src/c/signalProcessing/hilbert/dhilberta.c" + "src/c/signalProcessing/hilbert/dhilberts.c" + "src/c/implicitList/zimplicitLists.c" + "src/c/implicitList/dimplicitLists.c" + "src/c/implicitList/cimplicitLists.c" + "src/c/implicitList/simplicitLists.c" + "src/c/differential_calculus/ode/dodes.c" + "src/c/differential_calculus/ode/dodea.c" + "src/c/differential_calculus/diff/ddiffca.c" + "src/c/differential_calculus/diff/sdiffca.c" + "src/c/differential_calculus/diff/u8diffca.c" + "src/c/Files/mopen/mopen.c" + "src/c/Files/mclose/mclose.c" + "src/c/Files/mput/dmputs.c" + "src/c/Files/mput/smputs.c" + "src/c/Files/mput/u8mputs.c" + "src/c/Files/mput/i8mputs.c" + "src/c/Files/mput/u16mputs.c" + "src/c/Files/mput/i16mputs.c" + "src/c/Files/mput/dmputa.c" + "src/c/Files/mput/smputa.c" + "src/c/Files/mput/u8mputa.c" + "src/c/Files/mput/i8mputa.c" + "src/c/Files/mput/u16mputa.c" + "src/c/Files/mput/i16mputa.c" + "src/c/string/convstr/gconvstrs.c" + "src/c/string/strsubst/gstrsubsta.c" + //"src/c/string/strcmp/gstrcmps.c" + "src/c/string/strrev/gstrreva.c" + "src/c/string/strrchr/gstrrchra.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" + "src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c" + "src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c" + "src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c" + "src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c" + "src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c" + "src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c" + "src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c" + "src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c" + "src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c" + "src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c" + "src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c" + "src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c" + "src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c" + "src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c" + "src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c" + "src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c" + "src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c" + "src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c" + //"src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c" + //"src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c" + "src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c" + "src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c" + "src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c" + "src/c/elementaryFunctions/Trigonometry/cosd/scosda.c" + "src/c/elementaryFunctions/Trigonometry/cosd/scosds.c" + "src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c" + "src/c/elementaryFunctions/Trigonometry/cotd/dcotds.c" + "src/c/elementaryFunctions/Trigonometry/cotd/scotda.c" + "src/c/elementaryFunctions/Trigonometry/cotd/scotds.c" + "src/c/elementaryFunctions/Trigonometry/coth/dcotha.c" + "src/c/elementaryFunctions/Trigonometry/coth/dcoths.c" + "src/c/elementaryFunctions/Trigonometry/coth/scotha.c" + "src/c/elementaryFunctions/Trigonometry/coth/scoths.c" + "src/c/elementaryFunctions/Trigonometry/coth/zcoths.c" + "src/c/elementaryFunctions/Trigonometry/coth/zcotha.c" + "src/c/elementaryFunctions/Trigonometry/coth/ccoths.c" + "src/c/elementaryFunctions/Trigonometry/coth/ccotha.c" + "src/c/elementaryFunctions/Trigonometry/csc/dcsca.c" + "src/c/elementaryFunctions/Trigonometry/csc/dcscs.c" + "src/c/elementaryFunctions/Trigonometry/csc/scsca.c" + "src/c/elementaryFunctions/Trigonometry/csc/scscs.c" + "src/c/elementaryFunctions/Trigonometry/csc/zcscs.c" + "src/c/elementaryFunctions/Trigonometry/csc/zcsca.c" + "src/c/elementaryFunctions/Trigonometry/csc/ccscs.c" + "src/c/elementaryFunctions/Trigonometry/csc/ccsca.c" + "src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c" + "src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c" + "src/c/elementaryFunctions/Trigonometry/cscd/scscds.c" + "src/c/elementaryFunctions/Trigonometry/cscd/scscda.c" + "src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c" + "src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c" + "src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c" + "src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c" + "src/c/elementaryFunctions/Trigonometry/csch/dcscha.c" + "src/c/elementaryFunctions/Trigonometry/csch/dcschs.c" + "src/c/elementaryFunctions/Trigonometry/csch/scscha.c" + "src/c/elementaryFunctions/Trigonometry/csch/scschs.c" + "src/c/elementaryFunctions/Trigonometry/csch/zcschs.c" + "src/c/elementaryFunctions/Trigonometry/csch/zcscha.c" + "src/c/elementaryFunctions/Trigonometry/csch/ccschs.c" + "src/c/elementaryFunctions/Trigonometry/csch/ccscha.c" + "src/c/elementaryFunctions/Trigonometry/sec/dsecs.c" + "src/c/elementaryFunctions/Trigonometry/sec/dseca.c" + "src/c/elementaryFunctions/Trigonometry/sec/sseca.c" + "src/c/elementaryFunctions/Trigonometry/sec/ssecs.c" + //"src/c/elementaryFunctions/Trigonometry/sec/zseca.c" + "src/c/elementaryFunctions/Trigonometry/sec/zsecs.c" + "src/c/elementaryFunctions/Trigonometry/sec/cseca.c" + "src/c/elementaryFunctions/Trigonometry/sec/csecs.c" + "src/c/elementaryFunctions/Trigonometry/secd/dsecda.c" + "src/c/elementaryFunctions/Trigonometry/secd/dsecds.c" + "src/c/elementaryFunctions/Trigonometry/secd/ssecda.c" + "src/c/elementaryFunctions/Trigonometry/secd/ssecds.c" + "src/c/elementaryFunctions/Trigonometry/sech/dsechs.c" + "src/c/elementaryFunctions/Trigonometry/sech/dsecha.c" + "src/c/elementaryFunctions/Trigonometry/sech/ssecha.c" + "src/c/elementaryFunctions/Trigonometry/sech/ssechs.c" + "src/c/elementaryFunctions/Trigonometry/sech/zsecha.c" + "src/c/elementaryFunctions/Trigonometry/sech/zsechs.c" + "src/c/elementaryFunctions/Trigonometry/sech/csecha.c" + "src/c/elementaryFunctions/Trigonometry/sech/csechs.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" + "src/c/elementaryFunctions/discrete_mathematics/factorial/sfactoriala.c" + "src/c/elementaryFunctions/discrete_mathematics/primes/dprimess.c" + "src/c/elementaryFunctions/discrete_mathematics/primes/sprimess.c" + "src/c/elementaryFunctions/discrete_mathematics/factor/dfactors.c" + "src/c/elementaryFunctions/discrete_mathematics/factor/sfactors.c" + "src/c/CACSD/syslin/dsyslina.c" + "src/c/CACSD/lqr/dlqra.c" + "src/c/CACSD/lqe/dlqea.c" + "src/c/CACSD/obscont/dobsconta.c" + "src/c/linearAlgebra/schur/dschura.c" + "src/c/linearAlgebra/schur/dgschura.c" + "src/c/linearAlgebra/balanc/dbalanca.c" + "src/c/linearAlgebra/rcond/drconda.c"]; + + //Files to be inserted only if output format selected is 'Arduino'. + Arduino_files = ["src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c" + "src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c" + "src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c" + "src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c" + "src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c" + "src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c" + //"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/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 = [ + "src/c/hardware/avr/gpio/u8AVRDigitalSetups.c" + "src/c/hardware/avr/gpio/u8AVRDigitalPortSetups.c" + "src/c/hardware/avr/gpio/u8AVRDigitalOuts.c" + "src/c/hardware/avr/gpio/u8AVRDigitalIns.c" + "src/c/hardware/avr/adc/u8AVRADCSetups.c" + "src/c/hardware/avr/adc/u8AVRReadADCs.c" + "src/c/hardware/avr/pwm/u8AVRPWM0Setups.c" + "src/c/hardware/avr/pwm/u8AVRPWM2Setups.c" + "src/c/hardware/avr/pwm/u8AVRPWM1Setups.c" + "src/c/hardware/avr/pwm/u8AVRPWM0SetDutys.c" + "src/c/hardware/avr/pwm/u8AVRPWM2SetDutys.c" + "src/c/hardware/avr/pwm/u8AVRPWM1SetDutys.c" + "src/c/hardware/avr/util/u16AVRSleeps.c" + "src/c/hardware/avr/timer/u8AVRTimerSetups.c" + "src/c/hardware/avr/timer/u8AVRGetTimerValues.c" + "src/c/hardware/avr/uart/u8AVRUARTReceiveCharu8.c" + "src/c/hardware/avr/uart/u8AVRUARTSetups.c" + "src/c/hardware/avr/uart/u8AVRUARTTransmits.c" + "src/c/hardware/avr/uart/i16AVRUARTTransmits.c" + "src/c/hardware/avr/uart/i8AVRUARTTransmits.c" + "src/c/hardware/avr/uart/gAVRUARTTransmits.c" + "src/c/hardware/avr/uart/u16AVRUARTTransmits.c" + "src/c/hardware/avr/uart/u8AVRUARTTransmita.c" + "src/c/hardware/avr/uart/i16AVRUARTTransmita.c" + "src/c/hardware/avr/uart/i8AVRUARTTransmita.c" + "src/c/hardware/avr/uart/dAVRUARTTransmits.c" +// "src/c/hardware/avr/uart/gAVRUARTTransmita.c" + "src/c/hardware/avr/uart/u16AVRUARTTransmita.c" +// "src/c/hardware/avr/uart/sAVRUARTTransmits.c" + + + ]; + + RPI_files = [ + "src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c" + "src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c" + "src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c" + "src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c" + "src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c" + "src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c" + "src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c" + "src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c" + "src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c" + "src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c" + "src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/i16RPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c" + "src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c" + "src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c" + "src/c/hardware/rasberrypi/serial/i16RPISerialSendDataa.c" + "src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/dRPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c" + "src/c/hardware/rasberrypi/serial/dRPISerialSendDataa.c" + "src/c/hardware/rasberrypi/serial/gRPISerialSendDatas.c" + "src/c/hardware/rasberrypi/serial/i16RPISerialDataAvails.c" + "src/c/hardware/rasberrypi/serial/i16RPISerialGetChars.c" + "src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c" + "src/c/hardware/rasberrypi/threading/u16RPIThreadCreates.c" + "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c" + "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetRanges.c" + "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c" + "src/c/hardware/rasberrypi/pwm/u8RPIHardPWMSetClocks.c" + "src/c/hardware/rasberrypi/ISR/i16RPIPinISRs.c" + ]; + + OpenCV_files = [ + "src/c/imageProcessing/cvcore/imcvCreateImages.cpp" + "src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp" + "src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp" + "src/c/imageProcessing/cvimgproc/imcvThresholds.cpp" + "src/c/imageProcessing/cvimgproc/imcvAdaptThresholds.cpp" + "src/c/imageProcessing/cvimgproc/imcvDistanceTransforms.cpp" + "src/c/imageProcessing/cvimgproc/imcvBlurs.cpp" + "src/c/imageProcessing/cvimgproc/imcvGaussianBlurs.cpp" + "src/c/imageProcessing/cvimgproc/imcvMedianBlurs.cpp" + "src/c/imageProcessing/cvimgproc/imcvErode.cpp" + "src/c/imageProcessing/cvimgproc/imcvDilate.cpp" + "src/c/imageProcessing/cvimgproc/imcvCanny.cpp" + "src/c/imageProcessing/cvimgproc/imcvCornerHarris.cpp"]; + + if Target == "Arduino" & BuildTool == "nmake" + Required_addrs = get_rquird_fnctns(Standalone_files,Arduino_files,SharedInfo); + end + + if Target == "StandAlone" + allSources = Standalone_files; + elseif Target == "Arduino" + if BuildTool == "nmake" + allSources = Required_addrs; + else + allSources = cat(1,Standalone_files, Arduino_files); + end + elseif Target == "AVR" + allSources = cat(1,Standalone_files, AVR_files); + elseif Target == "RPi" + allSources = cat(1,Standalone_files, RPI_files); + end + + if (SharedInfo.OpenCVUsed == %T) + allSources = cat(1,allSources,OpenCV_files); + end + + //"src/c/matrixOperations/cat/zcata.c" + // "src/c/matrixOperations/cat/zcats.c" + // "src/c/matrixOperations/cat/ccata.c" + //"src/c/matrixOperations/cat/ccats.c" +endfunction diff --git a/2.3-1/macros/findDeps/getArduinoFiles.sci b/2.3-1/macros/findDeps/getArduinoFiles.sci new file mode 100644 index 00000000..97264575 --- /dev/null +++ b/2.3-1/macros/findDeps/getArduinoFiles.sci @@ -0,0 +1,27 @@ +// Copyright (C) 2016 - 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 +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +function arduinoFiles = getArduinoFiles() +// ----------------------------------------------------------------- +// Returns address of some default arduino files +// +// Input data: +// None +// +// Output data: +// Returns address of some default arduino files +// +// Author: Siddhesh Wani +// ----------------------------------------------------------------- + + arduinoFiles = [ + "src/c/scilab-arduino/default_files/setup_arduino.h" + "src/c/scilab-arduino/default_files/sci2c_arduino.ino"]; +endfunction diff --git a/2.3-1/macros/findDeps/get_rquird_fnctns.sci b/2.3-1/macros/findDeps/get_rquird_fnctns.sci new file mode 100644 index 00000000..28837952 --- /dev/null +++ b/2.3-1/macros/findDeps/get_rquird_fnctns.sci @@ -0,0 +1,140 @@ +// 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: Yash Pratap Singh Tomar +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + +//This function creates and compares the list of functions used in scilab code to existing function list from getallSources +function Required_addrs = get_rquird_fnctns(Standalone_files,Arduino_files,SharedInfo) + Required_stdalon_indx = 1; + Required_ardno_indx = 1; + x = 1; + y = 1; + +//Creating lists for stanalone C file and function +//Some C files don't have their function name directory. So their address is being shifted to last of the list + Standalone_files_1 = Standalone_files; + Standalone_files_extras(1) = Standalone_files_1(76); + Standalone_files_extras(2) = Standalone_files_1(77); + Standalone_files_extras(3) = Standalone_files_1(1009); + Standalone_files_extras(4) = Standalone_files_1(1010); + Standalone_files_extras(5) = Standalone_files_1(1011); + Standalone_files_extras(6) = Standalone_files_1(1012); + Standalone_files_1(1012) = []; + Standalone_files_1(1011) = []; + Standalone_files_1(1010) = []; + Standalone_files_1(1009) = []; + Standalone_files_1(77) = []; + Standalone_files_1(76) = []; + +//calculating the total no. of standalone files + No_of_stdalon_files = size(Standalone_files_1); + No_of_stdalon_files = No_of_stdalon_files(1); + +//This for loop is to extract function name list from address list + for index=1:No_of_stdalon_files + K = strsplit(Standalone_files_1(index),"/"); + Standalone_files_folders(index) = K(4); + Standalone_C_files(index) = K(5); + Standalone_C_files(index) = strtok(Standalone_C_files(index),"."); + end + +//Here, it adds the functions to the list which were earlier removed to shift to the end + for index=1:6 + K = strsplit(Standalone_files_extras(index),"/"); + Standalone_files_folders(No_of_stdalon_files+index) = K(3); + Standalone_C_files(No_of_stdalon_files+index) = K(4); + Standalone_files_1(No_of_stdalon_files+index)= Standalone_files_extras(index); + Standalone_C_files(No_of_stdalon_files+index) = strtok(Standalone_C_files(No_of_stdalon_files+index),"."); + end + +//Following similar procedure for Arduino + Arduino_files_1 = Arduino_files; + No_of_ardno_files = size(Arduino_files_1); + No_of_ardno_files = No_of_ardno_files(1); + for index=1:No_of_ardno_files + K = strsplit(Arduino_files_1(index),"/"); + Arduino_files_folders(index) = K(4); + Arduino_C_files(index) = K(5); + Arduino_C_files(index) = strtok(Arduino_C_files(index),"."); + end + +//comparing +//this compares the list of functions used in scilab file to the created standalone C files and function list + for index = 1:SharedInfo.Function_list_index + for k = 1:No_of_stdalon_files + if SharedInfo.Function_list(index) == Standalone_files_folders(k) + Required_fnctn_stdalon(Required_stdalon_indx) = k; + Required_fnctn_stdlon_f(x) = Standalone_C_files(k); + x = x+1; + Required_stdalon_indx = Required_stdalon_indx + 1; + end + end + end + if x == 1 + Required_fnctn_stdlon_f = []; + end +//this compares the list of functions used in scilab file to the created Arduino files and function list +Required_stdalon_indx = Required_stdalon_indx - 1; + + for index = 1:SharedInfo.Function_list_index + for k = 1:No_of_ardno_files + if SharedInfo.Function_list(index) == Arduino_files_folders(k); + Required_fnctn_ardno(Required_ardno_indx) = k; + Required_fnctn_ardno_f(y) = Arduino_C_files(k); + y = y+1; + Required_ardno_indx = Required_ardno_indx + 1; + end + end + end + + Required_ardno_indx = Required_ardno_indx - 1; +//Calling Scilab2CDeps structure + scilab2ccode = Scilab2CDeps(); + +//Looking for the depencies of the C files used on other files + for index = 1:Required_stdalon_indx + call = "scilab2ccode.deps." + Standalone_C_files(Required_fnctn_stdalon(index)); + call_val = eval(call); + Required_fnctn_stdlon_f = cat(1,Required_fnctn_stdlon_f,(call_val)'); + end + + Required_fnctn_stdlon_f = unique(Required_fnctn_stdlon_f); + +//Looking for the depencies of the Arduino files used on other C or Arduino files + for index = 1:Required_ardno_indx + call = "scilab2ccode.deps." + Arduino_C_files(Required_fnctn_ardno(index)); + call_val = eval(call); + Required_fnctn_ardno_f = cat(1,Required_fnctn_ardno_f,(call_val)'); + end + Required_fnctn_ardno_f = unique(Required_fnctn_ardno_f); + +//Adding Standalone and Arudino files lists + all_files_addrs = cat(1,Standalone_files_1,Arduino_files_1); + +//Adding Requied Standalone and Arudino files lists which are to be copied + required_files = cat(1,Required_fnctn_stdlon_f,Required_fnctn_ardno_f); + required_files = unique(required_files); + no_of_required_files = size(required_files); + no_of_required_files = no_of_required_files(1); + no_of_all_files = size(all_files_addrs); + no_of_all_files = no_of_all_files(1); + + all_files = cat(1,Standalone_C_files,Arduino_C_files); + index = 1; +//Creating final list which has address of files to be copied + for i=1:no_of_required_files + for k=1:no_of_all_files + if required_files(i) == all_files(k) + Required_addrs(index) = all_files_addrs(k); + index = index + 1; + end + end + end + +endfunction diff --git a/2.3-1/macros/findDeps/lib b/2.3-1/macros/findDeps/lib Binary files differnew file mode 100644 index 00000000..6d120fef --- /dev/null +++ b/2.3-1/macros/findDeps/lib diff --git a/2.3-1/macros/findDeps/names b/2.3-1/macros/findDeps/names new file mode 100644 index 00000000..b1825b69 --- /dev/null +++ b/2.3-1/macros/findDeps/names @@ -0,0 +1,8 @@ +Scilab2CDeps +findDeps +getAllHeaders +getAllInterfaces +getAllLibraries +getAllSources +getArduinoFiles +get_rquird_fnctns diff --git a/2.3-1/macros/full_reset.sce b/2.3-1/macros/full_reset.sce new file mode 100644 index 00000000..084ad851 --- /dev/null +++ b/2.3-1/macros/full_reset.sce @@ -0,0 +1,22 @@ +// Clear files, variables, figures, screen. +//mode(-1); +//clc; + +//disp('Starting full reset...') +//disp('Press enter to continue...'); +//halt; + +//clc; +//clear +//mclose('all'); + +// +// LOL !!!! +// Well... I'm pretty sure this is totally useless. +// +// Assuming that max 50 figures are currently open +//for counter =1:50 +// close +//end +//YES BUT I NEED HOW TO PERFORM THE CLOSE ALL ACTION!!! +//lines(0) diff --git a/2.3-1/macros/getScilab2cVersion.sci b/2.3-1/macros/getScilab2cVersion.sci new file mode 100644 index 00000000..36c01797 --- /dev/null +++ b/2.3-1/macros/getScilab2cVersion.sci @@ -0,0 +1,15 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2012-2012 - Scilab Enterprises - Bruno JOFRET +// +// 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 +// +// + +function version=getScilab2cVersion() + version = "2.3" +endfunction diff --git a/2.3-1/macros/lib b/2.3-1/macros/lib Binary files differnew file mode 100644 index 00000000..77c2f112 --- /dev/null +++ b/2.3-1/macros/lib diff --git a/2.3-1/macros/names b/2.3-1/macros/names new file mode 100644 index 00000000..a126347e --- /dev/null +++ b/2.3-1/macros/names @@ -0,0 +1,6 @@ +cb_sci2c_gui +getScilab2cVersion +runsci2c +runscicode +sci2c_gui +scilab2c diff --git a/2.3-1/macros/runsci2c.sci b/2.3-1/macros/runsci2c.sci new file mode 100644 index 00000000..7475f870 --- /dev/null +++ b/2.3-1/macros/runsci2c.sci @@ -0,0 +1,266 @@ +function runsci2c(UserScilabMainFile, UserSciFilesPaths, SCI2COutputPath, Runmode, BuildTool,Target,Board_name)
+// function runsci2c(SCI2CInputPrmFile)
+// -----------------------------------------------------------------
+// === hArtes/PoliBa/GAP SCI2C tool ===
+// === Authors: ===
+// === Raffaele Nutricato ===
+// === raffaele.nutricato@tiscali.it ===
+// === Alberto Morea ===
+//
+// This is the main function of SCI2C.
+//
+// Input data:
+// SCI2CInputPrmFile: path+filename of the input parameters file.
+//
+// Output data:
+// ---
+//
+// Status:
+// 11-Apr-2007 -- Raffaele Nutricato: Author.
+// 11-Apr-2007 -- Alberto Morea: Tests.
+//
+// Copyright 2007 Raffaele Nutricato & Alberto Morea.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// -------------------
+// --- Soft reset. ---
+// -------------------
+//mode(-1);
+//clc;
+// -----------------------
+// --- End Soft reset. ---
+// -----------------------
+
+// -------------------------
+// --- Input Parameters. ---
+// -------------------------
+RunSci2CMainDir = pwd();
+disp(RunSci2CMainDir);
+// -----------------------------
+// --- End input Parameters. ---
+// -----------------------------
+
+// -------------------------------
+// --- Perform Intializations. ---
+// -------------------------------
+// --- Load SCI2C directories and files. ---
+//cd(fullfile(RunSci2CMainDir,'ToolInitialization'));
+//exec('INIT_SCI2CLoader.sce');
+//cd(RunSci2CMainDir);
+
+// --- Initialize the SCI2C tool directories and files. ---
+[FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(UserScilabMainFile, ...
+ UserSciFilesPaths, SCI2COutputPath, RunMode, Target,Board_name);
+
+// -- Load FileInfo and SharedInfo
+load(SharedInfoDatFile,'SharedInfo');
+load(FileInfoDatFile,'FileInfo');
+
+RunMode = SharedInfo.RunMode;
+
+// --- Generation of the library structure. ---
+if (RunMode == 'GenLibraryStructure' | RunMode == 'All')
+ INIT_GenLibraries(FileInfoDatFile);
+end
+
+// --- Load Library Info. ---
+INIT_LoadLibraries(FileInfoDatFile);
+
+// -----------------------------------
+// --- End Perform Intializations. ---
+// -----------------------------------
+
+// ----------------------------------
+// --- Perform SCI2C Translation. ---
+// ----------------------------------
+if (RunMode == 'All' | RunMode == 'Translate')
+ FlagContinueTranslation = 1;
+ while(FlagContinueTranslation == 1)
+ UpdateSCI2CInfo(FileInfoDatFile);
+ AST_GetASTFile(FileInfoDatFile);
+ AST2Ccode(FileInfoDatFile);
+ JoinDeclarAndCcode(FileInfoDatFile);
+ FlagContinueTranslation = ManageNextConversion(FileInfoDatFile);
+ end
+end
+
+load(SharedInfoDatFile,'SharedInfo');
+// ---------------------------
+// --- Copy library files. ---
+// ---------------------------
+
+global SCI2CHOME
+allSources = SCI2CHOME + "/" + getAllSources(SharedInfo, BuildTool);
+allHeaders = SCI2CHOME + "/" +getAllHeaders(SharedInfo);
+allInterfaces = SCI2CHOME + "/" + getAllInterfaces(SharedInfo);
+if(~isempty(getAllLibraries(SharedInfo)))
+ allLibraries = SCI2CHOME + "/" + getAllLibraries(SharedInfo);
+else
+ allLibraries = ''
+end
+//allLibraries = SCI2CHOME + "/" + getAllLibraries(Target);
+if (Target == 'Arduino')
+ mkdir(SCI2COutputPath+"/arduino/");
+ mkdir(SCI2COutputPath+"/arduino/sci2c_arduino");
+end
+mkdir(SCI2COutputPath+"/src/");
+mkdir(SCI2COutputPath+"/src/c/");
+mkdir(SCI2COutputPath+"/includes/");
+mkdir(SCI2COutputPath+"/interfaces/");
+mkdir(SCI2COutputPath+"/libraries/");
+
+// -- Sources
+PrintStepInfo('Copying sources', FileInfo.GeneralReport,'both');
+
+for i = 1:size(allSources, "*")
+ // DEBUG only
+ //disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
+ //Copy ode related functions only if 'ode' function is used.
+ if(~isempty(strstr(allSources(i),'dode')))
+ if(size(SharedInfo.Includelist) <> 0)
+ if((mtlb_strcmp(part(SharedInfo.Includelist(1),1:5),'odefn') == %T))
+ if BuildTool == "nmake"
+ copyfile(allSources(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
+ else
+ copyfile(allSources(i), SCI2COutputPath+"/src/c/");
+ end
+ end
+ end
+ else
+ if BuildTool == "nmake"
+ copyfile(allSources(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
+ else
+ copyfile(allSources(i), SCI2COutputPath+"/src/c/");
+ end
+ end
+end
+
+// -- Includes
+PrintStepInfo('Copying headers', FileInfo.GeneralReport,'both');
+for i = 1:size(allHeaders, "*")
+ // DEBUG only
+ //disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
+ if BuildTool == "nmake"
+ copyfile(allHeaders(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
+ else
+ copyfile(allHeaders(i), SCI2COutputPath+"/includes/");
+ end
+end
+
+// -- Interfaces
+PrintStepInfo('Copying interfaces', FileInfo.GeneralReport,'both');
+for i = 1:size(allInterfaces, "*")
+ // DEBUG only
+ //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
+ if BuildTool == "nmake"
+ copyfile(allInterfaces(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
+ else
+ copyfile(allInterfaces(i), SCI2COutputPath+"/interfaces/");
+ end
+end
+
+// -- Libraries
+if(~isempty(allLibraries))
+ PrintStepInfo('Copying libraries', FileInfo.GeneralReport,'both');
+ for i = 1:size(allLibraries, "*")
+ // DEBUG only
+ //disp("Copying "+allLibraries(i)+" in "+SCI2COutputPath+"/libraries/");
+ copyfile(allLibraries(i), SCI2COutputPath+"/libraries/");
+ end
+end
+
+//Copy folder containing opencv include files in Includes folder
+//if((Target == 'RPi') & (SharedInfo.OpenCVUsed == %T))
+// copyfile(SCI2CHOME + "/" +'thirdparty/raspberrypi/includes/opencv2/',SCI2COutputPath+"/includes/opencv2")
+//end
+
+// --------------------------
+// --- Generate Makefile. ---
+// --------------------------
+//If output format is chosen as 'Arduino', then copy makefile for arduino from
+//default folder, else generate makefile for standalone c code
+
+if (Target == 'Arduino')
+
+ GenerateSetupFunction(FileInfo);
+ //Copy arduino makefile
+ arduinoFiles = SCI2CHOME + "/" + getArduinoFiles();
+ PrintStepInfo('Copying arduino files', FileInfo.GeneralReport,'both');
+ copyfile(arduinoFiles(1), SCI2COutputPath);
+ for i = 2:size(arduinoFiles, "*")
+ // DEBUG only
+ //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);
+else
+
+ if BuildTool == "make"
+ C_GenerateMakefile(FileInfo,SharedInfo);
+ copyBlasLapackLibs(FileInfo,SharedInfo); //Previously .dll files and blas,lapack library not creating for cygwin by additing this works fine
+ end
+ if BuildTool == "nmake"
+ //copyBlasLapackLibs(FileInfo,SharedInfo);
+ C_GenerateMakefile_msvc(FileInfo,SharedInfo);
+ end
+end
+if BuildTool == "nmake" & Target == 'Arduino'
+ movefile(SCI2COutputPath +"/setup_arduino.h", SCI2COutputPath+"/arduino/sci2c_arduino/");
+ movefile(SCI2COutputPath +"/setup_arduino.cpp", SCI2COutputPath+"/arduino/sci2c_arduino/");
+ movefile(SCI2COutputPath +"/loop_arduino.cpp", SCI2COutputPath+"/arduino/sci2c_arduino/");
+ movefile(SCI2COutputPath +"/loop_arduino.h", SCI2COutputPath+"/arduino/sci2c_arduino/");
+end
+
+
+
+// ------------------------------
+// --- Generate SCI2C Header. ---
+// ------------------------------
+// FIXME : Give the user the ability to set this prefix
+FunctionPrefix = "SCI2C";
+C_GenerateSCI2CHeader(SCI2COutputPath+"/includes/", FunctionPrefix);
+
+// -----------------
+// --- Epilogue. ---
+// -----------------
+if (RunMode == 'All' | RunMode == 'Translate')
+ PrintStepInfo('Translation Successfully Completed!!!',FileInfo.GeneralReport,'both');
+elseif (RunMode == 'GenLibraryStructure')
+ PrintStepInfo('Library Structure Successfully Created!!!',FileInfo.GeneralReport,'both');
+end
+
+
+endfunction
+
+
+function r = copyBlasLapackLibs(FileInfo, SharedInfo)
+ r = %f;
+ if getos() == 'Windows' then
+ // create external-libs directory
+ EXTERNLIBSPATH = FileInfo.OutCCCodeDir + '/external-libs';
+ if ~isdir(EXTERNLIBSPATH) then
+ mkdir(EXTERNLIBSPATH);
+ end
+ if ~isdir(EXTERNLIBSPATH) r = %f;
+ else
+ // copy blas & lapack librairies
+ copyfile(SCI + '/bin/blasplus.lib', EXTERNLIBSPATH);
+ copyfile(SCI + '/bin/lapack.lib', EXTERNLIBSPATH);
+ copyfile(SCI + '/bin/blasplus.dll', FileInfo.OutCCCodeDir);
+ copyfile(SCI + '/bin/lapack.dll', FileInfo.OutCCCodeDir);
+ // copy dependencies if MKL
+ if isfile(SCI + '/bin/libguide40.dll') then
+ copyfile(SCI + '/bin/libguide40.dll', FileInfo.OutCCCodeDir);
+ end
+ if isfile(SCI + '/bin/libiomp5md.dll') then
+ copyfile(SCI + '/bin/libiomp5md.dll', FileInfo.OutCCCodeDir);
+ end
+ r = %t;
+ end
+ end
+endfunction
diff --git a/2.3-1/macros/runscicode.sci b/2.3-1/macros/runscicode.sci new file mode 100644 index 00000000..94b76a17 --- /dev/null +++ b/2.3-1/macros/runscicode.sci @@ -0,0 +1,67 @@ +function runscicode(UserScilabMainFile, UserSciFilesPaths) +// function runscicode(SCI2CInputPrmFile) +// ----------------------------------------------------------------- +// === hArtes/PoliBa/GAP SCI2C tool === +// === Authors: === +// === Raffaele Nutricato === +// === raffaele.nutricato@tiscali.it === +// === Alberto Morea === +// +// Run the code written by the user before translating it. +// +// Input data: +// --- +// Output data: +// --- +// +// Status: +// 11-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------- +// --- Soft reset. --- +// ------------------- +//mode(-1); +//clc; +// ----------------------- +// --- End Soft reset. --- +// ----------------------- + +// ------------------------- +// --- Input Parameters. --- +// ------------------------- +//RunSci2CMainDir = pwd(); +// ----------------------------- +// --- End input Parameters. --- +// ----------------------------- + +//cd(fullfile(RunSci2CMainDir,'ToolInitialization')); +//exec('INIT_SCI2CLoader.sce'); +//cd(RunSci2CMainDir); + +// --- Read user parameters. --- +//exec(SCI2CInputPrmFile); + +// --- Add all user paths. --- +for cntpath = 1:size(UserSciFilesPaths,1) + getd(UserSciFilesPaths(cntpath)); +end + +// --- Execute code. --- +disp('-----------------------------------'); +disp('--- Executing your SCILAB code. ---'); +disp('-----------------------------------'); +exec(UserScilabMainFile); +[tmppath,tmpfile,tmpext] = fileparts(UserScilabMainFile); +//cd(tmppath); +execstr(tmpfile); +//cd(RunSci2CMainDir); +disp('------------------------------------------'); +disp('--- End Execution of your SCILAB code. ---'); +disp('------------------------------------------'); + + +endfunction
\ No newline at end of file diff --git a/2.3-1/macros/sci2c_gui.sci b/2.3-1/macros/sci2c_gui.sci new file mode 100644 index 00000000..bee6fe43 --- /dev/null +++ b/2.3-1/macros/sci2c_gui.sci @@ -0,0 +1,516 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - INRIA - Vincent COUVERT +// +// 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 +// + +function sci2c_gui() + +// Sizes +widgeth = 20; +widgetLabelWidth = 220; +btnh = 22; +btnw = 80; +defaultfont = "arial"; +margin = 13; +radiow = 85; + +// Figure creation +sci2cfig = figure("figure_name", gettext("Scilab to C conversion tool"),"tag","sci2cfig"); + +// Remove Scilab graphics menus & toolbar +delmenu(sci2cfig.figure_id, gettext("&File")); +delmenu(sci2cfig.figure_id, gettext("&Tools")); +delmenu(sci2cfig.figure_id, gettext("&Edit")); +delmenu(sci2cfig.figure_id, gettext("&?")); +toolbar(sci2cfig.figure_id, "off"); + +h = uimenu("parent", sci2cfig, "label", gettext("File")); +uimenu("parent", h, "label", gettext("Close"), "callback", "cb_sci2c_gui", "tag", "close_menu"); + +h = uimenu("parent", sci2cfig, "label", gettext("?")); +uimenu("parent", h, "label", gettext("Sci2c help page"), "callback", "cb_sci2c_gui", "tag", "sci2c_help_menu"); +uimenu("parent", h, "label", gettext("About SCI2C tools..."), "callback", "cb_sci2c_gui", "tag", "about_sci2c_menu"); + +figw = 800; +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 + +//------------------- +// --- Validation --- +//------------------- + +// Convert button +convertbtn = uicontrol("parent", sci2cfig,... + "backgroundcolor", [0.8 0.8 0.8],... + "style", "pushbutton",... + "string", gettext("Convert"),... + "position", [figw-2*margin-2*btnw margin btnw btnh],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "tag","convertbtn",... + "callback","cb_sci2c_gui"); + +// Cancel button +cancelbtn = uicontrol("parent", sci2cfig,... + "backgroundcolor", [0.8 0.8 0.8],... + "style", "pushbutton",... + "string", gettext("Cancel"),... + "position", [figw-margin-btnw margin btnw btnh],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "tag", "cancelbtn",... + "callback","cb_sci2c_gui"); + +//---------------- +// --- Options --- +//---------------- +// Frame +optframe = uicontrol("parent", sci2cfig,... + "relief", "groove",... + "style", "frame",... + "units", "pixels",... + "position", [margin 2*margin+btnh figw-2*margin 7*margin+6*widgeth],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "fontweight", "bold", ... + "horizontalalignment", "center"); +// Frame title +opttitle = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Options"),... + "units", "pixels",... + "position", [2*margin 5*margin+btnh+4*margin+6*widgeth-8 50 18],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 11,... + "horizontalalignment", "center"); + +// --- Building Tool --- +buildtooly = 2 * margin + 2 * btnh + margin; +buildtoollabel = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Tool to compile generated C code: "),... + "position",[2*margin buildtooly widgetLabelWidth widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12); +buildtoolradiowin = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("nmake for Windows with Visual Studio / Visual Express"),... + "position",[2*margin+widgetLabelWidth buildtooly 5 * radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "callback", "cb_sci2c_gui",... + "tag", "buildtoolradiowin"); +buildtoolradiounix = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("make for Unix / Windows with Cygwin"),... + "position",[2*margin+widgetLabelWidth buildtooly-widgeth 5 * radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "callback", "cb_sci2c_gui",... + "tag", "buildtoolradiounix"); +if getos() == "Windows" + set(buildtoolradiowin, "value", 1); + set(buildtoolradiounix, "value", 0); +else + set(buildtoolradiowin, "value", 0); + set(buildtoolradiounix, "value", 1); +end + +// --- Copy Scilab code into C option --- +sciintocy = buildtooly + margin + btnh ; +sciintoclabel = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Copy Scilab code into C: "),... + "position",[2*margin sciintocy widgetLabelWidth widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12); +sciintocradioyes = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("Yes"),... + "position",[2*margin+widgetLabelWidth sciintocy radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 0,... + "callback", "cb_sci2c_gui",... + "tag", "sciintocradioyes"); +sciintocradiono = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("No"),... + "position",[2*margin+widgetLabelWidth+radiow sciintocy radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 1,... + "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,... + "style", "text",... + "string", gettext("Type of output format: "),... + "position",[2*margin outformaty widgetLabelWidth widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12); + +outformatradiostalone = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("Stand-alone"),... + "position",[2*margin+widgetLabelWidth outformaty 2*radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 1,... + "callback", "cb_sci2c_gui",... + "tag", "outformatradiostalone"); + +outformatradioarduino = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("Arduino"),... + "position",[margin+widgetLabelWidth+2*radiow outformaty radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 0,... + "callback", "cb_sci2c_gui",... + "tag", "outformatradioarduino"); + +outformatradioavr = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("AVR"),... + "position",[margin+widgetLabelWidth+3*radiow outformaty radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 0,... + "callback", "cb_sci2c_gui",... + "tag", "outformatradioavr"); + +outformatradiorpi = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("Rpi"),... + "position",[margin+widgetLabelWidth+4*radiow outformaty radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 0,... + "callback", "cb_sci2c_gui",... + "tag", "outformatradiorpi"); + + +// --- Run mode option --- +runy = outformaty + margin + widgeth; +runlabel = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Run mode: "),... + "position",[2*margin runy widgetLabelWidth widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12); +runradioall = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("All"),... + "position",[2*margin+widgetLabelWidth runy radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 1,... + "callback", "cb_sci2c_gui",... + "tag", "runradioall"); +runradiotranslate = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("Translate"),... + "position",[2*margin+widgetLabelWidth+radiow runy radiow widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 0,... + "callback", "cb_sci2c_gui",... + "tag", "runradiotranslate"); +runradiogenlib = uicontrol("parent", sci2cfig,... + "style", "radiobutton",... + "string", gettext("Generate library"),... + "position",[2*margin+widgetLabelWidth+2*radiow runy 120 widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "min", 0, ... + "max", 1, ... + "value", 0,... + "callback", "cb_sci2c_gui",... + "tag", "runradiogenlib"); + +// ------------------------ +// --- Output directory --- +// ------------------------ +// Frame +optframemaxy = 5*margin+btnh + 4*margin+6*widgeth; +outframe = uicontrol("parent", sci2cfig,... + "relief", "groove",... + "style", "frame",... + "units", "pixels",... + "position", [margin optframemaxy+margin figw-2*margin widgeth+2*margin],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "fontweight", "bold", ... + "horizontalalignment", "center"); +// Frame title +outtitle = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Output directory"),... + "units", "pixels",... + "position", [2*margin optframemaxy+margin+widgeth+2*margin-8 90 14],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 11,... + "horizontalalignment", "center"); +outlabel = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Directory name: "),... + "position",[2*margin optframemaxy+2*margin-1 100 widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12); +outedit = uicontrol("parent", sci2cfig,... + "style", "edit",... + "string", TMPDIR,... + "units", "pixels",... + "position",[3*margin+100 optframemaxy+2*margin-1 figw-6*margin-100-btnw widgeth],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12, ... + "tag", "outedit"); +outbtn = uicontrol("parent", sci2cfig,... + "backgroundcolor", [0.8 0.8 0.8],... + "style", "pushbutton",... + "string", gettext("Browse"),... + "position",[figw-2*margin-btnw optframemaxy+2*margin btnw btnh],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "callback", "cb_sci2c_gui",... + "tag", "outbtn"); + +// ------------------------------- +// --- SciLib main header file --- +// ------------------------------- +// Frame +outframemaxy = optframemaxy + 2*margin + widgeth + margin; +// headerframe = uicontrol("parent", sci2cfig,... +// "relief", "groove",... +// "style", "frame",... +// "units", "pixels",... +// "position", [margin outframemaxy+margin figw-2*margin widgeth+2*margin],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12,... +// "fontweight", "bold", ... +// "horizontalalignment", "center"); +// // Frame title +// headertitle = uicontrol("parent", sci2cfig,... +// "style", "text",... +// "string", gettext("Scilab library header"),... +// "units", "pixels",... +// "position", [2*margin outframemaxy+margin+widgeth+2*margin-8 110 14],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 11,... +// "horizontalalignment", "center"); +// headerlabel = uicontrol("parent", sci2cfig,... +// "style", "text",... +// "string", gettext("File name: "),... +// "position",[2*margin outframemaxy+2*margin-1 100 widgeth],... +// "horizontalalignment", "left",... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12); +// headeredit = uicontrol("parent", sci2cfig,... +// "style", "edit",... +// "string", gettext("<enter a file name>"),... +// "units", "pixels",... +// "position",[3*margin+100 outframemaxy+2*margin-1 figw-6*margin-100-btnw widgeth],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12, ... +// "tag", "headeredit"); +// headerbtn = uicontrol("parent", sci2cfig,... +// "backgroundcolor", [0.8 0.8 0.8],... +// "style", "pushbutton",... +// "string", gettext("Browse"),... +// "position",[figw-2*margin-btnw outframemaxy+2*margin btnw btnh],... +// "fontname", defaultfont,... +// "fontunits", "points",... +// "fontsize", 12,... +// "callback", "cb_sci2c_gui",... +// "tag", "headerbtn"); + +// ------------------------- +// --- File(s) selection --- +// ------------------------- +// Frame +headerframemaxy = outframemaxy //+ 2*margin + widgeth + margin; +selframe = uicontrol("parent", sci2cfig,... + "relief", "groove",... + "style", "frame",... + "units", "pixels",... + "position", [margin headerframemaxy+margin figw-2*margin 3*margin+2*widgeth],... + "fontname", "arial",... + "fontunits", "points",... + "fontsize", 12,... + "fontweight", "bold", ... + "horizontalalignment", "center"); +// Frame title +seltitle = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Input file"),... + "units", "pixels",... + "position", [2*margin headerframemaxy+margin+3*margin+2*widgeth-8 50 14],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 11,... + "horizontalalignment", "center", ... + "tag", "seltitle"); + +// --- Sub-functions selection --- +subfunslabel = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Sub-functions: "),... + "position",[2*margin headerframemaxy+2*margin-1 100 widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12); +subfunsedit = uicontrol("parent", sci2cfig,... + "style", "edit",... + "string", "",... + "units", "pixels",... + "position",[3*margin+100 headerframemaxy+2*margin-1 figw-6*margin-100-btnw widgeth],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12, ... + "tag", "subfunsedit"); +subfunsbtn = uicontrol("parent", sci2cfig,... + "backgroundcolor", [0.8 0.8 0.8],... + "style", "pushbutton",... + "string", gettext("Browse"),... + "position",[figw-2*margin-btnw headerframemaxy+2*margin btnw btnh],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "callback", "cb_sci2c_gui",... + "tag", "subfunsbtn"); + +// --- File selection --- +filelabel = uicontrol("parent", sci2cfig,... + "style", "text",... + "string", gettext("Main file name: "),... + "position",[2*margin headerframemaxy+3*margin-1+widgeth 100 widgeth],... + "horizontalalignment", "left",... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "tag", "filelabel"); + +fileedit = uicontrol("parent", sci2cfig,... + "style", "edit",... + "string", gettext("<enter a file name>"),... + "position",[3*margin+100 headerframemaxy+3*margin-1+widgeth figw-6*margin-100-btnw widgeth],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "tag", "fileedit"); + +filebtn = uicontrol("parent", sci2cfig,... + "backgroundcolor", [0.8 0.8 0.8],... + "style", "pushbutton",... + "string", gettext("Browse"),... + "position",[figw-2*margin-btnw headerframemaxy+3*margin+widgeth btnw btnh],... + "fontname", defaultfont,... + "fontunits", "points",... + "fontsize", 12,... + "callback", "cb_sci2c_gui",... + "tag", "filebtn"); + +endfunction diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci new file mode 100644 index 00000000..2979b2ae --- /dev/null +++ b/2.3-1/macros/scilab2c.sci @@ -0,0 +1,212 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009-2010 - DIGITEO - Bruno JOFRET +// +// 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 +// +// + +function scilab2c(varargin) + [lhs, rhs] = argn(); + select rhs +// +// scilab2c() +// + case 0 + sci2c_gui(); + return +// +// scilab2c(UserScilabMainFile, CCodeOutputDir) +// + case 2 + for i = 1:2 + if typeof(varargin(i)) <> "string" + error(msprintf(gettext("%s: Wrong type for input argument #%d: String expected.\n"),"scilab2c",i)); + return + end + end + UserScilabMainFile = varargin(1); + CCodeOutputDir = varargin(2); + UserSciFilesPaths = []; + RunMode = 'All'; + BuildTool = getNativeBuildTool(); + Target = "StandAlone" + //Board_name = "uno" + // +// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths) +// + case 3 + for i = 1:3 + if typeof(varargin(i)) <> "string" + error(msprintf(gettext("%s: Wrong type for input argument #%d: String expected.\n"),"scilab2c",i)); + return + end + end + UserScilabMainFile = varargin(1); + CCodeOutputDir = varargin(2); + if varargin(3) == "" + UserSciFilesPaths = []; + else + UserSciFilesPaths = varargin(3); + end + RunMode = "All"; + BuildTool = getNativeBuildTool(); + Target = "StandAlone" + //Board_name = "uno" + // +// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths, RunMode) +// + case 4 + 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" + error(msprintf(gettext("%s: argument #%d must be: ""All"", ""Translate"",""GenLibraryStructure"".\n"),"scilab2c",4)); + return + end + UserScilabMainFile = varargin(1); + CCodeOutputDir = varargin(2); + if varargin(3) == "" + UserSciFilesPaths = []; + else + UserSciFilesPaths = varargin(3); + end + RunMode = varargin(4); + BuildTool = getNativeBuildTool(); + Target = "StandAlone" + //Board_name = "uno" + case 5 + 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 + UserScilabMainFile = varargin(1); + CCodeOutputDir = varargin(2); + if varargin(3) == "" + UserSciFilesPaths = []; + else + UserSciFilesPaths = varargin(3); + end + RunMode = varargin(4); + BuildTool = varargin(5); + Target = "StandAlone" + //Board_name = "uno" + case 6 + 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 + 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 = "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 +// +error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),"scilab2c",2)); + end + + +// --- LAUNCH USER SCI CODE TO TEST IT BEFORE TRANSLATING IT!!! --- +// If Target choosen is 'Standalone' then only execute the code, otherwise directly start conversion. + if (Target == "StandAlone" |Target == "AVR") + runscicode(UserScilabMainFile, UserSciFilesPaths); + + // --- ASK USER FOR CONTINUATION. --- + + // Do not open confirmation box if we are not in STD mode. + if(getscilabmode() == "STD") + userchoice = messagebox("Exection Succesfull. Start translation ?", "modal", "info", ["Yes" "No"]) + else + userchoice = 1 + end + else + userchoice = 1; + end + if (userchoice == 1) +// --- LAUNCH SCI2C --- + runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,Target,Board_name); + end + +endfunction + +function BuildTool = getNativeBuildTool() + if getos() == "Windows" + BuildTool = "nmake" + else + BuildTool = "make" + end +endfunction |