summaryrefslogtreecommitdiff
path: root/2.3-1/macros/scilab2c.sci
diff options
context:
space:
mode:
authorsiddhu89902015-09-03 02:06:47 +0530
committersiddhu89902015-09-03 02:06:47 +0530
commit3704cdf7eb9551353ac9175aa10be444755b8e22 (patch)
treee7d66716e67137209a55d880ebb58a7f69ce3484 /2.3-1/macros/scilab2c.sci
parent5675f7cd91515d5e88fd151943c3ec5cde57ceaa (diff)
downloadScilab2C-3704cdf7eb9551353ac9175aa10be444755b8e22.tar.gz
Scilab2C-3704cdf7eb9551353ac9175aa10be444755b8e22.tar.bz2
Scilab2C-3704cdf7eb9551353ac9175aa10be444755b8e22.zip
Intermediate commit. Not to be used
Diffstat (limited to '2.3-1/macros/scilab2c.sci')
-rw-r--r--2.3-1/macros/scilab2c.sci43
1 files changed, 37 insertions, 6 deletions
diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci
index d922e0b1..82b64da3 100644
--- a/2.3-1/macros/scilab2c.sci
+++ b/2.3-1/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