[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_99-16-g703108a

Rémi Cardona nobody at users.sourceforge.net
Sat Jan 29 12:18:55 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  703108a2eba99102bc14d9b3e43f936f9c569f94 (commit)
       via  67401c58d7393e6526562e5853191abf4cbf8321 (commit)
       via  f543fdeda0138cec6fa499a9eed865be0ca34e2a (commit)
       via  f728e9a04e4c9d6c97c94c96bacbb668c669ef92 (commit)
       via  507d12133e6eb46db0022bc3702bc1cca815e3b8 (commit)
      from  bfbce890320ec6e00335d18fe1943e3ef4686ba2 (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 703108a2eba99102bc14d9b3e43f936f9c569f94
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Jan 29 10:47:58 2011 +0100

    plugins: fix type mismatches with run functions
    
    Note that the change in gsb_plugins.h is intentional as all the run
    functions have different parameters, so 'void' cannot be used.

commit 67401c58d7393e6526562e5853191abf4cbf8321
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Jan 29 10:38:05 2011 +0100

    plugins: fix type mismatches with register functions

commit f543fdeda0138cec6fa499a9eed865be0ca34e2a
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Jan 29 10:29:07 2011 +0100

    plugins: remove useless release mechanism
    
    None of the plugins actually do anything in their release functions, let's
    just remove this useless code. It can easily be brought back later on
    if needed, in a much simpler way.

commit f728e9a04e4c9d6c97c94c96bacbb668c669ef92
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Jan 29 10:31:27 2011 +0100

    gnucash: remove useless extern declaration
    
    It's only used in recuperation_donnees_gnucash_compte() where it is
    _also_ redefined...

commit 507d12133e6eb46db0022bc3702bc1cca815e3b8
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sat Jan 29 10:31:47 2011 +0100

    update .gitignore

-----------------------------------------------------------------------

Changes:
diff --git a/.gitignore b/.gitignore
index c7376db..1c80f68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ m4
 gisbi.anjuta
 TODO*
 doxygen/
+*.o
diff --git a/src/erreur.c b/src/erreur.c
index bb902a2..e274d01 100644
--- a/src/erreur.c
+++ b/src/erreur.c
@@ -170,8 +170,6 @@ void traitement_sigsegv ( gint signal_nb )
 
     gsb_file_util_modify_lock ( FALSE );
 
-    gsb_plugins_release ( );
-
     exit(1);
 }
 
diff --git a/src/gsb_plugins.c b/src/gsb_plugins.c
index e2c0a9f..ae086f1 100644
--- a/src/gsb_plugins.c
+++ b/src/gsb_plugins.c
@@ -121,19 +121,6 @@ void gsb_plugins_scan_dir ( const char *dirname )
 	}
 	g_free ( tmp );
 
-	tmp = g_strconcat ( plugin_name, "_plugin_release", NULL );
-	if ( ! g_module_symbol ( plugin -> handle, tmp,
-				 (gpointer) &( plugin -> plugin_release ) ) )
-	{
-	    gchar* tmpstr = g_strdup_printf ( "Plugin %s has no release symbol", 
-					       filename );
-	    dialogue_error ( tmpstr );
-	    g_free ( tmpstr );
-	    g_free ( plugin );
-	    continue;
-	}
-	g_free ( tmp );
-
 	plugins = g_slist_append ( plugins, plugin );
     }
 
@@ -206,27 +193,6 @@ gchar * gsb_plugin_get_list ()
 
 
 
-/**
- *
- *
- *
- */
-void gsb_plugins_release ( )
-{
-    GSList * tmp = plugins;
-
-    while ( tmp )
-    {
-	gsb_plugin * plugin = (gsb_plugin *) tmp -> data;
-
-	plugin -> plugin_release ();
-
-	tmp = tmp -> next;
-    }        
-}
-
-
-
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/gsb_plugins.h b/src/gsb_plugins.h
index 4c80108..aa5498b 100644
--- a/src/gsb_plugins.h
+++ b/src/gsb_plugins.h
@@ -8,9 +8,8 @@
 
 typedef struct gsb_plugin {
     gchar * name;
-    gboolean (* plugin_register) ( void );
-    gboolean (* plugin_release) ( void );
-    gpointer (* plugin_run) ( void );
+    void (* plugin_register) ( void );
+    gpointer (* plugin_run) ( );
     GModule * handle;
 }  gsb_plugin;
 
@@ -18,7 +17,6 @@ typedef struct gsb_plugin {
 /* START_DECLARATION */
 gsb_plugin * gsb_plugin_find ( gchar * plugin_name );
 gchar * gsb_plugin_get_list ();
-void gsb_plugins_release ( );
 void gsb_plugins_scan_dir ( const char *dirname );
 /* END_DECLARATION */
 
diff --git a/src/gsb_plugins_static.c b/src/gsb_plugins_static.c
index 4f1fcaa..1afdaa4 100644
--- a/src/gsb_plugins_static.c
+++ b/src/gsb_plugins_static.c
@@ -52,7 +52,6 @@ void gsb_plugins_scan_dir ( const char *dirname )
     plugin -> name = "gnucash";
     plugin -> plugin_register = &gnucash_plugin_register;
     plugin -> plugin_run =      &gnucash_plugin_run;
-    plugin -> plugin_release =  &gnucash_plugin_release;
     plugin -> plugin_register ();
     plugins = g_slist_append ( plugins, plugin );
 
@@ -60,7 +59,6 @@ void gsb_plugins_scan_dir ( const char *dirname )
     plugin -> name = "ofx";
     plugin -> plugin_register = &ofx_plugin_register;
     plugin -> plugin_run =      &ofx_plugin_run;
-    plugin -> plugin_release =  &ofx_plugin_release;
     plugin -> plugin_register ();
     plugins = g_slist_append ( plugins, plugin );
 
@@ -68,7 +66,6 @@ void gsb_plugins_scan_dir ( const char *dirname )
     plugin -> name = "openssl";
     plugin -> plugin_register = &openssl_plugin_register;
     plugin -> plugin_run =      &openssl_plugin_run;
-    plugin -> plugin_release =  &openssl_plugin_release;
     plugin -> plugin_register ();
     plugins = g_slist_append ( plugins, plugin );
 }
@@ -139,27 +136,6 @@ gchar * gsb_plugin_get_list ()
 
 
 
-/**
- *
- *
- *
- */
-void gsb_plugins_release ( )
-{
-    GSList * tmp = plugins;
-
-    while ( tmp )
-    {
-	gsb_plugin * plugin = (gsb_plugin *) tmp -> data;
-
-	plugin -> plugin_release ();
-
-	tmp = tmp -> next;
-    }        
-}
-
-
-
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/main.c b/src/main.c
index 1dbaa5f..0c9b34e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -203,8 +203,6 @@ void main_linux ( int argc, char **argv )
 
     gtk_main ();
 
-    gsb_plugins_release ( );
-
     /* sauvegarde les raccourcis claviers */
     gtk_accel_map_save ( C_PATH_CONFIG_ACCELS );
 }
diff --git a/src/plugins/gnucash/gnucash.c b/src/plugins/gnucash/gnucash.c
index ef251cc..285a88e 100644
--- a/src/plugins/gnucash/gnucash.c
+++ b/src/plugins/gnucash/gnucash.c
@@ -35,7 +35,6 @@
 /*END_INCLUDE*/
 
 /*START_EXTERN*/
-extern gsb_real null_real;
 /*END_EXTERN*/
 
 /*START_STATIC*/
@@ -83,7 +82,7 @@ G_MODULE_EXPORT const gchar plugin_name[] = "gnucash";
 
 
 /** Initialization function. */
-G_MODULE_EXPORT extern void gnucash_plugin_register ()
+G_MODULE_EXPORT extern void gnucash_plugin_register ( void )
 {
     devel_debug ("Initializating gnucash plugin");
 
@@ -93,21 +92,13 @@ G_MODULE_EXPORT extern void gnucash_plugin_register ()
 
 
 /** Main function of module. */
-G_MODULE_EXPORT extern gint gnucash_plugin_run ( gchar * file_name, gchar **file_content,
-					  gboolean crypt, gulong length )
+G_MODULE_EXPORT extern gpointer gnucash_plugin_run ( void )
 {
-    return FALSE;
+    return NULL;
 }
 
 
 
-/** Release plugin  */
-G_MODULE_EXPORT extern gboolean gnucash_plugin_release ( )
-{
-    return TRUE;
-}
-
-
 /*****************************************************************/
 
 /* Structures */
diff --git a/src/plugins/gnucash/gnucash.h b/src/plugins/gnucash/gnucash.h
index aa28937..baabdd7 100644
--- a/src/plugins/gnucash/gnucash.h
+++ b/src/plugins/gnucash/gnucash.h
@@ -5,10 +5,8 @@
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-G_MODULE_EXPORT extern void gnucash_plugin_register ();
-G_MODULE_EXPORT extern gboolean gnucash_plugin_release ( );
-G_MODULE_EXPORT extern gint gnucash_plugin_run ( gchar * file_name, gchar **file_content,
-					  gboolean crypt, gulong length );
+G_MODULE_EXPORT extern void gnucash_plugin_register ( void );
+G_MODULE_EXPORT extern gpointer gnucash_plugin_run ( void );
 /* END_DECLARATION */
 
 #endif
diff --git a/src/plugins/ofx/ofx.c b/src/plugins/ofx/ofx.c
index cd07684..71d30f6 100644
--- a/src/plugins/ofx/ofx.c
+++ b/src/plugins/ofx/ofx.c
@@ -60,7 +60,7 @@ G_MODULE_EXPORT const gchar plugin_name[] = "ofx";
 
 
 /** Initialization function. */
-G_MODULE_EXPORT extern void ofx_plugin_register ()
+G_MODULE_EXPORT extern void ofx_plugin_register ( void )
 {
     devel_debug ("Initializating ofx plugin");
     register_import_format ( &ofx_format );
@@ -69,7 +69,7 @@ G_MODULE_EXPORT extern void ofx_plugin_register ()
 
 
 /** Main function of module. */
-G_MODULE_EXPORT extern GSList * ofx_plugin_run ( GtkWidget * assistant, 
+G_MODULE_EXPORT extern gpointer ofx_plugin_run ( GtkWidget * assistant,
 				    struct imported_file * imported )
 {
     return recuperation_donnees_ofx ( assistant, imported );
@@ -77,14 +77,6 @@ G_MODULE_EXPORT extern GSList * ofx_plugin_run ( GtkWidget * assistant,
 
 
 
-/** Release plugin  */
-G_MODULE_EXPORT extern gboolean ofx_plugin_release ( )
-{
-	return TRUE;
-}
-
-
-
 /* on doit mettre le compte en cours d'importation en global pour que
  * la libofx puisse le traiter de plus un fichier ofx peut intégrer
  * plusieurs comptes, donc on crée une liste... */
diff --git a/src/plugins/ofx/ofx.h b/src/plugins/ofx/ofx.h
index 20751c8..61ad5ff 100644
--- a/src/plugins/ofx/ofx.h
+++ b/src/plugins/ofx/ofx.h
@@ -6,9 +6,8 @@
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-G_MODULE_EXPORT extern void ofx_plugin_register ();
-G_MODULE_EXPORT extern gboolean ofx_plugin_release ( );
-G_MODULE_EXPORT extern GSList * ofx_plugin_run ( GtkWidget * assistant,
+G_MODULE_EXPORT extern void ofx_plugin_register ( void );
+G_MODULE_EXPORT extern gpointer ofx_plugin_run ( GtkWidget * assistant,
 				    struct imported_file * imported );
 /* END_DECLARATION */
 
diff --git a/src/plugins/openssl/openssl.c b/src/plugins/openssl/openssl.c
index 8ef3f90..8897638 100644
--- a/src/plugins/openssl/openssl.c
+++ b/src/plugins/openssl/openssl.c
@@ -321,7 +321,7 @@ G_MODULE_EXPORT const gchar plugin_name[] = "openssl";
 
 
 /** Initialization function. */
-G_MODULE_EXPORT extern void openssl_plugin_register ()
+G_MODULE_EXPORT extern void openssl_plugin_register ( void )
 {
     devel_debug ("Initializating openssl plugin");
     crypt_key = NULL;
@@ -330,18 +330,13 @@ G_MODULE_EXPORT extern void openssl_plugin_register ()
 
 
 /** Main function of module. */
-G_MODULE_EXPORT extern gint openssl_plugin_run ( gchar * file_name, gchar **file_content,
+G_MODULE_EXPORT extern gpointer openssl_plugin_run ( gchar * file_name, gchar **file_content,
                         gboolean crypt, gulong length )
 {
-    return gsb_file_util_crypt_file ( file_name, file_content, crypt, length );
-}
-
-
-
-/** Release plugin  */
-G_MODULE_EXPORT extern gboolean openssl_plugin_release ( )
-{
-    return TRUE;
+    /* The final size is cast from a gulong to a gpointer. This is 'ok' because
+     * a gpointer is always the same size. It is quite ugly though, and a proper
+     * fix should be found for this. */
+    return (gpointer) gsb_file_util_crypt_file ( file_name, file_content, crypt, length );
 }
 
 
diff --git a/src/plugins/openssl/openssl.h b/src/plugins/openssl/openssl.h
index 02b48ad..807f41e 100644
--- a/src/plugins/openssl/openssl.h
+++ b/src/plugins/openssl/openssl.h
@@ -13,9 +13,8 @@
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-G_MODULE_EXPORT extern void openssl_plugin_register ();
-G_MODULE_EXPORT extern gboolean openssl_plugin_release ( );
-G_MODULE_EXPORT extern gint openssl_plugin_run ( gchar * file_name, gchar **file_content,
+G_MODULE_EXPORT extern void openssl_plugin_register ( void );
+G_MODULE_EXPORT extern gpointer openssl_plugin_run ( gchar * file_name, gchar **file_content,
 					  gboolean crypt, gulong length );
 /* END_DECLARATION */
 


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list