2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2009 - DIGITEO - Allan CORNET
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
9 * This file was originally licensed under the terms of the CeCILL v2.1,
10 * and continues to be available under such terms.
11 * For more information, see the COPYING file which you should have received
12 * along with this program.
16 #include "SciNotes.hxx"
20 #include "callscinotes.h"
21 #include "charEncoding.h"
22 #include "getScilabJavaVM.h"
23 #include "charEncoding.h"
24 #include "sci_malloc.h"
25 #include "freeArrayOfString.h"
26 #include "getFullFilename.h"
28 /*--------------------------------------------------------------------------*/
29 using namespace org_scilab_modules_scinotes;
30 /*--------------------------------------------------------------------------*/
31 int callSciNotesW(wchar_t **_wcfilenames, int _nbfiles)
33 if ( (_wcfilenames) && (_nbfiles > 0) )
36 for (i = 0; i < _nbfiles; i++)
40 wchar_t *wcFullFilename = getFullFilenameW(_wcfilenames[i]);
43 char *fullFilename = wide_string_to_UTF8(wcFullFilename);
46 SciNotes::scinotes(getScilabJavaVM(), fullFilename);
52 wcFullFilename = NULL;
59 SciNotes::scinotes(getScilabJavaVM());
64 int callSciNotesWWithLineNumberAndFunction(wchar_t **_wcfilenames, double* pdblLineNumber, char *functionName, int _nbfiles)
66 if ( (_wcfilenames) && (_nbfiles > 0) )
69 for (i = 0; i < _nbfiles; i++)
73 wchar_t *wcFullFilename = getFullFilenameW(_wcfilenames[i]);
76 char *fullFilename = wide_string_to_UTF8(wcFullFilename);
79 SciNotes::scinotes(getScilabJavaVM(), fullFilename, (int)pdblLineNumber[i], functionName);
85 wcFullFilename = NULL;
92 SciNotes::scinotes(getScilabJavaVM());
97 int callSciNotesWWithOption(wchar_t **_wcfilenames, wchar_t** option, int _nboptions, int _nbfiles)
99 if ( (_wcfilenames) && (_nbfiles > 0) )
105 opt = new char*[_nboptions];
106 for (int i = 0; i < _nboptions; i++)
108 opt[i] = wide_string_to_UTF8(option[i]);
112 for (i = 0; i < _nbfiles; i++)
116 wchar_t *wcFullFilename = getFullFilenameW(_wcfilenames[i]);
119 char *fullFilename = wide_string_to_UTF8(wcFullFilename);
122 SciNotes::scinotes(getScilabJavaVM(), fullFilename, opt, _nboptions);
127 FREE(wcFullFilename);
128 wcFullFilename = NULL;
132 for(int i = 0; i < _nboptions; i++)
140 SciNotes::scinotes(getScilabJavaVM());
144 /*--------------------------------------------------------------------------*/