1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
4  * Copyright (C) 2015 - Scilab Enterprises - Cedric Delamarre
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  */
16 
17 #include "configvariable.hxx"
18 
19 extern "C"
20 {
21 #include "setformat.h"
22 }
23 
24 /*--------------------------------------------------------------------------*/
setformat(const char * format,int width)25 void setformat(const char * format, int width)
26 {
27     ConfigVariable::setFormatMode(*format == 'e' ? 0 : 1);
28     ConfigVariable::setFormatSize(width);
29 }
30 /*--------------------------------------------------------------------------*/
getformat()31 const char* getformat()
32 {
33     return ConfigVariable::getFormatMode() ? "v" : "e";
34 }
35 /*--------------------------------------------------------------------------*/
getformatwidth()36 int getformatwidth()
37 {
38     return ConfigVariable::getFormatSize();
39 }
40