summaryrefslogtreecommitdiff
path: root/src/analysis/variable.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-10-16 16:03:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-10-16 16:03:28 (GMT)
commit6f9563a0184e36fab8d0c2c38d151827784e331e (patch)
tree2d0e13667bc9efcc0f26c17572c9d38dabd89db7 /src/analysis/variable.c
parentc7a14e50bd002e3922969e9bae7816753aefb073 (diff)
Properly output routines documentation.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@268 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/variable.c')
-rw-r--r--src/analysis/variable.c35
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);
+
+ }
+
+}
+