diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/binary.c | 6 | ||||
-rw-r--r-- | src/analysis/db/items/comment.c | 3 | ||||
-rw-r--r-- | src/analysis/disass/block.c | 6 | ||||
-rw-r--r-- | src/analysis/routine.c | 19 | ||||
-rw-r--r-- | src/arch/instruction.c | 8 | ||||
-rw-r--r-- | src/arch/instructions/raw.c | 22 | ||||
-rw-r--r-- | src/arch/instructions/undefined.c | 4 | ||||
-rw-r--r-- | src/arch/operands/target.c | 2 | ||||
-rw-r--r-- | src/format/strsym.c | 7 | ||||
-rw-r--r-- | src/format/symbol.c | 6 | ||||
-rw-r--r-- | src/glibext/bufferline.c | 11 | ||||
-rw-r--r-- | src/glibext/bufferline.h | 2 | ||||
-rw-r--r-- | src/glibext/gbinportion.c | 4 | ||||
-rw-r--r-- | src/glibext/generators/prologue.c | 5 | ||||
-rw-r--r-- | src/glibext/generators/rborder.c | 4 | ||||
-rw-r--r-- | src/glibext/widthtracker.c | 12 | ||||
-rw-r--r-- | src/gtkext/gtkblockdisplay.c | 2 | ||||
-rw-r--r-- | src/gui/dialogs/export_disass.c | 6 | ||||
-rw-r--r-- | src/gui/dialogs/gotox.c | 5 |
19 files changed, 70 insertions, 64 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index c671827..7957f2e 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -1670,9 +1670,9 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca has_virt = g_arch_processor_has_virtual_space(binary->proc); - g_display_options_set(binary->options[BVW_HEX], 0, false); - g_display_options_set(binary->options[BVW_BLOCK], BLC_VIRTUAL, has_virt); - g_display_options_set(binary->options[BVW_GRAPH], BLC_VIRTUAL, has_virt); + g_display_options_set(binary->options[BVW_HEX], HLC_PHYSICAL, false); + g_display_options_set(binary->options[BVW_BLOCK], DLC_VIRTUAL, has_virt); + g_display_options_set(binary->options[BVW_GRAPH], DLC_VIRTUAL, has_virt); /* Phase de désassemblage pur */ diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c index a4a62b0..4b22502 100644 --- a/src/analysis/db/items/comment.c +++ b/src/analysis/db/items/comment.c @@ -40,6 +40,7 @@ #include "../../../common/extstr.h" #include "../../../glibext/gbinarycursor.h" #include "../../../glibext/linegen-int.h" +#include "../../../gtkext/gtkblockdisplay.h" @@ -1458,7 +1459,7 @@ static void g_db_comment_print(GDbComment *comment, GBufferLine *line, size_t in assert(count == comment->count); - g_buffer_line_append_text(line, BLC_COMMENTS, SL(lines[repeat]), RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_COMMENTS, SL(lines[repeat]), RTT_COMMENT, NULL); for (i = 0; i < count; i++) free(lines[i]); diff --git a/src/analysis/disass/block.c b/src/analysis/disass/block.c index f0bee99..a141d68 100644 --- a/src/analysis/disass/block.c +++ b/src/analysis/disass/block.c @@ -577,7 +577,7 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block) g_buffer_cache_append(cache, G_LINE_GENERATOR(symbol), BLF_NONE); line = g_buffer_cache_find_line_by_index(cache, 0); - name = g_buffer_line_get_text(line, BLC_ASSEMBLY_LABEL, BLC_COUNT, true); + name = g_buffer_line_get_text(line, DLC_ASSEMBLY_LABEL, DLC_COUNT, true); g_object_unref(G_OBJECT(line)); g_object_unref(G_OBJECT(cache)); @@ -690,7 +690,7 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block) if (line != NULL) { - info = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true); + info = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true); g_object_unref(G_OBJECT(line)); } @@ -746,7 +746,7 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block) if (line != NULL) { - info = g_buffer_line_get_text(line, BLC_ASSEMBLY, BLC_COUNT, true); + info = g_buffer_line_get_text(line, DLC_ASSEMBLY, DLC_COUNT, true); g_object_unref(G_OBJECT(line)); } diff --git a/src/analysis/routine.c b/src/analysis/routine.c index 82f30f8..aca47ee 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -39,6 +39,7 @@ #include "../common/extstr.h" #include "../core/params.h" #include "../glibext/gbinarycursor.h" +#include "../gtkext/gtkblockdisplay.h" @@ -940,7 +941,7 @@ void g_binary_routine_output_info(const GBinRoutine *routine, GLangOutput *lang, g_data_type_output(routine->ret_type, lang, line, true, false); - g_buffer_line_append_text(line, BLC_LAST_USED, " ", 1, RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_LAST_USED, " ", 1, RTT_COMMENT, NULL); /* Nom de la routine */ @@ -952,22 +953,22 @@ void g_binary_routine_output_info(const GBinRoutine *routine, GLangOutput *lang, len = 3; } - g_buffer_line_append_text(line, BLC_LAST_USED, name, len, RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_LAST_USED, name, len, RTT_COMMENT, NULL); /* Arguments éventuels... */ - g_buffer_line_append_text(line, BLC_LAST_USED, "(", 1, RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_LAST_USED, "(", 1, RTT_COMMENT, NULL); for (i = 0; i < routine->args_count; i++) { if (i > 0) - g_buffer_line_append_text(line, BLC_LAST_USED, ", ", 2, RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_LAST_USED, ", ", 2, RTT_COMMENT, NULL); g_binary_variable_output(routine->args[i], lang, line, true, false); } - g_buffer_line_append_text(line, BLC_LAST_USED, ")", 1, RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_LAST_USED, ")", 1, RTT_COMMENT, NULL); //g_lang_output_end_routine_prototype(lang, buffer, line); @@ -1000,7 +1001,7 @@ void g_binary_routine_print_code(const GBinRoutine *routine, GLangOutput *lang, line = g_lang_output_start_routine_prototype(lang, buffer, routine->ret_type); - g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, " ", 1, RTT_RAW, NULL); /* Nom de la routine */ @@ -1012,7 +1013,7 @@ void g_binary_routine_print_code(const GBinRoutine *routine, GLangOutput *lang, len = 3; } - g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, name, len, RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, name, len, RTT_COMMENT, NULL); @@ -1158,7 +1159,7 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi if (line != NULL) { - info = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true); + info = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true); g_object_unref(G_OBJECT(line)); } @@ -1214,7 +1215,7 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi if (line != NULL) { - info = g_buffer_line_get_text(line, BLC_ASSEMBLY, BLC_COUNT, true); + info = g_buffer_line_get_text(line, DLC_ASSEMBLY, DLC_COUNT, true); g_object_unref(G_OBJECT(line)); } diff --git a/src/arch/instruction.c b/src/arch/instruction.c index 73b68f2..ea19dab 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -1967,14 +1967,14 @@ static void _g_arch_instruction_print(GArchInstruction *instr, GBufferLine *line g_buffer_line_fill_virt(line, DLC_VIRTUAL, MDS_32_BITS_UNSIGNED, get_mrange_addr(&instr->range)); - g_buffer_line_fill_content(line, content, &instr->range, VMPA_NO_PHYSICAL); + g_buffer_line_fill_content(line, DLC_BINARY, content, &instr->range, VMPA_NO_PHYSICAL); /* Instruction proprement dite */ key = g_arch_instruction_get_keyword(instr); klen = strlen(key); - g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, G_OBJECT(instr)); + g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, G_OBJECT(instr)); /* Liste des opérandes */ @@ -1990,8 +1990,8 @@ static void _g_arch_instruction_print(GArchInstruction *instr, GBufferLine *line for (i = 1; i < count; i++) { - g_buffer_line_append_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); - g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); op = _g_arch_instruction_get_operand(instr, i); diff --git a/src/arch/instructions/raw.c b/src/arch/instructions/raw.c index 84a79e9..0c27258 100644 --- a/src/arch/instructions/raw.c +++ b/src/arch/instructions/raw.c @@ -648,17 +648,17 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s max_displayed_len /= g_arch_instruction_count_operands(base); } - g_buffer_line_fill_content(line, content, &base->range, max_displayed_len); + g_buffer_line_fill_content(line, DLC_BINARY, content, &base->range, max_displayed_len); /* Zone du code d'assemblage */ key = g_arch_instruction_get_keyword(base); klen = strlen(key); - g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, key, klen, RTT_INSTRUCTION, NULL); if (g_raw_instruction_is_padding(instr)) - g_buffer_line_append_text(line, BLC_ASSEMBLY, "...", 3, RTT_RAW, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, "...", 3, RTT_RAW, NULL); else { @@ -723,15 +723,15 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s { if (!first) { - g_buffer_line_append_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); - g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); } else first = false; string[iter++] = '"'; - g_buffer_line_append_text(line, BLC_ASSEMBLY, string, iter, RTT_STRING, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, string, iter, RTT_STRING, NULL); iter = 1; @@ -741,8 +741,8 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s if (!first) { - g_buffer_line_append_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); - g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); } else first = false; @@ -759,13 +759,13 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s { if (!first) { - g_buffer_line_append_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); - g_buffer_line_append_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, ",", 1, RTT_PUNCT, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, " ", 1, RTT_RAW, NULL); } string[iter++] = '"'; - g_buffer_line_append_text(line, BLC_ASSEMBLY, string, iter, RTT_STRING, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, string, iter, RTT_STRING, NULL); } diff --git a/src/arch/instructions/undefined.c b/src/arch/instructions/undefined.c index 1623d7b..dab7864 100644 --- a/src/arch/instructions/undefined.c +++ b/src/arch/instructions/undefined.c @@ -390,14 +390,14 @@ static void g_undef_instruction_print(GUndefInstruction *instr, GBufferLine *lin g_buffer_line_fill_virt(line, DLC_VIRTUAL, MDS_32_BITS_UNSIGNED, get_mrange_addr(&base->range)); - g_buffer_line_fill_content(line, content, &base->range, VMPA_NO_PHYSICAL); + g_buffer_line_fill_content(line, DLC_BINARY, content, &base->range, VMPA_NO_PHYSICAL); /* Instruction proprement dite */ key = g_arch_instruction_get_keyword(base); klen = strlen(key); - g_buffer_line_append_text(line, BLC_ASSEMBLY_HEAD, key, klen, RTT_ERROR, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_HEAD, key, klen, RTT_ERROR, NULL); } diff --git a/src/arch/operands/target.c b/src/arch/operands/target.c index 9b93548..78a2fc1 100644 --- a/src/arch/operands/target.c +++ b/src/arch/operands/target.c @@ -419,7 +419,7 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const if (line != NULL) { - result = g_buffer_line_get_text(line, BLC_ASSEMBLY, BLC_COUNT, true); + result = g_buffer_line_get_text(line, DLC_ASSEMBLY, DLC_COUNT, true); g_object_unref(G_OBJECT(line)); } diff --git a/src/format/strsym.c b/src/format/strsym.c index 5774a0c..aedd779 100644 --- a/src/format/strsym.c +++ b/src/format/strsym.c @@ -33,6 +33,7 @@ #include "symbol-int.h" #include "../arch/operands/feeder-int.h" #include "../common/alloc.h" +#include "../gtkext/gtkblockdisplay.h" @@ -835,12 +836,12 @@ void g_string_symbol_print(const GStrSymbol *symbol, GBufferLine *line) string = g_string_symbol_get_utf8(symbol, &len); - g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL); if (len > 0) - g_buffer_line_append_text(line, BLC_ASSEMBLY, string, len, RTT_STRING, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, string, len, RTT_STRING, NULL); - g_buffer_line_append_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY, "\"", 1, RTT_STRING, NULL); } diff --git a/src/format/symbol.c b/src/format/symbol.c index 918b006..9e57e14 100644 --- a/src/format/symbol.c +++ b/src/format/symbol.c @@ -858,9 +858,9 @@ static void g_binary_symbol_print(GBinSymbol *symbol, GBufferLine *line, size_t if (label != NULL) { - g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_LABEL); - g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, SL(label), RTT_LABEL, NULL); - g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, ":", 1, RTT_PUNCT, NULL); + g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_LABEL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, SL(label), RTT_LABEL, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, ":", 1, RTT_PUNCT, NULL); free(label); diff --git a/src/glibext/bufferline.c b/src/glibext/bufferline.c index ec1176b..b5fe7ed 100644 --- a/src/glibext/bufferline.c +++ b/src/glibext/bufferline.c @@ -351,6 +351,7 @@ void g_buffer_line_fill_virt(GBufferLine *line, size_t col, MemoryDataSize size, /****************************************************************************** * * * Paramètres : line = ligne à venir compléter. * +* col = indice de la colonne à constituer. * * content = contenu binaire global à venir lire. * * range = localisation des données à venir lire et présenter.* * max = taille maximale de la portion binaire en octets. * @@ -363,7 +364,7 @@ void g_buffer_line_fill_virt(GBufferLine *line, size_t col, MemoryDataSize size, * * ******************************************************************************/ -void g_buffer_line_fill_content(GBufferLine *line, const GBinContent *content, const mrange_t *range, phys_t max) +void g_buffer_line_fill_content(GBufferLine *line, size_t col, const GBinContent *content, const mrange_t *range, phys_t max) { phys_t length; /* Taille de la couverture */ bool truncated; /* Indique si le code est coupé*/ @@ -436,7 +437,7 @@ void g_buffer_line_fill_content(GBufferLine *line, const GBinContent *content, c /* Conclusion */ - g_buffer_line_append_text(line, BLC_BINARY, bin_code, iter - bin_code, RTT_RAW_CODE, NULL); + g_buffer_line_append_text(line, col, bin_code, iter - bin_code, RTT_RAW_CODE, NULL); if (bin_code != static_buffer) free(bin_code); @@ -462,7 +463,7 @@ GObject *g_buffer_line_find_first_segment_creator(const GBufferLine *line, Buffe GObject *result; /* Trouvaille à retourner */ size_t i; /* Boucle de parcours */ - assert(column < BLC_COUNT); + assert(column < line->col_count); result = NULL; @@ -946,7 +947,7 @@ line_segment *g_buffer_line_get_segment_from_coord(const GBufferLine *line, cons { line_segment *result; /* Trouvaille à retourner */ - if (coord->column < BLC_COUNT) + if (coord->column < line->col_count) result = get_line_column_content_from_index(&line->columns[coord->column], coord->index); else result = NULL; @@ -994,7 +995,7 @@ bool g_buffer_line_get_coord_at(const GBufferLine *line, size_t index, GWidthTra *base = 0; - last = BLC_COUNT; + last = line->col_count; last_base = 0; /* On cible déjà la colonne idéale */ diff --git a/src/glibext/bufferline.h b/src/glibext/bufferline.h index 319f9b7..f21c5d1 100644 --- a/src/glibext/bufferline.h +++ b/src/glibext/bufferline.h @@ -103,7 +103,7 @@ void g_buffer_line_fill_phys(GBufferLine *, size_t, MemoryDataSize, const vmpa2t 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); +void g_buffer_line_fill_content(GBufferLine *, size_t, const GBinContent *, const mrange_t *, phys_t); /* Recherche le premier créateur enregistré dans des segments. */ GObject *g_buffer_line_find_first_segment_creator(const GBufferLine *, BufferLineColumn); diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c index 670e0ec..884c31d 100644 --- a/src/glibext/gbinportion.c +++ b/src/glibext/gbinportion.c @@ -1128,9 +1128,9 @@ static void g_binary_portion_print(GBinPortion *portion, GBufferLine *line, size if (portion->text[repeat] != NULL) { - g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_LABEL); + g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_LABEL); - g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, SL(portion->text[repeat]), RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, SL(portion->text[repeat]), RTT_COMMENT, NULL); } diff --git a/src/glibext/generators/prologue.c b/src/glibext/generators/prologue.c index 5829fde..e19107b 100644 --- a/src/glibext/generators/prologue.c +++ b/src/glibext/generators/prologue.c @@ -33,6 +33,7 @@ #include "../linegen-int.h" #include "../linesegment.h" #include "../../format/executable.h" +#include "../../gtkext/gtkblockdisplay.h" @@ -380,9 +381,9 @@ static void g_intro_generator_print(GIntroGenerator *generator, GBufferLine *lin if ((repeat + 1) != generator->count) { - g_buffer_line_start_merge_at(line, BLC_PHYSICAL); + g_buffer_line_start_merge_at(line, DLC_PHYSICAL); - g_buffer_line_append_text(line, BLC_PHYSICAL, SL(generator->text[repeat]), RTT_COMMENT, NULL); + g_buffer_line_append_text(line, DLC_PHYSICAL, SL(generator->text[repeat]), RTT_COMMENT, NULL); if (repeat == 0) g_buffer_line_add_flag(line, BLF_WIDTH_MANAGER); diff --git a/src/glibext/generators/rborder.c b/src/glibext/generators/rborder.c index 42ffc23..97e7a22 100644 --- a/src/glibext/generators/rborder.c +++ b/src/glibext/generators/rborder.c @@ -367,8 +367,8 @@ static void g_border_generator_print(GBorderGenerator *generator, GBufferLine *l text = strdup(generator->start ? ROUTINE_INTRO_MSG : ROUTINE_OUTRO_MSG); g_coding_language_encapsulate_comment(generator->lang, &text); - g_buffer_line_start_merge_at(line, BLC_ASSEMBLY_LABEL); - g_buffer_line_append_text(line, BLC_ASSEMBLY_LABEL, SL(text), RTT_COMMENT, NULL); + g_buffer_line_start_merge_at(line, DLC_ASSEMBLY_LABEL); + g_buffer_line_append_text(line, DLC_ASSEMBLY_LABEL, SL(text), RTT_COMMENT, NULL); free(text); diff --git a/src/glibext/widthtracker.c b/src/glibext/widthtracker.c index f0e2068..a3c8cba 100644 --- a/src/glibext/widthtracker.c +++ b/src/glibext/widthtracker.c @@ -329,7 +329,7 @@ static void g_width_update_process(GWidthUpdate *update, GtkStatusStack *status) { summary = g_width_tracker_get_up_to_date_widths(update->tracker, i); - for (k = 0; k < BLC_COUNT; k++) + for (k = 0; k < update->tracker->col_count; k++) local->max_widths[k] = MAX(local->max_widths[k], summary->max_widths[k]); local->merged_width = MAX(local->merged_width, summary->merged_width); @@ -361,7 +361,7 @@ static void g_width_update_collect(GWidthUpdate *update, line_width_summary *glo local = &update->summary; - for (i = 0; i < BLC_COUNT; i++) + for (i = 0; i < update->tracker->col_count; i++) global->max_widths[i] = MAX(global->max_widths[i], local->max_widths[i]); global->merged_width = MAX(global->merged_width, local->merged_width); @@ -718,7 +718,7 @@ static void g_width_tracker_reset_widths(GWidthTracker *tracker, size_t index) if (portion->cached) { - for (k = 0; k < BLC_COUNT && tracker->cached; k++) + for (k = 0; k < tracker->col_count && tracker->cached; k++) tracker->cached &= (tracker->summary.max_widths[k] != portion->summary.max_widths[k]); tracker->cached &= (tracker->summary.merged_width != portion->summary.merged_width); @@ -1163,7 +1163,7 @@ static void g_width_tracker_ensure_valid_required_widths(GWidthTracker *tracker) { summary = g_width_tracker_get_up_to_date_widths(tracker, i); - for (k = 0; k < BLC_COUNT; k++) + for (k = 0; k < tracker->col_count; k++) global->max_widths[k] = MAX(global->max_widths[k], summary->max_widths[k]); global->merged_width = MAX(global->merged_width, summary->merged_width); @@ -1212,7 +1212,7 @@ gint g_width_tracker_get_width(GWidthTracker *tracker, const GDisplayOptions *op /* Première méthode */ - for (i = 0; i < BLC_COUNT; i++) + for (i = 0; i < tracker->col_count; i++) { if (i < count) { @@ -1222,7 +1222,7 @@ gint g_width_tracker_get_width(GWidthTracker *tracker, const GDisplayOptions *op col_width += summary->max_widths[i]; - if ((i + 1) < BLC_COUNT) + if ((i + 1) < tracker->col_count) col_width += COL_MARGIN; } diff --git a/src/gtkext/gtkblockdisplay.c b/src/gtkext/gtkblockdisplay.c index f34df3c..69a7325 100644 --- a/src/gtkext/gtkblockdisplay.c +++ b/src/gtkext/gtkblockdisplay.c @@ -427,7 +427,7 @@ void gtk_block_display_override_view_index(GtkBlockDisplay *display, unsigned in cache = g_buffer_view_get_cache(GTK_BUFFER_DISPLAY(display)->view); tracker = g_buffer_cache_get_width_tracker(cache); - g_width_tracker_set_column_min_width(tracker, BLC_ASSEMBLY_LABEL, 0); + g_width_tracker_set_column_min_width(tracker, DLC_ASSEMBLY_LABEL, 0); g_object_unref(G_OBJECT(tracker)); g_object_unref(G_OBJECT(cache)); diff --git a/src/gui/dialogs/export_disass.c b/src/gui/dialogs/export_disass.c index c15dcbc..84ccc0a 100644 --- a/src/gui/dialogs/export_disass.c +++ b/src/gui/dialogs/export_disass.c @@ -245,13 +245,13 @@ static void export_assistant_close(GtkAssistant *assistant, GObject *ref) g_object_unref(G_OBJECT(template)); checkbutton = GTK_TOGGLE_BUTTON(g_object_get_data(ref, "physical_off")); - g_display_options_set(options, BLC_PHYSICAL, gtk_toggle_button_get_active(checkbutton)); + g_display_options_set(options, DLC_PHYSICAL, gtk_toggle_button_get_active(checkbutton)); checkbutton = GTK_TOGGLE_BUTTON(g_object_get_data(ref, "virtual_addr")); - g_display_options_set(options, BLC_VIRTUAL, gtk_toggle_button_get_active(checkbutton)); + g_display_options_set(options, DLC_VIRTUAL, gtk_toggle_button_get_active(checkbutton)); checkbutton = GTK_TOGGLE_BUTTON(g_object_get_data(ref, "binary_code")); - g_display_options_set(options, BLC_BINARY, gtk_toggle_button_get_active(checkbutton)); + g_display_options_set(options, DLC_BINARY, gtk_toggle_button_get_active(checkbutton)); /* Options éventuelles */ diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c index 5ea7c07..ec665c1 100644 --- a/src/gui/dialogs/gotox.c +++ b/src/gui/dialogs/gotox.c @@ -36,6 +36,7 @@ #include "../../format/symiter.h" #include "../../glibext/gbinarycursor.h" #include "../../gtkext/easygtk.h" +#include "../../gtkext/gtkblockdisplay.h" @@ -408,7 +409,7 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary, /* Adresse en mémoire virtuelle */ if (line != NULL) - virtual = g_buffer_line_get_text(line, BLC_VIRTUAL, BLC_VIRTUAL + 1, true); + virtual = g_buffer_line_get_text(line, DLC_VIRTUAL, DLC_VIRTUAL + 1, true); else virtual = strdup(_("<line address not found>")); @@ -498,7 +499,7 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary, /* Contenu d'assemblage */ if (line != NULL) - content = g_buffer_line_get_text(line, BLC_ASSEMBLY_HEAD, BLC_COUNT, true); + content = g_buffer_line_get_text(line, DLC_ASSEMBLY_HEAD, DLC_COUNT, true); else content = strdup(_("<assembly line not found>")); |