summaryrefslogtreecommitdiff
path: root/src/analysis/types/basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/types/basic.c')
-rw-r--r--src/analysis/types/basic.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/analysis/types/basic.c b/src/analysis/types/basic.c
index 436b04e..f8b3100 100644
--- a/src/analysis/types/basic.c
+++ b/src/analysis/types/basic.c
@@ -24,6 +24,7 @@
#include "basic.h"
+#include <malloc.h>
#include <string.h>
@@ -60,6 +61,9 @@ static GDataType *g_basic_type_dup(const GBasicType *);
/* Décrit le type fourni sous forme de caractères. */
static char *g_basic_type_to_string(const GBasicType *);
+/* Procède à l'impression de la description d'un type. */
+static void g_basic_type_output(const GBasicType *, GLangOutput *, GBufferLine *, bool, bool);
+
/* Indique le type défini pour un type basique. */
@@ -104,6 +108,7 @@ static void g_basic_type_init(GBasicType *type)
data_type->dup = (type_dup_fc)g_basic_type_dup;
data_type->to_string = (type_to_string_fc)g_basic_type_to_string;
+ data_type->output = (output_type_fc)g_basic_type_output;
}
@@ -292,6 +297,37 @@ static char *g_basic_type_to_string(const GBasicType *type)
/******************************************************************************
* *
+* Paramètres : type = type à 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'un type. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_basic_type_output(const GBasicType *type, GLangOutput *lang, GBufferLine *line, bool info, bool full)
+{
+ char *text; /* Version humaine à imprimer */
+ size_t len; /* Taille de cette version */
+
+ text = g_basic_type_to_string(type);
+ len = strlen(text);
+
+ g_buffer_line_insert_text(line, BLC_LAST_USED, text, len, info ? RTT_COMMENT : RTT_RAW);
+
+ free(text);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : type = type à consulter. *
* *
* Description : Fournit le type de base géré par le type. *