Useless thanks to gettext
Sylvestre Ledru [Fri, 4 Jan 2008 10:52:38 +0000 (10:52 +0000)]
scilab/modules/localization/Makefile.am
scilab/modules/localization/src/c/TerminateLocalization.c [deleted file]
scilab/modules/localization/src/c/localization.c [deleted file]

index 807cc08..80ef9e7 100644 (file)
@@ -7,7 +7,6 @@ LOCALIZATION_C_SOURCES = \
 src/c/InitializeLocalization.c \
 src/c/setgetlanguage.c \
 src/c/loadsavelanguage.c
-#src/c/TerminateLocalization.c
 
 if GUI
 #LOCALIZATION_C_SOURCES += src/c/org_scilab_modules_localization_QueryString.c
diff --git a/scilab/modules/localization/src/c/TerminateLocalization.c b/scilab/modules/localization/src/c/TerminateLocalization.c
deleted file mode 100644 (file)
index 6db860f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*--------------------------------------------------------------------------*/
-/* INRIA 2007 */
-/* Allan CORNET */
-/*--------------------------------------------------------------------------*/ 
-#include "TerminateLocalization.h"
-/*--------------------------------------------------------------------------*/ 
-#include "localization.h"
-/*--------------------------------------------------------------------------*/ 
-BOOL TerminateLocalization(void)
-{
-       DisposeHashTableScilabErrors();
-       DisposeHashTableScilabMessages();
-       DisposeHashTableScilabMenus();
-       return TRUE;
-}
-/*--------------------------------------------------------------------------*/ 
diff --git a/scilab/modules/localization/src/c/localization.c b/scilab/modules/localization/src/c/localization.c
deleted file mode 100644 (file)
index eaf8a94..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*--------------------------------------------------------------------------*/ 
-/* INRIA 2006 */
-/* HUANG Xu */
-/* Allan CORNET */
-/*--------------------------------------------------------------------------*/ 
-#include <stdio.h>
-#include <string.h>
-#include "localization.h"
-#include "MALLOC.h" /* MALLOC */
-/*--------------------------------------------------------------------------*/ 
-static struct hashtable *Table_Scilab_Errors=NULL;
-static struct hashtable *Table_Scilab_Messages=NULL;
-static struct hashtable *Table_Scilab_Menus=NULL;
-/*--------------------------------------------------------------------------*/ 
-static char *QueryString(struct hashtable *Table,char *Tag);
-/*--------------------------------------------------------------------------*/ 
-BOOL AppendHashTableLocalization(struct hashtable *Table,char *Tag,char* MsgStr,char *Path)
-{
-       BOOL bOK=FALSE;
-       struct key_string *k=NULL;
-       struct value_string *v=NULL;
-       char *Key_Tag=NULL;
-       char *Key_Value=NULL;
-       char *Key_Path = NULL;
-
-       k=(struct key_string*)MALLOC(sizeof(struct key_string));
-       v=(struct value_string*)MALLOC(sizeof(struct value_string));
-
-       Key_Tag=(char*)MALLOC(sizeof(char)*(strlen(Tag)+1));
-       Key_Value=(char*)MALLOC(sizeof(char)*(strlen(MsgStr)+1));
-       Key_Path=(char*)MALLOC(sizeof(char)*(strlen(Path)+1));
-
-       if (k && v && Key_Tag && Key_Value && Key_Path)
-       {
-               strcpy(Key_Tag,Tag);
-               strcpy(Key_Value,MsgStr);
-               strcpy(Key_Path,Path);
-
-               k->Key_String = Key_Tag;
-               v->Value_String = Key_Value;
-               v->Path_String = Key_Path;
-
-               if (InsertHashtable_string(Table,k, v)) bOK=TRUE;
-
-       }
-       return bOK;
-
-}
-/*--------------------------------------------------------------------------*/
-struct hashtable *GetHashTableScilabErrors(void)
-{
-       return Table_Scilab_Errors;
-}
-/*--------------------------------------------------------------------------*/ 
-struct hashtable *GetHashTableScilabMessages(void)
-{
-       return Table_Scilab_Messages;
-}
-/*--------------------------------------------------------------------------*/ 
-struct hashtable *GetHashTableScilabMenus(void)
-{
-       return Table_Scilab_Menus;
-}
-/*--------------------------------------------------------------------------*/ 
-BOOL InitializeHashTableScilabErrors(void)
-{
-       Table_Scilab_Errors=CreateHashtable_string();
-       if (Table_Scilab_Errors) return TRUE;
-       else return FALSE;
-}
-/*--------------------------------------------------------------------------*/ 
-BOOL InitializeHashTableScilabMessages(void)
-{
-       Table_Scilab_Messages=CreateHashtable_string();
-       if (Table_Scilab_Messages) return TRUE;
-       else return FALSE;
-}
-/*--------------------------------------------------------------------------*/ 
-BOOL InitializeHashTableScilabMenus(void)
-{
-       Table_Scilab_Menus=CreateHashtable_string();
-       if (Table_Scilab_Menus) return TRUE;
-       else return FALSE;
-}
-/*--------------------------------------------------------------------------*/ 
-int DisposeHashTableScilabErrors(void)
-{
-       if (Table_Scilab_Errors)
-       {
-               hashtable_destroy( Table_Scilab_Errors, 0 ) ;
-               Table_Scilab_Errors=NULL;
-       }
-       return 0;
-}
-/*--------------------------------------------------------------------------*/ 
-int DisposeHashTableScilabMessages(void)
-{
-       if (Table_Scilab_Messages)
-       {
-               hashtable_destroy( Table_Scilab_Messages, 0 ) ;
-               Table_Scilab_Messages=NULL;
-       }
-       return 0;
-}
-/*--------------------------------------------------------------------------*/ 
-int DisposeHashTableScilabMenus(void)
-{
-       if (Table_Scilab_Menus)
-       {
-               hashtable_destroy(Table_Scilab_Menus, 0 ) ;
-               Table_Scilab_Menus=NULL;
-       }
-       return 0;
-}
-/*--------------------------------------------------------------------------*/ 
-char *QueryStringError(char *Tag)
-{      
-       return QueryString(Table_Scilab_Errors,Tag);
-}
-/*--------------------------------------------------------------------------*/ 
-char *QueryStringMessage(char *Tag)
-{
-       return QueryString(Table_Scilab_Messages,Tag);
-}
-/*--------------------------------------------------------------------------*/ 
-char *QueryStringMenu(char *Tag)
-{
-       return QueryString(Table_Scilab_Menus,Tag);
-}
-/*--------------------------------------------------------------------------*/ 
-static char *QueryString(struct hashtable *Table,char *Tag)
-{
-       char *RetString=NULL;
-       if (Table==NULL)
-       {
-               printf("Internal error: localization table empty (looking for %s)!\nAre you sure that the localization files have been loaded ?\n",Tag);
-               exit(-1);
-       }
-       RetString = SearchHashtable_string(Table,Tag);
-       return RetString;
-}
-/*--------------------------------------------------------------------------*/