diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-02 22:39:25 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-02 22:40:18 (GMT) |
commit | de2cb8e2fad4a3031d7b7c2cb189a6dbdaf8d5a9 (patch) | |
tree | eb9b01fc893ace47e0311ebca7511162769c36be /src/analysis/variable.c | |
parent | 4630eb7a2b0b61a4e9ea3a99e7a8cdaba05392cd (diff) |
Extented the types definitions.
Diffstat (limited to 'src/analysis/variable.c')
-rw-r--r-- | src/analysis/variable.c | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/src/analysis/variable.c b/src/analysis/variable.c index b983b73..9fb2e81 100644 --- a/src/analysis/variable.c +++ b/src/analysis/variable.c @@ -25,6 +25,7 @@ #include <malloc.h> +#include <stdint.h> #include <string.h> @@ -273,8 +274,8 @@ void g_binary_variable_set_owner(GBinVariable *var, GDataType *owner) /****************************************************************************** * * -* Paramètres : var = variable à convertir. * -* simple = indique si l'espace de noms doit être exclus ou non.* +* Paramètres : var = variable à convertir. * +* include = doit-on inclure les espaces de noms ? * * * * Description : Décrit la variable donnée sous forme de caractères. * * * @@ -284,18 +285,15 @@ void g_binary_variable_set_owner(GBinVariable *var, GDataType *owner) * * ******************************************************************************/ -char *g_binary_variable_to_string(const GBinVariable *var, bool simple) +char *g_binary_variable_to_string(const GBinVariable *var, bool include) { char *result; /* Valeur à retourner */ - /* FIXME : décompilation sans type ! */ - result = _g_data_type_to_string(var->type, simple); - - //result = strdup(""); + result = g_data_type_to_string(var->type, include); if (var->name != NULL) { - if (!g_data_type_is_pointer(var->type, true) /* FIXME */ && strlen(result) > 0 /* FIXME */) + if (!(g_data_type_is_pointer(var->type) || g_data_type_is_reference(var->type))) result = stradd(result, " "); result = stradd(result, var->name); @@ -307,39 +305,6 @@ char *g_binary_variable_to_string(const GBinVariable *var, bool simple) } -/****************************************************************************** -* * -* Paramètres : var = variable à afficher. * -* lang = langage à utiliser pour la sortie humaine. * -* buffer = tampon mis à disposition pour la sortie. * -* info = nature du cadre de destination. * -* full = besoin de descriptions étendues ? * -* * -* Description : Procède à l'impression de la description d'une variable. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ -#if 0 -void g_binary_variable_output(const GBinVariable *var, GLangOutput *lang, GBufferLine *line, bool info, bool full) -{ - g_data_type_output(var->type, lang, line, info, full); - - if (var->name != NULL) - { - if (!g_data_type_is_pointer(var->type, true)) - g_buffer_line_append_text(line, BLC_LAST_USED, " ", 1, RTT_COMMENT, NULL); - - g_buffer_line_append_text(line, BLC_LAST_USED, var->name, strlen(var->name), RTT_COMMENT, NULL); - - } - -} -#endif - - /* ---------------------------------------------------------------------------------- */ /* BASE DE VARIABLES OU VARIABLES INCONNUES */ |