summaryrefslogtreecommitdiff
path: root/src/analysis/roptions.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-19 23:16:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-19 23:16:29 (GMT)
commit5093663eb4e4aa17edd97cbd864ccb4a3d48a803 (patch)
tree48192ae6b37e1803d78ed81f5658ad9d2756cfd1 /src/analysis/roptions.c
parent12abead3f60d6f72c0d41672af87215dfc13c8fc (diff)
Given their own structure to rendering options.
Diffstat (limited to 'src/analysis/roptions.c')
-rw-r--r--src/analysis/roptions.c238
1 files changed, 0 insertions, 238 deletions
diff --git a/src/analysis/roptions.c b/src/analysis/roptions.c
deleted file mode 100644
index b9e4b96..0000000
--- a/src/analysis/roptions.c
+++ /dev/null
@@ -1,238 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * roptions.c - options de rendus des lignes de code
- *
- * Copyright (C) 2009-2017 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * Chrysalide is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * Chrysalide is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Chrysalide. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "roptions.h"
-
-
-
-/* Options de représentation (instance) */
-struct _GRenderingOptions
-{
- GExeFormat *format; /* Format du contenu bianire */
- GArchProcessor *proc; /* Architecture utilisée */
-
- bool show_address[MRD_COUNT]; /* Affichage de l'adresse ? */
- bool show_code[MRD_COUNT]; /* Affichage du code brut ? */
-
-};
-
-/* Options de représentation (classe) */
-struct _GRenderingOptionsClass
-{
- GObjectClass parent; /* A laisser en premier */
-
-};
-
-
-/* Initialise la classe des options pour le rendu des lignes. */
-static void g_rendering_options_class_init(GRenderingOptionsClass *);
-
-/* Initialise une instance d'options pour le rendu des lignes. */
-static void g_rendering_options_init(GRenderingOptions *);
-
-
-
-/* Indique le type définit pour une ligne de représentation. */
-G_DEFINE_TYPE(GRenderingOptions, g_rendering_options, G_TYPE_OBJECT);
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des options pour le rendu des lignes. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_rendering_options_class_init(GRenderingOptionsClass *klass)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = instance à initialiser. *
-* *
-* Description : Initialise une instance d'options pour le rendu des lignes. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_rendering_options_init(GRenderingOptions *options)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : format = format du contenu binaire. *
-* *
-* Description : Crée un un groupe d'options pour le rendu des lignes. *
-* *
-* Retour : Adresse de la structure mise en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-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 = NULL;//get_arch_processor_from_format(format);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = options à consulter. *
-* *
-* Description : Fournit le format du contenu binaire représenté. *
-* *
-* Retour : Format du contenu binaire. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GExeFormat *g_rendering_options_get_format(const GRenderingOptions *options)
-{
- return options->format;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = options à consulter. *
-* *
-* Description : Fournit l'architecture du contenu binaire représenté. *
-* *
-* Retour : Architecture utilisée par le binaire. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchProcessor *g_rendering_options_get_processor(const GRenderingOptions *options)
-{
- return options->proc;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = options à mettre à jour. *
-* rendering = type de rendu impliqué. *
-* state = nouvel état de l'option visée. *
-* *
-* Description : Affiche (ou non) les adresses des instructions. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_rendering_options_show_address(GRenderingOptions *options, MainRendering rendering, bool state)
-{
- options->show_address[rendering] = state;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = options à consulter. *
-* rendering = type de rendu impliqué. *
-* *
-* Description : Indique si les adresses des instructions sont à afficher. *
-* *
-* Retour : Etat courant de l'option visée. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool g_rendering_options_has_to_show_address(const GRenderingOptions *options, MainRendering rendering)
-{
- return options->show_address[rendering];
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = options à mettre à jour. *
-* rendering = type de rendu impliqué. *
-* state = nouvel état de l'option visée. *
-* *
-* Description : Affiche (ou non) le code des instructions. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_rendering_options_show_code(GRenderingOptions *options, MainRendering rendering, bool state)
-{
- options->show_code[rendering] = state;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : options = options à consulter. *
-* rendering = type de rendu impliqué. *
-* *
-* Description : Indique si le code des instructions est à afficher. *
-* *
-* Retour : Etat courant de l'option visée. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool g_rendering_options_has_to_show_code(const GRenderingOptions *options, MainRendering rendering)
-{
- return options->show_code[rendering];
-
-}