mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-01 02:53:22 +00:00
Add hex.header configuration variable
This commit is contained in:
parent
1a5ffd5221
commit
51fcb5e2d2
@ -2049,6 +2049,7 @@ R_API int r_core_config_init(RCore *core) {
|
||||
SETCB("fs.view", "normal", &cb_fsview, "Set visibility options for filesystems");
|
||||
|
||||
/* hexdump */
|
||||
SETPREF("hex.header", "true", "Show header in hexdumps");
|
||||
SETCB("hex.pairs", "true", &cb_hexpairs, "Show bytes paired in 'px' hexdump");
|
||||
SETCB("hex.compact", "false", &cb_hexcompact, "Show smallest 16 byte col hexdump (60 columns)");
|
||||
SETI("hex.flagsz", 0, "If non zero, overrides the flag size in pxa");
|
||||
|
@ -4085,10 +4085,13 @@ static int cmd_print(void *data, const char *input) {
|
||||
{
|
||||
int show_offset = r_config_get_i (core->config, "asm.offset");
|
||||
if (show_offset) {
|
||||
core->print->flags |= R_PRINT_FLAGS_HEADER;
|
||||
core->print->flags |= R_PRINT_FLAGS_OFFSET;
|
||||
} else {
|
||||
core->print->flags &= ~R_PRINT_FLAGS_OFFSET;
|
||||
}
|
||||
if (r_config_get_i (core->config, "hex.header")) {
|
||||
core->print->flags |= R_PRINT_FLAGS_HEADER;
|
||||
} else {
|
||||
core->print->flags &= ~R_PRINT_FLAGS_HEADER;
|
||||
}
|
||||
/* Don't show comments in default case */
|
||||
|
Loading…
x
Reference in New Issue
Block a user