diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-07-26 18:52:15 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-07-26 18:52:15 (GMT) |
commit | a6c46fc296db67321db3d4bb586346998de90422 (patch) | |
tree | 042cd0fd89fd1f1c8943b3aefd2b50585f461f58 /src/glibext/generators | |
parent | 19516ffcca14abb082c5109125b7249bdc7fc199 (diff) |
Reduced the quantity of arguments used to deal with lines.
Diffstat (limited to 'src/glibext/generators')
-rw-r--r-- | src/glibext/generators/hex.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/glibext/generators/hex.c b/src/glibext/generators/hex.c index b261f36..f08d3fb 100644 --- a/src/glibext/generators/hex.c +++ b/src/glibext/generators/hex.c @@ -33,6 +33,7 @@ #include "../linegen-int.h" #include "../linesegment.h" #include "../../core/params.h" +#include "../../gtkext/hexdisplay.h" @@ -504,9 +505,9 @@ static void g_hex_generator_print(GHexGenerator *generator, GBufferLine *line, s if (i > 0) { if (i % 4 == 0) - g_buffer_line_append_text(line, BLC_BINARY, "\t", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, HLC_BINARY, "\t", 1, RTT_RAW, NULL); else - g_buffer_line_append_text(line, BLC_BINARY, " ", 1, RTT_RAW, NULL); + g_buffer_line_append_text(line, HLC_BINARY, " ", 1, RTT_RAW, NULL); } /* Binaire brut */ @@ -514,26 +515,26 @@ static void g_hex_generator_print(GHexGenerator *generator, GBufferLine *line, s byte = raw[i]; if (byte == 0x00) - g_buffer_line_append_text(line, BLC_BINARY, "00", 2, RTT_RAW_NULL, NULL); + g_buffer_line_append_text(line, HLC_BINARY, "00", 2, RTT_RAW_NULL, NULL); else if (byte == 0xff) - g_buffer_line_append_text(line, BLC_BINARY, ff, 2, RTT_RAW_FULL, NULL); + g_buffer_line_append_text(line, HLC_BINARY, ff, 2, RTT_RAW_FULL, NULL); else { tmp[1] = hexa[byte & 0xf]; tmp[0] = hexa[(byte >> 4) & 0xf]; - g_buffer_line_append_text(line, BLC_BINARY, tmp, 2, RTT_RAW, NULL); + g_buffer_line_append_text(line, HLC_BINARY, tmp, 2, RTT_RAW, NULL); } /* Représentation humaine ? */ if (isgraph(byte) || byte == ' ') - g_buffer_line_append_text(line, BLC_ASSEMBLY, (char *)raw + i, 1, RTT_PRINTABLE, NULL); + g_buffer_line_append_text(line, HLC_TRANSLATION, (char *)raw + i, 1, RTT_PRINTABLE, NULL); else - g_buffer_line_append_text(line, BLC_ASSEMBLY, ".", 1, RTT_NOT_PRINTABLE, NULL); + g_buffer_line_append_text(line, HLC_TRANSLATION, ".", 1, RTT_NOT_PRINTABLE, NULL); } |