[grisbi-cvs] grisbi/src utils_str.c,1.65,1.66

Mickaël Remars mykeul at users.sourceforge.net
Mon Aug 24 10:36:41 CEST 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30804

Modified Files:
	utils_str.c 
Log Message:
* msvc needs all variable declarations at the begining of the blocs (C99)
* replaced a remaining strcasecmp() call with g_strcasecmp()

Index: utils_str.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- utils_str.c	23 May 2009 19:25:10 -0000	1.65
+++ utils_str.c	24 Aug 2009 08:36:39 -0000	1.66
@@ -329,6 +329,7 @@
 gint gsb_strcasecmp ( gchar *string_1,
                         gchar *string_2 )
 {
+	gint result;
     string_1 = my_strdup ( string_1 );
     string_1 = g_strdelimit ( string_1, "éÉèÈêÊ", 'e' );
     string_1 = g_strdelimit ( string_1, "çÇ", 'c' );
@@ -345,7 +346,7 @@
     string_2 = g_strdelimit ( string_2, "ôÔ", 'o' );
     string_2 = g_strdelimit ( string_2, "îÎ", 'i' );
 
-    gint result = g_strcasecmp ( string_1, string_2 );
+    result = g_strcasecmp ( string_1, string_2 );
     g_free(string_1);
     g_free(string_2);
     return result; 
@@ -425,7 +426,7 @@
 					 longueur );
 	    new_2 = g_utf8_collate_key ( g_utf8_casefold (  string_2,longueur ),
 					 longueur );
-	    retour = strcasecmp ( new_1, new_2);
+	    retour = g_strcasecmp ( new_1, new_2);
 	    g_free ( new_1 );
 	    g_free ( new_2 );
 	    return ( retour );
@@ -704,6 +705,7 @@
  */
 gchar * gsb_string_truncate_n ( gchar * string, int n, gboolean hard_trunc )
 {
+	gchar* result;
     gchar * tmp = string, * trunc;
 
     if ( ! string )
@@ -725,7 +727,7 @@
 	    tmp++;
 
 	trunc = g_strndup ( string, ( tmp - string ) );
-	gchar* result = g_strconcat ( trunc, "...", NULL );
+	result = g_strconcat ( trunc, "...", NULL );
 	g_free(trunc);
 	return result;
     }



More information about the cvs mailing list