summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump.h
diff options
context:
space:
mode:
authorOndrej Oprala2013-09-23 15:39:09 +0200
committerKarel Zak2013-11-08 12:54:52 +0100
commit9db5120719a4ff650f2e8b9c3c4081ee46f6f374 (patch)
tree85161ac4570af2a4032654a37241a889112f25ba /text-utils/hexdump.h
parenthexdump: add basic tests (diff)
downloadkernel-qcow2-util-linux-9db5120719a4ff650f2e8b9c3c4081ee46f6f374.tar.gz
kernel-qcow2-util-linux-9db5120719a4ff650f2e8b9c3c4081ee46f6f374.tar.xz
kernel-qcow2-util-linux-9db5120719a4ff650f2e8b9c3c4081ee46f6f374.zip
hexdump: use list.h queues and rewrite redundant for cycles
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'text-utils/hexdump.h')
-rw-r--r--text-utils/hexdump.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/text-utils/hexdump.h b/text-utils/hexdump.h
index fa8f632c1..c9fc4a009 100644
--- a/text-utils/hexdump.h
+++ b/text-utils/hexdump.h
@@ -32,9 +32,11 @@
*
* @(#)hexdump.h 5.4 (Berkeley) 6/1/90
*/
+#include "c.h"
+#include "list.h"
typedef struct _pr {
- struct _pr *nextpr; /* next print unit */
+ struct list_head nextpr; /* next print unit */
#define F_ADDRESS 0x001 /* print offset */
#define F_BPAD 0x002 /* blank pad */
#define F_C 0x004 /* %_c */
@@ -54,8 +56,8 @@ typedef struct _pr {
} PR;
typedef struct _fu {
- struct _fu *nextfu; /* next format unit */
- struct _pr *nextpr; /* next print unit */
+ struct list_head nextfu; /* next format unit */
+ struct list_head nextpr; /* next print unit */
#define F_IGNORE 0x01 /* %_A */
#define F_SETREP 0x02 /* rep count set, not default */
unsigned int flags; /* flag values */
@@ -65,13 +67,13 @@ typedef struct _fu {
} FU;
typedef struct _fs { /* format strings */
- struct _fs *nextfs; /* linked list of format strings */
- struct _fu *nextfu; /* linked list of format units */
+ struct list_head nextfs; /* linked list of format strings */
+ struct list_head nextfu; /* linked list of format units */
int bcnt;
} FS;
extern FU *endfu;
-extern FS *fshead; /* head of format strings list */
+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 */