summaryrefslogtreecommitdiff
path: root/src/analysis/disass/disassembler.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-12-09 22:06:59 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-12-09 22:06:59 (GMT)
commitc644db0ad3b1a276f2c3bf9be72026c3581dd35f (patch)
tree6d672db75ff38eb9daf9e600cdba8373f3cc7d7f /src/analysis/disass/disassembler.c
parentc476dae9b50d6ff218e903e3f8d40ad51003fa40 (diff)
Avoided to throw comments too far by defining local columns managers.
Diffstat (limited to 'src/analysis/disass/disassembler.c')
-rw-r--r--src/analysis/disass/disassembler.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index ce2e6ff..c563b2e 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -625,13 +625,20 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con
{
GLangOutput *output; /* Modèle de sortie adéquat */
GBufferLine *line; /* Ligne de destination */
+ bool managed; /* Groupe déjà défini ? */
size_t len; /* Taille du texte */
char *content; /* Contenu textuel d'une ligne */
output = g_asm_output_new();
line = g_lang_output_start_comments(output, buffer);
- if (line != NULL) g_buffer_line_start_merge_at(line, BLC_PHYSICAL);
+ if (line != NULL)
+ {
+ g_buffer_line_start_merge_at(line, BLC_PHYSICAL);
+ g_buffer_line_add_flag(line, BLF_WIDTH_MANAGER);
+ }
+
+ managed = (line != NULL);
/* Introduction */
@@ -639,6 +646,9 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con
SL(_("Disassembly generated by Chrysalide")));
g_buffer_line_start_merge_at(line, BLC_PHYSICAL);
+ if (!managed)
+ g_buffer_line_add_flag(line, BLF_WIDTH_MANAGER);
+
line = g_lang_output_continue_comments(output, buffer,
SL(_("Chrysalide is free software - © 2008-2015 Cyrille Bagard")));
g_buffer_line_start_merge_at(line, BLC_PHYSICAL);