add localization gateway
[scilab.git] / scilab / modules / time / sci_gateway / gw_time.c
1 #include "gw_time.h"
2 /*-----------------------------------------------------------------------------------*/
3 /* INRIA 2006 */
4 /* Allan CORNET */
5 /*-----------------------------------------------------------------------------------*/
6 #include "sciprint.h"
7 #if _MSC_VER
8 #include "ExceptionMessage.h"
9 #endif
10 #include "gw_time.h"
11 /*-----------------------------------------------------------------------------------*/
12 static intTimeTable Tab[]={
13     {C2F(sci_getdate),"getdate"},
14         {C2F(sci_calendar),"Calendar"},
15         {C2F(sci_timer),"timer"},
16         {C2F(sci_sleep),"sleep"},
17         {C2F(sci_xpause),"xpause"},
18         {C2F(sci_realtimeinit),"realtimeinit"},
19         {C2F(sci_realtime),"realtime"},
20 };
21 /*-----------------------------------------------------------------------------------*/ 
22 int C2F(gw_time)()
23 {  
24         Rhs = Max(0, Rhs);
25         #if _MSC_VER
26                 #ifndef _DEBUG
27                 _try
28                 {
29                         (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
30                 }
31                 _except (EXCEPTION_EXECUTE_HANDLER)
32                 {
33                         ExceptionMessage(GetExceptionCode(),Tab[Fin-1].name);
34                 }
35                 #else
36                         (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
37                 #endif
38         #else
39                 (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
40         #endif
41
42         return 0;
43 }
44 /*-----------------------------------------------------------------------------------*/