[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_99-30-g0eec34d
Rémi Cardona
nobody at users.sourceforge.net
Fri Feb 4 00:04:14 CET 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".
The branch, master has been updated
via 0eec34d78e4ee0172c00a0c6a9a91ed211bc9982 (commit)
via ebdfc1e1613da4d02ed00fd9b4394c7f092b0026 (commit)
via 6d4da9734caf8b2c0312a9584fbc4234794af56c (commit)
via f0834380d8125c3a3b509f303b2b8211ddb731ed (commit)
via ccd86b3a8777b30e2090dfed6e92096a0001141c (commit)
via 7fdfdbdf1e6f6b534f32f590e6650e188555081a (commit)
via a36d943b1a0f50665ec8bbc05c7e79e10c1626b5 (commit)
via 9d62a6e4a1e7f22d51fb3235bed997d4c699a020 (commit)
via 742d5cbce76d5968f0040d8b8cda8b3e643e4ec8 (commit)
from f78c85e9f0416720d04290119615734a4febab6c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0eec34d78e4ee0172c00a0c6a9a91ed211bc9982
Author: Rémi Cardona <remi at gentoo.org>
Date: Tue Feb 1 23:32:19 2011 +0100
fix leak in initialise_number_separators()
commit ebdfc1e1613da4d02ed00fd9b4394c7f092b0026
Author: Rémi Cardona <remi at gentoo.org>
Date: Tue Feb 1 23:07:50 2011 +0100
fix leak in gsb_real_raw_format_string()
commit 6d4da9734caf8b2c0312a9584fbc4234794af56c
Author: Rémi Cardona <remi at gentoo.org>
Date: Thu Feb 3 22:17:31 2011 +0100
Major #include clean up
- remove double/triple entries,
- make sure that either <config.h> or "include.h" is the _first_ included
headers in all .c files.
Here's the awk script that helped me get this done
BEGIN { FS="\"" }
{
if ( seenfirstinclude != "true") {
if ( ARGV[1] ~ /\.c$/ && /( )*#( )*include( )*/ ) {
# first include either <> or ""
seenfirstinclude = "true"
if ( ! /( )*#( )*include( )*"include\.h"/) {
print "#include \"include.h\""
includes["include.h"] = 1
}
}
}
if ( /( )*#( )*include( )*"/ ) {
if (ARGV[1] ~ /\.c$/ && seenfirstinclude != "true") {
seenfirstinclude = "true"
if ($2 != "include.h") {
print "#include \"include.h\""
includes["include.h"] = 1
}
}
if (includes[$2] != 1) {
print
includes[$2] = 1
}
} else {
print
}
}
commit f0834380d8125c3a3b509f303b2b8211ddb731ed
Author: Rémi Cardona <remi at gentoo.org>
Date: Thu Feb 3 20:23:06 2011 +0100
openssl: code cleanup, remove magic values
commit ccd86b3a8777b30e2090dfed6e92096a0001141c
Author: Rémi Cardona <remi at gentoo.org>
Date: Thu Feb 3 20:05:44 2011 +0100
openssl: fix 2 leaks in gsb_file_util_crypt_file()
commit 7fdfdbdf1e6f6b534f32f590e6650e188555081a
Author: Rémi Cardona <remi at gentoo.org>
Date: Thu Feb 3 20:22:06 2011 +0100
openssl: fix buffer overflow crashes due to bad API use
commit a36d943b1a0f50665ec8bbc05c7e79e10c1626b5
Author: Rémi Cardona <remi at gentoo.org>
Date: Thu Feb 3 22:55:59 2011 +0100
openssl: remove useless includes, revert double negation in #define
commit 9d62a6e4a1e7f22d51fb3235bed997d4c699a020
Author: Rémi Cardona <remi at gentoo.org>
Date: Sun Jan 30 18:27:35 2011 +0100
openssl: use the 'new' openssl APIs
New since 0.9.7 which was released in 2002... And yes, we actually only
use libcrypto. libssl contains all the networking functions which we
don't use at all.
commit 742d5cbce76d5968f0040d8b8cda8b3e643e4ec8
Author: Rémi Cardona <remi at gentoo.org>
Date: Sun Jan 30 17:04:28 2011 +0100
Remove wrong use of G_BROKEN_FILENAMES
Glib doc says it's an environment variable, not a pre-processor define.
http://library.gnome.org/devel/glib/unstable/glib-running.html#G_BROKEN_FILENAMES
-----------------------------------------------------------------------
Changes:
diff --git a/configure.in b/configure.in
index 9dc897d..de6ff8e 100644
--- a/configure.in
+++ b/configure.in
@@ -125,7 +125,7 @@ AC_ARG_WITH(openssl,
[build_openssl=$withval],
[build_openssl=auto])
-PKG_CHECK_MODULES(OPENSSL, [libssl], have_openssl=yes, have_openssl=no)
+PKG_CHECK_MODULES(OPENSSL, [libcrypto >= 0.9.7], have_openssl=yes, have_openssl=no)
if test "$build_openssl" = yes -a "$have_openssl" = no; then
AC_MSG_ERROR([OpenSSL support was requested but libssl could not be found.])
fi
@@ -134,8 +134,8 @@ if test "$build_openssl" != no; then
else
build_openssl=no
fi
-if test "$build_openssl" = no; then
- AC_DEFINE(NOSSL, 1, [Define if OpenSSL support is disabled])
+if test "$build_openssl" = yes; then
+ AC_DEFINE(HAVE_SSL, 1, [Define if OpenSSL support is enabled])
fi
AM_CONDITIONAL(HAVE_SSL, [test "$build_openssl" = yes])
diff --git a/src/accueil.c b/src/accueil.c
index b0a5670..367f45a 100644
--- a/src/accueil.c
+++ b/src/accueil.c
@@ -46,12 +46,7 @@
#include "utils.h"
#include "structures.h"
#include "fenetre_principale.h"
-#include "gsb_data_account.h"
-#include "gsb_select_icon.h"
-#include "gsb_form_scheduler.h"
-#include "include.h"
#include "erreur.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/affichage.c b/src/affichage.c
index f790ec4..4876fb9 100644
--- a/src/affichage.c
+++ b/src/affichage.c
@@ -44,10 +44,7 @@
#include "utils_font.h"
#include "structures.h"
#include "custom_list.h"
-#include "utils_str.h"
#include "utils_buttons.h"
-#include "gsb_select_icon.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/affichage_liste.c b/src/affichage_liste.c
index 155b17e..b0c8281 100644
--- a/src/affichage_liste.c
+++ b/src/affichage_liste.c
@@ -39,9 +39,7 @@
#include "structures.h"
#include "custom_list.h"
#include "fenetre_principale.h"
-#include "gtk_combofix.h"
#include "gsb_data_form.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/barre_outils.c b/src/barre_outils.c
index f23eee3..35ee571 100644
--- a/src/barre_outils.c
+++ b/src/barre_outils.c
@@ -43,7 +43,6 @@
#include "print_transactions_list.h"
#include "utils_buttons.h"
#include "structures.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/bet_config.c b/src/bet_config.c
index 7e31e2e..436ce57 100644
--- a/src/bet_config.c
+++ b/src/bet_config.c
@@ -42,7 +42,6 @@
#include "gsb_data_currency.h"
#include "gsb_form_widget.h"
#include "gsb_fyear.h"
-#include "include.h"
#include "navigation.h"
#include "structures.h"
#include "traitement_variables.h"
diff --git a/src/bet_data.c b/src/bet_data.c
index ef86729..94de8a3 100644
--- a/src/bet_data.c
+++ b/src/bet_data.c
@@ -42,7 +42,6 @@
#include "traitement_variables.h"
#include "gsb_file_save.h"
#include "utils_str.h"
-#include "gsb_data_account.h"
#include "gsb_scheduler_list.h"
#include "erreur.h"
#include "structures.h"
diff --git a/src/bet_future.c b/src/bet_future.c
index 7f556f1..aef1487 100644
--- a/src/bet_future.c
+++ b/src/bet_future.c
@@ -54,11 +54,7 @@
#include "utils_str.h"
#include "structures.h"
#include "gsb_data_payment.h"
-#include "gsb_data_account.h"
-#include "gtk_combofix.h"
-#include "gsb_form_scheduler.h"
#include "gsb_data_form.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/bet_tab.c b/src/bet_tab.c
index 66a9739..1b24ce4 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -58,7 +58,6 @@
#include "gsb_scheduler.h"
#include "gsb_scheduler_list.h"
#include "gsb_transactions_list.h"
-#include "include.h"
#include "mouse.h"
#include "navigation.h"
#include "print_tree_view_list.h"
diff --git a/src/dialog.c b/src/dialog.c
index 1b0fe57..2b7d47e 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -27,7 +27,6 @@
/*START_INCLUDE*/
#include "dialog.h"
#include "parametres.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/etats_affiche.c b/src/etats_affiche.c
index 6154bfa..626323a 100644
--- a/src/etats_affiche.c
+++ b/src/etats_affiche.c
@@ -44,8 +44,6 @@
#include "utils_str.h"
#include "structures.h"
#include "etats_config.h"
-#include "include.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/etats_affiche.h b/src/etats_affiche.h
index 66a7f74..c212d40 100644
--- a/src/etats_affiche.h
+++ b/src/etats_affiche.h
@@ -5,7 +5,6 @@
#include "gsb_real.h"
/* END_INCLUDE_H */
-#include "structures.h"
/** Device independant drawing functions for reports */
struct struct_etat_affichage
diff --git a/src/etats_calculs.c b/src/etats_calculs.c
index 8ff30c6..1297cf2 100644
--- a/src/etats_calculs.c
+++ b/src/etats_calculs.c
@@ -44,14 +44,8 @@
#include "gsb_status.h"
#include "utils_str.h"
#include "print_config.h"
-#include "gsb_data_account.h"
-#include "navigation.h"
-#include "gsb_data_transaction.h"
#include "structures.h"
#include "erreur.h"
-#include "gsb_real.h"
-#include "print_config.h"
-#include "etats_affiche.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/etats_calculs.h b/src/etats_calculs.h
index 6d2dc7d..ea7d6b5 100644
--- a/src/etats_calculs.h
+++ b/src/etats_calculs.h
@@ -4,7 +4,6 @@
#include "etats_affiche.h"
/* END_INCLUDE_H */
-#include "etats_affiche.h"
/* START_DECLARATION */
diff --git a/src/etats_config.c b/src/etats_config.c
index 1cee9f8..96d2473 100644
--- a/src/etats_config.c
+++ b/src/etats_config.c
@@ -49,10 +49,7 @@
#include "utils_str.h"
#include "structures.h"
#include "fenetre_principale.h"
-#include "include.h"
#include "erreur.h"
-#include "gsb_real.h"
-#include "gsb_data_report.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/etats_csv.c b/src/etats_csv.c
index 4d98c3d..4314940 100644
--- a/src/etats_csv.c
+++ b/src/etats_csv.c
@@ -28,7 +28,6 @@
#include "dialog.h"
#include "utils_files.h"
#include "etats_config.h"
-#include "include.h"
#include "structures.h"
#include "etats_affiche.h"
/*END_INCLUDE*/
diff --git a/src/etats_gtktable.c b/src/etats_gtktable.c
index 56d0b42..ca8460a 100644
--- a/src/etats_gtktable.c
+++ b/src/etats_gtktable.c
@@ -41,7 +41,6 @@
#include "transaction_list_select.h"
#include "structures.h"
#include "fenetre_principale.h"
-#include "gsb_data_transaction.h"
#include "etats_config.h"
#include "etats_affiche.h"
/*END_INCLUDE*/
diff --git a/src/etats_html.c b/src/etats_html.c
index 0207424..09a1554 100644
--- a/src/etats_html.c
+++ b/src/etats_html.c
@@ -29,7 +29,6 @@
#include "utils_files.h"
#include "structures.h"
#include "etats_config.h"
-#include "include.h"
#include "etats_affiche.h"
/*END_INCLUDE*/
diff --git a/src/etats_latex.c b/src/etats_latex.c
index 1135ddb..fe98988 100644
--- a/src/etats_latex.c
+++ b/src/etats_latex.c
@@ -29,9 +29,7 @@
#include "print_config.h"
#include "utils_files.h"
#include "structures.h"
-#include "print_config.h"
#include "etats_config.h"
-#include "include.h"
#include "etats_affiche.h"
/*END_INCLUDE*/
diff --git a/src/etats_onglet.c b/src/etats_onglet.c
index b31b050..d1db3c2 100644
--- a/src/etats_onglet.c
+++ b/src/etats_onglet.c
@@ -49,8 +49,6 @@
#include "utils_files.h"
#include "structures.h"
#include "fenetre_principale.h"
-#include "print_config.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/etats_support.c b/src/etats_support.c
index 8510822..27f7020 100644
--- a/src/etats_support.c
+++ b/src/etats_support.c
@@ -27,7 +27,6 @@
#include "utils_dates.h"
#include "gsb_data_fyear.h"
#include "gsb_data_report.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/export.c b/src/export.c
index f42346f..682601c 100644
--- a/src/export.c
+++ b/src/export.c
@@ -34,7 +34,6 @@
#include "utils.h"
#include "qif.h"
#include "structures.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/export_csv.c b/src/export_csv.c
index 7d7e39b..f2c7ee2 100644
--- a/src/export_csv.c
+++ b/src/export_csv.c
@@ -47,7 +47,6 @@
#include "main.h"
#include "utils_str.h"
#include "utils_files.h"
-#include "gsb_data_transaction.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/fenetre_principale.c b/src/fenetre_principale.c
index b197be8..801e548 100644
--- a/src/fenetre_principale.c
+++ b/src/fenetre_principale.c
@@ -43,7 +43,6 @@
#include "imputation_budgetaire.h"
#include "tiers_onglet.h"
#include "structures.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/file_obfuscate.c b/src/file_obfuscate.c
index 6e769ca..8db4baa 100644
--- a/src/file_obfuscate.c
+++ b/src/file_obfuscate.c
@@ -45,7 +45,6 @@
#include "gsb_status.h"
#include "utils_files.h"
#include "utils.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/file_obfuscate_qif.c b/src/file_obfuscate_qif.c
index d557a92..afd594b 100644
--- a/src/file_obfuscate_qif.c
+++ b/src/file_obfuscate_qif.c
@@ -34,7 +34,6 @@
#include "gsb_assistant.h"
#include "gsb_file.h"
#include "gsb_status.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/go-charmap-sel.c b/src/go-charmap-sel.c
index aad969c..b98e922 100644
--- a/src/go-charmap-sel.c
+++ b/src/go-charmap-sel.c
@@ -29,8 +29,6 @@
#include "go-charmap-sel.h"
#include "go-optionmenu.h"
#include "utils_str.h"
-#include "go-optionmenu.h"
-#include "include.h"
/*END_INCLUDE*/
struct cb_find_entry {
@@ -69,8 +67,6 @@ static void set_menu_to_default (GOCharmapSel *cs, gint item);
/*END_EXTERN*/
-#include "go-charmap-sel.h"
-#include "go-optionmenu.h"
#include <gtk/gtkcheckmenuitem.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
diff --git a/src/gsb_account.c b/src/gsb_account.c
index b4dc8bf..5dd7816 100644
--- a/src/gsb_account.c
+++ b/src/gsb_account.c
@@ -46,9 +46,6 @@
#include "imputation_budgetaire.h"
#include "transaction_list.h"
#include "gsb_transactions_list.h"
-#include "fenetre_principale.h"
-#include "gsb_form_scheduler.h"
-#include "include.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_account_property.c b/src/gsb_account_property.c
index 15467e0..04d0aa5 100644
--- a/src/gsb_account_property.c
+++ b/src/gsb_account_property.c
@@ -63,10 +63,6 @@
#include "transaction_list.h"
#include "structures.h"
#include "gsb_transactions_list.h"
-#include "accueil.h"
-#include "gsb_data_transaction.h"
-#include "gsb_form_scheduler.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_archive_config.c b/src/gsb_archive_config.c
index 2a755f0..00747c5 100644
--- a/src/gsb_archive_config.c
+++ b/src/gsb_archive_config.c
@@ -47,8 +47,6 @@
#include "dialog.h"
#include "transaction_list.h"
#include "structures.h"
-#include "gsb_transactions_list.h"
-#include "include.h"
/*END_INCLUDE*/
/** Columns for payment methods tree */
diff --git a/src/gsb_assistant_account.c b/src/gsb_assistant_account.c
index fada6ae..6c069f6 100644
--- a/src/gsb_assistant_account.c
+++ b/src/gsb_assistant_account.c
@@ -43,8 +43,6 @@
#include "gsb_select_icon.h"
#include "utils.h"
#include "structures.h"
-#include "gsb_data_account.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_assistant_archive.c b/src/gsb_assistant_archive.c
index ae72b3e..3d99597 100644
--- a/src/gsb_assistant_archive.c
+++ b/src/gsb_assistant_archive.c
@@ -50,7 +50,6 @@
#include "etats_calculs.h"
#include "utils.h"
#include "structures.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_assistant_archive_export.c b/src/gsb_assistant_archive_export.c
index 9e973a8..dfa787c 100644
--- a/src/gsb_assistant_archive_export.c
+++ b/src/gsb_assistant_archive_export.c
@@ -43,7 +43,6 @@
#include "utils.h"
#include "structures.h"
#include "gsb_transactions_list.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/gsb_assistant_file.c b/src/gsb_assistant_file.c
index ccb4e77..3f36cf7 100644
--- a/src/gsb_assistant_file.c
+++ b/src/gsb_assistant_file.c
@@ -46,8 +46,6 @@
#include "utils.h"
#include "affichage.h"
#include "structures.h"
-#include "gsb_currency_config.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_assistant_first.c b/src/gsb_assistant_first.c
index 330f25d..02af5e0 100644
--- a/src/gsb_assistant_first.c
+++ b/src/gsb_assistant_first.c
@@ -40,7 +40,6 @@
#include "utils_files.h"
#include "utils.h"
#include "structures.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_assistant_reconcile_config.c b/src/gsb_assistant_reconcile_config.c
index 3617580..81d598e 100644
--- a/src/gsb_assistant_reconcile_config.c
+++ b/src/gsb_assistant_reconcile_config.c
@@ -45,8 +45,6 @@
#include "utils.h"
#include "structures.h"
#include "gsb_transactions_list.h"
-#include "gsb_data_transaction.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_autofunc.c b/src/gsb_autofunc.c
index 0416597..944658c 100644
--- a/src/gsb_autofunc.c
+++ b/src/gsb_autofunc.c
@@ -47,7 +47,6 @@
#include "traitement_variables.h"
#include "utils_str.h"
#include "structures.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_automem.c b/src/gsb_automem.c
index 850b0a1..4668de6 100644
--- a/src/gsb_automem.c
+++ b/src/gsb_automem.c
@@ -40,8 +40,6 @@
#include "utils_buttons.h"
#include "utils.h"
#include "structures.h"
-#include "utils_buttons.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_bank.c b/src/gsb_bank.c
index cdbd20f..6b90641 100644
--- a/src/gsb_bank.c
+++ b/src/gsb_bank.c
@@ -42,7 +42,6 @@
#include "utils.h"
#include "structures.h"
#include "gsb_transactions_list.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_calendar_entry.c b/src/gsb_calendar_entry.c
index f933e18..5760e85 100644
--- a/src/gsb_calendar_entry.c
+++ b/src/gsb_calendar_entry.c
@@ -27,15 +27,15 @@
*
* */
-#include <ctype.h>
#include "include.h"
+
+#include <ctype.h>
#include <gdk/gdkkeysyms.h>
/*START_INCLUDE*/
#include "gsb_calendar_entry.h"
#include "utils_dates.h"
#include "gsb_form_widget.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_category.c b/src/gsb_category.c
index 4f6c399..4208771 100644
--- a/src/gsb_category.c
+++ b/src/gsb_category.c
@@ -38,11 +38,7 @@
#include "gsb_form_widget.h"
#include "gtk_combofix.h"
#include "utils_str.h"
-#include "gsb_data_category.h"
#include "utils_files.h"
-#include "gtk_combofix.h"
-#include "gsb_data_form.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/gsb_currency.c b/src/gsb_currency.c
index 03182ad..2b8d9a7 100644
--- a/src/gsb_currency.c
+++ b/src/gsb_currency.c
@@ -43,10 +43,8 @@
#include "structures.h"
#include "utils_files.h"
#include "gsb_data_form.h"
-#include "include.h"
#include "gsb_currency_config.h"
#include "erreur.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_currency_config.c b/src/gsb_currency_config.c
index 14c6e96..f0148d0 100644
--- a/src/gsb_currency_config.c
+++ b/src/gsb_currency_config.c
@@ -47,7 +47,6 @@
#include "utils_str.h"
#include "structures.h"
#include "utils_files.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_currency_link_config.c b/src/gsb_currency_link_config.c
index 340b12a..0a378f2 100644
--- a/src/gsb_currency_link_config.c
+++ b/src/gsb_currency_link_config.c
@@ -39,9 +39,7 @@
#include "gsb_real.h"
#include "traitement_variables.h"
#include "utils.h"
-#include "include.h"
#include "structures.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_data_account.c b/src/gsb_data_account.c
index f75eabf..0fb30e9 100644
--- a/src/gsb_data_account.c
+++ b/src/gsb_data_account.c
@@ -39,7 +39,6 @@
#include "gsb_data_transaction.h"
#include "gsb_select_icon.h"
#include "gsb_transactions_list.h"
-#include "include.h"
#include "navigation.h"
#include "structures.h"
#include "traitement_variables.h"
diff --git a/src/gsb_data_archive_store.c b/src/gsb_data_archive_store.c
index e753f1d..bcceb92 100644
--- a/src/gsb_data_archive_store.c
+++ b/src/gsb_data_archive_store.c
@@ -42,7 +42,6 @@
#include "gsb_data_transaction.h"
#include "gsb_real.h"
#include "transaction_list.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_budget.c b/src/gsb_data_budget.c
index 8839588..a0bfc4a 100644
--- a/src/gsb_data_budget.c
+++ b/src/gsb_data_budget.c
@@ -39,7 +39,6 @@
#include "gsb_form_widget.h"
#include "gsb_real.h"
#include "utils_str.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_category.c b/src/gsb_data_category.c
index a7d26c6..f55cf60 100644
--- a/src/gsb_data_category.c
+++ b/src/gsb_data_category.c
@@ -39,7 +39,6 @@
#include "gsb_form_widget.h"
#include "gsb_real.h"
#include "utils_str.h"
-#include "include.h"
#include "erreur.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_currency_link.c b/src/gsb_data_currency_link.c
index a917d58..0ab6a67 100644
--- a/src/gsb_data_currency_link.c
+++ b/src/gsb_data_currency_link.c
@@ -32,7 +32,6 @@
#include "gsb_data_currency_link.h"
#include "utils_dates.h"
#include "dialog.h"
-#include "include.h"
#include "gsb_real.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_fyear.c b/src/gsb_data_fyear.c
index e51fe7b..39c355e 100644
--- a/src/gsb_data_fyear.c
+++ b/src/gsb_data_fyear.c
@@ -34,7 +34,6 @@
#include "gsb_fyear.h"
#include "dialog.h"
#include "utils_str.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_partial_balance.c b/src/gsb_data_partial_balance.c
index 0e05180..22b31db 100644
--- a/src/gsb_data_partial_balance.c
+++ b/src/gsb_data_partial_balance.c
@@ -40,10 +40,7 @@
#include "utils_str.h"
#include "utils.h"
#include "structures.h"
-#include "gsb_data_account.h"
-#include "include.h"
#include "erreur.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/** \struct
diff --git a/src/gsb_data_payee.c b/src/gsb_data_payee.c
index 09d0165..5586207 100644
--- a/src/gsb_data_payee.c
+++ b/src/gsb_data_payee.c
@@ -41,7 +41,6 @@
#include "gsb_real.h"
#include "utils_str.h"
#include "meta_payee.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_payment.c b/src/gsb_data_payment.c
index da06c10..032619b 100644
--- a/src/gsb_data_payment.c
+++ b/src/gsb_data_payment.c
@@ -33,8 +33,6 @@
#include "gsb_data_payment.h"
#include "gsb_data_account.h"
#include "utils_str.h"
-#include "gsb_data_account.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_reconcile.c b/src/gsb_data_reconcile.c
index 3ff911c..a585d9c 100644
--- a/src/gsb_data_reconcile.c
+++ b/src/gsb_data_reconcile.c
@@ -34,7 +34,6 @@
#include "gsb_data_transaction.h"
#include "utils_dates.h"
#include "utils_str.h"
-#include "gsb_data_transaction.h"
#include "gsb_real.h"
/*END_INCLUDE*/
diff --git a/src/gsb_data_transaction.c b/src/gsb_data_transaction.c
index c965643..ff0dbf1 100644
--- a/src/gsb_data_transaction.c
+++ b/src/gsb_data_transaction.c
@@ -45,7 +45,6 @@
#include "utils_dates.h"
#include "gsb_real.h"
#include "utils_str.h"
-#include "include.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_debug.c b/src/gsb_debug.c
index c8ae0ce..0830b0e 100644
--- a/src/gsb_debug.c
+++ b/src/gsb_debug.c
@@ -36,10 +36,7 @@
#include "gsb_status.h"
#include "traitement_variables.h"
#include "utils_str.h"
-#include "include.h"
-#include "gsb_data_transaction.h"
#include "structures.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_file.c b/src/gsb_file.c
index 6556821..571b9a3 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -61,9 +61,6 @@
#include "affichage_liste.h"
#include "transaction_list.h"
#include "utils_files.h"
-#include "utils_str.h"
-#include "fenetre_principale.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c
index 05d948e..66d6a37 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -22,12 +22,13 @@
/* ************************************************************************** */
+#include "include.h"
+
#include <glib/gstdio.h>
#if GLIB_CHECK_VERSION (2,18,0)
#include <gio/gio.h>
#endif /* GLIB_CHECK_VERSION (2,18,0) */
-#include "include.h"
/*START_INCLUDE*/
#include "gsb_file_load.h"
@@ -64,10 +65,7 @@
#include "gsb_plugins.h"
#include "gsb_real.h"
#include "gsb_select_icon.h"
-#include "gsb_data_transaction.h"
#include "gsb_scheduler_list.h"
-#include "gsb_plugins.h"
-#include "gsb_real.h"
#include "import.h"
#include "structures.h"
#include "traitement_variables.h"
diff --git a/src/gsb_file_others.c b/src/gsb_file_others.c
index b6f0752..e41b39c 100644
--- a/src/gsb_file_others.c
+++ b/src/gsb_file_others.c
@@ -43,7 +43,6 @@
#include "imputation_budgetaire.h"
#include "utils_files.h"
#include "structures.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_file_save.c b/src/gsb_file_save.c
index 2255036..e318cd8 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -66,14 +66,9 @@
#include "utils_str.h"
#include "structures.h"
#include "custom_list.h"
-#include "gsb_data_form.h"
-#include "utils_str.h"
#include "gsb_scheduler_list.h"
-#include "include.h"
#include "gsb_calendar.h"
#include "erreur.h"
-#include "gsb_plugins.h"
-#include "gsb_data_report.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_file_util.c b/src/gsb_file_util.c
index 3d9dc7f..034cd1e 100644
--- a/src/gsb_file_util.c
+++ b/src/gsb_file_util.c
@@ -31,7 +31,6 @@
#include "gsb_file.h"
#include "utils_str.h"
#include "utils_files.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_form.c b/src/gsb_form.c
index af77713..cc7086e 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -73,14 +73,7 @@
#include "transaction_list_select.h"
#include "utils_operations.h"
#include "fenetre_principale.h"
-#include "gsb_data_payment.h"
-#include "gtk_combofix.h"
-#include "gsb_data_transaction.h"
#include "mouse.h"
-#include "gsb_form_scheduler.h"
-#include "gsb_data_form.h"
-#include "parametres.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_form_config.c b/src/gsb_form_config.c
index 0343630..ec5d050 100644
--- a/src/gsb_form_config.c
+++ b/src/gsb_form_config.c
@@ -40,8 +40,6 @@
#include "navigation.h"
#include "utils_str.h"
#include "traitement_variables.h"
-#include "gsb_data_form.h"
-#include "include.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_form_scheduler.c b/src/gsb_form_scheduler.c
index d69cbd1..408d220 100644
--- a/src/gsb_form_scheduler.c
+++ b/src/gsb_form_scheduler.c
@@ -45,13 +45,9 @@
#include "gsb_transactions_list.h"
#include "gtk_combofix.h"
#include "utils_str.h"
-#include "gtk_combofix.h"
-#include "gsb_form.h"
#include "structures.h"
#include "gsb_data_form.h"
-#include "include.h"
#include "erreur.h"
-#include "gsb_form_widget.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_form_transaction.c b/src/gsb_form_transaction.c
index 78b9e13..9d5ca27 100644
--- a/src/gsb_form_transaction.c
+++ b/src/gsb_form_transaction.c
@@ -47,13 +47,8 @@
#include "gsb_transactions_list.h"
#include "gtk_combofix.h"
#include "etats_calculs.h"
-#include "gsb_data_payment.h"
-#include "gtk_combofix.h"
-#include "gsb_data_form.h"
-#include "include.h"
#include "erreur.h"
#include "structures.h"
-#include "gsb_form_widget.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_form_widget.c b/src/gsb_form_widget.c
index 6756489..45da1b2 100644
--- a/src/gsb_form_widget.c
+++ b/src/gsb_form_widget.c
@@ -44,12 +44,8 @@
#include "gsb_payment_method.h"
#include "gtk_combofix.h"
#include "traitement_variables.h"
-#include "gsb_form.h"
#include "gsb_data_payment.h"
-#include "gtk_combofix.h"
-#include "include.h"
#include "structures.h"
-#include "gsb_data_form.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_fyear.c b/src/gsb_fyear.c
index 7dd5e95..f3b87e2 100644
--- a/src/gsb_fyear.c
+++ b/src/gsb_fyear.c
@@ -31,7 +31,6 @@
/*START_INCLUDE*/
#include "gsb_fyear.h"
#include "gsb_data_fyear.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/gsb_fyear_config.c b/src/gsb_fyear_config.c
index 7767739..e39fde7 100644
--- a/src/gsb_fyear_config.c
+++ b/src/gsb_fyear_config.c
@@ -43,7 +43,6 @@
#include "transaction_list.h"
#include "structures.h"
#include "gsb_transactions_list.h"
-#include "include.h"
/*END_INCLUDE*/
diff --git a/src/gsb_payment_method.c b/src/gsb_payment_method.c
index a9f529b..788df9c 100644
--- a/src/gsb_payment_method.c
+++ b/src/gsb_payment_method.c
@@ -35,8 +35,6 @@
#include "gsb_data_payment.h"
#include "gsb_form.h"
#include "gsb_form_widget.h"
-#include "gsb_data_payment.h"
-#include "gsb_form.h"
#include "gsb_data_form.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_payment_method_config.c b/src/gsb_payment_method_config.c
index 0710bec..23f2054 100644
--- a/src/gsb_payment_method_config.c
+++ b/src/gsb_payment_method_config.c
@@ -44,9 +44,6 @@
#include "transaction_list.h"
#include "structures.h"
#include "gsb_transactions_list.h"
-#include "gsb_data_payment.h"
-#include "gsb_data_form.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_plugins.c b/src/gsb_plugins.c
index a523ac6..d751ee6 100644
--- a/src/gsb_plugins.c
+++ b/src/gsb_plugins.c
@@ -24,7 +24,6 @@
/*START_INCLUDE*/
#include "gsb_plugins.h"
#include "dialog.h"
-#include "include.h"
#ifdef ENABLE_STATIC
#include "plugins/gnucash/gnucash.h"
#include "plugins/ofx/ofx.h"
diff --git a/src/gsb_real.c b/src/gsb_real.c
index 6809ab6..453042c 100644
--- a/src/gsb_real.c
+++ b/src/gsb_real.c
@@ -101,7 +101,7 @@ gchar *gsb_real_raw_format_string (gsb_real number,
{
gchar buffer[G_ASCII_DTOSTR_BUF_SIZE];
gchar format[40];
- gchar *result = NULL;
+ gchar *result = NULL, *temp = NULL;
const gchar *cs_start;
const gchar *cs_start_space;
const gchar *sign;
@@ -122,11 +122,11 @@ gchar *gsb_real_raw_format_string (gsb_real number,
nbre_char = g_sprintf ( buffer, "%.0f", (gdouble) units.quot );
- result = g_strndup ( buffer, nbre_char );
+ temp = g_strndup ( buffer, nbre_char );
if ( units.quot >= 1000 )
{
- result = gsb_real_add_thousands_sep ( result, gsb_thousands_sep );
+ temp = gsb_real_add_thousands_sep ( temp, gsb_thousands_sep );
}
g_snprintf ( format, sizeof ( format ), "%s%d%s",
@@ -138,12 +138,14 @@ gchar *gsb_real_raw_format_string (gsb_real number,
cs_start,
cs_start_space,
sign,
- result,
+ temp,
mon_decimal_point,
units.rem,
cs_end_space,
cs_end );
+ g_free ( temp );
+
return result;
}
diff --git a/src/gsb_reconcile.c b/src/gsb_reconcile.c
index 7bc1266..b530acc 100644
--- a/src/gsb_reconcile.c
+++ b/src/gsb_reconcile.c
@@ -51,10 +51,6 @@
#include "transaction_list.h"
#include "transaction_list_sort.h"
#include "structures.h"
-#include "gsb_transactions_list.h"
-#include "gsb_data_transaction.h"
-#include "include.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/gsb_reconcile_list.c b/src/gsb_reconcile_list.c
index c711751..c3a97a1 100644
--- a/src/gsb_reconcile_list.c
+++ b/src/gsb_reconcile_list.c
@@ -39,7 +39,6 @@
#include "transaction_list_select.h"
#include "transaction_list_sort.h"
#include "custom_list.h"
-#include "gsb_data_payment.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_reconcile_sort_config.c b/src/gsb_reconcile_sort_config.c
index 0720d87..febeb4b 100644
--- a/src/gsb_reconcile_sort_config.c
+++ b/src/gsb_reconcile_sort_config.c
@@ -35,8 +35,6 @@
#include "traitement_variables.h"
#include "utils_str.h"
#include "utils.h"
-#include "gsb_data_payment.h"
-#include "include.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_scheduler.c b/src/gsb_scheduler.c
index 846b0a8..351bc34 100644
--- a/src/gsb_scheduler.c
+++ b/src/gsb_scheduler.c
@@ -42,7 +42,6 @@
#include "gsb_transactions_list.h"
#include "main.h"
#include "traitement_variables.h"
-#include "gsb_scheduler_list.h"
#include "erreur.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index 9ea631e..54553c8 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -54,8 +54,6 @@
#include "structures.h"
#include "gsb_transactions_list.h"
#include "mouse.h"
-#include "include.h"
-#include "gsb_calendar.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gsb_transactions_list_sort.c b/src/gsb_transactions_list_sort.c
index 13c22bd..755300f 100644
--- a/src/gsb_transactions_list_sort.c
+++ b/src/gsb_transactions_list_sort.c
@@ -44,10 +44,7 @@
#include "gsb_real.h"
#include "gsb_transactions_list.h"
#include "custom_list.h"
-#include "gsb_transactions_list.h"
-#include "include.h"
#include "structures.h"
-#include "gsb_real.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/gtk_combofix.c b/src/gtk_combofix.c
index 82f9830..8e0286c 100644
--- a/src/gtk_combofix.c
+++ b/src/gtk_combofix.c
@@ -21,10 +21,10 @@
/* */
/* ************************************************************************** */
-#include <gdk/gdkkeysyms.h>
-#include <ctype.h>
#include "include.h"
+#include <gdk/gdkkeysyms.h>
+#include <ctype.h>
/*START_INCLUDE*/
#include "gtk_combofix.h"
diff --git a/src/help.c b/src/help.c
index d14b819..80b24ac 100644
--- a/src/help.c
+++ b/src/help.c
@@ -32,7 +32,6 @@
#include "gsb_plugins.h"
#include "gsb_select_icon.h"
#include "utils_str.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/import.c b/src/import.c
index a4960ea..3b3de9b 100644
--- a/src/import.c
+++ b/src/import.c
@@ -72,13 +72,6 @@
#include "transaction_list.h"
#include "utils_files.h"
#include "structures.h"
-#include "gsb_transactions_list.h"
-#include "go-charmap-sel.h"
-#include "gsb_data_payment.h"
-#include "gsb_data_account.h"
-#include "gtk_combofix.h"
-#include "gsb_data_transaction.h"
-#include "gsb_form_scheduler.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/import_csv.c b/src/import_csv.c
index 007755b..404d30f 100644
--- a/src/import_csv.c
+++ b/src/import_csv.c
@@ -33,8 +33,6 @@
#include "import.h"
#include "utils.h"
#include "structures.h"
-#include "include.h"
-#include "import.h"
/*END_INCLUDE*/
/*START_EXTERN*/
diff --git a/src/include.h b/src/include.h
index 19f2922..10ce990 100644
--- a/src/include.h
+++ b/src/include.h
@@ -3,7 +3,10 @@
#define _INCLUDE_H (1)
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
@@ -27,7 +30,6 @@
#include <errno.h>
#include <math.h>
-#define G_BROKEN_FILENAMES 1
#include <gtk/gtktextview.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
diff --git a/src/main.c b/src/main.c
index 443d4a7..01da2b0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,10 +25,6 @@
/* *******************************************************************************/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include "include.h"
/*START_INCLUDE*/
diff --git a/src/meta_budgetary.c b/src/meta_budgetary.c
index e007eee..8589fb9 100644
--- a/src/meta_budgetary.c
+++ b/src/meta_budgetary.c
@@ -30,8 +30,6 @@
#include "gsb_data_scheduled.h"
#include "gsb_data_transaction.h"
#include "utils_str.h"
-#include "metatree.h"
-#include "include.h"
#include "gsb_real.h"
/*END_INCLUDE*/
diff --git a/src/meta_categories.c b/src/meta_categories.c
index f416d8d..e94fed8 100644
--- a/src/meta_categories.c
+++ b/src/meta_categories.c
@@ -31,8 +31,6 @@
#include "gsb_data_scheduled.h"
#include "gsb_data_transaction.h"
#include "utils_str.h"
-#include "metatree.h"
-#include "include.h"
#include "gsb_real.h"
/*END_INCLUDE*/
diff --git a/src/meta_payee.c b/src/meta_payee.c
index 3fdb441..4a4baff 100644
--- a/src/meta_payee.c
+++ b/src/meta_payee.c
@@ -29,8 +29,6 @@
#include "gsb_data_transaction.h"
#include "utils_str.h"
#include "tiers_onglet.h"
-#include "metatree.h"
-#include "include.h"
#include "gsb_real.h"
/*END_INCLUDE*/
diff --git a/src/metatree.c b/src/metatree.c
index 2d656c3..cb4e4ba 100644
--- a/src/metatree.c
+++ b/src/metatree.c
@@ -39,8 +39,6 @@
#include "gsb_real.h"
#include "gsb_transactions_list.h"
#include "gtk_combofix.h"
-#include "gsb_transactions_list.h"
-#include "gtk_combofix.h"
#include "imputation_budgetaire.h"
#include "navigation.h"
#include "structures.h"
diff --git a/src/navigation.c b/src/navigation.c
index aa730c1..bb360af 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -53,8 +53,6 @@
#include "imputation_budgetaire.h"
#include "transaction_list_select.h"
#include "transaction_list_sort.h"
-#include "utils_str.h"
-#include "fenetre_principale.h"
#include "erreur.h"
#include "structures.h"
#include "utils.h"
diff --git a/src/parse_cmdline.c b/src/parse_cmdline.c
index 9a4bc14..54408cc 100644
--- a/src/parse_cmdline.c
+++ b/src/parse_cmdline.c
@@ -25,7 +25,6 @@
#include "gsb_plugins.h"
#include "main.h"
#include "utils_str.h"
-#include "include.h"
#include "structures.h"
#include "utils.h"
/*END_INCLUDE*/
diff --git a/src/plugins/ofx/ofx.c b/src/plugins/ofx/ofx.c
index 71d30f6..4b65ea3 100644
--- a/src/plugins/ofx/ofx.c
+++ b/src/plugins/ofx/ofx.c
@@ -19,9 +19,10 @@
/* */
/* ************************************************************************** */
-#include <libofx/libofx.h>
#include "include.h"
+#include <libofx/libofx.h>
+
/*START_INCLUDE*/
#include "ofx.h"
#include "dialog.h"
diff --git a/src/plugins/openssl/openssl.c b/src/plugins/openssl/openssl.c
index 8897638..b1c85ab 100644
--- a/src/plugins/openssl/openssl.c
+++ b/src/plugins/openssl/openssl.c
@@ -19,12 +19,15 @@
/* */
/* ************************************************************************** */
-#ifndef NOSSL
+#include "include.h"
+
+/* This define is required to disable openssl's SSLeay support which redefines
+ * _(), which obvisouly breaks glib's gettext macros. */
+#define OPENSSL_DISABLE_OLD_DES_SUPPORT
+#ifdef HAVE_SSL
# include <openssl/des.h>
#endif
-#include "include.h"
-
/*START_INCLUDE*/
#include "openssl.h"
#include "dialog.h"
@@ -44,7 +47,7 @@
SYMBOL_IMPORT GtkWidget *window;
/*END_EXTERN*/
-#ifndef NOSSL
+#ifdef HAVE_SSL
/*START_STATIC*/
static gchar *gsb_file_util_ask_for_crypt_key ( gchar * file_name, gchar * additional_message,
gboolean encrypt );
@@ -53,7 +56,11 @@ static gulong gsb_file_util_crypt_file ( gchar * file_name, gchar **file_content
/*END_STATIC*/
#endif
-gchar *crypt_key;
+static gchar *saved_crypt_key;
+
+#define MARKER "Grisbi encrypted file "
+#define MARKER_SIZE (sizeof(MARKER) - 1)
+
/**
* Crypt or decrypt string given in the param
@@ -70,10 +77,11 @@ gchar *crypt_key;
gulong gsb_file_util_crypt_file ( gchar * file_name, gchar **file_content,
gboolean crypt, gulong length )
{
-#ifndef NOSSL
+#ifdef HAVE_SSL
gchar * key, * message = "";
- des_cblock openssl_key;
- des_key_schedule sched;
+ DES_cblock openssl_key;
+ DES_key_schedule sched;
+ gulong output_length;
if ( crypt )
{
@@ -83,8 +91,8 @@ gulong gsb_file_util_crypt_file ( gchar * file_name, gchar **file_content,
/* now, if we know here a key to crypt, we use it, else, we ask for it */
- if ( crypt_key )
- key = crypt_key;
+ if ( saved_crypt_key )
+ key = saved_crypt_key;
else
key = gsb_file_util_ask_for_crypt_key ( file_name, message, TRUE);
@@ -93,32 +101,35 @@ gulong gsb_file_util_crypt_file ( gchar * file_name, gchar **file_content,
if ( !key )
return 0;
- des_string_to_key ( key, &openssl_key );
- des_set_key_unchecked ( &openssl_key, sched );
- DES_set_odd_parity ( &openssl_key );
+ /* Encrypted files begin with a special marker */
+ output_length = MARKER_SIZE;
+ g_printf("TOTO: %d\n", MARKER_SIZE);
+
+ /* DES_cbc_encrypt output is always a multiple of 8 bytes. Adjust the
+ * length of the output allocation accordingly. */
+ output_length += length + 8 - length % 8;
+
+ encrypted_file = g_malloc0 ( output_length );
- /* we create a copy of the file in memory which will begin by
- * "Grisbi encrypted file " */
+ /* Copy the special marker at the beginning of the output file */
+ strncpy ( encrypted_file, MARKER , MARKER_SIZE );
- encrypted_file = g_malloc0 ( ( length + 23 ) * sizeof ( gchar ) );
- encrypted_file = strncpy ( encrypted_file, "Grisbi encrypted file ", 22 );
+ /* Then encrypt the data and put it in the right place in the output
+ * buffer. */
+ DES_string_to_key ( key, &openssl_key );
+ DES_set_key_unchecked ( &openssl_key, &sched );
+ DES_set_odd_parity ( &openssl_key );
- des_cbc_encrypt ( (guchar *) (* file_content),
- (guchar *) (encrypted_file + 22),
+ DES_cbc_encrypt ( (guchar *) (* file_content),
+ (guchar *) (encrypted_file + MARKER_SIZE),
(long) length,
- sched,
- (DES_cblock *) key,
+ &sched,
+ &openssl_key,
TRUE );
- if ( length % 8 != 0 )
- {
- length += ( 8 - length % 8 );
- }
-
*file_content = encrypted_file;
- /* the actual length is the initial + 22 (size of Grisbi encrypted file */
- return length + 22;
+ return output_length;
}
else
{
@@ -128,14 +139,14 @@ gulong gsb_file_util_crypt_file ( gchar * file_name, gchar **file_content,
/* we set the length on the rigt size */
- length = length - 22;
+ length = length - MARKER_SIZE;
return_bad_password:
/* now, if we know here a key to crypt, we use it, else, we ask for it */
- if ( crypt_key )
- key = crypt_key;
+ if ( saved_crypt_key )
+ key = saved_crypt_key;
else
key = gsb_file_util_ask_for_crypt_key ( file_name, message, FALSE );
@@ -144,20 +155,17 @@ return_bad_password:
if ( !key )
return 0;
- des_string_to_key ( key, &openssl_key );
- des_set_key_unchecked( &openssl_key, sched );
- DES_set_odd_parity ( &openssl_key );
+ decrypted_file = g_malloc0 ( length );
- /* we create a copy of the file in memory which will begin
- * with "Grisbi encrypted file " */
-
- decrypted_file = g_malloc0 ( length * sizeof ( gchar ));
+ DES_string_to_key ( key, &openssl_key );
+ DES_set_key_unchecked( &openssl_key, &sched );
+ DES_set_odd_parity ( &openssl_key );
- des_cbc_encrypt ( (guchar *) (* file_content + 22),
+ DES_cbc_encrypt ( (guchar *) (* file_content + MARKER_SIZE),
(guchar *) decrypted_file,
(long) length,
- sched,
- (DES_cblock *) key,
+ &sched,
+ &openssl_key,
FALSE );
/* before freeing file_content and go back, we check that the password was correct
@@ -176,7 +184,8 @@ return_bad_password:
g_free ( decrypted_file );
message = _( "<span weight=\"bold\" foreground=\"red\">Password is incorrect!</span>\n\n");
- crypt_key = NULL;
+ g_free ( saved_crypt_key );
+ saved_crypt_key = NULL;
goto return_bad_password;
}
@@ -205,7 +214,7 @@ return_bad_password:
*
* \return a string which is the crypt key or NULL if it was
* cancelled. */
-#ifndef NOSSL
+#ifdef HAVE_SSL
gchar *gsb_file_util_ask_for_crypt_key ( gchar * file_name, gchar * additional_message,
gboolean encrypt )
{
@@ -284,7 +293,10 @@ return_bad_password:
key = g_strdup (gtk_entry_get_text ( GTK_ENTRY ( entry )));
if (!strlen ( key ) )
+ {
+ g_free ( key );
key = NULL;
+ }
#ifdef __APPLE__
else if ( g_utf8_strlen ( key, -1 ) < 7 )
{
@@ -297,9 +309,9 @@ return_bad_password:
#endif /* __APPLE__ */
if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( button )))
- crypt_key = key;
+ saved_crypt_key = key;
else
- crypt_key = NULL;
+ saved_crypt_key = NULL;
break;
case GTK_RESPONSE_CANCEL:
@@ -324,7 +336,7 @@ G_MODULE_EXPORT const gchar plugin_name[] = "openssl";
G_MODULE_EXPORT extern void openssl_plugin_register ( void )
{
devel_debug ("Initializating openssl plugin");
- crypt_key = NULL;
+ saved_crypt_key = NULL;
}
diff --git a/src/plugins/openssl/openssl.h b/src/plugins/openssl/openssl.h
index 807f41e..5dde3ee 100644
--- a/src/plugins/openssl/openssl.h
+++ b/src/plugins/openssl/openssl.h
@@ -1,15 +1,8 @@
#ifndef GSB_CRYPT_H
#define GSB_CRYPT_H
-#include <libintl.h>
-#include <locale.h>
-
-#define G_BROKEN_FILENAMES 1
-#include <gtk/gtk.h>
-
-
/* START_INCLUDE_H */
-#include "include.h"
+#include <glib.h>
/* END_INCLUDE_H */
/* START_DECLARATION */
diff --git a/src/print_config.c b/src/print_config.c
index b394237..8901275 100644
--- a/src/print_config.c
+++ b/src/print_config.c
@@ -30,7 +30,6 @@
#include "utils_str.h"
#include "utils.h"
#include "dialog.h"
-#include "include.h"
#include "structures.h"
/*END_INCLUDE*/
diff --git a/src/print_report.c b/src/print_report.c
index 47714bf..22683af 100644
--- a/src/print_report.c
+++ b/src/print_report.c
@@ -33,7 +33,6 @@
#include "gsb_data_print_config.h"
#include "utils.h"
#include "print_dialog_config.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/print_transactions_list.c b/src/print_transactions_list.c
index 0f0c6bb..8b9da47 100644
--- a/src/print_transactions_list.c
+++ b/src/print_transactions_list.c
@@ -37,7 +37,6 @@
#include "print_dialog_config.h"
#include "transaction_model.h"
#include "custom_list.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/qif.c b/src/qif.c
index 0f4fa6d..adf8e07 100644
--- a/src/qif.c
+++ b/src/qif.c
@@ -39,10 +39,6 @@
#include "gsb_real.h"
#include "utils_str.h"
#include "import.h"
-#include "gsb_data_account.h"
-#include "gsb_data_transaction.h"
-#include "include.h"
-#include "import.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/tests/gsb_data_account_cunit.c b/src/tests/gsb_data_account_cunit.c
index 7304f2b..ef7c616 100644
--- a/src/tests/gsb_data_account_cunit.c
+++ b/src/tests/gsb_data_account_cunit.c
@@ -36,7 +36,6 @@
#include "gsb_data_account.h"
#include "gsb_data_currency.h"
#include "gsb_data_transaction.h"
-#include "gsb_data_account.h"
#include "gsb_real.h"
/* END_INCLUDE */
diff --git a/src/tests/gsb_real_cunit.c b/src/tests/gsb_real_cunit.c
index e2327ba..4eff1e2 100644
--- a/src/tests/gsb_real_cunit.c
+++ b/src/tests/gsb_real_cunit.c
@@ -33,7 +33,6 @@
/* START_INCLUDE */
#include "gsb_real_cunit.h"
#include "gsb_real.h"
-#include "gsb_real.h"
/* END_INCLUDE */
/* START_STATIC */
diff --git a/src/tests/main_cunit.c b/src/tests/main_cunit.c
index e636a7f..86bfeda 100644
--- a/src/tests/main_cunit.c
+++ b/src/tests/main_cunit.c
@@ -29,10 +29,6 @@
/* *******************************************************************************/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include "include.h"
/*START_INCLUDE*/
diff --git a/src/tiers_onglet.c b/src/tiers_onglet.c
index fc7d0b1..292b116 100644
--- a/src/tiers_onglet.c
+++ b/src/tiers_onglet.c
@@ -33,7 +33,6 @@
/*START_INCLUDE*/
#include "tiers_onglet.h"
-#include "dialog.h"
#include "metatree.h"
#include "gsb_assistant.h"
#include "gsb_automem.h"
@@ -53,12 +52,7 @@
#include "utils_buttons.h"
#include "transaction_list.h"
#include "gsb_transactions_list.h"
-#include "gtk_combofix.h"
-#include "metatree.h"
#include "structures.h"
-#include "gsb_data_form.h"
-#include "include.h"
-#include "dialog.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index 69119c1..ee704c1 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -760,6 +760,7 @@ void initialise_format_date ( void )
void initialise_number_separators ( void )
{
struct lconv *conv;
+ gchar *dec_point = NULL, *thousand_sep = NULL;
gsb_real_set_decimal_point ( NULL );
gsb_real_set_thousands_sep ( NULL );
@@ -767,11 +768,17 @@ void initialise_number_separators ( void )
conv = localeconv();
if ( conv->mon_decimal_point && strlen ( conv->mon_decimal_point ) )
- gsb_real_set_decimal_point ( g_locale_to_utf8 ( conv->mon_decimal_point, -1, NULL, NULL, NULL ) );
+ {
+ dec_point = g_locale_to_utf8 ( conv->mon_decimal_point, -1, NULL, NULL, NULL );
+ gsb_real_set_decimal_point ( dec_point );
+ g_free ( dec_point );
+ }
else
gsb_real_set_decimal_point ( "." );
- gsb_real_set_thousands_sep ( g_locale_to_utf8 ( conv->mon_thousands_sep, -1, NULL, NULL, NULL ) );
+ thousand_sep = g_locale_to_utf8 ( conv->mon_thousands_sep, -1, NULL, NULL, NULL );
+ gsb_real_set_thousands_sep ( thousand_sep );
+ g_free ( thousand_sep );
}
diff --git a/src/transaction_list.c b/src/transaction_list.c
index 8591157..65761e7 100644
--- a/src/transaction_list.c
+++ b/src/transaction_list.c
@@ -50,13 +50,8 @@
#include "transaction_list_select.h"
#include "transaction_list_sort.h"
#include "transaction_model.h"
-#include "custom_list.h"
-#include "gsb_transactions_list.h"
-#include "gsb_data_transaction.h"
-#include "include.h"
#include "structures.h"
#include "erreur.h"
-#include "gsb_real.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/utils_file_selection.c b/src/utils_file_selection.c
index 5cb414f..9e9a239 100644
--- a/src/utils_file_selection.c
+++ b/src/utils_file_selection.c
@@ -44,7 +44,6 @@ extern "C" {
#include "dialog.h"
#include "gsb_file_util.h"
#include "utils_str.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
diff --git a/src/utils_files.c b/src/utils_files.c
index 48310f3..e692e28 100644
--- a/src/utils_files.c
+++ b/src/utils_files.c
@@ -34,9 +34,6 @@
#include "gsb_file.h"
#include "utils_str.h"
#include "gsb_file_config.h"
-#include "utils_file_selection.h"
-#include "go-charmap-sel.h"
-#include "include.h"
#include "erreur.h"
/*END_INCLUDE*/
diff --git a/src/utils_font.c b/src/utils_font.c
index cc1290c..a24069b 100644
--- a/src/utils_font.c
+++ b/src/utils_font.c
@@ -30,7 +30,6 @@
/*START_INCLUDE*/
#include "utils_font.h"
#include "utils_str.h"
-#include "include.h"
/*END_INCLUDE*/
/*START_STATIC*/
hooks/post-receive
--
grisbi
More information about the cvs
mailing list