summaryrefslogtreecommitdiff
path: root/src/analysis/decomp/decompiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/decomp/decompiler.c')
-rw-r--r--src/analysis/decomp/decompiler.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c
index c446c0e..de1b6d2 100644
--- a/src/analysis/decomp/decompiler.c
+++ b/src/analysis/decomp/decompiler.c
@@ -1,6 +1,6 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
- * decompiler.h - prototypes pour l'encadrement des phases de décompilation
+ * decompiler.c - encadrement des phases de décompilation
*
* Copyright (C) 2010 Cyrille Bagard
*
@@ -68,17 +68,20 @@ static void build_decomp_prologue(GCodeBuffer *buffer, const char *filename)
output = g_java_output_new();
+ line = g_lang_output_start_comments(output, buffer);
+ if (line != NULL) g_buffer_line_start_merge_at(line, BLC_ADDRESS);
+
/* Introduction */
- line = g_lang_output_write_comments(output, buffer,
- SL(_("Binary data decompiled by OpenIDA")));
+ line = g_lang_output_continue_comments(output, buffer,
+ SL(_("Binary data decompiled by OpenIDA")));
g_buffer_line_start_merge_at(line, BLC_ADDRESS);
- line = g_lang_output_write_comments(output, buffer,
- SL(_("OpenIDA is free software - © 2008-2010 Cyrille Bagard")));
+ line = g_lang_output_continue_comments(output, buffer,
+ SL(_("OpenIDA is free software - © 2008-2010 Cyrille Bagard")));
g_buffer_line_start_merge_at(line, BLC_ADDRESS);
- line = g_lang_output_write_comments(output, buffer, NULL, 0);
+ line = g_lang_output_continue_comments(output, buffer, NULL, 0);
g_buffer_line_start_merge_at(line, BLC_ADDRESS);
/* Fichier */
@@ -91,18 +94,22 @@ static void build_decomp_prologue(GCodeBuffer *buffer, const char *filename)
snprintf(content, len, "%s%s", _("File: "), filename);
- line = g_lang_output_write_comments(output, buffer, content, len - 1);
+ line = g_lang_output_continue_comments(output, buffer, content, len - 1);
g_buffer_line_start_merge_at(line, BLC_ADDRESS);
free(content);
- /* Lignes de séparation */
+ /* Ligne de séparation */
- line = g_lang_output_write_comments(output, buffer, NULL, 0);
+ line = g_lang_output_continue_comments(output, buffer, NULL, 0);
g_buffer_line_start_merge_at(line, BLC_ADDRESS);
- line = g_lang_output_write_comments(output, buffer, NULL, 0);
- g_buffer_line_start_merge_at(line, BLC_ADDRESS);
+ /* Conclusion */
+
+ line = g_lang_output_end_comments(output, buffer);
+ if (line != NULL) g_buffer_line_start_merge_at(line, BLC_ADDRESS);
+
+ g_object_unref(G_OBJECT(output));
}