summaryrefslogtreecommitdiff
path: root/src/glibext/gcodebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext/gcodebuffer.c')
-rw-r--r--src/glibext/gcodebuffer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/glibext/gcodebuffer.c b/src/glibext/gcodebuffer.c
index 22bdcd8..e81966e 100644
--- a/src/glibext/gcodebuffer.c
+++ b/src/glibext/gcodebuffer.c
@@ -94,6 +94,8 @@ struct _GCodeBuffer
{
GObject parent; /* A laisser en premier */
+ BufferLineColumn main_column; /* Colonne principale */
+
GBufferLine **lines; /* Liste des lignes intégrées */
size_t count; /* Quantité en cache */
size_t used; /* Quantité utilisée */
@@ -372,7 +374,7 @@ static void g_code_buffer_init(GCodeBuffer *buffer)
/******************************************************************************
* *
-* Paramètres : - *
+* Paramètres : main = colonne à référencer comme étant la principale. *
* *
* Description : Crée un nouveau composant de tampon pour code désassemblé. *
* *
@@ -382,12 +384,14 @@ static void g_code_buffer_init(GCodeBuffer *buffer)
* *
******************************************************************************/
-GCodeBuffer *g_code_buffer_new(void)
+GCodeBuffer *g_code_buffer_new(BufferLineColumn main)
{
GCodeBuffer *result; /* Composant à retourner */
result = g_object_new(G_TYPE_CODE_BUFFER, NULL);
+ result->main_column = main;
+
return result;
}
@@ -488,7 +492,7 @@ GBufferLine *g_code_buffer_append_new_line(GCodeBuffer *buffer, vmpa_t addr)
buffer->count * sizeof(GBufferLine *));
}
- result = g_buffer_line_new(addr);
+ result = g_buffer_line_new(addr, buffer->main_column);
buffer->lines[buffer->used++] = result;
for (i = 0; i < buffer->indent; i++)
@@ -535,7 +539,7 @@ GBufferLine *g_code_buffer_insert_at(GCodeBuffer *buffer, vmpa_t addr, bool befo
buffer->used++;
- result = g_buffer_line_new(addr);
+ result = g_buffer_line_new(addr, buffer->main_column);
buffer->lines[index] = result;
}