Warnings fixed
Sylvestre Ledru [Fri, 12 Jan 2007 12:36:25 +0000 (12:36 +0000)]
scilab/modules/localization/Makefile.am
scilab/modules/localization/Makefile.in
scilab/modules/localization/src/hashtable_localization.c
scilab/modules/localization/src/hashtable_localization.h
scilab/modules/localization/src/localization.c

index 033a6e8..40e9469 100644 (file)
@@ -3,14 +3,10 @@
 ### INRIA - Scilab 2006 
 ##########
 
-
-MODULECOMMONFLAGS = -no-undefined -module -avoid-version
-
 LOCALIZATION_C_SOURCES = src/hashtable_localization.c \
 src/localization.c
 
 libscilocalization_la_CFLAGS=  -Iincludes/ -Isrc/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/libs/hashtable/ $(XML_FLAGS)
-libscilocalization_la_LDFLAGS= $(XML_LIBS) $(MODULECOMMONFLAGS)
 
 pkglib_LTLIBRARIES = libscilocalization.la
 
index 8ccba81..39a5796 100644 (file)
@@ -77,8 +77,8 @@ am_libscilocalization_la_OBJECTS = $(am__objects_1)
 libscilocalization_la_OBJECTS = $(am_libscilocalization_la_OBJECTS)
 libscilocalization_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-       $(libscilocalization_la_CFLAGS) $(CFLAGS) \
-       $(libscilocalization_la_LDFLAGS) $(LDFLAGS) -o $@
+       $(libscilocalization_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I. -I$(top_builddir)/modules/core/includes@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
@@ -240,12 +240,10 @@ target_alias = @target_alias@
 tcldir = @tcldir@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-MODULECOMMONFLAGS = -no-undefined -module -avoid-version
 LOCALIZATION_C_SOURCES = src/hashtable_localization.c \
 src/localization.c
 
 libscilocalization_la_CFLAGS = -Iincludes/ -Isrc/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/libs/hashtable/ $(XML_FLAGS)
-libscilocalization_la_LDFLAGS = $(XML_LIBS) $(MODULECOMMONFLAGS)
 pkglib_LTLIBRARIES = libscilocalization.la
 libscilocalization_la_SOURCES = $(LOCALIZATION_C_SOURCES) 
 libscilocalization_la_LIBADD = $(top_builddir)/libs/MALLOC/libscimalloc.la \
index 51e9ec2..41d3de2 100644 (file)
@@ -18,7 +18,8 @@ static unsigned int hashfromkey_string(void *ky)
        k =     (struct key_string *)ky;
        str=k->Key_String;
 
-       while (c = *str++)      hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+       while ((c = *str++))
+               hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
 
        return hash;
 
@@ -49,7 +50,6 @@ void DestroyHashtable_string(struct hashtable *hash_table)
 char *SearchHashtable_string(struct hashtable *hash_table, const char* key)
 /* return a copy of the string in hashtable */
 {
-       int i=0;
        char *FindString=NULL;
        struct key_string *k;
        struct value_string *kElem=NULL;
index 245a786..c0dbbe4 100644 (file)
@@ -7,6 +7,8 @@
 /*-----------------------------------------------------------------------------------*/ 
 #include "hashtable.h"
 #include "MALLOC.h"
+#include <stdlib.h>
+
 /*-----------------------------------------------------------------------------------*/ 
 struct key_string
 {
@@ -19,7 +21,7 @@ struct value_string
 };
 /*-----------------------------------------------------------------------------------*/ 
 /* create a hashtable and return it */
-struct hashtable *CreateHashtable_string();
+struct hashtable *CreateHashtable_string(void);
 
 /* destroy the hashtable and clean the resources used */
 void DestroyHashtable_string(struct hashtable *hash_table);
index df7bfea..131e949 100644 (file)
@@ -9,8 +9,6 @@
 /*-----------------------------------------------------------------------------------*/ 
 #define LENGTH_OUTPUT 1024
 static int count=0;//count the number of the #text and type==3 node 
-static char *tag=NULL;
-static char *string=NULL;
 
 static char *Key_String=NULL;
 static char *Key_Value=NULL;
@@ -20,6 +18,10 @@ static char strBufOut[LENGTH_OUTPUT];
 static struct hashtable *Table_Scilab_Errors=NULL;
 
 static char *ReplaceChars(char *s1, char *s2, char *s3);
+char* ConvertEncoding(char *encodingFrom, char *encodingTo, char* inputStr);
+void ProcessNode(xmlTextReaderPtr reader, struct hashtable *table, char *encoding);
+char *GetXmlFileEncoding(const char *filename);
+
 /*-----------------------------------------------------------------------------------*/ 
 char* ConvertEncoding(char *encodingFrom, char *encodingTo, char* inputStr)
 {