summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump.h
diff options
context:
space:
mode:
authorOndrej Oprala2014-01-21 17:13:56 +0100
committerKarel Zak2014-02-10 16:01:37 +0100
commit098ab0778f5a46ab4519c8404fd4ba8ec137368b (patch)
tree62e319ce561e1b9e725312ae66d7f4d7d28824ea /text-utils/hexdump.h
parentlib/color: add colorscheme parser (diff)
downloadkernel-qcow2-util-linux-098ab0778f5a46ab4519c8404fd4ba8ec137368b.tar.gz
kernel-qcow2-util-linux-098ab0778f5a46ab4519c8404fd4ba8ec137368b.tar.xz
kernel-qcow2-util-linux-098ab0778f5a46ab4519c8404fd4ba8ec137368b.zip
hexdump: add highlighting support
[kzak@redhat.com: - fix coding style, - use xalloc in all code, - fix strtol usage] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'text-utils/hexdump.h')
-rw-r--r--text-utils/hexdump.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/text-utils/hexdump.h b/text-utils/hexdump.h
index 56f5dc55a..741a57ad2 100644
--- a/text-utils/hexdump.h
+++ b/text-utils/hexdump.h
@@ -35,6 +35,16 @@
#include "c.h"
#include "list.h"
+struct hexdump_clr {
+ struct list_head colorlist; /* next color unit */
+ const char *fmt; /* the color, UL_COLOR_* */
+ off_t offt; /* offset where unit is valid... */
+ int range; /* ... and it's range */
+ int val; /* value ... */
+ char *str; /* ... or string to match */
+ int invert; /* invert condition? */
+};
+
struct hexdump_pr {
struct list_head prlist; /* next print unit */
#define F_ADDRESS 0x001 /* print offset */
@@ -51,6 +61,7 @@ struct hexdump_pr {
unsigned int flags; /* flag values */
int bcnt; /* byte count */
char *cchar; /* conversion character */
+ struct list_head *colorlist; /* color settings */
char *fmt; /* printf format */
char *nospace; /* no whitespace version */
};