[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-29-g7138301
Rémi Cardona
nobody at users.sourceforge.net
Sun Feb 27 19:21:24 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 71383019ff1cca91ba6c141e6c0aa56573c6db41 (commit)
via 12690c734fb487b2b7423e8613bda2d7d220c158 (commit)
via b1ded1870faaa41cad31b34a70dddcc460f4fbd3 (commit)
via 1a55b9064116061f09a1ef36f2220cbf55f685c4 (commit)
via 39c123eec42f8784b103dca5b93692e46b27984c (commit)
from 500bfbd5c92f475fe894f1c3ad60ce4ee3d39fd0 (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 71383019ff1cca91ba6c141e6c0aa56573c6db41
Author: Rémi Cardona <remi at gentoo.org>
Date: Sat Feb 26 23:54:22 2011 +0100
Remove useless #includes, part 1
commit 12690c734fb487b2b7423e8613bda2d7d220c158
Author: Rémi Cardona <remi at gentoo.org>
Date: Sun Feb 27 09:08:17 2011 +0100
Remove 'extern C' block, file is pure C, not C++
commit b1ded1870faaa41cad31b34a70dddcc460f4fbd3
Author: Rémi Cardona <remi at gentoo.org>
Date: Sat Feb 26 19:03:43 2011 +0100
Move the libofx API hack to ofx.c
This patch also makes it simpler as all of ofx.c uses the OFX_* variables,
so this should work on all platforms, regardless of libofx being patched or
not.
commit 1a55b9064116061f09a1ef36f2220cbf55f685c4
Author: Rémi Cardona <remi at gentoo.org>
Date: Sat Feb 26 19:01:06 2011 +0100
Make libofx 0.7 or greater mandatory, remove legacy code
commit 39c123eec42f8784b103dca5b93692e46b27984c
Author: Rémi Cardona <remi at gentoo.org>
Date: Sat Feb 26 18:59:47 2011 +0100
Fix build with --enable-static-plugins and --disable-ofx
Also remove a double negation.
-----------------------------------------------------------------------
Changes:
diff --git a/configure.in b/configure.in
index 1f3343d..35127f7 100644
--- a/configure.in
+++ b/configure.in
@@ -170,11 +170,11 @@ dnl Check for libofx
dnl ================================================================
AC_ARG_WITH(ofx,
- AS_HELP_STRING([--with-ofx],[build grisbi without ofx support (default=auto)]),
+ AS_HELP_STRING([--with-ofx],[build grisbi with ofx support (default=auto)]),
[build_ofx=$withval]
[build_ofx=auto])
-PKG_CHECK_MODULES(LIBOFX, [libofx], have_ofx=yes, have_ofx=no)
+PKG_CHECK_MODULES(LIBOFX, [libofx >= 0.7], have_ofx=yes, have_ofx=no)
if test "$build_ofx" = yes -a "$with_ofx" = no; then
AC_MSG_ERROR([Ofx support was requested bug libofx could not be found.])
fi
@@ -184,7 +184,7 @@ else
build_ofx=no
fi
if test "$build_ofx" = yes; then
- PKG_CHECK_EXISTS([libofx >= 0.7], [AC_DEFINE([OFX_0_7], 1, [Build with libofx 0.7 or newer])])
+ AC_DEFINE(HAVE_OFX, 1, [Build with ofx support])
fi
AM_CONDITIONAL(HAVE_OFX, [test "$build_ofx" = yes])
diff --git a/src/erreur.c b/src/erreur.c
index 8fed7bd..340d543 100644
--- a/src/erreur.c
+++ b/src/erreur.c
@@ -44,7 +44,6 @@
#include "import.h"
#include "main.h"
#include "structures.h"
-#include "traitement_variables.h"
#include "utils.h"
#include "utils_files.h"
#include "utils_str.h"
diff --git a/src/gsb_plugins.c b/src/gsb_plugins.c
index e48d001..8a9b321 100644
--- a/src/gsb_plugins.c
+++ b/src/gsb_plugins.c
@@ -65,14 +65,14 @@ void gsb_plugins_scan_dir ( const char *dirname )
plugin -> plugin_register ();
plugins = g_slist_append ( plugins, plugin );
-#ifndef NOOFX
+#ifdef HAVE_OFX
plugin = g_malloc0 ( sizeof ( gsb_plugin ) );
plugin -> name = "ofx";
plugin -> plugin_register = &ofx_plugin_register;
plugin -> plugin_run = &ofx_plugin_run;
plugin -> plugin_register ();
plugins = g_slist_append ( plugins, plugin );
-#endif /* NOODX */
+#endif /* HAVE_OFX */
plugin = g_malloc0 ( sizeof ( gsb_plugin ) );
plugin -> name = "openssl";
diff --git a/src/plugins/ofx/ofx.c b/src/plugins/ofx/ofx.c
index 0c2164e..a719344 100644
--- a/src/plugins/ofx/ofx.c
+++ b/src/plugins/ofx/ofx.c
@@ -36,6 +36,34 @@
#include "erreur.h"
/*END_INCLUDE*/
+/* On Windows, the Ofx Severity enumerate values are already used in wingdi.h, DELETE is used in winnt.h
+ * This is a work around to this issues :
+ * INFO, WARN, ERROR, DELETE and REPLACE are used in standard libofx.h;
+ * on windows they should be prefixed by OFX_
+ * libofx.h therefore needs to be patched on windows.
+ */
+
+#ifndef OFX_INFO
+#define OFX_INFO INFO
+#endif
+
+#ifndef OFX_WARN
+#define OFX_WARN WARN
+#endif
+
+#ifndef OFX_ERROR
+#define OFX_ERROR ERROR
+#endif
+
+#ifndef OFX_DELETE
+#define OFX_DELETE DELETE
+#endif
+
+#ifndef OFX_REPLACE
+#define OFX_REPLACE REPLACE
+#endif
+
+
/*START_EXTERN*/
/*END_EXTERN*/
@@ -93,14 +121,12 @@ gint message_erreur_operation;
gchar * ofx_filename;
-#ifdef OFX_0_7
LibofxContextPtr ofx_context;
int ofx_proc_status_cb(struct OfxStatusData data, void * status_data);
/* void ofx_proc_security_cb ( LibofxContextPtr, LibofxProcSecurityCallback, void * ); */
int ofx_proc_account_cb(struct OfxAccountData data, void * account_data);
int ofx_proc_transaction_cb(struct OfxTransactionData data, void * security_data);
int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_data);
-#endif /* OFX_0_7 */
/**
@@ -124,20 +150,14 @@ GSList *recuperation_donnees_ofx ( GtkWidget * assistant, struct imported_file *
argv[1] = imported -> name;
devel_print_str ( imported -> name );
-#ifdef OFX_0_7
ofx_context = libofx_get_new_context();
ofx_set_status_cb ( ofx_context, ofx_proc_status_cb, NULL );
/* ofx_set_security_cb ( ofx_context, sofx_proc_security_cb, NULL ); */
ofx_set_account_cb ( ofx_context, ofx_proc_account_cb, NULL );
ofx_set_transaction_cb ( ofx_context, ofx_proc_transaction_cb, NULL );
ofx_set_statement_cb ( ofx_context, ofx_proc_statement_cb, NULL );
-#endif /* OFX_0_7 */
-#ifdef OFX_0_7
libofx_proc_file ( ofx_context, ofx_filename, AUTODETECT );
-#else /* OFX_0_7 */
- ofx_proc_file ( 2, argv ); /* FIXME: handle < 0.7 */
-#endif /* OFX_0_7 */
/* le dernier compte n'a pas été ajouté à la liste */
liste_comptes_importes_ofx = g_slist_append ( liste_comptes_importes_ofx,
@@ -181,11 +201,7 @@ GSList *recuperation_donnees_ofx ( GtkWidget * assistant, struct imported_file *
-#ifdef OFX_0_7
int ofx_proc_status_cb(struct OfxStatusData data, void * status_data)
-#else /* OFX_0_7 */
-int ofx_proc_status_cb(struct OfxStatusData data)
-#endif /* OFX_0_7 */
{
/* printf ( "ofx_proc_status_cb:\n" ); */
/* printf ( "ofx_element_name_valid %d\n", data . ofx_element_name_valid); */
@@ -247,11 +263,7 @@ int ofx_proc_status_cb(struct OfxStatusData data)
/* *******************************************************************************/
-#ifdef OFX_0_7
int ofx_proc_account_cb(struct OfxAccountData data, void * account_data)
-#else /* OFX_0_7 */
-int ofx_proc_account_cb(struct OfxAccountData data)
-#endif /* OFX_0_7 */
{
/* printf ( "ofx_proc_account_cb\n" ); */
/* printf ( "account_id_valid %d\n", data.account_id_valid ); */
@@ -296,11 +308,7 @@ int ofx_proc_account_cb(struct OfxAccountData data)
/* *******************************************************************************/
-#ifdef OFX_0_7
int ofx_proc_transaction_cb(struct OfxTransactionData data, void * security_data)
-#else /* OFX_0_7 */
-int ofx_proc_transaction_cb(struct OfxTransactionData data)
-#endif /* OFX_0_7 */
{
struct struct_ope_importation *ope_import;
GDate *date;
@@ -493,11 +501,7 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data)
/* *******************************************************************************/
-#ifdef OFX_0_7
int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_data)
-#else /* OFX_0_7 */
-int ofx_proc_statement_cb(struct OfxStatementData data)
-#endif /* OFX_0_7 */
{
GDate *date;
diff --git a/src/plugins/ofx/ofx.h b/src/plugins/ofx/ofx.h
index 116f4fd..d08d6b9 100644
--- a/src/plugins/ofx/ofx.h
+++ b/src/plugins/ofx/ofx.h
@@ -12,41 +12,4 @@ G_MODULE_EXPORT extern gpointer ofx_plugin_run ( GtkWidget * assistant,
/* END_DECLARATION */
-/* It seems the following applies to everyone, otherwise OFX_* are not defined */
-/* #ifdef _WIN32 */
-/* On Windows, the Ofx Severity enumerate values are already used in wingdi.h, DELETE is used in winnt.h
- * This is a work around to this issues :
- * INFO, WARN, ERROR, DELETE and REPLACE are used in standard libofx.h;
- * on windows they should be prefixed by OFX_
- */
-
-#ifndef _MINGW
-
-#ifndef OFX_INFO
-#define OFX_INFO INFO
-#endif
-
-#ifndef OFX_WARN
-#define OFX_WARN WARN
-#endif
-
-#ifndef OFX_ERROR
-#if defined(_MSC_VER) || defined(_MINGW)
-#undef ERROR
-#endif /* _MSC_VER */
-#define OFX_ERROR ERROR
-#endif
-
-#ifndef OFX_DELETE
-#define OFX_DELETE DELETE
-#endif
-
-#ifndef OFX_REPLACE
-#define OFX_REPLACE REPLACE
-#endif
-
-#endif /* _MIN_GW */
-
-/* #endif _WIN32 */
-
#endif /* GSB_OFX_H */
diff --git a/src/utils_file_selection.c b/src/utils_file_selection.c
index edc8c2d..a03d074 100644
--- a/src/utils_file_selection.c
+++ b/src/utils_file_selection.c
@@ -33,9 +33,6 @@
* @todo : Set the file independant from "include.h" added as an easy convenient
* way of resolving compilation warnings .
*/
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -154,10 +151,6 @@ gchar* file_selection_get_last_directory(GtkFileChooser* filesel,gboolean ended)
} /* }}} file_selection_get_last_directory */
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
/* Local Variables: */
/* c-basic-offset: 4 */
hooks/post-receive
--
grisbi
More information about the cvs
mailing list