Add hex.bytes to toggle px/pxx

This commit is contained in:
pancake 2018-12-12 01:11:21 +01:00
parent cd9097c5ef
commit ce99ae1139

View File

@ -1351,6 +1351,17 @@ static int cb_hex_header(void *user, void *data) {
return true;
}
static int cb_hex_bytes(void *user, void *data) {
RCore *core = (RCore *) user;
RConfigNode *node = (RConfigNode *) data;
if (node->i_value) {
core->print->flags &= ~R_PRINT_FLAGS_NONHEX;
} else {
core->print->flags |= R_PRINT_FLAGS_NONHEX;
}
return true;
}
static int cb_hex_style(void *user, void *data) {
RCore *core = (RCore *) user;
RConfigNode *node = (RConfigNode *) data;
@ -2920,7 +2931,8 @@ R_API int r_core_config_init(RCore *core) {
/* hexdump */
SETCB ("hex.header", "true", &cb_hex_header, "Show header in hexdumps");
SETCB ("hex.hdroff", "false", &cb_hex_hdroff, "Show aligned 1 byte in header instead of delta nibble");
SETCB ("hex.bytes", "true", &cb_hex_bytes, "Show header in hexdumps");
SETCB ("hex.hdroff", "false", &cb_hex_hdroff, "Show aligned 1 byte in header instead of delta nibble");
SETCB ("hex.style", "false", &cb_hex_style, "Improve the hexdump header style");
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)");