Update for localization and two warnings removed
Sylvestre Ledru [Wed, 2 Jan 2008 08:49:36 +0000 (08:49 +0000)]
12 files changed:
scilab/modules/tclsci/sci_gateway/c/gw_tclsci.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_CreateSlave.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_DeleteInterp.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_EvalFile.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_EvalStr.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_ExistArray.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_ExistInterp.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_ExistVar.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_GetVar.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_SetVar.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_UnsetVar.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_UpVar.c

index ec30b01..cb19aa4 100644 (file)
@@ -11,8 +11,7 @@
 #include "inisci-c.h"
 #include "scilabmode.h"
 #include "callFunctionFromGateway.h"
-/*--------------------------------------------------------------------------*/
-extern int TK_Started;
+#include "InitTclTk.h" /* isTkStarted */
 /*--------------------------------------------------------------------------*/
  static gw_generic_table Tab[]=
  {
index e933254..55f6c36 100644 (file)
@@ -22,7 +22,7 @@ int C2F(sci_TCL_CreateSlave) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -45,7 +45,7 @@ int C2F(sci_TCL_CreateSlave) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                return 0;
        }
        
index c442dd8..2d45c82 100644 (file)
@@ -19,7 +19,7 @@ int C2F(sci_TCL_DeleteInterp) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -43,7 +43,7 @@ int C2F(sci_TCL_DeleteInterp) _PARAMS((char *fname,unsigned long l))
                }
                else
                {
-                       Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+                       Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                        return 0;
                }
        }
@@ -51,7 +51,7 @@ int C2F(sci_TCL_DeleteInterp) _PARAMS((char *fname,unsigned long l))
        {
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
                CloseTCLsci();
index d3a3d0b..8be60e5 100644 (file)
@@ -27,7 +27,7 @@ int C2F(sci_TCL_EvalFile) _PARAMS((char *fname,unsigned long l))
 
        if (TCLinterp == NULL)
        {
-               Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+               Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                return 0;
        }
 
@@ -52,7 +52,7 @@ int C2F(sci_TCL_EvalFile) _PARAMS((char *fname,unsigned long l))
                }
                else
                {
-                       Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+                       Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                        return 0;
                }
        }
@@ -80,7 +80,7 @@ int C2F(sci_TCL_EvalFile) _PARAMS((char *fname,unsigned long l))
   }
   else
   {
-         Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+         Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
          return 0;
   }
 
index 1be28cd..fbfb640 100644 (file)
@@ -27,7 +27,7 @@ int C2F(sci_TCL_EvalStr) _PARAMS((char *fname,unsigned long l))
                if (TCLinterp == NULL)
                {
                        freeArrayOfString(Str,m1*n1);
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -48,7 +48,7 @@ int C2F(sci_TCL_EvalStr) _PARAMS((char *fname,unsigned long l))
                        else
                        {
                                freeArrayOfString(Str,m1*n1);
-                               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+                               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                                 return 0;
                        }
                }
@@ -100,7 +100,7 @@ int C2F(sci_TCL_EvalStr) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("Argument type incorrect: Must be a string or vector of strings.\n"));
+               Scierror(999,_("%s: Wrong input argument: String or vector of strings expected.\n"),fname);
                return 0;
        }
        
index 24c7e83..09ae899 100644 (file)
@@ -29,7 +29,7 @@ int C2F(sci_TCL_ExistArray) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
                
@@ -48,7 +48,7 @@ int C2F(sci_TCL_ExistArray) _PARAMS((char *fname,unsigned long l))
                        }
                        else
                        {
-                               Scierror(999,_("%s : Argument type must be character string.\n"));
+                               Scierror(999,_("%s: Wrong input argument: String expected.\n"));
                                return 0;
                        }
                }
@@ -77,7 +77,7 @@ int C2F(sci_TCL_ExistArray) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                return 0;
        }
        
index c3355da..30677b1 100644 (file)
@@ -28,7 +28,7 @@ int C2F(sci_TCL_ExistInterp) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -51,7 +51,7 @@ int C2F(sci_TCL_ExistInterp) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                return 0;
        }
        
index c6c35a6..8ff9dff 100644 (file)
@@ -26,7 +26,7 @@ int C2F(sci_TCL_ExistVar) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
                
@@ -45,7 +45,7 @@ int C2F(sci_TCL_ExistVar) _PARAMS((char *fname,unsigned long l))
                        }
                        else
                        {
-                               Scierror(999,_("%s : Argument type must be character string.\n"));
+                               Scierror(999,_("%s: Wrong input argument: String expected.\n"));
                                return 0;
                        }
                }
@@ -72,7 +72,7 @@ int C2F(sci_TCL_ExistVar) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                return 0;
        }
        
index bae6d72..836996b 100644 (file)
@@ -32,7 +32,7 @@ int C2F(sci_TCL_GetVar) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -51,7 +51,7 @@ int C2F(sci_TCL_GetVar) _PARAMS((char *fname,unsigned long l))
                        }
                        else
                        {
-                               Scierror(999,_("%s: Argument type must be character string.\n"),fname);
+                               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                                return 0;
                        }
                }
@@ -123,7 +123,7 @@ int C2F(sci_TCL_GetVar) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Input rgument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Input rgument type must be character string.\n"),fname);
                return 0;
        }
        
index d14d719..4bb3b77 100644 (file)
@@ -21,7 +21,7 @@ int C2F(sci_TCL_SetVar) _PARAMS((char *fname,unsigned long l))
 
        if (TCLinterp == NULL)
        {
-               Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+               Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                return 0;
        }
 
@@ -40,7 +40,7 @@ int C2F(sci_TCL_SetVar) _PARAMS((char *fname,unsigned long l))
                }
                else
                {
-                       Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+                       Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                        return 0;
                }
        }
@@ -54,7 +54,6 @@ int C2F(sci_TCL_SetVar) _PARAMS((char *fname,unsigned long l))
        {
                char *VarName=NULL;
                char **Str=NULL;
-               int i=0;
                
                GetRhsVar(1,STRING_DATATYPE,&m1,&n1,&l1);
                VarName=cstk(l1);
index d84b557..343ea4e 100644 (file)
@@ -28,7 +28,7 @@ int C2F(sci_TCL_UnsetVar) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -47,7 +47,7 @@ int C2F(sci_TCL_UnsetVar) _PARAMS((char *fname,unsigned long l))
                        }
                        else
                        {
-                               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+                               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                                return 0;
                        }
                }
@@ -75,7 +75,7 @@ int C2F(sci_TCL_UnsetVar) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                return 0;
        }
        
index a90d88e..47dd055 100644 (file)
@@ -30,7 +30,7 @@ int C2F(sci_TCL_UpVar) _PARAMS((char *fname,unsigned long l))
 
                if (TCLinterp == NULL)
                {
-                       Scierror(999,_("%s : Error main TCL interpreter not initialized.\n"),fname);
+                       Scierror(999,_("%s: Error main TCL interpreter not initialized.\n"),fname);
                        return 0;
                }
 
@@ -49,7 +49,7 @@ int C2F(sci_TCL_UpVar) _PARAMS((char *fname,unsigned long l))
                        }
                        else
                        {
-                               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+                               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                                return 0;
                        }
                }
@@ -76,7 +76,7 @@ int C2F(sci_TCL_UpVar) _PARAMS((char *fname,unsigned long l))
        }
        else
        {
-               Scierror(999,_("%s : Argument type must be character string.\n"),fname);
+               Scierror(999,_("%s: Wrong input argument: String expected.\n"),fname);
                return 0;
        }