dea82b14e1b91d1702432f6e41533adb0e0f13c5
[scilab.git] / scilab / modules / cacsd / sci_gateway / c / gw_slicot.c
1
2 /*
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA - Allan CORNET
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  */
13
14 /*--------------------------------------------------------------------------*/ 
15 #include <math.h>
16 #include <string.h>
17 /*--------------------------------------------------------------------------*/ 
18 #ifdef _MSC_VER
19 #include <Windows.h>
20 #include "ExceptionMessage.h"
21 #endif
22 #include "../../../mexlib/includes/mex.h"
23 #include "../../../dynamic_link/includes/sci_gateway.h"
24 #include "sci_rankqr.h"
25 #include "sci_contr.h"
26 #include "gw_slicot.h"
27
28 /*--------------------------------------------------------------------------*/ 
29 static GenericTable Tab[]={
30   {(Myinterfun) fortran_mex_gateway, C2F(sident),"sident"},
31   {(Myinterfun) fortran_mex_gateway, C2F(sorder),"sorder"},
32   {(Myinterfun) fortran_mex_gateway, C2F(findbd),"findbd"},
33   {(Myinterfun) sci_gateway, intrankqr,"rankqr"},
34   {(Myinterfun) sci_gateway, intab01od,"contr"},
35   {(Myinterfun) sci_gateway, C2F(intmucomp),"mucomp"},
36   {(Myinterfun) sci_gateway, C2F(intricc2),"pet_ricc"},
37   {(Myinterfun) sci_gateway, C2F(inthinf),"hinf"},
38   {(Myinterfun) sci_gateway, C2F(intdhinf),"dhinf"},
39   {(Myinterfun) sci_gateway, C2F(intlinmeq),"linmeq"}
40 };
41 /*--------------------------------------------------------------------------*/  
42 int gw_slicot(void)
43 {
44         Rhs = Max(0, Rhs);
45         #ifdef _MSC_VER
46                 #ifndef _DEBUG
47                 _try
48                 {
49                         (*(Tab[Fin-1].f))(Tab[Fin-1].name,Tab[Fin-1].F);
50                 }
51                 _except (EXCEPTION_EXECUTE_HANDLER)
52                 {
53                         ExceptionMessage(GetExceptionCode(),Tab[Fin-1].name);
54                 }
55                 #else
56                         (*(Tab[Fin-1].f))(Tab[Fin-1].name,Tab[Fin-1].F);
57                 #endif
58         #else
59                 (*(Tab[Fin-1].f))(Tab[Fin-1].name,Tab[Fin-1].F);
60         #endif
61         return 0;
62 }
63 /*--------------------------------------------------------------------------*/ 
64