[grisbi-cvs] grisbi/src erreur.c, 1.92, 1.93 gsb_data_partial_balance.c, 1.3, 1.4 gsb_data_report.c, 1.33, 1.34 gsb_debug.c, 1.13, 1.14

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


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

Modified Files:
	erreur.c gsb_data_partial_balance.c gsb_data_report.c 
	gsb_debug.c 
Log Message:
msvc needs all variable declarations at the begining of the blocs (C99)

Index: gsb_debug.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_debug.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gsb_debug.c	10 May 2009 13:06:56 -0000	1.13
+++ gsb_debug.c	24 Aug 2009 13:40:57 -0000	1.14
@@ -199,6 +199,7 @@
     GtkTextIter text_iter;
     gboolean inconsistency = FALSE;
     gint i, page = 2;
+	gchar* tmpstr;
 
     text_buffer = g_object_get_data ( G_OBJECT(assistant), "text-buffer" );
 
@@ -230,7 +231,7 @@
 					 -1 );
 	    }
 
-	    gchar* tmpstr = g_strconcat ( "• ", _( debug_tests[i] . name ), "\n", NULL );
+	    tmpstr = g_strconcat ( "• ", _( debug_tests[i] . name ), "\n", NULL );
 	    gtk_text_buffer_insert_with_tags_by_name ( text_buffer, &text_iter,
 						       tmpstr,
 						       -1, "indented", NULL );
@@ -360,6 +361,10 @@
     gint tested_account = 0;
     GSList *pUserAccountsList = NULL;
     gchar *pText = g_strdup("");
+	gchar* tmprealstr1;
+	gchar* tmprealstr2;
+	gchar* tmpstr1;
+	gchar* tmpstr2;
 
     /* S'il n'y a pas de compte, on quitte */
     if ( ! gsb_data_account_get_accounts_amount ( ) )
@@ -426,18 +431,18 @@
         {
             affected_accounts ++;
 
-            gchar* tmprealstr1 = gsb_real_get_string_with_currency (
+            tmprealstr1 = gsb_real_get_string_with_currency (
 	                                gsb_data_reconcile_get_final_balance (reconcile_number),
 	                                gsb_data_account_get_currency ( account_nb ), TRUE  );
-            gchar* tmprealstr2 = gsb_real_get_string_with_currency (reconcilied_amount,
+            tmprealstr2 = gsb_real_get_string_with_currency (reconcilied_amount,
 					gsb_data_account_get_currency ( account_nb ), TRUE  );
-            gchar* tmpstr1 = g_strdup_printf ( _("<span weight=\"bold\">%s</span>\n"
+            tmpstr1 = g_strdup_printf ( _("<span weight=\"bold\">%s</span>\n"
 					"  Last reconciliation amount : %s\n"
 					"  Computed reconciliation amount : %s\n"),
 					gsb_data_account_get_name ( account_nb ), 
 					tmprealstr1,
 					tmprealstr2 );
-            gchar* tmpstr2 = pText;
+            tmpstr2 = pText;
             pText = g_strconcat ( tmpstr2, tmpstr1, NULL );
             g_free ( tmpstr2 );
             g_free ( tmpstr1 );
@@ -474,6 +479,8 @@
     gboolean corrupted_file = FALSE;
     GSList * pUserAccountsList;
     gchar * pText = g_strdup("");
+	gchar* tmpstr;
+	gchar* oldstr;
 
     pUserAccountsList = gsb_data_account_get_list_accounts ();
 
@@ -510,9 +517,9 @@
 		    g_free ( oldstr );
 		    g_free ( tmpstr );
 		}
-		gchar* tmpstr = g_strdup_printf ( _("Transaction #%d is linked to non existent transaction #%d.\n"),
+		tmpstr = g_strdup_printf ( _("Transaction #%d is linked to non existent transaction #%d.\n"),
 							transaction, transfer_transaction );
-		gchar* oldstr = pText;
+		oldstr = pText;
 		pText = g_strconcat ( pText , tmpstr, NULL );
 		g_free ( oldstr );
 		g_free ( tmpstr );
@@ -532,8 +539,8 @@
 		        g_free ( oldstr );
 		        g_free ( tmpstr );
 		    }
-		    gchar* oldstr = pText;
-		    gchar* tmpstr = g_strdup_printf ( _("Transaction #%d is linked to transaction #%d, "
+		    oldstr = pText;
+		    tmpstr = g_strdup_printf ( _("Transaction #%d is linked to transaction #%d, "
 							      "which is linked to transaction #%d.\n"),
 							    transaction,
 							    transfer_transaction,

Index: gsb_data_report.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_report.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- gsb_data_report.c	12 Jun 2009 19:06:56 -0000	1.33
+++ gsb_data_report.c	24 Aug 2009 13:40:57 -0000	1.34
@@ -369,11 +369,13 @@
  */
 static void _gsb_data_report_free ( struct_report *report )
 {
+	GSList* list_tmp;
+
     if ( ! report )
         return ;
     
     /* remove first the comparison */
-    GSList* list_tmp = report -> text_comparison_list;
+    list_tmp = report -> text_comparison_list;
     while ( list_tmp )
     {
 	gsb_data_report_text_comparison_remove ( GPOINTER_TO_INT (list_tmp -> data));

Index: erreur.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/erreur.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- erreur.c	27 Apr 2009 19:41:03 -0000	1.92
+++ erreur.c	24 Aug 2009 13:40:57 -0000	1.93
@@ -66,6 +66,7 @@
 void traitement_sigsegv ( gint signal_nb )
 {
     gchar * gsb_file_default_dir, * errmsg = g_strdup("");
+	gchar* old_errmsg;
     GtkWidget * dialog;
 #ifdef HAVE_BACKTRACE
     GtkWidget * expander;
@@ -120,7 +121,7 @@
 
 	gsb_status_clear();
 
-        gchar* old_errmsg = errmsg;
+        old_errmsg = errmsg;
 	errmsg = g_strconcat ( errmsg, 
 			       g_strdup_printf ( _("Grisbi made a backup file at '%s'."),
 						 nom_fichier_comptes ),
@@ -128,7 +129,7 @@
 	g_free ( old_errmsg );
     }
 
-    gchar* old_errmsg = errmsg;
+    old_errmsg = errmsg;
     errmsg = g_strconcat ( errmsg, 
 			   "\n\n",
 			   _("Please report this problem to <tt>http://www.grisbi.org/bugtracking/</tt>.  "),
@@ -176,6 +177,8 @@
     /* un int pour stocker le level de debug et une chaine qui contient sa version texte */
     gint debug_variable=0;
     gchar *debug_level="";
+	gchar* tmpstr1;
+	gchar* tmpstr2;
 
     if (getenv ("DEBUG_GRISBI"))
     {
@@ -197,8 +200,8 @@
 	    }
 
 	    /* on affiche un message de debug pour indiquer que le debug est actif */
-	    gchar* tmpstr1 = g_strdup_printf(_("GRISBI %s Debug"),VERSION);
-	    gchar* tmpstr2 = g_strdup_printf(_("Debug enabled, level is '%s'"),debug_level);
+	    tmpstr1 = g_strdup_printf(_("GRISBI %s Debug"),VERSION);
+	    tmpstr2 = g_strdup_printf(_("Debug enabled, level is '%s'"),debug_level);
 	    debug_message_string ( tmpstr1 , 
 				   __FILE__, __LINE__, __PRETTY_FUNCTION__,
 				   tmpstr2,

Index: gsb_data_partial_balance.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_partial_balance.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- gsb_data_partial_balance.c	16 Aug 2009 21:00:05 -0000	1.3
+++ gsb_data_partial_balance.c	24 Aug 2009 13:40:57 -0000	1.4
@@ -192,12 +192,11 @@
     while ( list_tmp )
     {
         struct_partial_balance *partial_balance;
-
-        partial_balance = list_tmp -> data;
-
         gchar *kind_str = "";
         gchar *currency_str = "";
 
+        partial_balance = list_tmp -> data;
+
         switch ( partial_balance -> kind )
         {
         case GSB_TYPE_CASH:



More information about the cvs mailing list