summaryrefslogtreecommitdiffstats
path: root/scilab/modules/action_binding/src/c/InterpreterManagement.c
blob: 8c18f734d9e80dcc6d87a45c27eb473548a9b2ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2007-2008 - INRIA - Vincent COUVERT <vincent.couvert@inria.fr>
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 */

#include "InterpreterManagement.h"
#include "storeCommand.h"
#include "configvariable_interface.h"
/*--------------------------------------------------------------------------*/
int putCommandInScilabQueue(char *command)
{
    if(isEnableDebug())
    {
        if(isDebugInterrupted())
        {
            return 1;
        }

        return debuggerManagerExecute(command);
    }
    else
    {
        return StoreCommand(command);
    }
}
/*--------------------------------------------------------------------------*/
/*
* requestScilabExec
*
* WARNING : if the command is taking some time, scilab will not do anything else
* before the command returns.
*/
int requestScilabExec(char *command)
{
    if(isEnableDebug())
    {
        if(isDebugInterrupted())
        {
            return 1;
        }

        return debuggerManagerExecute(command);
    }
    else
    {
        return StorePrioritaryCommand(command);
    }
}
/*--------------------------------------------------------------------------*/
int interruptScilab(void)
{
    setExecutionBreak();
    return 0;
}
/*--------------------------------------------------------------------------*/