[grisbi-cvs] grisbi/src accueil.c, 1.208, 1.209 affichage_liste.c, 1.112, 1.113 categories_onglet.c, 1.195, 1.196 etats_affiche.c, 1.106, 1.107 etats_config.c, 1.171, 1.172 export_csv.c, 1.21, 1.22

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


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

Modified Files:
	accueil.c affichage_liste.c categories_onglet.c 
	etats_affiche.c etats_config.c export_csv.c 
Log Message:
msvc needs all variable declarations at the begining of the blocs (C99)

Index: etats_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_config.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- etats_config.c	8 May 2009 17:21:15 -0000	1.171
+++ etats_config.c	24 Aug 2009 08:57:45 -0000	1.172
@@ -4302,6 +4302,7 @@
 {
     GSList *list_tmp;
     gint current_report_number;
+	gchar* tmpstr;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -4380,7 +4381,7 @@
 	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_text_comparison_get_button_second_comparison (text_comparison_number)),
 				      gsb_data_report_text_comparison_get_second_comparison (text_comparison_number));
 
-	gchar* tmpstr = utils_str_itoa (gsb_data_report_text_comparison_get_first_amount (text_comparison_number));
+	tmpstr = utils_str_itoa (gsb_data_report_text_comparison_get_first_amount (text_comparison_number));
 	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_text_comparison_get_entry_first_amount (text_comparison_number)), tmpstr);
 	g_free ( tmpstr );
 
@@ -5402,6 +5403,7 @@
 {
     GSList *list_tmp;
     gint current_report_number;
+	gchar* tmpstr;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -5471,7 +5473,6 @@
 	gtk_option_menu_set_history ( GTK_OPTION_MENU (gsb_data_report_amount_comparison_get_button_second_comparison (amount_comparison_number)),
 				      gsb_data_report_amount_comparison_get_second_comparison (amount_comparison_number));
 
-	gchar* tmpstr;
 	tmpstr = gsb_real_get_string (gsb_data_report_amount_comparison_get_first_amount (amount_comparison_number));
 	gtk_entry_set_text ( GTK_ENTRY (gsb_data_report_amount_comparison_get_entry_first_amount (amount_comparison_number)), tmpstr);
 	g_free ( tmpstr );

Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- affichage_liste.c	27 Jun 2009 19:17:53 -0000	1.112
+++ affichage_liste.c	24 Aug 2009 08:57:45 -0000	1.113
@@ -447,6 +447,7 @@
 {
     GtkWidget *vbox_pref, *hbox, *label, *entry;
     GtkWidget *button;
+	gchar* tmpstr;
 
     vbox_pref = new_vbox_with_title_and_icon ( _("Form completion"), "form.png" );
 
@@ -505,7 +506,7 @@
 
     entry = gtk_entry_new ();
     gtk_widget_set_size_request ( entry, 30, -1 );
-    gchar* tmpstr = utils_str_itoa (etat.combofix_max_item);
+    tmpstr = utils_str_itoa (etat.combofix_max_item);
     gtk_entry_set_text ( GTK_ENTRY (entry), tmpstr);
     g_free ( tmpstr );
     g_signal_connect ( G_OBJECT (entry),

Index: etats_affiche.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_affiche.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- etats_affiche.c	27 Apr 2009 19:41:03 -0000	1.106
+++ etats_affiche.c	24 Aug 2009 08:57:45 -0000	1.107
@@ -142,6 +142,7 @@
 {
     char * text;
     gint current_report_number;
+	gchar* tmpstr;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -223,7 +224,7 @@
 		else
 		    fmtstr = _("%s (%d transactions)");
 
-		gchar* tmpstr = gsb_real_get_string_with_currency ( montant_categ_etat,
+		tmpstr = gsb_real_get_string_with_currency ( montant_categ_etat,
 										 devise_categ_etat, TRUE  );
 	        text = g_strdup_printf ( fmtstr , tmpstr, nb_ope_categ_etat );
 		g_free ( tmpstr );
@@ -260,6 +261,7 @@
 {
     gchar * text;
     gint current_report_number;
+	gchar* tmpstr;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -341,7 +343,7 @@
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)");
-		gchar* tmpstr = gsb_real_get_string_with_currency ( montant_sous_categ_etat, devise_categ_etat, TRUE  );
+		tmpstr = gsb_real_get_string_with_currency ( montant_sous_categ_etat, devise_categ_etat, TRUE  );
 	        text = g_strdup_printf ( fmtstr, tmpstr, 
 				nb_ope_sous_categ_etat );
 	        g_free ( tmpstr );
@@ -376,6 +378,7 @@
 {
     gchar * text;
     gint current_report_number;
+	gchar* tmpstr2;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -453,7 +456,7 @@
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		gchar* tmpstr2 = gsb_real_get_string_with_currency (montant_ib_etat, devise_ib_etat, TRUE  );
+		tmpstr2 = gsb_real_get_string_with_currency (montant_ib_etat, devise_ib_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr2 , nb_ope_ib_etat );
 		g_free (tmpstr2);
 	    }
@@ -604,6 +607,7 @@
 {
     gchar * text;
     gint current_report_number;
+	gchar* tmpstr;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -677,7 +681,7 @@
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		gchar* tmpstr = gsb_real_get_string_with_currency ( montant_compte_etat,
+		tmpstr = gsb_real_get_string_with_currency ( montant_compte_etat,
 				devise_compte_en_cours_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr, 
 					     nb_ope_compte_etat );
@@ -712,6 +716,7 @@
 {
     gchar * text;
     gint current_report_number;
+	gchar* tmpstr;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -784,7 +789,7 @@
 		    fmtstr = _("%s (%d transaction)"); 
 		else
 		    fmtstr = _("%s (%d transactions)"); 
-		gchar* tmpstr = gsb_real_get_string_with_currency (montant_tiers_etat,
+		tmpstr = gsb_real_get_string_with_currency (montant_tiers_etat,
 										devise_tiers_etat, TRUE  );
 		text = g_strdup_printf ( fmtstr, tmpstr, nb_ope_tiers_etat );
 	        g_free ( tmpstr );
@@ -823,6 +828,8 @@
 					  gint force )
 {
     gint current_report_number;
+	gchar* dtstr1;
+	gchar* dtstr2;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
@@ -981,8 +988,8 @@
 		    fmtstr = _("Result from %s to %s (%d transaction):");
 		else
 		    fmtstr = _("Result from %s to %s (%d transactions):");
-		gchar* dtstr1 = gsb_format_gdate ( date_debut_periode );
-		gchar* dtstr2 = gsb_format_gdate ( date_tmp );
+		dtstr1 = gsb_format_gdate ( date_debut_periode );
+		dtstr2 = gsb_format_gdate ( date_tmp );
 		text = g_strdup_printf ( fmtstr, dtstr1, dtstr2, nb_ope_periode_etat );
 	        g_free ( dtstr1 );
 	        g_free ( dtstr2 );

Index: categories_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/categories_onglet.c,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -d -r1.195 -r1.196
--- categories_onglet.c	22 Jul 2009 19:45:42 -0000	1.195
+++ categories_onglet.c	24 Aug 2009 08:57:45 -0000	1.196
@@ -824,6 +824,7 @@
     GtkTreeSelection * selection;
     GtkTreeIter parent;
     GtkTreeIter iter;
+	GtkTreePath * path;
     gchar * name;
     gint category_number = -1, sub_category_number = -1;
     gint i = 0,j = 0;
@@ -859,7 +860,7 @@
         if ( numero == sub_category_number )
             break;
     }
-    GtkTreePath * path = gtk_tree_model_get_path ( model, &iter );
+    path = gtk_tree_model_get_path ( model, &iter );
     gtk_tree_view_expand_to_path ( GTK_TREE_VIEW (arbre_categ), path );
     selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (arbre_categ) );
     gtk_tree_selection_select_path ( selection, path );

Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -d -r1.208 -r1.209
--- accueil.c	23 Aug 2009 16:45:05 -0000	1.208
+++ accueil.c	24 Aug 2009 08:57:45 -0000	1.209
@@ -156,6 +156,7 @@
     {
 	GtkWidget * eb;
 	GtkStyle * style;
+	gchar* tmpstr;
 
 	hbox_title = gtk_hbox_new ( FALSE, 0 );
 	g_signal_connect ( G_OBJECT ( hbox_title ), "destroy",
@@ -168,7 +169,7 @@
 	label_titre_fichier = gtk_label_new ( titre_fichier );
 	g_signal_connect ( G_OBJECT ( label_titre_fichier ), "destroy",
 	    			G_CALLBACK( gtk_widget_destroyed ), &label_titre_fichier );
-	gchar* tmpstr = g_strconcat ("<span size=\"x-large\">",
+	tmpstr = g_strconcat ("<span size=\"x-large\">",
 					    titre_fichier, "</span>", NULL );
 	gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr);
 	g_free ( tmpstr );
@@ -559,6 +560,7 @@
     {
         GSList *list_tmp;
         gint currency_number;
+        gchar* tmpstr;
 
         currency_number = gsb_data_currency_get_no_currency (devise -> data);
 
@@ -567,7 +569,7 @@
 
         /* Création du tableau dans lequel seront stockés les comptes avec leur     */
         /* solde.                                                                   */
-        gchar* tmpstr = g_strdup_printf (_("Liabilities accounts balances in %s"),
+		tmpstr = g_strdup_printf (_("Liabilities accounts balances in %s"),
                          gsb_data_currency_get_name (currency_number) );
         if ( balances_with_scheduled == FALSE )
             tmpstr = g_strconcat ( tmpstr, _(" at "), gsb_date_today (), NULL );
@@ -636,6 +638,7 @@
     {
         GSList *list_tmp;
         gint currency_number;
+		gchar* tmpstr;
 
         currency_number = gsb_data_currency_get_no_currency (devise -> data);
 
@@ -644,7 +647,7 @@
 
         /* Création du tableau dans lequel seront stockés les comptes avec leur     */
         /* solde.                                                                   */
-        gchar* tmpstr = g_strdup_printf (_("Assets accounts balances in %s"),
+        tmpstr = g_strdup_printf (_("Assets accounts balances in %s"),
                          gsb_data_currency_get_name (currency_number));
         if ( balances_with_scheduled == FALSE )
             tmpstr = g_strconcat ( tmpstr, _(" at "), gsb_date_today (), NULL );
@@ -813,12 +816,13 @@
     GtkWidget *pEventBox, *pLabel;
     GtkStyle *pStyleLabelNomCompte, *pStyleLabelSoldeCourant,
 	     *pStyleLabelSoldePointe;
+	gchar* tmpstr;
 
     /* Initialisation du style « Nom du compte » */
     pStyleLabelNomCompte = gsb_main_page_get_default_label_style ( );
 
     /* Première colonne : elle contient le nom du compte */
-    gchar* tmpstr = g_strconcat ( gsb_data_account_get_name (account_number), " : ", NULL );
+    tmpstr = g_strconcat ( gsb_data_account_get_name (account_number), " : ", NULL );
     pLabel = gtk_label_new ( tmpstr );
     g_free ( tmpstr );
     gtk_misc_set_alignment ( GTK_MISC ( pLabel ), MISC_LEFT, MISC_VERT_CENTER );
@@ -1178,6 +1182,7 @@
 	    gint scheduled_number;
 	    gint account_number;
 	    gint currency_number;
+		gchar* tmpstr;
 
 	    scheduled_number = GPOINTER_TO_INT (pointeur_liste -> data);
 	    account_number = gsb_data_scheduled_get_account_number (scheduled_number);
@@ -1205,7 +1210,7 @@
 	    gtk_box_pack_start ( GTK_BOX ( hbox ), event_box, TRUE, TRUE, 5 );
 	    gtk_widget_show ( event_box  );
 
-            gchar* tmpstr = g_strconcat ( gsb_format_gdate (gsb_data_scheduled_get_date (scheduled_number)),
+            tmpstr = g_strconcat ( gsb_format_gdate (gsb_data_scheduled_get_date (scheduled_number)),
 				  " : ",
 				  gsb_data_payee_get_name (gsb_data_scheduled_get_party_number (scheduled_number),
 								       FALSE ),
@@ -1300,6 +1305,7 @@
 	    gint transaction_number;
 	    gint account_number;
 	    gint currency_number;
+		gchar* tmpstr;
 
 	    transaction_number = GPOINTER_TO_INT ( pointeur_liste -> data );
 	    account_number = gsb_data_transaction_get_account_number (transaction_number);
@@ -1326,7 +1332,7 @@
 	    gtk_widget_show ( event_box );
 
 	    /* label à gauche */
-            gchar* tmpstr = g_strconcat ( gsb_format_gdate ( gsb_data_transaction_get_date (transaction_number)),
+            tmpstr = g_strconcat ( gsb_format_gdate ( gsb_data_transaction_get_date (transaction_number)),
 					  " : ",
 					  gsb_data_payee_get_name (gsb_data_transaction_get_party_number (transaction_number), FALSE),
 					  NULL );
@@ -1757,6 +1763,7 @@
     GtkWidget * label, * hbox, * page;
     gint account_number;
     gint currency_number;
+	gchar* tmpstr;
 
     account_number = gsb_data_scheduled_get_account_number (scheduled_number);
     currency_number = gsb_data_scheduled_get_currency_number (scheduled_number);
@@ -1779,7 +1786,7 @@
 
     /* label à gauche */
 
-    gchar* tmpstr = g_strconcat ( gsb_format_gdate ( gsb_data_scheduled_get_date (scheduled_number)),
+    tmpstr = g_strconcat ( gsb_format_gdate ( gsb_data_scheduled_get_date (scheduled_number)),
 					  " : ",
 					  gsb_data_payee_get_name (gsb_data_scheduled_get_party_number (scheduled_number), FALSE),
 					  NULL );

Index: export_csv.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/export_csv.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- export_csv.c	12 Feb 2009 20:54:55 -0000	1.21
+++ export_csv.c	24 Aug 2009 08:57:45 -0000	1.22
@@ -261,6 +261,7 @@
     FILE *csv_file;
     GSList *pTransactionList;
     GSList *tmp_list;
+	gchar* tmpstr;
 
     csv_file = gsb_csv_export_open_file (filename);
 
@@ -271,7 +272,7 @@
 	gsb_csv_export_title_line (csv_file, TRUE);
 
     /* set the initial balance */
-    gchar* tmpstr = g_strconcat (_("Initial balance") , " [", 
+    tmpstr = g_strconcat (_("Initial balance") , " [", 
 						     gsb_data_account_get_name(account_nb),
 						     "]", NULL );
     if ( csv_field_tiers )
@@ -418,6 +419,7 @@
     gsb_real amount;
     gint return_exponent;
     gint account_number;
+	gchar* tmpstr;
 
     account_number = gsb_data_transaction_get_account_number (transaction_number);
     return_exponent = gsb_data_currency_get_floating_point (gsb_data_account_get_currency (account_number));
@@ -586,7 +588,7 @@
 			CSV_CLEAR_FIELD (csv_field_categ);
 			csv_field_categ = my_strdup (_("Transfer"));
 
-			gchar* tmpstr = g_strconcat ( "[", gsb_data_account_get_name ( gsb_data_transaction_get_contra_transaction_account ( pSplitTransaction ) ), "]", NULL );
+			tmpstr = g_strconcat ( "[", gsb_data_account_get_name ( gsb_data_transaction_get_contra_transaction_account ( pSplitTransaction ) ), "]", NULL );
 			/* TODO dOm : is it necessary to duplicate memory with my_strdup since it was already newly allocated memory ? */
 			CSV_CLEAR_FIELD (csv_field_sous_categ);
 			csv_field_sous_categ = my_strdup (tmpstr);



More information about the cvs mailing list