summaryrefslogtreecommitdiff
path: root/macros/scilab2c.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/scilab2c.sci')
-rw-r--r--macros/scilab2c.sci43
1 files changed, 37 insertions, 6 deletions
diff --git a/macros/scilab2c.sci b/macros/scilab2c.sci
index d922e0b..82b64da 100644
--- a/macros/scilab2c.sci
+++ b/macros/scilab2c.sci
@@ -34,7 +34,8 @@ function scilab2c(varargin)
CCodeOutputDir = varargin(2);
UserSciFilesPaths = [];
RunMode = 'All';
- BuildTool = getNativeBuildTool();
+ BuildTool = getNativeBuildTool();
+ OutputFormat = 'StandAlone';
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths)
//
@@ -53,7 +54,8 @@ function scilab2c(varargin)
UserSciFilesPaths = varargin(3);
end
RunMode = "All";
- BuildTool = getNativeBuildTool();
+ BuildTool = getNativeBuildTool();
+ OutputFormat = 'StandAlone';
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths, RunMode)
//
@@ -76,7 +78,9 @@ function scilab2c(varargin)
UserSciFilesPaths = varargin(3);
end
RunMode = varargin(4);
- BuildTool = getNativeBuildTool();
+ BuildTool = getNativeBuildTool();
+ OutputFormat = 'StandAlone';
+
case 5
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -100,7 +104,34 @@ function scilab2c(varargin)
UserSciFilesPaths = varargin(3);
end
RunMode = varargin(4);
- BuildTool = varargin(5);
+ BuildTool = varargin(5);
+ OutputFormat = 'StandAlone';
+
+ 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"
+ error(msprintf(gettext("%s: argument #%d must be: ""All"", ""Translate"" or ""GenLibraryStructure"".\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);
+ OutputFormat = varargin(6);
else
//
// Calling scilab2c with more than understood values
@@ -121,7 +152,7 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
end
if (userchoice == 1)
// --- LAUNCH SCI2C ---
- runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool);
+ runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool, OutputFormat);
end
endfunction
@@ -132,4 +163,4 @@ function BuildTool = getNativeBuildTool()
else
BuildTool = "make"
end
-endfunction \ No newline at end of file
+endfunction