diff options
author | Ondrej Oprala | 2013-11-08 17:13:14 +0100 |
---|---|---|
committer | Karel Zak | 2013-12-02 13:44:24 +0100 |
commit | 1f77e9c3ad0b41640a82f2aca6eff18c98483610 (patch) | |
tree | ad820f7cfa957d004b19ad3b5904623d454634ed /text-utils/hexdump.h | |
parent | hexdump: add __attribute__ ((__noreturn__)) to bad*() functions (diff) | |
download | kernel-qcow2-util-linux-1f77e9c3ad0b41640a82f2aca6eff18c98483610.tar.gz kernel-qcow2-util-linux-1f77e9c3ad0b41640a82f2aca6eff18c98483610.tar.xz kernel-qcow2-util-linux-1f77e9c3ad0b41640a82f2aca6eff18c98483610.zip |
hexdump: Create struct hexdump containing previously global variables.
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'text-utils/hexdump.h')
-rw-r--r-- | text-utils/hexdump.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/text-utils/hexdump.h b/text-utils/hexdump.h index 45c553116..56f5dc55a 100644 --- a/text-utils/hexdump.h +++ b/text-utils/hexdump.h @@ -72,23 +72,26 @@ struct hexdump_fs { /* format strings */ int bcnt; }; +struct hexdump { + struct list_head fshead; /* head of format strings */ + ssize_t blocksize; /* data block size */ + int exitval; /* final exit value */ + ssize_t length; /* max bytes to read */ + off_t skip; /* bytes to skip */ +}; + extern struct hexdump_fu *endfu; -extern struct list_head fshead; /* head of format strings list */ -extern ssize_t blocksize; /* data block size */ -extern int exitval; /* final exit value */ -extern ssize_t length; /* max bytes to read */ -extern off_t skip; /* bytes to skip */ enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */ extern enum _vflag vflag; int block_size(struct hexdump_fs *); -void add_fmt(const char *); -void rewrite_rules(struct hexdump_fs *); -void addfile(char *); -void display(void); +void add_fmt(const char *, struct hexdump *); +void rewrite_rules(struct hexdump_fs *, struct hexdump *); +void addfile(char *, struct hexdump *); +void display(struct hexdump *); void __attribute__((__noreturn__)) usage(FILE *out); void conv_c(struct hexdump_pr *, u_char *); void conv_u(struct hexdump_pr *, u_char *); -int next(char **); -int parse_args(int, char **); +int next(char **, struct hexdump *); +int parse_args(int, char **, struct hexdump *); |