summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorjofret2010-06-21 12:41:59 +0000
committerjofret2010-06-21 12:41:59 +0000
commit95acfb6c3844b2b42cd051bd3ee97d750f2accfa (patch)
tree44e7017a4ae97a7e8cea8d3008a293858d9bc686 /macros
parent806ccd889c3e28fb91eb75eb6c0157637dcdcdfe (diff)
downloadscilab2c-95acfb6c3844b2b42cd051bd3ee97d750f2accfa.tar.gz
scilab2c-95acfb6c3844b2b42cd051bd3ee97d750f2accfa.tar.bz2
scilab2c-95acfb6c3844b2b42cd051bd3ee97d750f2accfa.zip
Skip user interactive choice when in batch mode
Diffstat (limited to 'macros')
-rw-r--r--macros/scilab2c.sci15
1 files changed, 10 insertions, 5 deletions
diff --git a/macros/scilab2c.sci b/macros/scilab2c.sci
index b0265931..2900a625 100644
--- a/macros/scilab2c.sci
+++ b/macros/scilab2c.sci
@@ -12,15 +12,15 @@
function scilab2c(varargin)
[lhs, rhs] = argn();
-
+
select rhs
-//
+//
// scilab2c()
//
case 0
sci2c_gui();
return
-//
+//
// scilab2c(UserScilabMainFile, CCodeOutputDir)
//
case 2
@@ -102,7 +102,7 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = varargin(5);
else
-//
+//
// Calling scilab2c with more than understood values
//
error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),"scilab2c",2));
@@ -113,7 +113,12 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
runscicode(UserScilabMainFile, UserSciFilesPaths);
// --- ASK USER FOR CONTINUATION. ---
- userchoice = messagebox("Exection Succesfull. Start translation ?", "modal", "info", ["Yes" "No"])
+ // 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
if (userchoice == 1)
// --- LAUNCH SCI2C ---
runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool);