diff options
Diffstat (limited to 'src/analysis/variable.c')
-rw-r--r-- | src/analysis/variable.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/analysis/variable.c b/src/analysis/variable.c index 7ecf793..6a7c145 100644 --- a/src/analysis/variable.c +++ b/src/analysis/variable.c @@ -253,12 +253,12 @@ char *g_binary_variable_to_string(const GBinVariable *var, bool simple) { char *result; /* Valeur à retourner */ - result = strdup(""); /* FIXME : arg _g_data_type_to_string(var->type, simple);*/ + result = _g_data_type_to_string(var->type, simple); if (var->name != NULL) { if (!g_data_type_is_pointer(var->type, true)) - /*result = stradd(result, " ")*/; + result = stradd(result, " "); result = stradd(result, var->name); @@ -269,6 +269,37 @@ 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 : - * +* * +******************************************************************************/ + +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_insert_text(line, BLC_LAST_USED, " ", 1, RTT_COMMENT); + + g_buffer_line_insert_text(line, BLC_LAST_USED, var->name, strlen(var->name), RTT_COMMENT); + + } + +} + |