* Bug #13102 fixed - matio: 7.3 support
[scilab.git] / scilab / modules / matio / sci_gateway / c / gw_matio.c
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2008 - INRIA - Vincent COUVERT
4  *
5  * This file must be used under the terms of the CeCILL.
6  * This source file is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution.  The terms
8  * are also available at
9  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
10  *
11  */
12
13 /*-----------------------------------------------------------------------------------*/
14 #include <math.h>
15 #include <string.h>
16 /*-----------------------------------------------------------------------------------*/
17 #include "gw_matio.h"
18 #include "api_scilab.h"
19 #include "MALLOC.h"
20 #include "callFunctionFromGateway.h"
21 /*-----------------------------------------------------------------------------------*/
22 static gw_generic_table Tab[] =
23 {
24     {sci_matfile_open, "matfile_open"},
25     {sci_matfile_close, "matfile_close"},
26     {sci_matfile_listvar, "matfile_listvar"},
27     {sci_matfile_varreadnext, "matfile_varreadnext"},
28     {sci_matfile_varwrite, "matfile_varwrite"}
29 };
30 /*-----------------------------------------------------------------------------------*/
31 int gw_matio(void)
32 {
33     Rhs = Max(0, Rhs);
34
35     if (pvApiCtx == NULL)
36     {
37         pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
38     }
39
40     pvApiCtx->pstName = (char*)Tab[Fin - 1].name;
41     callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
42     return 0;
43 }
44 /*-----------------------------------------------------------------------------------*/
45