From 589ea9a9ddfb5616b2443f7ec846e03e8077d616 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 1 Jul 2008 22:30:57 +0000 Subject: Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing this by hand in userland utilities. MFC after: 1 month --- libutil/libutil.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libutil') diff --git a/libutil/libutil.h b/libutil/libutil.h index 8fafe9b..186ee2e 100644 --- a/libutil/libutil.h +++ b/libutil/libutil.h @@ -71,6 +71,7 @@ void clean_environment(const char * const *_white, int extattr_namespace_to_string(int _attrnamespace, char **_string); int extattr_string_to_namespace(const char *_string, int *_attrnamespace); int flopen(const char *_path, int _flags, ...); +void hexdump(const void *ptr, int length, const char *hdr, int flags); void login(struct utmp *_ut); int login_tty(int _fd); int logout(const char *_line); @@ -171,4 +172,11 @@ __END_DECLS #define HN_GETSCALE 0x10 #define HN_AUTOSCALE 0x20 +/* hexdump(3) */ +#define HD_COLUMN_MASK 0xff +#define HD_DELIM_MASK 0xff00 +#define HD_OMIT_COUNT (1 << 16) +#define HD_OMIT_HEX (1 << 17) +#define HD_OMIT_CHARS (1 << 18) + #endif /* !_LIBUTIL_H_ */ -- cgit v1.2.3-56-ge451