From d5e55f2ad015781bd7bee0e3216e47d6218e0841 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sun, 28 Mar 2010 16:37:00 +0000 Subject: Made the g_rendering_options_new() function simple. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@145 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 9 +++++++++ src/analysis/binary.c | 2 +- src/analysis/roptions.c | 5 ++--- src/analysis/roptions.h | 2 +- src/dialogs/export.c | 5 +---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index abdd3d5..e6a92f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +10-03-28 Cyrille Bagard + + * src/analysis/binary.c: + * src/analysis/roptions.c: + * src/analysis/roptions.h: + * src/dialogs/export.c: + Remove the second argument of the g_rendering_options_new() function + as it can be guessed from the first one. + 10-03-21 Cyrille Bagard * src/analysis/exporter.c: diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 2b392bd..66cc26d 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -738,7 +738,7 @@ GOpenidaBinary *g_openida_binary_new_from_file(const char *filename) result->proc = get_arch_processor_from_format(result->format); - result->options = g_rendering_options_new(result->format, result->proc); + result->options = g_rendering_options_new(result->format); g_rendering_options_show_address(result->options, MRD_BLOCK, true); g_rendering_options_show_code(result->options, MRD_BLOCK, true); diff --git a/src/analysis/roptions.c b/src/analysis/roptions.c index 6aa4262..be7e1e9 100644 --- a/src/analysis/roptions.c +++ b/src/analysis/roptions.c @@ -97,7 +97,6 @@ static void g_rendering_options_init(GRenderingOptions *options) /****************************************************************************** * * * Paramètres : format = format du contenu binaire. * -* proc = architecture utilisée par le binaire. * * * * Description : Crée un un groupe d'options pour le rendu des lignes. * * * @@ -107,14 +106,14 @@ static void g_rendering_options_init(GRenderingOptions *options) * * ******************************************************************************/ -GRenderingOptions *g_rendering_options_new(GExeFormat *format, GArchProcessor *proc) +GRenderingOptions *g_rendering_options_new(GExeFormat *format) { GRenderingOptions *result; /* Structure à retourner */ result = g_object_new(G_TYPE_RENDERING_OPTIONS, NULL); result->format = format; - result->proc = proc; + result->proc = get_arch_processor_from_format(format); return result; diff --git a/src/analysis/roptions.h b/src/analysis/roptions.h index d2fbe0b..392d740 100644 --- a/src/analysis/roptions.h +++ b/src/analysis/roptions.h @@ -75,7 +75,7 @@ typedef struct _GRenderingOptionsClass GRenderingOptionsClass; GType g_rendering_options_get_type(void); /* Crée un un groupe d'options pour le rendu des lignes. */ -GRenderingOptions *g_rendering_options_new(GExeFormat *, GArchProcessor *); +GRenderingOptions *g_rendering_options_new(GExeFormat *); /* Fournit le format du contenu binaire représenté. */ GExeFormat *g_rendering_options_get_format(const GRenderingOptions *); diff --git a/src/dialogs/export.c b/src/dialogs/export.c index 3c97815..69841f3 100644 --- a/src/dialogs/export.c +++ b/src/dialogs/export.c @@ -204,7 +204,6 @@ static void export_assistant_close(GtkAssistant *assistant, GObject *ref) { GOpenidaBinary *binary; /* Binaire chargé à parcourir */ GExeFormat *format; /* Format du binaire */ - GArchProcessor *proc; /* Architecture visée */ GRenderingOptions *options; /* Options d'exportation */ GtkToggleButton *checkbutton; /* Coche à retrouver */ gboolean state; /* Valeur à prendre en compte */ @@ -216,9 +215,7 @@ static void export_assistant_close(GtkAssistant *assistant, GObject *ref) binary = G_OPENIDA_BINARY(g_object_get_data(ref, "binary")); format = g_openida_binary_get_format(binary); - proc = get_arch_processor_from_format(format); - - options = g_rendering_options_new(format, proc); + options = g_rendering_options_new(format); /* Eléments à afficher */ -- cgit v0.11.2-87-g4458