summaryrefslogtreecommitdiff
path: root/src/glibext
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext')
-rw-r--r--src/glibext/bufferline.c40
-rw-r--r--src/glibext/bufferline.h7
-rw-r--r--src/glibext/gbinportion.c5
-rw-r--r--src/glibext/generators/hex.c2
-rw-r--r--src/glibext/generators/rborder.c5
5 files changed, 20 insertions, 39 deletions
diff --git a/src/glibext/bufferline.c b/src/glibext/bufferline.c
index 2f694dd..ba25b8f 100644
--- a/src/glibext/bufferline.c
+++ b/src/glibext/bufferline.c
@@ -288,6 +288,7 @@ const mrange_t *g_buffer_line_get_range(const GBufferLine *line)
/******************************************************************************
* *
* Paramètres : line = ligne à venir compléter. *
+* col = indice de la colonne à constituer. *
* size = taille souhaitée de l'impression des positions. *
* addr = localisation physique à venir représenter. *
* *
@@ -299,7 +300,7 @@ const mrange_t *g_buffer_line_get_range(const GBufferLine *line)
* *
******************************************************************************/
-void g_buffer_line_fill_phys(GBufferLine *line, MemoryDataSize size, const vmpa2t *addr)
+void g_buffer_line_fill_phys(GBufferLine *line, size_t col, MemoryDataSize size, const vmpa2t *addr)
{
VMPA_BUFFER(position); /* Emplacement au format texte */
size_t len; /* Taille de l'élément inséré */
@@ -314,9 +315,9 @@ void g_buffer_line_fill_phys(GBufferLine *line, MemoryDataSize size, const vmpa2
i = len - 1;
if (i > 0)
- g_buffer_line_append_text(line, BLC_PHYSICAL, position, i, RTT_PHYS_ADDR_PAD, NULL);
+ g_buffer_line_append_text(line, col, position, i, RTT_PHYS_ADDR_PAD, NULL);
- g_buffer_line_append_text(line, BLC_PHYSICAL, &position[i], len - i, RTT_PHYS_ADDR, NULL);
+ g_buffer_line_append_text(line, col, &position[i], len - i, RTT_PHYS_ADDR, NULL);
}
@@ -324,6 +325,7 @@ void g_buffer_line_fill_phys(GBufferLine *line, MemoryDataSize size, const vmpa2
/******************************************************************************
* *
* Paramètres : line = ligne à venir compléter. *
+* col = indice de la colonne à constituer. *
* size = taille souhaitée de l'impression des positions. *
* addr = localisation virtuelle à venir représenter. *
* *
@@ -335,7 +337,7 @@ void g_buffer_line_fill_phys(GBufferLine *line, MemoryDataSize size, const vmpa2
* *
******************************************************************************/
-void g_buffer_line_fill_virt(GBufferLine *line, MemoryDataSize size, const vmpa2t *addr)
+void g_buffer_line_fill_virt(GBufferLine *line, size_t col, MemoryDataSize size, const vmpa2t *addr)
{
VMPA_BUFFER(position); /* Emplacement au format texte */
size_t len; /* Taille de l'élément inséré */
@@ -352,38 +354,14 @@ void g_buffer_line_fill_virt(GBufferLine *line, MemoryDataSize size, const vmpa2
i = len - 1;
if (i > 0)
- g_buffer_line_append_text(line, BLC_VIRTUAL, position, i, RTT_VIRT_ADDR_PAD, NULL);
+ g_buffer_line_append_text(line, col, position, i, RTT_VIRT_ADDR_PAD, NULL);
- g_buffer_line_append_text(line, BLC_VIRTUAL, &position[i], len - i, RTT_VIRT_ADDR, NULL);
+ g_buffer_line_append_text(line, col, &position[i], len - i, RTT_VIRT_ADDR, NULL);
}
else
- g_buffer_line_append_text(line, BLC_VIRTUAL, position, len, RTT_VIRT_ADDR_PAD, NULL);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : line = ligne à venir compléter. *
-* addr = localisation à afficher. *
-* psize = taille souhaitée de l'impression des positions. *
-* vsize = taille souhaitée de l'impression des adresses. *
-* *
-* Description : Construit le tronc commun d'une ligne autour de sa position. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_buffer_line_fill_vmpa(GBufferLine *line, const vmpa2t *addr, MemoryDataSize psize, MemoryDataSize vsize)
-{
- g_buffer_line_fill_phys(line, psize, addr);
-
- g_buffer_line_fill_virt(line, vsize, addr);
+ g_buffer_line_append_text(line, col, position, len, RTT_VIRT_ADDR_PAD, NULL);
}
diff --git a/src/glibext/bufferline.h b/src/glibext/bufferline.h
index a7982d0..cfb4432 100644
--- a/src/glibext/bufferline.h
+++ b/src/glibext/bufferline.h
@@ -110,13 +110,10 @@ GBufferLine *g_buffer_line_new(const mrange_t *, BufferLineColumn);
const mrange_t *g_buffer_line_get_range(const GBufferLine *);
/* Construit le tronc commun d'une ligne autour de sa position. */
-void g_buffer_line_fill_phys(GBufferLine *, MemoryDataSize, const vmpa2t *);
+void g_buffer_line_fill_phys(GBufferLine *, size_t, MemoryDataSize, const vmpa2t *);
/* Construit le tronc commun d'une ligne autour de sa position. */
-void g_buffer_line_fill_virt(GBufferLine *, MemoryDataSize, const vmpa2t *);
-
-/* Construit le tronc commun d'une ligne autour de sa position. */
-void g_buffer_line_fill_vmpa(GBufferLine *, const vmpa2t *, MemoryDataSize, MemoryDataSize);
+void g_buffer_line_fill_virt(GBufferLine *, size_t, MemoryDataSize, const vmpa2t *);
/* Construit le tronc commun d'une ligne autour de son contenu. */
void g_buffer_line_fill_content(GBufferLine *, const GBinContent *, const mrange_t *, phys_t);
diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c
index 44053f9..670e0ec 100644
--- a/src/glibext/gbinportion.c
+++ b/src/glibext/gbinportion.c
@@ -40,6 +40,7 @@
#include "../common/sort.h"
#include "../glibext/gbinarycursor.h"
#include "../glibext/linegen-int.h"
+#include "../gtkext/gtkblockdisplay.h"
@@ -1121,7 +1122,9 @@ static void g_binary_portion_print(GBinPortion *portion, GBufferLine *line, size
{
assert(repeat < portion->lcount);
- g_buffer_line_fill_vmpa(line, get_mrange_addr(&portion->range), MDS_32_BITS_UNSIGNED, MDS_32_BITS_UNSIGNED);
+ g_buffer_line_fill_phys(line, DLC_PHYSICAL, MDS_32_BITS_UNSIGNED, get_mrange_addr(&portion->range));
+
+ g_buffer_line_fill_virt(line, DLC_VIRTUAL, MDS_32_BITS_UNSIGNED, get_mrange_addr(&portion->range));
if (portion->text[repeat] != NULL)
{
diff --git a/src/glibext/generators/hex.c b/src/glibext/generators/hex.c
index f08d3fb..9285e00 100644
--- a/src/glibext/generators/hex.c
+++ b/src/glibext/generators/hex.c
@@ -487,7 +487,7 @@ static void g_hex_generator_print(GHexGenerator *generator, GBufferLine *line, s
init_vmpa(&pos, generator->bytes_per_line * index, VMPA_NO_VIRTUAL);
- g_buffer_line_fill_phys(line, MDS_32_BITS_UNSIGNED, &pos);
+ g_buffer_line_fill_phys(line, HLC_PHYSICAL, MDS_32_BITS_UNSIGNED, &pos);
/* Contenu brut */
diff --git a/src/glibext/generators/rborder.c b/src/glibext/generators/rborder.c
index 8ff1271..42ffc23 100644
--- a/src/glibext/generators/rborder.c
+++ b/src/glibext/generators/rborder.c
@@ -33,6 +33,7 @@
#include "../gbinarycursor.h"
#include "../linegen-int.h"
#include "../linesegment.h"
+#include "../../gtkext/gtkblockdisplay.h"
@@ -357,7 +358,9 @@ static void g_border_generator_print(GBorderGenerator *generator, GBufferLine *l
assert(repeat < 3);
- g_buffer_line_fill_vmpa(line, &generator->addr, generator->msize, generator->msize);
+ g_buffer_line_fill_phys(line, DLC_PHYSICAL, generator->msize, &generator->addr);
+
+ g_buffer_line_fill_virt(line, DLC_VIRTUAL, generator->msize, &generator->addr);
if (repeat == 1)
{