summaryrefslogtreecommitdiff
path: root/2.3-1/macros/scilab2c.sci
diff options
context:
space:
mode:
authorsiddhu89902015-09-11 02:28:56 +0530
committersiddhu89902015-09-11 02:28:56 +0530
commited0947602f9b92489be97219e36eb284804dab0a (patch)
tree0972e6c28e60c026fb4e84d9e7ed6b0f922e6066 /2.3-1/macros/scilab2c.sci
parent48097fd488521bbb915c301a313ca0a7f0b6eb17 (diff)
downloadScilab2C-ed0947602f9b92489be97219e36eb284804dab0a.tar.gz
Scilab2C-ed0947602f9b92489be97219e36eb284804dab0a.tar.bz2
Scilab2C-ed0947602f9b92489be97219e36eb284804dab0a.zip
Changes made for making directory 'arduino' in output folder'
Diffstat (limited to '2.3-1/macros/scilab2c.sci')
-rw-r--r--2.3-1/macros/scilab2c.sci45
1 files changed, 39 insertions, 6 deletions
diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci
index d922e0b1..25fc06ac 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();
+ OutFormat = "StandAlone"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths)
//
@@ -53,7 +54,8 @@ function scilab2c(varargin)
UserSciFilesPaths = varargin(3);
end
RunMode = "All";
- BuildTool = getNativeBuildTool();
+ BuildTool = getNativeBuildTool();
+ OutFormat = "StandAlone"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths, RunMode)
//
@@ -76,7 +78,8 @@ function scilab2c(varargin)
UserSciFilesPaths = varargin(3);
end
RunMode = varargin(4);
- BuildTool = getNativeBuildTool();
+ BuildTool = getNativeBuildTool();
+ OutFormat = "StandAlone"
case 5
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -100,7 +103,37 @@ function scilab2c(varargin)
UserSciFilesPaths = varargin(3);
end
RunMode = varargin(4);
- BuildTool = varargin(5);
+ BuildTool = varargin(5);
+ OutFormat = "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
+ if varargin(6) <> "StandAlone" & varargin(6) <> "Arduino"
+ error(msprintf(gettext("%s: argument #%d must be: ""StandAlone"" or ""Arduino"".\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);
+ OutFormat = varargin(6);
else
//
// Calling scilab2c with more than understood values
@@ -121,7 +154,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,OutFormat);
end
endfunction
@@ -132,4 +165,4 @@ function BuildTool = getNativeBuildTool()
else
BuildTool = "make"
end
-endfunction \ No newline at end of file
+endfunction