diff options
Diffstat (limited to '2.3-1')
27 files changed, 130 insertions, 17 deletions
diff --git a/2.3-1/loader.sce b/2.3-1/loader.sce index ddfe6370..061021cb 100644 --- a/2.3-1/loader.sce +++ b/2.3-1/loader.sce @@ -1,10 +1,20 @@ // This file is released under the 3-clause BSD license. See COPYING-BSD. // Generated by builder.sce: Please, do not edit this file +oldmode = mode(); mode(-1); +oldlines = lines()(2); lines(0); try - getversion("scilab"); + exec(get_absolute_file_path("loader.sce")+"etc/"+"scilab2c.start"); catch - error("Scilab 5.0 or more is required."); -end; + [errmsg, tmp, nline, func] = lasterror() + msg = "%s: error on line #%d: ""%s""\n" + msg = msprintf(msg, func, nline, errmsg) + lines(oldlines) + mode(oldmode); + clear oldlines oldmode tmp nline func + error(msg); +end +lines(oldlines); +mode(oldmode); +clear oldlines oldmode; -exec(get_absolute_file_path("loader.sce")+"etc\"+"scilab2c.start"); 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/%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/AST_HandleEOL.sci b/2.3-1/macros/ASTManagement/AST_HandleEOL.sci index 0f55457e..4b287283 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEOL.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleEOL.sci @@ -46,15 +46,17 @@ sciline = mgetl(SciFileFid,1); PrintStringInfo(' ',ReportFileName,'file','y','n'); PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); -PrintStringInfo('### Scilab code: '+sciline+' ###',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'; +//modeprintstringinfo = 'both'; if (SharedInfo.CopySciCodeIntoCCode == 1) - modeprintstringinfo = 'both'; + 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'); 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/_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/lib b/2.3-1/macros/ASTManagement/lib Binary files differindex ae21cfc5..67ea09be 100644 --- a/2.3-1/macros/ASTManagement/lib +++ b/2.3-1/macros/ASTManagement/lib diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names index 43522229..a1aafbc1 100644 --- a/2.3-1/macros/ASTManagement/names +++ b/2.3-1/macros/ASTManagement/names @@ -4,7 +4,9 @@ %for_string %funcall_string %ifthenel_string +%ifthenelse_string %operatio_string +%operation_string %program_p %program_string %variable_string @@ -47,7 +49,9 @@ _equal_string _for_string _funcall_string _ifthenel_string +_ifthenelse_string _operatio_string +_operation_string _program_p _program_string _variable_string diff --git a/2.3-1/macros/CCodeGeneration/lib b/2.3-1/macros/CCodeGeneration/lib Binary files differindex ef0ea492..2db4b8c8 100644 --- a/2.3-1/macros/CCodeGeneration/lib +++ b/2.3-1/macros/CCodeGeneration/lib diff --git a/2.3-1/macros/ErrorMessages/lib b/2.3-1/macros/ErrorMessages/lib Binary files differindex 5b1667c2..0a9f8913 100644 --- a/2.3-1/macros/ErrorMessages/lib +++ b/2.3-1/macros/ErrorMessages/lib diff --git a/2.3-1/macros/FunctionAnnotation/lib b/2.3-1/macros/FunctionAnnotation/lib Binary files differindex d9cc4762..f02997b0 100644 --- a/2.3-1/macros/FunctionAnnotation/lib +++ b/2.3-1/macros/FunctionAnnotation/lib diff --git a/2.3-1/macros/FunctionList/lib b/2.3-1/macros/FunctionList/lib Binary files differindex fc8038c9..2bbf0cbe 100644 --- a/2.3-1/macros/FunctionList/lib +++ b/2.3-1/macros/FunctionList/lib diff --git a/2.3-1/macros/GeneralFunctions/filenamefprintf.sci b/2.3-1/macros/GeneralFunctions/filenamefprintf.sci index 99ddcea4..f25e603e 100644 --- a/2.3-1/macros/GeneralFunctions/filenamefprintf.sci +++ b/2.3-1/macros/GeneralFunctions/filenamefprintf.sci @@ -23,7 +23,7 @@ function filenamefprintf(filename,ennewline,str,formattedstring) // Copyright 2006 Raffaele Nutricato.
// Contact: raffaele.nutricato@tiscali.it
// -----------------------------------------------------------------
- +
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
diff --git a/2.3-1/macros/GeneralFunctions/lib b/2.3-1/macros/GeneralFunctions/lib Binary files differindex 1c78f72c..e1d6f0fb 100644 --- a/2.3-1/macros/GeneralFunctions/lib +++ b/2.3-1/macros/GeneralFunctions/lib diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib Binary files differindex 16d9e3ea..5c8f0da2 100644 --- a/2.3-1/macros/Hardware/AVR/lib +++ b/2.3-1/macros/Hardware/AVR/lib diff --git a/2.3-1/macros/Hardware/RasberryPi/lib b/2.3-1/macros/Hardware/RasberryPi/lib Binary files differindex b92a6ea7..9afd77da 100644 --- a/2.3-1/macros/Hardware/RasberryPi/lib +++ b/2.3-1/macros/Hardware/RasberryPi/lib diff --git a/2.3-1/macros/ImageProcessing/core/lib b/2.3-1/macros/ImageProcessing/core/lib Binary files differindex 87c0f305..56053510 100644 --- a/2.3-1/macros/ImageProcessing/core/lib +++ b/2.3-1/macros/ImageProcessing/core/lib diff --git a/2.3-1/macros/ImageProcessing/highgui/lib b/2.3-1/macros/ImageProcessing/highgui/lib Binary files differindex 8f5561e0..a46d5d87 100644 --- a/2.3-1/macros/ImageProcessing/highgui/lib +++ b/2.3-1/macros/ImageProcessing/highgui/lib diff --git a/2.3-1/macros/ImageProcessing/imgproc/lib b/2.3-1/macros/ImageProcessing/imgproc/lib Binary files differindex c8b45d34..4863059b 100644 --- a/2.3-1/macros/ImageProcessing/imgproc/lib +++ b/2.3-1/macros/ImageProcessing/imgproc/lib diff --git a/2.3-1/macros/Scilab-Arduino/lib b/2.3-1/macros/Scilab-Arduino/lib Binary files differindex da395a36..0304cade 100644 --- a/2.3-1/macros/Scilab-Arduino/lib +++ b/2.3-1/macros/Scilab-Arduino/lib diff --git a/2.3-1/macros/SymbolTable/lib b/2.3-1/macros/SymbolTable/lib Binary files differindex f10d8ee9..dbc603e2 100644 --- a/2.3-1/macros/SymbolTable/lib +++ b/2.3-1/macros/SymbolTable/lib diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 8c5aee70..f0a83604 100644 --- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -5189,7 +5189,7 @@ ClassName = 'RPI_DigitalSetup'; 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('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');
diff --git a/2.3-1/macros/ToolInitialization/lib b/2.3-1/macros/ToolInitialization/lib Binary files differindex 439f3abf..4d03bdc5 100644 --- a/2.3-1/macros/ToolInitialization/lib +++ b/2.3-1/macros/ToolInitialization/lib diff --git a/2.3-1/macros/findDeps/lib b/2.3-1/macros/findDeps/lib Binary files differindex 25edeed7..a49dc793 100644 --- a/2.3-1/macros/findDeps/lib +++ b/2.3-1/macros/findDeps/lib diff --git a/2.3-1/macros/lib b/2.3-1/macros/lib Binary files differindex fcbd1b8d..d818e184 100644 --- a/2.3-1/macros/lib +++ b/2.3-1/macros/lib diff --git a/2.3-1/src/c/CACSD/obscont/dobsconta.c b/2.3-1/src/c/CACSD/obscont/dobsconta.c index 88837692..c67b70e2 100644 --- a/2.3-1/src/c/CACSD/obscont/dobsconta.c +++ b/2.3-1/src/c/CACSD/obscont/dobsconta.c @@ -85,7 +85,7 @@ void dobsconta(double* sys, int sys_rows, int sys_cols, double* Kc, double* Kf, } } - (int)dom = sys[(sys_rows*(sys_cols-2)) + no_of_states]; + dom = (int)sys[(sys_rows*(sys_cols-2)) + no_of_states]; dmulma(B,no_of_states,no_of_inputs,Kc,no_of_inputs,no_of_states,BKc); dmulma(Kf,no_of_states,no_of_outputs,C,no_of_outputs,no_of_states,KfC); diff --git a/2.3-1/unloader.sce b/2.3-1/unloader.sce index e0e3d5bc..e4ec09c7 100644 --- a/2.3-1/unloader.sce +++ b/2.3-1/unloader.sce @@ -1,14 +1,31 @@ // This file is released under the 3-clause BSD license. See COPYING-BSD. // Generated by builder.sce: Please, do not edit this file +oldmode = mode(); mode(-1); +oldlines = lines()(2); lines(0); try - getversion("scilab"); + // Unregister the library of macros. This does not unregister its macros + clear scilab2clib + // Del help chapter + if or(getscilabmode() == ["NW";"STD"]) then + mprintf("\tRemove help chapter\n"); + del_help_chapter("scilab2c", %F); + end + // Remove Preferences GUI + if getscilabmode() == "STD" then + removeModulePreferences(get_absolute_file_path("unloader.sce")) + end + // TODO: detect and unlink related gateways catch - error("Scilab 5.4 or more is required."); -end; - -fileQuit = get_absolute_file_path("unloader.sce") + "etc\" + "scilab2c.quit"; -if isfile(fileQuit) then - exec(fileQuit); + [errmsg, tmp, nline, func] = lasterror() + msg = "%s: error on line #%d: ""%s""\n" + msg = msprintf(msg, func, nline, errmsg) + lines(oldlines) + mode(oldmode); + clear oldlines oldmode tmp nline func + error(msg); end +lines(oldlines); +mode(oldmode); +clear oldlines oldmode; |