callOnPrompt use StoreCommand 13/17113/2
Antoine ELIAS [Wed, 26 Aug 2015 10:45:10 +0000 (12:45 +0200)]
Change-Id: Iceae62f7c82a6650b025562b47780d2848355260

scilab/modules/ast/core_Import.def
scilab/modules/ast/src/cpp/ast/visitor_common.cpp

index 7ebc756..fb1c930 100644 (file)
@@ -8,3 +8,4 @@ StaticRunner_launch
 StaticRunner_isRunnerAvailable
 StaticRunner_isInterruptibleCommand
 StaticRunner_setInterruptibleCommand
+StoreConsoleCommand
index 64c0963..8735447 100644 (file)
 
 #include "alltypes.hxx"
 
+extern "C"
+{
+#include "storeCommand.h"
+}
+
 size_t ast::Ast::globalNodeNumber = 0;
 
 /*
@@ -2397,7 +2402,6 @@ InternalType* insertionCall(const ast::Exp& e, typed_list* _pArgs, InternalType*
 void callOnPrompt(void)
 {
     static symbol::Variable* onPrompt = NULL;
-
     if (onPrompt == NULL)
     {
         onPrompt = symbol::Context::getInstance()->getOrCreate(symbol::Symbol(L"%onprompt"));
@@ -2407,11 +2411,7 @@ void callOnPrompt(void)
     pOnPrompt = onPrompt->get();
     if (pOnPrompt != NULL && pOnPrompt->isCallable())
     {
-        typed_list in;
-        typed_list out;
-        optional_list opt;
-        ast::ExecVisitor execCall;
-        pOnPrompt->getAs<Callable>()->call(in, opt, 1, out, &execCall);
+        StoreConsoleCommand("%onprompt()", 1);
     }
 }