diff options
Diffstat (limited to 'plugins/dwarf/core.c')
-rw-r--r-- | plugins/dwarf/core.c | 65 |
1 files changed, 3 insertions, 62 deletions
diff --git a/plugins/dwarf/core.c b/plugins/dwarf/core.c index 2d95626..bf1e812 100644 --- a/plugins/dwarf/core.c +++ b/plugins/dwarf/core.c @@ -25,7 +25,7 @@ #include <config.h> -#include <plugins/plugin-def.h> +#include <plugins/self.h> #include "format.h" @@ -39,16 +39,12 @@ -DEFINE_CHRYSALIDE_PLUGIN("GDwarfPlugin", "dwarf", "Add support for the DWARF format", "0.1.0", +DEFINE_CHRYSALIDE_PLUGIN("Dwarf", "DWARF format support", + PACKAGE_VERSION, CHRYSALIDE_WEBSITE("doc/formats"), PG_REQ, AL(PGA_PLUGIN_INIT, PGA_FORMAT_ATTACH_DEBUG)); -/* Conservation d'une référence au greffon pour les messages */ -static GPluginModule *_this = NULL; - - - /****************************************************************************** * * * Paramètres : plugin = greffon à manipuler. * @@ -65,8 +61,6 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin) { bool result; /* Bilan à retourner */ - _this = plugin; - result = true; return result; @@ -98,56 +92,3 @@ G_MODULE_EXPORT void chrysalide_plugin_attach_debug(const GPluginModule *plugin, g_exe_format_add_debug_info(format, info); } - - -/****************************************************************************** -* * -* Paramètres : msg = message à faire apparaître à l'écran. * -* * -* Description : Présente dans le journal un message simple. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void log_dwarf_simple_message(LogMessageType type, const char *msg) -{ - g_plugin_module_log_simple_message(_this, type, msg); - -} - - -/****************************************************************************** -* * -* Paramètres : type = espèce du message à ajouter. * -* fmt = format du message à faire apparaître à l'écran. * -* ... = éventuels arguments venant compléter le message. * -* * -* Description : Présente dans le journal un message complexe. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void log_dwarf_variadic_message(LogMessageType type, const char *fmt, ...) -{ - va_list ap; /* Liste d'arguments variable */ - char *buffer; /* Tampon du msg reconstitué */ - - va_start(ap, fmt); - buffer = build_variadic_message(fmt, ap); - va_end(ap); - - if (buffer != NULL) - { - g_plugin_module_log_simple_message(_this, type, buffer); - - free(buffer); - - } - -} |