add localization gateway
[scilab.git] / scilab / modules / localization / sci_gateway / sci_getlanguage.c
index 6d26e90..ccce2dd 100644 (file)
@@ -3,9 +3,25 @@
 /* Allan CORNET */\r
 /*-----------------------------------------------------------------------------------*/ \r
 #include "sci_getlanguage.h"\r
+#include "setgetlanguage.h"\r
+#include "MALLOC.h"\r
 /*-----------------------------------------------------------------------------------*/ \r
 int C2F(sci_getlanguage) _PARAMS((char *fname,unsigned long fname_len))\r
 {\r
+       static int l1,n1,m1;\r
+       char *Output=NULL;\r
+\r
+       CheckRhs(0,0);\r
+       CheckLhs(0,1);\r
+\r
+       Output=getlanguage();\r
+\r
+       n1=1;\r
+       CreateVarFromPtr( 1, "c",(m1=(int)strlen(Output), &m1),&n1,&Output);\r
+       LhsVar(1) = 1;\r
+       C2F(putlhsvar)();       \r
+       if (Output) {FREE(Output);Output=NULL;}\r
+\r
        return 0;\r
 }\r
 /*-----------------------------------------------------------------------------------*/ \r